Program: 119484
Project: 119484
Buggy source:
public void updateRepositoryList(){
  ProgressDialog progressDialog=new ProgressDialog(this.getShell(),1000){
    private IProgressMonitor monitorWrap;
    @Override public void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      monitorWrap=SubMonitor.convert(monitor);
      IProxyRepositoryFactory factory=DesignerPlugin.getDefault().getProxyRepositoryFactory();
      List<IRepositoryViewObject> repositoryObjects=getAllRepositoryMetadata();
      int total=repositoryObjects.size();
      monitorWrap.beginTask(Messages.getString("String_Node_Str"),total);
      IElementParameter propertyParam=elem.getElementParameterFromField(EParameterFieldType.PROPERTY_TYPE,section);
      String repositoryValue=null;
      if (propertyParam != null) {
        repositoryValue=propertyParam.getRepositoryValue();
      }
      if (repositoryObjects != null && (repositoryObjects.size() != 0)) {
        tableIdAndDbTypeMap.clear();
        tableIdAndDbSchemaMap.clear();
        for (        IRepositoryViewObject curObject : repositoryObjects) {
          Item item=curObject.getProperty().getItem();
          if (item instanceof ConnectionItem) {
            ConnectionItem connectionItem=(ConnectionItem)item;
            Connection connection=connectionItem.getConnection();
            if (connection == null || connection.isReadOnly()) {
              continue;
            }
            for (            Object tableObj : ConnectionHelper.getTables(connection)) {
              org.talend.core.model.metadata.builder.connection.MetadataTable table;
              table=(org.talend.core.model.metadata.builder.connection.MetadataTable)tableObj;
              if (factory.getStatus(connectionItem) != ERepositoryStatus.DELETED) {
                if (!factory.isDeleted(table)) {
                  IMetadataTable newTable=ConvertionHelper.convert(table);
                  if (connection instanceof DatabaseConnection) {
                    String dbType=((DatabaseConnection)connection).getDatabaseType();
                    String schema=((DatabaseConnection)connection).getUiSchema();
                    tableIdAndDbTypeMap.put(newTable.getId(),dbType);
                    if (schema != null && !schema.equals("String_Node_Str")) {
                      tableIdAndDbSchemaMap.put(newTable.getId(),schema);
                    }
                  }
                }
              }
            }
            monitorWrap.worked(1);
          }
          if (item instanceof FileItem) {
            FileItem FileItem=(FileItem)item;
            if (repositoryValue != null) {
              if (repositoryValue.equals("String_Node_Str")) {
                repositoryFileItemMap.put(FileItem.getProperty().getId(),FileItem);
              }
            }
            monitorWrap.worked(1);
          }
          if (item instanceof LinkRulesItem) {
            LinkRulesItem linkItem=(LinkRulesItem)item;
            if (repositoryValue != null) {
              if (repositoryValue.equals("String_Node_Str")) {
                repositoryLinkRulesItemMap.put(linkItem.getProperty().getId(),linkItem);
              }
            }
            monitorWrap.worked(1);
          }
        }
      }
      monitorWrap.done();
    }
  }
;
  try {
    progressDialog.executeProcess();
  }
 catch (  InvocationTargetException e) {
    ExceptionHandler.process(e);
    return;
  }
catch (  Exception e) {
    ExceptionHandler.process(e);
    return;
  }
}

Fixed version (ground truth):
public void updateRepositoryList(){
  ProgressDialog progressDialog=new ProgressDialog(this.getShell(),1000){
    private IProgressMonitor monitorWrap;
    @Override public void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      monitorWrap=new EventLoopProgressMonitor(monitor);
      IProxyRepositoryFactory factory=DesignerPlugin.getDefault().getProxyRepositoryFactory();
      List<IRepositoryViewObject> repositoryObjects=getAllRepositoryMetadata();
      int total=repositoryObjects.size();
      monitorWrap.beginTask(Messages.getString("String_Node_Str"),total);
      IElementParameter propertyParam=elem.getElementParameterFromField(EParameterFieldType.PROPERTY_TYPE,section);
      String repositoryValue=null;
      if (propertyParam != null) {
        repositoryValue=propertyParam.getRepositoryValue();
      }
      if (repositoryObjects != null && (repositoryObjects.size() != 0)) {
        tableIdAndDbTypeMap.clear();
        tableIdAndDbSchemaMap.clear();
        for (        IRepositoryViewObject curObject : repositoryObjects) {
          Item item=curObject.getProperty().getItem();
          if (item instanceof ConnectionItem) {
            ConnectionItem connectionItem=(ConnectionItem)item;
            Connection connection=connectionItem.getConnection();
            if (connection == null || connection.isReadOnly()) {
              continue;
            }
            for (            Object tableObj : ConnectionHelper.getTables(connection)) {
              org.talend.core.model.metadata.builder.connection.MetadataTable table;
              table=(org.talend.core.model.metadata.builder.connection.MetadataTable)tableObj;
              if (factory.getStatus(connectionItem) != ERepositoryStatus.DELETED) {
                if (!factory.isDeleted(table)) {
                  IMetadataTable newTable=ConvertionHelper.convert(table);
                  if (connection instanceof DatabaseConnection) {
                    String dbType=((DatabaseConnection)connection).getDatabaseType();
                    String schema=((DatabaseConnection)connection).getUiSchema();
                    tableIdAndDbTypeMap.put(newTable.getId(),dbType);
                    if (schema != null && !schema.equals("String_Node_Str")) {
                      tableIdAndDbSchemaMap.put(newTable.getId(),schema);
                    }
                  }
                }
              }
            }
            monitorWrap.worked(1);
          }
          if (item instanceof FileItem) {
            FileItem FileItem=(FileItem)item;
            if (repositoryValue != null) {
              if (repositoryValue.equals("String_Node_Str")) {
                repositoryFileItemMap.put(FileItem.getProperty().getId(),FileItem);
              }
            }
            monitorWrap.worked(1);
          }
          if (item instanceof LinkRulesItem) {
            LinkRulesItem linkItem=(LinkRulesItem)item;
            if (repositoryValue != null) {
              if (repositoryValue.equals("String_Node_Str")) {
                repositoryLinkRulesItemMap.put(linkItem.getProperty().getId(),linkItem);
              }
            }
            monitorWrap.worked(1);
          }
        }
      }
      monitorWrap.done();
    }
  }
;
  try {
    progressDialog.executeProcess();
  }
 catch (  InvocationTargetException e) {
    ExceptionHandler.process(e);
    return;
  }
catch (  Exception e) {
    ExceptionHandler.process(e);
    return;
  }
}