auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testPluginLifeCycle(){ CustomWpsService localWpsServer = new CustomWpsService(); CustomCoreWorkspace customCoreWorkspace = new CustomCoreWorkspace(); Assert.assertNotNull("Unable to create the temporary folder for the custom CoreWorkspace.", customCoreWorkspace.getApplicationFolder()); OrbisGISWpsScriptPlugin plugin = new OrbisGISWpsScriptPlugin(); plugin.setLocalWpsService(localWpsServer); plugin.setCoreWorkspace(new CustomCoreWorkspace()); plugin.activate(); List<File> addScriptList = localWpsServer.getAddScriptList(); File folder = new File(this.getClass().getResource("scripts").getFile()); List<File> resourceGroovyScriptList = getAllGroovyScripts(folder); for(File resourceScript : resourceGroovyScriptList){ boolean isResourceScriptAdd = false; for(File addScript : addScriptList){ if(resourceScript.getName().equals(addScript.getName())){ isResourceScriptAdd = true; } } <START> Assert.assertTrue("The resource file '"+resourceScript.getName()+"' should be add by the plugin.", isResourceScriptAdd); <END> } plugin.deactivate(); Assert.assertTrue("All the scripts should have been removed from the server.", localWpsServer.getAddScriptList().isEmpty()); plugin.unsetCoreWorkspace(null); plugin.unsetInternalWpsClient(null); }</code><technical_language>I understand test is wps scripts</technical_language>

Target:
public void testPluginLifeCycle(){ CustomWpsService localWpsServer = new CustomWpsService(); CustomCoreWorkspace customCoreWorkspace = new CustomCoreWorkspace(); Assert.assertNotNull("Unable to create the temporary folder for the custom CoreWorkspace.", customCoreWorkspace.getApplicationFolder()); OrbisGISWpsScriptPlugin plugin = new OrbisGISWpsScriptPlugin(); plugin.setLocalWpsService(localWpsServer); plugin.setCoreWorkspace(new CustomCoreWorkspace()); plugin.activate(); List<File> addScriptList = localWpsServer.getAddScriptList(); File folder = new File(this.getClass().getResource("scripts").getFile()); List<File> resourceGroovyScriptList = getAllGroovyScripts(folder); for(File resourceScript : resourceGroovyScriptList){ boolean isResourceScriptAdd = false; for(File addScript : addScriptList){ if(resourceScript.getName().equals(addScript.getName())){ isResourceScriptAdd = true; } } Assert.assertTrue("The resource file '"+resourceScript.getName()+"' should be add by the plugin.", isResourceScriptAdd); } plugin.deactivate(); Assert.assertTrue("All the scripts should have been removed from the server.", localWpsServer.getAddScriptList().isEmpty()); plugin.unsetCoreWorkspace(null); plugin.unsetLocalWpsService(null); }
Source:
<code>public void close() { if (closeClient && !client.isClosed()) { try { client.close(); } catch (IOException e) { <START> throw new RuntimeException(e); <END> } } closed = true; }</code><technical_language>I log warn rethrow unchecked exception, especially closed executed (could wrapped in finally block)</technical_language>

Target:
public void close() { if (closeClient && !client.isClosed()) { try { client.close(); } catch (IOException e) { logger.warn("Unexpected error on client close", e); } } closed = true; }
Source:
<code>public Optional<PassengerData> fill(DataHolder dataHolder, PassengerData manipulator) { if (dataHolder instanceof net.minecraft.entity.Entity) { <START> manipulator.set(Keys.VEHICLE, (Entity) ((net.minecraft.entity.Entity) dataHolder).ridingEntity); <END> net.minecraft.entity.Entity currentEntity = ((net.minecraft.entity.Entity) dataHolder).ridingEntity; while (currentEntity != null && currentEntity.isRiding()) { currentEntity = currentEntity.ridingEntity; } final Entity baseVehicle = (Entity) currentEntity; manipulator.set(Keys.BASE_VEHICLE, baseVehicle); return Optional.of(manipulator); } return Optional.absent(); }</code><technical_language>checking ridingEntity is null, do first, if riding entity is null, setting manipulator</technical_language>

Target:
public Optional<PassengerData> fill(DataHolder dataHolder, PassengerData manipulator) { if (supports(dataHolder)) { manipulator.set(Keys.VEHICLE, (Entity) ((net.minecraft.entity.Entity) dataHolder).ridingEntity); net.minecraft.entity.Entity currentEntity = ((net.minecraft.entity.Entity) dataHolder).ridingEntity; while (currentEntity != null && currentEntity.isRiding()) { currentEntity = currentEntity.ridingEntity; } final Entity baseVehicle = (Entity) currentEntity; manipulator.set(Keys.BASE_VEHICLE, baseVehicle); return Optional.of(manipulator); } return Optional.absent(); }
Source:
<code>private void checkAndAllocateAppUser(String appUser) { if (appUserToLocalUser.containsKey(appUser)) { return; } LOG.info("Allocating local user for appUser " + appUser); int index = -1; for (int i=0; i<localUserCount; ++i) { if (!allocated.get(i)) { index = i; allocated.set(i, true); break; } } if (index == -1) { String errMsg = "Cannot allocate local users from a pool of " + <START> localUserCount; <END> LOG.error(errMsg); throw new RuntimeException(errMsg); } appUserToLocalUser.put(appUser, new LocalUserInfo(localUserPrefix + index, index)); LOG.info("Allocated local user index " + index + " for appUser " + appUser); }</code><technical_language>whitespace:end of line</technical_language>

Target:
private boolean checkAndAllocateAppUser(String appUser) { if (appUserToLocalUser.containsKey(appUser)) { return true; } LOG.info("Allocating local user for appUser " + appUser); int index = localUserIndex(appUser); if (index == -1) { for (int i=0; i<localUserCount; ++i) { if (!allocated.get(i)) { index = i; break; } } } if (index == -1) { String errMsg = "Cannot allocate local users from a pool of " + localUserCount; LOG.error(errMsg); return false; } else { allocated.set(index, true); } appUserToLocalUser.put(appUser, new LocalUserInfo(localUserPrefix + index, index)); LOG.info("Allocated local user index " + index + " for appUser " + appUser); return true; }
Source:
<code>public void showRemoveLanguagesDialog() { if (selectedCodes.size() > 0) { if (selectedCodes.size() < <START> wikipediaLanguages.size() - EMPTY_ITEMS_FORM_SECTION_TEXT) { <END> new AlertDialog.Builder(requireActivity()) .setCancelable(false) .setTitle(R.string.wikipedia_languages_remove_dialog_title) .setMessage(R.string.wikipedia_languages_remove_dialog_content) .setPositiveButton(R.string.wikipedia_languages_remove_dialog_ok, (dialog, i) -> { deleteSelectedLanguages(); finishActionMode(); }) .setNegativeButton(R.string.wikipedia_languages_remove_dialog_cancel, null) .show(); } else { new AlertDialog.Builder(requireActivity()) .setCancelable(false) .setTitle(R.string.wikipedia_languages_remove_warning_dialog_title) .setMessage(R.string.wikipedia_languages_remove_warning_dialog_content) .setPositiveButton(R.string.wikipedia_languages_remove_warning_dialog_ok, null) .show(); } } }</code><technical_language>longer necessary</technical_language>

Target:
public void showRemoveLanguagesDialog() { if (selectedCodes.size() > 0) { if (selectedCodes.size() < wikipediaLanguages.size()) { new AlertDialog.Builder(requireActivity()) .setTitle(R.string.wikipedia_languages_remove_dialog_title) .setMessage(R.string.wikipedia_languages_remove_dialog_content) .setPositiveButton(android.R.string.ok, (dialog, i) -> { deleteSelectedLanguages(); finishActionMode(); }) .setNegativeButton(android.R.string.cancel, null) .show(); } else { new AlertDialog.Builder(requireActivity()) .setTitle(R.string.wikipedia_languages_remove_warning_dialog_title) .setMessage(R.string.wikipedia_languages_remove_warning_dialog_content) .setPositiveButton(android.R.string.ok, null) .show(); } } }
Source:
<code>public void install() { if(Strings.isNonBlank(getEntity().getConfig(VanillaWindowsProcess.INSTALL_COMMAND)) || Strings.isNonBlank(getEntity().getConfig(VanillaWindowsProcess.INSTALL_POWERSHELL_COMMAND))) { executeCommand(VanillaWindowsProcess.INSTALL_COMMAND, VanillaWindowsProcess.INSTALL_POWERSHELL_COMMAND, true); <START> if (entity.getConfig(VanillaWindowsProcess.INSTALL_REBOOT_REQUIRED)) { <END> rebootAndWait(); } } }</code><technical_language>in other commands: move reboot check of outer if block</technical_language>

Target:
public void install() { if(Strings.isNonBlank(getEntity().getConfig(VanillaWindowsProcess.INSTALL_COMMAND)) || Strings.isNonBlank(getEntity().getConfig(VanillaWindowsProcess.INSTALL_POWERSHELL_COMMAND))) { executeCommand(VanillaWindowsProcess.INSTALL_COMMAND, VanillaWindowsProcess.INSTALL_POWERSHELL_COMMAND, true); } if (entity.getConfig(VanillaWindowsProcess.INSTALL_REBOOT_REQUIRED)) { rebootAndWait(); } }
Source:
<code>public Optional<BasicAuthUser> authenticate(BasicCredentials basicCredentials) { return gatewayAccountDao.findByNotificationCredentialsUsername(basicCredentials.getUsername()) .filter((gatewayAccountEntity) -> matchCredentials(basicCredentials, gatewayAccountEntity)) .map(gatewayAccountEntity -> Optional.ofNullable(gatewayAccountEntity.getNotificationCredentials().toBasicAuthUser())) .orElseGet(() -> { <START> LOGGER.info(format("Authentication failure: failed for smartpay username %s", basicCredentials)); <END> return Optional.empty(); }); }</code><technical_language>I this is error. suggests a service credentials wrong, fix</technical_language>

Target:
public Optional<BasicAuthUser> authenticate(BasicCredentials basicCredentials) { return gatewayAccountDao.findByNotificationCredentialsUsername(basicCredentials.getUsername()) .filter((gatewayAccountEntity) -> matchCredentials(basicCredentials, gatewayAccountEntity)) .map(gatewayAccountEntity -> Optional.ofNullable(gatewayAccountEntity.getNotificationCredentials().toBasicAuthUser())) .orElseGet(() -> { LOGGER.warn(format("Authentication failure: failed for smartpay username %s", basicCredentials)); return Optional.empty(); }); }
Source:
<code>private void help() { if (welcomeService != null) { welcomeService.displayWelcome(); return; } if (appService != null && textService != null) { final File baseDir = appService.getApp().getBaseDirectory(); final File welcomeFile = new File(baseDir, "WELCOME.md"); if (welcomeFile.exists()) try { final String welcomeText = textService.asHTML(welcomeFile); <START> displayService.createDisplay(welcomeText); <END> return; } catch (final IOException e) { if (log != null) { log.error(e); } else { e.printStackTrace(); } } } if (platformService != null && WELCOME_URL != null) { try { platformService.open(WELCOME_URL); return; } catch (final IOException e) { if (log != null) { log.error(e); } else { e.printStackTrace(); } } } final String message = "No appropriate service found to display the message"; if (uiService != null) { uiService.showDialog(message, MessageType.ERROR_MESSAGE); return; } if (log != null) { log.error(message); } else { System.err.println(message); } }</code><technical_language>displayService is required = false here, null checked</technical_language>

Target:
private void help() { if (welcomeService != null) { welcomeService.displayWelcome(); return; } if (appService != null && textService != null && displayService != null) { final File baseDir = appService.getApp().getBaseDirectory(); final File welcomeFile = new File(baseDir, "WELCOME.md"); if (welcomeFile.exists()) try { final String welcomeText = textService.asHTML(welcomeFile); displayService.createDisplay(welcomeText); return; } catch (final IOException e) { if (log != null) { log.error(e); } else { e.printStackTrace(); } } } if (platformService != null && WELCOME_URL != null) { try { platformService.open(WELCOME_URL); return; } catch (final IOException e) { if (log != null) { log.error(e); } else { e.printStackTrace(); } } } final String message = "No appropriate service found to display the message"; if (uiService != null) { uiService.showDialog(message, MessageType.ERROR_MESSAGE); return; } if (log != null) { log.error(message); } else { System.err.println(message); } }
Source:
<code>public boolean install(IProgressMonitor progress) throws Exception { TaCoKitCar tckCar = getCar(); <START> String[] carCmd = new String[] { "java", "-jar", "\"" + tckCar.getCarFile().getAbsolutePath() + "\"", "studio-deploy", END> "\"" + URIUtil.toFile(Platform.getInstallLocation().getURL().toURI()).getAbsolutePath() + "\"" }; Process exec = Runtime.getRuntime().exec(carCmd); while (exec.isAlive()) { Thread.sleep(100); TaCoKitUtil.checkMonitor(progress); } TaCoKitUtil.checkMonitor(progress); return exec.exitValue() == 0; }</code><technical_language>New File(System.getProperty("java.home"), "bin/java" + (System.getProperty("os.name").toLowerCase(ROOT).contains("win")? ".exe":"")).getAbsolutePath() instead of assuming java is in path</technical_language>

Target:
public boolean install(IProgressMonitor progress) throws Exception { TaCoKitCar tckCar = getCar(); String[] carCmd = new String[] { new File(System.getProperty("java.home"), "bin/java" + (System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("win") ? ".exe" : "")) .getAbsolutePath(), "-jar", "\"" + tckCar.getCarFile().getAbsolutePath() + "\"", "studio-deploy", "\"" + URIUtil.toFile(Platform.getInstallLocation().getURL().toURI()).getAbsolutePath() + "\"" }; Process exec = Runtime.getRuntime().exec(carCmd); while (exec.isAlive()) { Thread.sleep(100); TaCoKitUtil.checkMonitor(progress); } TaCoKitUtil.checkMonitor(progress); return exec.exitValue() == 0; }
Source:
<code>public static <E extends Throwable> void assertThrows(Class<E> exc, Runnable runnable) { try { runnable.run(); <START> fail("Expected failure"); <END> } catch (Throwable t) { assertTrue("Expected " + exc + ", " + t.getClass() + " thrown.", exc.isAssignableFrom(t.getClass())); } }</code><technical_language>This is unexpected failure. Message a bit more explicit ("expected exc.getClass() thrown, exception thrown" similar)</technical_language>

Target:
public static <E extends Throwable> void assertThrows(Class<E> exc, Runnable runnable) { try { runnable.run(); fail("Expected " + exc.getName() + " to be thrown but no exception thrown."); } catch (Throwable t) { if (!exc.isAssignableFrom(t.getClass())) { throw new AssertionError("Expected exception " + exc.getName() + " to be thrown but " + t.getClass().getName() + " was thrown.", t); } } }
Source:
<code>private void getRowViewForLeaf(ViewHolder viewHolder, final SectionRow row) { final CourseComponent unit = row.component; viewHolder.rowType.setVisibility(View.VISIBLE); viewHolder.rowSubtitleIcon.setVisibility(View.GONE); viewHolder.rowSubtitle.setVisibility(View.GONE); viewHolder.rowSubtitlePanel.setVisibility(View.GONE); viewHolder.bulkDownload.setVisibility(View.INVISIBLE); viewHolder.rowTitle.setText(unit.getDisplayName()); if (row.component instanceof VideoBlockModel) { final DownloadEntry videoData = ((VideoBlockModel) row.component).getDownloadEntry(storage); if (null != videoData) { updateUIForVideo(viewHolder, videoData); return; } } <START> if (unit.getType() == BlockType.DISCUSSION) { <END> viewHolder.rowType.setIcon(FontAwesomeIcons.fa_comments_o); checkAccessStatus(viewHolder, unit); } else if (!unit.isMultiDevice()) { viewHolder.bulkDownload.setVisibility(View.INVISIBLE); viewHolder.rowType.setIcon(FontAwesomeIcons.fa_laptop); viewHolder.rowType.setIconColorResource(R.color.edx_grayscale_neutral_base); } else { viewHolder.bulkDownload.setVisibility(View.INVISIBLE); if (unit.getType() == BlockType.PROBLEM) { viewHolder.rowType.setIcon(FontAwesomeIcons.fa_list); } else { viewHolder.rowType.setIcon(FontAwesomeIcons.fa_file_o); } checkAccessStatus(viewHolder, unit); } }</code><technical_language>This changed unit instanceof DiscussionBlockModel. Ref <LINK_0></technical_language>

Target:
private void getRowViewForLeaf(ViewHolder viewHolder, final SectionRow row) { final CourseComponent unit = row.component; viewHolder.rowType.setVisibility(View.VISIBLE); viewHolder.rowSubtitleIcon.setVisibility(View.GONE); viewHolder.rowSubtitle.setVisibility(View.GONE); viewHolder.rowSubtitlePanel.setVisibility(View.GONE); viewHolder.bulkDownload.setVisibility(View.INVISIBLE); viewHolder.rowTitle.setText(unit.getDisplayName()); if (row.component instanceof VideoBlockModel) { final DownloadEntry videoData = ((VideoBlockModel) row.component).getDownloadEntry(storage); if (null != videoData) { updateUIForVideo(viewHolder, videoData); return; } } if (row.component instanceof DiscussionBlockModel) { viewHolder.rowType.setIcon(FontAwesomeIcons.fa_comments_o); checkAccessStatus(viewHolder, unit); } else if (!unit.isMultiDevice()) { viewHolder.bulkDownload.setVisibility(View.INVISIBLE); viewHolder.rowType.setIcon(FontAwesomeIcons.fa_laptop); viewHolder.rowType.setIconColorResource(R.color.edx_grayscale_neutral_base); } else { viewHolder.bulkDownload.setVisibility(View.INVISIBLE); if (unit.getType() == BlockType.PROBLEM) { viewHolder.rowType.setIcon(FontAwesomeIcons.fa_list); } else { viewHolder.rowType.setIcon(FontAwesomeIcons.fa_file_o); } checkAccessStatus(viewHolder, unit); } }
Source:
<code>public ZoneTemperatureControlDiscoveryService(BridgeHandler bridgeHandler, ThingTypeUID supportedThingType) throws IllegalArgumentException { <START> super(Sets.newHashSet(supportedThingType), 10, true); <END> BRIDGE_UID = bridgeHandler.getThing().getUID(); this.bridgeHandler = bridgeHandler; THING_TYPE_ID = supportedThingType.getId(); }</code><technical_language>10 is a magic number here, please extract a TIMEOUT constant</technical_language>

Target:
public ZoneTemperatureControlDiscoveryService(BridgeHandler bridgeHandler, ThingTypeUID supportedThingType) throws IllegalArgumentException { super(new HashSet<>(Arrays.asList(supportedThingType)), TIMEOUT, true); bridgeUID = bridgeHandler.getThing().getUID(); this.bridgeHandler = bridgeHandler; thingTypeID = supportedThingType.getId(); }
Source:
<code>public void checkAttributeValue(PerunSessionImpl perunSession, Resource resource, Attribute attribute) throws InternalErrorException, WrongAttributeValueException, WrongReferenceAttributeValueException, WrongAttributeAssignmentException { String key = (String) attribute.getValue(); if (key == null) { <START> throw new WrongAttributeValueException(attribute, resource, "sshkey can't be empty"); <END> } Pattern pattern = Pattern.compile("^(?!-)[-_.a-zA-Z0-9]+$"); Matcher match = pattern.matcher(key); if (!match.matches()) { throw new WrongAttributeValueException(attribute, resource, "Bad format of attribute sshkeysTargetUser (only letters, numbers and '.' '_' '-' are allowed. Cannot begin with '-')."); } }</code><technical_language>a name of user account ssh keys stored to. Name of user "root", "postmaster", etc</technical_language>

Target:
public void checkAttributeValue(PerunSessionImpl perunSession, Resource resource, Attribute attribute) throws InternalErrorException, WrongAttributeValueException, WrongReferenceAttributeValueException, WrongAttributeAssignmentException { String key = (String) attribute.getValue(); if (key == null) { throw new WrongAttributeValueException(attribute, resource, "Name of the user can't be empty"); } Matcher match = pattern.matcher(key); if (!match.matches()) { throw new WrongAttributeValueException(attribute, resource, "Bad format of attribute sshkeysTargetUser (only letters, numbers and '.' '_' '-' are allowed. Cannot begin with '-')."); } }
Source:
<code>public AudioTrackScore(Format format, Parameters parameters, @Capabilities int formatSupport) { this.parameters = parameters; this.language = normalizeUndeterminedLanguageToNull(format.language); isWithinRendererCapabilities = isSupported(formatSupport, false); int bestLanguageScore = 0; for (int i = 0; i < parameters.preferredAudioLanguage.length; i++) { int score = getFormatLanguageScore( format, parameters.preferredAudioLanguage[i], false); <START> score = 1000 * score + parameters.preferredAudioLanguage.length - i; END> bestLanguageScore = Math.max(bestLanguageScore, score); } preferredLanguageScore = bestLanguageScore; isDefaultSelectionFlag = (format.selectionFlags & C.SELECTION_FLAG_DEFAULT) != 0; channelCount = format.channelCount; sampleRate = format.sampleRate; bitrate = format.bitrate; isWithinConstraints = (format.bitrate == Format.NO_VALUE || format.bitrate <= parameters.maxAudioBitrate) && (format.channelCount == Format.NO_VALUE || format.channelCount <= parameters.maxAudioChannelCount); String[] localeLanguages = Util.getSystemLanguageCodes(); int bestMatchIndex = Integer.MAX_VALUE; int bestMatchScore = 0; for (int i = 0; i < localeLanguages.length; i++) { int score = getFormatLanguageScore( format, localeLanguages[i], false); if (score > 0) { bestMatchIndex = i; bestMatchScore = score; break; } } localeLanguageMatchIndex = bestMatchIndex; localeLanguageScore = bestMatchScore; }</code><technical_language>pattern for system locale languages works magic score calculation? save score replace match if find a score</technical_language>

Target:
public AudioTrackScore(Format format, Parameters parameters, @Capabilities int formatSupport) { this.parameters = parameters; this.language = normalizeUndeterminedLanguageToNull(format.language); isWithinRendererCapabilities = isSupported(formatSupport, false); int bestLanguageScore = 0; int bestLanguageIndex = 0; for (int i = 0; i < parameters.preferredAudioLanguages.size(); i++) { int score = getFormatLanguageScore( format, parameters.preferredAudioLanguages.get(i), false); if (score > 0) { bestLanguageIndex = i; bestLanguageScore = score; } } preferredLanguageIndex = bestLanguageIndex; preferredLanguageScore = bestLanguageScore; isDefaultSelectionFlag = (format.selectionFlags & C.SELECTION_FLAG_DEFAULT) != 0; channelCount = format.channelCount; sampleRate = format.sampleRate; bitrate = format.bitrate; isWithinConstraints = (format.bitrate == Format.NO_VALUE || format.bitrate <= parameters.maxAudioBitrate) && (format.channelCount == Format.NO_VALUE || format.channelCount <= parameters.maxAudioChannelCount); String[] localeLanguages = Util.getSystemLanguageCodes(); int bestMatchIndex = Integer.MAX_VALUE; int bestMatchScore = 0; for (int i = 0; i < localeLanguages.length; i++) { int score = getFormatLanguageScore( format, localeLanguages[i], false); if (score > 0) { bestMatchIndex = i; bestMatchScore = score; break; } } localeLanguageMatchIndex = bestMatchIndex; localeLanguageScore = bestMatchScore; }
Source:
<code><START> private String checkParameters(String variantCoreString, String annotationVepVersion, <END> String annotationVepCacheVersion, String species, String assembly) { if (!variantCoreString.contains(":")) { return "Please describe a variant as 'sequence:location:reference:alternate'"; } if (annotationVepVersion == null ^ annotationVepCacheVersion == null) { return "Please specify either both annotation VEP version and annotation VEP cache version, or neither"; } if (species.isEmpty()) { throw new IllegalArgumentException("Please specify a species"); } if (assembly.isEmpty()) { throw new IllegalArgumentException("Please specify an assembly"); } return null; }</code><technical_language>Part of this method throws IllegalArgumentException another part returns error message. Please branches throw exception</technical_language>

Target:
private void checkParameters(String variantCoreString, String annotationVepVersion, String annotationVepCacheVersion, String species, String assembly) { String[] regionId = variantCoreString.split(":"); if (regionId.length != 4) { throw new IllegalArgumentException("Please describe a variant as 'sequence:location:reference:" + "alternate'"); } try { long position = Long.parseLong(regionId[1]); if (position < 0) { throw new IllegalArgumentException("Please provide a start position equals or greater than zero"); } } catch (NumberFormatException e) { throw new IllegalArgumentException("Please specify a valid integer start position"); } if (annotationVepVersion == null ^ annotationVepCacheVersion == null) { throw new IllegalArgumentException("Please specify either both annotation VEP version and annotation VEP" + " cache version, or neither"); } if (species.isEmpty()) { throw new IllegalArgumentException("Please specify a species"); } if (assembly.isEmpty()) { throw new IllegalArgumentException("Please specify an assembly"); } }
Source:
<code>private void awaitFirstInvocation() throws InterruptedException { <START> awaitInvocationCount( 0 ); <END> }</code><technical_language>1</technical_language>

Target:
private void awaitFirstInvocation() throws InterruptedException { awaitInvocationCount( 1 ); }
Source:
<code><START> public void testExcludeByRegexInAList() { <END> CSVSeries series = new CSVSeries("pct_sum1_web.csv", null, "EXCLUDE_BY_STRING", Arrays.asList("HTTP_[4,5]\\d{2}", "Hits", "Throughput", "RunId", "Trend Measurement Type"), false); List<PlotPoint> points = series.loadSeries(workspaceRootDir, 0, System.out); LOGGER.info("Got " + points.size() + " plot points"); testPlotPoints(points, 3); }</code><technical_language>Please organize tests private method in between</technical_language>

Target:
public void testExcludeByRegexInAList() { CSVSeries series = new CSVSeries("test_regex_webstatistics.csv", null, "EXCLUDE_BY_STRING", "\"HTTP_[4,5]\\d{2}\",\"Hits\",\"Throughput\",\"RunId\",\"Trend Measurement Type\"", false); List<PlotPoint> points = series.loadSeries(workspaceRootDir, 0, System.out); LOGGER.info("Got " + points.size() + " plot points"); testPlotPoints(points, 3); }
Source:
<code>public void setProcessorConfig(Map<String, Pair<Properties, Set<String>>> config) { Map<String, Properties> configProcessed = new HashMap<>(); for (Entry<String, Pair<Properties, Set<String>>> e : config.entrySet()) { String targetName = e.getKey(); Properties properties = e.getValue().getFirst(); Set<String> tableNames = e.getValue().getSecond(); for (String tableName : tableNames) { tableName = tableName.toLowerCase(); assert(!m_targetsByTableName.containsKey(tableName)); m_targetsByTableName.put(tableName, targetName); } String exportClientClass = properties.getProperty(EXPORT_TO_TYPE); Preconditions.checkNotNull(exportClientClass, "export to type is undefined or custom export plugin class missing."); if(exportClientClass.equals("KafkaExportClient")) { <START> properties.remove(KafkaExportClient.ENCODE_FORMAT); <END> } try { final Class<?> clientClass = Class.forName(exportClientClass); ExportClientBase client = (ExportClientBase) clientClass.newInstance(); client.configure(properties); m_clientsByTarget.put(targetName, client); client.setTargetName(targetName); } catch(Throwable t) { throw new RuntimeException(t); } configProcessed.put(targetName, new Properties(properties)); } }</code><technical_language>This is strange add special casing for export client blatantly ignore a configuration system</technical_language>

Target:
public void setProcessorConfig(Map<String, Pair<Properties, Set<String>>> config) { Map<String, Properties> configProcessed = new HashMap<>(); for (Entry<String, Pair<Properties, Set<String>>> e : config.entrySet()) { String targetName = e.getKey(); Properties properties = e.getValue().getFirst(); Set<String> tableNames = e.getValue().getSecond(); for (String tableName : tableNames) { tableName = tableName.toLowerCase(); assert(!m_targetsByTableName.containsKey(tableName)); m_targetsByTableName.put(tableName, targetName); } String exportClientClass = properties.getProperty(EXPORT_TO_TYPE); Preconditions.checkNotNull(exportClientClass, "export to type is undefined or custom export plugin class missing."); try { final Class<?> clientClass = Class.forName(exportClientClass); ExportClientBase client = (ExportClientBase) clientClass.newInstance(); client.configure(properties); m_clientsByTarget.put(targetName, client); client.setTargetName(targetName); } catch(Throwable t) { throw new RuntimeException(t); } configProcessed.put(targetName, new Properties(properties)); } }
Source:
<code>public Entity getControllingPassenger() { List<Entity> _passengers = getPassengers(); if(_passengers.isEmpty()) { setDriverState(false); return null; } else { <START> setDriverState(true); <END> return _passengers.get(0); } }</code><technical_language>a hack me. boolean driver if seat is driver seat? change based presence of a actual driver entity. I a deeper this, assumption is boolean is correctly set reloading entity a save file</technical_language>

Target:
public Entity getControllingPassenger() { return getPassengers().isEmpty() ? null : getPassengers().get(0); }
Source:
<code>public void runTest(final String inputExtension) { try { final File input = createInputFile(inputExtension); output = new File(outputDir, "output.sam"); args.add("INPUT=" + input.getAbsoluteFile()); args.add("OUTPUT=" + output.getAbsoluteFile()); <START> if(inputExtension.equals(".cram")){ <END> args.add("REFERENCE_SEQUENCE=input.fasta"); } Assert.assertEquals(runPicardCommandLine(args), 0); test(); } catch (IOException ex) { throw new RuntimeException(ex); } }</code><technical_language>suggestion if (inputExtension.equals(".cram")) {</technical_language>

Target:
public void runTest(final String inputExtension) { try { final File input = createInputFile(inputExtension); output = new File(outputDir, "output.sam"); args.add("INPUT=" + input.getAbsoluteFile()); args.add("OUTPUT=" + output.getAbsoluteFile()); if (inputExtension.equals(".cram")) { args.add("REFERENCE_SEQUENCE=" + fastaFiles.get(samRecordSetBuilder.getHeader())); } Assert.assertEquals(runPicardCommandLine(args), 0); test(); } catch (IOException ex) { throw new RuntimeException(ex); } }
Source:
<code>protected SplitBrainMergePolicy getMergePolicy(String dataStructureName) { <START> CacheConfig cacheConfig = cacheService.getConfigs().get(dataStructureName); <END> return mergePolicyProvider.getMergePolicy(cacheConfig.getMergePolicyConfig().getPolicy()); }</code><technical_language>Minor: cacheService.getMergePolicy(dataStructureName) here</technical_language>

Target:
protected SplitBrainMergePolicy getMergePolicy(String dataStructureName) { return cacheService.getMergePolicy(dataStructureName); }
Source:
<code><START> public void setupPipes() throws IOException { <END> try { List<PipeConfiguration> pipeConfList = getPipeConfigList(); for (PipeConfiguration pipeConf : pipeConfList) { FileTailerQueue queue = new FileTailerQueue(pipeConf.getQueueSize()); StreamWriter writer = getStreamWriterForPipe(pipeConf); FileTailerStateProcessor stateProcessor = new FileTailerStateProcessorImpl(pipeConf.getDaemonDir(), pipeConf.getStateFile()); FileTailerMetricsProcessor metricsProcessor = new FileTailerMetricsProcessor(pipeConf.getDaemonDir(), pipeConf.getStatisticsFile(), pipeConf.getStatisticsSleepInterval(), pipeConf.getPipeName(), pipeConf.getSourceConfiguration().getFileName()); pipeList.add(new Pipe(new LogTailer(pipeConf, queue, stateProcessor, metricsProcessor), new FileTailerSink(queue, writer, SinkStrategy.LOADBALANCE, stateProcessor, metricsProcessor, pipeConf.getSinkConfiguration().getPackSize()), metricsProcessor)); } } catch (ConfigurationLoadingException e) { throw new ConfigurationLoadingException("Error during loading configuration from file: " + confPath + e.getMessage()); } }</code><technical_language>part of start logic</technical_language>

Target:
private ServiceManager setupPipes() throws IOException { StreamClient client = null; StreamWriter writer = null; try { List<PipeConfiguration> pipeConfList = getPipeConfigs(); for (PipeConfiguration pipeConf : pipeConfList) { FileTailerQueue queue = new FileTailerQueue(pipeConf.getQueueSize()); client = pipeConf.getSinkConfiguration().getStreamClient(); String streamName = pipeConf.getSinkConfiguration().getStreamName(); writer = getStreamWriterForPipe(client, streamName); FileTailerStateProcessor stateProcessor = new FileTailerStateProcessorImpl(pipeConf.getDaemonDir(), pipeConf.getStateFile()); FileTailerMetricsProcessor metricsProcessor = new FileTailerMetricsProcessor(pipeConf.getDaemonDir(), pipeConf.getStatisticsFile(), pipeConf.getStatisticsSleepInterval(), pipeConf.getPipeName(), pipeConf.getSourceConfiguration().getFileName()); pipeList.add(new Pipe(new LogTailer(pipeConf, queue, stateProcessor, metricsProcessor), new FileTailerSink(queue, writer, SinkStrategy.LOADBALANCE, stateProcessor, metricsProcessor, pipeConf.getSinkConfiguration().getPackSize()), metricsProcessor)); client = null; writer = null; } return new ServiceManager(pipeList); } catch (ConfigurationLoadingException e) { throw new ConfigurationLoadingException("Error during loading configuration from file: " + confFile.getAbsolutePath() + e.getMessage()); } finally { if (client != null) { client.close(); } if (writer != null) { writer.close(); } } }
Source:
<code>protected void doStop() throws Exception { if (client != null) { <START> LOG.info("Disconnecting from ElasticSearch cluster: " + configuration.getClusterName()); <END> client.close(); if (sniffer != null) { sniffer.close(); } } super.doStop(); }</code><technical_language>{} placeholders in log message instead of '+'</technical_language>

Target:
protected void doStop() throws Exception { if (client != null) { LOG.info("Disconnecting from ElasticSearch cluster: {}", configuration.getClusterName()); client.close(); if (sniffer != null) { sniffer.close(); } } super.doStop(); }
Source:
<code>public InternalNodeProbe(boolean withNotifications) throws IOException { super("", 0); this.withNotifications = withNotifications; <START> connect(); END> }</code><technical_language>adding a new NodeProble constructor param boolean connect, connect twice..</technical_language>

Target:
public InternalNodeProbe(boolean withNotifications) { this.withNotifications = withNotifications; connect(); }
Source:
<code>private void setRngAvailability() { TModel model = getModel(); Set<VmRngDevice.Source> requiredRngSources = model.getSelectedCluster().getRequiredRngSources(); model.getIsRngEnabled().setIsChangable(!requiredRngSources.isEmpty()); <START> model.getIsRngEnabled().setMessage(constants.rngNotSupportedByCluster()); <END> model.getRngPeriod().setIsChangable(!requiredRngSources.isEmpty()); model.getRngPeriod().setMessage(constants.rngNotSupportedByCluster()); model.getRngBytes().setIsChangable(!requiredRngSources.isEmpty()); model.getRngBytes().setMessage(constants.rngNotSupportedByCluster()); model.getRngSourceRandom().setIsChangable(requiredRngSources.contains(VmRngDevice.Source.RANDOM)); model.getRngSourceRandom().setMessage(messages.rngSourceNotSupportedByCluster(VmRngDevice.Source.RANDOM.toString())); model.getRngSourceHwrng().setIsChangable(requiredRngSources.contains(VmRngDevice.Source.HWRNG)); model.getRngSourceHwrng().setMessage(messages.rngSourceNotSupportedByCluster(VmRngDevice.Source.HWRNG.toString())); }</code><technical_language>please set messages if editors disabled</technical_language>

Target:
private void setRngAvailability() { TModel model = getModel(); Set<VmRngDevice.Source> requiredRngSources = model.getSelectedCluster().getRequiredRngSources(); boolean requiredRngSourcesEmpty = requiredRngSources.isEmpty(); boolean randomSourceAvailable = requiredRngSources.contains(VmRngDevice.Source.RANDOM); boolean hwrngSourceAvailable = requiredRngSources.contains(VmRngDevice.Source.HWRNG); model.getIsRngEnabled().setIsChangable(!requiredRngSourcesEmpty); model.getRngPeriod().setIsChangable(!requiredRngSourcesEmpty); model.getRngBytes().setIsChangable(!requiredRngSourcesEmpty); if (requiredRngSourcesEmpty) { model.getIsRngEnabled().setMessage(constants.rngNotSupportedByCluster()); model.getRngPeriod().setMessage(constants.rngNotSupportedByCluster()); model.getRngBytes().setMessage(constants.rngNotSupportedByCluster()); } model.getRngSourceRandom().setIsChangable(randomSourceAvailable); if (randomSourceAvailable) { model.getRngSourceRandom().setMessage(messages.rngSourceNotSupportedByCluster(VmRngDevice.Source.RANDOM.toString())); } model.getRngSourceHwrng().setIsChangable(hwrngSourceAvailable); if (hwrngSourceAvailable) { model.getRngSourceHwrng().setMessage(messages.rngSourceNotSupportedByCluster(VmRngDevice.Source.HWRNG.toString())); } }
Source:
<code>public VirtualAuthenticator(final String id) { <START> this.id = id; <END> }</code><technical_language>Nit: Objects.requireNonNull ensure accidentally NPEs thrown</technical_language>

Target:
public VirtualAuthenticator(final String id) { this.id = Objects.requireNonNull(id); }
Source:
<code>@Override public void onCheckpointBegin(Context cpCtx) { Set<Integer> completeCandidates = new HashSet<>(); Integer grpId; <START> while ((grpId = cpWaitGrps.poll()) != null) <END> completeCandidates.add(grpId); cpCtx.finishedStateFut().listen( f -> { if (f.error() != null || f.isCancelled()) { cpWaitGrps.addAll(completeCandidates); return; } lock.lock(); try { for (int groupId : completeCandidates) { GroupScanContext scanCtx = grps.remove(groupId); boolean finished = scanCtx.finish(); assert finished : groupId; if (log.isInfoEnabled()) log.info("Cache group reencryption is finished [grpId=" + groupId + "]"); } if (!grps.isEmpty()) return; ((GridCacheDatabaseSharedManager)ctx.cache().context().database()). removeCheckpointListener(this); } finally { lock.unlock(); } } ); }</code><technical_language>cpWaitGrps.removeIf(completeCandidates::add)</technical_language>

Target:
@Override public void onCheckpointBegin(Context cpCtx) { }
Source:
<code>private Object createTestUsingFieldInjection() throws Exception { List<FrameworkField> annotatedFieldsByParameter = getAnnotatedFieldsByParameter(); if (annotatedFieldsByParameter.size() != parameters.length) { throw new Exception( "Wrong number of parameters and @Parameter fields." + " @Parameter fields counted: " + annotatedFieldsByParameter.size() + ", available parameters: " + parameters.length + "."); } Object testClassInstance = getTestClass().getJavaClass().newInstance(); for (FrameworkField each : annotatedFieldsByParameter) { Field field = each.getField(); Parameter annotation = field.getAnnotation(Parameter.class); int index = annotation.value(); try { field.set(testClassInstance, parameters[index]); } catch (IllegalAccessException e) { <START> throw new Exception("Cannot set parameter '" + field.getName() <END> + "'. Ensure that the field '" + field.getName() + "' is public."); } catch (IllegalArgumentException iare) { throw new Exception(getTestClass().getName() + ": Trying to set " + field.getName() + " with the value " + parameters[index] + " that is not the right type (" + parameters[index].getClass().getSimpleName() + " instead of " + field.getType().getSimpleName() + ").", iare); } } return testClassInstance; }</code><technical_language>set of this exception? Also, throwing Exception is rare. throw a new IllegalAccessException</technical_language>

Target:
private Object createTestUsingFieldInjection() throws Exception { List<FrameworkField> annotatedFieldsByParameter = getAnnotatedFieldsByParameter(); if (annotatedFieldsByParameter.size() != parameters.length) { throw new Exception( "Wrong number of parameters and @Parameter fields." + " @Parameter fields counted: " + annotatedFieldsByParameter.size() + ", available parameters: " + parameters.length + "."); } Object testClassInstance = getTestClass().getJavaClass().newInstance(); for (FrameworkField each : annotatedFieldsByParameter) { Field field = each.getField(); Parameter annotation = field.getAnnotation(Parameter.class); int index = annotation.value(); try { field.set(testClassInstance, parameters[index]); } catch (IllegalAccessException e) { IllegalAccessException wrappedException = new IllegalAccessException( "Cannot set parameter '" + field.getName() + "'. Ensure that the field '" + field.getName() + "' is public."); wrappedException.initCause(e); throw wrappedException; } catch (IllegalArgumentException iare) { throw new Exception(getTestClass().getName() + ": Trying to set " + field.getName() + " with the value " + parameters[index] + " that is not the right type (" + parameters[index].getClass().getSimpleName() + " instead of " + field.getType().getSimpleName() + ").", iare); } } return testClassInstance; }
Source:
<code>private static synchronized KeyManager[] getDefaultKeyManager(Logger logger) { final String defaultKeyStore = System.getProperty("javax.net.ssl.keyStore", ""); String defaultKeyStoreType = System.getProperty("javax.net.ssl.keyStoreType", KeyStore.getDefaultType()); String defaultKeyStoreProvider = System.getProperty("javax.net.ssl.keyStoreProvider", ""); logger.debug("keyStore is : " + defaultKeyStore); logger.debug("keyStore type is : " + defaultKeyStoreType); logger.debug("keyStore provider is : " + defaultKeyStoreProvider); if (P11KEYSTORE.equals(defaultKeyStoreType) && !NONE.equals(defaultKeyStore)) { throw new IllegalArgumentException("if keyStoreType is " + P11KEYSTORE + ", then keyStore must be " + NONE); } String defaultKeyStorePassword = System.getProperty("javax.net.ssl.keyStorePassword", ""); char[] passwd = defaultKeyStorePassword.isEmpty() ? null : defaultKeyStorePassword.toCharArray(); <START> logger.debug("keyStore password : " + passwd); <END> try { KeyStore ks = initKeyStore(logger, defaultKeyStore, defaultKeyStoreType, defaultKeyStoreProvider, passwd); logger.debug("init keymanager of type " + KeyManagerFactory.getDefaultAlgorithm()); KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); if (P11KEYSTORE.equals(defaultKeyStoreType)) { kmf.init(ks, null); } else { kmf.init(ks, passwd); } return kmf.getKeyManagers(); } catch (Exception e) { throw new IllegalStateException("Unable to initialize key manager", e); } }</code><technical_language>that</technical_language>

Target:
private static synchronized KeyManager[] getDefaultKeyManager(Logger logger) { final String defaultKeyStore = System.getProperty("javax.net.ssl.keyStore", ""); String defaultKeyStoreType = System.getProperty("javax.net.ssl.keyStoreType", KeyStore.getDefaultType()); String defaultKeyStoreProvider = System.getProperty("javax.net.ssl.keyStoreProvider", ""); logger.debug("keyStore is : " + defaultKeyStore); logger.debug("keyStore type is : " + defaultKeyStoreType); logger.debug("keyStore provider is : " + defaultKeyStoreProvider); if (P11KEYSTORE.equals(defaultKeyStoreType) && !NONE.equals(defaultKeyStore)) { throw new IllegalArgumentException("if keyStoreType is " + P11KEYSTORE + ", then keyStore must be " + NONE); } String defaultKeyStorePassword = System.getProperty("javax.net.ssl.keyStorePassword", ""); char[] passwd = defaultKeyStorePassword.isEmpty() ? null : defaultKeyStorePassword.toCharArray(); try { KeyStore ks = initKeyStore(logger, defaultKeyStore, defaultKeyStoreType, defaultKeyStoreProvider, passwd); logger.debug("init keymanager of type " + KeyManagerFactory.getDefaultAlgorithm()); KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); if (P11KEYSTORE.equals(defaultKeyStoreType)) { kmf.init(ks, null); } else { kmf.init(ks, passwd); } return kmf.getKeyManagers(); } catch (Exception e) { throw new IllegalStateException("Unable to initialize key manager", e); } }
Source:
<code>public FileTailerState loadState() throws FileTailerStateProcessorException { if (!new File(stateDirPath + "/" + stateFileName).exists()) { LOG.info("Not found state file: {}", stateDirPath + "/" + stateFileName); return null; } FileTailerState state; LOG.debug("Start loading File Tailer state .."); try { FileInputStream fileIn = new FileInputStream(stateDirPath + "/" + stateFileName); ObjectInputStream in = new ObjectInputStream(fileIn); state = (FileTailerState) in.readObject(); <START> in.close(); <END> fileIn.close(); LOG.debug("File Tailer state loaded successfully"); } catch (IOException e) { LOG.error("Can not load File Tailer state: {}", e.getMessage()); throw new FileTailerStateProcessorException(e.getMessage()); } catch (ClassNotFoundException e) { LOG.error("Can not found class for File Tailer state: {}", e.getMessage()); throw new FileTailerStateProcessorException(e.getMessage()); } return state; }</code><technical_language>here, properly closed</technical_language>

Target:
public FileTailerState loadState() throws FileTailerStateProcessorException { if (!stateFile.exists()) { LOG.info("Not found state file: {}", stateFile.getAbsolutePath()); return null; } LOG.debug("Start loading File Tailer state .."); try { BufferedReader reader = Files.newReader(stateFile, UTF_8); try { FileTailerState state = GSON.fromJson(reader, FileTailerState.class); LOG.debug("File Tailer state loaded successfully"); return state; } finally { Closeables.closeQuietly(reader); } } catch (IOException e) { LOG.error("Can not load File Tailer state: {}", e); throw new FileTailerStateProcessorException(e.getMessage()); } }
Source:
<code>protected Map<String, Object> decorateReportData(Map<String, Object> reportData) { <START> Map<String, Object> decoratedReportData = new HashMap<>(); <END> decoratedReportData.putAll(reportData); decoratedReportData.put(ReportGeneration.PARAMETER_NAME_SUBREPORT_DIR, new File(System.getProperty("java.io.tmpdir").concat(reportData.get(ReportGeneration.PARAMETER_NAME_SUBREPORT_DIR).toString())).getAbsolutePath().concat(File.separator)); return decoratedReportData; }</code><technical_language>ConcurrentHashMap</technical_language>

Target:
protected Map<String, Object> decorateReportData(Map<String, Object> reportData) { Map<String, Object> decoratedReportData = new ConcurrentHashMap<>(); decoratedReportData.putAll(reportData); decoratedReportData.put(ReportGeneration.PARAMETER_NAME_SUBREPORT_DIR, new File(System.getProperty("java.io.tmpdir").concat(reportData.get(ReportGeneration.PARAMETER_NAME_SUBREPORT_DIR).toString())).getAbsolutePath().concat(File.separator)); return decoratedReportData; }
Source:
<code>public static Object onUtilRunTask(FutureTask<?> task, Logger logger) { <START> GlobalCauseTracker.INSTANCE.switchToPhase(PluginPhase.State.SCHEDULED_TASK, PhaseContext.start() <END> .add(NamedCause.source(task)) .addCaptures() .complete() ); Object value = Util.runTask(task, logger); GlobalCauseTracker.INSTANCE.completePhase(PluginPhase.State.SCHEDULED_TASK); return value; }</code><technical_language>If avoid static fields, that'd nicer (use a static method sanity checks itself)</technical_language>

Target:
public static Object onUtilRunTask(FutureTask<?> task, Logger logger) { GlobalCauseTracker.getInstance().switchToPhase(PluginPhase.State.SCHEDULED_TASK, PhaseContext.start() .add(NamedCause.source(task)) .addCaptures() .complete() ); Object value = Util.runTask(task, logger); GlobalCauseTracker.getInstance().completePhase(PluginPhase.State.SCHEDULED_TASK); return value; }
Source:
<code>public AMQP.BasicProperties fromMessageProperties(MessageProperties source, String charset) { final TraceeFilterConfiguration filterConfiguration = backend.getConfiguration(profile); <START> if (!backend.isEmpty() && filterConfiguration.shouldProcessContext(OutgoingRequest)) { <END> final Map<String, String> filteredParams = filterConfiguration.filterDeniedParams(backend.copyToMap(), OutgoingRequest); final String contextAsHeader = transportSerialization.render(filteredParams); source.getHeaders().put(TraceeConstants.HTTP_HEADER_NAME, contextAsHeader); } return super.fromMessageProperties(source, charset); }</code><technical_language>line 50 Channel.AsyncDispatch</technical_language>

Target:
public AMQP.BasicProperties fromMessageProperties(MessageProperties source, String charset) { final TraceeFilterConfiguration filterConfiguration = backend.getConfiguration(profile); if (!backend.isEmpty() && filterConfiguration.shouldProcessContext(TraceeFilterConfiguration.Channel.AsyncDispatch)) { final Map<String, String> filteredParams = filterConfiguration.filterDeniedParams(backend.copyToMap(), TraceeFilterConfiguration.Channel.AsyncDispatch); final String contextAsHeader = transportSerialization.render(filteredParams); source.getHeaders().put(TraceeConstants.JMS_HEADER_NAME, contextAsHeader); } return super.fromMessageProperties(source, charset); }
Source:
<code>protected Session noJoinReordering() { return Session.builder(getSession()) .setSystemProperty(JOIN_REORDERING_STRATEGY, JoinReorderingStrategy.NONE.name()) <START> .setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.REPARTITIONED.name()) <END> .build(); }</code><technical_language>This renamed PARTITIONED</technical_language>

Target:
protected Session noJoinReordering() { return Session.builder(getSession()) .setSystemProperty(JOIN_REORDERING_STRATEGY, JoinReorderingStrategy.NONE.name()) .setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.PARTITIONED.name()) .build(); }