auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected boolean checkIfLunDiskCanBeAdded() { LUNs lun = ((LunDisk) getParameters().getDiskInfo()).getLun(); switch (lun.getLunType()) { case UNKNOWN: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_HAS_NO_VALID_TYPE); case ISCSI: if (lun.getLunConnections() == null || lun.getLunConnections().isEmpty()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_ISCSI_MISSING_CONNECTION_PARAMS); } for (StorageServerConnections conn : lun.getLunConnections()) { if (StringUtils.isEmpty(conn.getiqn()) || StringUtils.isEmpty(conn.getconnection()) || StringUtils.isEmpty(conn.getport())) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_ISCSI_MISSING_CONNECTION_PARAMS); } } break; } if (getDiskLunMapDao().getDiskIdByLunId(lun.getLUN_id()) != null) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_IS_ALREADY_IN_USE); } <START> return <END> validate(getSnapshotValidator().vmNotDuringSnapshot(getVmId())) && validate(getSnapshotValidator().vmNotInPreview(getVmId())) && validate(new VmValidator(getVm()).vmNotLocked()); }</code><technical_language>is add disk (LUN well) vm ("floating") getVm() null</technical_language>

Target:
protected boolean checkIfLunDiskCanBeAdded() { LUNs lun = ((LunDisk) getParameters().getDiskInfo()).getLun(); switch (lun.getLunType()) { case UNKNOWN: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_HAS_NO_VALID_TYPE); case ISCSI: if (lun.getLunConnections() == null || lun.getLunConnections().isEmpty()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_ISCSI_MISSING_CONNECTION_PARAMS); } for (StorageServerConnections conn : lun.getLunConnections()) { if (StringUtils.isEmpty(conn.getiqn()) || StringUtils.isEmpty(conn.getconnection()) || StringUtils.isEmpty(conn.getport())) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_ISCSI_MISSING_CONNECTION_PARAMS); } } break; } if (getDiskLunMapDao().getDiskIdByLunId(lun.getLUN_id()) != null) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_IS_ALREADY_IN_USE); } if (getVm() == null) { return true; } return validate(getSnapshotValidator().vmNotDuringSnapshot(getVmId())) && validate(getSnapshotValidator().vmNotInPreview(getVmId())) && validate(new VmValidator(getVm()).vmNotLocked()); }
Source:
<code><START> public List<CompletePaxosHistoryForNamespaceAndUseCase> getHistory() throws RuntimeException { <END> Map<NamespaceAndUseCase, Long> lastVerifiedSequences = KeyedStream .of(getNamespaceAndUseCaseTuples().stream()) .map(namespaceAndUseCase -> verificationProgressStateCache.computeIfAbsent(namespaceAndUseCase, this::getOrInsertVerificationState)) .collectToMap(); List<HistoryQuery> historyQueries = KeyedStream.stream(lastVerifiedSequences) .mapEntries(this::buildHistoryQuery) .values() .collect(Collectors.toList()); PaxosHistoryOnSingleNode localPaxosHistory = localHistoryLoader.getLocalPaxosHistory( lastVerifiedSequences); List<List<LogsForNamespaceAndUseCase>> rawHistoryFromAllRemotes = remoteHistoryProviders.stream().map( remote -> fetchHistoryFromRemote(historyQueries, remote)).collect(Collectors.toList()); List<Map<NamespaceAndUseCase, Map<Long, LearnedAndAcceptedValue>>> historyLogsFromRemotes = rawHistoryFromAllRemotes.stream() .map(this::buildHistoryFromRemoteResponse) .collect(Collectors.toList()); return lastVerifiedSequences.keySet().stream() .map(namespaceAndUseCase -> buildCompleteHistory( namespaceAndUseCase, localPaxosHistory, historyLogsFromRemotes)) .collect(Collectors.toList()); }</code><technical_language>nit: generally declare unchecked exceptions suggestion public List<CompletePaxosHistoryForNamespaceAndUseCase> getHistory() {</technical_language>

Target:
public List<CompletePaxosHistoryForNamespaceAndUseCase> getHistory() { Map<NamespaceAndUseCase, Long> lastVerifiedSequences = getNamespaceAndUseCaseToLastVerifiedSeqMap(); PaxosHistoryOnSingleNode localPaxosHistory = localHistoryLoader.getLocalPaxosHistory(lastVerifiedSequences); List<HistoryQuery> historyQueries = getHistoryQueryListForRemoteServers(lastVerifiedSequences); List<PaxosHistoryOnRemote> rawHistoryFromAllRemotes = getHistoriesFromRemoteServers(historyQueries); List<NamespaceAndUseCaseWiseConsolidatedLearnerAndAcceptorRecords> historyFromAllRemotes = buildHistoryFromRemoteResponses(rawHistoryFromAllRemotes); return consolidateAndGetHistoriesAcrossAllNodes( lastVerifiedSequences, localPaxosHistory, historyFromAllRemotes); }
Source:
<code>public void testFirstNameIsChosenForSerialization() { MyClass target = new MyClass("v1", "v2"); <START> assertTrue(gson.toJson(target).contains("\"name1\":\"v2\"")); <END> }</code><technical_language>assert other names included</technical_language>

Target:
public void testFirstNameIsChosenForSerialization() { MyClass target = new MyClass("v1", "v2"); assertEquals("{\"name\":\"v1\",\"name1\":\"v2\"}", gson.toJson(target)); }
Source:
<code>public VmConsoles getVmConsoles() { return poolRepresentative == null ? <START> consolesCache.getVmConsolesForVm((VM) <END> getEntity()) : consolesCache.getVmConsolesForPool(poolRepresentative); }</code><technical_language>please rename</technical_language>

Target:
public VmConsoles getVmConsoles() { return poolRepresentative == null ? consolesFactory.getVmConsolesForVm((VM) getEntity()) : consolesFactory.getVmConsolesForPool(poolRepresentative); }
Source:
<code>SupplierWithException<BufferPool, IOException> createBufferPoolFactory( int numberOfSubpartitions, ResultPartitionType type) { return () -> { int maxNumberOfMemorySegments = type.isBounded() ? numberOfSubpartitions * networkBuffersPerChannel + floatingNetworkBuffersPerGate : Integer.MAX_VALUE; int numRequiredBuffers = numberOfSubpartitions + 1; <START> if (isSortMergeBlockingShuffle(type, numberOfSubpartitions)) { <END> maxNumberOfMemorySegments = Math.max( numberOfSubpartitions * networkBuffersPerChannel + floatingNetworkBuffersPerGate, maxBuffersPerSortMergePartition); numRequiredBuffers = Math.min(numRequiredBuffers, maxBuffersPerSortMergePartition); } return bufferPoolFactory.createBufferPool( numRequiredBuffers, maxNumberOfMemorySegments, numberOfSubpartitions, maxBuffersPerChannel); }; }</code><technical_language>rewrite this compute in sort shuffle mode (once for non-sort shuffle, for sort shuffle)</technical_language>

Target:
SupplierWithException<BufferPool, IOException> createBufferPoolFactory( int numberOfSubpartitions, ResultPartitionType type) { return () -> { int maxNumberOfMemorySegments = type.isBounded() ? numberOfSubpartitions * networkBuffersPerChannel + floatingNetworkBuffersPerGate : Integer.MAX_VALUE; int numRequiredBuffers = !type.isPipelined() && numberOfSubpartitions >= sortShuffleMinParallelism ? sortShuffleMinBuffers : numberOfSubpartitions + 1; return bufferPoolFactory.createBufferPool( numRequiredBuffers, maxNumberOfMemorySegments, numberOfSubpartitions, maxBuffersPerChannel); }; }
Source:
<code>public boolean onPrepareOptionsMenu(Menu menu) { MenuItem item = menu.findItem(R.id.comments); MenuItem favoriteGuide = menu.findItem(R.id.favorite_guide); TextView countView = ((TextView) item.getActionView().findViewById(R.id.comment_count)); if (mGuide != null) { int stepIndex = getStepIndex(); int commentCount = 0; if (stepIndex < 0) { commentCount = mGuide.getCommentCount(); } else { commentCount = mGuide.getStep(stepIndex).getCommentCount(); } Log.d("GuideStep", "onPrepareOptionsMenu " + commentCount); if (countView != null) { countView.setText(commentCount + ""); <START> } <END> } boolean favorited = mGuide != null ? mGuide.isFavorited() : false; favoriteGuide.setIcon(favorited ? R.drawable.ic_action_favorite_filled : R.drawable.ic_action_favorite_empty); favoriteGuide.setEnabled(!mFavoriting && mGuide != null); favoriteGuide.setTitle(favorited ? R.string.unfavorite_guide : R.string.favorite_guide); return super.onPrepareOptionsMenu(menu); }</code><technical_language>countView null</technical_language>

Target:
public boolean onPrepareOptionsMenu(Menu menu) { MenuItem comments = menu.findItem(R.id.comments); MenuItem favoriteGuide = menu.findItem(R.id.favorite_guide); MenuItem reloadGuide = menu.findItem(R.id.reload_guide); MenuItem editGuide = menu.findItem(R.id.edit_guide); TextView countView = ((TextView)comments.getActionView().findViewById(R.id.comment_count)); if (mGuide != null) { int stepIndex = getStepIndex(); int commentCount = 0; if (stepIndex < 0) { commentCount = mGuide.getCommentCount(); } else { commentCount = mGuide.getStep(stepIndex).getCommentCount(); } if (countView != null) { countView.setText(commentCount + ""); } } boolean favorited = mGuide != null && mGuide.isFavorited(); favoriteGuide.setIcon(favorited ? R.drawable.ic_action_favorite_filled : R.drawable.ic_action_favorite_empty); favoriteGuide.setEnabled(!mFavoriting && mGuide != null); favoriteGuide.setTitle(favorited ? R.string.unfavorite_guide : R.string.favorite_guide); reloadGuide.setEnabled(mGuide != null); editGuide.setEnabled(mGuide != null); if (mIsOfflineGuide) { reloadGuide.setVisible(false); editGuide.setVisible(false); favoriteGuide.setVisible(false); } return super.onPrepareOptionsMenu(menu); }
Source:
<code>public VoltNIOWriteStream writeStream() { <START> assert(m_writeStream != null && m_writeStream instanceof VoltNIOWriteStream); <END> return (VoltNIOWriteStream) m_writeStream; }</code><technical_language>If m_writeStream is defined VoltNIOWriteStream, assertion cast is needed</technical_language>

Target:
public VoltNIOWriteStream writeStream() { assert(m_writeStream != null); return m_writeStream; }
Source:
<code>public void call(final Subscriber<? super String> subscriber) { final SharedPreferences.OnSharedPreferenceChangeListener listener = new SharedPreferences.OnSharedPreferenceChangeListener() { @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { if(!subscriber.isUnsubscribed()) <START> subscriber.onNext(key); <END> } }; subscriber.add(Subscriptions.create(new Action0() { @Override public void call() { sharedPreferences.unregisterOnSharedPreferenceChangeListener(listener); } })); sharedPreferences.registerOnSharedPreferenceChangeListener(listener); }</code><technical_language>a style remark: indentation is off, curly braces for liners. more readable</technical_language>

Target:
public void call(final Subscriber<? super String> subscriber) { final SharedPreferences.OnSharedPreferenceChangeListener listener = new SharedPreferences.OnSharedPreferenceChangeListener() { @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { subscriber.onNext(key); } }; subscriber.add(Subscriptions.create(new Action0() { @Override public void call() { sharedPreferences.unregisterOnSharedPreferenceChangeListener(listener); } })); sharedPreferences.registerOnSharedPreferenceChangeListener(listener); }
Source:
<code><START> public String getDlmsAttributeValues(final int classId, final String obisCode) <END> throws SimulatorTriggerClientException { final String key = this.buildKeyPathSegment(classId, obisCode); final Response response = this.getWebClientInstance().path(DYNAMIC_ATTRIBUTES_PATH).path(key).get(); try { this.checkResponseStatus(response); } catch (final ResponseException e) { throw new SimulatorTriggerClientException("getDlmsAttributeValues response exception", e); } return response.readEntity(String.class); }</code><technical_language>a matter of symmetry I expect a getter return of type accepted setter, in this case a Map<String, String>. In general I difficulties in retrieving correct results putting in easy format handled API client callers of methods</technical_language>

Target:
public final Properties getDlmsAttributeValues(final int classId, final String obisCode) throws SimulatorTriggerClientException { final String key = this.buildKeyPathSegment(classId, obisCode); final Response response = this.getWebClientInstance().path(DYNAMIC_ATTRIBUTES_PATH).path(key).get(); try { this.checkResponseStatus(response); } catch (final ResponseException e) { throw new SimulatorTriggerClientException("getDlmsAttributeValues response exception", e); } return response.readEntity(Properties.class); }
Source:
<code>public Optional<HostLocation> get() { Optional<HostLocation> location = overrideLocation.get(); if (location.isPresent()) { return location; } <START> return locationSupplier.get(); <END> }</code><technical_language>non-actionable: ... this is I complain Java 9 Optional#or need</technical_language>

Target:
public Optional<HostLocation> get() { Optional<HostLocation> location = overrideLocationSupplier.get(); if (location.isPresent()) { return location; } return locationSupplier.get(); }
Source:
<code>public void loadLoginPage() { <START> if (loginOptions.jwt == null || loginOptions.loginUrl == null) { <END> loginOptions.loginUrl = getLoginUrl(); } if (loginOptions.jwt != null) { new SwapJWTForAccessTokenTask().execute(loginOptions); } this.doLoadPage(false); }</code><technical_language>This be: if (TextUtils.isEmpty(loginOptions.jwt)) { loginOptions.loginUrl = getLoginUrl(); doLoadPage(false); } else { new SwapJWTForAccessTokenTask().execute(loginOptions); }</technical_language>

Target:
public void loadLoginPage() { if (TextUtils.isEmpty(loginOptions.jwt)) { loginOptions.loginUrl = getLoginUrl(); doLoadPage(false); } else { new SwapJWTForAccessTokenTask().execute(loginOptions); } }
Source:
<code>public static boolean addAppender(String name, Properties properties) { if (getAppendersNames().contains(name)) { logger.warn("A logger appender with the name '{}' exists. Cannot add a new logger appender with the same name", name); } else { try { Method method = PropertyConfigurator.class.getDeclaredMethod("parseAppender", Properties.class, String.class); method.setAccessible(true); <START> makeMDCProperties(); <END> Appender appender = (Appender)method.invoke(new PropertyConfigurator(), properties, name); if (appender == null) { logger.warn("Cannot add a new logger appender. Name: {}, Properties: {}", name, properties); } else { LogManager.getRootLogger().addAppender(appender); return true; } } catch (Exception ex) { logger.warn("Cannot add a new logger appender. Name: {}, Properties: {}", name, properties, ex); } } return false; }</code><technical_language>MDC properties for appenders, including statically defined appenders</technical_language>

Target:
public static boolean addAppender(String name, Properties properties) { if (getAppendersNames().contains(name)) { logger.warn("A logger appender with the name '{}' exists. Cannot add a new logger appender with the same name", name); } else { try { Method method = PropertyConfigurator.class.getDeclaredMethod("parseAppender", Properties.class, String.class); method.setAccessible(true); Appender appender = (Appender)method.invoke(new PropertyConfigurator(), properties, name); if (appender == null) { logger.warn("Cannot add a new logger appender. Name: {}, Properties: {}", name, properties); } else { LogManager.getRootLogger().addAppender(appender); return true; } } catch (Exception ex) { logger.warn("Cannot add a new logger appender. Name: {}, Properties: {}", name, properties, ex); } } return false; }
Source:
<code>public <T extends Number> Converter<Number, T> getConverter(Class<T> targetType) { NumberToNumber converter = cache.get(targetType); <START> if (converter == null) { <END> converter = new NumberToNumber<>(targetType); cache.put(targetType, converter); } return converter; }</code><technical_language>Map::computeIfAbsent instead</technical_language>

Target:
public <T extends Number> Converter<Number, T> getConverter(Class<T> targetType) { return (NumberToNumber) CACHE.computeIfAbsent(targetType.getName(), t-> new NumberToNumber(targetType)); }
Source:
<code>public HttpConfig(URIish uri) { StoredConfig userConfig = GlobalConfigCache.getInstance() .getUserConfig(); try { <START> userConfig.load(); <END> } catch (IOException | ConfigInvalidException e) { LOG.error(MessageFormat.format(JGitText.get().userConfigFileInvalid, userConfig, e)); init(new Config(), uri); return; } init(userConfig, uri); }</code><technical_language>load() needed anymore, need catch RuntimeException</technical_language>

Target:
public HttpConfig(URIish uri) { StoredConfig userConfig = null; try { userConfig = GlobalConfigCache.getInstance().getUserConfig(); } catch (IOException | ConfigInvalidException e) { LOG.error(MessageFormat.format(JGitText.get().userConfigFileInvalid, userConfig, e)); init(new Config(), uri); return; } init(userConfig, uri); }
Source:
<code><START> byte[] getData() { <END> return this.data.get(); }</code><technical_language>Is a reason this is package protected private</technical_language>

Target:
private byte[] getData() { return this.data.get(); }
Source:
<code>public void addCatalogVersion(final String catalogResource) throws Exception { final StandaloneCatalog inputCatalogVersion = XMLLoader.getObjectFromString(Resources.getResource(catalogResource).toExternalForm(), StandaloneCatalog.class); final StandaloneCatalogWithPriceOverride inputCatalogVersionWithOverride = new StandaloneCatalogWithPriceOverride(inputCatalogVersion, priceOverride, internalTenantContext.getTenantRecordId(), internalCallContextFactory); if (versionedCatalog == null) { <START> versionedCatalog = new DefaultVersionedCatalog(new ArrayList<>()); <END> } versionedCatalog.add(inputCatalogVersionWithOverride); }</code><technical_language>no-arg constructor instead</technical_language>

Target:
public void addCatalogVersion(final String catalogResource) throws Exception { final StandaloneCatalog inputCatalogVersion = XMLLoader.getObjectFromString(Resources.getResource(catalogResource).toExternalForm(), StandaloneCatalog.class); final StandaloneCatalogWithPriceOverride inputCatalogVersionWithOverride = new StandaloneCatalogWithPriceOverride(inputCatalogVersion, priceOverride, internalTenantContext.getTenantRecordId(), internalCallContextFactory); if (versionedCatalog == null) { versionedCatalog = new DefaultVersionedCatalog(); } versionedCatalog.add(inputCatalogVersionWithOverride); }
Source:
<code>public Queue<Object> tempInboundMessages() { if (tempInboundMessages == null) { <START> tempInboundMessages = new ConcurrentLinkedQueue<Object>(); <END> } return tempInboundMessages; }</code><technical_language>EmbeddedChannel is expected multiple threads</technical_language>

Target:
private Queue<AbstractMap.SimpleEntry<Object, ChannelPromise>> tempInboundMessages() { if (tempInboundMessages == null) { tempInboundMessages = new ArrayDeque<AbstractMap.SimpleEntry<Object, ChannelPromise>>(); } return tempInboundMessages; }
Source:
<code>public BuildCommand updateTo(String baseDir, RevisionContext revisionContext) { String workingDir = material.workingdir(new File(baseDir)).getPath(); String revision = revisionContext.getLatestRevision().getRevision(); String clientName = material.clientName(new File(workingDir)); return compose( secret(material.getPassword()), export("P4PORT", material.getServerAndPort(), false), export("P4USER", material.getUserName(), false), export("P4PASSWD", material.getPassword(), true), <START> export("P4CLIENT", clientName, false), <END> constructClient(workingDir, clientName), cleanWorkingDir(workingDir), echo(format("[%s] Start updating %s at revision %s from %s", GoConstants.PRODUCT_NAME, material.updatingTarget(), revision, material.getServerAndPort())), sync(workingDir, revision), echo(format("[%s] Done.\n", GoConstants.PRODUCT_NAME)) ); }</code><technical_language>of export (four lines) problematic. this is environment variables user, in process. need is for exec in constructClient accept environment variables, uses, echo export for user-defined tasks. @ibnc - Do sense</technical_language>

Target:
public BuildCommand updateTo(String baseDir, RevisionContext revisionContext) { String workingDir = material.workingdir(new File(baseDir)).getPath(); String revision = revisionContext.getLatestRevision().getRevision(); this.clientName = material.clientName(new File(workingDir)); return compose( secret(material.getPassword()), loginIfUsingTickets(), constructClient(workingDir, clientName), cleanWorkingDir(workingDir), echo(format("[%s] Start updating %s at revision %s from %s", GoConstants.PRODUCT_NAME, material.updatingTarget(), revision, material.getServerAndPort())), sync(workingDir, revision), echo(format("[%s] Done.\n", GoConstants.PRODUCT_NAME)) ); }
Source:
<code>private boolean handleDefinedMappings() { boolean errorOccurred = false; Set<String> handledTargets = new HashSet<String>(); if ( method.getMappingOptions().hasNestedTargetReferences() ) { <START> if ( handleDefinedNestedTargetMapping( handledTargets ) ) { <END> errorOccurred = true; } } for ( Map.Entry<String, List<Mapping>> entry : methodMappings.entrySet() ) { for ( Mapping mapping : entry.getValue() ) { TargetReference targetReference = mapping.getTargetReference(); if ( targetReference.isValid() ) { if ( !handledTargets.contains( first( targetReference.getPropertyEntries() ).getFullName() ) ) { if ( handleDefinedMapping( mapping, handledTargets ) ) { errorOccurred = true; } } } else { errorOccurred = true; } } } for ( String handledTarget : handledTargets ) { unprocessedTargetProperties.remove( handledTarget ); unprocessedDefinedTargets.remove( handledTarget ); } return errorOccurred; }</code><technical_language>errorOccured = handleDefinedNestedTargetMapping( handledTargets )</technical_language>

Target:
private boolean handleDefinedMappings() { boolean errorOccurred = false; Set<String> handledTargets = new HashSet<String>(); if ( method.getMappingOptions().hasNestedTargetReferences() ) { errorOccurred = handleDefinedNestedTargetMapping( handledTargets ); } for ( Map.Entry<String, List<Mapping>> entry : methodMappings.entrySet() ) { for ( Mapping mapping : entry.getValue() ) { TargetReference targetReference = mapping.getTargetReference(); if ( targetReference.isValid() ) { if ( !handledTargets.contains( first( targetReference.getPropertyEntries() ).getFullName() ) ) { if ( handleDefinedMapping( mapping, handledTargets ) ) { errorOccurred = true; } } } else { errorOccurred = true; } } } for ( String handledTarget : handledTargets ) { unprocessedTargetProperties.remove( handledTarget ); unprocessedDefinedTargets.remove( handledTarget ); } return errorOccurred; }
Source:
<code>public final <START> <M, T> Binding <END> bindList( IObservableList<T> targetObservableList, IObservableList<M> modelObservableList, UpdateListStrategy<? super T, ? extends M> targetToModel, UpdateListStrategy<? super M, ? extends T> modelToTarget) { UpdateListStrategy<? super T, ? extends M> targetToModelStrategy = targetToModel != null ? targetToModel : createTargetToModelUpdateListStrategy(targetObservableList, modelObservableList); UpdateListStrategy<? super M, ? extends T> modelToTargetStrategy = modelToTarget != null ? modelToTarget : createModelToTargetUpdateListStrategy(modelObservableList, targetObservableList); targetToModelStrategy.fillDefaults(targetObservableList, modelObservableList); modelToTargetStrategy.fillDefaults(modelObservableList, targetObservableList); ListBinding<M, T> result = new ListBinding<>(targetObservableList, modelObservableList, targetToModelStrategy, modelToTargetStrategy); result.init(this); return result; }</code><technical_language>I prefer bindXXX methods' type parameters in order</technical_language>

Target:
public final <T, M> Binding bindList( IObservableList<T> targetObservableList, IObservableList<M> modelObservableList, UpdateListStrategy<? super T, ? extends M> targetToModel, UpdateListStrategy<? super M, ? extends T> modelToTarget) { UpdateListStrategy<? super T, ? extends M> targetToModelStrategy = targetToModel != null ? targetToModel : createTargetToModelUpdateListStrategy(targetObservableList, modelObservableList); UpdateListStrategy<? super M, ? extends T> modelToTargetStrategy = modelToTarget != null ? modelToTarget : createModelToTargetUpdateListStrategy(modelObservableList, targetObservableList); targetToModelStrategy.fillDefaults(targetObservableList, modelObservableList); modelToTargetStrategy.fillDefaults(modelObservableList, targetObservableList); ListBinding<M, T> result = new ListBinding<>(targetObservableList, modelObservableList, targetToModelStrategy, modelToTargetStrategy); result.init(this); return result; }
Source:
<code>protected List<String> getStablePartitionList(ResourceControllerDataProvider clusterData, IdealState currentIdealState) { List<String> partitions = clusterData.getStablePartitionList(currentIdealState.getResourceName()); Set<String> currentPartitionSet = currentIdealState.getPartitionSet(); <START> if (partitions.size() != currentPartitionSet.size() || !currentPartitionSet .containsAll(partitions)) { <END> LOG.warn("The current partition set has been modified and it is different from the cached " + "stable list {}. Use the current partition set.", currentPartitionSet.toString(), partitions.toString()); partitions = new ArrayList<>(currentPartitionSet); } return partitions; }</code><technical_language>if other do this. containsAll() a big performance issue before, specially if compare a set a list (which O(N) iterator)</technical_language>

Target:
protected List<String> getStablePartitionList(ResourceControllerDataProvider clusterData, IdealState currentIdealState) { List<String> partitions = clusterData.getStablePartitionList(currentIdealState.getResourceName()); if (partitions == null) { Set<String> currentPartitionSet = currentIdealState.getPartitionSet(); LOG.warn("The current partition set has not been cached in the stable partition list. " + "Use the IdealState partition set directly.", currentPartitionSet.toString()); partitions = new ArrayList<>(currentPartitionSet); } return partitions; }
Source:
<code>RtRelease(final Request req, final Coordinates coords, final int nmbr) { this.release = nmbr; <START> this.request = initRequest(req, coords) <END> .back(); }</code><technical_language>introduce a new variable this.request, done in other classes (for example RtIssue)</technical_language>

Target:
RtRelease(final Request req, final Coordinates coords, final int nmbr) { this.release = nmbr; this.request = req.uri() .path("/repos") .path(coords.user()) .path(coords.repo()) .path("/releases") .path(String.valueOf(this.release)) .back(); this.requestURI = this.request.uri(); }
Source:
<code>public ClusterLevel makeClusterLevel(String version) { ClusterLevel level = new ClusterLevel(); level.setId(version); if (!isFiltered()) { CpuTypes cpuTypes = new CpuTypes(); for (ServerCpu serverCpu : getServerCpuList(version)) { CpuType cpuType = new CpuType(); cpuType.setName(serverCpu.getCpuName()); cpuType.setLevel(serverCpu.getLevel()); cpuType.setArchitecture(CPUMapper.map(serverCpu.getArchitecture(), null)); cpuTypes.getCpuTypes().add(cpuType); } level.setCpuTypes(cpuTypes); } Permits permits = new Permits(); for (ActionGroup actionGroup : getActionGroups()) { Permit permit = PermitMapper.map(actionGroup, null); permits.getPermits().add(permit); } level.setPermits(permits); <START> ClusterFeatures features = new ClusterFeatures(); for (AdditionalFeature clusterFeature : getAdditionalFeatureList(version)) { org.ovirt.engine.api.model.ClusterFeature feature = ClusterFeaturesMapper.map(clusterFeature, null); features.getClusterFeatures().add(feature); } <END> level.setClusterFeatures(features); return LinkHelper.addLinks(level); }</code><technical_language>in functional way</technical_language>

Target:
public ClusterLevel makeClusterLevel(String version) { ClusterLevel level = new ClusterLevel(); level.setId(version); if (!isFiltered()) { CpuTypes cpuTypes = new CpuTypes(); for (ServerCpu serverCpu : getServerCpuList(version)) { CpuType cpuType = new CpuType(); cpuType.setName(serverCpu.getCpuName()); cpuType.setLevel(serverCpu.getLevel()); cpuType.setArchitecture(CPUMapper.map(serverCpu.getArchitecture(), null)); cpuTypes.getCpuTypes().add(cpuType); } level.setCpuTypes(cpuTypes); } Permits permits = new Permits(); for (ActionGroup actionGroup : getActionGroups()) { Permit permit = PermitMapper.map(actionGroup, null); permits.getPermits().add(permit); } level.setPermits(permits); ClusterFeatures features = new ClusterFeatures(); getAdditionalFeatureList(version).forEach(clusterFeature -> { org.ovirt.engine.api.model.ClusterFeature feature = ClusterFeaturesMapper.map(clusterFeature, null); features.getClusterFeatures().add(feature); }); level.setClusterFeatures(features); return LinkHelper.addLinks(level); }
Source:
<code><START> private void updateHostInFenceFlow(Guid hostId, boolean isInFenceFlow) { <END> VdsDynamic vdsDynamic = vdsDynamicDao.get(hostId); vdsDynamic.setInFenceFlow(isInFenceFlow); vdsDynamicDao.update(vdsDynamic); }</code><technical_language>This is NonTransactiveCommand, execute this method in executeInNewTransaction() block</technical_language>

Target:
private void updateHostInFenceFlow(Guid hostId, boolean isInFenceFlow) { TransactionSupport.executeInNewTransaction(() -> { VdsDynamic vdsDynamic = vdsDynamicDao.get(hostId); vdsDynamic.setInFenceFlow(isInFenceFlow); vdsDynamicDao.update(vdsDynamic); return null; }); }
Source:
<code>private static ModelNode executeOverHttp(URI mgmtURI, String operation) throws IOException { CloseableHttpClient httpClient = getHttpClient(mgmtURI); HttpEntity operationEntity = new StringEntity(operation, ContentType.APPLICATION_JSON); HttpPost httpPost = new HttpPost(mgmtURI); httpPost.setEntity(operationEntity); HttpResponse response; ModelNode responseNode; try{ response = httpClient.execute(httpPost); int statusCode = response.getStatusLine().getStatusCode(); if (statusCode != 200) { return null; } HttpEntity entity = response.getEntity(); if (entity == null) { return null; } responseNode = ModelNode.fromJSONStream(response.getEntity().getContent()); EntityUtils.consume(entity); } catch (IOException ex) { ex.printStackTrace(); <START> return null; <END> } finally { httpClient.close(); } return responseNode; }</code><technical_language>Why</technical_language>

Target:
private static ModelNode executeOverHttp(URI mgmtURI, String operation) throws IOException { CloseableHttpClient httpClient = createHttpClient(mgmtURI); HttpEntity operationEntity = new StringEntity(operation, ContentType.APPLICATION_JSON); HttpPost httpPost = new HttpPost(mgmtURI); httpPost.setEntity(operationEntity); HttpResponse response; ModelNode responseNode; try { response = httpClient.execute(httpPost); int statusCode = response.getStatusLine().getStatusCode(); if (statusCode != 200) { return null; } HttpEntity entity = response.getEntity(); if (entity == null) { return null; } responseNode = ModelNode.fromJSONStream(response.getEntity().getContent()); EntityUtils.consume(entity); } finally { httpClient.close(); } return responseNode; }
Source:
<code>public void setDynamicMethodInvocation(String dmiValue) { if (!BooleanUtils.toBoolean(dmiValue)) { <START> if (LOG.isDebugEnabled()) { <END> LOG.debug("DMI is disabled, adding DMI related excluded patterns"); } setAdditionalExcludePatterns("^(action|method):.*"); } else if (LOG.isWarnEnabled()) { LOG.warn("DMI is enabled, *NOT* adding DMI related excluded patterns"); } }</code><technical_language>Please revise if (LOG... statements in this PR [this answer](<LINK_0></technical_language>

Target:
protected void setDynamicMethodInvocation(String dmiValue) { if (BooleanUtils.toBoolean(dmiValue) == false) { LOG.debug("DMI is disabled, adding DMI related excluded patterns"); setAdditionalExcludePatterns("^(action|method):.*"); } else { LOG.warn("DMI is enabled, *NOT* adding DMI related excluded patterns"); } }
Source:
<code>public HttpClient get() { final DruidHttpClientConfig config = getConfigProvider().get().get(); final HttpClientConfig.Builder builder = HttpClientConfig .builder() .withNumConnections(config.getNumConnections()) .withReadTimeout(config.getReadTimeout()) .withWorkerCount(config.getNumMaxThreads()) .withCompressionCodec( HttpClientConfig.CompressionCodec.valueOf(StringUtils.toUpperCase(config.getCompressionCodec())) ); if (getSslContextBinding() != null) { builder.withSslContext(getSslContextBinding().getProvider().get()); } <START> return HttpClientInit.createClient( <END> builder.build(), LifecycleUtils.asMmxLifecycle(getLifecycleProvider().get()) ); }</code><technical_language>do httpClient is wrapped internal authenticator</technical_language>

Target:
public HttpClient get() { final DruidHttpClientConfig config = getConfigProvider().get().get(); final HttpClientConfig.Builder builder = HttpClientConfig .builder() .withNumConnections(config.getNumConnections()) .withReadTimeout(config.getReadTimeout()) .withWorkerCount(config.getNumMaxThreads()) .withCompressionCodec( HttpClientConfig.CompressionCodec.valueOf(StringUtils.toUpperCase(config.getCompressionCodec())) ); if (getSslContextBinding() != null) { builder.withSslContext(getSslContextBinding().getProvider().get()); } HttpClient client = HttpClientInit.createClient( builder.build(), LifecycleUtils.asMmxLifecycle(getLifecycleProvider().get()) ); if (isEscalated) { return escalatingAuthenticator.createEscalatedClient(client); } else { return client; } }
Source:
<code>public void get(String url) throws WebDriverException { if (!url.equals(GitHubURL.LOGIN_PAGE)) { <START> UI.events.triggerEvent(new NavigateToPageEvent(url)); <END> } if (isTestChromeDriver) { logger.info("Test loading page: " + url); testGet(); } else { if (driver.getCurrentUrl().equalsIgnoreCase(url)) { logger.info("Already on page: " + url + " will not load it again. "); } else { logger.info("Previous page was: " + driver.getCurrentUrl()); logger.info("Loading page: " + url); driver.get(url); } } }</code><technical_language>this do of test mode</technical_language>

Target:
public void get(String url) throws WebDriverException { if (isTestChromeDriver) { if (!url.equalsIgnoreCase(GitHubURL.LOGIN_PAGE)) { UI.events.triggerEvent(new NavigateToPageEvent(url)); } logger.info("Test loading page: " + url); testGet(); } else { if (driver.getCurrentUrl().equalsIgnoreCase(url)) { logger.info("Already on page: " + url + " will not load it again. "); } else { logger.info("Previous page was: " + driver.getCurrentUrl()); logger.info("Loading page: " + url); driver.get(url); } } }
Source:
<code>public String toString() { StringBuilder sb = new StringBuilder(); sb.append("RassXmlAgencyEntry [number:").append(number); sb.append(", fullName:").append(fullName); sb.append(", typeCode:").append(typeCode); sb.append(", reportsToAgencyNumber:").append(reportsToAgencyNumber); sb.append(", commonName:").append(commonName); sb.append(", agencyOrigin:").append(agencyOrigin); sb.append(KFSConstants.SQUARE_BRACKET_RIGHT); <START> return sb.toString(); <END> }</code><technical_language>If want, ToStringBuilder simplify construction of more complex toString() overrides</technical_language>

Target:
public String toString() { return ToStringBuilder.reflectionToString(this); }
Source:
<code><START> Future<List<?>> singleScan() { <END> assert deploymentOperationsFactory != null : "deploymentOperationsFactory is null"; return scheduledExecutor.submit(new ManualScanCallable()); }</code><technical_language>return List<ScannerTask></technical_language>

Target:
void singleScan() { assert deploymentOperationsFactory != null : "deploymentOperationsFactory is null"; ManualScanCallable manualScan = new ManualScanCallable(); scheduledExecutor.submit(manualScan); }
Source:
<code>private List<HtmlContext> performAttack(HttpMessage sourceMsg, String param, String attack, HttpMessage sinkMsg, HtmlContext targetContext, int ignoreFlags, boolean findDecoded) { if (isStop()) { return null; } HttpMessage sourceMsg2 = sourceMsg.cloneRequest(); setParameter(sourceMsg2, param, attack); try { sendAndReceive(sourceMsg2); } catch (Exception e) { log.error(e.getMessage(), e); } if (isStop()) { return null; } HttpMessage sinkMsg2 = sinkMsg.cloneRequest(); try { sendAndReceive(sinkMsg2); } catch (Exception e) { log.error(e.getMessage(), e); } if (isStop()) { return null; } <START> HtmlContextAnalyser hca = new HtmlContextAnalyser(sourceMsg2); <END> if (Plugin.AlertThreshold.HIGH.equals(this.getAlertThreshold())) { return hca.getHtmlContexts(findDecoded ? getURLDecode(attack) : attack, targetContext, ignoreFlags); } return hca.getHtmlContexts(findDecoded ? getURLDecode(attack) : attack); }</code><technical_language>this change purpose</technical_language>

Target:
private List<HtmlContext> performAttack(HttpMessage sourceMsg, String param, String attack, HttpMessage sinkMsg, HtmlContext targetContext, int ignoreFlags, boolean findDecoded) { if (isStop()) { return null; } HttpMessage sourceMsg2 = sourceMsg.cloneRequest(); setParameter(sourceMsg2, param, attack); try { sendAndReceive(sourceMsg2); } catch (Exception e) { log.error(e.getMessage(), e); } if (isStop()) { return null; } HttpMessage sinkMsg2 = sinkMsg.cloneRequest(); try { sendAndReceive(sinkMsg2); } catch (Exception e) { log.error(e.getMessage(), e); } if (isStop()) { return null; } HtmlContextAnalyser hca = new HtmlContextAnalyser(sinkMsg2); if (Plugin.AlertThreshold.HIGH.equals(this.getAlertThreshold())) { return hca.getHtmlContexts(findDecoded ? getURLDecode(attack) : attack, targetContext, ignoreFlags); } return hca.getHtmlContexts(findDecoded ? getURLDecode(attack) : attack); }
Source:
<code>public void notFoundDecodesToEmpty() throws Exception { Response response = Response.builder() .status(404) .reason("NOT FOUND") .headers(Collections.<String, Collection<String>>emptyMap()) <START> .body((byte[]) null) <END> .build(); assertThat((byte[]) new JacksonDecoder().decode(response, byte[].class)).isEmpty(); }</code><technical_language>I null is default</technical_language>

Target:
public void notFoundDecodesToEmpty() throws Exception { Response response = Response.builder() .status(404) .reason("NOT FOUND") .headers(Collections.<String, Collection<String>>emptyMap()) .build(); assertThat((byte[]) new JacksonDecoder().decode(response, byte[].class)).isEmpty(); }
Source:
<code><START> public String getHeader() throws IOException { <END> TokenCache tokenCache = getCachedHeader(); CacheState state = (tokenCache == null) ? CacheState.Expired : tokenCache.getCacheState(); if (state == CacheState.Expired) { synchronized (isRefreshing) { if (!isRefreshing.get()) { isRefreshing.set(true); doRefresh(); } else { while (isRefreshing.get()) { try { isRefreshing.wait(250); } catch (InterruptedException e) { throw new IOException(e); } } } } tokenCache = getCachedHeader(); } else if (state == CacheState.Stale) { asyncRefresh(); } return tokenCache.header; }</code><technical_language>private? getCachedHeader other methods</technical_language>

Target:
private String getHeader() throws IOException { HeaderCacheElement headerCache = getCachedHeader(); CacheState state = (headerCache == null) ? CacheState.Expired : headerCache.getCacheState(); if (state == CacheState.Expired) { syncRefresh(); headerCache = getCachedHeader(); } else if (state == CacheState.Stale) { asyncRefresh(); } return headerCache.header; }
Source:
<code>private void disconnect() { <START> influxDB = null; <END> }</code><technical_language>i find a disconnect method for influxdb confirm is method disconnect</technical_language>

Target:
private void disconnect() { influxDB = null; connected = false; }
Source:
<code>public void execute() throws MojoFailureException, MojoExecutionException { try { verifyMuleIsStarted(); deployApplications(); waitForDeployments(); } catch (MuleControllerException e) { throw new MojoFailureException("Error deploying application: [" + application + "]: " + e.getMessage()); } catch (RuntimeException e) { <START> throw new MojoExecutionException("Unexpected error deploying application: [" + application <END> + "]", e); } }</code><technical_language>please replase MojoExecutionException for a new generic DeploymentExecutionException</technical_language>

Target:
public void execute() throws DeploymentException { try { verifyMuleIsStarted(); deployApplications(); waitForDeployments(); } catch (MuleControllerException e) { throw new DeploymentException("Error deploying application: [" + application + "]: " + e.getMessage()); } catch (RuntimeException e) { throw new DeploymentException("Unexpected error deploying application: [" + application + "]", e); } }
Source:
<code>private void compareWith(OpenEvent event) { IStructuredSelection selection = (IStructuredSelection) event .getSelection(); if (selection.isEmpty() || !(selection.getFirstElement() instanceof StagingEntry)) return; StagingEntry stagingEntry = (StagingEntry) selection.getFirstElement(); <START> askToOpenProject(stagingEntry); <END> if (stagingEntry.isSubmodule()) return; switch (stagingEntry.getState()) { case ADDED: case CHANGED: case REMOVED: runCommand(ActionCommands.COMPARE_INDEX_WITH_HEAD_ACTION, selection); break; case CONFLICTING: runCommand(ActionCommands.MERGE_TOOL_ACTION, selection); break; case MISSING: case MISSING_AND_CHANGED: case MODIFIED: case MODIFIED_AND_CHANGED: case MODIFIED_AND_ADDED: case UNTRACKED: default: if (Activator.getDefault().getPreferenceStore().getBoolean( UIPreferences.STAGING_VIEW_COMPARE_MODE)) { runCommand(ActionCommands.COMPARE_WITH_INDEX_ACTION, selection); } else { openSelectionInEditor(selection); } } }</code><technical_language>ask if? sense ask user if open comparison anyway</technical_language>

Target:
private void compareWith(OpenEvent event) { IStructuredSelection selection = (IStructuredSelection) event .getSelection(); if (selection.isEmpty() || !(selection.getFirstElement() instanceof StagingEntry)) return; StagingEntry stagingEntry = (StagingEntry) selection.getFirstElement(); if (stagingEntry.isSubmodule()) return; askToOpenProject(stagingEntry); switch (stagingEntry.getState()) { case ADDED: case CHANGED: case REMOVED: runCommand(ActionCommands.COMPARE_INDEX_WITH_HEAD_ACTION, selection); break; case CONFLICTING: runCommand(ActionCommands.MERGE_TOOL_ACTION, selection); break; case MISSING: case MISSING_AND_CHANGED: case MODIFIED: case MODIFIED_AND_CHANGED: case MODIFIED_AND_ADDED: case UNTRACKED: default: if (Activator.getDefault().getPreferenceStore().getBoolean( UIPreferences.STAGING_VIEW_COMPARE_MODE)) { runCommand(ActionCommands.COMPARE_WITH_INDEX_ACTION, selection); } else { openSelectionInEditor(selection); } } }
Source:
<code>private static String stripTypeParameters(String type) { <START> int typeParamStart = type.indexOf("<"); <END> if (typeParamStart != -1) { return type.substring(0, typeParamStart); } else { return type; } }</code><technical_language>'<' for character-based searching</technical_language>

Target:
private static String stripTypeParameters(String type) { int typeParamStart = type.indexOf('<'); if (typeParamStart != -1) { return type.substring(0, typeParamStart); } else { return type; } }
Source:
<code>public void onBindViewHolder(CategoryListItemVH holder, final int position) { if (items.get(position).header != null) { holder.headline.setText(items.get(position).header); } <START> final CategoryListItem item = items.get(position); <END> holder.title.setText(item.text); holder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { onItemClickListener.onItemClick(item); } }); }</code><technical_language>move this up, in if well</technical_language>

Target:
public void onBindViewHolder(CategoryListItemVH holder, final int position) { final CategoryListItem item = items.get(position); if (holder.getItemViewType() == R.layout.vh_category_list_item_with_headline) { holder.headline.setText(items.get(position).header); } holder.title.setText(item.text); holder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { onItemClickListener.onItemClick(item); } }); }
Source:
<code>public void Tinyint() { QNumberTest numberTest = QNumberTest.numberTest; delete(numberTest).execute(); insert(numberTest).set(numberTest.col1Boolean, true).execute(); <START> insert(numberTest).set(numberTest.col1Number, 1).execute(); <END> assertEquals(2, query().from(numberTest).list(numberTest.col1Boolean).size()); assertEquals(2, query().from(numberTest).list(numberTest.col1Number).size()); }</code><technical_language>notice, int argument a byte. a cast is needed</technical_language>

Target:
public void Tinyint() { QNumberTest numberTest = QNumberTest.numberTest; delete(numberTest).execute(); insert(numberTest).set(numberTest.col1Boolean, true).execute(); insert(numberTest).set(numberTest.col1Number, (byte)1).execute(); assertEquals(2, query().from(numberTest).list(numberTest.col1Boolean).size()); assertEquals(2, query().from(numberTest).list(numberTest.col1Number).size()); }
Source:
<code>public void add(Block block, int position) { requireNonNull(block, "block must not be null"); checkArgument(position >= 0, "position must be >= 0"); if (block.isNull(position)) { <START> if (!containsNullElement) { <END> containsNullElement = true; } } int hashPosition = getHashPositionOfElement(block, position); if (blockPositionByHash.get(hashPosition) == EMPTY_SLOT) { addNewElement(hashPosition, block, position); } }</code><technical_language>This if-statement redundant -- set containsNullElement true</technical_language>

Target:
public void add(Block block, int position) { requireNonNull(block, "block must not be null"); checkArgument(position >= 0, "position must be >= 0"); if (block.isNull(position)) { containsNullElement = true; } int hashPosition = getHashPositionOfElement(block, position); if (blockPositionByHash.get(hashPosition) == EMPTY_SLOT) { addNewElement(hashPosition, block, position); } }
Source:
<code>public void setValue(boolean newValue) { if (this.value == newValue) { return; } this.value = newValue; EdgeType edgeType = newValue ? EdgeType.RisingEdge : EdgeType.FallingEdge; boolean alertWatchers; <START> switch (latchType) { <END> case RisingEdge: alertWatchers = newValue; break; case FallingEdge: alertWatchers = !newValue; break; case Both: alertWatchers = true; break; default: alertWatchers = false; break; } if (alertWatchers) { setChanged(); notifyObservers(edgeType); } }</code><technical_language>Instead of this switch statement, alert if latchType.equals(LatchType.Both) || latchType.equals(edgeType)? 100% I logicked good currently 4:00 in morning</technical_language>

Target:
public void setValue(boolean newValue) { if (this.value == newValue) { return; } EdgeType edgeType = newValue ? EdgeType.RisingEdge : EdgeType.FallingEdge; if (latchType == edgeType || latchType == EdgeType.Both) { setChanged(); notifyObservers(edgeType); } this.value = newValue; }
Source:
<code>public void start() throws IOException { if ( config.get( BloomFulltextConfig.bloom_enabled ) ) { String analyzer = config.get( BloomFulltextConfig.bloom_default_analyzer ); Log log = logService.getInternalLog( FulltextProviderImpl.class ); provider = new FulltextProviderImpl( db, log, availabilityGuard, scheduler, transactionIdStore.get(), fileSystem, storeDir, analyzer ); provider.openIndex( BLOOM_NODES, NODES ); provider.openIndex( BLOOM_RELATIONSHIPS, RELATIONSHIPS ); provider.registerTransactionEventHandler(); <START> provider.registerFileListing(fileListing); <END> procedures.registerComponent( FulltextProvider.class, context -> provider, true ); } else { procedures.registerComponent( FulltextProvider.class, context -> FulltextProvider.NULL_PROVIDER, true ); } }</code><technical_language>I unwrap fileListing this level, do transactionIdStore, rest of code need worry suppliers</technical_language>

Target:
public void start() throws IOException { if ( config.get( BloomFulltextConfig.bloom_enabled ) ) { String analyzer = config.get( BloomFulltextConfig.bloom_default_analyzer ); Log log = logService.getInternalLog( FulltextProviderImpl.class ); provider = new FulltextProviderImpl( db, log, availabilityGuard, scheduler, transactionIdStore.get(), fileSystem, storeDir, analyzer ); provider.openIndex( BLOOM_NODES, NODES ); provider.openIndex( BLOOM_RELATIONSHIPS, RELATIONSHIPS ); provider.registerTransactionEventHandler(); provider.registerFileListing( fileListing.get() ); procedures.registerComponent( FulltextProvider.class, context -> provider, true ); } else { procedures.registerComponent( FulltextProvider.class, context -> FulltextProvider.NULL_PROVIDER, true ); } }