auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void comparePlans(String sql, Map<String, String> ignoreMap) { CompiledPlan calcitePlan = compileAdHocCalcitePlan(sql, true, true, DeterminismMode.SAFER); System.out.println(calcitePlan.explainedPlan); CompiledPlan voltdbPlan = compileAdHocPlan(sql, true, true); comparePlanTree(calcitePlan.rootPlanGraph, voltdbPlan.rootPlanGraph, ignoreMap); if (calcitePlan.subPlanGraph != null && voltdbPlan.subPlanGraph != null) { comparePlanTree(calcitePlan.subPlanGraph, voltdbPlan.subPlanGraph, ignoreMap); } else if (calcitePlan.subPlanGraph != null || voltdbPlan.subPlanGraph != null) { fail("Two-part MP plans mismatch"); } compareCompiledPlans(calcitePlan, voltdbPlan); }

Target:
protected void comparePlans(String sql, Map<String, String> ignoreMap) { CompiledPlan calcitePlan = compileAdHocCalcitePlan(sql, true, true, DeterminismMode.SAFER); CompiledPlan voltdbPlan = compileAdHocPlan(sql, true, true); comparePlanTree(calcitePlan.rootPlanGraph, voltdbPlan.rootPlanGraph, ignoreMap); if (calcitePlan.subPlanGraph != null && voltdbPlan.subPlanGraph != null) { comparePlanTree(calcitePlan.subPlanGraph, voltdbPlan.subPlanGraph, ignoreMap); } else if (calcitePlan.subPlanGraph != null || voltdbPlan.subPlanGraph != null) { fail(String.format("Two-part MP plans mismatch.\n\nVoltDB plan: %s\n\nCalcite plan:%s\n", voltdbPlan.subPlanGraph.toExplainPlanString(), calcitePlan.subPlanGraph.toExplainPlanString())); } compareCompiledPlans(calcitePlan, voltdbPlan); }
Source:
public void deleteChunks(long commitId, long tableId, Set<Long> chunkIds) { writeMaster(commitId, (dao, commit) -> { checkConflict(dao.tableIdExists(tableId), "Table no longer exists"); dao.updateRollbackInfo(commit.getRollbackInfo() .withWrittenTable(tableId) .toBytes()); }); AtomicLong rowCount = new AtomicLong(); writeShard(commitId, getTableShard(tableId), dao -> { ChunkSummary summary = dao.getChunkSummary(commitId, chunkIds); checkTableConflict(summary.getChunkCount() == chunkIds.size()); rowCount.set(summary.getRowCount()); deleteChunks(dao, commitId, tableId, chunkIds); TableSize tableSize = dao.getTableSize(tableId); long chunkCount = tableSize.getChunkCount() - summary.getChunkCount(); long compressedSize = tableSize.getCompressedSize() - summary.getCompressedSize(); long uncompressedSize = tableSize.getUncompressedSize() - summary.getUncompressedSize(); deleteTableSize(dao, commitId, tableId); dao.insertTableSize(commitId, tableId, chunkCount, compressedSize, uncompressedSize); }); writeMaster(commitId, (dao, commit) -> { TableInfo table = dao.getTableInfo(tableId).builder() .addRowCount(-rowCount.get()) .setUpdateTime(System.currentTimeMillis()) .build(); deleteTable(dao, commitId, tableId); insertTable(dao, commitId, table); }); }

Target:
public void deleteChunks(long commitId, long tableId, Set<Long> chunkIds) { writeMaster(commitId, (dao, commit) -> { checkConflict(dao.tableIdExists(tableId), "Table no longer exists"); dao.updateRollbackInfo(commit.getRollbackInfo() .withWrittenTable(tableId) .toBytes()); }); AtomicLong rowCount = new AtomicLong(); writeShard(commitId, getTableShard(tableId), dao -> { ChunkSummary summary = dao.getChunkSummary(commitId, chunkIds); checkTableConflict(summary.getChunkCount() == chunkIds.size()); rowCount.set(summary.getRowCount()); for (Set<Long> batch : partitionSet(chunkIds, 1000)) { deleteChunks(dao, commitId, tableId, batch); } TableSize tableSize = dao.getTableSize(tableId); long chunkCount = tableSize.getChunkCount() - summary.getChunkCount(); long compressedSize = tableSize.getCompressedSize() - summary.getCompressedSize(); long uncompressedSize = tableSize.getUncompressedSize() - summary.getUncompressedSize(); deleteTableSize(dao, commitId, tableId); dao.insertTableSize(commitId, tableId, chunkCount, compressedSize, uncompressedSize); }); writeMaster(commitId, (dao, commit) -> { TableInfo table = dao.getTableInfo(tableId).builder() .addRowCount(-rowCount.get()) .setUpdateTime(System.currentTimeMillis()) .build(); deleteTable(dao, commitId, tableId); insertTable(dao, commitId, table); }); }
Source:
private void log(ITestNGMethod method, String prefix) { if (method.getInstance() != null) { messages.add(prefix + method.getInstance().getClass().getName() + "." + method.getMethodName()); } else { messages.add(prefix + method.getMethodName()); } }

Target:
private static void log(ITestNGMethod method, String prefix) { if (method.getInstance() != null) { messages.add(prefix + method.getInstance().getClass().getName() + "." + method.getMethodName()); } else { messages.add(prefix + method.getMethodName()); } }
Source:
static ISchemeInformation getLoadingSchemeInformation(IScheme scheme) { SchemeInformation schemeInfo = new SchemeInformation(scheme.getName(), scheme.getDescription()); schemeInfo.setHandled(false); schemeInfo.setHandlerLocation("Loading .."); return schemeInfo; }

Target:
static ISchemeInformation getLoadingSchemeInformation(IScheme scheme) { SchemeInformation schemeInfo = new SchemeInformation(scheme.getName(), scheme.getDescription()); schemeInfo.setHandled(false); schemeInfo.setHandlerLocation("Loading..."); return schemeInfo; }
Source:
private void reset() { topicTitle.setInnerHTML(""); notes.setInnerHTML(""); post.setText("Post"); if (dataProvider != null && dataProvider.getDataDisplays().size() > 0) { dataProvider.removeDataDisplay(messagesCellList); } messagesCellList.setVisibleRangeAndClearData(messagesCellList.getVisibleRange(), true); pager.setVisible(false); notes.setInnerHTML(""); editorTextMap.put(topicId, replyText.getText()); replyText.reset(); replyText.setVisible(false); replyForm.setVisible(false); forumSummarySidePanel.reset(); startPagePost = null ; }

Target:
private void reset() { topicTitle.setInnerHTML(""); post.setText("Post"); if (dataProvider != null && dataProvider.getDataDisplays().size() > 0) { dataProvider.removeDataDisplay(messagesCellList); } messagesCellList.setVisibleRangeAndClearData(messagesCellList.getVisibleRange(), true); pager.setVisible(false); descriptionStartedBy.setInnerHTML(""); descriptionReplies.setInnerHTML(""); descriptionLastPoster.setInnerHTML(""); editorTextMap.put(topicId, replyText.getText()); replyText.reset(); replyText.setVisible(false); replyForm.setVisible(false); forumSummarySidePanel.reset(); startPagePost = null; }
Source:
protected void remove(WebApp webApp) { javascriptConfigService.unregisterServletContext(webApp); try { ServletContext scontext = webApp.getServletContext(); ImmutableScriptResources scriptResources = (ImmutableScriptResources) scontext.getAttribute(SCRIPT_RESOURCES_ATTR); if (scriptResources != null) { javascriptConfigService.remove(scriptResources, scontext.getContextPath()); scontext.removeAttribute(SCRIPT_RESOURCES_ATTR); } } catch (Exception ex) { log.error( "An error occured while removing script resources for the context '" + webApp.getServletContext().getServletContextName() + "'", ex); } String contextPath = webApp.getServletContext().getContextPath(); try { skinService.removeSkins(SkinDependentManager.getPortalSkins(contextPath)); skinService.removeSkins(SkinDependentManager.getPortletSkins(contextPath)); Set<String> supportedSkins = SkinDependentManager.getSkinNames(contextPath); if (supportedSkins != null) { for (String skin : supportedSkins) { if (SkinDependentManager.skinNameIsRemovable(skin, contextPath)) { skinService.removeSupportedSkin(skin); } } } SkinDependentManager.clearAssociatedSkins(contextPath); } catch (Exception e) { log.error(e.getMessage(), e); } skinService.unregisterServletContext(webApp); }

Target:
protected void remove(WebApp webApp) { javascriptConfigService.unregisterServletContext(webApp); try { ServletContext scontext = webApp.getServletContext(); ImmutableScriptResources scriptResources = (ImmutableScriptResources) scontext.getAttribute(SCRIPT_RESOURCES_ATTR); if (scriptResources != null) { javascriptConfigService.remove(scriptResources, scontext.getContextPath()); scontext.removeAttribute(SCRIPT_RESOURCES_ATTR); } } catch (Exception ex) { log.error( "An error occurred while removing script resources for the context '" + webApp.getServletContext().getServletContextName() + "'", ex); } String contextPath = webApp.getServletContext().getContextPath(); try { skinService.removeSkins(SkinDependentManager.getPortalSkins(contextPath)); skinService.removeSkins(SkinDependentManager.getPortletSkins(contextPath)); Set<String> supportedSkins = SkinDependentManager.getSkinNames(contextPath); if (supportedSkins != null) { for (String skin : supportedSkins) { if (SkinDependentManager.skinNameIsRemovable(skin, contextPath)) { skinService.removeSupportedSkin(skin); } } } SkinDependentManager.clearAssociatedSkins(contextPath); } catch (Exception e) { log.error(e.getMessage(), e); } skinService.unregisterServletContext(webApp); }
Source:
public void generate() throws IOException { Map<String, Object> params = context.getParameters(); Attributes attr = new Attributes(); Object type = params.get("type"); attr.add("type", type == null ? "text" : (String) type) .addDefaultToEmpty("name", params.get("name")) .addIfExists("size", params.get("size")) .addIfExists("maxlength", params.get("maxlength")) .addIfExists("value", params.get("nameValue")) .addIfTrue("disabled", params.get("disabled")) .addIfTrue("readonly", params.get("readonly")) .addIfExists("tabindex", params.get("tabindex")) .addIfExists("id", params.get("id")) .addIfExists("class", params.get("cssClass")) .addIfExists("style", params.get("cssStyle")) .addIfExists("title", params.get("title")); super.start("input", attr); super.end("input"); }

Target:
public void generate() throws IOException { Map<String, Object> params = context.getParameters(); Attributes attr = new Attributes(); Object type = params.get("type"); attr.add("type", type == null ? "text" : type.toString()) .addDefaultToEmpty("name", params.get("name")) .addIfExists("size", params.get("size")) .addIfExists("maxlength", params.get("maxlength")) .addIfExists("value", params.get("nameValue")) .addIfTrue("disabled", params.get("disabled")) .addIfTrue("readonly", params.get("readonly")) .addIfExists("tabindex", params.get("tabindex")) .addIfExists("id", params.get("id")) .addIfExists("class", params.get("cssClass")) .addIfExists("style", params.get("cssStyle")) .addIfExists("title", params.get("title")); super.start("input", attr); super.end("input"); }
Source:
public EEFViewDescription convert(SiriusInputDescriptor input) { EEFViewDescription view = this.createView(); Map<String, Object> parameters = new HashMap<>(); parameters.put(IDescriptionConverter.INPUT, input); parameters.put(IDescriptionConverter.VIEW, view); TransformationCache cache = new TransformationCache(); for (PageDescription pageDescription : pageDescriptions) { IDescriptionConverter converter = SiriusPropertiesCorePlugin.getPlugin().getDescriptionConverter(pageDescription); EObject eObject = converter.convert(pageDescription, parameters, cache); if (eObject instanceof EEFPageDescription) { EEFPageDescription convertedPageDescription = (EEFPageDescription) eObject; view.getPages().add(convertedPageDescription); for (GroupDescription groupDescription : pageDescription.getGroups()) { if (!cache.getAllInputs().contains(groupDescription)) { IDescriptionConverter groupConverter = SiriusPropertiesCorePlugin.getPlugin().getDescriptionConverter(groupDescription); EObject group = groupConverter.convert(groupDescription, parameters, cache); if (group instanceof EEFGroupDescription) { view.getGroups().add((EEFGroupDescription) group); convertedPageDescription.getGroups().add((EEFGroupDescription) group); } } else { Optional<Object> output = cache.getOutput(groupDescription); output.filter(EEFGroupDescription.class::isInstance).map(EEFGroupDescription.class::cast).ifPresent(eefGroupDescription -> { convertedPageDescription.getGroups().add(eefGroupDescription); }); } } } } List<IDescriptionLinkResolver> linkResolvers = SiriusPropertiesCorePlugin.getPlugin().getDescriptionConverterLinkResolvers(); for (IDescriptionLinkResolver linkResolver : linkResolvers) { linkResolver.resolve(view, cache); } return view; }

Target:
public EEFViewDescription convert(SiriusInputDescriptor input) { EEFViewDescription view = this.createView(); TransformationCache cache = new TransformationCache(); Map<String, Object> parameters = new HashMap<>(); parameters.put(IDescriptionConverter.INPUT, input); parameters.put(IDescriptionConverter.VIEW, view); pageDescriptions.forEach(pageDescription -> convertPage(input, view, cache, pageDescription, parameters)); List<IDescriptionLinkResolver> linkResolvers = SiriusPropertiesCorePlugin.getPlugin().getDescriptionConverterLinkResolvers(); linkResolvers.forEach(linkResolver -> linkResolver.resolve(view, cache)); return view; }
Source:
public void detachDebuggerFromProcess(final IDMContext dmc, final RequestMonitor rm) { ICommandControlDMContext controlDmc = DMContexts.getAncestorOfType(dmc, ICommandControlDMContext.class); IMIContainerDMContext contDmc = DMContexts.getAncestorOfType(dmc, IMIContainerDMContext.class); if (controlDmc != null && contDmc != null) { String pid = getGroupToPidMap().get(contDmc.getGroupId()); if (pid != null) { if (!doCanDetachDebuggerFromProcess()) { rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Detach not supported.", null)); rm.done(); return; } IMIRunControl runControl = getServicesTracker().getService(IMIRunControl.class); if (runControl != null && !runControl.isTargetAcceptingCommands()) { fBackend.interrupt(); } fCommandControl.queueCommand( fCommandFactory.createMITargetDetach(controlDmc, pid), new DataRequestMonitor<MIInfo>(getExecutor(), rm)); } else { rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Invalid group id.", null)); rm.done(); } } else { rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Invalid context.", null)); rm.done(); } }

Target:
public void detachDebuggerFromProcess(final IDMContext dmc, final RequestMonitor rm) { ICommandControlDMContext controlDmc = DMContexts.getAncestorOfType(dmc, ICommandControlDMContext.class); IMIProcessDMContext procDmc = DMContexts.getAncestorOfType(dmc, IMIProcessDMContext.class); if (controlDmc != null && procDmc != null) { if (!doCanDetachDebuggerFromProcess()) { rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Detach not supported.", null)); rm.done(); return; } IMIRunControl runControl = getServicesTracker().getService(IMIRunControl.class); if (runControl != null && !runControl.isTargetAcceptingCommands()) { fBackend.interrupt(); } fCommandControl.queueCommand( fCommandFactory.createMITargetDetach(controlDmc, procDmc.getProcId()), new DataRequestMonitor<MIInfo>(getExecutor(), rm)); } else { rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Invalid context.", null)); rm.done(); } }
Source:
public void testOnRemoveClass() { final ProjectClassListView.LoadClassesHandler handler = new ProjectClassListView.LoadClassesHandler() { @Override public void onLoadClasses() { List<ClassRow> classes = new ArrayList<ClassRow>(); classes.add(classRow1); classes.add(classRow2); presenter.setClasses(classes); } @Override public void onLoadClass(String className) { } }; presenter.addLoadClassesHandler(handler); presenter.onLoadClasses(); verify(view, times(1)).redraw(); assertThat(presenter.getClasses()).hasSize(2); presenter.onRemoveClass(classRow1); verify(view, times(2)).redraw(); assertThat(presenter.getClasses()).hasSize(1); assertThat(presenter.getClasses().contains(classRow1)).isFalse(); presenter.onRemoveClass(classRow2); verify(view, times(3)).redraw(); assertThat(presenter.getClasses()).hasSize(0); assertThat(presenter.getClasses().contains(classRow2)).isFalse(); }

Target:
public void testOnRemoveClass() { final ProjectClassListView.LoadClassesHandler handler = new ProjectClassListView.LoadClassesHandler() { @Override public void onLoadClasses() { List<ClassRow> classes = new ArrayList<ClassRow>(); classes.add(classRow1); classes.add(classRow2); presenter.setClasses(classes); } @Override public void onLoadClass(String className) { } }; presenter.addLoadClassesHandler(handler); presenter.onLoadClasses(); verify(view, times(1)).redraw(); assertThat(presenter.getClasses()).hasSize(2); presenter.onRemoveClass(classRow1); verify(view, times(2)).redraw(); assertThat(presenter.getClasses()).hasSize(1); assertThat(presenter.getClasses()).doesNotContain(classRow1); presenter.onRemoveClass(classRow2); verify(view, times(3)).redraw(); assertThat(presenter.getClasses()).hasSize(0); }
Source:
private boolean areAllChildrenIgnored() { for (T child : getFilteredChildren()) { if(isIgnored(child) == false) { return false; } } return true; }

Target:
private boolean areAllChildrenIgnored() { for (T child : getFilteredChildren()) { if (!isIgnored(child)) { return false; } } return true; }
Source:
private Set<String> getRefNamesAllUsers(String prefix) throws OrmException { Map<String, Ref> matchingRefs; try { RefDatabase refDb = repoManager.openRepository(allUsers).getRefDatabase(); matchingRefs = refDb.getRefs(prefix); } catch (IOException e) { throw new OrmException(e); } return matchingRefs.keySet(); }

Target:
private Set<String> getRefNamesAllUsers(String prefix) throws OrmException { Repository repo = null; try { repo = repoManager.openRepository(allUsers); RefDatabase refDb = repo.getRefDatabase(); return refDb.getRefs(prefix).keySet(); } catch (IOException e) { throw new OrmException(e); } finally { if (repo != null) { repo.close(); } } }
Source:
public InsertQuery build() { Checks.checkNotNull(uri, "Please specify uri"); return new InsertQuery( uri ); }

Target:
public InsertQuery build() { checkNotNull(uri, "Please specify uri"); return new InsertQuery( uri ); }
Source:
private void writeInputCommand(String value) throws UnsupportedEncodingException { out = new PrintStream(telnet.getOutputStream(), true, "UTF-8"); out.println(value); out.flush(); log.info(value); }

Target:
private void writeInputCommand(String value) throws CarbonToolsIntegrationTestException { try { out = new PrintStream(telnet.getOutputStream(), true, "UTF-8"); out.println(value); out.flush(); } catch (UnsupportedEncodingException ex) { log.error("Unsupported encoding UTF-8", ex); throw new CarbonToolsIntegrationTestException("Unsupported encoding UTF-8 ", ex); } log.info(value); }
Source:
public void testGetEPRsForService() throws Exception { EndpointReference[] endpointReference = nHttpListener.getEPRsForService("myservice", HOST); Assert.assertNotNull(endpointReference); Assert.assertEquals("Endpoint reference mismatched", ServiceUtils.getServiceEndpoint("myservice", HOST, PORT), endpointReference[0].getAddress()); endpointReference = nHttpListener.getEPRsForService("t/myservice", HOST); Assert.assertNotNull(endpointReference); Assert.assertEquals("Endpoint reference mismatched", ServiceUtils.getServiceEndpoint("t/myservice", HOST, PORT), endpointReference[0].getAddress()); endpointReference = nHttpListener.getEPRsForService("myservice.endpoint", HOST); Assert.assertNotNull(endpointReference); Assert.assertEquals("Endpoint reference mismatched", ServiceUtils.getServiceEndpoint("myservice.endpoint", HOST, PORT), endpointReference[0].getAddress()); }

Target:
public void testGetEPRsForService() throws Exception { EndpointReference[] endpointReference = nHttpListener.getEPRsForService("myservice", HOST); Assert.assertNotNull(endpointReference); Assert.assertEquals("Endpoint reference mismatched", ServiceUtils.getServiceEndpoint("myservice", HOST, PORT), endpointReference[0].getAddress()); endpointReference = nHttpListener.getEPRsForService("t/myservice", HOST); Assert.assertNotNull("Endpoint references not found", endpointReference); Assert.assertEquals("Endpoint reference mismatched", ServiceUtils.getServiceEndpoint("t/myservice", HOST, PORT), endpointReference[0].getAddress()); endpointReference = nHttpListener.getEPRsForService("myservice.endpoint", HOST); Assert.assertNotNull("Endpoint references not found", endpointReference); Assert.assertEquals("Endpoint reference mismatched", ServiceUtils.getServiceEndpoint("myservice.endpoint", HOST, PORT), endpointReference[0].getAddress()); }
Source:
protected void notificationBatteryLevel(int batteryLevel) { if ((batteryLevel < 0) || (batteryLevel > 100)) { return; } final String pref = getResources().getString(R.string.pref_battery_level_low_notification_discard); final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); if (batteryLevel > batteryLevelLowThreshold) { if (prefs.contains(pref)) { prefs.edit().remove(pref).commit(); } return; } if (prefs.getBoolean(pref, false)) { return; } AlertDialog.Builder prompt = new AlertDialog.Builder(this); LayoutInflater promptInflater = LayoutInflater.from(this); View messageView = promptInflater.inflate(R.layout.checkbox, null); final CheckBox dontShowAgain = (CheckBox) messageView.findViewById(R.id.skip); prompt.setView(messageView); prompt.setCancelable(false); prompt.setMessage(getResources().getText(R.string.battery_level_low_notification_txt) + "\n" + getResources().getText(R.string.battery_level) + ": " + batteryLevel + "%"); prompt.setTitle(getResources().getText(R.string.battery_level_low_notification_title)); prompt.setPositiveButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { if (dontShowAgain.isChecked()) { prefs.edit().putBoolean(pref, true).commit(); } return; } }); prompt.show(); }

Target:
protected void notificationBatteryLevel(int batteryLevel) { if ((batteryLevel < 0) || (batteryLevel > 100)) { return; } final String pref_key = getResources().getString(R.string.pref_battery_level_low_notification_discard); final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); int batteryLevelHighThreshold = prefs.getInt(getResources().getString(R.string.pref_battery_level_high_threshold), 75); if ((batteryLevel > batteryLevelHighThreshold) && (prefs.contains(pref_key))) { prefs.edit().remove(pref_key).commit(); return; } int batteryLevelLowThreshold = prefs.getInt(getResources().getString(R.string.pref_battery_level_low_threshold), 15); if (batteryLevel > batteryLevelLowThreshold) { return; } if (prefs.getBoolean(pref_key, false)) { return; } AlertDialog.Builder prompt = new AlertDialog.Builder(this); final CheckBox dontShowAgain = new CheckBox(this); dontShowAgain.setText(getResources().getText(R.string.do_not_show_again)); prompt.setView(dontShowAgain); prompt.setCancelable(false); prompt.setMessage(getResources().getText(R.string.battery_level_low_notification_txt) + "\n" + getResources().getText(R.string.battery_level) + ": " + batteryLevel + "%"); prompt.setTitle(getResources().getText(R.string.warning)); prompt.setPositiveButton(getResources().getText(R.string.ok), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { if (dontShowAgain.isChecked()) { prefs.edit().putBoolean(pref_key, true).commit(); } return; } }); prompt.show(); }
Source:
public void testParquetTupleDomainStruct() { HiveColumnHandle colHandle = new HiveColumnHandle("my_struct", HiveType.valueOf("struct<a:int,b:int>"), parseTypeSignature(StandardTypes.ROW), 0, REGULAR, Optional.empty()); RowType.Field rowField = new RowType.Field(Optional.of("my_struct"), INTEGER); RowType rowType = RowType.from(ImmutableList.of(rowField)); TupleDomain<HiveColumnHandle> domain = TupleDomain.withColumnDomains( ImmutableMap.of(colHandle, Domain.notNull(rowType))); MessageType fileSchema = new MessageType("hive_schema", new GroupType(OPTIONAL, "my_struct", new PrimitiveType(OPTIONAL, INT32, "a"), new PrimitiveType(OPTIONAL, INT32, "b"))); TupleDomain<ColumnDescriptor> tupleDomain = getParquetTupleDomain(fileSchema, fileSchema, domain); assertTrue(tupleDomain.getDomains().get().isEmpty()); }

Target:
public void testParquetTupleDomainStruct() { HiveColumnHandle columnHandle = new HiveColumnHandle("my_struct", HiveType.valueOf("struct<a:int,b:int>"), parseTypeSignature(StandardTypes.ROW), 0, REGULAR, Optional.empty()); RowType.Field rowField = new RowType.Field(Optional.of("my_struct"), INTEGER); RowType rowType = RowType.from(ImmutableList.of(rowField)); TupleDomain<HiveColumnHandle> domain = TupleDomain.withColumnDomains(ImmutableMap.of(columnHandle, Domain.notNull(rowType))); MessageType fileSchema = new MessageType("hive_schema", new GroupType(OPTIONAL, "my_struct", new PrimitiveType(OPTIONAL, INT32, "a"), new PrimitiveType(OPTIONAL, INT32, "b"))); TupleDomain<ColumnDescriptor> tupleDomain = getParquetTupleDomain(fileSchema, fileSchema, domain); assertTrue(tupleDomain.getDomains().get().isEmpty()); }
Source:
protected void createFieldEditors() { super.createFieldEditors(); Composite parent = getFieldEditorParent(); parent.setLayout(new GridLayout(1, false)); Composite area = new Composite(parent, SWT.NONE); GridLayout gl = new GridLayout(1, false); gl.marginTop = MARGIN; gl.marginLeft = MARGIN; gl.marginRight = MARGIN; area.setLayout(gl); area.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1)); AutotoolsConfiguration.Option[] options = AutotoolsConfiguration.getChildOptions(catName); for (int i = 0; i < options.length; ++i) { AutotoolsConfiguration.Option option = options[i]; switch (option.getType()) { case IConfigureOption.STRING: case IConfigureOption.INTERNAL: case IConfigureOption.MULTIARG: StringFieldEditor f = new StringFieldEditor(option.getName(), option.getDescription(), area); f.getLabelControl(area).setToolTipText(option.getToolTip()); addField(f); fieldEditors.add(f); break; case IConfigureOption.BIN: case IConfigureOption.FLAGVALUE: BooleanFieldEditor b = new BooleanFieldEditor(option.getName(), option.getDescription(), area); b.getDescriptionControl(area).setToolTipText(option.getToolTip()); addField(b); fieldEditors.add(b); break; case IConfigureOption.FLAG: FieldEditor l = createLabelEditor(area, option.getName()); addField(l); fieldEditors.add(l); break; } } }

Target:
protected void createFieldEditors() { super.createFieldEditors(); Composite parent = getFieldEditorParent(); parent.setLayout(new GridLayout(1, false)); Composite area = new Composite(parent, SWT.NONE); GridLayout gl = new GridLayout(1, false); gl.marginTop = MARGIN; gl.marginLeft = MARGIN; gl.marginRight = MARGIN; area.setLayout(gl); area.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1)); AutotoolsConfiguration.Option[] options = AutotoolsConfiguration.getChildOptions(catName); for (int i = 0; i < options.length; ++i) { AutotoolsConfiguration.Option option = options[i]; switch (option.getType()) { case IConfigureOption.STRING: case IConfigureOption.INTERNAL: case IConfigureOption.MULTIARG: StringFieldEditor f = new StringFieldEditor(option.getName(), option.getDescription(), area); f.getLabelControl(area).setToolTipText(option.getToolTip()); addField(f); fieldEditors.add(f); break; case IConfigureOption.BIN: case IConfigureOption.FLAGVALUE: BooleanFieldEditor b = new BooleanFieldEditor(option.getName(), option.getDescription(), area); b.getDescriptionControl(area).setToolTipText(option.getToolTip()); addField(b); fieldEditors.add(b); break; case IConfigureOption.FLAG: FieldEditor l = createLabelEditor(area, option.getDescription()); addField(l); fieldEditors.add(l); break; } } }
Source:
boolean padBetweenBlocks() { return padBetweenBlocks(blockType) || (blockType == OBJ_BLOCK_TYPE && padBetweenBlocks(keyType)); }

Target:
boolean padBetweenBlocks() { return padBetweenBlocks(blockType) || (blockType == INDEX_BLOCK_TYPE && padBetweenBlocks(keyType)); }
Source:
protected boolean queryPrefs() { Timber.d("Querying Prefs."); boolean shouldUpdate = false; if (Preferences.getRootFolderName().isEmpty()) { Timber.d("Where are my files?!"); FragmentActivity activity = requireActivity(); Intent intent = new Intent(activity, ImportActivity.class); startActivity(intent); activity.finish(); } if (plannedRefresh && mTotalCount > -1) { Timber.d("A library display refresh has been planned"); shouldUpdate = true; plannedRefresh = false; } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { checkStorage(); } booksPerPage = Preferences.getContentPageQuantity(); if (this.booksPerPage != booksPerPage) { Timber.d("booksPerPage updated."); this.booksPerPage = booksPerPage; setQuery(""); shouldUpdate = true; } return shouldUpdate; }

Target:
protected boolean queryPrefs() { Timber.d("Querying Prefs."); boolean shouldUpdate = false; if (Preferences.getRootFolderName().isEmpty()) { Timber.d("Where are my files?!"); FragmentActivity activity = requireActivity(); Intent intent = new Intent(activity, ImportActivity.class); startActivity(intent); activity.finish(); } if (plannedRefresh && mTotalCount > -1) { Timber.d("A library display refresh has been planned"); shouldUpdate = true; plannedRefresh = false; } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { checkStorage(); } int settingsBooksPerPage = Preferences.getContentPageQuantity(); if (this.booksPerPage != settingsBooksPerPage) { Timber.d("booksPerPage updated."); this.booksPerPage = settingsBooksPerPage; setQuery(""); shouldUpdate = true; } return shouldUpdate; }
Source:
public String generateSPL(JsonObject graph) throws IOException { JsonObject graphConfig = getGraphConfig(graph); breakoutVersion(graphConfig); stvHelper = new SubmissionTimeValue(graph); new Preprocessor(this, graph).preprocess(); System.out.println(graph); System.out.println(); separateIntoComposites(graph); JsonObject mainCompsiteDef = new JsonObject(); mainCompsiteDef.addProperty(KIND, graph.get("name").getAsString()); mainCompsiteDef.addProperty("public", true); mainCompsiteDef.add("parameters", graph.get("parameters")); mainCompsiteDef.addProperty("__spl_mainComposite", true); mainCompsiteDef.add("operators", graph.get("operators")); composites.add(mainCompsiteDef); StringBuilder sb = new StringBuilder(); generateGraph(graph, sb); setDeployment(graph); return sb.toString(); }

Target:
public String generateSPL(JsonObject graph) throws IOException { JsonObject graphConfig = getGraphConfig(graph); breakoutVersion(graphConfig); stvHelper = new SubmissionTimeValue(graph); new Preprocessor(this, graph).preprocess(); separateIntoComposites(graph); JsonObject mainCompsiteDef = new JsonObject(); mainCompsiteDef.addProperty(KIND, graph.get("name").getAsString()); mainCompsiteDef.addProperty("public", true); mainCompsiteDef.add("parameters", graph.get("parameters")); mainCompsiteDef.addProperty("__spl_mainComposite", true); mainCompsiteDef.add("operators", graph.get("operators")); composites.add(mainCompsiteDef); stvHelper.addJsonParamDefs(mainCompsiteDef); StringBuilder sb = new StringBuilder(); generateGraph(graph, sb); setDeployment(graph); return sb.toString(); }
Source:
int getSpeed( OSMWay way ) { int speed = PUSHING_SECTION_SPEED; String highwayTag = way.getTag("highway"); Integer highwaySpeed = highwaySpeeds.get(highwayTag); String s = way.getTag("surface"); if (!Helper.isEmpty(s)) { Integer surfaceSpeed = surfaceSpeeds.get(s); if (surfaceSpeed != null) { speed = surfaceSpeed; if (highwaySpeed != null && surfaceSpeed > highwaySpeed) { if (pushingSections.contains(highwayTag)) speed = highwaySpeed; else speed = surfaceSpeed; } } } else { String tt = way.getTag("tracktype"); if (!Helper.isEmpty(tt)) { Integer tInt = trackTypeSpeeds.get(tt); if (tInt != null) speed = tInt; } else if (highwaySpeed != null) { if (!way.hasTag("service")) speed = highwaySpeed; else speed = highwaySpeeds.get("living_street"); } } if ((speed > PUSHING_SECTION_SPEED) && (!way.hasTag("bicycle", intendedValues))) { if (way.hasTag("highway", pushingSections)) { if (way.hasTag("highway", "steps")) speed = PUSHING_SECTION_SPEED / 2; else speed = PUSHING_SECTION_SPEED; } else { if (way.hasTag("bicycle", "dismount")) { speed = PUSHING_SECTION_SPEED; } } } return speed; }

Target:
int getSpeed( OSMWay way ) { int speed = PUSHING_SECTION_SPEED; String highwayTag = way.getTag("highway"); Integer highwaySpeed = highwaySpeeds.get(highwayTag); String s = way.getTag("surface"); if (!Helper.isEmpty(s)) { Integer surfaceSpeed = surfaceSpeeds.get(s); if (surfaceSpeed != null) { speed = surfaceSpeed; if (highwaySpeed != null && surfaceSpeed > highwaySpeed) { if (pushingSectionsHighways.contains(highwayTag)) speed = highwaySpeed; else speed = surfaceSpeed; } } } else { String tt = way.getTag("tracktype"); if (!Helper.isEmpty(tt)) { Integer tInt = trackTypeSpeeds.get(tt); if (tInt != null) speed = tInt; } else if (highwaySpeed != null) { if (!way.hasTag("service")) speed = highwaySpeed; else speed = highwaySpeeds.get("living_street"); } } if ((speed > PUSHING_SECTION_SPEED) && (!way.hasTag("bicycle", intendedValues))) { if (way.hasTag("highway", pushingSectionsHighways) || way.hasTag("bicycle", "dismount")) { speed = PUSHING_SECTION_SPEED; } } return speed; }
Source:
public void propagatesFailingComputationResults() throws ExecutionException, InterruptedException { MultiplexingCompletionService<String, Integer> service = MultiplexingCompletionService.create( ImmutableMap.of(KEY_1, executor1, KEY_2, executor2)); service.submit(KEY_1, () -> 5); service.submit(KEY_2, () -> { throw new IllegalArgumentException("bad"); }); executor1.runUntilIdle(); executor2.runUntilIdle(); assertThat(service.poll().get()).isEqualTo(5); assertThatThrownBy(() -> service.poll().get()) .isInstanceOf(ExecutionException.class) .hasCauseInstanceOf(IllegalArgumentException.class); }

Target:
public void propagatesFailingComputationResults() throws ExecutionException, InterruptedException { MultiplexingCompletionService<String, Integer> service = MultiplexingCompletionService.create( ImmutableMap.of(KEY_1, executor1, KEY_2, executor2)); service.submit(KEY_1, () -> 5); service.submit(KEY_2, () -> { throw new IllegalArgumentException("bad"); }); executor1.runUntilIdle(); executor2.runUntilIdle(); assertThat(service.poll().get()).isEqualTo(5); assertThatThrownBy(() -> service.poll().get()) .isInstanceOf(ExecutionException.class) .hasCauseInstanceOf(IllegalArgumentException.class) .hasMessageContaining("bad"); }
Source:
public Statement apply(Statement base, Description description) { return new Statement() { @Override public void evaluate() throws Throwable { if (!config.isManualStartup()) { startServer(); } try { base.evaluate(); } finally { eserver.shutdown(); } } }; }

Target:
public Statement apply(Statement base, Description description) { return new Statement() { @Override public void evaluate() throws Throwable { if (!config.isManualStartup()) { startServer(); } try { base.evaluate(); } finally { stopServer(); if (!config.isKeepElasticHomeAfterShutdown()) { deleteHomeDirectory(); } } } }; }
Source:
public List<Identifier> getPatientIdentifierList(Config config, String patientUuid) { String responseJson = getJson(config, "/patient/{patientUuid}/identifier", patientUuid); return ((IdentifierListResult) JsonUtils.readJson(responseJson, IdentifierListResult.class)).getResults(); }

Target:
public List<Identifier> getPatientIdentifierList(Config config, String patientUuid) { String responseJson = getJson(config, "/patient/{patientUuid}/identifier?v=full", patientUuid); return ((IdentifierListResult) JsonUtils.readJson(responseJson, IdentifierListResult.class)).getResults(); }
Source:
public ReflectionBeanMapper(Class<T> type) { this.type = type; for (Field field : type.getDeclaredFields()) { properties.put(field.getName().toLowerCase(), field); } }

Target:
public ReflectionBeanMapper(Class<T> type) { this.type = type; cacheAllFieldsIncludingSuperClass(type); }
Source:
public void searchShouldReturnAResponseWithOneTransaction_whenFilteringByStateFromLedger() { Account account = new Account("123456", TokenPaymentType.CARD); var searchParams = new PaymentSearchParams.Builder() .withState("success") .withPageNumber("1") .withDisplaySize("500") .build(); Response response = paymentSearchService.searchLedgerPayments(account, searchParams); JsonAssert.with(response.getEntity().toString()) .assertThat("count", is(1)) .assertThat("total", is(1)) .assertThat("page", is(1)) .assertThat("results", is(collectionWithSize(equalTo(1)))) .assertThat("results[0]", hasKey("amount")) .assertThat("results[0]", hasKey("state")) .assertThat("results[0]", hasKey("reference")) .assertThat("results[0]", hasKey("email")) .assertThat("results[0].card_details.cardholder_name", is("J Doe")) .assertThat("results[0].card_details", hasKey("first_digits_card_number")) .assertThat("results[0].card_details", hasKey("last_digits_card_number")) .assertThat("results[0].state", hasKey("status")) .assertThat("results[0].state", hasKey("finished")) .assertThat("results[0]", hasKey("_links")) .assertThat("_links", hasKey("self")) .assertThat("_links", hasKey("first_page")) .assertThat("_links", hasKey("last_page")) .assertThat("results[0]._links.capture", is(nullValue())) .assertNotDefined("_links.next_page") .assertNotDefined("_links.prev_page"); }

Target:
public void searchShouldReturnAResponseWithOneTransaction_whenFilteringByStateFromLedger() { Account account = new Account("123456", TokenPaymentType.CARD); var searchParams = new PaymentSearchParams.Builder() .withState("success") .withPageNumber("1") .withDisplaySize("500") .build(); Response response = paymentSearchService.searchLedgerPayments(account, searchParams); JsonAssert.with(response.getEntity().toString()) .assertThat("count", is(1)) .assertThat("total", is(1)) .assertThat("page", is(1)) .assertThat("results", is(collectionWithSize(equalTo(1)))) .assertThat("results[0]", hasKey("amount")) .assertThat("results[0]", hasKey("state")) .assertThat("results[0]", hasKey("reference")) .assertThat("results[0]", hasKey("email")) .assertThat("results[0].card_details.cardholder_name", is("J Doe")) .assertThat("results[0].card_details", hasKey("first_digits_card_number")) .assertThat("results[0].card_details", hasKey("last_digits_card_number")) .assertThat("results[0].state", hasKey("status")) .assertThat("results[0].state", hasKey("finished")); }
Source:
@Test public void semiJoinCorrelate() { tester(false, new JdbcTest.HrSchema()) .query( "select empid, name from emps e where e.deptno in (select d.deptno from depts d)") .withHook(Hook.PLANNER, (Consumer<RelOptPlanner>) planner -> { planner.addRule(JoinToCorrelateRule.JOIN); planner.removeRule(EnumerableRules.ENUMERABLE_SEMI_JOIN_RULE); }) .explainContains("" + "EnumerableCalc(expr#0..2=[{inputs}], empid=[$t0], name=[$t2])\n" + " EnumerableHashJoin(condition=[=($1, $3)], joinType=[semi])\n" + " EnumerableCalc(expr#0..4=[{inputs}], proj#0..2=[{exprs}])\n" + " EnumerableTableScan(table=[[s, emps]])\n" + " EnumerableTableScan(table=[[s, depts]])") .returnsUnordered( "empid=100; name=Bill", "empid=110; name=Theodore", "empid=150; name=Sebastian"); }

Target:
@Test public void semiJoinCorrelate() { tester(false, new JdbcTest.HrSchema()) .query( "select empid, name from emps e where e.deptno in (select d.deptno from depts d)") .withHook(Hook.PLANNER, (Consumer<RelOptPlanner>) planner -> { planner.addRule(JoinToCorrelateRule.INSTANCE); planner.removeRule(EnumerableRules.ENUMERABLE_JOIN_RULE); }) .explainContains("" + "EnumerableCalc(expr#0..3=[{inputs}], empid=[$t1], name=[$t3])\n" + " EnumerableCorrelate(correlation=[$cor2], joinType=[inner], requiredColumns=[{0}])\n" + " EnumerableAggregate(group=[{0}])\n" + " EnumerableTableScan(table=[[s, depts]])\n" + " EnumerableCalc(expr#0..4=[{inputs}], expr#5=[$cor2], expr#6=[$t5.deptno], expr#7=[=($t1, $t6)], proj#0..2=[{exprs}], $condition=[$t7])\n" + " EnumerableTableScan(table=[[s, emps]])") .returnsUnordered( "empid=100; name=Bill", "empid=110; name=Theodore", "empid=150; name=Sebastian"); }
Source:
public void removeInventoryListener(InventoryListener listener) { try { this.inventoryListenerSupport.inventoryListenerRWLock.writeLock().lock(); status.assertInitialOrStopped(getClass(), "removeInventoryListener()"); this.inventoryListenerSupport.inventoryListeners.remove(listener); LOG.debugf("Removed inventory listener [%s] for endpoint [%s]", listener, getMonitoredEndpoint()); } finally { this.inventoryListenerSupport.inventoryListenerRWLock.writeLock().unlock(); } }

Target:
public void removeInventoryListener(InventoryListener listener) { this.inventoryListenerSupport.inventoryListenerRWLock.writeLock().lock(); try { status.assertInitialOrStopped(getClass(), "removeInventoryListener()"); this.inventoryListenerSupport.inventoryListeners.remove(listener); LOG.debugf("Removed inventory listener [%s] for endpoint [%s]", listener, getMonitoredEndpoint()); } finally { this.inventoryListenerSupport.inventoryListenerRWLock.writeLock().unlock(); } }
Source:
public void contains_asEmptyListAfterClassRemovedInOtherThread() { final String CLASS_NAME = "KingsAndQueens"; final CountDownLatch bgRealmClosed = new CountDownLatch(1); DynamicRealm realm = initializeDynamicRealm(CLASS_NAME); RealmResults<DynamicRealmObject> results = realm.where(CLASS_NAME).findAll(); DynamicRealmObject object = realm.where(CLASS_NAME).findFirst(); assertTrue(results.contains(object)); new Thread(new Runnable() { @Override public void run() { DynamicRealm bgRealm = DynamicRealm.getInstance(realmConfig); removeClassFromDynamicRealm(bgRealm, CLASS_NAME); bgRealm.close(); bgRealmClosed.countDown(); } }).start(); TestHelper.awaitOrFail(bgRealmClosed); assertFalse(results.contains(object)); realm.close(); }

Target:
public void contains_asEmptyListAfterClassRemovedInOtherThread() { final String CLASS_NAME = "KingsAndQueens"; final CountDownLatch bgRealmClosed = new CountDownLatch(1); DynamicRealm realm = initializeDynamicRealm(CLASS_NAME); final RealmConfiguration config = realm.getConfiguration(); RealmResults<DynamicRealmObject> results = realm.where(CLASS_NAME).findAll(); DynamicRealmObject object = realm.where(CLASS_NAME).findFirst(); assertTrue(results.contains(object)); new Thread(new Runnable() { @Override public void run() { DynamicRealm bgRealm = DynamicRealm.getInstance(config); removeClassFromDynamicRealm(bgRealm, CLASS_NAME); bgRealm.close(); bgRealmClosed.countDown(); } }).start(); TestHelper.awaitOrFail(bgRealmClosed); assertFalse(results.contains(object)); realm.close(); }
Source:
public List<String> getSuggestedNames(String queryString, int maxResults) throws GeoEntryQueryException { return Collections.emptyList(); }

Target:
public List<String> getSuggestedNames(String queryString, int maxResults) throws GeoEntryQueryException { LOGGER.debug("Suggestion query not implemented."); return Collections.emptyList(); }
Source:
private void discoverCoAP(InetAddress address) { Map<String, Object> properties = new HashMap<>(4); properties.put(PROPERTY_COAP_SERVER, address.getHostAddress()); ThingUID uid = new ThingUID(THING_TYPE_SAMPLE, "iotiny-" + address.getHostAddress().substring(address.getHostAddress().lastIndexOf('.') + 1)); if (uid != null) { DiscoveryResult result = DiscoveryResultBuilder.create(uid).withProperties(properties) .withLabel("Internet Of Tiny: " + address.getHostAddress()).build(); thingDiscovered(result); } }

Target:
private void discoverCoAP(InetAddress address) { Map<String, Object> properties = new HashMap<>(4); properties.put(PROPERTY_COAP_SERVER, address.getHostAddress()); ThingUID uid = new ThingUID(THING_TYPE, "iotiny-" + address.getHostAddress().substring(address.getHostAddress().lastIndexOf('.') + 1)); if (uid != null) { DiscoveryResult result = DiscoveryResultBuilder.create(uid).withProperties(properties) .withLabel("Internet Of Tiny: " + address.getHostAddress()).build(); thingDiscovered(result); } }
Source:
default void init(ContainerContext containerContext, JobContext jobContext, ExternalContext externalContext) { throw new UnsupportedOperationException("init() is not supported in " + this.getClass().getName()); }

Target:
default void init(ContainerContext containerContext, JobContext jobContext, ExternalContext externalContext) { }
Source:
public void assertMarkedAsDeleted(INodesInPath iip, String snapshotName) throws IOException { final INodeDirectory dir = getSnapshottableRoot(iip); final Snapshot.Root snapshotRoot = dir.getDirectorySnapshottableFeature() .getSnapshotByName(dir, snapshotName) .getRoot(); if (snapshotRoot.isMarkedAsDeleted()) { throw new IllegalStateException("Failed to gcDeletedSnapshot " + snapshotName + " from " + dir.getFullPathName() + ": snapshot is not marked as deleted"); } }

Target:
public void assertMarkedAsDeleted(INodesInPath iip, String snapshotName) throws IOException { final INodeDirectory dir = getSnapshottableRoot(iip); final Snapshot.Root snapshotRoot = dir.getDirectorySnapshottableFeature() .getSnapshotByName(dir, snapshotName) .getRoot(); if (!snapshotRoot.isMarkedAsDeleted()) { throw new SnapshotException("Failed to gcDeletedSnapshot " + snapshotName + " from " + dir.getFullPathName() + ": snapshot is not marked as deleted"); } }
Source:
public void testUnionDeterminism() { { CompiledPlan plan = compileAdHocPlan("select B, DESC from T2 UNION select A, DESC from T1"); boolean isDeterministic = plan.isOrderDeterministic(); assertEquals(false, isDeterministic); } { CompiledPlan plan = compileAdHocPlan("(select B, DESC from T2 UNION select A, DESC from T1) order by B asc"); boolean isDeterministic = plan.isOrderDeterministic(); assertEquals(false, isDeterministic); } { CompiledPlan plan = compileAdHocPlan("(select B, DESC from T2 UNION select A, DESC from T1) order by B asc, DESC desc"); boolean isDeterministic = plan.isOrderDeterministic(); assertEquals(false, isDeterministic); } { CompiledPlan plan = compileAdHocPlan("select B, DESC from T2 UNION (select A, DESC from T1 order by a, desc) " + "order by B asc, DESC desc"); boolean isDeterministic = plan.isOrderDeterministic(); assertEquals(true, isDeterministic); } }

Target:
public void testUnionDeterminism() { assertIsNonDeterministic("select B, DESC from T2 UNION select A, DESC from T1"); assertIsNonDeterministic("(select B, DESC from T2 UNION select A, DESC from T1) order by B asc"); assertIsDeterministic("(select B, DESC from T2 UNION select A, DESC from T1) order by B asc, DESC desc"); assertIsNonDeterministic("(select a, b, c from t7 union select a, b, c from t8) order by a, b"); assertIsDeterministic("((select a, b, c from t7 order by a, b) union (select a, b, c from t7 order by a, b))"); assertIsNonDeterministic("((select a, b, c from t7 order by a, b) union (select a, b, c from t7 order by a, b)) order by a"); assertIsNonDeterministic("((select a, b, c from t7) union (select a, b, c from t7)) order by a, b"); assertIsNonDeterministic("((select a, b, cast(c as bigint) from t7) union (select a, b, c + 1 from t7)) order by a, b"); }
Source:
protected Map<String, TraceTypeHelper> getTraceTypeMap(String selected) { Map<String, TraceTypeHelper> traceTypeMap = new TreeMap<>(); for (TraceTypeHelper helper : TmfTraceType.getTraceTypeHelpers()) { if (!helper.isExperimentType() && (helper.isEnabled() || (selected != null && helper.getTraceTypeId().equals(selected)))) { traceTypeMap.put(helper.getLabel(), helper); } } return traceTypeMap; }

Target:
protected Map<String, TraceTypeHelper> getTraceTypeMap(String selected) { Map<String, TraceTypeHelper> traceTypeMap = new TreeMap<>(); for (TraceTypeHelper helper : TmfTraceType.getTraceTypeHelpers()) { if (!helper.isExperimentType() && (helper.isEnabled() || (helper.getTraceTypeId().equals(selected)))) { traceTypeMap.put(helper.getLabel(), helper); } } return traceTypeMap; }