auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void scanFile(SensorContext sensorContext, InputFile inputFile) throws IOException { final HtlScanner scanner = setupScanner(); HtmlSourceCode sourceCode = new HtmlSourceCode(inputFile); Reader reader = new StringReader(inputFile.contents()); scanner.scan(lexer.parse(reader), sourceCode); saveMetrics(sensorContext, sourceCode); saveLineLevelMeasures(inputFile, sourceCode); }

Target:
void scanFile(SensorContext sensorContext, InputFile inputFile) throws IOException { final HtlScanner scanner = setupScanner(); HtmlSourceCode sourceCode = new HtmlSourceCode(inputFile); try (Reader reader = new StringReader(inputFile.contents())) { List<Node> nodeList = lexer.parse(reader); scanner.scan(nodeList, sourceCode); MetricsSaver.saveIssues(sensorContext, sourceCode); MetricsSaver.saveMeasures(sensorContext, sourceCode); MetricsSaver.saveLineLevelMeasures(inputFile, sourceCode, fileLinesContextFactory); } }
Source:
public double calculateGenotypeConcordance(final GenotypeConcordanceScheme scheme, final boolean missingSitesFlag) { double numerator = 0.0; double denominator = 0.0; scheme.validateScheme(); final TruthState[] allTruthStates = TruthState.values(); final CallState[] allCallStates = CallState.values(); for (final TruthState truthState : allTruthStates) { for (final CallState callState : allCallStates) { if(!missingSitesFlag && isMissing(truthState, callState)) { continue; } else { final TruthAndCallStates truthAndCallStates = new TruthAndCallStates(truthState, callState); final int count = getCount(truthAndCallStates); if (truthState.toString().equals(callState.toString())) { numerator += count; denominator += count; } else { denominator += count; } } } } return (numerator / denominator); }

Target:
public double calculateGenotypeConcordance(final GenotypeConcordanceScheme scheme, final boolean missingSitesFlag) { return calculateGenotypeConcordanceUtil(scheme, missingSitesFlag, true); }
Source:
static Collection<org.spongepowered.api.profile.GameProfile> getAllProfiles() { Set<org.spongepowered.api.profile.GameProfile> profiles = Sets.newHashSet(); for (User user : userCache.asMap().values()) { profiles.add(user.getProfile()); } SaveHandler saveHandler = (SaveHandler) DimensionManager.getWorldFromDimId(0).getSaveHandler(); String[] uuids = saveHandler.getAvailablePlayerDat(); for (String playerUuid : uuids) { if (!UUID_PATTERN.reset(playerUuid).matches()) { continue; } GameProfile profile = MinecraftServer.getServer().getPlayerProfileCache().getProfileByUUID(UUID.fromString(playerUuid)); if (profile != null) { profiles.add((org.spongepowered.api.profile.GameProfile) profile); } } UserListWhitelist whiteList = MinecraftServer.getServer().getConfigurationManager().getWhitelistedPlayers(); for (UserListWhitelistEntry entry : whiteList.getValues().values()) { profiles.add((org.spongepowered.api.profile.GameProfile) entry.value); } UserListBans banList = MinecraftServer.getServer().getConfigurationManager().getBannedPlayers(); for (UserListBansEntry entry : banList.getValues().values()) { profiles.add((org.spongepowered.api.profile.GameProfile) entry.value); } return profiles; }

Target:
static Collection<org.spongepowered.api.profile.GameProfile> getAllProfiles() { Set<org.spongepowered.api.profile.GameProfile> profiles = Sets.newHashSet(); for (User user : userCache.asMap().values()) { profiles.add(user.getProfile()); } SaveHandler saveHandler = (SaveHandler) DimensionManager.getWorldFromDimId(0).getSaveHandler(); String[] uuids = saveHandler.getAvailablePlayerDat(); Matcher uuidMatcher = UUID_PATTERN.matcher(""); for (String playerUuid : uuids) { if (!uuidMatcher.reset(playerUuid).matches()) { continue; } GameProfile profile = MinecraftServer.getServer().getPlayerProfileCache().getProfileByUUID(UUID.fromString(playerUuid)); if (profile != null) { profiles.add((org.spongepowered.api.profile.GameProfile) profile); } } UserListWhitelist whiteList = MinecraftServer.getServer().getConfigurationManager().getWhitelistedPlayers(); for (UserListWhitelistEntry entry : whiteList.getValues().values()) { profiles.add((org.spongepowered.api.profile.GameProfile) entry.value); } UserListBans banList = MinecraftServer.getServer().getConfigurationManager().getBannedPlayers(); for (UserListBansEntry entry : banList.getValues().values()) { profiles.add((org.spongepowered.api.profile.GameProfile) entry.value); } return profiles; }
Source:
public void zoom(double delta, Point2D center) { Point2D world; double zoom = 1 + delta * ZOOM_FACTOR; try { world = scale.inverseTransform(center.getX() - toCenter.getX() - translate.getX(), center.getY() - toCenter.getY() - translate.getY()); Transform newScale = scale.createConcatenation(new Scale(zoom, zoom, world.getX(), world.getY())); if (newScale.getMyy() > ZOOM_OUT_BOUND && newScale.getMxx() < ZOOM_IN_BOUND) { scale.setToTransform(newScale); } } catch (NonInvertibleTransformException e) { e.printStackTrace(); } }

Target:
protected void zoom(double delta, Point2D center) { Point2D world; double zoom = 1 + delta * ZOOM_FACTOR; try { world = scale.inverseTransform(center.getX() - toCenter.getX() - translate.getX(), center.getY() - toCenter.getY() - translate.getY()); Transform newScale = scale.createConcatenation(new Scale(zoom, zoom, world.getX(), world.getY())); if (newScale.getMyy() > ZOOM_OUT_BOUND && newScale.getMxx() < ZOOM_IN_BOUND) { scale.setToTransform(newScale); } } catch (NonInvertibleTransformException e) { e.printStackTrace(); } }
Source:
public void updateStockPrice(String symbol, double newPrice) throws StockMarketException { if (getStockForSymbol(symbol) == null) { throw new StockMarketException("Stock not present (" + symbol + ")"); } if (newPrice < 0.0) { throw new StockMarketException( "Stock price cannot be set to a negative value (" + symbol + ", " + getStockForSymbol(symbol).getPrice() + ") -> " + newPrice + " X Not Allowed "); } Stock s = removeStockFromStockList(symbol); s.setPrice(newPrice); addStock(s); }

Target:
public void updateStockPrice(String symbol, double newPrice) throws StockMarketException { if (getStockForSymbol(symbol) == null) { throw new StockMarketException("Stock not present (" + symbol + ")"); } if (newPrice < 0.0) { throw new StockMarketException( "Stock price cannot be set to a negative value (" + symbol + ", " + getStockForSymbol(symbol).getPrice() + ") -> " + newPrice + " X Not Allowed "); } Stock stock = removeStockFromStockList(symbol); stock.setPrice(newPrice); addStock(stock); }
Source:
private List<GlusterVolumeEntity> getAllGlusterVolumesWithMasterCompatibleVersion(Guid masterVolumeId) { GlusterVolumeEntity masterVolume = getGlusterVolumeDao().getById(masterVolumeId); VDSGroup masterCluster = getVdsGroupDao().get(masterVolume.getClusterId()); List<VDSGroup> clusters = getVdsGroupDao().getClustersByServiceAndCompatibilityVersion(true, false, masterCluster.getcompatibility_version().getValue()); List<GlusterVolumeEntity> volumes = new ArrayList<GlusterVolumeEntity>(); if(clusters != null) { for(VDSGroup currentCluster : clusters) { if(!currentCluster.getId().equals(masterCluster.getId())) { volumes.addAll(getGlusterVolumeDao().getByClusterId(currentCluster.getId())); } } } return volumes; }

Target:
private List<GlusterVolumeEntity> getAllGlusterVolumesWithMasterCompatibleVersion(Guid masterVolumeId) { GlusterVolumeEntity masterVolume = getGlusterVolumeDao().getById(masterVolumeId); VDSGroup masterCluster = getVdsGroupDao().get(masterVolume.getClusterId()); List<VDSGroup> clusters = getVdsGroupDao().getClustersByServiceAndCompatibilityVersion(true, false, masterCluster.getcompatibility_version().getValue()); List<GlusterVolumeEntity> volumes = new ArrayList<>(); if(clusters != null) { for(VDSGroup currentCluster : clusters) { if(!currentCluster.getId().equals(masterCluster.getId())) { volumes.addAll(getGlusterVolumeDao().getByClusterId(currentCluster.getId())); } } } return volumes; }
Source:
public void onEventMainThread(final NotificationEvents.NoteModerationStatusChanged event) { if (event.mIsModerating) { setNoteIsModerating(event.mNoteId, event.mIsModerating); EventBus.getDefault().removeStickyEvent(NotificationEvents.NoteModerationStatusChanged.class); } else { NotificationsActions.downloadNoteAndUpdateDB(event.mNoteId, new RestRequest.Listener() { @Override public void onResponse(JSONObject response) { setNoteIsModerating(event.mNoteId, event.mIsModerating); EventBus.getDefault().removeStickyEvent(NotificationEvents.NoteModerationStatusChanged.class); } }, new RestRequest.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { setNoteIsModerating(event.mNoteId, event.mIsModerating); EventBus.getDefault().removeStickyEvent(NotificationEvents.NoteModerationStatusChanged.class); } } ); } }

Target:
public void onEventMainThread(final NotificationEvents.NoteModerationStatusChanged event) { if (event.isModerating) { setNoteIsModerating(event.noteId, event.isModerating); EventBus.getDefault().removeStickyEvent(NotificationEvents.NoteModerationStatusChanged.class); } else { NotificationsActions.downloadNoteAndUpdateDB(event.noteId, new RestRequest.Listener() { @Override public void onResponse(JSONObject response) { setNoteIsModerating(event.noteId, event.isModerating); EventBus.getDefault().removeStickyEvent(NotificationEvents.NoteModerationStatusChanged.class); } }, new RestRequest.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { setNoteIsModerating(event.noteId, event.isModerating); EventBus.getDefault().removeStickyEvent(NotificationEvents.NoteModerationStatusChanged.class); } } ); } }
Source:
public T next() { final T next = this.nextValue; this.nextValue = advance(); return next; }

Target:
public T next() { final T next = nextValue; nextValue = advance(); return next; }
Source:
protected PivotTableModule() { super(NAME, 1, OWidgetsModule.NAME); }

Target:
protected PivotTableModule() { super(NAME, 2, OWidgetsModule.NAME); }
Source:
public boolean evaluate( String referer ) { ExternalSearch es_inst = ExternalSearch.getInstance(); return es_inst.isExternalSearch( referer ); }

Target:
public boolean evaluate( String referer ) { ExternalSearch externalSearch = ExternalSearch.getInstance(); return externalSearch.isExternalSearch( referer ); }
Source:
public void shouldEditAnAutoGenerationOption() throws Exception { final String newLocation = "9356400c-a5a2-4532-8f2b-2361b3446eb8"; final String newSource = "0d47284f-9e9b-4a81-a88b-8bb42bc0a902"; boolean automaticGenerationEnabled = false; boolean manualEntryEnabled = false; SimpleObject autoGenerationOption = new SimpleObject(); autoGenerationOption.add("location", newLocation); autoGenerationOption.add("source", newSource); autoGenerationOption.add("manualEntryEnabled", manualEntryEnabled); autoGenerationOption.add("automaticGenerationEnabled", automaticGenerationEnabled); String json = new ObjectMapper().writeValueAsString(autoGenerationOption); MockHttpServletRequest req = request(RequestMethod.POST, getURI() + "/" + getUuid()); req.setContent(json.getBytes()); handle(req); assertEquals(newLocation, identifierSourceService .getAutoGenerationOption(Context.getPatientService().getPatientIdentifierTypeByUuid(getUuid())) .getLocation().getUuid()); assertEquals(newSource, identifierSourceService .getAutoGenerationOption(Context.getPatientService().getPatientIdentifierTypeByUuid(getUuid())) .getSource().getUuid()); assertFalse(identifierSourceService .getAutoGenerationOption(Context.getPatientService().getPatientIdentifierTypeByUuid(getUuid())) .isAutomaticGenerationEnabled()); assertFalse(identifierSourceService .getAutoGenerationOption(Context.getPatientService().getPatientIdentifierTypeByUuid(getUuid())) .isManualEntryEnabled()); }

Target:
public void shouldEditAnAutoGenerationOption() throws Exception { assertEquals(LOCATION, identifierSourceService.getAutoGenerationOption(Integer.parseInt(getUuid())).getLocation().getUuid()); assertEquals(SOURCE, identifierSourceService.getAutoGenerationOption(Integer.parseInt(getUuid())).getSource().getUuid()); assertTrue( identifierSourceService.getAutoGenerationOption(Integer.parseInt(getUuid())).isAutomaticGenerationEnabled()); assertTrue(identifierSourceService.getAutoGenerationOption(Integer.parseInt(getUuid())).isManualEntryEnabled()); SimpleObject autoGenerationOption = new SimpleObject(); autoGenerationOption.add("location", NEW_LOCATION); autoGenerationOption.add("source", NEW_SOURCE); autoGenerationOption.add("manualEntryEnabled", false); autoGenerationOption.add("automaticGenerationEnabled", false); String json = new ObjectMapper().writeValueAsString(autoGenerationOption); MockHttpServletRequest req = request(RequestMethod.POST, getURI() + "/" + getUuid()); req.setContent(json.getBytes()); handle(req); assertEquals(NEW_LOCATION, identifierSourceService.getAutoGenerationOption(Integer.parseInt(getUuid())).getLocation().getUuid()); assertEquals(NEW_SOURCE, identifierSourceService.getAutoGenerationOption(Integer.parseInt(getUuid())).getSource().getUuid()); assertFalse( identifierSourceService.getAutoGenerationOption(Integer.parseInt(getUuid())).isAutomaticGenerationEnabled()); assertFalse(identifierSourceService.getAutoGenerationOption(Integer.parseInt(getUuid())).isManualEntryEnabled()); }
Source:
public OutgoingChatMessageViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { final LayoutInflater inflater = LayoutInflater.from(parent.getContext()); final View res; if (viewType == 0) { res = inflater.inflate(R.layout.view_chatmessage, parent, false); } else { res = inflater.inflate(R.layout.view_outgoing_chatmessage, parent, false); } return new OutgoingChatMessageViewHolder(res); }

Target:
public ChatMessageViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { final LayoutInflater inflater = LayoutInflater.from(parent.getContext()); final View res; if (viewType == 0) { res = inflater.inflate(R.layout.view_chatmessage, parent, false); } else { res = inflater.inflate(R.layout.view_outgoing_chatmessage, parent, false); } return new ChatMessageViewHolder(res); }
Source:
public Flux<Checkpoint> listCheckpoints(String fullyQualifiedNamespace, String eventHubName, String consumerGroup) { String prefix = getBlobPrefix(fullyQualifiedNamespace, eventHubName, consumerGroup, CHECKPOINT_PATH); BlobListDetails details = new BlobListDetails().setRetrieveMetadata(true); ListBlobsOptions options = new ListBlobsOptions().setPrefix(prefix).setDetails(details); return blobContainerAsyncClient.listBlobs(options) .filter(blobItem -> blobItem.getName().split(BLOB_PATH_SEPARATOR).length == 5) .map(this::convertToCheckpoint); }

Target:
public Flux<Checkpoint> listCheckpoints(String fullyQualifiedNamespace, String eventHubName, String consumerGroup) { String prefix = getBlobPrefix(fullyQualifiedNamespace, eventHubName, consumerGroup, CHECKPOINT_PATH); return listBlobs(prefix, this::convertToCheckpoint); }
Source:
public CuratorFramework curatorFramework(RetryPolicy retryPolicy, ZookeeperProperties properties, ObjectProvider<CuratorFrameworkCustomizer> optionalCuratorFrameworkCustomizerProvider, ObjectProvider<EnsembleProvider> optionalEnsembleProvider, ObjectProvider<TracerDriver> optionalTracerDriverProvider) throws Exception { CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder(); EnsembleProvider ensembleProvider = optionalEnsembleProvider.getIfAvailable(); if (ensembleProvider != null) { builder.ensembleProvider(ensembleProvider); } else { builder.connectString(properties.getConnectString()); } builder.sessionTimeoutMs((int) properties.getSessionTimeout().toMillis()) .connectionTimeoutMs((int) properties.getConnectionTimeout().toMillis()) .retryPolicy(retryPolicy); optionalCuratorFrameworkCustomizerProvider .ifAvailable(customizer -> customizer.customize(builder)); CuratorFramework curator = builder.build(); TracerDriver tracerDriver = optionalTracerDriverProvider.getIfAvailable(); if (curator.getZookeeperClient() != null && tracerDriver != null) { curator.getZookeeperClient().setTracerDriver(tracerDriver); } curator.start(); log.trace("blocking until connected to zookeeper for " + properties.getBlockUntilConnectedWait() + properties.getBlockUntilConnectedUnit()); curator.blockUntilConnected(properties.getBlockUntilConnectedWait(), properties.getBlockUntilConnectedUnit()); log.trace("connected to zookeeper"); return curator; }

Target:
public CuratorFramework curatorFramework(RetryPolicy retryPolicy, ZookeeperProperties properties, ObjectProvider<CuratorFrameworkCustomizer> optionalCuratorFrameworkCustomizerProvider, ObjectProvider<EnsembleProvider> optionalEnsembleProvider, ObjectProvider<TracerDriver> optionalTracerDriverProvider) throws Exception { CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder(); EnsembleProvider ensembleProvider = optionalEnsembleProvider.getIfAvailable(); if (ensembleProvider != null) { builder.ensembleProvider(ensembleProvider); } else { builder.connectString(properties.getConnectString()); } builder.sessionTimeoutMs((int) properties.getSessionTimeout().toMillis()) .connectionTimeoutMs((int) properties.getConnectionTimeout().toMillis()) .retryPolicy(retryPolicy); optionalCuratorFrameworkCustomizerProvider.orderedStream() .forEach(curatorFrameworkCustomizer -> curatorFrameworkCustomizer .customize(builder)); CuratorFramework curator = builder.build(); TracerDriver tracerDriver = optionalTracerDriverProvider.getIfAvailable(); if (curator.getZookeeperClient() != null && tracerDriver != null) { curator.getZookeeperClient().setTracerDriver(tracerDriver); } curator.start(); log.trace("blocking until connected to zookeeper for " + properties.getBlockUntilConnectedWait() + properties.getBlockUntilConnectedUnit()); curator.blockUntilConnected(properties.getBlockUntilConnectedWait(), properties.getBlockUntilConnectedUnit()); log.trace("connected to zookeeper"); return curator; }
Source:
public void handleRequest(HttpServerExchange exchange) throws Exception { AttachmentContent attachment = exchange.getAttachment(AttachmentContent.KEY); try { next.handleRequest(exchange); } finally { byte[] previewBytes = converter.convert(attachment.getMessage()); messagePreviewLog.add(attachment.getTopic().getName(), previewBytes); } }

Target:
public void handleRequest(HttpServerExchange exchange) throws Exception { AttachmentContent attachment = exchange.getAttachment(AttachmentContent.KEY); try { next.handleRequest(exchange); } finally { messagePreviewLog.add(attachment.getTopic().getName(), attachment.getMessage()); } }
Source:
LocalGradleDistribution(File location) { this.location = Preconditions.checkNotNull(location).getAbsoluteFile(); Optional<String> error = validate(location); Preconditions.checkArgument(!error.isPresent(), error.or("")); }

Target:
LocalGradleDistribution(File location) { this.location = Preconditions.checkNotNull(location); }
Source:
public void testHandleSchemesForMultipleSchemes() { RegistrationWindows registrationWindows = new RegistrationWindows(registryWriter); SchemeInformation schemeToTestInformation = new SchemeInformation("schemeToTest", "SchemsToTest is for testing", System.getProperty("eclipse.launcher")); SchemeInformation adtSchemeInformation = new SchemeInformation("adtScheme", "AdtScheme is for testing", System.getProperty("eclipse.launcher")); SchemeInformation otherSchemeInformation = new SchemeInformation("otherScheme", "OtherScheme is for testing", System.getProperty("eclipse.launcher")); registrationWindows.handleSchemes( Arrays.asList(schemeToTestInformation, adtSchemeInformation, otherSchemeInformation), Arrays.asList(adtSchemeInformation, schemeToTestInformation, otherSchemeInformation)); assertEquals(null, registryWriter.getRegisteredHandlerPath("schemeToTest")); }

Target:
public void testHandleSchemesForMultipleSchemes() { SchemeInformation schemeToTestInformation = new SchemeInformation("schemeToTest", "SchemsToTest is for testing", System.getProperty("eclipse.launcher")); SchemeInformation adtSchemeInformation = new SchemeInformation("adtScheme", "AdtScheme is for testing", System.getProperty("eclipse.launcher")); SchemeInformation otherSchemeInformation = new SchemeInformation("otherScheme", "OtherScheme is for testing", System.getProperty("eclipse.launcher")); registrationWindows.handleSchemes( Arrays.asList(schemeToTestInformation, adtSchemeInformation, otherSchemeInformation), Arrays.asList(adtSchemeInformation, schemeToTestInformation, otherSchemeInformation)); assertEquals(null, registryWriter.getRegisteredHandlerPath("schemeToTest")); }
Source:
private DtoVtepBinding addAndVerifyBinding(DtoVtep vtep, UUID bridgeId, String portName, int vlan, boolean firstBinding) { DtoBridge oldBridge = getBridge(bridgeId); DtoVtepBinding binding = postBinding(vtep, makeBinding(vtep.getId(), portName, vlan, bridgeId)); assertEquals(bridgeId, binding.getNetworkId()); assertEquals(portName, binding.getPortName()); assertEquals(vlan, binding.getVlanId()); DtoBridge newBridge = getBridge(bridgeId); MidonetBackend b = FuncTest._injector.getInstance(MidonetBackend.class); int vni = 0; try { vni = Await.result(b.store().get(Topology.Network.class, bridgeId), Duration.create(1, SECONDS)).getVni(); } catch (Exception e) { fail("Exception retrieving bridge: " + bridgeId); } assertTrue(vni >= VxgwVni$.MODULE$.seed()); if (firstBinding) { assertEquals(newBridge.getVxLanPortIds().size(), oldBridge.getVxLanPortIds().size() + 1); } else { assertEquals(newBridge.getVxLanPortIds().size(), oldBridge.getVxLanPortIds().size()); } DtoVxLanPort port = null; for (UUID id : newBridge.getVxLanPortIds()) { DtoVxLanPort candidate = getVxLanPort(id); if (candidate.getVtepId().equals(vtep.getId())) { port = candidate; break; } } assertNotNull(port); assertEquals(vtep.getId(), port.getVtepId()); assertEquals(newBridge.getId(), port.getDeviceId()); return binding; }

Target:
private DtoVtepBinding addAndVerifyBinding(DtoVtep vtep, UUID bridgeId, String portName, int vlan, boolean firstBinding) { DtoBridge oldBridge = getBridge(bridgeId); DtoVtepBinding binding = postBinding(vtep, makeBinding(vtep.getId(), portName, vlan, bridgeId)); assertEquals(bridgeId, binding.getNetworkId()); assertEquals(portName, binding.getPortName()); assertEquals(vlan, binding.getVlanId()); DtoBridge newBridge = getBridge(bridgeId); MidonetBackend b = FuncTest._injector.getInstance(MidonetBackend.class); int vni = 0; try { vni = Await.result(b.store().get(Topology.Network.class, bridgeId), Duration.create(1, SECONDS)).getVni(); } catch (Exception e) { fail("Exception retrieving bridge: " + bridgeId); } assertTrue(vni >= SequenceDispenser.VxgwVni.seed()); if (firstBinding) { assertEquals(newBridge.getVxLanPortIds().size(), oldBridge.getVxLanPortIds().size() + 1); } else { assertEquals(newBridge.getVxLanPortIds().size(), oldBridge.getVxLanPortIds().size()); } DtoVxLanPort port = null; for (UUID id : newBridge.getVxLanPortIds()) { DtoVxLanPort candidate = getVxLanPort(id); if (candidate.getVtepId().equals(vtep.getId())) { port = candidate; break; } } assertNotNull(port); assertEquals(vtep.getId(), port.getVtepId()); assertEquals(newBridge.getId(), port.getDeviceId()); return binding; }
Source:
public void onWebSocketConnect(final Session frontEndSession) { container = ContainerProvider.getWebSocketContainer(); container.setDefaultMaxTextMessageBufferSize(frontEndSession.getPolicy().getMaxTextMessageBufferSize()); container.setDefaultMaxBinaryMessageBufferSize(frontEndSession.getPolicy().getMaxBinaryMessageBufferSize()); container.setAsyncSendTimeout(frontEndSession.getPolicy().getAsyncWriteTimeout()); container.setDefaultMaxSessionIdleTimeout(frontEndSession.getPolicy().getIdleTimeout()); final ProxyInboundClient backendSocket = new ProxyInboundClient(getMessageCallback()); try { backendSession = container.connectToServer(backendSocket, clientConfig, backend); LOG.onConnectionOpen(backend.toString()); } catch (DeploymentException e) { LOG.connectionFailed(e); throw new RuntimeException(e); } catch (IOException e) { LOG.connectionFailed(e); throw new RuntimeIOException(e); } remoteLock.lock(); super.onWebSocketConnect(frontEndSession); this.frontendSession = frontEndSession; final RemoteEndpoint remote = frontEndSession.getRemote(); try { if (!messageBuffer.isEmpty()) { LOG.logMessage("Found old buffered messages"); for (String obj:messageBuffer) { LOG.logMessage("Sending old buffered message [From Backend <---]: " + obj); remote.sendString(obj); } messageBuffer.clear(); if (remote.getBatchMode() == BatchMode.ON) { remote.flush(); } } else { LOG.logMessage("Message buffer is empty"); } } catch (IOException e) { LOG.connectionFailed(e); throw new RuntimeIOException(e); } finally { remoteLock.unlock(); } }

Target:
public void onWebSocketConnect(final Session frontEndSession) { container = ContainerProvider.getWebSocketContainer(); container.setDefaultMaxTextMessageBufferSize(frontEndSession.getPolicy().getMaxTextMessageBufferSize()); container.setDefaultMaxBinaryMessageBufferSize(frontEndSession.getPolicy().getMaxBinaryMessageBufferSize()); container.setAsyncSendTimeout(frontEndSession.getPolicy().getAsyncWriteTimeout()); container.setDefaultMaxSessionIdleTimeout(frontEndSession.getPolicy().getIdleTimeout()); final ProxyInboundClient backendSocket = new ProxyInboundClient(getMessageCallback()); try { backendSession = container.connectToServer(backendSocket, clientConfig, backend); LOG.onConnectionOpen(backend.toString()); } catch (DeploymentException e) { LOG.connectionFailed(e); throw new RuntimeException(e); } catch (IOException e) { LOG.connectionFailed(e); throw new RuntimeIOException(e); } remoteLock.lock(); super.onWebSocketConnect(frontEndSession); this.frontendSession = frontEndSession; final RemoteEndpoint remote = frontEndSession.getRemote(); try { if (!messageBuffer.isEmpty()) { LOG.debugLog("Found old buffered messages"); for (String obj:messageBuffer) { LOG.debugLog("Sending old buffered message [From Backend <---]: " + obj); remote.sendString(obj); } messageBuffer.clear(); if (remote.getBatchMode() == BatchMode.ON) { remote.flush(); } } else { LOG.debugLog("Message buffer is empty"); } } catch (IOException e) { LOG.connectionFailed(e); throw new RuntimeIOException(e); } finally { remoteLock.unlock(); } }
Source:
private void setConflictsWith(GerritClient gerritClient, ChangeInfo element) { ChangeInfo[] conflictsWithChangeInfo = null; if (!("MERGED".equals(element.getStatus())) && !("ABANDONED".equals(element.getStatus()))) { try { conflictsWithChangeInfo = queryConflictsWith(gerritClient, element.getChange_id(), new NullProgressMonitor()); } catch (MalformedURLException e) { EGerritCorePlugin.logError(gerritClient.getRepository().formatGerritVersion() + e.getMessage()); } List<ChangeInfo> conflictsWithChangeInfolist = Arrays.asList(conflictsWithChangeInfo); List<ChangeInfo> conflictsWithChangeInfolistNew = new ArrayList<ChangeInfo>(); for (int i = 0; i < conflictsWithChangeInfolist.size(); i++) { if (conflictsWithChangeInfolist.get(i).getChange_id().compareTo(fChangeInfo.getChange_id()) != 0 && conflictsWithChangeInfolist.get(i).getStatus().compareTo("NEW") == 0 && conflictsWithChangeInfolist.get(i).isMergeable()) { conflictsWithChangeInfolistNew.add(conflictsWithChangeInfolist.remove(i)); } } fChangeInfo.getConflictsWith().clear(); for (ChangeInfo changeInfo : conflictsWithChangeInfolistNew) { fChangeInfo.getConflictsWith().add(changeInfo); } } }

Target:
private void setConflictsWith(GerritClient gerritClient, ChangeInfo element) { ChangeInfo[] conflictsWithChangeInfo = null; if (!("MERGED".equals(element.getStatus())) && !("ABANDONED".equals(element.getStatus()))) { try { conflictsWithChangeInfo = queryConflictsWith(gerritClient, element.getChange_id(), new NullProgressMonitor()); } catch (MalformedURLException e) { EGerritCorePlugin.logError(gerritClient.getRepository().formatGerritVersion() + e.getMessage()); } List<ChangeInfo> conflictsWithChangeInfolist = null; List<ChangeInfo> conflictsWithChangeInfolistNew = new ArrayList<ChangeInfo>(); if (conflictsWithChangeInfo != null) { conflictsWithChangeInfolist = Arrays.asList(conflictsWithChangeInfo); for (int i = 0; i < conflictsWithChangeInfolist.size(); i++) { if (conflictsWithChangeInfolist.get(i).getChange_id().compareTo(fChangeInfo.getChange_id()) != 0 && conflictsWithChangeInfolist.get(i).getStatus().compareTo("NEW") == 0 && conflictsWithChangeInfolist.get(i).isMergeable()) { conflictsWithChangeInfolistNew.add(conflictsWithChangeInfolist.remove(i)); } } } fChangeInfo.getConflictsWith().clear(); fChangeInfo.getConflictsWith().addAll(conflictsWithChangeInfolistNew); } }
Source:
public synchronized EndpointContext getConnectionWriteContext() { if (null == connectionWriteContext) { connectionWriteContext = new DtlsEndpointContext(peer, peerIdentity, sessionIdentifier.toString(), String.valueOf(writeEpoch), cipherSuite.name()); } return connectionWriteContext; }

Target:
public DtlsEndpointContext getConnectionWriteContext() { return new DtlsEndpointContext(peer, peerIdentity, sessionIdentifier.toString(), String.valueOf(writeEpoch), cipherSuite.name()); }
Source:
private void setMultipleValuedReference(Object value) { if (!table.isDisposed()) { final ISelection selection = new StructuredSelection(value); tableViewer.setSelection(selection); if (value instanceof List) { tableViewer.setInput(((List) value).toArray()); if (!table.isEnabled()) { table.setEnabled(true); } } } }

Target:
private void setMultipleValuedReference(Object value) { if (!table.isDisposed()) { final ISelection selection = new StructuredSelection(value); tableViewer.setSelection(selection); List<Object> values = new ArrayList<Object>(); if (value instanceof Iterable<?>) { for (Object val : (Iterable<?>) value) { values.add(val); } } else { values.add(value); } tableViewer.setInput(values.toArray()); if (!table.isEnabled()) { table.setEnabled(true); } } }
Source:
public void init() { getMapAsync(new OnMapReadyCallback() { @Override public void onMapReady(GoogleMap googleMap) { if (googleMap != null && getActivity() != null) { NativeGoogleMapFragment.this.googleMap = googleMap; NativeGoogleMapFragment.this.markers = new HashMap<>(); UiSettings settings = NativeGoogleMapFragment.this.googleMap.getUiSettings(); settings.setZoomControlsEnabled(false); settings.setMyLocationButtonEnabled(false); setMyLocationEnabled(true); if (onMapLoadedListener != null) { onMapLoadedListener.onMapLoaded(); } } } }); }

Target:
public void init() { getMapAsync(new OnMapReadyCallback() { @Override public void onMapReady(GoogleMap googleMap) { if (googleMap != null && getActivity() != null) { NativeGoogleMapFragment.this.googleMap = googleMap; UiSettings settings = NativeGoogleMapFragment.this.googleMap.getUiSettings(); settings.setZoomControlsEnabled(false); settings.setMyLocationButtonEnabled(false); setMyLocationEnabled(true); if (onMapLoadedListener != null) { onMapLoadedListener.onMapLoaded(); } } } }); }
Source:
private Geometry readGeometry() throws IOException, ParseException { TWKBMetadata metadata = readMetadata(); switch (metadata.getType()) { case twkbPoint: return readPoint(metadata); case twkbLineString: return readLineString(metadata); case twkbPolygon: return readPolygon(metadata); case twkbMultiPoint: return readMultiPoint(metadata); case twkbMultiLineString: return readMultiLineString(metadata); case twkbMultiPolygon: return readMultiPolygon(metadata); case twkbGeometryCollection: return readGeometryCollection(metadata); } return null; }

Target:
private Geometry readGeometry() throws IOException, ParseException { TWKBMetadata metadata = readMetadata(); int geometryType = metadata.getType(); switch (geometryType) { case twkbPoint: return readPoint(metadata); case twkbLineString: return readLineString(metadata); case twkbPolygon: return readPolygon(metadata); case twkbMultiPoint: return readMultiPoint(metadata); case twkbMultiLineString: return readMultiLineString(metadata); case twkbMultiPolygon: return readMultiPolygon(metadata); case twkbGeometryCollection: return readGeometryCollection(metadata); default: throw new ParseException("Unknown TWKB type " + geometryType); } }
Source:
public String translate(final With with) { throw new OperationNotSupportedRuntimeException("MySQL 5.7 does not support WITH"); }

Target:
public String translate(final With with) { throw new OperationNotSupportedRuntimeException("MySQL does not support WITH."); }
Source:
public HelixManagerProperty(Properties helixManagerProperties, CloudConfig cloudConfig) { _helixCloudProperty = new HelixCloudProperty(cloudConfig); setVersion(helixManagerProperties.getProperty(SystemPropertyKeys.HELIX_MANAGER_VERSION)); setHealthReportLatency( helixManagerProperties.getProperty(SystemPropertyKeys.PARTICIPANT_HEALTH_REPORT_LATENCY)); }

Target:
public HelixManagerProperty(Properties helixManagerProperties, CloudConfig cloudConfig) { _helixCloudProperty = new HelixCloudProperty(cloudConfig); _version = helixManagerProperties.getProperty(SystemPropertyKeys.HELIX_MANAGER_VERSION); _healthReportLatency = Long.parseLong( helixManagerProperties.getProperty(SystemPropertyKeys.PARTICIPANT_HEALTH_REPORT_LATENCY)); }
Source:
public VSpan(AnnotationLayer aLayer, AnnotationFS aFS, String aType, VRange aOffsets, Map<String, String> aFeatures) { this(aLayer, new VID(getAddr(aFS)), aType, Collections.singletonList(aOffsets), aFeatures); }

Target:
public VSpan(AnnotationLayer aLayer, AnnotationFS aFS, String aType, VRange aOffsets, Map<String, String> aFeatures) { this(aLayer, new VID(getAddr(aFS)), aType, asList(aOffsets), aFeatures); }
Source:
private static void computeInput(final PaneBasedSelectionWizardDescription paneBasedSelectionWizardDescription, final EObject container, final IInterpreter interpreter, final TreeItemWrapper input) { final Collection<EObject> referencingENode = ImmutableSet.copyOf(RuntimeLoggerManager.INSTANCE.decorate(interpreter).evaluateCollection(container, paneBasedSelectionWizardDescription, ToolPackage.eINSTANCE.getPaneBasedSelectionWizardDescription_CandidatesExpression())); if (paneBasedSelectionWizardDescription.isTree()) { final Collection<EObject> referencingRoots = RuntimeLoggerManager.INSTANCE.decorate(interpreter).evaluateCollection(container, paneBasedSelectionWizardDescription, ToolPackage.eINSTANCE.getPaneBasedSelectionWizardDescription_RootExpression()); final Iterator<EObject> iterRoots = referencingRoots.iterator(); while (iterRoots.hasNext()) { final EObject refRoot = iterRoots.next(); if (referencingENode.contains(refRoot)) { final TreeItemWrapper treeItem = new TreeItemWrapper(refRoot, input); input.getChildren().add(treeItem); PaneBasedSelectionWizardCommand.computeChildren(paneBasedSelectionWizardDescription, referencingENode, interpreter, treeItem, refRoot); } } } else { final Iterator<EObject> iterRoots = referencingENode.iterator(); while (iterRoots.hasNext()) { final EObject refRoot = iterRoots.next(); if (referencingENode.contains(refRoot)) { final TreeItemWrapper treeItem = new TreeItemWrapper(refRoot, input); input.getChildren().add(treeItem); } } } }

Target:
private static void computeInput(final PaneBasedSelectionWizardDescription paneBasedSelectionWizardDescription, final EObject container, final IInterpreter interpreter, final TreeItemWrapper input) { final Collection<EObject> referencingENode = ImmutableSet.copyOf(RuntimeLoggerManager.INSTANCE.decorate(interpreter).evaluateCollection(container, paneBasedSelectionWizardDescription, ToolPackage.eINSTANCE.getPaneBasedSelectionWizardDescription_CandidatesExpression())); if (paneBasedSelectionWizardDescription.isTree()) { final Collection<EObject> referencingRoots = RuntimeLoggerManager.INSTANCE.decorate(interpreter).evaluateCollection(container, paneBasedSelectionWizardDescription, ToolPackage.eINSTANCE.getPaneBasedSelectionWizardDescription_RootExpression()); final Iterator<EObject> iterRoots = referencingRoots.iterator(); while (iterRoots.hasNext()) { final EObject refRoot = iterRoots.next(); if (referencingENode.contains(refRoot)) { final TreeItemWrapper treeItem = new TreeItemWrapper(refRoot, input); input.getChildren().add(treeItem); PaneBasedSelectionWizardCommand.computeChildren(paneBasedSelectionWizardDescription, referencingENode, interpreter, treeItem, refRoot); } } } else { final Iterator<EObject> iterRoots = referencingENode.iterator(); while (iterRoots.hasNext()) { final EObject refRoot = iterRoots.next(); final TreeItemWrapper treeItem = new TreeItemWrapper(refRoot, input); input.getChildren().add(treeItem); } } }
Source:
public StepExecution getLastStepExecution(JobInstance jobInstance, String stepName) { List<JobExecution> jobExecutions = jobExecutionDao.findJobExecutions(jobInstance); List<StepExecution> stepExecutions = new ArrayList<StepExecution>(jobExecutions.size()); for (JobExecution jobExecution : jobExecutions) { stepExecutionDao.addStepExecutions(jobExecution); for (StepExecution stepExecution : jobExecution.getStepExecutions()) { if (stepName.equals(stepExecution.getStepName())) { stepExecutions.add(stepExecution); } } } StepExecution latest = null; for (StepExecution stepExecution : stepExecutions) { if (latest == null) { latest = stepExecution; } if (latest.getStartTime().getTime() <= stepExecution.getStartTime().getTime()) { latest = stepExecution; } } if (latest != null) { ExecutionContext stepExecutionContext = ecDao.getExecutionContext(latest); latest.setExecutionContext(stepExecutionContext); ExecutionContext jobExecutionContext = ecDao.getExecutionContext(latest.getJobExecution()); latest.getJobExecution().setExecutionContext(jobExecutionContext); } return latest; }

Target:
public StepExecution getLastStepExecution(JobInstance jobInstance, String stepName) { List<JobExecution> jobExecutions = jobExecutionDao.findJobExecutions(jobInstance); List<StepExecution> stepExecutions = new ArrayList<StepExecution>(jobExecutions.size()); for (JobExecution jobExecution : jobExecutions) { stepExecutionDao.addStepExecutions(jobExecution); for (StepExecution stepExecution : jobExecution.getStepExecutions()) { if (stepName.equals(stepExecution.getStepName())) { stepExecutions.add(stepExecution); } } } StepExecution latest = null; for (StepExecution stepExecution : stepExecutions) { if (latest == null) { latest = stepExecution; } if (latest.getStartTime().getTime() < stepExecution.getStartTime().getTime()) { latest = stepExecution; } if (latest.getStartTime().getTime() == stepExecution.getStartTime().getTime() && latest.getId() < stepExecution.getId()) { latest = stepExecution; } } if (latest != null) { ExecutionContext stepExecutionContext = ecDao.getExecutionContext(latest); latest.setExecutionContext(stepExecutionContext); ExecutionContext jobExecutionContext = ecDao.getExecutionContext(latest.getJobExecution()); latest.getJobExecution().setExecutionContext(jobExecutionContext); } return latest; }
Source:
public void blockManualGoldenResourceManipulationOnUpdate(IBaseResource theOldResource, IBaseResource theUpdatedResource, RequestDetails theRequestDetails, ServletRequestDetails theServletRequestDetails) { if (myMdmSettings.isPreventMultipleEids()) { forbidIfHasMultipleEids(theUpdatedResource); } if (myGoldenResourceHelper.isDeactivated(theUpdatedResource)) { ourLog.debug("Deleting MDM links to deactivated Golden resource {}", theUpdatedResource.getIdElement().toUnqualifiedVersionless()); int deleted = myMdmLinkDeleteSvc.deleteNonRedirectWithWithAnyReferenceTo(theUpdatedResource); if (deleted > 0) { ourLog.debug("Deleted MDM links", deleted); } } if (isInternalRequest(theRequestDetails)) { return; } forbidIfMdmManagedTagIsPresent(theOldResource); forbidModifyingMdmTag(theUpdatedResource, theOldResource); if (myMdmSettings.isPreventEidUpdates()) { forbidIfModifyingExternalEidOnTarget(theUpdatedResource, theOldResource); } }

Target:
public void blockManualGoldenResourceManipulationOnUpdate(IBaseResource theOldResource, IBaseResource theUpdatedResource, RequestDetails theRequestDetails, ServletRequestDetails theServletRequestDetails) { if (myMdmSettings.isPreventMultipleEids()) { forbidIfHasMultipleEids(theUpdatedResource); } if (MdmResourceUtil.isGoldenRecordRedirected(theUpdatedResource)) { ourLog.debug("Deleting MDM links to deactivated Golden resource {}", theUpdatedResource.getIdElement().toUnqualifiedVersionless()); int deleted = myMdmLinkDeleteSvc.deleteNonRedirectWithAnyReferenceTo(theUpdatedResource); if (deleted > 0) { ourLog.debug("Deleted MDM links", deleted); } } if (isInternalRequest(theRequestDetails)) { return; } forbidIfMdmManagedTagIsPresent(theOldResource); forbidModifyingMdmTag(theUpdatedResource, theOldResource); if (myMdmSettings.isPreventEidUpdates()) { forbidIfModifyingExternalEidOnTarget(theUpdatedResource, theOldResource); } }
Source:
public void download(List<DownloadFile> downloadFiles, DownloadBatchStatusCallback statusCallback, DownloadFile.Callback fileCallback) { List<Callable<Object>> callables = new ArrayList<>(downloadFiles.size()); for (DownloadFile downloadFile : downloadFiles) { callables.add(Executors.callable(() -> { if (DownloadBatch.batchCannotContinue(downloadBatchStatus, connectionChecker, downloadsBatchPersistence, statusCallback)) { throw new RuntimeException("Ignored interrupt download exception"); } downloadFile.download(fileCallback); })); } try { CONCURRENT_EXECUTOR_SERVICE.invokeAll(callables); } catch (InterruptedException e) { CONCURRENT_EXECUTOR_SERVICE.shutdown(); } }

Target:
public void download(List<DownloadFile> downloadFiles, DownloadBatchStatusCallback statusCallback, DownloadFile.Callback fileCallback) { List<Callable<Object>> callables = new ArrayList<>(downloadFiles.size()); for (DownloadFile downloadFile : downloadFiles) { callables.add(Executors.callable(() -> { if (DownloadBatch.batchCannotContinue(downloadBatchStatus, connectionChecker, downloadsBatchPersistence, statusCallback)) { throw new CancellationException("Ignored interrupt download exception"); } downloadFile.download(fileCallback); })); } try { CONCURRENT_EXECUTOR_SERVICE.invokeAll(callables); } catch (InterruptedException e) { CONCURRENT_EXECUTOR_SERVICE.shutdown(); } }
Source:
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { super.handle(target, baseRequest, request, response); if (baseRequest.isHandled()) return; String jsonp = request.getParameter(HTTPClientInterface.JSONP); AuthenticationResult authResult = null; try { response.setContentType(jsonContentType); if (!HTTPClientInterface.validateJSONP(jsonp, baseRequest, response)) { return; } response.setStatus(HttpServletResponse.SC_OK); authResult = authenticate(baseRequest); if (!authResult.isAuthenticated()) { response.getWriter().print(buildClientResponse(jsonp, ClientResponse.UNEXPECTED_FAILURE, authResult.m_message)); response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); baseRequest.setHandled(true); return; } if (!target.equals("/")) { response.getWriter().print(buildClientResponse(jsonp, ClientResponse.UNEXPECTED_FAILURE, "Resource not found")); response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); return; } if (jsonp != null) { response.getWriter().write(jsonp + "("); } m_mapper.writeValue(response.getWriter(), new Profile(authResult.m_user, authResult.m_perms)); if (jsonp != null) { response.getWriter().write(")"); } baseRequest.setHandled(true); } catch (Exception ex) { logger.info("Not servicing url: " + baseRequest.getRequestURI() + " Details: "+ ex.getMessage(), ex); } }

Target:
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { super.handle(target, baseRequest, request, response); if (baseRequest.isHandled()) return; String jsonp = request.getParameter(HTTPClientInterface.JSONP); AuthenticationResult authResult = null; try { response.setContentType(jsonContentType); if (!HTTPClientInterface.validateJSONP(jsonp, baseRequest, response)) { return; } response.setStatus(HttpServletResponse.SC_OK); authResult = authenticate(baseRequest); if (!authResult.isAuthenticated()) { response.getWriter().print(buildClientResponse(jsonp, ClientResponse.UNEXPECTED_FAILURE, authResult.m_message)); response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); baseRequest.setHandled(true); return; } if (!target.equals("/")) { response.getWriter().print(buildClientResponse(jsonp, ClientResponse.UNEXPECTED_FAILURE, "Resource not found")); response.setStatus(HttpServletResponse.SC_NOT_FOUND); baseRequest.setHandled(true); return; } if (jsonp != null) { response.getWriter().write(jsonp + "("); } m_mapper.writeValue(response.getWriter(), new Profile(authResult.m_user, authResult.m_perms)); if (jsonp != null) { response.getWriter().write(")"); } baseRequest.setHandled(true); } catch (Exception ex) { logger.info("Not servicing url: " + baseRequest.getRequestURI() + " Details: "+ ex.getMessage(), ex); } }
Source:
public <M> IntermediateMessageStreamImpl<M> getIntermediateStream(String streamId, Serde<M> serde, boolean isBroadcast) { Preconditions.checkState(!inputOperators.containsKey(streamId) && !outputStreams.containsKey(streamId), "getIntermediateStream must not be called multiple times with the same streamId: " + streamId); Serde streamSerde; if (serde != null) { streamSerde = serde; } else { if (defaultSystemDescriptor != null) { LOGGER.info("Using default system's serde for intermediate stream: " + streamId); streamSerde = (Serde) defaultSystemDescriptor.getSystemSerde().orElse(null); } else { LOGGER.warn("No serde defined for intermediate stream: " + streamId + ". Key and message serdes specified for the job.default.system will be used."); streamSerde = null; } } if (isBroadcast) broadcastStreams.add(streamId); boolean isKeyed; KV<Serde, Serde> kvSerdes; if (streamSerde == null) { isKeyed = true; kvSerdes = new KV<>(null, null); } else { isKeyed = streamSerde instanceof KVSerde; kvSerdes = getKVSerdes(streamId, streamSerde); } InputTransformer<?> transformer = null; if (defaultSystemDescriptor instanceof TransformingSystemDescriptor) { transformer = ((TransformingSystemDescriptor) defaultSystemDescriptor).getTransformer(); } InputOperatorSpec inputOperatorSpec = OperatorSpecs.createInputOperatorSpec(streamId, kvSerdes.getKey(), kvSerdes.getValue(), transformer, isKeyed, this.getNextOpId(OpCode.INPUT, null)); inputOperators.put(streamId, inputOperatorSpec); outputStreams.put(streamId, new OutputStreamImpl(streamId, kvSerdes.getKey(), kvSerdes.getValue(), isKeyed)); return new IntermediateMessageStreamImpl<>(this, inputOperators.get(streamId), outputStreams.get(streamId)); }

Target:
public <M> IntermediateMessageStreamImpl<M> getIntermediateStream(String streamId, Serde<M> serde, boolean isBroadcast) { Preconditions.checkState(!inputOperators.containsKey(streamId) && !outputStreams.containsKey(streamId), "getIntermediateStream must not be called multiple times with the same streamId: " + streamId); if (serde == null) { LOGGER.info("No serde provided for intermediate stream: " + streamId + ". Key and message serdes configured for the job.default.system will be used."); } if (isBroadcast) broadcastStreams.add(streamId); boolean isKeyed; KV<Serde, Serde> kvSerdes; if (serde == null) { isKeyed = true; kvSerdes = new KV<>(null, null); } else { isKeyed = serde instanceof KVSerde; kvSerdes = getKVSerdes(streamId, serde); } InputTransformer transformer = (InputTransformer) defaultSystemDescriptorOptional .flatMap(SystemDescriptor::getTransformer).orElse(null); InputOperatorSpec inputOperatorSpec = OperatorSpecs.createInputOperatorSpec(streamId, kvSerdes.getKey(), kvSerdes.getValue(), transformer, isKeyed, this.getNextOpId(OpCode.INPUT, null)); inputOperators.put(streamId, inputOperatorSpec); outputStreams.put(streamId, new OutputStreamImpl(streamId, kvSerdes.getKey(), kvSerdes.getValue(), isKeyed)); return new IntermediateMessageStreamImpl<>(this, inputOperators.get(streamId), outputStreams.get(streamId)); }