Source:
<code>public FileRepository(BaseRepositoryBuilder options) throws IOException { super(options); StoredConfig userConfig = null; try { userConfig = SystemReader.getInstance().getUserConfig(); } catch (ConfigInvalidException e) { LOG.error(e.getMessage(), e); throw new IOException(e.getMessage(), e); } repoConfig = new FileBasedConfig(userConfig, getFS().resolve( getDirectory(), Constants.CONFIG), getFS()); loadRepoConfig(); repoConfig.addChangeListener(this::fireEvent); final long repositoryFormatVersion = getConfig().getLong( ConfigConstants.CONFIG_CORE_SECTION, null, ConfigConstants.CONFIG_KEY_REPO_FORMAT_VERSION, 0); String reftype = <START> repoConfig.getString("extensions", null, <END> "refStorage"); if (repositoryFormatVersion >= 1 && reftype != null) { if (StringUtils.equalsIgnoreCase(reftype, "reftable")) { refs = new FileReftableDatabase(this); } else if (StringUtils.equalsIgnoreCase(reftype, "reftree")) { refs = new RefTreeDatabase(this, new RefDirectory(this)); } else { throw new IOException(JGitText.get().unknownRepositoryFormat); } } else { refs = new RefDirectory(this); } objectDatabase = new ObjectDirectory(repoConfig, options.getObjectDirectory(), options.getAlternateObjectDirectories(), getFS(), new File(getDirectory(), Constants.SHALLOW)); if (objectDatabase.exists()) { if (repositoryFormatVersion > 1) throw new IOException(MessageFormat.format( JGitText.get().unknownRepositoryFormat2, Long.valueOf(repositoryFormatVersion))); } if (!isBare()) { snapshot = FileSnapshot.save(getIndexFile()); } }</code><technical_language>CONFIG_EXTENSIONS_SECTION, CONFIG_KEY_REFSTORAGE</technical_language>

Target:
public FileRepository(BaseRepositoryBuilder options) throws IOException { super(options); StoredConfig userConfig = null; try { userConfig = SystemReader.getInstance().getUserConfig(); } catch (ConfigInvalidException e) { LOG.error(e.getMessage(), e); throw new IOException(e.getMessage(), e); } repoConfig = new FileBasedConfig(userConfig, getFS().resolve( getDirectory(), Constants.CONFIG), getFS()); loadRepoConfig(); repoConfig.addChangeListener(this::fireEvent); final long repositoryFormatVersion = getConfig().getLong( ConfigConstants.CONFIG_CORE_SECTION, null, ConfigConstants.CONFIG_KEY_REPO_FORMAT_VERSION, 0); String reftype = repoConfig.getString(ConfigConstants.CONFIG_EXTENSIONS_SECTION, null, ConfigConstants.CONFIG_KEY_REF_STORAGE); if (repositoryFormatVersion >= 1 && reftype != null) { if (StringUtils.equalsIgnoreCase(reftype, "reftable")) { refs = new FileReftableDatabase(this); } else if (StringUtils.equalsIgnoreCase(reftype, "reftree")) { refs = new RefTreeDatabase(this, new RefDirectory(this)); } else { throw new IOException(JGitText.get().unknownRepositoryFormat); } } else { refs = new RefDirectory(this); } objectDatabase = new ObjectDirectory(repoConfig, options.getObjectDirectory(), options.getAlternateObjectDirectories(), getFS(), new File(getDirectory(), Constants.SHALLOW)); if (objectDatabase.exists()) { if (repositoryFormatVersion > 1) throw new IOException(MessageFormat.format( JGitText.get().unknownRepositoryFormat2, Long.valueOf(repositoryFormatVersion))); } if (!isBare()) { snapshot = FileSnapshot.save(getIndexFile()); } }