Program: 120585
Project: 120585
Buggy source:
private void runShadowProcessForPerl(){
  final ProgressMonitorDialog pmd=new ProgressMonitorDialog(this.composite.getShell());
  try {
    pmd.run(true,true,new IRunnableWithProgress(){
      @Override public void run(      IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        if (columns != null) {
          columns.clear();
        }
        monitor.beginTask(Messages.getString("String_Node_Str"),IProgressMonitor.UNKNOWN);
        if (connParameters == null) {
          initConnectionParameters();
        }
        ISQLBuilderService service=(ISQLBuilderService)GlobalServiceRegister.getDefault().getService(ISQLBuilderService.class);
        DatabaseConnection connt=service.createConnection(connParameters);
        IMetadataConnection iMetadataConnection=null;
        boolean isStatus=false;
        if (connt != null) {
          iMetadataConnection=ConvertionHelper.convert(connt);
          isStatus=checkConnection(iMetadataConnection);
        }
        if (!monitor.isCanceled()) {
          try {
            if (isStatus) {
              ExtractMetaDataUtils.getConnection(iMetadataConnection.getDbType(),iMetadataConnection.getUrl(),iMetadataConnection.getUsername(),iMetadataConnection.getPassword(),iMetadataConnection.getDatabase(),iMetadataConnection.getSchema(),iMetadataConnection.getDriverClass(),iMetadataConnection.getDriverJarPath(),iMetadataConnection.getDbVersionString(),iMetadataConnection.getAdditionalParams());
              if (ExtractMetaDataUtils.conn != null) {
                Statement smst=ExtractMetaDataUtils.conn.createStatement();
                ExtractMetaDataUtils.setQueryStatementTimeout(smst);
                ResultSet rs=smst.executeQuery(memoSQL);
                ResultSetMetaData rsmd=rs.getMetaData();
                int numbOfColumn=rsmd.getColumnCount();
                int count=0;
                List<String[]> cvsArrays=new ArrayList<String[]>();
                while (rs.next() && count < 50) {
                  String[] dataOneRow=new String[numbOfColumn];
                  for (int i=1; i <= numbOfColumn; i++) {
                    String tempStr=rs.getString(i);
                    dataOneRow[i - 1]=tempStr;
                  }
                  cvsArrays.add(dataOneRow);
                  count++;
                }
                refreshMetaDataTable(rsmd,cvsArrays);
                ExtractMetaDataUtils.closeConnection();
              }
            }
 else {
              Display.getDefault().asyncExec(new Runnable(){
                @Override public void run(){
                  String pid="String_Node_Str";
                  String mainMsg="String_Node_Str";
                  ErrorDialogWithDetailAreaAndContinueButton dialog=new ErrorDialogWithDetailAreaAndContinueButton(composite.getShell(),pid,mainMsg,connParameters.getConnectionComment());
                  if (dialog.getCodeOfButton() == Window.OK) {
                    openParamemerDialog(composite.getShell(),part.getProcess().getContextManager());
                  }
                }
              }
);
            }
          }
 catch (          Exception e) {
            ExtractMetaDataUtils.closeConnection();
            ExceptionHandler.process(e);
            final String strExcepton="String_Node_Str" + System.getProperty("String_Node_Str");
            Display.getDefault().asyncExec(new Runnable(){
              @Override public void run(){
                MessageDialog.openWarning(composite.getShell(),Messages.getString("String_Node_Str"),strExcepton);
              }
            }
);
          }
        }
      }
    }
);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
private void runShadowProcessForPerl(){
  final ProgressMonitorDialog pmd=new ProgressMonitorDialog(this.composite.getShell());
  try {
    pmd.run(true,true,new IRunnableWithProgress(){
      @Override public void run(      IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        if (columns != null) {
          columns.clear();
        }
        monitor.beginTask(Messages.getString("String_Node_Str"),IProgressMonitor.UNKNOWN);
        if (connParameters == null) {
          initConnectionParameters();
        }
        ISQLBuilderService service=(ISQLBuilderService)GlobalServiceRegister.getDefault().getService(ISQLBuilderService.class);
        DatabaseConnection connt=service.createConnection(connParameters);
        IMetadataConnection iMetadataConnection=null;
        boolean isStatus=false;
        ExtractMetaDataUtils extractMeta=ExtractMetaDataUtils.getInstance();
        if (connt != null) {
          iMetadataConnection=ConvertionHelper.convert(connt);
          isStatus=checkConnection(iMetadataConnection);
        }
        if (!monitor.isCanceled()) {
          try {
            if (isStatus) {
              extractMeta.getConnection(iMetadataConnection.getDbType(),iMetadataConnection.getUrl(),iMetadataConnection.getUsername(),iMetadataConnection.getPassword(),iMetadataConnection.getDatabase(),iMetadataConnection.getSchema(),iMetadataConnection.getDriverClass(),iMetadataConnection.getDriverJarPath(),iMetadataConnection.getDbVersionString(),iMetadataConnection.getAdditionalParams());
              if (extractMeta.getConn() != null) {
                Statement smst=extractMeta.getConn().createStatement();
                extractMeta.setQueryStatementTimeout(smst);
                ResultSet rs=smst.executeQuery(memoSQL);
                ResultSetMetaData rsmd=rs.getMetaData();
                int numbOfColumn=rsmd.getColumnCount();
                int count=0;
                List<String[]> cvsArrays=new ArrayList<String[]>();
                while (rs.next() && count < 50) {
                  String[] dataOneRow=new String[numbOfColumn];
                  for (int i=1; i <= numbOfColumn; i++) {
                    String tempStr=rs.getString(i);
                    dataOneRow[i - 1]=tempStr;
                  }
                  cvsArrays.add(dataOneRow);
                  count++;
                }
                refreshMetaDataTable(rsmd,cvsArrays);
                extractMeta.closeConnection();
              }
            }
 else {
              Display.getDefault().asyncExec(new Runnable(){
                @Override public void run(){
                  String pid="String_Node_Str";
                  String mainMsg="String_Node_Str";
                  ErrorDialogWithDetailAreaAndContinueButton dialog=new ErrorDialogWithDetailAreaAndContinueButton(composite.getShell(),pid,mainMsg,connParameters.getConnectionComment());
                  if (dialog.getCodeOfButton() == Window.OK) {
                    openParamemerDialog(composite.getShell(),part.getProcess().getContextManager());
                  }
                }
              }
);
            }
          }
 catch (          Exception e) {
            extractMeta.closeConnection();
            ExceptionHandler.process(e);
            final String strExcepton="String_Node_Str" + System.getProperty("String_Node_Str");
            Display.getDefault().asyncExec(new Runnable(){
              @Override public void run(){
                MessageDialog.openWarning(composite.getShell(),Messages.getString("String_Node_Str"),strExcepton);
              }
            }
);
          }
        }
      }
    }
);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}