nus-yam/ex-repair huggingface dataset:
Program: 129762
Project: 129762
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_LDIF.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_LDIF.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}
Program: 129763
Project: 129763
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_POSITIONAL.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_POSITIONAL.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}
Program: 129764
Project: 129764
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_REGEXP.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_REGEXP.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}
Program: 129765
Project: 129765
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_XML.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_FILE_XML.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
}
setEnabled(true);
}
Program: 129766
Project: 129766
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!currentNodeType.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(createLabel);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(editLabel);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(openLabel);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!currentNodeType.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(createLabel);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(editLabel);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(openLabel);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}
Program: 129767
Project: 129767
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!currentNodeType.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(createLabel);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(editLabel);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(openLabel);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!currentNodeType.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(createLabel);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(editLabel);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(openLabel);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}
Program: 129768
Project: 129768
Buggy source:
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}

Fixed version (ground truth):
protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(CREATE_LABEL);
collectChildNames(node);
creation=true;
this.setImageDescriptor(createImage);
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(EDIT_LABEL);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(OPEN_LABEL);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}
Program: 129769
Project: 129769
Buggy source:
@Override protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!currentNodeType.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
case SYSTEM_FOLDER:
    if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
      setEnabled(false);
      return;
    }
  this.setText(createLabel);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(editLabel);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(openLabel);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}

Fixed version (ground truth):
@Override protected void init(RepositoryNode node){
  ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
  if (!currentNodeType.equals(nodeType)) {
    return;
  }
  IProxyRepositoryFactory factory=ProxyRepositoryFactory.getInstance();
switch (node.getType()) {
case SIMPLE_FOLDER:
    if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
      setEnabled(false);
      return;
    }
case SYSTEM_FOLDER:
  if (factory.isUserReadOnlyOnCurrentProject() || !ProjectManager.getInstance().isInCurrentMainProject(node)) {
    setEnabled(false);
    return;
  }
this.setText(createLabel);
collectChildNames(node);
this.setImageDescriptor(createImage);
creation=true;
break;
case REPOSITORY_ELEMENT:
if (factory.isPotentiallyEditable(node.getObject())) {
this.setText(editLabel);
this.setImageDescriptor(defaultImage);
collectSiblingNames(node);
}
 else {
this.setText(openLabel);
this.setImageDescriptor(defaultImage);
}
collectSiblingNames(node);
creation=false;
break;
default :
return;
}
setEnabled(true);
}
Program: 129772
Project: 129772
Buggy source:
@Override public void onTestFailure(ITestResult tr){
  Reporter.setCurrentTestResult(tr);
  IClass clazz=tr.getTestClass();
  String className=clazz.getName();
  String methodName=tr.getMethod().getMethodName();
  String parameter="String_Node_Str";
  for (  Object param : tr.getParameters()) {
    String par=(String)param;
    parameter=parameter + "String_Node_Str" + par.replaceAll("String_Node_Str","String_Node_Str")+ "String_Node_Str";
  }
  if (parameter != null && !"String_Node_Str".equals(parameter.trim())) {
    parameter=parameter.substring(1);
  }
  int lineNumber=0;
  for (  StackTraceElement element : tr.getThrowable().getStackTrace()) {
    if (methodName.equals(element.getMethodName())) {
      lineNumber=element.getLineNumber();
    }
  }
  String name=className + "String_Node_Str" + methodName+ "String_Node_Str"+ parameter+ "String_Node_Str"+ lineNumber+ "String_Node_Str";
  try {
    captureScreenshot(imgFilePath + File.separator + name);
    System.out.println(imgFilePath + File.separator + name);
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
@Override public void onTestFailure(ITestResult tr){
  Reporter.setCurrentTestResult(tr);
  IClass clazz=tr.getTestClass();
  String className=clazz.getName();
  String methodName=tr.getMethod().getMethodName();
  String parameter="String_Node_Str";
  try {
    for (    Object param : tr.getParameters()) {
      String par=(String)param;
      parameter=parameter + "String_Node_Str" + par.replaceAll("String_Node_Str","String_Node_Str")+ "String_Node_Str";
    }
  }
 catch (  Exception ex) {
    for (    Object param : tr.getParameters()) {
      logger.info("String_Node_Str" + param);
    }
    ex.printStackTrace();
  }
  if (parameter != null && !"String_Node_Str".equals(parameter.trim())) {
    parameter=parameter.substring(1);
  }
  int lineNumber=0;
  for (  StackTraceElement element : tr.getThrowable().getStackTrace()) {
    if (methodName.equals(element.getMethodName())) {
      lineNumber=element.getLineNumber();
    }
  }
  String name=className + "String_Node_Str" + methodName+ "String_Node_Str"+ parameter+ "String_Node_Str"+ lineNumber+ "String_Node_Str";
  try {
    captureScreenshot(imgFilePath + File.separator + name);
    System.out.println(imgFilePath + File.separator + name);
  }
 catch (  Exception e) {
  }
}
Program: 129784
Project: 129784
Buggy source:
public String getLabel(){
switch (getType()) {
case REFERENCED_PROJECT:
    return properties.get(EProperties.LABEL).toString();
case REPOSITORY_ELEMENT:
case SIMPLE_FOLDER:
  return getObjectType().toString();
default :
final ERepositoryObjectType contentType=getContentType();
if (contentType != null) {
if ("String_Node_Str".equals(contentType.toString())) {
  return getProperties(EProperties.LABEL).toString();
}
if (contentType.equals(ERepositoryObjectType.PROCESS)) {
  return getProperties(EProperties.LABEL).toString();
}
if (ERepositoryObjectType.TDQ_INDICATOR_ELEMENT.equals(contentType) || ERepositoryObjectType.TDQ_PATTERN_ELEMENT.equals(contentType) || ERepositoryObjectType.TDQ_RULES.equals(contentType)) {
  return getObject().getLabel();
}
return contentType.toString();
}
}
return "String_Node_Str";
}

Fixed version (ground truth):
public String getLabel(){
switch (getType()) {
case REFERENCED_PROJECT:
    return properties.get(EProperties.LABEL).toString();
case REPOSITORY_ELEMENT:
case SIMPLE_FOLDER:
  final ERepositoryObjectType objectType=getObjectType();
if (objectType != null) {
  objectType.toString();
}
default :
final ERepositoryObjectType contentType=getContentType();
if (contentType != null) {
if ("String_Node_Str".equals(contentType.toString())) {
return getProperties(EProperties.LABEL).toString();
}
if (contentType.equals(ERepositoryObjectType.PROCESS)) {
return getProperties(EProperties.LABEL).toString();
}
if (ERepositoryObjectType.TDQ_INDICATOR_ELEMENT.equals(contentType) || ERepositoryObjectType.TDQ_PATTERN_ELEMENT.equals(contentType) || ERepositoryObjectType.TDQ_RULES.equals(contentType)) {
return getObject().getLabel();
}
return contentType.toString();
}
}
return "String_Node_Str";
}
Program: 129786
Project: 129786
Buggy source:
public XmlFileWizardPage getPage(){
  return this.page;
}

Fixed version (ground truth):
public WizardPage getPage(){
  return this.page;
}
Program: 129787
Project: 129787
Buggy source:
public void setPage(XmlFileWizardPage page){
  this.page=page;
}

Fixed version (ground truth):
public void setPage(WizardPage page){
  this.page=page;
}
Program: 129789
Project: 129789
Buggy source:
public void createControl(Composite parent){
  if (getConcept() != null) {
    if (MdmConceptType.INPUT.equals(getConcept().getConceptType())) {
      if (getPreviousPage() instanceof MdmConceptWizardPage2) {
        xsdFileForm=new MDMXSDFileForm(parent,connectionItem,metadataTable,getConcept(),this,creation);
      }
    }
 else     if (MdmConceptType.OUTPUT.equals(getConcept().getConceptType())) {
      xsdFileForm=new MDMOutputSchemaForm(parent,connectionItem,metadataTable,getConcept(),this,creation);
    }
 else     if (MdmConceptType.RECEIVE.equals(getConcept().getConceptType())) {
      xsdFileForm=new MdmReceiveForm(parent,connectionItem,metadataTable,getConcept(),this,creation);
    }
    xsdFileForm.setReadOnly(!isRepositoryObjectEditable);
    AbstractForm.ICheckListener listener=new AbstractForm.ICheckListener(){
      public void checkPerformed(      final AbstractForm source){
        if (source.isStatusOnError()) {
          MdmConceptWizardPage3.this.setPageComplete(false);
          setErrorMessage(source.getStatus());
        }
 else {
          MdmConceptWizardPage3.this.setPageComplete(true);
          setErrorMessage(null);
          setMessage(source.getStatus(),source.getStatusLevel());
        }
      }
    }
;
    xsdFileForm.setListener(listener);
    this.setPageComplete(false);
    setControl(xsdFileForm);
  }
}

Fixed version (ground truth):
public void createControl(Composite parent){
  if (getConcept() != null) {
    if (MdmConceptType.INPUT.equals(getConcept().getConceptType())) {
      if (getPreviousPage() instanceof MdmConceptWizardPage2) {
        xsdFileForm=new MDMXSDFileForm(parent,connectionItem,metadataTable,getConcept(),this,creation);
      }
    }
 else     if (MdmConceptType.OUTPUT.equals(getConcept().getConceptType())) {
      xsdFileForm=new MDMOutputSchemaForm(parent,connectionItem,metadataTable,getConcept(),this,creation);
    }
 else     if (MdmConceptType.RECEIVE.equals(getConcept().getConceptType())) {
      xsdFileForm=new MdmReceiveForm(parent,connectionItem,metadataTable,getConcept(),this,creation);
    }
    xsdFileForm.setReadOnly(!isRepositoryObjectEditable);
    AbstractForm.ICheckListener listener=new AbstractForm.ICheckListener(){
      public void checkPerformed(      final AbstractForm source){
        if (source.isStatusOnError()) {
          MdmConceptWizardPage3.this.setPageComplete(false);
          setErrorMessage(source.getStatus());
        }
 else {
          MdmConceptWizardPage3.this.setPageComplete(true);
          setErrorMessage(null);
          setMessage(source.getStatus(),source.getStatusLevel());
        }
      }
    }
;
    xsdFileForm.setListener(listener);
    this.setPageComplete(false);
    setControl(xsdFileForm);
    xsdFileForm.setPage(this);
  }
}
Program: 129791
Project: 129791
Buggy source:
private static void setEbcdicValue(EbcdicConnection connection,INode node,String repositoryValue){
  if ("String_Node_Str".equals(repositoryValue)) {
    String value=getParameterValue(connection,node,"String_Node_Str");
    if (value != null) {
      connection.setFilePath(value);
      connection.setDataFile(value);
    }
  }
  if ("String_Node_Str".equals(repositoryValue)) {
    String value=getParameterValue(connection,node,"String_Node_Str");
    if (value != null) {
      connection.setMidFile(value);
    }
  }
  if ("String_Node_Str".equals(repositoryValue)) {
    String value=getParameterValue(connection,node,"String_Node_Str");
    if (value != null) {
      connection.setEncoding(value);
    }
  }
}

Fixed version (ground truth):
private static void setEbcdicValue(EbcdicConnection connection,INode node,String repositoryValue){
  if ("String_Node_Str".equals(repositoryValue)) {
    String value=getParameterValue(connection,node,"String_Node_Str");
    if (value != null) {
      connection.setDataFile(value);
    }
  }
  if ("String_Node_Str".equals(repositoryValue)) {
    String value=getParameterValue(connection,node,"String_Node_Str");
    if (value != null) {
      connection.setMidFile(value);
    }
  }
  if ("String_Node_Str".equals(repositoryValue)) {
    String value=getParameterValue(connection,node,"String_Node_Str");
    if (value != null) {
      connection.setEncoding(value);
    }
  }
}
Program: 129792
Project: 129792
Buggy source:
@Override public void createElement(){
  IInputValidator validator=new IInputValidator(){
    public String isValid(    String newText){
      return toValid(newText);
    }
  }
;
  InputDialog inputDial=new InputDialog(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),"String_Node_Str",validator);
  inputDial.open();
  String returnValue=inputDial.getValue();
  if (returnValue == null) {
    return;
  }
  createContext(returnValue);
  refreshViewer();
}

Fixed version (ground truth):
@Override public void createElement(){
  IInputValidator validator=new IInputValidator(){
    public String isValid(    String newText){
      return toValid(newText);
    }
  }
;
  InputDialog inputDial=new InputDialog(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),"String_Node_Str",validator);
  inputDial.open();
  String returnValue=inputDial.getValue();
  if (returnValue == null || "String_Node_Str".equals(returnValue)) {
    return;
  }
  createContext(returnValue);
  refreshViewer();
}
Program: 129793
Project: 129793
Buggy source:
@Override protected void editSelectedElement(){
  IInputValidator validator=new IInputValidator(){
    public String isValid(    String newText){
      return toValid(newText);
    }
  }
;
  IContext selectedContext=(IContext)(getSelection()).getFirstElement();
  String contextName=selectedContext.getName();
  InputDialog inputDial=new InputDialog(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",contextName),"String_Node_Str",validator);
  inputDial.open();
  String returnValue=inputDial.getValue();
  if (returnValue == null) {
    return;
  }
  if (manager.getProcess() != null && manager.getProcess().getLastRunContext() != null && manager.getProcess().getLastRunContext().sameAs(selectedContext)) {
    manager.getProcess().setLastRunContext(selectedContext);
  }
  renameContext(selectedContext,returnValue);
  refreshViewer();
}

Fixed version (ground truth):
@Override protected void editSelectedElement(){
  IInputValidator validator=new IInputValidator(){
    public String isValid(    String newText){
      return toValid(newText);
    }
  }
;
  IContext selectedContext=(IContext)(getSelection()).getFirstElement();
  String contextName=selectedContext.getName();
  InputDialog inputDial=new InputDialog(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",contextName),"String_Node_Str",validator);
  inputDial.open();
  String returnValue=inputDial.getValue();
  if (returnValue == null || "String_Node_Str".equals(returnValue)) {
    return;
  }
  if (manager.getProcess() != null && manager.getProcess().getLastRunContext() != null && manager.getProcess().getLastRunContext().sameAs(selectedContext)) {
    manager.getProcess().setLastRunContext(selectedContext);
  }
  renameContext(selectedContext,returnValue);
  refreshViewer();
}
Program: 129795
Project: 129795
Buggy source:
@Override public void createElement(){
  IInputValidator validator=new IInputValidator(){
    public String isValid(    String newText){
      return toValid(newText);
    }
  }
;
  InputDialog inputDial=new InputDialog(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),"String_Node_Str",validator);
  inputDial.open();
  String returnValue=inputDial.getValue();
  if (returnValue == null) {
    return;
  }
  createContext(returnValue);
  refreshViewer();
}

Fixed version (ground truth):
@Override public void createElement(){
  IInputValidator validator=new IInputValidator(){
    public String isValid(    String newText){
      return toValid(newText);
    }
  }
;
  InputDialog inputDial=new InputDialog(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),"String_Node_Str",validator);
  inputDial.open();
  String returnValue=inputDial.getValue();
  if (returnValue == null || "String_Node_Str".equals(returnValue)) {
    return;
  }
  createContext(returnValue);
  refreshViewer();
}
Program: 129796
Project: 129796
Buggy source:
@Override protected void editSelectedElement(){
  IInputValidator validator=new IInputValidator(){
    public String isValid(    String newText){
      return toValid(newText);
    }
  }
;
  IContext selectedContext=(IContext)(getSelection()).getFirstElement();
  String contextName=selectedContext.getName();
  InputDialog inputDial=new InputDialog(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",contextName),"String_Node_Str",validator);
  inputDial.open();
  String returnValue=inputDial.getValue();
  if (returnValue == null) {
    return;
  }
  if (manager.getProcess() != null && manager.getProcess().getLastRunContext() != null && manager.getProcess().getLastRunContext().sameAs(selectedContext)) {
    manager.getProcess().setLastRunContext(selectedContext);
  }
  renameContext(selectedContext,returnValue);
  refreshViewer();
}

Fixed version (ground truth):
@Override protected void editSelectedElement(){
  IInputValidator validator=new IInputValidator(){
    public String isValid(    String newText){
      return toValid(newText);
    }
  }
;
  IContext selectedContext=(IContext)(getSelection()).getFirstElement();
  String contextName=selectedContext.getName();
  InputDialog inputDial=new InputDialog(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str",contextName),"String_Node_Str",validator);
  inputDial.open();
  String returnValue=inputDial.getValue();
  if (returnValue == null || "String_Node_Str".equals(returnValue)) {
    return;
  }
  if (manager.getProcess() != null && manager.getProcess().getLastRunContext() != null && manager.getProcess().getLastRunContext().sameAs(selectedContext)) {
    manager.getProcess().setLastRunContext(selectedContext);
  }
  renameContext(selectedContext,returnValue);
  refreshViewer();
}
Program: 129797
Project: 129797
Buggy source:
private static void setEbcdicValue(EbcdicConnection connection,INode node,String repositoryValue){
  if ("String_Node_Str".equals(repositoryValue)) {
    String value=getParameterValue(connection,node,"String_Node_Str");
    if (value != null) {
      connection.setFilePath(value);
      connection.setDataFile(value);
    }
  }
  if ("String_Node_Str".equals(repositoryValue)) {
    String value=getParameterValue(connection,node,"String_Node_Str");
    if (value != null) {
      connection.setMidFile(value);
    }
  }
  if ("String_Node_Str".equals(repositoryValue)) {
    String value=getParameterValue(connection,node,"String_Node_Str");
    if (value != null) {
      connection.setEncoding(value);
    }
  }
}

Fixed version (ground truth):
private static void setEbcdicValue(EbcdicConnection connection,INode node,String repositoryValue){
  if ("String_Node_Str".equals(repositoryValue)) {
    String value=getParameterValue(connection,node,"String_Node_Str");
    if (value != null) {
      connection.setDataFile(value);
    }
  }
  if ("String_Node_Str".equals(repositoryValue)) {
    String value=getParameterValue(connection,node,"String_Node_Str");
    if (value != null) {
      connection.setMidFile(value);
    }
  }
  if ("String_Node_Str".equals(repositoryValue)) {
    String value=getParameterValue(connection,node,"String_Node_Str");
    if (value != null) {
      connection.setEncoding(value);
    }
  }
}
Program: 129798
Project: 129798
Buggy source:
public XmlFileWizardPage getPage(){
  return this.page;
}

Fixed version (ground truth):
public WizardPage getPage(){
  return this.page;
}
Program: 129799
Project: 129799
Buggy source:
public void setPage(XmlFileWizardPage page){
  this.page=page;
}

Fixed version (ground truth):
public void setPage(WizardPage page){
  this.page=page;
}
Program: 129801
Project: 129801
Buggy source:
public void createControl(Composite parent){
  if (getConcept() != null) {
    if (MdmConceptType.INPUT.equals(getConcept().getConceptType())) {
      if (getPreviousPage() instanceof MdmConceptWizardPage2) {
        xsdFileForm=new MDMXSDFileForm(parent,connectionItem,metadataTable,getConcept(),this,creation);
      }
    }
 else     if (MdmConceptType.OUTPUT.equals(getConcept().getConceptType())) {
      xsdFileForm=new MDMOutputSchemaForm(parent,connectionItem,metadataTable,getConcept(),this,creation);
    }
 else     if (MdmConceptType.RECEIVE.equals(getConcept().getConceptType())) {
      xsdFileForm=new MdmReceiveForm(parent,connectionItem,metadataTable,getConcept(),this,creation);
    }
    xsdFileForm.setReadOnly(!isRepositoryObjectEditable);
    AbstractForm.ICheckListener listener=new AbstractForm.ICheckListener(){
      public void checkPerformed(      final AbstractForm source){
        if (source.isStatusOnError()) {
          MdmConceptWizardPage3.this.setPageComplete(false);
          setErrorMessage(source.getStatus());
        }
 else {
          MdmConceptWizardPage3.this.setPageComplete(true);
          setErrorMessage(null);
          setMessage(source.getStatus(),source.getStatusLevel());
        }
      }
    }
;
    xsdFileForm.setListener(listener);
    this.setPageComplete(false);
    setControl(xsdFileForm);
  }
}

Fixed version (ground truth):
public void createControl(Composite parent){
  if (getConcept() != null) {
    if (MdmConceptType.INPUT.equals(getConcept().getConceptType())) {
      if (getPreviousPage() instanceof MdmConceptWizardPage2) {
        xsdFileForm=new MDMXSDFileForm(parent,connectionItem,metadataTable,getConcept(),this,creation);
      }
    }
 else     if (MdmConceptType.OUTPUT.equals(getConcept().getConceptType())) {
      xsdFileForm=new MDMOutputSchemaForm(parent,connectionItem,metadataTable,getConcept(),this,creation);
    }
 else     if (MdmConceptType.RECEIVE.equals(getConcept().getConceptType())) {
      xsdFileForm=new MdmReceiveForm(parent,connectionItem,metadataTable,getConcept(),this,creation);
    }
    xsdFileForm.setReadOnly(!isRepositoryObjectEditable);
    AbstractForm.ICheckListener listener=new AbstractForm.ICheckListener(){
      public void checkPerformed(      final AbstractForm source){
        if (source.isStatusOnError()) {
          MdmConceptWizardPage3.this.setPageComplete(false);
          setErrorMessage(source.getStatus());
        }
 else {
          MdmConceptWizardPage3.this.setPageComplete(true);
          setErrorMessage(null);
          setMessage(source.getStatus(),source.getStatusLevel());
        }
      }
    }
;
    xsdFileForm.setListener(listener);
    this.setPageComplete(false);
    setControl(xsdFileForm);
    xsdFileForm.setPage(this);
  }
}
Program: 129803
Project: 129803
Buggy source:
public synchronized void updateViewProjectNode(IProjectRepositoryNode projectRepNode){
  if (projectRepNode != null) {
    final Iterator<IProjectRepositoryNode> iterator=viewProjectNodes.iterator();
    while (iterator.hasNext()) {
      IProjectRepositoryNode tmpProjectNode=iterator.next();
      if (tmpProjectNode.getProject().getTechnicalLabel().equals(projectRepNode.getProject().getTechnicalLabel())) {
        iterator.remove();
      }
    }
    viewProjectNodes.add(projectRepNode);
  }
}

Fixed version (ground truth):
public synchronized void updateViewProjectNode(IProjectRepositoryNode projectRepNode){
  if (projectRepNode != null) {
    final Iterator<IProjectRepositoryNode> iterator=viewProjectNodes.iterator();
    while (iterator.hasNext()) {
      IProjectRepositoryNode tmpProjectNode=iterator.next();
      if (tmpProjectNode.getProject().getTechnicalLabel().equals(projectRepNode.getProject().getTechnicalLabel())) {
        iterator.remove();
        if (tmpProjectNode instanceof RepositoryNode) {
          ((RepositoryNode)tmpProjectNode).setEnableDisposed(true);
        }
        tmpProjectNode.dispose();
      }
    }
    viewProjectNodes.add(projectRepNode);
  }
}
Program: 129804
Project: 129804
Buggy source:
public void dispose(){
  boolean doDispose=isEnableDisposed();
  if (getType() == ENodeType.STABLE_SYSTEM_FOLDER) {
    doDispose=true;
  }
  if (doDispose) {
    this.id=null;
    this.projectTechnicalLabel=null;
    this.type=null;
    this.icon=null;
    this.parent=null;
    this.object=null;
    this.initialized=false;
    if (this.properties != null) {
      this.properties.clear();
    }
  }
  if (this.children != null) {
    for (    IRepositoryNode child : this.children) {
      child.dispose();
    }
    if (doDispose) {
      this.children.clear();
    }
  }
  if (doDispose) {
    this.isDisposed=true;
  }
}

Fixed version (ground truth):
public void dispose(){
  boolean doDispose=isEnableDisposed();
  if (getType() == ENodeType.STABLE_SYSTEM_FOLDER) {
    doDispose=true;
  }
  if (doDispose) {
    this.id=null;
    this.projectTechnicalLabel=null;
    this.parent=null;
    this.object=null;
    this.initialized=false;
    if (this.properties != null) {
      this.properties.clear();
    }
  }
  if (this.children != null) {
    for (    IRepositoryNode child : this.children) {
      child.dispose();
    }
    if (doDispose) {
      this.children.clear();
    }
  }
  if (doDispose) {
    this.isDisposed=true;
  }
}
Program: 129805
Project: 129805
Buggy source:
public boolean isLock(RepositoryNode sourceNode){
  boolean isLock=false;
  IRepositoryViewObject objectToCopy=sourceNode.getObject();
  try {
    ProxyRepositoryFactory.getInstance().initialize();
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  if (ProxyRepositoryFactory.getInstance().getStatus(objectToCopy) == ERepositoryStatus.LOCK_BY_USER) {
    isLock=true;
  }
  if (ProxyRepositoryFactory.getInstance().getStatus(objectToCopy) == ERepositoryStatus.LOCK_BY_OTHER) {
    isLock=true;
  }
  return isLock;
}

Fixed version (ground truth):
public boolean isLock(RepositoryNode sourceNode){
  boolean isLock=false;
  IRepositoryViewObject objectToCopy=sourceNode.getObject();
  try {
    ProxyRepositoryFactory.getInstance().initialize();
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  objectToCopy.getProperty();
  if (ProxyRepositoryFactory.getInstance().getStatus(objectToCopy) == ERepositoryStatus.LOCK_BY_USER) {
    isLock=true;
  }
  if (ProxyRepositoryFactory.getInstance().getStatus(objectToCopy) == ERepositoryStatus.LOCK_BY_OTHER) {
    isLock=true;
  }
  return isLock;
}
Program: 129806
Project: 129806
Buggy source:
public boolean isLock(RepositoryNode sourceNode){
  boolean isLock=false;
  try {
    ProxyRepositoryFactory.getInstance().initialize();
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  IRepositoryViewObject objectToCopy=sourceNode.getObject();
  if (ProxyRepositoryFactory.getInstance().getStatus(objectToCopy) == ERepositoryStatus.LOCK_BY_USER) {
    isLock=true;
  }
  if (ProxyRepositoryFactory.getInstance().getStatus(objectToCopy) == ERepositoryStatus.LOCK_BY_OTHER) {
    isLock=true;
  }
  return isLock;
}

Fixed version (ground truth):
public boolean isLock(RepositoryNode sourceNode){
  boolean isLock=false;
  try {
    ProxyRepositoryFactory.getInstance().initialize();
  }
 catch (  PersistenceException e) {
    ExceptionHandler.process(e);
  }
  IRepositoryViewObject objectToCopy=sourceNode.getObject();
  objectToCopy.getProperty();
  if (ProxyRepositoryFactory.getInstance().getStatus(objectToCopy) == ERepositoryStatus.LOCK_BY_USER) {
    isLock=true;
  }
  if (ProxyRepositoryFactory.getInstance().getStatus(objectToCopy) == ERepositoryStatus.LOCK_BY_OTHER) {
    isLock=true;
  }
  return isLock;
}
Program: 129810
Project: 129810
Buggy source:
public static routines.system.Document parseTo_Document(String s,boolean ignoreDTD) throws org.dom4j.DocumentException {
  if (s == null) {
    return null;
  }
  routines.system.Document theDoc=new routines.system.Document();
  org.dom4j.io.SAXReader reader=new org.dom4j.io.SAXReader();
  if (ignoreDTD) {
    reader.setEntityResolver(new EntityResolver(){
      public InputSource resolveEntity(      String publicId,      String systemId) throws SAXException, IOException {
        return new org.xml.sax.InputSource(new java.io.ByteArrayInputStream("String_Node_Str".getBytes()));
      }
    }
);
  }
  org.dom4j.Document document=reader.read(new java.io.StringReader(s));
  theDoc.setDocument(document);
  return theDoc;
}

Fixed version (ground truth):
public static routines.system.Document parseTo_Document(String s,boolean ignoreDTD,String encoding) throws org.dom4j.DocumentException {
  if (s == null) {
    return null;
  }
  routines.system.Document theDoc=new routines.system.Document();
  org.dom4j.io.SAXReader reader=new org.dom4j.io.SAXReader();
  if (ignoreDTD) {
    reader.setEntityResolver(new EntityResolver(){
      public InputSource resolveEntity(      String publicId,      String systemId) throws SAXException, IOException {
        return new org.xml.sax.InputSource(new java.io.ByteArrayInputStream("String_Node_Str".getBytes()));
      }
    }
);
  }
  org.dom4j.Document document=reader.read(new java.io.StringReader(s));
  if (encoding != null && !("String_Node_Str".equals(encoding))) {
    document.setXMLEncoding(encoding);
  }
  theDoc.setDocument(document);
  return theDoc;
}
Program: 129812
Project: 129812
Buggy source:
public boolean valid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  String productNameWanted=repositoryType;
  String componentProductname=null;
  if (item instanceof XmlFileConnectionItem) {
    XmlFileConnection connection=(XmlFileConnection)((XmlFileConnectionItemImpl)item).getConnection();
    if (!connection.isInputModel()) {
      productNameWanted="String_Node_Str";
    }
  }
  if (component != null) {
    componentProductname=component.getRepositoryType();
  }
  if (repositoryType != null && ("String_Node_Str").equals(component.getName())) {
    if (componentProductname != null && productNameWanted.endsWith(componentProductname) && repositoryType.equals(component.getName())) {
      return true;
    }
  }
 else   if (component != null && repositoryType != null && repositoryType.equals(component.getName())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean valid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  if (component != null && repositoryType != null && repositoryType.equals(component.getName())) {
    return true;
  }
  return false;
}
Program: 129813
Project: 129813
Buggy source:
public boolean valid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  String productNameWanted=repositoryType;
  if (component == null || repositoryType == null) {
    return false;
  }
  if (("String_Node_Str").equals(component.getName()) || ("String_Node_Str").equals(component.getName())) {
    if (item instanceof XmlFileConnectionItem) {
      XmlFileConnection connection=(XmlFileConnection)((XmlFileConnectionItemImpl)item).getConnection();
      if (!connection.isInputModel()) {
        productNameWanted="String_Node_Str";
      }
    }
  }
  String componentProductname=component.getRepositoryType();
  if (componentProductname != null && productNameWanted.endsWith(componentProductname) && validSub(item,type,seletetedNode,component,repositoryType)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean valid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  if (component == null || repositoryType == null) {
    return false;
  }
  String componentProductname=component.getRepositoryType();
  if (componentProductname != null && repositoryType.endsWith(componentProductname) && validSub(item,type,seletetedNode,component,repositoryType)) {
    return true;
  }
  return false;
}
Program: 129816
Project: 129816
Buggy source:
public boolean valid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  if (component != null && repositoryType != null && repositoryType.equals(component.getName())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean valid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  String productNameWanted=repositoryType;
  String componentProductname=null;
  if (item instanceof XmlFileConnectionItem) {
    XmlFileConnection connection=(XmlFileConnection)((XmlFileConnectionItemImpl)item).getConnection();
    if (!connection.isInputModel()) {
      productNameWanted="String_Node_Str";
    }
  }
  if (component != null) {
    componentProductname=component.getRepositoryType();
  }
  if (repositoryType != null && ("String_Node_Str").equals(component.getName())) {
    if (componentProductname != null && productNameWanted.endsWith(componentProductname) && repositoryType.equals(component.getName())) {
      return true;
    }
  }
 else   if (component != null && repositoryType != null && repositoryType.equals(component.getName())) {
    return true;
  }
  return false;
}
Program: 129817
Project: 129817
Buggy source:
public boolean valid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  if (component == null || repositoryType == null) {
    return false;
  }
  String componentProductname=component.getRepositoryType();
  if (componentProductname != null && repositoryType.endsWith(componentProductname) && validSub(item,type,seletetedNode,component,repositoryType)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean valid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  String productNameWanted=repositoryType;
  if (component == null || repositoryType == null) {
    return false;
  }
  if (("String_Node_Str").equals(component.getName()) || ("String_Node_Str").equals(component.getName())) {
    if (item instanceof XmlFileConnectionItem) {
      XmlFileConnection connection=(XmlFileConnection)((XmlFileConnectionItemImpl)item).getConnection();
      if (!connection.isInputModel()) {
        productNameWanted="String_Node_Str";
      }
    }
  }
  String componentProductname=component.getRepositoryType();
  if (componentProductname != null && productNameWanted.endsWith(componentProductname) && validSub(item,type,seletetedNode,component,repositoryType)) {
    return true;
  }
  return false;
}