nus-yam/ex-repair huggingface dataset:
Program: 61164
Project: 61164
Buggy source:
@RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public ResourceTO create(final HttpServletResponse response,final @RequestBody ResourceTO resourceTO) throws SyncopeClientCompositeErrorException, NotFoundException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str");
  }
  SyncopeClientCompositeErrorException scce=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
  if (resourceTO == null) {
    LOG.error("String_Node_Str");
    throw new NotFoundException("String_Node_Str");
  }
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str");
  }
  if (resourceDAO.find(resourceTO.getName()) != null) {
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.DuplicateUniqueValue);
    ex.addElement(resourceTO.getName());
    scce.addException(ex);
    throw scce;
  }
  TargetResource resource=binder.getResource(resourceTO);
  if (resource == null) {
    LOG.error("String_Node_Str");
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.Unknown);
    scce.addException(ex);
    throw scce;
  }
  try {
    resource=resourceDAO.save(resource);
  }
 catch (  InvalidEntityException e) {
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.InvalidSchemaMapping);
    scce.addException(ex);
    throw scce;
  }
  response.setStatus(HttpServletResponse.SC_CREATED);
  return binder.getResourceTO(resource);
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public ResourceTO create(final HttpServletResponse response,final @RequestBody ResourceTO resourceTO) throws SyncopeClientCompositeErrorException, NotFoundException {
  LOG.debug("String_Node_Str",resourceTO);
  SyncopeClientCompositeErrorException scce=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
  if (resourceTO == null) {
    LOG.error("String_Node_Str");
    throw new NotFoundException("String_Node_Str");
  }
  LOG.debug("String_Node_Str");
  if (resourceDAO.find(resourceTO.getName()) != null) {
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.DuplicateUniqueValue);
    ex.addElement(resourceTO.getName());
    scce.addException(ex);
    throw scce;
  }
  TargetResource resource=binder.getResource(resourceTO);
  if (resource == null) {
    LOG.error("String_Node_Str");
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.Unknown);
    scce.addException(ex);
    throw scce;
  }
  try {
    resource=resourceDAO.save(resource);
  }
 catch (  InvalidEntityException e) {
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.InvalidSchemaMapping);
    scce.addException(ex);
    throw scce;
  }
  response.setStatus(HttpServletResponse.SC_CREATED);
  return binder.getResourceTO(resource);
}
Program: 61165
Project: 61165
Buggy source:
@RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public ResourceTO update(final HttpServletResponse response,final @RequestBody ResourceTO resourceTO) throws SyncopeClientCompositeErrorException, NotFoundException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str");
  }
  TargetResource resource=null;
  if (resourceTO != null && resourceTO.getName() != null) {
    resource=resourceDAO.find(resourceTO.getName());
  }
  if (resource == null) {
    LOG.error("String_Node_Str" + resourceTO.getName());
    throw new NotFoundException("String_Node_Str" + resourceTO.getName() + "String_Node_Str");
  }
  SyncopeClientCompositeErrorException scce=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
  LOG.debug("String_Node_Str");
  resourceDAO.deleteAllMappings(resource);
  resource=binder.getResource(resource,resourceTO);
  if (resource == null) {
    LOG.error("String_Node_Str");
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.Unknown);
    scce.addException(ex);
    throw scce;
  }
  try {
    resource=resourceDAO.save(resource);
  }
 catch (  InvalidEntityException e) {
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.InvalidSchemaMapping);
    scce.addException(ex);
    throw scce;
  }
  return binder.getResourceTO(resource);
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public ResourceTO update(final HttpServletResponse response,final @RequestBody ResourceTO resourceTO) throws SyncopeClientCompositeErrorException, NotFoundException {
  LOG.debug("String_Node_Str",resourceTO);
  TargetResource resource=null;
  if (resourceTO != null && resourceTO.getName() != null) {
    resource=resourceDAO.find(resourceTO.getName());
  }
  if (resource == null) {
    LOG.error("String_Node_Str" + resourceTO.getName());
    throw new NotFoundException("String_Node_Str" + resourceTO.getName() + "String_Node_Str");
  }
  SyncopeClientCompositeErrorException scce=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
  LOG.debug("String_Node_Str");
  resourceDAO.deleteAllMappings(resource);
  resource=binder.getResource(resource,resourceTO);
  if (resource == null) {
    LOG.error("String_Node_Str");
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.Unknown);
    scce.addException(ex);
    throw scce;
  }
  try {
    resource=resourceDAO.save(resource);
  }
 catch (  InvalidEntityException e) {
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.InvalidSchemaMapping);
    scce.addException(ex);
    throw scce;
  }
  return binder.getResourceTO(resource);
}
Program: 61166
Project: 61166
Buggy source:
private void fillAttribute(final List<String> values,final AttributableUtil attributableUtil,final AbstractSchema schema,final AbstractAttr attribute,final SyncopeClientException invalidValues){
  List<String> valuesProvided=schema.isMultivalue() ? values : (values.isEmpty() ? Collections.EMPTY_LIST : Collections.singletonList(values.iterator().next()));
  for (  String value : valuesProvided) {
    if (value == null || value.isEmpty()) {
      LOG.debug("String_Node_Str",schema.getName());
    }
 else {
      try {
        attribute.addValue(value,attributableUtil);
      }
 catch (      ValidationException e) {
        LOG.error("String_Node_Str" + schema.getName() + "String_Node_Str"+ value,e);
        invalidValues.addElement(schema.getName() + "String_Node_Str" + value);
      }
    }
  }
}

Fixed version (ground truth):
protected void fillAttribute(final List<String> values,final AttributableUtil attributableUtil,final AbstractSchema schema,final AbstractAttr attribute,final SyncopeClientException invalidValues){
  List<String> valuesProvided=schema.isMultivalue() ? values : (values.isEmpty() ? Collections.EMPTY_LIST : Collections.singletonList(values.iterator().next()));
  for (  String value : valuesProvided) {
    if (value == null || value.isEmpty()) {
      LOG.debug("String_Node_Str",schema.getName());
    }
 else {
      try {
        attribute.addValue(value,attributableUtil);
      }
 catch (      ValidationException e) {
        LOG.error("String_Node_Str" + schema.getName() + "String_Node_Str"+ value,e);
        invalidValues.addElement(schema.getName() + "String_Node_Str" + value);
      }
    }
  }
}
Program: 61167
Project: 61167
Buggy source:
public CheckInResult checkIn(final UserTO userTO){
  return new CheckInResult(CheckinResultAction.CREATE,null,null);
}

Fixed version (ground truth):
public CheckInResult checkIn(final UserTO userTO){
  CheckInResult result=new CheckInResult();
  result.setAction(CheckinResultAction.CREATE);
  return result;
}
Program: 61168
Project: 61168
Buggy source:
@Override public void delete(final Long id){
  JPAWorkflowEntry entry=find(id);
  if (entry == null) {
    return;
  }
  List<JPAPropertySetItem> properties=propertySetItemDAO.findAll(entry.getId());
  if (properties != null) {
    for (    JPAPropertySetItem property : properties) {
      propertySetItemDAO.delete(property.getId());
    }
  }
  entityManager.remove(entry);
}

Fixed version (ground truth):
@Override public void delete(final Long id){
  JPAWorkflowEntry entry=find(id);
  if (entry == null) {
    return;
  }
  List<JPAPropertySetItem> properties=propertySetItemDAO.findAll(entry.getId());
  if (properties != null) {
    for (    JPAPropertySetItem property : properties) {
      propertySetItemDAO.delete(property.getId());
    }
  }
  Query query=entityManager.createQuery("String_Node_Str" + "String_Node_Str");
  query.setParameter("String_Node_Str",entry);
  query.getResultList();
  query=entityManager.createQuery("String_Node_Str" + "String_Node_Str");
  query.setParameter("String_Node_Str",entry);
  query.getResultList();
  entityManager.remove(entry);
}
Program: 61169
Project: 61169
Buggy source:
@Override public <T extends AbstractAttribute>void setAttribute(T attribute){
  this.attribute=(UserAttribute)attribute;
}

Fixed version (ground truth):
@Override public <T extends AbstractAttribute>void setAttribute(final T attribute){
  this.attribute=(UserAttribute)attribute;
}
Program: 61171
Project: 61171
Buggy source:
@Override protected void populateItem(final ListItem item){
  final ConfigurationTO configurationTO=(ConfigurationTO)item.getModelObject();
  item.add(new Label("String_Node_Str",configurationTO.getConfKey()));
  item.add(new Label("String_Node_Str",configurationTO.getConfValue()));
  AjaxLink editLink=new AjaxLink("String_Node_Str"){
    @Override public void onClick(    AjaxRequestTarget target){
      editConfigWin.setPageCreator(new ModalWindow.PageCreator(){
        public Page createPage(){
          ConfigurationModalPage window=new ConfigurationModalPage(Configuration.this,editConfigWin,configurationTO,false);
          return window;
        }
      }
);
      editConfigWin.show(target);
    }
  }
;
  item.add(editLink);
  AjaxLink deleteLink=new AjaxLink("String_Node_Str"){
    @Override public void onClick(    AjaxRequestTarget target){
      try {
        restClient.deleteConfiguration(configurationTO.getConfKey());
      }
 catch (      UnsupportedEncodingException ex) {
        Logger.getLogger(Configuration.class.getName()).log(Level.SEVERE,null,ex);
        error(ex.getMessage());
        return;
      }
      info(getString("String_Node_Str"));
      target.addComponent(feedbackPanel);
      target.addComponent(configContainer);
    }
  }
;
  item.add(deleteLink);
}

Fixed version (ground truth):
public void populateItem(Item<ICellPopulator<ConfigurationTO>> cellItem,String componentId,IModel<ConfigurationTO> model){
  final ConfigurationTO configurationTO=model.getObject();
  AjaxLink deleteLink=new AjaxLink("String_Node_Str"){
    @Override public void onClick(    AjaxRequestTarget target){
      try {
        restClient.deleteConfiguration(configurationTO.getConfKey());
      }
 catch (      UnsupportedEncodingException ex) {
        Logger.getLogger(Configuration.class.getName()).log(Level.SEVERE,null,ex);
        error(ex.getMessage());
        return;
      }
      info(getString("String_Node_Str"));
      target.addComponent(feedbackPanel);
      target.addComponent(container);
    }
  }
;
  DeleteLinkPanel panel=new DeleteLinkPanel(componentId,model);
  panel.add(deleteLink);
  cellItem.add(panel);
}
Program: 61172
Project: 61172
Buggy source:
/** 
 * Set a WindowClosedCallback for a ModalWindow instance.
 * @param window
 * @param configContainer
 */
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
 */
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;
      }
    }
  }
);
}
Program: 61173
Project: 61173
Buggy source:
protected void onUpdate(AjaxRequestTarget target){
  utility.updatePaginatorRows(Constants.CONF_CONFIGURATION_PAGINATOR_ROWS,paginatorRows);
  configurationsView.setRowsPerPage(paginatorRows);
  target.addComponent(configContainer);
  target.addComponent(getPage().get("String_Node_Str"));
}

Fixed version (ground truth):
protected void onUpdate(AjaxRequestTarget target){
  utility.updatePaginatorRows(Constants.CONF_CONFIGURATION_PAGINATOR_ROWS,paginatorRows);
  table.setRowsPerPage(paginatorRows);
  target.addComponent(container);
}
Program: 61175
Project: 61175
Buggy source:
private ConnectorObjectBuilder buildConnectorObject(Set<WSAttributeValue> attributes){
  ConnectorObjectBuilder bld=new ConnectorObjectBuilder();
  String uid=null;
  for (  WSAttributeValue attribute : attributes) {
    if (attribute.isKey()) {
      uid=attribute.getStringValue();
      bld.setName(uid);
      bld.addAttribute(AttributeBuilder.build(attribute.getName(),attribute.getValue()));
    }
    if (!attribute.isKey() && !attribute.isPassword()) {
      if (attribute.getValue() == null) {
        bld.addAttribute(AttributeBuilder.build(attribute.getName()));
      }
 else {
        bld.addAttribute(AttributeBuilder.build(attribute.getName(),attribute.getValue()));
      }
    }
  }
  if (uid == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  bld.setUid(new Uid(uid));
  bld.setObjectClass(ObjectClass.ACCOUNT);
  return bld;
}

Fixed version (ground truth):
private ConnectorObjectBuilder buildConnectorObject(Set<WSAttributeValue> attributes){
  ConnectorObjectBuilder bld=new ConnectorObjectBuilder();
  String uid=null;
  for (  WSAttributeValue attribute : attributes) {
    if (attribute.isKey()) {
      uid=attribute.getStringValue();
      bld.setName(uid);
      bld.addAttribute(AttributeBuilder.build(attribute.getName(),attribute.getValues()));
    }
    if (!attribute.isKey() && !attribute.isPassword()) {
      if (attribute.getValues() == null) {
        bld.addAttribute(AttributeBuilder.build(attribute.getName()));
      }
 else {
        bld.addAttribute(AttributeBuilder.build(attribute.getName(),attribute.getValues()));
      }
    }
  }
  if (uid == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  bld.setUid(new Uid(uid));
  bld.setObjectClass(ObjectClass.ACCOUNT);
  return bld;
}
Program: 61177
Project: 61177
Buggy source:
public String getStringValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (String)value;
}

Fixed version (ground truth):
public String getStringValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String res;
  if (values == null && values.isEmpty()) {
    res=null;
  }
 else {
    res=values.iterator().next().toString();
  }
  return res;
}
Program: 61178
Project: 61178
Buggy source:
public URI getURIValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (URI)value;
}

Fixed version (ground truth):
public URI getURIValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  URI res;
  if (values == null && values.isEmpty()) {
    res=null;
  }
 else {
    res=(URI)values.iterator().next();
  }
  return res;
}
Program: 61179
Project: 61179
Buggy source:
public Character getCharacterValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (Character)value;
}

Fixed version (ground truth):
public Character getCharacterValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Character res;
  if (values == null && values.isEmpty()) {
    res=null;
  }
 else {
    res=(Character)values.iterator().next();
  }
  return res;
}
Program: 61180
Project: 61180
Buggy source:
public Double getDoubleValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (Double)value;
}

Fixed version (ground truth):
public Double getDoubleValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Double res;
  if (values == null && values.isEmpty()) {
    res=null;
  }
 else {
    res=(Double)values.iterator().next();
  }
  return res;
}
Program: 61181
Project: 61181
Buggy source:
public File getFileValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (File)value;
}

Fixed version (ground truth):
public File getFileValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  File res;
  if (values == null && values.isEmpty()) {
    res=null;
  }
 else {
    res=(File)values.iterator().next();
  }
  return res;
}
Program: 61182
Project: 61182
Buggy source:
public Integer getIntegerValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (Integer)value;
}

Fixed version (ground truth):
public Integer getIntegerValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Integer res;
  if (values == null && values.isEmpty()) {
    res=null;
  }
 else {
    res=(Integer)values.iterator().next();
  }
  return res;
}
Program: 61183
Project: 61183
Buggy source:
public Float getFloadValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (Float)value;
}

Fixed version (ground truth):
public Float getFloadValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Float res;
  if (values == null && values.isEmpty()) {
    res=null;
  }
 else {
    res=(Float)values.iterator().next();
  }
  return res;
}
Program: 61184
Project: 61184
Buggy source:
public Long getLongValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (Long)value;
}

Fixed version (ground truth):
public Long getLongValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Long res;
  if (values == null && values.isEmpty()) {
    res=null;
  }
 else {
    res=(Long)values.iterator().next();
  }
  return res;
}
Program: 61185
Project: 61185
Buggy source:
public Boolean getBooleanValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (Boolean)value;
}

Fixed version (ground truth):
public Boolean getBooleanValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Boolean res;
  if (values == null && values.isEmpty()) {
    res=null;
  }
 else {
    res=(Boolean)values.iterator().next();
  }
  return res;
}
Program: 61186
Project: 61186
Buggy source:
public Date getDateValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return (Date)value;
}

Fixed version (ground truth):
public Date getDateValue(){
  if (getType() == null || !"String_Node_Str".equals(getType())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Date res;
  if (values == null && values.isEmpty()) {
    res=null;
  }
 else {
    res=(Date)values.iterator().next();
  }
  return res;
}
Program: 61187
Project: 61187
Buggy source:
@Test public void create(){
  Throwable t=null;
  try {
    WSAttributeValue uid=new WSAttributeValue();
    uid.setName("String_Node_Str");
    uid.setValue("String_Node_Str");
    uid.setKey(true);
    WSAttributeValue password=new WSAttributeValue();
    password.setName("String_Node_Str");
    password.setValue("String_Node_Str");
    password.setPassword(true);
    WSAttributeValue type=new WSAttributeValue();
    type.setName("String_Node_Str");
    type.setValue("String_Node_Str");
    WSAttributeValue name=new WSAttributeValue();
    name.setName("String_Node_Str");
    name.setValue("String_Node_Str");
    WSAttributeValue surname=new WSAttributeValue();
    surname.setName("String_Node_Str");
    surname.setValue("String_Node_Str");
    WSAttributeValue birthdate=new WSAttributeValue();
    birthdate.setName("String_Node_Str");
    birthdate.setValue("String_Node_Str");
    List<WSAttributeValue> attrs=new ArrayList<WSAttributeValue>();
    attrs.add(uid);
    attrs.add(password);
    attrs.add(type);
    attrs.add(name);
    attrs.add(surname);
    attrs.add(birthdate);
    String accountId=provisioning.create(attrs);
    assertNotNull(accountId);
    assertEquals(accountId,"String_Node_Str");
  }
 catch (  Exception e) {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str",e);
    }
    t=e;
  }
  assertNull(t);
}

Fixed version (ground truth):
@Test public void create(){
  Throwable t=null;
  try {
    WSAttributeValue uid=new WSAttributeValue();
    uid.setName("String_Node_Str");
    uid.setValues(Collections.singletonList("String_Node_Str"));
    uid.setKey(true);
    WSAttributeValue password=new WSAttributeValue();
    password.setName("String_Node_Str");
    password.setValues(Collections.singletonList("String_Node_Str"));
    password.setPassword(true);
    WSAttributeValue type=new WSAttributeValue();
    type.setName("String_Node_Str");
    type.setValues(Collections.singletonList("String_Node_Str"));
    WSAttributeValue name=new WSAttributeValue();
    name.setName("String_Node_Str");
    name.setValues(Collections.singletonList("String_Node_Str"));
    WSAttributeValue surname=new WSAttributeValue();
    surname.setName("String_Node_Str");
    surname.setValues(Collections.singletonList("String_Node_Str"));
    WSAttributeValue birthdate=new WSAttributeValue();
    birthdate.setName("String_Node_Str");
    birthdate.setValues(Collections.singletonList("String_Node_Str"));
    List<WSAttributeValue> attrs=new ArrayList<WSAttributeValue>();
    attrs.add(uid);
    attrs.add(password);
    attrs.add(type);
    attrs.add(name);
    attrs.add(surname);
    attrs.add(birthdate);
    String accountId=provisioning.create(attrs);
    assertNotNull(accountId);
    assertEquals(accountId,"String_Node_Str");
  }
 catch (  Exception e) {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str",e);
    }
    t=e;
  }
  assertNull(t);
}
Program: 61188
Project: 61188
Buggy source:
@Test public void update(){
  Throwable t=null;
  try {
    WSAttributeValue surname=new WSAttributeValue();
    surname.setName("String_Node_Str");
    surname.setValue("String_Node_Str");
    surname.setKey(true);
    WSAttributeValue name=new WSAttributeValue();
    name.setName("String_Node_Str");
    name.setValue("String_Node_Str");
    List<WSAttributeValue> attrs=new ArrayList<WSAttributeValue>();
    attrs.add(surname);
    attrs.add(name);
    String uid=provisioning.update("String_Node_Str",attrs);
    assertNotNull(uid);
    assertEquals("String_Node_Str",uid);
  }
 catch (  Exception e) {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str",e);
    }
    t=e;
  }
  assertNull(t);
}

Fixed version (ground truth):
@Test public void update(){
  Throwable t=null;
  try {
    WSAttributeValue surname=new WSAttributeValue();
    surname.setName("String_Node_Str");
    surname.setValues(Collections.singletonList("String_Node_Str"));
    surname.setKey(true);
    WSAttributeValue name=new WSAttributeValue();
    name.setName("String_Node_Str");
    name.setValues(Collections.singletonList("String_Node_Str"));
    List<WSAttributeValue> attrs=new ArrayList<WSAttributeValue>();
    attrs.add(surname);
    attrs.add(name);
    String uid=provisioning.update("String_Node_Str",attrs);
    assertNotNull(uid);
    assertEquals("String_Node_Str",uid);
  }
 catch (  Exception e) {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str",e);
    }
    t=e;
  }
  assertNull(t);
}
Program: 61189
Project: 61189
Buggy source:
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public ConfigurationTOs list(HttpServletRequest request){
  List<SyncopeConfiguration> configurations=syncopeConfigurationDAO.findAll();
  List<ConfigurationTO> configurationTOs=new ArrayList<ConfigurationTO>(configurations.size());
  for (  SyncopeConfiguration configuration : configurations) {
    configurationTOs.add(configurationDataBinder.getConfigurationTO(configuration));
  }
  ConfigurationTOs result=new ConfigurationTOs();
  result.setConfigurations(configurationTOs);
  return result;
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public List<ConfigurationTO> list(HttpServletRequest request){
  List<SyncopeConfiguration> configurations=syncopeConfigurationDAO.findAll();
  List<ConfigurationTO> configurationTOs=new ArrayList<ConfigurationTO>(configurations.size());
  for (  SyncopeConfiguration configuration : configurations) {
    configurationTOs.add(configurationDataBinder.getConfigurationTO(configuration));
  }
  return configurationTOs;
}
Program: 61190
Project: 61190
Buggy source:
@RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public ConnectorInstanceTO update(HttpServletResponse response,@RequestBody ConnectorInstanceTO connectorTO) throws SyncopeClientCompositeErrorException, NotFoundException, MissingConfKeyException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + connectorTO);
  }
  ConnectorInstance connectorInstance=null;
  try {
    connectorInstance=binder.updateConnectorInstance(connectorTO.getId(),connectorTO);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    LOG.error("String_Node_Str" + connectorTO,e);
    throw e;
  }
  connectorInstance=connectorInstanceDAO.save(connectorInstance);
  return binder.getConnectorInstanceTO(connectorInstance);
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public ConnectorInstanceTO update(HttpServletResponse response,@RequestBody ConnectorInstanceTO connectorTO) throws SyncopeClientCompositeErrorException, NotFoundException, MissingConfKeyException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + connectorTO);
  }
  ConnectorInstance connectorInstance;
  try {
    connectorInstance=binder.updateConnectorInstance(connectorTO.getId(),connectorTO);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    LOG.error("String_Node_Str" + connectorTO,e);
    throw e;
  }
  connectorInstance=connectorInstanceDAO.save(connectorInstance);
  return binder.getConnectorInstanceTO(connectorInstance);
}
Program: 61191
Project: 61191
Buggy source:
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public ModelAndView list(){
  List<ConnectorInstance> connectorInstances=connectorInstanceDAO.findAll();
  List<ConnectorInstanceTO> connectorInstanceTOs=new ArrayList<ConnectorInstanceTO>();
  for (  ConnectorInstance connector : connectorInstances) {
    connectorInstanceTOs.add(binder.getConnectorInstanceTO(connector));
  }
  return new ModelAndView().addObject(connectorInstanceTOs);
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public List<ConnectorInstanceTO> list(){
  List<ConnectorInstance> connectorInstances=connectorInstanceDAO.findAll();
  List<ConnectorInstanceTO> connectorInstanceTOs=new ArrayList<ConnectorInstanceTO>();
  for (  ConnectorInstance connector : connectorInstances) {
    connectorInstanceTOs.add(binder.getConnectorInstanceTO(connector));
  }
  return connectorInstanceTOs;
}
Program: 61193
Project: 61193
Buggy source:
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public ModelAndView list(@PathVariable("String_Node_Str") final String kind){
  Class reference=getAttributableUtil(kind).getDerivedSchemaClass();
  List<AbstractDerivedSchema> derivedAttributeSchemas=derivedSchemaDAO.findAll(reference);
  List<DerivedSchemaTO> derivedSchemaTOs=new ArrayList<DerivedSchemaTO>(derivedAttributeSchemas.size());
  for (  AbstractDerivedSchema derivedSchema : derivedAttributeSchemas) {
    derivedSchemaTOs.add(derivedSchemaDataBinder.getDerivedSchemaTO(derivedSchema));
  }
  return new ModelAndView().addObject(derivedSchemaTOs);
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public List<DerivedSchemaTO> list(@PathVariable("String_Node_Str") final String kind){
  Class reference=getAttributableUtil(kind).getDerivedSchemaClass();
  List<AbstractDerivedSchema> derivedAttributeSchemas=derivedSchemaDAO.findAll(reference);
  List<DerivedSchemaTO> derivedSchemaTOs=new ArrayList<DerivedSchemaTO>(derivedAttributeSchemas.size());
  for (  AbstractDerivedSchema derivedSchema : derivedAttributeSchemas) {
    derivedSchemaTOs.add(derivedSchemaDataBinder.getDerivedSchemaTO(derivedSchema));
  }
  return derivedSchemaTOs;
}
Program: 61195
Project: 61195
Buggy source:
@Transactional(readOnly=true) @RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public ModelAndView list(HttpServletResponse response) throws NotFoundException {
  List<TargetResource> resources=resourceDAO.findAll();
  if (resources == null) {
    LOG.error("String_Node_Str");
    throw new NotFoundException("String_Node_Str");
  }
  return new ModelAndView().addObject(binder.getResourceTOs(resources));
}

Fixed version (ground truth):
@Transactional(readOnly=true) @RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public List<ResourceTO> list(HttpServletResponse response) throws NotFoundException {
  List<TargetResource> resources=resourceDAO.findAll();
  if (resources == null) {
    LOG.error("String_Node_Str");
    throw new NotFoundException("String_Node_Str");
  }
  return binder.getResourceTOs(resources);
}
Program: 61196
Project: 61196
Buggy source:
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public ModelAndView children(HttpServletResponse response,@PathVariable("String_Node_Str") Long roleId){
  List<SyncopeRole> roles=syncopeRoleDAO.findChildren(roleId);
  List<RoleTO> roleTOs=new ArrayList<RoleTO>(roles.size());
  for (  SyncopeRole role : roles) {
    roleTOs.add(roleDataBinder.getRoleTO(role));
  }
  return new ModelAndView().addObject(roleTOs);
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public List<RoleTO> children(HttpServletResponse response,@PathVariable("String_Node_Str") Long roleId){
  List<SyncopeRole> roles=syncopeRoleDAO.findChildren(roleId);
  List<RoleTO> roleTOs=new ArrayList<RoleTO>(roles.size());
  for (  SyncopeRole role : roles) {
    roleTOs.add(roleDataBinder.getRoleTO(role));
  }
  return roleTOs;
}
Program: 61197
Project: 61197
Buggy source:
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public ModelAndView list(HttpServletRequest request){
  List<SyncopeRole> roles=syncopeRoleDAO.findAll();
  List<RoleTO> roleTOs=new ArrayList<RoleTO>(roles.size());
  for (  SyncopeRole role : roles) {
    roleTOs.add(roleDataBinder.getRoleTO(role));
  }
  return new ModelAndView().addObject(roleTOs);
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public List<RoleTO> list(HttpServletRequest request){
  List<SyncopeRole> roles=syncopeRoleDAO.findAll();
  List<RoleTO> roleTOs=new ArrayList<RoleTO>(roles.size());
  for (  SyncopeRole role : roles) {
    roleTOs.add(roleDataBinder.getRoleTO(role));
  }
  return roleTOs;
}
Program: 61198
Project: 61198
Buggy source:
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public ModelAndView list(@PathVariable("String_Node_Str") final String kind){
  Class reference=getAttributableUtil(kind).getSchemaClass();
  List<AbstractSchema> schemas=schemaDAO.findAll(reference);
  List<SchemaTO> schemaTOs=new ArrayList<SchemaTO>(schemas.size());
  for (  AbstractSchema schema : schemas) {
    schemaTOs.add(schemaDataBinder.getSchemaTO(schema));
  }
  return new ModelAndView().addObject(schemaTOs);
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public List<SchemaTO> list(@PathVariable("String_Node_Str") final String kind){
  Class reference=getAttributableUtil(kind).getSchemaClass();
  List<AbstractSchema> schemas=schemaDAO.findAll(reference);
  List<SchemaTO> schemaTOs=new ArrayList<SchemaTO>(schemas.size());
  for (  AbstractSchema schema : schemas) {
    schemaTOs.add(schemaDataBinder.getSchemaTO(schema));
  }
  return schemaTOs;
}
Program: 61199
Project: 61199
Buggy source:
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public ModelAndView list(){
  List<SyncopeUser> users=syncopeUserDAO.findAll();
  List<UserTO> userTOs=new ArrayList<UserTO>(users.size());
  for (  SyncopeUser user : users) {
    userTOs.add(userDataBinder.getUserTO(user,userWorkflow));
  }
  return new ModelAndView().addObject(userTOs);
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public List<UserTO> list(){
  List<SyncopeUser> users=syncopeUserDAO.findAll();
  List<UserTO> userTOs=new ArrayList<UserTO>(users.size());
  for (  SyncopeUser user : users) {
    userTOs.add(userDataBinder.getUserTO(user,userWorkflow));
  }
  return userTOs;
}
Program: 61200
Project: 61200
Buggy source:
@RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public ModelAndView search(@RequestBody NodeCond searchCondition) throws InvalidSearchConditionException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + searchCondition);
  }
  if (!searchCondition.checkValidity()) {
    LOG.error("String_Node_Str" + searchCondition);
    throw new InvalidSearchConditionException();
  }
  List<SyncopeUser> matchingUsers=syncopeUserDAO.search(searchCondition);
  List<UserTO> result=new ArrayList<UserTO>(matchingUsers.size());
  for (  SyncopeUser user : matchingUsers) {
    result.add(userDataBinder.getUserTO(user,userWorkflow));
  }
  return new ModelAndView().addObject(result);
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public List<UserTO> search(@RequestBody NodeCond searchCondition) throws InvalidSearchConditionException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + searchCondition);
  }
  if (!searchCondition.checkValidity()) {
    LOG.error("String_Node_Str" + searchCondition);
    throw new InvalidSearchConditionException();
  }
  List<SyncopeUser> matchingUsers=syncopeUserDAO.search(searchCondition);
  List<UserTO> result=new ArrayList<UserTO>(matchingUsers.size());
  for (  SyncopeUser user : matchingUsers) {
    result.add(userDataBinder.getUserTO(user,userWorkflow));
  }
  return result;
}
Program: 61201
Project: 61201
Buggy source:
/** 
 * Search an user by its schema values.
 * @param userTO
 * @return UserTOs
 */
public List<UserTO> searchUsers(NodeCond nodeSearchCondition) throws HttpServerErrorException {
  List<UserTO> matchedUsers=null;
  matchedUsers=restClient.getRestTemplate().postForObject(restClient.getBaseURL() + "String_Node_Str",nodeSearchCondition,List.class);
  return matchedUsers;
}

Fixed version (ground truth):
/** 
 * Search an user by its schema values.
 * @param userTO
 * @return UserTOs
 */
public List<UserTO> searchUsers(NodeCond nodeSearchCondition) throws HttpServerErrorException {
  List<UserTO> matchedUsers=null;
  matchedUsers=Arrays.asList(restClient.getRestTemplate().postForObject(restClient.getBaseURL() + "String_Node_Str",nodeSearchCondition,UserTO[].class));
  return matchedUsers;
}
Program: 61202
Project: 61202
Buggy source:
@Override @Transactional(readOnly=true) public final List<SyncopeUser> search(final NodeCond searchCondition){
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + searchCondition);
  }
  List<SyncopeUser> result=Collections.EMPTY_LIST;
  try {
    result=doSearch(searchCondition);
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",t);
  }
  return result;
}

Fixed version (ground truth):
@Override @Transactional(readOnly=true) public final List<SyncopeUser> search(final NodeCond searchCondition){
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + searchCondition);
  }
  List<SyncopeUser> result;
  try {
    result=doSearch(searchCondition);
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",t);
    result=Collections.EMPTY_LIST;
  }
  return result;
}
Program: 61204
Project: 61204
Buggy source:
@Transactional(readOnly=true) private List<SyncopeUser> doSearch(final NodeCond nodeCond){
  List<SyncopeUser> result=null;
  List<SyncopeUser> rightResult=null;
switch (nodeCond.getType()) {
case LEAF:
case NOT_LEAF:
    Criteria criteria=getBaseCriteria().add(getCriterion(nodeCond));
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + criteria);
  }
result=criteria.list();
if (LOG.isDebugEnabled()) {
LOG.debug("String_Node_Str" + result);
}
break;
case AND:
result=doSearch(nodeCond.getLeftNodeCond());
rightResult=doSearch(nodeCond.getRightNodeCond());
result.retainAll(rightResult);
break;
case OR:
result=doSearch(nodeCond.getLeftNodeCond());
rightResult=doSearch(nodeCond.getRightNodeCond());
result.addAll(rightResult);
break;
default :
}
return result;
}

Fixed version (ground truth):
@Transactional(readOnly=true) private List<SyncopeUser> doSearch(final NodeCond nodeCond){
  List<SyncopeUser> result;
  List<SyncopeUser> rightResult;
switch (nodeCond.getType()) {
case LEAF:
case NOT_LEAF:
    if (nodeCond.getAttributeCond() != null && nodeCond.getAttributeCond().getType() == AttributeCond.Type.ISNULL) {
      if (nodeCond.getType() == NodeCond.Type.NOT_LEAF) {
        nodeCond.setType(NodeCond.Type.LEAF);
        nodeCond.getAttributeCond().setType(AttributeCond.Type.ISNOTNULL);
        result=doSearch(nodeCond);
      }
 else {
        Query query=entityManager.createQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
        query.setParameter("String_Node_Str",nodeCond.getAttributeCond().getSchema());
        LOG.debug("String_Node_Str",query);
        result=query.getResultList();
      }
    }
 else {
      Criteria criteria=getBaseCriteria().add(getCriterion(nodeCond));
      LOG.debug("String_Node_Str",criteria);
      result=criteria.list();
    }
  LOG.debug("String_Node_Str",result);
break;
case AND:
result=doSearch(nodeCond.getLeftNodeCond());
rightResult=doSearch(nodeCond.getRightNodeCond());
result.retainAll(rightResult);
break;
case OR:
result=doSearch(nodeCond.getLeftNodeCond());
rightResult=doSearch(nodeCond.getRightNodeCond());
result.addAll(rightResult);
break;
default :
result=Collections.EMPTY_LIST;
}
return result;
}
Program: 61205
Project: 61205
Buggy source:
public List<ConfigurationTO> getConfigurationsListDB(){
  List<ConfigurationTO> list=restClient.getAllConfigurations();
  return list;
}

Fixed version (ground truth):
public List<ConfigurationTO> getConfigurationsListDB(){
  List<ConfigurationTO> list=null;
  try {
    list=restClient.getAllConfigurations();
  }
 catch (  RestClientException rce) {
    throw rce;
  }
  return list;
}
Program: 61206
Project: 61206
Buggy source:
@Override protected void onSubmit(AjaxRequestTarget target,Form form){
  UserTO userTO=(UserTO)form.getDefaultModelObject();
  boolean res=false;
  try {
    userTO.setResources(getResourcesSet(resourcesPalette.getModelCollection()));
    userTO.setAttributes(getUserAttributesList());
    userTO.setMemberships(getMembershipsSet());
    if (createFlag) {
      usersRestClient.createUser(userTO);
    }
 else {
      setupUserMod(userTO);
      if (userMod != null) {
        res=usersRestClient.updateUser(userMod);
        if (!res)         error(getString("String_Node_Str"));
        Users callerPage=(Users)basePage;
        callerPage.setOperationResult(true);
      }
    }
    window.close(target);
  }
 catch (  Exception e) {
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@Override protected void onSubmit(AjaxRequestTarget target,Form form){
  UserTO userTO=(UserTO)form.getDefaultModelObject();
  boolean res=false;
  try {
    userTO.setResources(getResourcesSet(resourcesPalette.getModelCollection()));
    userTO.setAttributes(getUserAttributesList());
    userTO.setMemberships(getMembershipsSet());
    if (createFlag) {
      usersRestClient.createUser(userTO);
    }
 else {
      setupUserMod(userTO);
      if (userMod != null) {
        res=usersRestClient.updateUser(userMod);
        if (!res)         error(getString("String_Node_Str"));
        Users callerPage=(Users)basePage;
        callerPage.setOperationResult(true);
      }
    }
    window.close(target);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    e.printStackTrace();
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
  }
}
Program: 61207
Project: 61207
Buggy source:
public Page createPage(){
  MembershipModalPage form=new MembershipModalPage(getPage(),createUserWin,membershipTO,false);
  return form;
}

Fixed version (ground truth):
public Page createPage(){
  MembershipModalPage window=new MembershipModalPage(getPage(),createUserWin,membershipTO,false);
  return window;
}
Program: 61209
Project: 61209
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((String)rolesMap.get(membershipTO.getRoleId()))));
  AjaxLink editLink=new AjaxLink("String_Node_Str"){
    @Override public void onClick(    AjaxRequestTarget target){
      createUserWin.setPageCreator(new ModalWindow.PageCreator(){
        public Page createPage(){
          MembershipModalPage form=new MembershipModalPage(getPage(),createUserWin,membershipTO,false);
          return form;
        }
      }
);
      createUserWin.show(target);
    }
  }
;
  item.add(editLink);
  AjaxLink deleteLink=new AjaxLink("String_Node_Str"){
    @Override public void onClick(    AjaxRequestTarget target){
      int componentId=new Integer(getParent().getId());
      membershipTOs.remove(componentId);
      target.addComponent(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((String)rolesMap.get(membershipTO.getRoleId()))));
  AjaxLink editLink=new AjaxLink("String_Node_Str"){
    @Override public void onClick(    AjaxRequestTarget target){
      createUserWin.setPageCreator(new ModalWindow.PageCreator(){
        public Page createPage(){
          MembershipModalPage window=new MembershipModalPage(getPage(),createUserWin,membershipTO,false);
          return window;
        }
      }
);
      createUserWin.show(target);
    }
  }
;
  item.add(editLink);
  AjaxLink deleteLink=new AjaxLink("String_Node_Str"){
    @Override public void onClick(    AjaxRequestTarget target){
      int componentId=new Integer(getParent().getId());
      membershipTOs.remove(componentId);
      target.addComponent(membershipsContainer);
    }
  }
;
  item.add(deleteLink);
}
Program: 61210
Project: 61210
Buggy source:
@RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public ResourceTO update(final HttpServletResponse response,final @RequestBody ResourceTO resourceTO) throws SyncopeClientCompositeErrorException, NotFoundException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str");
  }
  TargetResource resource=null;
  if (resourceTO != null && resourceTO.getName() != null) {
    resource=resourceDAO.find(resourceTO.getName());
  }
  if (resource == null) {
    LOG.error("String_Node_Str" + resourceTO.getName());
    throw new NotFoundException("String_Node_Str" + resourceTO.getName() + "String_Node_Str");
  }
  SyncopeClientCompositeErrorException compositeErrorException=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str");
  }
  resource.getMappings().clear();
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str");
  }
  resource=binder.getResource(resource,resourceTO);
  if (resource == null) {
    LOG.error("String_Node_Str");
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.Unknown);
    compositeErrorException.addException(ex);
    throw compositeErrorException;
  }
  resource=resourceDAO.save(resource);
  return binder.getResourceTO(resource);
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.POST,value="String_Node_Str") public ResourceTO update(final HttpServletResponse response,final @RequestBody ResourceTO resourceTO) throws SyncopeClientCompositeErrorException, NotFoundException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str");
  }
  TargetResource resource=null;
  if (resourceTO != null && resourceTO.getName() != null) {
    resource=resourceDAO.find(resourceTO.getName());
  }
  if (resource == null) {
    LOG.error("String_Node_Str" + resourceTO.getName());
    throw new NotFoundException("String_Node_Str" + resourceTO.getName() + "String_Node_Str");
  }
  SyncopeClientCompositeErrorException compositeErrorException=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str");
  }
  resourceDAO.deleteAllMappings(resource);
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str");
  }
  resource=binder.getResource(resource,resourceTO);
  if (resource == null) {
    LOG.error("String_Node_Str");
    SyncopeClientException ex=new SyncopeClientException(SyncopeClientExceptionType.Unknown);
    compositeErrorException.addException(ex);
    throw compositeErrorException;
  }
  resource=resourceDAO.save(resource);
  return binder.getResourceTO(resource);
}
Program: 61212
Project: 61212
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((String)item.getModelObject());
  }
 catch (  ParseException ex) {
    Logger.getLogger(UserModalPage.class.getName()).log(Level.SEVERE,null,ex);
  }
  return date;
}

Fixed version (ground truth):
@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);
  }
 catch (  ParseException ex) {
    Logger.getLogger(UserModalPage.class.getName()).log(Level.SEVERE,null,ex);
  }
  return date;
}