Program: 127810
Project: 127810
Buggy source:
/** 
 * Checks if Hive can be connected, if yes, then return <code>true</code> for {  {@link #isValide} with successfulmessage  {@link #messageException}. Otherwise, return <code>false</code>. In fact, in this method it invokes  {@link HiveConnectionManager#checkHiveConnection(IMetadataConnection)} to check hive connection. Added by MarvinWang on Mar 18, 2013.
 * @param metadataConn
 * @return
 */
public boolean checkHiveConnection(IMetadataConnection metadataConn){
  try {
    HiveConnectionManager.getInstance().checkConnection(metadataConn);
    isValide=true;
    messageException=Messages.getString("String_Node_Str");
  }
 catch (  ClassNotFoundException e) {
    isValide=false;
    messageException=Messages.getString("String_Node_Str");
    CommonExceptionHandler.process(e);
  }
catch (  InstantiationException e) {
    isValide=false;
    messageException=Messages.getString("String_Node_Str");
    CommonExceptionHandler.process(e);
  }
catch (  IllegalAccessException e) {
    isValide=false;
    messageException=Messages.getString("String_Node_Str");
    CommonExceptionHandler.process(e);
  }
catch (  SQLException e) {
    isValide=false;
    messageException=Messages.getString("String_Node_Str");
    CommonExceptionHandler.process(e);
  }
  return isValide;
}

Fixed version (ground truth):
/** 
 * Checks if Hive can be connected, if yes, then return <code>true</code> for {  {@link #isValide} with successfulmessage  {@link #messageException}. Otherwise, return <code>false</code>. In fact, in this method it invokes  {@link HiveConnectionManager#checkHiveConnection(IMetadataConnection)} to check hive connection. Added by MarvinWang on Mar 18, 2013.
 * @param metadataConn
 * @return
 */
public boolean checkHiveConnection(IMetadataConnection metadataConn){
  try {
    HiveConnectionManager.getInstance().checkConnection(metadataConn);
    isValide=true;
    messageException=Messages.getString("String_Node_Str");
  }
 catch (  ClassNotFoundException e) {
    isValide=false;
    if (metadataConn.getCurrentConnection() instanceof DatabaseConnection) {
      DatabaseConnection connection=(DatabaseConnection)metadataConn.getCurrentConnection();
      String hiveDistribution=connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_DISTRIBUTION);
      String hiveDVersion=connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_VERSION);
      if (hiveDistribution.equals(EHadoopDistributions.MAPR.getName())) {
        Set<String> jars=new HashSet<String>();
        String missJarMsg="String_Node_Str";
        if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopService.class)) {
          IHadoopService hadoopService=(IHadoopService)GlobalServiceRegister.getDefault().getService(IHadoopService.class);
          jars=hadoopService.getMissingLibraries(hiveDistribution,hiveDVersion);
          if (jars.size() > 0) {
            missJarMsg="String_Node_Str" + jars.toString() + "String_Node_Str"+ "String_Node_Str";
            messageException=messageException + "String_Node_Str" + missJarMsg;
          }
        }
      }
    }
    messageException=Messages.getString("String_Node_Str");
    CommonExceptionHandler.process(e);
  }
catch (  InstantiationException e) {
    isValide=false;
    messageException=Messages.getString("String_Node_Str");
    CommonExceptionHandler.process(e);
  }
catch (  IllegalAccessException e) {
    isValide=false;
    messageException=Messages.getString("String_Node_Str");
    CommonExceptionHandler.process(e);
  }
catch (  SQLException e) {
    isValide=false;
    messageException=Messages.getString("String_Node_Str");
    CommonExceptionHandler.process(e);
  }
  return isValide;
}