CPD Results

The following document contains the results of PMD's CPD

Duplications

FileLine
net\sf\sapjcosupport\jdbc\SapDataSource.java146
net\sf\sapjcosupport\SapDataSource.java94
    }

    private synchronized JCO.Pool getConnectionPool() {
        if (pool == null) {
            String poolName = new StringBuffer("pool_").append(host).append(systemNr).append(client).toString();
            pool = JCO.getClientPoolManager().getPool(poolName);
            if (pool == null) {
                logger.info(new StringBuffer("Creating new pool ").append(poolName).append(" , max size: ").append(
                        poolSize).toString());
                JCO.addClientPool(poolName, poolSize,// maximum number of connections
                                  client, username, password, language, host, systemNr); // properties
                pool = JCO.getClientPoolManager().getPool(poolName);
                pool.setConnectionTimeout(60000);
                pool.setMaxWaitTime(60000);
                pool.setMaxConnections(poolSize * 2);
            }
            //pool.setResetOnRelease(true);
            if (repository == null) {
                repository = JCO.createRepository("DefaultRepository", poolName);
            }
        }
        return pool;
    }

    public synchronized void release(JCO.Client connection) {

FileLine
net\sf\sapjcosupport\jdbc\SapDataSource.java207
net\sf\sapjcosupport\SapDataSource.java26
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getClient() {
        return client;
    }

    public void setClient(String client) {
        this.client = client;
    }

    public String getSystemNr() {
        return systemNr;
    }

    public void setSystemNr(String systemNr) {
        this.systemNr = systemNr;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

FileLine
net\sf\sapjcosupport\SapJcoInterface.java175
net\sf\sapjcosupport\SapJcoInterface.java271
            for (int j = 0; j < sapBapiMapping.getStructures().size(); j++) {
                SapStructureMapping sapStructureMapping = (SapStructureMapping) sapBapiMapping.getStructures().get(j);
                if (sapStructureMapping.isExcluded() || (fieldSelection != null && sapStructureMapping.getName().equals(
                        fieldSelection.getName()))) {
                    // discard excluded lists and the field selection structure when processing output
                    continue;
                }
                JCO.Field field = getField(function, sapStructureMapping.getName());
                if (field == null) {
                    throw new DataRetrievalFailureException(new StringBuffer("Field ").append(
                            sapStructureMapping.getName()).append(" not found in resultset").toString());
                }

                if (sapStructureMapping.getName().equalsIgnoreCase(outputListMapping.getName())) {