auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Fragment getFirstFragment() { final EnrolledCoursesResponse courseData = (EnrolledCoursesResponse) getIntent().getSerializableExtra(Router.EXTRA_COURSE_DATA); <START> final Serializable serializable = getIntent().getSerializableExtra(Router.EXTRA_COURSE_UNIT); CourseComponent courseUnit = null; if (serializable != null) { courseUnit = (CourseComponent) serializable; } <END> return CourseUpgradeWebViewFragment.newInstance(getIntent().getStringExtra(ARG_URL), null, true, courseData, courseUnit); }</code><technical_language>code replaced final CourseComponent courseUnit = (CourseComponent) getIntent().getSerializableExtra(Router.EXTRA_COURSE_UNIT);</technical_language>

Target:
public Fragment getFirstFragment() { final EnrolledCoursesResponse courseData = (EnrolledCoursesResponse) getIntent().getSerializableExtra(Router.EXTRA_COURSE_DATA); final CourseComponent courseUnit = (CourseComponent) getIntent().getSerializableExtra(Router.EXTRA_COURSE_UNIT); return CourseUpgradeWebViewFragment.newInstance(getIntent().getStringExtra(ARG_URL), null, true, courseData, courseUnit); }
Source:
<code>public String toString() { return String.format( "size [%s, %s, %s); files [%d, %d); ratio %f; off-peak ratio %f; throttle point %d;" + " major period %d, major jitter %f, min locality to compact %f;" + " tiered compaction: max_age %d, incoming window min %d," + " compaction policy for tiered window %s, single output for minor %b," + " compaction window factory %s," + " region %s columnFamilyName %s", StringUtils.byteDesc(minCompactSize), StringUtils.byteDesc(maxCompactSize), StringUtils.byteDesc(offPeakMaxCompactSize), minFilesToCompact, maxFilesToCompact, compactionRatio, offPeakCompactionRatio, throttlePoint, majorCompactionPeriod, majorCompactionJitter, minLocalityToForceCompact, dateTieredMaxStoreFileAgeMillis, dateTieredIncomingWindowMin, compactionPolicyForDateTieredWindow, dateTieredSingleOutputForMinorCompaction, dateTieredCompactionWindowFactory, <START> storeConfigInfo.getRegionInfo().getEncodedName(), <END> storeConfigInfo.getColumnFamilyName() ); }</code><technical_language>want do RegionInfo.prettyPrint(storeConfigInfo.getRegionInfo().getEncodedName())</technical_language>

Target:
public String toString() { return String.format( "size [%s, %s, %s); files [%d, %d); ratio %f; off-peak ratio %f; throttle point %d;" + " major period %d, major jitter %f, min locality to compact %f;" + " tiered compaction: max_age %d, incoming window min %d," + " compaction policy for tiered window %s, single output for minor %b," + " compaction window factory %s," + " region %s columnFamilyName %s", StringUtils.byteDesc(minCompactSize), StringUtils.byteDesc(maxCompactSize), StringUtils.byteDesc(offPeakMaxCompactSize), minFilesToCompact, maxFilesToCompact, compactionRatio, offPeakCompactionRatio, throttlePoint, majorCompactionPeriod, majorCompactionJitter, minLocalityToForceCompact, dateTieredMaxStoreFileAgeMillis, dateTieredIncomingWindowMin, compactionPolicyForDateTieredWindow, dateTieredSingleOutputForMinorCompaction, dateTieredCompactionWindowFactory, RegionInfo.prettyPrint(storeConfigInfo.getRegionInfo().getEncodedName()), storeConfigInfo.getColumnFamilyName() ); }
Source:
<code>public String formatToString(Object att, NumberFormat coordFormatter) { String value = null; if (att instanceof Number) { value = coordFormatter.format(att); } else if (att instanceof Date) { if (att instanceof java.sql.Date) { <START> value = utcDateString((Date)att); <END> } else if (att instanceof Time) { value = DateUtil.serializeSqlTime((Time)att); }else { value = utcDateString((Date)att); } } else { value = att.toString(); } return value; }</code><technical_language>leave this serializeSqlDate. definition sql date is a date time timezone displaying a time timezone sound right. I of - sounds problematic</technical_language>

Target:
public String formatToString(Object att, NumberFormat coordFormatter) { String value = null; if (att instanceof Number) { value = coordFormatter.format(att); } else if (att instanceof Date) { if (att instanceof java.sql.Date) { value = DateUtil.serializeSqlDate((java.sql.Date)att); } else if (att instanceof Time) { value = DateUtil.serializeSqlTime((Time)att); }else { value = utcDateString((Date)att); } } else { value = att.toString(); } return value; }
Source:
<code><START> protected boolean isWindows() { <END> return OS.WINDOWS.equals(OS.getCurrent()); }</code><technical_language>method static</technical_language>

Target:
protected static boolean isWindows() { return OS.WINDOWS.equals(OS.getCurrent()); }
Source:
<code>public void testCheckOutRegisterEvict() throws Exception { Service service = mock(Service.class); when(_factory.create(any(ServiceEndPoint.class))).thenReturn(service); MultiThreadedClientServiceCache<Service> cache = newCache(0); ServiceHandle<Service> handle = cache.checkOut(_endPoint); <START> assertSame(handle.getService(), service); <END> assertSame(1, cache.getNumActiveInstances(_endPoint)); assertSame(1, cache.getNumIdleInstances(_endPoint)); cache.register(_endPoint); assertSame(1, cache.getNumActiveInstances(_endPoint)); assertSame(1, cache.getNumIdleInstances(_endPoint)); cache.evict(_endPoint); verify(_factory, timeout(100).times(1)).destroy(_endPoint, handle.getService()); assertSame(0, cache.getNumActiveInstances(_endPoint)); assertSame(0, cache.getNumIdleInstances(_endPoint)); }</code><technical_language>argument order</technical_language>

Target:
public void testCheckOutRegisterEvict() throws Exception { Service service = mock(Service.class); when(_factory.create(any(ServiceEndPoint.class))).thenReturn(service); MultiThreadedClientServiceCache<Service> cache = newCache(0); ServiceHandle<Service> handle = cache.checkOut(_endPoint); assertSame(service, handle.getService()); assertEquals(1, cache.getNumActiveInstances(_endPoint)); assertEquals(1, cache.getNumIdleInstances(_endPoint)); cache.register(_endPoint); assertEquals(1, cache.getNumActiveInstances(_endPoint)); assertEquals(1, cache.getNumIdleInstances(_endPoint)); cache.evict(_endPoint); verify(_factory, timeout(100).times(1)).destroy(_endPoint, handle.getService()); assertEquals(0, cache.getNumActiveInstances(_endPoint)); assertEquals(0, cache.getNumIdleInstances(_endPoint)); }
Source:
<code>public OnDomReadyHeaderItem setNonce(String nonce) { <START> Args.notNull(nonce, "nonce"); <END> this.nonce = nonce; return this; }</code><technical_language>nonEmpty</technical_language>

Target:
public OnDomReadyHeaderItem setNonce(String nonce) { this.nonce = nonce; return this; }
Source:
<code>public TimeRange deserialize( JsonElement jsonElement, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { if (jsonElement == null) return null; JsonObject json = jsonElement.getAsJsonObject(); if (!json.has("from") || !json.has("to")) { <START> throw new JsonParseException("no neceessary fields."); <END> } Date from = new Date(json.getAsJsonPrimitive("from").getAsLong()); Date to = new Date(json.getAsJsonPrimitive("to").getAsLong()); return new TimeRange(from, to); }</code><technical_language>neceessary fields. changed json of 2 necessary fields: to</technical_language>

Target:
public TimeRange deserialize( JsonElement jsonElement, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { if (jsonElement == null) return null; JsonObject json = jsonElement.getAsJsonObject(); if (!json.has("from") || !json.has("to")) { throw new JsonParseException( "son doesn't contain both of 2 necessary fields: from and to."); } Date from = new Date(json.getAsJsonPrimitive("from").getAsLong()); Date to = new Date(json.getAsJsonPrimitive("to").getAsLong()); return new TimeRange(from, to); }
Source:
<code>protected static final int getLimit(final Options expandOptions) { <START> return expandOptions.containsKey("limit") ? expandOptions.get("limit", Integer.class) : 50; <END> }</code><technical_language>This magic number a constant somewhere</technical_language>

Target:
protected static final int getLimit(final Options expandOptions) { return expandOptions.containsKey("limit") ? expandOptions.get("limit", Integer.class) : SearchRequestBuilder.DEFAULT_LIMIT; }
Source:
<code>public EList<Widget> renderWidget(Widget w, StringBuilder sb) throws RenderException { Chart chart = (Chart) w; try { String itemParam = null; Item item = itemUIRegistry.getItem(chart.getItem()); if(item instanceof GroupItem) { itemParam = "groups=" + chart.getItem(); } else { itemParam = "items=" + chart.getItem(); } String url = "/chart?" + itemParam + "&period=" + chart.getPeriod() + "&random=1"; if(chart.getService() != null) url += "&service=" + chart.getService(); String snippet = getSnippet("image"); if(chart.getRefresh()>0) { snippet = StringUtils.replace(snippet, "%setrefresh%", "<script type=\"text/javascript\">imagesToRefreshOnPage=1</script>"); <START> snippet = StringUtils.replace(snippet, "%refresh%", "id=\"%id%\" onload=\"OH.images.refresh=true;setTimeout('OH.reloadImage(\\'%url%\\', \\'%id%\\')', " + chart.getRefresh() + ")\""); <END> } else { snippet = StringUtils.replace(snippet, "%setrefresh%", ""); snippet = StringUtils.replace(snippet, "%refresh%", ""); } snippet = StringUtils.replace(snippet, "%id%", itemUIRegistry.getWidgetId(w)); snippet = StringUtils.replace(snippet, "%url%", url); snippet = StringUtils.replace(snippet, "%refresh%", Integer.toString(chart.getRefresh())); sb.append(snippet); } catch (ItemNotFoundException e) { logger.warn("Chart cannot be rendered as item '{}' does not exist.", chart.getItem()); } return null; }</code><technical_language>I time looked in code **reloadImage** function meant global. due syntax error is (It is in some browsers). I suggest fix this **reloadImage** function's globalness instead of modifying template. I wrong..</technical_language>

Target:
public EList<Widget> renderWidget(Widget w, StringBuilder sb) throws RenderException { Chart chart = (Chart) w; try { String itemParam = null; Item item = itemUIRegistry.getItem(chart.getItem()); if(item instanceof GroupItem) { itemParam = "groups=" + chart.getItem(); } else { itemParam = "items=" + chart.getItem(); } String url = "/chart?" + itemParam + "&period=" + chart.getPeriod() + "&random=1"; if(chart.getService() != null) url += "&service=" + chart.getService(); String snippet = getSnippet("image"); if(chart.getRefresh()>0) { snippet = StringUtils.replace(snippet, "%setrefresh%", "<script type=\"text/javascript\">OH.imagesToRefreshOnPage=1</script>"); snippet = StringUtils.replace(snippet, "%refresh%", "id=\"%id%\" onload=\"setTimeout('OH.reloadImage(\\'%url%\\', \\'%id%\\')', " + chart.getRefresh() + ")\""); } else { snippet = StringUtils.replace(snippet, "%setrefresh%", ""); snippet = StringUtils.replace(snippet, "%refresh%", ""); } snippet = StringUtils.replace(snippet, "%id%", itemUIRegistry.getWidgetId(w)); snippet = StringUtils.replace(snippet, "%url%", url); snippet = StringUtils.replace(snippet, "%refresh%", Integer.toString(chart.getRefresh())); sb.append(snippet); } catch (ItemNotFoundException e) { logger.warn("Chart cannot be rendered as item '{}' does not exist.", chart.getItem()); } return null; }
Source:
<code>public void should_fail_on_event_listener_exception_when_running_in_parallel() { CucumberFeature feature1 = TestHelper.feature("path/test.feature", "" + "Feature: feature name 1\n" + " Scenario: scenario_1 name\n" + " Given first step\n" + " Scenario: scenario_2 name\n" + " Given first step\n"); CucumberFeature feature2 = TestHelper.feature("path/test2.feature", "" + "Feature: feature name 2\n" + " Scenario: scenario_2 name\n" + " Given first step\n"); <START> ConcurrentEventListener brokenEventListener = publisher -> publisher.registerHandlerFor(TestStepFinished.class, (EventHandler<TestStepFinished>) event -> { <END> throw new RuntimeException("boom"); }); expectedException.expect(CompositeCucumberException.class); expectedException.expectMessage("There were 3 exceptions"); TestHelper.builder() .withFeatures(Arrays.asList(feature1, feature2)) .withFormatterUnderTest(brokenEventListener) .withTimeServiceType(TestHelper.TimeServiceType.REAL_TIME) .withRuntimeArgs("--threads", "2") .build() .run(); }</code><technical_language>suggestion ConcurrentEventListener brokenEventListener = publisher -> publisher.registerHandlerFor(TestStepFinished.class, (TestStepFinished event) -> { I work. is need cast</technical_language>

Target:
public void should_fail_on_event_listener_exception_when_running_in_parallel() { CucumberFeature feature1 = TestHelper.feature("path/test.feature", "" + "Feature: feature name 1\n" + " Scenario: scenario_1 name\n" + " Given first step\n" + " Scenario: scenario_2 name\n" + " Given first step\n"); CucumberFeature feature2 = TestHelper.feature("path/test2.feature", "" + "Feature: feature name 2\n" + " Scenario: scenario_2 name\n" + " Given first step\n"); ConcurrentEventListener brokenEventListener = publisher -> publisher.registerHandlerFor(TestStepFinished.class, (TestStepFinished event) -> { throw new RuntimeException("boom"); }); expectedException.expect(CompositeCucumberException.class); expectedException.expectMessage("There were 3 exceptions"); TestHelper.builder() .withFeatures(Arrays.asList(feature1, feature2)) .withFormatterUnderTest(brokenEventListener) .withTimeServiceType(TestHelper.TimeServiceType.REAL_TIME) .withRuntimeArgs("--threads", "2") .build() .run(); }
Source:
<code>public void setTimezone(String timezone) { if (timezone != null) { <START> this.timezone = TimeZone.getTimeZone(timezone).getID(); <END> } else { this.timezone = null; } }</code><technical_language>ternary operator here. code easier read in this case</technical_language>

Target:
public void setTimezone(String timezone) { this.timezone = timezone != null ? TimeZone.getTimeZone(timezone).getID() : null; }
Source:
<code>public void start() { String group = "carbon.connector.quartz"; JobDetail job = JobBuilder.newJob(PollingJob.class) .withIdentity("Job - " + RANDOM.nextLong(), group).build(); Trigger trigger; if (connector.cronExpression != null) { trigger = TriggerBuilder.newTrigger().withIdentity("Trigger - " + RANDOM.nextLong(), group) .withSchedule(CronScheduleBuilder.cronSchedule(connector.cronExpression)).build(); } else { trigger = TriggerBuilder.newTrigger().withIdentity("scheduledPoll", "group1").withSchedule( SimpleScheduleBuilder.simpleSchedule().withIntervalInMilliseconds(connector.interval) .repeatForever()).build(); } try { scheduler = new StdSchedulerFactory().getScheduler(); scheduler.getContext().put("connector", connector); scheduler.start(); scheduler.scheduleJob(job, trigger); } catch (SchedulerException e) { <START> log.error("Exception occurred while scheduling job"); <END> } }</code><technical_language>is intentional log 'e'</technical_language>

Target:
public void start() { String group = "carbon.connector.quartz"; JobDetail job = JobBuilder.newJob(PollingJob.class) .withIdentity("Job - " + RANDOM.nextLong(), group).build(); Trigger trigger; if (connector.cronExpression != null) { trigger = TriggerBuilder.newTrigger().withIdentity("Trigger - " + RANDOM.nextLong(), group) .withSchedule(CronScheduleBuilder.cronSchedule(connector.cronExpression)).build(); } else { trigger = TriggerBuilder.newTrigger().withIdentity("scheduledPoll", "group1").withSchedule( SimpleScheduleBuilder.simpleSchedule().withIntervalInMilliseconds(connector.interval) .repeatForever()).build(); } try { scheduler = new StdSchedulerFactory().getScheduler(); scheduler.getContext().put("connector", connector); scheduler.start(); scheduler.scheduleJob(job, trigger); } catch (SchedulerException e) { log.error("Exception occurred while scheduling job", e); } }
Source:
<code>public Iterator<LocatedRow> call(final InputStream s) throws Exception { if (operationContext.isFailed()) return Collections.<LocatedRow>emptyList().iterator(); checkPreference(); <START> return new Iterable<LocatedRow>() { <END> @Override public Iterator<LocatedRow> iterator() { return new Iterator<LocatedRow>() { private LocatedRow nextRow; private boolean initialized = false; private Reader reader; private SpliceCsvReader spliceCsvReader; private boolean hasNext = true; private boolean stale = false; @Override public boolean hasNext() { if (!hasNext || stale) return hasNext; try { if (!initialized) { reader = new BufferedReader(new InputStreamReader(s,charset)); spliceCsvReader = new SpliceCsvReader(reader, preference); initialized = true; } while (true) { try { if (!spliceCsvReader.hasNext()) { reader.close(); hasNext = false; return false; } nextRow = call(spliceCsvReader.next()); if (nextRow != null) { stale = true; hasNext = true; return true; } } catch (Exception e) { if (operationContext.isPermissive()) { operationContext.recordBadRecord(e.getLocalizedMessage(), e); } else throw StandardException.plainWrapException(e); } } } catch (Exception ioe) { throw new RuntimeException("Terminal, should have been caught", ioe); } } @Override public LocatedRow next() { if(!hasNext()) throw new NoSuchElementException(); stale = false; return nextRow; } @Override public void remove() { throw new RuntimeException("not supported"); } }; } }.iterator(); }</code><technical_language>remove this Iterable, return iterator creating in line 69 directly</technical_language>

Target:
public Iterator<LocatedRow> call(final InputStream s) throws Exception { if (operationContext.isFailed()) return Collections.<LocatedRow>emptyList().iterator(); checkPreference(); return new Iterator<LocatedRow>() { private LocatedRow nextRow; private boolean initialized = false; private Reader reader; private SpliceCsvReader spliceCsvReader; private boolean hasNext = true; private boolean stale = false; @Override public boolean hasNext() { if (!hasNext || stale) return hasNext; try { if (!initialized) { reader = new BufferedReader(new InputStreamReader(s,charset)); spliceCsvReader = new SpliceCsvReader(reader, preference); initialized = true; } while (true) { try { if (!spliceCsvReader.hasNext()) { reader.close(); hasNext = false; return false; } nextRow = call(spliceCsvReader.next()); if (nextRow != null) { stale = true; hasNext = true; return true; } } catch (Exception e) { if (operationContext.isPermissive()) { operationContext.recordBadRecord(e.getLocalizedMessage(), e); } else throw StandardException.plainWrapException(e); } } } catch (Exception ioe) { throw new RuntimeException("Terminal, should have been caught", ioe); } } @Override public LocatedRow next() { if(!hasNext()) throw new NoSuchElementException(); stale = false; return nextRow; } @Override public void remove() { throw new RuntimeException("not supported"); } }; }
Source:
<code><START> static void alignRead(BitBuffer input, IDeclaration declaration){ <END> int align = (int) declaration.getAlignment(); int pos = input.position() + ((align - (input.position() % align)) % align); input.position(pos); }</code><technical_language>"protected" more appropriate, meant sub-classes of Definition, matter package in. Minor thing</technical_language>

Target:
protected static void alignRead(BitBuffer input, IDeclaration declaration){ int align = (int) declaration.getAlignment(); int pos = input.position() + ((align - (input.position() % align)) % align); input.position(pos); }
Source:
<code>public List<byte[]> getParts() throws Exception { <START> List<byte[]> parts = new ArrayList<byte[]>(); <END> for (MimePart part : mimeParts) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); try { part.writeTo(bos); parts.add(bos.toByteArray()); } finally { bos.close(); } } return parts; }</code><technical_language>Pass mimeParts.size() constructor</technical_language>

Target:
List<byte[]> getParts() throws IOException { List<byte[]> parts = new ArrayList<byte[]>(mimeParts.size()); for (MimePart part : mimeParts) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); part.writeTo(bos); parts.add(bos.toByteArray()); } return parts; }
Source:
<code>public static Tuple<SAMFileHeader,Iterator<Interval>> toIntervals(final VCFFileReader vcf, final boolean includeFiltered) { final SAMSequenceDictionary dict = vcf.getFileHeader().getSequenceDictionary(); <START> final SAMFileHeader samFileHeader = new SAMFileHeader(); <END> samFileHeader.setSequenceDictionary(dict); final AtomicReference<Integer> intervals = new AtomicReference<>(1); final Iterator<Interval> iterator = vcf.iterator().stream().filter(vc -> includeFiltered || !vc.isFiltered()).map(vc -> { String name = vc.getID(); final int intervalEnd = vc.getCommonInfo().getAttributeAsInt(VCFConstants.END_KEY, vc.getEnd()); if (VCFConstants.EMPTY_ID_FIELD.equals(name) || name == null) { name = "interval-" + (intervals.getAndSet(intervals.get() + 1)); } return new Interval(vc.getContig(), vc.getStart(), intervalEnd, false, name); }).iterator(); return new Tuple<>(samFileHeader,iterator); }</code><technical_language>a constructor takes a dict directly</technical_language>

Target:
public static Iterator<Interval> toIntervals(final VCFFileReader vcf, final boolean includeFiltered) { final AtomicInteger intervalCount = new AtomicInteger(0); return vcf.iterator() .stream() .filter(vc -> includeFiltered || !vc.isFiltered()) .map(vc -> { String name = vc.getID(); final int intervalEnd = vc.getCommonInfo().getAttributeAsInt(VCFConstants.END_KEY, vc.getEnd()); if (VCFConstants.EMPTY_ID_FIELD.equals(name) || name == null) { name = "interval-" + intervalCount.incrementAndGet();; } return new Interval(vc.getContig(), vc.getStart(), intervalEnd, false, name); }).iterator(); }
Source:
<code>public boolean isValid() { <START> return lineNumber != -1 && inLineOffset != -1; <END> }</code><technical_language>nit: avoid defining invalid suggestion return this != INVALID_TEXT_POSITION;</technical_language>

Target:
public boolean isValid() { return this != INVALID_TEXT_POSITION; }
Source:
<code>public void testCreate() throws Exception { <START> <END> ScheduledQuery schq = createScheduledQuery(createKey("create", "c1")); ScheduledQueryMaintenanceRequest r = new ScheduledQueryMaintenanceRequest(); r.setType(ScheduledQueryMaintenanceRequestType.INSERT); r.setScheduledQuery(schq); client.scheduledQueryMaintenance(r); ScheduledQuery schq2 = client.getScheduledQuery(new ScheduledQueryKey("create", "c1")); schq.setNextExecution(schq2.getNextExecution()); assertEquals(schq2, schq); }</code><technical_language>Knitpick. New line</technical_language>

Target:
public void testCreate() throws Exception { ScheduledQuery schq = createScheduledQuery(createKey("create", "c1")); ScheduledQueryMaintenanceRequest r = new ScheduledQueryMaintenanceRequest(); r.setType(ScheduledQueryMaintenanceRequestType.CREATE); r.setScheduledQuery(schq); client.scheduledQueryMaintenance(r); ScheduledQuery schq2 = client.getScheduledQuery(new ScheduledQueryKey("create", "c1")); schq.setNextExecution(schq2.getNextExecution()); assertEquals(schq2, schq); }
Source:
<code>public void testSearchByIdParam() { String id1; { Patient patient = new Patient(); patient.addIdentifier().setSystem("urn:system").setValue("001"); id1 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless().getValue(); } String id2; { Organization patient = new Organization(); patient.addIdentifier().setSystem("urn:system").setValue("001"); id2 = myOrganizationDao.create(patient, mySrd).getId().toUnqualifiedVersionless().getValue(); } SearchParameterMap params = new SearchParameterMap(); params.setLoadSynchronous(true); assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(params)), contains(id1)); params = new SearchParameterMap(); params.add("_id", new StringParam(id1)); myCaptureQueriesListener.clear(); assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(params)), contains(id1)); <START> myCaptureQueriesListener.logSelectQueriesForCurrentThread(); <END> params = new SearchParameterMap(); params.add("_id", new StringParam("9999999999999999")); assertEquals(0, toList(myPatientDao.search(params)).size()); params = new SearchParameterMap(); params.add("_id", new StringParam(id2)); assertEquals(0, toList(myPatientDao.search(params)).size()); }</code><technical_language>logging part removed for merge</technical_language>

Target:
public void testSearchByIdParam() { String id1; { Patient patient = new Patient(); patient.addIdentifier().setSystem("urn:system").setValue("001"); id1 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless().getValue(); } String id2; { Organization patient = new Organization(); patient.addIdentifier().setSystem("urn:system").setValue("001"); id2 = myOrganizationDao.create(patient, mySrd).getId().toUnqualifiedVersionless().getValue(); } SearchParameterMap params = new SearchParameterMap(); params.setLoadSynchronous(true); assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(params)), contains(id1)); params = new SearchParameterMap(); params.add("_id", new StringParam(id1)); assertThat(toUnqualifiedVersionlessIdValues(myPatientDao.search(params)), contains(id1)); params = new SearchParameterMap(); params.add("_id", new StringParam("9999999999999999")); assertEquals(0, toList(myPatientDao.search(params)).size()); params = new SearchParameterMap(); params.add("_id", new StringParam(id2)); assertEquals(0, toList(myPatientDao.search(params)).size()); }
Source:
<code>public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); newsList = (RecyclerView) view.findViewById(R.id.news_list); LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity()); layoutManager.setOrientation(LinearLayoutManager.VERTICAL); newsList.setLayoutManager(layoutManager); dataset = new ArrayList<>(); newsAdapter = new NewsAdapter(this, dataset); newsList.setAdapter(newsAdapter); RecyclerView.ItemDecoration itemDecoration = new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST); newsList.addItemDecoration(itemDecoration); subscription = stories.subscribe(new Subscriber<List<News>>() { @Override public void onCompleted() { newsAdapter.notifyDataSetChanged(); Log.d("stories", "completed"); } @Override public void onError(Throwable e) { Log.d("stories err", e.toString()); } @Override public void onNext(List<News> items) { Log.d("stories", String.valueOf(items.size())); Log.d("stories content", items.toString()); <START> dataset.addAll(items); <END> } }); }</code><technical_language>I prefer NewsAdapter expose a public method add a new items dataset, instead of rely side effect this</technical_language>

Target:
public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); newsList = (RecyclerView) view.findViewById(R.id.news_list); LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity()); layoutManager.setOrientation(LinearLayoutManager.VERTICAL); newsList.setLayoutManager(layoutManager); newsAdapter = new NewsAdapter(this); newsList.setAdapter(newsAdapter); RecyclerView.ItemDecoration itemDecoration = new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST); newsList.addItemDecoration(itemDecoration); subscription = stories.subscribe(new Subscriber<List<News>>() { @Override public void onCompleted() { newsAdapter.notifyDataSetChanged(); Log.d("stories", "completed"); } @Override public void onError(Throwable e) { Log.d("stories err", e.toString()); } @Override public void onNext(List<News> items) { Log.d("stories", String.valueOf(items.size())); Log.d("stories content", items.toString()); newsAdapter.addDataset(items); } }); }
Source:
<code>public static SSLContext createDefaultSSLContext(final String pathToPKCS12File, final String keystorePassword) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException, KeyManagementException, IOException { final FileInputStream keystoreInputStream = new FileInputStream(pathToPKCS12File); try { final KeyStore keyStore = KeyStore.getInstance("PKCS12"); keyStore.load(keystoreInputStream, keystorePassword != null ? keystorePassword.toCharArray() : null); <START> return PushManagerFactory.createDefaultSSLContext(keyStore, keystorePassword.toCharArray()); <END> } finally { try { keystoreInputStream.close(); } catch (IOException e) { LoggerFactory.getLogger(PushManagerFactory.class).error("Failed to close keystore input stream.", e); } } }</code><technical_language>null check for keystorePassword happening avoid NPE</technical_language>

Target:
public static SSLContext createDefaultSSLContext(final String pathToPKCS12File, final String keystorePassword) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException, KeyManagementException, IOException { final FileInputStream keystoreInputStream = new FileInputStream(pathToPKCS12File); try { final KeyStore keyStore = KeyStore.getInstance("PKCS12"); keyStore.load(keystoreInputStream, keystorePassword != null ? keystorePassword.toCharArray() : null); return PushManagerFactory.createDefaultSSLContext(keyStore, keystorePassword != null ? keystorePassword.toCharArray() : null); } finally { try { keystoreInputStream.close(); } catch (IOException e) { LoggerFactory.getLogger(PushManagerFactory.class).error("Failed to close keystore input stream.", e); } } }
Source:
<code>public void processPullReply(final K key, final V value, final int requestId, final long elapsedTimeInServer) { int threadId; try { threadId = getThreadIndex(encodedKeyCache.get(key).getHash()); } catch (final ExecutionException e) { throw new RuntimeException(e); <START> } <END> synchronized (threads[threadId]) { final Map<K, PendingPull> pendingPulls = threads[threadId].pendingPulls; final PendingPull pendingPull = pendingPulls.get(key); if (checkPendingPull(pendingPull, requestId)) { pendingPulls.remove(key).resolvePendingOps(value, elapsedTimeInServer); if (pendingPulls.size() == MAX_PENDING_PULL_COUNT_PER_THREAD - 1) { threads[threadId].notify(); } } else { LOG.log(Level.INFO, "Could not find corresponding pendingPull for key: {0}, requestId: {1}", new Object[]{key, requestId}); } } }</code><technical_language>easy parse of ExecutionException. change this part following? final EncodedKey<K> encodedKey; try { encodedKey = encodedKeyCache.get(key); } catch (ExecutionException e) { throw new RuntimeException("Exception while loading encoded key cache", e); } final int threadId = getThreadIndex(encodedKey.getHash());</technical_language>

Target:
public void processPullReply(final K key, final V value, final int requestId, final long elapsedTimeInServer) { final EncodedKey<K> encodedKey; try { encodedKey = encodedKeyCache.get(key); } catch (final ExecutionException e) { throw new RuntimeException("Exception while loading encoded key from cache", e); } final WorkerThread workerThread = workerThreads[getThreadIndex(encodedKey.getHash())]; synchronized (workerThread) { final Map<K, PullRequest> pendingPullRequests = workerThread.pendingPullRequests; final PullRequest pullRequest = pendingPullRequests.get(key); if (pendingPullRequestExists(pullRequest, requestId)) { pendingPullRequests.remove(key).completePendingOps(value, elapsedTimeInServer); if (pendingPullRequests.size() == maxPendingPullsPerThread - 1) { workerThread.notify(); } } else { LOG.log(Level.INFO, "Could not find corresponding pullRequest for key: {0}, requestId: {1}", new Object[]{key, requestId}); } } }
Source:
<code>public void eventsMustBeReturnedInGuaranteedOrder() { final PartitionData pd = new PartitionData(null, 100L); for (long i = 0; i < 100; ++i) { <START> pd.addEventFromKafka(200L - i, ("test_" + (200L - i)).getBytes()); <END> } pd.addEventFromKafka(201L, "fake".getBytes()); for (int i = 0; i < 10; ++i) { final SortedMap<Long, byte[]> data = pd.takeEventsToStream(currentTimeMillis(), 10, 0L); assertNotNull(data); assertEquals(10, data.size()); assertEquals((i + 1) * 10, pd.getUnconfirmed()); assertEquals(0, pd.getKeepAliveInARow()); assertEquals(100L + i * 10L + 1L, data.firstKey().longValue()); assertEquals(100L + i * 10L + 10L, data.lastKey().longValue()); data.forEach((k, v) -> assertArrayEquals(("test_" + k).getBytes(), v)); } final SortedMap<Long, byte[]> data = pd.takeEventsToStream(currentTimeMillis(), 10, 0L); assertNotNull(data); assertEquals(1, data.size()); assertEquals(201L, data.firstKey().longValue()); assertArrayEquals("fake".getBytes(), data.get(data.firstKey())); assertEquals(0, pd.getKeepAliveInARow()); }</code><technical_language>UTF-8</technical_language>

Target:
public void eventsMustBeReturnedInGuaranteedOrder() { final PartitionData pd = new PartitionData(null, 100L); for (long i = 0; i < 100; ++i) { pd.addEventFromKafka(200L - i, ("test_" + (200L - i)).getBytes(UTF_8)); } pd.addEventFromKafka(201L, "fake".getBytes(UTF_8)); for (int i = 0; i < 10; ++i) { final SortedMap<Long, byte[]> data = pd.takeEventsToStream(currentTimeMillis(), 10, 0L); assertNotNull(data); assertEquals(10, data.size()); assertEquals((i + 1) * 10, pd.getUnconfirmed()); assertEquals(0, pd.getKeepAliveInARow()); assertEquals(100L + i * 10L + 1L, data.firstKey().longValue()); assertEquals(100L + i * 10L + 10L, data.lastKey().longValue()); data.forEach((k, v) -> assertArrayEquals(("test_" + k).getBytes(UTF_8), v)); } final SortedMap<Long, byte[]> data = pd.takeEventsToStream(currentTimeMillis(), 10, 0L); assertNotNull(data); assertEquals(1, data.size()); assertEquals(201L, data.firstKey().longValue()); assertArrayEquals("fake".getBytes(UTF_8), data.get(data.firstKey())); assertEquals(0, pd.getKeepAliveInARow()); }
Source:
<code>public void post_product() throws IOException { SendProduct product = new SendProduct(); product.setBarcode("978020137962"); <START> product.setName("coca3"); product.setBrands("auchan"); product.setWeight("300"); product.setWeight_unit("g"); product.setLang("fr"); <END> Map<String, String> productDetails = new HashMap<String, String>() {{ put("lang", product.getLang()); put("product_name", product.getName()); put("brands", product.getBrands()); put("quantity", product.getQuantity()); }}; State body = serviceWrite .saveProductSingle(product.getBarcode(), productDetails, PRODUCT_API_COMMENT) .blockingGet(); assertEquals(body.getStatus(), 1); assertEquals(body.getStatusVerbose(), "fields saved"); String fields = "product_name,brands,brands_tags,quantity"; Response<State> response = serviceWrite.getProductByBarcode(product.getBarcode(), fields, Utils.getUserAgent(Utils.HEADER_USER_AGENT_SEARCH)).execute(); Product savedProduct = response.body().getProduct(); assertEquals(product.getName(), savedProduct.getProductName()); assertEquals(product.getBrands(), savedProduct.getBrands()); assertTrue(savedProduct.getBrandsTags().contains(product.getBrands())); assertEquals(product.getWeight() + " " + product.getWeight_unit(), savedProduct.getQuantity()); }</code><technical_language>Is this needed anymore barcode? set productDetails Map directly</technical_language>

Target:
public void post_product() throws IOException { SendProduct product = new SendProduct(); product.setBarcode("1234567890"); product.setName("ProductName"); product.setBrands("productbrand"); product.setWeight("123"); product.setWeight_unit("g"); product.setLang("en"); Map<String, String> productDetails = new HashMap<String, String>() {{ put("lang", product.getLang()); put("product_name", product.getName()); put("brands", product.getBrands()); put("quantity", product.getQuantity()); }}; State body = serviceWrite .saveProductSingle(product.getBarcode(), productDetails, PRODUCT_API_COMMENT) .blockingGet(); assertEquals(body.getStatus(), 1); assertEquals(body.getStatusVerbose(), "fields saved"); String fields = "product_name,brands,brands_tags,quantity"; Response<State> response = serviceWrite.getProductByBarcode(product.getBarcode(), fields, Utils.getUserAgent(Utils.HEADER_USER_AGENT_SEARCH)).execute(); Product savedProduct = response.body().getProduct(); assertEquals(product.getName(), savedProduct.getProductName()); assertEquals(product.getBrands(), savedProduct.getBrands()); assertTrue(savedProduct.getBrandsTags().contains(product.getBrands())); assertEquals(product.getWeight() + " " + product.getWeight_unit(), savedProduct.getQuantity()); }
Source:
<code>protected void findTop() throws IOException { SortedKeyValueIterator<Key,Value> src = getSource(); if (src.hasTop() && advance != null) { advanceSource(src, advance); } advance = null; while (src.hasTop() && !advancedPastSeek) { if (src.getTopKey().isDeleted()) { advance = AdvanceResult.NEXT; return; } FilterResult f = filter(src.getTopKey(), src.getTopValue()); if (log.isTraceEnabled()) { <START> log.trace("Filtered: " + src.getTopKey() + " result == " + f + " hint == " + getNextKeyHint(src.getTopKey(), src.getTopValue())); <END> } if (f.accept != negate) { advance = f.advance; break; } else { advanceSource(src, f.advance); } } }</code><technical_language>Nit: flip this replacement slf4j syntax instead of string concat</technical_language>

Target:
protected void findTop() throws IOException { SortedKeyValueIterator<Key,Value> src = getSource(); advance = null; while (src.hasTop() && !advancedPastSeek) { if (src.getTopKey().isDeleted()) { advance = AdvanceResult.NEXT; return; } FilterResult f = filter(src.getTopKey(), src.getTopValue()); if (log.isTraceEnabled()) { log.trace("Filtered: result == hint == {}", src.getTopKey(), f, f.advance == AdvanceResult.USE_HINT ? getNextKeyHint(src.getTopKey(), src.getTopValue()) : " (none)"); } if (f.accept != negate) { advance = f.advance; break; } else { advanceSource(src, f.advance); } } }
Source:
<code>private ThreadPoolExecutor createAddConnectionExecutor(ThreadFactory threadFactory, <START> LinkedBlockingQueue<Runnable> addQueue) <END> { int poosSize = 1; if (Boolean.getBoolean("com.zaxxer.hikari.blockUntilFilled") && config.getInitializationFailTimeout() > 1) { poosSize = config.getMinimumIdle(); } return createThreadPoolExecutorWithFixedSize(addQueue, poolName + " connection adder", threadFactory, new ThreadPoolExecutor.DiscardPolicy(), poosSize); }</code><technical_language>Do wrap line here. allow lines of 220 characters. Parameters final</technical_language>

Target:
private ThreadPoolExecutor createAddConnectionExecutor(ThreadFactory threadFactory, LinkedBlockingQueue<Runnable> addQueue) { final int maxPoolSize; if (isBlockedInitialization(config)) { maxPoolSize = config.getMinimumIdle(); } else { maxPoolSize = 1; } return createThreadPoolExecutorWithFlexibleSize(addQueue, poolName + " connection adder", threadFactory, new ThreadPoolExecutor.DiscardPolicy(), maxPoolSize); }
Source:
<code>public MetricResource(String urlTemplate) { super(urlTemplate); metricPublisher = new MetricPublisher(); <START> isPrometheusPublishingEnabled = Boolean.parseBoolean(System.getProperty("enablePrometheusBE")); <END> }</code><technical_language>rename else? enablePrometheusAPI? @a5anka whyt</technical_language>

Target:
public MetricResource(String urlTemplate) { super(urlTemplate); metricPublisher = new MetricPublisher(); }
Source:
<code>public Field copy() { return new Builder() <START> .setName(this.name) <END> .setValue(this.value) .setLabel(this.label) .setPlaceholder(this.placeholder) .setRequired(this.required) .setType(this.type) .setVisible(this.visible) .setEnable(this.enable) .build(); }</code><technical_language>de IntelliJ defaults</technical_language>

Target:
public Field copy() { return builder() .setName(this.name) .setValue(this.value) .setLabel(this.label) .setPlaceholder(this.placeholder) .setRequired(this.required) .setType(this.type) .setVisible(this.visible) .setEnabled(this.enabled) .build(); }
Source:
<code>public FunctionListModel() { readSQLFunctions(); <START> Services.getService(DataManager.class).getDataSourceFactory().getFunctionManager().addFunctionManagerListener(functionListener); <END> }</code><technical_language>retrieve function manager in lines... a free operation, intermediate variable here..</technical_language>

Target:
public FunctionListModel() { FunctionManager functionManager = Services.getService(DataManager.class).getDataSourceFactory().getFunctionManager(); readSQLFunctions(functionManager); functionManager.addFunctionManagerListener(functionListener); }
Source:
<code>public ActionResult execute() throws EntityDoesNotExistException { new GateKeeper().verifyLoggedInUserPrivileges(); data = new StudentHomePageData(account); String recentlyJoinedCourseId = getRequestParamValue(Const.ParamsNames.CHECK_PERSISTENCE_COURSE); try { Map<String, StudentAttributes> courseToAttributesMap = new HashMap<String, StudentAttributes>(); data.courses = logic.getCourseDetailsListForStudent(account.googleId, courseToAttributesMap); data.sessionSubmissionStatusMap = generateFeedbackSessionSubmissionStatusMap(data.courses, account.googleId, <START> courseToAttributesMap); <END> CourseDetailsBundle.sortDetailedCourses(data.courses); statusToAdmin = "studentHome Page Load<br>" + "Total courses: " + data.courses.size(); boolean isDataConsistent = checkEventualConsistency(recentlyJoinedCourseId); if (!isDataConsistent) { addPlaceholderCourse(recentlyJoinedCourseId, account.googleId); data.setEventualConsistencyCourse(recentlyJoinedCourseId); } for(CourseDetailsBundle course: data.courses) { FeedbackSessionDetailsBundle.sortFeedbackSessionsByCreationTime(course.feedbackSessions); } } catch (EntityDoesNotExistException e) { if (recentlyJoinedCourseId != null) { addPlaceholderCourse(recentlyJoinedCourseId, account.googleId); } else { statusToUser.add(Const.StatusMessages.STUDENT_FIRST_TIME); statusToAdmin = Const.ACTION_RESULT_FAILURE + " :" + e.getMessage(); } } ShowPageResult response = createShowPageResult(Const.ViewURIs.STUDENT_HOME, data); return response; }</code><technical_language>courseToAttributes is ambiguous. Attributes? courseStudentMap</technical_language>

Target:
public ActionResult execute() throws EntityDoesNotExistException { new GateKeeper().verifyLoggedInUserPrivileges(); data = new StudentHomePageData(account); String recentlyJoinedCourseId = getRequestParamValue(Const.ParamsNames.CHECK_PERSISTENCE_COURSE); try { data.courses = logic.getCourseDetailsListForStudent(account.googleId); data.sessionSubmissionStatusMap = generateFeedbackSessionSubmissionStatusMap(data.courses, account.googleId); CourseDetailsBundle.sortDetailedCourses(data.courses); statusToAdmin = "studentHome Page Load<br>" + "Total courses: " + data.courses.size(); boolean isDataConsistent = checkEventualConsistency(recentlyJoinedCourseId); if (!isDataConsistent) { addPlaceholderCourse(recentlyJoinedCourseId, account.googleId); data.setEventualConsistencyCourse(recentlyJoinedCourseId); } for(CourseDetailsBundle course: data.courses) { FeedbackSessionDetailsBundle.sortFeedbackSessionsByCreationTime(course.feedbackSessions); } } catch (EntityDoesNotExistException e) { if (recentlyJoinedCourseId != null) { addPlaceholderCourse(recentlyJoinedCourseId, account.googleId); } else { statusToUser.add(Const.StatusMessages.STUDENT_FIRST_TIME); statusToAdmin = Const.ACTION_RESULT_FAILURE + " :" + e.getMessage(); } } ShowPageResult response = createShowPageResult(Const.ViewURIs.STUDENT_HOME, data); return response; }
Source:
<code>public void isCompleted_shouldReturnFalseIfPerformedStatusIsNotCompleted() throws Exception { RadiologyStudy radiologystudy = new RadiologyStudy(); radiologystudy.setPerformedStatus(PerformedProcedureStepStatus.IN_PROGRESS); <START> assertFalse(radiologystudy.isCompleted()); <END> }</code><technical_language>in general, change else other in jira issue. in this PR test isScheduleable toString</technical_language>

Target:
public void isCompleted_shouldReturnFalseIfPerformedStatusIsNotCompleted() throws Exception { RadiologyStudy radiologyStudy = new RadiologyStudy(); radiologyStudy.setPerformedStatus(PerformedProcedureStepStatus.IN_PROGRESS); assertFalse(radiologyStudy.isCompleted()); }
Source:
<code>public void testDoesNotFire() { tester().assertThat(new RemoveEmptyDelete()) .on(p -> p.tableDelete( new SchemaTableName("sch", "tab"), p.tableScan( new TableHandle( CONNECTOR_ID, new TpchTableHandle("nation", 1.0), TestingTransactionHandle.create(), Optional.empty()), ImmutableList.of(), ImmutableMap.of(), false, <START> TupleDomain.all(), <END> TupleDomain.all()), p.variable("a", BIGINT))) .doesNotFire(); }</code><technical_language>adding TupleDomain.all() here? other constructor delete field</technical_language>

Target:
public void testDoesNotFire() { tester().assertThat(new RemoveEmptyDelete()) .on(p -> p.tableDelete( new SchemaTableName("sch", "tab"), p.tableScan( new TableHandle( CONNECTOR_ID, new TpchTableHandle("nation", 1.0), TestingTransactionHandle.create(), Optional.empty()), ImmutableList.of(), ImmutableMap.of()), p.variable("a", BIGINT))) .doesNotFire(); }
Source:
<code>public int compareOrder(NodeInfo nodeInfo) { <START> int cmp = getLineNumber() - nodeInfo.getLineNumber(); <END> if (cmp == 0) { cmp = getColumnNumber() - nodeInfo.getColumnNumber(); if (cmp == 0) { cmp = getLocalPart().compareTo(nodeInfo.getLocalPart()); } } return cmp; }</code><technical_language>Rename result fix spelling failure</technical_language>

Target:
public int compareOrder(NodeInfo nodeInfo) { int result = getLineNumber() - nodeInfo.getLineNumber(); if (result == 0) { result = getColumnNumber() - nodeInfo.getColumnNumber(); if (result == 0) { result = getLocalPart().compareTo(nodeInfo.getLocalPart()); } } return result; }
Source:
<code>private void parseModel() { <START> System.out.println("parse..."); <END> try { model = Model.parseYaml(schema, get()); } catch (Exception e) { model = null; } }</code><technical_language>Leftover sysout</technical_language>

Target:
private void parseModel() { try { model = Model.parseYaml(schema, get()); } catch (Exception e) { model = null; } }
Source:
<code><START> protected boolean compareIndexTypeTo(String indexType, String indexSettings) { <END> if (!this.indexType.equalsIgnoreCase(indexType)) { return false; } if (this.indexSettings == null && indexSettings == null) { return true; } else if (this.indexSettings == null || indexSettings == null) { return false; } String settingsAsAString; try { settingsAsAString = new ObjectMapper().writeValueAsString(this.indexSettings); } catch (JsonProcessingException e) { String msg = String.format("Error processing index settings %s", this.indexSettings.toString()); logger.log(Level.SEVERE, msg, e); return false; } return settingsAsAString.equalsIgnoreCase(indexSettings); }</code><technical_language>is this method used? wondering if for this class implement comparable instead</technical_language>

Target:
protected boolean compareIndexTypeTo(String indexType, String indexSettings) { if (!this.indexType.equalsIgnoreCase(indexType)) { return false; } if (this.indexSettings == null && indexSettings == null) { return true; } else if (this.indexSettings == null || indexSettings == null) { return false; } Map<String, Object> settings; try { settings = getObjectMapper().readValue(indexSettings, new TypeReference<Map<String, Object>>() { }); } catch (IOException e) { String msg = String.format("Error processing index settings %s", this.indexSettings.toString()); logger.log(Level.SEVERE, msg, e); return false; } return this.indexSettings.equals(settings); }
Source:
<code>public void testPathThrough() { <START> ApplicationContext context = new SpringApplicationBuilder( <END> TestChannelBinderConfiguration.getCompleteConfiguration(FunctionsConfiguration.class)).web( WebApplicationType.NONE).run("--spring.jmx.enabled=false"); InputDestination source = context.getBean(InputDestination.class); OutputDestination target = context.getBean(OutputDestination.class); source.send(new GenericMessage<byte[]>("hello".getBytes(StandardCharsets.UTF_8))); assertThat(target.receive(1000).getPayload()).isEqualTo("hello".getBytes(StandardCharsets.UTF_8)); }</code><technical_language>@dturanski , here, consider, please, close() application contexts in end of tests</technical_language>

Target:
public void testPathThrough() { context = new SpringApplicationBuilder( TestChannelBinderConfiguration.getCompleteConfiguration(FunctionsConfiguration.class)).web( WebApplicationType.NONE).run("--spring.jmx.enabled=false"); InputDestination source = context.getBean(InputDestination.class); OutputDestination target = context.getBean(OutputDestination.class); source.send(new GenericMessage<byte[]>("hello".getBytes(StandardCharsets.UTF_8))); assertThat(target.receive(1000).getPayload()).isEqualTo("hello".getBytes(StandardCharsets.UTF_8)); }