nus-yam/ex-repair huggingface dataset:
Program: 129895
Project: 129895
Buggy source:
protected PropertiesWizardPage(String pageName,final Property property,IPath destinationPath,boolean readOnly,boolean editPath,String lastVersionFound){
  super(pageName);
  statusHelper=new StatusHelper(CoreRuntimePlugin.getInstance().getProxyRepositoryFactory());
  this.destinationPath=destinationPath;
  this.readOnly=readOnly;
  this.editPath=editPath;
  orignalVersion2=property.getVersion();
  nameStatus=createOkStatus();
  purposeStatus=createOkStatus();
  commentStatus=createOkStatus();
  this.lastVersionFound=lastVersionFound;
  Job job=new Job("String_Node_Str"){
    @Override protected IStatus run(    IProgressMonitor monitor){
      ERepositoryObjectType type=ERepositoryObjectType.getItemType(property.getItem());
      try {
        if (GlobalServiceRegister.getDefault().isServiceRegistered(IProxyRepositoryService.class)) {
          IProxyRepositoryService service=(IProxyRepositoryService)GlobalServiceRegister.getDefault().getService(IProxyRepositoryService.class);
          listExistingObjects=service.getProxyRepositoryFactory().getAll(type,true,false);
        }
      }
 catch (      PersistenceException e) {
        return new org.eclipse.core.runtime.Status(IStatus.ERROR,"String_Node_Str",1,"String_Node_Str",e);
      }
      retrieveNameFinished=true;
      return Status.OK_STATUS;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.BUILD);
  job.schedule();
  this.property=property;
}

Fixed version (ground truth):
protected PropertiesWizardPage(String pageName,final Property property,IPath destinationPath,boolean readOnly,boolean editPath,String lastVersionFound){
  super(pageName);
  statusHelper=new StatusHelper(CoreRuntimePlugin.getInstance().getProxyRepositoryFactory());
  this.destinationPath=destinationPath;
  this.readOnly=readOnly;
  this.editPath=editPath;
  nameStatus=createOkStatus();
  purposeStatus=createOkStatus();
  commentStatus=createOkStatus();
  this.lastVersionFound=lastVersionFound;
  Job job=new Job("String_Node_Str"){
    @Override protected IStatus run(    IProgressMonitor monitor){
      ERepositoryObjectType type=ERepositoryObjectType.getItemType(property.getItem());
      try {
        if (GlobalServiceRegister.getDefault().isServiceRegistered(IProxyRepositoryService.class)) {
          IProxyRepositoryService service=(IProxyRepositoryService)GlobalServiceRegister.getDefault().getService(IProxyRepositoryService.class);
          listExistingObjects=service.getProxyRepositoryFactory().getAll(type,true,false);
        }
      }
 catch (      PersistenceException e) {
        return new org.eclipse.core.runtime.Status(IStatus.ERROR,"String_Node_Str",1,"String_Node_Str",e);
      }
      retrieveNameFinished=true;
      return Status.OK_STATUS;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.BUILD);
  job.schedule();
  this.property=property;
}
Program: 129897
Project: 129897
Buggy source:
@Override public boolean performCancel(){
  docItem.getProperty().setVersion(PropertiesWizardPage.orignalVersion2);
  return super.performCancel();
}

Fixed version (ground truth):
@Override public boolean performCancel(){
  docItem.getProperty().setVersion(mainPage.getOrignalVersion());
  return super.performCancel();
}
Program: 129898
Project: 129898
Buggy source:
/** 
 * Getter for dbmsSet.
 * @return the dbmsSet
 */
static Set<Dbms> getDbmsSet(){
  return dbmsSet;
}

Fixed version (ground truth):
/** 
 * Getter for dbmsSet.
 * @return the dbmsSet
 */
public static Set<Dbms> getDbmsSet(){
  return dbmsSet;
}
Program: 129899
Project: 129899
Buggy source:
protected PropertiesWizardPage(String pageName,final Property property,IPath destinationPath,boolean readOnly,boolean editPath,String lastVersionFound){
  super(pageName);
  statusHelper=new StatusHelper(CoreRuntimePlugin.getInstance().getProxyRepositoryFactory());
  this.destinationPath=destinationPath;
  this.readOnly=readOnly;
  this.editPath=editPath;
  nameStatus=createOkStatus();
  purposeStatus=createOkStatus();
  commentStatus=createOkStatus();
  this.lastVersionFound=lastVersionFound;
  Job job=new Job("String_Node_Str"){
    @Override protected IStatus run(    IProgressMonitor monitor){
      ERepositoryObjectType type=ERepositoryObjectType.getItemType(property.getItem());
      try {
        if (GlobalServiceRegister.getDefault().isServiceRegistered(IProxyRepositoryService.class)) {
          IProxyRepositoryService service=(IProxyRepositoryService)GlobalServiceRegister.getDefault().getService(IProxyRepositoryService.class);
          listExistingObjects=service.getProxyRepositoryFactory().getAll(type,true,false);
        }
      }
 catch (      PersistenceException e) {
        return new org.eclipse.core.runtime.Status(IStatus.ERROR,"String_Node_Str",1,"String_Node_Str",e);
      }
      retrieveNameFinished=true;
      return Status.OK_STATUS;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.BUILD);
  job.schedule();
  this.property=property;
}

Fixed version (ground truth):
protected PropertiesWizardPage(String pageName,final Property property,IPath destinationPath,boolean readOnly,boolean editPath,String lastVersionFound){
  super(pageName);
  statusHelper=new StatusHelper(CoreRuntimePlugin.getInstance().getProxyRepositoryFactory());
  this.destinationPath=destinationPath;
  this.readOnly=readOnly;
  this.editPath=editPath;
  orignalVersion2=property.getVersion();
  nameStatus=createOkStatus();
  purposeStatus=createOkStatus();
  commentStatus=createOkStatus();
  this.lastVersionFound=lastVersionFound;
  Job job=new Job("String_Node_Str"){
    @Override protected IStatus run(    IProgressMonitor monitor){
      ERepositoryObjectType type=ERepositoryObjectType.getItemType(property.getItem());
      try {
        if (GlobalServiceRegister.getDefault().isServiceRegistered(IProxyRepositoryService.class)) {
          IProxyRepositoryService service=(IProxyRepositoryService)GlobalServiceRegister.getDefault().getService(IProxyRepositoryService.class);
          listExistingObjects=service.getProxyRepositoryFactory().getAll(type,true,false);
        }
      }
 catch (      PersistenceException e) {
        return new org.eclipse.core.runtime.Status(IStatus.ERROR,"String_Node_Str",1,"String_Node_Str",e);
      }
      retrieveNameFinished=true;
      return Status.OK_STATUS;
    }
  }
;
  job.setUser(false);
  job.setPriority(Job.BUILD);
  job.schedule();
  this.property=property;
}
Program: 129900
Project: 129900
Buggy source:
public Object fromJsonToObject(JSONObject ob,Class<?> clazz) throws JSONException {
  Object o=null;
  try {
    o=clazz.newInstance();
    for (    Field f : clazz.getDeclaredFields()) {
      String name=f.getName();
      String upperName=name.substring(0,1).toUpperCase() + name.substring(1);
      Method m=clazz.getDeclaredMethod("String_Node_Str" + upperName,new Class[]{f.getType()});
      Object value=ob.get(name);
      if (f.getType().isAssignableFrom(String.class) && JSONObject.NULL == value)       value="String_Node_Str";
      m.invoke(o,value);
    }
  }
 catch (  Exception e) {
    throw new JSONException(e);
  }
  return o;
}

Fixed version (ground truth):
public Object fromJsonToObject(JSONObject ob,Class<?> clazz) throws JSONException {
  Object o=null;
  try {
    o=clazz.newInstance();
    for (    Field f : clazz.getDeclaredFields()) {
      String name=f.getName();
      String upperName=name.substring(0,1).toUpperCase() + name.substring(1);
      try {
        Method m=clazz.getDeclaredMethod("String_Node_Str" + upperName,new Class[]{f.getType()});
        Object value=ob.get(name);
        if (f.getType().isAssignableFrom(String.class) && JSONObject.NULL == value)         value="String_Node_Str";
        m.invoke(o,value);
      }
 catch (      NoSuchMethodException nsme) {
        log.equals(nsme);
      }
    }
  }
 catch (  Exception e) {
    throw new JSONException(e);
  }
  return o;
}
Program: 129901
Project: 129901
Buggy source:
public static void addTableForSpecifiedDataPackage(DatabaseConnection dbconn,MetadataTable dbtable){
  IMetadataConnection imetadataConnection=ConvertionHelper.convert(dbconn);
  DatabaseConnection conn=(DatabaseConnection)imetadataConnection.getCurrentConnection();
  Collection<orgomg.cwm.objectmodel.core.Package> newDataPackage=EcoreUtil.copyAll(dbconn.getDataPackage());
  ConnectionHelper.addPackages(newDataPackage,conn);
  String catalog="String_Node_Str";
  String schema="String_Node_Str";
  EObject container=dbtable.eContainer();
  if (container != null) {
    if (container instanceof Schema) {
      schema=((Schema)container).getName();
      EObject c=container.eContainer();
      if (c != null && c instanceof Catalog) {
        catalog=((Catalog)c).getName();
      }
    }
 else     if (container instanceof Catalog) {
      catalog=((Catalog)container).getName();
    }
  }
  boolean isAccess=EDatabaseTypeName.ACCESS.getDisplayName().equals(imetadataConnection.getDbType());
  if (!isAccess) {
    schema=ExtractMetaDataUtils.getMeataConnectionSchema(imetadataConnection);
  }
  addTableForTemCatalogOrSchema(catalog,schema,dbconn,dbtable,imetadataConnection);
}

Fixed version (ground truth):
public static void addTableForSpecifiedDataPackage(DatabaseConnection dbconn,MetadataTable dbtable){
  IMetadataConnection imetadataConnection=ConvertionHelper.convert(dbconn);
  DatabaseConnection conn=(DatabaseConnection)imetadataConnection.getCurrentConnection();
  Collection<orgomg.cwm.objectmodel.core.Package> newDataPackage=EcoreUtil.copyAll(dbconn.getDataPackage());
  ConnectionHelper.addPackages(newDataPackage,conn);
  String catalog=imetadataConnection.getDatabase();
  String schema="String_Node_Str";
  EObject container=dbtable.eContainer();
  if (container != null) {
    if (container instanceof Schema) {
      schema=((Schema)container).getName();
      EObject c=container.eContainer();
      if (c != null && c instanceof Catalog) {
        catalog=((Catalog)c).getName();
      }
    }
 else     if (container instanceof Catalog) {
      catalog=((Catalog)container).getName();
    }
  }
  boolean isAccess=EDatabaseTypeName.ACCESS.getDisplayName().equals(imetadataConnection.getDbType());
  if (!isAccess) {
    schema=ExtractMetaDataUtils.getMeataConnectionSchema(imetadataConnection);
  }
  addTableForTemCatalogOrSchema(catalog,schema,dbconn,dbtable,imetadataConnection);
}
Program: 129902
Project: 129902
Buggy source:
public static String getPattern(ERepositoryObjectType type){
  if (type == ERepositoryObjectType.FOLDER) {
    return FOLDER_PATTERN;
  }
 else   if (type == ERepositoryObjectType.PROCESS || type == ERepositoryObjectType.JOBLET) {
    return CODE_ITEM_PATTERN;
  }
 else   if (type == ERepositoryObjectType.ROUTINES) {
    return ROUTINES_ITEM_PATTERN;
  }
 else   if (type == ERepositoryObjectType.TDQ_JRAXML_ELEMENT || type == ERepositoryObjectType.TDQ_DATA_PROFILING || type == ERepositoryObjectType.TDQ_ANALYSIS_ELEMENT || type == ERepositoryObjectType.TDQ_REPORT_ELEMENT || type == ERepositoryObjectType.TDQ_LIBRARIES || type == ERepositoryObjectType.TDQ_PATTERN_ELEMENT || type == ERepositoryObjectType.TDQ_PATTERN_REGEX || type == ERepositoryObjectType.TDQ_PATTERN_SQL || type == ERepositoryObjectType.TDQ_SOURCE_FILE_ELEMENT || type == ERepositoryObjectType.TDQ_RULES || type == ERepositoryObjectType.TDQ_RULES_SQL || type == ERepositoryObjectType.TDQ_INDICATOR_ELEMENT) {
    return TDQ_PAT_ITEM_PATTERN;
  }
 else   if (type != null && "String_Node_Str".equals(type.getType())) {
    return SERVICES_NAME_PATTERN;
  }
 else {
    return TDQ_PAT_ITEM_PATTERN;
  }
}

Fixed version (ground truth):
public static String getPattern(ERepositoryObjectType type){
  if (type == ERepositoryObjectType.FOLDER) {
    return FOLDER_PATTERN;
  }
 else   if (type == ERepositoryObjectType.PROCESS || type == ERepositoryObjectType.JOBLET) {
    return CODE_ITEM_PATTERN;
  }
 else   if (type == ERepositoryObjectType.ROUTINES) {
    return ROUTINES_ITEM_PATTERN;
  }
 else   if (type == ERepositoryObjectType.TDQ_JRAXML_ELEMENT || type == ERepositoryObjectType.TDQ_DATA_PROFILING || type == ERepositoryObjectType.TDQ_ANALYSIS_ELEMENT || type == ERepositoryObjectType.TDQ_REPORT_ELEMENT || type == ERepositoryObjectType.TDQ_LIBRARIES || type == ERepositoryObjectType.TDQ_PATTERN_ELEMENT || type == ERepositoryObjectType.TDQ_PATTERN_REGEX || type == ERepositoryObjectType.TDQ_PATTERN_SQL || type == ERepositoryObjectType.TDQ_SOURCE_FILE_ELEMENT || type == ERepositoryObjectType.TDQ_RULES || type == ERepositoryObjectType.TDQ_RULES_SQL || type == ERepositoryObjectType.TDQ_INDICATOR_ELEMENT) {
    return TDQ_PAT_ITEM_PATTERN;
  }
 else   if (type != null && "String_Node_Str".equals(type.getType())) {
    return SERVICES_NAME_PATTERN;
  }
 else   if (type != null && "String_Node_Str".equals(type.getType())) {
    return CODE_ITEM_PATTERN;
  }
 else {
    return TDQ_PAT_ITEM_PATTERN;
  }
}
Program: 129903
Project: 129903
Buggy source:
private XPathPrefix getXPathPrefix(String prefix){
  final XPathPrefix[] values=XPathPrefix.values();
  for (int i=0; i < values.length; i++) {
    if (values[i].getPrefix().equals(prefix)) {
      return values[i];
    }
  }
  return null;
}

Fixed version (ground truth):
private String getXPathPrefix(String prefix){
  if (prefix == null) {
    return "String_Node_Str";
  }
  final XPathPrefix[] values=XPathPrefix.values();
  for (int i=0; i < values.length; i++) {
    if (values[i].getPrefix().equals(prefix)) {
      return values[i].getDisplayName();
    }
  }
  return prefix;
}
Program: 129904
Project: 129904
Buggy source:
@Override protected void adaptFormToEditable(){
  super.adaptFormToEditable();
  xPathPrefixCombo.setReadOnly(isContextMode());
  loopTableEditorView.setReadOnly(isContextMode());
  this.fieldsTableEditorView.setReadOnly(isContextMode());
}

Fixed version (ground truth):
@Override protected void adaptFormToEditable(){
  super.adaptFormToEditable();
  if (isContextMode()) {
    prefixCombo.setBackground(null);
  }
 else {
    prefixCombo.setBackground(getShell().getDisplay().getSystemColor(SWT.COLOR_WHITE));
  }
  prefixCombo.setEditable(isContextMode());
  loopTableEditorView.setReadOnly(isContextMode());
  this.fieldsTableEditorView.setReadOnly(isContextMode());
}
Program: 129908
Project: 129908
Buggy source:
/** 
 * Main Fields addControls.
 */
@Override protected void addFieldsListeners(){
  xPathPrefixCombo.getCombo().addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (concept != null) {
        final XPathPrefix xPathPrefixByDisplayName=getXPathPrefixByDisplayName(xPathPrefixCombo.getText());
        if (xPathPrefixByDisplayName != null) {
          concept.setXPathPrefix(xPathPrefixByDisplayName.getPrefix());
        }
      }
    }
  }
);
  fieldsTableEditorView.getExtendedTableModel().addAfterOperationListListener(new IListenableListListener(){
    public void handleEvent(    ListenableListEvent event){
      checkFieldsValue();
    }
  }
);
  fieldsTableEditorView.getExtendedTableModel().addModifiedBeanListener(new IModifiedBeanListener<ConceptTarget>(){
    public void handleEvent(    ModifiedBeanEvent<ConceptTarget> event){
      updateStatus(IStatus.OK,null);
      String msg=fieldsTableEditorView.checkColumnNames();
      if (!StringUtils.isEmpty(msg)) {
        updateStatus(IStatus.ERROR,msg);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Main Fields addControls.
 */
@Override protected void addFieldsListeners(){
  prefixCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (concept != null) {
        concept.setXPathPrefix(getXPathPrefixByDisplayName(prefixCombo.getText()));
        checkFieldsValue();
      }
    }
  }
);
  fieldsTableEditorView.getExtendedTableModel().addAfterOperationListListener(new IListenableListListener(){
    public void handleEvent(    ListenableListEvent event){
      checkFieldsValue();
    }
  }
);
  fieldsTableEditorView.getExtendedTableModel().addModifiedBeanListener(new IModifiedBeanListener<ConceptTarget>(){
    public void handleEvent(    ModifiedBeanEvent<ConceptTarget> event){
      updateStatus(IStatus.OK,null);
      String msg=fieldsTableEditorView.checkColumnNames();
      if (!StringUtils.isEmpty(msg)) {
        updateStatus(IStatus.ERROR,msg);
      }
    }
  }
);
}
Program: 129909
Project: 129909
Buggy source:
/** 
 * Initialize value, forceFocus first field.
 */
@Override protected void initialize(){
  File file=MDMUtil.getTempTemplateXSDFile();
  xsdFilePath=file.getParentFile().getAbsolutePath();
  if (!file.exists()) {
    try {
      super.initialize();
    }
 catch (    Exception e) {
      isTemplateExist=false;
    }
  }
 else {
    xsdFilePath=file.getAbsolutePath();
  }
  isTemplateExist=true;
  this.treePopulator=new TreePopulator(availableXmlTree);
  checkFieldsValue();
  if (concept == null) {
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    concept=ConnectionFactory.eINSTANCE.createConcept();
    getConnection().getSchemas().add(concept);
  }
  loopModel.setConcept(concept);
  if (concept.getLoopLimit() == null) {
    concept.setLoopLimit(-1);
    XmlArray.setLimitToDefault();
    concept.setLoopLimit(XmlArray.getRowLimit());
  }
  fieldsModel.setConcept(concept.getConceptTargets());
  fieldsTableEditorView.getTableViewerCreator().layout();
  if (concept.getXPathPrefix() == null || "String_Node_Str".equals(concept.getXPathPrefix())) {
    xPathPrefixCombo.select(0);
  }
 else {
    final XPathPrefix xPathPrefix=getXPathPrefix(concept.getXPathPrefix());
    xPathPrefixCombo.setText(xPathPrefix.getDisplayName());
  }
  if (isContextMode()) {
    adaptFormToEditable();
  }
}

Fixed version (ground truth):
/** 
 * Initialize value, forceFocus first field.
 */
@Override protected void initialize(){
  File file=MDMUtil.getTempTemplateXSDFile();
  xsdFilePath=file.getParentFile().getAbsolutePath();
  if (!file.exists()) {
    try {
      super.initialize();
    }
 catch (    Exception e) {
      isTemplateExist=false;
    }
  }
 else {
    xsdFilePath=file.getAbsolutePath();
  }
  isTemplateExist=true;
  this.treePopulator=new TreePopulator(availableXmlTree);
  checkFieldsValue();
  if (concept == null) {
    IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
    concept=ConnectionFactory.eINSTANCE.createConcept();
    getConnection().getSchemas().add(concept);
  }
  loopModel.setConcept(concept);
  if (concept.getLoopLimit() == null) {
    concept.setLoopLimit(-1);
    XmlArray.setLimitToDefault();
    concept.setLoopLimit(XmlArray.getRowLimit());
  }
  fieldsModel.setConcept(concept.getConceptTargets());
  fieldsTableEditorView.getTableViewerCreator().layout();
  if (concept.getXPathPrefix() == null || "String_Node_Str".equals(concept.getXPathPrefix())) {
    prefixCombo.select(1);
    concept.setXPathPrefix(XPathPrefix.NONE_ITEM.getPrefix());
  }
 else {
    prefixCombo.setText(getXPathPrefix(concept.getXPathPrefix()));
  }
  if (isContextMode()) {
    adaptFormToEditable();
  }
}
Program: 129910
Project: 129910
Buggy source:
private XPathPrefix getXPathPrefixByDisplayName(String dispalyName){
  final XPathPrefix[] values=XPathPrefix.values();
  for (int i=0; i < values.length; i++) {
    if (values[i].getDisplayName().equals(dispalyName)) {
      return values[i];
    }
  }
  return null;
}

Fixed version (ground truth):
private String getXPathPrefixByDisplayName(String dispalyName){
  final XPathPrefix[] values=XPathPrefix.values();
  for (int i=0; i < values.length; i++) {
    if (values[i] == XPathPrefix.USER_DEFINED_ITEM) {
      continue;
    }
    if (values[i].getDisplayName().equals(dispalyName)) {
      return values[i].getPrefix();
    }
  }
  return dispalyName;
}
Program: 129911
Project: 129911
Buggy source:
public boolean valid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType);

Fixed version (ground truth):
/** 
 * if true, will add this component to list; if false, will ignore it.
 */
public boolean valid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType);
Program: 129912
Project: 129912
Buggy source:
public static List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  if (!GlobalServiceRegister.getDefault().isServiceRegistered(IComponentsService.class)) {
    return Collections.emptyList();
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Set<IComponent> components=service.getComponentsFactory().getComponents();
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  for (  IComponent component : components) {
    for (    RepositoryComponentDndFilterSetting dndFilter : getDndFilterSettings()) {
      IRepositoryComponentDndFilter filter=dndFilter.getFilter();
      if (filter == null) {
        continue;
      }
      String repositoryType=filter.getRepositoryType(item,type);
      if (repositoryType == null) {
        continue;
      }
      if (filter.valid(item,type,seletetedNode,component,repositoryType) && !neededComponents.contains(component)) {
        neededComponents.add(component);
      }
    }
  }
  return sortFilteredComponnents(item,seletetedNode,type,neededComponents);
}

Fixed version (ground truth):
public static List<IComponent> filterNeededComponents(Item item,RepositoryNode seletetedNode,ERepositoryObjectType type){
  if (!GlobalServiceRegister.getDefault().isServiceRegistered(IComponentsService.class)) {
    return Collections.emptyList();
  }
  IComponentsService service=(IComponentsService)GlobalServiceRegister.getDefault().getService(IComponentsService.class);
  Set<IComponent> components=service.getComponentsFactory().getComponents();
  List<IComponent> neededComponents=new ArrayList<IComponent>();
  List<IComponent> exceptedComponents=new ArrayList<IComponent>();
  for (  IComponent component : components) {
    for (    RepositoryComponentDndFilterSetting dndFilter : getDndFilterSettings()) {
      IRepositoryComponentDndFilter filter=dndFilter.getFilter();
      if (filter == null) {
        continue;
      }
      String repositoryType=filter.getRepositoryType(item,type);
      if (repositoryType == null) {
        continue;
      }
      if (!exceptedComponents.contains(component) && filter.except(item,type,seletetedNode,component,repositoryType)) {
        exceptedComponents.add(component);
      }
      if (!exceptedComponents.contains(component) && !neededComponents.contains(component) && filter.valid(item,type,seletetedNode,component,repositoryType)) {
        neededComponents.add(component);
      }
    }
  }
  neededComponents.removeAll(exceptedComponents);
  return sortFilteredComponnents(item,seletetedNode,type,neededComponents);
}
Program: 129914
Project: 129914
Buggy source:
private static boolean isContextMode(Connection connection,String value){
  if (connection == null || value == null) {
    return false;
  }
  if (connection.isContextMode() && ContextParameterUtils.isContainContextParam(value)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private static boolean isContextMode(Connection connection,String value){
  if (connection == null || value == null) {
    return false;
  }
  if (!(connection.isContextMode() && ContextParameterUtils.isContainContextParam(value))) {
    return true;
  }
  return false;
}
Program: 129917
Project: 129917
Buggy source:
public Object[] getElements(Object inputElement){
  List list=(List)inputElement;
  return list.toArray();
}

Fixed version (ground truth):
public Object[] getElements(Object inputElement){
  List list=(List)inputElement;
  if (list != null && list.size() == 1) {
    Object obj=list.get(0);
    if (obj instanceof TableNode) {
      TableNode node=(TableNode)obj;
      if (node.getType() == TableNode.SCHEMA && "String_Node_Str".equals(node.getValue())) {
        return getChildren(node);
      }
    }
  }
  return list.toArray();
}
Program: 129923
Project: 129923
Buggy source:
private static boolean isContextMode(Connection connection,String value){
  if (connection == null || value == null) {
    return false;
  }
  if (!(connection.isContextMode() && ContextParameterUtils.isContainContextParam(value))) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private static boolean isContextMode(Connection connection,String value){
  if (connection == null || value == null) {
    return false;
  }
  if (connection.isContextMode() && ContextParameterUtils.isContainContextParam(value)) {
    return true;
  }
  return false;
}
Program: 129924
Project: 129924
Buggy source:
/** 
 * Extract last word of an expression, the last character must be a letter or a number.
 * @param currentExpr
 * @param fullSchemaTargetList
 * @return
 */
public static String extractColumnName(String currentExpr,List<SchemaTarget> fullSchemaTargetList){
  String columnName=currentExpr.replaceAll("String_Node_Str","String_Node_Str");
  UniqueStringGenerator<SchemaTarget> uniqueStringGenerator=new UniqueStringGenerator<SchemaTarget>(columnName,fullSchemaTargetList){
    @Override protected String getBeanString(    SchemaTarget bean){
      return bean.getTagName();
    }
  }
;
  columnName=uniqueStringGenerator.getUniqueString();
  return columnName;
}

Fixed version (ground truth):
/** 
 * Extract last word of an expression, the last character must be a letter or a number.
 * @param currentExpr
 * @param fullSchemaTargetList
 * @return
 */
public static String extractColumnName(String currentExpr,List<SchemaTarget> fullSchemaTargetList){
  String columnName=currentExpr.startsWith("String_Node_Str") ? currentExpr.substring(1) : currentExpr;
  columnName=columnName.replaceAll("String_Node_Str","String_Node_Str");
  UniqueStringGenerator<SchemaTarget> uniqueStringGenerator=new UniqueStringGenerator<SchemaTarget>(columnName,fullSchemaTargetList){
    @Override protected String getBeanString(    SchemaTarget bean){
      return bean.getTagName();
    }
  }
;
  columnName=uniqueStringGenerator.getUniqueString();
  return columnName;
}
Program: 129928
Project: 129928
Buggy source:
/** 
 * DOC qiang.zhang Comment method "returnMetaTablesFormConnection".
 * @param iMetadataConnection
 * @return
 */
public static List<org.talend.core.model.metadata.builder.connection.MetadataTable> returnMetaTablesFormConnection(IMetadataConnection iMetadataConnection){
  List<org.talend.core.model.metadata.builder.connection.MetadataTable> itemTablesName=new ArrayList<org.talend.core.model.metadata.builder.connection.MetadataTable>();
  List list=ExtractMetaDataUtils.getConnection(iMetadataConnection.getDbType(),iMetadataConnection.getUrl(),iMetadataConnection.getUsername(),iMetadataConnection.getPassword(),iMetadataConnection.getDatabase(),iMetadataConnection.getSchema(),iMetadataConnection.getDriverClass(),iMetadataConnection.getDriverJarPath(),iMetadataConnection.getDbVersionString(),iMetadataConnection.getAdditionalParams());
  DriverShim wapperDriver=null;
  if (list != null && list.size() > 0) {
    for (int i=0; i < list.size(); i++) {
      if (list.get(i) instanceof DriverShim) {
        wapperDriver=(DriverShim)list.get(i);
      }
    }
  }
  String dbType=iMetadataConnection.getDbType();
  DatabaseMetaData dbMetaData=ExtractMetaDataUtils.getDatabaseMetaData(ExtractMetaDataUtils.conn,dbType);
  List<IMetadataTable> metadataTables=ExtractMetaDataFromDataBase.extractTablesFromDB(dbMetaData,iMetadataConnection);
  ExtractMetaDataUtils.closeConnection();
  if (wapperDriver != null && (iMetadataConnection.getDriverClass().equals(EDatabase4DriverClassName.JAVADB_EMBEDED.getDriverClass()) || dbType.equals(EDatabaseTypeName.JAVADB_EMBEDED.getDisplayName()) || dbType.equals(EDatabaseTypeName.JAVADB_DERBYCLIENT.getDisplayName())|| dbType.equals(EDatabaseTypeName.JAVADB_JCCJDBC.getDisplayName())|| dbType.equals(EDatabaseTypeName.HSQLDB_IN_PROGRESS.getDisplayName()))) {
    try {
      wapperDriver.connect("String_Node_Str",null);
    }
 catch (    SQLException e) {
    }
  }
  Iterator<IMetadataTable> iterate=metadataTables.iterator();
  while (iterate.hasNext()) {
    IMetadataTable metadataTable=iterate.next();
    itemTablesName.add(ConvertionHelper.convert(metadataTable));
  }
  return itemTablesName;
}

Fixed version (ground truth):
public static List<org.talend.core.model.metadata.builder.connection.MetadataTable> returnMetaTablesFormConnection(IMetadataConnection iMetadataConnection){
  return returnMetaTablesFormConnection(iMetadataConnection,-1);
}
Program: 129930
Project: 129930
Buggy source:
public Object[] getElements(Object inputElement){
  List list=(List)inputElement;
  return list.toArray();
}

Fixed version (ground truth):
public Object[] getElements(Object inputElement){
  List list=(List)inputElement;
  if (list != null && list.size() == 1) {
    Object obj=list.get(0);
    if (obj instanceof TableNode) {
      TableNode node=(TableNode)obj;
      if (node.getType() == TableNode.SCHEMA && "String_Node_Str".equals(node.getValue())) {
        return getChildren(node);
      }
    }
  }
  return list.toArray();
}
Program: 129936
Project: 129936
Buggy source:
private static boolean isContextMode(Connection connection,String value){
  if (connection == null || value == null) {
    return false;
  }
  if (!(connection.isContextMode() && ContextParameterUtils.isContainContextParam(value))) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private static boolean isContextMode(Connection connection,String value){
  if (connection == null || value == null) {
    return false;
  }
  if (connection.isContextMode() && ContextParameterUtils.isContainContextParam(value)) {
    return true;
  }
  return false;
}
Program: 129937
Project: 129937
Buggy source:
/** 
 * Extract last word of an expression, the last character must be a letter or a number.
 * @param currentExpr
 * @param fullSchemaTargetList
 * @return
 */
public static String extractColumnName(String currentExpr,List<SchemaTarget> fullSchemaTargetList){
  String columnName=currentExpr.replaceAll("String_Node_Str","String_Node_Str");
  UniqueStringGenerator<SchemaTarget> uniqueStringGenerator=new UniqueStringGenerator<SchemaTarget>(columnName,fullSchemaTargetList){
    @Override protected String getBeanString(    SchemaTarget bean){
      return bean.getTagName();
    }
  }
;
  columnName=uniqueStringGenerator.getUniqueString();
  return columnName;
}

Fixed version (ground truth):
/** 
 * Extract last word of an expression, the last character must be a letter or a number.
 * @param currentExpr
 * @param fullSchemaTargetList
 * @return
 */
public static String extractColumnName(String currentExpr,List<SchemaTarget> fullSchemaTargetList){
  String columnName=currentExpr.startsWith("String_Node_Str") ? currentExpr.substring(1) : currentExpr;
  columnName=columnName.replaceAll("String_Node_Str","String_Node_Str");
  UniqueStringGenerator<SchemaTarget> uniqueStringGenerator=new UniqueStringGenerator<SchemaTarget>(columnName,fullSchemaTargetList){
    @Override protected String getBeanString(    SchemaTarget bean){
      return bean.getTagName();
    }
  }
;
  columnName=uniqueStringGenerator.getUniqueString();
  return columnName;
}
Program: 129939
Project: 129939
Buggy source:
public boolean isNameAvailable(Project project,Item item,String name,List<IRepositoryViewObject>... givenList) throws PersistenceException {
  if (name == null) {
    name=item.getProperty().getLabel();
  }
  if (item instanceof FolderItem) {
    FolderHelper folderHelper=getFolderHelper(project.getEmfProject());
    return !folderHelper.pathExists((FolderItem)item,name);
  }
  ERepositoryObjectType type=ERepositoryObjectType.getItemType(item);
  if (type == ERepositoryObjectType.METADATA_CON_TABLE) {
    return false;
  }
  boolean isAllowMultipleName=(type == ERepositoryObjectType.SQLPATTERNS || type == ERepositoryObjectType.METADATA_FILE_XML);
  String path=null;
  if (item.getState() != null) {
    path=item.getState().getPath();
  }
  List<IRepositoryViewObject> list;
  if (givenList.length == 0) {
    list=getAll(project,type,true,false);
  }
 else {
    list=givenList[0];
  }
  for (  IRepositoryViewObject current : list) {
    if (name.equalsIgnoreCase(current.getProperty().getLabel()) && item.getProperty().getId() != current.getProperty().getId()) {
      if (!isAllowMultipleName || current.getProperty().getItem().getState().getPath().equals(path)) {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean isNameAvailable(Project project,Item item,String name,List<IRepositoryViewObject>... givenList) throws PersistenceException {
  if (name == null) {
    name=item.getProperty().getLabel();
  }
  if (item instanceof FolderItem) {
    FolderHelper folderHelper=getFolderHelper(project.getEmfProject());
    return !folderHelper.pathExists((FolderItem)item,name);
  }
  ERepositoryObjectType type=ERepositoryObjectType.getItemType(item);
  if (type == ERepositoryObjectType.METADATA_CON_TABLE) {
    return false;
  }
  boolean isSqlPattern=(type == ERepositoryObjectType.SQLPATTERNS);
  String path=null;
  if (item.getState() != null) {
    path=item.getState().getPath();
  }
  List<IRepositoryViewObject> list;
  if (givenList.length == 0) {
    list=getAll(project,type,true,false);
  }
 else {
    list=givenList[0];
  }
  for (  IRepositoryViewObject current : list) {
    if (name.equalsIgnoreCase(current.getProperty().getLabel()) && item.getProperty().getId() != current.getProperty().getId()) {
      if (!isSqlPattern || current.getProperty().getItem().getState().getPath().equals(path)) {
        return false;
      }
    }
  }
  return true;
}
Program: 129940
Project: 129940
Buggy source:
public void create(Project project,Item item,IPath path,boolean... isImportItem) throws PersistenceException {
  boolean isOherProcess=false;
  for (  IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {
    isOherProcess=handler.isProcess(item);
    if (isOherProcess) {
      break;
    }
  }
  if (isOherProcess || item instanceof ProcessItem) {
    try {
      coreService.checkJob(item.getProperty().getLabel());
    }
 catch (    BusinessException e) {
      throw new PersistenceException(e);
    }
catch (    RuntimeException e) {
    }
  }
  checkFileNameAndPath(project,item,RepositoryConstants.getPattern(ERepositoryObjectType.getItemType(item)),path,false,isImportItem);
  this.repositoryFactoryFromProvider.create(project,item,path,isImportItem);
  if ((item instanceof ProcessItem || item instanceof JobletProcessItem) && (isImportItem.length == 0)) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOB_CREATE.getName(),null,item);
  }
  if (isImportItem.length == 1) {
    this.repositoryFactoryFromProvider.unloadResources(item.getProperty());
  }
}

Fixed version (ground truth):
public void create(Project project,Item item,IPath path,boolean... isImportItem) throws PersistenceException {
  boolean isOherProcess=false;
  for (  IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {
    isOherProcess=handler.isProcess(item);
    if (isOherProcess) {
      break;
    }
  }
  if (isOherProcess || item instanceof ProcessItem) {
    try {
      coreService.checkJob(item.getProperty().getLabel());
    }
 catch (    BusinessException e) {
      throw new PersistenceException(e);
    }
catch (    RuntimeException e) {
    }
  }
  checkFileNameAndPath(project,item,RepositoryConstants.getPattern(ERepositoryObjectType.getItemType(item)),path,false,isImportItem);
  this.repositoryFactoryFromProvider.create(project,item,path,isImportItem);
  if ((item instanceof ProcessItem || item instanceof JobletProcessItem) && (isImportItem.length == 0)) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOB_CREATE.getName(),null,item);
  }
}
Program: 129942
Project: 129942
Buggy source:
public void create(Project project,Item item,IPath path,boolean... isImportItem) throws PersistenceException {
  boolean isOherProcess=false;
  for (  IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {
    isOherProcess=handler.isProcess(item);
    if (isOherProcess) {
      break;
    }
  }
  if (isOherProcess || item instanceof ProcessItem) {
    try {
      coreService.checkJob(item.getProperty().getLabel());
    }
 catch (    BusinessException e) {
      throw new PersistenceException(e);
    }
catch (    RuntimeException e) {
    }
  }
  checkFileNameAndPath(project,item,RepositoryConstants.getPattern(ERepositoryObjectType.getItemType(item)),path,false,isImportItem);
  this.repositoryFactoryFromProvider.create(project,item,path,isImportItem);
  if ((item instanceof ProcessItem || item instanceof JobletProcessItem) && (isImportItem.length == 0)) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOB_CREATE.getName(),null,item);
  }
  if (isImportItem.length == 1) {
    this.repositoryFactoryFromProvider.unloadResources(item.getProperty());
  }
}

Fixed version (ground truth):
public void create(Project project,Item item,IPath path,boolean... isImportItem) throws PersistenceException {
  boolean isOherProcess=false;
  for (  IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {
    isOherProcess=handler.isProcess(item);
    if (isOherProcess) {
      break;
    }
  }
  if (isOherProcess || item instanceof ProcessItem) {
    try {
      coreService.checkJob(item.getProperty().getLabel());
    }
 catch (    BusinessException e) {
      throw new PersistenceException(e);
    }
catch (    RuntimeException e) {
    }
  }
  checkFileNameAndPath(project,item,RepositoryConstants.getPattern(ERepositoryObjectType.getItemType(item)),path,false,isImportItem);
  this.repositoryFactoryFromProvider.create(project,item,path,isImportItem);
  if ((item instanceof ProcessItem || item instanceof JobletProcessItem) && (isImportItem.length == 0)) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOB_CREATE.getName(),null,item);
  }
}
Program: 129943
Project: 129943
Buggy source:
private static EDatabaseTypeName[] retrieveDBTypes(IConfigurationElement parent){
  IConfigurationElement[] children=parent.getChildren("String_Node_Str");
  List<EDatabaseTypeName> list=new ArrayList<EDatabaseTypeName>();
  for (  IConfigurationElement ce : children) {
    String type=ce.getAttribute("String_Node_Str");
    EDatabaseTypeName dbType=EDatabaseTypeName.getTypeFromDbType(type,false);
    if (dbType != null) {
      list.add(dbType);
    }
  }
  return list.toArray(new EDatabaseTypeName[0]);
}

Fixed version (ground truth):
private static EDatabaseTypeName[] retrieveDBTypes(IConfigurationElement parent){
  IConfigurationElement[] children=parent.getChildren("String_Node_Str");
  List<EDatabaseTypeName> list=new ArrayList<EDatabaseTypeName>();
  for (  IConfigurationElement ce : children) {
    String type=ce.getAttribute("String_Node_Str");
    EDatabaseTypeName dbType=EDatabaseTypeName.getTypeFromDbType(type,false);
    if (dbType == null) {
      for (      EDatabaseTypeName dtn : EDatabaseTypeName.values()) {
        if (dtn.name().equals(type)) {
          dbType=dtn;
          break;
        }
      }
    }
    if (dbType != null) {
      list.add(dbType);
    }
  }
  return list.toArray(new EDatabaseTypeName[0]);
}
Program: 129944
Project: 129944
Buggy source:
private void initLinker(TreeItem node,TableItem[] tableItems){
  FOXTreeNode treeNode=(FOXTreeNode)node.getData();
  IMetadataColumn column=treeNode.getColumn();
  if (column != null) {
    for (int i=0; i < tableItems.length; i++) {
      MetadataColumn metadataColumn=(MetadataColumn)tableItems[i].getData();
      if (metadataColumn.getLabel().equals(column.getLabel())) {
        linker.addLoopLink(tableItems[i],tableItems[i].getData(),xmlViewer.getTree(),treeNode,true);
        break;
      }
    }
  }
  TreeItem[] children=node.getItems();
  for (int i=0; i < children.length; i++) {
    initLinker(children[i],tableItems);
  }
}

Fixed version (ground truth):
private void initLinker(TreeItem node,TableItem[] tableItems){
  FOXTreeNode treeNode=(FOXTreeNode)node.getData();
  IMetadataColumn column=treeNode.getColumn();
  if (column != null) {
    for (int i=0; i < tableItems.length; i++) {
      MetadataColumn metadataColumn=(MetadataColumn)tableItems[i].getData();
      if (metadataColumn.getLabel().equals(column.getLabel())) {
        linker.addLoopLink(tableItems[i],tableItems[i].getData(),xmlViewer.getTree(),treeNode,false);
        break;
      }
    }
  }
  TreeItem[] children=node.getItems();
  for (int i=0; i < children.length; i++) {
    initLinker(children[i],tableItems);
  }
}
Program: 129946
Project: 129946
Buggy source:
public List<Problem> getProblems(INode node,IElement element){
  List<Problem> toReturn=new ArrayList<Problem>();
  List<ModuleNeeded> list=node.getComponent().getModulesNeeded();
  List<ModuleNeeded> modulesNeeded=ModulesNeededProvider.getModulesNeeded();
  boolean flag=false;
  for (  ModuleNeeded current : list) {
    if (current.getRequiredIf() != null && !current.getRequiredIf().equals("String_Node_Str")) {
      flag=true;
    }
  }
  if (flag) {
    for (    ModuleNeeded module : modulesNeeded) {
      for (      ModuleNeeded current : list) {
        if (current.getContext().equals(module.getContext()) && current.getModuleName().equals(module.getModuleName())) {
          if (module.getStatus() == ELibraryInstallStatus.NOT_INSTALLED && (current.getRequiredIf() != null && !current.getRequiredIf().equals("String_Node_Str"))) {
            Problem problem=new Problem(element,"String_Node_Str" + current.getModuleName() + "String_Node_Str",ProblemStatus.ERROR);
            problem.setKey("String_Node_Str" + current.getModuleName());
            toReturn.add(problem);
          }
        }
      }
    }
  }
 else {
    for (    ModuleNeeded module : modulesNeeded) {
      for (      ModuleNeeded current : list) {
        if (current.getContext().equals(module.getContext()) && current.getModuleName().equals(module.getModuleName())) {
          if (module.getStatus() == ELibraryInstallStatus.NOT_INSTALLED && current.isRequired()) {
            Problem problem=new Problem(element,"String_Node_Str" + current.getModuleName() + "String_Node_Str",ProblemStatus.ERROR);
            problem.setKey("String_Node_Str" + current.getModuleName());
            toReturn.add(problem);
          }
        }
      }
    }
  }
  return toReturn;
}

Fixed version (ground truth):
public List<Problem> getProblems(INode node,IElement element){
  List<Problem> toReturn=new ArrayList<Problem>();
  List<ModuleNeeded> list=node.getComponent().getModulesNeeded();
  List<ModuleNeeded> modulesNeeded=ModulesNeededProvider.getModulesNeeded();
  for (  ModuleNeeded module : modulesNeeded) {
    for (    ModuleNeeded current : list) {
      if (current.getContext().equals(module.getContext()) && current.getModuleName().equals(module.getModuleName())) {
        if (module.getStatus() == ELibraryInstallStatus.NOT_INSTALLED && current.isRequired(node.getElementParameters())) {
          Problem problem=new Problem(element,"String_Node_Str" + current.getModuleName() + "String_Node_Str",ProblemStatus.ERROR);
          problem.setKey("String_Node_Str" + current.getModuleName());
          toReturn.add(problem);
        }
      }
    }
  }
  return toReturn;
}
Program: 129949
Project: 129949
Buggy source:
public void create(Project project,Item item,IPath path,boolean... isImportItem) throws PersistenceException {
  boolean isOherProcess=false;
  for (  IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {
    isOherProcess=handler.isProcess(item);
    if (isOherProcess) {
      break;
    }
  }
  if (isOherProcess || item instanceof ProcessItem) {
    try {
      coreService.checkJob(item.getProperty().getLabel());
    }
 catch (    BusinessException e) {
      throw new PersistenceException(e);
    }
catch (    RuntimeException e) {
    }
  }
  checkFileNameAndPath(project,item,RepositoryConstants.getPattern(ERepositoryObjectType.getItemType(item)),path,false,isImportItem);
  this.repositoryFactoryFromProvider.create(project,item,path,isImportItem);
  if ((item instanceof ProcessItem || item instanceof JobletProcessItem) && (isImportItem.length == 0)) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOB_CREATE.getName(),null,item);
  }
}

Fixed version (ground truth):
public void create(Project project,Item item,IPath path,boolean... isImportItem) throws PersistenceException {
  boolean isOherProcess=false;
  for (  IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {
    isOherProcess=handler.isProcess(item);
    if (isOherProcess) {
      break;
    }
  }
  if (isOherProcess || item instanceof ProcessItem) {
    try {
      coreService.checkJob(item.getProperty().getLabel());
    }
 catch (    BusinessException e) {
      throw new PersistenceException(e);
    }
catch (    RuntimeException e) {
    }
  }
  checkFileNameAndPath(project,item,RepositoryConstants.getPattern(ERepositoryObjectType.getItemType(item)),path,false,isImportItem);
  this.repositoryFactoryFromProvider.create(project,item,path,isImportItem);
  if ((item instanceof ProcessItem || item instanceof JobletProcessItem) && (isImportItem.length == 0)) {
    fireRepositoryPropertyChange(ERepositoryActionName.JOB_CREATE.getName(),null,item);
  }
  if (isImportItem.length == 1) {
    this.repositoryFactoryFromProvider.unloadResources(item.getProperty());
  }
}
Program: 129950
Project: 129950
Buggy source:
public void setItem(Item item){
  this.item=item;
  if (item != null) {
    this.id=item.getProperty().getId();
    this.version=item.getProperty().getVersion();
  }
}

Fixed version (ground truth):
public void setItem(Item item){
  this.item=item;
  if (item != null) {
    this.id=item.getProperty().getId();
    this.version=item.getProperty().getVersion();
    this.name=getItem().getProperty().getLabel();
  }
}
Program: 129952
Project: 129952
Buggy source:
public RepositoryEditorInput(IFile file,Item item){
  super(file);
  this.item=item;
}

Fixed version (ground truth):
public RepositoryEditorInput(IFile file,Item item){
  super(file);
  this.item=item;
  this.id=item.getProperty().getId();
  this.version=item.getProperty().getVersion();
}
Program: 129953
Project: 129953
Buggy source:
public boolean equals(final Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (getClass() != obj.getClass()) {
    return false;
  }
  final RepositoryEditorInput other=(RepositoryEditorInput)obj;
  if (this.item == null) {
    if (other.item != null) {
      return false;
    }
  }
 else   if (!this.item.getProperty().getId().equals(other.item.getProperty().getId())) {
    return false;
  }
 else   if (!this.item.getProperty().getVersion().equals(other.item.getProperty().getVersion())) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean equals(final Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (getClass() != obj.getClass()) {
    return false;
  }
  final RepositoryEditorInput other=(RepositoryEditorInput)obj;
  if (!this.getId().equals(other.getId())) {
    return false;
  }
 else   if (!this.getVersion().equals(other.getVersion())) {
    return false;
  }
  return true;
}
Program: 129954
Project: 129954
Buggy source:
public void setItem(Item item){
  this.item=item;
}

Fixed version (ground truth):
public void setItem(Item item){
  this.item=item;
  if (item != null) {
    this.id=item.getProperty().getId();
    this.version=item.getProperty().getVersion();
  }
}