Source:
public void applyTo(@NonNull TaskRepository repository) { String category = repository.getCategory(); if (category == null || category.length() == 0) { connector.applyDefaultCategory(repository); } repository.setVersion(getVersion()); repository.setProperty(ITasksCoreConstants.PROPERTY_BRAND_ID, brand); if (needsEncoding()) { repository.setCharacterEncoding(getCharacterEncoding()); } if (needsRepositoryCredentials()) { if (isAnonymousAccess()) { repository.setCredentials(AuthenticationType.REPOSITORY, null, getSavePassword()); } else { AuthenticationCredentials credentials = new AuthenticationCredentials(getUserName(), getPassword()); repository.setCredentials(AuthenticationType.REPOSITORY, credentials, getSavePassword()); } } repository.setRepositoryLabel(getRepositoryLabel()); if (needsCertAuth()) { if (getCertAuth()) { AuthenticationCredentials webCredentials = new AuthenticationCredentials(getCertAuthFileName(), getCertAuthPassword()); repository.setCredentials(AuthenticationType.CERTIFICATE, webCredentials, getSaveCertPassword()); } else { repository.setCredentials(AuthenticationType.CERTIFICATE, null, getSaveCertPassword()); } } if (needsHttpAuth()) { if (getHttpAuth()) { AuthenticationCredentials webCredentials = new AuthenticationCredentials(getHttpAuthUserId(), getHttpAuthPassword()); repository.setCredentials(AuthenticationType.HTTP, webCredentials, getSaveHttpPassword()); } else { repository.setCredentials(AuthenticationType.HTTP, null, getSaveHttpPassword()); } } if (needsProxy()) { repository.setDefaultProxyEnabled(getUseDefaultProxy()); repository.setProperty(TaskRepository.PROXY_HOSTNAME, getProxyHostname()); repository.setProperty(TaskRepository.PROXY_PORT, getProxyPort()); if (getProxyAuth()) { AuthenticationCredentials webCredentials = new AuthenticationCredentials(getProxyUserName(), getProxyPassword()); repository.setCredentials(AuthenticationType.PROXY, webCredentials, getSaveProxyPassword()); } else { repository.setCredentials(AuthenticationType.PROXY, null, getSaveProxyPassword()); } } if (disconnectedButton != null) { repository.setOffline(disconnectedButton.getSelection()); } super.applyTo(repository); }

Target:
public void applyTo(@NonNull TaskRepository repository) { String category = repository.getCategory(); if (category == null || category.length() == 0) { connector.applyDefaultCategory(repository); } repository.setVersion(getVersion()); if (brand != null) { repository.setProperty(ITasksCoreConstants.PROPERTY_BRAND_ID, brand); } if (needsEncoding()) { repository.setCharacterEncoding(getCharacterEncoding()); } if (needsRepositoryCredentials()) { if (isAnonymousAccess()) { repository.setCredentials(AuthenticationType.REPOSITORY, null, getSavePassword()); } else { AuthenticationCredentials credentials = new AuthenticationCredentials(getUserName(), getPassword()); repository.setCredentials(AuthenticationType.REPOSITORY, credentials, getSavePassword()); } } repository.setRepositoryLabel(getRepositoryLabel()); if (needsCertAuth()) { if (getCertAuth()) { AuthenticationCredentials webCredentials = new AuthenticationCredentials(getCertAuthFileName(), getCertAuthPassword()); repository.setCredentials(AuthenticationType.CERTIFICATE, webCredentials, getSaveCertPassword()); } else { repository.setCredentials(AuthenticationType.CERTIFICATE, null, getSaveCertPassword()); } } if (needsHttpAuth()) { if (getHttpAuth()) { AuthenticationCredentials webCredentials = new AuthenticationCredentials(getHttpAuthUserId(), getHttpAuthPassword()); repository.setCredentials(AuthenticationType.HTTP, webCredentials, getSaveHttpPassword()); } else { repository.setCredentials(AuthenticationType.HTTP, null, getSaveHttpPassword()); } } if (needsProxy()) { repository.setDefaultProxyEnabled(getUseDefaultProxy()); repository.setProperty(TaskRepository.PROXY_HOSTNAME, getProxyHostname()); repository.setProperty(TaskRepository.PROXY_PORT, getProxyPort()); if (getProxyAuth()) { AuthenticationCredentials webCredentials = new AuthenticationCredentials(getProxyUserName(), getProxyPassword()); repository.setCredentials(AuthenticationType.PROXY, webCredentials, getSaveProxyPassword()); } else { repository.setCredentials(AuthenticationType.PROXY, null, getSaveProxyPassword()); } } if (disconnectedButton != null) { repository.setOffline(disconnectedButton.getSelection()); } super.applyTo(repository); }