nus-yam/ex-repair huggingface dataset:
Program: 62925
Project: 62925
Buggy source:
/** 
 * Prints the list of normalized points from the given list of submission data. It will be colorized and printed descending.
 */
public static String getPointsList(List<SubmissionAttributes> subs,final boolean normalized){
  String result="String_Node_Str";
  Collections.sort(subs,new Comparator<SubmissionAttributes>(){
    @Override public int compare(    SubmissionAttributes s1,    SubmissionAttributes s2){
      if (normalized)       return Integer.valueOf(s2.details.normalizedToInstructor).compareTo(s1.details.normalizedToInstructor);
 else       return Integer.valueOf(s2.points).compareTo(s1.points);
    }
  }
);
  for (  SubmissionAttributes sub : subs) {
    if (sub.reviewee.equals(sub.reviewer))     continue;
    if (result != "String_Node_Str")     result+="String_Node_Str";
    if (normalized) {
      result+=getPointsAsColorizedHtml(sub.details.normalizedToInstructor);
    }
 else {
      result+=getPointsAsColorizedHtml(sub.points);
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Prints the list of normalized points from the given list of submission data. It will be colorized and printed descending.
 */
public static String getPointsList(List<SubmissionAttributes> subs,final boolean normalized){
  String result="String_Node_Str";
  Collections.sort(subs,new Comparator<SubmissionAttributes>(){
    @Override public int compare(    SubmissionAttributes s1,    SubmissionAttributes s2){
      if (normalized)       return Integer.valueOf(s2.details.normalizedToInstructor).compareTo(s1.details.normalizedToInstructor);
 else       return Integer.valueOf(s2.points).compareTo(s1.points);
    }
  }
);
  for (  SubmissionAttributes sub : subs) {
    if (sub.reviewee.equals(sub.reviewer))     continue;
    if (!result.isEmpty())     result+="String_Node_Str";
    if (normalized) {
      result+=getPointsAsColorizedHtml(sub.details.normalizedToInstructor);
    }
 else {
      result+=getPointsAsColorizedHtml(sub.points);
    }
  }
  return result;
}
Program: 62926
Project: 62926
Buggy source:
/** 
 * @return The "normalized-for-student-view" points of the given submission list, sorted in descending order, formatted as a comma  separated and colorized string. Excludes self-rating.
 */
public static String getNormalizedToStudentsPointsList(final List<SubmissionAttributes> subs){
  String result="String_Node_Str";
  List<SubmissionAttributes> tempSubs=new ArrayList<SubmissionAttributes>(subs);
  Collections.sort(tempSubs,new Comparator<SubmissionAttributes>(){
    @Override public int compare(    SubmissionAttributes s1,    SubmissionAttributes s2){
      return Integer.valueOf(s2.details.normalizedToStudent).compareTo(s1.details.normalizedToStudent);
    }
  }
);
  for (  SubmissionAttributes sub : tempSubs) {
    if (sub.reviewee.equals(sub.reviewer))     continue;
    if (result != "String_Node_Str")     result+="String_Node_Str";
    result+=InstructorEvalResultsPageData.getPointsAsColorizedHtml(sub.details.normalizedToStudent);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @return The "normalized-for-student-view" points of the given submission list, sorted in descending order, formatted as a comma  separated and colorized string. Excludes self-rating.
 */
public static String getNormalizedToStudentsPointsList(final List<SubmissionAttributes> subs){
  String result="String_Node_Str";
  List<SubmissionAttributes> tempSubs=new ArrayList<SubmissionAttributes>(subs);
  Collections.sort(tempSubs,new Comparator<SubmissionAttributes>(){
    @Override public int compare(    SubmissionAttributes s1,    SubmissionAttributes s2){
      return Integer.valueOf(s2.details.normalizedToStudent).compareTo(s1.details.normalizedToStudent);
    }
  }
);
  for (  SubmissionAttributes sub : tempSubs) {
    if (sub.reviewee.equals(sub.reviewer))     continue;
    if (!result.isEmpty())     result+="String_Node_Str";
    result+=InstructorEvalResultsPageData.getPointsAsColorizedHtml(sub.details.normalizedToStudent);
  }
  return result;
}
Program: 62928
Project: 62928
Buggy source:
protected void doOperation(){
  appendInstitutionForAccounts();
}

Fixed version (ground truth):
protected void doOperation(){
  setInstructorStatusForInstructorAccounts();
}
Program: 62929
Project: 62929
Buggy source:
private String fillUpJoinFragment(StudentData s,String emailBody){
  emailBody=emailBody.replace("String_Node_Str",Common.STUDENT_EMAIL_FRAGMENT_COURSE_JOIN);
  String key;
  key=Common.encrypt(s.key);
  emailBody=emailBody.replace("String_Node_Str",key);
  String joinUrl=Common.TEAMMATES_APP_URL + Common.PAGE_STUDENT_JOIN_COURSE;
  joinUrl=Common.addParamToUrl(joinUrl,Common.PARAM_REGKEY,s.key);
  emailBody=emailBody.replace("String_Node_Str",joinUrl);
  return emailBody;
}

Fixed version (ground truth):
private String fillUpJoinFragment(StudentData s,String emailBody){
  emailBody=emailBody.replace("String_Node_Str",Common.STUDENT_EMAIL_FRAGMENT_COURSE_JOIN);
  String key;
  key=Common.encrypt(s.key);
  emailBody=emailBody.replace("String_Node_Str",key);
  String joinUrl=Common.TEAMMATES_APP_URL + Common.PAGE_STUDENT_JOIN_COURSE;
  joinUrl=Common.addParamToUrl(joinUrl,Common.PARAM_REGKEY,key);
  emailBody=emailBody.replace("String_Node_Str",joinUrl);
  return emailBody;
}
Program: 62930
Project: 62930
Buggy source:
@Test public void testGetKeyForStudent() throws InvalidParametersException {
  for (int i=0; i < 100; i++) {
    StudentData student=new StudentData("String_Node_Str" + Math.random() * 100 + "String_Node_Str","String_Node_Str");
    BackDoor.createStudent(student);
    String key=BackDoor.getKeyForStudent(student.course,student.email);
    System.out.println("String_Node_Str" + student.email + "String_Node_Str"+ key);
    String pattern="String_Node_Str";
    String errorMessage=key + "String_Node_Str" + key.length()+ "String_Node_Str"+ key.matches(pattern)+ "String_Node_Str";
    assertTrue(errorMessage,key.length() > 30 && key.matches(pattern));
    BackDoor.deleteStudent(student.course,student.email);
  }
}

Fixed version (ground truth):
@Test public void testGetKeyForStudent() throws InvalidParametersException {
  StudentData student=new StudentData("String_Node_Str","String_Node_Str");
  BackDoor.createStudent(student);
  String key=BackDoor.getKeyForStudent(student.course,student.email);
  System.out.println("String_Node_Str" + student.email + "String_Node_Str"+ key);
  String pattern="String_Node_Str";
  String errorMessage=key + "String_Node_Str" + key.length()+ "String_Node_Str"+ key.matches(pattern)+ "String_Node_Str";
  assertTrue(errorMessage,key.length() > 30 && key.matches(pattern));
  BackDoor.deleteStudent(student.course,student.email);
}
Program: 62931
Project: 62931
Buggy source:
@Test public void testGetKeyForStudent() throws InvalidParametersException {
  StudentData student=new StudentData("String_Node_Str","String_Node_Str");
  BackDoor.createStudent(student);
  String key=BackDoor.getKeyForStudent(student.course,student.email);
  System.out.println("String_Node_Str" + student.email + "String_Node_Str"+ key);
  String pattern="String_Node_Str";
  String errorMessage=key + "String_Node_Str" + key.length()+ "String_Node_Str"+ key.matches(pattern)+ "String_Node_Str";
  assertTrue(errorMessage,key.length() > 30 && key.matches(pattern));
  BackDoor.deleteStudent(student.course,student.email);
}

Fixed version (ground truth):
@Test public void testGetKeyForStudent() throws InvalidParametersException {
  StudentData student=new StudentData("String_Node_Str","String_Node_Str");
  BackDoor.createStudent(student);
  String key=BackDoor.getKeyForStudent(student.course,student.email);
  String pattern="String_Node_Str";
  String errorMessage=key + "String_Node_Str" + key.length()+ "String_Node_Str"+ key.matches(pattern)+ "String_Node_Str";
  assertTrue(errorMessage,key.length() > 30 && key.matches(pattern));
  BackDoor.deleteStudent(student.course,student.email);
}
Program: 62932
Project: 62932
Buggy source:
/** 
 * Escape the string for inserting into HTML
 * @param str
 * @return
 */
public static String escapeForHTML(String str){
  return str.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Escape the string for inserting into HTML
 * @param str
 * @return
 */
public static String escapeForHTML(String str){
  if (str == null) {
    return "String_Node_Str";
  }
  return str.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
}
Program: 62933
Project: 62933
Buggy source:
@Test public void testComparison() throws SAXException, IOException, TransformerException {
  String expected="String_Node_Str";
  String actual=expected;
  HtmlHelper.assertSameHtml(expected,actual);
  actual="String_Node_Str";
  HtmlHelper.assertSameHtml(expected,actual);
  expected="String_Node_Str";
  actual=expected.replace("String_Node_Str","String_Node_Str" + EOL);
  HtmlHelper.assertSameHtml(expected,actual);
  actual=expected.replace("String_Node_Str","String_Node_Str");
  HtmlHelper.assertSameHtml(expected,actual);
  actual=expected.replace("String_Node_Str","String_Node_Str" + EOL + EOL);
  HtmlHelper.assertSameHtml(expected,actual);
  actual=expected.replace("String_Node_Str",EOL + EOL + "String_Node_Str"+ EOL);
  HtmlHelper.assertSameHtml(expected,actual);
}

Fixed version (ground truth):
@Test public void testComparison() throws SAXException, IOException, TransformerException {
  String expected="String_Node_Str";
  String actual=expected;
  HtmlHelper.assertSameHtml(actual,expected);
  actual="String_Node_Str";
  HtmlHelper.assertSameHtml(actual,expected);
  expected="String_Node_Str";
  actual=expected.replace("String_Node_Str","String_Node_Str" + EOL);
  HtmlHelper.assertSameHtml(actual,expected);
  actual=expected.replace("String_Node_Str","String_Node_Str");
  HtmlHelper.assertSameHtml(actual,expected);
  actual=expected.replace("String_Node_Str","String_Node_Str" + EOL + EOL);
  HtmlHelper.assertSameHtml(actual,expected);
  actual=expected.replace("String_Node_Str",EOL + EOL + "String_Node_Str"+ EOL);
  HtmlHelper.assertSameHtml(actual,expected);
}
Program: 62935
Project: 62935
Buggy source:
/** 
 * Verifies current page against the page stored at location as pointed by filepath. This method replaces the occurence of {version} in the reference file with the value stored at Common.VERSION
 * @param filepath
 * @throws Exception
 */
public void verifyCurrentPageHTML(String filepath) throws Exception {
  String pageSrc=getCurrentPageSource();
  String inputStr=Common.readFile(filepath).replace("String_Node_Str",TestProperties.inst().TEAMMATES_VERSION);
  HtmlHelper.assertSameHtml(inputStr,pageSrc);
}

Fixed version (ground truth):
/** 
 * Verifies current page against the page stored at location as pointed by filepath. This method replaces the occurence of {version} in the reference file with the value stored at Common.VERSION
 * @param filepath
 * @throws Exception
 */
public void verifyCurrentPageHTML(String filepath) throws Exception {
  String actual=getCurrentPageSource();
  String expected=Common.readFile(filepath).replace("String_Node_Str",TestProperties.inst().TEAMMATES_VERSION);
  HtmlHelper.assertSameHtml(actual,expected);
}
Program: 62937
Project: 62937
Buggy source:
/** 
 * Assert whether two HTML strings are the same in the DOM representation. This ignores the order of attributes, and ignores unnecessary whitespaces as well.
 * @param html1
 * @param html2
 * @throws SAXException
 * @throws IOException
 * @throws TransformerException
 */
public static boolean assertSameHtml(String html1,String html2) throws SAXException, IOException, TransformerException {
  html1=preProcessHtml(html1);
  html2=preProcessHtml(html2);
  Node page1=getNodeFromString(html1);
  Node page2=getNodeFromString(html2);
  eliminateEmptyTextNodes(page1);
  eliminateEmptyTextNodes(page2);
  StringBuilder expectedHTML=new StringBuilder();
  StringBuilder actualHTML=new StringBuilder();
  boolean isLogicalMatch=compare(page1,page2,"String_Node_Str",expectedHTML,actualHTML);
  if (!isLogicalMatch) {
    assertEquals("String_Node_Str",expectedHTML.toString(),actualHTML.toString());
  }
  return isLogicalMatch;
}

Fixed version (ground truth):
/** 
 * Assert whether two HTML strings are the same in the DOM representation. This ignores the order of attributes, and ignores unnecessary whitespaces as well.
 * @param html1
 * @param html2
 * @throws SAXException
 * @throws IOException
 * @throws TransformerException
 */
public static boolean assertSameHtml(String actualString,String expectedString) throws SAXException, IOException, TransformerException {
  actualString=preProcessHtml(actualString);
  expectedString=preProcessHtml(expectedString);
  Node actualPage=getNodeFromString(actualString);
  Node expectedPage=getNodeFromString(expectedString);
  eliminateEmptyTextNodes(actualPage);
  eliminateEmptyTextNodes(expectedPage);
  StringBuilder expectedHTML=new StringBuilder();
  StringBuilder actualHTML=new StringBuilder();
  boolean isLogicalMatch=compare(actualPage,expectedPage,"String_Node_Str",actualHTML,expectedHTML);
  if (!isLogicalMatch) {
    assertEquals("String_Node_Str",expectedHTML.toString(),actualHTML.toString());
  }
  return isLogicalMatch;
}
Program: 62939
Project: 62939
Buggy source:
/** 
 * Assert whether two HTML strings are the same in the DOM representation. This ignores the order of attributes, and ignores unnecessary whitespaces as well.
 * @param html1
 * @param html2
 * @throws SAXException
 * @throws IOException
 * @throws TransformerException
 */
public static boolean assertSameHtml(String actualString,String expectedString) throws SAXException, IOException, TransformerException {
  actualString=preProcessHtml(actualString);
  expectedString=preProcessHtml(expectedString);
  Node actualPage=getNodeFromString(actualString);
  Node expectedPage=getNodeFromString(expectedString);
  eliminateEmptyTextNodes(actualPage);
  eliminateEmptyTextNodes(expectedPage);
  StringBuilder expectedHTML=new StringBuilder();
  StringBuilder actualHTML=new StringBuilder();
  boolean isLogicalMatch=compare(actualPage,expectedPage,"String_Node_Str",expectedHTML,actualHTML);
  if (!isLogicalMatch) {
    assertEquals("String_Node_Str",expectedHTML.toString(),actualHTML.toString());
  }
  return isLogicalMatch;
}

Fixed version (ground truth):
/** 
 * Assert whether two HTML strings are the same in the DOM representation. This ignores the order of attributes, and ignores unnecessary whitespaces as well.
 * @param html1
 * @param html2
 * @throws SAXException
 * @throws IOException
 * @throws TransformerException
 */
public static boolean assertSameHtml(String actualString,String expectedString) throws SAXException, IOException, TransformerException {
  actualString=preProcessHtml(actualString);
  expectedString=preProcessHtml(expectedString);
  Node actualPage=getNodeFromString(actualString);
  Node expectedPage=getNodeFromString(expectedString);
  eliminateEmptyTextNodes(actualPage);
  eliminateEmptyTextNodes(expectedPage);
  StringBuilder expectedHTML=new StringBuilder();
  StringBuilder actualHTML=new StringBuilder();
  boolean isLogicalMatch=compare(actualPage,expectedPage,"String_Node_Str",actualHTML,expectedHTML);
  if (!isLogicalMatch) {
    assertEquals("String_Node_Str",expectedHTML.toString(),actualHTML.toString());
  }
  return isLogicalMatch;
}
Program: 62940
Project: 62940
Buggy source:
@Test public void testComparison() throws SAXException, IOException, TransformerException {
  String expected="String_Node_Str";
  String actual=expected;
  HtmlHelper.assertSameHtml(expected,actual);
  actual="String_Node_Str";
  HtmlHelper.assertSameHtml(expected,actual);
  expected="String_Node_Str";
  actual=expected.replace("String_Node_Str","String_Node_Str" + EOL);
  HtmlHelper.assertSameHtml(expected,actual);
  actual=expected.replace("String_Node_Str","String_Node_Str");
  HtmlHelper.assertSameHtml(expected,actual);
  actual=expected.replace("String_Node_Str","String_Node_Str" + EOL + EOL);
  HtmlHelper.assertSameHtml(expected,actual);
  actual=expected.replace("String_Node_Str",EOL + EOL + "String_Node_Str"+ EOL);
  HtmlHelper.assertSameHtml(expected,actual);
}

Fixed version (ground truth):
@Test public void testComparison() throws SAXException, IOException, TransformerException {
  String expected="String_Node_Str";
  String actual=expected;
  HtmlHelper.assertSameHtml(actual,expected);
  actual="String_Node_Str";
  HtmlHelper.assertSameHtml(actual,expected);
  expected="String_Node_Str";
  actual=expected.replace("String_Node_Str","String_Node_Str" + EOL);
  HtmlHelper.assertSameHtml(actual,expected);
  actual=expected.replace("String_Node_Str","String_Node_Str");
  HtmlHelper.assertSameHtml(actual,expected);
  actual=expected.replace("String_Node_Str","String_Node_Str" + EOL + EOL);
  HtmlHelper.assertSameHtml(actual,expected);
  actual=expected.replace("String_Node_Str",EOL + EOL + "String_Node_Str"+ EOL);
  HtmlHelper.assertSameHtml(actual,expected);
}
Program: 62942
Project: 62942
Buggy source:
/** 
 * Verifies current page against the page stored at location as pointed by filepath. This method replaces the occurence of {version} in the reference file with the value stored at Common.VERSION
 * @param filepath
 * @throws Exception
 */
public void verifyCurrentPageHTML(String filepath) throws Exception {
  String pageSrc=getCurrentPageSource();
  String inputStr=Common.readFile(filepath).replace("String_Node_Str",TestProperties.inst().TEAMMATES_VERSION);
  HtmlHelper.assertSameHtml(inputStr,pageSrc);
}

Fixed version (ground truth):
/** 
 * Verifies current page against the page stored at location as pointed by filepath. This method replaces the occurence of {version} in the reference file with the value stored at Common.VERSION
 * @param filepath
 * @throws Exception
 */
public void verifyCurrentPageHTML(String filepath) throws Exception {
  String actual=getCurrentPageSource();
  String expected=Common.readFile(filepath).replace("String_Node_Str",TestProperties.inst().TEAMMATES_VERSION);
  HtmlHelper.assertSameHtml(actual,expected);
}
Program: 62944
Project: 62944
Buggy source:
/** 
 * Assert whether two HTML strings are the same in the DOM representation. This ignores the order of attributes, and ignores unnecessary whitespaces as well.
 * @param html1
 * @param html2
 * @throws SAXException
 * @throws IOException
 * @throws TransformerException
 */
public static boolean assertSameHtml(String html1,String html2) throws SAXException, IOException, TransformerException {
  html1=preProcessHtml(html1);
  html2=preProcessHtml(html2);
  Node page1=getNodeFromString(html1);
  Node page2=getNodeFromString(html2);
  eliminateEmptyTextNodes(page1);
  eliminateEmptyTextNodes(page2);
  StringBuilder expectedHTML=new StringBuilder();
  StringBuilder actualHTML=new StringBuilder();
  boolean isLogicalMatch=compare(page1,page2,"String_Node_Str",expectedHTML,actualHTML);
  if (!isLogicalMatch) {
    assertEquals("String_Node_Str",expectedHTML.toString(),actualHTML.toString());
  }
  return isLogicalMatch;
}

Fixed version (ground truth):
/** 
 * Assert whether two HTML strings are the same in the DOM representation. This ignores the order of attributes, and ignores unnecessary whitespaces as well.
 * @param html1
 * @param html2
 * @throws SAXException
 * @throws IOException
 * @throws TransformerException
 */
public static boolean assertSameHtml(String actualString,String expectedString) throws SAXException, IOException, TransformerException {
  actualString=preProcessHtml(actualString);
  expectedString=preProcessHtml(expectedString);
  Node actualPage=getNodeFromString(actualString);
  Node expectedPage=getNodeFromString(expectedString);
  eliminateEmptyTextNodes(actualPage);
  eliminateEmptyTextNodes(expectedPage);
  StringBuilder expectedHTML=new StringBuilder();
  StringBuilder actualHTML=new StringBuilder();
  boolean isLogicalMatch=compare(actualPage,expectedPage,"String_Node_Str",expectedHTML,actualHTML);
  if (!isLogicalMatch) {
    assertEquals("String_Node_Str",expectedHTML.toString(),actualHTML.toString());
  }
  return isLogicalMatch;
}
Program: 62945
Project: 62945
Buggy source:
@Override protected void doAction(HttpServletRequest req,AdminHomeHelper helper){
  String instructorID=req.getParameter(Common.PARAM_INSTRUCTOR_ID);
  String instructorName=req.getParameter(Common.PARAM_INSTRUCTOR_NAME);
  String instructorEmail=req.getParameter(Common.PARAM_INSTRUCTOR_EMAIL);
  String importSampleData=req.getParameter(Common.PARAM_INSTRUCTOR_IMPORT_SAMPLE);
  try {
    if (instructorID != null && instructorName != null && instructorEmail != null) {
      helper.server.createAccount(instructorID,true);
      helper.statusMessage="String_Node_Str" + instructorName + "String_Node_Str";
    }
    if (importSampleData != null) {
      importDemoData(instructorID,instructorName,instructorEmail,helper);
    }
  }
 catch (  Exception e) {
    helper.statusMessage=e.getMessage();
    helper.error=true;
  }
}

Fixed version (ground truth):
@Override protected void doAction(HttpServletRequest req,AdminHomeHelper helper){
  String instructorID=req.getParameter(Common.PARAM_INSTRUCTOR_ID);
  String instructorName=req.getParameter(Common.PARAM_INSTRUCTOR_NAME);
  String instructorEmail=req.getParameter(Common.PARAM_INSTRUCTOR_EMAIL);
  String importSampleData=req.getParameter(Common.PARAM_INSTRUCTOR_IMPORT_SAMPLE);
  try {
    if (instructorID != null && instructorName != null && instructorEmail != null) {
      helper.server.createAccount(instructorID,instructorName,true,instructorEmail,"String_Node_Str");
      helper.statusMessage="String_Node_Str" + instructorName + "String_Node_Str";
    }
    if (importSampleData != null) {
      importDemoData(instructorID,instructorName,instructorEmail,helper);
    }
  }
 catch (  Exception e) {
    helper.statusMessage=e.getMessage();
    helper.error=true;
  }
}
Program: 62946
Project: 62946
Buggy source:
public String getInvalidStateInfo(){
  String errorMessage="String_Node_Str";
  if (this.id == null || this.id == "String_Node_Str") {
    errorMessage+="String_Node_Str";
  }
  if (this.name == null || this.name == "String_Node_Str") {
    errorMessage+="String_Node_Str";
  }
  if (this.email == null || this.email == "String_Node_Str") {
    errorMessage+="String_Node_Str";
  }
  return errorMessage;
}

Fixed version (ground truth):
public String getInvalidStateInfo(){
  String errorMessage="String_Node_Str";
  if (!Common.isValidGoogleId(id)) {
    errorMessage+=ERROR_FIELD_ID;
  }
  if (!Common.isValidName(name)) {
    errorMessage+=ERROR_FIELD_NAME;
  }
  if (!Common.isValidEmail(email)) {
    errorMessage+=ERROR_FIELD_EMAIL;
  }
  return errorMessage;
}
Program: 62947
Project: 62947
Buggy source:
public CoordData(){
  isCoord=true;
}

Fixed version (ground truth):
public CoordData(){
}
Program: 62948
Project: 62948
Buggy source:
protected void getUserActionLog(HttpServletRequest req,String resp,T helper){
  StringBuilder sb=new StringBuilder();
  String[] actionTkn=req.getServletPath().split("String_Node_Str");
  String action=req.getServletPath();
  if (actionTkn.length > 0) {
    action=actionTkn[actionTkn.length - 1];
  }
  sb.append(action + "String_Node_Str");
  sb.append(printRequestParameters(req) + "String_Node_Str");
  if (helper.user.isCoord) {
    sb.append("String_Node_Str");
    CoordData u=helper.server.getCoord(helper.userId);
    sb.append(u.name + "String_Node_Str");
    sb.append(u.id + "String_Node_Str");
    sb.append(u.email + "String_Node_Str");
  }
  if (helper.user.isStudent) {
    sb.append("String_Node_Str");
    ArrayList<StudentData> students=helper.server.getStudentsWithId(helper.userId);
    if (students.size() == 1) {
      StudentData s=students.get(0);
      sb.append(s.name + "String_Node_Str");
      sb.append(s.id + "String_Node_Str");
      sb.append(s.email + "String_Node_Str");
    }
 else {
      sb.append("String_Node_Str");
      sb.append(helper.userId + "String_Node_Str");
      sb.append("String_Node_Str");
    }
  }
  sb.append(resp + "String_Node_Str");
}

Fixed version (ground truth):
protected String getUserActionLog(HttpServletRequest req,String resp,T helper){
  StringBuilder sb=new StringBuilder("String_Node_Str");
  String[] actionTkn=req.getServletPath().split("String_Node_Str");
  String action=req.getServletPath();
  if (actionTkn.length > 0) {
    action=actionTkn[actionTkn.length - 1];
  }
  sb.append(action + "String_Node_Str");
  if (helper.user.isCoord) {
    sb.append("String_Node_Str");
    CoordData u=helper.server.getCoord(helper.userId);
    sb.append(u.name + "String_Node_Str");
    sb.append(u.id + "String_Node_Str");
    sb.append(u.email + "String_Node_Str");
  }
 else   if (helper.user.isStudent) {
    sb.append("String_Node_Str");
    ArrayList<StudentData> students=helper.server.getStudentsWithId(helper.userId);
    if (students.size() == 1) {
      StudentData s=students.get(0);
      sb.append(s.name + "String_Node_Str");
      sb.append(s.id + "String_Node_Str");
      sb.append(s.email + "String_Node_Str");
    }
 else {
      sb.append("String_Node_Str");
      sb.append(helper.userId + "String_Node_Str");
      sb.append(helper.userId + "String_Node_Str");
    }
  }
 else {
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    sb.append(helper.userId + "String_Node_Str");
    sb.append(helper.userId + "String_Node_Str");
  }
  sb.append(resp + "String_Node_Str");
  sb.append(printRequestParameters(req));
  return sb.toString();
}
Program: 62949
Project: 62949
Buggy source:
@Override public final void doPost(HttpServletRequest req,HttpServletResponse resp) throws IOException, ServletException {
  isPost=req.getMethod().equals("String_Node_Str");
  if (isPost) {
    log.info("String_Node_Str");
  }
 else {
    log.info("String_Node_Str");
  }
  T helper=instantiateHelper();
  prepareHelper(req,helper);
  try {
    doAction(req,helper);
    log.info("String_Node_Str" + req.getServletPath() + "String_Node_Str"+ "String_Node_Str"+ printRequestParameters(req)+ "String_Node_Str"+ "String_Node_Str"+ resp.SC_OK);
  }
 catch (  EntityDoesNotExistException e) {
    log.warning("String_Node_Str" + req.getServletPath() + "String_Node_Str"+ "String_Node_Str"+ printRequestParameters(req)+ "String_Node_Str"+ "String_Node_Str"+ e.getMessage());
    resp.sendRedirect(Common.JSP_ENTITY_NOT_FOUND_PAGE);
    return;
  }
catch (  UnauthorizedAccessException e) {
    UserData user=new Logic().getLoggedInUser();
    log.warning("String_Node_Str" + req.getServletPath() + "String_Node_Str"+ "String_Node_Str"+ printRequestParameters(req)+ "String_Node_Str"+ "String_Node_Str"+ (user == null ? "String_Node_Str" : user.id)+ Common.stackTraceToString(e));
    resp.sendRedirect(Common.JSP_UNAUTHORIZED);
    return;
  }
catch (  Exception e) {
    log.severe("String_Node_Str" + req.getServletPath() + "String_Node_Str"+ "String_Node_Str"+ printRequestParameters(req)+ "String_Node_Str"+ "String_Node_Str"+ Common.stackTraceToString(e));
    resp.sendRedirect(Common.JSP_ERROR_PAGE);
    return;
  }
  doCreateResponse(req,resp,helper);
}

Fixed version (ground truth):
@Override public final void doPost(HttpServletRequest req,HttpServletResponse resp) throws IOException, ServletException {
  isPost=req.getMethod().equals("String_Node_Str");
  if (isPost) {
    log.info("String_Node_Str");
  }
 else {
    log.info("String_Node_Str");
  }
  T helper=instantiateHelper();
  prepareHelper(req,helper);
  Level logLevel=null;
  String response=null;
  try {
    doAction(req,helper);
    logLevel=Level.INFO;
    response="String_Node_Str";
    doCreateResponse(req,resp,helper);
  }
 catch (  EntityDoesNotExistException e) {
    logLevel=Level.WARNING;
    response="String_Node_Str";
    resp.sendRedirect(Common.JSP_ENTITY_NOT_FOUND_PAGE);
  }
catch (  UnauthorizedAccessException e) {
    UserData user=new Logic().getLoggedInUser();
    logLevel=Level.WARNING;
    response="String_Node_Str" + (user == null ? "String_Node_Str" : user.id);
    resp.sendRedirect(Common.JSP_UNAUTHORIZED);
  }
catch (  Throwable e) {
    logLevel=Level.SEVERE;
    response="String_Node_Str" + (e.getMessage() == null ? "String_Node_Str" : e.getMessage());
    resp.sendRedirect(Common.JSP_ERROR_PAGE);
  }
 finally {
    String logMsg=getUserActionLog(req,response,helper);
    logUserAction(logLevel,logMsg);
  }
}
Program: 62950
Project: 62950
Buggy source:
private List<AppLogLine> getAppLogs(LogQuery query,int queryLimit,AdminHomeHelper helper){
  List<AppLogLine> appLogs=new LinkedList<AppLogLine>();
  String lastOffset=null;
  int i=0;
  for (  RequestLogs record : LogServiceFactory.getLogService().fetch(query)) {
    lastOffset=record.getOffset();
    for (    AppLogLine appLog : record.getAppLogLines()) {
      if (appLog.getLogMessage().contains("String_Node_Str")) {
        appLogs.add(appLog);
      }
    }
    if (++i >= queryLimit) {
      break;
    }
  }
  if (lastOffset != null) {
    helper.statusMessage=String.format("String_Node_Str",Common.PAGE_ADMIN_ACTIVITY_LOG,lastOffset);
  }
  return appLogs;
}

Fixed version (ground truth):
private List<AppLogLine> getAppLogs(LogQuery query,int queryLimit,AdminHomeHelper helper){
  List<AppLogLine> appLogs=new LinkedList<AppLogLine>();
  String lastOffset=null;
  int i=0;
  for (  RequestLogs record : LogServiceFactory.getLogService().fetch(query)) {
    lastOffset=record.getOffset();
    for (    AppLogLine appLog : record.getAppLogLines()) {
      String logMsg=appLog.getLogMessage();
      if (logMsg.contains("String_Node_Str")) {
        appLogs.add(appLog);
      }
    }
    if (++i >= queryLimit) {
      break;
    }
  }
  if (lastOffset != null) {
    helper.statusMessage=String.format("String_Node_Str",Common.PAGE_ADMIN_ACTIVITY_LOG,lastOffset);
  }
  return appLogs;
}
Program: 62951
Project: 62951
Buggy source:
@PerformanceTest(name="String_Node_Str") public Long coordDeleteEval() throws Exception {
  int evalRowID=bi.getEvaluationRowID("String_Node_Str","String_Node_Str");
  By deleteLinkLocator=bi.getCoordEvaluationDeleteLinkLocator(evalRowID);
  long startTime=System.nanoTime();
  bi.clickAndConfirm(deleteLinkLocator);
  return System.nanoTime() - startTime;
}

Fixed version (ground truth):
@PerformanceTest(name="String_Node_Str",customTimer=true) public Long coordDeleteEval(){
  int evalRowID=bi.getEvaluationRowID("String_Node_Str","String_Node_Str");
  By deleteLinkLocator=bi.getCoordEvaluationDeleteLinkLocator(evalRowID);
  long startTime=System.nanoTime();
  bi.clickAndConfirm(deleteLinkLocator);
  return System.nanoTime() - startTime;
}
Program: 62953
Project: 62953
Buggy source:
/** 
 * Run this script as an single-thread Java application (for simple, non-parallel profiling)
 * @param args
 * @throws Exception
 */
public static void main(String[] args) throws Exception {
  (new PerformanceProfiler(defaultReportPath)).start();
}

Fixed version (ground truth):
/** 
 * Run this script as an single-thread Java application (for simple, non-parallel profiling) For parallel profiling, please use ParallelProfiler.java
 * @param args
 * @throws Exception
 */
public static void main(String[] args) throws Exception {
  (new PerformanceProfiler(defaultReportPath)).start();
}
Program: 62954
Project: 62954
Buggy source:
@PerformanceTest(name="String_Node_Str",customTimer=true) public Long coordAddCourse(){
  bi.addCourse("String_Node_Str","String_Node_Str");
  long startTime=System.nanoTime();
  bi.waitForStatusMessage(Common.MESSAGE_COURSE_ADDED);
  return System.nanoTime() - startTime;
}

Fixed version (ground truth):
@PerformanceTest(name="String_Node_Str",customTimer=true) public Long coordAddCourse(){
  long startTime=System.nanoTime();
  bi.addCourse("String_Node_Str","String_Node_Str");
  bi.waitForStatusMessage(Common.MESSAGE_COURSE_ADDED);
  return System.nanoTime() - startTime;
}
Program: 62955
Project: 62955
Buggy source:
@PerformanceTest(name="String_Node_Str") public Long coordCourseDeleteStudent(){
  int studentRowId=bi.getStudentRowId("String_Node_Str");
  long startTime=System.nanoTime();
  bi.clickCoordCourseDetailStudentDeleteAndConfirm(studentRowId);
  return System.nanoTime() - startTime;
}

Fixed version (ground truth):
@PerformanceTest(name="String_Node_Str",customTimer=true) public Long coordCourseDeleteStudent(){
  int studentRowId=bi.getStudentRowId("String_Node_Str");
  long startTime=System.nanoTime();
  bi.clickCoordCourseDetailStudentDeleteAndConfirm(studentRowId);
  return System.nanoTime() - startTime;
}
Program: 62956
Project: 62956
Buggy source:
@PerformanceTest(name="String_Node_Str",customTimer=true) public Long coordAddEval(){
  Calendar cal=Calendar.getInstance();
  cal.add(Calendar.DATE,+1);
  Date date1=cal.getTime();
  cal.add(Calendar.DATE,+2);
  Date date2=cal.getTime();
  bi.addEvaluation("String_Node_Str","String_Node_Str",date1,date2,true,"String_Node_Str",5);
  long startTime=System.nanoTime();
  bi.waitForStatusMessage(Common.MESSAGE_EVALUATION_ADDED);
  return System.nanoTime() - startTime;
}

Fixed version (ground truth):
@PerformanceTest(name="String_Node_Str",customTimer=true) public Long coordAddEval(){
  Calendar cal=Calendar.getInstance();
  cal.add(Calendar.DATE,+1);
  Date date1=cal.getTime();
  cal.add(Calendar.DATE,+2);
  Date date2=cal.getTime();
  long startTime=System.nanoTime();
  bi.addEvaluation("String_Node_Str","String_Node_Str",date1,date2,true,"String_Node_Str",5);
  bi.waitForStatusMessage(Common.MESSAGE_EVALUATION_ADDED);
  return System.nanoTime() - startTime;
}
Program: 62957
Project: 62957
Buggy source:
@PerformanceTest(name="String_Node_Str") public Long coordCourseEnrollStudent(){
  String enrollString="String_Node_Str";
  bi.fillString(By.id("String_Node_Str"),enrollString);
  long startTime=System.nanoTime();
  bi.click(By.id("String_Node_Str"));
  return System.nanoTime() - startTime;
}

Fixed version (ground truth):
@PerformanceTest(name="String_Node_Str",customTimer=true) public Long coordCourseEnrollStudent(){
  String enrollString="String_Node_Str";
  bi.fillString(By.id("String_Node_Str"),enrollString);
  long startTime=System.nanoTime();
  bi.click(By.id("String_Node_Str"));
  return System.nanoTime() - startTime;
}
Program: 62958
Project: 62958
Buggy source:
public static boolean isValidCourseId(String courseId){
  if (isValidString(courseId) && hasNoSpace(courseId) && courseId.matches("String_Node_Str")&& courseId.length() <= COURSE_ID_MAX_LENGTH) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean isValidCourseId(String courseId){
  return (isValidString(courseId) && hasNoSpace(courseId) && courseId.matches("String_Node_Str")&& courseId.length() <= COURSE_ID_MAX_LENGTH);
}
Program: 62959
Project: 62959
Buggy source:
public static boolean hasNoSpace(String string){
  if (string.split("String_Node_Str").length > 1) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
public static boolean hasNoSpace(String string){
  return string.split("String_Node_Str").length == 1;
}
Program: 62960
Project: 62960
Buggy source:
public static boolean isValidEmail(String email){
  if (isValidString(email) && hasNoSpace(email) && email.contains("String_Node_Str")) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean isValidEmail(String email){
  return (isValidString(email) && hasNoSpace(email) && email.contains("String_Node_Str"));
}
Program: 62961
Project: 62961
Buggy source:
public static boolean isValidName(String name){
  if (isValidString(name)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean isValidName(String name){
  return isValidString(name);
}
Program: 62962
Project: 62962
Buggy source:
public static boolean isValidGoogleId(String googleId){
  if (isValidString(googleId) && hasNoSpace(googleId)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean isValidGoogleId(String googleId){
  return (isValidString(googleId) && hasNoSpace(googleId));
}
Program: 62963
Project: 62963
Buggy source:
public static boolean isValidString(String string){
  if (string == null || string == "String_Node_Str" || string.length() == 0) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
public static boolean isValidString(String string){
  return (string != null && string != "String_Node_Str" && string.length() != 0);
}
Program: 62964
Project: 62964
Buggy source:
public boolean isValid(){
  if (Common.isValidGoogleId(id) && Common.isValidName(name) && Common.isValidEmail(email)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isValid(){
  return getInvalidStateInfo() == "String_Node_Str";
}
Program: 62965
Project: 62965
Buggy source:
public boolean isValid(){
  if (Common.isValidCourseId(id) && Common.isValidName(name) && name.length() <= COURSE_NAME_MAX_LENGTH && Common.isValidGoogleId(coord)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isValid(){
  return getInvalidStateInfo() == "String_Node_Str";
}
Program: 62966
Project: 62966
Buggy source:
public String getInvalidStateInfo(){
  String errorMessage="String_Node_Str";
  if (!Common.isValidCourseId(course)) {
    errorMessage+=ERROR_FIELD_COURSE;
  }
  if (!Common.isValidName(name)) {
    errorMessage+=ERROR_FIELD_NAME;
  }
 else   if (name.length() > EVALUATION_NAME_MAX_LENGTH) {
    errorMessage+=ERROR_NAME_TOOLONG;
  }
  if (this.startTime == null) {
    errorMessage+=ERROR_FIELD_STARTTIME;
  }
  if (this.endTime == null) {
    errorMessage+=ERROR_FIELD_ENDTIME;
  }
  if (this.startTime != null && this.endTime != null) {
    if (endTime.before(startTime)) {
      errorMessage+=ERROR_END_BEFORE_START;
    }
    if (beforeTime(endTime) && published) {
      errorMessage+=ERROR_PUBLISHED_BEFORE_END;
    }
    if (beforeTime(startTime) && activated) {
      errorMessage+=ERROR_ACTIVATED_BEFORE_START;
    }
  }
  return errorMessage;
}

Fixed version (ground truth):
public String getInvalidStateInfo(){
  String errorMessage="String_Node_Str";
  if (!Common.isValidCourseId(course)) {
    errorMessage+=ERROR_FIELD_COURSE;
  }
  if (!Common.isValidName(name)) {
    errorMessage+=ERROR_FIELD_NAME;
  }
 else   if (name.length() > EVALUATION_NAME_MAX_LENGTH) {
    errorMessage+=ERROR_NAME_TOOLONG;
  }
  if (this.startTime == null) {
    errorMessage+=ERROR_FIELD_STARTTIME;
  }
  if (this.endTime == null) {
    errorMessage+=ERROR_FIELD_ENDTIME;
  }
  if (this.startTime != null && this.endTime != null) {
    if (endTime.before(startTime)) {
      errorMessage+=ERROR_END_BEFORE_START;
    }
    if (isCurrentTimeZoneEarlierThan(endTime) && published) {
      errorMessage+=ERROR_PUBLISHED_BEFORE_END;
    }
    if (isCurrentTimeZoneEarlierThan(startTime) && activated) {
      errorMessage+=ERROR_ACTIVATED_BEFORE_START;
    }
  }
  return errorMessage;
}
Program: 62967
Project: 62967
Buggy source:
public boolean isValid(){
  course=course == null ? null : course.trim();
  name=name == null ? null : name.trim();
  if (Common.isValidCourseId(course) && Common.isValidName(name) && name.length() <= EVALUATION_NAME_MAX_LENGTH && this.startTime != null && this.endTime != null && !endTime.before(startTime) && !(beforeTime(endTime) && published) && !(beforeTime(startTime) && activated)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isValid(){
  course=course == null ? null : course.trim();
  name=name == null ? null : name.trim();
  return getInvalidStateInfo() == "String_Node_Str";
}
Program: 62968
Project: 62968
Buggy source:
public StudentData(Student student){
  this();
  this.email=student.getEmail();
  this.course=student.getCourseID();
  this.name=student.getName();
  this.comments=student.getComments() == null ? "String_Node_Str" : student.getComments();
  this.team=student.getTeamName() == null ? "String_Node_Str" : student.getTeamName();
  this.profile=student.getProfileDetail();
  this.id=student.getID() == null ? "String_Node_Str" : student.getID();
  Long keyAsLong=student.getRegistrationKey();
  this.key=(keyAsLong == null ? null : Student.getStringKeyForLongKey(keyAsLong));
}

Fixed version (ground truth):
public StudentData(Student student){
  this();
  this.email=student.getEmail();
  this.course=student.getCourseID();
  this.name=student.getName();
  this.comments=((student.getComments() == null) ? "String_Node_Str" : student.getComments());
  this.team=((student.getTeamName() == null) ? "String_Node_Str" : student.getTeamName());
  this.profile=student.getProfileDetail();
  this.id=((student.getID() == null) ? "String_Node_Str" : student.getID());
  Long keyAsLong=student.getRegistrationKey();
  this.key=(keyAsLong == null ? null : Student.getStringKeyForLongKey(keyAsLong));
}
Program: 62969
Project: 62969
Buggy source:
public boolean isValid(){
  if (Common.isValidName(name) && name.length() <= STUDENT_NAME_MAX_LENGTH && (team == null || (team.length() <= TEAM_NAME_MAX_LENGTH)) && Common.isValidEmail(email) && Common.isValidCourseId(course) && (comments == null || (comments.length() <= COMMENTS_MAX_LENGTH))) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isValid(){
  return getInvalidStateInfo() == "String_Node_Str";
}
Program: 62970
Project: 62970
Buggy source:
public boolean isValid(){
  if (Common.isValidCourseId(course) && Common.isValidName(evaluation) && Common.isValidEmail(reviewee)&& Common.isValidEmail(reviewer)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isValid(){
  return getInvalidStateInfo() == "String_Node_Str";
}
Program: 62971
Project: 62971
Buggy source:
public MimeMessage generateSystemErrorEmail(Throwable error,String requestPath,String requestParam) throws AddressException, MessagingException {
  Session session=Session.getDefaultInstance(new Properties(),null);
  MimeMessage message=new MimeMessage(session);
  String errorMessage=error.getMessage();
  String stackTrace=Common.stackTraceToString(error);
  if (errorMessage == null) {
    int msgTruncateIndex=stackTrace.indexOf("String_Node_Str");
    if (msgTruncateIndex > 0) {
      errorMessage=stackTrace.substring(0,msgTruncateIndex);
    }
 else {
      errorMessage="String_Node_Str";
    }
  }
  String recipient=BuildProperties.inst().getAppCrashReportEmail();
  message.addRecipient(Message.RecipientType.TO,new InternetAddress(recipient));
  message.setFrom(new InternetAddress(from));
  message.setSubject(String.format(SUBJECT_PREFIX_ADMIN_SYSTEM_ERROR,BuildProperties.getAppVersion(),errorMessage));
  String emailBody=Common.SYSTEM_ERROR_EMAIL_TEMPLATE;
  emailBody=emailBody.replace("String_Node_Str",requestPath);
  emailBody=emailBody.replace("String_Node_Str",requestParam);
  emailBody=emailBody.replace("String_Node_Str",errorMessage);
  emailBody=emailBody.replace("String_Node_Str",stackTrace);
  message.setContent(emailBody,"String_Node_Str");
  sendEmail(message);
  return message;
}

Fixed version (ground truth):
/** 
 * Generate Email of system error the parameter "version" can be encapsulated in side this function it's kept as a parameter for testing purpose
 */
public MimeMessage generateSystemErrorEmail(Throwable error,String requestPath,String requestParam,String version) throws AddressException, MessagingException {
  Session session=Session.getDefaultInstance(new Properties(),null);
  MimeMessage message=new MimeMessage(session);
  String errorMessage=error.getMessage();
  String stackTrace=Common.stackTraceToString(error);
  if (errorMessage == null) {
    int msgTruncateIndex=stackTrace.indexOf("String_Node_Str");
    if (msgTruncateIndex > 0) {
      errorMessage=stackTrace.substring(0,msgTruncateIndex);
    }
 else {
      errorMessage="String_Node_Str";
    }
  }
  String recipient=BuildProperties.inst().getAppCrashReportEmail();
  message.addRecipient(Message.RecipientType.TO,new InternetAddress(recipient));
  message.setFrom(new InternetAddress(from));
  message.setSubject(String.format(SUBJECT_PREFIX_ADMIN_SYSTEM_ERROR,version,errorMessage));
  String emailBody=Common.SYSTEM_ERROR_EMAIL_TEMPLATE;
  emailBody=emailBody.replace("String_Node_Str",requestPath);
  emailBody=emailBody.replace("String_Node_Str",requestParam);
  emailBody=emailBody.replace("String_Node_Str",errorMessage);
  emailBody=emailBody.replace("String_Node_Str",stackTrace);
  message.setContent(emailBody,"String_Node_Str");
  return message;
}
Program: 62972
Project: 62972
Buggy source:
/** 
 * This method sends run-time error message to system support email
 * @param req httpRequest that triggers the error
 * @param error the error object
 */
public MimeMessage emailErrorReport(String path,String params,Throwable error){
  Emails emailMgr=new Emails();
  MimeMessage email=null;
  try {
    email=emailMgr.generateSystemErrorEmail(error,path,params);
    emailMgr.sendEmail(email);
    log.severe("String_Node_Str" + Emails.getEmailInfo(email));
  }
 catch (  Exception e) {
    log.severe("String_Node_Str" + (email == null ? "String_Node_Str" : email.toString()));
  }
  return email;
}

Fixed version (ground truth):
/** 
 * This method sends run-time error message to system support email
 * @param req httpRequest that triggers the error
 * @param error the error object
 */
public MimeMessage emailErrorReport(String path,String params,Throwable error){
  Emails emailMgr=new Emails();
  MimeMessage email=null;
  try {
    email=emailMgr.generateSystemErrorEmail(error,path,params,BuildProperties.getAppVersion());
    emailMgr.sendEmail(email);
    log.severe("String_Node_Str" + Emails.getEmailInfo(email));
  }
 catch (  Exception e) {
    log.severe("String_Node_Str" + (email == null ? "String_Node_Str" : email.toString()));
  }
  return email;
}
Program: 62973
Project: 62973
Buggy source:
@Test public void testSystemCrashReportEmailContent() throws IOException, MessagingException {
  AssertionError error=new AssertionError("String_Node_Str");
  StackTraceElement s1=new StackTraceElement(SystemErrorEmailReportTest.class.getName(),"String_Node_Str","String_Node_Str",89);
  error.setStackTrace(new StackTraceElement[]{s1});
  String stackTrace=Common.stackTraceToString(error);
  String requestPath="String_Node_Str";
  String requestParam="String_Node_Str";
  String version="String_Node_Str";
  ______TS("String_Node_Str");
  MimeMessage email=new Emails().generateSystemErrorEmail(error.getMessage(),stackTrace,requestPath,requestParam,version);
  String recipient=BuildProperties.inst().getAppCrashReportEmail();
  assertEquals(recipient,email.getAllRecipients()[0].toString());
  assertEquals(from,email.getFrom()[0].toString());
  String emailBody=email.getContent().toString();
  assertContainsRegex("String_Node_Str" + error.getMessage() + "String_Node_Str"+ requestPath+ "String_Node_Str"+ requestParam+ "String_Node_Str"+ stackTrace+ "String_Node_Str",emailBody);
}

Fixed version (ground truth):
@Test public void testSystemCrashReportEmailContent() throws IOException, MessagingException {
  AssertionError error=new AssertionError("String_Node_Str");
  StackTraceElement s1=new StackTraceElement(SystemErrorEmailReportTest.class.getName(),"String_Node_Str","String_Node_Str",89);
  error.setStackTrace(new StackTraceElement[]{s1});
  String stackTrace=Common.stackTraceToString(error);
  String requestPath="String_Node_Str";
  String requestParam="String_Node_Str";
  ______TS("String_Node_Str");
  MimeMessage email=new Emails().generateSystemErrorEmail(error,requestPath,requestParam,TestProperties.inst().TEAMMATES_VERSION);
  String recipient=BuildProperties.inst().getAppCrashReportEmail();
  assertEquals(recipient,email.getAllRecipients()[0].toString());
  assertEquals(from,email.getFrom()[0].toString());
  String emailBody=email.getContent().toString();
  assertContainsRegex("String_Node_Str" + error.getMessage() + "String_Node_Str"+ requestPath+ "String_Node_Str"+ requestParam+ "String_Node_Str"+ stackTrace+ "String_Node_Str",emailBody);
}