auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private Map<String, Set<String>> getAgentNamesForMonitoringParameters(Set<? extends MetricNode> nodeList) { Map<String, Set<String>> agentNames = new HashMap<>(); for (MetricNode node : nodeList) { node.getMetricNameDtoList().stream() .filter(metricNameDto -> (metricNameDto.getOrigin() == MONITORING) || (metricNameDto.getOrigin() == TEST_GROUP_METRIC)) <START> .map(metricNameDto -> MonitoringIdUtils.splitMonitoringMetricId(metricNameDto.getMetricName())) <END> .filter(Objects::nonNull) .forEach(monitoringId -> defaultMonitoringParams.keySet().stream() .filter(key -> defaultMonitoringParams.get(key).contains(monitoringId.getMonitoringName())) .forEach(key -> { agentNames.putIfAbsent(key, new HashSet<>()); agentNames.get(key).add(monitoringId.getAgentName()); })); } return agentNames; }</code><technical_language>if is correct, Origin.MONITORING more</technical_language>

Target:
private Map<String, Set<String>> getAgentNamesForMonitoringParameters(Set<? extends MetricNode> nodeList) { Map<String, Set<String>> agentNames = new HashMap<>(); for (MetricNode node : nodeList) { node.getMetricNameDtoList().stream() .filter(metricNameDto -> metricNameDto.getOrigin() == TEST_GROUP_METRIC) .map(metricNameDto -> MonitoringIdUtils.splitMonitoringMetricId(metricNameDto.getMetricName())) .filter(Objects::nonNull) .forEach(monitoringId -> defaultMonitoringParams.keySet().stream() .filter(key -> defaultMonitoringParams.get(key).contains(monitoringId.getMonitoringName())) .forEach(key -> { agentNames.putIfAbsent(key, new HashSet<>()); agentNames.get(key).add(monitoringId.getAgentName()); })); } return agentNames; }
Source:
<code>private static <RESPONSE extends PaxosResponse> void cancelOutstandingRequestsAfterTimeout( List<Future<RESPONSE>> responseFutures) { boolean areAllRequestsComplete = Iterables.all(responseFutures, Future::isDone); if (areAllRequestsComplete) { return; } CANCELLATION_EXECUTOR.schedule(() -> { for (Future<?> future : responseFutures) { boolean isCanceled = future.cancel(true); if (isCanceled) { cancelOutstandingRequestSuccess.mark(); } else { cancelOutstandingRequestNoOp.mark(); } } }, OUTSTANDING_REQUEST_CANCELLATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); <START> if (log.isDebugEnabled() && shouldLogException()) { <END> log.debug("Quorum checker canceled pending requests" + ". Rate of successful cancellations: {}, rate of no-op cancellations: {}", SafeArg.of("rateCancelled", cancelOutstandingRequestSuccess.getOneMinuteRate()), SafeArg.of("rateNoOpCancellation", cancelOutstandingRequestNoOp.getOneMinuteRate())); } }</code><technical_language>nit: this exception though. shouldLogDiagnosticInformation() maybe</technical_language>

Target:
private static <RESPONSE extends PaxosResponse> void cancelOutstandingRequestsAfterTimeout( List<Future<RESPONSE>> responseFutures) { boolean areAllRequestsComplete = Iterables.all(responseFutures, Future::isDone); if (areAllRequestsComplete) { return; } CANCELLATION_EXECUTOR.schedule(() -> { for (Future<?> future : responseFutures) { boolean isCanceled = future.cancel(true); if (isCanceled) { cancelOutstandingRequestSuccess.mark(); } else { cancelOutstandingRequestNoOp.mark(); } } }, OUTSTANDING_REQUEST_CANCELLATION_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); if (log.isDebugEnabled() && shouldLogDiagnosticInformation()) { log.debug("Quorum checker canceled pending requests" + ". Rate of successful cancellations: {}, rate of no-op cancellations: {}", SafeArg.of("rateCancelled", cancelOutstandingRequestSuccess.getOneMinuteRate()), SafeArg.of("rateNoOpCancellation", cancelOutstandingRequestNoOp.getOneMinuteRate())); } }
Source:
<code>public ConnectionManager(String filepath) <START> { <END> data = new DecryptBase64().DecryptBase64(filepath); }</code><technical_language>Brace next class definition please</technical_language>

Target:
public ConnectionManager(String filepath) { List<String> data = new Base64Decryptor().getDecryptedDataList(filepath); dataSource = createDataSource(data); }
Source:
<code>protected void onStart() { super.onStart(); final String pathId = getIntent().getStringExtra(EXTRA_PATH_ID); final String url = environment.getConfig().getCourseDiscoveryConfig() .getCourseInfoUrlTemplate() .replace("{" + EXTRA_PATH_ID + "}", pathId); <START> loadUrlBasedOnOsVersion(url); <END> }</code><technical_language>**nit** **loadUrlBasedOnOsVersion** good here. simple **loadUrl** good</technical_language>

Target:
protected void onStart() { super.onStart(); final String pathId = getIntent().getStringExtra(EXTRA_PATH_ID); final String url = environment.getConfig().getCourseDiscoveryConfig() .getCourseInfoUrlTemplate() .replace("{" + EXTRA_PATH_ID + "}", pathId); loadUrl(url); }
Source:
<code>private CharSequence checkState(String arg0, String retValue1, String retValue2, String retValue3) { switch (arg0.toLowerCase()) { <START> case "skipped": <END> return retValue1; case "passed": return retValue2; case "failed": return retValue3; } return "undefined"; }</code><technical_language>I this in, do added Constants replace other occurrences</technical_language>

Target:
private CharSequence checkState(String arg0, String retValue1, String retValue2, String retValue3) { switch (arg0.toLowerCase()) { case Constants.SKIPPED: return retValue1; case Constants.PASSED: return retValue2; case Constants.FAILED: return retValue3; } return Constants.UNDEFINED; }
Source:
<code>public void append(LogEvent event) { if (!recursiveCall.get()) { try { recursiveCall.set(true); if (!systemInitialized) { if (JobModelManager.currentJobModelManager() != null) { setupSystem(); systemInitialized = true; } else { log.trace("Waiting for the JobCoordinator to be instantiated..."); } } else { if (!logQueue.offer(encodeLogEventToBytes(event), queueTimeoutS, TimeUnit.SECONDS)) { int messagesDropped = logQueue.drainTo(new ArrayList<>()) + 1; log.warn(String.format("Exceeded timeout %ss while trying to log to %s. Dropping %d log messages.", queueTimeoutS, systemStream.toString(), messagesDropped)); metrics.logMessagesDropped.inc(messagesDropped); } metrics.bufferFillPct.set(Math.round(100f * logQueue.size() / DEFAULT_QUEUE_SIZE)); } } catch (Exception e) { System.err.println(String.format("[%s] Error sending log message:", appenderName)); <START> e.printStackTrace(); <END> } finally { recursiveCall.set(false); } } else if (metrics != null) { metrics.recursiveCalls.inc(); } }</code><technical_language>appenderName other class name - StreamAppender? getClass() suffice instead of another variable</technical_language>

Target:
public void append(LogEvent event) { if (!recursiveCall.get()) { try { recursiveCall.set(true); if (!systemInitialized) { if (JobModelManager.currentJobModelManager() != null) { setupSystem(); systemInitialized = true; } else { log.trace("Waiting for the JobCoordinator to be instantiated..."); } } else { if (!logQueue.offer(encodeLogEventToBytes(event), queueTimeoutS, TimeUnit.SECONDS)) { int messagesDropped = logQueue.drainTo(new ArrayList<>()) + 1; log.warn(String.format("Exceeded timeout %ss while trying to log to %s. Dropping %d log messages.", queueTimeoutS, systemStream.toString(), messagesDropped)); metrics.logMessagesDropped.inc(messagesDropped); } metrics.bufferFillPct.set(Math.round(100f * logQueue.size() / DEFAULT_QUEUE_SIZE)); } } catch (Exception e) { if (metrics != null) { metrics.logMessagesErrors.inc(); } System.err.println(String.format("[%s] Error sending log message:", getName())); e.printStackTrace(); } finally { recursiveCall.set(false); } } else if (metrics != null) { metrics.recursiveCalls.inc(); } }
Source:
<code>public static boolean canHarvestBlock(Block block, EntityPlayer player, IBlockAccess world, BlockPos pos) { IBlockState state = world.getBlockState(pos); state = state.getBlock().getActualState(state, world, pos); <START> return canHarvestBlock(block, player, state); <END> }</code><technical_language>this canHarvestBlock(player, state):</technical_language>

Target:
public static boolean canHarvestBlock(Block block, EntityPlayer player, IBlockAccess world, BlockPos pos) { IBlockState state = world.getBlockState(pos); state = state.getBlock().getActualState(state, world, pos); return canHarvestBlock(player, state); }
Source:
<code>public ProjectUI(ProjectObject project) { if (project != null) { <START> this.ID = String.valueOf(project.getId()); <END> this.ProjectName = project.getName(); this.ProjectDisplayName = project.getDisplayName(); this.Commnet = project.getComment(); this.ProjectManager = project.getManager(); this.AttachFileSize = String.valueOf(project.getAttachFileSize()); this.ProjectCreateDate = DateUtil.format(project.getCreateTime(), DateUtil._16DIGIT_DATE_TIME); } }</code><technical_language>"this." removed</technical_language>

Target:
public ProjectUI(ProjectObject project) { if (project != null) { ID = String.valueOf(project.getId()); ProjectName = project.getName(); ProjectDisplayName = project.getDisplayName(); Commnet = project.getComment(); ProjectManager = project.getManager(); AttachFileSize = String.valueOf(project.getAttachFileSize()); ProjectCreateDate = DateUtil.format(project.getCreateTime(), DateUtil._16DIGIT_DATE_TIME); } }
Source:
<code>public VdcQueryParametersBase(String sessionId) { <START> this.sessionId = sessionId; <END> refresh = true; }</code><technical_language>flip this around, constructor sessionId call constructor parameter? pass null constructor. Functionally difference, reads a nicer IMO</technical_language>

Target:
public VdcQueryParametersBase(String sessionId) { this(); this.sessionId = sessionId; }
Source:
<code>private boolean hasLooseRef() throws IOException { return <START> Files.walk(refsDir.toPath()).filter(p -> Files.isRegularFile(p)) <END> .findAny().isPresent(); }</code><technical_language>Files::isRegularFile</technical_language>

Target:
private boolean hasLooseRef() throws IOException { return Files.walk(refsDir.toPath()).anyMatch(Files::isRegularFile); }
Source:
<code><START> public static Map<String, Class<?>> loadUdfsFromJar(java.io.File jarFile) throws IOException { <END> Map<String, Class<?>> udafs = new HashMap<>(); for (Class<?> udfClass : UDF_CLASSES) { for (Class<?> clazz : ProxyUtil.loadAllClassesFromJar(jarFile, udfClass)) { udafs.put(clazz.getCanonicalName(), clazz); } } return udafs; }</code><technical_language>I this require fields in StreamCatalogService, if want static, utility class instead. a 2 cents</technical_language>

Target:
public static Map<String, Class<?>> loadUdfsFromJar(java.io.File jarFile) throws IOException { Map<String, Class<?>> udafs = new HashMap<>(); for (Class<?> udfClass : UDF_CLASSES) { for (Class<?> clazz : ProxyUtil.loadAllClassesFromJar(jarFile, udfClass)) { udafs.put(clazz.getName(), clazz); } } return udafs; }
Source:
<code>public String compact(String message) { if (expected == null || actual == null || expected.equals(actual)) { return Assert.format(message, expected, actual); } else { <START> String prefix = sharedPrefix(expected, actual); <END> String suffix = sharedSuffix(expected, actual, prefix.length()); String expectedDiff = extractDiff(expected, prefix, suffix); String actualDiff = extractDiff(actual, prefix, suffix); String compactedPrefix = compactPrefix(prefix); String compactedSuffix = compactSuffix(suffix); return Assert.format(message, compactedPrefix + expectedDiff + compactedSuffix, compactedPrefix + actualDiff + compactedSuffix); } }</code><technical_language>If want improve readability, i extract a class named DiffExtractor instead of passing prefix suffix methods: DiffExtractor extractor = new DiffExtractor(expected, actual); String compactedPrefix = extractor.compactPrefix(); String compactedSuffix = extractor.compactSuffix(); return Assert.format(message, compactedPrefix + extractor.expectedDiff() + compactedSuffix, compactedPrefix + extractor.actualDiff() + compactedSuffix);</technical_language>

Target:
public String compact(String message) { if (expected == null || actual == null || expected.equals(actual)) { return Assert.format(message, expected, actual); } else { DiffExtractor extractor = new DiffExtractor(); String compactedPrefix = extractor.compactPrefix(); String compactedSuffix = extractor.compactSuffix(); return Assert.format(message, compactedPrefix + extractor.expectedDiff() + compactedSuffix, compactedPrefix + extractor.actualDiff() + compactedSuffix); } }
Source:
<code>protected boolean proceed(JavaSymbolicObject object) { <START> return ((!substitution.isEmpty() && !object.isGround()) || !object.isNormal()); <END> }</code><technical_language>original version is more precise</technical_language>

Target:
protected boolean proceed(JavaSymbolicObject object) { return object.canSubstituteAndEvaluate(substitution); }
Source:
<code>void addNextChunkFromMemorySegment(MemorySegment segment, int offset, int numBytes) throws IOException { Tuple2<Integer, Integer> positionAndRemaining = readLengthIfNeeded(segment, offset, numBytes); int startPos = positionAndRemaining.f0; int remaining = positionAndRemaining.f1; if (remaining == 0) { return; } int toCopy = min(recordLength - accumulatedRecordBytes, remaining); if (toCopy > 0) { <START> readData(segment, startPos, toCopy); <END> } if (remaining > toCopy) { leftOverData = segment; leftOverStart = startPos + toCopy; leftOverLimit = offset + numBytes; } }</code><technical_language>nit: readData -> copyFromSegment readIntoBuffer -> copyIntoBuffer / copyFromSegmentIntoBuffer readIntoFile -> copyIntoFile / copyFromSegmentIntoFile ? obvious direction purpose of plain "readData". (Inside readData obvious)</technical_language>

Target:
void addNextChunkFromMemorySegment(MemorySegment segment, int offset, int numBytes) throws IOException { int limit = offset + numBytes; int numBytesRead = isReadingLength() ? readLength(segment, offset, numBytes) : 0; offset += numBytesRead; numBytes -= numBytesRead; if (numBytes == 0) { return; } int toCopy = min(recordLength - accumulatedRecordBytes, numBytes); if (toCopy > 0) { copyFromSegment(segment, offset, toCopy); } if (numBytes > toCopy) { leftOverData = segment; leftOverStart = offset + toCopy; leftOverLimit = limit; } }
Source:
<code>private void runPushOperation() { <START> if not (pool.requestRunway(this)) { <END> log.info("Rescheduling replication to " + uri + " to avoid collision with an in-flight push."); pool.reschedule(this, RetryReason.COLLISON); return; } if (!canceled) { try { git = gitManager.openRepository(projectName); runImpl(); } catch (RepositoryNotFoundException e) { log.error("Cannot replicate " + projectName + "; " + e.getMessage()); } catch (NoRemoteRepositoryException e) { log.error("Cannot replicate to " + uri + "; repository not found"); } catch (NotSupportedException e) { log.error("Cannot replicate to " + uri, e); } catch (TransportException e) { Throwable cause = e.getCause(); if (cause instanceof JSchException && cause.getMessage().startsWith("UnknownHostKey:")) { log.error("Cannot replicate to " + uri + ": " + cause.getMessage()); } else { log.error("Cannot replicate to " + uri, e); } pool.reschedule(this, RetryReason.TRANSPORT_ERROR); } catch (IOException e) { log.error("Cannot replicate to " + uri, e); } catch (RuntimeException e) { log.error("Unexpected error during replication to " + uri, e); } catch (Error e) { log.error("Unexpected error during replication to " + uri, e); } finally { if (git != null) { git.close(); } pool.notifyFinished(this); } } }</code><technical_language>if (!pool.requestRunway(this))</technical_language>

Target:
private void runPushOperation() { if (!pool.requestRunway(this)) { log.info("Rescheduling replication to " + uri + " to avoid collision with an in-flight push."); pool.reschedule(this, Destination.RetryReason.COLLISION); return; } if (!canceled) { try { git = gitManager.openRepository(projectName); runImpl(); } catch (RepositoryNotFoundException e) { log.error("Cannot replicate " + projectName + "; " + e.getMessage()); } catch (NoRemoteRepositoryException e) { log.error("Cannot replicate to " + uri + "; repository not found"); } catch (NotSupportedException e) { log.error("Cannot replicate to " + uri, e); } catch (TransportException e) { Throwable cause = e.getCause(); if (cause instanceof JSchException && cause.getMessage().startsWith("UnknownHostKey:")) { log.error("Cannot replicate to " + uri + ": " + cause.getMessage()); } else { log.error("Cannot replicate to " + uri, e); } pool.reschedule(this, Destination.RetryReason.TRANSPORT_ERROR); } catch (IOException e) { log.error("Cannot replicate to " + uri, e); } catch (RuntimeException e) { log.error("Unexpected error during replication to " + uri, e); } catch (Error e) { log.error("Unexpected error during replication to " + uri, e); } finally { if (git != null) { git.close(); } pool.notifyFinished(this); } } }
Source:
<code>public Optional<FunctionDefinition> getModelClass() { final FunctionDefinition function = new FunctionDefinition(); <START> return Optional.of(function); <END> }</code><technical_language>shorten return Optional.of(new FunctionDefinition());</technical_language>

Target:
public Optional<FunctionDefinition> getModelClass() { return Optional.of(new FunctionDefinition()); }
Source:
<code>private void find(final IProgressMonitor m, final IContainer c, boolean searchLinkedFolders) throws CoreException { if (!searchLinkedFolders && c.isLinked()) return; final IPath loc = c.getLocation(); SubMonitor progress = SubMonitor.convert(m, 101); progress.subTask(CoreText.RepositoryFinder_finding); if (loc == null) { throw new CoreException(Activator.error( NLS.bind(CoreText.RepositoryFinder_ResourceDoesNotExist, c), null)); } final File fsLoc = loc.toFile(); assert fsLoc.isAbsolute(); if (c instanceof IProject) findInDirectoryAndParents(c, fsLoc); else findInDirectory(c, fsLoc); progress.worked(1); if (findInChildren) { final IResource[] children = c.members(); if (children != null && children.length > 0) { final int scale = 100 / children.length; for (int k = 0; k < children.length; k++) { final IResource o = children[k]; if (o instanceof IContainer && !o.getName().equals(Constants.DOT_GIT)) { <START> find(progress.newChild(scale), <END> (IContainer) o, searchLinkedFolders); } else { progress.worked(scale); } } } } }</code><technical_language>1</technical_language>

Target:
private void find(final IProgressMonitor m, final IContainer c, boolean searchLinkedFolders) throws CoreException { if (!searchLinkedFolders && c.isLinked()) return; final IPath loc = c.getLocation(); SubMonitor progress = SubMonitor.convert(m, 101); progress.subTask(CoreText.RepositoryFinder_finding); if (loc == null) { throw new CoreException(Activator.error( NLS.bind(CoreText.RepositoryFinder_ResourceDoesNotExist, c), null)); } final File fsLoc = loc.toFile(); assert fsLoc.isAbsolute(); if (c instanceof IProject) findInDirectoryAndParents(c, fsLoc); else findInDirectory(c, fsLoc); progress.worked(1); if (findInChildren) { final IResource[] children = c.members(); if (children != null && children.length > 0) { progress.setWorkRemaining(children.length); for (int k = 0; k < children.length; k++) { final IResource o = children[k]; if (o instanceof IContainer && !o.getName().equals(Constants.DOT_GIT)) { find(progress.newChild(1), (IContainer) o, searchLinkedFolders); } else { progress.worked(1); } } } } }
Source:
<code>private static final HostThread readHostThread(ISafeByteBufferReader buffer) { <START> short valueSize = buffer.getShort(); byte[] array = new byte[valueSize]; buffer.get(array); String host = new String(array, CHARSET); if (buffer.get() != 0) { throw new IllegalStateException("Host thread's host could not be correctly serialized / deserialized"); } <END> int tid = buffer.getInt(); return new HostThread(host, tid); }</code><technical_language>buffer.getString()</technical_language>

Target:
private static final HostThread readHostThread(ISafeByteBufferReader buffer) { String host = buffer.getString(); int tid = buffer.getInt(); return new HostThread(host, tid); }
Source:
<code>protected void activate(Config config) { this.useCache = config.useResourceCache(); if(this.useCache){ <START> this.cache = new ConcurrentHashMap<>(); <END> } }</code><technical_language>a "real" cache a maximum size TTL eviction is handled</technical_language>

Target:
protected void activate(Config config) { long size = config.maxSizeCount(); long ttl = config.getTtl(); if (ttl != Config.DEFAULT_TTL) { cache = CacheBuilder.newBuilder() .maximumSize(size ) .expireAfterWrite(ttl, TimeUnit.SECONDS) .recordStats() .build(); } else { cache = CacheBuilder.newBuilder() .maximumSize(size) .recordStats() .build(); } }
Source:
<code>public List<Map<String,Object>> findTokens(String accountId) { List<Map<String, Object>> tokens = jdbi.withHandle(handle -> handle.createQuery("SELECT token_link, description, to_char(revoked,'DD Mon YYYY') as revoked FROM tokens WHERE account_id = :account_id ORDER BY issued DESC") .bind("account_id", accountId) .list()); return tokens.stream().map(tokenMap -> { <START> if (tokenMap.get("revoked") != null) return tokenMap; <END> else { Map<String, Object> newMap = new HashMap<>(); newMap.put("token_link", tokenMap.get("token_link")); newMap.put("description", tokenMap.get("description")); return newMap; } }).collect(Collectors.toList()); }</code><technical_language>logic simpler if delete key for revoked is null</technical_language>

Target:
public List<Map<String,Object>> findTokens(String accountId) { return jdbi.withHandle(handle -> handle.createQuery("SELECT token_link, description, to_char(revoked,'DD Mon YYYY') as revoked FROM tokens WHERE account_id = :account_id ORDER BY issued DESC") .bind("account_id", accountId) .list()); }
Source:
<code>public void formatEventTitleTest() { int distance = 0; double azimuth = 0.0; String expectation = String.format("0 km S of name, country_name"); JsonObject feature = Json.createObjectBuilder() .add("properties", Json.createObjectBuilder().add("name", "name").add("country_code", "country_code") .add("admin1_name", "admin1_name").add("country_name", "country_name").add("distance", distance) .add("azimuth", azimuth)) .build(); Assert.assertEquals(expectation, module.formatEventTitle(feature)); expectation = String.format("0 km S of name, admin1_name"); feature = Json.createObjectBuilder() .add("properties", <START> Json.createObjectBuilder().add("name", "name").add("country_code", "us").add("admin1_name", "admin1_name") <END> .add("country_name", "country_name").add("distance", distance).add("azimuth", azimuth)) .build(); Assert.assertEquals(expectation, module.formatEventTitle(feature)); }</code><technical_language>Minor formatting, put add line alphabetize another order is needed</technical_language>

Target:
public void formatEventTitleTest() { int distance = 0; double azimuth = 0.0; String expectation = String.format("0 km S of name, country_name"); JsonObject feature = Json.createObjectBuilder() .add("properties", Json.createObjectBuilder() .add("admin1_name", "admin1_name") .add("azimuth", azimuth) .add("country_code", "country_code") .add("country_name", "country_name") .add("distance", distance) .add("name", "name")) .build(); Assert.assertEquals(expectation, module.formatEventTitle(feature)); expectation = String.format("0 km S of name, admin1_name"); feature = Json.createObjectBuilder() .add("properties", Json.createObjectBuilder() .add("admin1_name", "admin1_name") .add("azimuth", azimuth) .add("country_code", "us") .add("country_name", "country_name") .add("distance", distance) .add("name", "name")) .build(); Assert.assertEquals(expectation, module.formatEventTitle(feature)); }
Source:
<code>protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { Integer width = new Integer(500); Integer height = new Integer(300); String mimeType = PNG_MIME_TYPE; try { width = Integer.parseInt(request.getParameter("width")); } catch (Exception e) { <START> log.debug ("Error during parseInt",e); <END> } try { height = Integer.parseInt(request.getParameter("height")); } catch (Exception e) { log.debug ("Error during parseInt",e); } if (request.getParameter("mimeType") != null) { mimeType = request.getParameter("mimeType"); } JFreeChart chart = createChart(request, response); response.setHeader("Pragma", "No-cache"); response.setDateHeader("Expires", 0); response.setHeader("Cache-Control", "no-cache"); try { if (JPG_MIME_TYPE.equalsIgnoreCase(mimeType)) { response.setContentType(JPG_MIME_TYPE); ChartUtilities.writeChartAsJPEG(response.getOutputStream(), chart, width, height); } else if (PNG_MIME_TYPE.equalsIgnoreCase(mimeType)) { response.setContentType(PNG_MIME_TYPE); ChartUtilities.writeChartAsPNG(response.getOutputStream(), chart, width, height); } else { } } catch (IOException e) { log.error(e); } } catch (Exception e) { log.error(e); } }</code><technical_language>this a log.error statement. needs space ","</technical_language>

Target:
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { Integer width = new Integer(500); Integer height = new Integer(300); String mimeType = PNG_MIME_TYPE; try { width = Integer.parseInt(request.getParameter("width")); } catch (Exception e) { log.error ("Error during width parseInt", e); } try { height = Integer.parseInt(request.getParameter("height")); } catch (Exception e) { log.error ("Error during height parseInt", e); } if (request.getParameter("mimeType") != null) { mimeType = request.getParameter("mimeType"); } JFreeChart chart = createChart(request, response); response.setHeader("Pragma", "No-cache"); response.setDateHeader("Expires", 0); response.setHeader("Cache-Control", "no-cache"); try { if (JPG_MIME_TYPE.equalsIgnoreCase(mimeType)) { response.setContentType(JPG_MIME_TYPE); ChartUtilities.writeChartAsJPEG(response.getOutputStream(), chart, width, height); } else if (PNG_MIME_TYPE.equalsIgnoreCase(mimeType)) { response.setContentType(PNG_MIME_TYPE); ChartUtilities.writeChartAsPNG(response.getOutputStream(), chart, width, height); } else { } } catch (IOException e) { log.error(e); } } catch (Exception e) { log.error(e); } }
Source:
<code>private Descriptors.EnumValueDescriptor translateEnumValue(Binary binaryValue) { Descriptors.EnumValueDescriptor protoValue = enumLookup.get(binaryValue); if (protoValue == null) { <START> String unknownLabel = new String(binaryValue.getBytes()); <END> if (unknownLabel.startsWith(unknownEnumPrefix)) { try { int i = Integer.parseInt(unknownLabel.substring(unknownEnumPrefix.length())); Descriptors.EnumValueDescriptor unknownEnumValue = enumType.findValueByNumberCreatingIfUnknown(i); enumLookup.put(binaryValue, unknownEnumValue); return unknownEnumValue; } catch (NumberFormatException e) { } } if (!acceptUnknownEnum) { Set<Binary> knownValues = enumLookup.keySet(); String msg = "Illegal enum value \"" + binaryValue + "\"" + " in protocol buffer \"" + fieldType.getFullName() + "\"" + " legal values are: \"" + knownValues + "\""; throw new InvalidRecordException(msg); } LOG.error("Found unknown value " + unknownLabel + " for field " + fieldType.getFullName() + " probably because your proto schema is outdated, accept it as unknown enum with number -1"); Descriptors.EnumValueDescriptor unrecognized = enumType.findValueByNumberCreatingIfUnknown(-1); enumLookup.put(binaryValue, unrecognized); return unrecognized; } return protoValue; }</code><technical_language>I suggest Binary.toStringUsingUTF8() instead</technical_language>

Target:
private Descriptors.EnumValueDescriptor translateEnumValue(Binary binaryValue) { Descriptors.EnumValueDescriptor protoValue = enumLookup.get(binaryValue); if (protoValue == null) { String unknownLabel = binaryValue.toStringUsingUTF8(); if (unknownLabel.startsWith(unknownEnumPrefix)) { try { int i = Integer.parseInt(unknownLabel.substring(unknownEnumPrefix.length())); Descriptors.EnumValueDescriptor unknownEnumValue = enumType.findValueByNumberCreatingIfUnknown(i); enumLookup.put(binaryValue, unknownEnumValue); return unknownEnumValue; } catch (NumberFormatException e) { } } if (!acceptUnknownEnum) { Set<Binary> knownValues = enumLookup.keySet(); String msg = "Illegal enum value \"" + binaryValue + "\"" + " in protocol buffer \"" + fieldType.getFullName() + "\"" + " legal values are: \"" + knownValues + "\""; throw new InvalidRecordException(msg); } LOG.error("Found unknown value " + unknownLabel + " for field " + fieldType.getFullName() + " probably because your proto schema is outdated, accept it as unknown enum with number -1"); Descriptors.EnumValueDescriptor unrecognized = enumType.findValueByNumberCreatingIfUnknown(-1); enumLookup.put(binaryValue, unrecognized); return unrecognized; } return protoValue; }
Source:
<code>public void createAccountSupportsHashedPasswords() throws Exception { HudsonPrivateSecurityRealm securityRealm = new HudsonPrivateSecurityRealm(false, false, null); j.jenkins.setSecurityRealm(securityRealm); securityRealm.createAccount("user_unhashed", "password"); <START> securityRealm.createAccount("user_hashed", "#jbcrypt:" + BCrypt.hashpw("password", BCrypt.gensalt())); <END> WebClient wc1 = j.createWebClient(); wc1.login("user_unhashed", "password"); WebClient wc2 = j.createWebClient(); wc2.login("user_hashed", "password"); XmlPage w1 = (XmlPage) wc1.goTo("whoAmI/api/xml", "application/xml"); assertThat(w1, hasXPath(" XmlPage w2 = (XmlPage) wc2.goTo("whoAmI/api/xml", "application/xml"); assertThat(w2, hasXPath(" }</code><technical_language>Please add case users a password starting #jbcrypt: a hash. case is covered</technical_language>

Target:
public void createAccountSupportsHashedPasswords() throws Exception { HudsonPrivateSecurityRealm securityRealm = new HudsonPrivateSecurityRealm(false, false, null); j.jenkins.setSecurityRealm(securityRealm); securityRealm.createAccountWithHashedPassword("user_hashed", "#jbcrypt:" + BCrypt.hashpw("password", BCrypt.gensalt())); WebClient wc = j.createWebClient(); wc.login("user_hashed", "password"); XmlPage w2 = (XmlPage) wc.goTo("whoAmI/api/xml", "application/xml"); assertThat(w2, hasXPath(" }
Source:
<code>public CompiledMangoJavaScript(MangoJavaScript vo, ScriptPointValueSetter setter, ScriptLog log, MangoJavaScriptResult result, MangoJavaScriptService service) { this.log = log; this.additionalContext = vo.getAdditionalContext() == null ? Collections.emptyMap() : vo.getAdditionalContext(); this.additionalUtilities = vo.getAdditionalUtilities() == null ? Collections.emptyList() : vo.getAdditionalUtilities(); this.importExclusions = Collections.emptyList(); this.testRun = true; this.service = service; this.result = result; <START> this.utilities = Collections.emptyList(); <END> this.user = vo.getPermissions(); this.setter = setter; }</code><technical_language>Collections.emptyList() is desired here. initialize methods in service promptly attempt mutate it, reading, try evoke</technical_language>

Target:
public CompiledMangoJavaScript(MangoJavaScript vo, ScriptPointValueSetter setter, ScriptLog log, MangoJavaScriptResult result, MangoJavaScriptService service) { this.log = log; this.additionalContext = vo.getAdditionalContext() == null ? Collections.emptyMap() : vo.getAdditionalContext(); this.additionalUtilities = vo.getAdditionalUtilities() == null ? Collections.emptyList() : vo.getAdditionalUtilities(); this.importExclusions = Collections.emptyList(); this.testRun = true; this.service = service; this.result = result; this.utilities = Collections.emptyList(); this.permissionHolder = vo.getPermissions(); this.setter = setter; }
Source:
<code>public static Float convertObjectToFloat(Object valObj) { <START> if (valObj == null) { <END> return 0.0f; } if (valObj instanceof Float) { return (Float) valObj; } else if (valObj instanceof Number) { return ((Number) valObj).floatValue(); } else if (valObj instanceof String) { try { return Float.valueOf(((String) valObj).replace(",", "")); } catch (Exception e) { throw new ParseException(e, "Unable to parse value[%s] as float", valObj); } } else { throw new ParseException("Unknown type[%s]", valObj.getClass()); } }</code><technical_language>is similar check in convertObjectToLong()</technical_language>

Target:
public static Float convertObjectToFloat(Object valObj) { if (valObj == null) { return 0.0f; } if (valObj instanceof Float) { return (Float) valObj; } else if (valObj instanceof Number) { return ((Number) valObj).floatValue(); } else if (valObj instanceof String) { try { return Floats.tryParse((String) valObj); } catch (Exception e) { throw new ParseException(e, "Unable to parse value[%s] as float", valObj); } } else { throw new ParseException("Unknown type[%s]", valObj.getClass()); } }
Source:
<code>public String toString() { return MoreObjects.toStringHelper(BufferedChannel.class) .add("logId", logId) .add("logFile", logFile) <START> .toString(); <END> }</code><technical_language>Update toString include ledgerIdAssigned</technical_language>

Target:
public String toString() { return MoreObjects.toStringHelper(BufferedChannel.class) .add("logId", logId) .add("logFile", logFile) .add("ledgerIdAssigned", ledgerIdAssigned) .toString(); }
Source:
<code><START> @Nullable public final String tag(I input, @Nullable TraceContext context, SpanCustomizer span) { <END> if (input == null) throw new NullPointerException("input == null"); if (span == null) throw new NullPointerException("span == null"); if (span == NoopSpanCustomizer.INSTANCE) return null; return tag(span, input, context); }</code><technical_language>compatible source compilation, pretty ABI incompatible, meaning if libraries target Brave this method, NoSuchMethodError</technical_language>

Target:
public final void tag(I input, @Nullable TraceContext context, SpanCustomizer span) { if (input == null) throw new NullPointerException("input == null"); if (span == null) throw new NullPointerException("span == null"); if (span == NoopSpanCustomizer.INSTANCE) return; tag(span, input, context); }
Source:
<code>public void setRecordToOpen(@Nullable final TableRecordReference record, final @Nullable String adWindowId, @NonNull final OpenTarget target) { if (record == null) { setRecordToOpen(null); } else { setRecordToOpen(RecordsToOpen.builder() <START> .record(record) <END> .adWindowId(adWindowId) .target(target) .automaticallySetReferencingDocumentPaths(true) .build()); } }</code><technical_language>pls set target tab</technical_language>

Target:
public void setRecordToOpen(@Nullable final TableRecordReference record, final @Nullable String adWindowId, @NonNull final OpenTarget target) { if (record == null) { setRecordToOpen(null); } else { setRecordToOpen(RecordsToOpen.builder() .record(record) .adWindowId(adWindowId) .target(target) .targetTab(RecordsToOpen.TargetTab.SAME_TAB) .automaticallySetReferencingDocumentPaths(true) .build()); } }
Source:
<code>public void onComplete() { if (inMaybe) { actual.onComplete(); } else { inMaybe = true; DisposableHelper.replace(this, null); <START> MaybeSource<? extends T> c = other; <END> other = null; c.subscribe(this); } }</code><technical_language>named m</technical_language>

Target:
public void onComplete() { if (inMaybe) { actual.onComplete(); } else { inMaybe = true; DisposableHelper.replace(this, null); MaybeSource<? extends T> ms = other; other = null; ms.subscribe(this); } }
Source:
<code>protected void setup(Binder binder) { binder.bind(HiveMetastoreClientFactory.class).in(Scopes.SINGLETON); binder.bind(HiveCluster.class).to(StaticHiveCluster.class).in(Scopes.SINGLETON); configBinder(binder).bindConfig(StaticMetastoreConfig.class); binder.bind(HiveMetastore.class).to(ThriftHiveMetastore.class).in(Scopes.SINGLETON); if (buildConfigObject(HiveClientConfig.class).getRecordingPath() != null) { binder.bind(ExtendedHiveMetastore.class) .annotatedWith(ForRecordingHiveMetastore.class) .to(BridgingHiveMetastore.class) .in(Scopes.SINGLETON); binder.bind(ExtendedHiveMetastore.class) .annotatedWith(ForCachingHiveMetastore.class) .to(RecordingHiveMetastore.class) .in(Scopes.SINGLETON); newExporter(binder).export(ExtendedHiveMetastore.class) <START> .annotatedWith(ForCachingHiveMetastore.class) <END> .as(generatedNameOf(RecordingHiveMetastore.class, connectorId)); } else { binder.bind(ExtendedHiveMetastore.class) .annotatedWith(ForCachingHiveMetastore.class) .to(BridgingHiveMetastore.class) .in(Scopes.SINGLETON); } binder.bind(ExtendedHiveMetastore.class).to(CachingHiveMetastore.class).in(Scopes.SINGLETON); newExporter(binder).export(HiveMetastore.class) .as(generatedNameOf(ThriftHiveMetastore.class, connectorId)); newExporter(binder).export(ExtendedHiveMetastore.class) .as(generatedNameOf(CachingHiveMetastore.class, connectorId)); }</code><technical_language>change .export(..) - drop . annotatedWith i.e. newExporter(binder).export(RecordingHiveMetastore.class) .as(..</technical_language>

Target:
protected void setup(Binder binder) { binder.bind(HiveMetastoreClientFactory.class).in(Scopes.SINGLETON); binder.bind(HiveCluster.class).to(StaticHiveCluster.class).in(Scopes.SINGLETON); configBinder(binder).bindConfig(StaticMetastoreConfig.class); binder.bind(HiveMetastore.class).to(ThriftHiveMetastore.class).in(Scopes.SINGLETON); if (buildConfigObject(HiveClientConfig.class).getRecordingPath() != null) { binder.bind(ExtendedHiveMetastore.class) .annotatedWith(ForRecordingHiveMetastore.class) .to(BridgingHiveMetastore.class) .in(Scopes.SINGLETON); binder.bind(ExtendedHiveMetastore.class) .annotatedWith(ForCachingHiveMetastore.class) .to(RecordingHiveMetastore.class) .in(Scopes.SINGLETON); binder.bind(RecordingHiveMetastore.class).in(Scopes.SINGLETON); newExporter(binder).export(RecordingHiveMetastore.class) .as(generatedNameOf(RecordingHiveMetastore.class, connectorId)); } else { binder.bind(ExtendedHiveMetastore.class) .annotatedWith(ForCachingHiveMetastore.class) .to(BridgingHiveMetastore.class) .in(Scopes.SINGLETON); } binder.bind(ExtendedHiveMetastore.class).to(CachingHiveMetastore.class).in(Scopes.SINGLETON); newExporter(binder).export(HiveMetastore.class) .as(generatedNameOf(ThriftHiveMetastore.class, connectorId)); newExporter(binder).export(ExtendedHiveMetastore.class) .as(generatedNameOf(CachingHiveMetastore.class, connectorId)); }
Source:
<code>public File mainDefinitionFile() { <START> File m = mainDefinitionFile; <END> if (m == null) { if (parameters == null || parameters.size() == 0) { throw KEMException.criticalError("You have to provide exactly one main file in order to compile."); } m = mainDefinitionFile = files.get().resolveWorkingDirectory(parameters.get(0)); } return m; }</code><technical_language>do need local variable m</technical_language>

Target:
public synchronized File mainDefinitionFile() { if (mainDefinitionFile == null) { if (parameters == null || parameters.size() == 0) { throw KEMException.criticalError("You have to provide exactly one main file in order to compile."); } mainDefinitionFile = files.get().resolveWorkingDirectory(parameters.get(0)); } return mainDefinitionFile; }
Source:
<code>public void typeInEditArea(String text) { waitForDialogVisible(); waitForElementNotVisibleByElement(loadingIndicator); WebElement editArea = dialog.findElement(editAreaBy); waitForElementVisibleByElement(editArea); <START> waitForElementClickableByElement(editArea); <END> editArea.sendKeys(text); waitForValueToBePresentInElementsAttributeByElement(editArea, "value", text); PageObjectLogging.log("typeInEditArea", "Typed " + text, true, driver); }</code><technical_language>double wait</technical_language>

Target:
public void typeInEditArea(String text) { waitForDialogVisible(); waitForElementNotVisibleByElement(loadingIndicator); WebElement editArea = dialog.findElement(editAreaBy); waitForElementClickableByElement(editArea); editArea.sendKeys(text); waitForValueToBePresentInElementsAttributeByElement(editArea, "value", text); PageObjectLogging.log("typeInEditArea", "Typed " + text, true, driver); }
Source:
<code>public void visitReturnStatement(ReturnStatementTree tree) { <START> super.visitReturnStatement(tree); <END> executionState.checkUsageOfClosables(tree.expression()); }</code><technical_language>I doubting this call super: : return new Foo() { //some stuff closing }; new ClassTree checked twice, override of visitNewClass (via call super) checkUsageOfCloseable of expression of return statement</technical_language>

Target:
public void visitReturnStatement(ReturnStatementTree tree) { executionState.checkUsageOfClosables(tree.expression()); }
Source:
<code>public void testonlyObjectReferences() throws Exception { final DefaultConfiguration checkConfig = createCheckConfig(ExplicitInitializationCheck.class); checkConfig.addAttribute("onlyObjectReferences", "true"); final String[] expected = { "5:20: " + getCheckMessage(MSG_KEY, "bar", "null"), "14:22: " + getCheckMessage(MSG_KEY, "str1", "null"), "14:35: " + getCheckMessage(MSG_KEY, "str3", "null"), <START> "15:9: " + getCheckMessage(MSG_KEY, "ar1", "null"), <END> "39:25: " + getCheckMessage(MSG_KEY, "bar", "null"), "40:27: " + getCheckMessage(MSG_KEY, "barArray", "null"), "48:29: " + getCheckMessage(MSG_KEY, "bar", "null"), "49:31: " + getCheckMessage(MSG_KEY, "barArray", "null"), "53:25: " + getCheckMessage(MSG_KEY, "bar", "null"), "54:27: " + getCheckMessage(MSG_KEY, "barArray", "null"), }; verify(checkConfig, getPath("InputExplicitInit.java"), expected); }</code><technical_language>@romani consider arrays, including primitives, objects? This slightly weird, sense assigned null. if issue creator realized this. I mention this in xdoc if this is</technical_language>

Target:
public void testonlyObjectReferences() throws Exception { final DefaultConfiguration checkConfig = createCheckConfig(ExplicitInitializationCheck.class); checkConfig.addAttribute("onlyObjectReferences", "true"); final String[] expected = { "5:20: " + getCheckMessage(MSG_KEY, "bar", "null"), "14:22: " + getCheckMessage(MSG_KEY, "str1", "null"), "14:35: " + getCheckMessage(MSG_KEY, "str3", "null"), "15:9: " + getCheckMessage(MSG_KEY, "ar1", "null"), "39:25: " + getCheckMessage(MSG_KEY, "bar", "null"), "40:27: " + getCheckMessage(MSG_KEY, "barArray", "null"), "48:29: " + getCheckMessage(MSG_KEY, "bar", "null"), "49:31: " + getCheckMessage(MSG_KEY, "barArray", "null"), "53:25: " + getCheckMessage(MSG_KEY, "bar", "null"), "54:27: " + getCheckMessage(MSG_KEY, "barArray", "null"), }; verify(checkConfig, getPath("InputExplicitInitialization.java"), expected); }
Source:
<code>public BaseFilterOperator run() { FilterContext filter = _queryContext.getFilter(); if (filter != null) { BaseFilterOperator filterOperator = constructPhysicalOperator(filter, _queryContext.getDebugOptions()); <START> if (_indexSegment.getValidDocIndex() != null) { <END> BaseFilterOperator validDocFilter = new BitmapBasedFilterOperator(_indexSegment.getValidDocIndex().getValidDocBitmap(), false, _numDocs); return FilterOperatorUtils.getAndFilterOperator(Lists.newArrayList(filterOperator, validDocFilter), _numDocs, _queryContext.getDebugOptions()); } else { return filterOperator; } } else if (_indexSegment.getValidDocIndex() != null) { return new BitmapBasedFilterOperator(_indexSegment.getValidDocIndex().getValidDocBitmap(), false, _numDocs); } else { return new MatchAllFilterOperator(_numDocs); } }</code><technical_language>(nit) Cache _indexSegment.getValidDocIndex() a local variable in line 61</technical_language>

Target:
public BaseFilterOperator run() { FilterContext filter = _queryContext.getFilter(); ValidDocIndexReader validDocIndexReader = _indexSegment.getValidDocIndex(); if (filter != null) { BaseFilterOperator filterOperator = constructPhysicalOperator(filter, _queryContext.getDebugOptions()); if (validDocIndexReader != null) { BaseFilterOperator validDocFilter = new BitmapBasedFilterOperator(validDocIndexReader.getValidDocBitmap(), false, _numDocs); return FilterOperatorUtils.getAndFilterOperator(Arrays.asList(filterOperator, validDocFilter), _numDocs, _queryContext.getDebugOptions()); } else { return filterOperator; } } else if (validDocIndexReader != null) { return new BitmapBasedFilterOperator(validDocIndexReader.getValidDocBitmap(), false, _numDocs); } else { return new MatchAllFilterOperator(_numDocs); } }
Source:
<code>public List<EnsemblTranscript> getEnsemblTranscriptsByTranscriptId(String transcriptId) throws EnsemblTranscriptNotFoundException { List<EnsemblTranscript> transcripts = this.ensemblRepository.findByTranscriptId(transcriptId); <START> if (transcripts.size() == 0) { <END> throw new EnsemblTranscriptNotFoundException(transcriptId, "id"); } return transcripts; }</code><technical_language>a path variable a query variable, returning 404 a list-returning endpoint</technical_language>

Target:
public List<EnsemblTranscript> getEnsemblTranscriptsByTranscriptId(String transcriptId) { return this.ensemblRepository.findByTranscriptId(transcriptId); }
Source:
<code>public void testGestures() { doubleTapZoom(lightboxWrapper); <START> System.out.println("Wrapper"); <END> doubleTapZoom(lightboxInner); System.out.println("Inner"); doubleTapZoom(lightboxContent); System.out.println("Content"); doubleTapZoom(pageWrapper); System.out.println("page wrapper"); }</code><technical_language>Remove system.out.println. logger if needed</technical_language>

Target:
public void testGestures() { doubleTapZoom(lightboxWrapper); doubleTapZoom(lightboxInner); doubleTapZoom(lightboxContent); doubleTapZoom(pageWrapper); PageObjectLogging.log("testGestures", "Double tap zoom was correctly simulated 4 times", true, driver); }
Source:
<code>public void init(SortedKeyValueIterator<Key, Value> source, Map<String, String> options, IteratorEnvironment env) throws IOException { validateOptions(options); event = new EventFields(); this.comparator = getKeyComparator(); this.iterator = source; String eventFieldsOpt = options.get(SELECT_FIELDS); if(eventFieldsOpt != null) <START> selectFields = new HashSet<String>(asList(splitPreserveAllTokens(eventFieldsOpt, NULL_BYTE))); <END> try { if (null != this.skipExpressions && this.skipExpressions.size() != 0) { for (String skip : this.skipExpressions) { String field = skip.substring(0, skip.indexOf(" ") - 1); this.expression = this.expression.replaceAll(skip, field + " == null"); } } this.evaluator = new QueryEvaluator(this.expression); } catch (ParseException e) { throw new IllegalArgumentException("Failed to parse criteria", e); } EventFields.initializeKryo(kryo); }</code><technical_language>simplified prevent unneeded conversion a list. Sets.newHashSet(splitPreserveAllTokens(eventFieldsOpt, NULL_BYTE));</technical_language>

Target:
public void init(SortedKeyValueIterator<Key, Value> source, Map<String, String> options, IteratorEnvironment env) throws IOException { validateOptions(options); event = new EventFields(); this.comparator = getKeyComparator(); this.iterator = source; String eventFieldsOpt = options.get(SELECT_FIELDS); if(eventFieldsOpt != null) selectFields = Sets.newHashSet(splitPreserveAllTokens(eventFieldsOpt, NULL_BYTE)); try { if (null != this.skipExpressions && this.skipExpressions.size() != 0) { for (String skip : this.skipExpressions) { String field = skip.substring(0, skip.indexOf(" ") - 1); this.expression = this.expression.replaceAll(skip, field + " == null"); } } this.evaluator = new QueryEvaluator(this.expression); } catch (ParseException e) { throw new IllegalArgumentException("Failed to parse criteria", e); } EventFields.initializeKryo(kryo); }
Source:
<code>public String getResolvedPropertyName() { <START> return propertyName; <END> }</code><technical_language>missing resolved name for getter case. I thinking need similar property for field store resolved name I missing something</technical_language>

Target:
public String getResolvedPropertyName() { return resolvedPropertyName; }
Source:
<code>public boolean put(@Nullable K key, @Nullable V value) { SpillableArrayListImpl<V> spillableArrayList = getHelper(key); if (spillableArrayList == null) { spillableArrayList = new SpillableArrayListImpl<V>(bucket, serdeKey.serialize(key).buffer, store, serdeValue); cache.put(key, spillableArrayList); } <START> spillableArrayList.add(value); <END> return true; }</code><technical_language>I think, map update in put(), otherwise, size change endWindow()</technical_language>

Target:
public boolean put(@Nullable K key, @Nullable V value) { SpillableArrayListImpl<V> spillableArrayList = getHelper(key); if (spillableArrayList == null) { Slice keyPrefix = SliceUtils.concatenate(identifier, serdeKey.serialize(key)); spillableArrayList = new SpillableArrayListImpl<V>(bucket, keyPrefix.toByteArray(), store, serdeValue); cache.put(key, spillableArrayList); } spillableArrayList.add(value); return true; }