CPD Results

The following document contains the results of PMD's CPD 7.12.0.

Duplications

File Line
net\sourceforge\joceanus\prometheus\threads\PrometheusThreadCreateBackup.java 69
net\sourceforge\joceanus\prometheus\threads\PrometheusThreadCreateXMLFile.java 82
return PrometheusThreadId.CREATEBACKUP.toString();
    }

    @Override
    public Void performTask(final TethysUIThreadManager pManager) throws OceanusException {
        /* Access the thread manager */
        final PrometheusToolkit myPromToolkit = (PrometheusToolkit) pManager.getThreadData();
        final PrometheusSecurityPasswordManager myPasswordMgr = myPromToolkit.getPasswordManager();
        boolean doDelete = false;
        File myFile = null;

        try {
            /* Initialise the status window */
            pManager.initTask(getTaskName());

            /* Access the Backup preferences */
            final MetisPreferenceManager myMgr = theControl.getPreferenceManager();
            final PrometheusBackupPreferences myProperties = myMgr.getPreferenceSet(PrometheusBackupPreferences.class);

            /* Determine the archive name */
            final String myBackupDir = myProperties.getStringValue(PrometheusBackupPreferenceKey.BACKUPDIR);
            final String myPrefix = myProperties.getStringValue(PrometheusBackupPreferenceKey.BACKUPPFIX);
            final boolean doTimeStamp = myProperties.getBooleanValue(PrometheusBackupPreferenceKey.BACKUPTIME);
            final PrometheusSheetWorkBookType myType = myProperties.getEnumValue(PrometheusBackupPreferenceKey.BACKUPTYPE, PrometheusSheetWorkBookType.class);
File Line
net\sourceforge\joceanus\prometheus\database\PrometheusDataStore.java 117
net\sourceforge\joceanus\prometheus\database\PrometheusDataStore.java 172
final String myConnString = theDriver.getConnectionString(pDatabase, pConfig.getServer(), pConfig.getPort());

            /* Create the properties and record user */
            final Properties myProperties = new Properties();
            final String myUser = pConfig.getUser();
            final char[] myPass = pConfig.getPassword();
            myProperties.setProperty(PROPERTY_USER, myUser);
            myProperties.setProperty(PROPERTY_PASS, new String(myPass));

            /* If we are using instance */
            if (theDriver.useInstance()) {
                final String myInstance = pConfig.getInstance();
                myProperties.setProperty(PROPERTY_INSTANCE, myInstance);
                myProperties.setProperty(PROPERTY_ENCRYPT, "false");
            }

            /* Connect using properties */
            theConn = DriverManager.getConnection(myConnString, myProperties);

            /* Connect to the correct database */
            theConn.setCatalog(pDatabase);