auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private static boolean testValue(Type type, Object value, TupleDomainFilter filter) { if (value == null) { return filter.testNull(); } if (filter == IS_NULL) { return false; } if (filter == IS_NOT_NULL) { return true; } if (type == BOOLEAN) { return filter.testBoolean((Boolean) value); } if (type == TINYINT || type == BIGINT || type == INTEGER || type == SMALLINT) { return filter.testLong(((Number) value).longValue()); } if (type == REAL) { return filter.testFloat(((Number) value).floatValue()); } if (type == DOUBLE) { return filter.testDouble((double) value); } if (type == DATE) { return filter.testLong(((SqlDate) value).getDays()); } if (type == TIMESTAMP) { return filter.testLong(((SqlTimestamp) value).getMillisUtc()); } if (type instanceof DecimalType) { DecimalType decimalType = (DecimalType) type; SqlDecimal decimal = (SqlDecimal) value; if (decimalType.isShort()) { return filter.testLong(decimal.toBigDecimal().unscaledValue().longValue()); } else { <START> Slice s = Decimals.encodeScaledValue(decimal.toBigDecimal()); <END> return filter.testDecimal(s.getLong(0), s.getLong(Long.BYTES)); } } fail("Unsupported type: " + type); return false; }</code><technical_language>do abbreviate: Slice encodedDecimal = Decimals.encodeScaledValue(bigDecimal);</technical_language>

Target:
private static boolean testValue(Type type, Object value, TupleDomainFilter filter) { if (value == null) { return filter.testNull(); } if (filter == IS_NULL) { return false; } if (filter == IS_NOT_NULL) { return true; } if (type == BOOLEAN) { return filter.testBoolean((Boolean) value); } if (type == TINYINT || type == BIGINT || type == INTEGER || type == SMALLINT) { return filter.testLong(((Number) value).longValue()); } if (type == REAL) { return filter.testFloat(((Number) value).floatValue()); } if (type == DOUBLE) { return filter.testDouble((double) value); } if (type == DATE) { return filter.testLong(((SqlDate) value).getDays()); } if (type == TIMESTAMP) { return filter.testLong(((SqlTimestamp) value).getMillisUtc()); } if (type instanceof DecimalType) { DecimalType decimalType = (DecimalType) type; BigDecimal bigDecimal = ((SqlDecimal) value).toBigDecimal(); if (decimalType.isShort()) { return filter.testLong(bigDecimal.unscaledValue().longValue()); } else { Slice encodedDecimal = Decimals.encodeScaledValue(bigDecimal); return filter.testDecimal(encodedDecimal.getLong(0), encodedDecimal.getLong(Long.BYTES)); } } fail("Unsupported type: " + type); return false; }
Source:
<code><START> public String getInternalLinkRedirectTitleWithIndex(int index) { <END> wait.forElementVisible(internalLink.get(index)); scrollToElement(internalLink.get(index)); return internalLink.get(index).getAttribute("href"); }</code><technical_language>code in this method thing, link element. considered extracting call: getLinkRedirectTitle(externalLinks.get(index)) getLinkRedirectTitle(internalLinks.get(index))</technical_language>

Target:
public String getInternalLinkRedirectTitleWithIndex(int index) { return getLinkRedirectTitle(internalLinks.get(index)); }
Source:
<code>private void initialize() throws Exception { for (DcZkInfo dcZkInfo : dcToDcZkInfo.values()) { <START> logger.info("Initializing cluster information from {}", dcZkInfo.zkConnectStr); <END> HelixAdmin admin = dcZkInfo.helixManager.getClusterManagmentTool(); for (String instanceName : admin.getInstancesInCluster(clusterName)) { logger.info("Adding node and its disks and replicas", instanceName); InstanceConfig instanceConfig = admin.getInstanceConfig(clusterName, instanceName); AmbryDataNode datanode = new AmbryDataNode(dcZkInfo.dcName, clusterMapConfig, instanceConfig.getHostName(), Integer.valueOf(instanceConfig.getPort()), getRackId(instanceConfig), getSslPortStr(instanceConfig)); initializeDisksAndReplicasOnNode(datanode, instanceConfig); instanceNameToAmbryDataNode.put(instanceName, datanode); dcZkInfo.clusterChangeListener.allInstances.add(instanceName); } } for (Set<AmbryDisk> disks : ambryDataNodeToAmbryDisks.values()) { for (AmbryDisk disk : disks) { clusterWideRawCapacityBytes += disk.getRawCapacityInBytes(); } } for (Set<AmbryReplica> partitionReplicas : ambryPartitionToAmbryReplicas.values()) { long replicaCapacity = partitionReplicas.iterator().next().getCapacityInBytes(); clusterWideAllocatedRawCapacityBytes += replicaCapacity * partitionReplicas.size(); clusterWiseAllocatedUsableCapacityBytes += replicaCapacity; } }</code><technical_language>useful print messages (just connect)</technical_language>

Target:
private void initialize() throws Exception { for (DcZkInfo dcZkInfo : dcToDcZkInfo.values()) { logger.info("Initializing cluster information from {}", dcZkInfo.zkConnectStr); HelixAdmin admin = dcZkInfo.helixManager.getClusterManagmentTool(); for (String instanceName : admin.getInstancesInCluster(clusterName)) { logger.info("Adding node and its disks and replicas", instanceName); InstanceConfig instanceConfig = admin.getInstanceConfig(clusterName, instanceName); AmbryDataNode datanode = new AmbryDataNode(dcZkInfo.dcName, clusterMapConfig, instanceConfig.getHostName(), Integer.valueOf(instanceConfig.getPort()), getRackId(instanceConfig), getSslPortStr(instanceConfig)); initializeDisksAndReplicasOnNode(datanode, instanceConfig); instanceNameToAmbryDataNode.put(instanceName, datanode); dcZkInfo.clusterChangeListener.allInstances.add(instanceName); } logger.info("Initialized cluster information from {}", dcZkInfo.zkConnectStr); } for (Set<AmbryDisk> disks : ambryDataNodeToAmbryDisks.values()) { for (AmbryDisk disk : disks) { clusterWideRawCapacityBytes += disk.getRawCapacityInBytes(); } } for (Set<AmbryReplica> partitionReplicas : ambryPartitionToAmbryReplicas.values()) { long replicaCapacity = partitionReplicas.iterator().next().getCapacityInBytes(); clusterWideAllocatedRawCapacityBytes += replicaCapacity * partitionReplicas.size(); clusterWiseAllocatedUsableCapacityBytes += replicaCapacity; } }
Source:
<code>public Collection<Object> getComponentsToRegister() { <START> return Collections.<Object>singletonList(this.receiver); <END> }</code><technical_language>Redundant generic. IDEA requests remove it</technical_language>

Target:
public Collection<Object> getComponentsToRegister() { return this.componentsToRegister; }
Source:
<code>protected void revertTasks() { <START> if (getParameters().getRevertDbOperationScope() != null) { <END> Guid destImageId = getParameters().getDestinationImageId(); RemoveImageParameters removeImageParams = new RemoveImageParameters(destImageId); removeImageParams.setParentParameters(removeImageParams); removeImageParams.setParentCommand(VdcActionType.RemoveImage); removeImageParams.setStorageDomainId(getParameters().getStorageDomainId()); removeImageParams.setDbOperationScope(getParameters().getRevertDbOperationScope()); removeImageParams.setEntityId(getDestinationImageId()); VdcReturnValueBase returnValue = checkAndPerformRollbackUsingCommand(VdcActionType.RemoveImage, removeImageParams); if (returnValue.getSucceeded()) { startPollingAsyncTasks(returnValue.getInternalTaskIdList()); } } }</code><technical_language>this null</technical_language>

Target:
protected void revertTasks() { if (getParameters().getRevertDbOperationScope() != null) { Guid destImageId = getParameters().getDestinationImageId(); RemoveImageParameters removeImageParams = new RemoveImageParameters(destImageId); removeImageParams.setParentParameters(removeImageParams); removeImageParams.setParentCommand(VdcActionType.RemoveImage); removeImageParams.setStorageDomainId(getParameters().getStorageDomainId()); removeImageParams.setDbOperationScope(getParameters().getRevertDbOperationScope()); removeImageParams.setEntityId(getDestinationImageId()); removeImageParams.setShouldLockImage(getParameters().getShouldLockImageOnRevert()); VdcReturnValueBase returnValue = checkAndPerformRollbackUsingCommand(VdcActionType.RemoveImage, removeImageParams); if (returnValue.getSucceeded()) { startPollingAsyncTasks(returnValue.getInternalTaskIdList()); } } }
Source:
<code>public static boolean isSingleQxlDeviceLegal(DisplayType displayType, int osId, List<String> reasons, Version compatibilityVersion) { <START> if (!Config.<Boolean> GetValue(ConfigValues.SingleQxlPciEnabled, compatibilityVersion.getValue())) { <END> reasons.add(VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_SINGLE_DEVICE_INCOMPATIBLE_VERSION.toString()); return false; } if (displayType != DisplayType.qxl) { reasons.add(VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_SINGLE_DEVICE_DISPLAY_TYPE.toString()); return false; } if (!OsRepositoryImpl.INSTANCE.isSingleQxlDeviceEnabled(osId)) { reasons.add(VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_SINGLE_DEVICE_OS_TYPE.toString()); return false; } return true; }</code><technical_language>please FeatureSupported class</technical_language>

Target:
public static boolean isSingleQxlDeviceLegal(DisplayType displayType, int osId, List<String> reasons, Version compatibilityVersion) { if (!FeatureSupported.singleQclPci(compatibilityVersion)) { reasons.add(VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_SINGLE_DEVICE_INCOMPATIBLE_VERSION.toString()); return false; } if (displayType != DisplayType.qxl) { reasons.add(VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_SINGLE_DEVICE_DISPLAY_TYPE.toString()); return false; } if (!OsRepositoryImpl.INSTANCE.isSingleQxlDeviceEnabled(osId)) { reasons.add(VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_SINGLE_DEVICE_OS_TYPE.toString()); return false; } return true; }
Source:
<code>public void markRequestException(Error e) { <START> String errorCode = e.getErrorCode().replace(":", "-"); <END> metricsRegistry.meter(errorNamespace(metricNamespace, e, errorCode)).mark(); }</code><technical_language>replacing this _ do version? surprising a replacement character I think. want replace a other things, whitespace creep error codes. AFAIK a well-defined set of valid characters in error codes, I cautious before</technical_language>

Target:
public void markRequestException(Error e) { String errorCode = e.getErrorCode().replaceAll(REGEX, "_"); metricsRegistry.meter(errorNamespace(metricNamespace, e, errorCode)).mark(); }
Source:
<code>private static void checkPartitionStrategy( Schema schema, @Nullable PartitionStrategy strategy) { if (strategy == null) { return; } for (FieldPartitioner fp : strategy.getFieldPartitioners()) { if (fp instanceof ProvidedFieldPartitioner) { continue; } <START> ValidationException.check(schema.getType() == Schema.Type.RECORD, <END> "Cannot partition non-records: " + schema); Schema fieldSchema; try { fieldSchema = SchemaUtil.fieldSchema(schema, fp.getSourceName()); } catch (IllegalArgumentException e) { throw new ValidationException( "Cannot partition on " + fp.getSourceName(), e); } ValidationException.check( SchemaUtil.isConsistentWithExpectedType( fieldSchema.getType(), fp.getSourceType()), "Field type %s does not match partitioner %s", fieldSchema.getType(), fp); } }</code><technical_language>While this a problem, switch passing objects building string here? This serializes schema time function runs</technical_language>

Target:
private static void checkPartitionStrategy( Schema schema, @Nullable PartitionStrategy strategy) { if (strategy == null) { return; } for (FieldPartitioner fp : strategy.getFieldPartitioners()) { if (fp instanceof ProvidedFieldPartitioner) { continue; } ValidationException.check(schema.getType() == Schema.Type.RECORD, "Cannot partition non-records: %s", schema); Schema fieldSchema; try { fieldSchema = SchemaUtil.fieldSchema(schema, fp.getSourceName()); } catch (IllegalArgumentException e) { throw new ValidationException( "Cannot partition on " + fp.getSourceName(), e); } ValidationException.check( SchemaUtil.isConsistentWithExpectedType( fieldSchema.getType(), fp.getSourceType()), "Field type %s does not match partitioner %s", fieldSchema.getType(), fp); } }
Source:
<code>private List<Service> lookupAllActiveLBServices(Service targetService) { <START> Set<Service> lbServices = new HashSet<>(); <END> List<Service> lbServicesForAccount = objectManager.find(Service.class, SERVICE.ACCOUNT_ID, targetService.getAccountId(), SERVICE.REMOVED, null, SERVICE.KIND, ServiceConstants.KIND_LOAD_BALANCER_SERVICE); for (Service lbService : lbServicesForAccount) { if (sdService.isActiveService(lbService)) { LbConfig lbConfig = DataAccessor.field(lbService, ServiceConstants.FIELD_LB_CONFIG, jsonMapper, LbConfig.class); if (lbConfig != null && lbConfig.getPortRules() != null) { for (PortRule rule : lbConfig.getPortRules()) { if (!StringUtils.isEmpty(rule.getServiceId()) && Long.valueOf(rule.getServiceId()).equals(targetService.getId())) { lbServices.add(lbService); } else { if (sdService.isSelectorLinkMatch(rule.getSelector(), targetService)) { lbServices.add(lbService); } if (sdService.isSelectorLinkMatch(targetService.getSelectorLink(), lbService)) { lbServices.add(lbService); } } } } } } return new ArrayList<Service>(lbServices); }</code><technical_language>I prefer service.Id build set service itself. guarantee implements service a implemented hashCode equals method. current implementation, compares field object. is more need want. a map Map<Long, Service> rely keys unique map.values() get services end</technical_language>

Target:
private List<Service> lookupAllActiveLBServices(Service targetService) { Map<Long, Service> lbServices = new HashMap<>(); List<Service> lbServicesForAccount = objectManager.find(Service.class, SERVICE.ACCOUNT_ID, targetService.getAccountId(), SERVICE.REMOVED, null, SERVICE.KIND, ServiceConstants.KIND_LOAD_BALANCER_SERVICE); for (Service lbService : lbServicesForAccount) { if (sdService.isActiveService(lbService)) { LbConfig lbConfig = DataAccessor.field(lbService, ServiceConstants.FIELD_LB_CONFIG, jsonMapper, LbConfig.class); if (lbConfig != null && lbConfig.getPortRules() != null) { for (PortRule rule : lbConfig.getPortRules()) { if (!StringUtils.isEmpty(rule.getServiceId()) && Long.valueOf(rule.getServiceId()).equals(targetService.getId())) { lbServices.put(lbService.getId(), lbService); } else { if (sdService.isSelectorLinkMatch(rule.getSelector(), targetService)) { lbServices.put(lbService.getId(), lbService); } if (sdService.isSelectorLinkMatch(targetService.getSelectorLink(), lbService)) { lbServices.put(lbService.getId(), lbService); } } } } } } return new ArrayList<Service>(lbServices.values()); }
Source:
<code>private boolean isGptParamPresent(String key, String value) { waitForElementByElement(presentLeaderboard); String dataGptPageParams = presentLeaderboardGpt.getAttribute("data-gpt-page-params"); <START> String gptParamPattern = '"' + key + '"' + ':' + '"' + value + '"'; <END> PageObjectLogging.log( "GPT parameter search", "searching for: " + gptParamPattern + " in<br>" + dataGptPageParams, true ); return dataGptPageParams.contains(gptParamPattern); }</code><technical_language>do String.format</technical_language>

Target:
private boolean isGptParamPresent(String key, String value) { waitForElementByElement(presentLeaderboard); String dataGptPageParams = presentLeaderboardGpt.getAttribute("data-gpt-page-params"); String gptParamPattern = String.format("\"%s\":\"%s\"", key, value); PageObjectLogging.log( "GPT parameter search", "searching for: " + gptParamPattern + " in<br>" + dataGptPageParams, true ); return dataGptPageParams.contains(gptParamPattern); }
Source:
<code>public synchronized FrameInsertionResult insertPacket(@NotNull Vp8Packet packet) { int pictureId = packet.getPictureId(); VP8Frame frame = frameHistory.get(pictureId); if (frame != null) { return doFrameInsert(frame, packet); } frame = new VP8Frame(packet); <START> if (!frameHistory.insert(pictureId, frame)) <END> return null; return new FrameInsertionResult(frame, true); }</code><technical_language>braces please</technical_language>

Target:
public synchronized FrameInsertionResult insertPacket(@NotNull Vp8Packet packet) { int pictureId = packet.getPictureId(); VP8Frame frame = frameHistory.get(pictureId); if (frame != null) { return doFrameInsert(frame, packet); } frame = new VP8Frame(packet); if (!frameHistory.insert(pictureId, frame)) { return null; } return new FrameInsertionResult(frame, true); }
Source:
<code>private void invokeValidatorsOnClass(List<Throwable> errors) { Annotation[] annotations = getTestClass().getAnnotations(); for (Annotation annotation : annotations) { if (hasValidatorAnnotation(annotation.annotationType())) { AnnotationValidator annotationValidator = getAnnotationValidator(annotation.annotationType()); <START> annotationValidator.validateAnnotatedClass(getTestClass().getJavaClass(), errors); <END> } } }</code><technical_language>I create a new List<Throwable> pass validator. here, a validator remove errors. Alternatively, validation methods return a List<Throwable>. I personally prefer this option, especially if AnnotationValidator is changed a concrete class (the base class implementation return empty lists)</technical_language>

Target:
private void invokeValidatorsOnClass(List<Throwable> errors) { Annotation[] annotations = getTestClass().getAnnotations(); for (Annotation annotation : annotations) { Class<? extends Annotation> annotationType = annotation.annotationType(); ValidateWith validateWithAnnotation = annotationType.getAnnotation(ValidateWith.class); if (validateWithAnnotation != null) { AnnotationValidator annotationValidator = fAnnotationValidatorFactory.createAnnotationValidator(validateWithAnnotation); errors.addAll(annotationValidator.validateAnnotatedClass(getTestClass())); } } }
Source:
<code>@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Parameter parameter = (Parameter) o; if (!name.equals(parameter.name)) return false; <START> if (!type.equals(parameter.type)) return false; <END> if (value != null ? !value.equals(parameter.value) : parameter.value != null) return false; return true; }</code><technical_language>do here, equality defined for types. For example, String.class == String.class, String[].class _isn't_ equal parameter of Set<String[]>. similar problems for primitives (int.class != Integer.class)</technical_language>

Target:
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Parameter parameter = (Parameter) o; if (!name.equals(parameter.name)) return false; if (value != null ? !value.equals(parameter.value) : parameter.value != null) return false; return true; }
Source:
<code>void imageIncoming(ImageReaderProxy imageReader) { synchronized (mLock) { if (mClosed) { return; } ImageProxy image; do { image = null; try { image = imageReader.acquireNextImage(); } catch (IllegalStateException e) { <START> Log.e(TAG, "Failed to acquire latest image.", e); <END> } finally { if (image != null) { mPendingImages.put(image.getTimestamp(), image); matchImages(); } } } while (image != null); } }</code><technical_language>this logged time imageIncoming() is called? condition break out of do/while loop. If case, logging all</technical_language>

Target:
void imageIncoming(ImageReaderProxy imageReader) { synchronized (mLock) { if (mClosed) { return; } ImageProxy image; do { image = null; try { image = imageReader.acquireNextImage(); } catch (IllegalStateException e) { Log.e(TAG, "Failed to acquire next image.", e); } finally { if (image != null) { mPendingImages.put(image.getTimestamp(), image); matchImages(); } } } while (image != null); } }
Source:
<code>private static void printHelp() { System.out.println("Supported commands: "); <START> System.out.println("\tLIST <JOB_ID>"); <END> System.out.println("\t\tList available traces/scenarios (supersteps/vertices) for a job"); System.out.println("\tDUMP <JOB_ID> <SUPERSTEP> <VERTEX>"); System.out.println("\t\tDump a trace in textual form"); System.out.println("\tMKTEST <JOB_ID> <SUPERSTEP> <VERTEX> [OUTPUT_PREFIX]"); System.out.println("\t\tGenerate a JUnit test case code from a trace. If an OUTPUT_PREFIX is " + "provided, a .java file is generated at the specified path."); System.exit(0); }</code><technical_language>uncapitalized. is LIST => list, DUMP => dump, etc.</technical_language>

Target:
private static void printHelp() { LOG.info("Supported commands: "); LOG.info("\tlist <job_id>"); LOG.info("\t\tList available traces/scenarios (supersteps/vertices) for a job"); LOG.info("\tdump <job_id> <superstep> <vertex>"); LOG.info("\t\tDump a trace in textual form"); LOG.info("\tmktest <job_id> <superstep> <vertex> [output_prefix]"); LOG.info("\t\tGenerate a JUnit test case code from a trace. If an output_prefix is " + "provided, a .java file is generated at the specified path."); System.exit(0); }
Source:
<code>public void run() { if (!this.plugin.isEnabled()) { return; } this.time = System.currentTimeMillis(); if (config.getBoolean("Properties.Earth.RevertEarthbending")) { try { this.returnFuture = this.plugin.getServer().getScheduler().callSyncMethod(this.plugin, new getOccupiedChunks(this.plugin.getServer())); <START> final Set<HashMap<String,Integer>> chunks = this.returnFuture.get(); <END> final Map<Block, Information> earth = new HashMap<>(EarthAbility.getMovedEarth()); for (final Block block : earth.keySet()) { if (earthRevertQueue.containsKey(block)) { continue; } final Information info = earth.get(block); HashMap<String, Integer> chunkcoord = new HashMap<>(); chunkcoord.put("x", block.getX() >> 4); chunkcoord.put("z", block.getZ() >> 4); if (this.time > (info.getTime() + config.getLong("Properties.Earth.RevertCheckTime")) && !(chunks.contains(chunkcoord) && safeRevert)) { this.addToRevertQueue(block); } } final Map<Integer, Information> air = new HashMap<>(EarthAbility.getTempAirLocations()); for (final Integer i : air.keySet()) { if (airRevertQueue.containsKey(i)) { continue; } final Information info = air.get(i); final Block block = info.getBlock(); HashMap<String, Integer> chunkcoord = new HashMap<>(); chunkcoord.put("x", block.getX() >> 4); chunkcoord.put("z", block.getZ() >> 4); if (this.time > (info.getTime() + config.getLong("Properties.Earth.RevertCheckTime")) && !(chunks.contains(chunkcoord) && safeRevert)) { this.addToAirRevertQueue(i); } } } catch (final Exception e) { e.printStackTrace(); } } }</code><technical_language>Set<Map<String, Integer>> no</technical_language>

Target:
public void run() { if (!this.plugin.isEnabled()) { return; } this.time = System.currentTimeMillis(); if (config.getBoolean("Properties.Earth.RevertEarthbending")) { try { this.returnFuture = this.plugin.getServer().getScheduler().callSyncMethod(this.plugin, new getOccupiedChunks(this.plugin.getServer())); final Set<Map<String,Integer>> chunks = this.returnFuture.get(); final Map<Block, Information> earth = new HashMap<>(EarthAbility.getMovedEarth()); for (final Block block : earth.keySet()) { if (earthRevertQueue.containsKey(block)) { continue; } final Information info = earth.get(block); Map<String, Integer> chunkcoord = new HashMap<>(); chunkcoord.put("x", block.getX() >> 4); chunkcoord.put("z", block.getZ() >> 4); if (this.time > (info.getTime() + config.getLong("Properties.Earth.RevertCheckTime")) && !(chunks.contains(chunkcoord) && safeRevert)) { this.addToRevertQueue(block); } } final Map<Integer, Information> air = new HashMap<>(EarthAbility.getTempAirLocations()); for (final Integer i : air.keySet()) { if (airRevertQueue.containsKey(i)) { continue; } final Information info = air.get(i); final Block block = info.getBlock(); Map<String, Integer> chunkcoord = new HashMap<>(); chunkcoord.put("x", block.getX() >> 4); chunkcoord.put("z", block.getZ() >> 4); if (this.time > (info.getTime() + config.getLong("Properties.Earth.RevertCheckTime")) && !(chunks.contains(chunkcoord) && safeRevert)) { this.addToAirRevertQueue(i); } } } catch (final Exception e) { e.printStackTrace(); } } }
Source:
<code>public Response getPage(HttpServletRequest req, User user, String filter, boolean showArchived, int pageParam, int perPageParam) { <START> return getPage(req, user, filter, showArchived, pageParam, perPageParam, "", (OrderDirection) null); <END> }</code><technical_language>StringPool.EMPTY instead</technical_language>

Target:
public Response getPage(HttpServletRequest req, User user, String filter, boolean showArchived, int pageParam, int perPageParam) { return getPage(req, user, filter, showArchived, pageParam, perPageParam, StringUtils.EMPTY, (OrderDirection) null); }
Source:
<code>public void addSong(PlaylistEntry entry) { <START> int count = mPlaylist.countSongOccurence(entry); <END> entry.setCount(count+1); mPlaylist.add(entry); if (isLocalPlayer) { mDataManager.addToLoadQueue(entry); } new BroadcastIntent(ACTION_SONG_ADDED) .putExtra(EXTRA_SONG, entry) .send(this); new BroadcastIntent(ACTION_PLAYLIST_UPDATED).send(this); if (isLocalPlayer) { getMessagingService().sendPlaylistMessage(mPlaylist.getSongsToPlay()); } else { getMessagingService().sendAddToPlaylistMessage(entry); } }</code><technical_language>I dont set count here. I increment cound instead</technical_language>

Target:
public void addSong(PlaylistEntry entry) { mPlaylist.add(entry); if (isLocalPlayer) { mDataManager.addToLoadQueue(entry); } new BroadcastIntent(ACTION_SONG_ADDED) .putExtra(EXTRA_SONG, entry) .send(this); new BroadcastIntent(ACTION_PLAYLIST_UPDATED).send(this); if (isLocalPlayer) { getMessagingService().sendPlaylistMessage(mPlaylist.getSongsToPlay()); } else { getMessagingService().sendAddToPlaylistMessage(entry); } }
Source:
<code>public BulkMutation createBulkMutation(BigtableTableName tableName, AsyncExecutor asyncExecutor) { BulkOptions bulkOptions = options.getBulkOptions(); if (bulkOptions.isEnableBulkMutationThrottling()) { BulkMutationThrottling.throttle(resourceLimiter, bulkOptions.getBulkMutationRpcTargetMs()); <START> } <END> return new BulkMutation( tableName, asyncExecutor, options.getRetryOptions(), BigtableSessionSharedThreadPools.getInstance().getRetryExecutor(), bulkOptions.getBulkMaxRowKeyCount(), bulkOptions.getBulkMaxRequestSize(), bulkOptions.getAutoflushMs()); }</code><technical_language>I spammy here, I a good idea log throttling is enabled building a session</technical_language>

Target:
public BulkMutation createBulkMutation(BigtableTableName tableName, AsyncExecutor asyncExecutor) { BulkOptions bulkOptions = options.getBulkOptions(); if (bulkOptions.isEnableBulkMutationThrottling()) { resourceLimiter.throttle(bulkOptions.getBulkMutationRpcTargetMs()); } return new BulkMutation( tableName, asyncExecutor, options.getRetryOptions(), BigtableSessionSharedThreadPools.getInstance().getRetryExecutor(), bulkOptions.getBulkMaxRowKeyCount(), bulkOptions.getBulkMaxRequestSize(), bulkOptions.getAutoflushMs()); }
Source:
<code><START> public String getErrorMessage() { <END> return getMessages().customPropertiesValuesShouldBeInFormatReason(getKeyValueFormatMessage()); }</code><technical_language>sure- do need this method</technical_language>

Target:
public String getErrorMessage() { return getMessages().customPropertiesValuesShouldBeInFormatReason(FORMAT); }
Source:
<code>public List<String> removeSavedPlainCommands() { if (saved.isEmpty()) { return Collections.emptyList(); } synchronized (saved) { List<String> result = new ArrayList<>(saved); saved.removeAll(result); <START> if (result.isEmpty()) { <END> log.info("{} commands are removed from saved list", result.size()); } return result; } }</code><technical_language>empty</technical_language>

Target:
public List<String> removeSavedPlainCommands() { if (saved.isEmpty()) { return Collections.emptyList(); } List<String> result = new ArrayList<>(saved); saved.clear(); if (!result.isEmpty()) { log.info("{} commands are removed from saved list", result.size()); } return result; }
Source:
<code>protected FileSystemElement createElement(FileSystemElement parent, Object fileSystemObject, int depth) throws InterruptedException { ModalContext.checkCanceled(monitor); boolean isContainer = provider.isFolder(fileSystemObject); String elementLabel = parent == null ? provider.getFullPath(fileSystemObject) : provider.getLabel(fileSystemObject); MinimizedFileSystemElement result = new MinimizedFileSystemElement( elementLabel, parent, isContainer); result.setFileSystemObject(fileSystemObject); if (isContainer) { <START> if (depth > 0) { <END> List children = provider.getChildren(fileSystemObject); if (children == null) { children = new ArrayList(1); } Iterator childrenEnum = children.iterator(); while (childrenEnum.hasNext()) { createElement(result, childrenEnum.next(), depth - 1); } result.setPopulated(); } } return result; }</code><technical_language>join 2 conditions in a single expression</technical_language>

Target:
protected FileSystemElement createElement(FileSystemElement parent, Object fileSystemObject, int depth) throws InterruptedException { ModalContext.checkCanceled(monitor); boolean isContainer = provider.isFolder(fileSystemObject); String elementLabel = parent == null ? provider.getFullPath(fileSystemObject) : provider.getLabel(fileSystemObject); MinimizedFileSystemElement result = new MinimizedFileSystemElement( elementLabel, parent, isContainer); result.setFileSystemObject(fileSystemObject); if (isContainer && depth > 0) { List children = provider.getChildren(fileSystemObject); if (children != null) { Iterator childrenEnum = children.iterator(); while (childrenEnum.hasNext()) { createElement(result, childrenEnum.next(), depth - 1); } } result.setPopulated(); } return result; }
Source:
<code>public boolean close() { <START> if (fetchResultImage != null) <END> fetchResultImage.dispose(); return super.close(); }</code><technical_language>Missing braces</technical_language>

Target:
public boolean close() { if (fetchResultImage != null) { fetchResultImage.dispose(); } return super.close(); }
Source:
<code>@Test public void testTableModify() { String sql = "insert into \"employee\" select * from \"employee\""; RelNode rel = rel(sql); String expectedPhysial = "" + "JdbcToEnumerableConverter\n" + " JdbcTableModify(table=[[foodmart, employee]], operation=[INSERT], flattened=[true])\n" + " JdbcTableScan(table=[[foodmart, employee]])\n"; String expectedLogical = "" + "LogicalTableModify(table=[[foodmart, employee]], " + "operation=[INSERT], flattened=[true])\n" + " LogicalTableScan(table=[[foodmart, employee]])\n"; <START> verify(rel, expectedPhysial, expectedLogical); <END> }</code><technical_language>Inline rel(sql)</technical_language>

Target:
@Test public void testTableModify() { final String sql = "insert into \"employee\" select * from \"employee\""; final String expectedPhysial = "" + "JdbcToEnumerableConverter\n" + " JdbcTableModify(table=[[foodmart, employee]], operation=[INSERT], flattened=[true])\n" + " JdbcTableScan(table=[[foodmart, employee]])\n"; final String expectedLogical = "" + "LogicalTableModify(table=[[foodmart, employee]], " + "operation=[INSERT], flattened=[true])\n" + " LogicalTableScan(table=[[foodmart, employee]])\n"; verify(rel(sql), expectedPhysial, expectedLogical); }
Source:
<code>public long getVolumeSizeIncludingHypervisorSnapshotReserve(Volume volume, StoragePool pool) { long volumeSize = volume.getSize(); Integer hypervisorSnapshotReserve = volume.getHypervisorSnapshotReserve(); if (hypervisorSnapshotReserve != null) { if (hypervisorSnapshotReserve < 10) { <START> hypervisorSnapshotReserve = 10; <END> } volumeSize += volumeSize * (hypervisorSnapshotReserve / 100f); } return volumeSize; }</code><technical_language>a ConfigKey<Integer></technical_language>

Target:
public long getVolumeSizeIncludingHypervisorSnapshotReserve(Volume volume, StoragePool pool) { long volumeSize = volume.getSize(); Integer hypervisorSnapshotReserve = volume.getHypervisorSnapshotReserve(); if (hypervisorSnapshotReserve != null) { hypervisorSnapshotReserve = Math.max(hypervisorSnapshotReserve, s_lowestHypervisorSnapshotReserve); volumeSize += volumeSize * (hypervisorSnapshotReserve / 100f); } return volumeSize; }
Source:
<code>private List<Points.Point> repairRollupsOnRead(final Locator locator, Granularity g, long from, long to) { Timer.Context c = timerRepairRollupsOnRead.time(); List<Points.Point> repairedPoints = new ArrayList<Points.Point>(); List<ListenableFuture<List<Points.Point>>> futures = new ArrayList<ListenableFuture<List<Points.Point>>>(); for( final Iterable<Range> ranges : divideRangesByGroup( g, from, to ) ) { futures.add( createRepairPointsExecutor.submit( new Callable() { @Override public List<Points.Point> call() throws Exception { return createRepairPoints( ranges, locator ); } } ) ); } ListenableFuture<List<List<Points.Point>>> aggregateFuture = Futures.allAsList(futures); try { for( List<Points.Point> subList : aggregateFuture.get(rollupOnReadTimeout.getValue(), rollupOnReadTimeout.getUnit()) ) { repairedPoints.addAll( subList ); } } catch (Exception e) { <START> log.warn(String.format("Exception encountered while doing rollups on read, incomplete rollups will be returned. %s", e.getMessage())); <END> } c.stop(); return repairedPoints; }</code><technical_language>log exception? e.getMessage() get stack trace</technical_language>

Target:
private List<Points.Point> repairRollupsOnRead(final Locator locator, Granularity g, long from, long to) { Timer.Context c = timerRepairRollupsOnRead.time(); List<Points.Point> repairedPoints = new ArrayList<Points.Point>(); List<ListenableFuture<List<Points.Point>>> futures = new ArrayList<ListenableFuture<List<Points.Point>>>(); for( final Iterable<Range> ranges : divideRangesByGroup( g, from, to ) ) { futures.add( createRepairPointsExecutor.submit( new Callable() { @Override public List<Points.Point> call() throws Exception { return createRepairPoints( ranges, locator ); } } ) ); } ListenableFuture<List<List<Points.Point>>> aggregateFuture = Futures.allAsList(futures); try { for( List<Points.Point> subList : aggregateFuture.get(rollupOnReadTimeout.getValue(), rollupOnReadTimeout.getUnit()) ) { repairedPoints.addAll( subList ); } } catch (Exception e) { log.warn("Exception encountered while doing rollups on read, incomplete rollups will be returned.", e); } c.stop(); return repairedPoints; }
Source:
<code>private void tagListModel_SelectedItemsChanged(Object sender, EventArgs e) { boolean hadSelectedTags = getHasSelectedTags(); updateHasSelectedTags(); if (getHasSelectedTags()) { setAllListModelsUnavailable(); getHostList().setIsAvailable(true); getVmList().setIsAvailable(true); getUserList().setIsAvailable(true); } else { updateAvailability(SystemTreeItemType.System, null); getHostList().setSearchString("Host:"); getVmList().setSearchString("Vms:"); <START> getUserList().setSearchString("Users:"); END> } ListModel oldSelectedItem = getSelectedItem(); if (getHasSelectedTags() && oldSelectedItem != getHostList() && oldSelectedItem != getVolumeList() && oldSelectedItem != getVmList() && oldSelectedItem != getUserList()) { setSelectedItem(getVmList()); } else if (getHasSelectedTags() || hadSelectedTags) { String prefix = ""; String search = ""; RefObject<String> tempRef_prefix = new RefObject<>(prefix); RefObject<String> tempRef_search = new RefObject<>(search); splitSearchString(getSelectedItem().getDefaultSearchString(), tempRef_prefix, tempRef_search); prefix = tempRef_prefix.argvalue; search = tempRef_search.argvalue; setSearchStringPrefix(prefix); setSearchString(search); getSearchCommand().execute(); searchStringChanged(); } }</code><technical_language>getDefaultSearchString(): getHostList().setSearchString(getHostList().getDefaultSearchString()); getVmList().setSearchString(getVmList().getDefaultSearchString()); getUserList().setSearchString(getUserList().getDefaultSearchString());</technical_language>

Target:
private void tagListModel_SelectedItemsChanged(Object sender, EventArgs e) { boolean hadSelectedTags = getHasSelectedTags(); updateHasSelectedTags(); if (getHasSelectedTags()) { setAllListModelsUnavailable(); getHostList().setIsAvailable(true); getVmList().setIsAvailable(true); getUserList().setIsAvailable(true); } else { updateAvailability(SystemTreeItemType.System, null); getHostList().setSearchString(getHostList().getDefaultSearchString()); getVmList().setSearchString(getVmList().getDefaultSearchString()); getUserList().setSearchString(getUserList().getDefaultSearchString()); } ListModel oldSelectedItem = getSelectedItem(); if (getHasSelectedTags() && oldSelectedItem != getHostList() && oldSelectedItem != getVolumeList() && oldSelectedItem != getVmList() && oldSelectedItem != getUserList()) { setSelectedItem(getVmList()); } else if (getHasSelectedTags() || hadSelectedTags) { String prefix = ""; String search = ""; RefObject<String> tempRef_prefix = new RefObject<>(prefix); RefObject<String> tempRef_search = new RefObject<>(search); splitSearchString(getSelectedItem().getDefaultSearchString(), tempRef_prefix, tempRef_search); prefix = tempRef_prefix.argvalue; search = tempRef_search.argvalue; setSearchStringPrefix(prefix); setSearchString(search); getSearchCommand().execute(); searchStringChanged(); } }
Source:
<code>public void constructFromJson() throws Exception { BestAssignments b = APIResource.constructFromJson(json, BestAssignments.class); assertEquals(5.0, (Object) b.getValue()); assertEquals(0.5, (Object) b.getValueStddev()); <START> assertEquals(1.0, b.getAssignments().get("a")); <END> assertEquals("c", b.getAssignments().get("b")); }</code><technical_language>Do return doubles for integers double params</technical_language>

Target:
public void constructFromJson() throws Exception { BestAssignments b = APIResource.constructFromJson(json, BestAssignments.class); assertEquals(5.0, (Object) b.getValue()); assertEquals(0.5, (Object) b.getValueStddev()); assertEquals(1, b.getAssignments().getInteger("a")); assertEquals("c", b.getAssignments().get("b")); }
Source:
<code>private void decodeRowType4() throws IOException { <START> if(optionByteAligned) resetBuffer(); <END> eof: while (true) { Node n = eolOnlyTree.root; while (true) { n = n.walk(readBit()); if (n == null) { continue eof; } if (n.isLeaf) { break eof; } } } if (!optionG32D || readBit()) { decode1D(); } else { decode2D(); } }</code><technical_language>Code style: curly brackets, space if</technical_language>

Target:
private void decodeRowType4() throws IOException { if (optionByteAligned) { resetBuffer(); } eof: while (true) { Node n = eolOnlyTree.root; while (true) { n = n.walk(readBit()); if (n == null) { continue eof; } if (n.isLeaf) { break eof; } } } if (!optionG32D || readBit()) { decode1D(); } else { decode2D(); } }
Source:
<code>public void fetch(GitRepo remoteRepo, IProgressMonitor monitor) throws TransportException { RemoteLocation remoteLoc = remoteRepo.getRemoteLocation(); int work = 10; RecursiveSubMonitor subMon = RecursiveSubMonitor.convert(monitor, work); TransportGitSsh transport = remoteToTransportMap.get(remoteLoc); if (transport == null) { work /= 2; subMon.subTask(Messages.JGitRepo_5); transport = this.buildTransport(remoteLoc, subMon.newChild(work)); remoteToTransportMap.put(remoteLoc, transport); } try { subMon.subTask(Messages.JGitRepo_6); <START> String receiveCommand = remoteRepo.gitBinary() + " receive-pack"; END> transport.setOptionReceivePack(receiveCommand); transport.fetch(new EclipseGitProgressTransformer(subMon.newChild(work)), null); } catch (NotSupportedException e) { throw new RuntimeException(e); } }</code><technical_language>fetch upload remote side</technical_language>

Target:
public void fetch(GitRepo remoteRepo, IProgressMonitor monitor) throws TransportException { RemoteLocation remoteLoc = remoteRepo.getRemoteLocation(); int work = 10; RecursiveSubMonitor subMon = RecursiveSubMonitor.convert(monitor, work); TransportGitSsh transport = remoteToTransportMap.get(remoteLoc); if (transport == null) { work /= 2; subMon.subTask(Messages.JGitRepo_5); transport = this.buildTransport(remoteLoc, subMon.newChild(work)); remoteToTransportMap.put(remoteLoc, transport); } try { subMon.subTask(Messages.JGitRepo_6); String uploadCommand = remoteRepo.gitBinary() + " upload-pack"; transport.setOptionUploadPack(uploadCommand); transport.fetch(new EclipseGitProgressTransformer(subMon.newChild(work)), null); } catch (NotSupportedException e) { throw new RuntimeException(e); } }
Source:
<code>public void initializeYoutubePlayer() { setVideoModel(); if(youTubePlayer!=null){ removeFragment(); } youTubePlayerFragment = new YouTubePlayerSupportFragment(); try { FragmentManager fm = getChildFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); ft.replace(R.id.player_container, youTubePlayerFragment, "player"); ft.commit(); } catch (Exception ex) { logger.error(ex); } initializeHandler.postDelayed(new Runnable() { @Override public void run() { <START> initializeYoutubePlayerFragment(); <END> } }, 1000); }</code><technical_language>initializeYoutubePlayerFragment needs refactor initializeYoutubePlayer</technical_language>

Target:
public void initializeYoutubePlayer() { try { if (getUserVisibleHint() && youTubePlayerFragment != null && NetworkUtil.verifyDownloadPossible((BaseFragmentActivity) getActivity())) { initTranscripts(); String apiKey = environment.getConfig().getEmbeddedYoutubeConfig().getYoutubeApiKey(); if (apiKey == null || apiKey.isEmpty()) { return; } youTubePlayerFragment.initialize(apiKey, this); } } catch (NullPointerException localException) { logger.error(localException); } }
Source:
<code><START> public void testSystemPropertyBootTime() throws IOException { <END> DomainClient masterClient = domainMasterLifecycleUtil.getDomainClient(); ModelNode response = masterClient.execute(getReadChildrenNamesOperation(MAIN_RUNNING_SERVER_ADDRESS, SYSTEM_PROPERTY)); ModelNode returnVal = validateResponse(response); int origPropCount = returnVal.asInt(); ModelNode request = getSystemPropertyAddOperation(ROOT_BOOT_PROP_ADDRESS, "domain", Boolean.FALSE); response = masterClient.execute(request); validateResponse(response); response = masterClient.execute(getReadChildrenNamesOperation(MAIN_RUNNING_SERVER_ADDRESS, SYSTEM_PROPERTY)); returnVal = validateResponse(response); Assert.assertEquals(origPropCount + 1, returnVal.asList().size()); response = masterClient.execute(getReadChildrenNamesOperation(OTHER_RUNNING_SERVER_ADDRESS, SYSTEM_PROPERTY)); returnVal = validateResponse(response); Assert.assertEquals(origPropCount + 1, returnVal.asList().size()); response = masterClient.execute(getReadResourceOperation(MAIN_RUNNING_SERVER_BOOT_PROP_ADDRESS)); returnVal = validateResponse(response); validateSystemProperty(returnVal, "domain", false); response = masterClient.execute(getReadResourceOperation(OTHER_RUNNING_SERVER_BOOT_PROP_ADDRESS)); returnVal = validateResponse(response); validateSystemProperty(returnVal, "domain", false); request = getSystemPropertyAddOperation(SERVER_GROUP_BOOT_PROP_ADDRESS, "group", Boolean.FALSE); response = masterClient.execute(request); validateResponse(response); validateSystemProperty(returnVal, "domain", false); response = masterClient.execute(getReadResourceOperation(MAIN_RUNNING_SERVER_BOOT_PROP_ADDRESS)); returnVal = validateResponse(response); validateSystemProperty(returnVal, "domain", false); response = masterClient.execute(getReadResourceOperation(OTHER_RUNNING_SERVER_BOOT_PROP_ADDRESS)); returnVal = validateResponse(response); validateSystemProperty(returnVal, "group", false); }</code><technical_language>I for a test this good core-service=platform-mbean stuff validate actual system property in server VM. org.jboss.as.test.deployment.trivial.ServiceActivatorDeploymentUtil some utility code related reading system properties way</technical_language>

Target:
public void testSystemPropertyBootTime() throws IOException, MgmtOperationException { DomainClient masterClient = domainMasterLifecycleUtil.getDomainClient(); ModelNode propertyAddress = MAIN_RUNNING_SERVER_CONFIG_ADDRESS.clone().add(SYSTEM_PROPERTY, BOOT_PROPERTY_NAME); validateBootProperty(masterClient, propertyAddress); propertyAddress = new ModelNode().add(SERVER_GROUP, "main-server-group").add(SYSTEM_PROPERTY, BOOT_PROPERTY_NAME); validateBootProperty(masterClient, propertyAddress); propertyAddress = new ModelNode().add(HOST, "master").add(SYSTEM_PROPERTY, BOOT_PROPERTY_NAME); validateBootProperty(masterClient, propertyAddress); propertyAddress = new ModelNode().add(SYSTEM_PROPERTY, BOOT_PROPERTY_NAME); validateBootProperty(masterClient, propertyAddress); }
Source:
<code>public ResponseEntity<Resources<Resource<Release>>> getECCsOfReleases(@PathVariable("id") String id, OAuth2Authentication oAuth2Authentication) { final User sw360User = this.restControllerHelper.getSw360UserFromAuthentication(oAuth2Authentication); final Project project = this.projectService.getProjectForUserById(id, sw360User); final List<Resource<Release>> releaseResources = new ArrayList<>(); final Map<String, ProjectReleaseRelationship> releaseIdToUsage = project.getReleaseIdToUsage(); for (final String releaseId : releaseIdToUsage.keySet()) { <START> final Release release = this.releaseService.getReleaseForUserById(releaseId, sw360User); <END> final Release minRelease = new Release(); minRelease.setId(release.getId()); minRelease.setEccInformation(release.getEccInformation()); final Resource<Release> releaseResource = new Resource<>(minRelease); releaseResources.add(releaseResource); } final Resources<Resource<Release>> resources = new Resources<>(releaseResources); return new ResponseEntity<>(resources, HttpStatus.OK); }</code><technical_language>I prefer variable names releasesFromDatabase sw360Releases a differential sw360 thrift objects rest objects</technical_language>

Target:
public ResponseEntity<Resources<Resource<Release>>> getECCsOfReleases(@PathVariable("id") String id, OAuth2Authentication oAuth2Authentication) { final User sw360User = restControllerHelper.getSw360UserFromAuthentication(oAuth2Authentication); final Project project = projectService.getProjectForUserById(id, sw360User); final List<Resource<Release>> releaseResources = new ArrayList<>(); final Map<String, ProjectReleaseRelationship> releaseIdToUsage = project.getReleaseIdToUsage(); for (final String releaseId : releaseIdToUsage.keySet()) { final Release sw360Release = releaseService.getReleaseForUserById(releaseId, sw360User); final Release minimalFilledRelease = new Release(); minimalFilledRelease.setId(sw360Release.getId()); minimalFilledRelease.setEccInformation(sw360Release.getEccInformation()); final Resource<Release> releaseResource = new Resource<>(minimalFilledRelease); releaseResources.add(releaseResource); } final Resources<Resource<Release>> resources = new Resources<>(releaseResources); return new ResponseEntity<>(resources, HttpStatus.OK); }
Source:
<code>public void purgeExpired() { if (!enabled) return; long start = -1; try { if (trace) { log.trace("Purging cache store of expired entries"); start = timeService.time(); } storesMutex.readLock().lock(); try { Consumer<CacheWriter> purgeWriter = writer -> { if (writer instanceof AdvancedCacheExpirationWriter) { <START> ((AdvancedCacheExpirationWriter)writer).purge(persistenceExecutor, advanedListener); <END> } else if (writer instanceof AdvancedCacheWriter) { ((AdvancedCacheWriter)writer).purge(persistenceExecutor, key -> { expirationManager.handleInStoreExpiration(key); }); } }; nonTxWriters.forEach(purgeWriter); txWriters.forEach(purgeWriter); } finally { storesMutex.readLock().unlock(); } if (trace) { log.tracef("Purging cache store completed in %s", Util.prettyPrintTime(timeService.timeDuration(start, TimeUnit.MILLISECONDS))); } } catch (Exception e) { log.exceptionPurgingDataContainer(e); } }</code><technical_language>Please fix typo in advanedListener</technical_language>

Target:
public void purgeExpired() { if (!enabled) return; long start = -1; try { if (trace) { log.trace("Purging cache store of expired entries"); start = timeService.time(); } storesMutex.readLock().lock(); try { Consumer<CacheWriter> purgeWriter = writer -> { if (writer instanceof AdvancedCacheExpirationWriter) { ((AdvancedCacheExpirationWriter)writer).purge(persistenceExecutor, advancedListener); } else if (writer instanceof AdvancedCacheWriter) { ((AdvancedCacheWriter)writer).purge(persistenceExecutor, key -> { expirationManager.handleInStoreExpiration(key); }); } }; nonTxWriters.forEach(purgeWriter); txWriters.forEach(purgeWriter); } finally { storesMutex.readLock().unlock(); } if (trace) { log.tracef("Purging cache store completed in %s", Util.prettyPrintTime(timeService.timeDuration(start, TimeUnit.MILLISECONDS))); } } catch (Exception e) { log.exceptionPurgingDataContainer(e); } }