auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public SessionSettings(StreamInput in) throws IOException { this.userName = in.readString(); this.searchPath = SearchPath.createSearchPathFrom(in); this.hashJoinsEnabled = in.readBoolean(); <START> if (in.getVersion().onOrAfter(Version.V_4_2_0)) { int ruleSize = in.readVInt(); excludedOptimizerRules = new HashSet<>(ruleSize); if (ruleSize > 0) { for (int i = 0; i < ruleSize; i++) { excludedOptimizerRules.add(in.readString()); } } } else { excludedOptimizerRules = Set.of(); } <END> }</code><technical_language>this is optimized wondering if stream this. session settings execution side is edge case. disallow current_setting function in other places coordinator. I fear end a point stream more session-settings actual data part of requests. PostgreSQL 300 session settings</technical_language>

Target:
public SessionSettings(StreamInput in) throws IOException { this.userName = in.readString(); this.searchPath = SearchPath.createSearchPathFrom(in); this.hashJoinsEnabled = in.readBoolean(); this.excludedOptimizerRules = Set.of(); }
Source:
<code>public void testCHER002_quit() throws Exception { setupCHER002(); runCherryPick(Returns.ABORTED, "branch_c", "branch_d"); assertOutputMessageEnd(getExpectedConflictMessage("[" + getShortId("branch_c") + "]... Delete C1")); assertNoConflitMarker(projectPath.resolve("model.uml"), projectPath.resolve("model.notation")); project = new ProjectBuilder(this) .clean(true) .addContentToCopy("data/conflicts/CHER_002/conflict/resolution1/model.di") .addContentToCopy("data/conflicts/CHER_002/conflict/resolution1/model.uml") .addContentToCopy("data/conflicts/CHER_002/conflict/resolution1/model.notation") .create(projectPath); getGit().add().addFilepattern(".").call(); runQuit(Returns.ABORTED); <START> <END> assertOutputMessageEnd(getExpectedConflictMessage("[" + getShortId("branch_d") + "]... Delete C2")); }</code><technical_language>conglict -> conflict</technical_language>

Target:
public void testCHER002_quit() throws Exception { setupCHER002(); runCherryPick(Returns.ABORTED, "branch_c", "branch_d"); assertOutputMessageEnd(getExpectedConflictMessage("[" + getShortId("branch_c") + "]... Delete C1")); assertNoConflitMarker(projectPath.resolve("model.uml"), projectPath.resolve("model.notation")); project = new ProjectBuilder(this) .clean(true) .addContentToCopy("data/conflicts/CHER002/conflict/resolution1/model.di") .addContentToCopy("data/conflicts/CHER002/conflict/resolution1/model.uml") .addContentToCopy("data/conflicts/CHER002/conflict/resolution1/model.notation") .create(projectPath); getGit().add().addFilepattern(".").call(); runQuit(Returns.ABORTED); assertOutputMessageEnd(getExpectedConflictMessage("[" + getShortId("branch_d") + "]... Delete C2")); }
Source:
<code>public void update(long usedBytes) { File path = Environment.getDataDirectory(); float availableGB = bytesToGB(path.getFreeSpace()); float otherGB = bytesToGB(path.getTotalSpace()); float usedGB = bytesToGB(usedBytes); otherGB -= usedGB; sizeText.setText(getResources().getString(R.string.storage_size_format, usedGB)); usageFreeText.setText(getResources().getString(R.string.storage_size_free, availableGB)); <START> LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) otherBar.getLayoutParams(); params.weight = otherGB; otherBar.setLayoutParams(params); params = (LinearLayout.LayoutParams) freeBar.getLayoutParams(); params.weight = availableGB; freeBar.setLayoutParams(params); params = (LinearLayout.LayoutParams) usedBar.getLayoutParams(); params.weight = usedGB; usedBar.setLayoutParams(params); <END> }</code><technical_language>DRY opportunity</technical_language>

Target:
public void update(long usedBytes) { File path = Environment.getDataDirectory(); float availableGB = bytesToGB(path.getFreeSpace()); float otherGB = bytesToGB(path.getTotalSpace()); float usedGB = bytesToGB(usedBytes); otherGB -= usedGB; sizeText.setText(getResources().getString(R.string.storage_size_format, usedGB)); usageFreeText.setText(getResources().getString(R.string.storage_size_free, availableGB)); setUsageBarWeight(otherBar, otherGB); setUsageBarWeight(freeBar, availableGB); setUsageBarWeight(usedBar, usedGB); }
Source:
<code>public static boolean canSwitchToAmmo(Mounted weapon, AmmoType otherAmmo) { if((weapon == null) || (weapon.getLinked() == null) || (otherAmmo == null)) { return false; } AmmoType currentAmmoType = (AmmoType) weapon.getLinked().getType(); boolean ammoOfSameType = currentAmmoType.equalsAmmoTypeOnly(otherAmmo) && (currentAmmoType.getRackSize() == otherAmmo.getRackSize()); boolean mmlAmmoMatch = (currentAmmoType.getAmmoType() == AmmoType.T_MML) && (otherAmmo.getAmmoType() == AmmoType.T_MML); boolean lbxAmmoMatch = (currentAmmoType.getAmmoType() == AmmoType.T_AC_LBX) <START> && (otherAmmo.getAmmoType() == AmmoType.T_AC_LBX); <END> boolean caselessLoaded = currentAmmoType.getMunitionType() == AmmoType.M_CASELESS; boolean otherBinCaseless = otherAmmo.getMunitionType() == AmmoType.M_CASELESS; boolean caselessMismatch = caselessLoaded != otherBinCaseless; boolean hasStaticFeed = weapon.hasQuirk(OptionsConstants.QUIRK_WEAP_NEG_STATIC_FEED); boolean staticFeedMismatch = hasStaticFeed && (currentAmmoType.getMunitionType() != otherAmmo.getMunitionType()); return (ammoOfSameType || mmlAmmoMatch || lbxAmmoMatch) && !caselessMismatch && !staticFeedMismatch; }</code><technical_language>right now, final logic block bottom returned? "(mmlAmmoMatch || lbxAmmoMatch || ammoOfSameType) && !mismatch</technical_language>

Target:
public static boolean canSwitchToAmmo(Mounted weapon, AmmoType otherAmmo) { if((weapon == null) || (weapon.getLinked() == null) || (otherAmmo == null)) { return false; } AmmoType currentAmmoType = (AmmoType) weapon.getLinked().getType(); boolean ammoOfSameType = currentAmmoType.equalsAmmoTypeOnly(otherAmmo) && (currentAmmoType.getRackSize() == otherAmmo.getRackSize()); boolean mmlAmmoMatch = (currentAmmoType.getAmmoType() == AmmoType.T_MML) && (otherAmmo.getAmmoType() == AmmoType.T_MML) && (currentAmmoType.getRackSize() == otherAmmo.getRackSize()); boolean lbxAmmoMatch = (currentAmmoType.getAmmoType() == AmmoType.T_AC_LBX) && (otherAmmo.getAmmoType() == AmmoType.T_AC_LBX) && (currentAmmoType.getRackSize() == otherAmmo.getRackSize()); boolean caselessLoaded = currentAmmoType.getMunitionType() == AmmoType.M_CASELESS; boolean otherBinCaseless = otherAmmo.getMunitionType() == AmmoType.M_CASELESS; boolean caselessMismatch = caselessLoaded != otherBinCaseless; boolean hasStaticFeed = weapon.hasQuirk(OptionsConstants.QUIRK_WEAP_NEG_STATIC_FEED); boolean staticFeedMismatch = hasStaticFeed && (currentAmmoType.getMunitionType() != otherAmmo.getMunitionType()); return (ammoOfSameType || mmlAmmoMatch || lbxAmmoMatch) && !caselessMismatch && !staticFeedMismatch; }
Source:
<code>public void matchesIdenticalTypes() throws IOException { MatcherAssert.assertThat( new FkContentType( "text/html charset=iso-8859-1", new RsEmpty() ).route( new RqWithHeader( new RqFake(), <START> FkContentTypeTest.CONTENT_TYPE, <END> "text/html charset=iso-8859-1" ) ).has(), Matchers.is(true) ); }</code><technical_language>@xupyprmv please join lines</technical_language>

Target:
public void matchesIdenticalTypes() throws IOException { MatcherAssert.assertThat( new FkContentType( FkContentTypeTest.CTYPE, new RsEmpty() ).route( new RqWithHeader( new RqFake(), FkContentTypeTest.CONTENT_TYPE, FkContentTypeTest.CTYPE ) ).has(), Matchers.is(true) ); }
Source:
<code>public static String buildImagePathToCard(CardDownloadData card) { String setPath = buildImagePathToSet(card); String prefixType = ""; if (card.getType() != 0) { prefixType = " " + Integer.toString(card.getType()); } String cardName = card.getFileName(); if (cardName.isEmpty()) { cardName = prepareCardNameForFile(card.getName()); } <START> cardName = cardName.replaceAll("[\\\\/:*?\"<>|]", ""); <END> String finalFileName = ""; if (card.getUsesVariousArt()) { finalFileName = cardName + prefixType + '.' + card.getCollectorId() + ".full.jpg"; } else { finalFileName = cardName + prefixType + ".full.jpg"; } TFile dirFile = new TFile(setPath); TFile imageFile = new TFile(setPath + finalFileName); try { if (dirFile.exists() && !imageFile.exists()) { for (String fileName : dirFile.list()) { if (fileName.toLowerCase(Locale.ENGLISH).equals(finalFileName.toLowerCase(Locale.ENGLISH))) { finalFileName = fileName; break; } } } } catch (Exception ex) { log.error("Can't read card name from file, may be it broken: " + setPath); } return setPath + finalFileName; }</code><technical_language>prepareCardNameForFile line. If some bad symbol add procedure</technical_language>

Target:
public static String buildImagePathToCard(CardDownloadData card) { String setPath = buildImagePathToSet(card); String prefixType = ""; if (card.getType() != 0) { prefixType = " " + Integer.toString(card.getType()); } String cardName = card.getFileName(); if (cardName.isEmpty()) { cardName = prepareCardNameForFile(card.getName()); } String finalFileName = ""; if (card.getUsesVariousArt()) { finalFileName = cardName + prefixType + '.' + card.getCollectorId() + ".full.jpg"; } else { finalFileName = cardName + prefixType + ".full.jpg"; } TFile dirFile = new TFile(setPath); TFile imageFile = new TFile(setPath + finalFileName); try { if (dirFile.exists() && !imageFile.exists()) { for (String fileName : dirFile.list()) { if (fileName.toLowerCase(Locale.ENGLISH).equals(finalFileName.toLowerCase(Locale.ENGLISH))) { finalFileName = fileName; break; } } } } catch (Exception ex) { log.error("Can't read card name from file, may be it broken: " + setPath); } return setPath + finalFileName; }
Source:
<code>protected boolean isFullyQualified(String href) { if (href == null || href.length() < 5) { return false; } char c = href.charAt(0); if (c == 'h' || c == 'H') { c = href.charAt(1); if (c == 't' || c == 'T') { c = href.charAt(2); <START> if (c == 't' || c == 'T') { <END> c = href.charAt(3); return c == 'p' || c == 'P'; } } } return false; }</code><technical_language>recommend cleaning this toLowerCase</technical_language>

Target:
protected boolean isFullyQualified(String href) { if (href == null || href.length() < 5) { return false; } return href.regionMatches(true, 0, "http", 0, 4); }
Source:
<code>private static String sortingColumnToString(SortingColumn column) { <START> return (column.getOrder() == ASCENDING ? '+' : '-') + column.getColumnName(); <END> }</code><technical_language>I ASC DESC standard hive syntax</technical_language>

Target:
private static String sortingColumnToString(SortingColumn column) { return column.getColumnName() + ((column.getOrder() == DESCENDING) ? " DESC" : ""); }
Source:
<code>protected void onMethodInvocationFound(MethodInvocationTree method) { List<StringConstant> patterns = antMatchersPatterns(method); if (!patterns.isEmpty()) { <START> List<StringConstant> previousPatterns = new PreviousMethodDetection().scan(method).previousPatterns; <END> patterns.forEach(pattern -> checkAntPattern(pattern, previousPatterns)); } }</code><technical_language>I scan method static, in order create a new instance of PreviousMethodDetection. This hidden in method. return previousPatterns instance</technical_language>

Target:
protected void onMethodInvocationFound(MethodInvocationTree method) { List<StringConstant> antPatterns = collectAntPatterns(method); for (int indexToCheck = 1; indexToCheck < antPatterns.size(); indexToCheck++) { checkAntPatternAt(antPatterns, indexToCheck); } }
Source:
<code>public static void main(String... args) throws IOException { <START> if (JAVA_VERSION >= 9){ <END> UILog.log("Parabot", "Please downgrade to Java 8 in order to use Parabot"); System.exit(0); } parseArgs(args); Directories.validate(); Core.verbose(TranslationHelper.translate("DEBUG_MODE") + Core.inDebugMode()); try { Core.verbose(TranslationHelper.translate("SETTING_LOOK_AND_FEEL") + UIManager.getSystemLookAndFeelClassName()); UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Throwable t) { t.printStackTrace(); } if (!Core.inDebugMode() && Core.hasValidation() && !Core.isValid()) { if (Core.newVersionAlert() == JOptionPane.YES_OPTION) { Core.downloadNewVersion(); return; } } Core.verbose(TranslationHelper.translate("VALIDATION_ACCOUNT_MANAGER")); AccountManager.validate(); if (username != null && password != null) { new BotUI(username, password); username = null; password = null; return; } Core.verbose(TranslationHelper.translate("STARTING_LOGIN_GUI")); new BotUI(null, null); }</code><technical_language>if (Context.getVersion() >= 9){</technical_language>

Target:
public static void main(String... args) throws IOException { if (Context.getJavaVersion() >= 9){ UILog.log("Parabot", "Parabot doesn't support Java 9+ currently. Please downgrade to Java 8 to ensure Parabot is working correctly."); System.exit(0); } parseArgs(args); Directories.validate(); Core.verbose(TranslationHelper.translate("DEBUG_MODE") + Core.inDebugMode()); try { Core.verbose(TranslationHelper.translate("SETTING_LOOK_AND_FEEL") + UIManager.getSystemLookAndFeelClassName()); UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Throwable t) { t.printStackTrace(); } if (!Core.inDebugMode() && Core.hasValidation() && !Core.isValid()) { if (Core.newVersionAlert() == JOptionPane.YES_OPTION) { Core.downloadNewVersion(); return; } } Core.verbose(TranslationHelper.translate("VALIDATION_ACCOUNT_MANAGER")); AccountManager.validate(); if (username != null && password != null) { new BotUI(username, password); username = null; password = null; return; } Core.verbose(TranslationHelper.translate("STARTING_LOGIN_GUI")); new BotUI(null, null); }
Source:
<code>public boolean isDslCompatibleWith(LuceneFieldProjectionBuilderFactory obj) { if ( this == obj ) { return true; } if ( obj.getClass() != GeoPointFieldProjectionBuilderFactory.class ) { return false; } GeoPointFieldProjectionBuilderFactory<?> other = (GeoPointFieldProjectionBuilderFactory<?>) obj; <START> return codec.isCompatibleWith( other.codec ) && <END> converter.isDslCompatibleWith( other.converter ); }</code><technical_language>I "isCompatible" method "projectable" field acccount. run risk of field projectable in index other, allowing projection anyway. adapt exception message mention happen field is projectable in index. for other factories, obviously</technical_language>

Target:
public boolean isDslCompatibleWith(LuceneFieldProjectionBuilderFactory obj) { if ( this == obj ) { return true; } if ( obj.getClass() != GeoPointFieldProjectionBuilderFactory.class ) { return false; } GeoPointFieldProjectionBuilderFactory<?> other = (GeoPointFieldProjectionBuilderFactory<?>) obj; return projectable == other.projectable && codec.isCompatibleWith( other.codec ) && converter.isDslCompatibleWith( other.converter ); }
Source:
<code>public String toString() { StringBuilder sb = new StringBuilder(); sb.append("INITITATE_RESPONSE FOR TXN "); sb.append(m_txnId); sb.append("\n SP HANDLE: ").append(m_spHandle); sb.append("\n INITIATOR HSID: ").append(CoreUtils.hsIdToString(m_initiatorHSId)); sb.append("\n COORDINATOR HSID: ").append(CoreUtils.hsIdToString(m_coordinatorHSId)); sb.append("\n CLIENT INTERFACE HANDLE: ").append(m_clientInterfaceHandle); sb.append("\n CLIENT CONNECTION ID: ").append(m_connectionId); sb.append("\n READ-ONLY: ").append(m_readOnly); sb.append("\n RECOVERING: ").append(m_recovering); sb.append("\n MISPARTITIONED: ").append(m_mispartitioned); if (m_commit) sb.append("\n COMMIT"); else sb.append("\n ROLLBACK/ABORT, "); sb.append("\n CLIENT RESPONSE: \n"); <START> if (m_response == null) { <END> sb.append(" NULL\n"); } else { sb.append(m_response.toJSONString()); } return sb.toString(); }</code><technical_language>m_response null be? this a bug fix</technical_language>

Target:
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("INITITATE_RESPONSE FOR TXN "); sb.append(m_txnId); sb.append("\n SP HANDLE: ").append(m_spHandle); sb.append("\n INITIATOR HSID: ").append(CoreUtils.hsIdToString(m_initiatorHSId)); sb.append("\n COORDINATOR HSID: ").append(CoreUtils.hsIdToString(m_coordinatorHSId)); sb.append("\n CLIENT INTERFACE HANDLE: ").append(m_clientInterfaceHandle); sb.append("\n CLIENT CONNECTION ID: ").append(m_connectionId); sb.append("\n READ-ONLY: ").append(m_readOnly); sb.append("\n RECOVERING: ").append(m_recovering); sb.append("\n MISPARTITIONED: ").append(m_mispartitioned); if (m_commit) sb.append("\n COMMIT"); else sb.append("\n ROLLBACK/ABORT, "); sb.append("\n CLIENT RESPONSE: \n"); if (m_response == null) { sb.append( "NULL" ); } else { sb.append(m_response.toJSONString()); } return sb.toString(); }
Source:
<code>private void markLoaded(@Nonnull Scope range, @Nonnull JDefinedClassOrInterface loaded) { loadStatus |= range.getMask(); if (loadStatus == Scope.ALL) { <START> synchronized (this) { loaded.removeLoader(); } <END> } }</code><technical_language>this prevent reordering, markLoaded is called lock is taken. I if prevent it, reader side a problem is synchronized in way</technical_language>

Target:
private void markLoaded(@Nonnull Scope range, @Nonnull JDefinedClassOrInterface loaded) { loadStatus |= range.getMask(); if (loadStatus == Scope.ALL) { loaded.removeLoader(); } }
Source:
<code>private static JPanel createFilterPanel(final JXTable table) { JPanel filterPanel = new JPanel(); filterPanel.setLayout(new GridBagLayout()); JLabel filterLabel = new JLabel(Constant.messages.getString("cfu.label.addons.filter")); final JTextField filterTextField = new JTextField(); filterLabel.setLabelFor(filterTextField); filterPanel.add(filterLabel, LayoutHelper.getGBC(0, 0, 1, 0.0D)); filterPanel.add(filterTextField, LayoutHelper.getGBC(1, 0, 1, 1.0D)); String tooltipText = Constant.messages.getString("cfu.label.addons.filter.tooltip"); filterLabel.setToolTipText(tooltipText); filterTextField.setToolTipText(tooltipText); filterTextField.getDocument().addDocumentListener(new DocumentListener() { @Override public void insertUpdate(DocumentEvent e) { updateFilter(); } @Override public void removeUpdate(DocumentEvent e) { updateFilter(); } @Override public void changedUpdate(DocumentEvent e) { updateFilter(); } public void updateFilter() { String filterText = filterTextField.getText(); if (filterText.isEmpty()) { <START> table.setRowFilter(null); <END> } else { try { table.setRowFilter(RowFilter.regexFilter("(?i)" + filterText)); filterTextField.setForeground(UIManager.getColor("TextField.foreground")); } catch (PatternSyntaxException e) { filterTextField.setForeground(Color.RED); } } } }); return filterPanel; }</code><technical_language>foreground colour reset (otherwise if "wrong regex" is removed cursor shown red)</technical_language>

Target:
private static JPanel createFilterPanel(final JXTable table) { JPanel filterPanel = new JPanel(); filterPanel.setLayout(new GridBagLayout()); JLabel filterLabel = new JLabel(Constant.messages.getString("cfu.label.addons.filter")); final JTextField filterTextField = new JTextField(); filterLabel.setLabelFor(filterTextField); filterPanel.add(filterLabel, LayoutHelper.getGBC(0, 0, 1, 0.0D)); filterPanel.add(filterTextField, LayoutHelper.getGBC(1, 0, 1, 1.0D)); String tooltipText = Constant.messages.getString("cfu.label.addons.filter.tooltip"); filterLabel.setToolTipText(tooltipText); filterTextField.setToolTipText(tooltipText); filterTextField.getDocument().addDocumentListener(new DocumentListener() { @Override public void insertUpdate(DocumentEvent e) { updateFilter(); } @Override public void removeUpdate(DocumentEvent e) { updateFilter(); } @Override public void changedUpdate(DocumentEvent e) { updateFilter(); } public void updateFilter() { String filterText = filterTextField.getText(); if (filterText.isEmpty()) { table.setRowFilter(null); filterTextField.setForeground(UIManager.getColor("TextField.foreground")); } else { try { table.setRowFilter(RowFilter.regexFilter("(?i)" + filterText)); filterTextField.setForeground(UIManager.getColor("TextField.foreground")); } catch (PatternSyntaxException e) { filterTextField.setForeground(Color.RED); } } } }); return filterPanel; }
Source:
<code>private boolean connectHostToPool() { final VDS vds = getVds(); EventResult result = <START> ((EventQueue) EjbUtils.findBean(BeanType.EVENTQUEUE_MANAGER, BeanProxyType.LOCAL)).submitEventSync(new Event(getStoragePool().getId(), <END> null, vds.getId(), EventType.VDSCONNECTTOPOOL, ""), new Callable<EventResult>() { @Override public EventResult call() { return runConnectHostToPoolEvent(getStoragePool().getId(), vds); } }); if (result != null) { return result.isSuccess(); } return false; }</code><technical_language>add message also, simple description user support, if provide correllationId in description, better. case message user friendly</technical_language>

Target:
private boolean connectHostToPool() { final VDS vds = getVds(); EventResult result = ((EventQueue) EjbUtils.findBean(BeanType.EVENTQUEUE_MANAGER, BeanProxyType.LOCAL)).submitEventSync(new Event(getStoragePool().getId(), null, vds.getId(), EventType.VDSCONNECTTOPOOL, "Trying to connect the host to the pool "+getStoragePool().getId()), new Callable<EventResult>() { @Override public EventResult call() { return runConnectHostToPoolEvent(getStoragePool().getId(), vds); } }); if (result != null) { return result.isSuccess(); } return false; }
Source:
<code>public static BufferedImage colorCamoImage(Color color) { if (color == null) { <START> DefaultMmLogger.getInstance().error("A null color was passed."); <END> return ImageUtil.failStandardImage(); } BufferedImage result = new BufferedImage(84, 72, BufferedImage.TYPE_INT_RGB); Graphics2D graphics = result.createGraphics(); graphics.setColor(color); graphics.fillRect(0, 0, 84, 72); return result; }</code><technical_language>suggestion MegaMek.getLogger().error("A null color passed.");</technical_language>

Target:
public static BufferedImage colorCamoImage(Color color) { if (color == null) { MegaMek.getLogger().error("A null color was passed."); return ImageUtil.failStandardImage(); } BufferedImage result = new BufferedImage(84, 72, BufferedImage.TYPE_INT_RGB); Graphics2D graphics = result.createGraphics(); graphics.setColor(color); graphics.fillRect(0, 0, 84, 72); return result; }
Source:
<code>static ClassToExternalizerMap load(GlobalConfiguration globalCfg) { <START> ClassToExternalizerMap exts = new ClassToExternalizerMap(4, 0x0.6p0f); <END> Map<Integer, AdvancedExternalizer<?>> cfgExts = globalCfg.serialization().advancedExternalizers(); for (Map.Entry<Integer, AdvancedExternalizer<?>> config : cfgExts.entrySet()) { AdvancedExternalizer ext = config.getValue(); Integer id = ext.getId(); if (config.getKey() == null && id == null) throw new CacheConfigurationException(String.format( "No advanced externalizer identifier set for externalizer %s", ext.getClass().getName())); else if (config.getKey() != null) id = config.getKey(); id = checkForeignIdLimit(id, ext); Set<Class> subTypes = ext.getTypeClasses(); ForeignAdvancedExternalizer foreignExt = new ForeignAdvancedExternalizer(id, ext); for (Class<?> subType : subTypes) exts.put(subType, foreignExt); } return exts; }</code><technical_language>wanna put load factor in a more readable way? :)</technical_language>

Target:
static ClassToExternalizerMap load(GlobalConfiguration globalCfg) { ClassToExternalizerMap exts = new ClassToExternalizerMap(4, 0.375f); Map<Integer, AdvancedExternalizer<?>> cfgExts = globalCfg.serialization().advancedExternalizers(); for (Map.Entry<Integer, AdvancedExternalizer<?>> config : cfgExts.entrySet()) { AdvancedExternalizer ext = config.getValue(); Integer id = ext.getId(); if (config.getKey() == null && id == null) throw new CacheConfigurationException(String.format( "No advanced externalizer identifier set for externalizer %s", ext.getClass().getName())); else if (config.getKey() != null) id = config.getKey(); checkForeignIdLimit(id, ext); Set<Class> subTypes = ext.getTypeClasses(); ForeignAdvancedExternalizer foreignExt = new ForeignAdvancedExternalizer(id, ext); for (Class<?> subType : subTypes) exts.put(subType, foreignExt); } return exts; }
Source:
<code>void check() throws Exception { TransactionalEditingDomain domain = CreateViewOperationTest.this.session.getTransactionalEditingDomain(); SiriusCommand viewpointCommand = new SiriusCommand(domain); viewpointCommand.getTasks().add(task); domain.getCommandStack().execute(viewpointCommand); IInterpreter interpreter = session.getInterpreter(); assertNotNull("The <START> $" + <END> ToolPackage.Literals.CREATE_VIEW__VARIABLE_NAME.getDefaultValueLiteral() + " should be available to reference the created view", interpreter.evaluateEObject(rootContext.getCurrentTarget(), "aql:" + ToolPackage.Literals.CREATE_VIEW__VARIABLE_NAME.getDefaultValueLiteral())); assertNotNull("The $" + ToolPackage.Literals.CREATE_VIEW__VARIABLE_NAME.getDefaultValueLiteral() + " should be available to reference the created view", interpreter.getVariable(ToolPackage.Literals.CREATE_VIEW__VARIABLE_NAME.getDefaultValueLiteral())); }</code><technical_language>variable</technical_language>

Target:
void check() throws Exception { TransactionalEditingDomain domain = CreateViewOperationTest.this.session.getTransactionalEditingDomain(); SiriusCommand viewpointCommand = new SiriusCommand(domain); viewpointCommand.getTasks().add(task); domain.getCommandStack().execute(viewpointCommand); IInterpreter interpreter = session.getInterpreter(); assertNotNull("The variable" + ToolPackage.Literals.CREATE_VIEW__VARIABLE_NAME.getDefaultValueLiteral() + " should be available to reference the created view", interpreter.evaluateEObject(rootContext.getCurrentTarget(), "aql:" + ToolPackage.Literals.CREATE_VIEW__VARIABLE_NAME.getDefaultValueLiteral())); assertNotNull("The variable" + ToolPackage.Literals.CREATE_VIEW__VARIABLE_NAME.getDefaultValueLiteral() + " should be available to reference the created view", interpreter.getVariable(ToolPackage.Literals.CREATE_VIEW__VARIABLE_NAME.getDefaultValueLiteral())); }
Source:
<code>public static void e(String tag, String msg, Object... args) { if (level >= 1) { String source = getTag(tag); String message = getMessage(msg, args); <START> if (delegate != null) { <END> delegate.error(source, message); } else { Log.e(source, message); } } }</code><technical_language>worth creating internal LoggerDelegate, this constructing Tracker? This internal delegate call Log... methods removing need for this if. code more polymorphic</technical_language>

Target:
public static void e(String tag, String msg, Object... args) { if (level >= 1) { String source = getTag(tag); String message = getMessage(msg, args); delegate.error(source, message); } }
Source:
<code>private boolean describesTestClass(Description description) { <START> return description.getMethodName() == null || description.getMethodName().equals("null"); <END> }</code><technical_language>call getMethodName twice. implementation. is slow method</technical_language>

Target:
private boolean describesTestClass( Description description ) { String methodName = description.getMethodName(); return methodName == null || methodName.equals( "null" ); }
Source:
<code>private static String convertDomain(final String domain) { <START> if (domain == null) { <END> return null; } return stripDotSuffix(domain).toUpperCase(); }</code><technical_language>Please ? ternary operator</technical_language>

Target:
private static String convertDomain(final String domain) { return domain != null ? stripDotSuffix(domain).toUpperCase() : null; }
Source:
<code>private boolean internalValidateAndSetQuota() { if (isInternalExecution()) { return true; } <START> VdcActionType.QuotaDependency quotaDependency = this.getActionType().getQuotaDependency(); <END> List<QuotaConsumptionParameter> consumptionParameters = new ArrayList<QuotaConsumptionParameter>(); QuotaConsumptionParameters quotaConsumptionParameters = new QuotaConsumptionParameters( this.getStoragePool(), this.getStoragePool().getId(), this.getReturnValue().getCanDoActionMessages(), this); try { switch (quotaDependency) { case NONE: return true; case STORAGE: getInternalStorageParameters(consumptionParameters); break; case VDS: getInternalVdsParameters(consumptionParameters); break; case BOTH: getInternalStorageParameters(consumptionParameters); getInternalStorageParameters(consumptionParameters); break; } } catch (ClassCastException e) { log.error("Command: " + this.getClass().getName() + ". Quota handling was expected - class does not implement the expected interface"); } if (!consumptionParameters.isEmpty()) { return true; } else { return true; } }</code><technical_language>consider moving QuotaDependency a separate file</technical_language>

Target:
private boolean internalValidateAndSetQuota() { if (isInternalExecution()) { return true; } VdcActionType.QuotaDependency quotaDependency = this.getActionType().getQuotaDependency(); List<QuotaConsumptionParameter> consumptionParameters = new ArrayList<QuotaConsumptionParameter>(); try { switch (quotaDependency) { case NONE: return true; case STORAGE: addInternalStorageParameters(consumptionParameters); break; case VDS: addInternalVdsParameters(consumptionParameters); break; case BOTH: addInternalStorageParameters(consumptionParameters); addInternalVdsParameters(consumptionParameters); break; } } catch (ClassCastException e) { log.error("Command: " + this.getClass().getName() + ". Quota handling was expected - class does not implement the expected interface"); } QuotaConsumptionParameters quotaConsumptionParameters; if (getStoragePool() != null) { quotaConsumptionParameters = new QuotaConsumptionParameters( this.getStoragePool(), this.getStoragePool().getId(), this.getReturnValue().getCanDoActionMessages(), this); quotaConsumptionParameters.setParameters(consumptionParameters); } else { quotaConsumptionParameters = new QuotaConsumptionParameters( null, null, this.getReturnValue().getCanDoActionMessages(), this); quotaConsumptionParameters.setParameters(consumptionParameters); log.error("Command: " + this.getClass().getName() + ". Storage pool is not available for quota calculation. "); } if (!consumptionParameters.isEmpty()) { return true; } else { return true; } }
Source:
<code>protected boolean executeAnalysis(IProgressMonitor monitor) throws TmfAnalysisException { ITmfTrace trace = getTrace(); if (trace == null) { fInitializationSucceeded = false; fInitialized.countDown(); return false; } IStatus status1 = totalsModule.schedule(); IStatus status2 = eventTypesModule.schedule(); if (!(status1.isOK() && status2.isOK())) { cancelSubAnalyses(); fInitializationSucceeded = false; fInitialized.countDown(); return false; } if (!totalsModule.waitForInitialization() || !eventTypesModule.waitForInitialization()) { fInitializationSucceeded = false; fInitialized.countDown(); return false; } ITmfStateSystem totalsSS = totalsModule.getStateSystem(); ITmfStateSystem eventTypesSS = eventTypesModule.getStateSystem(); <START> if (totalsSS == null || eventTypesSS == null) { <END> fInitializationSucceeded = false; fInitialized.countDown(); return false; } fStatistics = new TmfStateStatistics(totalsSS, eventTypesSS); fInitializationSucceeded = true; fInitialized.countDown(); if (!(totalsModule.waitForCompletion(monitor) && eventTypesModule.waitForCompletion(monitor))) { return false; } return true; }</code><technical_language>IllegalStateException thrown. means waitForInitialization() returned true for getStateSystem returned null is wrong. exception, wrong's happening</technical_language>

Target:
protected boolean executeAnalysis(IProgressMonitor monitor) throws TmfAnalysisException { ITmfTrace trace = getTrace(); if (trace == null) { fInitializationSucceeded = false; fInitialized.countDown(); return false; } IStatus status1 = totalsModule.schedule(); IStatus status2 = eventTypesModule.schedule(); if (!(status1.isOK() && status2.isOK())) { cancelSubAnalyses(); fInitializationSucceeded = false; fInitialized.countDown(); return false; } if (!totalsModule.waitForInitialization() || !eventTypesModule.waitForInitialization()) { fInitializationSucceeded = false; fInitialized.countDown(); return false; } ITmfStateSystem totalsSS = totalsModule.getStateSystem(); ITmfStateSystem eventTypesSS = eventTypesModule.getStateSystem(); if (totalsSS == null || eventTypesSS == null) { fInitializationSucceeded = false; fInitialized.countDown(); throw new IllegalArgumentException("TmfStatisticsModule : Sub-modules initialization succeeded but there is a null state system."); } fStatistics = new TmfStateStatistics(totalsSS, eventTypesSS); fInitializationSucceeded = true; fInitialized.countDown(); if (!(totalsModule.waitForCompletion(monitor) && eventTypesModule.waitForCompletion(monitor))) { return false; } return true; }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DataNodeConfig that = (DataNodeConfig) o; <START> return port == that.port && xid == that.xid && Objects.equals(instanceName, that.instanceName) && Objects.equals( <END> hostName, that.hostName) && Objects.equals(datacenterName, that.datacenterName) && Objects.equals(sslPort, that.sslPort) && Objects.equals(http2Port, that.http2Port) && Objects.equals(rackId, that.rackId) && sealedReplicas.equals(that.sealedReplicas) && stoppedReplicas.equals(that.stoppedReplicas) && disabledReplicas.equals(that.disabledReplicas) && diskConfigs.equals(that.diskConfigs); }</code><technical_language>Minor: suggest moving port == that.port && xid == that.xid position close Objects.equals(sslPort, that.sslPort). compare instanceName first. port xid same</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DataNodeConfig that = (DataNodeConfig) o; return Objects.equals(instanceName, that.instanceName) && Objects.equals(hostName, that.hostName) && Objects.equals( datacenterName, that.datacenterName) && port == that.port && Objects.equals(sslPort, that.sslPort) && Objects.equals(http2Port, that.http2Port) && Objects.equals(rackId, that.rackId) && xid == that.xid && sealedReplicas.equals(that.sealedReplicas) && stoppedReplicas.equals(that.stoppedReplicas) && disabledReplicas.equals(that.disabledReplicas) && diskConfigs.equals(that.diskConfigs); }
Source:
<code>public static int getOptionAsInteger(Map<String, String> options, String option, int defaultValue) { String value = options.get(option); <START> return value == null ? defaultValue : Integer.valueOf(value); <END> }</code><technical_language>Integer.parseInt</technical_language>

Target:
public static int getOptionAsInteger(Map<String, String> options, String option, int defaultValue) { String value = options.get(option); return value == null ? defaultValue : Integer.parseInt(value); }
Source:
<code><START> public static Put getHadoopVersionPut(int historyFileVersion, byte[] jobKeyBytes) { <END> Put pVersion = new Put(jobKeyBytes); byte[] valueBytes = null; valueBytes = Bytes.toBytes(Integer.toString(historyFileVersion)); byte[] qualifier = Bytes.toBytes(JobHistoryKeys.hadoopversion.toString().toLowerCase()); pVersion.add(Constants.INFO_FAM_BYTES, qualifier, valueBytes); return pVersion; }</code><technical_language>If subclasses inherit a common implementation is goal, instance method is preferred (i.e. non-static). static methods for inheritance purposes is bit of anti-pattern</technical_language>

Target:
public Put getHadoopVersionPut(int historyFileVersion, byte[] jobKeyBytes) { Put pVersion = new Put(jobKeyBytes); byte[] valueBytes = null; valueBytes = Bytes.toBytes(Integer.toString(historyFileVersion)); byte[] qualifier = Bytes.toBytes(JobHistoryKeys.hadoopversion.toString().toLowerCase()); pVersion.add(Constants.INFO_FAM_BYTES, qualifier, valueBytes); return pVersion; }
Source:
<code>public static void registerItemColors(ColorHandlerEvent.Item event) { final ItemColors colors = event.getItemColors(); colors.register((@Nonnull ItemStack stack, int tintIndex) -> SlimeSlingItem.getColorFromStack(stack), GadgetItems.slime_sling_blue.get(), GadgetItems.slime_sling_purple.get(), GadgetItems.slime_sling_magma.get(), GadgetItems.slime_sling_green.get(), GadgetItems.slime_sling_blood.get()); <START> colors.register((@Nonnull ItemStack stack, int tintIndex) -> SlimeBootsItem.getColorFromStack(stack), GadgetItems.slime_boots_blue.get(), GadgetItems.slime_boots_purple.get(), GadgetItems.slime_boots_magma.get(), GadgetItems.slime_boots_green.get(), GadgetItems.slime_boots_blood.get()); <END> }</code><technical_language>This method is of a mess, calling a messy function. clean up, registerEnum slime sling slime boots, change code teh following: java for (SlimeType slime : SlimeType.values()) { colors.register((stack,index)->slime.getBallColor(), GadgetItems.slime_boots.get(slime), GadgetItems.slime_sling.get(slime)); } delete messy methods slime sling slime boots</technical_language>

Target:
public static void registerItemColors(ColorHandlerEvent.Item event) { final ItemColors colors = event.getItemColors(); for (SlimeBlock.SlimeType slime : SlimeBlock.SlimeType.values()) { colors.register((stack,index)->slime.getBallColor(), GadgetItems.slime_sling.get(slime), GadgetItems.slime_boots.get(slime)); } }
Source:
<code>protected AbstractBuilder() { <START> this.filters = new ConcurrentLinkedDeque<>(); <END> }</code><technical_language>is wrong here. discuss</technical_language>

Target:
protected AbstractBuilder() { this.filters = newLinkedList(); }
Source:
<code>public void testSupportedPlanNodes() throws Exception { Field field = null; try { <START> field = ApplyConnectorOptimization.class.getDeclaredField("CONNECTOR_ACCESSIBLE_PLAN_NODES"); <END> field.setAccessible(true); @SuppressWarnings("unchecked") Set<Class<? extends PlanNode>> actual = (Set<Class<? extends PlanNode>>) field.get(new ApplyConnectorOptimization(ImmutableMap.of())); Set<Class<? extends PlanNode>> expected = ImmutableSet.of(FilterNode.class, TableScanNode.class); assertEquals(actual, expected); } finally { if (field != null) { field.setAccessible(false); } } }</code><technical_language>CONNECTOR_ACCESSIBLE_PLAN_NODES field public? assertEquals(ApplyConnectorOptimization.CONNECTOR_ACCESSIBLE_PLAN_NODES, ImmutableSet.of(FilterNode.class, TableScanNode.class));</technical_language>

Target:
public void testSupportedPlanNodes() { @SuppressWarnings("unchecked") Set<Class<? extends PlanNode>> expected = Arrays.stream(PlanVisitor.class.getDeclaredMethods()) .map(Method::getParameterTypes) .filter(parameterTypes -> parameterTypes.length > 0) .filter(parameterTypes -> PlanNode.class.isAssignableFrom(parameterTypes[0])) .filter(parameterTypes -> isFinal(parameterTypes[0].getModifiers())) .map(parameterTypes -> (Class<? extends PlanNode>) parameterTypes[0]) .collect(toImmutableSet()); assertEquals(ApplyConnectorOptimization.CONNECTOR_ACCESSIBLE_PLAN_NODES, expected); }
Source:
<code>public void display(IStructuredSelection selection) { if (selection != null && selection.getFirstElement() instanceof IJavaVariable) { IJavaVariable variable = (IJavaVariable) (selection.getFirstElement()); if (fVariable == null || !fVariable.equals(variable)) { fVariable = variable; <START> fExpressionHistory.setEnabled(true); <END> initializeExpressionHistoryDropDown(); } } super.display(selection); }</code><technical_language>I NPE's here..</technical_language>

Target:
public void display(IStructuredSelection selection) { if (fExpressionHistory != null && selection != null && selection.getFirstElement() instanceof IJavaVariable) { IJavaVariable variable = (IJavaVariable) (selection.getFirstElement()); if (fVariable == null || !fVariable.equals(variable)) { fVariable = variable; fExpressionHistory.setEnabled(true); initializeExpressionHistoryDropDown(); } } super.display(selection); }
Source:
<code><START> private boolean isVmMigratable(VM vm) { return (vm.getMigrationSupport() == MigrationSupport.MIGRATABLE) && !vm.isHostedEngine(); } <END></code><technical_language>I this (no action needed)</technical_language>

Target:
private static boolean isVmMigratable(VM vm) { return (vm.getMigrationSupport() == MigrationSupport.MIGRATABLE) && !vm.isHostedEngine(); }
Source:
<code>private static AbstractFactory createFactory() { try { return (AbstractFactory) Class.forName(LiferayServerContext.getFactoryClass()).newInstance(); } catch (Exception e) { <START> Log.e("LiferayScreens", "Error creating the instance class"); <END> return new FactoryCE(); } }</code><technical_language>Add error message: explain configuration key missing (if so) class</technical_language>

Target:
private static AbstractFactory createFactory() { try { return (AbstractFactory) Class.forName(LiferayServerContext.getFactoryClass()).newInstance(); } catch (Exception e) { Log.e("LiferayScreens", "Error creating the instance class, " + "there isn't an attribute called *factory_class* that can be instantiated. " + "Are you sure that your class and package exists and it has a public empty constructor?"); return new FactoryCE(); } }
Source:
<code>@Test public void resultRespectsBackpressure() { server.enqueue(new MockResponse().setBody("Hi")); <START> RecordingSubscriber<Result<String>> subscriber = subscriberRule.get(0); <END> service.result().unsafeSubscribe(subscriber); assertThat(server.getRequestCount()).isEqualTo(0); subscriber.requestMore(1); assertThat(server.getRequestCount()).isEqualTo(1); subscriber.assertAnyValue().assertCompleted(); subscriber.requestMore(Long.MAX_VALUE); assertThat(server.getRequestCount()).isEqualTo(1); }</code><technical_language>This line read . . . kind of element a list. simpler this: RecordingSubscriber<Result<String>> subscriber = subscriberRule.get().initialRequest(0);</technical_language>

Target:
@Test public void resultRespectsBackpressure() { server.enqueue(new MockResponse().setBody("Hi")); RecordingSubscriber<Result<String>> subscriber = subscriberRule.createWithInitialRequest(0); service.result().unsafeSubscribe(subscriber); assertThat(server.getRequestCount()).isEqualTo(0); subscriber.requestMore(1); assertThat(server.getRequestCount()).isEqualTo(1); subscriber.assertAnyValue().assertCompleted(); subscriber.requestMore(Long.MAX_VALUE); assertThat(server.getRequestCount()).isEqualTo(1); }
Source:
<code>public String sendMessage(final Map<String, String> headers, final int type, final String body, boolean durable, final String user, final String password) throws Exception { try { securityStore.check(queue.getAddress(), queue.getName(), CheckType.SEND, new SecurityAuth() { @Override public String getUsername() { return user; } @Override public String getPassword() { return password; } @Override public RemotingConnection getRemotingConnection() { return null; } }); CoreMessage message = new CoreMessage(storageManager.generateID(), 50); if (headers != null) { for (String header : headers.keySet()) { message.putStringProperty(new SimpleString(header), new SimpleString(headers.get(header))); } } message.setType((byte) type); message.setDurable(durable); message.setTimestamp(System.currentTimeMillis()); if (body != null) { if (type == Message.TEXT_TYPE) { message.getBodyBuffer().writeNullableSimpleString(new SimpleString(body)); } else { message.getBodyBuffer().writeBytes(Base64.decode(body)); } } message.setAddress(queue.getAddress()); ByteBuffer buffer = ByteBuffer.allocate(8); buffer.putLong(queue.getID()); message.putBytesProperty(Message.HDR_ROUTE_TO_IDS, buffer.array()); <START> server.getPostOffice().route(LargeServerMessageImpl.checkLargeMessage(message, server.getStorageManager()), true); <END> return "" + message.getMessageID(); } catch (Exception e) { throw new IllegalStateException(e.getMessage()); } }</code><technical_language>routing post office, send serversession? This sort large message issue ensure message is treated others in future if other bits happen dont risk ways. Noted serversession i miss broker plugin</technical_language>

Target:
public String sendMessage(final Map<String, String> headers, final int type, final String body, boolean durable, final String user, final String password) throws Exception { try { return sendMessage(queue.getAddress(), server, headers, type, body, durable, user, password, queue.getID()); } catch (Exception e) { throw new IllegalStateException(e.getMessage()); } }
Source:
<code>public ReduceSeedObserver(SingleObserver<? super R> actual, BiFunction<R, ? super T, R> reducer, R value) { this.actual = actual; this.value = value; this.reducer = reducer; <START> this.value = value; <END> }</code><technical_language>2x this.value = value? L64 & L66</technical_language>

Target:
public ReduceSeedObserver(SingleObserver<? super R> actual, BiFunction<R, ? super T, R> reducer, R value) { this.actual = actual; this.value = value; this.reducer = reducer; }
Source:
<code>private EntityModel<String> validateName(E entityData) { final int maxNameLength = <START> getMaxNameLength(); <END> EntityModel<String> name = new EntityModel<>(entityData.getName()); name.validateEntity( new IValidation[] { new NotEmptyValidation(), new LengthValidation(maxNameLength), new I18NNameValidation(), new UniqueNameValidator(entityData), value -> entityData.isNameExistsInTheSystem() ? ValidationResult.fail(ConstantsManager.getInstance() .getConstants() .nameMustBeUniqueInvalidReason()) : ValidationResult.ok() }); return name; }</code><technical_language>here, I call AsyncDataProvider.getInstance().getMaxVmNameLength();</technical_language>

Target:
private EntityModel<String> validateName(E entityData) { final int maxNameLength = AsyncDataProvider.getInstance().getMaxVmNameLength(); EntityModel<String> name = new EntityModel<>(entityData.getName()); name.validateEntity( new IValidation[] { new NotEmptyValidation(), new LengthValidation(maxNameLength), new I18NNameValidation(), uniqueNameValidator -> !isNameUnique(entityData) ? ValidationResult.fail(ConstantsManager.getInstance() .getConstants() .nameMustBeUniqueInvalidReason()) : ValidationResult.ok(), value -> entityData.isNameExistsInTheSystem() ? ValidationResult.fail(ConstantsManager.getInstance() .getConstants() .nameMustBeUniqueInvalidReason()) : ValidationResult.ok() }); return name; }
Source:
<code>public Collection<IAtsTeamWorkflow> getSiblingTeamWorkflows(IAtsTeamWorkflow teamWf) { List<IAtsTeamWorkflow> teams = new LinkedList<IAtsTeamWorkflow>(); <START> teamWf.getStoreObject(); <END> Object action = getAction(teamWf); for (Object teamArt : atsServices.getRelationResolver().getRelated(action, AtsRelationTypes.ActionToWorkflow_WorkFlow)) { if (!teamArt.equals(teamWf)) { teams.add(atsServices.getWorkItemFactory().getTeamWf(teamArt)); } } return teams; }</code><technical_language>store object is used. Suggest removing it</technical_language>

Target:
public Collection<IAtsTeamWorkflow> getSiblingTeamWorkflows(IAtsTeamWorkflow teamWf) { List<IAtsTeamWorkflow> teams = new LinkedList<IAtsTeamWorkflow>(); Object action = getAction(teamWf); for (Object teamArt : atsServices.getRelationResolver().getRelated(action, AtsRelationTypes.ActionToWorkflow_WorkFlow)) { if (!teamArt.equals(teamWf)) { teams.add(atsServices.getWorkItemFactory().getTeamWf(teamArt)); } } return teams; }
Source:
<code>@Test public void testPushAggregateThroughtOuterJoin16() { final HepProgram preProgram = new HepProgramBuilder() .addRuleInstance(AggregateProjectMergeRule.INSTANCE) .build(); final HepProgram program = new HepProgramBuilder() .addRuleInstance(AggregateJoinTransposeRule.EXTENDED) .build(); final String sql = "select e.job\n" + "from (select * from sales.emp where empno = 10) as e\n" <START> + "left outer join sales.dept as d on e.job = d.name\n" <END> + "and e.deptno + e.empno = d.deptno + 5\n" + "group by e.job"; checkPlanning(tester, preProgram, new HepPlanner(program), sql); }</code><technical_language>left outer</technical_language>

Target:
@Test public void testPushAggregateThroughtOuterJoin16() { final HepProgram preProgram = new HepProgramBuilder() .addRuleInstance(AggregateProjectMergeRule.INSTANCE) .build(); final HepProgram program = new HepProgramBuilder() .addRuleInstance(AggregateJoinTransposeRule.EXTENDED) .build(); final String sql = "select e.job\n" + "from (select * from sales.emp where empno = 10) as e\n" + "full outer join sales.dept as d on e.job = d.name\n" + "and e.deptno + e.empno = d.deptno + 5\n" + "group by e.job"; checkPlanning(tester, preProgram, new HepPlanner(program), sql); }