auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private boolean isNewBoardCreationDialogConfirmed() { List<PanelInfo> panelList = panels.getCurrentPanelInfos(); if (!panelList.isEmpty()) { <START> Alert dlg = new Alert(AlertType.CONFIRMATION, ""); <END> dlg.initModality(Modality.APPLICATION_MODAL); dlg.setTitle("Confirmation"); dlg.getDialogPane().setHeaderText("Create a new board"); dlg.getDialogPane().setContentText("Are you sure you want to create a new board?" + " All unsaved changes to the current board will be lost."); Optional<ButtonType> response = dlg.showAndWait(); return response.isPresent() && response.get().getButtonData() == ButtonData.OK_DONE; } return true; }</code><technical_language>I @damithc meant this instead: java if (panelList.isEmpty()) { return true; } // else logic a bit simpler read</technical_language>

Target:
private boolean isNewBoardCreationDialogConfirmed() { List<PanelInfo> panelList = panels.getCurrentPanelInfos(); if (panelList.isEmpty()) { return true; } Alert dlg = new Alert(AlertType.CONFIRMATION, ""); dlg.initModality(Modality.APPLICATION_MODAL); dlg.setTitle("Confirmation"); dlg.getDialogPane().setHeaderText("Create a new board"); dlg.getDialogPane().setContentText("Are you sure you want to create a new board?" + " All unsaved changes to the current board will be lost."); Optional<ButtonType> response = dlg.showAndWait(); return response.isPresent() && response.get().getButtonData() == ButtonData.OK_DONE; }
Source:
<code><START> public void testSerializeIndividually() { <END> try { EitherTypeInfo<LongValue, DoubleValue> eitherTypeInfo = new EitherTypeInfo<>( ValueTypeInfo.LONG_VALUE_TYPE_INFO, ValueTypeInfo.DOUBLE_VALUE_TYPE_INFO); EitherSerializer<LongValue, DoubleValue> eitherSerializer = (EitherSerializer<LongValue, DoubleValue>) eitherTypeInfo.createSerializer(new ExecutionConfig()); LongValue lv = new LongValue(); DoubleValue dv = new DoubleValue(); Either<LongValue, DoubleValue> left = Left(lv); Either<LongValue, DoubleValue> right = Right(dv); TestOutputView out = new TestOutputView(); eitherSerializer.serialize(left, out); eitherSerializer.serialize(right, out); eitherSerializer.serialize(left, out); TestInputView in = out.getInputView(); Either<LongValue, DoubleValue> copy0 = eitherSerializer.deserialize(right, in); Either<LongValue, DoubleValue> copy1 = eitherSerializer.deserialize(copy0, in); Either<LongValue, DoubleValue> copy2 = eitherSerializer.deserialize(copy1, in); assertSame(right, copy1); assertSame(copy0, copy2); assertSame(right.right(), copy1.right()); assertSame(copy0.left(), copy2.left()); } catch (IOException ignored) { } }</code><technical_language>need change name for example testEitherWithLongAndDoulbe. parent test run</technical_language>

Target:
public void testSerializeIndividually() throws IOException { EitherTypeInfo<LongValue, DoubleValue> eitherTypeInfo = new EitherTypeInfo<>( ValueTypeInfo.LONG_VALUE_TYPE_INFO, ValueTypeInfo.DOUBLE_VALUE_TYPE_INFO); EitherSerializer<LongValue, DoubleValue> eitherSerializer = (EitherSerializer<LongValue, DoubleValue>) eitherTypeInfo.createSerializer(new ExecutionConfig()); LongValue lv = new LongValue(); DoubleValue dv = new DoubleValue(); Either<LongValue, DoubleValue> left = Left(lv); Either<LongValue, DoubleValue> right = Right(dv); TestOutputView out = new TestOutputView(); eitherSerializer.serialize(left, out); eitherSerializer.serialize(right, out); eitherSerializer.serialize(left, out); TestInputView in = out.getInputView(); Either<LongValue, DoubleValue> copy0 = eitherSerializer.deserialize(right, in); Either<LongValue, DoubleValue> copy1 = eitherSerializer.deserialize(copy0, in); Either<LongValue, DoubleValue> copy2 = eitherSerializer.deserialize(copy1, in); assertSame(right, copy1); assertSame(copy0, copy2); assertSame(right.right(), copy1.right()); assertSame(copy0.left(), copy2.left()); }
Source:
<code>public SqlGraphConfiguration(Map<String, Object> config) { super(config); serializer = createSerializer(config); String driverClass = getConfigString(config, CONFIG_JDBC_DRIVER_CLASS); String url = getConfigString(config, CONFIG_JDBC_URL); String username = getConfigString(config, CONFIG_JDBC_USERNAME); String password = getConfigString(config, CONFIG_JDBC_PASSWORD); dataSource = new BasicDataSource(); dataSource.setDriverClassName(driverClass); dataSource.setUrl(url); dataSource.setUsername(username); dataSource.setPassword(password); <START> Handle handle = new DBI(dataSource).open(); <END> vertexMap = newVertexMap(handle); edgeMap = newEdgeMap(handle); metadataMap = newMetadataMap(handle); }</code><technical_language>I find a strange open Handle here? this moved SqlGraph</technical_language>

Target:
public SqlGraphConfiguration(Map<String, Object> config) { super(config); String driverClass = getConfigString(config, CONFIG_JDBC_DRIVER_CLASS); String url = getConfigString(config, CONFIG_JDBC_URL); String username = getConfigString(config, CONFIG_JDBC_USERNAME); String password = getConfigString(config, CONFIG_JDBC_PASSWORD); dataSource = new BasicDataSource(); dataSource.setDriverClassName(driverClass); dataSource.setUrl(url); dataSource.setUsername(username); dataSource.setPassword(password); serializer = createSerializer(); }
Source:
<code><START> public void cacheMeasurementClass(final Class<?>... classVarAgrs) { <END> for (Class<?> clazz : classVarAgrs) { if (CLASS_FIELD_CACHE.containsKey(clazz.getName())) { continue; } ConcurrentMap<String, Field> initialMap = new ConcurrentHashMap<>(); ConcurrentMap<String, Field> influxColumnAndFieldMap = CLASS_FIELD_CACHE.putIfAbsent(clazz.getName(), initialMap); if (influxColumnAndFieldMap == null) { influxColumnAndFieldMap = initialMap; } for (Field field : clazz.getDeclaredFields()) { Column colAnnotation = field.getAnnotation(Column.class); if (colAnnotation != null) { influxColumnAndFieldMap.put(colAnnotation.name(), field); } } } }</code><technical_language>Please revert access modifier this method this class methods other classes minimum required. is need this method public</technical_language>

Target:
void cacheMeasurementClass(final Class<?>... classVarAgrs) { for (Class<?> clazz : classVarAgrs) { if (CLASS_FIELD_CACHE.containsKey(clazz.getName())) { continue; } ConcurrentMap<String, Field> initialMap = new ConcurrentHashMap<>(); ConcurrentMap<String, Field> influxColumnAndFieldMap = CLASS_FIELD_CACHE.putIfAbsent(clazz.getName(), initialMap); if (influxColumnAndFieldMap == null) { influxColumnAndFieldMap = initialMap; } for (Field field : clazz.getDeclaredFields()) { Column colAnnotation = field.getAnnotation(Column.class); if (colAnnotation != null) { influxColumnAndFieldMap.put(colAnnotation.name(), field); } } } }
Source:
<code>public void blockThread() { try { synchronized (this) { <START> System.out.println("wait skipper"); <END> callback.onFinished(); wait(); } } catch (InterruptedException e) { log.error("Error occured in SkipAudioProcessor while calling blockThread"); log.trace(StackTrace.stackTrace(e)); } }</code><technical_language>sysout</technical_language>

Target:
public void blockThread() { try { synchronized (this) { callback.onFinished(); wait(); } } catch (InterruptedException e) { log.error("Error occured in SkipAudioProcessor while calling blockThread"); log.trace(StackTrace.stackTrace(e)); } }
Source:
<code>public void close() throws Exception { <START> if (shouldWeShutdown) { <END> repository.shutDown(); } }</code><technical_language>call repository.shutDown here. rely user calling themselves, this a wrapper for a long term instance of Repository, infer isInitialized in general, easier call shutDown here</technical_language>

Target:
public void close() throws Exception { if (handleInitAndShutdown) { repository.shutDown(); } }
Source:
<code>private static void tryPreLoad(String file, boolean pixelData) { synchronized (IMAGES) { if (IMAGES.containsKey(file)) { return; } } Image image; try { image = new Image(file); } catch (Exception ex) { <START> log.log(LogLevel.WARNING, "Error while trying to load image: " + file); <END> return; } if (pixelData) { boolean[][] data = CollisionMask.buildData(image); double alphaRatio = CollisionMask.getAlphaRatio(data); synchronized (IMAGE_ALPHARATS) { IMAGE_ALPHARATS.put(file, alphaRatio); } synchronized (IMAGE_DATA) { IMAGE_DATA.put(file, data); } } synchronized (IMAGES) { IMAGES.put(file, image); } }</code><technical_language>this log level ERROR? <naming</technical_language>

Target:
private static void tryPreLoad(String file, boolean pixelData) { synchronized (IMAGES) { if (IMAGES.containsKey(file)) { return; } } Image image; try { image = new Image(file); } catch (Exception ex) { log.log(LogLevel.ERROR, "Error while trying to load image: " + file); return; } if (pixelData) { boolean[][] data = CollisionMask.buildData(image); double alphaRatio = CollisionMask.getAlphaRatio(data); synchronized (IMAGE_ALPHARATS) { IMAGE_ALPHARATS.put(file, alphaRatio); } synchronized (IMAGE_DATA) { IMAGE_DATA.put(file, data); } } synchronized (IMAGES) { IMAGES.put(file, image); } }
Source:
<code><START> protected void deployModules(Container container) throws Exception { <END> String containerName = container.getName(); logger.info("Container arrived: {}", containerName); Thread.sleep(1000); deployUnallocatedStreamModules(); deployUnallocatedJobModules(); }</code><technical_language>deploying modules, longer target **only** arriving container match containers repository, a scheduled deployer performs redeployment operation a time targeting container. I is logic arriving container info anymore</technical_language>

Target:
protected void deployModules(Container container) throws Exception { String containerName = container.getName(); logger.info("Container arrived: {}", containerName); deployUnallocatedStreamModules(); deployUnallocatedJobModules(); }
Source:
<code>ByteBuf encode( final ByteBufAllocator allocator, final int streamId, boolean fragmentFollows, boolean complete, boolean next, int requestN, @Nullable ByteBuf metadata, ByteBuf data) { int flags = 0; <START> if (metadata != null && Unpooled.EMPTY_BUFFER != metadata) { <END> flags |= FrameHeaderFlyweight.FLAGS_M; } if (fragmentFollows) { flags |= FrameHeaderFlyweight.FLAGS_F; } if (complete) { flags |= FrameHeaderFlyweight.FLAGS_C; } if (next) { flags |= FrameHeaderFlyweight.FLAGS_N; } ByteBuf header = FrameHeaderFlyweight.encode(allocator, streamId, frameType, flags); if (requestN > 0) { header.writeInt(requestN); } if (metadata != null && Unpooled.EMPTY_BUFFER != metadata) { return DataAndMetadataFlyweight.encode(allocator, header, metadata, data); } else { return DataAndMetadataFlyweight.encodeOnlyData(allocator, header, data); } }</code><technical_language>EMPTY_BUFFER "" case? null is case flag unset</technical_language>

Target:
ByteBuf encode( final ByteBufAllocator allocator, final int streamId, boolean fragmentFollows, boolean complete, boolean next, int requestN, @Nullable ByteBuf metadata, ByteBuf data) { int flags = 0; if (metadata != null) { flags |= FrameHeaderFlyweight.FLAGS_M; } if (fragmentFollows) { flags |= FrameHeaderFlyweight.FLAGS_F; } if (complete) { flags |= FrameHeaderFlyweight.FLAGS_C; } if (next) { flags |= FrameHeaderFlyweight.FLAGS_N; } ByteBuf header = FrameHeaderFlyweight.encode(allocator, streamId, frameType, flags); if (requestN > 0) { header.writeInt(requestN); } if (metadata != null) { return DataAndMetadataFlyweight.encode(allocator, header, metadata, data); } else { return DataAndMetadataFlyweight.encodeOnlyData(allocator, header, data); } }
Source:
<code>private void handleProtocolResponseMessage(final ProtocolResponseMessage message) throws FunctionalException, JMSException { <START> if (message.getRetryHeader() != null && message.getRetryHeader().shouldRetry()) { <END> LOGGER.info("Creating a scheduled retry task for message of type for device {}.", message.getMessageType(), message.getDeviceIdentification()); final ScheduledTask task = this.createScheduledRetryTask(message); this.scheduledTaskRepository.save(task); } else if (this.shouldRetryBasedOnMessage(message)) { LOGGER.info("Retrying: for device for time", message.getMessageType(), message.getDeviceIdentification(), message.getRetryCount() + 1); final ProtocolRequestMessage protocolRequestMessage = this.createProtocolRequestMessage(message); this.deviceRequestMessageService.processMessage(protocolRequestMessage); } else { LOGGER.info("Sending domain response message for message of type for device {}.", message.getMessageType(), message.getDeviceIdentification()); this.domainResponseMessageSender.send(message); } }</code><technical_language>This removed. scheduled task needs saved</technical_language>

Target:
private void handleProtocolResponseMessage(final ProtocolResponseMessage message) throws FunctionalException, JMSException { if (this.mustBeRetried(message)) { LOGGER.info("Creating a scheduled retry task for message of type for device {}.", message.getMessageType(), message.getDeviceIdentification()); final ScheduledTask task = this.createScheduledRetryTask(message); this.scheduledTaskRepository.save(task); } else if (this.shouldRetryBasedOnMessage(message)) { LOGGER.info("Retrying: for device for time", message.getMessageType(), message.getDeviceIdentification(), message.getRetryCount() + 1); final ProtocolRequestMessage protocolRequestMessage = this.createProtocolRequestMessage(message); this.deviceRequestMessageService.processMessage(protocolRequestMessage); } else { LOGGER.info("Sending domain response message for message of type for device {}.", message.getMessageType(), message.getDeviceIdentification()); this.domainResponseMessageSender.send(message); } }
Source:
<code><START> private void spawnParticle(final net.minecraft.world.World world, final IParticleData particleTypes, final double xCoord, final double yCoord, final double zCoord, <END> final double xOffset, final double yOffset, final double zOffset) { if (!this.vanish$isVanished) { this.world.addParticle(particleTypes, xCoord, yCoord, zCoord, xOffset, yOffset, zOffset); } }</code><technical_language>Fix method name impl$ prefix</technical_language>

Target:
private void impl$spawnParticle(final net.minecraft.world.World world, final IParticleData particleTypes, final double xCoord, final double yCoord, final double zCoord, final double xOffset, final double yOffset, final double zOffset) { if (!this.vanish$isVanished) { this.world.addParticle(particleTypes, xCoord, yCoord, zCoord, xOffset, yOffset, zOffset); } }
Source:
<code>protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { HeaderWriterResponse headerWriterResponse = new HeaderWriterResponse(request, response, this.headerWriter); HeaderWriterRequest headerWriterRequest = new HeaderWriterRequest(request, headerWriterResponse); try { <START> if (shouldWriteHeadersEagerly) { <END> headerWriterResponse.writeHeaders(); } filterChain.doFilter(headerWriterRequest, headerWriterResponse); } finally { if (!shouldWriteHeadersEagerly) { headerWriterResponse.writeHeaders(); } } }</code><technical_language>surrounding code written standardized this, refer member variables this.. modifying lines anyway, change refers headerWriterResponse</technical_language>

Target:
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { if (this.shouldWriteHeadersEagerly) { doHeadersBefore(request, response, filterChain); } else { doHeadersAfter(request, response, filterChain); } }
Source:
<code>public List<Credential> fromRequest(final HttpServletRequest request, final MultiValueMap<String, String> requestBody) { if (requestBody == null || requestBody.isEmpty()) { <START> LOGGER.debug("Skipping because the requestBody is null or empty", this); <END> return new ArrayList<>(0); } final String otp = requestBody.getFirst(PARAMETER_NAME_YUBIKEY_OTP); LOGGER.debug("YubiKey token in the request body: [{}]", otp); if (StringUtils.isBlank(otp)) { return new ArrayList<>(0); } return CollectionUtils.wrap(new YubiKeyCredential(otp)); }</code><technical_language>Consider getClass().getSimpleName() instead of this</technical_language>

Target:
public List<Credential> fromRequest(final HttpServletRequest request, final MultiValueMap<String, String> requestBody) { if (requestBody == null || requestBody.isEmpty()) { LOGGER.debug("Skipping because the requestBody is null or empty", getClass().getSimpleName()); return new ArrayList<>(0); } final String otp = requestBody.getFirst(PARAMETER_NAME_YUBIKEY_OTP); LOGGER.debug("YubiKey token in the request body: [{}]", otp); if (StringUtils.isBlank(otp)) { return new ArrayList<>(0); } return CollectionUtils.wrap(new YubiKeyCredential(otp)); }
Source:
<code>private float getCurrentOverallProgress() { int totalItemCount = sNotificationData.totalPostItems + sNotificationData.totalMediaItems; float currentMediaProgress = getCurrentMediaProgress(); <START> float overAllProgress = 0; <END> overAllProgress = sNotificationData.totalPostItems > 0 ? (sNotificationData.currentPostItem/sNotificationData.totalPostItems) * totalItemCount : 0; overAllProgress += sNotificationData.totalMediaItems > 0 ? (sNotificationData.currentMediaItem/sNotificationData.totalMediaItems) * totalItemCount : 0; overAllProgress += currentMediaProgress; return overAllProgress; }</code><technical_language>need set this zero assigned in next line</technical_language>

Target:
private float getCurrentOverallProgress() { int totalItemCount = sNotificationData.totalPostItems + sNotificationData.totalMediaItems; float currentMediaProgress = getCurrentMediaProgress(); float overAllProgress; overAllProgress = sNotificationData.totalPostItems > 0 ? (sNotificationData.currentPostItem/sNotificationData.totalPostItems) * totalItemCount : 0; overAllProgress += sNotificationData.totalMediaItems > 0 ? (sNotificationData.currentMediaItem/sNotificationData.totalMediaItems) * totalItemCount : 0; overAllProgress += currentMediaProgress; return overAllProgress; }
Source:
<code>public void setDate(Date date) throws DeviceNotAvailableException { if (date == null) { date = new Date(); } long timeOffset = getDeviceTimeOffset(date); if (Math.abs(timeOffset) <= MAX_HOST_DEVICE_TIME_OFFSET) { return; } String dateString = null; if (getApiLevel() < 23) { dateString = Long.toString(date.getTime() / 1000); } else { SimpleDateFormat sdf = new java.text.SimpleDateFormat( "MMddHHmmyyyy.ss"); sdf.setTimeZone(java.util.TimeZone.getTimeZone("UTC")); dateString = sdf.format(date); } <START> executeShellCommand("TZ= date <END> -u " + dateString); }</code><technical_language>want explicit TZ=UTC</technical_language>

Target:
public void setDate(Date date) throws DeviceNotAvailableException { if (date == null) { date = new Date(); } long timeOffset = getDeviceTimeOffset(date); if (Math.abs(timeOffset) <= MAX_HOST_DEVICE_TIME_OFFSET) { return; } String dateString = null; if (getApiLevel() < 23) { dateString = Long.toString(date.getTime() / 1000); } else { SimpleDateFormat sdf = new java.text.SimpleDateFormat( "MMddHHmmyyyy.ss"); sdf.setTimeZone(java.util.TimeZone.getTimeZone("UTC")); dateString = sdf.format(date); } executeShellCommand("TZ=UTC date -u " + dateString); }
Source:
<code>private PatchLineComment update(PatchLineComment e, Input in) { if (in.side != null) { e.setSide(in.side == Side.PARENT ? (short) 0 : (short) 1); } if (in.line != null) { e.setLine(in.line); } if (in.inReplyTo != null) { e.setParentUuid(Url.decode(in.inReplyTo)); } e.setMessage(in.message.trim()); <START> e.setRange(in.range); <END> e.updated(); return e; }</code><technical_language>I behave in.line modify range if range line is provided. if (in.range != null || in.line != null) { e.setRange(in.range); } This assert line == range.end_line. If in.line is supplied in.range is set e.steLine range.end_line</technical_language>

Target:
private PatchLineComment update(PatchLineComment e, Input in) { if (in.side != null) { e.setSide(in.side == Side.PARENT ? (short) 0 : (short) 1); } if (in.inReplyTo != null) { e.setParentUuid(Url.decode(in.inReplyTo)); } e.setMessage(in.message.trim()); Integer line = in.line; CommentRange range = in.range; if (range != null || line != null) { e.setRange(range); e.setLine(line == null ? range.getEndLine() : line); } e.updated(); return e; }
Source:
<code>private void fireAddParameterEvents(ITestResult iTestResult) { Object[] parameters = iTestResult.getParameters(); ITestNGMethod method = iTestResult.getMethod(); Method nativeMethod = method.getConstructorOrMethod().getMethod(); boolean atLeastJava8 = isAtLeastJava8(); List<String> parameterNames = null; if (atLeastJava8) { parameterNames = getParameterNames(nativeMethod); } for (int i = 0; i < parameters.length; i++) { String name = "arg" + i; if (atLeastJava8 && !parameterNames.isEmpty()) { <START> name = parameterNames.get(i); <END> } String value = parameters[i].toString(); getLifecycle().fire(new AddParameterEvent(name, value, ParameterKind.ARGUMENT)); } }</code><technical_language>potential IndexOutOfBoundsException</technical_language>

Target:
private void fireAddParameterEvents(ITestResult iTestResult) { Object[] parameters = iTestResult.getParameters(); Method nativeMethod = iTestResult.getMethod().getConstructorOrMethod().getMethod(); Annotation[][] parametersAnnotations = nativeMethod.getParameterAnnotations(); List<String> methodParameterNames = getMethodParameterNamesIfAvailable(nativeMethod); for (int i = 0; i < parameters.length; i++) { Parameter parameter = getParameterAnnotation(parametersAnnotations[i]); if (parameter == null) { return; } String name = getNameForParameter(parameter.value(), methodParameterNames, i); String value = parameters[i].toString(); getLifecycle().fire(new AddParameterEvent(name, value, ParameterKind.ARGUMENT)); } }
Source:
<code>public abstract void trimUnreferencedTranslogFiles() throws EngineException; public abstract boolean shouldRollTranslogGeneration(); public abstract void rollTranslogGeneration() throws EngineException; <START> public void forceMerge(boolean flush) throws IOException { <END> forceMerge(flush, 1, false, false, false); }</code><technical_language>this is in tests, prefer calling method instead</technical_language>

Target:
public abstract void trimUnreferencedTranslogFiles() throws EngineException; public abstract boolean shouldRollTranslogGeneration(); public abstract void rollTranslogGeneration() throws EngineException; public abstract void forceMerge(boolean flush, int maxNumSegments, boolean onlyExpungeDeletes, boolean upgrade, boolean upgradeOnlyAncientSegments) throws EngineException, IOException; public abstract IndexCommitRef acquireLastIndexCommit(boolean flushFirst) throws EngineException; public abstract IndexCommitRef acquireSafeIndexCommit() throws EngineException; @SuppressWarnings("finally") private void maybeDie(final String maybeMessage, final Throwable maybeFatal) { ExceptionsHelper.maybeError(maybeFatal, logger).ifPresent(error -> { try { logger.error(maybeMessage, error); } finally { throw error; } }); }
Source:
<code><START> public HashSet<V> toSet() { <END> return new HashSet<>(values); }</code><technical_language>this return Set :)</technical_language>

Target:
public Set<V> toSet() { return new HashSet<>(values); }
Source:
<code>private WebTarget addQueryParams(Map<String, String> params, WebTarget originalWebTarget) { if (params.isEmpty()) { return originalWebTarget; <START> } <END> WebTarget webTargetWithQueryParams = originalWebTarget; for (Map.Entry<String, String> entry: params.entrySet()) { webTargetWithQueryParams = webTargetWithQueryParams.queryParam(entry.getKey(), entry.getValue()); } return webTargetWithQueryParams; }</code><technical_language>I this optimisation is worth</technical_language>

Target:
private WebTarget addQueryParams(Map<String, String> params, WebTarget originalWebTarget) { WebTarget webTargetWithQueryParams = originalWebTarget; for (Map.Entry<String, String> entry : params.entrySet()) { webTargetWithQueryParams = webTargetWithQueryParams.queryParam(entry.getKey(), entry.getValue()); } return webTargetWithQueryParams; }
Source:
<code>public String toString() { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); pw.print("HashSettings:"); for(Map.Entry<String, String> e : settings.entrySet()) <START> pw.print(e.getKey()+"="+e.getValue()+";"); <END> pw.close(); return sw.toString(); }</code><technical_language>Add brackets loop body (required code conventions)</technical_language>

Target:
public String toString() { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); pw.print("HashSettings:"); for(Map.Entry<String, String> e : settings.entrySet()) { pw.print(e.getKey()+"="+e.getValue()+";"); } pw.close(); return sw.toString(); }
Source:
<code>private void processCommands(final Collection<ReceiveCommand> commands) { parseCommands(commands); if (newChange != null && newChange.getResult() == ReceiveCommand.Result.NOT_ATTEMPTED) { createNewChanges(); } doReplaces(); for (final ReceiveCommand c : commands) { if (c.getResult() == Result.OK) { switch (c.getType()) { case CREATE: if (isHead(c)) { autoCloseChanges(c); } break; case UPDATE: tagCache.updateFastForward(project.getNameKey(), c.getRefName(), c.getOldId(), c.getNewId()); if (isHead(c)) { autoCloseChanges(c); } break; case UPDATE_NONFASTFORWARD: if (isHead(c)) { autoCloseChanges(c); } break; } if (isConfig(c)) { projectCache.evict(project); ProjectState ps = projectCache.get(project.getNameKey()); repoManager.setProjectDescription(project.getNameKey(), ps.getProject().getDescription()); } if (!MagicBranch.isMagicBranch(c.getRefName())) { replication.scheduleUpdate(project.getNameKey(), c.getRefName()); Branch.NameKey destBranch = new Branch.NameKey(project.getNameKey(), c.getRefName()); hooks.doRefUpdatedHook(destBranch, c.getOldId(), c.getNewId(), currentUser.getAccount()); } } } if (!allNewChanges.isEmpty() && canonicalWebUrl != null) { final String url = canonicalWebUrl; addMessage(""); addMessage("New Changes:"); for (final Change c : allNewChanges) { if (c.getStatus() == Change.Status.DRAFT) { addMessage(" " + url + c.getChangeId() + " [DRAFT]"); } else { addMessage(" " + url + c.getChangeId()); } } addMessage(""); } <START> sendMessages(); <END> }</code><technical_language>sure, sense this in a finally block ensure messages if exception occurs</technical_language>

Target:
void processCommands(final Collection<ReceiveCommand> commands) { try { parseCommands(commands); if (newChange != null && newChange.getResult() == ReceiveCommand.Result.NOT_ATTEMPTED) { createNewChanges(); } doReplaces(); for (final ReceiveCommand c : commands) { if (c.getResult() == Result.OK) { switch (c.getType()) { case CREATE: if (isHead(c)) { autoCloseChanges(c); } break; case UPDATE: tagCache.updateFastForward(project.getNameKey(), c.getRefName(), c.getOldId(), c.getNewId()); if (isHead(c)) { autoCloseChanges(c); } break; case UPDATE_NONFASTFORWARD: if (isHead(c)) { autoCloseChanges(c); } break; } if (isConfig(c)) { projectCache.evict(project); ProjectState ps = projectCache.get(project.getNameKey()); repoManager.setProjectDescription(project.getNameKey(), ps.getProject().getDescription()); } if (!MagicBranch.isMagicBranch(c.getRefName())) { replication.scheduleUpdate(project.getNameKey(), c.getRefName()); Branch.NameKey destBranch = new Branch.NameKey(project.getNameKey(), c.getRefName()); hooks.doRefUpdatedHook(destBranch, c.getOldId(), c.getNewId(), currentUser.getAccount()); } } } if (!allNewChanges.isEmpty() && canonicalWebUrl != null) { final String url = canonicalWebUrl; addMessage(""); addMessage("New Changes:"); for (final Change c : allNewChanges) { if (c.getStatus() == Change.Status.DRAFT) { addMessage(" " + url + c.getChangeId() + " [DRAFT]"); } else { addMessage(" " + url + c.getChangeId()); } } addMessage(""); } } finally { sendMessages(); } }
Source:
<code><START> public void updateState(CacheEntryEvent<StrongCounterKey, CounterValue> event) { <END> CounterValue snapshot = event.getValue(); CounterValue old = updateCounterState(snapshot); notificationManager.notify(CounterEventImpl.create(old, snapshot)); }</code><technical_language>I a right a compulsory weak strong counters, listeners bring some overhead. user wants a strong counter, give that. wants eventually updated counter, weak one</technical_language>

Target:
public synchronized void updateState(CacheEntryEvent<StrongCounterKey, CounterValue> event) { CounterValue snapshot = event.getValue(); notificationManager.notify(CounterEventImpl.create(weakCounter, snapshot)); weakCounter = snapshot; }
Source:
<code>public void onTroubleSigningIn(String email) { TroubleSigningInFragment troubleSigningInFragment = TroubleSigningInFragment.newInstance (email); <START> getSupportFragmentManager().beginTransaction().replace(R.id.fragment_register_email, <END> troubleSigningInFragment, TroubleSigningInFragment.TAG).disallowAddToBackStack() .commit(); }</code><technical_language>fault I repeated first, this pattern occurs a lot add a helper method: java private void switchFragment(Fragment fragment, String tag) { getSupportFragmentManager().beginTransaction() .replace(R.id.fragment_register_email, fragment, tag) .disallowAddToBackStack() .commit(); }</technical_language>

Target:
public void onTroubleSigningIn(String email) { TroubleSigningInFragment troubleSigningInFragment = TroubleSigningInFragment.newInstance (email); switchFragment(troubleSigningInFragment, TroubleSigningInFragment.TAG, true); }
Source:
<code>protected boolean canDoAction() { if (!super.canDoAction()) { return false; } <START> GlusterVolumeEntity volume = getGlusterVolumeDao().getById(getGlusterVolumeId()); <END> if (volume != null && volume.getStatus() == GlusterStatus.DOWN) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_DOWN); } if (!GlusterUtil.getInstance().isVolumeThinlyProvisioned(volume)) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_NOT_THINLY_PROVISIONED); } return true; }</code><technical_language>getGlusterVolume() base class volume id set in constructor</technical_language>

Target:
protected boolean canDoAction() { if (!super.canDoAction()) { return false; } GlusterVolumeEntity volume = getGlusterVolume(); if (volume != null && volume.getStatus() == GlusterStatus.DOWN) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_DOWN); } if (!GlusterUtil.getInstance().isVolumeThinlyProvisioned(volume)) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_NOT_THINLY_PROVISIONED); } return true; }
Source:
<code><START> public static QuotaDAO getQuotaDAO() { <END> return DbFacade.getInstance() .getQuotaDao(); }</code><technical_language>package protected work here? is a commonly accepted practice writing unit tests</technical_language>

Target:
public QuotaDAO getQuotaDAO() { return DbFacade.getInstance() .getQuotaDao(); }
Source:
<code>public void compactAll(long compactionId, UserCompactionConfig compactionConfig) { boolean updateMetadata = false; synchronized (this) { if (lastCompactID >= compactionId) return; if (isMinorCompactionRunning()) { if (compactionWaitInfo.compactionID == compactionId) { if (lastFlushID == compactionWaitInfo.flushID) return; } else { compactionWaitInfo.compactionID = compactionId; compactionWaitInfo.flushID = lastFlushID; return; } } if (isClosing() || isClosed() || majorCompactionQueued.contains(MajorCompactionReason.USER) || isMajorCompactionRunning()) return; CompactionStrategyConfig strategyConfig = compactionConfig.getCompactionStrategy(); CompactionStrategy strategy = createCompactionStrategy(strategyConfig); MajorCompactionRequest request = new MajorCompactionRequest(extent, MajorCompactionReason.USER, tableConfiguration, context); request.setFiles(getDatafileManager().getDatafileSizes()); try { if (strategy.shouldCompact(request)) { initiateMajorCompaction(MajorCompactionReason.USER); } else { majorCompactionState = CompactionState.IN_PROGRESS; updateMetadata = true; lastCompactID = compactionId; } } catch (IOException e) { <START> throw new RuntimeException("IOException on " + extent + " during compact all", e); <END> } } if (updateMetadata) { try { MetadataTableUtil.updateTabletCompactID(extent, compactionId, getTabletServer().getContext(), getTabletServer().getLock()); } finally { synchronized (this) { majorCompactionState = null; this.notifyAll(); } } } }</code><technical_language>UncheckedIOException is here</technical_language>

Target:
public void compactAll(long compactionId, UserCompactionConfig compactionConfig) { boolean updateMetadata = false; synchronized (this) { if (lastCompactID >= compactionId) return; if (isMinorCompactionRunning()) { if (compactionWaitInfo.compactionID == compactionId) { if (lastFlushID == compactionWaitInfo.flushID) return; } else { compactionWaitInfo.compactionID = compactionId; compactionWaitInfo.flushID = lastFlushID; return; } } if (isClosing() || isClosed() || majorCompactionQueued.contains(MajorCompactionReason.USER) || isMajorCompactionRunning()) return; CompactionStrategyConfig strategyConfig = compactionConfig.getCompactionStrategy(); CompactionStrategy strategy = createCompactionStrategy(strategyConfig); MajorCompactionRequest request = new MajorCompactionRequest(extent, MajorCompactionReason.USER, tableConfiguration, context); request.setFiles(getDatafileManager().getDatafileSizes()); try { if (strategy.shouldCompact(request)) { initiateMajorCompaction(MajorCompactionReason.USER); } else { majorCompactionState = CompactionState.IN_PROGRESS; updateMetadata = true; lastCompactID = compactionId; } } catch (IOException e) { throw new UncheckedIOException("IOException on " + extent + " during compact all", e); } } if (updateMetadata) { try { MetadataTableUtil.updateTabletCompactID(extent, compactionId, getTabletServer().getContext(), getTabletServer().getLock()); } finally { synchronized (this) { majorCompactionState = null; this.notifyAll(); } } } }
Source:
<code>protected Hardware resolveHardware(Set<? extends Hardware> hardwarel, final Iterable<? extends Image> images) { try { return super.resolveHardware(hardwarel, images); } catch (NoSuchElementException ex) { if (minCores <= 0 || minRam == 0 || minDisk < 0) { <START> throw new IllegalArgumentException("Please, set minCores, minRam and minDisk to positive values."); <END> } return automaticHardware(minCores, minRam, minDisk == 0 ? Optional.<Float>absent() : Optional.of((float)minDisk)); } }</code><technical_language>part of original message too: "No hardware profile matching criteria found. If want exact values, please set minCores, minRam minDisk positive values"</technical_language>

Target:
protected Hardware resolveHardware(Set<? extends Hardware> hardwarel, final Iterable<? extends Image> images) { try { return super.resolveHardware(hardwarel, images); } catch (NoSuchElementException ex) { if (minCores <= 0 || minRam == 0 || minDisk < 0) { throw new IllegalArgumentException("No hardware profile matching the given criteria was found. If you" + " want to use exact values, please set the minCores, minRam and minDisk to positive values."); } return automaticHardware(minCores, minRam, minDisk == 0 ? Optional.<Float>absent() : Optional.of((float)minDisk)); } }
Source:
<code>public void setUp() throws Exception { setFixture(ModelelementsFactory.eINSTANCE.createElementGroup()); model = SysMLTestResources.createSysMLModel(houseKeeper.createResourceSet()); if(model == null) { <START> fail(); <END> } if(model.getAppliedProfiles().isEmpty()) { fail(); } defaultComment= model.createOwnedComment(); default_elementgroup = (ElementGroup)StereotypeApplicationHelper.getInstance(null).applyStereotype(defaultComment, ModelelementsPackage.eINSTANCE.getElementGroup()); defaultComment.setBody(criterion); class1 = model.createOwnedClass("Class1", false); class2 = model.createOwnedClass("Class2", false); defaultComment.getAnnotatedElements().add(class1); defaultComment.getAnnotatedElements().add(class2); }</code><technical_language>add text</technical_language>

Target:
public void setUp() throws Exception { setFixture(ModelelementsFactory.eINSTANCE.createElementGroup()); model = SysMLTestResources.createSysMLModel(houseKeeper.createResourceSet()); if(model == null) { fail("The model is not created."); } if(model.getAppliedProfiles().isEmpty()) { fail(" the Sysml profil has not be applied."); } defaultComment= model.createOwnedComment(); default_elementgroup = (ElementGroup)StereotypeApplicationHelper.getInstance(null).applyStereotype(defaultComment, ModelelementsPackage.eINSTANCE.getElementGroup()); defaultComment.setBody(criterion); class1 = model.createOwnedClass("Class1", false); class2 = model.createOwnedClass("Class2", false); defaultComment.getAnnotatedElements().add(class1); defaultComment.getAnnotatedElements().add(class2); }
Source:
<code>public Set<K> keySet(Predicate predicate) { checkNotNull(predicate, "Predicate cannot be null!"); Set<K> resultingSet = new HashSet<K>(); Set<QueryableEntry> query = indexes.query(predicate); if (query != null) { for (QueryableEntry entry : query) { <START> K key = (K) serializationService.toObject(entry.getKeyData()); <END> resultingSet.add(key); } } else { doFullKeyScan(predicate, resultingSet); } return resultingSet; }</code><technical_language>Minor: is a shortcut toObject() method for deserialization in this class in DefaultQueryCache. consistent places</technical_language>

Target:
public Set<K> keySet(Predicate predicate) { checkNotNull(predicate, "Predicate cannot be null!"); Set<K> resultingSet = new HashSet<K>(); Set<QueryableEntry> query = indexes.query(predicate); if (query != null) { for (QueryableEntry entry : query) { K key = toObject(entry.getKeyData()); resultingSet.add(key); } } else { doFullKeyScan(predicate, resultingSet); } return resultingSet; }
Source:
<code>public void unselect() { <START> fieldElement.removeClassName(ConstantHolder.SELECTED); <END> checkElement.getStyle().setDisplay(Style.Display.NONE); }</code><technical_language>@yesamer Please *showCheck* method - paths for behavior</technical_language>

Target:
public void unselect() { fieldElement.removeClassName(ConstantHolder.SELECTED); showCheck(false); }
Source:
<code>public void invalidateVisualState() { <START> if (this.value.getText().startsWith("?")) { <END> this.getNextValue(5); } super.invalidateVisualState(); }</code><technical_language>I this check - a boolean something</technical_language>

Target:
public void invalidateVisualState() { if (this.hasValue != this.output.hasConnection()) { this.getNextValue(5); } super.invalidateVisualState(); }
Source:
<code>synchronized void setForumSelection(final String forumSelection) { this.forumSelection = Optional.ofNullable(forumSelection) .filter(Predicates.not(String::isBlank)) .orElse(getForumSelectionOptions().iterator().next()); Postconditions.assertState( this.forumSelection != null && !this.forumSelection.isBlank(), "Forum selection is driven by a drop-down to ensure user can never set it to null, " + "if setting to null from a game properties, we default to the first available " + "selection entry, forum selection should never be null or empty."); forumUsername = this.forumSelection.equals(NodeBbForumPoster.TRIPLEA_FORUM_DISPLAY_NAME) ? ClientSetting.tripleaForumUsername.getValue().map(String::valueOf).orElse("") : ClientSetting.aaForumUsername.getValue().map(String::valueOf).orElse(""); forumPassword = this.forumSelection.equals(NodeBbForumPoster.TRIPLEA_FORUM_DISPLAY_NAME) <START> ? ClientSetting.tripleaForumPassword.getValue().orElse(new char[] {}) : ClientSetting.aaForumPassword.getValue().orElse(new char[] {}); <END> readyCallback.run(); }</code><technical_language>suggestion ? ClientSetting.tripleaForumPassword.getValue().orElse(new char[0]) : ClientSetting.aaForumPassword.getValue().orElse(new char[0]);</technical_language>

Target:
synchronized void setForumSelection(final String forumSelection) { this.forumSelection = Optional.ofNullable(forumSelection) .filter(Predicate.not(String::isBlank)) .orElse(getForumSelectionOptions().iterator().next()); Postconditions.assertState( this.forumSelection != null && !this.forumSelection.isBlank(), "Forum selection is driven by a drop-down to ensure user can never set it to null, " + "if setting to null from a game properties, we default to the first available " + "selection entry, forum selection should never be null or empty."); forumUsername = this.forumSelection.equals(NodeBbForumPoster.TRIPLEA_FORUM_DISPLAY_NAME) ? ClientSetting.tripleaForumUsername.getValue().map(String::valueOf).orElse("") : ClientSetting.aaForumUsername.getValue().map(String::valueOf).orElse(""); forumPassword = this.forumSelection.equals(NodeBbForumPoster.TRIPLEA_FORUM_DISPLAY_NAME) ? ClientSetting.tripleaForumPassword.getValue().orElse(new char[0]) : ClientSetting.aaForumPassword.getValue().orElse(new char[0]); readyCallback.run(); }
Source:
<code>public void testVmOvfCreation() throws Exception{ VM vm = createVM(); String xml = manager.ExportVm(vm, new ArrayList<DiskImage>()); assertNotNull(xml); final VM newVm = new VM(); manager.ImportVm(xml, newVm, new ArrayList<DiskImage>(), new ArrayList<VmNetworkInterface>()); assertEquals(vm, newVm); <START> assertEquals(newVm.getDbGeneration(), vm.getDbGeneration()); <END> }</code><technical_language>this part of VM's equals()</technical_language>

Target:
public void testVmOvfCreation() throws Exception { VM vm = createVM(); String xml = manager.ExportVm(vm, new ArrayList<DiskImage>()); assertNotNull(xml); final VM newVm = new VM(); manager.ImportVm(xml, newVm, new ArrayList<DiskImage>(), new ArrayList<VmNetworkInterface>()); assertEquals("imported vm is different than expected", vm, newVm); assertEquals("imported db generation is different than expected",newVm.getDbGeneration(), vm.getDbGeneration()); }
Source:
<code>public Object evaluate(DeferredObject[] arguments) throws HiveException{ String uriHost = PrimitiveObjectInspectorUtils.getString( arguments[0].get(), (PrimitiveObjectInspector) argumentsOI[0]); String uriPath = PrimitiveObjectInspectorUtils.getString( arguments[1].get(), (PrimitiveObjectInspector) argumentsOI[1]); String uriQuery = PrimitiveObjectInspectorUtils.getString( arguments[2].get(), (PrimitiveObjectInspector) argumentsOI[2]); ; String httpStatus = PrimitiveObjectInspectorUtils.getString( arguments[3].get(), (PrimitiveObjectInspector) argumentsOI[3]); String contentType = PrimitiveObjectInspectorUtils.getString( arguments[4].get(), (PrimitiveObjectInspector) argumentsOI[4]); String userAgent = PrimitiveObjectInspectorUtils.getString( arguments[5].get(), (PrimitiveObjectInspector) argumentsOI[5]); String rawXAnalyticsHeader = ""; if (checkForXAnalytics) { rawXAnalyticsHeader = PrimitiveObjectInspectorUtils.getString( arguments[6].get(), (PrimitiveObjectInspector) argumentsOI[6]); } if (Constants.REDIRECT_HTTP_CODES.contains(httpStatus) && <START> (Constants.PAGEVIEW_WORTHY_CONTENT_TYPES.contains(contentType) || contentType.trim().equals("-")) ){ WebrequestData webrequestData = new WebrequestData(uriHost, uriPath, uriQuery, "200", "text/html", userAgent, rawXAnalyticsHeader); return PageviewDefinition.getInstance().isPageview(webrequestData); <END> } else { return false; } }</code><technical_language>things: - this work as-is a redirect is a pageview. pageview filtering needs a subset of it, http-code check content-types check. - built a core function for udf have, meaning data-logic is in UDF, is a wrapper for hive related stuff. continue this in order data-logic functions reusable accross java systems</technical_language>

Target:
public Object evaluate(DeferredObject[] arguments) throws HiveException{ String uriHost = PrimitiveObjectInspectorUtils.getString( arguments[0].get(), (PrimitiveObjectInspector) argumentsOI[0]); String uriPath = PrimitiveObjectInspectorUtils.getString( arguments[1].get(), (PrimitiveObjectInspector) argumentsOI[1]); String uriQuery = PrimitiveObjectInspectorUtils.getString( arguments[2].get(), (PrimitiveObjectInspector) argumentsOI[2]); ; String httpStatus = PrimitiveObjectInspectorUtils.getString( arguments[3].get(), (PrimitiveObjectInspector) argumentsOI[3]); String contentType = PrimitiveObjectInspectorUtils.getString( arguments[4].get(), (PrimitiveObjectInspector) argumentsOI[4]); String userAgent = PrimitiveObjectInspectorUtils.getString( arguments[5].get(), (PrimitiveObjectInspector) argumentsOI[5]); String rawXAnalyticsHeader = ""; if (checkForXAnalytics) { rawXAnalyticsHeader = PrimitiveObjectInspectorUtils.getString( arguments[6].get(), (PrimitiveObjectInspector) argumentsOI[6]); } WebrequestData webrequestData = new WebrequestData(uriHost, uriPath, uriQuery, httpStatus, contentType, userAgent, rawXAnalyticsHeader); return RedirectToPageview.getInstance().isRedirectToPageview(webrequestData); }
Source:
<code>public static JobHistoryFileParser createJobHistoryFileParser( byte[] historyFileContents) throws IllegalArgumentException { if (historyFileContents == null) { throw new IllegalArgumentException( <START> "Job history input stream should not be null"); <END> } int version = getVersion(historyFileContents); switch (version) { case 1: return new JobHistoryFileParserHadoop1(); case 2: return new JobHistoryFileParserHadoop2(); default: throw new IllegalArgumentException( " Unknown format of job history file "); } }</code><technical_language>Fix text (no longer InputStream). "Job history contents null"</technical_language>

Target:
public static JobHistoryFileParser createJobHistoryFileParser( byte[] historyFileContents) throws IllegalArgumentException { if (historyFileContents == null) { throw new IllegalArgumentException( "Job history contents should not be null"); } int version = getVersion(historyFileContents); switch (version) { case 1: return new JobHistoryFileParserHadoop1(); case 2: return new JobHistoryFileParserHadoop2(); default: throw new IllegalArgumentException( " Unknown format of job history file "); } }
Source:
<code><START> Map<String, Long> getExternalResources(Resource resource) throws Exception { <END> if (!isYarnResourceTypesAvailable) { throw new UnsupportedOperationException("Should not try to get ResourceInformation because the underlying Yarn does not support it."); } final Map<String, Long> externalResources = new HashMap<>(); final Object[] externalResourcesInfo = (Object[]) getResourceValueMethod.invoke(resource); for (int i = 2; i < externalResourcesInfo.length; i++) { final String name = (String) getInfoNameMethod.invoke(externalResourcesInfo[i]); final long value = (long) getInfoValueMethod.invoke(externalResourcesInfo[i]); externalResources.put(name, value); } return externalResources; }</code><technical_language>here. try handle exceptions this class</technical_language>

Target:
Map<String, Long> getExternalResources(Resource resource) { return getExternalResourcesUnSafe(resource); }
Source:
<code>public Integer add(Stream<E> entities) { return delegate().add(entities.filter(entity -> { <START> boolean permitted = isOperationPermitted(entity, Action.CREATE); <END> if (permitted) { createAcl(entity); } return permitted; })); }</code><technical_language>this throw exception instead</technical_language>

Target:
public Integer add(Stream<E> entities) { return delegate().add(entities.filter(entity -> { isOperationPermitted(entity, Action.CREATE); createAcl(entity); return true; })); }
Source:
<code>@Test public void testPushAggregateThroughtOuterJoin9() { final HepProgram preProgram = new HepProgramBuilder() .addRuleInstance(AggregateProjectMergeRule.INSTANCE) .build(); final HepProgram program = new HepProgramBuilder() .addRuleInstance(AggregateJoinTransposeRule.EXTENDED) .build(); final String sql = "select e.job, d.name\n" + "from (select * from sales.emp where empno = 10) as e\n" <START> + "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, d.name"; checkPlanning(tester, preProgram, new HepPlanner(program), sql); }</code><technical_language>This outer</technical_language>

Target:
@Test public void testPushAggregateThroughtOuterJoin9() { final HepProgram preProgram = new HepProgramBuilder() .addRuleInstance(AggregateProjectMergeRule.INSTANCE) .build(); final HepProgram program = new HepProgramBuilder() .addRuleInstance(AggregateJoinTransposeRule.EXTENDED) .build(); final String sql = "select e.job, d.name\n" + "from (select * from sales.emp where empno = 10) as e\n" + "left 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, d.name"; checkPlanning(tester, preProgram, new HepPlanner(program), sql); }