nus-yam/ex-repair huggingface dataset:
Program: 120513
Project: 120513
Buggy source:
/** 
 * yzhang Comment method "getExpressionStorePath".
 * @return
 */
protected String getExpressionStorePath(){
  IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
  RepositoryContext repositoryContext=(RepositoryContext)CorePlugin.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);
  File configurationFolder=new File(configurationPath);
  if (!configurationFolder.exists()) {
    configurationFolder.mkdir();
  }
  String expressionPath=configurationPath + File.separator + ExpressionPersistance.EXPRESSION_FOLDER_NAME;
  expressionPath=getValidFolderPath(expressionPath,1);
  File expressionFolder=new File(expressionPath);
  if (!expressionFolder.exists()) {
    expressionFolder.mkdir();
  }
  String jobName="String_Node_Str";
  if (component != null) {
    jobName=component.getProcess().getName();
  }
 else {
    jobName="String_Node_Str";
  }
  expressionPath=expressionPath + File.separator + jobName+ XmlUtil.FILE_XML_SUFFIX;
  return expressionPath;
}

Fixed version (ground truth):
/** 
 * yzhang Comment method "getExpressionStorePath".
 * @return
 */
protected String getExpressionStorePath(){
  IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
  RepositoryContext repositoryContext=(RepositoryContext)CorePlugin.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);
  File configurationFolder=new File(configurationPath);
  if (!configurationFolder.exists()) {
    configurationFolder.mkdir();
  }
  String expressionPath=configurationPath + File.separator + ExpressionPersistance.EXPRESSION_FOLDER_NAME;
  expressionPath=getValidFolderPath(expressionPath,1);
  File expressionFolder=new File(expressionPath);
  if (!expressionFolder.exists()) {
    expressionFolder.mkdir();
  }
  String jobName="String_Node_Str";
  if (component != null) {
    jobName=component.getProcess().getName();
  }
 else {
    jobName="String_Node_Str";
  }
  expressionPath=expressionPath + File.separator + jobName+ XmlUtil.FILE_XML_SUFFIX;
  return expressionPath;
}
Program: 120515
Project: 120515
Buggy source:
@Override public boolean canModify(Object bean){
  if (param.getName().equals("String_Node_Str") || param.getName().equals("String_Node_Str")) {
    Map<String,Object> valueMap=(Map<String,Object>)bean;
    if (valueMap.get("String_Node_Str") != null && valueMap.get("String_Node_Str").equals("String_Node_Str")) {
      return true;
    }
 else {
      return false;
    }
  }
  boolean canModify=super.canModify(bean);
  if (canModify) {
    Map<String,Object> valueMap=(Map<String,Object>)bean;
    List<Map<String,Object>> fullValues=(List<Map<String,Object>>)param.getValue();
    ((ElementParameter)currentParam).setCurrentRow(fullValues.indexOf(valueMap));
    if (currentParam.isReadOnly(element.getElementParameters())) {
      return false;
    }
  }
  return canModify;
}

Fixed version (ground truth):
@Override public boolean canModify(Object bean){
  if (param.getName().equals("String_Node_Str") || param.getName().equals("String_Node_Str")) {
    boolean canModify=super.canModify(bean);
    if (canModify) {
      Map<String,Object> valueMap=(Map<String,Object>)bean;
      List<Map<String,Object>> fullValues=(List<Map<String,Object>>)param.getValue();
      ((ElementParameter)currentParam).setCurrentRow(fullValues.indexOf(valueMap));
      if (currentParam.isReadOnly(element.getElementParameters())) {
        return false;
      }
    }
 else {
      Map<String,Object> valueMap=(Map<String,Object>)bean;
      if (valueMap.get("String_Node_Str") != null && valueMap.get("String_Node_Str").equals("String_Node_Str")) {
        return true;
      }
 else {
        return false;
      }
    }
    return canModify;
  }
  boolean canModify=super.canModify(bean);
  if (canModify) {
    Map<String,Object> valueMap=(Map<String,Object>)bean;
    List<Map<String,Object>> fullValues=(List<Map<String,Object>>)param.getValue();
    ((ElementParameter)currentParam).setCurrentRow(fullValues.indexOf(valueMap));
    if (currentParam.isReadOnly(element.getElementParameters())) {
      return false;
    }
  }
  return canModify;
}
Program: 120516
Project: 120516
Buggy source:
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  for (  ResourcesManager rm : manager) {
    items.addAll(ImportExportHandlersManager.getInstance().populateImportingItems(rm,false,monitor));
  }
}

Fixed version (ground truth):
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  for (  ResourcesManager rm : manager) {
    items.addAll(ImportExportHandlersManager.getInstance().populateImportingItems(rm,true,monitor));
  }
}
Program: 120517
Project: 120517
Buggy source:
private List<ItemRecord> populateExistItemRecords(final List<ResourcesManager> manager){
  final Collection<ItemRecord> items=new ArrayList<ItemRecord>();
  List<ItemRecord> existRecords=new ArrayList<ItemRecord>();
  IRunnableWithProgress op=new IRunnableWithProgress(){
    @Override public void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      for (      ResourcesManager rm : manager) {
        items.addAll(ImportExportHandlersManager.getInstance().populateImportingItems(rm,false,monitor));
      }
    }
  }
;
  try {
    new ProgressMonitorDialog(getShell()).run(true,true,op);
  }
 catch (  Exception e) {
  }
  for (  ItemRecord itemRecord : items) {
    if (itemRecord.getExistingItemWithSameId() != null && itemRecord.getExistingItemWithSameId() instanceof RepositoryViewObject) {
      RepositoryViewObject reObject=(RepositoryViewObject)itemRecord.getExistingItemWithSameId();
      if (itemRecord.getProperty() != null && reObject != null) {
        if (itemRecord.getProperty().getId().equals(reObject.getId()) && itemRecord.getProperty().getLabel().equals(reObject.getLabel())) {
          existRecords.add(itemRecord);
        }
 else {
        }
      }
    }
  }
  return existRecords;
}

Fixed version (ground truth):
private boolean populateExistItemRecords(final List<ResourcesManager> manager){
  final Collection<ItemRecord> items=new ArrayList<ItemRecord>();
  IRunnableWithProgress op=new IRunnableWithProgress(){
    @Override public void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      for (      ResourcesManager rm : manager) {
        items.addAll(ImportExportHandlersManager.getInstance().populateImportingItems(rm,true,monitor));
      }
    }
  }
;
  try {
    new ProgressMonitorDialog(getShell()).run(true,true,op);
  }
 catch (  Exception e) {
  }
  for (  ItemRecord itemRecord : items) {
    if (itemRecord.getExistingItemWithSameId() != null && itemRecord.getExistingItemWithSameId() instanceof RepositoryViewObject) {
      RepositoryViewObject reObject=(RepositoryViewObject)itemRecord.getExistingItemWithSameId();
      if (itemRecord.getProperty() != null && reObject != null) {
        if (itemRecord.getProperty().getId().equals(reObject.getId()) && itemRecord.getProperty().getLabel().equals(reObject.getLabel())) {
          return true;
        }
      }
    }
  }
  return false;
}
Program: 120519
Project: 120519
Buggy source:
public static void forceInstallModules(Shell shell,IComponent component,List<ModuleNeeded> modules){
  String text=Messages.getString("String_Node_Str",component.getName());
  String title=Messages.getString("String_Node_Str") + component.getName();
  if (!modules.isEmpty()) {
    ComponentExternalModulesDialog dialog=new ComponentExternalModulesDialog(shell,modules,text,title);
    dialog.openDialog();
  }
}

Fixed version (ground truth):
public static void forceInstallModules(Shell shell,IComponent component,List<ModuleNeeded> modules){
  String text=Messages.getString("String_Node_Str",component.getName());
  String title=Messages.getString("String_Node_Str") + component.getName();
  String name=component.getName();
  if (name == null) {
    return;
  }
  boolean opened=false;
  if (!modules.isEmpty()) {
    Shell[] shells=PlatformUI.getWorkbench().getDisplay().getShells();
    for (    Shell shell2 : shells) {
      Object currentDialog=shell2.getData();
      if (currentDialog instanceof ComponentExternalModulesDialog) {
        String componentName=((ComponentExternalModulesDialog)currentDialog).getCoponentName();
        if (componentName == null) {
          return;
        }
        if (name.equalsIgnoreCase(componentName)) {
          opened=true;
          shell2.setMaximized(true);
          shell2.setSize(1050,400);
          break;
        }
      }
    }
    if (!opened) {
      ComponentExternalModulesDialog dialog=new ComponentExternalModulesDialog(shell,modules,text,title);
      dialog.setCoponentName(name);
      dialog.openDialog();
    }
  }
}
Program: 120520
Project: 120520
Buggy source:
@Override public ExecutionResult execute(Item item){
  ConnectionItem connectionItem=(ConnectionItem)item;
  DatabaseConnection connection=(DatabaseConnection)connectionItem.getConnection();
  if (connection != null) {
    Iterator it=connectionItem.getProperty().getInformations().iterator();
    while (it.hasNext()) {
      org.talend.core.model.properties.Information Information=(org.talend.core.model.properties.Information)it.next();
      if (Information.getLevel().equals(InformationLevel.ERROR_LITERAL) || Information.getLevel().equals(InformationLevel.WARN_LITERAL)) {
        it.remove();
      }
    }
    return ExecutionResult.SUCCESS_NO_ALERT;
  }
  return ExecutionResult.NOTHING_TO_DO;
}

Fixed version (ground truth):
@Override public ExecutionResult execute(Item item){
  ConnectionItem connectionItem=(ConnectionItem)item;
  DatabaseConnection connection=(DatabaseConnection)connectionItem.getConnection();
  if (connection != null) {
    boolean flag=false;
    Iterator it=connectionItem.getProperty().getInformations().iterator();
    while (it.hasNext()) {
      org.talend.core.model.properties.Information Information=(org.talend.core.model.properties.Information)it.next();
      if (Information.getLevel().getName().equals(InformationLevel.ERROR_LITERAL.getName()) || Information.getLevel().getName().equals(InformationLevel.WARN_LITERAL.getName())) {
        it.remove();
        flag=true;
      }
    }
    if (flag) {
      try {
        ProxyRepositoryFactory.getInstance().save(item);
      }
 catch (      PersistenceException e) {
        ExceptionHandler.process(e);
        return ExecutionResult.FAILURE;
      }
      return ExecutionResult.SUCCESS_NO_ALERT;
    }
  }
  return ExecutionResult.NOTHING_TO_DO;
}
Program: 120521
Project: 120521
Buggy source:
/** 
 * yzhang Comment method "getExpressionStorePath".
 * @return
 */
protected String getExpressionStorePath(){
  IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
  RepositoryContext repositoryContext=(RepositoryContext)CorePlugin.getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
  Project project=repositoryContext.getProject();
  IProject p=root.getProject(project.getTechnicalLabel());
  IFolder configurationFolder=p.getFolder(ExpressionPersistance.CONFIGURATION_FOLDER_NAME);
  if (!configurationFolder.exists()) {
    try {
      configurationFolder.create(true,true,null);
    }
 catch (    CoreException e) {
      RuntimeExceptionHandler.process(e);
    }
  }
  IFolder expressionFolder=configurationFolder.getFolder(ExpressionPersistance.EXPRESSION_FOLDER_NAME);
  if (!expressionFolder.exists()) {
    try {
      expressionFolder.create(true,true,null);
    }
 catch (    CoreException e) {
      RuntimeExceptionHandler.process(e);
    }
  }
  String jobName="String_Node_Str";
  if (component != null) {
    jobName=component.getProcess().getName();
  }
 else {
    jobName="String_Node_Str";
  }
  IPath path=expressionFolder.getLocation().append(jobName + XmlUtil.FILE_XML_SUFFIX);
  return path.toOSString();
}

Fixed version (ground truth):
/** 
 * yzhang Comment method "getExpressionStorePath".
 * @return
 */
protected String getExpressionStorePath(){
  IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
  RepositoryContext repositoryContext=(RepositoryContext)CorePlugin.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);
  File configurationFolder=new File(configurationPath);
  if (!configurationFolder.exists()) {
    configurationFolder.mkdir();
  }
  String expressionPath=configurationPath + File.separator + ExpressionPersistance.EXPRESSION_FOLDER_NAME;
  expressionPath=getValidFolderPath(expressionPath,1);
  File expressionFolder=new File(expressionPath);
  if (!expressionFolder.exists()) {
    expressionFolder.mkdir();
  }
  String jobName="String_Node_Str";
  if (component != null) {
    jobName=component.getProcess().getName();
  }
 else {
    jobName="String_Node_Str";
  }
  expressionPath=expressionPath + File.separator + jobName+ XmlUtil.FILE_XML_SUFFIX;
  return expressionPath;
}
Program: 120522
Project: 120522
Buggy source:
public void addVariables(List<Variable> variables){
  defaultVariables=variables;
}

Fixed version (ground truth):
@Override public void addVariables(List<Variable> variables){
  defaultVariables=variables;
}
Program: 120523
Project: 120523
Buggy source:
protected void okPressed(){
  String expression=null;
  int startInx=nodeStyle.indexOf("String_Node_Str") + 2;
  int endInx=nodeStyle.lastIndexOf("String_Node_Str") - 1;
  String sub;
  if (endInx - startInx > 0) {
    sub=nodeStyle.substring(startInx,endInx);
  }
 else {
    sub=nodeStyle;
  }
  if (sub.equals("String_Node_Str")) {
    expression=expressionComposite.getReplaceExpression();
    expressionForTable=expression;
  }
 else {
    expression=expressionComposite.getExpression();
    expressionForTable=expression;
  }
  if (dataBean != null) {
    dataBean.setConsumerExpression(expression + "String_Node_Str");
    if (ExpressionPersistance.getInstance().getPath() != null) {
      ExpressionPersistance.getInstance().saveExpression(new Expression(expression,testComposite.getVariableList()));
    }
  }
  isESCClose=false;
  super.okPressed();
}

Fixed version (ground truth):
@Override protected void okPressed(){
  String expression=null;
  int startInx=nodeStyle.indexOf("String_Node_Str") + 2;
  int endInx=nodeStyle.lastIndexOf("String_Node_Str") - 1;
  String sub;
  if (endInx - startInx > 0) {
    sub=nodeStyle.substring(startInx,endInx);
  }
 else {
    sub=nodeStyle;
  }
  if (sub.equals("String_Node_Str")) {
    expression=expressionComposite.getReplaceExpression();
    expressionForTable=expression;
  }
 else {
    expression=expressionComposite.getExpression();
    expressionForTable=expression;
  }
  if (dataBean != null) {
    dataBean.setConsumerExpression(expression + "String_Node_Str");
    if (ExpressionPersistance.getInstance().getPath() != null) {
      ExpressionPersistance.getInstance().saveExpression(new Expression(expression,testComposite.getVariableList()));
    }
  }
  isESCClose=false;
  super.okPressed();
}
Program: 120524
Project: 120524
Buggy source:
public String getExpressionForTable(){
  return this.expressionForTable;
}

Fixed version (ground truth):
@Override public String getExpressionForTable(){
  return this.expressionForTable;
}
Program: 120525
Project: 120525
Buggy source:
public void openDialog(Object obj){
  if (obj instanceof IExpressionDataBean) {
    List<Variable> vars=new ArrayList<Variable>();
    IExpressionDataBean bean=(IExpressionDataBean)obj;
    setDefaultExpression(bean.getExpression());
    if (bean.getVariables() != null) {
      vars.addAll(bean.getVariables());
    }
    ExpressionPersistance persistance=ExpressionPersistance.getInstance();
    persistance.setOwnerId(bean.getOwnerId());
    persistance.setPath(getExpressionStorePath());
    for (    Variable var1 : persistance.loadExpression().getVariables()) {
      boolean needAdd=true;
      for (      Variable var2 : vars) {
        if (var1.getName() != null && var1.getName().equals(var2.getName())) {
          needAdd=false;
          break;
        }
      }
      if (var1.getName() != null && needAdd) {
        vars.add(var1);
      }
    }
    addVariables(vars);
  }
  open();
  setBlockOnOpen(true);
}

Fixed version (ground truth):
@Override public void openDialog(Object obj){
  if (obj instanceof IExpressionDataBean) {
    List<Variable> vars=new ArrayList<Variable>();
    IExpressionDataBean bean=(IExpressionDataBean)obj;
    setDefaultExpression(bean.getExpression());
    if (bean.getVariables() != null) {
      vars.addAll(bean.getVariables());
    }
    ExpressionPersistance persistance=ExpressionPersistance.getInstance();
    persistance.setOwnerId(bean.getOwnerId());
    persistance.setPath(getExpressionStorePath());
    for (    Variable var1 : persistance.loadExpression().getVariables()) {
      boolean needAdd=true;
      for (      Variable var2 : vars) {
        if (var1.getName() != null && var1.getName().equals(var2.getName())) {
          needAdd=false;
          break;
        }
      }
      if (var1.getName() != null && needAdd) {
        vars.add(var1);
      }
    }
    addVariables(vars);
  }
  open();
  setBlockOnOpen(true);
}
Program: 120526
Project: 120526
Buggy source:
public void setDefaultExpression(String expression){
  defaultExpression=expression;
}

Fixed version (ground truth):
@Override public void setDefaultExpression(String expression){
  defaultExpression=expression;
}
Program: 120527
Project: 120527
Buggy source:
/** 
 * yzhang Comment method "getExpressionStorePath".
 * @return
 */
protected String getExpressionStorePath(){
  IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
  RepositoryContext repositoryContext=(RepositoryContext)CorePlugin.getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
  Project project=repositoryContext.getProject();
  IProject p=root.getProject(project.getTechnicalLabel());
  IFolder configurationFolder=p.getFolder(ExpressionPersistance.CONFIGURATION_FOLDER_NAME);
  if (!configurationFolder.exists()) {
    try {
      configurationFolder.create(true,true,null);
    }
 catch (    CoreException e) {
      RuntimeExceptionHandler.process(e);
    }
  }
  IFolder expressionFolder=configurationFolder.getFolder(ExpressionPersistance.EXPRESSION_FOLDER_NAME);
  if (!expressionFolder.exists()) {
    try {
      expressionFolder.create(true,true,null);
    }
 catch (    CoreException e) {
      RuntimeExceptionHandler.process(e);
    }
  }
  String jobName="String_Node_Str";
  if (component != null) {
    jobName=component.getProcess().getName();
  }
 else {
    jobName="String_Node_Str";
  }
  IPath path=expressionFolder.getLocation().append(jobName + XmlUtil.FILE_XML_SUFFIX);
  return path.toOSString();
}

Fixed version (ground truth):
/** 
 * yzhang Comment method "getExpressionStorePath".
 * @return
 */
protected String getExpressionStorePath(){
  IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
  RepositoryContext repositoryContext=(RepositoryContext)CorePlugin.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);
  File configurationFolder=new File(configurationPath);
  if (!configurationFolder.exists()) {
    configurationFolder.mkdir();
  }
  String expressionPath=configurationPath + File.separator + ExpressionPersistance.EXPRESSION_FOLDER_NAME;
  expressionPath=getValidFolderPath(expressionPath,1);
  File expressionFolder=new File(expressionPath);
  if (!expressionFolder.exists()) {
    expressionFolder.mkdir();
  }
  String jobName="String_Node_Str";
  if (component != null) {
    jobName=component.getProcess().getName();
  }
 else {
    jobName="String_Node_Str";
  }
  expressionPath=expressionPath + File.separator + jobName+ XmlUtil.FILE_XML_SUFFIX;
  return expressionPath;
}
Program: 120528
Project: 120528
Buggy source:
@Override public boolean getEnabledState(){
  if (model != null && (model.getElemParameter().getName().equals("String_Node_Str") || model.getElemParameter().getName().equals("String_Node_Str"))) {
    if (getExtendedTableViewer().getTable().getSelectionIndex() > 0) {
      TableItem item=extendedTableViewer.getTable().getSelection()[0];
      HashMap<String,String> itemMap=(HashMap<String,String>)item.getData();
      List<HashMap<String,String>> parameterValue=(List<HashMap<String,String>>)model.getElemParameter().getValue();
      for (      HashMap<String,String> parameterValueMap : parameterValue) {
        if (parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str")) && parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str"))) {
          if (parameterValueMap.get("String_Node_Str") != null && parameterValueMap.get("String_Node_Str").equals("String_Node_Str")) {
            return true;
          }
        }
      }
    }
  }
  return super.getEnabledState() && (model == null || !model.getElemParameter().isBasedOnSubjobStarts());
}

Fixed version (ground truth):
@Override public boolean getEnabledState(){
  if (model != null && (model.getElemParameter().getName().equals("String_Node_Str") || model.getElemParameter().getName().equals("String_Node_Str"))) {
    if (getExtendedTableViewer().getTable().getSelectionIndex() > -1) {
      TableItem item=extendedTableViewer.getTable().getSelection()[0];
      HashMap<String,String> itemMap=(HashMap<String,String>)item.getData();
      List<HashMap<String,String>> parameterValue=(List<HashMap<String,String>>)model.getElemParameter().getValue();
      for (      HashMap<String,String> parameterValueMap : parameterValue) {
        if (parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str")) && parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str"))) {
          if (parameterValueMap.get("String_Node_Str") != null && parameterValueMap.get("String_Node_Str").equals("String_Node_Str")) {
            return true;
          }
        }
      }
    }
  }
  return super.getEnabledState() && (model == null || !model.getElemParameter().isBasedOnSubjobStarts());
}
Program: 120529
Project: 120529
Buggy source:
@Override protected RemovePushButton createRemovePushButton(){
  RemovePushButtonForExtendedTable removePushButton=new RemovePushButtonForExtendedTable(this.toolbar,getExtendedTableViewer()){
    @Override public boolean getEnabledState(){
      if (model != null && (model.getElemParameter().getName().equals("String_Node_Str") || model.getElemParameter().getName().equals("String_Node_Str"))) {
        if (getExtendedTableViewer().getTable().getSelectionIndex() > 0) {
          TableItem item=extendedTableViewer.getTable().getSelection()[0];
          HashMap<String,String> itemMap=(HashMap<String,String>)item.getData();
          List<HashMap<String,String>> parameterValue=(List<HashMap<String,String>>)model.getElemParameter().getValue();
          for (          HashMap<String,String> parameterValueMap : parameterValue) {
            if (parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str")) && parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str"))) {
              if (parameterValueMap.get("String_Node_Str") != null && parameterValueMap.get("String_Node_Str").equals("String_Node_Str")) {
                return true;
              }
            }
          }
        }
      }
      return super.getEnabledState() && (model == null || !model.getElemParameter().isBasedOnSubjobStarts());
    }
  }
;
  removePushButton.addListener(getPropertyChangeListener(),false);
  return removePushButton;
}

Fixed version (ground truth):
@Override protected RemovePushButton createRemovePushButton(){
  RemovePushButtonForExtendedTable removePushButton=new RemovePushButtonForExtendedTable(this.toolbar,getExtendedTableViewer()){
    @Override public boolean getEnabledState(){
      if (model != null && (model.getElemParameter().getName().equals("String_Node_Str") || model.getElemParameter().getName().equals("String_Node_Str"))) {
        if (getExtendedTableViewer().getTable().getSelectionIndex() > -1) {
          TableItem item=extendedTableViewer.getTable().getSelection()[0];
          HashMap<String,String> itemMap=(HashMap<String,String>)item.getData();
          List<HashMap<String,String>> parameterValue=(List<HashMap<String,String>>)model.getElemParameter().getValue();
          for (          HashMap<String,String> parameterValueMap : parameterValue) {
            if (parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str")) && parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str"))) {
              if (parameterValueMap.get("String_Node_Str") != null && parameterValueMap.get("String_Node_Str").equals("String_Node_Str")) {
                return true;
              }
            }
          }
        }
      }
      return super.getEnabledState() && (model == null || !model.getElemParameter().isBasedOnSubjobStarts());
    }
  }
;
  removePushButton.addListener(getPropertyChangeListener(),false);
  return removePushButton;
}
Program: 120530
Project: 120530
Buggy source:
@Override public ExecutionResult execute(Item item){
  ConnectionItem connectionItem=(ConnectionItem)item;
  DatabaseConnection connection=(DatabaseConnection)connectionItem.getConnection();
  if (connection != null) {
    Iterator it=connectionItem.getProperty().getInformations().iterator();
    while (it.hasNext()) {
      org.talend.core.model.properties.Information Information=(org.talend.core.model.properties.Information)it.next();
      if (Information.getLevel().equals(InformationLevel.ERROR_LITERAL) || Information.getLevel().equals(InformationLevel.WARN_LITERAL)) {
        it.remove();
      }
    }
    return ExecutionResult.SUCCESS_NO_ALERT;
  }
  return ExecutionResult.NOTHING_TO_DO;
}

Fixed version (ground truth):
@Override public ExecutionResult execute(Item item){
  ConnectionItem connectionItem=(ConnectionItem)item;
  DatabaseConnection connection=(DatabaseConnection)connectionItem.getConnection();
  if (connection != null) {
    boolean flag=false;
    Iterator it=connectionItem.getProperty().getInformations().iterator();
    while (it.hasNext()) {
      org.talend.core.model.properties.Information Information=(org.talend.core.model.properties.Information)it.next();
      if (Information.getLevel().getName().equals(InformationLevel.ERROR_LITERAL.getName()) || Information.getLevel().getName().equals(InformationLevel.WARN_LITERAL.getName())) {
        it.remove();
        flag=true;
      }
    }
    if (flag) {
      try {
        ProxyRepositoryFactory.getInstance().save(item);
      }
 catch (      PersistenceException e) {
        ExceptionHandler.process(e);
        return ExecutionResult.FAILURE;
      }
      return ExecutionResult.SUCCESS_NO_ALERT;
    }
  }
  return ExecutionResult.NOTHING_TO_DO;
}
Program: 120533
Project: 120533
Buggy source:
/** 
 * Build Root Nodes List.
 * @return
 */
@SuppressWarnings("String_Node_Str") public void buildRootNodes(IProcess process){
  rootNodes=new ArrayList<INode>();
  List<INode> preJobsNode=(List<INode>)process.getNodesOfType("String_Node_Str");
  for (  INode node : preJobsNode) {
    if (node.isActivate()) {
      rootNodes.add(node);
    }
  }
  for (  INode node : nodes) {
    String componentName=node.getComponent().getName();
    if ((node.isStart()) && (node.isActivate()) && node.isSubtreeStart()&& (!componentName.equals("String_Node_Str"))&& (!componentName.equals("String_Node_Str"))) {
      rootNodes.add(node);
    }
  }
  List<INode> postJobsNode=(List<INode>)process.getNodesOfType("String_Node_Str");
  for (  INode node : postJobsNode) {
    if (node.isActivate()) {
      rootNodes.add(node);
    }
  }
}

Fixed version (ground truth):
/** 
 * Build Root Nodes List.
 * @return
 */
@SuppressWarnings("String_Node_Str") public void buildRootNodes(IProcess process){
  rootNodes=new ArrayList<INode>();
  List<INode> preJobsNode=(List<INode>)process.getNodesOfType("String_Node_Str");
  for (  INode node : preJobsNode) {
    if (node.isActivate()) {
      rootNodes.add(node);
    }
  }
  for (  INode node : nodes) {
    String componentName=node.getComponent().getName();
    if ((node.isStart()) && (node.isActivate()) && (node.isSubtreeStart() || node.isELTComponent())&& (!componentName.equals("String_Node_Str"))&& (!componentName.equals("String_Node_Str"))) {
      rootNodes.add(node);
    }
  }
  List<INode> postJobsNode=(List<INode>)process.getNodesOfType("String_Node_Str");
  for (  INode node : postJobsNode) {
    if (node.isActivate()) {
      rootNodes.add(node);
    }
  }
}
Program: 120536
Project: 120536
Buggy source:
@Override public void checkStateChanged(CheckStateChangedEvent event){
  if (event.getElement() instanceof DemoProjectBean) {
    DemoProjectBean proNode=(DemoProjectBean)event.getElement();
    showDescriptionIn(proNode);
  }
}

Fixed version (ground truth):
@Override public void checkStateChanged(CheckStateChangedEvent event){
  if (event.getElement() instanceof DemoProjectBean) {
    DemoProjectBean proNode=(DemoProjectBean)event.getElement();
    showDescriptionIn(proNode);
    if (getCheckedElements().size() == 0) {
      setPageComplete(false);
    }
 else {
      setPageComplete(true);
    }
  }
}
Program: 120537
Project: 120537
Buggy source:
public void addPages(){
  super.addPages();
  demoProjectPage=new ImportDemoProjectItemsPage(null);
  demoProjectPage.setImportDemoProjectList(this.demoProjectList);
  super.addPage(demoProjectPage);
}

Fixed version (ground truth):
public void addPages(){
  super.addPages();
  demoProjectPage=new ImportDemoProjectItemsPage(null);
  demoProjectPage.setImportDemoProjectList(this.demoProjectList);
  demoProjectPage.setPageComplete(false);
  super.addPage(demoProjectPage);
}
Program: 120538
Project: 120538
Buggy source:
@Override public void selectionChanged(SelectionChangedEvent event){
  selectedDemoProjectIndex=((TableViewer)event.getSource()).getTable().getSelectionIndex();
  DemoProjectBean demoProjectBean=this.demoProjectList.get(selectedDemoProjectIndex);
  String demoDescription=demoProjectBean.getDescriptionContents();
  if (descriptionBrowser != null && TalendPropertiesUtil.isEnabledUseBrowser() && !descriptionBrowser.isDisposed()) {
    descriptionBrowser.setText(demoDescription);
  }
 else   if (descriptionText != null && !descriptionText.isDisposed()) {
    descriptionText.setText(demoDescription);
  }
}

Fixed version (ground truth):
@Override public void selectionChanged(SelectionChangedEvent event){
  selectedDemoProjectIndex=((TableViewer)event.getSource()).getTable().getSelectionIndex();
  DemoProjectBean demoProjectBean=this.demoProjectList.get(selectedDemoProjectIndex);
  String demoDescription=demoProjectBean.getDescriptionContents();
  if (demoProjectBean != null) {
    setPageComplete(true);
  }
 else {
    setPageComplete(false);
  }
  if (descriptionBrowser != null && TalendPropertiesUtil.isEnabledUseBrowser() && !descriptionBrowser.isDisposed()) {
    descriptionBrowser.setText(demoDescription);
  }
 else   if (descriptionText != null && !descriptionText.isDisposed()) {
    descriptionText.setText(demoDescription);
  }
}
Program: 120539
Project: 120539
Buggy source:
public void addPages(){
  super.addPages();
  demoProjectPage=new ImportDemoProjectPage(null);
  demoProjectPage.setImportDemoProjectList(this.demoProjectList);
  super.addPage(demoProjectPage);
}

Fixed version (ground truth):
public void addPages(){
  super.addPages();
  demoProjectPage=new ImportDemoProjectPage(null);
  demoProjectPage.setImportDemoProjectList(this.demoProjectList);
  demoProjectPage.setPageComplete(false);
  super.addPage(demoProjectPage);
}
Program: 120542
Project: 120542
Buggy source:
public String getColumnText(Object element,int columnIndex){
  if (element instanceof Type) {
    Type datatype=(Type)element;
    return datatype.getName();
  }
  if (element instanceof IModel) {
    if (element instanceof TypeModel) {
      TypeModel tm=(TypeModel)element;
      allPrimitives.addAll(Arrays.asList(tm.getPrimitives()));
    }
    return ((IModel)element).getDisplayName();
  }
  if (element instanceof Group) {
    Group group=(Group)element;
    String groupName=group.getClass().getName();
    groupName=groupName.substring(groupName.lastIndexOf('.') + 1,groupName.length());
    return groupName;
  }
  if (element instanceof Structure) {
    Structure structure=(Structure)element;
    return structure.getName();
  }
  return null;
}

Fixed version (ground truth):
public String getColumnText(Object element,int columnIndex){
  if (element instanceof Type) {
    Type datatype=(Type)element;
    return datatype.getName();
  }
  if (element instanceof IModel) {
    if (element instanceof TypeModel) {
      TypeModel tm=(TypeModel)element;
      allPrimitives.addAll(Arrays.asList(tm.getPrimitives()));
    }
    return ((IModel)element).getDisplayName();
  }
  if (element instanceof Group) {
    Group group=(Group)element;
    String groupName=group.getName();
    groupName=groupName.substring(groupName.lastIndexOf('.') + 1,groupName.length());
    return groupName;
  }
  if (element instanceof Structure) {
    Structure structure=(Structure)element;
    return structure.getName();
  }
  return null;
}
Program: 120544
Project: 120544
Buggy source:
public String getColumnText(Object element,int columnIndex){
  if (element instanceof Type) {
    Type datatype=(Type)element;
    return datatype.getName();
  }
  if (element instanceof IModel) {
    if (element instanceof TypeModel) {
      TypeModel tm=(TypeModel)element;
      allPrimitives.addAll(Arrays.asList(tm.getPrimitives()));
    }
    return ((IModel)element).getDisplayName();
  }
  if (element instanceof Group) {
    Group group=(Group)element;
    String groupName=group.getClass().getName();
    groupName=groupName.substring(groupName.lastIndexOf('.') + 1,groupName.length());
    return groupName;
  }
  if (element instanceof Structure) {
    Structure structure=(Structure)element;
    return structure.getName();
  }
  return null;
}

Fixed version (ground truth):
public String getColumnText(Object element,int columnIndex){
  if (element instanceof Type) {
    Type datatype=(Type)element;
    return datatype.getName();
  }
  if (element instanceof IModel) {
    if (element instanceof TypeModel) {
      TypeModel tm=(TypeModel)element;
      allPrimitives.addAll(Arrays.asList(tm.getPrimitives()));
    }
    return ((IModel)element).getDisplayName();
  }
  if (element instanceof Group) {
    Group group=(Group)element;
    String groupName=group.getName();
    groupName=groupName.substring(groupName.lastIndexOf('.') + 1,groupName.length());
    return groupName;
  }
  if (element instanceof Structure) {
    Structure structure=(Structure)element;
    return structure.getName();
  }
  return null;
}
Program: 120547
Project: 120547
Buggy source:
public String getColumnText(Object element,int columnIndex){
  if (element instanceof Type) {
    Type datatype=(Type)element;
    return datatype.getName();
  }
  if (element instanceof IModel) {
    if (element instanceof TypeModel) {
      TypeModel tm=(TypeModel)element;
      allPrimitives.addAll(Arrays.asList(tm.getPrimitives()));
    }
    return ((IModel)element).getDisplayName();
  }
  if (element instanceof Group) {
    Group group=(Group)element;
    String groupName=group.getClass().getName();
    groupName=groupName.substring(groupName.lastIndexOf('.') + 1,groupName.length());
    return groupName;
  }
  if (element instanceof Structure) {
    Structure structure=(Structure)element;
    return structure.getName();
  }
  return null;
}

Fixed version (ground truth):
public String getColumnText(Object element,int columnIndex){
  if (element instanceof Type) {
    Type datatype=(Type)element;
    return datatype.getName();
  }
  if (element instanceof IModel) {
    if (element instanceof TypeModel) {
      TypeModel tm=(TypeModel)element;
      allPrimitives.addAll(Arrays.asList(tm.getPrimitives()));
    }
    return ((IModel)element).getDisplayName();
  }
  if (element instanceof Group) {
    Group group=(Group)element;
    String groupName=group.getName();
    groupName=groupName.substring(groupName.lastIndexOf('.') + 1,groupName.length());
    return groupName;
  }
  if (element instanceof Structure) {
    Structure structure=(Structure)element;
    return structure.getName();
  }
  return null;
}
Program: 120550
Project: 120550
Buggy source:
@Override public boolean select(Viewer viewer,Object parentElement,Object element){
  if (element instanceof RepositoryNode) {
    return selectRepositoryNode(viewer,(RepositoryNode)element);
  }
 else {
    for (    IExtendedNodeHandler nodeHandler : RepositoryContentManager.getExtendedNodeHandler()) {
      boolean exportFilter=nodeHandler.exportFilter(viewer,parentElement,element);
      if (!exportFilter) {
        return exportFilter;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean select(Viewer viewer,Object parentElement,Object element){
  boolean select=true;
  if (element instanceof RepositoryNode) {
    select=selectRepositoryNode(viewer,(RepositoryNode)element);
  }
  if (select) {
    for (    IExtendedNodeHandler nodeHandler : RepositoryContentManager.getExtendedNodeHandler()) {
      boolean exportFilter=nodeHandler.exportFilter(viewer,parentElement,element);
      if (!exportFilter) {
        return exportFilter;
      }
    }
  }
  return select;
}
Program: 120553
Project: 120553
Buggy source:
@Override public void applyEditorValue(){
  if (element instanceof Node) {
    IProcess process=((Node)element).getProcess();
    if (process instanceof IProcess2) {
      ((IProcess2)process).checkProcess();
    }
  }
}

Fixed version (ground truth):
@Override public void applyEditorValue(){
  if (element instanceof Node) {
    IProcess process=((Node)element).getProcess();
    if (process instanceof IProcess2) {
      ((IProcess2)process).checkProcess();
    }
    if (element != null && "String_Node_Str".equals(copyOfTmpParam.getName())) {
      IElementParameter updateComponentsParam=element.getElementParameter(EParameterName.UPDATE_COMPONENTS.getName());
      if (updateComponentsParam != null) {
        updateComponentsParam.setValue(Boolean.TRUE);
      }
    }
  }
}
Program: 120556
Project: 120556
Buggy source:
public void paintControl(PaintEvent e){
  e.gc.drawImage(img,0,0);
}

Fixed version (ground truth):
@Override public void paintControl(PaintEvent e){
  e.gc.drawImage(img,0,0);
}
Program: 120557
Project: 120557
Buggy source:
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    factory.logOnProject(project,monitor);
  }
 catch (  LoginException e) {
    throw new InvocationTargetException(e);
  }
catch (  PersistenceException e) {
    throw new InvocationTargetException(e);
  }
catch (  OperationCanceledException e) {
    throw new InterruptedException(e.getLocalizedMessage());
  }
  monitor.done();
}

Fixed version (ground truth):
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    factory.logOnProject(project,monitor);
  }
 catch (  LoginException e) {
    throw new InvocationTargetException(e);
  }
catch (  PersistenceException e) {
    throw new InvocationTargetException(e);
  }
catch (  OperationCanceledException e) {
    throw new InterruptedException(e.getLocalizedMessage());
  }
  monitor.done();
}
Program: 120558
Project: 120558
Buggy source:
public ImageCanvas(Composite parent,ImageDescriptor imgDesc){
  super(parent,SWT.NONE);
  if (imgDesc != null) {
    img=imgDesc.createImage();
    addPaintListener(new PaintListener(){
      public void paintControl(      PaintEvent e){
        e.gc.drawImage(img,0,0);
      }
    }
);
  }
}

Fixed version (ground truth):
public ImageCanvas(Composite parent,ImageDescriptor imgDesc){
  super(parent,SWT.NONE);
  if (imgDesc != null) {
    img=imgDesc.createImage();
    addPaintListener(new PaintListener(){
      @Override public void paintControl(      PaintEvent e){
        e.gc.drawImage(img,0,0);
      }
    }
);
  }
}
Program: 120561
Project: 120561
Buggy source:
/** 
 * Gets table name base on synonym.
 * @param conn Connection
 * @param name synonym
 * @return a string representing real table name
 */
public String getTableNameBySynonym(Connection conn,String name){
  try {
    String sql="String_Node_Str" + name + "String_Node_Str";
    Statement sta;
    sta=conn.createStatement();
    ExtractMetaDataUtils.setQueryStatementTimeout(sta);
    ResultSet resultSet=sta.executeQuery(sql);
    while (resultSet.next()) {
      return resultSet.getString("String_Node_Str");
    }
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Gets table name base on synonym.
 * @param conn Connection
 * @param name synonym
 * @return a string representing real table name
 */
public String getTableNameBySynonym(Connection conn,String name){
  try {
    String sql="String_Node_Str" + name + "String_Node_Str";
    Statement sta;
    sta=conn.createStatement();
    ExtractMetaDataUtils.getInstance().setQueryStatementTimeout(sta);
    ResultSet resultSet=sta.executeQuery(sql);
    while (resultSet.next()) {
      return resultSet.getString("String_Node_Str");
    }
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
  return null;
}
Program: 120562
Project: 120562
Buggy source:
private static List createSQLConnection(DatabaseConnection con,String selectedContext,IMetadataConnection iMetadataConnection) throws Exception {
  List list=ExtractMetaDataUtils.getConnection(iMetadataConnection.getDbType(),iMetadataConnection.getUrl(),iMetadataConnection.getUsername(),iMetadataConnection.getPassword(),iMetadataConnection.getDatabase(),iMetadataConnection.getSchema(),iMetadataConnection.getDriverClass(),iMetadataConnection.getDriverJarPath(),iMetadataConnection.getDbVersionString(),iMetadataConnection.getAdditionalParams());
  SQLConnection sqlConnection=new SQLConnection(ExtractMetaDataUtils.conn,null);
  if (sqlConnection != null) {
    list.add(sqlConnection);
  }
  return list;
}

Fixed version (ground truth):
private static List createSQLConnection(DatabaseConnection con,String selectedContext,IMetadataConnection iMetadataConnection) throws Exception {
  ExtractMetaDataUtils extractMeta=ExtractMetaDataUtils.getInstance();
  List list=extractMeta.getConnection(iMetadataConnection.getDbType(),iMetadataConnection.getUrl(),iMetadataConnection.getUsername(),iMetadataConnection.getPassword(),iMetadataConnection.getDatabase(),iMetadataConnection.getSchema(),iMetadataConnection.getDriverClass(),iMetadataConnection.getDriverJarPath(),iMetadataConnection.getDbVersionString(),iMetadataConnection.getAdditionalParams());
  SQLConnection sqlConnection=new SQLConnection(extractMeta.getConn(),null);
  if (sqlConnection != null) {
    list.add(sqlConnection);
  }
  return list;
}
Program: 120563
Project: 120563
Buggy source:
/** 
 * @return SchemaName.
 */
public String getSchemaName(){
  DatabaseConnection databaseConnection=getSession().getDatabaseConnection();
  if (databaseConnection == null) {
    return null;
  }
  String schema=databaseConnection.getUiSchema();
  if (schema != null && schema.length() == 0) {
    return null;
  }
  return ExtractMetaDataUtils.schema;
}

Fixed version (ground truth):
/** 
 * @return SchemaName.
 */
public String getSchemaName(){
  DatabaseConnection databaseConnection=getSession().getDatabaseConnection();
  if (databaseConnection == null) {
    return null;
  }
  String schema=databaseConnection.getUiSchema();
  if (schema != null && schema.length() == 0) {
    return null;
  }
  return ExtractMetaDataUtils.getInstance().getSchema();
}
Program: 120564
Project: 120564
Buggy source:
private String getCurrentDbType(){
  DatabaseConnection connection=(DatabaseConnection)((ConnectionItem)rootNode.getObject().getProperty().getItem()).getConnection();
  String dbType=ExtractMetaDataUtils.getDbTypeByClassName(connection.getDriverClass());
  if (dbType == null) {
    dbType=connection.getDatabaseType();
  }
  return dbType;
}

Fixed version (ground truth):
private String getCurrentDbType(){
  DatabaseConnection connection=(DatabaseConnection)((ConnectionItem)rootNode.getObject().getProperty().getItem()).getConnection();
  String dbType=ExtractMetaDataUtils.getInstance().getDbTypeByClassName(connection.getDriverClass());
  if (dbType == null) {
    dbType=connection.getDatabaseType();
  }
  return dbType;
}
Program: 120568
Project: 120568
Buggy source:
/** 
 * method "getDatabaseMetaData" get databaseMetaData.
 * @param iMetadataConnection contains connection
 * @return dbMetaData DatabaseMetaData .
 * @throws SQLException
 * @throws IllegalAccessException
 * @throws InstantiationException
 * @throws ClassNotFoundException
 */
public DatabaseMetaData getDatabaseMetaData(IMetadataConnection iMetadataConnection) throws ClassNotFoundException, InstantiationException, IllegalAccessException, SQLException {
  ExtractMetaDataUtils.getConnection(iMetadataConnection.getDbType(),iMetadataConnection.getUrl(),iMetadataConnection.getUsername(),iMetadataConnection.getPassword(),iMetadataConnection.getDatabase(),iMetadataConnection.getSchema(),iMetadataConnection.getDriverClass(),iMetadataConnection.getDriverJarPath(),iMetadataConnection.getDbVersionString(),iMetadataConnection.getAdditionalParams());
  String dbType=iMetadataConnection.getDbType();
  DatabaseMetaData dbMetaData=null;
  if (EDatabaseTypeName.HIVE.getXmlName().equalsIgnoreCase(dbType)) {
    dbMetaData=HiveConnectionManager.getInstance().extractDatabaseMetaData(iMetadataConnection);
  }
 else {
    dbMetaData=ExtractMetaDataUtils.getDatabaseMetaData(ExtractMetaDataUtils.conn,dbType,iMetadataConnection.isSqlMode(),iMetadataConnection.getDatabase());
  }
  return dbMetaData;
}

Fixed version (ground truth):
/** 
 * method "getDatabaseMetaData" get databaseMetaData.
 * @param iMetadataConnection contains connection
 * @return dbMetaData DatabaseMetaData .
 * @throws SQLException
 * @throws IllegalAccessException
 * @throws InstantiationException
 * @throws ClassNotFoundException
 */
public DatabaseMetaData getDatabaseMetaData(IMetadataConnection iMetadataConnection) throws ClassNotFoundException, InstantiationException, IllegalAccessException, SQLException {
  ExtractMetaDataUtils extractMeta=ExtractMetaDataUtils.getInstance();
  extractMeta.getConnection(iMetadataConnection.getDbType(),iMetadataConnection.getUrl(),iMetadataConnection.getUsername(),iMetadataConnection.getPassword(),iMetadataConnection.getDatabase(),iMetadataConnection.getSchema(),iMetadataConnection.getDriverClass(),iMetadataConnection.getDriverJarPath(),iMetadataConnection.getDbVersionString(),iMetadataConnection.getAdditionalParams());
  String dbType=iMetadataConnection.getDbType();
  DatabaseMetaData dbMetaData=null;
  if (EDatabaseTypeName.HIVE.getXmlName().equalsIgnoreCase(dbType)) {
    dbMetaData=HiveConnectionManager.getInstance().extractDatabaseMetaData(iMetadataConnection);
  }
 else {
    dbMetaData=extractMeta.getDatabaseMetaData(extractMeta.getConn(),dbType,iMetadataConnection.isSqlMode(),iMetadataConnection.getDatabase());
  }
  return dbMetaData;
}