auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public ClusterBasedJobCoordinator(Config coordinatorSystemConfig) { <START> this.metrics = new MetricsRegistryMap(); <END> jobModelManager = buildJobModelManager(coordinatorSystemConfig, this.metrics); config = jobModelManager.jobModel().getConfig(); hasDurableStores = new StorageConfig(config).hasDurableStores(); state = new SamzaApplicationState(jobModelManager); this.partitionMonitor = getPartitionCountMonitor(config); clusterManagerConfig = new ClusterManagerConfig(config); isJmxEnabled = clusterManagerConfig.getJmxEnabled(); jobCoordinatorSleepInterval = clusterManagerConfig.getJobCoordinatorSleepInterval(); containerProcessManager = new ContainerProcessManager(config, state, this.metrics); }</code><technical_language>minor: this. convention for fields. (or it) consistently for fields</technical_language>

Target:
public ClusterBasedJobCoordinator(Config coordinatorSystemConfig) { metrics = new MetricsRegistryMap(); jobModelManager = buildJobModelManager(coordinatorSystemConfig, metrics); config = jobModelManager.jobModel().getConfig(); hasDurableStores = new StorageConfig(config).hasDurableStores(); state = new SamzaApplicationState(jobModelManager); partitionMonitor = getPartitionCountMonitor(config); clusterManagerConfig = new ClusterManagerConfig(config); isJmxEnabled = clusterManagerConfig.getJmxEnabled(); jobCoordinatorSleepInterval = clusterManagerConfig.getJobCoordinatorSleepInterval(); containerProcessManager = new ContainerProcessManager(config, state, metrics); }
Source:
<code>public List<PermissionSubject> getPermissionCheckSubjects() { List<PermissionSubject> permissionList = <START> super.getPermissionCheckSubjects(); <END> permissionList.add(new PermissionSubject(getParameters().getSourceDomainId(), VdcObjectType.Storage, getActionType().getActionGroup())); if (getClusterId() != null) { permissionList.add(new PermissionSubject(getClusterId(), VdcObjectType.Cluster, ActionGroup.CREATE_VM)); } if (getVm() != null && !StringUtils.isEmpty(getVm().getCustomProperties())) { permissionList.add(new PermissionSubject(getClusterId(), VdcObjectType.Cluster, ActionGroup.CHANGE_VM_CUSTOM_PROPERTIES)); } return permissionList; }</code><technical_language>this return permission subject target cluster need modify this method, right</technical_language>

Target:
public List<PermissionSubject> getPermissionCheckSubjects() { List<PermissionSubject> permissionList = super.getPermissionCheckSubjects(); for (Guid storageId : imageToDestinationDomainMap.values()) { permissionList.add(new PermissionSubject(storageId, VdcObjectType.Storage, getActionType().getActionGroup())); } permissionList.add(new PermissionSubject(getParameters().getSourceDomainId(), VdcObjectType.Storage, getActionType().getActionGroup())); if (getVm() != null && !StringUtils.isEmpty(getVm().getCustomProperties())) { permissionList.add(new PermissionSubject(getClusterId(), VdcObjectType.Cluster, ActionGroup.CHANGE_VM_CUSTOM_PROPERTIES)); } return permissionList; }
Source:
<code>public static PropertyPath from(String source, TypeInformation<?> type) { Assert.hasText(source, "Source must not be null or empty!"); Assert.notNull(type, "TypeInformation must not be null or empty!"); List<String> iteratorSource = new ArrayList<>(); Matcher matcher = isQuoted(source) ? SPLITTER_FOR_QUOTED.matcher(source.replace("\\Q", "").replace("\\E", "")) : SPLITTER.matcher("_" + source); while (matcher.find()) { iteratorSource.add(matcher.group(1)); } Iterator<String> parts = iteratorSource.iterator(); PropertyPath result = null; Stack<PropertyPath> current = new Stack<>(); while (parts.hasNext()) { if (result == null) { result = create(parts.next(), type, current); current.push(result); } else { current.push(create(parts.next(), current)); } } if (result == null) { <START> throw new IllegalStateException( <END> String.format("Expected parsing to yield a PropertyPath from %s but got null!", source)); } return result; }</code><technical_language>Assert.state( )</technical_language>

Target:
public static PropertyPath from(String source, TypeInformation<?> type) { Assert.hasText(source, "Source must not be null or empty!"); Assert.notNull(type, "TypeInformation must not be null or empty!"); return CACHE.computeIfAbsent(Key.of(type, source), it -> { List<String> iteratorSource = new ArrayList<>(); Matcher matcher = isQuoted(it.path) ? SPLITTER_FOR_QUOTED.matcher(it.path.replace("\\Q", "").replace("\\E", "")) : SPLITTER.matcher("_" + it.path); while (matcher.find()) { iteratorSource.add(matcher.group(1)); } Iterator<String> parts = iteratorSource.iterator(); PropertyPath result = null; Stack<PropertyPath> current = new Stack<>(); while (parts.hasNext()) { if (result == null) { result = create(parts.next(), it.type, current); current.push(result); } else { current.push(create(parts.next(), current)); } } if (result == null) { throw new IllegalStateException( String.format("Expected parsing to yield a PropertyPath from %s but got null!", source)); } return result; }); }
Source:
<code>public static boolean <START> isInteractive(String <END> strategyId) { if (strategyId == null) { return false; } IExtensionRegistry extRegistry = Platform.getExtensionRegistry(); IConfigurationElement[] extensions = extRegistry.getConfigurationElementsFor(EXTENSION_POINT_ID); if (extensions != null) { for (IConfigurationElement extension : extensions) { if (strategyId.equals(readAttribute(extension, "id"))) { return Boolean.parseBoolean(readAttribute(extension, "interactive")); } } } return false; }</code><technical_language>question for me: is this xml configurable part of interface? I personally prefer interface ask object, some dynamics needs UI not</technical_language>

Target:
public static boolean isInteractive(String strategyId) { if (strategyId == null) { return false; } IExtensionRegistry extRegistry = Platform.getExtensionRegistry(); IConfigurationElement[] extensions = extRegistry.getConfigurationElementsFor(EXTENSION_POINT_ID); if (extensions != null) { for (IConfigurationElement extension : extensions) { if (strategyId.equals(readAttribute(extension, "id"))) { return Boolean.parseBoolean(readAttribute(extension, "interactive")); } } } IDEWorkbenchPlugin.log("No editor strategy found for " + strategyId); return false; }
Source:
<code>public int hashCode() { final int prime = 37; int result = 17; for (int i = 0; i < numElements; i++) { <START> result = result * prime + dvd[i].hashCode(); <END> } return result; }</code><technical_language>need check null reference dvd[i] here</technical_language>

Target:
public int hashCode() { final int prime = 37; int result = 17; for (int i = 0; i < numElements; i++) { if (dvd[i] != null) result = result * prime + dvd[i].hashCode(); } return result; }
Source:
<code>private byte[] receivedClientKeyExchange(final PSKClientKeyExchange message) throws HandshakeException { clientKeyExchange = message; String identity = message.getIdentity(); byte[] psk = pskStore.getKey(getIndicatedServerNames(), identity); String virtualHost = null; if (getIndicatedServerNames() == null) { LOGGER.debug("client uses PSK identity [{}]", getPeerAddress(), identity); } else { <START> ServerName serverName = getIndicatedServerNames().getServerName(NameType.HOST_NAME); <END> if (serverName == null) { LOGGER.debug("client provided invalid SNI extension which doesn't include a hostname", getPeerAddress()); } else { virtualHost = new String(serverName.getName(), ServerName.CHARSET); LOGGER.debug("client uses PSK identity for server [{}]", getPeerAddress(), identity, virtualHost); } } if (psk == null) { throw new HandshakeException( String.format("cannot authenticate client, identity [%s] is unknown for server [%s]", identity, virtualHost), new AlertMessage(AlertLevel.FATAL, AlertDescription.UNKNOWN_PSK_IDENTITY, session.getPeer())); } else { session.setPeerIdentity(new PreSharedKeyIdentity(virtualHost, identity)); return generatePremasterSecretFromPSK(psk); } }</code><technical_language>Multiple getIndicatedServerNames() clearer, if get stored in a local variable</technical_language>

Target:
private byte[] receivedClientKeyExchange(final PSKClientKeyExchange message) throws HandshakeException { clientKeyExchange = message; String identity = message.getIdentity(); byte[] psk = pskStore.getKey(indicatedServerNames, identity); String virtualHost = null; if (indicatedServerNames == null) { LOGGER.debug("client uses PSK identity [{}]", getPeerAddress(), identity); } else { ServerName serverName = indicatedServerNames.getServerName(NameType.HOST_NAME); if (serverName == null) { LOGGER.debug("client provided invalid SNI extension which doesn't include a hostname", getPeerAddress()); } else { virtualHost = new String(serverName.getName(), ServerName.CHARSET); LOGGER.debug("client uses PSK identity for server [{}]", getPeerAddress(), identity, virtualHost); } } if (psk == null) { throw new HandshakeException( String.format("cannot authenticate client, identity [%s] is unknown for server [%s]", identity, virtualHost), new AlertMessage(AlertLevel.FATAL, AlertDescription.UNKNOWN_PSK_IDENTITY, session.getPeer())); } else { session.setPeerIdentity(new PreSharedKeyIdentity(virtualHost, identity)); return generatePremasterSecretFromPSK(psk); } }
Source:
<code>public static void invalidateThumbnail(PublishedInfo layer) { <START> Date d = new Date(new Date().getTime()-1000); <END> if (Metadata.modified(layer) != null && d.before(Metadata.modified(layer))) { return; } Metadata.map(layer).remove(Metadata.THUMBNAIL); }</code><technical_language>System.currentTimeMillis() avoid creating Date objects. Date objects (for Metadata) I guess stuck now. Long preferable</technical_language>

Target:
public static void invalidateThumbnail(PublishedInfo layer) { Metadata.map(layer).remove(Metadata.THUMBNAIL); }
Source:
<code>private CommentDetail allComments() throws OrmException, NoSuchChangeException { ReviewDb db = schemaFactory.open(); <START> final CommentDetail r = new CommentDetail(psa, psb); <END> try { patchSet = db.patchSets().get(patchSetId); if (patchSet == null) { throw new NoSuchChangeException(changeId); } projectKey = change.getProject(); aId = psa != null ? toObjectId(db, psa) : null; bId = toObjectId(db, psb); final String pn = patchKey.get(); for (PatchLineComment p : db.patchComments().published(changeId, pn)) { r.include(p); } if (control.getCurrentUser() instanceof IdentifiedUser) { for (PatchLineComment p : db.patchComments().draft(changeId, pn, ((IdentifiedUser) control.getCurrentUser()).getAccountId())) { r.include(p); } } } finally { db.close(); } return r; }</code><technical_language>Needs in try block. OutOfMemoryError here, exception in constructor, leak connection</technical_language>

Target:
private CommentDetail allComments() throws OrmException, NoSuchChangeException { ReviewDb db = schemaFactory.open(); try { final CommentDetail r = new CommentDetail(psa, psb); patchSet = db.patchSets().get(patchSetId); if (patchSet == null) { throw new NoSuchChangeException(changeId); } projectKey = change.getProject(); aId = psa != null ? toObjectId(db, psa) : null; bId = toObjectId(db, psb); final String pn = patchKey.get(); for (PatchLineComment p : db.patchComments().published(changeId, pn)) { r.include(p); } if (control.getCurrentUser() instanceof IdentifiedUser) { for (PatchLineComment p : db.patchComments().draft(changeId, pn, ((IdentifiedUser) control.getCurrentUser()).getAccountId())) { r.include(p); } } return r; } finally { db.close(); } }
Source:
<code>public void configurePipeline(PipelineConfigurer pipelineConfigurer) { super.configurePipeline(pipelineConfigurer); try { BSONConverter.validateSchema(Schema.parseJson(config.schema)); pipelineConfigurer.getStageConfigurer().setOutputSchema(Schema.parseJson(config.schema)); } catch (IOException e) { <START> throw new IllegalArgumentException("Invalid schema", e); <END> } }</code><technical_language>lets include e.getMessage() consistent other plugins</technical_language>

Target:
public void configurePipeline(PipelineConfigurer pipelineConfigurer) { super.configurePipeline(pipelineConfigurer); try { BSONConverter.validateSchema(Schema.parseJson(config.schema)); pipelineConfigurer.getStageConfigurer().setOutputSchema(Schema.parseJson(config.schema)); } catch (IOException e) { throw new IllegalArgumentException("Invalid output schema : " + e.getMessage(), e); } }
Source:
<code>private void performGeoprocessing(final FeatureCollectionTable featureCollectionTable) { final ListenableFuture<GeoprocessingParameters> parameterFuture = mGeoprocessingTask.createDefaultParametersAsync(); parameterFuture.addDoneListener(new Runnable() { @Override public void run() { try { GeoprocessingParameters parameters = parameterFuture.get(); parameters.setProcessSpatialReference(featureCollectionTable.getSpatialReference()); parameters.setOutputSpatialReference(featureCollectionTable.getSpatialReference()); parameters.getInputs().put("Input_Observation_Point", new GeoprocessingFeatures(featureCollectionTable)); mGeoprocessingJob = mGeoprocessingTask.createJob(parameters); mGeoprocessingJob.start(); mGeoprocessingJob.addJobDoneListener(new Runnable() { @Override public void run() { GeoprocessingResult geoprocessingResult = mGeoprocessingJob.getResult(); GeoprocessingFeatures resultFeatures = (GeoprocessingFeatures) geoprocessingResult.getOutputs() .get("Viewshed_Result"); FeatureSet featureSet = resultFeatures.getFeatures(); for (Feature feature : featureSet) { Graphic graphic = new Graphic(feature.getGeometry()); mResultGraphicsOverlay.getGraphics().add(graphic); } <START> } <END> }); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } } }); }</code><technical_language>need check ensure job returns result: java GeoprocessingResult geoprocessingResult = mGeoprocessingJob.getResult(); if(geoprocessingResult != null){ // get iterate graphic features }else{ Toast.makeText(getApplicationContext(), "Geoprocessing result failed, try again", Toast.LENGTH_SHORT).show(); }</technical_language>

Target:
private void performGeoprocessing(final FeatureCollectionTable featureCollectionTable) { final ListenableFuture<GeoprocessingParameters> parameterFuture = mGeoprocessingTask.createDefaultParametersAsync(); parameterFuture.addDoneListener(new Runnable() { @Override public void run() { try { GeoprocessingParameters parameters = parameterFuture.get(); parameters.setProcessSpatialReference(featureCollectionTable.getSpatialReference()); parameters.setOutputSpatialReference(featureCollectionTable.getSpatialReference()); parameters.getInputs().put("Input_Observation_Point", new GeoprocessingFeatures(featureCollectionTable)); mGeoprocessingJob = mGeoprocessingTask.createJob(parameters); mGeoprocessingJob.start(); mGeoprocessingJob.addJobDoneListener(new Runnable() { @Override public void run() { if (mGeoprocessingJob.getStatus() == Job.Status.SUCCEEDED) { GeoprocessingResult geoprocessingResult = mGeoprocessingJob.getResult(); GeoprocessingFeatures resultFeatures = (GeoprocessingFeatures) geoprocessingResult.getOutputs() .get("Viewshed_Result"); FeatureSet featureSet = resultFeatures.getFeatures(); for (Feature feature : featureSet) { Graphic graphic = new Graphic(feature.getGeometry()); mResultGraphicsOverlay.getGraphics().add(graphic); } } else { Toast.makeText(getApplicationContext(), "Geoprocessing result failed!", Toast.LENGTH_LONG).show(); } } }); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } } }); }
Source:
<code>public void iterationDone( Model model, int iteration) { <START> int currentIteration = iteration + 1; <END> long elapsed = System.currentTimeMillis() - start; long remaining = (iterationCount - currentIteration) * elapsed / currentIteration; long minutes = remaining / ( 1000 * 60 ); Date date = new Date( start + elapsed + remaining ); log.info( "Remaining time : " + minutes + "mn - End expected : " + date.toString() ); }</code><technical_language>This thing. In ParallelWrapper environment, this Listener instance shared multiple workers, of iteration number. need AtomicLong counter increment it, this Listener perfectly compatible PW</technical_language>

Target:
public void iterationDone( Model model, int iteration) { long currentIteration = iterationCounter.incrementAndGet(); long elapsed = System.currentTimeMillis() - start; long remaining = (iterationCount - currentIteration) * elapsed / currentIteration; long minutes = remaining / ( 1000 * 60 ); Date date = new Date( start + elapsed + remaining ); log.info( "Remaining time : " + minutes + "mn - End expected : " + date.toString() ); }
Source:
<code>private void updateDB(Collection<PluginInfo> pluginInfos) { long now = system.now(); try (DbSession dbSession = dbClient.openSession(false)) { Map<String, PluginDto> allPreviousPluginsByKey = dbClient.pluginDao().selectAll(dbSession).stream() .collect(Collectors.toMap(PluginDto::getKee, identity())); for (PluginInfo pluginInfo : pluginInfos) { <START> RemotePlugin remotePlugin = RemotePlugin.create(pluginInfo); <END> String newJarMd5 = remotePlugin.file().getHash(); PluginDto previousDto = allPreviousPluginsByKey.get(pluginInfo.getKey()); if (previousDto == null) { LOG.debug("Register new plugin {}", pluginInfo.getKey()); PluginDto pluginDto = new PluginDto() .setUuid(uuidFactory.create()) .setKee(pluginInfo.getKey()) .setBasePluginKey(pluginInfo.getBasePlugin()) .setJarMd5(newJarMd5) .setCreatedAt(now) .setUpdatedAt(now); dbClient.pluginDao().insert(dbSession, pluginDto); } else if (!previousDto.getJarMd5().equals(newJarMd5)) { LOG.debug("Update plugin {}", pluginInfo.getKey()); previousDto .setBasePluginKey(pluginInfo.getBasePlugin()) .setJarMd5(newJarMd5) .setUpdatedAt(now); dbClient.pluginDao().update(dbSession, previousDto); } } dbSession.commit(); } }</code><technical_language>![MINOR](<LINK_2> 'Severity: MINOR') Remove this of "RemotePlugin"; is deprecated. [![rule](<LINK_1>](<LINK_0> ![MINOR](<LINK_2> 'Severity: MINOR') Remove this of "RemotePlugin"; is deprecated. [![rule](<LINK_1>](<LINK_0></technical_language>

Target:
private void updateDB(Collection<PluginInfo> pluginInfos) { long now = system.now(); try (DbSession dbSession = dbClient.openSession(false)) { Map<String, PluginDto> allPreviousPluginsByKey = dbClient.pluginDao().selectAll(dbSession).stream() .collect(Collectors.toMap(PluginDto::getKee, identity())); for (PluginInfo pluginInfo : pluginInfos) { RemotePlugin remotePlugin = RemotePlugin.create(pluginInfo); String newJarMd5 = remotePlugin.file().getHash(); PluginDto previousDto = allPreviousPluginsByKey.get(pluginInfo.getKey()); if (previousDto == null) { LOG.debug("Register new plugin {}", pluginInfo.getKey()); PluginDto pluginDto = new PluginDto() .setUuid(uuidFactory.create()) .setKee(pluginInfo.getKey()) .setBasePluginKey(pluginInfo.getBasePlugin()) .setHash(newJarMd5) .setCreatedAt(now) .setUpdatedAt(now); dbClient.pluginDao().insert(dbSession, pluginDto); } else if (!previousDto.getHash().equals(newJarMd5)) { LOG.debug("Update plugin {}", pluginInfo.getKey()); previousDto .setBasePluginKey(pluginInfo.getBasePlugin()) .setHash(newJarMd5) .setUpdatedAt(now); dbClient.pluginDao().update(dbSession, previousDto); } } dbSession.commit(); } }
Source:
<code>private Constraint transferBetweenTwoFlights(ConstraintFactory constraintFactory) { return constraintFactory.from(Employee.class) <START> .filter(e -> e.countInvalidConnections() > 0) <END> .penalizeLong("Transfer between two flights", HardSoftLongScore.ofHard(1), Employee::countInvalidConnections); }</code><technical_language>variable name "employee" in cases? (Same for a constraints) lamdba's explicit type written down. (It "e", "Employee e"), for readability (most users start of examples), a full variable name. In general, in optaplanner-core short var names used: int i, Object o, Exception e</technical_language>

Target:
private Constraint transferBetweenTwoFlights(ConstraintFactory constraintFactory) { return constraintFactory.from(Employee.class) .filter(employee -> employee.countInvalidConnections() > 0) .penalizeLong("Transfer between two flights", HardSoftLongScore.ofHard(1), Employee::countInvalidConnections); }
Source:
<code>public Parcelable onSaveInstanceState() { <START> if (!isNavigationViewSavedStateMissing()) { <END> return super.onSaveInstanceState(); } Parcelable superState = super.onSaveInstanceState(); SavedState ss = new SavedState(superState); ss.selectedId = this.checkedId; return ss; }</code><technical_language>I this isNavigationViewSavedStateMissing() 'not'</technical_language>

Target:
public Parcelable onSaveInstanceState() { if (isNavigationViewSavedStateMissing()) { return super.onSaveInstanceState(); } Parcelable superState = super.onSaveInstanceState(); SavedState ss = new SavedState(superState); ss.selectedId = this.checkedId; return ss; }
Source:
<code>public int encodeByte(byte v, byte[] b, int o) { if (v < 0) { throw new IllegalDataException(); } <START> Bytes.putByte(b, o, v); <END> return Bytes.SIZEOF_BYTE; }</code><technical_language>TINYINT type needs signed, Java treats it. I need do sign bit flipping then, negatives sort positives, right</technical_language>

Target:
public int encodeByte(byte v, byte[] b, int o) { b[o] = (byte) (v ^ 0x80); return Bytes.SIZEOF_BYTE; }
Source:
<code>public static void main(String[] args) throws CTFException { File f = new File(args[0]); if (f.isDirectory()) { CTFTrace trace = new CTFTrace(f); try (CTFTraceReader tr = new CTFTraceReader(trace)) { while (tr.hasMoreEvents()) { System.out.println(tr.getCurrentEventDef()); tr.advance(); } } } <START> <END> }</code><technical_language>line, print error message file is a directory</technical_language>

Target:
public static void main(String[] args) throws CTFException { File f = new File(args[0]); if (f.isDirectory()) { CTFTrace trace = new CTFTrace(f); try (CTFTraceReader tr = new CTFTraceReader(trace)) { while (tr.hasMoreEvents()) { System.out.println(tr.getCurrentEventDef()); tr.advance(); } } } else { System.err.println("%s is not a directory", args[0]); } }
Source:
<code>protected Builder() { super(); id("azurecompute-arm") .name("Microsoft Azure Resource Manager REST API") .identityName("Azure Service Principal credential name") <START> .credentialName("Azure Service Principal credential password") <END> .endpointName("Resource Manager Endpoint ending in your Subscription Id") .documentation(URI.create("<LINK_0>")) .defaultProperties(AzureManagementApiMetadata.defaultProperties()) .view(typeToken(ComputeServiceContext.class)) .defaultModules(ImmutableSet.<Class<? extends Module>>builder() .add(OAuthModule.class) .add(OkHttpCommandExecutorServiceModule.class) .add(AzureComputeHttpApiModule.class).build()); }</code><technical_language>ARM naming: do values properly describe "Application Id" "Application password"</technical_language>

Target:
protected Builder() { super(); id("azurecompute-arm") .name("Microsoft Azure Resource Manager REST API") .identityName("Azure Service Principal Application Id") .credentialName("Azure Service Principal Application Password") .endpointName("Resource Manager Endpoint ending in your Subscription Id") .documentation(URI.create("<LINK_0>")) .defaultProperties(AzureManagementApiMetadata.defaultProperties()) .view(typeToken(ComputeServiceContext.class)) .defaultModules(ImmutableSet.<Class<? extends Module>>builder() .add(OAuthModule.class) .add(OkHttpCommandExecutorServiceModule.class) .add(AzureComputeHttpApiModule.class).build()); }
Source:
<code>RSocketClient(DuplexConnection connection, Consumer<Throwable> errorConsumer, StreamIdSupplier streamIdSupplier, Duration tickPeriod, Duration ackTimeout, int missedAcks) { this.connection = connection; this.errorConsumer = errorConsumer; this.streamIdSupplier = streamIdSupplier; this.started = MonoProcessor.create(); this.senders = new IntObjectHashMap<>(256, 0.9f); this.receivers = new IntObjectHashMap<>(256, 0.9f); this.missedAckCounter = new AtomicInteger(); <START> if (tickPeriod != Duration.ZERO) { <END> long ackTimeoutMs = ackTimeout.toMillis(); this.keepAliveSendSub = started .thenMany(Flux.interval(tickPeriod)) .doOnSubscribe(s -> timeLastTickSentMs = System.currentTimeMillis()) .flatMap(i -> sendKeepAlive(ackTimeoutMs, missedAcks)) .doOnError(t -> { errorConsumer.accept(t); connection.close().subscribe(); }) .subscribe(); } connection .onClose() .doFinally(signalType -> cleanup()) .doOnError(errorConsumer::accept) .subscribe(); connection .receive() .doOnSubscribe(subscription -> started.onComplete()) .doOnNext(this::handleIncomingFrames) .doOnError(errorConsumer) .subscribe(); }</code><technical_language>A straight object reference comparison unsafe here. * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a> * class; of identity-sensitive operations (including reference equality * ({@code ==}), identity hash code, synchronization) instances of * {@code Duration} unpredictable results avoided. * {@code equals} method for comparisons</technical_language>

Target:
RSocketClient(DuplexConnection connection, Consumer<Throwable> errorConsumer, StreamIdSupplier streamIdSupplier, Duration tickPeriod, Duration ackTimeout, int missedAcks) { this.connection = connection; this.errorConsumer = errorConsumer; this.streamIdSupplier = streamIdSupplier; this.started = MonoProcessor.create(); this.senders = new IntObjectHashMap<>(256, 0.9f); this.receivers = new IntObjectHashMap<>(256, 0.9f); this.missedAckCounter = new AtomicInteger(); if (!Duration.ZERO.equals(tickPeriod)) { long ackTimeoutMs = ackTimeout.toMillis(); this.keepAliveSendSub = started .thenMany(Flux.interval(tickPeriod)) .doOnSubscribe(s -> timeLastTickSentMs = System.currentTimeMillis()) .flatMap(i -> sendKeepAlive(ackTimeoutMs, missedAcks)) .doOnError(t -> { errorConsumer.accept(t); connection.close().subscribe(); }) .subscribe(); } connection .onClose() .doFinally(signalType -> cleanup()) .doOnError(errorConsumer::accept) .subscribe(); connection .receive() .doOnSubscribe(subscription -> started.onComplete()) .doOnNext(this::handleIncomingFrames) .doOnError(errorConsumer) .subscribe(); }
Source:
<code>public int setTabIndexes(int nextTabIndex) { nameEditor.setTabIndex(nextTabIndex++); descriptionEditor.setTabIndex(nextTabIndex++); typeEditor.setTabIndex(nextTabIndex++); <START> datacenterEditor.setTabIndex(nextTabIndex++); <END> urlEditor.setTabIndex(nextTabIndex++); nextTabIndex = vmwarePropertiesWidget.setTabIndexes(nextTabIndex); requiresAuthenticationEditor.setTabIndex(nextTabIndex++); usernameEditor.setTabIndex(nextTabIndex++); passwordEditor.setTabIndex(nextTabIndex++); tenantNameEditor.setTabIndex(nextTabIndex++); authUrlEditor.setTabIndex(nextTabIndex++); testButton.setTabIndex(nextTabIndex++); return nextTabIndex; }</code><technical_language>I pluginTypeEditor is missing</technical_language>

Target:
public int setTabIndexes(int nextTabIndex) { nameEditor.setTabIndex(nextTabIndex++); descriptionEditor.setTabIndex(nextTabIndex++); typeEditor.setTabIndex(nextTabIndex++); datacenterEditor.setTabIndex(nextTabIndex++); pluginTypeEditor.setTabIndex(nextTabIndex++); urlEditor.setTabIndex(nextTabIndex++); nextTabIndex = vmwarePropertiesWidget.setTabIndexes(nextTabIndex); requiresAuthenticationEditor.setTabIndex(nextTabIndex++); usernameEditor.setTabIndex(nextTabIndex++); passwordEditor.setTabIndex(nextTabIndex++); tenantNameEditor.setTabIndex(nextTabIndex++); authUrlEditor.setTabIndex(nextTabIndex++); testButton.setTabIndex(nextTabIndex++); return nextTabIndex; }
Source:
<code>private void scheduleHsErrCheck(LogListener logListener) { try { File installDir = getInstallDir(); if (installDir == null) { return; } Job job = new Job("Check hs_err_pid* files") { @Override protected IStatus run(IProgressMonitor monitor) { new HsErrPidLogCheck(installDir, logListener).run(); return Status.OK_STATUS; } }; job.schedule(TimeUnit.SECONDS.toMillis(30)); } catch (Exception e) { <START> Logs.warn("hs err check failed", e); <END> } }</code><technical_language>ERROR is common for exception happen here. this INFO</technical_language>

Target:
private void scheduleHsErrCheck(LogListener logListener) { try { File installDir = getInstallDir().orNull(); if (installDir == null) { return; } Job job = new Job("Check hs_err_pid* files") { @Override protected IStatus run(IProgressMonitor monitor) { new HsErrPidLogCheck(installDir, logListener).run(); return Status.OK_STATUS; } }; job.schedule(TimeUnit.SECONDS.toMillis(30)); } catch (Exception e) { Logs.log(LogMessages.ERROR_HS_ERR_CHECK_FAILED, e); } }
Source:
<code>public void configure(final MapperFactory mapperFactory) { mapperFactory .classMap(SmartMeteringDevice.class, com.alliander.osgp.domain.core.valueobjects.smartmetering.SmartMeteringDevice.class) .byDefault().register(); mapperFactory .classMap(com.alliander.osgp.domain.core.valueobjects.smartmetering.SmartMeteringDevice.class, <START> com.alliander.osgp.domain.core.valueobjects.smartmetering.SmartMeteringDevice.class).byDefault().register(); <END> }</code><technical_language>This reverted. This maps a SmartMeteringDevice domain object class. breaks add meter functionality</technical_language>

Target:
public void configure(final MapperFactory mapperFactory) { mapperFactory .classMap(SmartMeteringDevice.class, com.alliander.osgp.domain.core.valueobjects.smartmetering.SmartMeteringDevice.class) .byDefault().register(); mapperFactory .classMap(com.alliander.osgp.domain.core.valueobjects.smartmetering.SmartMeteringDevice.class, com.alliander.osgp.dto.valueobjects.smartmetering.SmartMeteringDevice.class).byDefault() .register(); }
Source:
<code>protected Guid lookupStorageDomainIdByName(String name) { if (!isFiltered()) { StorageDomain storageDomain = getEntity(org.ovirt.engine.core.common.businessentities.StorageDomain.class, VdcQueryType.GetStorageDomainByName, new NameQueryParameters(name), <START> name); <END> if (storageDomain != null) { return storageDomain.getId(); } return null; } else { List<org.ovirt.engine.core.common.businessentities.StorageDomain> storageDomains = getBackendCollection(org.ovirt.engine.core.common.businessentities.StorageDomain.class, VdcQueryType.GetAllStorageDomains, new VdcQueryParametersBase()); for (org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain : storageDomains) { if (storageDomain.getStorageName().equals(name)) { return storageDomain.getId(); } } return null; } }</code><technical_language>agreed preserve message, lost, a rebase</technical_language>

Target:
protected Guid lookupStorageDomainIdByName(String name) { if (!isFiltered()) { StorageDomain storageDomain = getEntity(org.ovirt.engine.core.common.businessentities.StorageDomain.class, VdcQueryType.GetStorageDomainByName, new NameQueryParameters(name), "Storage: name=" + name); if (storageDomain != null) { return storageDomain.getId(); } return null; } else { List<org.ovirt.engine.core.common.businessentities.StorageDomain> storageDomains = getBackendCollection(org.ovirt.engine.core.common.businessentities.StorageDomain.class, VdcQueryType.GetAllStorageDomains, new VdcQueryParametersBase()); for (org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain : storageDomains) { if (storageDomain.getStorageName().equals(name)) { return storageDomain.getId(); } } return null; } }
Source:
<code>public void testGetCallbackWhenIsNotValid() { final DataType dataType = mock(DataType.class); final Command onSuccess = mock(Command.class); final DataTypeFlashMessage flashMessage = mock(DataTypeFlashMessage.class); when(nameIsInvalidErrorMessage.getFlashMessage(dataType)).thenReturn(flashMessage); validator.getCallback(dataType, onSuccess).callback(false); <START> verify(flashMessageEvent).fire(flashMessage); <END> }</code><technical_language>please add assertion: verify(onSuccess, never()).execute();</technical_language>

Target:
public void testGetCallbackWhenIsNotValid() { final DataType dataType = mock(DataType.class); final Command onSuccess = mock(Command.class); final DataTypeFlashMessage flashMessage = mock(DataTypeFlashMessage.class); when(nameIsInvalidErrorMessage.getFlashMessage(dataType)).thenReturn(flashMessage); validator.getCallback(dataType, onSuccess).callback(false); verify(flashMessageEvent).fire(flashMessage); verify(onSuccess, never()).execute(); }
Source:
<code>public Future<Void> login(final String user, final String password, final PlatformConfiguration securityConfig) { Assert.requireNonNull(securityConfig, "securityConfig"); return (Future<Void>) executor.submit(() -> { loginLogoutLock.lock(); try { if (authorized.get()) { throw new DolphinRuntimeException("Already logged in!"); } final String realmName = securityConfig.getProperty(REALM_PROPERTY_NAME, defaultRealmName); final String appName = securityConfig.getProperty(APPLICATION_PROPERTY_NAME, defaultAppName); try { <START> KeycloakOpenidConnectResult connectResult = receiveTokenByLogin(user, password, realmName, appName); <END> accessToken.set(connectResult.getAccess_token()); authorized.set(true); startTokenRefreshRunner(connectResult, realmName, appName); } catch (IOException | URISyntaxException e) { throw new DolphinRuntimeException("Can not receive security token!", e); } } finally { loginLogoutLock.unlock(); } }); }</code><technical_language>Add final keyword</technical_language>

Target:
public Future<Void> login(final String user, final String password, final PlatformConfiguration securityConfig) { Assert.requireNonNull(securityConfig, "securityConfig"); return executor.submit(() -> { loginLogoutLock.lock(); try { if (authorized.get()) { throw new DolphinRuntimeException("Already logged in!"); } final String realmName = securityConfig.getProperty(REALM_PROPERTY_NAME, defaultRealmName); final String appName = securityConfig.getProperty(APPLICATION_PROPERTY_NAME, defaultAppName); try { final KeycloakOpenidConnectResult connectResult = receiveTokenByLogin(user, password, realmName, appName); accessToken.set(connectResult.getAccess_token()); authorized.set(true); startTokenRefreshRunner(connectResult, realmName, appName); } catch (final IOException | URISyntaxException e) { throw new DolphinRuntimeException("Can not receive security token!", e); } } finally { loginLogoutLock.unlock(); } }, null); }
Source:
<code>public Viewer findContentViewer(Viewer oldViewer, ICompareInput input, Composite parent) { Viewer contentViewer = super.findContentViewer(oldViewer, input, parent); if (input instanceof FileItemNode && ((FileItemNode) input).getFileItem() != null) { final ReviewCompareAnnotationSupport support = ReviewCompareAnnotationSupport.getAnnotationSupport(contentViewer); IFileItem item = ((FileItemNode) input).getFileItem(); getCompareConfiguration().setLeftLabel(NLS.bind("{0}: {1}", item.getTarget().getRevision(), item.getName())); getCompareConfiguration().setRightLabel(NLS.bind("{0}: {1}", item.getBase().getRevision(), item.getName())); support.setReviewItem(item, behavior); <START> <END> if (input.getLeft() instanceof FileRevisionTypedElement) { getCompareConfiguration().setLeftImage(((FileItemNode) input).getImage()); } else { getCompareConfiguration().setLeftImage(null); } if (input.getRight() instanceof FileRevisionTypedElement) { getCompareConfiguration().setRightImage(((FileItemNode) input).getImage()); } else { getCompareConfiguration().setRightImage(null); } } return contentViewer; }</code><technical_language>before, this is shared code File..CompareEditorInput. Shared superclass</technical_language>

Target:
public Viewer findContentViewer(Viewer oldViewer, ICompareInput input, Composite parent) { Viewer contentViewer = super.findContentViewer(oldViewer, input, parent); if (input instanceof FileItemNode && ((FileItemNode) input).getFileItem() != null) { final ReviewCompareAnnotationSupport support = ReviewCompareAnnotationSupport.getAnnotationSupport(contentViewer); IFileItem item = ((FileItemNode) input).getFileItem(); support.setReviewItem(item, behavior); getCompareConfiguration().setLabelProvider(input, ((FileItemNode) input).getLabelProvider()); } return contentViewer; }
Source:
<code>public Emitter build() { if (emitterClass == null) { throw new IllegalStateException("No emitter class found or defined"); } try { Constructor<? extends Emitter> c = emitterClass.getDeclaredConstructor(EmitterBuilder.class); return c.newInstance(this); } catch (NoSuchMethodException e) { <START> throw new IllegalStateException("Can’t create emitter", e); <END> } catch (InvocationTargetException e) { throw new IllegalStateException("Can’t create emitter", e); } catch (InstantiationException e) { throw new IllegalStateException("Can’t create emitter", e); } catch (IllegalAccessException e) { throw new IllegalStateException("Can’t create emitter", e); } }</code><technical_language>a static String String 4 times</technical_language>

Target:
public Emitter build() { if (emitterClass == null) { throw new IllegalStateException("No emitter class found or defined"); } String err = "Can’t create emitter"; try { Constructor<? extends Emitter> c = emitterClass.getDeclaredConstructor(EmitterBuilder.class); return c.newInstance(this); } catch (NoSuchMethodException e) { throw new IllegalStateException(err, e); } catch (InvocationTargetException e) { throw new IllegalStateException(err, e); } catch (InstantiationException e) { throw new IllegalStateException(err, e); } catch (IllegalAccessException e) { throw new IllegalStateException(err, e); } }
Source:
<code>public String getAlbumTitle(URL url) throws MalformedURLException { String gid = getGID(url); if (this.albumType == ALBUM_TYPE.ALBUM) { try { if (albumDoc == null) { albumDoc = Http.url(url).get(); } Elements elems = null; String title = null; logger.info("Trying to get album title"); elems = albumDoc.select("meta[property=og:title]"); <START> if (elems!=null) { <END> title = elems.attr("content"); logger.debug("Title is " + title); } if (title.contains("Imgur: The most awesome images on the Internet")) { logger.debug("Album is untitled or imgur is returning the default title"); title = ""; logger.debug("Trying to use title tag to get title"); elems = albumDoc.select("title"); if (elems!=null) { if (elems.text().contains("Imgur: The most awesome images on the Internet")) { logger.debug("Was unable to get album title or album was untitled"); } else { title = elems.text(); } } } String albumTitle = "imgur_"; albumTitle += gid; if (title != null) { albumTitle += "_" + title; } return albumTitle; } catch (IOException e) { } } return getHost() + "_" + gid; }</code><technical_language>Spaces !=</technical_language>

Target:
public String getAlbumTitle(URL url) throws MalformedURLException { String gid = getGID(url); if (this.albumType == ALBUM_TYPE.ALBUM) { try { if (albumDoc == null) { albumDoc = Http.url(url).get(); } Elements elems = null; String title = null; final String defaultTitle = "Imgur: The most awesome images on the Internet"; logger.info("Trying to get album title"); elems = albumDoc.select("meta[property=og:title]"); if (elems != null) { title = elems.attr("content"); logger.debug("Title is " + title); } if (title.contains(defaultTitle)) { logger.debug("Album is untitled or imgur is returning the default title"); title = ""; logger.debug("Trying to use title tag to get title"); elems = albumDoc.select("title"); if (elems != null) { if (elems.text().contains(defaultTitle)) { logger.debug("Was unable to get album title or album was untitled"); } else { title = elems.text(); } } } String albumTitle = "imgur_"; albumTitle += gid; if (title != null) { albumTitle += "_" + title; } return albumTitle; } catch (IOException e) { } } return getHost() + "_" + gid; }
Source:
<code>public static Optional<Sensor> commitOverTasksSensor(final String threadId, final StreamsMetricsImpl streamsMetrics) { if (streamsMetrics.version() == Version.FROM_100_TO_23) { <START> final Sensor commitOverTasksSensor = <END> streamsMetrics.threadLevelSensor(threadId, COMMIT, Sensor.RecordingLevel.DEBUG); final Map<String, String> tagMap = streamsMetrics.taskLevelTagMap(threadId, ROLLUP_VALUE); addAvgAndMaxToSensor( commitOverTasksSensor, TASK_LEVEL_GROUP, tagMap, COMMIT_LATENCY, COMMIT_OVER_TASKS_AVG_LATENCY_DESCRIPTION, COMMIT_OVER_TASKS_MAX_LATENCY_DESCRIPTION ); addInvocationRateAndCountToSensor( commitOverTasksSensor, TASK_LEVEL_GROUP, tagMap, COMMIT, COMMIT_OVER_TASKS_RATE_DESCRIPTION, COMMIT_OVER_TASKS_TOTAL_DESCRIPTION ); return Optional.of(commitOverTasksSensor); } return Optional.empty(); }</code><technical_language>invocationRateAndCountAndAvgAndMaxLatencySensor here</technical_language>

Target:
public static Optional<Sensor> commitOverTasksSensor(final String threadId, final StreamsMetricsImpl streamsMetrics) { if (streamsMetrics.version() == Version.FROM_100_TO_24) { final Sensor commitOverTasksSensor = streamsMetrics.threadLevelSensor(threadId, COMMIT, Sensor.RecordingLevel.DEBUG); final Map<String, String> tagMap = streamsMetrics.taskLevelTagMap(threadId, ROLLUP_VALUE); addAvgAndMaxToSensor( commitOverTasksSensor, TASK_LEVEL_GROUP, tagMap, COMMIT_LATENCY, COMMIT_OVER_TASKS_AVG_LATENCY_DESCRIPTION, COMMIT_OVER_TASKS_MAX_LATENCY_DESCRIPTION ); addInvocationRateAndCountToSensor( commitOverTasksSensor, TASK_LEVEL_GROUP, tagMap, COMMIT, COMMIT_OVER_TASKS_RATE_DESCRIPTION, COMMIT_OVER_TASKS_TOTAL_DESCRIPTION ); return Optional.of(commitOverTasksSensor); } return Optional.empty(); }
Source:
<code>public IMap throttleSubmissionMap() { <START> LOGGER.debug("Creating Throttle map in hazelcast"); <END> final HazelcastTicketRegistryProperties hz = casProperties.getTicket().getRegistry().getHazelcast(); final HazelcastConfigurationFactory factory = new HazelcastConfigurationFactory(); final MapConfig ipMapConfig = factory.buildMapConfig(hz, MAP_KEY, 120); hazelcastInstance.getConfig().addMapConfig(ipMapConfig); return hazelcastInstance.getMap(MAP_KEY); }</code><technical_language>Reword log message; identify settings sense in message</technical_language>

Target:
public IMap throttleSubmissionMap() { final HazelcastTicketRegistryProperties hz = casProperties.getTicket().getRegistry().getHazelcast(); final int timeout = Integer.parseInt(casProperties.getAuthn().getThrottle().getSchedule().getRepeatInterval()); final HazelcastConfigurationFactory factory = new HazelcastConfigurationFactory(); LOGGER.debug("Creating to record failed logins for throttling with timeout set to [{}]", MAP_KEY, timeout); final MapConfig ipMapConfig = factory.buildMapConfig(hz, MAP_KEY, timeout); hazelcastInstance.getConfig().addMapConfig(ipMapConfig); return hazelcastInstance.getMap(MAP_KEY); }
Source:
<code><START> default <T> Flux<SearchHit<T>> find(Query query, Class<T> entityType) { <END> return find(query, entityType, entityType); }</code><technical_language>imperative template: deprecate methods introduce Flux<SearchHit<T>> search( )</technical_language>

Target:
default <T> Flux<T> find(Query query, Class<T> entityType) { return find(query, entityType, entityType); }
Source:
<code>void fillCosmosDiagnostics(ObjectNode parentNode, StringBuilder stringBuilder) { if (this.feedResponseDiagnostics != null) { if (parentNode != null) { parentNode.put(USER_AGENT_KEY, USER_AGENT); parentNode.putPOJO(COSMOS_DIAGNOSTICS_KEY, feedResponseDiagnostics); } if (stringBuilder != null) { stringBuilder.append(USER_AGENT_KEY +"=").append(USER_AGENT).append(System.lineSeparator()); stringBuilder.append(feedResponseDiagnostics); } } else { if (parentNode != null) { parentNode.putPOJO(COSMOS_DIAGNOSTICS_KEY, clientSideRequestStatistics); } if (stringBuilder != null) { try { stringBuilder.append(OBJECT_MAPPER.writeValueAsString(this.clientSideRequestStatistics)); } catch (JsonProcessingException e) { <START> LOGGER.error("Error while parsing diagnostics " + e); <END> } } } }</code><technical_language>please slf4j exception pladeholder</technical_language>

Target:
void fillCosmosDiagnostics(ObjectNode parentNode, StringBuilder stringBuilder) { if (this.feedResponseDiagnostics != null) { if (parentNode != null) { parentNode.put(USER_AGENT_KEY, USER_AGENT); parentNode.putPOJO(COSMOS_DIAGNOSTICS_KEY, feedResponseDiagnostics); } if (stringBuilder != null) { stringBuilder.append(USER_AGENT_KEY +"=").append(USER_AGENT).append(System.lineSeparator()); stringBuilder.append(feedResponseDiagnostics); } } else { if (parentNode != null) { parentNode.putPOJO(COSMOS_DIAGNOSTICS_KEY, clientSideRequestStatistics); } if (stringBuilder != null) { try { stringBuilder.append(OBJECT_MAPPER.writeValueAsString(this.clientSideRequestStatistics)); } catch (JsonProcessingException e) { LOGGER.error("Error while parsing diagnostics ", e); } } } }
Source:
<code>public void shouldNotAllowActionParametersDisplayNameLongerThan255Characters() { when(schemaService.retrieveApplications("ConfigOne")).thenReturn(DummyCommcareSchema.getApplicationsForConfigFour()); List<ActionEventRequest> actionEventRequests = formActionBuilder.buildActions(); <START> assertEquals(actionEventRequests.get(0).getActionParameters().first().getDisplayName().length(), 255); <END> }</code><technical_language>verify content of display name, length</technical_language>

Target:
public void shouldNotAllowActionParametersDisplayNameLongerThan255Characters() { String displayName = "Super long question label, that is so long, that the registration of the Commcare Task channel fails! (And this is caused by the fact, that the Task module display name column only allows 255 characters, while the label you are reading has got obviously way more than that)"; String shortenedDisplayName = displayName.substring(0, 255); when(schemaService.retrieveApplications("ConfigOne")).thenReturn(DummyCommcareSchema.getApplicationsWithCustomQuestionLabel(displayName)); List<ActionEventRequest> actionEventRequests = formActionBuilder.buildActions(); assertEquals(actionEventRequests.get(0).getActionParameters().first().getDisplayName().length(), 255); assertEquals(actionEventRequests.get(0).getActionParameters().first().getDisplayName(), shortenedDisplayName); }
Source:
<code>public void canFallBackIfExperimentFails() { enableExperiment(); <START> throwOnFirstExperiment(); <END> assertThatThrownBy(experimentSupplier::getAsInt).isEqualTo(RUNTIME_EXCEPTION); assertThat(experimentSupplier.getAsInt()).isEqualTo(FALLBACK_INT); }</code><technical_language>here, need suddenly start working experiment, is this test strictly necessary, considering subsumed attemptsExperimentAgainAfterEnoughTimeHasElapsed</technical_language>

Target:
public void canFallBackIfExperimentFails() { enableExperiment(); throwOnExperiment(); assertThatThrownBy(proxyInstance::getAsInt).isEqualTo(RUNTIME_EXCEPTION); assertThat(proxyInstance.getAsInt()).isEqualTo(FALLBACK_RESULT); }
Source:
<code>private static List<ReportImporter> createLegacyImporters() { List<ReportImporter> importers = new ArrayList<>(); importers.add(new CoverageResultImporter( PhpPlugin.PHPUNIT_COVERAGE_REPORT_PATH_KEY, "unit test coverage", CoreMetrics.LINES_TO_COVER, CoreMetrics.UNCOVERED_LINES, <START> CoverageType.UNIT)); <END> importers.add(new CoverageResultImporter( PhpPlugin.PHPUNIT_IT_COVERAGE_REPORT_PATH_KEY, "integration test coverage", CoreMetrics.LINES_TO_COVER, CoreMetrics.UNCOVERED_LINES, CoverageType.IT)); importers.add(new CoverageResultImporter( PhpPlugin.PHPUNIT_OVERALL_COVERAGE_REPORT_PATH_KEY, "overall coverage", CoreMetrics.LINES_TO_COVER, CoreMetrics.UNCOVERED_LINES, CoverageType.OVERALL)); return importers; }</code><technical_language>![MINOR](<LINK_0> 'Severity: MINOR') Remove this of "CoverageType"; is deprecated. [![rule](<LINK_1>](<LINK_2> ![MINOR](<LINK_0> 'Severity: MINOR') Remove this of "UNIT"; is deprecated. [![rule](<LINK_1>](<LINK_2></technical_language>

Target:
private static List<ReportImporter> createLegacyImporters() { List<ReportImporter> importers = new ArrayList<>(); importers.add(new CoverageResultImporter( PhpPlugin.PHPUNIT_COVERAGE_REPORT_PATH_KEY, "unit test coverage", CoreMetrics.LINES_TO_COVER, CoreMetrics.UNCOVERED_LINES, CoverageType.UNIT)); importers.add(new CoverageResultImporter( PhpPlugin.PHPUNIT_IT_COVERAGE_REPORT_PATH_KEY, "integration test coverage", CoreMetrics.IT_LINES_TO_COVER, CoreMetrics.IT_UNCOVERED_LINES, CoverageType.IT)); importers.add(new CoverageResultImporter( PhpPlugin.PHPUNIT_OVERALL_COVERAGE_REPORT_PATH_KEY, "overall coverage", CoreMetrics.OVERALL_LINES_TO_COVER, CoreMetrics.OVERALL_UNCOVERED_LINES, CoverageType.OVERALL)); return importers; }