auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void moveFactMapping(int oldIndex, int newIndex) { <START> if (oldIndex < 0 || oldIndex >= factMappings.size()) { <END> throw new IllegalArgumentException(new StringBuilder().append("Index ").append(oldIndex) .append(" not found in the list").toString()); } if (newIndex < 0 || newIndex >= factMappings.size()) { throw new IllegalArgumentException(new StringBuilder().append("Index ").append(newIndex) .append(" out of range").toString()); } FactMapping factMapping = factMappings.get(oldIndex); factMappings.remove(oldIndex); factMappings.add(newIndex, factMapping); }</code><technical_language>oob exception thrown</technical_language>

Target:
public void moveFactMapping(int oldIndex, int newIndex) { if (oldIndex < 0 || oldIndex >= factMappings.size()) { throw new IndexOutOfBoundsException(new StringBuilder().append("Index ").append(oldIndex) .append(" not found in the list").toString()); } if (newIndex < 0 || newIndex >= factMappings.size()) { throw new IndexOutOfBoundsException(new StringBuilder().append("Index ").append(newIndex) .append(" out of range").toString()); } FactMapping factMapping = factMappings.get(oldIndex); factMappings.remove(oldIndex); factMappings.add(newIndex, factMapping); }
Source:
<code>public void onStartup(TimeLockServerConfiguration configuration) { registerPaxosResource(); optionalSecurity = constructOptionalSslSocketFactory(paxosConfiguration); timeLockServerConfiguration = configuration; registerExceptionMappers(); registerLeaderElectionService(configuration); registerHealthCheck(configuration); registerClockMonitor(); Runnable clockSkewMonitor = ClockSkewMonitor.create(remoteServers, optionalSecurity, () -> configuration.enableClockSkewMonitorExperiment().orElse(Boolean.TRUE)); <START> new Thread(clockSkewMonitor, "ClockSkewMonitor").start(); <END> }</code><technical_language>above, this a ScheduledExecutorService</technical_language>

Target:
public void onStartup(TimeLockServerConfiguration configuration) { registerPaxosResource(); optionalSecurity = constructOptionalSslSocketFactory(paxosConfiguration); timeLockServerConfiguration = configuration; registerExceptionMappers(); registerLeaderElectionService(configuration); registerHealthCheck(configuration); registerClockService(); ClockSkewMonitor.create(remoteServers, optionalSecurity).runInBackground(); }
Source:
<code>HardDeleter(StoreConfig config, StoreMetrics metrics, String dataDir, Log log, PersistentIndex index, MessageStoreHardDelete hardDelete, StoreKeyFactory factory, DiskIOScheduler diskIOScheduler, Time time) { this.metrics = metrics; this.dataDir = dataDir; this.log = log; this.index = index; this.hardDelete = hardDelete; this.factory = factory; this.diskIOScheduler = diskIOScheduler; this.time = time; scanSizeInBytes = Math.min(config.storeCleanupOperationsBytesPerSec * 10, 1024 * 1024); <START> messageRetentionSeconds = Math.toIntExact(TimeUnit.DAYS.toSeconds(Integer.toUnsignedLong(config.storeDeletedMessageRetentionDays))); <END> }</code><technical_language>messageRetentionSeconds = TimeUnit.DAYS.toSeconds(config.storeDeletedMessageRetentionDays) suffice</technical_language>

Target:
HardDeleter(StoreConfig config, StoreMetrics metrics, String dataDir, Log log, PersistentIndex index, MessageStoreHardDelete hardDelete, StoreKeyFactory factory, DiskIOScheduler diskIOScheduler, Time time) { this.metrics = metrics; this.dataDir = dataDir; this.log = log; this.index = index; this.hardDelete = hardDelete; this.factory = factory; this.diskIOScheduler = diskIOScheduler; this.time = time; scanSizeInBytes = Math.min(config.storeCleanupOperationsBytesPerSec * 10, 1024 * 1024); messageRetentionSeconds = (int) TimeUnit.DAYS.toSeconds(config.storeDeletedMessageRetentionDays); }
Source:
<code>protected Optional<DyeColor> getFrom(ItemStack dataHolder) { <START> Item item = dataHolder.getItem(); if (item instanceof BlockItem) { Block block = ((BlockItem) item).getBlock(); net.minecraft.item.DyeColor color = ((DyeColorBlockBridge) block).bridge$getDyeColor(); return Optional.ofNullable((DyeColor) (Object) color); <END> } return Optional.empty(); }</code><technical_language>suggestion final Item item = dataHolder.getItem(); if (item instanceof BlockItem) { final Block block = ((BlockItem) item).getBlock(); return ((DyeColorBlockBridge) block)..bridge$getDyeColor(); This optional provided bridge implementation</technical_language>

Target:
protected Optional<DyeColor> getFrom(ItemStack dataHolder) { Item item = dataHolder.getItem(); if (item instanceof BlockItem) { final Block block = ((BlockItem) item).getBlock(); return ((DyeColorBlockBridge) block).bridge$getDyeColor(); } return Optional.empty(); }
Source:
<code>CustomCommandLine.Builder createProtoCompilerCommandLine() throws InterruptedException { CustomCommandLine.Builder result = CustomCommandLine.builder(); if (langPlugin != null) { result.addFormatted( "--plugin=protoc-gen-%s=%s", langPrefix, langPlugin.getExecutable().getExecPath()); } if (langPluginParameter != null) { result.addLazyString(new LazyLangPluginFlag(langPrefix, langPluginParameter)); } result.addAll(ruleContext.getFragment(ProtoConfiguration.class).protocOpts()); boolean areDepsStrict = areDepsStrict(ruleContext); boolean siblingRepositoryLayout = ruleContext .getAnalysisEnvironment() .getSkylarkSemantics() .experimentalSiblingRepositoryLayout(); addIncludeMapArguments( result, <START> areDepsStrict ? protoInfo.getImportableProtos() : null, <END> protoInfo.getTransitiveProtos()); if (areDepsStrict) { result.addFormatted(STRICT_DEPS_FLAG_TEMPLATE, ruleContext.getLabel()); } for (Artifact src : protoInfo.getDirectProtoSources()) { result.addPath(src.getExecPath()); } if (!hasServices) { result.add("--disallow_services"); } if (checkStrictImportPublic) { NestedSet<Pair<PathFragment, ImmutableList<Artifact>>> exportedProtos = protoInfo.getExportedProtos(); if (exportedProtos.isEmpty()) { result.add("--allowed_public_imports="); } else { result.addAll( "--allowed_public_imports", VectorArg.join(":").each(exportedProtos).mapped(new ExpandToImportPathsArgsFn())); } } if (additionalCommandLineArguments != null) { result.addAll(ImmutableList.copyOf(additionalCommandLineArguments)); } return result; }</code><technical_language>Mind removing siblingRepositoryLayout variable line 266? (it's unused I tell)</technical_language>

Target:
CustomCommandLine.Builder createProtoCompilerCommandLine() { CustomCommandLine.Builder result = CustomCommandLine.builder(); if (langPlugin != null) { result.addFormatted( "--plugin=protoc-gen-%s=%s", langPrefix, langPlugin.getExecutable().getExecPath()); } if (langPluginParameter != null) { result.addLazyString(new LazyLangPluginFlag(langPrefix, langPluginParameter)); } result.addAll(ruleContext.getFragment(ProtoConfiguration.class).protocOpts()); boolean areDepsStrict = areDepsStrict(ruleContext); addIncludeMapArguments( result, areDepsStrict ? protoInfo.getStrictImportableSources() : null, protoInfo.getTransitiveSources()); if (areDepsStrict) { result.addFormatted(STRICT_DEPS_FLAG_TEMPLATE, ruleContext.getLabel()); } for (Artifact src : protoInfo.getDirectProtoSources()) { result.addPath(src.getExecPath()); } if (!hasServices) { result.add("--disallow_services"); } if (checkStrictImportPublic) { NestedSet<ProtoSource> publicImportSources = protoInfo.getPublicImportSources(); if (publicImportSources.isEmpty()) { result.add("--allowed_public_imports="); } else { result.addAll( "--allowed_public_imports", VectorArg.join(":") .each(publicImportSources) .mapped(EXPAND_TO_IMPORT_PATHS)); } } if (additionalCommandLineArguments != null) { result.addAll(ImmutableList.copyOf(additionalCommandLineArguments)); } return result; }
Source:
<code>public final Object getValue(Tuple tuple, PDataType type, ImmutableBytesWritable ptr) throws SQLException { <START> return getValue(tuple, type, ptr, -1); <END> }</code><technical_language>Remove this change please, necessary</technical_language>

Target:
public final Object getValue(Tuple tuple, PDataType type, ImmutableBytesWritable ptr) throws SQLException { Expression expression = getExpression(); if (!expression.evaluate(tuple, ptr)) { return null; } if (ptr.getLength() == 0) { return null; } return type.toObject(ptr, expression.getDataType(), expression.getColumnModifier()); }
Source:
<code>public BaseSingletonDOMElementFactory getDOMElementFactory(String className, ScenarioSimulationModel.Type modelType, FactMappingValueType valueType) { boolean isRuleScenario = Objects.equals(ScenarioSimulationModel.Type.RULE, modelType); <START> if (ScenarioSimulationSharedUtils.isCollection(className)) { <END> return collectionEditorSingletonDOMElementFactory; } if (Objects.equals(FactMappingValueType.EXPRESSION, valueType) && isRuleScenario) { return scenarioExpressionCellTextAreaSingletonDOMElementFactory; } return scenarioCellTextAreaSingletonDOMElementFactory; }</code><technical_language>is reach this code valueType == FactMappingValueType.EXPRESSION? If is add additional condition mapped object (i.e. a top level list of string in DMN) column show normal edit mode</technical_language>

Target:
public BaseSingletonDOMElementFactory getDOMElementFactory(String className, ScenarioSimulationModel.Type modelType, FactMappingValueType valueType) { boolean isRuleScenario = Objects.equals(ScenarioSimulationModel.Type.RULE, modelType); if (ScenarioSimulationSharedUtils.isCollection(className) && Objects.equals(FactMappingValueType.NOT_EXPRESSION, valueType)) { return collectionEditorSingletonDOMElementFactory; } if (Objects.equals(FactMappingValueType.EXPRESSION, valueType) && isRuleScenario) { return scenarioExpressionCellTextAreaSingletonDOMElementFactory; } return scenarioCellTextAreaSingletonDOMElementFactory; }
Source:
<code>protected void configure() { Multibinder<ServicePlugin> plugins = Multibinder.newSetBinder(binder(), ServicePlugin.class); plugins.addBinding().toInstance(Plugins.of(new HttpBackend(port))); bind(ObjectValidator.class).to(ApacheObjectValidator.class).in(Singleton.class); install(new ServletModule() { @Override protected void configureServlets() { bind(TestServlet.class).in(Singleton.class); serve("/test").with(TestServlet.class); } }); install(new SitebricksModule() { @Override protected void configureSitebricks() { at("/testservice").serve(ExampleService.class); at("/r/controllers").serve(ApControllerService.class); at("/r/aps").serve(AccessPointService.class); at("/r/operators").serve(OperatorService.class); at("/r/roaming-groups").serve(RoamingGroupService.class); at("/r/venues").serve(VenueService.class); <START> <END> at("/r/service-providers").serve(ServiceProviderEndpoint.class); } }); bindInterceptor(annotatedWith(Service.class), returns(only(Reply.class)), new HttpRequestErrorReporter("Internal Server Error")); }</code><technical_language>add empty line</technical_language>

Target:
protected void configure() { Multibinder<ServicePlugin> plugins = Multibinder.newSetBinder(binder(), ServicePlugin.class); plugins.addBinding().toInstance(Plugins.of(new HttpBackend(port))); bind(ObjectValidator.class).to(ApacheObjectValidator.class).in(Singleton.class); install(new ServletModule() { @Override protected void configureServlets() { bind(TestServlet.class).in(Singleton.class); serve("/test").with(TestServlet.class); } }); install(new SitebricksModule() { @Override protected void configureSitebricks() { at("/testservice").serve(ExampleService.class); at("/r/controllers").serve(ApControllerEndpoint.class); at("/r/aps").serve(AccessPointEndpoint.class); at("/r/operators").serve(OperatorEndpoint.class); at("/r/roaming-groups").serve(RoamingGroupEndpoint.class); at("/r/venues").serve(VenueEndpoint.class); at("/r/ip-types").serve(IpTypeService.class); at("/r/auth-types").serve(AuthTypeEndpoint.class); at("/r/service-providers").serve(ServiceProviderEndpoint.class); } }); bindInterceptor(annotatedWith(Service.class), returns(only(Reply.class)), new HttpRequestErrorReporter("Internal Server Error")); }
Source:
<code>PartitionByOperatorSpec(OutputStreamImpl<KV<K, V>> outputStream, MapFunction<? super M, ? extends K> keyFunction, MapFunction<? super M, ? extends V> valueFunction, String opId) { super(OpCode.PARTITION_BY, opId); checkArgument(!(keyFunction instanceof TimerFunction || keyFunction instanceof WatermarkFunction), <START> "A partitionBy operator does not accept a user defined TimerFunction or WatermarkFunction as the keyFunction."); <END> checkArgument(!(valueFunction instanceof TimerFunction || valueFunction instanceof WatermarkFunction), "A partitionBy operator does not accept a user defined TimerFunction or WatermarkFunction as the valueFunction."); this.outputStream = outputStream; this.keyFunction = keyFunction; this.valueFunction = valueFunction; }</code><technical_language>Maybe: "keyFunction for partitionBy implement TimerFunction WatermarkFunction."</technical_language>

Target:
PartitionByOperatorSpec(OutputStreamImpl<KV<K, V>> outputStream, MapFunction<? super M, ? extends K> keyFunction, MapFunction<? super M, ? extends V> valueFunction, String opId) { super(OpCode.PARTITION_BY, opId); checkArgument(!(keyFunction instanceof TimerFunction || keyFunction instanceof WatermarkFunction), "keyFunction for partitionBy should not implement TimerFunction or WatermarkFunction."); checkArgument(!(valueFunction instanceof TimerFunction || valueFunction instanceof WatermarkFunction), "valueFunction for partitionBy should not implement TimerFunction or WatermarkFunction."); this.outputStream = outputStream; this.keyFunction = keyFunction; this.valueFunction = valueFunction; }
Source:
<code>private void onLocalReplaysWatchEvent(WatchKey key) { List<CompletableFuture<Replay>> newReplaysFutures = new ArrayList<CompletableFuture<Replay>>(); Collection<Replay> deletedReplays = new ArrayList<Replay>(); for (WatchEvent<?> watchEvent : key.pollEvents()) { Path path = (Path) watchEvent.context(); Path fullPathToReplay = preferencesService.getReplaysDirectory().resolve(path); if (watchEvent.kind() == ENTRY_CREATE) { newReplaysFutures.add(tryLoadingLocalReplay(fullPathToReplay)); } else if (watchEvent.kind() == ENTRY_DELETE) { Optional<Replay> existingReplay = localReplays .stream() .filter(replay -> replay.getReplayFile().compareTo(fullPathToReplay) == 0) .findFirst(); if (existingReplay.isPresent()) { Replay deletedReplay = existingReplay.get(); deletedReplays.add(deletedReplay); localReplays.remove(deletedReplay); } } } CompletableFuture[] replayFuturesArray = newReplaysFutures.toArray(new CompletableFuture[newReplaysFutures.size()]); CompletableFuture<List<Replay>> newReplaysFuture = CompletableFuture.allOf(replayFuturesArray) <START> .thenApply(ignoredVoid -> <END> newReplaysFutures.stream() .map(future -> future.join()) .collect(Collectors.toList()) ); try { List<Replay> newReplays = newReplaysFuture.get(); localReplays.addAll(newReplays); publisher.publishEvent(new LocalReplaysChangedEvent(this, newReplays, deletedReplays)); } catch (Exception e) { logger.warn("Failed to load new local replays ({})", e.getMessage()); } }</code><technical_language>thenRun</technical_language>

Target:
protected void onLocalReplaysWatchEvent(WatchKey key) { List<CompletableFuture<Replay>> newReplaysFutures = new ArrayList<CompletableFuture<Replay>>(); Collection<Replay> deletedReplays = new ArrayList<Replay>(); for (WatchEvent<?> watchEvent : key.pollEvents()) { Path path = (Path) watchEvent.context(); Path fullPathToReplay = preferencesService.getReplaysDirectory().resolve(path); if (watchEvent.kind() == ENTRY_CREATE) { newReplaysFutures.add(tryLoadingLocalReplay(fullPathToReplay)); } else if (watchEvent.kind() == ENTRY_DELETE) { Optional<Replay> existingReplay = localReplays .stream() .filter(replay -> replay.getReplayFile().compareTo(fullPathToReplay) == 0) .findFirst(); if (existingReplay.isPresent()) { Replay deletedReplay = existingReplay.get(); deletedReplays.add(deletedReplay); localReplays.remove(deletedReplay); } } } CompletableFuture[] replayFuturesArray = newReplaysFutures.toArray(new CompletableFuture[newReplaysFutures.size()]); CompletableFuture<List<Replay>> newReplaysFuture = CompletableFuture.allOf(replayFuturesArray) .thenApply(ignoredVoid -> newReplaysFutures.stream() .map(CompletableFuture::join) .filter(Objects::nonNull) .collect(Collectors.toList()) ); try { List<Replay> newReplays = newReplaysFuture.get(); localReplays.addAll(newReplays); publisher.publishEvent(new LocalReplaysChangedEvent(this, newReplays, deletedReplays)); } catch (Exception e) { logger.warn("Failed to load new local replays ({})", e.getMessage()); } }
Source:
<code>public static List<ExtMap> fetchPrincipalsByIdsRecursively( final ExtensionProxy extension, final String namespace, final List<String> ids) { Map<String, ExtMap> groupsCache = new HashMap<>(); Set<String> idsToFetch = new HashSet<>(); List<ExtMap> principals = findPrincipalsByIds(extension, namespace, ids, true, false); for (ExtMap principal : principals) { for (ExtMap memberOf : principal.get(PrincipalRecord.GROUPS, Collections.<ExtMap> emptyList())) { idsToFetch.add(memberOf.<String> get(PrincipalRecord.ID)); } } while (!idsToFetch.isEmpty()) { List<ExtMap> groups = findGroupRecordsByIds(extension, namespace, new ArrayList<String>(idsToFetch), true, false); idsToFetch.clear(); for (ExtMap group : groups) { groupsCache.put(group.<String> get(GroupRecord.ID), group); for (ExtMap memberOf : group.get(GroupRecord.GROUPS, Collections.<ExtMap> emptyList())) { if (!groupsCache.containsKey(memberOf.get(GroupRecord.ID))) { idsToFetch.add(memberOf.<String> get(GroupRecord.ID)); } } } } for (ExtMap principal : principals) { List<ExtMap> groups = new ArrayList<>(); for (ExtMap memberOf : principal.get(PrincipalRecord.GROUPS, Collections.<ExtMap> emptyList())) { groups.add(groupsCache.get(memberOf.get(GroupRecord.ID))); } principal.put(PrincipalRecord.GROUPS, groups); constructGroupsMembershipTree(groups, groupsCache); <START> } <END> return principals; }</code><technical_language>this loop constructGroupsMembershipTree, provided add key argument, DirectoryUtils::flatGroups for example done</technical_language>

Target:
public static List<ExtMap> fetchPrincipalsByIdsRecursively( final ExtensionProxy extension, final String namespace, final List<String> ids) { Map<String, ExtMap> groupsCache = new HashMap<>(); Set<String> idsToFetch = new HashSet<>(); List<ExtMap> principals = findPrincipalsByIds(extension, namespace, ids, true, false); for (ExtMap principal : principals) { for (ExtMap memberOf : principal.get(PrincipalRecord.GROUPS, Collections.<ExtMap> emptyList())) { idsToFetch.add(memberOf.<String> get(GroupRecord.ID)); } } while (!idsToFetch.isEmpty()) { List<ExtMap> groups = findGroupRecordsByIds(extension, namespace, new ArrayList<String>(idsToFetch), true, false); idsToFetch.clear(); for (ExtMap group : groups) { groupsCache.put(group.<String> get(GroupRecord.ID), group); for (ExtMap memberOf : group.get(GroupRecord.GROUPS, Collections.<ExtMap> emptyList())) { if (!groupsCache.containsKey(memberOf.get(GroupRecord.ID))) { idsToFetch.add(memberOf.<String> get(GroupRecord.ID)); } } } } for (ExtMap principal : principals) { constructGroupsMembershipTree(principal, PrincipalRecord.GROUPS, groupsCache); } return principals; }
Source:
<code>public void drawText (String string, int x, int y, int flags) { if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); NSAutoreleasePool pool = checkGC(CLIPPING | TRANSFORM | FONT | FOREGROUND_FILL); try { int length = string.length(); if (length == 0) return; boolean mode = true; switch (data.textAntialias) { case SWT.DEFAULT: if (!handle.isDrawingToScreen()) mode = false; break; case SWT.OFF: mode = false; break; case SWT.ON: mode = true; break; } handle.saveGraphicsState(); handle.setShouldAntialias(mode); <START> if (length == 1 && flags == SWT.DRAW_TRANSPARENT) { <END> doFastDrawText(string, x, y); } else { doDrawText(string, x, y, flags); } handle.restoreGraphicsState(); } finally { uncheckGC(pool); } }</code><technical_language>check (flags & SWT.DRAW_TRANSPARENT) != 0)</technical_language>

Target:
public void drawText (String string, int x, int y, int flags) { if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); NSAutoreleasePool pool = checkGC(CLIPPING | TRANSFORM | FONT | FOREGROUND_FILL); try { int length = string.length(); if (length == 0) return; boolean mode = true; switch (data.textAntialias) { case SWT.DEFAULT: if (!handle.isDrawingToScreen()) mode = false; break; case SWT.OFF: mode = false; break; case SWT.ON: mode = true; break; } handle.saveGraphicsState(); handle.setShouldAntialias(mode); if (length == 1 && (flags & SWT.DRAW_TRANSPARENT) != 0) { doFastDrawText(string, x, y); } else { doDrawText(string, x, y, flags); } handle.restoreGraphicsState(); } finally { uncheckGC(pool); } }
Source:
<code>public Void visitTableScan(TableScanNode node, Context context) { TableHandle tableHandle = node.getTable(); Set<Column> columns = new HashSet<>(); for (ColumnHandle columnHandle : node.getAssignments().values()) { columns.add(createColumn(metadata.getColumnMetadata(session, tableHandle, columnHandle))); } <START> Optional<TableStatistics> tableStats = Optional.empty(); <END> if (context.extractStats()) { Constraint<ColumnHandle> constraint = new Constraint<>(node.getCurrentConstraint()); tableStats = Optional.of(metadata.getTableStatistics(session, tableHandle, constraint)); } inputs.add(createInput(metadata.getTableMetadata(session, tableHandle), tableHandle, columns, tableStats)); return null; }</code><technical_language>nit: statistics</technical_language>

Target:
public Void visitTableScan(TableScanNode node, Context context) { TableHandle tableHandle = node.getTable(); Set<Column> columns = new HashSet<>(); for (ColumnHandle columnHandle : node.getAssignments().values()) { columns.add(createColumn(metadata.getColumnMetadata(session, tableHandle, columnHandle))); } Set<ColumnHandle> desiredColumns = node.getAssignments().values().stream().collect(toImmutableSet()); Optional<TableStatistics> statistics = Optional.empty(); if (context.isExtractStatistics()) { Constraint<ColumnHandle> constraint = new Constraint<>(node.getCurrentConstraint()); TableStatistics tableStatistics = metadata.getTableStatistics(session, tableHandle, constraint); statistics = Optional.of(pruneStatistics(tableStatistics, desiredColumns)); } inputs.add(createInput(metadata.getTableMetadata(session, tableHandle), tableHandle, columns, statistics)); return null; }
Source:
<code>protected Object joinOldAndNewValues(Object oldValue, Object newValue) { if ((oldValue instanceof Map) && (newValue instanceof Map)) { return combineCurrentAndResolvedValueMaps((Map) oldValue, (Map) newValue); } else if ((oldValue instanceof List) && (newValue instanceof List)) { return combineCurrentAndResolvedValueList((List) oldValue, (List) newValue); } else if ((oldValue instanceof String) && (newValue instanceof String)) { return newValue; } else { <START> LOG.warn("Types of oldValue and newValue are not the same, so is not able " + <END> "to join them. Then, new type will be returned ", new Object[]{oldValue, newValue, this}); return newValue; } }</code><technical_language>This worth a warning - trace, debug. I need special case String either</technical_language>

Target:
protected Object joinOldAndNewValues(Object oldValue, Object newValue) { if ((oldValue instanceof Map) && (newValue instanceof Map)) { return combineCurrentAndResolvedValueMaps((Map) oldValue, (Map) newValue); } else if ((oldValue instanceof List) && (newValue instanceof List)) { return combineCurrentAndResolvedValueList((List) oldValue, (List) newValue); } else { LOG.debug("Types of oldValue and newValue are not the same, so is not able " + "to join them. Then, new type will be returned ", new Object[]{oldValue, newValue, this}); return newValue; } }
Source:
<code>private String httpGet(URL url) throws IOException { int currentTry; HttpURLConnection conn; int delaySeconds = 1; for (currentTry = 0; currentTry < NUMBER_OF_RETRIES; currentTry++) { conn = Util.getHttpConnection(url, TIMEOUT); try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) { if (conn.getResponseCode() != HTTP_OK) { log.warn("HTTP error fetching url {}. Returned status code {}", url.toString(), conn.getResponseCode()); throw new IOException(String.format("HTTP error fetching url %s. Returned status code %d", url.toString(), conn.getResponseCode())); } else { return br.lines().collect(Collectors.joining()); } } catch (Exception e) { try { Thread.sleep(TimeUnit.SECONDS.toMillis(delaySeconds)); delaySeconds = delaySeconds * BACKOFF_MULTIPLIER; } catch (InterruptedException ignored) { } } } <START> throw new IOException("Could not get a response from the container heartbeat endpoint"); <END> }</code><technical_language>log queryUrl exception</technical_language>

Target:
String httpGet(URL url) throws IOException { HttpURLConnection conn; int delayMillis = 1000; for (int currentTry = 0; currentTry < NUM_RETRIES; currentTry++) { conn = Util.getHttpConnection(url, TIMEOUT_MS); try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) { if (conn.getResponseCode() != HttpURLConnection.HTTP_OK) { throw new IOException(String.format("HTTP error fetching url %s. Returned status code %d", url.toString(), conn.getResponseCode())); } else { return br.lines().collect(Collectors.joining()); } } catch (Exception e) { LOG.error("Error in heartbeat request", e); sleepUninterruptibly(delayMillis); delayMillis = delayMillis * BACKOFF_MULTIPLIER; } } throw new IOException(String.format("Error fetching url: %s. Tried %d time(s).", url.toString(), NUM_RETRIES)); }
Source:
<code>public Iterable<Template> listImages() { Set<String> projects = ImmutableSet.copyOf(transform(projectSupplier.get().values(), new Function<Project, String>() { @Override public String apply(Project project) { return project.getId(); } })); <START> return filter(concat(transform(ImmutableSet.<String> builder().addAll(projects).add("").build(), <END> allTemplatesForProject())), isReady()); }</code><technical_language>reason for immutable sets builders here? making projects a newHashMap, simply adding "" transforming that</technical_language>

Target:
public Iterable<Template> listImages() { TemplateApi templateApi = client.getTemplateApi(); ImmutableSet.Builder<Template> templates = ImmutableSet.builder(); templates.addAll(templateApi.listTemplates()); for (String project : projectSupplier.get().keySet()) { templates.addAll(templateApi.listTemplates(ListTemplatesOptions.Builder.projectId(project))); } return filter(templates.build(), isReady()); }
Source:
<code>public void execute(final Object message) throws Exception { final MediaGroupResponse<CollectedResult> asrResponse = (MediaGroupResponse<CollectedResult>) message; final List<NameValuePair> parameters = parameters(); <START> parameters.add(new BasicNameValuePair("UnstableSpeechResult", asrResponse.get().getResult())); <END> final NotificationsDao notifications = storage.getNotificationsDao(); execHttpRequest(notifications, verb.attribute(GatherAttributes.ATTRIBUTE_PARTIAL_RESULT_CALLBACK), verb.attribute(GatherAttributes.ATTRIBUTE_PARTIAL_RESULT_CALLBACK_METHOD), parameters); }</code><technical_language>Name of this parameter *UnstableSpeechResult* is confusing. this *PartialSpeechResult*. declare private static final string</technical_language>

Target:
public void execute(final Object message) throws Exception { if (verb.attribute(GatherAttributes.ATTRIBUTE_PARTIAL_RESULT_CALLBACK) != null && !StringUtils.isEmpty(verb.attribute(GatherAttributes.ATTRIBUTE_PARTIAL_RESULT_CALLBACK).value())) { final MediaGroupResponse<CollectedResult> asrResponse = (MediaGroupResponse<CollectedResult>) message; final List<NameValuePair> parameters = parameters(); parameters.add(new BasicNameValuePair("UnstableSpeechResult", asrResponse.get().getResult())); final NotificationsDao notifications = storage.getNotificationsDao(); execHttpRequest(notifications, verb.attribute(GatherAttributes.ATTRIBUTE_PARTIAL_RESULT_CALLBACK), verb.attribute(GatherAttributes.ATTRIBUTE_PARTIAL_RESULT_CALLBACK_METHOD), parameters); } }
Source:
<code>private MessageInfo delete(MockId idToDelete) throws StoreException { MessageInfo putMsgInfo = allKeys.get(idToDelete).getFirst(); MessageInfo info = new MessageInfo(idToDelete, DELETE_RECORD_SIZE, putMsgInfo.getAccountId(), putMsgInfo.getContainerId(), <START> Utils.Infinite_Time); <END> ByteBuffer buffer = ByteBuffer.allocate(DELETE_RECORD_SIZE); store.delete(new MockMessageWriteSet(Collections.singletonList(info), Collections.singletonList(buffer))); deletedKeys.add(idToDelete); return info; }</code><technical_language>Utils.Infinite_Time - this a randomly gen value</technical_language>

Target:
private MessageInfo delete(MockId idToDelete) throws StoreException { MessageInfo putMsgInfo = allKeys.get(idToDelete).getFirst(); MessageInfo info = new MessageInfo(idToDelete, DELETE_RECORD_SIZE, putMsgInfo.getAccountId(), putMsgInfo.getContainerId(), time.milliseconds()); ByteBuffer buffer = ByteBuffer.allocate(DELETE_RECORD_SIZE); store.delete(new MockMessageWriteSet(Collections.singletonList(info), Collections.singletonList(buffer))); deletedKeys.add(idToDelete); return info; }
Source:
<code>public void renameSupplementaryFolder(String newName) { IFolder oldSupplFolder = getTraceSupplementaryFolder(getResourceName()); IFolder newSupplFolder = getTraceSupplementaryFolder(newName + getSuffix()); if (oldSupplFolder.exists()) { try { oldSupplFolder.move(newSupplFolder.getFullPath(), true, new NullProgressMonitor()); } catch (CoreException e) { <START> Activator.getDefault().logError("Error renaming supplementary folder " + oldSupplFolder, e); END> } } }</code><technical_language>externalize</technical_language>

Target:
public void renameSupplementaryFolder(String newName) { IFolder oldSupplFolder = getTraceSupplementaryFolder(getResourceName()); IFolder newSupplFolder = getTraceSupplementaryFolder(newName + getSuffix()); if (oldSupplFolder.exists()) { try { oldSupplFolder.move(newSupplFolder.getFullPath(), true, new NullProgressMonitor()); } catch (CoreException e) { Activator.getDefault().logError(Messages.TmfCommonProjectElement_ErrorRenamingSF + oldSupplFolder, e); } } }
Source:
<code>public void preStart() throws Exception { super.preStart(); final String actorName = getSelf().path().name(); final Optional<JobRef<?>> ref = _refSerializer.entityIDtoJobRef(actorName); if (ref.isPresent()) { final JobRef<T> castRef = unsafeJobRefCast(ref.get()); LOGGER.info() .setMessage("inferred job ref from name, triggering reload") .addData("jobRef", castRef.toString()) .log(); <START> reload(new Reload.Builder<T>().setJobRef(castRef).build()); <END> return; } LOGGER.warn() .setMessage("could not infer job ref from name, refSerializer could be configured incorrectly.") .addData("actorName", actorName) .log(); }</code><technical_language>Is safe call reload in preStart sending a reload message itself? this new scheme for job actors, do need send a reload message actor creation all? completely redundant. Right? If route, warn error kill actor (send msg)</technical_language>

Target:
public void preStart() throws Exception { super.preStart(); final String actorName = getSelf().path().name(); try { final JobRef<T> ref = unsafeJobRefCast(_refDeserializer.deserialize(actorName)); LOGGER.info() .setMessage("inferred job ref from name, triggering reload") .addData("jobRef", ref.toString()) .log(); getSelf().tell(new Reload.Builder<T>().setJobRef(ref).build(), getSelf()); } catch (final DeserializationException e) { LOGGER.warn() .setMessage("could not infer job ref from name, the actor could have been started incorrectly.") .setThrowable(e) .addData("actorName", actorName) .log(); killSelf(); } }
Source:
<code>public void testRebalanceWithFirstNodeStop() throws Exception { try { verifyRebalanceWith3rdNode(); setAttribute(provider(0), LOCAL_TOPOLOGY_MANAGER, REBALANCE_ENABLED_ATTR_NAME, false); controller.stop(CONTAINER1); <START> checkRpcManagerStatistics(new String[]{"N/A", OWNERS_2_MEMBERS_NODE2_NODE3}, OWNERS_2_MEMBERS_NODE2_NODE3, provider(1), provider(2)); <END> checkRebalanceStatus(false, provider(1), provider(2)); assertTrue(numEntries(server2, HOTROD_CACHE_NAME) < NUMBER_ENTRIES); assertTrue(numEntries(server3, HOTROD_CACHE_NAME) < NUMBER_ENTRIES); assertTrue(numEntries(server2, MEMCACHED_CACHE_NAME) < NUMBER_ENTRIES); assertTrue(numEntries(server3, MEMCACHED_CACHE_NAME) < NUMBER_ENTRIES); setAttribute(provider(1), LOCAL_TOPOLOGY_MANAGER, REBALANCE_ENABLED_ATTR_NAME, true); checkRebalanceStatus(true, provider(1), provider(2)); checkRpcManagerStatistics(new String[]{"N/A", OWNERS_2_MEMBERS_NODE2_NODE3}, OWNERS_2_MEMBERS_NODE2_NODE3, provider(1), provider(2)); assertTrue(numEntries(server2, HOTROD_CACHE_NAME) == NUMBER_ENTRIES); assertTrue(numEntries(server3, HOTROD_CACHE_NAME) == NUMBER_ENTRIES); assertTrue(numEntries(server2, MEMCACHED_CACHE_NAME) == NUMBER_ENTRIES); assertTrue(numEntries(server3, MEMCACHED_CACHE_NAME) == NUMBER_ENTRIES); } finally { controller.stop(CONTAINER3); } }</code><technical_language>explain change null N/A</technical_language>

Target:
public void testRebalanceWithFirstNodeStop() throws Exception { try { verifyRebalanceWith3rdNode(); setAttribute(provider(0), LOCAL_TOPOLOGY_MANAGER, REBALANCE_ENABLED_ATTR_NAME, false); controller.stop(CONTAINER1); checkRpcManagerStatistics(new String[]{"null", OWNERS_2_MEMBERS_NODE2_NODE3}, OWNERS_2_MEMBERS_NODE2_NODE3, provider(1), provider(2)); checkRebalanceStatus(false, provider(1), provider(2)); assertTrue(numEntries(server2, HOTROD_CACHE_NAME) < NUMBER_ENTRIES); assertTrue(numEntries(server3, HOTROD_CACHE_NAME) < NUMBER_ENTRIES); assertTrue(numEntries(server2, MEMCACHED_CACHE_NAME) < NUMBER_ENTRIES); assertTrue(numEntries(server3, MEMCACHED_CACHE_NAME) < NUMBER_ENTRIES); setAttribute(provider(1), LOCAL_TOPOLOGY_MANAGER, REBALANCE_ENABLED_ATTR_NAME, true); checkRebalanceStatus(true, provider(1), provider(2)); checkRpcManagerStatistics(new String[]{"null", OWNERS_2_MEMBERS_NODE2_NODE3}, OWNERS_2_MEMBERS_NODE2_NODE3, provider(1), provider(2)); assertTrue(numEntries(server2, HOTROD_CACHE_NAME) == NUMBER_ENTRIES); assertTrue(numEntries(server3, HOTROD_CACHE_NAME) == NUMBER_ENTRIES); assertTrue(numEntries(server2, MEMCACHED_CACHE_NAME) == NUMBER_ENTRIES); assertTrue(numEntries(server3, MEMCACHED_CACHE_NAME) == NUMBER_ENTRIES); } finally { controller.stop(CONTAINER3); } }
Source:
<code>private boolean checkForDeterministicAndRerunTestQueriesIfNeeded() { int hashPartitionCount = defaultHashPartitionCount; <START> if (sessionProperties.containsKey(HASH_PARTITION_COUNT) && sessionProperties.get(HASH_PARTITION_COUNT) != null) { <END> hashPartitionCount = Integer.parseInt(sessionProperties.get(HASH_PARTITION_COUNT)); } if (hashPartitionCount > 1) { hasNewSessionProperties = true; Map<String, String> mutableCopy = new HashMap<>(sessionProperties); mutableCopy.put(HASH_PARTITION_COUNT, String.valueOf(hashPartitionCount - 1)); sessionPropertiesTemp = ImmutableMap.copyOf(mutableCopy); } for (int i = 0; i < 3; i++) { QueryResult results = executeQueryControl(); if (results.getState() != State.SUCCESS) { return false; } if (!resultsMatch(controlResult, results, precision)) { deterministic = false; return false; } } for (int i = 0; i < 3; i++) { testResult = executeQueryTest(); if (testResult.getState() != State.SUCCESS) { return false; } if (!resultsMatch(controlResult, testResult, precision)) { return false; } } return true; }</code><technical_language>I need check condition</technical_language>

Target:
private boolean checkForDeterministicAndRerunTestQueriesIfNeeded() { int hashPartitionCount = defaultHashPartitionCount; Map<String, String> sessionPropertiesOverride = null; if (sessionProperties.get(HASH_PARTITION_COUNT) != null) { hashPartitionCount = Integer.parseInt(sessionProperties.get(HASH_PARTITION_COUNT)); } if (hashPartitionCount > 1) { sessionPropertiesOverride = new HashMap<>(sessionProperties); sessionPropertiesOverride.put(HASH_PARTITION_COUNT, String.valueOf(hashPartitionCount - 1)); } for (int i = 0; i < 3; i++) { QueryResult results = executeQueryControl(sessionPropertiesOverride); if (results.getState() != State.SUCCESS) { return false; } if (!resultsMatch(controlResult, results, precision)) { deterministic = false; return false; } } for (int i = 0; i < 3; i++) { testResult = executeQueryTest(sessionPropertiesOverride); if (testResult.getState() != State.SUCCESS) { return false; } if (!resultsMatch(controlResult, testResult, precision)) { return false; } } return true; }
Source:
<code>public void start() throws InstantiationException { logger.info("Netty server starting up"); <START> bossGroup = new NioEventLoopGroup(serverConfig.getBossThreadCount()); <END> workerGroup = new NioEventLoopGroup(serverConfig.getWorkerThreadCount()); try { AtomicReference<Exception> startupException = new AtomicReference<Exception>(); NettyServerDeployer nettyServerDeployer = new NettyServerDeployer(startupException); Thread deploymentThread = new Thread(nettyServerDeployer); deploymentThread.start(); long startWaitSecs = serverConfig.getStartupWaitSeconds(); if (!(nettyServerDeployer.awaitStartup(startWaitSecs, TimeUnit.SECONDS))) { throw new InstantiationException("Netty server failed to start in " + startWaitSecs + " seconds"); } else if (startupException.get() != null) { throw new InstantiationException("Netty server start failed - " + startupException.get()); } } catch (InterruptedException e) { logger.error("Netty server start might have failed - " + e); throw new InstantiationException("Netty server start might have failed - " + e); } }</code><technical_language>this done in constructor this final</technical_language>

Target:
public void start() throws InstantiationException { if (!nettyServerDeployerThread.isAlive()) { logger.info("Starting NettyServer.."); try { nettyServerDeployerThread.start(); if (!(nettyServerDeployer.awaitStartup(nettyConfig.nettyServerStartupWaitSeconds, TimeUnit.SECONDS))) { throw new InstantiationException( "NettyServer failed to start in " + nettyConfig.nettyServerStartupWaitSeconds + " seconds"); } else if (nettyServerDeployer.getException() != null) { throw new InstantiationException("NettyServer start failed - " + nettyServerDeployer.getException()); } } catch (InterruptedException e) { logger.error("NettyServer start await was interrupted. It might not have started", e); throw new InstantiationException("Netty server start might have failed - " + e); } } }
Source:
<code>public void createProject() throws ProjectCreationFailedException { validateParameters(); try { final Project.NameKey nameKey = createProjectArgs.getProject(); final String head = createProjectArgs.permissionsOnly ? GitRepositoryManager.REF_CONFIG : createProjectArgs.branch; final Repository repo = repoManager.createRepository(nameKey); try { rq.replicateNewProject(nameKey, head); final RefUpdate u = repo.updateRef(Constants.HEAD); u.disableRefLog(); u.link(head); createProjectConfig(); if (!createProjectArgs.permissionsOnly && createProjectArgs.createEmptyCommit) { createEmptyCommit(repo, nameKey, createProjectArgs.branch); } } finally { repo.close(); } } catch (IllegalStateException e) { handleRepositoryExistsException(createProjectArgs.getProject(), e); } catch (RepositoryCaseMismatchException ee) { handleRepositoryExistsException(ee.getNameOfExistingProject(), ee); } catch (Exception e) { throw new ProjectCreationFailedException("Cannot create " <START> + createProjectArgs.getProject(), e); <END> } }</code><technical_language>this change, a distinction in com.google.gerrit.sshd.commands.CreateProject real errors logged (something unexpected happened) critical errors (user gave incorrect input failed expected). For real errors a Failure thrown for critical errors a UnloggedFailure thrown. intention log real errors. If I CreateProjectCommand now, a ProjectCreationFailedException is converted UnloggedFailure, means error is logged. I this is fine, if ensure in this class log real errors. I if this catch block, a real error log it. This is I propose change line to: final String msg = "Cannot create " + createProjectArgs.getProject(); log.error(msg, e); throw new ProjectCreationFailedException(msg, e);</technical_language>

Target:
public void createProject() throws ProjectCreationFailedException { validateParameters(); try { final Project.NameKey nameKey = createProjectArgs.getProject(); final String head = createProjectArgs.permissionsOnly ? GitRepositoryManager.REF_CONFIG : createProjectArgs.branch; final Repository repo = repoManager.createRepository(nameKey); try { rq.replicateNewProject(nameKey, head); final RefUpdate u = repo.updateRef(Constants.HEAD); u.disableRefLog(); u.link(head); createProjectConfig(); if (!createProjectArgs.permissionsOnly && createProjectArgs.createEmptyCommit) { createEmptyCommit(repo, nameKey, createProjectArgs.branch); } } finally { repo.close(); } } catch (IllegalStateException e) { handleRepositoryExistsException(createProjectArgs.getProject(), e); } catch (RepositoryCaseMismatchException ee) { handleRepositoryExistsException(ee.getNameOfExistingProject(), ee); } catch (Exception e) { final String msg = "Cannot create " + createProjectArgs.getProject(); log.error(msg, e); throw new ProjectCreationFailedException(msg, e); } }
Source:
<code>public void testCommitNrt() throws Exception { final String metacardTitle = "testCommitNrt"; deleteAll(provider); MetacardType nrtMetacardType = new MetacardTypeImpl( COMMIT_NRT_TYPE, MetacardImpl.BASIC_METACARD.getAttributeDescriptors()); MockMetacard metacard = new MockMetacard(Library.getFlagstaffRecord(), nrtMetacardType); metacard.setTitle(metacardTitle); CreateResponse createResponse = create(metacard, provider); Optional<String> id = createResponse.getCreatedMetacards().stream().map(Metacard::getId).findFirst(); if (!id.isPresent()) { Assert.fail("Metacard creation failed for metacard with title: " + metacardTitle); } <START> RetryPolicy policy = <END> new RetryPolicy() .retryIf((SourceResponse response) -> response.getResults().size() == 0) .withDelay(100, TimeUnit.MILLISECONDS) .withMaxDuration(30, TimeUnit.SECONDS); Query query = new QueryImpl( getFilterBuilder().attribute(Metacard.TITLE).is().equalTo().text(metacardTitle)); QueryRequest request = new QueryRequestImpl(query); SourceResponse response = Failsafe.with(policy).get(() -> provider.query(request)); assertThat(response.getResults().size()).isEqualTo(1); }</code><technical_language>curious decided Failsafe instead of <LINK_0>, in component integration tests</technical_language>

Target:
public void testCommitNrt() throws Exception { final String nrtTitle = "testCommitNrt"; final String nonNrtTitle = "testCommitNonNrt"; deleteAll(provider); MetacardType nrtMetacardType = new MetacardTypeImpl( COMMIT_NRT_TYPE, MetacardImpl.BASIC_METACARD.getAttributeDescriptors()); MockMetacard nrtMetacard = new MockMetacard(Library.getFlagstaffRecord(), nrtMetacardType); nrtMetacard.setTitle(nrtTitle); MockMetacard nonNrtMetacard = new MockMetacard(Library.getFlagstaffRecord()); nonNrtMetacard.setTitle(nonNrtTitle); create(Lists.newArrayList(nrtMetacard, nonNrtMetacard), provider); QueryRequest request = new QueryRequestImpl( new QueryImpl( getFilterBuilder().attribute(Metacard.TITLE).is().like().text("testCommit*Nrt"))); await() .pollInterval(100, TimeUnit.MILLISECONDS) .atMost(30, TimeUnit.SECONDS) .until(() -> provider.query(request).getResults().size() == 2); }
Source:
<code>private OnHeapValueHolder<V> newCreateValueHolder(K key, V value, long now, StoreEventSink<K, V> eventSink) { Objects.requireNonNull(value); Duration duration = ExpiryUtils.getExpiryForCreation(key, value, expiry); <START> if(duration == null) { <END> return null; } long expirationTime = isExpiryDurationInfinite(duration) ? ValueHolder.NO_EXPIRE : ExpiryUtils.getExpirationMillis(now, duration); OnHeapValueHolder<V> holder = null; try { holder = makeValue(key, value, now, expirationTime, this.valueCopier); eventSink.created(key, value); } catch (LimitExceededException e) { LOG.warn(e.getMessage()); } return holder; }</code><technical_language>do !duration.isZero() check instead</technical_language>

Target:
private OnHeapValueHolder<V> newCreateValueHolder(K key, V value, long now, StoreEventSink<K, V> eventSink) { Objects.requireNonNull(value); Duration duration = ExpiryUtils.getExpiryForCreation(key, value, expiry); if(duration.isZero()) { return null; } long expirationTime = isExpiryDurationInfinite(duration) ? ValueHolder.NO_EXPIRE : ExpiryUtils.getExpirationMillis(now, duration); OnHeapValueHolder<V> holder = null; try { holder = makeValue(key, value, now, expirationTime, this.valueCopier); eventSink.created(key, value); } catch (LimitExceededException e) { LOG.warn(e.getMessage()); } return holder; }
Source:
<code>private void handleFlowControlEvent(String key, Payload payload, FlowParameters flowParameters, String flowChainId) throws TransactionExecutionException { String flowId = flowParameters.getFlowId(); LOGGER.debug("flow control event arrived: key: {}, flowid: {}, usercrn: {}, payload: {}", key, flowId, flowParameters.getFlowTriggerUserCrn(), payload); Flow flow = runningFlows.get(flowId); if (flow != null) { MutableBoolean isFlowCancelled = new MutableBoolean(false); transactionService.required(() -> { Optional<FlowLog> lastFlowLog = flowLogService.getLastFlowLog(flow.getFlowId()); lastFlowLog.ifPresent(flowLog -> { String nodeId = nodeConfig.getId(); if (flowLog.getCloudbreakNodeId() == null || flowLog.getCloudbreakNodeId().equals(nodeId)) { updateFlowLogStatus(key, payload, flowChainId, flow, flowLog, flowParameters); } else { LOGGER.warn("Flow was handled by another node {}, current node ID is {}, abandoning.", flow.getFlowId(), flowLog.getCloudbreakNodeId(), nodeId); inMemoryCleanup.cancelFlowWithoutDbUpdate(flow.getFlowId()); isFlowCancelled.setTrue(); } }); }); <START> if (!isFlowCancelled.booleanValue()) { <END> flow.sendEvent(key, flowParameters.getFlowTriggerUserCrn(), payload, flowParameters.getSpanContext()); } } else { LOGGER.debug("Cancelled flow finished running. Stack ID {}, flow ID {}, event {}", payload.getResourceId(), flowId, key); } }</code><technical_language>send this lamda</technical_language>

Target:
private void handleFlowControlEvent(String key, Payload payload, FlowParameters flowParameters, String flowChainId) throws TransactionExecutionException { String flowId = flowParameters.getFlowId(); LOGGER.debug("flow control event arrived: key: {}, flowid: {}, usercrn: {}, payload: {}", key, flowId, flowParameters.getFlowTriggerUserCrn(), payload); Flow flow = runningFlows.get(flowId); if (flow != null) { MutableBoolean flowCancelled = new MutableBoolean(false); transactionService.required(() -> { Optional<FlowLog> lastFlowLog = flowLogService.getLastFlowLog(flow.getFlowId()); lastFlowLog.ifPresent(flowLog -> { String nodeId = nodeConfig.getId(); if (flowLog.getCloudbreakNodeId() == null || flowLog.getCloudbreakNodeId().equals(nodeId)) { updateFlowLogStatus(key, payload, flowChainId, flow, flowLog, flowParameters); } else { LOGGER.info("Flow was handled by another node {}, current node ID is {}, abandoning.", flow.getFlowId(), flowLog.getCloudbreakNodeId(), nodeId); inMemoryCleanup.cancelFlowWithoutDbUpdate(flow.getFlowId()); flowCancelled.setTrue(); } }); }); if (!flowCancelled.booleanValue()) { flow.sendEvent(key, flowParameters.getFlowTriggerUserCrn(), payload, flowParameters.getSpanContext()); } } else { LOGGER.debug("Cancelled flow finished running. Stack ID {}, flow ID {}, event {}", payload.getResourceId(), flowId, key); } }
Source:
<code><START> public IndexedMultiValue<IndexedInts> get() <END> { return new CompressedVSizeIndexed(offsetSupplier.get(), valueSupplier.get()); }</code><technical_language>I renamed</technical_language>

Target:
public IndexedMultivalue<IndexedInts> get() { return new CompressedVSizeIndexed(offsetSupplier.get(), valueSupplier.get()); }