Program: 118085
Project: 118085
Buggy source:
public ConvertRepositoryNodeToProcessNode(ConnectionItem connectionItem,IMetadataConnection convertedConnection,String tableName){
  databaseConnection=(DatabaseConnection)connectionItem.getConnection();
  IMetadataConnection iMetadataConnection=convertedConnection;
  String dbType=iMetadataConnection.getDbType();
  String username=iMetadataConnection.getUsername();
  String pwd=iMetadataConnection.getPassword();
  String dbVersion=iMetadataConnection.getDbVersionString();
  String url=iMetadataConnection.getUrl();
  String additionalParams=iMetadataConnection.getAdditionalParams();
  if (EDatabaseTypeName.GENERAL_JDBC.getDisplayName().equals(dbType)) {
    info=new DbInfo(dbType,username,pwd,dbVersion,url,iMetadataConnection.getDriverClass(),iMetadataConnection.getDriverJarPath(),additionalParams);
  }
 else   if (EDatabaseTypeName.HIVE.getDisplayName().equals(iMetadataConnection.getDbType())) {
    String jobTracker=TalendTextUtils.removeQuotes(String.valueOf(iMetadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_JOB_TRACKER_URL)));
    String nameNode=TalendTextUtils.removeQuotes(String.valueOf(iMetadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_NAME_NODE_URL)));
    String thrifturi=null;
    if (HiveModeInfo.get(iMetadataConnection.getDbVersionString()) == HiveModeInfo.EMBEDDED) {
      thrifturi="String_Node_Str" + iMetadataConnection.getServerName() + "String_Node_Str"+ iMetadataConnection.getPort();
    }
    info=new DbInfo(iMetadataConnection.getDbType(),iMetadataConnection.getUsername(),iMetadataConnection.getPassword(),iMetadataConnection.getDbVersionString(),iMetadataConnection.getUrl(),jobTracker,nameNode,thrifturi,iMetadataConnection.getDriverJarPath());
  }
 else {
    info=new DbInfo(dbType,username,pwd,dbVersion,url,additionalParams);
  }
  try {
    convertToProcessNode(connectionItem,tableName);
  }
 catch (  ProcessorException e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
public ConvertRepositoryNodeToProcessNode(ConnectionItem connectionItem,IMetadataConnection convertedConnection,String tableName){
  databaseConnection=(DatabaseConnection)connectionItem.getConnection();
  IMetadataConnection iMetadataConnection=convertedConnection;
  String dbType=iMetadataConnection.getDbType();
  String username=iMetadataConnection.getUsername();
  String pwd=iMetadataConnection.getPassword();
  String dbVersion=iMetadataConnection.getDbVersionString();
  String url=iMetadataConnection.getUrl();
  String additionalParams=iMetadataConnection.getAdditionalParams();
  if (EDatabaseTypeName.GENERAL_JDBC.getDisplayName().equals(dbType)) {
    info=new DbInfo(dbType,username,pwd,dbVersion,url,iMetadataConnection.getDriverClass(),iMetadataConnection.getDriverJarPath(),additionalParams);
  }
 else   if (EDatabaseTypeName.HIVE.getDisplayName().equals(iMetadataConnection.getDbType())) {
    String jobTracker=TalendTextUtils.removeQuotes(String.valueOf(iMetadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_JOB_TRACKER_URL)));
    String nameNode=TalendTextUtils.removeQuotes(String.valueOf(iMetadataConnection.getParameter(ConnParameterKeys.CONN_PARA_KEY_NAME_NODE_URL)));
    String thrifturi=null;
    if (HiveModeInfo.get(iMetadataConnection.getDbVersionString()) == HiveModeInfo.EMBEDDED) {
      thrifturi="String_Node_Str" + iMetadataConnection.getServerName() + "String_Node_Str"+ iMetadataConnection.getPort();
    }
    info=new DbInfo(iMetadataConnection.getDbType(),iMetadataConnection.getUsername(),iMetadataConnection.getPassword(),iMetadataConnection.getDbVersionString(),iMetadataConnection.getUrl(),jobTracker,nameNode,thrifturi,iMetadataConnection.getDriverJarPath());
    String hiveServerVersion=String.valueOf(iMetadataConnection.getParameter(ConnParameterKeys.HIVE_SERVER_VERSION));
    String driverClass="String_Node_Str";
    if (HiveServerVersionInfo.HIVE_SERVER_2.getKey().equals(hiveServerVersion)) {
      driverClass=EDatabase4DriverClassName.HIVE2.getDriverClass();
    }
 else {
      driverClass=EDatabase4DriverClassName.HIVE.getDriverClass();
    }
    info.setDriverClassName(driverClass);
  }
 else {
    info=new DbInfo(dbType,username,pwd,dbVersion,url,additionalParams);
  }
  try {
    convertToProcessNode(connectionItem,tableName);
  }
 catch (  ProcessorException e) {
    ExceptionHandler.process(e);
  }
}