nus-yam/ex-repair huggingface dataset:
Program: 127273
Project: 127273
Buggy source:
/** 
 * DOC qzhang Comment method "addTableListener".
 */
private void addTableListener(){
  table.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      if (e.detail == SWT.CHECK) {
        TableItem tableItem=(TableItem)e.item;
        boolean promptNeeded=tableItem.getChecked();
        if (promptNeeded) {
          tableItem.setText(2,"String_Node_Str");
          tableItem.setText(3,Messages.getString("String_Node_Str"));
          countPending++;
          parentWizardPage.setPageComplete(false);
          refreshTable(tableItem,-1);
        }
 else {
          clearTableItem(tableItem);
          if (tableItem.getText() != null && tableItem.getText().equals(Messages.getString("String_Node_Str"))) {
            countPending--;
          }
        }
        if (forTemplate && (ConnectionHelper.getTables(getConnection()).size() <= 0)) {
          parentWizardPage.setPageComplete(false);
        }
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * DOC qzhang Comment method "addTableListener".
 */
private void addTableListener(){
  table.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      if (e.detail == SWT.CHECK) {
        TableItem tableItem=(TableItem)e.item;
        boolean promptNeeded=tableItem.getChecked();
        if (promptNeeded) {
          tableItem.setText(2,"String_Node_Str");
          tableItem.setText(3,Messages.getString("String_Node_Str"));
          countPending++;
          parentWizardPage.setPageComplete(false);
          refreshTable(tableItem,-1);
          clearTableItem(tableItem);
        }
 else {
          clearTableItem(tableItem);
          if (tableItem.getText() != null && tableItem.getText().equals(Messages.getString("String_Node_Str"))) {
            countPending--;
          }
        }
        if (forTemplate && (ConnectionHelper.getTables(getConnection()).size() <= 0)) {
          parentWizardPage.setPageComplete(false);
        }
      }
    }
  }
);
}
Program: 127274
Project: 127274
Buggy source:
/** 
 * deleteTable.
 * @param tableItem
 */
protected void deleteTable(TableItem tableItem){
  SalesforceSchemaConnection connection=getConnection();
  Iterator<MetadataTable> iterate=ConnectionHelper.getTables(getConnection()).iterator();
  while (iterate.hasNext()) {
    MetadataTable metadata=iterate.next();
    if (metadata != null && metadata.getLabel().equals(tableItem.getText(0)) && metadata.eContainer() instanceof SalesforceModuleUnit) {
      SalesforceModuleUnit moduleUnit=(SalesforceModuleUnit)metadata.eContainer();
      connection.getModules().remove(moduleUnit);
    }
  }
}

Fixed version (ground truth):
/** 
 * deleteTable.
 * @param tableItem
 */
protected void deleteTable(TableItem tableItem){
  SalesforceSchemaConnection connection=getConnection();
  Iterator<MetadataTable> iterate=ConnectionHelper.getTables(getConnection()).iterator();
  while (iterate.hasNext()) {
    MetadataTable metadata=iterate.next();
    if (metadata != null && metadata.getLabel().equals(tableItem.getText(0)) && metadata.eContainer() instanceof SalesforceModuleUnit) {
      SalesforceModuleUnit moduleUnit=(SalesforceModuleUnit)metadata.eContainer();
      connection.getModules().remove(moduleUnit);
    }
  }
  iterate=ConnectionHelper.getTables(temConnection).iterator();
  while (iterate.hasNext()) {
    MetadataTable metadata=iterate.next();
    if (metadata != null && metadata.getLabel().equals(tableItem.getText(0)) && metadata.eContainer() instanceof SalesforceModuleUnit) {
      SalesforceModuleUnit moduleUnit=(SalesforceModuleUnit)metadata.eContainer();
      temConnection.getModules().remove(moduleUnit);
    }
  }
}
Program: 127275
Project: 127275
Buggy source:
@Override public void widgetSelected(final SelectionEvent e){
  if (e.detail == SWT.CHECK) {
    TableItem tableItem=(TableItem)e.item;
    boolean promptNeeded=tableItem.getChecked();
    if (promptNeeded) {
      tableItem.setText(2,"String_Node_Str");
      tableItem.setText(3,Messages.getString("String_Node_Str"));
      countPending++;
      parentWizardPage.setPageComplete(false);
      refreshTable(tableItem,-1);
    }
 else {
      clearTableItem(tableItem);
      if (tableItem.getText() != null && tableItem.getText().equals(Messages.getString("String_Node_Str"))) {
        countPending--;
      }
    }
    if (forTemplate && (ConnectionHelper.getTables(getConnection()).size() <= 0)) {
      parentWizardPage.setPageComplete(false);
    }
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(final SelectionEvent e){
  if (e.detail == SWT.CHECK) {
    TableItem tableItem=(TableItem)e.item;
    boolean promptNeeded=tableItem.getChecked();
    if (promptNeeded) {
      tableItem.setText(2,"String_Node_Str");
      tableItem.setText(3,Messages.getString("String_Node_Str"));
      countPending++;
      parentWizardPage.setPageComplete(false);
      refreshTable(tableItem,-1);
      clearTableItem(tableItem);
    }
 else {
      clearTableItem(tableItem);
      if (tableItem.getText() != null && tableItem.getText().equals(Messages.getString("String_Node_Str"))) {
        countPending--;
      }
    }
    if (forTemplate && (ConnectionHelper.getTables(getConnection()).size() <= 0)) {
      parentWizardPage.setPageComplete(false);
    }
  }
}
Program: 127277
Project: 127277
Buggy source:
/** 
 * different id with same name.
 */
protected boolean isSameName(ItemRecord itemRecord,IRepositoryViewObject repObject){
  final Property property=itemRecord.getProperty();
  if ((property.getLabel() != null && property.getLabel().equalsIgnoreCase(repObject.getLabel())) && (property.getId() != null && !property.getId().equals(repObject.getId()))) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * item with same name.
 */
protected boolean isSameName(ItemRecord itemRecord,IRepositoryViewObject repObject){
  final Property property=itemRecord.getProperty();
  if ((property.getLabel() != null && property.getLabel().equalsIgnoreCase(repObject.getLabel()))) {
    return true;
  }
  return false;
}
Program: 127278
Project: 127278
Buggy source:
@Override public Item copy(Item sourceItem,IPath targetPath,String newItemLabel) throws PersistenceException, BusinessException {
  ICoreService coreService=getCoreService();
  if (coreService != null && sourceItem instanceof ProcessItem) {
    try {
      coreService.checkJob(sourceItem.getProperty().getLabel());
    }
 catch (    BusinessException e) {
      throw new PersistenceException(e);
    }
catch (    RuntimeException e) {
    }
  }
  Item targetItem=this.repositoryFactoryFromProvider.copy(sourceItem,targetPath,newItemLabel);
  return targetItem;
}

Fixed version (ground truth):
@Override public Item copy(Item sourceItem,IPath targetPath,String newItemLabel) throws PersistenceException, BusinessException {
  ICoreService coreService=getCoreService();
  if (coreService != null && sourceItem instanceof ProcessItem) {
    try {
      coreService.checkJob(sourceItem.getProperty().getLabel());
    }
 catch (    BusinessException e) {
      throw new PersistenceException(e);
    }
catch (    RuntimeException e) {
    }
  }
  Item targetItem=this.repositoryFactoryFromProvider.copy(sourceItem,targetPath,newItemLabel);
  fireRepositoryPropertyChange(ERepositoryActionName.COPY.getName(),sourceItem,targetItem);
  return targetItem;
}
Program: 127282
Project: 127282
Buggy source:
private void set4AS400(boolean flag){
  if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreUIService.class)) {
    ICoreUIService service=(ICoreUIService)GlobalServiceRegister.getDefault().getService(ICoreUIService.class);
    service.getPreferenceStore().setValue(ITalendCorePrefConstants.AS400_SQL_SEG,flag);
  }
}

Fixed version (ground truth):
private void set4AS400(boolean flag){
  if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreUIService.class)) {
    CorePlugin.getDefault().getPreferenceStore().setValue(ITalendCorePrefConstants.AS400_SQL_SEG,flag);
  }
}
Program: 127283
Project: 127283
Buggy source:
@Test public void testGetDbTypeByClassNameAndDriverJar(){
  Assert.assertNull(extractMetaManger.getDbTypeByClassNameAndDriverJar(null,null));
  Assert.assertEquals(extractMetaManger.getDbTypeByClassNameAndDriverJar("String_Node_Str",null),EDatabaseTypeName.MYSQL.getXmlName());
  Assert.assertEquals(extractMetaManger.getDbTypeByClassNameAndDriverJar("String_Node_Str",null),EDatabaseTypeName.GREENPLUM.getXmlName());
  Assert.assertEquals(extractMetaManger.getDbTypeByClassNameAndDriverJar("String_Node_Str","String_Node_Str"),EDatabaseTypeName.PSQL.getXmlName());
  Assert.assertEquals(extractMetaManger.getDbTypeByClassNameAndDriverJar("String_Node_Str","String_Node_Str"),EDatabaseTypeName.ACCESS.getXmlName());
}

Fixed version (ground truth):
@Test public void testGetDbTypeByClassNameAndDriverJar(){
  Assert.assertNull(extractMetaManger.getDbTypeByClassNameAndDriverJar(null,null));
  Assert.assertEquals(extractMetaManger.getDbTypeByClassNameAndDriverJar("String_Node_Str",null),EDatabaseTypeName.MYSQL.getXmlName());
  Assert.assertEquals(extractMetaManger.getDbTypeByClassNameAndDriverJar("String_Node_Str",null),EDatabaseTypeName.PSQL.getXmlName());
  Assert.assertEquals(extractMetaManger.getDbTypeByClassNameAndDriverJar("String_Node_Str","String_Node_Str"),EDatabaseTypeName.PSQL.getXmlName());
  Assert.assertEquals(extractMetaManger.getDbTypeByClassNameAndDriverJar("String_Node_Str","String_Node_Str"),EDatabaseTypeName.ACCESS.getXmlName());
}
Program: 127284
Project: 127284
Buggy source:
/** 
 * DOC amaumont Comment method "setTableViewerCreatorOptions".
 * @param newTableViewerCreator
 */
protected void setTableViewerCreatorOptions(TableViewerCreator<B> newTableViewerCreator){
  newTableViewerCreator.setShowLineSelection(SHOW_ROW_SELECTION.FULL);
  newTableViewerCreator.setLazyLoad(true);
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "setTableViewerCreatorOptions".
 * @param newTableViewerCreator
 */
protected void setTableViewerCreatorOptions(TableViewerCreator<B> newTableViewerCreator){
  newTableViewerCreator.setShowLineSelection(SHOW_ROW_SELECTION.FULL);
}
Program: 127289
Project: 127289
Buggy source:
@Override public void run(){
  try {
    IWorkbenchPage page=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    for (    IEditorReference editors : page.getEditorReferences()) {
      String nameInEditor=editors.getName();
      if (objToDelete.getLabel().equals(nameInEditor.substring(nameInEditor.indexOf("String_Node_Str") + 1))) {
        page.closeEditor(editors.getEditor(false),false);
      }
    }
    if (objToDelete.getRepositoryObjectType() != ERepositoryObjectType.JOB_DOC && objToDelete.getRepositoryObjectType() != ERepositoryObjectType.JOBLET_DOC) {
      if (currentNode.getType() == ENodeType.SIMPLE_FOLDER) {
        for (        IRepositoryNode curNode : currentNode.getChildren()) {
          deleteElements(factory,(RepositoryNode)curNode);
        }
        factory.deleteFolder(ProjectManager.getInstance().getCurrentProject(),currentNode.getContentType(),RepositoryNodeUtilities.getFolderPath(currentNode.getObject().getProperty().getItem()),true);
      }
 else {
        for (        IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {
          handler.deleteNode(objToDelete);
        }
        factory.deleteObjectPhysical(ProjectManager.getInstance().getCurrentProject(),objToDelete,null,true);
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    IWorkbenchPage page=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    for (    IEditorReference editors : page.getEditorReferences()) {
      String nameInEditor=editors.getName();
      if (objToDelete.getLabel().equals(nameInEditor.substring(nameInEditor.indexOf("String_Node_Str") + 1))) {
        page.closeEditor(editors.getEditor(false),false);
      }
    }
    if (objToDelete.getRepositoryObjectType() != ERepositoryObjectType.JOB_DOC && objToDelete.getRepositoryObjectType() != ERepositoryObjectType.JOBLET_DOC) {
      if (currentNode.getType() == ENodeType.SIMPLE_FOLDER) {
        for (        IRepositoryNode curNode : currentNode.getChildren()) {
          deleteElements(factory,(RepositoryNode)curNode);
        }
        factory.deleteFolder(ProjectManager.getInstance().getCurrentProject(),currentNode.getContentType(),RepositoryNodeUtilities.getFolderPath(currentNode.getObject().getProperty().getItem()),true);
      }
 else {
        for (        IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {
          handler.deleteNode(objToDelete);
        }
        ERepositoryObjectType nodeType=(ERepositoryObjectType)currentNode.getProperties(EProperties.CONTENT_TYPE);
        if (nodeType == ERepositoryObjectType.ROUTINES || nodeType == ERepositoryObjectType.PIG_UDF) {
          forceBuild=true;
        }
        factory.deleteObjectPhysical(ProjectManager.getInstance().getCurrentProject(),objToDelete,null,true);
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}
Program: 127290
Project: 127290
Buggy source:
private static List<ModuleNeeded> getModulesNeededForDBConnWizard(){
  List<ModuleNeeded> importNeedsList=new ArrayList<ModuleNeeded>();
  EDatabaseVersion4Drivers[] dbVersions=EDatabaseVersion4Drivers.values();
  for (  EDatabaseVersion4Drivers temp : dbVersions) {
    Set<String> drivers=temp.getProviderDrivers();
    for (    String driver : drivers) {
      String message=Messages.getString("String_Node_Str");
      importNeedsList.add(new ModuleNeeded(temp.name(),driver,message,true));
    }
  }
  return importNeedsList;
}

Fixed version (ground truth):
private static List<ModuleNeeded> getModulesNeededForDBConnWizard(){
  List<ModuleNeeded> importNeedsList=new ArrayList<ModuleNeeded>();
  EDatabaseVersion4Drivers[] dbVersions=EDatabaseVersion4Drivers.values();
  String message=Messages.getString("String_Node_Str");
  for (  EDatabaseVersion4Drivers temp : dbVersions) {
    Set<String> drivers=temp.getProviderDrivers();
    for (    String driver : drivers) {
      importNeedsList.add(new ModuleNeeded(temp.name(),driver,message,true));
    }
  }
  return importNeedsList;
}
Program: 127291
Project: 127291
Buggy source:
/** 
 * yzhang Comment method "getExpressionStoreFolder".
 * @return
 */
private String getExpressionStoreFolderPath(){
  if (rootFolderPath == null) {
    if (path == null) {
      IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
      RepositoryContext repositoryContext=(RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
      Project project=repositoryContext.getProject();
      IProject p=root.getProject(project.getTechnicalLabel());
      IFolder configurationFolder=p.getFolder(CONFIGURATION_FOLDER_NAME);
      if (!configurationFolder.exists()) {
        try {
          configurationFolder.create(true,true,null);
        }
 catch (        CoreException e) {
          ExceptionHandler.process(e);
        }
      }
      IFolder expressionFolder=configurationFolder.getFolder(EXPRESSION_FOLDER_NAME);
      if (!expressionFolder.exists()) {
        try {
          expressionFolder.create(true,true,null);
        }
 catch (        CoreException e) {
          ExceptionHandler.process(e);
        }
      }
      path=expressionFolder.getLocation().toOSString();
    }
    int index=path.indexOf(EXPRESSION_FOLDER_NAME) + EXPRESSION_FOLDER_NAME.length();
    rootFolderPath=path.substring(0,index);
  }
  return rootFolderPath;
}

Fixed version (ground truth):
/** 
 * yzhang Comment method "getExpressionStoreFolder".
 * @return
 */
private String getExpressionStoreFolderPath(){
  if (rootFolderPath == null) {
    if (path == null) {
      IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
      RepositoryContext repositoryContext=(RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
      Project project=repositoryContext.getProject();
      IProject p=root.getProject(project.getTechnicalLabel());
      String projectPath=p.getLocation().toPortableString();
      String configurationPath=projectPath + File.separator + ExpressionPersistance.CONFIGURATION_FOLDER_NAME;
      configurationPath=getValidFolderPath(configurationPath,1);
      String expressionPath=configurationPath + File.separator + ExpressionPersistance.EXPRESSION_FOLDER_NAME;
      expressionPath=getValidFolderPath(expressionPath,1);
      File expressionFolder=new File(expressionPath);
      path=expressionFolder.getAbsolutePath();
    }
    int index=path.indexOf(EXPRESSION_FOLDER_NAME) + EXPRESSION_FOLDER_NAME.length();
    rootFolderPath=path.substring(0,index);
  }
  return rootFolderPath;
}
Program: 127292
Project: 127292
Buggy source:
/** 
 * yzhang Comment method "getExpressionStoreFolder".
 * @return
 */
private String getExpressionStoreFolderPath(){
  if (rootFolderPath == null) {
    if (path == null) {
      IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
      RepositoryContext repositoryContext=(RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
      Project project=repositoryContext.getProject();
      IProject p=root.getProject(project.getTechnicalLabel());
      IFolder configurationFolder=p.getFolder(CONFIGURATION_FOLDER_NAME);
      if (!configurationFolder.exists()) {
        try {
          configurationFolder.create(true,true,null);
        }
 catch (        CoreException e) {
          RuntimeExceptionHandler.process(e);
        }
      }
      IFolder expressionFolder=configurationFolder.getFolder(EXPRESSION_FOLDER_NAME);
      if (!expressionFolder.exists()) {
        try {
          expressionFolder.create(true,true,null);
        }
 catch (        CoreException e) {
          RuntimeExceptionHandler.process(e);
        }
      }
      path=expressionFolder.getLocation().toOSString();
    }
    int index=path.indexOf(EXPRESSION_FOLDER_NAME) + EXPRESSION_FOLDER_NAME.length();
    rootFolderPath=path.substring(0,index);
  }
  return rootFolderPath;
}

Fixed version (ground truth):
/** 
 * yzhang Comment method "getExpressionStoreFolder".
 * @return
 */
private String getExpressionStoreFolderPath(){
  if (rootFolderPath == null) {
    if (path == null) {
      IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
      RepositoryContext repositoryContext=(RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
      Project project=repositoryContext.getProject();
      IProject p=root.getProject(project.getTechnicalLabel());
      String projectPath=p.getLocation().toPortableString() + File.separator + RepositoryConstants.TEMP_DIRECTORY;
      String configurationPath=projectPath + File.separator + ExpressionPersistance.CONFIGURATION_FOLDER_NAME;
      configurationPath=getValidFolderPath(configurationPath,1);
      String expressionPath=configurationPath + File.separator + ExpressionPersistance.EXPRESSION_FOLDER_NAME;
      expressionPath=getValidFolderPath(expressionPath,1);
      File expressionFolder=new File(expressionPath);
      path=expressionFolder.getAbsolutePath();
    }
    int index=path.indexOf(EXPRESSION_FOLDER_NAME) + EXPRESSION_FOLDER_NAME.length();
    rootFolderPath=path.substring(0,index);
  }
  return rootFolderPath;
}
Program: 127293
Project: 127293
Buggy source:
/** 
 * yzhang Comment method "getExpressionStoreFolder".
 * @return
 */
private String getExpressionStoreFolderPath(){
  if (rootFolderPath == null) {
    if (path == null) {
      IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
      RepositoryContext repositoryContext=(RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
      Project project=repositoryContext.getProject();
      IProject p=root.getProject(project.getTechnicalLabel());
      String projectPath=p.getLocation().toPortableString();
      String configurationPath=projectPath + File.separator + ExpressionPersistance.CONFIGURATION_FOLDER_NAME;
      configurationPath=getValidFolderPath(configurationPath,1);
      String expressionPath=configurationPath + File.separator + ExpressionPersistance.EXPRESSION_FOLDER_NAME;
      expressionPath=getValidFolderPath(expressionPath,1);
      File expressionFolder=new File(expressionPath);
      path=expressionFolder.getAbsolutePath();
    }
    int index=path.indexOf(EXPRESSION_FOLDER_NAME) + EXPRESSION_FOLDER_NAME.length();
    rootFolderPath=path.substring(0,index);
  }
  return rootFolderPath;
}

Fixed version (ground truth):
/** 
 * yzhang Comment method "getExpressionStoreFolder".
 * @return
 */
private String getExpressionStoreFolderPath(){
  if (rootFolderPath == null) {
    if (path == null) {
      IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
      RepositoryContext repositoryContext=(RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
      Project project=repositoryContext.getProject();
      IProject p=root.getProject(project.getTechnicalLabel());
      String projectPath=p.getLocation().toPortableString() + File.separator + RepositoryConstants.TEMP_DIRECTORY;
      String configurationPath=projectPath + File.separator + ExpressionPersistance.CONFIGURATION_FOLDER_NAME;
      configurationPath=getValidFolderPath(configurationPath,1);
      String expressionPath=configurationPath + File.separator + ExpressionPersistance.EXPRESSION_FOLDER_NAME;
      expressionPath=getValidFolderPath(expressionPath,1);
      File expressionFolder=new File(expressionPath);
      path=expressionFolder.getAbsolutePath();
    }
    int index=path.indexOf(EXPRESSION_FOLDER_NAME) + EXPRESSION_FOLDER_NAME.length();
    rootFolderPath=path.substring(0,index);
  }
  return rootFolderPath;
}
Program: 127294
Project: 127294
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  ((GridData)parent.getLayoutData()).minimumWidth=600;
  ((GridData)parent.getLayoutData()).heightHint=500;
  GridData data=new GridData(GridData.FILL_BOTH);
  Composite container=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.marginTop=10;
  layout.marginLeft=5;
  layout.marginRight=5;
  container.setLayout(layout);
  container.setLayoutData(data);
  data=new GridData(GridData.FILL_HORIZONTAL);
  Label subTitleLabel=new Label(container,SWT.NONE);
  String desc=Messages.getString("String_Node_Str",name);
  subTitleLabel.setText(desc);
  subTitleLabel.setLayoutData(data);
  clufText=new Browser(container,SWT.MULTI | SWT.WRAP | SWT.LEFT| SWT.BORDER);
  clufText.setBackground(new Color(null,255,255,255));
  if (licenseUrl != null) {
    clufText.setUrl(licenseUrl);
  }
 else {
    clufText.setText(desc);
  }
  data=new GridData(GridData.FILL_BOTH);
  clufText.setLayoutData(data);
  return parent;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  ((GridData)parent.getLayoutData()).minimumWidth=600;
  ((GridData)parent.getLayoutData()).heightHint=500;
  GridData data=new GridData(GridData.FILL_BOTH);
  Composite container=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.marginTop=10;
  layout.marginLeft=5;
  layout.marginRight=5;
  container.setLayout(layout);
  container.setLayoutData(data);
  data=new GridData(GridData.FILL_HORIZONTAL);
  Label subTitleLabel=new Label(container,SWT.NONE);
  String desc=Messages.getString("String_Node_Str",name);
  subTitleLabel.setText(desc);
  subTitleLabel.setLayoutData(data);
  Control culfTextControl=null;
  if (TalendPropertiesUtil.isEnabledUseBrowser()) {
    clufTextBrowser=new Browser(container,SWT.MULTI | SWT.WRAP | SWT.LEFT| SWT.BORDER);
    culfTextControl=clufTextBrowser;
    if (licenseUrl != null) {
      clufTextBrowser.setUrl(licenseUrl);
    }
 else {
      clufTextBrowser.setText(desc);
    }
  }
 else {
    clufText=new Text(container,SWT.MULTI | SWT.BORDER | SWT.READ_ONLY| SWT.V_SCROLL| SWT.H_SCROLL);
    culfTextControl=clufText;
    String licenseContent=RemoteModulesHelper.getInstance().getLicenseContentByUrl(licenseUrl);
    if (licenseUrl != null) {
      if (licenseContent != null) {
        clufText.setText(licenseContent);
      }
 else {
        clufText.setText(Messages.getString("String_Node_Str"));
      }
    }
 else {
      clufText.setText(desc);
    }
  }
  if (culfTextControl != null) {
    culfTextControl.setBackground(new Color(null,255,255,255));
    culfTextControl.setLayoutData(new GridData(GridData.FILL_BOTH));
  }
  return parent;
}
Program: 127295
Project: 127295
Buggy source:
private void createLicenseContentSection(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.marginWidth=0;
  layout.marginHeight=0;
  composite.setLayout(layout);
  GridData gd=new GridData(GridData.FILL_BOTH);
  composite.setLayoutData(gd);
  Label label=new Label(composite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  licenseTextBox=new Browser(composite,SWT.MULTI | SWT.BORDER | SWT.WRAP| SWT.READ_ONLY);
  licenseTextBox.setBackground(licenseTextBox.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
  initializeDialogUnits(licenseTextBox);
  gd=new GridData(SWT.FILL,SWT.FILL,true,true);
  licenseTextBox.setLayoutData(gd);
  createLicenseAcceptSection(composite);
  setControl(composite);
}

Fixed version (ground truth):
private void createLicenseContentSection(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.marginWidth=0;
  layout.marginHeight=0;
  composite.setLayout(layout);
  GridData gd=new GridData(GridData.FILL_BOTH);
  composite.setLayoutData(gd);
  Label label=new Label(composite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  if (TalendPropertiesUtil.isEnabledUseBrowser()) {
    licenseTextBox=new Browser(composite,SWT.MULTI | SWT.BORDER | SWT.WRAP| SWT.READ_ONLY);
    licenseTextBox.setBackground(licenseTextBox.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
    initializeDialogUnits(licenseTextBox);
    gd=new GridData(SWT.FILL,SWT.FILL,true,true);
    licenseTextBox.setLayoutData(gd);
  }
 else {
    licenseText=new Text(composite,SWT.MULTI | SWT.BORDER | SWT.READ_ONLY| SWT.V_SCROLL| SWT.H_SCROLL);
    initializeDialogUnits(licenseText);
    licenseText.setLayoutData(new GridData(GridData.FILL_BOTH));
  }
  createLicenseAcceptSection(composite);
  setControl(composite);
}
Program: 127296
Project: 127296
Buggy source:
private void handleSelectionChanged(){
  Element selected=getSelectedElement();
  if (selected != null) {
    License license=null;
    if (selected instanceof License) {
      license=(License)selected;
    }
 else     if (selected instanceof Module) {
      Module module=(Module)selected;
      Element parent=module.getParent();
      if (parent instanceof License) {
        license=(License)module.getParent();
      }
    }
    if (license != null) {
      String type=license.getType();
      Boolean licenseStatus=licenseTypeToStatus.get(type);
      boolean isLicenseAccepted=licenseStatus != null && licenseStatus;
      acceptButton.setSelection(isLicenseAccepted);
      declineButton.setSelection(!isLicenseAccepted);
      String url=license.getUrl();
      if (url != null) {
        licenseTextBox.setUrl(url);
      }
 else {
        licenseTextBox.setText(Messages.getString("String_Node_Str"));
      }
    }
  }
}

Fixed version (ground truth):
private void handleSelectionChanged(){
  Element selected=getSelectedElement();
  if (selected != null) {
    License license=null;
    if (selected instanceof License) {
      license=(License)selected;
    }
 else     if (selected instanceof Module) {
      Module module=(Module)selected;
      Element parent=module.getParent();
      if (parent instanceof License) {
        license=(License)module.getParent();
      }
    }
    if (license != null) {
      String type=license.getType();
      Boolean licenseStatus=licenseTypeToStatus.get(type);
      boolean isLicenseAccepted=licenseStatus != null && licenseStatus;
      acceptButton.setSelection(isLicenseAccepted);
      declineButton.setSelection(!isLicenseAccepted);
      String url=license.getUrl();
      if (TalendPropertiesUtil.isEnabledUseBrowser() && licenseTextBox != null) {
        if (url != null) {
          licenseTextBox.setUrl(url);
        }
 else {
          licenseTextBox.setText(Messages.getString("String_Node_Str"));
        }
      }
 else       if (licenseText != null) {
        String licenseContent=RemoteModulesHelper.getInstance().getLicenseContentByUrl(url);
        if (licenseContent != null) {
          licenseText.setText(licenseContent);
        }
 else {
          licenseText.setText(Messages.getString("String_Node_Str"));
        }
      }
    }
  }
}
Program: 127297
Project: 127297
Buggy source:
/** 
 * return the folder where to find the missing libraries
 * @param context
 */
protected File getLibJavaFolderFile(BundleContext context) throws URISyntaxException {
  String libFolderSysProp=System.getProperty(ORG_TALEND_EXTERNAL_LIB_FOLDER_SYS_PROP);
  if (libFolderSysProp != null) {
    return new File(libFolderSysProp);
  }
 else {
    Location installLocation=getInstallLocation(context);
    File installFolder=new File(installLocation.getURL().toURI());
    return new File(installFolder,System.getProperty("String_Node_Str",LIB_JAVA_SUB_FOLDER));
  }
}

Fixed version (ground truth):
/** 
 * return the folder where to find the missing libraries
 * @param context
 */
protected File getLibJavaFolderFile(BundleContext context) throws URISyntaxException {
  String libFolderSysProp=System.getProperty(ORG_TALEND_EXTERNAL_LIB_FOLDER_SYS_PROP);
  if (libFolderSysProp != null) {
    return new File(libFolderSysProp);
  }
 else {
    Location installLocation=getInstallLocation(context);
    File installFolder=URIUtil.toFile(URIUtil.toURI(installLocation.getURL()));
    return new File(installFolder,System.getProperty("String_Node_Str",LIB_JAVA_SUB_FOLDER));
  }
}
Program: 127299
Project: 127299
Buggy source:
@Override public void earlyStartup(){
  setupMissingJarLoadingObserver();
}

Fixed version (ground truth):
@Override public void earlyStartup(){
  setupMissingJarLoadingObserver();
  librariesService=LibManagerUiPlugin.getDefault().getLibrariesService();
  libraryManagerService=(ILibraryManagerService)GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);
}
Program: 127300
Project: 127300
Buggy source:
/** 
 * DOC sgandon Comment method "createUnavailableModuleToInstall".
 * @param unavailableModuleName
 * @param contextMap
 * @return
 */
private ModuleToInstall createUnavailableModuleToInstall(String unavailableModuleName,Map<String,List<ModuleNeeded>> contextMap){
  ModuleToInstall m=new ModuleToInstall();
  m.setName(unavailableModuleName);
  setContext(m,contextMap);
  m.setDescription(getFirstDescription(contextMap.get(unavailableModuleName)));
  return m;
}

Fixed version (ground truth):
/** 
 * DOC sgandon Comment method "createUnavailableModuleToInstall".
 * @param unavailableModuleName
 * @param contextMap, may be null
 * @return
 */
private ModuleToInstall createUnavailableModuleToInstall(String unavailableModuleName,Map<String,List<ModuleNeeded>> contextMap){
  ModuleToInstall m=new ModuleToInstall();
  m.setName(unavailableModuleName);
  setContext(m,contextMap);
  if (contextMap != null) {
    m.setDescription(getFirstDescription(contextMap.get(unavailableModuleName)));
  }
  return m;
}
Program: 127301
Project: 127301
Buggy source:
@Override protected Object openDialogBox(Control cellEditorWindow){
  String value=(String)getValue();
  ModuleListDialog dialog=new ModuleListDialog(cellEditorWindow.getShell(),value);
  if (dialog.open() == Window.OK) {
    String selecteModule=dialog.getSelecteModule();
    if (selecteModule != null && (value == null || !value.equals(selecteModule))) {
      int index=0;
      if (getTableViewer() != null) {
        index=getTableViewer().getTable().getSelectionIndex();
      }
      executeCommand(new ModelChangeCommand(tableParam,param.getName(),selecteModule,index));
      if (getTableViewer() != null) {
        getTableViewer().refresh(true);
      }
      return selecteModule;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override protected Object openDialogBox(Control cellEditorWindow){
  String value=(String)getValue();
  ModuleListDialog dialog=new ModuleListDialog(cellEditorWindow.getShell(),value);
  if (dialog.open() == Window.OK) {
    String selecteModule=dialog.getSelecteModule();
    if (selecteModule != null && (value == null || !value.equals(selecteModule))) {
      int index=0;
      if (getTableViewer() != null) {
        index=getTableViewer().getTable().getSelectionIndex();
      }
      IElement element=this.tableParam.getElement();
      if (element != null) {
        IElementParameter updateComponentsParam=element.getElementParameter("String_Node_Str");
        if (updateComponentsParam != null) {
          updateComponentsParam.setValue(Boolean.TRUE);
        }
      }
      executeCommand(new ModelChangeCommand(tableParam,param.getName(),selecteModule,index));
      if (getTableViewer() != null) {
        getTableViewer().refresh(true);
      }
      return selecteModule;
    }
  }
  return null;
}
Program: 127305
Project: 127305
Buggy source:
private DatabaseMetaData createJtdsDatabaseMetaData(Connection conn){
  IService service=GlobalServiceRegister.getDefault().getService(IMetadataService.class);
  if (service == null) {
    try {
      return conn.getMetaData();
    }
 catch (    SQLException e) {
      log.error(e.toString());
      throw new RuntimeException(e);
    }
  }
  return ((IMetadataService)service).findCustomizedJTDSDBMetadata(conn);
}

Fixed version (ground truth):
private DatabaseMetaData createJtdsDatabaseMetaData(Connection conn){
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataService.class)) {
    IService service=GlobalServiceRegister.getDefault().getService(IMetadataService.class);
    if (service != null) {
      return ((IMetadataService)service).findCustomizedJTDSDBMetadata(conn);
    }
  }
  try {
    return conn.getMetaData();
  }
 catch (  SQLException e) {
    log.error(e.toString());
    throw new RuntimeException(e);
  }
}
Program: 127306
Project: 127306
Buggy source:
/** 
 * this method checks if each required library is installed without any caching to be careful when using this. if monitor is canceled, then the return value will be empty
 * @return the list all extension implementing org.talend.core.runtime.librariesNeeded/libraryNeeded, that define abundle(plugin) required jar. they are defined using the "context" attribute that starts with the keyword "plugin:" and that also are not present in the java.lib library
 */
public static List<ModuleNeeded> getAllNoInstalledModulesNeededExtensionsForPlugin(IProgressMonitor monitor){
  List<ModuleNeeded> allPluginsRequiredModules=getAllModulesNeededExtensionsForPlugin();
  List<ModuleNeeded> allUninstalledModules=new ArrayList<ModuleNeeded>(allPluginsRequiredModules.size());
  SubMonitor subMonitor=SubMonitor.convert(monitor,allPluginsRequiredModules.size());
  String property=System.getProperty(TalendHookAdaptor.ORG_TALEND_EXTERNAL_LIB_FOLDER_SYS_PROP);
  if (property != null) {
    File javaLibFolder=new File(property);
    for (    ModuleNeeded module : allPluginsRequiredModules) {
      if (!new File(javaLibFolder,module.getModuleName()).exists()) {
        allUninstalledModules.add(module);
      }
      if (subMonitor.isCanceled()) {
        return Collections.EMPTY_LIST;
      }
      subMonitor.worked(1);
    }
  }
 else {
    throw new IllegalStateException("String_Node_Str");
  }
  return allUninstalledModules;
}

Fixed version (ground truth):
/** 
 * this method checks if each required library is installed without any caching to be careful when using this. if monitor is canceled, then the return value will be empty
 * @return the list all extension implementing org.talend.core.runtime.librariesNeeded/libraryNeeded, that define abundle(plugin) required jar. they are defined using the "context" attribute that starts with the keyword "plugin:" and that also are not present in the java.lib library
 */
public static List<ModuleNeeded> getAllNoInstalledModulesNeededExtensionsForPlugin(IProgressMonitor monitor){
  List<ModuleNeeded> allPluginsRequiredModules=getAllModulesNeededExtensionsForPlugin();
  List<ModuleNeeded> allUninstalledModules=new ArrayList<ModuleNeeded>(allPluginsRequiredModules.size());
  SubMonitor subMonitor=SubMonitor.convert(monitor,allPluginsRequiredModules.size());
  String property=System.getProperty(TalendHookAdaptor.ORG_TALEND_EXTERNAL_LIB_FOLDER_SYS_PROP);
  if (property != null) {
    File javaLibFolder=new File(property);
    for (    ModuleNeeded module : allPluginsRequiredModules) {
      if (!new File(javaLibFolder,module.getModuleName()).exists()) {
        allUninstalledModules.add(module);
      }
      if (subMonitor.isCanceled()) {
        return Collections.EMPTY_LIST;
      }
      subMonitor.worked(1);
    }
  }
 else {
    throw new IllegalStateException("String_Node_Str" + TalendHookAdaptor.ORG_TALEND_EXTERNAL_LIB_FOLDER_SYS_PROP + "String_Node_Str");
  }
  return allUninstalledModules;
}
Program: 127307
Project: 127307
Buggy source:
/** 
 * DOC amaumont Comment method "setTableViewerCreatorOptions".
 * @param newTableViewerCreator
 */
protected void setTableViewerCreatorOptions(TableViewerCreator<B> newTableViewerCreator){
  newTableViewerCreator.setShowLineSelection(SHOW_ROW_SELECTION.FULL);
}

Fixed version (ground truth):
/** 
 * DOC amaumont Comment method "setTableViewerCreatorOptions".
 * @param newTableViewerCreator
 */
protected void setTableViewerCreatorOptions(TableViewerCreator<B> newTableViewerCreator){
  newTableViewerCreator.setShowLineSelection(SHOW_ROW_SELECTION.FULL);
  newTableViewerCreator.setLazyLoad(true);
}
Program: 127310
Project: 127310
Buggy source:
private void createHadoopPropertiesForHive(Composite parent){
  compositeTableForHive=Form.startNewDimensionnedGridLayout(parent,1,parent.getBorderWidth(),150);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  gridData.horizontalSpan=3;
  gridData.widthHint=200;
  compositeTableForHive.setLayoutData(gridData);
  CommandStackForComposite commandStack=new CommandStackForComposite(compositeTableForHive);
  properties=new ArrayList<HashMap<String,Object>>();
  initHadoopProperties();
  HadoopPropertiesFieldModel model=new HadoopPropertiesFieldModel(properties,"String_Node_Str");
  propertiesTableViewForHive=new HadoopPropertiesTableView(model,compositeTableForHive);
  propertiesTableViewForHive.getExtendedTableViewer().setCommandStack(commandStack);
  final Composite fieldTableEditorComposite=propertiesTableViewForHive.getMainComposite();
  fieldTableEditorComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
  fieldTableEditorComposite.setBackground(null);
  if (getConnection().getDatabaseType() != null && getConnection().getDatabaseType().equals(EDatabaseConnTemplate.HIVE.getDBDisplayName())) {
    setHidHadoopPropertiesForHive(false);
  }
 else {
    setHidHadoopPropertiesForHive(true);
  }
  addListenerForHive();
}

Fixed version (ground truth):
private void createHadoopPropertiesForHive(Composite parent){
  compositeTableForHive=Form.startNewDimensionnedGridLayout(parent,1,parent.getBorderWidth(),150);
  GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
  gridData.horizontalSpan=3;
  gridData.widthHint=200;
  compositeTableForHive.setLayoutData(gridData);
  CommandStackForComposite commandStack=new CommandStackForComposite(compositeTableForHive);
  properties=new ArrayList<HashMap<String,Object>>();
  initHadoopProperties();
  HadoopPropertiesFieldModel model=new HadoopPropertiesFieldModel(properties,"String_Node_Str");
  propertiesTableViewForHive=new HadoopPropertiesTableView(model,compositeTableForHive);
  propertiesTableViewForHive.getExtendedTableViewer().setCommandStack(commandStack);
  final Composite fieldTableEditorComposite=propertiesTableViewForHive.getMainComposite();
  gridData=new GridData(GridData.FILL_HORIZONTAL);
  if (Platform.getOS().equals(Platform.OS_LINUX)) {
    gridData.heightHint=200;
  }
 else {
    gridData.heightHint=150;
  }
  fieldTableEditorComposite.setLayoutData(gridData);
  fieldTableEditorComposite.setBackground(null);
  if (getConnection().getDatabaseType() != null && getConnection().getDatabaseType().equals(EDatabaseConnTemplate.HIVE.getDBDisplayName())) {
    setHidHadoopPropertiesForHive(false);
  }
 else {
    setHidHadoopPropertiesForHive(true);
  }
  addListenerForHive();
}
Program: 127311
Project: 127311
Buggy source:
private static DatabaseMetaData createJtdsDatabaseMetaData(Connection conn){
  IService service=GlobalServiceRegister.getDefault().getService(IMetadataService.class);
  if (service == null) {
    try {
      return conn.getMetaData();
    }
 catch (    SQLException e) {
      log.error(e.toString());
      throw new RuntimeException(e);
    }
  }
  return ((IMetadataService)service).findCustomizedJTDSDBMetadata(conn);
}

Fixed version (ground truth):
private static DatabaseMetaData createJtdsDatabaseMetaData(Connection conn){
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataService.class)) {
    IService service=GlobalServiceRegister.getDefault().getService(IMetadataService.class);
    if (service != null) {
      return ((IMetadataService)service).findCustomizedJTDSDBMetadata(conn);
    }
  }
  try {
    return conn.getMetaData();
  }
 catch (  SQLException e) {
    log.error(e.toString());
    throw new RuntimeException(e);
  }
}
Program: 127312
Project: 127312
Buggy source:
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  composite.setLayout(new FillLayout());
  broswer=new Browser(composite,SWT.NONE);
  broswer.setUrl(url);
  broswer.refresh();
  return parent;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  composite.setLayout(new FillLayout());
  broswer=new Browser(composite,SWT.NONE);
  broswer.setUrl(url);
  broswer.refresh();
  composite.redraw();
  parent.redraw();
  return parent;
}
Program: 127314
Project: 127314
Buggy source:
@Override public void controlResized(ControlEvent e){
  Rectangle r=scrolledComposite.getClientArea();
  if (getConnection().getDatabaseType() != null && getConnection().getDatabaseType().equals(EDatabaseConnTemplate.HIVE.getDBDisplayName())) {
    scrolledComposite.setMinSize(newParent.computeSize(SWT.DEFAULT,820));
  }
 else {
    scrolledComposite.setMinSize(newParent.computeSize(SWT.DEFAULT,550));
  }
}

Fixed version (ground truth):
@Override public void controlResized(ControlEvent e){
  Rectangle r=scrolledComposite.getClientArea();
  if (getConnection().getDatabaseType() != null && getConnection().getDatabaseType().equals(EDatabaseConnTemplate.HIVE.getDBDisplayName())) {
    if (Platform.getOS().equals(Platform.OS_LINUX)) {
      scrolledComposite.setMinSize(newParent.computeSize(SWT.DEFAULT,900));
    }
 else {
      scrolledComposite.setMinSize(newParent.computeSize(SWT.DEFAULT,820));
    }
  }
 else {
    scrolledComposite.setMinSize(newParent.computeSize(SWT.DEFAULT,550));
  }
}
Program: 127326
Project: 127326
Buggy source:
/** 
 * Test method for  {@link org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase#getTableNamesFromQuery(java.sql.ResultSet)}.
 * @throws SQLException
 */
@Test public void testGetTableNamesFromQuery() throws SQLException {
  assertTrue(ExtractMetaDataFromDataBase.tableCommentsMap instanceof HashMap<?,?>);
  assertTrue(ExtractMetaDataFromDataBase.tableCommentsMap.isEmpty());
  ResultSet mockResultSet=mock(ResultSet.class);
  when(mockResultSet.getString(1)).thenReturn("String_Node_Str");
  String nameKey=mockResultSet.getString(1).trim();
  String tableComment=ExtractMetaDataFromDataBase.getTableComment(nameKey,mockResultSet,false,ExtractMetaDataUtils.conn);
  assertNotNull(tableComment);
  ExtractMetaDataFromDataBase.tableCommentsMap.put(nameKey,tableComment);
  assertNotNull(ExtractMetaDataFromDataBase.tableCommentsMap);
  assertNotNull(ExtractMetaDataFromDataBase.getTableNamesFromQuery(mockResultSet,ExtractMetaDataUtils.conn));
}

Fixed version (ground truth):
/** 
 * Test method for  {@link org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase#getTableNamesFromQuery(java.sql.ResultSet)}.
 * @throws SQLException
 */
@Test public void testGetTableNamesFromQuery() throws SQLException {
  assertTrue(ExtractMetaDataFromDataBase.tableCommentsMap instanceof HashMap<?,?>);
  assertTrue(ExtractMetaDataFromDataBase.tableCommentsMap.isEmpty());
  ResultSet mockResultSet=mock(ResultSet.class);
  when(mockResultSet.getString(1)).thenReturn("String_Node_Str");
  String nameKey=mockResultSet.getString(1).trim();
  String tableComment=ExtractMetaDataFromDataBase.getTableComment(nameKey,mockResultSet,false,ExtractMetaDataUtils.getInstance().getConn());
  assertNotNull(tableComment);
  ExtractMetaDataFromDataBase.tableCommentsMap.put(nameKey,tableComment);
  assertNotNull(ExtractMetaDataFromDataBase.tableCommentsMap);
  assertNotNull(ExtractMetaDataFromDataBase.getTableNamesFromQuery(mockResultSet,ExtractMetaDataUtils.getInstance().getConn()));
}
Program: 127327
Project: 127327
Buggy source:
@Override protected boolean visit(IResourceDelta delta,Collection<Runnable> runnables){
  VisitResourceHelper visitHelper=new VisitResourceHelper(delta);
  boolean merged=ProjectRepositoryNode.getInstance().getMergeRefProject();
  Set<RepositoryNode> topLevelNodes=getTopLevelNodes();
  boolean visitChildren=false;
  for (  final RepositoryNode repoNode : topLevelNodes) {
    IPath topLevelNodeWorkspaceRelativePath=topLevelNodeToPathMap.get(repoNode);
    if (topLevelNodeWorkspaceRelativePath != null && visitHelper.valid(topLevelNodeWorkspaceRelativePath,merged)) {
      visitChildren=false;
      if (viewer instanceof RepoViewCommonViewer) {
        runnables.add(new TopLevelNodeRunnable(repoNode){
          @Override public void run(){
            refreshTopLevelNode(repoNode);
          }
        }
);
      }
    }
  }
  return visitChildren;
}

Fixed version (ground truth):
@Override protected boolean visit(IResourceDelta delta,Collection<Runnable> runnables){
  VisitResourceHelper visitHelper=new VisitResourceHelper(delta);
  boolean merged=ProjectRepositoryNode.getInstance().getMergeRefProject();
  Set<RepositoryNode> topLevelNodes=getTopLevelNodes();
  boolean visitChildren=true;
  for (  final RepositoryNode repoNode : topLevelNodes) {
    IPath topLevelNodeWorkspaceRelativePath=topLevelNodeToPathMap.get(repoNode);
    if (topLevelNodeWorkspaceRelativePath != null && visitHelper.valid(topLevelNodeWorkspaceRelativePath,merged)) {
      visitChildren=false;
      if (viewer instanceof RepoViewCommonViewer) {
        runnables.add(new TopLevelNodeRunnable(repoNode){
          @Override public void run(){
            refreshTopLevelNode(repoNode);
          }
        }
);
      }
    }
  }
  return visitChildren;
}
Program: 127328
Project: 127328
Buggy source:
private boolean ingoreResource(IResourceDelta delta){
  IResource resource=delta.getResource();
  if (resource != null) {
    try {
      if (resource.getProject() != null && !resource.getProject().hasNature(TalendNature.ID)) {
        return false;
      }
    }
 catch (    CoreException e) {
      return false;
    }
    if (FilesUtils.isSVNFolder(resource)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean ingoreResource(IResourceDelta delta){
  IResource resource=delta.getResource();
  if (resource != null) {
    try {
      if (resource.getProject() != null && !resource.getProject().hasNature(TalendNature.ID)) {
        return true;
      }
    }
 catch (    CoreException e) {
      return false;
    }
    if (FilesUtils.isSVNFolder(resource)) {
      return true;
    }
  }
  return false;
}