nus-yam/ex-repair huggingface dataset:
Program: 61034
Project: 61034
Buggy source:
/** 
 * @param basePage base
 * @param modalWindow modal window
 * @param connectorTO
 * @param create : set to true only if a CREATE operation is required
 */
public GTaskModalPage(final BasePage basePage,final ModalWindow window,final SchedTaskTO taskTO){
  super(basePage,window,taskTO);
  final IModel<List<String>> classNames=new LoadableDetachableModel<List<String>>(){
    @Override protected List<String> load(){
      final List<String> classes=new ArrayList<String>(taskRestClient.getJobClasses());
      return classes;
    }
  }
;
  final DropDownChoice<String> className=new DropDownChoice("String_Node_Str",new PropertyModel(taskTO,"String_Node_Str"),classNames);
  profile.add(className);
}

Fixed version (ground truth):
/** 
 * @param basePage base
 * @param modalWindow modal window
 * @param connectorTO
 * @param create : set to true only if a CREATE operation is required
 */
public GTaskModalPage(final BasePage basePage,final ModalWindow window,final SchedTaskTO taskTO){
  super(basePage,window,taskTO);
  final IModel<List<String>> classNames=new LoadableDetachableModel<List<String>>(){
    private static final long serialVersionUID=5275935387613157437L;
    @Override protected List<String> load(){
      final List<String> classes=new ArrayList<String>(taskRestClient.getJobClasses());
      return classes;
    }
  }
;
  final AjaxDropDownChoicePanel<String> className=new AjaxDropDownChoicePanel<String>("String_Node_Str",getString("String_Node_Str"),new PropertyModel(taskTO,"String_Node_Str"),false);
  className.setChoices(classNames.getObject());
  className.addRequiredLabel();
  className.setEnabled(taskTO.getId() == 0);
  className.setStyleShet("String_Node_Str");
  profile.add(className);
}
Program: 61035
Project: 61035
Buggy source:
public MembershipModalPage(final Page basePage,final ModalWindow window,final MembershipTO membershipTO,final UserTO userTO){
  final Form form=new Form("String_Node_Str");
  form.setModel(new CompoundPropertyModel(membershipTO));
  submit=new AjaxButton("String_Node_Str",new Model(getString("String_Node_Str"))){
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form form){
      userTO.removeMembership(membershipTO);
      userTO.addMembership(membershipTO);
      window.close(target);
    }
    @Override protected void onError(    AjaxRequestTarget target,    Form form){
      target.addComponent(feedbackPanel);
    }
  }
;
  String allowedRoles=null;
  if (userTO.getId() == 0) {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
 else {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
  MetaDataRoleAuthorizationStrategy.authorize(submit,RENDER,allowedRoles);
  form.add(submit);
  form.add(new AttributesPanel("String_Node_Str",membershipTO,form));
  form.add(new DerivedAttributesPanel("String_Node_Str",membershipTO));
  form.add(new VirtualAttributesPanel("String_Node_Str",membershipTO));
  add(form);
}

Fixed version (ground truth):
public MembershipModalPage(final Page basePage,final ModalWindow window,final MembershipTO membershipTO,final UserTO userTO){
  final Form form=new Form("String_Node_Str");
  form.setModel(new CompoundPropertyModel(membershipTO));
  submit=new AjaxButton("String_Node_Str",new ResourceModel("String_Node_Str")){
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form form){
      userTO.removeMembership(membershipTO);
      userTO.addMembership(membershipTO);
      window.close(target);
    }
    @Override protected void onError(    AjaxRequestTarget target,    Form form){
      target.addComponent(feedbackPanel);
    }
  }
;
  String allowedRoles=null;
  if (userTO.getId() == 0) {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
 else {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
  MetaDataRoleAuthorizationStrategy.authorize(submit,RENDER,allowedRoles);
  form.add(submit);
  form.add(new AttributesPanel("String_Node_Str",membershipTO,form));
  form.add(new DerivedAttributesPanel("String_Node_Str",membershipTO));
  form.add(new VirtualAttributesPanel("String_Node_Str",membershipTO));
  add(form);
}
Program: 61039
Project: 61039
Buggy source:
@Override public ConnInstance save(final ConnInstance connector){
  return entityManager.merge(connector);
}

Fixed version (ground truth):
@Override public ConnInstance save(final ConnInstance connector){
  final ConnInstance merged=entityManager.merge(connector);
  final List<TargetResource> resources=findTargetResources(merged);
  for (  TargetResource resource : resources) {
    try {
      connInstanceLoader.registerConnector(resource);
    }
 catch (    NotFoundException e) {
      LOG.error("String_Node_Str",e);
    }
  }
  return merged;
}
Program: 61041
Project: 61041
Buggy source:
@Test public void browseEditModal(){
  selenium.setSpeed("String_Node_Str");
  selenium.click("String_Node_Str");
  selenium.waitForPageToLoad("String_Node_Str");
  selenium.click("String_Node_Str");
  for (int second=0; ; second++) {
    if (second >= 60) {
      fail("String_Node_Str");
    }
    try {
      if (selenium.isElementPresent("String_Node_Str")) {
        break;
      }
    }
 catch (    Exception e) {
    }
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
    }
  }
  assertEquals("String_Node_Str",selenium.getAttribute("String_Node_Str"));
  selenium.click("String_Node_Str");
  selenium.click("String_Node_Str");
}

Fixed version (ground truth):
@Test public void browseEditModal(){
  selenium.setSpeed("String_Node_Str");
  selenium.click("String_Node_Str");
  selenium.waitForPageToLoad("String_Node_Str");
  selenium.click("String_Node_Str");
  for (int second=0; ; second++) {
    if (second >= 60) {
      fail("String_Node_Str");
    }
    try {
      if (selenium.isElementPresent("String_Node_Str")) {
        break;
      }
    }
 catch (    Exception e) {
    }
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
    }
  }
  assertEquals("String_Node_Str",selenium.getAttribute("String_Node_Str"));
  assertEquals("String_Node_Str",selenium.getSelectedValue("String_Node_Str"));
  selenium.click("String_Node_Str");
  selenium.click("String_Node_Str");
}
Program: 61043
Project: 61043
Buggy source:
/** 
 * Set a WindowClosedCallback for a ModalWindow instance.
 * @param window
 * @param container
 */
public void setWindowClosedCallback(ModalWindow window,final WebMarkupContainer container){
  window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    public void onClose(    AjaxRequestTarget target){
      target.addComponent(container);
      if (operationResult) {
        info(getString("String_Node_Str"));
        target.addComponent(feedbackPanel);
        operationResult=false;
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Set a WindowClosedCallback for a ModalWindow instance.
 * @param window
 * @param container
 */
private void setWindowClosedCallback(ModalWindow window,final WebMarkupContainer container){
  window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    private static final long serialVersionUID=8804221891699487139L;
    public void onClose(    AjaxRequestTarget target){
      target.addComponent(container);
      if (operationResult) {
        info(getString("String_Node_Str"));
        target.addComponent(feedbackPanel);
        operationResult=false;
      }
    }
  }
);
}
Program: 61044
Project: 61044
Buggy source:
@Override protected void populateItem(final ListItem<LoggerTO> item){
  item.add(new Label("String_Node_Str"));
  DropDownChoice<LoggerLevel> level=new DropDownChoice<LoggerLevel>("String_Node_Str");
  level.setModel(new IModel<LoggerLevel>(){
    @Override public LoggerLevel getObject(){
      return LoggerLevel.valueOf(item.getModelObject().getLevel());
    }
    @Override public void setObject(    final LoggerLevel object){
      item.getModelObject().setLevel(object.toString());
    }
    @Override public void detach(){
    }
  }
);
  level.setChoices(Arrays.asList(LoggerLevel.values()));
  level.setOutputMarkupId(true);
  level.add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
    @Override protected void onUpdate(    final AjaxRequestTarget target){
      boolean result=getId().equals("String_Node_Str") ? restClient.setLoggerLevel(item.getModelObject().getName(),item.getModelObject().getLevel()) : consoleLoggerController.setLoggerLevel(item.getModelObject().getName(),item.getModelObject().getLevel());
      if (result) {
        info(getString("String_Node_Str"));
      }
 else {
        info(getString("String_Node_Str"));
      }
      target.addComponent(feedbackPanel);
    }
  }
);
  item.add(level);
}

Fixed version (ground truth):
@Override protected void populateItem(final ListItem<LoggerTO> item){
  item.add(new Label("String_Node_Str"));
  DropDownChoice<LoggerLevel> level=new DropDownChoice<LoggerLevel>("String_Node_Str");
  level.setModel(new IModel<LoggerLevel>(){
    private static final long serialVersionUID=-2350428186089596562L;
    @Override public LoggerLevel getObject(){
      return LoggerLevel.valueOf(item.getModelObject().getLevel());
    }
    @Override public void setObject(    final LoggerLevel object){
      item.getModelObject().setLevel(object.toString());
    }
    @Override public void detach(){
    }
  }
);
  level.setChoices(Arrays.asList(LoggerLevel.values()));
  level.setOutputMarkupId(true);
  level.add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
    @Override protected void onUpdate(    final AjaxRequestTarget target){
      boolean result=getId().equals("String_Node_Str") ? restClient.setLoggerLevel(item.getModelObject().getName(),item.getModelObject().getLevel()) : consoleLoggerController.setLoggerLevel(item.getModelObject().getName(),item.getModelObject().getLevel());
      if (result) {
        info(getString("String_Node_Str"));
      }
 else {
        info(getString("String_Node_Str"));
      }
      target.addComponent(feedbackPanel);
    }
  }
);
  item.add(level);
}
Program: 61046
Project: 61046
Buggy source:
private void doExecuteAction(final SyncopeUser user,final String action,final Map<String,Object> moreVariables) throws WorkflowException {
  final Map<String,Object> variables=new HashMap<String,Object>();
  variables.put(SYNCOPE_USER,user);
  variables.put(ACTION,action);
  if (moreVariables != null && !moreVariables.isEmpty()) {
    variables.putAll(moreVariables);
  }
  if (StringUtils.isBlank(user.getWorkflowId())) {
    throw new WorkflowException(new NotFoundException("String_Node_Str"));
  }
  List<Task> tasks=taskService.createTaskQuery().processInstanceId(user.getWorkflowId()).list();
  if (tasks.isEmpty() || tasks.size() > 1) {
    throw new WorkflowException(new RuntimeException("String_Node_Str" + tasks.size()));
  }
  try {
    taskService.complete(tasks.get(0).getId(),variables);
  }
 catch (  ActivitiException e) {
    throw new WorkflowException(e);
  }
}

Fixed version (ground truth):
private void doExecuteAction(final SyncopeUser user,final String action,final Map<String,Object> moreVariables) throws WorkflowException {
  final Map<String,Object> variables=new HashMap<String,Object>();
  variables.put(SYNCOPE_USER,user);
  variables.put(ACTION,action);
  if (moreVariables != null && !moreVariables.isEmpty()) {
    variables.putAll(moreVariables);
  }
  if (StringUtils.isBlank(user.getWorkflowId())) {
    throw new WorkflowException(new NotFoundException("String_Node_Str"));
  }
  List<Task> tasks=taskService.createTaskQuery().processInstanceId(user.getWorkflowId()).list();
  if (tasks.size() != 1) {
    LOG.warn("String_Node_Str",tasks.size());
  }
 else {
    try {
      taskService.complete(tasks.get(0).getId(),variables);
    }
 catch (    ActivitiException e) {
      throw new WorkflowException(e);
    }
  }
}
Program: 61047
Project: 61047
Buggy source:
@Test public final void read(){
  PropagationTaskTO taskTO=restTemplate.getForObject(BASE_URL + "String_Node_Str",PropagationTaskTO.class,1);
  assertNotNull(taskTO);
  assertNotNull(taskTO.getExecutions());
  assertFalse(taskTO.getExecutions().isEmpty());
}

Fixed version (ground truth):
@Test public final void read(){
  PropagationTaskTO taskTO=restTemplate.getForObject(BASE_URL + "String_Node_Str",PropagationTaskTO.class,3);
  assertNotNull(taskTO);
  assertNotNull(taskTO.getExecutions());
  assertTrue(taskTO.getExecutions().isEmpty());
}
Program: 61049
Project: 61049
Buggy source:
public MembershipModalPage(final ModalWindow window,final MembershipTO membershipTO,final UserTO userTO){
  final Form form=new Form("String_Node_Str");
  form.setModel(new CompoundPropertyModel(membershipTO));
  submit=new AjaxButton("String_Node_Str",new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=-958724007591692537L;
    @Override protected void onSubmit(    final AjaxRequestTarget target,    final Form form){
      userTO.removeMembership(membershipTO);
      userTO.addMembership(membershipTO);
      window.close(target);
    }
    @Override protected void onError(    final AjaxRequestTarget target,    final Form form){
      target.add(feedbackPanel);
    }
  }
;
  String allowedRoles=null;
  if (userTO.getId() == 0) {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
 else {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
  MetaDataRoleAuthorizationStrategy.authorize(submit,RENDER,allowedRoles);
  form.add(submit);
  form.add(new AttributesPanel("String_Node_Str",membershipTO,form));
  form.add(new DerivedAttributesPanel("String_Node_Str",membershipTO));
  form.add(new VirtualAttributesPanel("String_Node_Str",membershipTO));
  add(form);
}

Fixed version (ground truth):
public MembershipModalPage(final PageReference pageRef,final ModalWindow window,final MembershipTO membershipTO){
  final Form form=new Form("String_Node_Str");
  final AbstractBaseBean bean=((BaseModalPage)pageRef.getPage()).getBean();
  form.setModel(new CompoundPropertyModel(membershipTO));
  submit=new AjaxButton("String_Node_Str",new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=-958724007591692537L;
    @Override protected void onSubmit(    final AjaxRequestTarget target,    final Form form){
      ((UserTO)bean).removeMembership(membershipTO);
      ((UserTO)bean).addMembership(membershipTO);
      ((BaseModalPage)pageRef.getPage()).setBean(bean);
      window.close(target);
    }
    @Override protected void onError(    final AjaxRequestTarget target,    final Form form){
      target.add(feedbackPanel);
    }
  }
;
  String allowedRoles=null;
  if (((UserTO)bean).getId() == 0) {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
 else {
    allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  }
  MetaDataRoleAuthorizationStrategy.authorize(submit,RENDER,allowedRoles);
  form.add(submit);
  form.add(new AttributesPanel("String_Node_Str",membershipTO,form));
  form.add(new DerivedAttributesPanel("String_Node_Str",membershipTO));
  form.add(new VirtualAttributesPanel("String_Node_Str",membershipTO));
  add(form);
}
Program: 61050
Project: 61050
Buggy source:
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  userTO.removeMembership(membershipTO);
  userTO.addMembership(membershipTO);
  window.close(target);
}

Fixed version (ground truth):
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  ((UserTO)bean).removeMembership(membershipTO);
  ((UserTO)bean).addMembership(membershipTO);
  ((BaseModalPage)pageRef.getPage()).setBean(bean);
  window.close(target);
}
Program: 61053
Project: 61053
Buggy source:
@Override public Page createPage(){
  MembershipModalPage window=new MembershipModalPage(membershipWin,membershipTO,userTO);
  return window;
}

Fixed version (ground truth):
@Override public Page createPage(){
  return new MembershipModalPage(getPage().getPageReference(),membershipWin,membershipTO);
}
Program: 61054
Project: 61054
Buggy source:
@Override public void onClose(final AjaxRequestTarget target){
  target.add(container);
}

Fixed version (ground truth):
@Override public void onClose(final AjaxRequestTarget target){
  final AbstractBaseBean bean=((UserModalPage)getPage()).getBean();
  userTO.setMemberships(((UserTO)bean).getMemberships());
  target.add(container);
}
Program: 61055
Project: 61055
Buggy source:
@Override protected void populateItem(final ListItem item){
  final MembershipTO membershipTO=(MembershipTO)item.getDefaultModelObject();
  item.add(new Label("String_Node_Str",new Model(membershipTO.getRoleId())));
  item.add(new Label("String_Node_Str",new Model(getRoleName(membershipTO.getRoleId(),roles))));
  AjaxLink editLink=new IndicatingAjaxLink("String_Node_Str"){
    @Override public void onClick(    AjaxRequestTarget target){
      membershipWin.setPageCreator(new ModalWindow.PageCreator(){
        @Override public Page createPage(){
          MembershipModalPage window=new MembershipModalPage(membershipWin,membershipTO,userTO);
          return window;
        }
      }
);
      membershipWin.show(target);
    }
  }
;
  item.add(editLink);
  AjaxLink deleteLink=new IndicatingDeleteOnConfirmAjaxLink("String_Node_Str"){
    @Override public void onClick(    final AjaxRequestTarget target){
      userTO.removeMembership(membershipTO);
      target.add(membershipsContainer);
    }
  }
;
  item.add(deleteLink);
}

Fixed version (ground truth):
@Override protected void populateItem(final ListItem item){
  final MembershipTO membershipTO=(MembershipTO)item.getDefaultModelObject();
  item.add(new Label("String_Node_Str",new Model(membershipTO.getRoleId())));
  item.add(new Label("String_Node_Str",new Model(getRoleName(membershipTO.getRoleId(),roles))));
  AjaxLink editLink=new IndicatingAjaxLink("String_Node_Str"){
    private static final long serialVersionUID=-7978723352517770644L;
    @Override public void onClick(    AjaxRequestTarget target){
      membershipWin.setPageCreator(new ModalWindow.PageCreator(){
        private static final long serialVersionUID=-7834632442532690940L;
        @Override public Page createPage(){
          return new MembershipModalPage(getPage().getPageReference(),membershipWin,membershipTO);
        }
      }
);
      membershipWin.show(target);
    }
  }
;
  item.add(editLink);
  AjaxLink deleteLink=new IndicatingDeleteOnConfirmAjaxLink("String_Node_Str"){
    private static final long serialVersionUID=-7978723352517770644L;
    @Override public void onClick(    final AjaxRequestTarget target){
      userTO.removeMembership(membershipTO);
      target.add(membershipsContainer);
    }
  }
;
  item.add(deleteLink);
}
Program: 61056
Project: 61056
Buggy source:
@Override protected void onNodeLinkClicked(final Object node,final BaseTree tree,final AjaxRequestTarget target){
  final RoleTO roleTO=(RoleTO)((DefaultMutableTreeNode)node).getUserObject();
  membershipWin.setPageCreator(new ModalWindow.PageCreator(){
    private MembershipTO membershipTO;
    @Override public Page createPage(){
      membershipTO=new MembershipTO();
      membershipTO.setRoleId(roleTO.getId());
      return new MembershipModalPage(membershipWin,membershipTO,userTO);
    }
  }
);
  membershipWin.show(target);
}

Fixed version (ground truth):
@Override protected void onNodeLinkClicked(final Object node,final BaseTree tree,final AjaxRequestTarget target){
  final RoleTO roleTO=(RoleTO)((DefaultMutableTreeNode)node).getUserObject();
  membershipWin.setPageCreator(new ModalWindow.PageCreator(){
    private static final long serialVersionUID=7661763358801821185L;
    private MembershipTO membershipTO;
    @Override public Page createPage(){
      membershipTO=new MembershipTO();
      membershipTO.setRoleId(roleTO.getId());
      return new MembershipModalPage(getPage().getPageReference(),membershipWin,membershipTO);
    }
  }
);
  membershipWin.show(target);
}
Program: 61057
Project: 61057
Buggy source:
private void setWindowClosedCallback(final ModalWindow window,final WebMarkupContainer container){
  window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    @Override public void onClose(    final AjaxRequestTarget target){
      target.add(container);
    }
  }
);
}

Fixed version (ground truth):
private void setWindowClosedCallback(final ModalWindow window,final WebMarkupContainer container){
  window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    private static final long serialVersionUID=8804221891699487139L;
    @Override public void onClose(    final AjaxRequestTarget target){
      final AbstractBaseBean bean=((UserModalPage)getPage()).getBean();
      userTO.setMemberships(((UserTO)bean).getMemberships());
      target.add(container);
    }
  }
);
}
Program: 61059
Project: 61059
Buggy source:
@Test public final void create(){
  SchedTaskTO task=new SchedTaskTO();
  task.setJobClassName(SampleJob.class.getName());
  SchedTaskTO actual=restTemplate.postForObject(BASE_URL + "String_Node_Str",task,SchedTaskTO.class);
  assertNotNull(actual);
  task=restTemplate.getForObject(BASE_URL + "String_Node_Str",SchedTaskTO.class,actual.getId());
  assertNotNull(task);
  assertEquals(actual.getId(),task.getId());
  assertEquals(actual.getJobClassName(),task.getJobClassName());
}

Fixed version (ground truth):
@Test public final void create(){
  SyncTaskTO task=new SyncTaskTO();
  task.setResource("String_Node_Str");
  task.addDefaultResource("String_Node_Str");
  task.addDefaultRole(8L);
  SyncTaskTO actual=restTemplate.postForObject(BASE_URL + "String_Node_Str",task,SyncTaskTO.class);
  assertNotNull(actual);
  task=restTemplate.getForObject(BASE_URL + "String_Node_Str",SyncTaskTO.class,actual.getId());
  assertNotNull(task);
  assertEquals(actual.getId(),task.getId());
  assertEquals(actual.getJobClassName(),task.getJobClassName());
}
Program: 61060
Project: 61060
Buggy source:
@Test public final void update(){
  SchedTaskTO task=restTemplate.getForObject(BASE_URL + "String_Node_Str",SchedTaskTO.class,4);
  assertNotNull(task);
  SchedTaskMod taskMod=new SchedTaskMod();
  taskMod.setId(4);
  taskMod.setCronExpression(null);
  SchedTaskTO actual=restTemplate.postForObject(BASE_URL + "String_Node_Str",taskMod,SchedTaskTO.class);
  assertNotNull(actual);
  assertEquals(task.getId(),actual.getId());
  assertNull(actual.getCronExpression());
}

Fixed version (ground truth):
@Test public final void update(){
  SchedTaskTO task=restTemplate.getForObject(BASE_URL + "String_Node_Str",SchedTaskTO.class,5);
  assertNotNull(task);
  SchedTaskMod taskMod=new SchedTaskMod();
  taskMod.setId(5);
  taskMod.setCronExpression(null);
  SchedTaskTO actual=restTemplate.postForObject(BASE_URL + "String_Node_Str",taskMod,SchedTaskTO.class);
  assertNotNull(actual);
  assertEquals(task.getId(),actual.getId());
  assertNull(actual.getCronExpression());
}
Program: 61061
Project: 61061
Buggy source:
protected TaskUtil getTaskUtil(final TaskTO taskTO){
  TaskUtil result=(taskTO instanceof PropagationTaskTO) ? TaskUtil.PROPAGATION : (taskTO instanceof SchedTaskTO) ? TaskUtil.SCHED : (taskTO instanceof SyncTaskTO) ? TaskUtil.SYNC : null;
  if (result == null) {
    LOG.error("String_Node_Str" + taskTO.getClass().getName());
    throw new TypeMismatchException(taskTO.getClass().getName(),TaskUtil.class);
  }
  return result;
}

Fixed version (ground truth):
protected TaskUtil getTaskUtil(final TaskTO taskTO){
  TaskUtil result=(taskTO instanceof PropagationTaskTO) ? TaskUtil.PROPAGATION : (taskTO instanceof SyncTaskTO) ? TaskUtil.SYNC : (taskTO instanceof SchedTaskTO) ? TaskUtil.SCHED : null;
  if (result == null) {
    LOG.error("String_Node_Str" + taskTO.getClass().getName());
    throw new TypeMismatchException(taskTO.getClass().getName(),TaskUtil.class);
  }
  return result;
}
Program: 61062
Project: 61062
Buggy source:
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  ConnInstanceTO connector=(ConnInstanceTO)form.getDefaultModelObject();
  connector.setBundleName(bundle.getModelValue());
  if (!selectedCapabilities.isEmpty()) {
    connector.setCapabilities(EnumSet.copyOf(selectedCapabilities));
  }
 else {
    connector.setCapabilities(EnumSet.noneOf(ConnectorCapability.class));
  }
  try {
    if (createFlag) {
      restClient.create(connector);
    }
 else {
      restClient.update(connector);
    }
    basePage.setOperationResult(true);
    window.close(target);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    basePage.setOperationResult(false);
    LOG.error("String_Node_Str" + connector);
  }
}

Fixed version (ground truth):
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  ConnInstanceTO connector=(ConnInstanceTO)form.getDefaultModelObject();
  connector.setBundleName(bundle.getModelValue().substring(0,bundle.getModelValue().lastIndexOf('#')));
  if (!selectedCapabilities.isEmpty()) {
    connector.setCapabilities(EnumSet.copyOf(selectedCapabilities));
  }
 else {
    connector.setCapabilities(EnumSet.noneOf(ConnectorCapability.class));
  }
  try {
    if (createFlag) {
      restClient.create(connector);
    }
 else {
      restClient.update(connector);
    }
    basePage.setOperationResult(true);
    window.close(target);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    basePage.setOperationResult(false);
    LOG.error("String_Node_Str" + connector);
  }
}
Program: 61064
Project: 61064
Buggy source:
@Override protected void onUpdate(AjaxRequestTarget art){
  if (resetToken.getModelObject()) {
    connectorTO.setSyncToken(null);
  }
}

Fixed version (ground truth):
@Override protected void onUpdate(final AjaxRequestTarget art){
  if (resetToken.getModelObject()) {
    connectorTO.setSyncToken(null);
  }
}
Program: 61065
Project: 61065
Buggy source:
public final boolean checkValidity(){
  return name != null;
}

Fixed version (ground truth):
public final boolean checkValidity(){
  return resourceName != null;
}
Program: 61067
Project: 61067
Buggy source:
@Override public <T extends Task>T find(final Long id){
  return (T)entityManager.find(Task.class,id);
}

Fixed version (ground truth):
@Override @Transactional(readOnly=true) public <T extends Task>T find(final Long id){
  return (T)entityManager.find(Task.class,id);
}
Program: 61070
Project: 61070
Buggy source:
@Override protected List<String> load(){
  return schemaRestClient.getDerivedSchemaNames("String_Node_Str");
}

Fixed version (ground truth):
@Override protected List<String> load(){
  return schemaRestClient.getVirtualSchemaNames("String_Node_Str");
}
Program: 61072
Project: 61072
Buggy source:
public SourceMappingTypesDropDownChoice(final String id,final PropertyModel<SourceMappingType> model,final IModel imodel,final DropDownChoice<String> chooserToPopulate){
  super(id,model,imodel);
  add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
    @Override protected void onUpdate(    final AjaxRequestTarget target){
      chooserToPopulate.setChoices(new LoadableDetachableModel<List<String>>(){
        @Override protected List<String> load(){
          List<String> result;
switch (model.getObject()) {
case UserSchema:
            result=uSchemaAttrNames;
          break;
case UserDerivedSchema:
        result=uDerSchemaAttrNames;
      break;
case RoleSchema:
    result=rSchemaAttrNames;
  break;
case RoleDerivedSchema:
result=rDerSchemaAttrNames;
break;
case MembershipSchema:
result=mSchemaAttrNames;
break;
case MembershipDerivedSchema:
result=mDerSchemaAttrNames;
break;
case SyncopeUserId:
case Password:
default :
result=Collections.EMPTY_LIST;
}
return result;
}
}
);
target.addComponent(chooserToPopulate);
target.addComponent(mappingContainer);
}
}
);
}

Fixed version (ground truth):
public SourceMappingTypesDropDownChoice(final String id,final PropertyModel<SourceMappingType> model,final IModel imodel,final DropDownChoice<String> chooserToPopulate){
  super(id,model,imodel);
  add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
    @Override protected void onUpdate(    final AjaxRequestTarget target){
      chooserToPopulate.setChoices(new LoadableDetachableModel<List<String>>(){
        @Override protected List<String> load(){
          List<String> result;
switch (model.getObject()) {
case UserSchema:
            result=uSchemaAttrNames;
          break;
case UserDerivedSchema:
        result=uDerSchemaAttrNames;
      break;
case UserVirtualSchema:
    result=uVirSchemaAttrNames;
  break;
case RoleSchema:
result=rSchemaAttrNames;
break;
case RoleDerivedSchema:
result=rDerSchemaAttrNames;
break;
case RoleVirtualSchema:
result=rVirSchemaAttrNames;
break;
case MembershipSchema:
result=mSchemaAttrNames;
break;
case MembershipDerivedSchema:
result=mDerSchemaAttrNames;
break;
case MembershipVirtualSchema:
result=mVirSchemaAttrNames;
break;
case SyncopeUserId:
case Password:
default :
result=Collections.EMPTY_LIST;
}
return result;
}
}
);
target.addComponent(chooserToPopulate);
target.addComponent(mappingContainer);
}
}
);
}
Program: 61073
Project: 61073
Buggy source:
@Override protected List<String> load(){
  List<String> result;
switch (model.getObject()) {
case UserSchema:
    result=uSchemaAttrNames;
  break;
case UserDerivedSchema:
result=uDerSchemaAttrNames;
break;
case RoleSchema:
result=rSchemaAttrNames;
break;
case RoleDerivedSchema:
result=rDerSchemaAttrNames;
break;
case MembershipSchema:
result=mSchemaAttrNames;
break;
case MembershipDerivedSchema:
result=mDerSchemaAttrNames;
break;
case SyncopeUserId:
case Password:
default :
result=Collections.EMPTY_LIST;
}
return result;
}

Fixed version (ground truth):
@Override protected List<String> load(){
  List<String> result;
switch (model.getObject()) {
case UserSchema:
    result=uSchemaAttrNames;
  break;
case UserDerivedSchema:
result=uDerSchemaAttrNames;
break;
case UserVirtualSchema:
result=uVirSchemaAttrNames;
break;
case RoleSchema:
result=rSchemaAttrNames;
break;
case RoleDerivedSchema:
result=rDerSchemaAttrNames;
break;
case RoleVirtualSchema:
result=rVirSchemaAttrNames;
break;
case MembershipSchema:
result=mSchemaAttrNames;
break;
case MembershipDerivedSchema:
result=mDerSchemaAttrNames;
break;
case MembershipVirtualSchema:
result=mVirSchemaAttrNames;
break;
case SyncopeUserId:
case Password:
default :
result=Collections.EMPTY_LIST;
}
return result;
}
Program: 61075
Project: 61075
Buggy source:
@Override protected void onUpdate(final AjaxRequestTarget target){
  chooserToPopulate.setChoices(new LoadableDetachableModel<List<String>>(){
    @Override protected List<String> load(){
      List<String> result;
switch (model.getObject()) {
case UserSchema:
        result=uSchemaAttrNames;
      break;
case UserDerivedSchema:
    result=uDerSchemaAttrNames;
  break;
case RoleSchema:
result=rSchemaAttrNames;
break;
case RoleDerivedSchema:
result=rDerSchemaAttrNames;
break;
case MembershipSchema:
result=mSchemaAttrNames;
break;
case MembershipDerivedSchema:
result=mDerSchemaAttrNames;
break;
case SyncopeUserId:
case Password:
default :
result=Collections.EMPTY_LIST;
}
return result;
}
}
);
target.addComponent(chooserToPopulate);
target.addComponent(mappingContainer);
}

Fixed version (ground truth):
@Override protected void onUpdate(final AjaxRequestTarget target){
  chooserToPopulate.setChoices(new LoadableDetachableModel<List<String>>(){
    @Override protected List<String> load(){
      List<String> result;
switch (model.getObject()) {
case UserSchema:
        result=uSchemaAttrNames;
      break;
case UserDerivedSchema:
    result=uDerSchemaAttrNames;
  break;
case UserVirtualSchema:
result=uVirSchemaAttrNames;
break;
case RoleSchema:
result=rSchemaAttrNames;
break;
case RoleDerivedSchema:
result=rDerSchemaAttrNames;
break;
case RoleVirtualSchema:
result=rVirSchemaAttrNames;
break;
case MembershipSchema:
result=mSchemaAttrNames;
break;
case MembershipDerivedSchema:
result=mDerSchemaAttrNames;
break;
case MembershipVirtualSchema:
result=mVirSchemaAttrNames;
break;
case SyncopeUserId:
case Password:
default :
result=Collections.EMPTY_LIST;
}
return result;
}
}
);
target.addComponent(chooserToPopulate);
target.addComponent(mappingContainer);
}
Program: 61076
Project: 61076
Buggy source:
@Override protected void populateItem(final ListItem<ConnConfProperty> item){
  ConnConfProperty property=item.getModelObject();
  item.add(new Label("String_Node_Str",property.getSchema().getName()));
  item.add(new AjaxTextFieldPanel("String_Node_Str",property.getSchema().getName(),new PropertyModel<String>(property,"String_Node_Str"),property.getSchema().isRequired()));
  connectorTO.getConfiguration().add(property);
}

Fixed version (ground truth):
@Override protected void populateItem(final ListItem<ConnConfProperty> item){
  ConnConfProperty property=item.getModelObject();
  item.add(new Label("String_Node_Str",property.getSchema().getDisplayName() == null || property.getSchema().getDisplayName().isEmpty() ? property.getSchema().getName() : property.getSchema().getDisplayName()));
  item.add(new AjaxTextFieldPanel("String_Node_Str",property.getSchema().getName(),new PropertyModel<String>(property,"String_Node_Str"),property.getSchema().isRequired(),property.getSchema().getHelpMessage()));
  connectorTO.getConfiguration().add(property);
}
Program: 61077
Project: 61077
Buggy source:
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  ConnInstanceTO connector=(ConnInstanceTO)form.getDefaultModelObject();
  connector.setBundleName(bundle.getModelValue());
  connector.setCapabilities(new HashSet<ConnectorCapability>(selectedCapabilities));
  try {
    if (createFlag) {
      restClient.create(connector);
    }
 else {
      restClient.update(connector);
    }
    basePage.setOperationResult(true);
    window.close(target);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    basePage.setOperationResult(false);
    LOG.error("String_Node_Str" + connector);
  }
}

Fixed version (ground truth):
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  ConnInstanceTO connector=(ConnInstanceTO)form.getDefaultModelObject();
  connector.setBundleName(bundle.getModelValue());
  if (!selectedCapabilities.isEmpty()) {
    connector.setCapabilities(EnumSet.copyOf(selectedCapabilities));
  }
 else {
    connector.setCapabilities(EnumSet.noneOf(ConnectorCapability.class));
  }
  try {
    if (createFlag) {
      restClient.create(connector);
    }
 else {
      restClient.update(connector);
    }
    basePage.setOperationResult(true);
    window.close(target);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
    basePage.setOperationResult(false);
    LOG.error("String_Node_Str" + connector);
  }
}
Program: 61080
Project: 61080
Buggy source:
public ConnectorInfoManager getConnectorManager() throws NotFoundException {
  SyncopeConf connectorBundleDir=null;
  try {
    connectorBundleDir=confDAO.find("String_Node_Str");
  }
 catch (  MissingConfKeyException e) {
    LOG.error("String_Node_Str",e);
  }
  File bundleDirectory=new File(connectorBundleDir.getValue());
  String[] bundleFiles=bundleDirectory.list();
  if (bundleFiles == null) {
    throw new NotFoundException("String_Node_Str" + connectorBundleDir.getValue());
  }
  List<URL> bundleFileURLs=new ArrayList<URL>();
  for (  String file : bundleFiles) {
    try {
      bundleFileURLs.add(IOUtil.makeURL(bundleDirectory,file));
    }
 catch (    Exception ignore) {
      if (LOG.isDebugEnabled()) {
        LOG.debug(bundleDirectory.toString() + "String_Node_Str" + file+ "String_Node_Str"+ "String_Node_Str",ignore);
      }
    }
  }
  if (bundleFileURLs.isEmpty()) {
    throw new NotFoundException("String_Node_Str" + connectorBundleDir.getValue());
  }
  LOG.debug("String_Node_Str",bundleFileURLs);
  ConnectorInfoManager manager=ConnectorInfoManagerFactory.getInstance().getLocalManager(bundleFileURLs.toArray(new URL[0]));
  if (manager == null) {
    throw new NotFoundException("String_Node_Str");
  }
  return manager;
}

Fixed version (ground truth):
public ConnectorInfoManager getConnectorManager() throws NotFoundException, MissingConfKeyException {
  SyncopeConf connectorBundleDir=confDAO.find("String_Node_Str");
  File bundleDirectory=new File(connectorBundleDir.getValue());
  String[] bundleFiles=bundleDirectory.list();
  if (bundleFiles == null) {
    throw new NotFoundException("String_Node_Str" + connectorBundleDir.getValue());
  }
  List<URL> bundleFileURLs=new ArrayList<URL>();
  for (  String file : bundleFiles) {
    try {
      bundleFileURLs.add(IOUtil.makeURL(bundleDirectory,file));
    }
 catch (    Exception ignore) {
      if (LOG.isDebugEnabled()) {
        LOG.debug(bundleDirectory.toString() + "String_Node_Str" + file+ "String_Node_Str"+ "String_Node_Str",ignore);
      }
    }
  }
  if (bundleFileURLs.isEmpty()) {
    throw new NotFoundException("String_Node_Str" + connectorBundleDir.getValue());
  }
  LOG.debug("String_Node_Str",bundleFileURLs);
  ConnectorInfoManager manager=ConnectorInfoManagerFactory.getInstance().getLocalManager(bundleFileURLs.toArray(new URL[0]));
  if (manager == null) {
    throw new NotFoundException("String_Node_Str");
  }
  return manager;
}
Program: 61081
Project: 61081
Buggy source:
/** 
 * @see http://commons.apache.org/jexl/reference/index.html
 * @param attributes the set of attributes against which evaluate thisderived attribute
 * @return the value of this derived attribute
 */
public String getValue(final Collection<? extends AbstractAttr> attributes){
  ConfigurableApplicationContext context=ApplicationContextManager.getApplicationContext();
  JexlUtil jexlUtil=(JexlUtil)context.getBean("String_Node_Str");
  JexlContext jexlContext=new MapContext();
  jexlContext=jexlUtil.addAttributesToContext(attributes,jexlContext);
  return jexlUtil.evaluateWithAttributes(getDerivedSchema().getExpression(),jexlContext);
}

Fixed version (ground truth):
/** 
 * @see http://commons.apache.org/jexl/reference/index.html
 * @param attributes the set of attributes against which evaluate thisderived attribute
 * @return the value of this derived attribute
 */
public String getValue(final Collection<? extends AbstractAttr> attributes){
  ConfigurableApplicationContext context=ApplicationContextManager.getApplicationContext();
  JexlUtil jexlUtil=context.getBean(JexlUtil.class);
  JexlContext jexlContext=jexlUtil.addAttributesToContext(attributes,null);
  return jexlUtil.evaluate(getDerivedSchema().getExpression(),jexlContext);
}
Program: 61082
Project: 61082
Buggy source:
/** 
 * @see http://commons.apache.org/jexl/reference/index.html
 * @return the value of this virtual attribute
 */
public List<String> getValues(){
  LOG.debug("String_Node_Str",new Object[]{getOwner(),getVirtualSchema().getName()});
  if (values != null) {
    return values;
  }
  ConfigurableApplicationContext context=ApplicationContextManager.getApplicationContext();
  PropagationManager propagationManager=(PropagationManager)context.getBean("String_Node_Str");
  final Set<String> retrievedValues=propagationManager.getObjectAttributeValue(getOwner(),getVirtualSchema().getName(),SourceMappingType.UserVirtualSchema);
  LOG.debug("String_Node_Str",retrievedValues);
  try {
    return new ArrayList<String>(retrievedValues);
  }
 catch (  Throwable t) {
    return null;
  }
}

Fixed version (ground truth):
public abstract List<String> getValues();
Program: 61083
Project: 61083
Buggy source:
public Set<Attribute> getAttributes(){
  Set<Attribute> result=Collections.EMPTY_SET;
  ConfigurableApplicationContext context=ApplicationContextManager.getApplicationContext();
  XStream xStream=(XStream)context.getBean("String_Node_Str");
  try {
    result=(Set<Attribute>)xStream.fromXML(URLDecoder.decode(xmlAttributes,"String_Node_Str"));
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",t);
  }
  return result;
}

Fixed version (ground truth):
public Set<Attribute> getAttributes(){
  Set<Attribute> result=Collections.EMPTY_SET;
  ConfigurableApplicationContext context=ApplicationContextManager.getApplicationContext();
  XStream xStream=context.getBean(XStream.class);
  try {
    result=(Set<Attribute>)xStream.fromXML(URLDecoder.decode(xmlAttributes,"String_Node_Str"));
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",t);
  }
  return result;
}
Program: 61084
Project: 61084
Buggy source:
public void setAttributes(final Set<Attribute> attributes){
  ConfigurableApplicationContext context=ApplicationContextManager.getApplicationContext();
  XStream xStream=(XStream)context.getBean("String_Node_Str");
  try {
    xmlAttributes=URLEncoder.encode(xStream.toXML(attributes),"String_Node_Str");
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",t);
  }
}

Fixed version (ground truth):
public void setAttributes(final Set<Attribute> attributes){
  ConfigurableApplicationContext context=ApplicationContextManager.getApplicationContext();
  XStream xStream=context.getBean(XStream.class);
  try {
    xmlAttributes=URLEncoder.encode(xStream.toXML(attributes),"String_Node_Str");
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",t);
  }
}
Program: 61085
Project: 61085
Buggy source:
public Membership(){
  attributes=new ArrayList<MAttr>();
  derivedAttributes=new ArrayList<MDerAttr>();
  virtualAttributes=new ArrayList<MVirAttr>();
  targetResources=Collections.EMPTY_SET;
}

Fixed version (ground truth):
public Membership(){
  super();
  attributes=new ArrayList<MAttr>();
  derivedAttributes=new ArrayList<MDerAttr>();
  virtualAttributes=new ArrayList<MVirAttr>();
  targetResources=Collections.EMPTY_SET;
}
Program: 61086
Project: 61086
Buggy source:
public Date getNextExec(){
  return nextExec;
}

Fixed version (ground truth):
public Date getNextExec(){
  return new Date(nextExec.getTime());
}
Program: 61087
Project: 61087
Buggy source:
public void setNextExec(Date nextExec){
  this.nextExec=nextExec;
}

Fixed version (ground truth):
public void setNextExec(Date nextExec){
  this.nextExec=new Date(nextExec.getTime());
}
Program: 61088
Project: 61088
Buggy source:
public void setLastExec(Date lastExec){
  this.lastExec=lastExec;
}

Fixed version (ground truth):
public void setLastExec(Date lastExec){
  this.lastExec=new Date(lastExec.getTime());
}
Program: 61089
Project: 61089
Buggy source:
public Date getLastExec(){
  return lastExec;
}

Fixed version (ground truth):
public Date getLastExec(){
  return new Date(lastExec.getTime());
}
Program: 61090
Project: 61090
Buggy source:
@Override public <T extends Task>List<T> findAll(final int page,final int itemsPerPage,final Class<T> reference){
  final Query query=entityManager.createQuery("String_Node_Str" + reference.getSimpleName() + "String_Node_Str");
  query.setFirstResult(itemsPerPage * (page <= 0 ? 0 : page - 1));
  if (itemsPerPage > 0) {
    query.setMaxResults(itemsPerPage);
  }
  return query.getResultList();
}

Fixed version (ground truth):
@Override public <T extends Task>List<T> findAll(final int page,final int itemsPerPage,final Class<T> reference){
  final Query query=entityManager.createQuery(buildfindAllQuery(reference).toString());
  query.setFirstResult(itemsPerPage * (page <= 0 ? 0 : page - 1));
  if (itemsPerPage > 0) {
    query.setMaxResults(itemsPerPage);
  }
  return query.getResultList();
}
Program: 61091
Project: 61091
Buggy source:
@Test public final void findAll(){
  List<PropagationTask> list=taskDAO.findAll(PropagationTask.class);
  assertEquals(3,list.size());
}

Fixed version (ground truth):
@Test public final void findAll(){
  List<PropagationTask> plist=taskDAO.findAll(PropagationTask.class);
  assertEquals(3,plist.size());
  List<SchedTask> sclist=taskDAO.findAll(SchedTask.class);
  assertEquals(1,sclist.size());
  List<SyncTask> sylist=taskDAO.findAll(SyncTask.class);
  assertEquals(1,sylist.size());
}
Program: 61092
Project: 61092
Buggy source:
@Test public final void saveSyncTask(){
  TargetResource resource=resourceDAO.find("String_Node_Str");
  assertNotNull(resource);
  SyncTask task=new SyncTask();
  task.addDefaultResource(resource);
  task.setCronExpression("String_Node_Str");
  InvalidEntityException exception=null;
  try {
    taskDAO.save(task);
  }
 catch (  InvalidEntityException e) {
    exception=e;
  }
  assertNotNull(exception);
  task.setCronExpression(null);
  task=taskDAO.save(task);
  assertNotNull(task);
  SyncTask actual=taskDAO.find(task.getId());
  assertEquals(task,actual);
}

Fixed version (ground truth):
@Test public final void saveSyncTask(){
  TargetResource resource=resourceDAO.find("String_Node_Str");
  assertNotNull(resource);
  SyncTask task=new SyncTask();
  task.addDefaultResource(resource);
  task.setCronExpression("String_Node_Str");
  InvalidEntityException exception=null;
  try {
    taskDAO.save(task);
  }
 catch (  InvalidEntityException e) {
    exception=e;
  }
  assertNotNull(exception);
  task.setCronExpression(null);
  exception=null;
  try {
    taskDAO.save(task);
  }
 catch (  InvalidEntityException e) {
    exception=e;
  }
  assertNotNull(exception);
  task.setResource(resource);
  task=taskDAO.save(task);
  assertNotNull(task);
  SyncTask actual=taskDAO.find(task.getId());
  assertEquals(task,actual);
}
Program: 61093
Project: 61093
Buggy source:
/** 
 * @see http://commons.apache.org/jexl/reference/index.html
 * @param attributes the set of attributes against which evaluate thisderived attribute
 * @return the value of this derived attribute
 */
public String getValue(final Collection<? extends AbstractAttr> attributes){
  ConfigurableApplicationContext context=ApplicationContextManager.getApplicationContext();
  JexlUtil jexlUtil=(JexlUtil)context.getBean("String_Node_Str");
  return jexlUtil.evaluateWithAttributes(getDerivedSchema().getExpression(),attributes);
}

Fixed version (ground truth):
/** 
 * @see http://commons.apache.org/jexl/reference/index.html
 * @param attributes the set of attributes against which evaluate thisderived attribute
 * @return the value of this derived attribute
 */
public String getValue(final Collection<? extends AbstractAttr> attributes){
  ConfigurableApplicationContext context=ApplicationContextManager.getApplicationContext();
  JexlUtil jexlUtil=(JexlUtil)context.getBean("String_Node_Str");
  JexlContext jexlContext=new MapContext();
  jexlContext=jexlUtil.addAttributesToContext(attributes,jexlContext);
  return jexlUtil.evaluateWithAttributes(getDerivedSchema().getExpression(),jexlContext);
}
Program: 61097
Project: 61097
Buggy source:
@Override public Serializable getObject(){
  DateFormat formatter=new SimpleDateFormat(schemaTO.getConversionPattern());
  Date date=new Date();
  try {
    String dateValue=(String)item.getModelObject();
    formatter=new SimpleDateFormat(schemaTO.getConversionPattern());
    if (!dateValue.equals("String_Node_Str")) {
      date=formatter.parse(dateValue);
    }
 else {
      date=null;
    }
  }
 catch (  ParseException e) {
    LOG.error("String_Node_Str",e);
  }
  return date;
}

Fixed version (ground truth):
@Override public Serializable getObject(){
  return (String)item.getModelObject();
}
Program: 61098
Project: 61098
Buggy source:
@Override public void setObject(Serializable object){
  Date date=(Date)object;
  Format formatter=new SimpleDateFormat(schemaTO.getConversionPattern());
  String val=formatter.format(date);
  item.setModelObject(val);
}

Fixed version (ground truth):
@Override public void setObject(Serializable object){
  item.setModelObject((String)object);
}