Buggy code:
public class CarbonRepositoryUtils { private static final Log log = LogFactory . getLog ( CarbonRepositoryUtils . class ) ; public static DeploymentSynchronizer newCarbonRepositorySynchronizer ( int tenantId ) throws DeploymentSynchronizerException { } public static DeploymentSynchronizerConfiguration getActiveSynchronizerConfiguration ( int tenantId ) throws DeploymentSynchronizerException { } public static DeploymentSynchronizerConfiguration getDeploymentSyncConfigurationFromConf ( ) throws DeploymentSynchronizerException { DeploymentSynchronizerConfiguration config = new DeploymentSynchronizerConfiguration ( ) ; ServerConfiguration serverConfig = ServerConfiguration . getInstance ( ) ; String value = serverConfig . getFirstProperty ( ENABLED ) ; if ( value == null ) { return null ; } config . setEnabled ( JavaUtils . isTrueExplicitly ( value ) ) ; if ( config . isEnabled ( ) ) { value = serverConfig . getFirstProperty ( AUTO_CHECKOUT_MODE ) ; config . setAutoCheckout ( ( ( value != null ) && ( JavaUtils . isTrueExplicitly ( value ) ) ) ) ; value = serverConfig . getFirstProperty ( AUTO_COMMIT_MODE ) ; config . setAutoCommit ( ( ( value != null ) && ( JavaUtils . isTrueExplicitly ( value ) ) ) ) ; value = serverConfig . getFirstProperty ( USE_EVENTING ) ; config . setUseEventing ( ( ( value != null ) && ( JavaUtils . isTrueExplicitly ( value ) ) ) ) ; value = serverConfig . getFirstProperty ( AUTO_SYNC_PERIOD ) ; if ( value != null ) { config . setPeriod ( Long . parseLong ( value ) ) ; } else { config . setPeriod ( DEFAULT_AUTO_SYNC_PERIOD ) ; } value = serverConfig . getFirstProperty ( REPOSITORY_TYPE ) ; if ( value != null ) { config . setRepositoryType ( value ) ; } else { config . setRepositoryType ( DEFAULT_REPOSITORY_TYPE ) ; } ArtifactRepository repository = RepositoryReferenceHolder . getInstance ( ) . getRepositoryByType ( config . getRepositoryType ( ) ) ; if ( repository == null ) { throw new DeploymentSynchronizerException ( ( "No<seq2seq4repair_space>Repository<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>type<seq2seq4repair_space>" + ( config . getRepositoryType ( ) ) ) ) ; } List < RepositoryConfigParameter > parameters = repository . getParameters ( ) ; if ( parameters != null ) { for ( RepositoryConfigParameter parameter : parameters ) { parameter . setValue ( serverConfig . getFirstProperty ( parameter . getName ( ) ) ) ; } config . setRepositoryConfigParameters ( parameters . toArray ( new RepositoryConfigParameter [ parameters . size ( ) ] ) ) ; } return config ; } else { <START_BUG> return null ; <END_BUG> } } public static DeploymentSynchronizerConfiguration getDefaultDeploymentSyncConfiguration ( ) throws DeploymentSynchronizerException { } public static String getCarbonRepositoryFilePath ( ConfigurationContext cfgCtx ) { } public static boolean isSynchronizerEnabled ( int tenantId ) throws DeploymentSynchronizerException { } public static DeploymentSynchronizerConfiguration getDeploymentSyncConfigurationFromRegistry ( int tenantId ) throws RegistryException { } public static void persistConfiguration ( DeploymentSynchronizerConfiguration config , int tenantId ) throws RegistryException { } private static UserRegistry getLocalRepository ( int tenantId ) throws RegistryException { } private static ArtifactRepository createArtifactRepository ( String repositoryType ) throws DeploymentSynchronizerException { } }

Fix:
return config ;