auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected JoinGroupRequestData.JoinGroupRequestProtocolCollection metadata() { log.debug("Joining group with current subscription: {}", subscriptions.subscription()); this.joinedSubscription = subscriptions.subscription(); <START> subscriptions.resetGroupSubscription(); <END> JoinGroupRequestData.JoinGroupRequestProtocolCollection protocolSet = new JoinGroupRequestData.JoinGroupRequestProtocolCollection(); List<String> topics = new ArrayList<>(joinedSubscription); for (ConsumerPartitionAssignor assignor : assignors) { Subscription subscription = new Subscription(topics, assignor.subscriptionUserData(joinedSubscription), subscriptions.assignedPartitionsList()); ByteBuffer metadata = ConsumerProtocol.serializeSubscription(subscription); protocolSet.add(new JoinGroupRequestData.JoinGroupRequestProtocol() .setName(assignor.name()) .setMetadata(Utils.toArray(metadata))); } return protocolSet; }</code><technical_language>confused a couple things. First, if a subscription changes while in middle of a rebalance, do need call onJoinPrepare again? semantics, need revoked everything, "cooperative" rebalancing, should? cc @guozhangwang is surprising raise auth errors "group subscription." If consumer 1 subscribed "A" consumer 2 subscribed "B," I expect get auth errors for topic "B" consumer 1. ignoring auth errors part of subscription()? if is straightforward if additional implications</technical_language>

Target:
protected JoinGroupRequestData.JoinGroupRequestProtocolCollection metadata() { log.debug("Joining group with current subscription: {}", subscriptions.subscription()); this.joinedSubscription = subscriptions.subscription(); JoinGroupRequestData.JoinGroupRequestProtocolCollection protocolSet = new JoinGroupRequestData.JoinGroupRequestProtocolCollection(); List<String> topics = new ArrayList<>(joinedSubscription); for (ConsumerPartitionAssignor assignor : assignors) { Subscription subscription = new Subscription(topics, assignor.subscriptionUserData(joinedSubscription), subscriptions.assignedPartitionsList()); ByteBuffer metadata = ConsumerProtocol.serializeSubscription(subscription); protocolSet.add(new JoinGroupRequestData.JoinGroupRequestProtocol() .setName(assignor.name()) .setMetadata(Utils.toArray(metadata))); } return protocolSet; }
Source:
<code><START> public void modelExec(final Runnable runnable, boolean block) { <END> Display displayThread = Display.getCurrent(); if (displayThread == null) { if (!PlatformUI.getWorkbench().isClosing()) { displayThread = Display.getDefault(); } else { throw new OperationCanceledException(); } } if (block) { if (Display.getCurrent() != null) { runnable.run(); } else { displayThread.syncExec(runnable); } } else { displayThread.asyncExec(runnable); } }</code><technical_language>I this method is needed all. call asyncExec want block syncExec do</technical_language>

Target:
public void modelExec(final Runnable runnable, boolean block) { Display displayThread = Display.getCurrent(); if (displayThread == null) { if (!PlatformUI.getWorkbench().isClosing()) { displayThread = PlatformUI.getWorkbench().getDisplay(); } else { throw new OperationCanceledException(); } } if (block) { if (Display.getCurrent() != null) { runnable.run(); } else { displayThread.syncExec(runnable); } } else { displayThread.asyncExec(runnable); } }
Source:
<code>public void execute() throws BuildException { try { <START> if ( fDomain==null && fWorkstation==null ) { <END> fSardine = SardineFactory.begin(fUsername, fPassword); } else { fSardine = SardineFactory.begin(); fSardine.setCredentials(fUsername, fPassword, fDomain, fWorkstation); } if (fIgnoreCookies) { fSardine.ignoreCookies(); } if (fPreemptiveAuthenticationHost != null && !fPreemptiveAuthenticationHost.isEmpty()) { fSardine.enablePreemptiveAuthentication(fPreemptiveAuthenticationHost); } for (Command command: fCommands) { command.executeCommand(); } } catch (Exception e) { throw new BuildException("failed: " + e.getLocalizedMessage(), e); } }</code><technical_language>minor formatting, spaces parens spaces conditional. if (fDomain == null && fWorkstation == null)</technical_language>

Target:
public void execute() throws BuildException { try { if (domain == null && workstation == null) { sardine = SardineFactory.begin(username, password); } else { sardine = SardineFactory.begin(); sardine.setCredentials(username, password, domain, workstation); } if (ignoreCookies) { sardine.ignoreCookies(); } if (preemptiveAuthenticationHost != null && !preemptiveAuthenticationHost.isEmpty()) { sardine.enablePreemptiveAuthentication(preemptiveAuthenticationHost); } for (Command command: commands) { command.executeCommand(); } } catch (Exception e) { throw new BuildException("failed: " + e.getLocalizedMessage(), e); } }
Source:
<code>public void throwIfUnsupportedScan(Scan scan) { if (scan.getFilter() != null) { filterAdapter.throwIfUnsupportedFilter(scan, scan.getFilter()); } <START> if (scan.getMaxResultsPerColumnFamily() != -1) { <END> throw new UnsupportedOperationException( "Limiting of max results per column family is not supported."); } }</code><technical_language>So, if this is set, -1? If is a constant compare nice</technical_language>

Target:
public void throwIfUnsupportedScan(Scan scan) { if (scan.getFilter() != null) { filterAdapter.throwIfUnsupportedFilter(scan, scan.getFilter()); } if (scan.getMaxResultsPerColumnFamily() != UNSET_MAX_RESULTS_PER_COLUMN_FAMILY) { throw new UnsupportedOperationException( "Limiting of max results per column family is not supported."); } }
Source:
<code><START> public String getDefaultMongoCollection() { <END> return context.getString(R.string.pref_default_mongodb_collection); }</code><technical_language>Remove getDefaultMongoCollection NSPrefs interface. is implementation detail</technical_language>

Target:
private String getDefaultMongoCollection() { return context.getString(R.string.pref_default_mongodb_collection); }
Source:
<code><START> List<JsonObject> getLanguageMap(Locale locale) { <END> if (!languageMaps.containsKey(locale)) { try { List<JsonObject> set = new ArrayList<>(); for (String namespace : config.getLanguageNamespaces()) { String filename = locale.getLanguage() + "_" + locale.getCountry() + File.separator + namespace + ".json"; Resource r = getBaseDirectory().createRelative(filename); if (!r.exists()) { logger.debug("Fallback locale to language only."); filename = locale.getLanguage() + File.separator + namespace + ".json"; r = getBaseDirectory().createRelative(filename); } logger.info("No locale loaded, trying to load from {}", r); JsonParser parser = new JsonParser(); JsonObject obj = (JsonObject) parser.parse(new InputStreamReader(r.getInputStream(), "UTF-8")); set.add(obj); } languageMaps.put(locale, set); } catch (FileNotFoundException e) { logger.info("Unable to load locale because no messages file was found for locale {}", locale.getDisplayName()); languageMaps.put(locale, null); } catch (JsonIOException | JsonSyntaxException | IOException e) { logger.error("Unable to load locale", e); } } return languageMaps.get(locale); }</code><technical_language>this package-private</technical_language>

Target:
private List<JsonObject> getLanguageMap(Locale locale) { if (!languageMaps.containsKey(locale)) { try { List<JsonObject> set = new ArrayList<>(); for (String namespace : config.getLanguageNamespaces()) { String filename = locale.getLanguage() + "_" + locale.getCountry() + File.separator + namespace + ".json"; Resource r = getBaseDirectory().createRelative(filename); if (!r.exists()) { logger.debug("Fallback locale to language only."); filename = locale.getLanguage() + File.separator + namespace + ".json"; r = getBaseDirectory().createRelative(filename); } logger.info("No locale loaded, trying to load from {}", r); JsonParser parser = new JsonParser(); JsonObject obj = (JsonObject) parser.parse(new InputStreamReader(r.getInputStream(), "UTF-8")); set.add(obj); } languageMaps.put(locale, set); } catch (FileNotFoundException e) { logger.info("Unable to load locale because no messages file was found for locale {}", locale.getDisplayName()); languageMaps.put(locale, null); } catch (JsonIOException | JsonSyntaxException | IOException e) { logger.error("Unable to load locale", e); } } return languageMaps.get(locale); }
Source:
<code>public CoreMessage setAddress(SimpleString address) { if (address == null && this.address == null) { return this; } <START> if (validBuffer && ((address == null && this.address != null) || !address.equals(this.address))) { <END> messageChanged(); } this.address = address; return this; }</code><technical_language>here, if address is null, this.address is null (it equate true), due preceding check</technical_language>

Target:
public CoreMessage setAddress(SimpleString address) { if (address == null && this.address == null) { return this; } if (validBuffer && (address == null || !address.equals(this.address))) { messageChanged(); } this.address = address; return this; }
Source:
<code>private void error(String message, Protos.Error.ErrorCode errorCode, CloseReason closeReason) { log.error(message); Protos.Error.Builder errorBuilder; errorBuilder = Protos.Error.newBuilder() .setCode(errorCode) <START> .setExplanation(message != null ? message : ""); <END> conn.sendToClient(Protos.TwoWayChannelMessage.newBuilder() .setError(errorBuilder) .setType(Protos.TwoWayChannelMessage.MessageType.ERROR) .build()); conn.destroyConnection(closeReason); }</code><technical_language>Hmm, explanation is optional in protobuf. This means set explanation set empty string</technical_language>

Target:
private void error(String message, Protos.Error.ErrorCode errorCode, CloseReason closeReason) { log.error(message); Protos.Error.Builder errorBuilder; errorBuilder = Protos.Error.newBuilder() .setCode(errorCode); if (message != null) { errorBuilder.setExplanation(message); } conn.sendToClient(Protos.TwoWayChannelMessage.newBuilder() .setError(errorBuilder) .setType(Protos.TwoWayChannelMessage.MessageType.ERROR) .build()); conn.destroyConnection(closeReason); }
Source:
<code>public void showPopupMenu(Component invoker, Collection<Action> actions, int x, int y) { JPopupMenu menu = new JPopupMenu(); String assignTo = GanttLanguage.getInstance().getText("assignment.toResource"); JMenu resourcesMenu = new JMenu(assignTo); for (Action action : actions) { if (action == null) { menu.addSeparator(); } else if (AssignmentToggleAction.class.equals(action.getClass())){ <START> resourcesMenu.add( new JCheckBoxMenuItem( action )); <END> continue; } else { Boolean isSelected = (Boolean) action.getValue(Action.SELECTED_KEY); if (isSelected == null) { menu.add(action); } else { menu.add(new JCheckBoxMenuItem(action)); } } } if (resourcesMenu.getItemCount() > 0) menu.add(resourcesMenu); menu.applyComponentOrientation(getLanguage().getComponentOrientation()); menu.show(invoker, x, y); }</code><technical_language>pls remove whitespaces opening closing parenthesis. follow regular [Java coding conventions](<LINK_0> (with a changes)</technical_language>

Target:
public void showPopupMenu(Component invoker, Collection<Action> actions, int x, int y) { JPopupMenu menu = new JPopupMenu(); String assignTo = GanttLanguage.getInstance().getText("assignments"); JMenu resourcesMenu = new JMenu(assignTo); for (Action action : actions) { if (action == null) { menu.addSeparator(); } else if (AssignmentToggleAction.class.equals(action.getClass())){ resourcesMenu.add(new JCheckBoxMenuItem(action)); continue; } else { Boolean isSelected = (Boolean) action.getValue(Action.SELECTED_KEY); if (isSelected == null) { menu.add(action); } else { menu.add(new JCheckBoxMenuItem(action)); } } } if (resourcesMenu.getItemCount() > 0) { menu.add(resourcesMenu); } menu.applyComponentOrientation(getLanguage().getComponentOrientation()); menu.show(invoker, x, y); }
Source:
<code>public void waitForPostgresToStart() { Stopwatch timer = Stopwatch.createStarted(); boolean succeeded = false; while (!succeeded && timer.elapsed(TimeUnit.SECONDS) < 10) { sleep(10); succeeded = checkPostgresConnection(); } if (!succeeded) { throw new RuntimeException("Postgres did not start in 10 seconds."); } <START> System.out.println("Postgres docker container started in " + timer.elapsed(TimeUnit.MILLISECONDS)); <END> }</code><technical_language>a logging framework</technical_language>

Target:
public void waitForPostgresToStart() { Stopwatch timer = Stopwatch.createStarted(); boolean succeeded = false; while (!succeeded && timer.elapsed(TimeUnit.SECONDS) < 10) { sleep(10); succeeded = checkPostgresConnection(); } if (!succeeded) { throw new RuntimeException("Postgres did not start in 10 seconds."); } logger.info("Postgres docker container started in {}", timer.elapsed(TimeUnit.MILLISECONDS)); }
Source:
<code>public String getImageUrl(String imageName) { for (WebElement elem:imagesNewFiles) { String href = elem.findElement(parentBy).getAttribute("href"); if (href.contains(imageName)){ return href; } } <START> return null; <END> }</code><technical_language>exception handled that. Program inform wanted image found</technical_language>

Target:
public String getImageUrl(String imageName) { for (WebElement elem:imagesNewFiles) { String href = elem.findElement(parentBy).getAttribute("href"); if (href.contains(imageName)){ return href; } } throw new RuntimeException("there is no " + imageName + " on Special:NewFiles page"); }
Source:
<code>public void propagate(int i, int mask) throws ContradictionException { <START> if (i == 2) { <END> sdm.freeze(); sdm.forEach(elemRem, SetEventType.REMOVE_FROM_ENVELOPE); sdm.unfreeze(); } if (iv.isInstantiated()) { set.addToKernel(iv.getValue(), aCause); setPassive(); } }</code><technical_language>i==0 i==2</technical_language>

Target:
public void propagate(int i, int mask) throws ContradictionException { if (i == 0) { sdm.freeze(); sdm.forEach(elemRem, SetEventType.REMOVE_FROM_ENVELOPE); sdm.unfreeze(); } if (iv.isInstantiated()) { set.addToKernel(iv.getValue(), aCause); setPassive(); } }
Source:
<code>protected RequestCondition<?> getCustomTypeCondition(Class<?> handlerType) { SiteMapping typeAnnotation = AnnotationUtils.findAnnotation(handlerType, SiteMapping.class); if (typeAnnotation == null) { return null; } <START> return new SiteRequestCondition(siteSet, siteResolver, ImmutableSet.copyOf(typeAnnotation.value()), <END> ImmutableSet.copyOf(typeAnnotation.excluded())); }</code><technical_language>Spacing is a here. spaces return extra space in front of ImmutableSet.copyOf</technical_language>

Target:
protected RequestCondition<?> getCustomTypeCondition(Class<?> handlerType) { SiteMapping typeAnnotation = AnnotationUtils.findAnnotation(handlerType, SiteMapping.class); if (typeAnnotation == null) { return null; } if (typeAnnotation.value().length == 0) { return SiteRequestCondition.createByExcluded(siteSet, siteResolver, ImmutableSet.copyOf(typeAnnotation.excluded())); } return SiteRequestCondition.create(siteSet, siteResolver, ImmutableSet.copyOf(typeAnnotation.value()), ImmutableSet.copyOf(typeAnnotation.excluded())); }
Source:
<code>private void setGlobalOption(ProcessType processType, Item item, String talendStudioVersion) throws PersistenceException { ElementParameterType property = TalendFileFactory.eINSTANCE.createElementParameterType(); property.setName(CHECKBOX_DATASET); property.setField("CHECK"); property.setValue("false"); boolean isParameterAlreadyAdded = processType.getParameters().getElementParameter().stream().anyMatch(x -> "USE_DATASET_API".equals(((ElementParameterTypeImpl) x).getName())); <START> if (!isParameterAlreadyAdded && !talendStudioVersion.startsWith("7.3.1") && !talendStudioVersion.startsWith("7.4.1")) { <END> processType.getParameters().getElementParameter().add(property); } ProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance(); factory.save(item, true); }</code><technical_language>talendStudioVersion.compareTo("7.3.1") < 0 this is compatible future versions</technical_language>

Target:
private void setGlobalOption(ProcessType processType, Item item, String talendStudioVersion) throws PersistenceException { ElementParameterType property = TalendFileFactory.eINSTANCE.createElementParameterType(); property.setName(CHECKBOX_DATASET); property.setField("CHECK"); property.setValue("false"); boolean isParameterAlreadyAdded = processType.getParameters().getElementParameter().stream().anyMatch(x -> "USE_DATASET_API".equals(((ElementParameterTypeImpl) x).getName())); if (!isParameterAlreadyAdded && talendStudioVersion.compareTo("7.3.1") < 0) { processType.getParameters().getElementParameter().add(property); } ProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance(); factory.save(item, true); }
Source:
<code>public Slice get(Slice key, long timeBucket, ReadSource readSource) { if (key.getClass() == Slice.class) { key = new SerializeSlice(key); <START> } <END> switch (readSource) { case MEMORY: return getFromMemory(key); case READERS: return getFromReaders(key, timeBucket); case ALL: default: Slice value = getFromMemory(key); if (value != null) { return value; } return getFromReaders(key, timeBucket); } }</code><technical_language>correct hashCode method in Slice instead</technical_language>

Target:
public Slice get(Slice key, long timeBucket, ReadSource readSource) { releaseMemory(); key = SliceUtils.toBufferSlice(key); switch (readSource) { case MEMORY: return getFromMemory(key); case READERS: return getFromReaders(key, timeBucket); case ALL: default: Slice value = getFromMemory(key); if (value != null) { return value; } return getFromReaders(key, timeBucket); } }
Source:
<code>protected void init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, boolean outputExpectsExpiredEvents, SiddhiAppContext siddhiAppContext) { this.outputExpectsExpiredEvents = outputExpectsExpiredEvents; this.siddhiAppContext = siddhiAppContext; currentEventQueue = new SnapshotableStreamEventQueue(streamEventClonerHolder); if (outputExpectsExpiredEvents) { expiredEventQueue = new SnapshotableStreamEventQueue(streamEventClonerHolder); } if (attributeExpressionExecutors.length == 1) { length = (Integer) (((ConstantExpressionExecutor) attributeExpressionExecutors[0]).getValue()); } else if (attributeExpressionExecutors.length == 0) { length = -1; } else { <START> throw new SiddhiAppValidationException("Length batch window should have at most one parameter (<int> " + <END> "chunkLength), but found " + attributeExpressionExecutors.length + " input attributes"); } }</code><technical_language>Message corrected "Batch window have.. Length batch...</technical_language>

Target:
protected void init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, boolean outputExpectsExpiredEvents, SiddhiAppContext siddhiAppContext) { this.outputExpectsExpiredEvents = outputExpectsExpiredEvents; this.siddhiAppContext = siddhiAppContext; currentEventQueue = new SnapshotableStreamEventQueue(streamEventClonerHolder); if (outputExpectsExpiredEvents) { expiredEventQueue = new SnapshotableStreamEventQueue(streamEventClonerHolder); } if (attributeExpressionExecutors.length == 1) { length = (Integer) (((ConstantExpressionExecutor) attributeExpressionExecutors[0]).getValue()); } else if (attributeExpressionExecutors.length == 0) { length = 0; } else { throw new SiddhiAppValidationException("Batch window should have at most one parameter (<int> " + "chunkLength), but found " + attributeExpressionExecutors.length + " input attributes"); } if (length < 0) { throw new SiddhiAppValidationException("Batch window should have at most one parameter (<int> " + "chunkLength) greater than zero. But found value 'chunkLength = " + length + " ' "); } }
Source:
<code>public void configurePipeline(PipelineConfigurer pipelineConfigurer) { FailureCollector collector = pipelineConfigurer.getStageConfigurer().getFailureCollector(); config.validate(collector); FileFormat format = getFileFormat(); if (format != null) { <START> ValidatingOutputFormatProvider outputFormatProvider = <END> pipelineConfigurer.usePlugin("outputformat", format.name().toLowerCase(), FORMAT_PLUGIN_ID, config.getProperties()); FormatContext context = new FormatContext(collector, pipelineConfigurer.getStageConfigurer().getInputSchema()); validateOutputFormatProvider(context, format, outputFormatProvider); } }</code><technical_language>this renamed ValidatingOutputFormat</technical_language>

Target:
public void configurePipeline(PipelineConfigurer pipelineConfigurer) { FailureCollector collector = pipelineConfigurer.getStageConfigurer().getFailureCollector(); config.validate(collector); FileFormat format = config.getFormat(); ValidatingOutputFormat validatingOutputFormat = pipelineConfigurer.usePlugin(ValidatingOutputFormat.PLUGIN_TYPE, format.name().toLowerCase(), FORMAT_PLUGIN_ID, config.getProperties()); FormatContext context = new FormatContext(collector, pipelineConfigurer.getStageConfigurer().getInputSchema()); validateOutputFormatProvider(context, format, validatingOutputFormat); }
Source:
<code>public GatewayResponse<WorldpayOrderStatusResponse> authorise(CardAuthorisationGatewayRequest request) { <START> if (!WorldpayOrderBuilder.isExemptionEngineEnabled(request)) { <END> ChargeEntity charge = request.getCharge(); charge.setExemption3ds(EXEMPTION_NOT_REQUESTED); chargeDao.merge(charge); } GatewayResponse<WorldpayOrderStatusResponse> response = worldpayAuthoriseHandler.authorise(request); if (response.getBaseResponse().map(WorldpayOrderStatusResponse::isSoftDecline).orElse(false)) { var authorisationRequestSummary = generateAuthorisationRequestSummary(request.getCharge(), request.getAuthCardDetails()); authorisationLogger.logChargeAuthorisation( LOGGER, authorisationRequestSummary, request.getCharge(), authorisationService.extractTransactionId(request.getCharge().getExternalId(), response) .orElse("missing transaction ID"), response, request.getCharge().getChargeStatus(), request.getCharge().getChargeStatus()); response = worldpayAuthoriseHandler.authorise(request, true); } return response; }</code><technical_language>a risk Exemption Engine is enabled change record in database build request. avoid this? calculate Exemption Engine is enabled pass WorldpayAuthoriseHandler WorldpayOrderRequestBuilder, respect check if Exemption Engine is enabled</technical_language>

Target:
public GatewayResponse<WorldpayOrderStatusResponse> authorise(CardAuthorisationGatewayRequest request) { boolean exemptionEngineEnabled = isExemptionEngineEnabled(request); if (!exemptionEngineEnabled) { ChargeEntity charge = request.getCharge(); charge.setExemption3ds(EXEMPTION_NOT_REQUESTED); chargeDao.merge(charge); LOGGER.info("Updated exemption_3ds of charge to - charge_external_id={}", EXEMPTION_NOT_REQUESTED, charge.getExternalId()); } GatewayResponse<WorldpayOrderStatusResponse> response = worldpayAuthoriseHandler.authorise(request, exemptionEngineEnabled); if (response.getBaseResponse().map(WorldpayOrderStatusResponse::isSoftDecline).orElse(false)) { var authorisationRequestSummary = generateAuthorisationRequestSummary(request.getCharge(), request.getAuthCardDetails()); authorisationLogger.logChargeAuthorisation( LOGGER, authorisationRequestSummary, request.getCharge(), authorisationService.extractTransactionId(request.getCharge().getExternalId(), response) .orElse("missing transaction ID"), response, request.getCharge().getChargeStatus(), request.getCharge().getChargeStatus()); response = worldpayAuthoriseHandler.authorise(request, false); } return response; }
Source:
<code>public void testResolveWithInterceptor() throws IOException { String regexStr = "^/user/(?<username>\\w+)"; String dstPathStr = "/namenode1/testResolve/$username"; RegexMountPointResolvedDstPathReplaceInterceptor interceptor = new RegexMountPointResolvedDstPathReplaceInterceptor("_", "-"); String settingsStr = interceptor.serializeToString(); RegexMountPoint regexMountPoint = new RegexMountPoint(inodeTree, regexStr, dstPathStr, settingsStr); regexMountPoint.initialize(); InodeTree.ResolveResult resolveResult = regexMountPoint.resolve("/user/hadoop_user1/file_index", true); Assert.assertEquals(resolveResult.kind, InodeTree.ResultKind.EXTERNAL_DIR); Assert.assertTrue( resolveResult.targetFileSystem instanceof TestRegexMountPointFileSystem); <START> Assert.assertTrue(resolveResult.resolvedPath.equals("/user/hadoop_user1")); <END> Assert.assertTrue( resolveResult.targetFileSystem instanceof TestRegexMountPointFileSystem); Assert.assertTrue( ((TestRegexMountPointFileSystem) resolveResult.targetFileSystem) .getUri().toString().equals("/namenode1/testResolve/hadoop-user1")); Assert.assertTrue( resolveResult.remainingPath.toString().equals("/file_index")); }</code><technical_language>this asserts assertEquals method? Please places</technical_language>

Target:
public void testResolveWithInterceptor() throws IOException { String regexStr = "^/user/(?<username>\\w+)"; String dstPathStr = "/namenode1/testResolve/$username"; RegexMountPointResolvedDstPathReplaceInterceptor interceptor = new RegexMountPointResolvedDstPathReplaceInterceptor("_", "-"); String settingsStr = interceptor.serializeToString(); RegexMountPoint regexMountPoint = new RegexMountPoint(inodeTree, regexStr, dstPathStr, settingsStr); regexMountPoint.initialize(); InodeTree.ResolveResult resolveResult = regexMountPoint.resolve("/user/hadoop_user1/file_index", true); Assert.assertEquals(resolveResult.kind, InodeTree.ResultKind.EXTERNAL_DIR); Assert.assertTrue( resolveResult.targetFileSystem instanceof TestRegexMountPointFileSystem); Assert.assertEquals("/user/hadoop_user1", resolveResult.resolvedPath); Assert.assertTrue( resolveResult.targetFileSystem instanceof TestRegexMountPointFileSystem); Assert.assertEquals("/namenode1/testResolve/hadoop-user1", ((TestRegexMountPointFileSystem) resolveResult.targetFileSystem) .getUri().toString()); Assert.assertEquals("/file_index", resolveResult.remainingPath.toString()); }
Source:
<code>public void serializeBytes(Baos bytes) { Baos b = new Baos(); b.putFlags(new boolean[]{true, nick.length() > 0, false, happiness != 0, false, true}); b.putBaos(gen); b.putBaos(uID); b.write(level); b.putFlags(new boolean[]{shiny, isHackmon}); if (nick.length() > 0) { b.putString(nick); } if (gen.num > 1) { b.putShort(item); if (gen.num > 2) { b.putShort(ability); b.write(nature); } b.write(gender); if (gen.num > 2 && happiness != 0) { b.write(happiness); } <START> if (gen.num > 6 && hiddenPowerType() != 16) { <END> b.write(hiddenPowerType); } } for (int i = 0; i < 4; i++) { b.putShort(moves[i].num); } for (int i = 0; i < 6; i++) b.write(EVs[i]); for (int i = 0; i < 6; i++) b.write(DVs[i]); bytes.putVersionControl(0, b); }</code><technical_language>Is hiddenPowerType check necessary</technical_language>

Target:
public void serializeBytes(Baos bytes) { Baos b = new Baos(); b.putFlags(new boolean[]{true, nick.length() > 0, false, happiness != 0,false, true, hiddenPowerType != (byte)TypeInfo.Type.Dark.ordinal()}); b.putBaos(gen); b.putBaos(uID); b.write(level); b.putFlags(new boolean[]{shiny, isHackmon}); if (nick.length() > 0) { b.putString(nick); } if (gen.num > 1) { b.putShort(item); if (gen.num > 2) { b.putShort(ability); b.write(nature); } b.write(gender); if (gen.num > 2 && happiness != 0) { b.write(happiness); } if (gen.num > 6 && hiddenPowerType() != (byte)TypeInfo.Type.Dark.ordinal()) { b.write(hiddenPowerType); } } for (int i = 0; i < 4; i++) { b.putShort(moves[i].num); } for (int i = 0; i < 6; i++) b.write(EVs[i]); for (int i = 0; i < 6; i++) b.write(DVs[i]); bytes.putVersionControl(0, b); }
Source:
<code>private void showVolumeProfiling() { if(getSelectedItem() == null) { return; } <START> VolumeProfileStatisticsModel profileStatsModel = new VolumeProfileStatisticsModel(((GlusterVolumeEntity)getSelectedItem()).getClusterId(), ((GlusterVolumeEntity)getSelectedItem()).getId(), ((GlusterVolumeEntity)getSelectedItem()).getName(), this); <END> VolumeProfileStatisticsModel.setCurrentTab(VolumeProfileStatisticsModel.ProfileTabSelected.BRICKS); setProfileWindow(profileStatsModel); profileStatsModel.startProgress(ConstantsManager.getInstance().getConstants().fetchingDataMessage()); UICommand closeProfilingStats = new UICommand("closeProfileStats", VolumeListModel.this); closeProfilingStats.setTitle(ConstantsManager.getInstance().getConstants().close()); closeProfilingStats.setIsCancel(true); profileStatsModel.getCommands().add(closeProfilingStats); profileStatsModel.queryBackend(); }</code><technical_language>(GlusterVolumeEntity)getSelectedItem() assigned a local fields, avoid casting</technical_language>

Target:
private void showVolumeProfiling() { if(getSelectedItem() == null) { return; } GlusterVolumeEntity selectedVolume = (GlusterVolumeEntity)getSelectedItem(); VolumeProfileStatisticsModel profileStatsModel = new VolumeProfileStatisticsModel(selectedVolume.getClusterId(), selectedVolume.getId(), selectedVolume.getName(), this); setProfileWindow(profileStatsModel); profileStatsModel.startProgress(ConstantsManager.getInstance().getConstants().fetchingDataMessage()); UICommand closeProfilingStats = new UICommand("closeProfileStats", VolumeListModel.this); closeProfilingStats.setTitle(ConstantsManager.getInstance().getConstants().close()); closeProfilingStats.setIsCancel(true); profileStatsModel.getCommands().add(closeProfilingStats); profileStatsModel.queryBackend(true); }
Source:
<code>public RateCalculationSwapLeg toLeg( LocalDate startDate, LocalDate endDate, PayReceive payReceive, Period lag, BusinessDayAdjustment businessDayAdjustment, DaysAdjustment paymentDateOffset, double notional) { <START> return toLeg(startDate, endDate, payReceive, lag, businessDayAdjustment, paymentDateOffset, notional, false); <END> }</code><technical_language>interpolated/monthly flag added in convention fields. hard-coded here</technical_language>

Target:
public RateCalculationSwapLeg toLeg( LocalDate startDate, LocalDate endDate, PayReceive payReceive, Period lag, BusinessDayAdjustment businessDayAdjustment, DaysAdjustment paymentDateOffset, double notional) { return RateCalculationSwapLeg .builder() .payReceive(payReceive) .accrualSchedule(PeriodicSchedule.builder() .startDate(startDate) .endDate(endDate) .frequency(Frequency.TERM) .businessDayAdjustment(businessDayAdjustment) .build()) .paymentSchedule(PaymentSchedule.builder() .paymentFrequency(Frequency.TERM) .paymentDateOffset(paymentDateOffset) .build()) .calculation(InflationRateCalculation.builder() .index(index) .interpolated(interpolated) .lag(lag) .build()) .notionalSchedule(NotionalSchedule.of(getCurrency(), notional)) .build(); }
Source:
<code>public String toString() { <START> StringBuilder result = new StringBuilder("[Test: \"" + m_name + "\"") <END> .append(" verbose:" + m_verbose); result.append("[parameters:"); for (String k : m_parameters.keySet()) { String v = m_parameters.get(k); result.append(k + "=>" + v); } result.append("]"); result.append("[metagroups:"); for (String g : m_metaGroups.keySet()) { List<String> mg = m_metaGroups.get(g); result.append(g).append("="); for (String n : mg) { result.append(n).append(","); } } result.append("] "); result.append("[included: "); for (String g : m_includedGroups) { result.append(g).append(" "); } result.append("]"); result.append("[excluded: "); for (String g : m_excludedGroups) { result.append(g).append(""); } result.append("] "); result.append(" classes:"); for (XmlClass cl : m_xmlClasses) { result.append(cl).append(" "); } result.append(" packages:"); for (XmlPackage p : m_xmlPackages) { result.append(p).append(" "); } result.append("] "); return result.toString(); }</code><technical_language>I usage of String concatenation is issue. fix it</technical_language>

Target:
public String toString() { StringBuffer result = new StringBuffer("[Test: \"" + m_name + "\"") .append(" verbose:" + m_verbose); result.append("[parameters:"); for (String k : m_parameters.keySet()) { String v = m_parameters.get(k); result.append(k + "=>" + v); } result.append("]"); result.append("[metagroups:"); for (String g : m_metaGroups.keySet()) { List<String> mg = m_metaGroups.get(g); result.append(g).append("="); for (String n : mg) { result.append(n).append(","); } } result.append("] "); result.append("[included: "); for (String g : m_includedGroups) { result.append(g).append(" "); } result.append("]"); result.append("[excluded: "); for (String g : m_excludedGroups) { result.append(g).append(""); } result.append("] "); result.append(" classes:"); for (XmlClass cl : m_xmlClasses) { result.append(cl).append(" "); } result.append(" packages:"); for (XmlPackage p : m_xmlPackages) { result.append(p).append(" "); } result.append("] "); return result.toString(); }
Source:
<code>public Map<String, ActiveTopicsInfo> getConnectorActiveTopics(final @PathParam("connector") String connector) throws Throwable { <START> return herder.connectorActiveTopics(connector); <END> }</code><technical_language>this method return error if worker is configured enable active topic feature</technical_language>

Target:
public Response getConnectorActiveTopics(final @PathParam("connector") String connector) throws Throwable { if (!config.getBoolean(TOPIC_TRACKING_ENABLE_CONFIG)) { return Response.status(Response.Status.FORBIDDEN) .entity("Topic tracking is disabled.") .build(); } ActiveTopicsInfo info = herder.connectorActiveTopics(connector); return Response.ok(Collections.singletonMap(info.connector(), info)).build(); }
Source:
<code>public void shouldSynchronizeWorkspaceNameWithDevfileNameWhenDevfileIsUpdated() throws Exception { final AccountImpl account = new AccountImpl("accountId", "namespace", "test"); final WorkspaceImpl workspace1 = createWorkspaceFromDevfile("id", account, "name1"); final WorkspaceImpl workspace2 = createWorkspaceFromDevfile("id2", account, "name2"); manager.getTransaction().begin(); manager.persist(account); manager.persist(workspace1); manager.persist(workspace2); manager.getTransaction().commit(); workspace2.getDevfile().setName(workspace1.getDevfile().getName()); <START> workspace2.getDevfile().setName(workspace1.getDevfile().getName()); <END> manager.getTransaction().begin(); manager.merge(workspace2); manager.getTransaction().commit(); }</code><technical_language>duplicate this line</technical_language>

Target:
public void shouldSynchronizeWorkspaceNameWithDevfileNameWhenDevfileIsUpdated() throws Exception { final AccountImpl account = new AccountImpl("accountId", "namespace", "test"); final WorkspaceImpl workspace1 = createWorkspaceFromDevfile("id", account, "name1"); final WorkspaceImpl workspace2 = createWorkspaceFromDevfile("id2", account, "name2"); manager.getTransaction().begin(); manager.persist(account); manager.persist(workspace1); manager.persist(workspace2); manager.getTransaction().commit(); workspace2.getDevfile().setName(workspace1.getDevfile().getName()); manager.getTransaction().begin(); manager.merge(workspace2); manager.getTransaction().commit(); }
Source:
<code>public void migrateIfNecessary_1_0_to_1_1() { try { String toMigrate = getFileContent("scesim-1-0.scesim"); String migrated = instance.migrateIfNecessary(toMigrate); assertTrue(toMigrate.contains("<ScenarioSimulationModel version=\"1.0\">")); assertFalse(migrated.contains("<ScenarioSimulationModel version=\"1.0\">")); assertTrue(migrated.contains("EXPECT")); assertFalse(migrated.contains("EXPECTED")); } catch (Exception e) { fail(e.getMessage()); <START> e.printStackTrace(); <END> } }</code><technical_language>Btw if try catch, this is dead code, fail internally throw exception</technical_language>

Target:
public void migrateIfNecessary_1_0_to_1_1() throws Exception { String toMigrate = getFileContent("scesim-1-0.scesim"); Document document = DOMParserUtil.getDocument(toMigrate); migrationInstance.from1_0to1_1().accept(document); Map<Node, List<Node>> retrieved = DOMParserUtil.getChildrenNodesMap(document, "expressionIdentifier", "type"); assertNotNull(retrieved); assertEquals(1, retrieved.size()); retrieved.forEach((node, typeNodes) -> { assertEquals(1, typeNodes.size()); assertEquals("EXPECT", typeNodes.get(0).getTextContent()); }); commonCheck(toMigrate, document, "1.1"); }
Source:
<code>public SuccessOrFailure isReady(DockerComposeRule rule) { return SuccessOrFailure.onResultOf(() -> { CassandraKeyValueServiceImpl cassandraKeyValueService = CassandraKeyValueServiceImpl.create( CassandraKeyValueServiceConfigManager.createSimpleManager(KVS_CONFIG), LEADER_CONFIG, <START> false); <END> return cassandraKeyValueService.isInitialized(); }); }</code><technical_language>This is fixed in #2300. tests, fix here</technical_language>

Target:
public SuccessOrFailure isReady(DockerComposeRule rule) { return SuccessOrFailure.onResultOf(() -> CassandraKeyValueServiceImpl.create( CassandraKeyValueServiceConfigManager.createSimpleManager(KVS_CONFIG), LEADER_CONFIG) .isInitialized()); }
Source:
<code>private void copyLiveInfo(ISessionInfo sessionInfo) { if (sessionInfo.getLivePort() != null) { fSessionInfo.setLivePort(sessionInfo.getLivePort()); } if (sessionInfo.getLiveUrl() != null) { fSessionInfo.setLiveUrl(sessionInfo.getLiveUrl()); } <START> fSessionInfo.setLive(sessionInfo.isLive()); <END> }</code><technical_language>this work if create a session of Control View (command-line)</technical_language>

Target:
private void copyLiveInfo(ISessionInfo sessionInfo) { if (sessionInfo.getLivePort() != null) { fSessionInfo.setLivePort(sessionInfo.getLivePort()); } if (sessionInfo.getLiveUrl() != null) { fSessionInfo.setLiveUrl(sessionInfo.getLiveUrl()); } if (!getTargetNode().isVersionSupported("2.5.0")) { fSessionInfo.setLive(sessionInfo.isLive()); } }
Source:
<code>private void onSelectFileClicked() { FileChooser chooser = new FileChooser(); chooser.setTitle("Select Files"); chooser.getExtensionFilters().addAll( new FileChooser.ExtensionFilter("Java JARs", "*.jar"), new FileChooser.ExtensionFilter("Java WARs", "*.war"), new FileChooser.ExtensionFilter("Java EARs", "*.ear"), new FileChooser.ExtensionFilter("Java class files", "*.class") ); List<File> file = chooser.showOpenMultipleDialog(designerRoot.getMainStage()); for (File f : file) { <START> fileListView.getItems().add(f); <END> } }</code><technical_language>do fileListView.getItems().addAll(file) loop list. Also, a list of files, want rename list files singular file</technical_language>

Target:
private void onSelectFileClicked() { FileChooser chooser = new FileChooser(); chooser.setTitle("Select Files"); chooser.getExtensionFilters().addAll( new FileChooser.ExtensionFilter("Java JARs", "*.jar"), new FileChooser.ExtensionFilter("Java WARs", "*.war"), new FileChooser.ExtensionFilter("Java EARs", "*.ear"), new FileChooser.ExtensionFilter("Java class files", "*.class") ); List<File> files = chooser.showOpenMultipleDialog(designerRoot.getMainStage()); fileListView.getItems().addAll(files); }
Source:
<code>private void doPublish() { String topic = (String) this.properties.get(PUBLISH_TOPIC_PROP_NAME); Integer qos = (Integer) this.properties.get(PUBLISH_QOS_PROP_NAME); Boolean retain = (Boolean) this.properties.get(PUBLISH_RETAIN_PROP_NAME); String mode = (String) this.properties.get(MODE_PROP_NAME); float setPoint = 0; float tempIncr = (Float) this.properties.get(TEMP_INCREMENT_PROP_NAME); if (MODE_PROP_PROGRAM.equals(mode)) { setPoint = (Float) this.properties.get(PROGRAM_SETPOINT_NAME); } else if (MODE_PROP_MANUAL.equals(mode)) { setPoint = (Float) this.properties.get(MANUAL_SETPOINT_NAME); } else if (MODE_PROP_VACATION.equals(mode)) { setPoint = 6.0F; } if (this.temperature + tempIncr < setPoint) { this.temperature += tempIncr; } else { this.temperature -= 4 * tempIncr; } KuraPayload payload = new KuraPayload(); payload.setTimestamp(new Date()); payload.addMetric("temperatureInternal", this.temperature); payload.addMetric("temperatureExternal", 5.0F); payload.addMetric("temperatureExhaust", 30.0F); int code = this.random.nextInt(); if (this.random.nextInt() % 5 == 0) { payload.addMetric("errorCode", code); } else { payload.addMetric("errorCode", 0); } try { this.cloudClient.publish(topic, payload, qos, retain); logger.info("Published to message: {}", topic, payload); } catch (Exception e) { <START> logger.error("Cannot publish topic: {}" + topic, e); <END> } }</code><technical_language>be: java logger.error("Cannot publish topic: {}", topic, e);</technical_language>

Target:
private void doPublish() { String topic = (String) this.properties.get(PUBLISH_TOPIC_PROP_NAME); Integer qos = (Integer) this.properties.get(PUBLISH_QOS_PROP_NAME); Boolean retain = (Boolean) this.properties.get(PUBLISH_RETAIN_PROP_NAME); String mode = (String) this.properties.get(MODE_PROP_NAME); float setPoint = 0; float tempIncr = (Float) this.properties.get(TEMP_INCREMENT_PROP_NAME); if (MODE_PROP_PROGRAM.equals(mode)) { setPoint = (Float) this.properties.get(PROGRAM_SETPOINT_NAME); } else if (MODE_PROP_MANUAL.equals(mode)) { setPoint = (Float) this.properties.get(MANUAL_SETPOINT_NAME); } else if (MODE_PROP_VACATION.equals(mode)) { setPoint = 6.0F; } if (this.temperature + tempIncr < setPoint) { this.temperature += tempIncr; } else { this.temperature -= 4 * tempIncr; } KuraPayload payload = new KuraPayload(); payload.setTimestamp(new Date()); payload.addMetric("temperatureInternal", this.temperature); payload.addMetric("temperatureExternal", 5.0F); payload.addMetric("temperatureExhaust", 30.0F); int code = this.random.nextInt(); if (this.random.nextInt() % 5 == 0) { payload.addMetric("errorCode", code); } else { payload.addMetric("errorCode", 0); } try { this.cloudClient.publish(topic, payload, qos, retain); logger.info("Published to message: {}", topic, payload); } catch (Exception e) { logger.error("Cannot publish topic: {}", topic, e); } }
Source:
<code>private void configureNavigationButtons() { next.setOnClickListener(v -> { if (!NetworkUtils.isInternetConnectionEstablished(this)) { ViewUtil.showShortSnackbar(rootLayout, R.string.no_internet); return; } setTitleAndDescriptions(); <START> if (s_count > 3) { <END> savePrevTitleDesc("prev_image_"); } presenter.handleNext(descriptionsAdapter.getTitle(), descriptionsAdapter.getDescriptions()); }); previous.setOnClickListener(v -> presenter.handlePrevious()); categoryNext.setOnClickListener(v -> presenter.handleCategoryNext(categoriesModel, false)); categoryPrevious.setOnClickListener(v -> presenter.handlePrevious()); licensePrevious.setOnClickListener(v -> presenter.handlePrevious()); submit.setOnClickListener(v -> { flag++; directKvStore.putInt("flag", flag); savePrevTitleDesc("prev_upload_"); Toast.makeText(this, R.string.uploading_started, Toast.LENGTH_LONG).show(); presenter.handleSubmit(categoriesModel); finish(); }); }</code><technical_language>is purpose of s_count > 3 condition? Lets [magic numbers](<LINK_0> in code</technical_language>

Target:
private void configureNavigationButtons() { next.setOnClickListener(v -> { if (!NetworkUtils.isInternetConnectionEstablished(this)) { ViewUtil.showShortSnackbar(rootLayout, R.string.no_internet); return; } setTitleAndDescriptions(); if (multipleUpload) { savePrevTitleDesc("prev_image_"); } presenter.handleNext(descriptionsAdapter.getTitle(), descriptionsAdapter.getDescriptions()); }); previous.setOnClickListener(v -> presenter.handlePrevious()); categoryNext.setOnClickListener(v -> presenter.handleCategoryNext(categoriesModel, false)); categoryPrevious.setOnClickListener(v -> presenter.handlePrevious()); licensePrevious.setOnClickListener(v -> presenter.handlePrevious()); submit.setOnClickListener(v -> { flagForSubmit = true; directKvStore.putBoolean("flagForSubmit", flagForSubmit); savePrevTitleDesc("prev_upload_"); Toast.makeText(this, R.string.uploading_started, Toast.LENGTH_LONG).show(); presenter.handleSubmit(categoriesModel); finish(); }); }
Source:
<code>private void persist(HtmlParameterStats param) { try { if (param.getId() < 0) { RecordParam rp = Model.getSingleton().getDb().getTableParam().insert( param.getSite(), param.getType().name(), param.getName(), param.getTimesUsed(), setToString(param.getFlags()), setToString(param.getValues())); param.setId(rp.getParamId()); } else { Model.getSingleton().getDb().getTableParam().update( param.getId(), param.getTimesUsed(), setToString(param.getFlags()), setToString(param.getValues())); } } catch (DatabaseException e) { if (e.getCause() instanceof SQLDataException) { <START> logger.info("Could not add or update param: " + param.getName()); <END> logger.info("It is likely that the length of one of the data elements exceeded the column size."); if (logger.isDebugEnabled()) { logger.debug(e.getMessage(), e); } } else { logger.error(e.getMessage(), e); } } }</code><technical_language>warn</technical_language>

Target:
private void persist(HtmlParameterStats param) { try { if (param.getId() < 0) { RecordParam rp = Model.getSingleton().getDb().getTableParam().insert( param.getSite(), param.getType().name(), param.getName(), param.getTimesUsed(), setToString(param.getFlags()), setToString(param.getValues())); param.setId(rp.getParamId()); } else { Model.getSingleton().getDb().getTableParam().update( param.getId(), param.getTimesUsed(), setToString(param.getFlags()), setToString(param.getValues())); } } catch (DatabaseException e) { if (e.getCause().getMessage().contains("truncation")) { logger.warn("Could not add or update param: " + param.getName()); logger.warn("It is likely that the length of one of the data elements exceeded the column size."); logger.warn(e.getMessage()); if (logger.isDebugEnabled()) { logger.debug(e.getMessage(), e); } } else { logger.error(e.getMessage(), e); } } }
Source:
<code>OperatorImpl createAndRegisterOperatorImpl(OperatorSpec prevOperatorSpec, OperatorSpec operatorSpec, SystemStream inputStream, Config config, TaskContext context) { if (!operatorImpls.containsKey(operatorSpec.getOpId()) || operatorSpec instanceof JoinOperatorSpec) { OperatorImpl operatorImpl = createOperatorImpl(prevOperatorSpec, operatorSpec, config, context); operatorImpl.init(config, context); operatorImpl.registerInputStream(inputStream); if (operatorSpec.getTimerFn() != null) { <START> final TimerRegistry timerRegistry = operatorImpl.getTimerRegistry(); <END> operatorSpec.getTimerFn().registerTimer(timerRegistry); } operatorImpls.put(operatorImpl.getOpImplId(), operatorImpl); Collection<OperatorSpec> registeredSpecs = operatorSpec.getRegisteredOperatorSpecs(); registeredSpecs.forEach(registeredSpec -> { OperatorImpl nextImpl = createAndRegisterOperatorImpl(operatorSpec, registeredSpec, inputStream, config, context); operatorImpl.registerNextOperator(nextImpl); }); return operatorImpl; } else { OperatorImpl operatorImpl = operatorImpls.get(operatorSpec.getOpId()); operatorImpl.registerInputStream(inputStream); Collection<OperatorSpec> registeredSpecs = operatorSpec.getRegisteredOperatorSpecs(); registeredSpecs.forEach(registeredSpec -> { createAndRegisterOperatorImpl(operatorSpec, registeredSpec, inputStream, config, context); }); return operatorImpl; } }</code><technical_language>do this in OperatorImpl#init</technical_language>

Target:
OperatorImpl createAndRegisterOperatorImpl(OperatorSpec prevOperatorSpec, OperatorSpec operatorSpec, SystemStream inputStream, Config config, TaskContext context) { if (!operatorImpls.containsKey(operatorSpec.getOpId()) || operatorSpec instanceof JoinOperatorSpec) { OperatorImpl operatorImpl = createOperatorImpl(prevOperatorSpec, operatorSpec, config, context); operatorImpl.init(config, context); operatorImpl.registerInputStream(inputStream); if (operatorSpec.getTimerFn() != null) { final TimerRegistry timerRegistry = operatorImpl.createOperatorTimerRegistry(); operatorSpec.getTimerFn().registerTimer(timerRegistry); } operatorImpls.put(operatorImpl.getOpImplId(), operatorImpl); Collection<OperatorSpec> registeredSpecs = operatorSpec.getRegisteredOperatorSpecs(); registeredSpecs.forEach(registeredSpec -> { OperatorImpl nextImpl = createAndRegisterOperatorImpl(operatorSpec, registeredSpec, inputStream, config, context); operatorImpl.registerNextOperator(nextImpl); }); return operatorImpl; } else { OperatorImpl operatorImpl = operatorImpls.get(operatorSpec.getOpId()); operatorImpl.registerInputStream(inputStream); Collection<OperatorSpec> registeredSpecs = operatorSpec.getRegisteredOperatorSpecs(); registeredSpecs.forEach(registeredSpec -> { createAndRegisterOperatorImpl(operatorSpec, registeredSpec, inputStream, config, context); }); return operatorImpl; } }