nus-yam/ex-repair huggingface dataset:
Program: 61099
Project: 61099
Buggy source:
@Transactional(readOnly=true) public void loadAllConnInstances(){
  CurrentLocale.set(Locale.ENGLISH);
  List<ConnInstance> instances=connInstanceDAO.findAll();
  for (  ConnInstance instance : instances) {
    try {
      LOG.info("String_Node_Str",instance);
      registerConnector(instance);
    }
 catch (    NotFoundException e) {
      LOG.error("String_Node_Str" + instance,e);
    }
  }
}

Fixed version (ground truth):
@Transactional(readOnly=true) public void loadAllConnInstances(){
  CurrentLocale.set(Locale.ENGLISH);
  List<ConnInstance> instances=connInstanceDAO.findAll();
  for (  ConnInstance instance : instances) {
    try {
      LOG.info("String_Node_Str",instance);
      registerConnector(instance);
    }
 catch (    NotFoundException e) {
      LOG.error("String_Node_Str" + instance,e);
    }
catch (    RuntimeException e) {
      LOG.error("String_Node_Str" + instance,e);
    }
  }
}
Program: 61100
Project: 61100
Buggy source:
@Override public void onClick(AjaxRequestTarget target){
  boolean res=false;
  try {
    res=taskRestClient.deleteTaskExecution(taskExecutionTO.getId());
  }
 catch (  SyncopeClientCompositeErrorException scce) {
    error(scce.getMessage());
  }
  if (res) {
    info(getString("String_Node_Str"));
  }
  target.addComponent(feedbackPanel);
  target.addComponent(container);
}

Fixed version (ground truth):
@Override public void onClick(final AjaxRequestTarget target){
  try {
    taskRestClient.deleteTaskExecution(taskExecutionTO.getId());
    info(getString("String_Node_Str"));
  }
 catch (  SyncopeClientCompositeErrorException scce) {
    error(scce.getMessage());
  }
  target.addComponent(feedbackPanel);
  target.addComponent(container);
}
Program: 61102
Project: 61102
Buggy source:
public int compare(final TaskTO o1,final TaskTO o2){
  PropertyModel<Comparable> model1=new PropertyModel<Comparable>(o1,getSort().getProperty());
  PropertyModel<Comparable> model2=new PropertyModel<Comparable>(o2,getSort().getProperty());
  int result=1;
  if (model1.getObject() == null && model2.getObject() == null) {
    result=0;
  }
 else   if (model1.getObject() == null) {
    result=1;
  }
 else   if (model2.getObject() == null) {
    result=-1;
  }
 else {
    result=((Comparable)model1.getObject()).compareTo(model2.getObject());
  }
  result=getSort().isAscending() ? result : -result;
  return result;
}

Fixed version (ground truth):
@Override public int compare(final TaskTO o1,final TaskTO o2){
  PropertyModel<Comparable> model1=new PropertyModel<Comparable>(o1,getSort().getProperty());
  PropertyModel<Comparable> model2=new PropertyModel<Comparable>(o2,getSort().getProperty());
  int result=1;
  if (model1.getObject() == null && model2.getObject() == null) {
    result=0;
  }
 else   if (model1.getObject() == null) {
    result=1;
  }
 else   if (model2.getObject() == null) {
    result=-1;
  }
 else {
    result=((Comparable)model1.getObject()).compareTo(model2.getObject());
  }
  result=getSort().isAscending() ? result : -result;
  return result;
}
Program: 61104
Project: 61104
Buggy source:
@Override public Iterator<TaskTO> iterator(int first,int count){
  List<TaskTO> list=getTasksListDB();
  Collections.sort(list,comparator);
  return list.subList(first,first + count).iterator();
}

Fixed version (ground truth):
@Override public Iterator<TaskTO> iterator(int first,int count){
  List<TaskTO> tasks=restClient.list(first,count);
  Collections.sort(tasks,comparator);
  return tasks.iterator();
}
Program: 61105
Project: 61105
Buggy source:
public void populateItem(final Item<ICellPopulator<TaskTO>> cellItem,final String componentId,final IModel<TaskTO> model){
  final TaskTO taskTO=model.getObject();
  AjaxLink deleteLink=new IndicatingAjaxLink("String_Node_Str"){
    @Override public void onClick(    AjaxRequestTarget target){
      try {
        restClient.deleteTask(taskTO.getId());
      }
 catch (      SyncopeClientCompositeErrorException scce) {
        error(scce.getMessage());
      }
      target.addComponent(container);
    }
    @Override protected IAjaxCallDecorator getAjaxCallDecorator(){
      return new AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator()){
        @Override public CharSequence preDecorateScript(        final CharSequence script){
          return "String_Node_Str" + getString("String_Node_Str") + "String_Node_Str"+ "String_Node_Str"+ script+ "String_Node_Str";
        }
      }
;
    }
  }
;
  DeleteLinkPanel panel=new DeleteLinkPanel(componentId,model);
  panel.add(deleteLink);
  String allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(panel,ENABLE,allowedRoles);
  cellItem.add(panel);
}

Fixed version (ground truth):
@Override public void populateItem(final Item<ICellPopulator<TaskTO>> cellItem,final String componentId,final IModel<TaskTO> model){
  final TaskTO taskTO=model.getObject();
  AjaxLink deleteLink=new IndicatingAjaxLink("String_Node_Str"){
    @Override public void onClick(    AjaxRequestTarget target){
      try {
        restClient.deleteTask(taskTO.getId());
      }
 catch (      SyncopeClientCompositeErrorException scce) {
        error(scce.getMessage());
      }
      target.addComponent(container);
    }
    @Override protected IAjaxCallDecorator getAjaxCallDecorator(){
      return new AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator()){
        @Override public CharSequence preDecorateScript(        final CharSequence script){
          return "String_Node_Str" + getString("String_Node_Str") + "String_Node_Str"+ "String_Node_Str"+ script+ "String_Node_Str";
        }
      }
;
    }
  }
;
  DeleteLinkPanel panel=new DeleteLinkPanel(componentId,model);
  panel.add(deleteLink);
  String allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(panel,ENABLE,allowedRoles);
  cellItem.add(panel);
}
Program: 61106
Project: 61106
Buggy source:
@Override public int size(){
  return getTasksListDB().size();
}

Fixed version (ground truth):
@Override public int size(){
  return restClient.count();
}
Program: 61107
Project: 61107
Buggy source:
@Override public IModel<TaskTO> model(final TaskTO task){
  return new AbstractReadOnlyModel<TaskTO>(){
    @Override public TaskTO getObject(){
      return task;
    }
  }
;
}

Fixed version (ground truth):
@Override public IModel<TaskTO> model(final TaskTO object){
  return new CompoundPropertyModel<TaskTO>(object);
}
Program: 61108
Project: 61108
Buggy source:
public SchemaTO(){
  mandatoryCondition="String_Node_Str";
  derivedSchemas=new HashSet<String>();
}

Fixed version (ground truth):
public SchemaTO(){
  mandatoryCondition="String_Node_Str";
}
Program: 61109
Project: 61109
Buggy source:
@Override public void onClick(AjaxRequestTarget target){
  createConfigWin.setPageCreator(new ModalWindow.PageCreator(){
    @Override public Page createPage(){
      ConfigurationModalPage window=new ConfigurationModalPage(Configuration.this,createConfigWin,new ConfigurationTO(),true);
      return window;
    }
  }
);
  createConfigWin.show(target);
}

Fixed version (ground truth):
@Override public void onClick(AjaxRequestTarget target){
  createConfigWin.setPageCreator(new ModalWindow.PageCreator(){
    @Override public Page createPage(){
      ConfigurationModalPage window=new ConfigurationModalPage(Configuration.this,createConfigWin,new KeyValueTO(),true);
      return window;
    }
  }
);
  createConfigWin.show(target);
}
Program: 61111
Project: 61111
Buggy source:
private List<ConfigurationTO> getAllConfigurations(){
  List<ConfigurationTO> list=null;
  try {
    list=restClient.getAllConfigurations();
  }
 catch (  RestClientException rce) {
    throw rce;
  }
  return list;
}

Fixed version (ground truth):
private List<KeyValueTO> getAllConfigurations(){
  List<KeyValueTO> list=null;
  try {
    list=restClient.getAllConfigurations();
  }
 catch (  RestClientException rce) {
    throw rce;
  }
  return list;
}
Program: 61112
Project: 61112
Buggy source:
@Override public Page createPage(){
  ConfigurationModalPage window=new ConfigurationModalPage(Configuration.this,createConfigWin,new ConfigurationTO(),true);
  return window;
}

Fixed version (ground truth):
@Override public Page createPage(){
  ConfigurationModalPage window=new ConfigurationModalPage(Configuration.this,createConfigWin,new KeyValueTO(),true);
  return window;
}
Program: 61113
Project: 61113
Buggy source:
@Override public Iterator<ConfigurationTO> iterator(int first,int count){
  List<ConfigurationTO> list=getAllConfigurations();
  Collections.sort(list,comparator);
  return list.subList(first,first + count).iterator();
}

Fixed version (ground truth):
@Override public Iterator<KeyValueTO> iterator(int first,int count){
  List<KeyValueTO> list=getAllConfigurations();
  Collections.sort(list,comparator);
  return list.subList(first,first + count).iterator();
}
Program: 61114
Project: 61114
Buggy source:
public SyncopeConfProvider(){
  setSort("String_Node_Str",true);
  comparator=new SortableDataProviderComparator<ConfigurationTO>(this);
}

Fixed version (ground truth):
public SyncopeConfProvider(){
  setSort("String_Node_Str",true);
  comparator=new SortableDataProviderComparator<KeyValueTO>(this);
}
Program: 61115
Project: 61115
Buggy source:
@Override public IModel<ConfigurationTO> model(final ConfigurationTO configuration){
  return new AbstractReadOnlyModel<ConfigurationTO>(){
    @Override public ConfigurationTO getObject(){
      return configuration;
    }
  }
;
}

Fixed version (ground truth):
@Override public IModel<KeyValueTO> model(final KeyValueTO configuration){
  return new AbstractReadOnlyModel<KeyValueTO>(){
    @Override public KeyValueTO getObject(){
      return configuration;
    }
  }
;
}
Program: 61118
Project: 61118
Buggy source:
/** 
 * Get all stored configurations.
 * @return ConfigurationTOs
 */
public List<ConfigurationTO> getAllConfigurations() throws SyncopeClientCompositeErrorException {
  List<ConfigurationTO> configurations=null;
  configurations=Arrays.asList(restTemplate.getForObject(baseURL + "String_Node_Str",ConfigurationTO[].class));
  return configurations;
}

Fixed version (ground truth):
/** 
 * Get all stored configurations.
 * @return ConfigurationTOs
 */
public List<KeyValueTO> getAllConfigurations() throws SyncopeClientCompositeErrorException {
  List<KeyValueTO> configurations=null;
  configurations=Arrays.asList(restTemplate.getForObject(baseURL + "String_Node_Str",KeyValueTO[].class));
  return configurations;
}
Program: 61119
Project: 61119
Buggy source:
/** 
 * Create a new configuration.
 * @param configurationTO
 * @return true if the operation ends succesfully, false otherwise
 */
public boolean createConfiguration(ConfigurationTO configurationTO){
  ConfigurationTO newConfigurationTO=restTemplate.postForObject(baseURL + "String_Node_Str",configurationTO,ConfigurationTO.class);
  return (configurationTO.equals(newConfigurationTO)) ? true : false;
}

Fixed version (ground truth):
/** 
 * Create a new configuration.
 * @param configurationTO
 * @return true if the operation ends succesfully, false otherwise
 */
public boolean createConfiguration(KeyValueTO configurationTO){
  KeyValueTO newConfigurationTO=restTemplate.postForObject(baseURL + "String_Node_Str",configurationTO,KeyValueTO.class);
  return (configurationTO.equals(newConfigurationTO)) ? true : false;
}
Program: 61120
Project: 61120
Buggy source:
/** 
 * Load an existent configuration.
 * @return ConfigurationTO object if the configuration exists,null otherwise
 */
public ConfigurationTO readConfiguration(String confKey) throws SyncopeClientCompositeErrorException {
  ConfigurationTO configurationTO=restTemplate.getForObject(baseURL + "String_Node_Str",ConfigurationTO.class,confKey);
  return configurationTO;
}

Fixed version (ground truth):
/** 
 * Load an existent configuration.
 * @return ConfigurationTO object if the configuration exists,null otherwise
 */
public KeyValueTO readConfiguration(String confKey) throws SyncopeClientCompositeErrorException {
  KeyValueTO configurationTO=restTemplate.getForObject(baseURL + "String_Node_Str",KeyValueTO.class,confKey);
  return configurationTO;
}
Program: 61121
Project: 61121
Buggy source:
/** 
 * Update an existent configuration.
 * @param configurationTO
 * @return true if the operation ends succesfully, false otherwise
 */
public boolean updateConfiguration(ConfigurationTO configurationTO){
  ConfigurationTO newConfigurationTO=null;
  try {
    newConfigurationTO=restTemplate.postForObject(baseURL + "String_Node_Str",configurationTO,ConfigurationTO.class);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    LOG.error("String_Node_Str",e);
    return false;
  }
  return (configurationTO.equals(newConfigurationTO)) ? true : false;
}

Fixed version (ground truth):
/** 
 * Update an existent configuration.
 * @param configurationTO
 * @return true if the operation ends succesfully, false otherwise
 */
public boolean updateConfiguration(KeyValueTO configurationTO){
  KeyValueTO newConfigurationTO=null;
  try {
    newConfigurationTO=restTemplate.postForObject(baseURL + "String_Node_Str",configurationTO,KeyValueTO.class);
  }
 catch (  SyncopeClientCompositeErrorException e) {
    LOG.error("String_Node_Str",e);
    return false;
  }
  return (configurationTO.equals(newConfigurationTO)) ? true : false;
}
Program: 61123
Project: 61123
Buggy source:
@Override public Iterator<ConfigurationTO> iterator(int first,int count){
  List<ConfigurationTO> list=getConfigurationsListDB();
  Collections.sort(list,comparator);
  return list.subList(first,first + count).iterator();
}

Fixed version (ground truth):
@Override public Iterator<ConfigurationTO> iterator(int first,int count){
  List<ConfigurationTO> list=getAllConfigurations();
  Collections.sort(list,comparator);
  return list.subList(first,first + count).iterator();
}
Program: 61124
Project: 61124
Buggy source:
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 e) {
        LOG.error("String_Node_Str",e);
        error(e.getMessage());
        return;
      }
      info(getString("String_Node_Str"));
      target.addComponent(feedbackPanel);
      target.addComponent(container);
    }
    @Override protected IAjaxCallDecorator getAjaxCallDecorator(){
      return new AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator()){
        private static final long serialVersionUID=1L;
        @Override public CharSequence preDecorateScript(        CharSequence script){
          return "String_Node_Str" + getString("String_Node_Str") + "String_Node_Str"+ "String_Node_Str"+ script+ "String_Node_Str";
        }
      }
;
    }
  }
;
  DeleteLinkPanel panel=new DeleteLinkPanel(componentId,model);
  panel.add(deleteLink);
  String allowedRoles=xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str");
  MetaDataRoleAuthorizationStrategy.authorize(panel,ENABLE,allowedRoles);
  cellItem.add(panel);
}

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>(){
    @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){
      if (restClient.setLoggerLevel(item.getModelObject().getName(),item.getModelObject().getLevel())) {
        info(getString("String_Node_Str"));
      }
 else {
        info(getString("String_Node_Str"));
      }
      target.addComponent(feedbackPanel);
    }
  }
);
  item.add(level);
}
Program: 61125
Project: 61125
Buggy source:
@Override public int size(){
  return getConfigurationsListDB().size();
}

Fixed version (ground truth):
@Override public int size(){
  return getAllConfigurations().size();
}
Program: 61126
Project: 61126
Buggy source:
protected void onUpdate(AjaxRequestTarget target){
  utility.updatePaginatorRows(Constants.CONF_CONFIGURATION_PAGINATOR_ROWS,paginatorRows);
  table.setRowsPerPage(paginatorRows);
  target.addComponent(container);
}

Fixed version (ground truth):
@Override protected void onUpdate(final AjaxRequestTarget target){
  if (restClient.setLoggerLevel(item.getModelObject().getName(),item.getModelObject().getLevel())) {
    info(getString("String_Node_Str"));
  }
 else {
    info(getString("String_Node_Str"));
  }
  target.addComponent(feedbackPanel);
}
Program: 61127
Project: 61127
Buggy source:
public Uid create(final PropagationMode propagationMode,final ObjectClass oclass,final Set<Attribute> attrs,final OperationOptions options,final Set<String> triedPropagationRequests){
  Uid result=null;
  if (propagationMode == PropagationMode.SYNC ? capabitilies.contains(ConnectorCapability.SYNC_CREATE) : capabitilies.contains(ConnectorCapability.ASYNC_CREATE)) {
    if (triedPropagationRequests != null) {
      triedPropagationRequests.add("String_Node_Str");
    }
    result=connector.create(oclass,attrs,options);
  }
  return result;
}

Fixed version (ground truth):
public Uid create(final PropagationMode propagationMode,final ObjectClass oclass,final Set<Attribute> attrs,final OperationOptions options,final Set<String> triedPropagationRequests){
  Uid result=null;
  if (propagationMode == PropagationMode.SYNC ? capabitilies.contains(ConnectorCapability.SYNC_CREATE) : capabitilies.contains(ConnectorCapability.ASYNC_CREATE)) {
    triedPropagationRequests.add("String_Node_Str");
    result=connector.create(oclass,attrs,options);
  }
  return result;
}
Program: 61128
Project: 61128
Buggy source:
public Uid update(final PropagationMode propagationMode,final ObjectClass objclass,final Uid uid,final Set<Attribute> replaceAttributes,final OperationOptions options,final Set<String> triedPropagationRequests){
  Uid result=null;
  if (propagationMode == PropagationMode.SYNC ? capabitilies.contains(ConnectorCapability.SYNC_UPDATE) : capabitilies.contains(ConnectorCapability.ASYNC_UPDATE)) {
    if (triedPropagationRequests != null) {
      triedPropagationRequests.add("String_Node_Str");
    }
    result=connector.update(objclass,uid,replaceAttributes,options);
  }
  return result;
}

Fixed version (ground truth):
public Uid update(final PropagationMode propagationMode,final ObjectClass objclass,final Uid uid,final Set<Attribute> replaceAttributes,final OperationOptions options,final Set<String> triedPropagationRequests){
  Uid result=null;
  if (propagationMode == PropagationMode.SYNC ? capabitilies.contains(ConnectorCapability.SYNC_UPDATE) : capabitilies.contains(ConnectorCapability.ASYNC_UPDATE)) {
    triedPropagationRequests.add("String_Node_Str");
    result=connector.update(objclass,uid,replaceAttributes,options);
  }
  return result;
}
Program: 61129
Project: 61129
Buggy source:
public void delete(final PropagationMode propagationMode,final ObjectClass objClass,final Uid uid,final OperationOptions options,final Set<String> triedPropagationRequests){
  if (propagationMode == PropagationMode.SYNC ? capabitilies.contains(ConnectorCapability.SYNC_DELETE) : capabitilies.contains(ConnectorCapability.ASYNC_DELETE)) {
    if (triedPropagationRequests != null) {
      triedPropagationRequests.add("String_Node_Str");
    }
    connector.delete(objClass,uid,options);
  }
}

Fixed version (ground truth):
public void delete(final PropagationMode propagationMode,final ObjectClass objClass,final Uid uid,final OperationOptions options,final Set<String> triedPropagationRequests){
  if (propagationMode == PropagationMode.SYNC ? capabitilies.contains(ConnectorCapability.SYNC_DELETE) : capabitilies.contains(ConnectorCapability.ASYNC_DELETE)) {
    triedPropagationRequests.add("String_Node_Str");
    connector.delete(objClass,uid,options);
  }
}
Program: 61132
Project: 61132
Buggy source:
public ResourceOperations(){
  toBeCreated=new HashSet<TargetResource>();
  toBeUpdated=new HashSet<TargetResource>();
  toBeDeleted=new HashSet<TargetResource>();
}

Fixed version (ground truth):
public ResourceOperations(){
  toBeCreated=new HashSet<TargetResource>();
  toBeUpdated=new HashSet<TargetResource>();
  toBeDeleted=new HashSet<TargetResource>();
  oldAccountIds=new HashMap<String,String>();
}
Program: 61133
Project: 61133
Buggy source:
public String getOldAccountId(){
  return oldAccountId;
}

Fixed version (ground truth):
public String getOldAccountId(final String resourceName){
  return oldAccountIds.get(resourceName);
}
Program: 61134
Project: 61134
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + toBeCreated + "String_Node_Str"+ "String_Node_Str"+ toBeUpdated+ "String_Node_Str"+ "String_Node_Str"+ toBeDeleted+ "String_Node_Str"+ "String_Node_Str"+ oldAccountId;
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + toBeCreated + "String_Node_Str"+ "String_Node_Str"+ toBeUpdated+ "String_Node_Str"+ "String_Node_Str"+ toBeDeleted+ "String_Node_Str"+ "String_Node_Str"+ oldAccountIds;
}
Program: 61135
Project: 61135
Buggy source:
/** 
 * Create a copy of old RoleTO
 * @param roleTO
 */
public void cloneOldRoleTO(RoleTO roleTO){
  oldRole=new RoleTO();
  oldRole.setId(roleTO.getId());
  oldRole.setName(new String(roleTO.getName()));
  oldRole.setParent(new Long(roleTO.getParent()));
  List<AttributeTO> attributes=new ArrayList<AttributeTO>();
  AttributeTO attributeTO;
  List<String> values;
  for (  AttributeTO attribute : roleTO.getAttributes()) {
    attributeTO=new AttributeTO();
    attributeTO.setSchema(new String(attribute.getSchema()));
    values=new ArrayList<String>();
    for (    String val : attribute.getValues()) {
      values.add(val);
    }
    attributeTO.setValues(values);
    attributes.add(attributeTO);
  }
  oldRole.setAttributes(attributes);
  oldRole.setResources(roleTO.getResources());
  List<String> entList=new ArrayList<String>();
  for (  String entitlement : roleTO.getEntitlements())   entList.add(entitlement);
  oldRole.setEntitlements(entList);
}

Fixed version (ground truth):
/** 
 * Create a copy of old RoleTO
 * @param roleTO
 */
public void cloneOldRoleTO(RoleTO roleTO){
  oldRole=new RoleTO();
  oldRole.setId(roleTO.getId());
  oldRole.setName(new String(roleTO.getName()));
  oldRole.setParent(new Long(roleTO.getParent()));
  List<AttributeTO> attributes=new ArrayList<AttributeTO>();
  AttributeTO attributeTO;
  List<String> values;
  for (  AttributeTO attribute : roleTO.getAttributes()) {
    attributeTO=new AttributeTO();
    attributeTO.setSchema(new String(attribute.getSchema()));
    values=new ArrayList<String>();
    for (    String val : attribute.getValues()) {
      values.add(val);
    }
    attributeTO.setValues(values);
    attributes.add(attributeTO);
  }
  oldRole.setAttributes(attributes);
  oldRole.setResources(roleTO.getResources());
  List<String> entList=new ArrayList<String>();
  for (  String entitlement : roleTO.getEntitlements()) {
    entList.add(entitlement);
  }
  oldRole.setEntitlements(entList);
}
Program: 61136
Project: 61136
Buggy source:
@Override protected void onError(AjaxRequestTarget target,Form form){
  target.addComponent(feedbackPanel);
}

Fixed version (ground truth):
@Override protected void onError(final AjaxRequestTarget target,final Form form){
  target.addComponent(feedbackPanel);
}
Program: 61137
Project: 61137
Buggy source:
@Override protected void onSubmit(final AjaxRequestTarget target,final Form form){
  RoleTO roleTO=(RoleTO)form.getDefaultModelObject();
  boolean res=false;
  try {
    Set<String> resourcesSet=new HashSet<String>(resourcesPalette.getModelCollection().size());
    for (    ResourceTO resourceTO : resourcesPalette.getModelCollection()) {
      resourcesSet.add(resourceTO.getName());
    }
    roleTO.setResources(resourcesSet);
    List<String> entitlementList=new ArrayList<String>(entitlementsPalette.getModelCollection().size());
    for (    String entitlement : entitlementsPalette.getModelCollection()) {
      entitlementList.add(entitlement);
    }
    roleTO.setEntitlements(entitlementList);
    roleTO.setAttributes(getRoleAttributes());
    if (createFlag) {
      roleRestClient.createRole(roleTO);
      Roles callerPage=(Roles)basePage;
      callerPage.setOperationResult(true);
      window.close(target);
    }
 else {
      setupRoleMod(roleTO);
      if (roleMod != null) {
        LOG.debug("String_Node_Str",roleMod);
        res=roleRestClient.updateRole(roleMod);
        if (!res) {
          error(getString("String_Node_Str"));
        }
 else {
          Roles callerPage=(Roles)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(final AjaxRequestTarget target,final Form form){
  RoleTO roleTO=(RoleTO)form.getDefaultModelObject();
  boolean res=false;
  try {
    Set<String> resourcesSet=new HashSet<String>(resourcesPalette.getModelCollection().size());
    for (    ResourceTO resourceTO : resourcesPalette.getModelCollection()) {
      resourcesSet.add(resourceTO.getName());
    }
    roleTO.setResources(resourcesSet);
    List<String> entitlementList=new ArrayList<String>(entitlementsPalette.getModelCollection().size());
    for (    String entitlement : entitlementsPalette.getModelCollection()) {
      entitlementList.add(entitlement);
    }
    roleTO.setEntitlements(entitlementList);
    roleTO.setAttributes(getRoleAttributes());
    if (createFlag) {
      roleRestClient.createRole(roleTO);
    }
 else {
      setupRoleMod(roleTO);
      if (roleMod != null) {
        roleRestClient.updateRole(roleMod);
      }
    }
    ((Roles)basePage).setOperationResult(true);
    window.close(target);
  }
 catch (  Exception e) {
    error(getString("String_Node_Str") + "String_Node_Str" + e.getMessage());
  }
}
Program: 61138
Project: 61138
Buggy source:
public void setupRoleMod(final RoleTO roleTO){
  if (!oldRole.getName().equals(roleTO.getName())) {
    roleMod=new RoleMod();
    roleMod.setName(roleTO.getName());
  }
  for (  AttributeTO attributeTO : roleTO.getAttributes()) {
    searchAndUpdateAttribute(attributeTO);
  }
  for (  String resource : roleTO.getResources()) {
    searchAndAddResource(resource);
  }
  for (  String resource : oldRole.getResources()) {
    searchAndDropResource(resource,roleTO);
  }
  if (!oldRole.getEntitlements().equals(roleTO.getEntitlements()))   roleMod.setEntitlements(roleTO.getEntitlements());
  if (roleMod != null) {
    roleMod.setId(oldRole.getId());
    if (!oldRole.getEntitlements().equals(roleTO.getEntitlements())) {
      LOG.debug("String_Node_Str",oldRole.getEntitlements());
      LOG.debug("String_Node_Str",roleTO.getEntitlements());
      roleMod.setEntitlements(roleTO.getEntitlements());
    }
 else     roleMod.setEntitlements(oldRole.getEntitlements());
  }
}

Fixed version (ground truth):
public void setupRoleMod(final RoleTO roleTO){
  if (!oldRole.getName().equals(roleTO.getName())) {
    roleMod=new RoleMod();
    roleMod.setName(roleTO.getName());
  }
  for (  AttributeTO attributeTO : roleTO.getAttributes()) {
    searchAndUpdateAttribute(attributeTO);
  }
  for (  String resource : roleTO.getResources()) {
    searchAndAddResource(resource);
  }
  for (  String resource : oldRole.getResources()) {
    searchAndDropResource(resource,roleTO);
  }
  if (!oldRole.getEntitlements().equals(roleTO.getEntitlements())) {
    roleMod.setEntitlements(roleTO.getEntitlements());
  }
  if (roleMod != null) {
    roleMod.setId(oldRole.getId());
    if (!oldRole.getEntitlements().equals(roleTO.getEntitlements())) {
      LOG.debug("String_Node_Str",oldRole.getEntitlements());
      LOG.debug("String_Node_Str",roleTO.getEntitlements());
      roleMod.setEntitlements(roleTO.getEntitlements());
    }
 else {
      roleMod.setEntitlements(oldRole.getEntitlements());
    }
  }
}
Program: 61140
Project: 61140
Buggy source:
/** 
 * @see BaseTreePage#getTree()
 */
protected AbstractTree getTree(){
  return tree;
}

Fixed version (ground truth):
protected AbstractTree getTree(){
  return tree;
}
Program: 61141
Project: 61141
Buggy source:
public void onClose(AjaxRequestTarget target){
  target.addComponent(container);
  if (operationResult) {
    getSession().info(getString("String_Node_Str"));
  }
  setResponsePage(new Roles(null));
}

Fixed version (ground truth):
@Override public void onClose(final AjaxRequestTarget target){
  target.addComponent(container);
  if (operationResult) {
    getSession().info(getString("String_Node_Str"));
  }
  setResponsePage(new Roles(null));
}
Program: 61142
Project: 61142
Buggy source:
public Roles(PageParameters parameters){
  super(parameters);
  add(createRoleWin=new ModalWindow("String_Node_Str"));
  createRoleWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
  createRoleWin.setInitialHeight(WIN_USER_HEIGHT);
  createRoleWin.setInitialWidth(WIN_USER_WIDTH);
  createRoleWin.setPageMapName("String_Node_Str");
  createRoleWin.setCookieName("String_Node_Str");
  container=new WebMarkupContainer("String_Node_Str");
  IColumn columns[]=new IColumn[]{new PropertyTreeColumn(new ColumnLocation(Alignment.LEFT,30,Unit.EM),getString("String_Node_Str"),"String_Node_Str"),new PropertyEditableColumn(new ColumnLocation(Alignment.LEFT,20,Unit.EM),getString("String_Node_Str"),"String_Node_Str",createRoleWin,Roles.this)};
  Form form=new Form("String_Node_Str");
  add(form);
  SyncopeRoleTree roleTree=new SyncopeRoleTree(restClient);
  tree=new TreeTable("String_Node_Str",roleTree.createTreeModel(),columns);
  form.add(tree);
  tree.getTreeState().expandAll();
  tree.updateTree();
  container.add(tree);
  container.setOutputMarkupId(true);
  form.add(container);
  setWindowClosedCallback(createRoleWin,container);
}

Fixed version (ground truth):
public Roles(final PageParameters parameters){
  super(parameters);
  add(createRoleWin=new ModalWindow("String_Node_Str"));
  createRoleWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
  createRoleWin.setInitialHeight(WIN_USER_HEIGHT);
  createRoleWin.setInitialWidth(WIN_USER_WIDTH);
  createRoleWin.setPageMapName("String_Node_Str");
  createRoleWin.setCookieName("String_Node_Str");
  container=new WebMarkupContainer("String_Node_Str");
  IColumn[] columns=new IColumn[]{new PropertyTreeColumn(new ColumnLocation(Alignment.LEFT,30,Unit.EM),getString("String_Node_Str"),"String_Node_Str"),new PropertyEditableColumn(new ColumnLocation(Alignment.LEFT,20,Unit.EM),getString("String_Node_Str"),"String_Node_Str",createRoleWin,Roles.this)};
  Form form=new Form("String_Node_Str");
  add(form);
  tree=new TreeTable("String_Node_Str",roleTreeBuilder.build(),columns);
  form.add(tree);
  tree.getTreeState().expandAll();
  tree.updateTree();
  container.add(tree);
  container.setOutputMarkupId(true);
  form.add(container);
  createRoleWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    @Override public void onClose(    final AjaxRequestTarget target){
      target.addComponent(container);
      if (operationResult) {
        getSession().info(getString("String_Node_Str"));
      }
      setResponsePage(new Roles(null));
    }
  }
);
}
Program: 61143
Project: 61143
Buggy source:
@Override public void onClick(AjaxRequestTarget target){
  createConfigWin.setPageCreator(new ModalWindow.PageCreator(){
    public Page createPage(){
      ConfigurationModalPage window=new ConfigurationModalPage(Configuration.this,createConfigWin,new ConfigurationTO(),true);
      return window;
    }
  }
);
  createConfigWin.show(target);
}

Fixed version (ground truth):
@Override public void onClick(AjaxRequestTarget target){
  createConfigWin.setPageCreator(new ModalWindow.PageCreator(){
    @Override public Page createPage(){
      ConfigurationModalPage window=new ConfigurationModalPage(Configuration.this,createConfigWin,new ConfigurationTO(),true);
      return window;
    }
  }
);
  createConfigWin.show(target);
}
Program: 61145
Project: 61145
Buggy source:
public Page createPage(){
  ConfigurationModalPage window=new ConfigurationModalPage(Configuration.this,createConfigWin,new ConfigurationTO(),true);
  return window;
}

Fixed version (ground truth):
@Override public Page createPage(){
  ConfigurationModalPage window=new ConfigurationModalPage(Configuration.this,createConfigWin,new ConfigurationTO(),true);
  return window;
}
Program: 61146
Project: 61146
Buggy source:
public <T extends AbstractAttrValue>List<String> getValuesAsStrings(){
  List<String> result;
  if (getUniqueValue() != null) {
    result=Collections.singletonList(getUniqueValue().getValueAsString());
  }
 else {
    result=new ArrayList<String>(getValues().size());
    for (    AbstractAttrValue attributeValue : getValues()) {
      result.add(attributeValue.getValueAsString());
    }
    if (getUniqueValue() != null) {
      result.add(getUniqueValue().getValueAsString());
    }
  }
  return result;
}

Fixed version (ground truth):
public <T extends AbstractAttrValue>List<String> getValuesAsStrings(){
  List<String> result;
  if (getUniqueValue() != null) {
    result=Collections.singletonList(getUniqueValue().getValueAsString());
  }
 else {
    result=new ArrayList<String>(getValues().size());
    for (    AbstractAttrValue attributeValue : getValues()) {
      result.add(attributeValue.getValueAsString());
    }
  }
  return result;
}
Program: 61147
Project: 61147
Buggy source:
@Override public boolean isValid(final AbstractAttr object,final ConstraintValidatorContext context){
  boolean isValid;
  if (object == null) {
    isValid=true;
  }
 else {
    if (object.getSchema().isUniqueConstraint()) {
      isValid=object.getValues().isEmpty() && object.getUniqueValue() != null;
    }
 else {
      isValid=!object.getValues().isEmpty() && object.getUniqueValue() == null;
      if (!object.getSchema().isMultivalue()) {
        isValid&=object.getValues().size() == 1;
      }
    }
    if (!isValid) {
      context.disableDefaultConstraintViolation();
      context.buildConstraintViolationWithTemplate(EntityViolationType.InvalidValueList.toString()).addConstraintViolation();
    }
  }
  return isValid;
}

Fixed version (ground truth):
@Override public boolean isValid(final AbstractAttr object,final ConstraintValidatorContext context){
  boolean isValid;
  if (object == null) {
    isValid=true;
  }
 else {
    if (object.getSchema().isUniqueConstraint()) {
      isValid=object.getValues().isEmpty() && object.getUniqueValue() != null;
    }
 else {
      isValid=!object.getValues().isEmpty() && object.getUniqueValue() == null;
      if (!object.getSchema().isMultivalue()) {
        isValid&=object.getValues().size() == 1;
      }
    }
    if (!isValid) {
      LOG.error("String_Node_Str" + "String_Node_Str" + object.getSchema().getName() + "String_Node_Str"+ "String_Node_Str",object.getValuesAsStrings());
      context.disableDefaultConstraintViolation();
      context.buildConstraintViolationWithTemplate(EntityViolationType.InvalidValueList.toString()).addConstraintViolation();
    }
  }
  return isValid;
}
Program: 61150
Project: 61150
Buggy source:
/** 
 * @param username
 * @param password
 * @return
 */
public SyncopeUser authenticate(String username,String password){
  SyncopeUser user=null;
  String roles="String_Node_Str";
  if ("String_Node_Str".equals(username) && "String_Node_Str".equals(password)) {
    List<String> rolesList=getAdminRoles();
    for (int i=0; i < rolesList.size(); i++) {
      String role=rolesList.get(i);
      roles+=role;
      if (i != rolesList.size())       roles+="String_Node_Str";
    }
    user=new SyncopeUser(username,roles);
    return user;
  }
 else   if ("String_Node_Str".equals(username) && "String_Node_Str".equals(password)) {
    List<String> rolesList=getManagerRoles();
    for (int i=0; i < rolesList.size(); i++) {
      String role=rolesList.get(i);
      roles+=role;
      if (i != rolesList.size())       roles+="String_Node_Str";
    }
    user=new SyncopeUser(username,roles);
    return user;
  }
 else   return null;
}

Fixed version (ground truth):
/** 
 * Authenticate the user.
 * @param username
 * @param password
 * @return SyncopeUser object if the authorization succedes, null valueotherwise.
 */
public SyncopeUser authenticate(String username,String password){
  SyncopeUser user=null;
  String roles="String_Node_Str";
  ((CommonsClientHttpRequestFactory)restClient.getRestTemplate().getRequestFactory()).getHttpClient().getState().setCredentials(AuthScope.ANY,new UsernamePasswordCredentials(username,password));
  List<String> auths;
  try {
    auths=Arrays.asList(restClient.getRestTemplate().getForObject(restClient.getBaseURL() + "String_Node_Str",String[].class));
  }
 catch (  HttpClientErrorException e) {
    ((CommonsClientHttpRequestFactory)restClient.getRestTemplate().getRequestFactory()).getHttpClient().getState().setCredentials(AuthScope.ANY,null);
    getSession().error(e.getMessage());
    return null;
  }
  if (auths != null && auths.size() > 0) {
    for (int i=0; i < auths.size(); i++) {
      String role=auths.get(i);
      roles+=role;
      if (i != auths.size())       roles+="String_Node_Str";
    }
    user=new SyncopeUser(username,roles);
    return user;
  }
 else {
    ((CommonsClientHttpRequestFactory)restClient.getRestTemplate().getRequestFactory()).getHttpClient().getState().setCredentials(AuthScope.ANY,null);
    getSession().error(getString("String_Node_Str"));
    return null;
  }
}
Program: 61151
Project: 61151
Buggy source:
@Override public void onSubmit(){
  SyncopeUser user=authenticate(usernameField.getRawInput(),passwordField.getRawInput());
  if (user != null) {
    ((SyncopeSession)Session.get()).setUser(user);
    setResponsePage(new WelcomePage(null));
  }
 else   error(getString("String_Node_Str"));
}

Fixed version (ground truth):
@Override public void onSubmit(){
  SyncopeUser user=authenticate(usernameField.getRawInput(),passwordField.getRawInput());
  if (user != null) {
    ((SyncopeSession)Session.get()).setUser(user);
    setResponsePage(new WelcomePage(null));
  }
}
Program: 61152
Project: 61152
Buggy source:
public Login(PageParameters parameters){
  super(parameters);
  form=new Form("String_Node_Str");
  usernameField=new TextField("String_Node_Str",new Model());
  usernameField.setMarkupId("String_Node_Str");
  form.add(usernameField);
  passwordField=new PasswordTextField("String_Node_Str",new Model());
  passwordField.setMarkupId("String_Node_Str");
  form.add(passwordField);
  languageSelect=new LocaleDropDown("String_Node_Str",Arrays.asList(new Locale[]{Locale.ENGLISH,Locale.ITALIAN}));
  form.add(languageSelect);
  Button submitButton=new Button("String_Node_Str",new Model(getString("String_Node_Str"))){
    @Override public void onSubmit(){
      SyncopeUser user=authenticate(usernameField.getRawInput(),passwordField.getRawInput());
      if (user != null) {
        ((SyncopeSession)Session.get()).setUser(user);
        setResponsePage(new WelcomePage(null));
      }
 else       error(getString("String_Node_Str"));
    }
  }
;
  submitButton.setDefaultFormProcessing(false);
  form.add(submitButton);
  add(form);
  add(new FeedbackPanel("String_Node_Str"));
}

Fixed version (ground truth):
public Login(PageParameters parameters){
  super(parameters);
  form=new Form("String_Node_Str");
  usernameField=new TextField("String_Node_Str",new Model());
  usernameField.setMarkupId("String_Node_Str");
  form.add(usernameField);
  passwordField=new PasswordTextField("String_Node_Str",new Model());
  passwordField.setMarkupId("String_Node_Str");
  form.add(passwordField);
  languageSelect=new LocaleDropDown("String_Node_Str",Arrays.asList(new Locale[]{Locale.ENGLISH,Locale.ITALIAN}));
  form.add(languageSelect);
  Button submitButton=new Button("String_Node_Str",new Model(getString("String_Node_Str"))){
    @Override public void onSubmit(){
      SyncopeUser user=authenticate(usernameField.getRawInput(),passwordField.getRawInput());
      if (user != null) {
        ((SyncopeSession)Session.get()).setUser(user);
        setResponsePage(new WelcomePage(null));
      }
    }
  }
;
  submitButton.setDefaultFormProcessing(false);
  form.add(submitButton);
  add(form);
  add(new FeedbackPanel("String_Node_Str"));
}
Program: 61154
Project: 61154
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());
    }
  }
  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);
}

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());
    }
  }
  entityManager.remove(entry);
}
Program: 61155
Project: 61155
Buggy source:
/** 
 * @see com.opensymphony.workflow.spi.WorkflowStore#query(com.opensymphony.workflow.query.WorkflowExpressionQuery)
 */
@Override @Transactional(readOnly=true) public List query(final WorkflowExpressionQuery query) throws StoreException {
  Class entityClass=getQueryClass(query.getExpression(),null);
  Criterion expr;
  if (query.getExpression().isNested()) {
    expr=buildNested((NestedExpression)query.getExpression());
  }
 else {
    expr=queryComparison((FieldExpression)query.getExpression());
  }
  Session hibernateSess=(Session)entityManager.getDelegate();
  Criteria criteria=hibernateSess.createCriteria(entityClass);
  criteria.add(expr);
  List<Long> results=new ArrayList<Long>();
  Object next;
  Long item;
  for (Iterator iter=criteria.list().iterator(); iter.hasNext(); ) {
    next=iter.next();
    if (next instanceof AbstractJPAStep) {
      AbstractJPAStep step=(AbstractJPAStep)next;
      item=new Long(step.getEntryId());
    }
 else {
      WorkflowEntry entry=(WorkflowEntry)next;
      item=new Long(entry.getId());
    }
    results.add(item);
  }
  return results;
}

Fixed version (ground truth):
/** 
 * @see com.opensymphony.workflow.spi.WorkflowStore#query(com.opensymphony.workflow.query.WorkflowExpressionQuery)
 */
@Override public List query(final WorkflowExpressionQuery query) throws StoreException {
  Class entityClass=getQueryClass(query.getExpression(),null);
  Criterion expr;
  if (query.getExpression().isNested()) {
    expr=buildNested((NestedExpression)query.getExpression());
  }
 else {
    expr=queryComparison((FieldExpression)query.getExpression());
  }
  Session hibernateSess=(Session)entityManager.getDelegate();
  Criteria criteria=hibernateSess.createCriteria(entityClass);
  criteria.add(expr);
  List<Long> results=new ArrayList<Long>();
  Object next;
  Long item;
  for (Iterator iter=criteria.list().iterator(); iter.hasNext(); ) {
    next=iter.next();
    if (next instanceof AbstractJPAStep) {
      AbstractJPAStep step=(AbstractJPAStep)next;
      item=new Long(step.getEntryId());
    }
 else {
      WorkflowEntry entry=(WorkflowEntry)next;
      item=new Long(entry.getId());
    }
    results.add(item);
  }
  return results;
}
Program: 61156
Project: 61156
Buggy source:
@Override @Transactional(readOnly=true) public WorkflowEntry findEntry(final long entryId) throws StoreException {
  JPAWorkflowEntry entry=workflowEntryDAO.find(entryId);
  if (entry == null) {
    throw new StoreException("String_Node_Str" + entryId);
  }
  return entry;
}

Fixed version (ground truth):
@Override public WorkflowEntry findEntry(final long entryId) throws StoreException {
  JPAWorkflowEntry entry=workflowEntryDAO.find(entryId);
  if (entry == null) {
    throw new StoreException("String_Node_Str" + entryId);
  }
  return entry;
}
Program: 61157
Project: 61157
Buggy source:
@Override @Transactional(readOnly=true) public List findHistorySteps(final long entryId) throws StoreException {
  final JPAWorkflowEntry entry=getEntry(entryId);
  return entry.getHistorySteps();
}

Fixed version (ground truth):
@Override public List findHistorySteps(final long entryId) throws StoreException {
  final JPAWorkflowEntry entry=getEntry(entryId);
  return entry.getHistorySteps();
}
Program: 61158
Project: 61158
Buggy source:
@Override @Transactional(readOnly=true) public List findCurrentSteps(final long entryId) throws StoreException {
  JPAWorkflowEntry entry=getEntry(entryId);
  return entry.getCurrentSteps();
}

Fixed version (ground truth):
@Override public List findCurrentSteps(final long entryId) throws StoreException {
  JPAWorkflowEntry entry=getEntry(entryId);
  return entry.getCurrentSteps();
}
Program: 61159
Project: 61159
Buggy source:
@Override @Transactional(readOnly=true) public PropertySet getPropertySet(final long entryId) throws StoreException {
  if (propertySetDelegate == null) {
    throw new StoreException("String_Node_Str");
  }
  return propertySetDelegate.getPropertySet(entryId);
}

Fixed version (ground truth):
@Override public PropertySet getPropertySet(final long entryId) throws StoreException {
  if (propertySetDelegate == null) {
    throw new StoreException("String_Node_Str");
  }
  return propertySetDelegate.getPropertySet(entryId);
}
Program: 61160
Project: 61160
Buggy source:
public MAttr(){
  values=new ArrayList<MAttrValue>();
}

Fixed version (ground truth):
public MAttr(){
  super();
  values=new ArrayList<MAttrValue>();
}
Program: 61161
Project: 61161
Buggy source:
public RAttr(){
  values=new ArrayList<RAttrValue>();
}

Fixed version (ground truth):
public RAttr(){
  super();
  values=new ArrayList<RAttrValue>();
}
Program: 61162
Project: 61162
Buggy source:
@Override public boolean isValid(final AbstractAttr object,final ConstraintValidatorContext context){
  boolean isValid;
  if (object == null) {
    isValid=true;
  }
 else {
    if (object.getSchema().isUniqueConstraint()) {
      isValid=object.getValues().isEmpty() && object.getUniqueValue() != null;
    }
 else {
      isValid=!object.getValues().isEmpty() && object.getUniqueValue() == null;
      if (!object.getSchema().isMultivalue()) {
        isValid&=object.getValues().size() == 1 && object.getUniqueValue() == null;
      }
    }
    if (!isValid) {
      context.disableDefaultConstraintViolation();
      context.buildConstraintViolationWithTemplate(EntityViolationType.InvalidValueList.toString()).addConstraintViolation();
    }
  }
  return isValid;
}

Fixed version (ground truth):
@Override public boolean isValid(final AbstractAttr object,final ConstraintValidatorContext context){
  boolean isValid;
  if (object == null) {
    isValid=true;
  }
 else {
    if (object.getSchema().isUniqueConstraint()) {
      isValid=object.getValues().isEmpty() && object.getUniqueValue() != null;
    }
 else {
      isValid=!object.getValues().isEmpty() && object.getUniqueValue() == null;
      if (!object.getSchema().isMultivalue()) {
        isValid&=object.getValues().size() == 1;
      }
    }
    if (!isValid) {
      context.disableDefaultConstraintViolation();
      context.buildConstraintViolationWithTemplate(EntityViolationType.InvalidValueList.toString()).addConstraintViolation();
    }
  }
  return isValid;
}