auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void parcelableTest() { TimeRange range = new TimeRange(new Date(1), new Date(100)); Integer value = 25; AirConditionerState air1 = new AirConditionerState(); air1.currentTemperature = 25; air1.power = false; HistoryState<AirConditionerState> airHS = new HistoryState<>(air1, new Date()); List<HistoryState<AirConditionerState>> list = new ArrayList<>(); list.add(airHS); AggregatedResult<Integer, AirConditionerState> src = new AggregatedResult<>(range, value, list); Assert.assertNotNull(src); Assert.assertEquals(range, src.getTimeRange()); Assert.assertEquals(value, src.getValue()); Assert.assertTrue(Arrays.equals(list.toArray(), src.getAggregatedObjects().toArray())); Parcel parcel = Parcel.obtain(); src.writeToParcel(parcel, 0); parcel.setDataPosition(0); AggregatedResult<Integer, AirConditionerState> dest = AggregatedResult.CREATOR.createFromParcel(parcel); Assert.assertNotNull(dest); Assert.assertEquals(range, dest.getTimeRange()); Assert.assertEquals(value, dest.getValue()); <START> Assert.assertTrue(Arrays.equals(list.toArray(), dest.getAggregatedObjects().toArray())); <END> }</code><technical_language>test if aggregatedObjects is null read parcel</technical_language>

Target:
public void parcelableTest() { TimeRange range = new TimeRange(new Date(1), new Date(100)); Integer value = 25; AirConditionerState air1 = new AirConditionerState(); air1.currentTemperature = 25; air1.power = false; HistoryState<AirConditionerState> airHS = new HistoryState<>(air1, new Date()); List<HistoryState<AirConditionerState>> list = new ArrayList<>(); list.add(airHS); AggregatedResult<Integer, AirConditionerState> src = new AggregatedResult<>(range, value, list); Assert.assertNotNull(src); Assert.assertEquals(range, src.getTimeRange()); Assert.assertEquals(value, src.getValue()); Assert.assertNotNull(src.getAggregatedObjects()); Assert.assertTrue(Arrays.equals(list.toArray(), src.getAggregatedObjects().toArray())); Parcel parcel = Parcel.obtain(); src.writeToParcel(parcel, 0); parcel.setDataPosition(0); AggregatedResult<Integer, AirConditionerState> dest = AggregatedResult.CREATOR.createFromParcel(parcel); Assert.assertNotNull(dest); Assert.assertEquals(range, dest.getTimeRange()); Assert.assertEquals(value, dest.getValue()); Assert.assertNotNull(dest.getAggregatedObjects()); Assert.assertTrue(Arrays.equals(list.toArray(), dest.getAggregatedObjects().toArray())); }
Source:
<code>public Planet(String id, boolean hasRings, int radius, Moon[] moons) { this.id = id; this.hasRings = hasRings; <START> this.radious = radius; <END> this.moons = moons; }</code><technical_language>spelling: radious -> radius</technical_language>

Target:
public Planet(String id, boolean hasRings, int radius, Moon[] moons) { this.id = id; this.hasRings = hasRings; this.radius = radius; this.moons = moons; }
Source:
<code><START> public Suspension getSuspension(final long activityId) { <END> return idToSuspension.get(activityId); }</code><technical_language>I doubt this change is needed, please revert</technical_language>

Target:
Suspension getSuspension(final long activityId) { return idToSuspension.get(activityId); }
Source:
<code><START> public void generateDummyImagesButtonClick() { <END> List<MediaUnit> mediaUnits = dataEditor.getWorkpiece().getMediaUnits(); int order = mediaUnits.isEmpty() ? 1 : mediaUnits.get(mediaUnits.size() - 1).getOrder() + 1; boolean withAutomaticPagination = ConfigCore.getBooleanParameter(ParameterCore.WITH_AUTOMATIC_PAGINATION); Paginator orderlabel = new Paginator(metsEditorDefaultPagination(order)); for (int i = 1; i <= newPagesCountValue; i++) { MediaUnit mediaUnit = new MediaUnit(); mediaUnit.setOrder(order++); if (withAutomaticPagination) { mediaUnit.setOrderlabel(orderlabel.next()); } mediaUnits.add(mediaUnit); } }</code><technical_language>This dummy images, productive code, a function for testing? is comparable in Production 2, I ask</technical_language>

Target:
public void generateDummyImagesButtonClick() { List<MediaUnit> mediaUnits = dataEditor.getWorkpiece().getMediaUnit().getChildren(); int order = mediaUnits.isEmpty() ? 1 : mediaUnits.get(mediaUnits.size() - 1).getOrder() + 1; boolean withAutomaticPagination = ConfigCore.getBooleanParameter(ParameterCore.WITH_AUTOMATIC_PAGINATION); Paginator orderlabel = new Paginator(metsEditorDefaultPagination(order)); for (int i = 1; i <= newPagesCountValue; i++) { MediaUnit mediaUnit = new MediaUnit(); mediaUnit.setOrder(order++); if (withAutomaticPagination) { mediaUnit.setOrderlabel(orderlabel.next()); } mediaUnits.add(mediaUnit); } }
Source:
<code>public AdHocGroupTester(IPersonAttributesGroupTestDefinition definition) { Validate.notNull(definition.getIncludes()); Validate.notNull(definition.getExcludes()); collectGroups(definition.getIncludes(), this.includes, true); <START> collectGroups(definition.getExcludes(), this.excludes, false); <END> hashcode = calcHashcode(); }</code><technical_language>For money, say... this.includes = collectGroups(definition.getIncludes(), true); this.excludes = collectGroups(definition.getExcludes(), false); Is more idiomatic readable</technical_language>

Target:
public AdHocGroupTester(IPersonAttributesGroupTestDefinition definition) { assert(definition.getAttributeName().equals(MEMBER_OF) || definition.getAttributeName().equals(NOT_MEMBER_OF)); this.isNotTest = definition.getAttributeName().equals(NOT_MEMBER_OF); this.groupName = definition.getTestValue(); this.groupHash = calcGroupHash(groupName, isNotTest); ApplicationContext context = ApplicationContextLocator.getApplicationContext(); CacheManager cacheManager = context.getBean("cacheManager", CacheManager.class); this.currentTests = cacheManager.getCache("org.jasig.portal.groups.pags.testers.AdHocGroupTester"); }
Source:
<code>private void processValueEvent(List<PilightBindingConfig> configs, Status status) { for (PilightBindingConfig config : configs) { String property = config.getProperty(); if (status.getValues().containsKey(property)) { String value = status.getValues().get(property); State state = getState(value, config); if (state != null) <START> eventPublisher.postUpdate(config.getItemName(), state); <END> } } }</code><technical_language>please add curly braces (even a One-liner)</technical_language>

Target:
private void processValueEvent(List<PilightBindingConfig> configs, Status status) { for (PilightBindingConfig config : configs) { String property = config.getProperty(); if (status.getValues().containsKey(property)) { String value = status.getValues().get(property); State state = getState(value, config); if (state != null) { eventPublisher.postUpdate(config.getItemName(), state); } } } }
Source:
<code>private void addChildrenProducerBatch(final ProducerBatch batch) { if (childrenProducerBatch == null) { childrenProducerBatch = new ArrayList<>(); } <START> childrenProducerBatch.add(batch); <END> }</code><technical_language>This synchronized</technical_language>

Target:
private synchronized void addChildrenProducerBatch(final ProducerBatch batch) { if (childrenProducerBatch == null) { childrenProducerBatch = new ArrayList<>(); } childrenProducerBatch.add(batch); }
Source:
<code>public void joinBuilder(StreamEvent stream1,StreamEvent stream2){ StateEvent returnEvent = stateEventPool.borrowEvent(); returnEvent.setEvent(0, stream1); returnEvent.setEvent(1, stream2); if (preJoinProcessor) { returnEvent.setType(ComplexEvent.Type.CURRENT); } else { returnEvent.setType(ComplexEvent.Type.EXPIRED); } if (!leftJoinProcessor) { returnEvent.setTimestamp(stream2.getTimestamp()); }else{ returnEvent.setTimestamp(stream1.getTimestamp()); } <START> returnEventChunk.add(returnEvent); <END> }</code><technical_language>adding returnEventChunk out of function joinBuilder, join builder return built event. function name give a hint added return event chunk</technical_language>

Target:
public StateEvent joinBuilder(StreamEvent stream1,StreamEvent stream2){ StateEvent returnEvent = stateEventPool.borrowEvent(); returnEvent.setEvent(0, stream1); returnEvent.setEvent(1, stream2); if (preJoinProcessor) { returnEvent.setType(ComplexEvent.Type.CURRENT); } else { returnEvent.setType(ComplexEvent.Type.EXPIRED); } if (!leftJoinProcessor) { returnEvent.setTimestamp(stream2.getTimestamp()); }else{ returnEvent.setTimestamp(stream1.getTimestamp()); } return returnEvent; }
Source:
<code>public void clear() { for (Bridge bridge : bridges.values()) { try { bridge.stop(); } catch (Exception e) { <START> ActiveMQServerLogger.LOGGER.failedToStopBridge(e); <END> } } bridges.clear(); for (ClusterConnection clusterConnection : clusterConnections.values()) { try { clusterConnection.stop(); } catch (Exception e) { ActiveMQServerLogger.LOGGER.failedToStopClusterConnection(e); } } clearClusterConnections(); }</code><technical_language>catch (Exception e) log.. logger.warn.. inidivualized logger.. do need individualized loggers for everything</technical_language>

Target:
public void clear() { for (Bridge bridge : bridges.values()) { try { bridge.stop(); } catch (Exception e) { ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e); } } bridges.clear(); for (ClusterConnection clusterConnection : clusterConnections.values()) { try { clusterConnection.stop(); } catch (Exception e) { ActiveMQServerLogger.LOGGER.failedToStopClusterConnection(e); } } clearClusterConnections(); }
Source:
<code>public String uploadRepository(@PathVariable("tenant") final String tenant, @RequestParam("file") final MultipartFile file) throws IOException { final TenantContext context = _tenantContextFactory.getContext(tenant); final RepositoryFolder rootFolder = context.getTenantRootFolder(); if (file.getSize() == 0){ return "Failure. The file is empty"; } final String contentType = file.getContentType().trim(); if ((!contentType.equals("application/zip")) && (!contentType.equals("application/octet-stream"))) { return "Failure. The file isn't a .zip archive"; } <START> final File oldRepositoryZipFile = createZipfolder(rootFolder); <END> logger.info("Uploading ZIP file for tenant repository: {}", tenant); try (final InputStream inputStream = file.getInputStream()) { ZipInputStream zipInputStream = new ZipInputStream(inputStream); if (isValidRepository(zipInputStream)) { decompress(zipInputStream, rootFolder); return "Success.\nNew repository path: " + rootFolder.getQualifiedPath() + ".\nOld repository backed up to: " + oldRepositoryZipFile.toString(); } else { oldRepositoryZipFile.delete(); return "Failure. The repository does not contain a conf.xml file"; } } }</code><technical_language>do a preemptive copy of repository, checking if uploaded zip is a valid repository? do this if uploaded zip is a valid repository? In manner, is overhead of creating deleted in case uploaded zip is invalid repository</technical_language>

Target:
public String uploadRepository(@PathVariable("tenant") final String tenant, @RequestParam("file") final MultipartFile file) throws IOException { final TenantContext context = _tenantContextFactory.getContext(tenant); final RepositoryFolder rootFolder = context.getTenantRootFolder(); if (file.getSize() == 0){ return "Failure. The file is empty"; } final String contentType = file.getContentType().trim(); if ((!contentType.equals("application/zip")) && (!contentType.equals("application/octet-stream"))) { return "Failure. The file isn't a .zip archive"; } logger.info("Uploading ZIP file for tenant repository: {}", tenant); try (final InputStream inputStream = file.getInputStream()) { final ZipInputStream zipInputStream = new ZipInputStream(inputStream); if (isValidRepository(zipInputStream)) { final File oldRepositoryZipFile = createZipfolder(rootFolder); decompress(zipInputStream, rootFolder); return "Success.\nNew repository path: " + rootFolder.getQualifiedPath() + ".\nOld repository backed up to: " + oldRepositoryZipFile.toString(); } else { return "Failure. The repository does not contain a conf.xml file"; } } }
Source:
<code><START> public void setConnection(String id, String name) throws CoreException { <END> IRemoteConnectionType connectionType = fRemoteServicesManager.getConnectionType(id); if (connectionType != null) { IRemoteConnection connection = connectionType.getConnection(name); if (connection != null) { setConnection(connection); } } }</code><technical_language>I reason throw CoreException here</technical_language>

Target:
public void setConnection(String id, String name) { IRemoteConnectionType connectionType = fRemoteServicesManager.getConnectionType(id); if (connectionType != null) { IRemoteConnection connection = connectionType.getConnection(name); if (connection != null) { setConnection(connection); } } }
Source:
<code>public boolean cleanUp() { if (Build.VERSION.SDK_INT >= WorkManagerImpl.MIN_JOB_SCHEDULER_API_LEVEL) { SystemJobScheduler.cancelInvalidJobs(mContext); } WorkDatabase workDatabase = mWorkManager.getWorkDatabase(); WorkSpecDao workSpecDao = workDatabase.workSpecDao(); WorkProgressDao workProgressDao = workDatabase.workProgressDao(); workDatabase.beginTransaction(); boolean needsScheduling; try { List<WorkSpec> workSpecs = workSpecDao.getRunningWork(); needsScheduling = workSpecs != null && !workSpecs.isEmpty(); if (needsScheduling) { for (WorkSpec workSpec : workSpecs) { workSpecDao.setState(ENQUEUED, workSpec.id); workSpecDao.markWorkSpecScheduled(workSpec.id, SCHEDULE_NOT_REQUESTED_YET); <START> workProgressDao.delete(workSpec.id); <END> } } workDatabase.setTransactionSuccessful(); } finally { workDatabase.endTransaction(); } return needsScheduling; }</code><technical_language>do equivalent of remove * workprogress here</technical_language>

Target:
public boolean cleanUp() { if (Build.VERSION.SDK_INT >= WorkManagerImpl.MIN_JOB_SCHEDULER_API_LEVEL) { SystemJobScheduler.cancelInvalidJobs(mContext); } WorkDatabase workDatabase = mWorkManager.getWorkDatabase(); WorkSpecDao workSpecDao = workDatabase.workSpecDao(); WorkProgressDao workProgressDao = workDatabase.workProgressDao(); workDatabase.beginTransaction(); boolean needsScheduling; try { List<WorkSpec> workSpecs = workSpecDao.getRunningWork(); needsScheduling = workSpecs != null && !workSpecs.isEmpty(); if (needsScheduling) { for (WorkSpec workSpec : workSpecs) { workSpecDao.setState(ENQUEUED, workSpec.id); workSpecDao.markWorkSpecScheduled(workSpec.id, SCHEDULE_NOT_REQUESTED_YET); } } workProgressDao.deleteAll(); workDatabase.setTransactionSuccessful(); } finally { workDatabase.endTransaction(); } return needsScheduling; }
Source:
<code>public Set<Pair<WorkerInfo, SerializableVoid>> selectExecutors(NoopPlanConfig config, List<WorkerInfo> jobWorkerInfoList, SelectExecutorsContext selectExecutorsContext) throws Exception { <START> return new HashSet<>(); <END> }</code><technical_language>Is this allowed return Collections.emptySet()</technical_language>

Target:
public Set<Pair<WorkerInfo, SerializableVoid>> selectExecutors(NoopPlanConfig config, List<WorkerInfo> jobWorkerInfoList, SelectExecutorsContext selectExecutorsContext) throws Exception { return Collections.emptySet(); }
Source:
<code>public void testMakeDecisionRule() { final DecisionRule rule = DecisionRuleFactory.makeDecisionRule(dtable); final List<UnaryTests> inputEntries = rule.getInputEntry(); assertThat(inputEntries.size()).isEqualTo(2); assertUnaryTestsText(inputEntries.get(0), DecisionTableDefaultValueUtilities.INPUT_CLAUSE_UNARY_TEST_TEXT); assertUnaryTestsText(inputEntries.get(1), DecisionTableDefaultValueUtilities.INPUT_CLAUSE_UNARY_TEST_TEXT); assertThat(inputEntries.get(0).getParent()).isEqualTo(rule); <START> assertThat(inputEntries.get(1).getParent()).isEqualTo(rule); <END> final List<LiteralExpression> outputEntries = rule.getOutputEntry(); assertThat(outputEntries.size()).isEqualTo(2); assertLiteralExpressionText(outputEntries.get(0), DecisionTableDefaultValueUtilities.OUTPUT_CLAUSE_EXPRESSION_TEXT); assertLiteralExpressionText(outputEntries.get(1), DecisionTableDefaultValueUtilities.OUTPUT_CLAUSE_EXPRESSION_TEXT); assertThat(outputEntries.get(0).getParent()).isEqualTo(rule); assertThat(outputEntries.get(1).getParent()).isEqualTo(rule); assertThat(rule.getDescription().getValue()).isEqualTo(DecisionTableDefaultValueUtilities.RULE_DESCRIPTION); assertThat(rule.getParent()).isEqualTo(dtable); }</code><technical_language>bring attention alternative piece of code below, find useful in future if collection more elements want assert values. Feel free update is. java final List<UnaryTests> inputEntries = rule.getInputEntry(); assertThat(inputEntries).hasSize(2); assertThat(inputEntries) .allSatisfy(unaryTests -> assertUnaryTestsText(unaryTests, DecisionTableDefaultValueUtilities.INPUT_CLAUSE_UNARY_TEST_TEXT)) .allSatisfy(unaryTests -> assertThat(unaryTests.getParent()).isEqualTo(rule)); final List<LiteralExpression> outputEntries = rule.getOutputEntry(); assertThat(outputEntries).hasSize(2); assertThat(outputEntries) .allSatisfy(literalExpression -> assertLiteralExpressionText(literalExpression, DecisionTableDefaultValueUtilities.OUTPUT_CLAUSE_EXPRESSION_TEXT)) .allSatisfy(literalExpression -> assertThat(literalExpression.getParent()).isEqualTo(rule));</technical_language>

Target:
public void testMakeDecisionRule() { final DecisionRule rule = DecisionRuleFactory.makeDecisionRule(dtable); final List<UnaryTests> inputEntries = rule.getInputEntry(); assertThat(inputEntries.size()).isEqualTo(2); assertThat(inputEntries) .allSatisfy(unaryTests -> assertUnaryTestsText(unaryTests, DecisionTableDefaultValueUtilities.INPUT_CLAUSE_UNARY_TEST_TEXT)) .allSatisfy(unaryTests -> assertThat(unaryTests.getConstraintType()).isNull()) .allSatisfy(unaryTests -> assertThat(unaryTests.getParent()).isEqualTo(rule)); final List<LiteralExpression> outputEntries = rule.getOutputEntry(); assertThat(outputEntries.size()).isEqualTo(2); assertThat(outputEntries) .allSatisfy(literalExpression -> assertLiteralExpressionText(literalExpression, DecisionTableDefaultValueUtilities.OUTPUT_CLAUSE_EXPRESSION_TEXT)) .allSatisfy(literalExpression -> assertThat(literalExpression.getParent()).isEqualTo(rule)); assertThat(rule.getDescription().getValue()).isEqualTo(DecisionTableDefaultValueUtilities.RULE_DESCRIPTION); assertThat(rule.getParent()).isEqualTo(dtable); }
Source:
<code>private void setSymbolicValueOnFields(MethodInvocationTree tree) { boolean threadSleepMatch = THREAD_SLEEP_MATCHER.matches(tree); if (isLocalMethodInvocation(tree) || isProvidingThisAsArgument(tree) || threadSleepMatch) { <START> resetFieldValues(tree.symbol().isStatic() && !threadSleepMatch); <END> } }</code><technical_language>If this is provided argument of a static method, non-static fields reset, case here</technical_language>

Target:
private void setSymbolicValueOnFields(MethodInvocationTree tree) { boolean threadSleepMatch = THREAD_SLEEP_MATCHER.matches(tree); boolean providingThisAsArgument = isProvidingThisAsArgument(tree); if (isLocalMethodInvocation(tree) || providingThisAsArgument || threadSleepMatch) { boolean resetOnlyStaticFields = tree.symbol().isStatic() && !threadSleepMatch && !providingThisAsArgument; resetFieldValues(resetOnlyStaticFields); } }
Source:
<code>public void visitName(Name name) { Optional.ofNullable(name.symbol()).ifPresent(symbol -> symbol.usages().stream() <START> .filter(usage -> usage.tree() == name) <END> .findFirst() .ifPresent(usage -> addToSymbolToUsageMap(usage, symbol)) ); super.visitName(name); }</code><technical_language>This is inefficient. a method access usage tree</technical_language>

Target:
public void visitName(Name name) { Optional.ofNullable(name.usage()).ifPresent(usage -> addToSymbolToUsageMap(usage, name.symbol())); super.visitName(name); }
Source:
<code>private String getFileChecksum(String filePath) { String checksum = null; try { checksum = DigestUtils.sha1Hex(new FileInputStream(filePath)); } catch (FileNotFoundException e) { log.error("Unable to compute checksum for {}", filePath); } catch (IOException e) { log.error("Unable to compute checksum for {}", filePath); } <START> return checksum; <END> }</code><technical_language>Hmm, I easier debug if instead of eating exceptions, if threw exception (wrapped of ReplicationException). Currently I get is ERROR Unable compute checksum for /path file ERROR Local remote checksums match helpful full stacktrace describing checksum instead. Also, FileNotFoundException is IOException, need catch separately handling differently</technical_language>

Target:
private String getFileChecksum(String filePath) { String checksum = null; try { checksum = DigestUtils.sha1Hex(new FileInputStream(filePath)); } catch (IOException e) { throw new ReplicationException(String.format("Unable to compute checksum for %s", filePath), e); } return checksum; }
Source:
<code>public Object perform(InvocationContext ctx) throws Throwable { if (valueMatchingPolicy == ValueMatchingPolicy.MATCH_NEVER) { successful = false; return null; } MVCCEntry e = (MVCCEntry) ctx.lookupEntry(key); if (e == null || e.isNull() || e.isRemoved()) { nonExistent = true; log.trace("Nothing to remove since the entry doesn't exist in the context or it is null"); <START> if (valueMatchingPolicy.matches(e, value, null, valueEquivalence)) { <END> if (e != null) { e.setChanged(true); e.setRemoved(true); } return null; } else { successful = false; return false; } } if (!valueMatchingPolicy.matches(e, value, null, valueEquivalence)) { successful = false; return false; } if (this instanceof EvictCommand) { e.setEvicted(true); } return performRemove(e, ctx); }</code><technical_language>need invoke valueMatchingPolicy.matches() in line 71 83</technical_language>

Target:
public Object perform(InvocationContext ctx) throws Throwable { if (valueMatcher == ValueMatcher.MATCH_NEVER) { successful = false; return null; } MVCCEntry e = (MVCCEntry) ctx.lookupEntry(key); if (e == null || e.isNull() || e.isRemoved()) { nonExistent = true; if (valueMatcher.matches(e, value, null, valueEquivalence)) { if (e != null) { e.setChanged(true); e.setRemoved(true); } return isConditional() ? true : null; } else { log.trace("Nothing to remove since the entry doesn't exist in the context or it is null"); successful = false; return false; } } if (!valueMatcher.matches(e, value, null, valueEquivalence)) { successful = false; return false; } if (this instanceof EvictCommand) { e.setEvicted(true); } return performRemove(e, ctx); }
Source:
<code><START> public static boolean nodeHasSchemaProperties( <END> PrimitiveIntObjectMap<PropertyBlock> nodePropertyMap, int[] indexPropertyIds ) { for ( int indexPropertyId : indexPropertyIds ) { if ( !nodePropertyMap.containsKey( indexPropertyId ) ) { return false; } } return true; }</code><technical_language>this method private right</technical_language>

Target:
private static boolean nodeHasSchemaProperties( PrimitiveIntObjectMap<PropertyBlock> nodePropertyMap, int[] indexPropertyIds ) { for ( int indexPropertyId : indexPropertyIds ) { if ( !nodePropertyMap.containsKey( indexPropertyId ) ) { return false; } } return true; }
Source:
<code>private void updateImageToDestinationDomainMap() { if (disks == null) { return; } for (DiskModel diskModel : disks) { StorageDomain storageDomain = diskModel.getStorageDomain().getSelectedItem(); DiskImage diskImage = (DiskImage) diskModel.getDisk(); diskImage.setStorageIds(new ArrayList<>(Collections.singletonList(storageDomain.getId()))); diskImage.setDiskAlias(diskModel.getAlias().getEntity()); DiskProfile diskProfile = diskModel.getDiskProfile().getSelectedItem(); diskImage.setDiskProfileId(diskProfile != null ? diskProfile.getId() : null); if (diskModel.getQuota().getSelectedItem() != null) { diskImage.setQuotaId(diskModel.getQuota().getSelectedItem().getId()); } if (diskModel.getVolumeFormat().getIsAvailable()) { VolumeFormat volumeFormat = diskModel.getVolumeFormat().getSelectedItem(); diskImage.setVolumeFormat(volumeFormat); diskImage.setVolumeType(AsyncDataProvider.getInstance() .getVolumeType(volumeFormat, storageDomain.getStorageType(), diskImage.getImage()) <START> ); <END> } else if (diskModel.getVolumeType().getIsAvailable()) { VolumeType volumeType = diskModel.getVolumeType().getSelectedItem(); diskImage.setVolumeType(volumeType); diskImage.setVolumeFormat(AsyncDataProvider.getInstance().getDiskVolumeFormat( volumeType, storageDomain.getStorageType())); } imageToDestinationDomainMap.put(diskImage.getId(), diskImage); } }</code><technical_language>Is this new line purpose? I unite before</technical_language>

Target:
private void updateImageToDestinationDomainMap() { if (disks == null) { return; } for (DiskModel diskModel : disks) { StorageDomain storageDomain = diskModel.getStorageDomain().getSelectedItem(); DiskImage diskImage = (DiskImage) diskModel.getDisk(); diskImage.setStorageIds(new ArrayList<>(Collections.singletonList(storageDomain.getId()))); diskImage.setDiskAlias(diskModel.getAlias().getEntity()); DiskProfile diskProfile = diskModel.getDiskProfile().getSelectedItem(); diskImage.setDiskProfileId(diskProfile != null ? diskProfile.getId() : null); if (diskModel.getQuota().getSelectedItem() != null) { diskImage.setQuotaId(diskModel.getQuota().getSelectedItem().getId()); } if (diskModel.getVolumeFormat().getIsAvailable()) { VolumeFormat volumeFormat = diskModel.getVolumeFormat().getSelectedItem(); diskImage.setVolumeFormat(volumeFormat); diskImage.setVolumeType(AsyncDataProvider.getInstance() .getVolumeType(volumeFormat, storageDomain.getStorageType(), diskModel.getVm(), diskImage.getImage()) ); } else if (diskModel.getVolumeType().getIsAvailable()) { VolumeType volumeType = diskModel.getVolumeType().getSelectedItem(); diskImage.setVolumeType(volumeType); diskImage.setVolumeFormat(AsyncDataProvider.getInstance().getDiskVolumeFormat( volumeType, storageDomain.getStorageType())); } imageToDestinationDomainMap.put(diskImage.getId(), diskImage); } }
Source:
<code>public void testRemoveKeyWordsFollowedByTabChar() { <START> String selectWithSpace = "SELECT\tid, 'yes', false"; <END> String fromWithSpace = "FROM\ttest.verification_table"; String whereWithSpace = "WHERE\tTRUE"; pagingQueryProvider.setSelectClause( selectWithSpace ); pagingQueryProvider.setFromClause( fromWithSpace ); pagingQueryProvider.setWhereClause( whereWithSpace ); assertEquals("id, 'yes', false", pagingQueryProvider.getSelectClause()); assertEquals("test.verification_table", pagingQueryProvider.getFromClause()); assertEquals("TRUE", pagingQueryProvider.getWhereClause()); }</code><technical_language>This variable named selectWithTab, do agree? suggestion String selectWithTab = "SELECT\tid, 'yes', false"; for fromWithSpace whereWithSpace. I is selectClause, fromClause whereClause test name is explicit enough case testing. Wdyt</technical_language>

Target:
public void testRemoveKeyWordsFollowedByTabChar() { String selectClause = "SELECT\tid, 'yes', false"; String fromClause = "FROM\ttest.verification_table"; String whereClause = "WHERE\tTRUE"; pagingQueryProvider.setSelectClause( selectClause ); pagingQueryProvider.setFromClause( fromClause ); pagingQueryProvider.setWhereClause( whereClause ); assertEquals("id, 'yes', false", pagingQueryProvider.getSelectClause()); assertEquals("test.verification_table", pagingQueryProvider.getFromClause()); assertEquals("TRUE", pagingQueryProvider.getWhereClause()); }
Source:
<code>private void send(OutputStream outputStream) { String mime = mimeType; SimpleDateFormat gmtFrmt = new SimpleDateFormat("E, d MMM yyyy HH:mm:ss 'GMT'", Locale.US); gmtFrmt.setTimeZone(TimeZone.getTimeZone("GMT")); try { if (status == null) { throw new Error("sendResponse(): Status can't be null."); } PrintWriter pw = new PrintWriter(outputStream); pw.print("HTTP/1.1 " + status.getDescription() + " \r\n"); if (mime != null) { pw.print("Content-Type: " + mime + "\r\n"); } if (header == null || header.get("Date") == null) { pw.print("Date: " + gmtFrmt.format(new Date()) + "\r\n"); } if (header != null) { for (String key : header.keySet()) { String value = header.get(key); pw.print(key + ": " + value + "\r\n"); } } pw.print("Connection: keep-alive\r\n"); <START> if (requestMethod != Method.HEAD && data instanceof PipedInputStream) { <END> sendAsChunked(outputStream, pw); } else { sendAsFixedLength(outputStream, pw); } outputStream.flush(); safeClose(data); } catch (IOException ioe) { } }</code><technical_language>I this line. Generally I instanceof checks in code. PipedInputStream is referenced this line. adding a boolean field response (defaulting false), field in if statement server calls setChunked(true) accomplish thing</technical_language>

Target:
private void send(OutputStream outputStream) { String mime = mimeType; SimpleDateFormat gmtFrmt = new SimpleDateFormat("E, d MMM yyyy HH:mm:ss 'GMT'", Locale.US); gmtFrmt.setTimeZone(TimeZone.getTimeZone("GMT")); try { if (status == null) { throw new Error("sendResponse(): Status can't be null."); } PrintWriter pw = new PrintWriter(outputStream); pw.print("HTTP/1.1 " + status.getDescription() + " \r\n"); if (mime != null) { pw.print("Content-Type: " + mime + "\r\n"); } if (header == null || header.get("Date") == null) { pw.print("Date: " + gmtFrmt.format(new Date()) + "\r\n"); } if (header != null) { for (String key : header.keySet()) { String value = header.get(key); pw.print(key + ": " + value + "\r\n"); } } pw.print("Connection: keep-alive\r\n"); if (requestMethod != Method.HEAD && chunkedTransfer) { sendAsChunked(outputStream, pw); } else { sendAsFixedLength(outputStream, pw); } outputStream.flush(); safeClose(data); } catch (IOException ioe) { } }
Source:
<code>private void queueWork(int maximumMessageCount, Duration maxWaitTime, FluxSink<ServiceBusReceivedMessage> emitter) { final long id = idGenerator.getAndIncrement(); <START> int prefetch = asyncClient.getReceiverOptions().getPrefetchCount(); <END> int toRequest = prefetch != 0 ? Math.min(maximumMessageCount, prefetch) : maximumMessageCount; final SynchronousReceiveWork work = new SynchronousReceiveWork(id, toRequest, maxWaitTime, emitter); SynchronousMessageSubscriber messageSubscriber = synchronousMessageSubscriber.get(); if (messageSubscriber == null) { SynchronousMessageSubscriber newSubscriber = new SynchronousMessageSubscriber(toRequest, work); if (!synchronousMessageSubscriber.compareAndSet(null, newSubscriber)) { newSubscriber.dispose(); SynchronousMessageSubscriber existing = synchronousMessageSubscriber.get(); existing.queueWork(work); } else { asyncClient.receiveMessages().subscribeWith(newSubscriber); } } else { messageSubscriber.queueWork(work); } logger.verbose("[{}] Receive request queued up.", work.getId()); }</code><technical_language>final for variables</technical_language>

Target:
private void queueWork(int maximumMessageCount, Duration maxWaitTime, FluxSink<ServiceBusReceivedMessage> emitter) { final long id = idGenerator.getAndIncrement(); final int prefetch = asyncClient.getReceiverOptions().getPrefetchCount(); final int toRequest = prefetch != 0 ? Math.min(maximumMessageCount, prefetch) : maximumMessageCount; final SynchronousReceiveWork work = new SynchronousReceiveWork(id, toRequest, maxWaitTime, emitter); SynchronousMessageSubscriber messageSubscriber = synchronousMessageSubscriber.get(); if (messageSubscriber == null) { SynchronousMessageSubscriber newSubscriber = new SynchronousMessageSubscriber(toRequest, work); if (!synchronousMessageSubscriber.compareAndSet(null, newSubscriber)) { newSubscriber.dispose(); SynchronousMessageSubscriber existing = synchronousMessageSubscriber.get(); existing.queueWork(work); } else { asyncClient.receiveMessagesNoBackPressure().subscribeWith(newSubscriber); } } else { messageSubscriber.queueWork(work); } logger.verbose("[{}] Receive request queued up.", work.getId()); }
Source:
<code>public OMElement serializeSpecificMediator(Mediator mediator) { if (!(mediator instanceof PropertyGroupMediator)) { handleException("Unsupported mediator passed in for serialization : " + mediator.getType()); } PropertyGroupMediator propertyGroupMediator = (PropertyGroupMediator) mediator; PropertyMediatorSerializer propertyMediatorSerializer = new PropertyMediatorSerializer(); <START> OMElement propertyGroup = fac.createOMElement("propertyGroup", synNS); <END> saveTracingState(propertyGroup, propertyGroupMediator); List<PropertyMediator> propertyGroupList = propertyGroupMediator.getPropGroupList(); for (PropertyMediator propertyMediator : propertyGroupList) { OMElement property = propertyMediatorSerializer.serializeSpecificMediator(propertyMediator); propertyGroup.addChild(property); } return propertyGroup; }</code><technical_language>is a method expects a QName, method constant PROPERTY_GROUP_Q instead</technical_language>

Target:
public OMElement serializeSpecificMediator(Mediator mediator) { if (!(mediator instanceof PropertyGroupMediator)) { handleException("Unsupported mediator passed in for serialization : " + mediator.getType()); } PropertyGroupMediator propertyGroupMediator = (PropertyGroupMediator) mediator; PropertyMediatorSerializer propertyMediatorSerializer = new PropertyMediatorSerializer(); OMElement propertyGroup = fac.createOMElement(PropertyGroupMediatorFactory.PROPERTY_GROUP_Q); saveTracingState(propertyGroup, propertyGroupMediator); List<PropertyMediator> propertyGroupList = propertyGroupMediator.getPropGroupList(); for (PropertyMediator propertyMediator : propertyGroupList) { OMElement property = propertyMediatorSerializer.serializeSpecificMediator(propertyMediator); propertyGroup.addChild(property); } return propertyGroup; }
Source:
<code>private Pair<ContainerPlacementMessage.StatusCode, String> validatePlacementAction(ContainerPlacementRequestMessage requestMessage) { String errorMessagePrefix = ContainerPlacementMessage.StatusCode.BAD_REQUEST + " reason: %s"; Boolean invalidAction = false; String errorMessage = null; <START> if (!samzaApplicationState.runningProcessors.containsKey(requestMessage.getProcessorId()) && !samzaApplicationState.pendingProcessors.containsKey(requestMessage.getProcessorId()) && !samzaApplicationState.failedProcessors.containsKey(requestMessage.getProcessorId()) <END> ) { errorMessage = String.format(errorMessagePrefix, "invalid processor id neither in running or pending processors"); invalidAction = true; } else if (placementRequestsCache.containsKey(requestMessage.getUuid())) { errorMessage = String.format(errorMessagePrefix, "duplicate UUID of the request, please retry"); invalidAction = true; } else if (standbyContainerManager.isPresent() && !standbyContainerManager.get() .checkStandbyConstraints(requestMessage.getProcessorId(), requestMessage.getDestinationHost())) { errorMessage = String.format(errorMessagePrefix, "destination host does not meet standby constraints"); invalidAction = true; } if (invalidAction) { return new ImmutablePair<>(ContainerPlacementMessage.StatusCode.BAD_REQUEST, errorMessage); } return new ImmutablePair<>(ContainerPlacementMessage.StatusCode.ACCEPTED, "Request is accepted"); }</code><technical_language>this readable, define variables for of lookups define if if (inRunning || inPending || inFailed) {//do blah} else { this }</technical_language>

Target:
private Pair<ContainerPlacementMessage.StatusCode, String> validatePlacementAction(ContainerPlacementRequestMessage requestMessage) { String errorMessagePrefix = ContainerPlacementMessage.StatusCode.BAD_REQUEST + " reason: %s"; Boolean invalidAction = false; String errorMessage = null; boolean isRunning = samzaApplicationState.runningProcessors.containsKey(requestMessage.getProcessorId()); boolean isPending = samzaApplicationState.pendingProcessors.containsKey(requestMessage.getProcessorId()); boolean isFailed = samzaApplicationState.failedProcessors.containsKey(requestMessage.getProcessorId()); if (!isRunning && !isPending && !isFailed) { errorMessage = String.format(errorMessagePrefix, "invalid processor id neither in running, pending or failed processors"); invalidAction = true; } else if (placementRequestsCache.containsKey(requestMessage.getUuid())) { errorMessage = String.format(errorMessagePrefix, "duplicate UUID of the request, please retry"); invalidAction = true; } else if (standbyContainerManager.isPresent() && !standbyContainerManager.get() .checkStandbyConstraints(requestMessage.getProcessorId(), requestMessage.getDestinationHost())) { errorMessage = String.format(errorMessagePrefix, "destination host does not meet standby constraints"); invalidAction = true; } if (invalidAction) { return new ImmutablePair<>(ContainerPlacementMessage.StatusCode.BAD_REQUEST, errorMessage); } return new ImmutablePair<>(ContainerPlacementMessage.StatusCode.ACCEPTED, "Request is accepted"); }
Source:
<code>public static int incrementAndGetInt(long ptr) { <START> while (true) { <END> int old = getInt(ptr); int updated = old + 1; if (compareAndSwapInt(null, ptr, old, updated)) return updated; } }</code><technical_language>Method body replaced Unsafe.getAndAddInt(null, ptr, 1) + 1</technical_language>

Target:
public static int incrementAndGetInt(long ptr) { return UNSAFE.getAndAddInt(null, ptr, 1) + 1; }
Source:
<code>public void addRelation(Model nifModel, Resource documentAsResource, String documentURI, Relation relation, int markingId) { StringBuilder uriBuilder = new StringBuilder(); uriBuilder.append(documentURI); uriBuilder.append("#relation"); uriBuilder.append(markingId); Resource relationAsResource = nifModel.createResource(uriBuilder.toString()); nifModel.add(relationAsResource, RDF.type, RDF.Statement); nifModel.add(relationAsResource, RDF.subject, ResourceFactory.createResource(relation.getSubject().getUris().iterator().next())); nifModel.add(relationAsResource, RDF.predicate, ResourceFactory.createResource(relation.getPredicate().getUris().iterator().next())); nifModel.add(relationAsResource, RDF.object, ResourceFactory.createResource(relation.getObject().getUris().iterator().next())); nifModel.add(relationAsResource, OA.hasTarget, OA.SpecificResource); nifModel.add(relationAsResource, OA.hasSource, ""); <START> nifModel.add(relationAsResource, NIF.referenceContext, documentAsResource); <END> if (relation instanceof ScoredMarking) { nifModel.add(relationAsResource, ITSRDF.taConfidence, nifModel.createTypedLiteral(((ScoredMarking) relation).getConfidence(), XSDDatatype.XSDdouble)); } addProvenanceInfoLink(relation, relationAsResource, nifModel, documentURI); }</code><technical_language>This line (using NIF.referenceContext) is necessary discussed. Please remove it</technical_language>

Target:
public void addRelation(Model nifModel, Resource documentAsResource, String documentURI, Relation relation, int markingId) { StringBuilder uriBuilder = new StringBuilder(); uriBuilder.append(documentURI); uriBuilder.append("#relation"); uriBuilder.append(markingId); Resource relationAsResource = nifModel.createResource(uriBuilder.toString()); nifModel.add(relationAsResource, RDF.type, RDF.Statement); nifModel.add(relationAsResource, RDF.type, OA.Annotation); nifModel.add(relationAsResource, RDF.subject, ResourceFactory.createResource(relation.getSubject().getUris().iterator().next())); nifModel.add(relationAsResource, RDF.predicate, ResourceFactory.createResource(relation.getPredicate().getUris().iterator().next())); nifModel.add(relationAsResource, RDF.object, ResourceFactory.createResource(relation.getObject().getUris().iterator().next())); Resource relationAsResource2 = nifModel.createResource(); nifModel.add(relationAsResource, OA.hasTarget, relationAsResource2); nifModel.add(relationAsResource2, RDF.type, OA.SpecificResource); nifModel.add(relationAsResource2, OA.hasSource, documentAsResource); if (relation instanceof ScoredMarking) { nifModel.add(relationAsResource, ITSRDF.taConfidence, nifModel.createTypedLiteral(((ScoredMarking) relation).getConfidence(), XSDDatatype.XSDdouble)); } addProvenanceInfoLink(relation, relationAsResource, nifModel, documentURI); }
Source:
<code>public PayloadSlice nextSlice() { checkNotNull(this.payload, "payload"); <START> long sliceLength = getRemaining() < (partSizeInMB << 20) ? getRemaining() : partSizeInMB << 20; <END> Payload slicedPayload = slicer.slice(payload, copied, sliceLength); ContentRange range = ContentRange.build(copied, copied + sliceLength - 1); copied += sliceLength; part++; return new PayloadSlice(slicedPayload, range, part); }</code><technical_language>Avoid duplication with: long sliceLength = Math.min(getRemaining(), partSizeInMB << 20);</technical_language>

Target:
public PayloadSlice nextSlice() { checkNotNull(this.payload, "payload"); long sliceLength = Math.min(getRemaining(), partSizeInMB << 20); Payload slicedPayload = slicer.slice(payload, copied, sliceLength); ContentRange range = ContentRange.build(copied, copied + sliceLength - 1); copied += sliceLength; part++; return new PayloadSlice(slicedPayload, range, part); }
Source:
<code>void twoTestClassesCanShareStateViaEngineExtensionContext() { Parent.counter.set(0); <START> executeTests(request().selectors(selectClass(A.class), selectClass(B.class)).build()); <END> assertThat(Parent.counter).hasValue(1); }</code><technical_language>I assume tests test classes get executed, good assert assumption well</technical_language>

Target:
void twoTestClassesCanShareStateViaEngineExtensionContext() { Parent.counter.set(0); ExecutionEventRecorder eventRecorder = executeTests( request().selectors(selectClass(A.class), selectClass(B.class)).build()); assertThat(eventRecorder.getTestFinishedCount()).isEqualTo(2); assertThat(Parent.counter).hasValue(1); }
Source:
<code>private void setConfirmResultConverter() { setResultConverter((dialogButton) -> { List<PickerAssignee> finalList = state.getCurrentAssigneesList(); if (hasSelectedAssignee(finalList)) { return new AssigneePickerDialogResponse(dialogButton, <START> Optional.of(getSelectedAssignee(finalList).get().getLoginName())); <END> } return new AssigneePickerDialogResponse(dialogButton, Optional.empty()); }); }</code><technical_language>This part getSelectedAssignee(finalList).map(PickerAssignee::getLoginName). Also, finalList finalAssignees suggestedAssignees something. Name more specific</technical_language>

Target:
private void setConfirmResultConverter() { setResultConverter((dialogButton) -> { List<PickerAssignee> finalUsers = state.getCurrentUsersList(); Optional<PickerAssignee> selectedAssignee = PickerAssignee.getSelectedAssignee(finalUsers); return new AssigneePickerDialogResponse(dialogButton, selectedAssignee.map(PickerAssignee::getLoginName)); }); }
Source:
<code>public EngineDriver(SqlEnvironment environment){ this.environment = environment; this.uuidGen=environment.getUUIDGenerator(); this.internalConnection=environment.getInternalConnection(); this.version=environment.getVersion(); this.config=environment.getConfiguration(); this.loadWatcher = environment.getLoadWatcher(); this.processorFactory = environment.getProcessorFactory(); this.olapClient = environment.getOlapClient(); this.propertyManager = environment.getPropertyManager(); this.exceptionFactory = environment.exceptionFactory(); this.dbAdmin = environment.databaseAdministrator(); this.sequencePool=CachedResourcePool.Builder.<SpliceSequence, SequenceKey>newBuilder() .expireAfterAccess(1,TimeUnit.MINUTES) .generator(new ResourcePool.Generator<SpliceSequence, SequenceKey>(){ @Override public SpliceSequence makeNew(SequenceKey refKey) throws Exception{ return refKey.makeNew(); } @Override public void close(SpliceSequence entity) throws Exception{ entity.close(); } }).build(); final AtomicLong count = new AtomicLong(0); <START> ThreadPoolExecutor tpe = new ThreadPoolExecutor(0, config.getThreadPoolMaxSize(), <END> 60L, TimeUnit.SECONDS, new SynchronousQueue<>(), (runnable) -> { Thread t = new Thread(runnable, "SpliceThreadPool-" + count.getAndIncrement()); t.setDaemon(true); return t; }, new ThreadPoolExecutor.CallerRunsPolicy()); tpe.allowCoreThreadTimeOut(false); tpe.prestartAllCoreThreads(); this.threadPool = new ManagedThreadPool(tpe); }</code><technical_language>this change</technical_language>

Target:
public EngineDriver(SqlEnvironment environment){ this.environment = environment; this.uuidGen=environment.getUUIDGenerator(); this.internalConnection=environment.getInternalConnection(); this.version=environment.getVersion(); this.config=environment.getConfiguration(); this.loadWatcher = environment.getLoadWatcher(); this.processorFactory = environment.getProcessorFactory(); this.olapClient = environment.getOlapClient(); this.propertyManager = environment.getPropertyManager(); this.exceptionFactory = environment.exceptionFactory(); this.operationManager = environment.getOperationManager(); this.dbAdmin = environment.databaseAdministrator(); this.sequencePool=CachedResourcePool.Builder.<SpliceSequence, SequenceKey>newBuilder() .expireAfterAccess(1,TimeUnit.MINUTES) .generator(new ResourcePool.Generator<SpliceSequence, SequenceKey>(){ @Override public SpliceSequence makeNew(SequenceKey refKey) throws Exception{ return refKey.makeNew(); } @Override public void close(SpliceSequence entity) throws Exception{ entity.close(); } }).build(); final AtomicLong count = new AtomicLong(0); ThreadPoolExecutor tpe = new ThreadPoolExecutor(20, config.getThreadPoolMaxSize(), 60L, TimeUnit.SECONDS, new SynchronousQueue<>(), (runnable) -> { Thread t = new Thread(runnable, "SpliceThreadPool-" + count.getAndIncrement()); t.setDaemon(true); return t; }, new ThreadPoolExecutor.CallerRunsPolicy()); tpe.allowCoreThreadTimeOut(false); tpe.prestartAllCoreThreads(); this.threadPool = new ManagedThreadPool(tpe); }
Source:
<code>public void returnsNullForNoQuery() throws Exception { setUpBasicQueryData(); try { im.find(null); Assert.fail("find should throw QueryException"); <START> } catch (QueryException qe) { <END> ; } }</code><technical_language>expected class attribute for this</technical_language>

Target:
public void returnsNullForNoQuery() throws Exception { setUpBasicQueryData(); im.find(null); }
Source:
<code>public boolean containsAll(final Collection<?> c) { for (final Object o : c) { final boolean b = contains(o); <START> if (!b) return false; <END> } return true; }</code><technical_language>inlining it? if (!contains(o)) return false;</technical_language>

Target:
public boolean containsAll(final Collection<?> c) { for (final Object o : c) { if (!contains(o)) return false; } return true; }
Source:
<code>public GetDeviceModelResponse dequeueGetDeviceModelResponse( final String correlationUid ) throws OsgpException { <START> LOGGER.debug( "dequeueGetDeviceModelRequest called with correlation uid {}", correlationUid ); <END> return (GetDeviceModelResponse) processResponse( correlationUid ); }</code><technical_language>dequeueGetDeviceModelRequest</technical_language>

Target:
public GetDeviceModelResponse dequeueGetDeviceModelResponse(final String correlationUid) throws OsgpException { LOGGER.debug("dequeueGetDeviceModelResponse called with correlation uid {}", correlationUid); return (GetDeviceModelResponse) processResponse(correlationUid); }
Source:
<code>public void start(final Map<String, String> props) { log.info("Starting JDBC Sink task"); config = new JdbcSinkConfig(props); initWriter(); remainingRetries = config.maxRetries; try { reporter = context.errantRecordReporter(); <START> } catch (NoClassDefFoundError e) { <END> reporter = null; } }</code><technical_language>tested NoClassDefFoundError is exception catch? Based experience oracle cdc, actual exception thrown unexpected</technical_language>

Target:
public void start(final Map<String, String> props) { log.info("Starting JDBC Sink task"); config = new JdbcSinkConfig(props); initWriter(); remainingRetries = config.maxRetries; try { reporter = context.errantRecordReporter(); } catch (NoSuchMethodError | NoClassDefFoundError e) { reporter = null; } }
Source:
<code>protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { String path = ((HttpServletRequest) request).getRequestURI(); <START> if (path.contains("/sqlite/")) { <END> super.doFilterInternal(request, response, filterChain); } else { filterChain.doFilter(request, response); } }</code><technical_language>Honestly I remember exact reason I this permissive I do GeoServer integration: <LINK_0></technical_language>

Target:
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { String path = request.getRequestURI(); if (path.contains("gwc/rest/sqlite/")) { super.doFilterInternal(request, response, filterChain); } else { filterChain.doFilter(request, response); } }