auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void afterRefreshTreatment() { try { if (processHardwareCapsNeeded) { monitoringStrategy.processHardwareCapabilities(vds); markIsSetNonOperationalExecuted(); } if (refreshedCapabilities) { getVdsEventListener().handleVdsVersion(vds.getId()); markIsSetNonOperationalExecuted(); } if (vdsMaintenanceTimeoutOccurred) { handleVdsMaintenanceTimeout(); } if (vds.getStatus() == VDSStatus.Maintenance) { try { getVdsEventListener().vdsMovedToMaintenance(vds); } catch (RuntimeException ex) { log.error("Host encounter a problem moving to maintenance mode, probably error during " + "disconnecting it from pool. The Host will stay in Maintenance: {}", ex.getMessage()); log.debug("Exception", ex); } } else if (vds.getStatus() == VDSStatus.NonOperational && firstStatus != VDSStatus.NonOperational) { if (!vdsManager.isSetNonOperationalExecuted()) { getVdsEventListener().vdsNonOperational(vds.getId(), vds.getNonOperationalReason(), true, Guid.Empty); } else { log.info("Host '{}'({}) is already in NonOperational status for reason '{}'. SetNonOperationalVds command is skipped.", vds.getName(), vds.getId(), (vds.getNonOperationalReason() != null) ? vds.getNonOperationalReason().name() : "unknown"); } } } catch (IRSErrorException ex) { logFailureMessage("Could not finish afterRefreshTreatment", ex); log.debug("Exception", ex); } catch (RuntimeException ex) { logFailureMessage("Could not finish afterRefreshTreatment", ex); <START> log.error("Exception", <END> ex); } }</code><technical_language>change</technical_language>

Target:
public void afterRefreshTreatment() { try { if (processHardwareCapsNeeded) { monitoringStrategy.processHardwareCapabilities(vds); markIsSetNonOperationalExecuted(); } if (refreshedCapabilities) { getVdsEventListener().handleVdsVersion(vds.getId()); markIsSetNonOperationalExecuted(); } if (vdsMaintenanceTimeoutOccurred) { handleVdsMaintenanceTimeout(); } if (vds.getStatus() == VDSStatus.Maintenance) { try { getVdsEventListener().vdsMovedToMaintenance(vds); } catch (RuntimeException ex) { log.error("Host encounter a problem moving to maintenance mode, probably error during " + "disconnecting it from pool. The Host will stay in Maintenance: {}", ex.getMessage()); log.debug("Exception", ex); } } else if (vds.getStatus() == VDSStatus.NonOperational && firstStatus != VDSStatus.NonOperational) { if (!vdsManager.isSetNonOperationalExecuted()) { getVdsEventListener().vdsNonOperational(vds.getId(), vds.getNonOperationalReason(), true, Guid.Empty); } else { log.info("Host '{}'({}) is already in NonOperational status for reason '{}'. SetNonOperationalVds command is skipped.", vds.getName(), vds.getId(), (vds.getNonOperationalReason() != null) ? vds.getNonOperationalReason().name() : "unknown"); } } } catch (RuntimeException ex) { logFailureMessage("Could not finish afterRefreshTreatment", ex); log.debug("Exception", ex); } }
Source:
<code>public void placeRadiologyOrder_shouldCreateRadiologyOrderEncounter() throws Exception { RadiologyOrder radiologyOrder = getUnsavedRadiologyOrder(); <START> EncounterSearchCriteriaBuilder encounterSearchCriteria = <END> new EncounterSearchCriteriaBuilder().setPatient(radiologyOrder.getPatient()); List<Encounter> matchingEncounters = encounterService.getEncounters(encounterSearchCriteria.createEncounterSearchCriteria()); assertThat(matchingEncounters, is(empty())); assertThat(radiologyOrder.getEncounter(), is(nullValue())); radiologyOrder = radiologyOrderService.placeRadiologyOrder(radiologyOrder); assertThat(radiologyOrder.getEncounter(), is(not(nullValue()))); encounterSearchCriteria = new EncounterSearchCriteriaBuilder().setPatient(radiologyOrder.getPatient()) .setProviders(Arrays.asList(radiologyOrder.getOrderer())); matchingEncounters = encounterService.getEncounters(encounterSearchCriteria.createEncounterSearchCriteria()); assertThat(matchingEncounters, hasItem(radiologyOrder.getEncounter())); assertThat(matchingEncounters.size(), is(1)); }</code><technical_language>@bgeVam criteria criteria later, why. create EncounterSearchCriteria reuse for placeRadiologyOrder</technical_language>

Target:
public void placeRadiologyOrder_shouldCreateRadiologyOrderEncounter() throws Exception { RadiologyOrder radiologyOrder = getUnsavedRadiologyOrder(); EncounterSearchCriteriaBuilder encounterSearchCriteria = new EncounterSearchCriteriaBuilder().setPatient(radiologyOrder.getPatient()) .setProviders(Arrays.asList(radiologyOrder.getOrderer())); List<Encounter> matchingEncounters = encounterService.getEncounters(encounterSearchCriteria.createEncounterSearchCriteria()); assertThat(matchingEncounters, is(empty())); assertThat(radiologyOrder.getEncounter(), is(nullValue())); radiologyOrder = radiologyOrderService.placeRadiologyOrder(radiologyOrder); assertThat(radiologyOrder.getEncounter(), is(not(nullValue()))); matchingEncounters = encounterService.getEncounters(encounterSearchCriteria.createEncounterSearchCriteria()); assertThat(matchingEncounters, hasItem(radiologyOrder.getEncounter())); assertThat(matchingEncounters.size(), is(1)); }
Source:
<code>public void writeTo(Path directory) throws IOException { checkArgument(Files.notExists(directory) || Files.isDirectory(directory), "path %s exists but is not a directory.", directory); Path outputDirectory = directory; if (!packageName.isEmpty()) { for (String packageComponent : packageName.split("\\.")) { outputDirectory = outputDirectory.resolve(packageComponent); } Files.createDirectories(outputDirectory); } <START> TypeSpec firstTypeSpec = typeSpecs.get(0); <END> Path outputPath = outputDirectory.resolve(firstTypeSpec.name + ".java"); try (Writer writer = new OutputStreamWriter(Files.newOutputStream(outputPath), UTF_8)) { writeTo(writer); } }</code><technical_language>This public type</technical_language>

Target:
public void writeTo(Path directory) throws IOException { checkArgument(Files.notExists(directory) || Files.isDirectory(directory), "path %s exists but is not a directory.", directory); Path outputDirectory = directory; if (!packageName.isEmpty()) { for (String packageComponent : packageName.split("\\.")) { outputDirectory = outputDirectory.resolve(packageComponent); } Files.createDirectories(outputDirectory); } Path outputPath = outputDirectory.resolve(typeSpec.name + ".java"); try (Writer writer = new OutputStreamWriter(Files.newOutputStream(outputPath), UTF_8)) { writeTo(writer); } }
Source:
<code>static boolean CanTrack() { try { FirebaseAnalyticsClass = Class.forName("com.google.firebase.analytics.FirebaseAnalytics"); return true; <START> } catch (ClassNotFoundException t) { <END> return false; } }</code><technical_language>t e</technical_language>

Target:
static boolean CanTrack() { try { FirebaseAnalyticsClass = Class.forName("com.google.firebase.analytics.FirebaseAnalytics"); return true; } catch (ClassNotFoundException e) { return false; } }
Source:
<code>public static List<BaseEdit> fromEditList(List<Edit> edits) { ArrayList<BaseEdit> gwtOrmEdits = new ArrayList<BaseEdit>(edits.size()); for (Edit e : edits) { <START> gwtOrmEdits.add(fromEdit(e)); <END> } return Collections.unmodifiableList(gwtOrmEdits); }</code><technical_language>name "gwtOrmEdits" here. "res", "result", "out", "r" better</technical_language>

Target:
public static List<BaseEdit> fromEditList(List<Edit> edits) { ArrayList<BaseEdit> out = new ArrayList<BaseEdit>(edits.size()); for (Edit e : edits) { out.add(fromEdit(e)); } return Collections.unmodifiableList(out); }
Source:
<code>public synchronized ICleanUp[] createCleanUps(Set<String> ids) { ensureCleanUpsRegistered(); ArrayList<ICleanUp> result= new ArrayList<>(fCleanUpDescriptors.length); for (CleanUpDescriptor <START> fCleanUpDescriptor : <END> fCleanUpDescriptors) { if (ids == null || ids.contains(fCleanUpDescriptor.getId())) { ICleanUp cleanUp= fCleanUpDescriptor.createCleanUp(); if (cleanUp != null) result.add(cleanUp); } } return result.toArray(new ICleanUp[result.size()]); }</code><technical_language>rename descriptor</technical_language>

Target:
public synchronized ICleanUp[] createCleanUps(Set<String> ids) { ensureCleanUpsRegistered(); ArrayList<ICleanUp> result= new ArrayList<>(fCleanUpDescriptors.length); for (CleanUpDescriptor descriptor : fCleanUpDescriptors) { if (ids == null || ids.contains(descriptor.getId())) { ICleanUp cleanUp= descriptor.createCleanUp(); if (cleanUp != null) result.add(cleanUp); } } return result.toArray(new ICleanUp[result.size()]); }
Source:
<code><START> public THIS validate() { <END> if (serverId == null) { throw new IllegalArgumentException("Server id has to be set!"); } return (THIS) this; }</code><technical_language>this public</technical_language>

Target:
protected void validate() { if (serverId == null) { throw new IllegalArgumentException("Server id has to be set!"); } }
Source:
<code>public VoidResult call() throws NoSuchProjectException, OrmException, SecurityException, IOException { final ProjectControl projectControl = projectControlFactory.controlFor(projectName); <START> if (user.isAdministrator() || projectControl.isOwner()) { <END> repoManager.deleteRepository(projectName.get()); for (final RefRight k : db.refRights().byProject(projectName)) { db.refRights().delete(Collections.singleton(k)); } for (final AccountProjectWatch a : db.accountProjectWatches().byProject( projectName)) { db.accountProjectWatches().delete(Collections.singleton(a)); } for (final Project j : db.projects().getChildren(projectName.get())) { j.setParent(null); db.projects().update(Collections.singleton(j)); projectCache.evict(j); } db.projects().deleteKeys(Collections.singleton(projectName)); replication.replicateProjectDeletion(projectName); projectCache.evict(projectControl.getProject()); } return VoidResult.INSTANCE; }</code><technical_language>If this true, fail exception, silent</technical_language>

Target:
public List<NameKey> call() { final List<NameKey> failedProjects = new ArrayList<NameKey>(); for (NameKey p : projectsList) { try { final ProjectControl projectControl = projectControlFactory.controlFor(p); if (projectControl.isOwner()) { final Repository r = repoManager.openRepository(p.get()); Map<String, Ref> refs; refs = r.getAllRefs(); r.close(); if (refs.isEmpty()) { repoManager.deleteRepository(p.get()); for (final Project c : db.projects().getChildren(p.get())) { c.setParent(projectControl.getProject().getParent()); db.projects().update(Collections.singleton(c)); projectCache.evict(c); } db.refRights().delete(db.refRights().byProject(p)); db.accountProjectWatches().delete( db.accountProjectWatches().byProject(p)); db.projects().deleteKeys(Collections.singleton(p)); replication.replicateProjectDeletion(p); projectCache.evict(projectControl.getProject()); } else { failedProjects.add(p); log.error(p.get() + " is not empty."); } } else { failedProjects.add(p); log.error("User has no rights to delete " + p.get()); } } catch (RepositoryNotFoundException e) { failedProjects.add(p); log.error("Repository " + p.get() + " was not found"); } catch (IOException e) { failedProjects.add(p); log.error(e.getMessage()); } catch (SecurityException e) { failedProjects.add(p); log.error(p.get() + " repository deletion is not allowed.", e); } catch (OrmException e) { failedProjects.add(p); log.error("Could not update/delete " + p.get() + "from database.", e); } catch (NoSuchProjectException e) { failedProjects.add(p); log.error("Project " + p.get() + " was not found."); } } return failedProjects; }
Source:
<code>private void doRemoteHostXml(String hostXmlFile) throws Exception { KernelServices kernelServices = createKernelServicesBuilder(TestModelType.HOST) .setXmlResource(hostXmlFile) .setModelInitializer(MODEL_SANITIZER, new ModelWriteSanitizer() { @Override public ModelNode sanitize(ModelNode model) { return model; } <START> }) <END> .build(); Assert.assertTrue(kernelServices.isSuccessfulBoot()); String xml = kernelServices.getPersistedSubsystemXml(); ModelTestUtils.compareXml(ModelTestUtils.readResource(this.getClass(), hostXmlFile), xml); ModelTestUtils.validateModelDescriptions(PathAddress.EMPTY_ADDRESS, kernelServices.getRootRegistration()); }</code><technical_language>I this ModelWriteSanitizer param 'null' effect. I though</technical_language>

Target:
private void doRemoteHostXml(String hostXmlFile) throws Exception { KernelServices kernelServices = createKernelServicesBuilder(TestModelType.HOST) .setXmlResource(hostXmlFile) .setModelInitializer(MODEL_SANITIZER, null) .build(); Assert.assertTrue(kernelServices.isSuccessfulBoot()); String xml = kernelServices.getPersistedSubsystemXml(); ModelTestUtils.compareXml(ModelTestUtils.readResource(this.getClass(), hostXmlFile), xml); ModelTestUtils.validateModelDescriptions(PathAddress.EMPTY_ADDRESS, kernelServices.getRootRegistration()); }
Source:
<code>private Path getPreviousDumpMetadataPath(Path dumpRoot) throws IOException { FileSystem fs = dumpRoot.getFileSystem(conf); if (fs.exists(dumpRoot)) { FileStatus[] statuses = fs.listStatus(dumpRoot); <START> if (statuses.length == 1) { <END> return statuses[0].getPath(); } } return null; }</code><technical_language>if previous is deleted dump is done successfully ..then 2 dump directory</technical_language>

Target:
private Path getPreviousDumpMetadataPath(Path dumpRoot) throws IOException { FileSystem fs = dumpRoot.getFileSystem(conf); if (fs.exists(dumpRoot)) { FileStatus[] statuses = fs.listStatus(dumpRoot); if (statuses.length > 0) { FileStatus latestUpdatedStatus = statuses[0]; for (FileStatus status : statuses) { if (status.getModificationTime() > latestUpdatedStatus.getModificationTime()) { latestUpdatedStatus = status; } } return latestUpdatedStatus.getPath(); } } return null; }
Source:
<code>private String getGuidList(String editedList) { StringBuilder guidList = new StringBuilder(); boolean first = true; Matcher idMatch = idPattern.matcher(editedList); while (idMatch.find()) { first = false; String artId = editedList.substring(idMatch.start() + 1, idMatch.end() - 1); Artifact checkArtifactFromId = ArtifactQuery.checkArtifactFromId(ArtifactId.valueOf(artId), attributeConflict.getSourceBranch(), DeletionFlag.INCLUDE_DELETED); if (checkArtifactFromId.isInvalid()) { Artifact art = ArtifactQuery.getArtifactFromId(ArtifactId.valueOf(artId), attributeConflict.getDestBranch()); if (art.isValid()) { if (!first) { guidList.append(","); } guidList.append(art.getGuid()); <START> } <END> } else if (!checkArtifactFromId.isDeleted()) { if (!first) { guidList.append(","); } guidList.append(checkArtifactFromId.getGuid()); } else { throw new OseeCoreException( "Artifact '" + checkArtifactFromId.getName() + "' with id " + checkArtifactFromId.getArtId() + " was deleted on this source branch"); } } return guidList.toString(); }</code><technical_language>If handling cases of if/else, I true case instead of !true. this else if (checkArtifact... move exception this code else. easier read</technical_language>

Target:
private String getGuidList(String editedList) { StringBuilder guidList = new StringBuilder(); boolean first = true; Matcher idMatch = idPattern.matcher(editedList); while (idMatch.find()) { first = false; String artId = editedList.substring(idMatch.start() + 1, idMatch.end() - 1); Artifact checkArtifactFromId = ArtifactQuery.checkArtifactFromId(ArtifactId.valueOf(artId), attributeConflict.getSourceBranch(), DeletionFlag.INCLUDE_DELETED); if (checkArtifactFromId.isInvalid()) { Artifact art = ArtifactQuery.getArtifactFromId(ArtifactId.valueOf(artId), attributeConflict.getDestBranch()); if (art.isValid()) { if (!first) { guidList.append(","); } guidList.append(art.getGuid()); } } else if (checkArtifactFromId.isDeleted()) { results.error( "Artifact '" + checkArtifactFromId.getName() + "' with id " + checkArtifactFromId.getArtId() + " was deleted on this source branch"); } else if (!checkArtifactFromId.isDeleted()) { if (!first) { guidList.append(","); } guidList.append(checkArtifactFromId.getGuid()); } else { results.error( "There was a problem with Artifact '" + checkArtifactFromId.getName() + "' with id " + checkArtifactFromId.getArtId() + "\nSave Failed"); } } return guidList.toString(); }
Source:
<code>private void blockingNewSession() { newSessionLock.lock(); try { if(!expired()) { return; } asyncNewSession(); if (false == newSessionCondition.await(NEW_SESSION_MAX_WAIT_SECONDS, TimeUnit.SECONDS)) { if (expired()) { throw new AmazonClientException("Session credentials request timed-out.", lastException.get()); } } } catch (InterruptedException ex) { <START> throw new AmazonClientException(ex); <END> } finally { newSessionLock.unlock(); } }</code><technical_language>reinterrupt thread caller act it</technical_language>

Target:
private void blockingNewSession() { newSessionLock.lock(); try { if (!expired()) { return; } asyncNewSession(); if (!newSessionCondition.await(NEW_SESSION_MAX_WAIT_SECONDS, TimeUnit.SECONDS)) { if (expired()) { handleWaitError("Session credentials request timed-out.", lastException.get()); } } } catch (InterruptedException ex) { handleWaitError("Interrupted waiting for new session credentials.", ex); } finally { newSessionLock.unlock(); } }
Source:
<code>protected Map<String, String> getAdditionalAttributes(SiteItem siteItem) { SiteContext siteContext = SiteContext.getCurrent(); Configuration siteConfig = siteContext.getConfig(); <START> if(siteConfig != null && siteConfig.containsKey(KEY_NAV_ADDITIONAL_FIELDS)) { <END> Map<String, String> attrs = new HashMap<>(); String[] fields = siteConfig.getStringArray(KEY_NAV_ADDITIONAL_FIELDS); for (String field : fields) { String value = siteItem.queryValue(field); if(value != null) { attrs.put(field, value); } } return attrs; } return Collections.emptyMap(); }</code><technical_language>Please org.craftercms.engine.properties.SiteProperties, contains Engine's common site config properties</technical_language>

Target:
protected Map<String, String> getAdditionalAttributes(SiteItem siteItem) { Map<String, String> attrs = new HashMap<>(); String[] fields = SiteProperties.getNavigationAdditionalFields(); for (String field : fields) { String value = siteItem.queryValue(field); if(value != null) { attrs.put(field, value); } } return attrs; }
Source:
<code>public EntityType getEntityType() { <START> return Sponge.getRegistry().getType(EntityType.class, this.entityId).get(); <END> }</code><technical_language>EntityTypeRegistryModule instead here</technical_language>

Target:
public EntityType getEntityType() { return EntityTypeRegistryModule.getInstance().getById(this.entityId).get(); }
Source:
<code>public UpdateCapturingIndexProvider( SchemaIndexProvider actual, Map<Long,Collection<IndexEntryUpdate>> initialUpdates ) { <START> super( actual.getProviderDescriptor(), actual.priority() ); <END> this.actual = actual; this.initialUpdates = initialUpdates; }</code><technical_language>A copy constructor in SchemaIndexProvider more a public getter method</technical_language>

Target:
public UpdateCapturingIndexProvider( SchemaIndexProvider actual, Map<Long,Collection<IndexEntryUpdate>> initialUpdates ) { super( actual ); this.actual = actual; this.initialUpdates = initialUpdates; }
Source:
<code>public void createPartControl(@Nullable Composite parent) { super.createPartControl(parent); SashForm sf = new SashForm(parent, SWT.NONE); TableViewer tableViewer = new TableViewer(sf, SWT.FULL_SELECTION | SWT.VIRTUAL); fSegmentStoreViewer = createSegmentStoreViewer(tableViewer); getViewSite().getActionBars().getMenuManager().add(fExportAction); ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); if (trace != null) { TmfTraceSelectedSignal signal = new TmfTraceSelectedSignal(this, trace); if (fSegmentStoreViewer != null) { fSegmentStoreViewer.traceSelected(signal); } } else { <START> setInitialData(); <END> } }</code><technical_language>I tested, this calls setData() null, do (the table is empty)</technical_language>

Target:
public void createPartControl(@Nullable Composite parent) { super.createPartControl(parent); SashForm sf = new SashForm(parent, SWT.NONE); TableViewer tableViewer = new TableViewer(sf, SWT.FULL_SELECTION | SWT.VIRTUAL); fSegmentStoreViewer = createSegmentStoreViewer(tableViewer); getViewSite().getActionBars().getMenuManager().add(fExportAction); ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); if (trace != null) { TmfTraceSelectedSignal signal = new TmfTraceSelectedSignal(this, trace); if (fSegmentStoreViewer != null) { fSegmentStoreViewer.traceSelected(signal); } } }
Source:
<code>public void testComputeOffsetAndBackToOrigin() { LatLng start = new LatLng(40, 40); double distance = 1e5; double heading = 15; LatLng end; end = SphericalUtil.computeOffset(start, distance, heading); expectLatLngApproxEquals( start, SphericalUtil.computeOffsetOrigin(end, distance, heading)); heading = -37; end = SphericalUtil.computeOffset(start, distance, heading); expectLatLngApproxEquals( start, SphericalUtil.computeOffsetOrigin(end, distance, heading)); distance = 3.8e+7; end = SphericalUtil.computeOffset(start, distance, heading); expectLatLngApproxEquals( start, SphericalUtil.computeOffsetOrigin(end, distance, heading)); start = new LatLng(-21, -73); end = SphericalUtil.computeOffset(start, distance, heading); expectLatLngApproxEquals( start, SphericalUtil.computeOffsetOrigin(end, distance, heading)); start = SphericalUtil.computeOffsetOrigin(new LatLng(0, 90), Math.PI * EARTH_RADIUS / 2, 90); expectLatLngApproxEquals( new LatLng(0, 90), SphericalUtil.computeOffset(start, Math.PI * EARTH_RADIUS / 2, 90)); start = SphericalUtil.computeOffsetOrigin(new LatLng(90, 0), Math.PI * EARTH_RADIUS / 4, 0); <START> if (start != null) { <END> expectLatLngApproxEquals( new LatLng(90, 0), SphericalUtil.computeOffset(start, Math.PI * EARTH_RADIUS / 4, 0)); } }</code><technical_language>Please revert</technical_language>

Target:
public void testComputeOffsetAndBackToOrigin() { LatLng start = new LatLng(40, 40); double distance = 1e5; double heading = 15; LatLng end; end = SphericalUtil.computeOffset(start, distance, heading); expectLatLngApproxEquals( start, SphericalUtil.computeOffsetOrigin(end, distance, heading)); heading = -37; end = SphericalUtil.computeOffset(start, distance, heading); expectLatLngApproxEquals( start, SphericalUtil.computeOffsetOrigin(end, distance, heading)); distance = 3.8e+7; end = SphericalUtil.computeOffset(start, distance, heading); expectLatLngApproxEquals( start, SphericalUtil.computeOffsetOrigin(end, distance, heading)); start = new LatLng(-21, -73); end = SphericalUtil.computeOffset(start, distance, heading); expectLatLngApproxEquals( start, SphericalUtil.computeOffsetOrigin(end, distance, heading)); start = SphericalUtil.computeOffsetOrigin(new LatLng(0, 90), Math.PI * EARTH_RADIUS / 2, 90); expectLatLngApproxEquals( new LatLng(0, 90), SphericalUtil.computeOffset(start, Math.PI * EARTH_RADIUS / 2, 90)); start = SphericalUtil.computeOffsetOrigin(new LatLng(90, 0), Math.PI * EARTH_RADIUS / 4, 0); expectLatLngApproxEquals( new LatLng(90, 0), SphericalUtil.computeOffset(start, Math.PI * EARTH_RADIUS / 4, 0)); }
Source:
<code>public List<HtmlParameterStats> getParams(HtmlParameter.Type type) { List<HtmlParameterStats> params = new ArrayList<>(); switch (type) { case cookie: for (HtmlParameterStats param : this.cookieParams.values()) { params.add(param); } break; case url: for (HtmlParameterStats param : this.urlParams.values()) { params.add(param); } break; case form: for (HtmlParameterStats param : this.formParams.values()) { params.add(param); } break; case header: for (HtmlParameterStats param : this.headerParams.values()) { <START> params.add(param); <END> } break; } return params; }</code><technical_language>This addAll (same for cases), done in getParams()</technical_language>

Target:
public List<HtmlParameterStats> getParams(HtmlParameter.Type type) { List<HtmlParameterStats> params = new ArrayList<>(); switch (type) { case cookie: params.addAll(this.cookieParams.values()); break; case url: params.addAll(this.urlParams.values()); break; case form: params.addAll(this.formParams.values()); break; case header: params.addAll(this.headerParams.values()); break; } return params; }
Source:
<code>private void collectEntityAndStatement(AbstractTripleStore database, int keyArity, IV ontolexLexicalForm, IV ontolexSense, String statementPrefix, IV entity, Collection<IV<?, ?>> subjStatements, Collection<IV<?, ?>> subjEntity) { subjEntity.add(entity); Collection<IV<?, ?>> allReferenced = new HashSet<>(); collectReferenced(database, keyArity, statementPrefix, entity, allReferenced); if (ontolexLexicalForm != null) { IChunkedOrderedIterator<ISPO> itr = prepareAccessPath(database, keyArity, new Constant<IV>(entity), new Constant<IV>(ontolexLexicalForm), Var.var("o"), null, <START> keyArity == 3 ? <END> SPOKeyOrder.SPO : SPOKeyOrder.SPOC); while (itr.hasNext()) { IV subId = itr.next().o(); subjEntity.add(subId); collectReferenced(database, keyArity, statementPrefix, subId, allReferenced); } } if (ontolexSense != null) { IChunkedOrderedIterator<ISPO> itr = prepareAccessPath(database, keyArity, new Constant<IV>(entity), new Constant<IV>(ontolexSense), Var.var("o"), null, keyArity == 3 ? SPOKeyOrder.SPO : SPOKeyOrder.SPOC); while (itr.hasNext()) { IV subId = itr.next().o(); subjEntity.add(subId); collectReferenced(database, keyArity, statementPrefix, subId, allReferenced); } } final Map<IV<?, ?>, BigdataValue> terms = database.getLexiconRelation().getTerms(allReferenced, 4000 , 4000 ); for (BigdataValue subj: terms.values()) { if (subj.stringValue().startsWith(statementPrefix)) { subjStatements.add(subj.getIV()); } } }</code><technical_language>pass keyOrder instead of comparing time thing</technical_language>

Target:
private void collectEntityAndStatement(AbstractTripleStore database, int keyArity, IV ontolexLexicalForm, IV ontolexSense, String statementPrefix, IV entity, Collection<IV<?, ?>> subjStatements, Collection<IV<?, ?>> subjEntity) { subjEntity.add(entity); Collection<IV<?, ?>> allReferenced = new HashSet<>(); collectReferenced(database, keyArity, entity, allReferenced); collectSubjects(database, keyArity, entity, ontolexLexicalForm, subjEntity, allReferenced); collectSubjects(database, keyArity, entity, ontolexSense, subjEntity, allReferenced); final Map<IV<?, ?>, BigdataValue> terms = database.getLexiconRelation().getTerms(allReferenced, 4000 , 4000 ); for (BigdataValue subj: terms.values()) { if (subj.stringValue().startsWith(statementPrefix)) { subjStatements.add(subj.getIV()); } } }
Source:
<code>public void process(SuroInput input, MessageContainer msg) throws Exception { if (Strings.isNullOrEmpty(msg.getRoutingKey())) { DynamicCounter.increment( MonitorConfig.builder(TagKey.DROPPED_COUNT).withTag("reason", "emptyRoutingKey").build()); return; } DynamicCounter.increment( MonitorConfig .builder(TagKey.RECV_COUNT) .withTag("routingKey", msg.getRoutingKey()) .build()); RoutingMap.RoutingInfo info = routingMap.getRoutingInfo(msg.getRoutingKey()); if (info == null) { Sink defaultSink = sinkManager.getSink("default"); input.setPause(defaultSink.checkPause()); defaultSink.writeTo(msg); } else if (info.doFilter(msg)) { List<Route> routes = info.getWhere(); for (Route route : routes) { if (route.doFilter(msg)) { Sink sink = sinkManager.getSink(route.getSink()); input.setPause(sink.checkPause()); if (!Strings.isNullOrEmpty(route.getAlias())) { sink.writeTo( new DefaultMessageContainer( new Message(route.getAlias(), msg.getMessage().getPayload()), jsonMapper)); } else { sink.writeTo(msg); } <START> DynamicCounter.increment( <END> MonitorConfig .builder(TagKey.PROCESSED_COUNT) .withTag("routingKey", msg.getRoutingKey()) .withTag("sinkId", route.getSink()) .build()); } } } }</code><technical_language>I woud suggest move this line 83. "attempt" is clearer "processed"</technical_language>

Target:
public void process(SuroInput input, MessageContainer msg) throws Exception { if (Strings.isNullOrEmpty(msg.getRoutingKey())) { DynamicCounter.increment( MonitorConfig.builder(TagKey.DROPPED_COUNT).withTag("reason", "emptyRoutingKey").build()); return; } DynamicCounter.increment( MonitorConfig .builder(TagKey.RECV_COUNT) .withTag("routingKey", msg.getRoutingKey()) .build()); RoutingMap.RoutingInfo info = routingMap.getRoutingInfo(msg.getRoutingKey()); if (info == null) { Sink defaultSink = sinkManager.getSink("default"); input.setPause(defaultSink.checkPause()); defaultSink.writeTo(msg); } else if (info.doFilter(msg)) { List<Route> routes = info.getWhere(); for (Route route : routes) { if (route.doFilter(msg)) { Sink sink = sinkManager.getSink(route.getSink()); input.setPause(sink.checkPause()); if (!Strings.isNullOrEmpty(route.getAlias())) { sink.writeTo( new DefaultMessageContainer( new Message(route.getAlias(), msg.getMessage().getPayload()), jsonMapper)); } else { sink.writeTo(msg); } DynamicCounter.increment( MonitorConfig .builder(TagKey.ATTEMPTED_COUNT) .withTag("routingKey", msg.getRoutingKey()) .withTag("sinkId", route.getSink()) .build()); } } } }
Source:
<code>public Poll addNthAnswer(String answer, int number) { wait.forElementClickable(answersInputsList.get(number)); <START> answersInputsList.get(number).sendKeys(answer); <END> return this; }</code><technical_language>Add a check for index out of bound exception: <LINK_0></technical_language>

Target:
public Poll addNthAnswer(String answer, int number) { try { wait.forElementClickable(answersInputsList.get(number)); answersInputsList.get(number).sendKeys(answer); } catch (Exception e) { PageObjectLogging.log("Could not add nth answer", e, false); } return this; }
Source:
<code>public Req understand(final Comment.Smart comment, final URI home) throws IOException { final Issue issue = comment.issue(); Logger.info( this, "release request found in %s#%d, comment #%d", issue.repo().coordinates(), issue.number(), comment.number() ); final Req req; <START> final Matcher matcher = Pattern.compile(".*release.*`(.+)`.*") <END> .matcher(comment.body()); if (matcher.matches()) { final String name = matcher.group(1); final ReleaseTag release = new ReleaseTag(issue.repo(), name); if (release.allowed()) { new Answer(comment).post( true, String.format( QnRelease.PHRASES.getString("QnRelease.start"), home.toASCIIString() ) ); req = new Req.Simple( "release", new ImmutableMap.Builder<String, String>() .put("head_branch", "master") .put( "head", String.format( "git@github.com:%s.git", comment.issue().repo().coordinates() ) ).build() ); } else { new Answer(comment).post( false, String.format( QnRelease.PHRASES.getString("QnRelease.invalid-tag"), name, release.reference() ) ); req = Req.EMPTY; } } else { new Answer(comment).post( false, QnRelease.PHRASES.getString("QnRelease.missing-tag") ); req = Req.EMPTY; } return req; }</code><technical_language>@original-brownbear performance problem? extracted constant</technical_language>

Target:
public Req understand(final Comment.Smart comment, final URI home) throws IOException { final Issue issue = comment.issue(); Logger.info( this, "release request found in %s#%d, comment #%d", issue.repo().coordinates(), issue.number(), comment.number() ); final Req req; final Matcher matcher = QnRelease.QUESTION_PATTERN .matcher(comment.body()); if (matcher.find()) { final String name = matcher.group(1); final ReleaseTag release = new ReleaseTag(issue.repo(), name); if (release.allowed()) { req = QnRelease.affirmative(comment, home); } else { new Answer(comment).post( false, String.format( QnRelease.PHRASES.getString("QnRelease.invalid-tag"), name, release.reference() ) ); req = Req.EMPTY; } } else { req = QnRelease.affirmative(comment, home); } return req; }
Source:
<code>public boolean checkMuteTimeout(final long currentTime) { if (getMuteTimeout() > 0 && getMuteTimeout() < currentTime && isMuted()) { final MuteStatusChangeEvent event = new MuteStatusChangeEvent(this, null, false); ess.getServer().getPluginManager().callEvent(event); if (!event.isCancelled()) { setMuteTimeout(0); sendMessage(tl("canTalkAgain")); setMuted(false); <START> setMuteReason (""); <END> return true; } } return false; }</code><technical_language>Formatting - spaces method names brackets</technical_language>

Target:
public boolean checkMuteTimeout(final long currentTime) { if (getMuteTimeout() > 0 && getMuteTimeout() < currentTime && isMuted()) { final MuteStatusChangeEvent event = new MuteStatusChangeEvent(this, null, false); ess.getServer().getPluginManager().callEvent(event); if (!event.isCancelled()) { setMuteTimeout(0); sendMessage(tl("canTalkAgain")); setMuted(false); setMuteReason(null); return true; } } return false; }
Source:
<code>protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) { String currentDomain = request.getHeader("Host"); <START> Document siteMapDocument = this.siteMapGenerators.get(currentDomain).getSiteMap(request.getResourceResolver()); <END> printSiteMap(siteMapDocument, response); }</code><technical_language>@kalyanar this anonymous resourceResolver? If a logged in user (with access non-public pages) hits this servlet, a sitemap of non-public pages listed in get cached in dispatcher? i missing something? This feels expensive of a page cache. I of a real case want non-anonymously accessible content in a sitemap.xml? This of result in empty sitemaps author again, sitemap.xml's arent useful there</technical_language>

Target:
protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) { String currentDomain = request.getHeader("Host"); Document siteMapDocument = this.siteMapGenerators.get(currentDomain).getSiteMap(anonymousResolver); printSiteMap(siteMapDocument, response); }
Source:
<code>public boolean write() throws IOException { Send send = networkSend.getPayload(); if (send == null) { throw new IllegalStateException("Registered for write interest but no response attached to key."); } long startTimeMs = SystemTime.getInstance().milliseconds(); <START> long written = send.writeTo(socketChannel); <END> long writeTimeMs = SystemTime.getInstance().milliseconds() - startTimeMs; logger.trace("Bytes written to using key Time: {}", written, socketChannel.socket().getRemoteSocketAddress(), getConnectionId(), writeTimeMs); if (written > 0) { metrics.plaintextSendTimePerKB.update(writeTimeMs * 1024 / written); } return send.isSendComplete(); }</code><technical_language>"bytesWritten" similar lines bytesRead</technical_language>

Target:
public boolean write() throws IOException { Send send = networkSend.getPayload(); if (send == null) { throw new IllegalStateException("Registered for write interest but no response attached to key."); } long startTimeMs = SystemTime.getInstance().milliseconds(); long bytesWritten = send.writeTo(socketChannel); long writeTimeMs = SystemTime.getInstance().milliseconds() - startTimeMs; logger.trace("Bytes written to using key Time: {}", bytesWritten, socketChannel.socket().getRemoteSocketAddress(), getConnectionId(), writeTimeMs); if (bytesWritten > 0) { metrics.plaintextSendTimePerKB.update(writeTimeMs * 1024 / bytesWritten); } return send.isSendComplete(); }
Source:
<code>public void init() { super.init(); this.options = new FrontEndScannerOptions(); this.api = new FrontEndScannerAPI(this); this.api.addApiOptions(options); <START> this.proxyListener = new FrontEndScannerProxyListener(api, options, LOGGER); <END> this.extensionScript = Control.getSingleton().getExtensionLoader().getExtension(ExtensionScript.class); }</code><technical_language>a strange pass LOGGER. Is reason listener LOGGER constant</technical_language>

Target:
public void init() { super.init(); this.options = new FrontEndScannerOptions(); this.api = new FrontEndScannerAPI(this); this.api.addApiOptions(options); this.proxyListener = new FrontEndScannerProxyListener(api, options); this.extensionScript = Control.getSingleton().getExtensionLoader().getExtension(ExtensionScript.class); }
Source:
<code>protected List<Worker<? extends BenchmarkModule>> makeWorkersImpl(boolean verbose) throws IOException { LOG.info(String.format("Initializing %d %s", <START> workConf.getTerminals(), WikipediaWorker.class.getSimpleName())); <END> List<Worker<? extends BenchmarkModule>> workers = new ArrayList<Worker<? extends BenchmarkModule>>(); for (int i = 0; i < workConf.getTerminals(); ++i) { WikipediaWorker worker = new WikipediaWorker(this, i); workers.add(worker); } return workers; }</code><technical_language>Switch LOG.debug</technical_language>

Target:
protected List<Worker<? extends BenchmarkModule>> makeWorkersImpl(boolean verbose) throws IOException { LOG.debug(String.format("Initializing %d %s", this.workConf.getTerminals(), WikipediaWorker.class.getSimpleName())); List<Worker<? extends BenchmarkModule>> workers = new ArrayList<Worker<? extends BenchmarkModule>>(); for (int i = 0; i < this.workConf.getTerminals(); ++i) { WikipediaWorker worker = new WikipediaWorker(this, i); workers.add(worker); } return workers; }
Source:
<code>public void setUp() throws Exception { System.setProperty("org.apache.logging.log4j.simplelog.StatusLogger.level", "INFO"); MockLogAppender.setupLogging(); <START> TemporaryDatabasePostgreSQL temp = new TemporaryDatabasePostgreSQL(); <END> }</code><technical_language>AFAICT this nothing, for initialization? If need variable</technical_language>

Target:
public void setUp() throws Exception { System.setProperty("org.apache.logging.log4j.simplelog.StatusLogger.level", "INFO"); MockLogAppender.setupLogging(); }
Source:
<code>public static GAV parse(String line) { int currentIndex = 0; int colonIndex = -1; colonIndex = nextColonIndex(line, currentIndex); if (colonIndex < 0) { throw new IllegalArgumentException("Invalid line: '" + line + "'"); <START> } <END> String groupId = substring(line, currentIndex, colonIndex); currentIndex = colonIndex + 1; colonIndex = nextColonIndex(line, currentIndex); if (colonIndex < 0) { throw new IllegalArgumentException("Invalid line: '" + line + "'"); } String artifactId = substring(line, currentIndex, colonIndex); currentIndex = colonIndex + 1; String version = substring(line, currentIndex, line.length()); return new GAV(groupId, artifactId, version); }</code><technical_language>Move this check nextColonIndex instead of in this method</technical_language>

Target:
public static GAV parse(String line) throws IllegalArgumentException { int currentIndex = 0; int colonIndex = -1; colonIndex = nextColonIndex(line, currentIndex); String groupId = substring(line, currentIndex, colonIndex); currentIndex = colonIndex + 1; colonIndex = nextColonIndex(line, currentIndex); String artifactId = substring(line, currentIndex, colonIndex); currentIndex = colonIndex + 1; String version = substring(line, currentIndex, line.length()); return new GAV(groupId, artifactId, version); }
Source:
<code>public Response preview(Action action) { <START> action.setAsync(false); <END> TryBackToAllSnapshotsOfVmParameters tryBackParams = new TryBackToAllSnapshotsOfVmParameters(parentId, guid); Response response = doAction(VdcActionType.TryBackToAllSnapshotsOfVm, tryBackParams, action, PollingType.JOB); return response; }</code><technical_language>this action sync</technical_language>

Target:
public Response preview(Action action) { TryBackToAllSnapshotsOfVmParameters tryBackParams = new TryBackToAllSnapshotsOfVmParameters(parentId, guid); Response response = doAction(VdcActionType.TryBackToAllSnapshotsOfVm, tryBackParams, action); return response; }
Source:
<code>private boolean validateStoragePropertiesUpdate() { <START> if (!checkStorageDomainStatusNotEqual(StorageDomainStatus.Locked) || !validateStorageNameUpdate()) { <END> return false; } List<String> props = ObjectIdentityChecker.GetChangedFields(oldDomain, getStorageDomain() .getStorageStaticData()); if (props.isEmpty()) { return true; } props.remove("storageName"); props.remove("description"); props.remove("comment"); if (!props.isEmpty()) { log.warn("There was an attempt to update the following fields although they are not allowed to be updated: {}", StringUtils.join(props, ",")); return failCanDoAction(VdcBllMessages.ERROR_CANNOT_CHANGE_STORAGE_DOMAIN_FIELDS); } return true; }</code><technical_language>If storage is locked, do - this check, early return false there</technical_language>

Target:
private boolean validateStoragePropertiesUpdate() { if (!checkStorageDomainStatusNotEqual(StorageDomainStatus.Locked) || !validateStorageNameUpdate()) { return false; } List<String> props = ObjectIdentityChecker.GetChangedFields(oldDomain, getStorageDomain() .getStorageStaticData()); props.remove("storageName"); props.remove("description"); props.remove("comment"); if (!props.isEmpty()) { log.warn("There was an attempt to update the following fields although they are not allowed to be updated: {}", StringUtils.join(props, ",")); return failCanDoAction(VdcBllMessages.ERROR_CANNOT_CHANGE_STORAGE_DOMAIN_FIELDS); } return true; }
Source:
<code>private String getSubmissionFormTableHeaderFragmentHtml(String questionNumberString, String responseNumberString) { StringBuilder tableHeaderFragmentHtml = new StringBuilder(); String tableHeaderFragmentTemplate = FeedbackQuestionFormTemplates.RUBRIC_SUBMISSION_FORM_HEADER_FRAGMENT; for(int i = 0; i < numOfRubricChoices; i++) { String tableHeaderCell = FeedbackQuestionFormTemplates.populateTemplate(tableHeaderFragmentTemplate, "${qnIndex}", questionNumberString, "${respIndex}", responseNumberString, "${col}", Integer.toString(i), "${rubricChoiceValue}", (rubricChoices.get(i) + " (" + (numOfRubricChoices-i) + ")")); tableHeaderFragmentHtml.append(tableHeaderCell + Const.EOL); <START> } <END> return tableHeaderFragmentHtml.toString(); }</code><technical_language>a coding style errors here: - for (...) {: notice whitespace before/after brackets - (numOfRubricChoices - i): ditto, before/after sign; similar for other operators + \* / - } in correct position before, revert it</technical_language>

Target:
private String getSubmissionFormTableHeaderFragmentHtml(String questionNumberString, String responseNumberString) { StringBuilder tableHeaderFragmentHtml = new StringBuilder(); String tableHeaderFragmentTemplate = FeedbackQuestionFormTemplates.RUBRIC_SUBMISSION_FORM_HEADER_FRAGMENT; for (int i = 0; i < numOfRubricChoices; i++) { String tableHeaderCell = FeedbackQuestionFormTemplates.populateTemplate(tableHeaderFragmentTemplate, "${qnIndex}", questionNumberString, "${respIndex}", responseNumberString, "${col}", Integer.toString(i), "${rubricChoiceValue}", Sanitizer.sanitizeForHtml(rubricChoices.get(i)) + " (" + (numOfRubricChoices - i) + ")"); tableHeaderFragmentHtml.append(tableHeaderCell + Const.EOL); } return tableHeaderFragmentHtml.toString(); }
Source:
<code>public void addAllReviewers(ChangeAttribute a, Change change) throws OrmException { ResultSet<PatchSetApproval> approvals = db.get().patchSetApprovals().byChange(change.getId()); a.allReviewers = Lists.newArrayList(); <START> Set<Account.Id> accountIdlist = new HashSet<Account.Id>(); <END> for (PatchSetApproval psa : approvals) { Account.Id accountId = psa.getAccountId(); if (!accountIdlist.contains(accountId)) { accountIdlist.add(accountId); a.allReviewers.add(asAccountAttribute(psa.getAccountId())); } } if (a.allReviewers.isEmpty()) { a.allReviewers = null; } }</code><technical_language>Set<Account.Id> accountIdlist = Sets.newHashSet();</technical_language>

Target:
public void addAllReviewers(ChangeAttribute a, Change change) throws OrmException { List<PatchSetApproval> approvals = db.get().patchSetApprovals().byChange(change.getId()).toList(); if (approvals.isEmpty()) { return; } a.allReviewers = Lists.newArrayList(); Set<Account.Id> accountIdlist = Sets.newHashSet(); for (PatchSetApproval psa : approvals) { Account.Id accountId = psa.getAccountId(); if (!accountIdlist.contains(accountId)) { accountIdlist.add(accountId); a.allReviewers.add(asAccountAttribute(psa.getAccountId())); } } }
Source:
<code>public ZestRequest deepCopy () { ZestRequest zr = new ZestRequest(this.getIndex()); zr.setUrl(this.url); zr.setUrlToken(this.urlToken); zr.setData(this.data); zr.setMethod(this.method); zr.setHeaders(this.headers); zr.setFollowRedirects(this.followRedirects); if (this.getResponse()!= null) { zr.setResponse(this.getResponse().deepCopy()); } for (ZestAssertion zt : this.getAssertions()) { zr.addAssertion((ZestAssertion)zt.deepCopy()); } for (ZestCookie cookie : this.cookies) { zr.addCookie(new ZestCookie(cookie.getDomain(), cookie.getName(), cookie.getValue(), cookie.getPath(), cookie.getExpiryDate(), cookie.getSecure())); <START> } <END> zr.setEnabled(this.isEnabled()); return zr; }</code><technical_language>This warrants a test, current code is relying this bug. - Ideally behaviour changes done in another changeset a refactor (specially if noted anywhere), easer review</technical_language>

Target:
public ZestRequest deepCopy () { ZestRequest zr = new ZestRequest(this.getIndex()); zr.setUrl(this.url); zr.setUrlToken(this.urlToken); zr.setData(this.data); zr.setMethod(this.method); zr.setHeaders(this.headers); zr.setFollowRedirects(this.followRedirects); if (this.getResponse()!= null) { zr.setResponse(this.getResponse().deepCopy()); } for (ZestAssertion zt : this.getAssertions()) { zr.addAssertion((ZestAssertion)zt.deepCopy()); } for (ZestCookie cookie : this.cookies) { zr.addCookie(new ZestCookie(cookie.getDomain(), cookie.getName(), cookie.getValue(), cookie.getPath(), cookie.getExpiryDate(), cookie.isSecure())); } zr.setEnabled(this.isEnabled()); return zr; }
Source:
<code>private void setAuthenticatedUser(Api api) { QueryReturnValue returnValue = runQuery(QueryType.GetUserBySessionId, new QueryParametersBase()); DbUser authenticatedUser = (DbUser)returnValue.getReturnValue(); User user = new User(); user.setId(authenticatedUser.getId().toString()); <START> LinkHelper.addLinks(user); <END> api.setAuthenticatedUser(user); }</code><technical_language>Hmm, this add link /ovirt-engine/users/ID displays users existing in users table engine? in this table users assigned direct permission. user logged-in successfully inherits permissions group, this case handled</technical_language>

Target:
private void setAuthenticatedUser(Api api) { QueryReturnValue returnValue = runQuery(QueryType.GetUserBySessionId, new QueryParametersBase()); DbUser authenticatedUser = (DbUser)returnValue.getReturnValue(); User user = new User(); user.setId(authenticatedUser.getId().toString()); LinkHelper.addLinks(user); api.setAuthenticatedUser(user); api.setEffectiveUser(user); }
Source:
<code>public DemoWorkflow() { <START> super(DEMO_WORKFLOW_TYPE, State.begin, State.error, new WorkflowSettings.Builder().setWakeupParentWhenFinished(true).build()); <END> setDescription("Simple demo workflow: start -> process -> end"); permit(State.begin, State.process); permit(State.process, State.done); }</code><technical_language>Remove wakeup flag settings, added new state type wait, if parent is in wait state wake child finishes</technical_language>

Target:
public DemoWorkflow() { super(DEMO_WORKFLOW_TYPE, State.begin, State.error); setDescription("Simple demo workflow: start -> process -> end"); permit(State.begin, State.process); permit(State.process, State.done); }
Source:
<code><START> public void setConflictValue(boolean missingHook, boolean statusConflict, boolean contentConflict) { <END> this.conflictStatus = 0; if (missingHook) { this.conflictStatus = this.conflictStatus | MISSING_HOOK.getValue(); } if (statusConflict) { this.conflictStatus = this.conflictStatus | STATUS_CONFLICT.getValue(); } if (contentConflict) { this.conflictStatus = this.conflictStatus | CONTENT_CONFLICT.getValue(); } }</code><technical_language>this potentially change existing of conflictStatus, change method name addConflict() ? Currently sounds a setter, isn't</technical_language>

Target:
public void setConflictValue(boolean missingHook, boolean statusConflict, boolean contentConflict) { conflictStatus = 0; if (missingHook) { conflictStatus = conflictStatus | MISSING_HOOK.getValue(); } if (statusConflict) { conflictStatus = conflictStatus | STATUS_CONFLICT.getValue(); } if (contentConflict) { conflictStatus = conflictStatus | CONTENT_CONFLICT.getValue(); } }