nus-yam/ex-repair huggingface dataset:
Program: 69445
Project: 69445
Buggy source:
@Override protected void formOK(UserRequest ureq){
  modConfig.setBooleanEntry(IQEditController.CONFIG_FULLWINDOW,fullWindowEl.isSelected(0));
  if (correctionModeEl.isOneSelected()) {
    modConfig.setStringValue(IQEditController.CONFIG_CORRECTION_MODE,correctionModeEl.getSelectedKey());
  }
  modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_QUESTIONTITLE,showTitlesEl.isSelected(0));
  modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_MEMO,personalNotesEl.isSelected(0));
  modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_ENABLECANCEL,enableCancelEl.isSelected(0));
  modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_ENABLESUSPEND,enableSuspendEl.isSelected(0));
  modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_QUESTIONPROGRESS,displayQuestionProgressEl.isSelected(0));
  modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_SCOREPROGRESS,displayScoreProgressEl.isSelected(0));
  fireEvent(ureq,Event.DONE_EVENT);
}

Fixed version (ground truth):
@Override protected void formOK(UserRequest ureq){
  modConfig.setBooleanEntry(IQEditController.CONFIG_FULLWINDOW,fullWindowEl.isSelected(0));
  if (correctionModeEl.isOneSelected()) {
    modConfig.setStringValue(IQEditController.CONFIG_CORRECTION_MODE,correctionModeEl.getSelectedKey());
  }
  if (limitAttemptsEl.isSelected(0)) {
    int maxAttempts=Integer.parseInt(maxAttemptsEl.getValue());
    modConfig.setIntValue(IQEditController.CONFIG_KEY_ATTEMPTS,maxAttempts);
  }
 else {
    modConfig.setIntValue(IQEditController.CONFIG_KEY_ATTEMPTS,0);
  }
  modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_BLOCK_AFTER_SUCCESS,blockAfterSuccessEl.isSelected(0));
  modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_QUESTIONTITLE,showTitlesEl.isSelected(0));
  modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_MEMO,personalNotesEl.isSelected(0));
  modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_ENABLECANCEL,enableCancelEl.isSelected(0));
  modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_ENABLESUSPEND,enableSuspendEl.isSelected(0));
  modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_QUESTIONPROGRESS,displayQuestionProgressEl.isSelected(0));
  modConfig.setBooleanEntry(IQEditController.CONFIG_KEY_SCOREPROGRESS,displayScoreProgressEl.isSelected(0));
  fireEvent(ureq,Event.DONE_EVENT);
}
Program: 69446
Project: 69446
Buggy source:
@Override public QTI21DeliveryOptions clone(){
  QTI21DeliveryOptions clone=new QTI21DeliveryOptions();
  clone.enableCancel=enableCancel;
  clone.enableSuspend=enableSuspend;
  clone.displayScoreProgress=displayScoreProgress;
  clone.displayQuestionProgress=displayQuestionProgress;
  clone.showTitles=showTitles;
  clone.personalNotes=personalNotes;
  return clone;
}

Fixed version (ground truth):
@Override public QTI21DeliveryOptions clone(){
  QTI21DeliveryOptions clone=new QTI21DeliveryOptions();
  clone.enableCancel=enableCancel;
  clone.enableSuspend=enableSuspend;
  clone.displayScoreProgress=displayScoreProgress;
  clone.displayQuestionProgress=displayQuestionProgress;
  clone.showTitles=showTitles;
  clone.personalNotes=personalNotes;
  clone.blockAfterSuccess=blockAfterSuccess;
  clone.maxAttempts=maxAttempts;
  return clone;
}
Program: 69447
Project: 69447
Buggy source:
public static final QTI21DeliveryOptions defaultSettings(){
  QTI21DeliveryOptions defaultSettings=new QTI21DeliveryOptions();
  defaultSettings.enableCancel=false;
  defaultSettings.enableSuspend=false;
  defaultSettings.displayScoreProgress=false;
  defaultSettings.displayQuestionProgress=false;
  defaultSettings.showTitles=true;
  defaultSettings.personalNotes=false;
  return defaultSettings;
}

Fixed version (ground truth):
public static final QTI21DeliveryOptions defaultSettings(){
  QTI21DeliveryOptions defaultSettings=new QTI21DeliveryOptions();
  defaultSettings.enableCancel=false;
  defaultSettings.enableSuspend=false;
  defaultSettings.displayScoreProgress=false;
  defaultSettings.displayQuestionProgress=false;
  defaultSettings.showTitles=true;
  defaultSettings.personalNotes=false;
  defaultSettings.blockAfterSuccess=false;
  defaultSettings.maxAttempts=0;
  return defaultSettings;
}
Program: 69448
Project: 69448
Buggy source:
public int getIndex(String qName){
  return attributes.getIndex(qName.toLowerCase());
}

Fixed version (ground truth):
@Override public int getIndex(String qName){
  return attributes.getIndex(qName.toLowerCase());
}
Program: 69449
Project: 69449
Buggy source:
private Document filter(String content){
  try {
    SAXParser parser=new SAXParser();
    parser.setProperty("String_Node_Str","String_Node_Str");
    parser.setFeature("String_Node_Str",true);
    DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
    DocumentBuilder builder=factory.newDocumentBuilder();
    Document document=builder.newDocument();
    HtmlToDomBuilderHandler contentHandler=new HtmlToDomBuilderHandler(document);
    parser.setContentHandler(contentHandler);
    parser.parse(new InputSource(new ByteArrayInputStream(content.getBytes())));
    return document;
  }
 catch (  SAXException e) {
    log.error("String_Node_Str",e);
    return null;
  }
catch (  IOException e) {
    log.error("String_Node_Str",e);
    return null;
  }
catch (  Exception e) {
    log.error("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
private Document filter(String content){
  try {
    SAXParser parser=new SAXParser();
    parser.setProperty("String_Node_Str","String_Node_Str");
    parser.setFeature("String_Node_Str",true);
    parser.setProperty("String_Node_Str","String_Node_Str");
    DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
    DocumentBuilder builder=factory.newDocumentBuilder();
    Document document=builder.newDocument();
    HtmlToDomBuilderHandler contentHandler=new HtmlToDomBuilderHandler(document);
    parser.setContentHandler(contentHandler);
    parser.parse(new InputSource(new ByteArrayInputStream(content.getBytes())));
    return document;
  }
 catch (  SAXException e) {
    log.error("String_Node_Str",e);
    return null;
  }
catch (  IOException e) {
    log.error("String_Node_Str",e);
    return null;
  }
catch (  Exception e) {
    log.error("String_Node_Str",e);
    return null;
  }
}
Program: 69450
Project: 69450
Buggy source:
public String getValue(String qName){
  return attributes.getValue(qName);
}

Fixed version (ground truth):
@Override public String getValue(String qName){
  return attributes.getValue(qName);
}
Program: 69451
Project: 69451
Buggy source:
public void appendHtml(AbstractNode parent,String htmlFragment){
  if (StringHelper.containsNonWhitespace(htmlFragment)) {
    htmlFragment=htmlFragment.trim();
    if (StringHelper.isHtml(htmlFragment)) {
      if (htmlFragment.startsWith("String_Node_Str")) {
        htmlFragment=htmlFragment.replace("String_Node_Str","String_Node_Str");
      }
    }
 else {
      htmlFragment="String_Node_Str" + htmlFragment + "String_Node_Str";
    }
    Document document=filter("String_Node_Str" + htmlFragment + "String_Node_Str");
    Element docElement=document.getDocumentElement();
    Node pEl=docElement.getFirstChild();
    NamedNodeMap attrs=pEl.getAttributes();
    for (int i=0; i < attrs.getLength(); i++) {
      Node attr=attrs.item(i);
      System.out.println(attr);
    }
    parent.getNodeGroups().load(docElement,new HTMLLoadingContext());
  }
}

Fixed version (ground truth):
public void appendHtml(AbstractNode parent,String htmlFragment){
  if (StringHelper.containsNonWhitespace(htmlFragment)) {
    htmlFragment=htmlFragment.trim();
    if (StringHelper.isHtml(htmlFragment)) {
      if (htmlFragment.startsWith("String_Node_Str")) {
        htmlFragment=htmlFragment.replace("String_Node_Str","String_Node_Str");
      }
    }
 else {
      htmlFragment="String_Node_Str" + htmlFragment + "String_Node_Str";
    }
    Document document=filter("String_Node_Str" + htmlFragment + "String_Node_Str");
    Element docElement=document.getDocumentElement();
    cleanUpNamespaces(docElement);
    parent.getNodeGroups().load(docElement,new HTMLLoadingContext());
  }
}
Program: 69452
Project: 69452
Buggy source:
@Override public String getLocalName(int index){
  String localName=attributes.getLocalName(index);
  if ("String_Node_Str".equals(localName)) {
    localName="String_Node_Str";
  }
  return localName;
}

Fixed version (ground truth):
@Override public String getLocalName(int index){
  String localName=attributes.getLocalName(index);
  return translateAttributeName(localName);
}
Program: 69453
Project: 69453
Buggy source:
public String getType(String qName){
  return attributes.getType(qName);
}

Fixed version (ground truth):
@Override public String getType(String qName){
  return attributes.getType(qName);
}
Program: 69454
Project: 69454
Buggy source:
private String cleanUpNamespaces(StringOutput sb){
  String content=sb.toString();
  content=content.replace("String_Node_Str","String_Node_Str");
  content=content.replace("String_Node_Str","String_Node_Str");
  content=content.replace("String_Node_Str","String_Node_Str");
  return content.trim();
}

Fixed version (ground truth):
private void cleanUpNamespaces(Element element){
  Attr xsiattr=element.getAttributeNode("String_Node_Str");
  if (xsiattr != null && "String_Node_Str".equals(xsiattr.getValue())) {
    element.removeAttribute("String_Node_Str");
  }
  Attr attr=element.getAttributeNode("String_Node_Str");
  if (attr != null && "String_Node_Str".equals(attr.getValue())) {
    element.removeAttribute("String_Node_Str");
  }
  for (Node child=element.getFirstChild(); child != null; child=child.getNextSibling()) {
    if (child instanceof Element) {
      cleanUpNamespaces((Element)child);
    }
  }
}
Program: 69455
Project: 69455
Buggy source:
public int getLength(){
  return attributes.getLength();
}

Fixed version (ground truth):
@Override public int getLength(){
  return attributes.getLength();
}
Program: 69456
Project: 69456
Buggy source:
public String getQName(int index){
  String qName=attributes.getQName(index);
  if ("String_Node_Str".equals(qName)) {
    qName="String_Node_Str";
  }
  return qName;
}

Fixed version (ground truth):
@Override public String getQName(int index){
  String qName=attributes.getQName(index);
  return translateAttributeName(qName);
}
Program: 69457
Project: 69457
Buggy source:
public String getURI(int index){
  return attributes.getURI(index);
}

Fixed version (ground truth):
@Override public String getURI(int index){
  return attributes.getURI(index);
}
Program: 69459
Project: 69459
Buggy source:
/** 
 * Lookup non-webdav, non-REST UserSession for identity key.
 * @param identityKey
 * @return user-session or null when no session was founded. 
 */
private UserSession getUserSessionForGui(Long identityKey){
  UserSession identitySession=null;
  if (identityKey != null) {
    identitySession=authUserSessions.stream().filter(userSession -> {
      Identity identity=userSession.getIdentity();
      if (identity != null && identityKey.equals(identity.getKey()) && userSession.getSessionInfo() != null && !userSession.getSessionInfo().isWebDAV() && !userSession.getSessionInfo().isREST()) {
        return true;
      }
      return false;
    }
).findFirst().get();
  }
  return identitySession;
}

Fixed version (ground truth):
/** 
 * Lookup non-webdav, non-REST UserSession for identity key.
 * @param identityKey
 * @return user-session or null when no session was founded. 
 */
private UserSession getUserSessionForGui(Long identityKey){
  UserSession identitySession=null;
  if (identityKey != null) {
    Optional<UserSession> optionalSession=authUserSessions.stream().filter(userSession -> {
      Identity identity=userSession.getIdentity();
      if (identity != null && identityKey.equals(identity.getKey()) && userSession.getSessionInfo() != null && !userSession.getSessionInfo().isWebDAV() && !userSession.getSessionInfo().isREST()) {
        return true;
      }
      return false;
    }
).findFirst();
    identitySession=optionalSession.isPresent() ? optionalSession.get() : null;
  }
  return identitySession;
}
Program: 69462
Project: 69462
Buggy source:
/** 
 * only for SignOffEvents - Usersession keeps book about usernames - WindowManager responsible to dispose controller chain
 * @see org.olat.core.util.event.GenericEventListener#event(org.olat.core.gui.control.Event)
 */
public void event(Event event){
  if (event instanceof SignOnOffEvent) {
    SignOnOffEvent se=(SignOnOffEvent)event;
    processSignOnOffEvent(se);
  }
}

Fixed version (ground truth):
/** 
 * only for SignOffEvents - Usersession keeps book about usernames - WindowManager responsible to dispose controller chain
 * @see org.olat.core.util.event.GenericEventListener#event(org.olat.core.gui.control.Event)
 */
@Override public void event(Event event){
  if (event instanceof SignOnOffEvent) {
    SignOnOffEvent se=(SignOnOffEvent)event;
    processSignOnOffEvent(se);
  }
}
Program: 69463
Project: 69463
Buggy source:
public DisposedCourseRestartController(UserRequest ureq,WindowControl wControl,RepositoryEntry courseRepositoryEntry){
  super(ureq,wControl);
  initialContent=createVelocityContainer("String_Node_Str");
  restartLink=LinkFactory.createButton("String_Node_Str",initialContent,this);
  this.courseRepositoryEntry=courseRepositoryEntry;
  panel=putInitialPanel(initialContent);
}

Fixed version (ground truth):
public DisposedCourseRestartController(UserRequest ureq,WindowControl wControl,RepositoryEntry courseRepositoryEntry){
  super(ureq,wControl);
  initialContent=createVelocityContainer("String_Node_Str");
  restartLink=LinkFactory.createButton("String_Node_Str",initialContent,this);
  restartLink.setElementCssClass("String_Node_Str");
  this.courseRepositoryEntry=courseRepositoryEntry;
  panel=putInitialPanel(initialContent);
}
Program: 69477
Project: 69477
Buggy source:
/** 
 * Create a group, search it and delete it.
 * @param loginPage
 * @throws IOException
 * @throws URISyntaxException
 */
@Test @RunAsClient public void createDeleteBusinessGroup(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
  screenshotTestRule.setBrowsers(browser);
  UserVO author=new UserRestClient(deploymentUrl).createAuthor();
  loginPage.loginAs(author.getLogin(),author.getPassword()).resume();
  String groupName="String_Node_Str" + UUID.randomUUID();
  navBar.openGroups(browser).createGroup(groupName,"String_Node_Str");
  navBar.openGroups(browser).deleteGroup(groupName).assertDeleted(groupName);
}

Fixed version (ground truth):
/** 
 * Create a group, search it and delete it.
 * @param loginPage
 * @throws IOException
 * @throws URISyntaxException
 */
@Test @RunAsClient public void createDeleteBusinessGroup(@InitialPage LoginPage loginPage) throws IOException, URISyntaxException {
  UserVO author=new UserRestClient(deploymentUrl).createAuthor();
  loginPage.loginAs(author.getLogin(),author.getPassword()).resume();
  String groupName="String_Node_Str" + UUID.randomUUID();
  navBar.openGroups(browser).createGroup(groupName,"String_Node_Str");
  navBar.openGroups(browser).deleteGroup(groupName).assertDeleted(groupName);
}
Program: 69482
Project: 69482
Buggy source:
/** 
 * An author create a group, set the visibility to show owners and participants. Add a member to the group. The participant log in, search the group and open it.
 * @param loginPage
 * @throws IOException
 * @throws URISyntaxException
 */
@Test @RunAsClient public void groupMembersVisibility(@InitialPage LoginPage loginPage,@Drone @Participant WebDriver participantBrowser) throws IOException, URISyntaxException {
  screenshotTestRule.setBrowsers(browser,participantBrowser);
  UserVO author=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  UserVO participant=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  loginPage.loginAs(author.getLogin(),author.getPassword()).resume();
  String groupName="String_Node_Str" + UUID.randomUUID();
  GroupPage group=navBar.openGroups(browser).createGroup(groupName,"String_Node_Str");
  MembersWizardPage members=group.openAdministration().openAdminMembers().setVisibility(true,true,false).addMember();
  members.searchMember(participant,false).next().next().next().finish();
  LoginPage participantLoginPage=LoginPage.getLoginPage(participantBrowser,deploymentUrl);
  participantLoginPage.loginAs(participant.getLogin(),participant.getPassword()).resume();
  NavigationPage participantNavBar=new NavigationPage(participantBrowser);
  participantNavBar.openGroups(participantBrowser).selectGroup(groupName);
  WebElement contentEl=participantBrowser.findElement(By.id("String_Node_Str"));
  String content=contentEl.getText();
  Assert.assertTrue(content.contains(groupName));
}

Fixed version (ground truth):
/** 
 * An author create a group, set the visibility to show owners and participants. Add a member to the group. The participant log in, search the group and open it.
 * @param loginPage
 * @throws IOException
 * @throws URISyntaxException
 */
@Test @RunAsClient public void groupMembersVisibility(@InitialPage LoginPage loginPage,@Drone @Participant WebDriver participantBrowser) throws IOException, URISyntaxException {
  UserVO author=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  UserVO participant=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  loginPage.loginAs(author.getLogin(),author.getPassword()).resume();
  String groupName="String_Node_Str" + UUID.randomUUID();
  GroupPage group=navBar.openGroups(browser).createGroup(groupName,"String_Node_Str");
  MembersWizardPage members=group.openAdministration().openAdminMembers().setVisibility(true,true,false).addMember();
  members.searchMember(participant,false).next().next().next().finish();
  LoginPage participantLoginPage=LoginPage.getLoginPage(participantBrowser,deploymentUrl);
  participantLoginPage.loginAs(participant.getLogin(),participant.getPassword()).resume();
  NavigationPage participantNavBar=new NavigationPage(participantBrowser);
  participantNavBar.openGroups(participantBrowser).selectGroup(groupName);
  WebElement contentEl=participantBrowser.findElement(By.id("String_Node_Str"));
  String content=contentEl.getText();
  Assert.assertTrue(content.contains(groupName));
}
Program: 69483
Project: 69483
Buggy source:
/** 
 * Use the insert tool
 * @param showInsertTool
 */
public void enableInsertTool(boolean showInsertTool){
  this.showInsertTool=showInsertTool;
}

Fixed version (ground truth):
/** 
 * Use the insert tool
 * @param enableInsertTool
 */
public void enableInsertTool(boolean enableInsertTool){
  showInsertTool=enableInsertTool;
}
Program: 69484
Project: 69484
Buggy source:
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  FlexiTableColumnModel columnModel=initColumnModel();
  groupTableModel=initTableModel(columnModel);
  tableEl=uifactory.addTableElement(getWindowControl(),"String_Node_Str",groupTableModel,20,false,getTranslator(),formLayout);
  FlexiTableSortOptions options=new FlexiTableSortOptions();
  options.setFromColumnModel(true);
  tableEl.setSortSettings(options);
  tableEl.setAndLoadPersistedPreferences(ureq,"String_Node_Str" + prefsKey);
  searchCtrl=new BusinessGroupSearchController(ureq,getWindowControl(),isAdmin(),true,showAdminTools,isAdmin(),mainForm);
  searchCtrl.setEnabled(false);
  listenTo(searchCtrl);
  tableEl.setSearchEnabled(true);
  tableEl.setExtendedSearch(searchCtrl);
  if (startExtendedSearch) {
    tableEl.expandExtendedSearch(ureq);
  }
  initButtons(formLayout,ureq);
}

Fixed version (ground truth):
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  FlexiTableColumnModel columnModel=initColumnModel();
  groupTableModel=initTableModel(columnModel);
  tableEl=uifactory.addTableElement(getWindowControl(),"String_Node_Str",groupTableModel,20,false,getTranslator(),formLayout);
  tableEl.setElementCssClass("String_Node_Str");
  FlexiTableSortOptions options=new FlexiTableSortOptions();
  options.setFromColumnModel(true);
  tableEl.setSortSettings(options);
  tableEl.setAndLoadPersistedPreferences(ureq,"String_Node_Str" + prefsKey);
  searchCtrl=new BusinessGroupSearchController(ureq,getWindowControl(),isAdmin(),true,showAdminTools,isAdmin(),mainForm);
  searchCtrl.setEnabled(false);
  listenTo(searchCtrl);
  tableEl.setSearchEnabled(true);
  tableEl.setExtendedSearch(searchCtrl);
  if (startExtendedSearch) {
    tableEl.expandExtendedSearch(ureq);
  }
  initButtons(formLayout,ureq);
}
Program: 69487
Project: 69487
Buggy source:
public static boolean validateImsManifest(QTI21ContentPackage cp,ResourceLocator resourceLocator){
  try {
    URI test=cp.getTest().toUri();
    ResourceLocator chainedResourceLocator=createResolvingResourceLocator(resourceLocator);
    XmlReadResult result=new QtiXmlReader().read(chainedResourceLocator,test,true);
    return result != null && result.isSchemaValid();
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return false;
  }
}

Fixed version (ground truth):
public static boolean validateImsManifest(QTI21ContentPackage cp,ResourceLocator resourceLocator){
  try {
    if (cp.hasTest()) {
      URI test=cp.getTest().toUri();
      ResourceLocator chainedResourceLocator=createResolvingResourceLocator(resourceLocator);
      XmlReadResult result=new QtiXmlReader().read(chainedResourceLocator,test,true);
      return result != null && result.isSchemaValid();
    }
    return false;
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return false;
  }
}
Program: 69488
Project: 69488
Buggy source:
public Path getTest() throws IOException {
  NodeList list=null;
  for (  String s : TEST_EXPRESSION) {
    list=getNodeList(s);
    if (list.getLength() > 0)     break;
  }
  if (list == null) {
    throw new IOException("String_Node_Str");
  }
  return manifestFile.getParent().resolve(list.item(0).getNodeValue());
}

Fixed version (ground truth):
public Path getTest() throws IOException {
  NodeList list=null;
  for (  String s : TEST_EXPRESSION) {
    list=getNodeList(s);
    if (list.getLength() > 0)     break;
  }
  if (list == null || list.getLength() == 0) {
    throw new IOException("String_Node_Str");
  }
  return manifestFile.getParent().resolve(list.item(0).getNodeValue());
}
Program: 69489
Project: 69489
Buggy source:
public MyCoursesPage select(String title){
  By titleLinkBy=By.cssSelector("String_Node_Str");
  WebElement linkToSelect=null;
  List<WebElement> titleLinks=browser.findElements(titleLinkBy);
  for (  WebElement link : titleLinks) {
    if (link.getText().contains(title)) {
      linkToSelect=link;
    }
  }
  Assert.assertNotNull(linkToSelect);
  linkToSelect.click();
  OOGraphene.waitBusy(browser);
  return this;
}

Fixed version (ground truth):
public MyCoursesPage select(String title){
  By titleLinkBy=By.cssSelector("String_Node_Str");
  WebElement linkToSelect=null;
  List<WebElement> titleLinks=browser.findElements(titleLinkBy);
  for (  WebElement link : titleLinks) {
    if (link.getText().contains(title)) {
      linkToSelect=link;
    }
  }
  Assert.assertNotNull("String_Node_Str" + title + "String_Node_Str"+ titleLinks.size()+ "String_Node_Str",linkToSelect);
  linkToSelect.click();
  OOGraphene.waitBusy(browser);
  return this;
}
Program: 69490
Project: 69490
Buggy source:
/** 
 * @see org.olat.basesecurity.Manager#loadIdentityByKey(java.lang.Long,boolean)
 */
@Override public Identity loadIdentityByKey(Long identityKey,boolean strict){
  if (strict)   return loadIdentityByKey(identityKey);
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(IdentityShort.class.getName()).append("String_Node_Str");
  List<Identity> identities=dbInstance.getCurrentEntityManager().createQuery(sb.toString(),Identity.class).setParameter("String_Node_Str",identityKey).getResultList();
  return identities.size() == 1 ? identities.get(0) : null;
}

Fixed version (ground truth):
/** 
 * @see org.olat.basesecurity.Manager#loadIdentityByKey(java.lang.Long,boolean)
 */
@Override public Identity loadIdentityByKey(Long identityKey,boolean strict){
  if (strict)   return loadIdentityByKey(identityKey);
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(Identity.class.getName()).append("String_Node_Str");
  List<Identity> identities=dbInstance.getCurrentEntityManager().createQuery(sb.toString(),Identity.class).setParameter("String_Node_Str",identityKey).getResultList();
  return identities.size() == 1 ? identities.get(0) : null;
}
Program: 69491
Project: 69491
Buggy source:
private void renderMovie(StringOutput sb,ImageComponent ic){
  int width=320;
  int height=240;
  Size size=ic.getScaledSize();
  if (size != null) {
    width=size.getWidth();
    height=size.getHeight() + 20;
  }
  String mapperUrl=ic.getMapperUrl();
  String name=ic.getMedia().getName();
  if (name.lastIndexOf('.') > 0) {
    mapperUrl+="String_Node_Str" + name;
  }
 else {
    mapperUrl+="String_Node_Str" + ic.getSuffix(ic.getMimeType());
  }
  String poster=null;
  if (ic.getPoster() != null) {
    poster=ic.getPosterMapperUrl() + "String_Node_Str" + ic.getPoster().getName();
  }
  String compId="String_Node_Str" + ic.getDispatchID();
  sb.append("String_Node_Str").append(compId).append("String_Node_Str");
  String imgId="String_Node_Str" + ic.getDispatchID();
  sb.append("String_Node_Str").append(imgId).append("String_Node_Str").append(imgId).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(Settings.createServerURI()).append(mapperUrl);
  sb.append("String_Node_Str").append(imgId).append("String_Node_Str").append(width).append("String_Node_Str").append(height).append("String_Node_Str");
  if (poster != null) {
    sb.append("String_Node_Str").append(poster).append("String_Node_Str");
  }
  sb.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
}

Fixed version (ground truth):
private void renderMovie(StringOutput sb,ImageComponent ic){
  int width=320;
  int height=240;
  Size size=ic.getScaledSize();
  if (size != null) {
    width=size.getWidth();
    height=size.getHeight() + 20;
  }
  String mapperUrl=ic.getMapperUrl();
  String name=ic.getMedia().getName();
  if (name.lastIndexOf('.') > 0) {
    mapperUrl+="String_Node_Str" + name;
  }
 else {
    mapperUrl+="String_Node_Str" + ic.getSuffix(ic.getMimeType());
  }
  String poster=null;
  if (ic.getPoster() != null) {
    poster=ic.getPosterMapperUrl() + "String_Node_Str" + ic.getPoster().getName();
  }
  String compId="String_Node_Str" + ic.getDispatchID();
  sb.append("String_Node_Str").append(compId).append("String_Node_Str");
  String imgId="String_Node_Str" + ic.getDispatchID();
  sb.append("String_Node_Str").append(imgId).append("String_Node_Str").append(imgId).append("String_Node_Str").append(width).append("String_Node_Str").append(height).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(Settings.createServerURI()).append(mapperUrl);
  sb.append("String_Node_Str").append(imgId).append("String_Node_Str").append(width).append("String_Node_Str").append(height).append("String_Node_Str");
  if (poster != null) {
    sb.append("String_Node_Str").append(poster).append("String_Node_Str");
  }
  sb.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
}
Program: 69492
Project: 69492
Buggy source:
private Activateable2 doAssessmentTool_v2(UserRequest ureq){
  if (delayedClose == Delayed.assessmentTool || requestForClose(ureq)) {
    OLATResourceable ores=OresHelper.createOLATResourceableType("String_Node_Str");
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl swControl=addToHistory(ureq,ores,null);
    if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_ASSESSMENT)) {
      removeCustomCSS(ureq);
      AssessmentOverviewController ctrl=new AssessmentOverviewController(ureq,swControl,toolbarPanel,getRepositoryEntry(),new FullAccessAssessmentCallback(reSecurity.isEntryAdmin()));
      ctrl.activate(ureq,null,null);
      listenTo(ctrl);
      assessmentTool_v2_Ctr=pushController(ureq,translate("String_Node_Str"),ctrl);
      currentToolCtr=assessmentTool_v2_Ctr;
      setActiveTool(assessmentLink);
      return assessmentToolCtr;
    }
    if (reSecurity.isCourseCoach() || reSecurity.isGroupCoach()) {
      removeCustomCSS(ureq);
      AssessmentOverviewController ctrl=new AssessmentOverviewController(ureq,swControl,toolbarPanel,getRepositoryEntry(),new CoachingGroupAccessAssessmentCallback());
      ctrl.activate(ureq,null,null);
      listenTo(ctrl);
      assessmentTool_v2_Ctr=pushController(ureq,translate("String_Node_Str"),ctrl);
      currentToolCtr=assessmentTool_v2_Ctr;
      setActiveTool(assessmentLink);
      return assessmentToolCtr;
    }
  }
 else {
    delayedClose=Delayed.assessmentTool;
  }
  return null;
}

Fixed version (ground truth):
private Activateable2 doAssessmentTool_v2(UserRequest ureq){
  if (delayedClose == Delayed.assessmentTool || requestForClose(ureq)) {
    OLATResourceable ores=OresHelper.createOLATResourceableType("String_Node_Str");
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl swControl=addToHistory(ureq,ores,null);
    if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_ASSESSMENT)) {
      removeCustomCSS();
      AssessmentOverviewController ctrl=new AssessmentOverviewController(ureq,swControl,toolbarPanel,getRepositoryEntry(),new FullAccessAssessmentCallback(reSecurity.isEntryAdmin()));
      ctrl.activate(ureq,null,null);
      listenTo(ctrl);
      assessmentTool_v2_Ctr=pushController(ureq,translate("String_Node_Str"),ctrl);
      currentToolCtr=assessmentTool_v2_Ctr;
      setActiveTool(assessmentLink);
      return assessmentToolCtr;
    }
    if (reSecurity.isCourseCoach() || reSecurity.isGroupCoach()) {
      removeCustomCSS();
      AssessmentOverviewController ctrl=new AssessmentOverviewController(ureq,swControl,toolbarPanel,getRepositoryEntry(),new CoachingGroupAccessAssessmentCallback());
      ctrl.activate(ureq,null,null);
      listenTo(ctrl);
      assessmentTool_v2_Ctr=pushController(ureq,translate("String_Node_Str"),ctrl);
      currentToolCtr=assessmentTool_v2_Ctr;
      setActiveTool(assessmentLink);
      return assessmentToolCtr;
    }
  }
 else {
    delayedClose=Delayed.assessmentTool;
  }
  return null;
}
Program: 69493
Project: 69493
Buggy source:
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  mainForm.setStandaloneRendering(true);
  mainForm.setMultipartEnabled(true,Integer.MAX_VALUE);
  qtiEl=new AssessmentItemFormItem("String_Node_Str");
  formLayout.add("String_Node_Str",qtiEl);
  ResourceLocator fileResourceLocator=new PathResourceLocator(fUnzippedDirRoot.toPath());
  final ResourceLocator inputResourceLocator=ImsQTI21Resource.createResolvingResourceLocator(fileResourceLocator);
  qtiEl.setResourceLocator(inputResourceLocator);
  qtiEl.setItemSessionController(itemSessionController);
  File manifestPath=new File(fUnzippedDirRoot,filename);
  qtiEl.setAssessmentObjectUri(manifestPath.toURI());
  qtiEl.setCandidateSessionContext(AssessmentItemDisplayController.this);
  qtiEl.setMapperUri(mapperUri);
}

Fixed version (ground truth):
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  mainForm.setStandaloneRendering(true);
  mainForm.setMultipartEnabled(true);
  qtiEl=new AssessmentItemFormItem("String_Node_Str");
  formLayout.add("String_Node_Str",qtiEl);
  ResourceLocator fileResourceLocator=new PathResourceLocator(fUnzippedDirRoot.toPath());
  final ResourceLocator inputResourceLocator=ImsQTI21Resource.createResolvingResourceLocator(fileResourceLocator);
  qtiEl.setResourceLocator(inputResourceLocator);
  qtiEl.setItemSessionController(itemSessionController);
  File manifestPath=new File(fUnzippedDirRoot,filename);
  qtiEl.setAssessmentObjectUri(manifestPath.toURI());
  qtiEl.setCandidateSessionContext(AssessmentItemDisplayController.this);
  qtiEl.setMapperUri(mapperUri);
}
Program: 69494
Project: 69494
Buggy source:
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  mainForm.setStandaloneRendering(true);
  mainForm.setMultipartEnabled(true,Integer.MAX_VALUE);
  qtiEl=new AssessmentTestFormItem("String_Node_Str");
  formLayout.add("String_Node_Str",qtiEl);
  ResourceLocator fileResourceLocator=new PathResourceLocator(fUnzippedDirRoot.toPath());
  final ResourceLocator inputResourceLocator=ImsQTI21Resource.createResolvingResourceLocator(fileResourceLocator);
  qtiEl.setResourceLocator(inputResourceLocator);
  qtiEl.setTestSessionController(testSessionController);
  qtiEl.setAssessmentObjectUri(qtiService.createAssessmentObjectUri(fUnzippedDirRoot));
  qtiEl.setCandidateSessionContext(AssessmentTestDisplayController.this);
  qtiEl.setMapperUri(mapperUri);
}

Fixed version (ground truth):
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  mainForm.setStandaloneRendering(true);
  mainForm.setMultipartEnabled(true);
  qtiEl=new AssessmentTestFormItem("String_Node_Str");
  formLayout.add("String_Node_Str",qtiEl);
  ResourceLocator fileResourceLocator=new PathResourceLocator(fUnzippedDirRoot.toPath());
  final ResourceLocator inputResourceLocator=ImsQTI21Resource.createResolvingResourceLocator(fileResourceLocator);
  qtiEl.setResourceLocator(inputResourceLocator);
  qtiEl.setTestSessionController(testSessionController);
  qtiEl.setAssessmentObjectUri(qtiService.createAssessmentObjectUri(fUnzippedDirRoot));
  qtiEl.setCandidateSessionContext(AssessmentTestDisplayController.this);
  qtiEl.setMapperUri(mapperUri);
}
Program: 69495
Project: 69495
Buggy source:
@Override public String getURL(Locale locale,String page){
  StringBuilder sb=new StringBuilder(64);
  sb.append("String_Node_Str");
  String version=Settings.getVersion();
  sb.append(generateSpace(version,locale));
  if (page != null) {
    int anchorPos=page.indexOf("String_Node_Str");
    if (anchorPos != -1) {
      String realPage=page.substring(0,anchorPos);
      String anchor=page.substring(anchorPos + 1);
      sb.append(realPage.replace("String_Node_Str","String_Node_Str"));
      sb.append("String_Node_Str").append(realPage.replace("String_Node_Str","String_Node_Str")).append("String_Node_Str").append(anchor);
    }
 else {
      sb.append(page.replace("String_Node_Str","String_Node_Str"));
    }
  }
  return sb.toString();
}

Fixed version (ground truth):
@Override public String getURL(Locale locale,String page){
  StringBuilder sb=new StringBuilder(64);
  sb.append("String_Node_Str");
  String space=spaces.get(locale.toString());
  if (space == null) {
    String version=Settings.getVersion();
    space=generateSpace(version,locale);
    spaces.putIfAbsent(locale.toString(),space);
  }
  sb.append(space);
  if (page != null) {
    int anchorPos=page.indexOf("String_Node_Str");
    if (anchorPos != -1) {
      String realPage=page.substring(0,anchorPos);
      String anchor=page.substring(anchorPos + 1);
      if (!locale.getLanguage().equals(EN_Locale.getLanguage())) {
        String redirectedPage=getPageFromAlias(getURL(locale,realPage));
        if (redirectedPage != null) {
          realPage=redirectedPage;
        }
      }
      sb.append(realPage.replaceAll("String_Node_Str","String_Node_Str"));
      sb.append("String_Node_Str").append(realPage.replaceAll("String_Node_Str","String_Node_Str")).append("String_Node_Str").append(anchor);
    }
 else {
      sb.append(page.replaceAll("String_Node_Str","String_Node_Str"));
    }
  }
  return sb.toString();
}
Program: 69496
Project: 69496
Buggy source:
/** 
 * Convert 10.0 -> 100<br/> Convert 10.1.1 -> 101
 * @param version
 * @param locale
 * @return
 */
protected String generateSpace(String version,Locale locale){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  int firstPointIndex=version.indexOf('.');
  if (firstPointIndex > 0) {
    sb.append(version.substring(0,firstPointIndex));
    int secondPointIndex=version.indexOf('.',firstPointIndex + 1);
    if (secondPointIndex > firstPointIndex) {
      sb.append(version.substring(firstPointIndex + 1,secondPointIndex));
    }
 else     if (firstPointIndex + 1 < version.length()) {
      String subVersion=version.substring(firstPointIndex + 1);
      char[] subVersionArr=subVersion.toCharArray();
      for (int i=0; i < subVersionArr.length && Character.isDigit(subVersionArr[i]); i++) {
        sb.append(subVersionArr[i]);
      }
    }
 else {
      sb.append("String_Node_Str");
    }
  }
 else {
    char[] versionArr=version.toCharArray();
    for (int i=0; i < versionArr.length && Character.isDigit(versionArr[i]); i++) {
      sb.append(versionArr[i]);
    }
    sb.append("String_Node_Str");
  }
  if (locale.getLanguage().equals(new Locale("String_Node_Str").getLanguage())) {
    sb.append("String_Node_Str");
  }
 else {
    sb.append("String_Node_Str");
  }
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * Convert 10.0 -> 100<br/> Convert 10.1.1 -> 101
 * @param version
 * @param locale
 * @return
 */
protected String generateSpace(String version,Locale locale){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  int firstPointIndex=version.indexOf('.');
  if (firstPointIndex > 0) {
    sb.append(version.substring(0,firstPointIndex));
    int secondPointIndex=version.indexOf('.',firstPointIndex + 1);
    if (secondPointIndex > firstPointIndex) {
      sb.append(version.substring(firstPointIndex + 1,secondPointIndex));
    }
 else     if (firstPointIndex + 1 < version.length()) {
      String subVersion=version.substring(firstPointIndex + 1);
      char[] subVersionArr=subVersion.toCharArray();
      for (int i=0; i < subVersionArr.length && Character.isDigit(subVersionArr[i]); i++) {
        sb.append(subVersionArr[i]);
      }
    }
 else {
      sb.append("String_Node_Str");
    }
  }
 else {
    char[] versionArr=version.toCharArray();
    for (int i=0; i < versionArr.length && Character.isDigit(versionArr[i]); i++) {
      sb.append(versionArr[i]);
    }
    sb.append("String_Node_Str");
  }
  if (locale.getLanguage().equals(DE_Locale.getLanguage())) {
    sb.append("String_Node_Str");
  }
 else {
    sb.append("String_Node_Str");
  }
  return sb.toString();
}
Program: 69497
Project: 69497
Buggy source:
private static void setBuildIdFromBuildDate(){
  SimpleDateFormat formatter=new SimpleDateFormat("String_Node_Str");
  buildIdentifier=formatter.format(buildDate);
}

Fixed version (ground truth):
private static void setBuildIdFromBuildDate(){
  SimpleDateFormat formatter=new SimpleDateFormat("String_Node_Str");
  buildIdentifier=formatter.format(getBuildDate());
}
Program: 69498
Project: 69498
Buggy source:
private Settings createHttpDefaultPortSettings(){
  Settings settings=createCommonSettingsForPortTests(0,SettingsTest.httpDefaultPort);
  return settings;
}

Fixed version (ground truth):
public static Settings createHttpDefaultPortSettings(){
  Settings settings=createCommonSettingsForPortTests(0,SettingsTest.httpDefaultPort);
  return settings;
}
Program: 69499
Project: 69499
Buggy source:
private Settings createHttpsOtherPortSettings(){
  Settings settings=createCommonSettingsForPortTests(SettingsTest.httpsOtherPort,0);
  return settings;
}

Fixed version (ground truth):
public static Settings createHttpsOtherPortSettings(){
  Settings settings=createCommonSettingsForPortTests(SettingsTest.httpsOtherPort,0);
  return settings;
}
Program: 69500
Project: 69500
Buggy source:
private Settings createHttpOtherPortSettings(){
  Settings settings=createCommonSettingsForPortTests(0,SettingsTest.httpOtherPort);
  return settings;
}

Fixed version (ground truth):
public static Settings createHttpOtherPortSettings(){
  Settings settings=createCommonSettingsForPortTests(0,SettingsTest.httpOtherPort);
  return settings;
}
Program: 69501
Project: 69501
Buggy source:
private Settings createHttpsDefaultPortSettings(){
  Settings settings=createCommonSettingsForPortTests(SettingsTest.httpsDefaultPort,0);
  return settings;
}

Fixed version (ground truth):
public static Settings createHttpsDefaultPortSettings(){
  Settings settings=createCommonSettingsForPortTests(SettingsTest.httpsDefaultPort,0);
  return settings;
}
Program: 69502
Project: 69502
Buggy source:
private Settings createCommonSettingsForPortTests(int securePort,int insecurePort){
  Settings settings=new Settings();
  PersistedProperties persistedPropertiesHttp=new PersistedProperties(new DummyListener());
  Properties defaultPropertiesHttp=new Properties();
  defaultPropertiesHttp.setProperty("String_Node_Str","String_Node_Str");
  persistedPropertiesHttp.setDefaultProperties(defaultPropertiesHttp);
  settings.setPersistedProperties(persistedPropertiesHttp);
  settings.setServerSecurePort(securePort);
  settings.setServerInsecurePort(insecurePort);
  settings.setServerDomainName(SettingsTest.serverFqnd);
  WebappHelper.setServletContextPath(SettingsTest.contextPath);
  return settings;
}

Fixed version (ground truth):
public static Settings createCommonSettingsForPortTests(int securePort,int insecurePort){
  Settings settings=new Settings();
  PersistedProperties persistedPropertiesHttp=new PersistedProperties(new DummyListener());
  Properties defaultPropertiesHttp=new Properties();
  defaultPropertiesHttp.setProperty("String_Node_Str","String_Node_Str");
  persistedPropertiesHttp.setDefaultProperties(defaultPropertiesHttp);
  settings.setPersistedProperties(persistedPropertiesHttp);
  settings.setServerSecurePort(securePort);
  settings.setServerInsecurePort(insecurePort);
  settings.setServerDomainName(SettingsTest.serverFqnd);
  if (settings.getVersion() == null) {
    settings.setVersion("String_Node_Str");
  }
  settings.setApplicationName("String_Node_Str");
  WebappHelper.setServletContextPath(SettingsTest.contextPath);
  return settings;
}
Program: 69503
Project: 69503
Buggy source:
private void doCreateNode(String type){
  ICourse course=CourseFactory.getCourseEditSession(courseOres.getResourceableId());
  CourseNodeConfiguration newNodeConfig=CourseNodeFactory.getInstance().getCourseNodeConfiguration(type);
  createdNode=newNodeConfig.getInstance();
  String title=new String(newNodeConfig.getLinkText(getLocale()));
  createdNode.setShortTitle(title);
  String longTitle=new String(translate("String_Node_Str") + "String_Node_Str" + title);
  createdNode.setLongTitle(longTitle);
  createdNode.setNoAccessExplanation(translate("String_Node_Str"));
  CourseEditorTreeModel editorTreeModel=course.getEditorTreeModel();
  if (editorTreeModel.getRootNode().equals(currentNode)) {
    int pos=currentNode.getChildCount();
    CourseNode selectedNode=currentNode.getCourseNode();
    editorTreeModel.insertCourseNodeAt(createdNode,selectedNode,pos);
  }
 else {
    CourseEditorTreeNode parentNode=(CourseEditorTreeNode)currentNode.getParent();
    CourseNode selectedNode=parentNode.getCourseNode();
    int pos=currentNode.getPosition();
    editorTreeModel.insertCourseNodeAt(createdNode,selectedNode,pos + 1);
  }
  CourseFactory.saveCourseEditorTreeModel(course.getResourceableId());
}

Fixed version (ground truth):
private void doCreateNode(String type){
  ICourse course=CourseFactory.getCourseEditSession(courseOres.getResourceableId());
  CourseNodeConfiguration newNodeConfig=CourseNodeFactory.getInstance().getCourseNodeConfiguration(type);
  createdNode=newNodeConfig.getInstance();
  String title=new String(newNodeConfig.getLinkText(getLocale()));
  createdNode.setShortTitle(title);
  createdNode.setNoAccessExplanation(translate("String_Node_Str"));
  CourseEditorTreeModel editorTreeModel=course.getEditorTreeModel();
  if (editorTreeModel.getRootNode().equals(currentNode)) {
    int pos=currentNode.getChildCount();
    CourseNode selectedNode=currentNode.getCourseNode();
    editorTreeModel.insertCourseNodeAt(createdNode,selectedNode,pos);
  }
 else {
    CourseEditorTreeNode parentNode=(CourseEditorTreeNode)currentNode.getParent();
    CourseNode selectedNode=parentNode.getCourseNode();
    int pos=currentNode.getPosition();
    editorTreeModel.insertCourseNodeAt(createdNode,selectedNode,pos + 1);
  }
  CourseFactory.saveCourseEditorTreeModel(course.getResourceableId());
}
Program: 69504
Project: 69504
Buggy source:
/** 
 * Initializes the node edit tabbed pane and its controller for this particular node
 * @param ureq
 * @param chosenNode
 * @param groupMgr
 */
private void initNodeEditor(UserRequest ureq,CourseNode chosenNode){
  ICourse course=CourseFactory.getCourseEditSession(ores.getResourceableId());
  tabbedNodeConfig.removeAll();
  removeAsListenerAndDispose(nodeEditCntrllr);
  String type=chosenNode.getType();
  CourseNodeConfiguration cnConfig=CourseNodeFactory.getInstance().getCourseNodeConfigurationEvenForDisabledBB(type);
  if (cnConfig.isEnabled()) {
    nodeEditCntrllr=chosenNode.createEditController(ureq,getWindowControl(),stackPanel,course,euce);
    listenTo(nodeEditCntrllr);
    nodeEditCntrllr.addTabs(tabbedNodeConfig);
  }
  boolean disabled=!cnConfig.isEnabled();
  boolean deprecated=cnConfig.isDeprecated();
  main.contextPut("String_Node_Str",disabled);
  main.contextPut("String_Node_Str",deprecated);
  alternativeLink.setVisible((disabled || deprecated) && !cnConfig.getAlternativeCourseNodes().isEmpty());
  alternativeLink.setUserObject(chosenNode);
  String nodeCssClass=null;
  if (chosenNode.getParent() == null) {
    nodeCssClass="String_Node_Str";
  }
 else {
    nodeCssClass=cnConfig.getIconCSSClass();
  }
  main.contextPut("String_Node_Str",nodeCssClass);
  main.contextPut("String_Node_Str",chosenNode);
}

Fixed version (ground truth):
/** 
 * Initializes the node edit tabbed pane and its controller for this particular node
 * @param ureq
 * @param chosenNode
 * @param groupMgr
 */
private void initNodeEditor(UserRequest ureq,CourseNode chosenNode){
  ICourse course=CourseFactory.getCourseEditSession(ores.getResourceableId());
  tabbedNodeConfig.removeAll();
  removeAsListenerAndDispose(nodeEditCntrllr);
  String type=chosenNode.getType();
  CourseNodeConfiguration cnConfig=CourseNodeFactory.getInstance().getCourseNodeConfigurationEvenForDisabledBB(type);
  if (cnConfig.isEnabled()) {
    nodeEditCntrllr=chosenNode.createEditController(ureq,getWindowControl(),stackPanel,course,euce);
    listenTo(nodeEditCntrllr);
    nodeEditCntrllr.addTabs(tabbedNodeConfig);
  }
  boolean disabled=!cnConfig.isEnabled();
  boolean deprecated=cnConfig.isDeprecated();
  main.contextPut("String_Node_Str",disabled);
  main.contextPut("String_Node_Str",deprecated);
  alternativeLink.setVisible((disabled || deprecated) && !cnConfig.getAlternativeCourseNodes().isEmpty());
  alternativeLink.setUserObject(chosenNode);
  String nodeCssClass=null;
  if (this.cetm.getRootNode().getIdent().equals(chosenNode.getIdent())) {
    nodeCssClass="String_Node_Str";
  }
 else {
    nodeCssClass=cnConfig.getIconCSSClass();
  }
  main.contextPut("String_Node_Str",nodeCssClass);
  main.contextPut("String_Node_Str",chosenNode);
}
Program: 69505
Project: 69505
Buggy source:
private CourseNode createCourseNode(VFSItem item,String type){
  CourseNodeConfiguration newNodeConfig=CourseNodeFactory.getInstance().getCourseNodeConfiguration(type);
  CourseNode newNode=newNodeConfig.getInstance();
  newNode.setShortTitle(item.getName());
  newNode.setLongTitle(item.getName());
  newNode.setLearningObjectives(item.getName());
  newNode.setNoAccessExplanation("String_Node_Str");
  return newNode;
}

Fixed version (ground truth):
private CourseNode createCourseNode(VFSItem item,String type){
  CourseNodeConfiguration newNodeConfig=CourseNodeFactory.getInstance().getCourseNodeConfiguration(type);
  CourseNode newNode=newNodeConfig.getInstance();
  newNode.setShortTitle(item.getName());
  newNode.setLearningObjectives(item.getName());
  newNode.setNoAccessExplanation("String_Node_Str");
  return newNode;
}