nus-yam/ex-repair huggingface dataset:
Program: 43957
Project: 43957
Buggy source:
public void generateNewTab(){
  logger.info("String_Node_Str");
  int i=tabBeans.size();
  String idBase="String_Node_Str" + (i + 6);
  tabBeans.add(new TabBean(idBase,idBase,idBase + "String_Node_Str","String_Node_Str" + idBase));
  logger.info("String_Node_Str" + tabBeans.size() + "String_Node_Str");
}

Fixed version (ground truth):
public void generateNewTab(){
  logger.info("String_Node_Str");
  String idBase="String_Node_Str" + ++tabIdLast;
  tabBeans.add(new TabBean(idBase,idBase,idBase + "String_Node_Str","String_Node_Str" + idBase));
  logger.info("String_Node_Str" + tabBeans.size() + "String_Node_Str");
}
Program: 43958
Project: 43958
Buggy source:
@Test public void testSortByCapitalName(){
  clickOnParticularSortAnchorCheckFirstRow(sortByCapitalName,FIRST_STATE_SORTED_BY_CAPITAL_ASCENDING_ORDER,FIRST_STATE_SORTED_BY_CAPITAL_DESCENDING_ORDER,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Test public void testSortByCapitalName(){
  clickOnParticularSortAnchorCheckFirstRow(page.sortByCapitalName,FIRST_STATE_SORTED_BY_CAPITAL_ASCENDING_ORDER,FIRST_STATE_SORTED_BY_CAPITAL_DESCENDING_ORDER,"String_Node_Str","String_Node_Str");
}
Program: 43959
Project: 43959
Buggy source:
@Test public void testSortByStateName(){
  clickOnParticularSortAnchorCheckFirstRow(sortByStateName,FIRST_STATE_SORTED_BY_STATE_ASCENDING_ORDER,FIRST_STATE_SORTED_BY_STATE_DESCENDING_ORDER,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Test public void testSortByStateName(){
  clickOnParticularSortAnchorCheckFirstRow(page.sortByStateName,FIRST_STATE_SORTED_BY_STATE_ASCENDING_ORDER,FIRST_STATE_SORTED_BY_STATE_DESCENDING_ORDER,"String_Node_Str","String_Node_Str");
}
Program: 43960
Project: 43960
Buggy source:
@Test public void testSortByTimeZone(){
  clickOnParticularSortAnchorCheckFirstRow(sortByTimeZone,FIRST_STATE_SORTED_BY_TIME_ZONE_ASCENDING_ORDER,FIRST_STATE_SORTED_BY_TIME_ZONE_DESCENDING_ORDER,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Test public void testSortByTimeZone(){
  clickOnParticularSortAnchorCheckFirstRow(page.sortByTimeZone,FIRST_STATE_SORTED_BY_TIME_ZONE_ASCENDING_ORDER,FIRST_STATE_SORTED_BY_TIME_ZONE_DESCENDING_ORDER,"String_Node_Str","String_Node_Str");
}
Program: 43961
Project: 43961
Buggy source:
/** 
 * Sorts table and checks the first row according to expected first row
 * @param sortBy
 * @param ascendingState expected state
 * @param descendingState expected state
 * @param ascendingError
 * @param descendingError
 */
private void clickOnParticularSortAnchorCheckFirstRow(JQueryLocator sortBy,StateWithCapitalAndTimeZone ascendingState,StateWithCapitalAndTimeZone descendingState,String ascendingError,String descendingError){
  guardXhr(selenium).click(sortBy);
  StateWithCapitalAndTimeZone actualState=initializeStateDataFromRow();
  assertEquals(actualState,ascendingState,ascendingError);
  guardXhr(selenium).click(sortBy);
  actualState=initializeStateDataFromRow();
  assertEquals(actualState,descendingState,descendingError);
}

Fixed version (ground truth):
/** 
 * Sorts table and checks the first row according to expected first row
 * @param sortBy
 * @param ascendingState expected state
 * @param descendingState expected state
 * @param ascendingError
 * @param descendingError
 */
private void clickOnParticularSortAnchorCheckFirstRow(WebElement sortBy,StateWithCapitalAndTimeZone ascendingState,StateWithCapitalAndTimeZone descendingState,String ascendingError,String descendingError){
  Graphene.guardXhr(sortBy).click();
  StateWithCapitalAndTimeZone actualState=initializeStateDataFromRow();
  assertEquals(actualState,ascendingState,ascendingError);
  Graphene.guardXhr(sortBy).click();
  actualState=initializeStateDataFromRow();
  assertEquals(actualState,descendingState,descendingError);
}
Program: 43962
Project: 43962
Buggy source:
/** 
 * returns new StateWithCapitalAndTimeZone, which is initialized byt the data in the partilucal row
 * @param row
 * @return
 */
private StateWithCapitalAndTimeZone initializeStateDataFromRow(){
  JQueryLocator tds=jq(firstRow.getRawLocator() + "String_Node_Str");
  String capitalName=null;
  String stateName=null;
  String timeZone=null;
  int i=0;
  for (Iterator<JQueryLocator> iterator=tds.iterator(); iterator.hasNext(); ) {
    JQueryLocator currentTd=iterator.next();
switch (i) {
case 1:
      capitalName=selenium.getText(currentTd);
    break;
case 2:
  stateName=selenium.getText(currentTd);
break;
case 3:
timeZone=selenium.getText(currentTd);
break;
default :
break;
}
i++;
}
return new StateWithCapitalAndTimeZone(stateName,capitalName,timeZone);
}

Fixed version (ground truth):
/** 
 * returns new StateWithCapitalAndTimeZone, which is initialized byt the data in the partilucal row
 * @param row
 * @return
 */
private StateWithCapitalAndTimeZone initializeStateDataFromRow(){
  List<WebElement> tds=page.firstRow.findElements(By.tagName("String_Node_Str"));
  String capitalName=null;
  String stateName=null;
  String timeZone=null;
  int i=0;
  for (Iterator<WebElement> iterator=tds.iterator(); iterator.hasNext(); ) {
    WebElement currentTd=iterator.next();
switch (i) {
case 1:
      capitalName=currentTd.getText();
    break;
case 2:
  stateName=currentTd.getText();
break;
case 3:
timeZone=currentTd.getText();
break;
default :
break;
}
i++;
}
return new StateWithCapitalAndTimeZone(stateName,capitalName,timeZone);
}
Program: 43964
Project: 43964
Buggy source:
@PostConstruct public void init(){
  log.debug("String_Node_Str");
  attributes=Attributes.getComponentAttributesFromFacesConfig(UIContextMenu.class,getClass());
  attributes.setAttribute("String_Node_Str","String_Node_Str");
  attributes.setAttribute("String_Node_Str","String_Node_Str");
  attributes.setAttribute("String_Node_Str","String_Node_Str");
  attributes.setAttribute("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@PostConstruct public void init(){
  log=LoggerFactory.getLogger(getClass());
  log.debug("String_Node_Str");
  attributes=Attributes.getComponentAttributesFromFacesConfig(UIContextMenu.class,getClass());
  attributes.setAttribute("String_Node_Str","String_Node_Str");
  attributes.setAttribute("String_Node_Str","String_Node_Str");
  attributes.setAttribute("String_Node_Str","String_Node_Str");
  attributes.setAttribute("String_Node_Str","String_Node_Str");
}
Program: 43965
Project: 43965
Buggy source:
@Test public void testSizeExceededLabel(){
  String testData="String_Node_Str";
  fileUploadAttributes.set(FileUploadAttributes.sizeExceededLabel,testData);
  sendFile(bigFile,true,false);
  assertEquals(testData,page.uploadStatusLabel.getText(),"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testSizeExceededLabel(){
  String testData="String_Node_Str";
  fileUploadAttributes.set(FileUploadAttributes.sizeExceededLabel,testData);
  sendFile(bigFile,true,false);
  new WebDriverWait(driver,2).failWith("String_Node_Str").until(ElementPresent.getInstance().element(page.uploadStatusLabel));
  assertEquals(testData,page.uploadStatusLabel.getText(),"String_Node_Str");
}
Program: 43966
Project: 43966
Buggy source:
@Test @IssueTracking("String_Node_Str") public void testRendered(){
  outputPanelAttributes.set(OutputPanelAttributes.rendered,false);
  assertFalse(selenium.isElementPresent(outputDiv),"String_Node_Str");
  String timeValue=selenium.getText(time);
  guardXhr(selenium).click(increaseCounterButton);
  waitGui.failWith("String_Node_Str").waitForChange(timeValue,retrieveText.locator(time));
  timeValue=selenium.getText(time);
  guardXhr(selenium).click(increaseCounterButton);
  waitGui.failWith("String_Node_Str").waitForChange(timeValue,retrieveText.locator(time));
  outputPanelAttributes.set(OutputPanelAttributes.rendered,true);
  assertTrue(selenium.isElementPresent(outputDiv),"String_Node_Str");
  String counter=selenium.getText(outputDiv);
  assertEquals(counter,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Test @RegressionTest("String_Node_Str") public void testRendered(){
  outputPanelAttributes.set(OutputPanelAttributes.rendered,false);
  assertFalse(selenium.isElementPresent(outputDiv),"String_Node_Str");
  String timeValue=selenium.getText(time);
  guardXhr(selenium).click(increaseCounterButton);
  waitGui.failWith("String_Node_Str").waitForChange(timeValue,retrieveText.locator(time));
  timeValue=selenium.getText(time);
  guardXhr(selenium).click(increaseCounterButton);
  waitGui.failWith("String_Node_Str").waitForChange(timeValue,retrieveText.locator(time));
  outputPanelAttributes.set(OutputPanelAttributes.rendered,true);
  assertTrue(selenium.isElementPresent(outputDiv),"String_Node_Str");
  String counter=selenium.getText(outputDiv);
  assertEquals(counter,"String_Node_Str","String_Node_Str");
}
Program: 43967
Project: 43967
Buggy source:
@Test @IssueTracking("String_Node_Str") public void testClick(){
  selenium.click(increaseCounterButton);
  waitGui.until(textEquals.locator(outputDiv).text("String_Node_Str"));
  selenium.click(increaseCounterButton);
  waitGui.until(textEquals.locator(outputDiv).text("String_Node_Str"));
}

Fixed version (ground truth):
@Test @RegressionTest("String_Node_Str") public void testClick(){
  selenium.click(increaseCounterButton);
  waitGui.until(textEquals.locator(outputDiv).text("String_Node_Str"));
  selenium.click(increaseCounterButton);
  waitGui.until(textEquals.locator(outputDiv).text("String_Node_Str"));
}
Program: 43968
Project: 43968
Buggy source:
@BeforeClass public void init(){
  messages.put(ID.assertTrue,"String_Node_Str");
  messages.put(ID.assertFalse,"String_Node_Str");
  messages.put(ID.decimalMinMax,"String_Node_Str");
  messages.put(ID.digits,"String_Node_Str");
  messages.put(ID.max,"String_Node_Str");
  messages.put(ID.min,"String_Node_Str");
  messages.put(ID.minMax,"String_Node_Str");
  messages.put(ID.notEmpty,"String_Node_Str");
  messages.put(ID.notNull,"String_Node_Str");
  messages.put(ID.pattern,"String_Node_Str");
  messages.put(ID.custom,"String_Node_Str");
  messages.put(ID.regexp,"String_Node_Str");
  messages.put(ID.past,"String_Node_Str");
  messages.put(ID.future,"String_Node_Str");
  messages.put(ID.stringSize,"String_Node_Str");
  messages.put(ID.size,"String_Node_Str");
  wrongValue.put(ID.assertTrue,Boolean.FALSE);
  wrongValue.put(ID.assertFalse,Boolean.TRUE);
  wrongValue.put(ID.decimalMinMax,"String_Node_Str");
  wrongValue.put(ID.digits,"String_Node_Str");
  wrongValue.put(ID.max,"String_Node_Str");
  wrongValue.put(ID.min,"String_Node_Str");
  wrongValue.put(ID.minMax,"String_Node_Str");
  wrongValue.put(ID.notEmpty,"String_Node_Str");
  wrongValue.put(ID.notNull,null);
  wrongValue.put(ID.pattern,"String_Node_Str");
  wrongValue.put(ID.custom,"String_Node_Str");
  wrongValue.put(ID.regexp,"String_Node_Str");
  SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
  long offset=3 * 24 * 60* 60* 1000;
  wrongValue.put(ID.past,sdf.format(new Date(System.currentTimeMillis() + offset)));
  wrongValue.put(ID.future,sdf.format(new Date(System.currentTimeMillis() - offset)));
  wrongValue.put(ID.stringSize,"String_Node_Str");
  wrongValue.put(ID.size,"String_Node_Str");
}

Fixed version (ground truth):
@BeforeClass public void init(){
  messages.put(ID.assertTrue,"String_Node_Str");
  messages.put(ID.assertFalse,"String_Node_Str");
  messages.put(ID.decimalMinMax,"String_Node_Str");
  messages.put(ID.digits,"String_Node_Str");
  messages.put(ID.max,"String_Node_Str");
  messages.put(ID.min,"String_Node_Str");
  messages.put(ID.minMax,"String_Node_Str");
  messages.put(ID.notEmpty,"String_Node_Str");
  messages.put(ID.notNull,"String_Node_Str");
  messages.put(ID.pattern,"String_Node_Str");
  messages.put(ID.custom,"String_Node_Str");
  messages.put(ID.regexp,"String_Node_Str");
  messages.put(ID.past,"String_Node_Str");
  messages.put(ID.future,"String_Node_Str");
  messages.put(ID.stringSize,"String_Node_Str");
  messages.put(ID.size,"String_Node_Str");
  wrongValue.put(ID.assertTrue,Boolean.FALSE);
  wrongValue.put(ID.assertFalse,Boolean.TRUE);
  wrongValue.put(ID.decimalMinMax,"String_Node_Str");
  wrongValue.put(ID.digits,"String_Node_Str");
  wrongValue.put(ID.max,"String_Node_Str");
  wrongValue.put(ID.min,"String_Node_Str");
  wrongValue.put(ID.minMax,"String_Node_Str");
  wrongValue.put(ID.notEmpty,"String_Node_Str");
  wrongValue.put(ID.notNull,null);
  wrongValue.put(ID.pattern,"String_Node_Str");
  wrongValue.put(ID.custom,"String_Node_Str");
  wrongValue.put(ID.regexp,"String_Node_Str");
  wrongValue.put(ID.stringSize,"String_Node_Str");
  wrongValue.put(ID.size,"String_Node_Str");
}
Program: 43969
Project: 43969
Buggy source:
/** 
 * Boolean input, verify true
 */
public void verifyBooleanTrue(){
  selenium.click(setCorrectBtn);
  selenium.check(inputFormat.format(ID.assertTrue),(Boolean)wrongValue.get(ID.assertTrue));
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.assertTrue)).text(messages.get(ID.assertTrue)));
}

Fixed version (ground truth):
/** 
 * Boolean input, verify true
 */
public void verifyBooleanTrue(){
  clickCorrectButton();
  selenium.check(inputFormat.format(ID.assertTrue),(Boolean)wrongValue.get(ID.assertTrue));
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.assertTrue)).text(messages.get(ID.assertTrue)));
}
Program: 43970
Project: 43970
Buggy source:
/** 
 * Integer input, verify max
 */
protected void verifyMax(){
  selenium.click(setCorrectBtn);
  selenium.type(inputFormat.format(ID.max),wrongValue.get(ID.max).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.max)).text(messages.get(ID.max)));
}

Fixed version (ground truth):
/** 
 * Integer input, verify max
 */
protected void verifyMax(){
  clickCorrectButton();
  selenium.type(inputFormat.format(ID.max),wrongValue.get(ID.max).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.max)).text(messages.get(ID.max)));
}
Program: 43971
Project: 43971
Buggy source:
/** 
 * Integer input, verify not empty
 */
protected void verifyNotEmpty(){
  selenium.click(setCorrectBtn);
  selenium.type(inputFormat.format(ID.notEmpty),wrongValue.get(ID.notEmpty).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.notEmpty)).text(messages.get(ID.notEmpty)));
}

Fixed version (ground truth):
/** 
 * Integer input, verify not empty
 */
protected void verifyNotEmpty(){
  clickCorrectButton();
  selenium.type(inputFormat.format(ID.notEmpty),wrongValue.get(ID.notEmpty).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.notEmpty)).text(messages.get(ID.notEmpty)));
}
Program: 43972
Project: 43972
Buggy source:
/** 
 * Integer input, verify string pattern
 */
protected void verifyPattern(){
  selenium.click(setCorrectBtn);
  selenium.type(inputFormat.format(ID.pattern),wrongValue.get(ID.pattern).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.pattern)).text(messages.get(ID.pattern)));
}

Fixed version (ground truth):
/** 
 * Integer input, verify string pattern
 */
protected void verifyPattern(){
  clickCorrectButton();
  selenium.type(inputFormat.format(ID.pattern),wrongValue.get(ID.pattern).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.pattern)).text(messages.get(ID.pattern)));
}
Program: 43973
Project: 43973
Buggy source:
/** 
 * Integer input, verify custom string
 */
protected void verifyCustom(){
  selenium.click(setCorrectBtn);
  selenium.type(inputFormat.format(ID.custom),wrongValue.get(ID.custom).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.custom)).text(messages.get(ID.custom)));
}

Fixed version (ground truth):
/** 
 * Integer input, verify custom string
 */
protected void verifyCustom(){
  clickCorrectButton();
  selenium.type(inputFormat.format(ID.custom),wrongValue.get(ID.custom).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.custom)).text(messages.get(ID.custom)));
}
Program: 43974
Project: 43974
Buggy source:
/** 
 * Decimal input, verify digits
 */
protected void verifyDecimalDigits(){
  selenium.click(setCorrectBtn);
  selenium.type(inputFormat.format(ID.digits),wrongValue.get(ID.digits).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.decimalMinMax)).text(messages.get(ID.decimalMinMax)));
}

Fixed version (ground truth):
/** 
 * Decimal input, verify digits
 */
protected void verifyDecimalDigits(){
  clickCorrectButton();
  selenium.type(inputFormat.format(ID.digits),wrongValue.get(ID.digits).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.decimalMinMax)).text(messages.get(ID.decimalMinMax)));
}
Program: 43976
Project: 43976
Buggy source:
/** 
 * Integer input, verify min max
 */
protected void verifyMinMax(){
  selenium.click(setCorrectBtn);
  selenium.type(inputFormat.format(ID.minMax),wrongValue.get(ID.minMax).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.minMax)).text(messages.get(ID.minMax)));
}

Fixed version (ground truth):
/** 
 * Integer input, verify min max
 */
protected void verifyMinMax(){
  clickCorrectButton();
  selenium.type(inputFormat.format(ID.minMax),wrongValue.get(ID.minMax).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.minMax)).text(messages.get(ID.minMax)));
}
Program: 43977
Project: 43977
Buggy source:
/** 
 * Integer input, verify selection size
 */
protected void verifySelectionSize(){
  selenium.click(setCorrectBtn);
  selenium.click(setWrongBtn);
  selenium.check(selectionItem.format(wrongValue.get(ID.size)),true);
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.size)).text(messages.get(ID.size)));
}

Fixed version (ground truth):
/** 
 * Integer input, verify selection size
 */
protected void verifySelectionSize(){
  clickCorrectButton();
  clickWrongButton();
  selenium.check(selectionItem.format(wrongValue.get(ID.size)),true);
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.size)).text(messages.get(ID.size)));
}
Program: 43978
Project: 43978
Buggy source:
/** 
 * Decimal input, verify from 2.5 to 9.688
 */
protected void verifyDecimalMinMax(){
  selenium.click(setCorrectBtn);
  selenium.type(inputFormat.format(ID.decimalMinMax),wrongValue.get(ID.decimalMinMax).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.decimalMinMax)).text(messages.get(ID.decimalMinMax)));
}

Fixed version (ground truth):
/** 
 * Decimal input, verify from 2.5 to 9.688
 */
protected void verifyDecimalMinMax(){
  clickCorrectButton();
  selenium.type(inputFormat.format(ID.decimalMinMax),wrongValue.get(ID.decimalMinMax).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.decimalMinMax)).text(messages.get(ID.decimalMinMax)));
}
Program: 43979
Project: 43979
Buggy source:
/** 
 * Integer input, verify min
 */
protected void verifyMin(){
  selenium.click(setCorrectBtn);
  selenium.type(inputFormat.format(ID.min),wrongValue.get(ID.min).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.min)).text(messages.get(ID.min)));
}

Fixed version (ground truth):
/** 
 * Integer input, verify min
 */
protected void verifyMin(){
  clickCorrectButton();
  selenium.type(inputFormat.format(ID.min),wrongValue.get(ID.min).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.min)).text(messages.get(ID.min)));
}
Program: 43981
Project: 43981
Buggy source:
/** 
 * Boolean input, verify false
 */
public void verifyBooleanFalse(){
  selenium.click(setCorrectBtn);
  selenium.check(inputFormat.format(ID.assertFalse),(Boolean)wrongValue.get(ID.assertFalse));
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.assertFalse)).text(messages.get(ID.assertFalse)));
}

Fixed version (ground truth):
/** 
 * Boolean input, verify false
 */
public void verifyBooleanFalse(){
  clickCorrectButton();
  selenium.check(inputFormat.format(ID.assertFalse),(Boolean)wrongValue.get(ID.assertFalse));
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.assertFalse)).text(messages.get(ID.assertFalse)));
}
Program: 43982
Project: 43982
Buggy source:
/** 
 * Integer input, verify string size
 */
protected void verifyStringSize(){
  selenium.click(setCorrectBtn);
  selenium.type(inputFormat.format(ID.stringSize),wrongValue.get(ID.stringSize).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.stringSize)).text(messages.get(ID.stringSize)));
}

Fixed version (ground truth):
/** 
 * Integer input, verify string size
 */
protected void verifyStringSize(){
  clickCorrectButton();
  selenium.type(inputFormat.format(ID.stringSize),wrongValue.get(ID.stringSize).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.stringSize)).text(messages.get(ID.stringSize)));
}
Program: 43983
Project: 43983
Buggy source:
/** 
 * Integer input, verify regExp
 */
protected void verifyRegExp(){
  selenium.click(setCorrectBtn);
  selenium.type(inputFormat.format(ID.regexp),wrongValue.get(ID.regexp).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.regexp)).text(messages.get(ID.regexp)));
}

Fixed version (ground truth):
/** 
 * Integer input, verify regExp
 */
protected void verifyRegExp(){
  clickCorrectButton();
  selenium.type(inputFormat.format(ID.regexp),wrongValue.get(ID.regexp).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.regexp)).text(messages.get(ID.regexp)));
}
Program: 43984
Project: 43984
Buggy source:
/** 
 * Integer input, verify not null
 */
protected void verifyNotNull(){
  selenium.click(setCorrectBtn);
  selenium.type(inputFormat.format(ID.notNull),"String_Node_Str");
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.notNull)).text(messages.get(ID.notNull)));
}

Fixed version (ground truth):
/** 
 * Integer input, verify not null
 */
protected void verifyNotNull(){
  clickCorrectButton();
  selenium.type(inputFormat.format(ID.notNull),"String_Node_Str");
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.notNull)).text(messages.get(ID.notNull)));
}
Program: 43985
Project: 43985
Buggy source:
/** 
 * Integer input, verify date in past
 */
protected void verifyDatePast(){
  selenium.click(setCorrectBtn);
  selenium.type(inputFormat.format(ID.past),wrongValue.get(ID.past).toString());
  guardXhr(selenium).click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.past)).text(messages.get(ID.past)));
}

Fixed version (ground truth):
/** 
 * Integer input, verify date in past
 */
protected void verifyDatePast(){
  clickCorrectButton();
  selenium.type(inputFormat.format(ID.past),wrongValue.get(ID.past).toString());
  guardXhr(selenium).click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.past)).text(messages.get(ID.past)));
}
Program: 43986
Project: 43986
Buggy source:
/** 
 * Integer input, verify date in future
 */
protected void verifyDateFuture(){
  selenium.click(setCorrectBtn);
  selenium.type(inputFormat.format(ID.future),wrongValue.get(ID.future).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.future)).text(messages.get(ID.future)));
}

Fixed version (ground truth):
/** 
 * Integer input, verify date in future
 */
protected void verifyDateFuture(){
  clickCorrectButton();
  selenium.type(inputFormat.format(ID.future),wrongValue.get(ID.future).toString());
  selenium.click(a4jCommandBtn);
  waitGui.until(textEquals.locator(msgFormat.format(ID.future)).text(messages.get(ID.future)));
}
Program: 43989
Project: 43989
Buggy source:
/** 
 * Fills in the name input incorrect value according to the borderValues, it tries to fill various values. Checks whether there are error messages.
 * @param nameInput
 * @param bottomBorderValue
 * @param topBorderValue
 */
public void fillNameInputWithIncorrectValues(JQueryLocator nameInput,int bottomBorderValue,int topBorderValue){
  fillInputWithStringOfLength(nameInput,0);
  guardNoRequest(selenium).fireEvent(nameInput,Event.BLUR);
  isThereErrorMessageAboutValueRequeired(true);
  eraseInput(nameInput);
  fillInputWithStringOfLength(nameInput,bottomBorderValue - 1);
  guardNoRequest(selenium).fireEvent(nameInput,Event.BLUR);
  isThereErrorMessageAboutSizeOfName(true);
  eraseInput(nameInput);
  fillInputWithStringOfLength(nameInput,topBorderValue + 1);
  guardNoRequest(selenium).fireEvent(nameInput,Event.BLUR);
  isThereErrorMessageAboutSizeOfName(true);
  eraseInput(nameInput);
  fillInputWithStringOfLength(nameInput,topBorderValue * 3);
  guardNoRequest(selenium).fireEvent(nameInput,Event.BLUR);
  isThereErrorMessageAboutSizeOfName(true);
}

Fixed version (ground truth):
/** 
 * Fills in the name input incorrect value according to the borderValues, it tries to fill various values. Checks whether there are error messages.
 * @param nameInput
 * @param bottomBorderValue
 * @param topBorderValue
 */
public void fillNameInputWithIncorrectValues(JQueryLocator nameInput,int bottomBorderValue,int topBorderValue,boolean valueRequiredErrorMessage){
  fillInputWithStringOfLength(nameInput,0);
  guardNoRequest(selenium).fireEvent(nameInput,Event.BLUR);
  isThereErrorMessageAboutValueRequeired(valueRequiredErrorMessage);
  eraseInput(nameInput);
  fillInputWithStringOfLength(nameInput,bottomBorderValue - 1);
  guardNoRequest(selenium).fireEvent(nameInput,Event.BLUR);
  isThereErrorMessageAboutSizeOfName(true);
  eraseInput(nameInput);
  fillInputWithStringOfLength(nameInput,topBorderValue + 1);
  guardNoRequest(selenium).fireEvent(nameInput,Event.BLUR);
  isThereErrorMessageAboutSizeOfName(true);
  eraseInput(nameInput);
  fillInputWithStringOfLength(nameInput,topBorderValue * 3);
  guardNoRequest(selenium).fireEvent(nameInput,Event.BLUR);
  isThereErrorMessageAboutSizeOfName(true);
}
Program: 43990
Project: 43990
Buggy source:
/** 
 * Finds out whether there is error message about size of name, it is implemented in the subclass
 * @param isThereErrorMessageAboutEmail
 */
protected abstract void isThereErrorMessageAboutSizeOfName(boolean isThereErrorMessageAboutEmail);

Fixed version (ground truth):
/** 
 * Finds out whether there is error message about size of name, it is implemented in the subclass
 * @param isThereErrorMessageAboutEmail
 */
protected abstract void isThereErrorMessageAboutSizeOfName(boolean isThereErrorMessageAboutSizeOfName);
Program: 43991
Project: 43991
Buggy source:
@Test public void testIncorrectName(){
  fillNameInputWithIncorrectValues(nameInput,3,8);
}

Fixed version (ground truth):
@Test public void testIncorrectName(){
  fillNameInputWithIncorrectValues(nameInput,3,8,true);
}
Program: 43992
Project: 43992
Buggy source:
@Test public void testNameInputIncorrectValues(){
  fillNameInputWithIncorrectValues(nameInput,3,12);
}

Fixed version (ground truth):
@Test public void testNameInputIncorrectValues(){
  fillNameInputWithIncorrectValues(nameInput,3,12,false);
}
Program: 43993
Project: 43993
Buggy source:
@Test public void testClientProgressBarIsRisingGraphically(){
  widths=new ArrayList<Integer>();
  AttributeRetriever styleRetriever=retrieveAttribute.attributeLocator(progressBar.getAttribute(Attribute.STYLE));
  styleRetriever.initializeValue();
  guardNoRequest(selenium).click(startProgress);
  while (true) {
    try {
      long currentTimeBeforeChange=System.currentTimeMillis();
      waitGui.waitForChangeAndReturn(styleRetriever);
      long currentTimeAfterChange=System.currentTimeMillis();
      if ((currentTimeAfterChange - currentTimeBeforeChange) > MAX_DEVIATION) {
        fail("String_Node_Str" + MAX_DEVIATION);
      }
      getsTheWidthFromRetrieverAndStoresinList(styleRetriever);
      styleRetriever.initializeValue();
    }
 catch (    WaitTimeoutException ex) {
      break;
    }
  }
  checkTheWidthDeviaton();
}

Fixed version (ground truth):
@Test public void testClientProgressBarIsRisingGraphically(){
  widths=new ArrayList<Integer>();
  AttributeRetriever styleRetriever=retrieveAttribute.attributeLocator(progressBar.getAttribute(Attribute.STYLE));
  styleRetriever.initializeValue();
  guardNoRequest(selenium).click(startProgress);
  while (true) {
    try {
      long currentTimeBeforeChange=System.currentTimeMillis();
      waitGui.waitForChangeAndReturn(styleRetriever);
      long currentTimeAfterChange=System.currentTimeMillis();
      long duration=currentTimeAfterChange - currentTimeBeforeChange;
      if (duration > MAX_DEVIATION) {
        fail("String_Node_Str" + MAX_DEVIATION + "String_Node_Str"+ "String_Node_Str"+ duration);
      }
      getsTheWidthFromRetrieverAndStoresinList(styleRetriever);
      styleRetriever.initializeValue();
    }
 catch (    WaitTimeoutException ex) {
      break;
    }
  }
  checkTheWidthDeviaton();
}
Program: 43994
Project: 43994
Buggy source:
/** 
 * The method   {@link #processOutputEvent(Event)} is called when an inputevent arrives and the time since the last input event is greater than this interval.
 * @param timeUnit
 * @return interval in timeUnit
 */
public long getOutputInterval(TimeUnit timeUnit){
  return timeUnit.convert(outputIntervalinMilliseconds,TimeUnit.MILLISECONDS);
}

Fixed version (ground truth):
/** 
 * The method   {@link #processOutputEvent(Event)} is called when an inputevent arrives and the time since the last input event is greater than this interval.
 * @param timeUnit
 * @return interval in timeUnit
 */
public long getOutputInterval(TimeUnit timeUnit){
  return timeUnit.convert(outputIntervalInMilliseconds,TimeUnit.MILLISECONDS);
}
Program: 43995
Project: 43995
Buggy source:
/** 
 * Set a time-based policy to call   {@link #processOutputEvent(Event)}. The time based policy and the event-based policy are not mutually exclusive. There are two modes: <ol> <li>When   {@code onEvent==true} method {@link #processOutputEvent(Event)}is only when an input event arrives *and* the time since the last input event is greater than this interval. <li>When   {@code onEvent==false} method {@link #processOutputEvent(Event)}is called periodically whether or not an input event has arrived. Because the method will be called forever for every PE in the prototype you should use this setting it with caution. </ol> If   {@code interval==0} the time-based policy is disabled.
 * @param interval in timeUnit
 * @param timeUnit the timeUnit of interval
 * @param onEvent selects event-time policy mode.
 */
public void setOutputInterval(long interval,TimeUnit timeUnit,boolean onEvent){
  outputIntervalinMilliseconds=TimeUnit.MILLISECONDS.convert(interval,timeUnit);
  if (!isPrototype)   return;
  if (timer != null)   timer.cancel();
  if (interval == 0) {
    isTimedOutput=false;
    return;
  }
  isOutputOnEvent=onEvent;
  timer=new Timer();
  timer.schedule(new PETask(),0,outputIntervalinMilliseconds);
}

Fixed version (ground truth):
/** 
 * Set a time-based policy to call   {@link #processOutputEvent(Event)}. The time based policy and the event-based policy are not mutually exclusive. There are two modes: <ol> <li>When   {@code onEvent==true} method {@link #processOutputEvent(Event)}is only when an input event arrives *and* the time since the last input event is greater than this interval. <li>When   {@code onEvent==false} method {@link #processOutputEvent(Event)}is called periodically whether or not an input event has arrived. Because the method will be called forever for every PE in the prototype you should use this setting it with caution. </ol> If   {@code interval==0} the time-based policy is disabled.
 * @param interval in timeUnit
 * @param timeUnit the timeUnit of interval
 * @param onEvent selects event-time policy mode.
 */
public void setOutputInterval(long interval,TimeUnit timeUnit,boolean onEvent){
  outputIntervalInMilliseconds=TimeUnit.MILLISECONDS.convert(interval,timeUnit);
  if (!isPrototype)   return;
  if (timer != null)   timer.cancel();
  if (interval == 0) {
    isTimedOutput=false;
    return;
  }
  isOutputOnEvent=onEvent;
  timer=new Timer();
  timer.schedule(new PETask(),0,outputIntervalInMilliseconds);
}
Program: 43996
Project: 43996
Buggy source:
WindowedPE(App app,int bufferSize){
  super(app);
  this.bufferSize=bufferSize;
}

Fixed version (ground truth):
/** 
 * Constructor for the event-based slot. The abstract method  {@link #addPeriodicSlot()} must be called by the concrete class.
 * @param app the application
 * @param numSlots the number of slots to be stored
 */
public WindowedPE(App app,int numSlots){
  this(app,0l,null,numSlots);
}
Program: 43997
Project: 43997
Buggy source:
public void test1(){
  System.out.println("String_Node_Str");
  CircularFifoBuffer<Integer> circularBuffer=new CircularFifoBuffer<Integer>(10);
  System.out.println("String_Node_Str");
  for (int i=0; i < 15; i++) {
    circularBuffer.add(i + 100);
  }
  System.out.println("String_Node_Str");
  int j=5;
  for (  Integer num : circularBuffer) {
    System.out.print(num + "String_Node_Str");
    Assert.assertEquals(j + 100,num.intValue());
    j++;
  }
  System.out.println("String_Node_Str");
  circularBuffer.clear();
  System.out.println("String_Node_Str");
  for (int i=0; i < 5; i++) {
    circularBuffer.add(i + 200);
  }
  System.out.println("String_Node_Str");
  int z=0;
  for (  Integer num : circularBuffer) {
    System.out.print(num + "String_Node_Str");
    Assert.assertEquals(z + 200,num.intValue());
    z++;
  }
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public void test1(){
  System.out.println("String_Node_Str");
  CircularFifoBuffer<Integer> circularBuffer=new CircularFifoBuffer<Integer>(10);
  System.out.println("String_Node_Str");
  for (int i=0; i < 15; i++) {
    circularBuffer.add(i + 100);
  }
  System.out.println("String_Node_Str");
  int j=5;
  for (  Integer num : circularBuffer) {
    System.out.print(num + "String_Node_Str");
    Assert.assertEquals(j + 100,num.intValue());
    j++;
  }
  System.out.println("String_Node_Str" + circularBuffer.get());
  Assert.assertEquals(105,circularBuffer.get().intValue());
  System.out.println("String_Node_Str");
  circularBuffer.clear();
  System.out.println("String_Node_Str");
  for (int i=0; i < 5; i++) {
    circularBuffer.add(i + 200);
  }
  System.out.println("String_Node_Str");
  int z=0;
  for (  Integer num : circularBuffer) {
    System.out.print(num + "String_Node_Str");
    Assert.assertEquals(z + 200,num.intValue());
    z++;
  }
  System.out.println("String_Node_Str");
}
Program: 43998
Project: 43998
Buggy source:
@Override public void run(){
  for (  Map.Entry<String,ProcessingElement> entry : peInstances.entrySet()) {
    ProcessingElement peInstance=entry.getValue();
    peInstance.isTimedOutput=true;
    if (!isOutputOnEvent) {
      peInstance.handleInputEvent(new TimerEvent());
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  for (  Map.Entry<String,ProcessingElement> entry : peInstances.entrySet()) {
    ProcessingElement peInstance=entry.getValue();
    peInstance.isTimedOutput=true;
    if (!isOutputOnEvent) {
      Object object;
      if (isThreadSafe) {
        object=new Object();
      }
 else {
        object=this;
      }
synchronized (object) {
        peInstance.processOutputEvent(new TimerEvent());
      }
    }
  }
}
Program: 43999
Project: 43999
Buggy source:
@SuppressWarnings("String_Node_Str") @Override protected void init(){
  ProcessingElement counterPE=new CounterPE(this);
  counterPE.setOutputInterval(20,TimeUnit.MILLISECONDS,false);
  Stream<TestEvent> testStream=new Stream<TestEvent>(this,"String_Node_Str",new TestKeyFinder(),counterPE);
  generateTestEventPE=new GenerateTestEventPE(this,testStream);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected void init(){
  counterPE=new CounterPE(this);
  counterPE.setOutputInterval(20,TimeUnit.MILLISECONDS,false);
  Stream<TestEvent> testStream=new Stream<TestEvent>(this,"String_Node_Str",new TestKeyFinder(),counterPE);
  generateTestEventPE=new GenerateTestEventPE(this,testStream);
}
Program: 44000
Project: 44000
Buggy source:
@Override protected void start(){
  for (int i=0; i < 20; i++) {
    generateTestEventPE.processOutputEvent(null);
    try {
      Thread.sleep(10);
    }
 catch (    InterruptedException e) {
      logger.error(e.getMessage());
      e.printStackTrace();
    }
  }
  try {
    Thread.sleep(1000);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  System.out.println("String_Node_Str");
  removeAll();
}

Fixed version (ground truth):
@Override protected void start(){
  for (int i=0; i < 200; i++) {
    generateTestEventPE.processOutputEvent(null);
    try {
      Thread.sleep(10);
    }
 catch (    InterruptedException e) {
      logger.error(e.getMessage());
      e.printStackTrace();
    }
  }
  try {
    Thread.sleep(1000);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  logger.info("String_Node_Str");
  Collection<ProcessingElement> pes=counterPE.getInstances();
  for (  ProcessingElement pe : pes) {
    counterPE=(CounterPE)pe;
    logger.info("String_Node_Str",pe.id,counterPE.getCount());
    Assert.assertEquals(results.get(pe.id).longValue(),counterPE.getCount());
  }
  logger.info("String_Node_Str");
  removeAll();
}
Program: 44001
Project: 44001
Buggy source:
Type getGenericReturnType(Method m){
  try {
    return m.getGenericReturnType();
  }
 catch (  Error ex) {
    ex.printStackTrace();
    System.err.println("String_Node_Str" + m + "String_Node_Str");
    return m.getReturnType();
  }
}

Fixed version (ground truth):
Type getGenericReturnType(Method m){
  try {
    return m.getGenericReturnType();
  }
 catch (  Throwable ex) {
    ex.printStackTrace();
    System.err.println("String_Node_Str" + m + "String_Node_Str");
    return m.getReturnType();
  }
}
Program: 44002
Project: 44002
Buggy source:
Type[] getGenericInterfaces(Class c){
  try {
    return c.getGenericInterfaces();
  }
 catch (  Error ex) {
    ex.printStackTrace();
    System.err.println("String_Node_Str" + c + "String_Node_Str");
    return c.getInterfaces();
  }
}

Fixed version (ground truth):
Type[] getGenericInterfaces(Class c){
  try {
    return c.getGenericInterfaces();
  }
 catch (  Throwable ex) {
    ex.printStackTrace();
    System.err.println("String_Node_Str" + c + "String_Node_Str");
    return c.getInterfaces();
  }
}
Program: 44003
Project: 44003
Buggy source:
public void appendToDocument(Document doc,Element parent){
  try {
    doAppendToDocument(doc,parent);
  }
 catch (  Error ex) {
    ex.printStackTrace();
    System.err.println("String_Node_Str" + jclass.getName() + "String_Node_Str"+ ex.getMessage());
  }
}

Fixed version (ground truth):
public void appendToDocument(Document doc,Element parent){
  try {
    doAppendToDocument(doc,parent);
  }
 catch (  Throwable ex) {
    ex.printStackTrace();
    System.err.println("String_Node_Str" + jclass.getName() + "String_Node_Str"+ ex.getMessage());
  }
}
Program: 44004
Project: 44004
Buggy source:
Type getGenericType(Field f){
  try {
    return f.getGenericType();
  }
 catch (  Error ex) {
    ex.printStackTrace();
    System.err.println("String_Node_Str" + f + "String_Node_Str");
    return f.getType();
  }
}

Fixed version (ground truth):
Type getGenericType(Field f){
  try {
    return f.getGenericType();
  }
 catch (  Throwable ex) {
    ex.printStackTrace();
    System.err.println("String_Node_Str" + f + "String_Node_Str");
    return f.getType();
  }
}
Program: 44006
Project: 44006
Buggy source:
Type[] getGenericParameterTypes(Constructor m){
  try {
    return m.getGenericParameterTypes();
  }
 catch (  Error ex) {
    ex.printStackTrace();
    System.err.println("String_Node_Str" + m + "String_Node_Str");
    return m.getParameterTypes();
  }
}

Fixed version (ground truth):
Type[] getGenericParameterTypes(Constructor m){
  try {
    return m.getGenericParameterTypes();
  }
 catch (  Throwable ex) {
    ex.printStackTrace();
    System.err.println("String_Node_Str" + m + "String_Node_Str");
    return m.getParameterTypes();
  }
}
Program: 44008
Project: 44008
Buggy source:
Type getGenericSuperclass(Class c){
  try {
    return c.getGenericSuperclass();
  }
 catch (  Error ex) {
    ex.printStackTrace();
    System.err.println("String_Node_Str" + c + "String_Node_Str");
    return c.getSuperclass();
  }
}

Fixed version (ground truth):
Type getGenericSuperclass(Class c){
  try {
    return c.getGenericSuperclass();
  }
 catch (  Throwable ex) {
    ex.printStackTrace();
    System.err.println("String_Node_Str" + c + "String_Node_Str");
    return c.getSuperclass();
  }
}
Program: 44011
Project: 44011
Buggy source:
String getSignature(Method method){
  StringBuffer sig=new StringBuffer();
  sig.append(method.getName());
  for (  Type t : method.getGenericParameterTypes()) {
    sig.append("String_Node_Str");
    sig.append(getGenericTypeName(t));
  }
  return sig.toString();
}

Fixed version (ground truth):
String getSignature(Method method){
  StringBuffer sig=new StringBuffer();
  sig.append(method.getName());
  for (  Class t : method.getParameterTypes()) {
    sig.append("String_Node_Str");
    sig.append(t.getName());
  }
  return sig.toString();
}
Program: 44012
Project: 44012
Buggy source:
/** 
 * Sets the system env variables.
 */
private void setSystemEnvVariables(){
  if (configXmlPath == null) {
    configXmlPath=System.getenv().get(Constants.INPUT_SYSENV_CONFIG);
    logger.info("String_Node_Str" + configXmlPath);
  }
  if (outputDir == null) {
    outputDir=System.getenv().get(Constants.INPUT_SYSENV_OUTPUT_DIR);
    logger.info("String_Node_Str" + outputDir);
  }
  if (cssFilePath == null) {
    cssFilePath=System.getenv().get(Constants.INPUT_SYSENV_CSS);
    logger.info("String_Node_Str" + cssFilePath);
  }
}

Fixed version (ground truth):
/** 
 * Sets the system env variables.
 */
private void setSystemEnvVariables(){
  if (configXmlPath == null) {
    configXmlPath=System.getenv().get(Constants.INPUT_SYSENV_CONFIG);
    logger.finest("String_Node_Str" + configXmlPath);
  }
  if (outputDir == null) {
    outputDir=System.getenv().get(Constants.INPUT_SYSENV_OUTPUT_DIR);
    logger.finest("String_Node_Str" + outputDir);
  }
  if (cssFilePath == null) {
    cssFilePath=System.getenv().get(Constants.INPUT_SYSENV_CSS);
    logger.finest("String_Node_Str" + cssFilePath);
  }
}
Program: 44014
Project: 44014
Buggy source:
/** 
 * Gets the text in div.
 * @param text the text
 * @param styleClassName the style class name
 * @return the text in div
 */
private String getTextInDiv(String text,String styleClassName){
  String temp="String_Node_Str";
  if (styleClassName != null) {
    temp+="String_Node_Str" + styleClassName + "String_Node_Str";
  }
  String tag=Constants.HTML_DIV_START.replace("String_Node_Str",temp);
  tag+=text;
  tag+=Constants.HTML_DIV_END;
  logger.info("String_Node_Str" + tag);
  return tag;
}

Fixed version (ground truth):
/** 
 * Gets the text in div.
 * @param text the text
 * @param styleClassName the style class name
 * @return the text in div
 */
private String getTextInDiv(String text,String styleClassName){
  String temp="String_Node_Str";
  if (styleClassName != null) {
    temp+="String_Node_Str" + styleClassName + "String_Node_Str";
  }
  String tag=Constants.HTML_DIV_START.replace("String_Node_Str",temp);
  tag+=text;
  tag+=Constants.HTML_DIV_END;
  logger.finest("String_Node_Str" + tag);
  return tag;
}
Program: 44015
Project: 44015
Buggy source:
/** 
 * Gets the next sibling ignoring empty white-space nodes.
 * @param node the node
 * @return the next sibling
 */
private Node getNextSibling(Node node){
  Node sib=node.getNextSibling();
  if (sib != null && Node.COMMENT_NODE == sib.getNodeType()) {
    sib=getNextSibling(sib);
  }
  if (sib != null && sib.getNodeType() == Node.TEXT_NODE) {
    String value=sib.getTextContent();
    if (value != null) {
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      if (Utils.isEmpty(value)) {
        sib=getNextSibling(sib);
      }
    }
  }
  logger.log(Level.INFO,"String_Node_Str",sib);
  return sib;
}

Fixed version (ground truth):
/** 
 * Gets the next sibling ignoring empty white-space nodes.
 * @param node the node
 * @return the next sibling
 */
private Node getNextSibling(Node node){
  Node sib=node.getNextSibling();
  if (sib != null && Node.COMMENT_NODE == sib.getNodeType()) {
    sib=getNextSibling(sib);
  }
  if (sib != null && sib.getNodeType() == Node.TEXT_NODE) {
    String value=sib.getTextContent();
    if (value != null) {
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      if (Utils.isEmpty(value)) {
        sib=getNextSibling(sib);
      }
    }
  }
  logger.log(Level.FINEST,"String_Node_Str",sib);
  return sib;
}
Program: 44016
Project: 44016
Buggy source:
/** 
 * Gets the first child ignoring empty white-space nodes.
 * @param node the node
 * @return the first child
 */
private Node getFirstChild(Node node){
  Node firstChild=node.getFirstChild();
  if (firstChild != null && firstChild.getNodeType() == Node.TEXT_NODE) {
    String value=firstChild.getTextContent();
    if (value != null) {
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      if (Utils.isEmpty(value)) {
        firstChild=getNextSibling(firstChild);
      }
    }
  }
  logger.log(Level.INFO,"String_Node_Str",firstChild);
  return firstChild;
}

Fixed version (ground truth):
/** 
 * Gets the first child ignoring empty white-space nodes.
 * @param node the node
 * @return the first child
 */
private Node getFirstChild(Node node){
  Node firstChild=node.getFirstChild();
  if (firstChild != null && firstChild.getNodeType() == Node.TEXT_NODE) {
    String value=firstChild.getTextContent();
    if (value != null) {
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      if (Utils.isEmpty(value)) {
        firstChild=getNextSibling(firstChild);
      }
    }
  }
  logger.log(Level.FINEST,"String_Node_Str",firstChild);
  return firstChild;
}
Program: 44018
Project: 44018
Buggy source:
/** 
 * Gets the local name.
 * @param ctype the ctype
 * @return local name after stripping namespace prefix
 */
private String getLocalName(String ctype){
  logger.info("String_Node_Str" + ctype);
  String[] strs=ctype.split("String_Node_Str");
  if (strs.length > 1)   return strs[1];
 else   return strs[0];
}

Fixed version (ground truth):
/** 
 * Gets the local name.
 * @param ctype the ctype
 * @return local name after stripping namespace prefix
 */
private String getLocalName(String ctype){
  logger.finest("String_Node_Str" + ctype);
  String[] strs=ctype.split("String_Node_Str");
  if (strs.length > 1)   return strs[1];
 else   return strs[0];
}