auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void analyze(UUID userAnonymizedId, NetworkActivityDto networkActivity) { <START> if (networkActivity.getUrl().length() > MAX_SUPPORTED_URL_LENGTH) <END> { throw AnalysisException.urlTooLong(networkActivity.getUrl().length(), MAX_SUPPORTED_URL_LENGTH); } UserAnonymizedDto userAnonymized = userAnonymizedService.getUserAnonymized(userAnonymizedId); Set<ActivityCategoryDto> matchingActivityCategories = activityCategoryFilterService .getMatchingCategoriesForSmoothwallCategories(networkActivity.getCategories()); analyze(ActivityPayload.createInstance(userAnonymized, networkActivity), matchingActivityCategories); }</code><technical_language>truncate it? for analysis</technical_language>

Target:
public void analyze(UUID userAnonymizedId, NetworkActivityDto networkActivity) { UserAnonymizedDto userAnonymized = userAnonymizedService.getUserAnonymized(userAnonymizedId); Set<ActivityCategoryDto> matchingActivityCategories = activityCategoryFilterService .getMatchingCategoriesForSmoothwallCategories(networkActivity.getCategories()); analyze(ActivityPayload.createInstance(userAnonymized, networkActivity), matchingActivityCategories); }
Source:
<code>private boolean areBricksInTheList(final List<GlusterBrickEntity> bricks, final List<GlusterBrickEntity> searchBricks) { boolean found = false; for (GlusterBrickEntity paramBrick : bricks) { for (GlusterBrickEntity brick : searchBricks) { if (paramBrick.getBrickDirectory().equals(brick.getBrickDirectory()) <START> && paramBrick.getServerId() == brick.getServerId()) { <END> found = true; break; } if (!found) { return found; } } } return found; }</code><technical_language>if paramBrick brickId set brickDirectory serverId</technical_language>

Target:
private boolean areBricksInTheList(final List<GlusterBrickEntity> bricks, final List<GlusterBrickEntity> searchBricks) { boolean found = false; for (GlusterBrickEntity paramBrick : bricks) { for (GlusterBrickEntity brick : searchBricks) { if (paramBrick.getId() == brick.getId() || (paramBrick.getBrickDirectory().equals(brick.getBrickDirectory()) && paramBrick.getServerId() == brick.getServerId())) { found = true; break; } if (!found) { return found; } } } return found; }
Source:
<code>private void ensureRepositoryConfiguration() { if (repository == null) { registerRepository(EventSourcingRepository.builder(aggregateType) <START> .aggregateModel(aggregateModel()) <END> .aggregateFactory(new GenericAggregateFactory<>(aggregateModel())) .eventStore(eventStore) .parameterResolverFactory(getParameterResolverFactory()) .handlerDefinition(getHandlerDefinition()) .repositoryProvider(getRepositoryProvider()) .build()); } }</code><technical_language>aggregateModel() is invoked twice. Consider invoking passing result methods</technical_language>

Target:
private void ensureRepositoryConfiguration() { if (repository == null) { AggregateModel<T> aggregateModel = aggregateModel(); registerRepository(EventSourcingRepository.builder(aggregateType) .aggregateModel(aggregateModel) .aggregateFactory(new GenericAggregateFactory<>(aggregateModel)) .eventStore(eventStore) .parameterResolverFactory(getParameterResolverFactory()) .handlerDefinition(getHandlerDefinition()) .repositoryProvider(getRepositoryProvider()) .build()); } }
Source:
<code>public byte[] serialize() { <START> ByteBuffer buffer = ByteBuffer.allocate(5); <END> buffer.put(TYPE_INTEGER); buffer.putInt(value); return buffer.array(); }</code><technical_language>magic number</technical_language>

Target:
public byte[] serialize() { ByteBuffer buffer = ByteBuffer.allocate(Byte.BYTES + Integer.BYTES); buffer.put(getType().getByte()); buffer.putInt(value); return buffer.array(); }
Source:
<code>protected Collection<String> defaultSuppressionAnnotations() { Collection<String> ignoredStrings = new ArrayList<>(); <START> ignoredStrings.add("VisibleForTesting"); <END> return ignoredStrings; }</code><technical_language>fully qualified class names for proper type matching. care are: com.google.common.annotations.VisibleForTesting android.support.annotation.VisibleForTesting</technical_language>

Target:
protected Collection<String> defaultSuppressionAnnotations() { Collection<String> ignoredStrings = new ArrayList<>(); ignoredStrings.add("com.google.common.annotations.VisibleForTesting"); ignoredStrings.add("android.support.annotation.VisibleForTesting"); return ignoredStrings; }
Source:
<code>public List<Class> getSupportedTypes() { <START> return new ArrayList<>(Arrays.asList(Duration.class)); <END> }</code><technical_language>Collections.singletonList(Duration.class);</technical_language>

Target:
public List<Class> getSupportedTypes() { return Collections.singletonList(Duration.class); }
Source:
<code>public void testSimpleHistograms() <START> { <END> MapType mapType = mapType(VARCHAR, BIGINT); InternalAggregationFunction aggregationFunction = getInternalAggregation(mapType.getTypeSignature(), parseTypeSignature(StandardTypes.VARCHAR)); assertAggregation( aggregationFunction, ImmutableMap.of("a", 1L, "b", 1L, "c", 1L), createStringsBlock("a", "b", "c")); mapType = mapType(BIGINT, BIGINT); aggregationFunction = getMetadata().getFunctionRegistry().getAggregateFunctionImplementation( new Signature(NAME, AGGREGATE, mapType.getTypeSignature(), parseTypeSignature(StandardTypes.BIGINT))); assertAggregation( aggregationFunction, ImmutableMap.of(100L, 1L, 200L, 1L, 300L, 1L), createLongsBlock(100L, 200L, 300L)); mapType = mapType(DOUBLE, BIGINT); aggregationFunction = getMetadata().getFunctionRegistry().getAggregateFunctionImplementation( new Signature(NAME, AGGREGATE, mapType.getTypeSignature(), parseTypeSignature(StandardTypes.DOUBLE))); assertAggregation( aggregationFunction, ImmutableMap.of(0.1, 1L, 0.3, 1L, 0.2, 1L), createDoublesBlock(0.1, 0.3, 0.2)); mapType = mapType(BOOLEAN, BIGINT); aggregationFunction = getMetadata().getFunctionRegistry().getAggregateFunctionImplementation( new Signature(NAME, AGGREGATE, mapType.getTypeSignature(), parseTypeSignature(StandardTypes.BOOLEAN))); assertAggregation( aggregationFunction, ImmutableMap.of(true, 1L, false, 1L), createBooleansBlock(true, false)); }</code><technical_language>this getInternalDefaultAggregation well? question for other tests</technical_language>

Target:
public void testSimpleHistograms() { MapType mapType = mapType(VARCHAR, BIGINT); InternalAggregationFunction aggregationFunction = getAggregation(mapType.getTypeSignature(), parseTypeSignature(StandardTypes.VARCHAR)); assertAggregation( aggregationFunction, ImmutableMap.of("a", 1L, "b", 1L, "c", 1L), createStringsBlock("a", "b", "c")); mapType = mapType(BIGINT, BIGINT); aggregationFunction = getMetadata().getFunctionRegistry().getAggregateFunctionImplementation( new Signature(NAME, AGGREGATE, mapType.getTypeSignature(), parseTypeSignature(StandardTypes.BIGINT))); assertAggregation( aggregationFunction, ImmutableMap.of(100L, 1L, 200L, 1L, 300L, 1L), createLongsBlock(100L, 200L, 300L)); mapType = mapType(DOUBLE, BIGINT); aggregationFunction = getMetadata().getFunctionRegistry().getAggregateFunctionImplementation( new Signature(NAME, AGGREGATE, mapType.getTypeSignature(), parseTypeSignature(StandardTypes.DOUBLE))); assertAggregation( aggregationFunction, ImmutableMap.of(0.1, 1L, 0.3, 1L, 0.2, 1L), createDoublesBlock(0.1, 0.3, 0.2)); mapType = mapType(BOOLEAN, BIGINT); aggregationFunction = getMetadata().getFunctionRegistry().getAggregateFunctionImplementation( new Signature(NAME, AGGREGATE, mapType.getTypeSignature(), parseTypeSignature(StandardTypes.BOOLEAN))); assertAggregation( aggregationFunction, ImmutableMap.of(true, 1L, false, 1L), createBooleansBlock(true, false)); }
Source:
<code>public void findsTarget() { final SootMethod sootMethod = prepareTarget("<" + TEST_TARGET_CLASS + ": void test()>", TEST_TARGET_CLASS); <START> Assert.assertNotNull("Could not find target method. System test setup seems to be incorrect.", sootMethod); <END> Assert.assertTrue(sootMethod.isConcrete()); Assert.assertNotNull(sootMethod.retrieveActiveBody()); for (Unit u : sootMethod.getActiveBody().getUnits()) { if (u instanceof AssignStmt) { Value right = ((AssignStmt) u).getRightOp(); if (right instanceof InvokeExpr) { } } } }</code><technical_language>want place this prepareTarget method inform user a potentially missing execution of "mvn test-compil" (or this goal is called) a potential misspelling of target method</technical_language>

Target:
public void findsTarget() { String methodSignature = methodSigFromComponents(TEST_TARGET_CLASS, "void", "test", ""); final SootMethod sootMethod = prepareTarget(methodSignature, TEST_TARGET_CLASS); Assert.assertTrue(sootMethod.isConcrete()); Assert.assertNotNull(sootMethod.retrieveActiveBody()); for (Unit u : sootMethod.getActiveBody().getUnits()) { if (u instanceof AssignStmt) { Value right = ((AssignStmt) u).getRightOp(); if (right instanceof InvokeExpr) { SootMethod m = ((InvokeExpr) right).getMethodRef().resolve(); Assert.assertFalse(m.isPhantom()); Assert.assertTrue(m.isDeclared()); if (m.getName().equals("invoke")) { Assert.assertTrue(m.isNative()); } } } } }
Source:
<code>private Optional<TableToSweep> getTableToSweep() { return txManager.runTaskWithRetry(new TransactionTask<Optional<TableToSweep>, RuntimeException>() { @Override public Optional<TableToSweep> execute(Transaction tx) { Optional<SweepProgress> progress = sweepProgressStore.loadProgress(tx); if (progress.isPresent()) { return Optional.of(new TableToSweep(progress.get().tableRef(), progress.get())); } else { Optional<TableReference> nextTable = nextTableToSweepProvider.chooseNextTableToSweep( tx, sweepRunner.getConservativeSweepTimestamp()); if (nextTable.isPresent()) { <START> log.info("Now starting to sweep {}.", UnsafeArg.of("next table", nextTable)); <END> return Optional.of(new TableToSweep(nextTable.get(), null)); } else { return Optional.empty(); } } } }); }</code><technical_language>Leave debug especially table is collected.. finished sweeping info is enough confirm sweep running</technical_language>

Target:
private Optional<TableToSweep> getTableToSweep() { return txManager.runTaskWithRetry(new TransactionTask<Optional<TableToSweep>, RuntimeException>() { @Override public Optional<TableToSweep> execute(Transaction tx) { Optional<SweepProgress> progress = sweepProgressStore.loadProgress(tx); if (progress.isPresent()) { return Optional.of(new TableToSweep(progress.get().tableRef(), progress.get())); } else { Optional<TableReference> nextTable = nextTableToSweepProvider.chooseNextTableToSweep( tx, sweepRunner.getConservativeSweepTimestamp()); if (nextTable.isPresent()) { log.debug("Now starting to sweep {}.", UnsafeArg.of("table name", nextTable)); return Optional.of(new TableToSweep(nextTable.get(), null)); } else { return Optional.empty(); } } } }); }
Source:
<code>private static List<String> getInitScriptArguments() { File initScript = getEclipsePluginInitScriptLocation(); try { if (!initScript.exists()) { Files.createParentDirs(initScript); Files.touch(initScript); URL resource = GradleVersion.class.getResource(INITSCRIPT_LOCATION); if (resource == null) { throw new GradlePluginsRuntimeException(String.format("Resource '%s' not found.", INITSCRIPT_LOCATION)); } URLConnection connection = resource.openConnection(); <START> connection.setUseCaches(false); <END> try (InputStream inputStream = connection.getInputStream()) { Files.asByteSink(initScript).writeFrom(inputStream); } } return Arrays.asList("--init-script", initScript.getAbsolutePath()); } catch (IOException e) { throw new GradlePluginsRuntimeException("Failed to create init script", e); } }</code><technical_language>is this necessary? reading static content here</technical_language>

Target:
private static List<String> getInitScriptArguments() { File initScript = getEclipsePluginInitScriptLocation(); try { if (!initScript.exists()) { Files.createParentDirs(initScript); Files.touch(initScript); URL resource = GradleVersion.class.getResource(INITSCRIPT_LOCATION); if (resource == null) { throw new GradlePluginsRuntimeException(String.format("Resource '%s' not found.", INITSCRIPT_LOCATION)); } URLConnection connection = resource.openConnection(); try (InputStream inputStream = connection.getInputStream()) { Files.asByteSink(initScript).writeFrom(inputStream); } } return Arrays.asList("--init-script", initScript.getAbsolutePath()); } catch (IOException e) { throw new GradlePluginsRuntimeException("Failed to create init script", e); } }
Source:
<code>private PaxosStateLog<PaxosValue> createFileSystemLog(Client client) { Path dir = useCase.logDirectoryRelativeToDataDirectory(legacyDirectory).resolve(client.value()); <START> String learnerLogDir = Paths.get(dir.toString(), PaxosTimeLockConstants.LEARNER_SUBDIRECTORY_PATH).toString(); <END> return new PaxosStateLogImpl<>(learnerLogDir); }</code><technical_language>nit: dir.resolve(PaxosTimeLockConstants.LEARNER_SUBDIRECTORY_PATH).toString()</technical_language>

Target:
private PaxosStateLog<PaxosValue> createFileSystemLog(Client client) { Path dir = useCase.logDirectoryRelativeToDataDirectory(legacyDirectory).resolve(client.value()); String learnerLogDir = dir.resolve(PaxosTimeLockConstants.LEARNER_SUBDIRECTORY_PATH).toString(); return new PaxosStateLogImpl<>(learnerLogDir); }
Source:
<code>public synchronized void stop() { LOG.info("Stopping event hub system producer..."); streamPartitionSenders.values().forEach((streamPartitionSender) -> { List<CompletableFuture<Void>> futures = new ArrayList<>(); streamPartitionSender.forEach((key, value) -> futures.add(value.close())); CompletableFuture<Void> future = CompletableFuture.allOf(futures.toArray(new CompletableFuture[futures.size()])); try { future.get(config.getShutdownWaitTimeMS(), TimeUnit.MILLISECONDS); } catch (ExecutionException | InterruptedException e) { LOG.warn("Closing the partition sender failed ", e); } catch (TimeoutException e) { LOG.warn("Closing the partition sender timed out ", e); <START> } <END> }); eventHubClients.values().forEach(ehClient -> ehClient.close(config.getShutdownWaitTimeMS())); eventHubClients.clear(); }</code><technical_language>Move register start</technical_language>

Target:
public synchronized void stop() { LOG.debug("Stopping producer.", pendingFutures.size()); streamPartitionSenders.values().forEach((streamPartitionSender) -> { List<CompletableFuture<Void>> futures = new ArrayList<>(); streamPartitionSender.forEach((key, value) -> futures.add(value.close())); CompletableFuture<Void> future = CompletableFuture.allOf(futures.toArray(new CompletableFuture[futures.size()])); try { future.get(DEFAULT_SHUTDOWN_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); } catch (ExecutionException | InterruptedException | TimeoutException e) { LOG.error("Closing the partition sender failed ", e); } }); eventHubClients.values().forEach(ehClient -> ehClient.close(DEFAULT_SHUTDOWN_TIMEOUT_MILLIS)); eventHubClients.clear(); }
Source:
<code>public void testExcessResourcesAreAssignedOnResourceLoss() { JobScopedResourceTracker tracker = new JobScopedResourceTracker(JobID.generate()); tracker.notifyAcquiredResource(ResourceProfile.ANY); tracker.notifyAcquiredResource(ResourceProfile.ANY); tracker.notifyResourceRequirements(Collections.singleton(ResourceRequirement.create(ResourceProfile.UNKNOWN, 1))); tracker.notifyLostResource(ResourceProfile.ANY); <START> assertThat(tracker.getAcquiredResources(), contains(ResourceRequirement.create(ResourceProfile.ANY, 1))); <END> }</code><technical_language>excess resources fulfill requirement? missing a assertThat(tracker.getRequiredResources(), empty());</technical_language>

Target:
public void testExcessResourcesAreAssignedOnResourceLoss() { JobScopedResourceTracker tracker = new JobScopedResourceTracker(JobID.generate()); tracker.notifyAcquiredResource(ResourceProfile.ANY); tracker.notifyAcquiredResource(ResourceProfile.ANY); tracker.notifyResourceRequirements(Collections.singleton(ResourceRequirement.create(ResourceProfile.UNKNOWN, 1))); tracker.notifyLostResource(ResourceProfile.ANY); assertThat(tracker.getAcquiredResources(), contains(ResourceRequirement.create(ResourceProfile.ANY, 1))); assertThat(tracker.getMissingResources(), empty()); }
Source:
<code>public Object unMarshall(String returnType, InputStream is) { Object unMarshalledObj = null; try { unMarshalledObj = xmlGen.fromXML(returnType, is); } catch (Exception e) { log.error( "Exception Occured while unmarshalling the inputstream to java object of type:" + returnType, e); <START> e.printStackTrace(); <END> } return unMarshalledObj; }</code><technical_language>@manthinaa remove this print</technical_language>

Target:
public Object unMarshall(String returnType, InputStream is) { Object unMarshalledObj = null; try { unMarshalledObj = xmlGen.fromXML(returnType, is); } catch (Exception e) { log.error( "Exception Occured while unmarshalling the inputstream to java object of type:" + returnType, e); } return unMarshalledObj; }
Source:
<code>public void onImageClick(int position) { String baseUrlString = "<LINK_0>"; String barcodePattern = new StringBuilder(product.getCode()) .insert(3, "/") .insert(7, "/") .insert(11, "/") .toString(); <START> String finalUrlString = baseUrlString + barcodePattern + "/" + imageNames.get(position) + ".400" + ".jpg"; <END> openFullScreen(finalUrlString); }</code><technical_language>barcode pattern work for EAN-8 barcodes? Inserting / 11th position sense in case</technical_language>

Target:
public void onImageClick(int position) { String baseUrlString = "<LINK_0>"; String barcodePattern = new StringBuilder(product.getCode()) .insert(3, "/") .insert(7, "/") .insert(11, "/") .toString(); String finalUrlString = baseUrlString + barcodePattern + "/" + imageNames.get(position) + ".jpg"; imgMap.put("imgid", imageNames.get(position)); imgMap.put("id", ProductImageField.OTHER.toString() + '_' + product.getLang()); openFullScreen(finalUrlString); }
Source:
<code>public void testInitialSizeIsZero() throws Exception { factory.setUrl("nonsense invalid url"); factory.setInitialSize(0); ManagedDataSource dataSource = factory.build(metricRegistry, "test"); try { <START> dataSource.start(); <END> } catch (Exception e) { fail(); } }</code><technical_language>Surrounding statement try-catch gain anything. test fail anyway, if uncaught exception occurs</technical_language>

Target:
public void testInitialSizeIsZero() throws Exception { factory.setUrl("nonsense invalid url"); factory.setInitialSize(0); ManagedDataSource dataSource = factory.build(metricRegistry, "test"); dataSource.start(); }
Source:
<code>public void testSetSecuredScalarProperty() { try { DocumentModel doc = new DocumentModelImpl("/", "doc", "Secured"); doc.setProperty(SECURED_SCHEMA, "scalar", "test secure"); fail("A ReadOnlyPropertyException should have been thrown"); } catch (ReadOnlyPropertyException e) { <START> assertEquals("scalar", e.getMessage()); <END> } }</code><technical_language>related this PR, I if message more precise property's path, "Cannot set of property XPATH is readonly"</technical_language>

Target:
public void testSetSecuredScalarProperty() { try { DocumentModel doc = new DocumentModelImpl("/", "doc", "Secured"); doc.setProperty(SECURED_SCHEMA, "scalar", "test secure"); fail("A ReadOnlyPropertyException should have been thrown"); } catch (ReadOnlyPropertyException e) { assertEquals("Cannot set the value of property: scalar since it is readonly", e.getMessage()); } }
Source:
<code>public AcknowledgementType logAudit(LogEventSecureRequestType mess, AssertionType assertion) { AcknowledgementType response = new AcknowledgementType(); AuditRepositoryRecord auditRec = new AuditRepositoryRecord(); EventIdentificationType eventIdentification = mess.getAuditMessage().getEventIdentification(); auditRec.setUserId(null); String eventCommunityId = mess.getRemoteHCID(); LOG.info("auditSourceID : " + eventCommunityId); if (NullChecker.isNotNullish(eventCommunityId)) { auditRec.setRemoteHcid(eventCommunityId); } else { auditRec.setRemoteHcid(""); } auditRec.setDirection(mess.getDirection()); auditRec.setMessage(getBlobFromAuditMessage(mess.getAuditMessage())); XMLGregorianCalendar xMLCalDate = eventIdentification.getEventDateTime(); if (xMLCalDate != null) { auditRec.setEventTimeStamp(convertXMLGregorianCalendarToDate(xMLCalDate)); } auditRec.setEventType("servicetype"); auditRec.setOutcome(0); <START> auditRec.setEventId("evenId"); <END> List<AuditRepositoryRecord> auditRecList = new ArrayList<>(); auditRecList.add(auditRec); LOG.trace("AuditRepositoryOrchImpl.logAudit() -- Calling auditLogDao to insert record into database."); boolean result = auditLogDao.insertAuditRepository(auditRecList); LOG.trace("AuditRepositoryOrchImpl.logAudit() -- Done calling auditLogDao to insert record into database."); if (result) { response.setMessage("Created Log Message in Database..."); } else { response.setMessage("Unable to create Log Message in Database..."); } return response; }</code><technical_language>"servicetype" (lack of camel-casing) "evenId" (missing "t" in event) correct here</technical_language>

Target:
public AcknowledgementType logAudit(LogEventSecureRequestType mess, AssertionType assertion) { AcknowledgementType response = new AcknowledgementType(); AuditRepositoryRecord auditRec = new AuditRepositoryRecord(); EventIdentificationType eventIdentification = mess.getAuditMessage().getEventIdentification(); auditRec.setUserId(null); String eventCommunityId = mess.getRemoteHCID(); LOG.info("auditSourceID : " + eventCommunityId); if (NullChecker.isNotNullish(eventCommunityId)) { auditRec.setRemoteHcid(eventCommunityId); } else { auditRec.setRemoteHcid(""); } auditRec.setDirection(mess.getDirection()); auditRec.setMessage(getBlobFromAuditMessage(mess.getAuditMessage())); XMLGregorianCalendar xMLCalDate = eventIdentification.getEventDateTime(); if (xMLCalDate != null) { auditRec.setEventTimeStamp(convertXMLGregorianCalendarToDate(xMLCalDate)); } auditRec.setEventType("servicetype"); auditRec.setOutcome(0); auditRec.setEventId("EventId"); List<AuditRepositoryRecord> auditRecList = new ArrayList<>(); auditRecList.add(auditRec); LOG.trace("AuditRepositoryOrchImpl.logAudit() -- Calling auditLogDao to insert record into database."); boolean result = auditLogDao.insertAuditRepository(auditRecList); LOG.trace("AuditRepositoryOrchImpl.logAudit() -- Done calling auditLogDao to insert record into database."); if (result) { response.setMessage("Created Log Message in Database..."); } else { response.setMessage("Unable to create Log Message in Database..."); } return response; }
Source:
<code>public int compare(AdminUnitReview o1, AdminUnitReview o2) { List<Comparator<AdminUnitReview>> listComparators = <START> Arrays.asList(expertComparator, gaulCodeComparator, Collections.reverseOrder(dateComparator)); <END> for (Comparator<AdminUnitReview> comparator : listComparators) { int result = comparator.compare(o1, o2); if (result != 0) { return result; } } return 0; }</code><technical_language>a note, Collections.reverseOrder avoided if dateComparator line "return o2.getCreatedDate().compareTo(o1.createdDate()). explicit descendingness</technical_language>

Target:
public int compare(AdminUnitReview o1, AdminUnitReview o2) { return new CompareToBuilder() .append(o1.getExpert().getId(), o2.getExpert().getId()) .append(o1.getAdminUnitGlobalOrTropicalGaulCode(), o2.getAdminUnitGlobalOrTropicalGaulCode()) .append(o2.getCreatedDate(), o1.getCreatedDate()) .toComparison(); }
Source:
<code>private boolean isQuorumNeeded(Operation op) { <START> if (op instanceof QuorumCheckAwareOperation <END> && !((QuorumCheckAwareOperation) op).shouldCheckQuorum()) { return false; } QuorumType type = config.getType(); switch (type) { case WRITE: return isWriteOperation(op); case READ: return isReadOperation(op); case READ_WRITE: return isReadOperation(op) || isWriteOperation(op); default: throw new IllegalStateException("Unhandled quorum type: " + type); } }</code><technical_language>I check this if - based type of operation quorum - quorum is needed. current implementations free, if future implementations of shouldCheckQuorum() methods logic, waste some cycles unnecessarily, of operation quorum type, e.g. MutatingOperation READ quorum</technical_language>

Target:
private boolean isQuorumNeeded(Operation op) { QuorumType type = config.getType(); switch (type) { case WRITE: return isWriteOperation(op) && shouldCheckQuorum(op); case READ: return isReadOperation(op) && shouldCheckQuorum(op); case READ_WRITE: return (isReadOperation(op) || isWriteOperation(op)) && shouldCheckQuorum(op); default: throw new IllegalStateException("Unhandled quorum type: " + type); } }
Source:
<code>public ContainsMatcher(String queryString) { <START> super(null,queryString); <END> }</code><technical_language>SearchQuery is bound a namespace, propagated constructor set a fixed empty null value. please, proper spacing. super(namespace, queryString)</technical_language>

Target:
public ContainsMatcher(String queryString) { super("Test",queryString); }
Source:
<code>public void initialise() { assert driver == null; executor.execute(() -> { driver = createChromeDriver(); logger.info("Successfully initialised browser component and ChromeDriver"); }); <START> if (!isChromeCustomProfileExist()) { <END> login(); } else { runBrowserOperation(() -> driver.get(GitHubURL.MAIN_PAGE, false)); } }</code><technical_language>isChromeCustomProfilePresent a name</technical_language>

Target:
public void initialise() { assert driver == null; executor.execute(() -> { driver = createChromeDriver(); logger.info("Successfully initialised browser component and ChromeDriver"); }); if (!isChromeCustomProfilePresent()) { login(); } else { runBrowserOperation(() -> driver.get(GitHubURL.MAIN_PAGE, false)); } }
Source:
<code>public HllSketch combine(final Object objectA, final Object objectB) { final Union union = new Union(lgK); union.update((HllSketch) objectA); <START> union.update((HllSketch) objectA); <END> return union.getResult(tgtHllType); }</code><technical_language>duplicate line</technical_language>

Target:
public HllSketch combine(final Object objectA, final Object objectB) { final Union union = new Union(lgK); union.update((HllSketch) objectA); union.update((HllSketch) objectB); return union.getResult(tgtHllType); }
Source:
<code>public void removeObsoleteCcJudgments() throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException, JobParametersInvalidException { <START> log.debug("Obsolete judgments removing has started"); <END> JobExecution execution = jobExecutor.forceStartNewJob(ccJudgmentRemoveObsoleteJob); log.debug("Obsolete judgments removing has finished, exit status: {}", execution.getStatus()); }</code><technical_language>Deletion of removed judgments started (?)</technical_language>

Target:
public void removeObsoleteCcJudgments() throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException, JobParametersInvalidException { log.debug("Deletion of removed judgments has started"); JobExecution execution = jobExecutor.forceStartNewJob(ccJudgmentDeleteRemovedJob); log.debug("Deletion of removed judgments has finished, exit status: {}", execution.getStatus()); }
Source:
<code>AdaptiveOperationTracker(RouterConfig routerConfig, NonBlockingRouterMetrics routerMetrics, RouterOperation routerOperation, PartitionId partitionId, String originatingDcName, Time time) { super(routerConfig, routerOperation, partitionId, originatingDcName, true); this.routerConfig = routerConfig; this.routerMetrics = routerMetrics; this.time = time; this.localDcHistogram = getWholeDcTracker(routerOperation, true); this.crossDcHistogram = getWholeDcTracker(routerOperation, false); this.pastDueCounter = getWholeDcPastDueCounter(routerOperation); this.quantile = routerConfig.routerLatencyToleranceQuantile; this.otIterator = new OpTrackerIterator(); if (routerConfig.routerOperationTrackerMetricScope != OperationTrackerScope.Datacenter) { localDcResourceToHistogram = getResourceToLatencyMap(routerOperation, true); crossDcResourceToHistogram = getResourceToLatencyMap(routerOperation, false); } <START> if (parallelism > routerConfig.routerAdaptiveTrackerMaxInflightRequests) { <END> throw new IllegalArgumentException( "Operation tracker parallelism is larger than adaptive tracker max inflight number"); } }</code><technical_language>I good enforce this in RouterConfig constructor startup fail if is set improperly instead of failing continuously runtime</technical_language>

Target:
AdaptiveOperationTracker(RouterConfig routerConfig, NonBlockingRouterMetrics routerMetrics, RouterOperation routerOperation, PartitionId partitionId, String originatingDcName, Time time) { super(routerConfig, routerOperation, partitionId, originatingDcName, true); this.routerConfig = routerConfig; this.routerMetrics = routerMetrics; this.time = time; this.localDcHistogram = getWholeDcTracker(routerOperation, true); this.crossDcHistogram = getWholeDcTracker(routerOperation, false); this.pastDueCounter = getWholeDcPastDueCounter(routerOperation); this.quantile = routerConfig.routerLatencyToleranceQuantile; this.otIterator = new OpTrackerIterator(); if (routerConfig.routerOperationTrackerMetricScope != OperationTrackerScope.Datacenter) { localDcResourceToHistogram = getResourceToLatencyMap(routerOperation, true); crossDcResourceToHistogram = getResourceToLatencyMap(routerOperation, false); } if (parallelism > routerConfig.routerOperationTrackerMaxInflightRequests) { throw new IllegalArgumentException( "Operation tracker parallelism is larger than adaptive tracker max inflight number"); } }
Source:
<code>public String toString() { return MoreObjects.toStringHelper(this) .add("id", Integer.toHexString(System.identityHashCode(this))) .add("class", this.getClass()) <START> .add("uuid", _uuid) <END> .add("Tags", _tags) .add("VersionSet", _versionSet) .toString(); }</code><technical_language>I capitals for fields in toString; this "Uuid"</technical_language>

Target:
public String toString() { return MoreObjects.toStringHelper(this) .add("id", Integer.toHexString(System.identityHashCode(this))) .add("class", this.getClass()) .add("Uuid", _uuid) .add("Tags", _tags) .add("VersionSet", _versionSet) .toString(); }
Source:
<code>public ClosableIterator<Tuple> callStoredProcedure(String storedProcedureName, ProcedureQueryParameters queryParameters, TupleContext tupleContext) { Map.Entry<String, Map> queryAndParams = buildProcedureQueryWithParams( storedProcedureName, queryParameters ); Statement statement = new Statement( queryAndParams.getKey(), queryAndParams.getValue() ); statement.setResultDataContents( Collections.singletonList( Statement.AS_ROW ) ); Statements statements = new Statements(); statements.addStatement( statement ); Long txId = transactionId( tupleContext.getTransactionContext() ); StatementsResponse response; if ( txId != null ) { response = client.executeQueriesInOpenTransaction( txId, statements ); } else { <START> response = client.executeQueriesInNewTransaction( statements ); <END> } validate( response, queryAndParams.getKey() ); return CollectionHelper.newClosableIterator( extractTuples( response ) ); }</code><technical_language>thinking about: if ongoing transaction, allow execute a procedure? neo4j allow that. allow not</technical_language>

Target:
public ClosableIterator<Tuple> callStoredProcedure(String storedProcedureName, ProcedureQueryParameters queryParameters, TupleContext tupleContext) { Map.Entry<String, Map<String, Object>> queryAndParams = buildProcedureQueryWithParams( storedProcedureName, queryParameters ); Statement statement = new Statement( queryAndParams.getKey(), queryAndParams.getValue() ); statement.setResultDataContents( Collections.singletonList( Statement.AS_ROW ) ); Statements statements = new Statements(); statements.addStatement( statement ); Long txId = transactionId( tupleContext.getTransactionContext() ); StatementsResponse response = client.executeQueriesInOpenTransaction( txId, statements ); if ( !response.getErrors().isEmpty() ) { ErrorResponse errorResponse = response.getErrors().get( 0 ); switch ( errorResponse.getCode() ) { case BaseNeo4jDialect.PROCEDURE_CALL_FAILED_CODE: throw log.cannotExecuteStoredProcedure( storedProcedureName, null ); case BaseNeo4jDialect.PROCEDURE_NOT_FOUND_CODE: throw log.procedureWithResolvedNameDoesNotExist( storedProcedureName, null ); default: throw new HibernateException( errorResponse.getMessage() ); } } return new HttpNeo4jMapsTupleIterator( response.getResults().get( 0 ) ); }
Source:
<code>public void execute(DiagnosticContext context) { RestClient restClient = context.getEsRestClient(); String user = context.getDiagnosticInputs().getUser(); Version version = context.getVersion(); String url = null; int major = version.getMajor(); int minor = version.getMinor(); if(major == 2){ url = "/_shield/user/" + user; } else if (major <= 6){ url = "/_xpack/security/user/" + user; } else{ url = "/_security/user/" + user; } boolean hasAuthorization = false; RestResult result = restClient.execQuery(url); if(result.getStatus() == 200){ String userJsonString = result.toString(); JsonNode userNode = JsonYamlUtils.createJsonNodeFromString(userJsonString); JsonNode rolesNode = userNode.path("roles"); List<String> roles = new ArrayList<>(); if(rolesNode.isArray()){ ObjectMapper mapper = new ObjectMapper(); roles = mapper.convertValue(rolesNode, List.class); } <START> if(major < 6){ <END> if(roles.contains("admin")){ hasAuthorization = true; } } else if(major == 6 ){ if(minor < 3){ if(roles.contains("admin")){ hasAuthorization = true; } } else{ if(roles.contains("superuser")){ hasAuthorization = true; } } } else if(major > 6){ if(roles.contains("superuser")){ hasAuthorization = true; } } } if(! hasAuthorization){ logger.warn("The elasticsearch user entered: does not appear to have sufficient authorization to access all collected information", user); logger.warn("If you are using a custom role please verify that it has the admin role for versions prior to 6.3 or the superuser role for subsequent versions."); } }</code><technical_language>This simplified to: java // prior opening of X-Pack "superuser" user role necessary called "admin" if (major < 6 || (major == 6 && minor < 3)) { hasAuthorization = roles.contains("admin"); } else { hasAuthorization = roles.contains("superuser"); }</technical_language>

Target:
public void execute(DiagnosticContext context) { RestClient restClient = context.getEsRestClient(); String user = context.getDiagnosticInputs().getUser(); boolean hasAuthorization = false; Version version = context.getVersion(); String url = null; int major = version.getMajor(); int minor = version.getMinor(); if (major <= 2) { url = "/_shield/user/" + user; } else if (major <= 6) { url = "/_xpack/security/user/" + user; } else { url = "/_security/user/" + user; } RestResult result = restClient.execQuery(url); if (result.getStatus() == 200) { String userJsonString = result.toString(); JsonNode userNode = JsonYamlUtils.createJsonNodeFromString(userJsonString); JsonNode rolesNode = userNode.path("roles"); List<String> roles = new ArrayList<>(); if (rolesNode.isArray()) { ObjectMapper mapper = new ObjectMapper(); roles = mapper.convertValue(rolesNode, List.class); } if (major <= 6) { if (roles.contains("admin")) { hasAuthorization = true; } } else { if (roles.contains("superuser")) { hasAuthorization = true; } } context.setAuthorized(hasAuthorization); } }
Source:
<code>public Resource getResource() { if (resource == null) { <START> return resource; <END> } return cloneResource(resource); }</code><technical_language>'return resource'? this return null (yes, I realize resource is null get "if resource == null" is true, still, odd confusion). "return null" clear is intend happen (that is, return null resource set)</technical_language>

Target:
public Resource getResource() { if (resource == null) { return null; } return cloneResource(resource); }
Source:
<code>public boolean isSupportedArrayComponentType(Class<?> componentType) { <START> return byte.class == componentType || <END> boolean.class == componentType || short.class == componentType || int.class == componentType || long.class == componentType || double.class == componentType; }</code><technical_language>Swap order numbers</technical_language>

Target:
public boolean isSupportedArrayComponentType(Class<?> componentType) { return boolean.class == componentType || byte.class == componentType || short.class == componentType || int.class == componentType || long.class == componentType || double.class == componentType; }
Source:
<code>public void testUnmarshallSubprocessLevelEventEmptyProperties() throws Exception { <START> Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_START_EVENT_FILE_PATH); <END> assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM); StartNoneEvent emptySubprocess = getStartNodeById(diagram, EMPTY_SUBPROCESS_LEVEL_EVENT_ID, StartNoneEvent.class); assertGeneralSet(emptySubprocess.getGeneral(), EMPTY_VALUE, EMPTY_VALUE); assertStartEventSlaDueDate(emptySubprocess.getExecutionSet(), EMPTY_VALUE); }</code><technical_language>Missing assertNotNull for executionSet here</technical_language>

Target:
public void testUnmarshallSubprocessLevelEventEmptyProperties() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_START_EVENT_FILE_PATH); assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM); StartNoneEvent emptySubprocess = getStartNodeById(diagram, EMPTY_SUBPROCESS_LEVEL_EVENT_ID, StartNoneEvent.class); assertGeneralSet(emptySubprocess.getGeneral(), EMPTY_VALUE, EMPTY_VALUE); assertNotNull(emptySubprocess.getExecutionSet()); assertStartEventSlaDueDate(emptySubprocess.getExecutionSet(), EMPTY_VALUE); }
Source:
<code>public List<GenericVertex> search(String namespace, String providerId, String criteria, String context) { SearchCriteria searchCriteria = new SearchCriteria(providerId, namespace, criteria, context); <START> return graphSearchService.search(searchCriteria); <END> }</code><technical_language>here, if search result is empty, return a 204 CONTENT response instead empty 200 OK</technical_language>

Target:
public Response search(String namespace, String providerId, String criteria, String context) { SearchCriteria searchCriteria = new SearchCriteria(providerId, namespace, criteria, context); List<GenericVertex> result = graphSearchService.search(searchCriteria); if(result.size() < 1) { return Response.noContent().build(); } return Response.ok(result).type(MediaType.APPLICATION_JSON_TYPE).build(); }
Source:
<code>public boolean removeNodeId(final String location, final InetAddress address, final int nodeId) { if (address == null) { LOG.warn("removeNodeId: null IP address"); return false; } if (location == null) { <START> List<Map.Entry<Key, Value>> keyValues = m_managedAddresses.entries().stream() .filter(keyValueEntry -> keyValueEntry.getValue().getNodeId() == nodeId).collect(Collectors.toList()); <END> keyValues.forEach(keyValueEntry -> { LOG.debug("removeNodeId: removing IP address from cache:{}", str(address)); m_managedAddresses.remove(keyValueEntry.getKey(), keyValueEntry.getValue()); }); return true; } LOG.debug("removeNodeId: removing IP address from cache: {}:{}", location, str(address)); m_lock.writeLock().lock(); try { final Key key = new Key(location, address); return m_managedAddresses.remove(key, new Value(nodeId, PrimaryType.PRIMARY)) || m_managedAddresses.remove(key, new Value(nodeId, PrimaryType.SECONDARY)) || m_managedAddresses.remove(key, new Value(nodeId, PrimaryType.NOT_ELIGIBLE)); } finally { m_lock.writeLock().unlock(); } }</code><technical_language>delete entries node ID _and_ IP address match? This is currently matching _every_ entry in cache matches node ID</technical_language>

Target:
public boolean removeNodeId(final String location, final InetAddress address, final int nodeId) { if (address == null) { LOG.warn("removeNodeId: null IP address"); return false; } LOG.debug("removeNodeId: removing IP address from cache: {}:{}", location, str(address)); m_lock.writeLock().lock(); try { final Key key = new Key(location, address); return m_managedAddresses.remove(key, new Value(nodeId, PrimaryType.PRIMARY)) || m_managedAddresses.remove(key, new Value(nodeId, PrimaryType.SECONDARY)) || m_managedAddresses.remove(key, new Value(nodeId, PrimaryType.NOT_ELIGIBLE)); } finally { m_lock.writeLock().unlock(); } }
Source:
<code>private boolean shouldRedraw(Repository db, AnyObjectId headId, List<FilterPath> paths) { boolean pathChanged = pathChanged(pathFilters, paths); boolean headChanged = headId == null || !headId.equals(currentHeadId); boolean repoChanged = false; boolean allBranchesChanged = currentShowAllBranches != store .getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_ALL_BRANCHES); currentShowAllBranches = store .getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_ALL_BRANCHES); boolean additionalRefsChange = currentShowAdditionalRefs != store .getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_ADDITIONAL_REFS); currentShowAdditionalRefs = store .getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_ADDITIONAL_REFS); boolean showNotesChanged = currentShowNotes != store .getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_NOTES); currentShowNotes = store .getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_NOTES); boolean followRenamesChanged = currentFollowRenames != getFollowRenames(); currentFollowRenames = getFollowRenames(); if (!db.equals(currentRepo)) { repoChanged = true; currentRepo = db; } return pathChanged <START> || hasWalk == false || headChanged || repoChanged || allBranchesChanged <END> || additionalRefsChange || showNotesChanged || followRenamesChanged; }</code><technical_language>Is hasWalk needed? initially set false GitHistoryPage is instantiated, time history is displayed, condition changes (it's set false again). In initial case, headChanged true, currentHeadId is null instantiation, right? If so, hasWalk condition is redundant</technical_language>

Target:
private boolean shouldRedraw(Repository db, AnyObjectId headId, List<FilterPath> paths) { boolean pathChanged = pathChanged(pathFilters, paths); boolean headChanged = headId == null || !headId.equals(currentHeadId); boolean repoChanged = false; boolean allBranchesChanged = currentShowAllBranches != store .getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_ALL_BRANCHES); currentShowAllBranches = store .getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_ALL_BRANCHES); boolean additionalRefsChange = currentShowAdditionalRefs != store .getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_ADDITIONAL_REFS); currentShowAdditionalRefs = store .getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_ADDITIONAL_REFS); boolean showNotesChanged = currentShowNotes != store .getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_NOTES); currentShowNotes = store .getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_NOTES); boolean followRenamesChanged = currentFollowRenames != getFollowRenames(); currentFollowRenames = getFollowRenames(); if (!db.equals(currentRepo)) { repoChanged = true; currentRepo = db; } return pathChanged || headChanged || repoChanged || allBranchesChanged || additionalRefsChange || showNotesChanged || followRenamesChanged; }
Source:
<code>protected final void checkBooleanType(final Schema schema, final Schema stateSchema) { <START> Type leftType = getLeft().getOutputType(schema, null); <END> Type rightType = getRight().getOutputType(schema, null); Preconditions.checkArgument(leftType == Type.BOOLEAN_TYPE, "%s cannot handle left child [%s] of Type %s", getClass().getSimpleName(), getLeft(), leftType); Preconditions.checkArgument(rightType == Type.BOOLEAN_TYPE, "%s cannot handle right child [%s] of Type %s", getClass().getSimpleName(), getRight(), rightType); }</code><technical_language>is stateSchema passed in? E.g., left child referencing a state variable</technical_language>

Target:
protected final void checkBooleanType(final Schema schema, final Schema stateSchema) { Type leftType = getLeft().getOutputType(schema, stateSchema); Type rightType = getRight().getOutputType(schema, stateSchema); Preconditions.checkArgument(leftType == Type.BOOLEAN_TYPE, "%s cannot handle left child [%s] of Type %s", getClass().getSimpleName(), getLeft(), leftType); Preconditions.checkArgument(rightType == Type.BOOLEAN_TYPE, "%s cannot handle right child [%s] of Type %s", getClass().getSimpleName(), getRight(), rightType); }
Source:
<code>public static AggregateServerConnectionConfiguration from(String urlText, String username, char[] password) { URL url; try { url = new URL(urlText); } catch (MalformedURLException e) { <START> throw new BriefcaseException("Invalid URL " + urlText); <END> } return new AggregateServerConnectionConfiguration(url, Optional.ofNullable(Credentials.from(username, Arrays.toString(password)))); }</code><technical_language>lose causing exception :) java throw new BriefcaseException("Invalid URL " + urlText, e);</technical_language>

Target:
public static AggregateServerConnectionConfiguration from(String urlText, String username, char[] password) { URL url; try { url = new URL(urlText); } catch (MalformedURLException e) { throw new BriefcaseException("Invalid URL " + urlText, e); } Optional<String> optUsername = Optional.ofNullable(username); Optional<String> optPassword = Optional.of(password).map(Arrays::toString).filter(String::isEmpty); Optional<Credentials> from = optUsername.isPresent() && optPassword.isPresent() ? Optional.of(Credentials.from(optUsername.get(), optPassword.get())) : Optional.empty(); return new AggregateServerConnectionConfiguration(url, from); }
Source:
<code>private void processString(String buildFileName) { IFile buildFile = AntUtil.getFileForLocation(buildFileName, null); if (!AntUtil.isKnownAntFile(buildFile)) { return; } String name = buildFile.getFullPath().toString(); for (AntProjectNode <START> existingProject2 : <END> view.getProjects()) { AntProjectNodeProxy existingProject = (AntProjectNodeProxy) existingProject2; if (existingProject.getBuildFileName().equals(name)) { return; } } AntProjectNode project = new AntProjectNodeProxy(name); view.addProject(project); }</code><technical_language>rename node</technical_language>

Target:
private void processString(String buildFileName) { IFile buildFile = AntUtil.getFileForLocation(buildFileName, null); if (!AntUtil.isKnownAntFile(buildFile)) { return; } String name = buildFile.getFullPath().toString(); for (AntProjectNode node : view.getProjects()) { AntProjectNodeProxy existingProject = (AntProjectNodeProxy) node; if (existingProject.getBuildFileName().equals(name)) { return; } } AntProjectNode project = new AntProjectNodeProxy(name); view.addProject(project); }
Source:
<code>public void onBuildStart(AbstractBuild<?, ?> build, TaskListener listener, GHRepository repo) throws GhprbCommitStatusException { String startedStatus = getDescriptor().getStartedStatusDefault(this); boolean showMatrixStatus = getDescriptor().getShowMatrixStatusDefault(this); if (StringUtils.equals(startedStatus, "--none--")) { return; } GhprbCause c = Ghprb.getCause(build); StringBuilder sb = new StringBuilder(); if (StringUtils.isEmpty(startedStatus)) { sb.append("Build started"); sb.append(c.isMerged() ? " sha1 is merged." : " sha1 is original commit."); } else { sb.append(Ghprb.replaceMacros(build, listener, startedStatus)); } <START> if((showMatrixStatus && build.getProject() instanceof MatrixProject)){ <END> return; } createCommitStatus(build, listener, sb.toString(), repo, GHCommitState.PENDING); }</code><technical_language>below, !showMatrixStatus</technical_language>

Target:
public void onBuildStart(AbstractBuild<?, ?> build, TaskListener listener, GHRepository repo) throws GhprbCommitStatusException { String startedStatus = getDescriptor().getStartedStatusDefault(this); boolean showMatrixStatus = getDescriptor().getShowMatrixStatusDefault(this); if (StringUtils.equals(startedStatus, "--none--")) { return; } GhprbCause c = Ghprb.getCause(build); StringBuilder sb = new StringBuilder(); if (StringUtils.isEmpty(startedStatus)) { sb.append("Build started"); sb.append(c.isMerged() ? " sha1 is merged." : " sha1 is original commit."); } else { sb.append(Ghprb.replaceMacros(build, listener, startedStatus)); } if(showMatrixStatus && !(build.getProject() instanceof MatrixProject)){ return; } createCommitStatus(build, listener, sb.toString(), repo, GHCommitState.PENDING); }