auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static List<CompositeRequirement> wrapAsCompositeRequirements(List<Requirement> requirements) { return requirements.stream().map((Requirement requirement) -> { if (requirement instanceof CompositeRequirement) { return (CompositeRequirement) requirement; } else { return new SingletonCompositeRequirement(requirement); } }).collect(Collectors.toList()); }

Target:
private static List<CompositeRequirement> wrapAsCompositeRequirements(List<Requirement> requirements) { return requirements.stream() .map((Requirement requirement) -> { if (requirement instanceof CompositeRequirement) { return (CompositeRequirement) requirement; } else { return new SingletonCompositeRequirement(requirement); } }).collect(toImmutableList()); }
Source:
protected ZkServer startZkServer(final String zkAddress) { String zkDir = zkAddress.replace(':', '_'); final String logDir = "/tmp/" + zkDir + "/logs"; final String dataDir = "/tmp/" + zkDir + "/dataDir"; try { FileUtils.deleteDirectory(new File(dataDir)); FileUtils.deleteDirectory(new File(logDir)); } catch (IOException e) { e.printStackTrace(); } IDefaultNameSpace defaultNameSpace = zkClient -> { }; int port = Integer.parseInt(zkAddress.substring(zkAddress.lastIndexOf(':') + 1)); ZkServer zkServer = new ZkServer(dataDir, logDir, defaultNameSpace, port); System.out.println("Starting ZK server at " + zkAddress); try { zkServer.start(); } catch (Exception e) { e.printStackTrace(); } return zkServer; }

Target:
protected ZkServer startZkServer(final String zkAddress) { String zkDir = zkAddress.replace(':', '_'); final String logDir = "/tmp/" + zkDir + "/logs"; final String dataDir = "/tmp/" + zkDir + "/dataDir"; try { FileUtils.deleteDirectory(new File(dataDir)); FileUtils.deleteDirectory(new File(logDir)); } catch (IOException e) { e.printStackTrace(); } IDefaultNameSpace defaultNameSpace = zkClient -> { }; int port = Integer.parseInt(zkAddress.substring(zkAddress.lastIndexOf(':') + 1)); ZkServer zkServer = new ZkServer(dataDir, logDir, defaultNameSpace, port); System.out.println("Starting ZK server at " + zkAddress); zkServer.start(); return zkServer; }
Source:
public void setUserTransactionOperationsProviderClassName(String providerClassName) { synchronized (this) { if(providerClassName == null) { this.userTransactionOperationsProvider = null; } else if(!providerClassName.equals(this.userTransactionOperationsProviderClassName)) { this.userTransactionOperationsProvider = null; } this.userTransactionOperationsProviderClassName = providerClassName; } }

Target:
public void setUserTransactionOperationsProviderClassName(String providerClassName) { synchronized (this) { if (!userTransactionOperationsProviderClassName.equals(providerClassName)) { userTransactionOperationsProvider = null; } if(providerClassName == null) { userTransactionOperationsProviderClassName = defaultTransactionOperationsProviderClassName; } else { userTransactionOperationsProviderClassName = providerClassName; } } }
Source:
public HighlightImpl(int beginIndex, int endIndex) { this.valueIndex = 0; this.beginIndex = beginIndex; this.endIndex = endIndex; }

Target:
public HighlightImpl(int beginIndex, int endIndex) { this(beginIndex, endIndex, 0); }
Source:
public ResponseEntity<?> getCursors(@PathVariable("subscriptionId") final String subscriptionId, final NativeWebRequest request) { if (!featureToggleService.isFeatureEnabled(FeatureToggleService.Feature.HIGH_LEVEL_API)) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } try { return ResponseEntity.status(HttpStatus.OK).body(cursorsCommitService.getSubscriptionCursors(subscriptionId)); } catch (final NakadiException e) { return Responses.create(e.asProblem(), request); } }

Target:
public ResponseEntity<?> getCursors(@PathVariable("subscriptionId") final String subscriptionId, final NativeWebRequest request) { if (!featureToggleService.isFeatureEnabled(HIGH_LEVEL_API)) { return new ResponseEntity<>(NOT_IMPLEMENTED); } try { final List<Cursor> cursors = cursorsService.getSubscriptionCursors(subscriptionId); return status(OK).body(cursors); } catch (final NakadiException e) { return create(e.asProblem(), request); } }
Source:
public BookPageCrafting(String name, IRecipe... recipes) { super(name); output = recipes[0].getRecipeOutput(); for (IRecipe recipe : recipes) { if (recipe instanceof ShapedRecipeFactory.ShapedRecipe) { for (int i = 0; i < 9; i++) { Collection<Object> newList = new ArrayList<>(); if (inputs[i] != null) { if (inputs[i] instanceof Collection) { newList.addAll((Collection) inputs[i]); } else { newList.add(inputs[i]); } } if (recipe.getIngredients().size() > i && recipe.getIngredients().get(i) != Ingredient.EMPTY) { newList.addAll(Arrays.asList(recipe.getIngredients().get(i).getMatchingStacks())); } inputs[i] = newList; } } else if (recipe instanceof ShapelessRecipeFactory.ShapelessRecipe) { NonNullList<Ingredient> recipeInputs = recipe.getIngredients(); for (int i = 0; i < 9; i++) { Collection<Object> newList = new ArrayList<>(); if (inputs[i] != null) { if (inputs[i] instanceof Collection) { newList.addAll((Collection) inputs[i]); } else { newList.add(inputs[i]); } } if (recipeInputs.size() > i) { newList.addAll(Arrays.asList(recipeInputs.get(i).getMatchingStacks())); } inputs[i] = newList; } } } recipe = recipes; }

Target:
public BookPageCrafting(String name, IRecipe... recipes) { super(name); output = recipes[0].getRecipeOutput(); for (IRecipe recipe : recipes) { if(recipe != null) { for (int i = 0; i < 9; i++) { Collection<Object> newList = new ArrayList<>(); if (inputs[i] != null) { if (inputs[i] instanceof Collection) { newList.addAll((Collection) inputs[i]); } else { newList.add(inputs[i]); } } if (recipe.getIngredients().size() > i && recipe.getIngredients().get(i) != Ingredient.EMPTY) { newList.addAll(Arrays.asList(recipe.getIngredients().get(i).getMatchingStacks())); } inputs[i] = newList; } } } recipe = recipes; }
Source:
public void testReturnSameNameIfRepositoryDoesNotExist() { POM pom = new POM("repository", "description", "url", null); WorkspaceProjectServiceImpl impl = (WorkspaceProjectServiceImpl) this.workspaceProjectService; String newName = impl.createProjectName(this.ou1, pom.getName()); assertEquals("repository", newName); }

Target:
public void testReturnSameNameIfRepositoryDoesNotExist() { String projectName = "projectA"; POM pom = new POM(projectName, "description", "url", null); WorkspaceProjectServiceImpl impl = (WorkspaceProjectServiceImpl) this.workspaceProjectService; String newName = impl.createFreshProjectName(this.ou1, pom.getName()); assertEquals(projectName, newName); }
Source:
private synchronized void checkIfOpen() { if (status != TxStatus.OPEN) { throw new IllegalStateException("Transation is no longer open!"); } }

Target:
private synchronized void checkIfOpen() { if (status != TxStatus.OPEN) { throw new IllegalStateException("Transation is no longer open! status = " + status); } }
Source:
private void disassociate(VirtualItem item) { unmapElement(item.getData(), item); item.setData(null); for (VirtualItem item2 : item.getItems()) { if (item2.getData() != null) { disassociate(item2); } } }

Target:
private void disassociate(VirtualItem item) { unmapElement(item.getData(), item); item.setData(null); for (VirtualItem childItem : item.getItems()) { if (childItem.getData() != null) { disassociate(childItem); } } }
Source:
public BuildersBaneEffect() { super(Outcome.DestroyPermanent); this.staticText = "Destroy X target artifacts. Builder's Bane deals damage to each player equal to the number of artifacts he or she controlled put into a graveyard this way."; }

Target:
public BuildersBaneEffect() { super(Outcome.DestroyPermanent); this.staticText = "Destroy X target artifacts. {this} deals damage to each player equal to the number of artifacts he or she controlled put into a graveyard this way"; }
Source:
ApplyFunctionExpr(ApplyFunction function, String name, LambdaExpr expr, List<Expr> args) { this.function = function; this.name = name; this.argsExpr = ImmutableList.copyOf(args); this.lambdaExpr = expr; function.validateArguments(expr, args); ImmutableList.Builder<BindingDetails> argBindingDetailsBuilder = ImmutableList.builder(); BindingDetails accumulator = new BindingDetails(); for (Expr arg : argsExpr) { BindingDetails argDetails = arg.analyzeInputs(); argBindingDetailsBuilder.add(argDetails); accumulator = accumulator.with(argDetails); } lambdaBindingDetails = lambdaExpr.analyzeInputs(); boolean isArrayOutput = function.hasArrayOutput() || (function instanceof ApplyFunction.BaseFoldFunction && lambdaBindingDetails.isOutputArray()); bindingDetails = accumulator.with(lambdaBindingDetails) .withArrayArguments(function.getArrayInputs(argsExpr)) .withArrayInputs(true) .withArrayOutput(isArrayOutput); argsBindingDetails = argBindingDetailsBuilder.build(); }

Target:
ApplyFunctionExpr(ApplyFunction function, String name, LambdaExpr expr, List<Expr> args) { this.function = function; this.name = name; this.argsExpr = ImmutableList.copyOf(args); this.lambdaExpr = expr; function.validateArguments(expr, args); ImmutableList.Builder<BindingDetails> argBindingDetailsBuilder = ImmutableList.builder(); BindingDetails accumulator = new BindingDetails(); for (Expr arg : argsExpr) { BindingDetails argDetails = arg.analyzeInputs(); argBindingDetailsBuilder.add(argDetails); accumulator = accumulator.with(argDetails); } lambdaBindingDetails = lambdaExpr.analyzeInputs(); bindingDetails = accumulator.with(lambdaBindingDetails) .withArrayArguments(function.getArrayInputs(argsExpr)) .withArrayInputs(true) .withArrayOutput(function.hasArrayOutput(lambdaExpr)); argsBindingDetails = argBindingDetailsBuilder.build(); }
Source:
public Mono<CustomFormModel> getCustomModel(String modelId) { try { return getCustomFormModelWithResponse(modelId).flatMap(FluxUtil::toMono); } catch (RuntimeException ex) { return monoError(logger, ex); } }

Target:
public Mono<CustomFormModel> getCustomModel(String modelId) { return getCustomModelWithResponse(modelId).flatMap(FluxUtil::toMono); }
Source:
private CompletionStage<Void> applyChunk(Address sender, IntSet mySegments, StateChunk stateChunk) { if (!mySegments.contains(stateChunk.getSegmentId())) { log.warnf("Discarding received cache entries for segment %d of cache %s because they do not belong to this node.", stateChunk.getSegmentId(), cacheName); return CompletableFutures.completedNull(); } InboundTransferTask inboundTransfer; synchronized (transferMapsLock) { List<InboundTransferTask> inboundTransfers = transfersBySegment.get(stateChunk.getSegmentId()); if (inboundTransfers != null) { inboundTransfer = inboundTransfers.stream().filter(task -> task.getSource().equals(sender)).findFirst().orElse(null); } else { inboundTransfer = null; } } if (inboundTransfer != null) { return doApplyState(sender, stateChunk.getSegmentId(), stateChunk.getCacheEntries()) .thenAccept( v -> inboundTransfer.onStateReceived(stateChunk.getSegmentId(), stateChunk.isLastChunk())); } else { if (cache.wired().getStatus().allowInvocations()) { log.ignoringUnsolicitedState(sender, stateChunk.getSegmentId(), cacheName); } } return CompletableFutures.completedNull(); }

Target:
private CompletionStage<Void> applyChunk(Address sender, IntSet mySegments, StateChunk stateChunk) { if (!mySegments.contains(stateChunk.getSegmentId())) { log.debugf("Discarding received cache entries for segment %d of cache %s because they do not belong to this node.", stateChunk.getSegmentId(), cacheName); return CompletableFutures.completedNull(); } InboundTransferTask inboundTransfer; synchronized (transferMapsLock) { List<InboundTransferTask> inboundTransfers = transfersBySegment.get(stateChunk.getSegmentId()); if (inboundTransfers != null) { inboundTransfer = inboundTransfers.stream().filter(task -> task.getSource().equals(sender)).findFirst().orElse(null); } else { inboundTransfer = null; } } if (inboundTransfer != null) { return doApplyState(sender, stateChunk.getSegmentId(), stateChunk.getCacheEntries()) .thenAccept( v -> inboundTransfer.onStateReceived(stateChunk.getSegmentId(), stateChunk.isLastChunk())); } else { if (cache.wired().getStatus().allowInvocations()) { log.ignoringUnsolicitedState(sender, stateChunk.getSegmentId(), cacheName); } } return CompletableFutures.completedNull(); }
Source:
public String getDocumentTitle() { JavascriptExecutor js = (JavascriptExecutor) driver; return (String) js.executeScript("return arguments[0].innerText", documentTitle); }

Target:
public String getDocumentTitle() { return (String) jsActions.execute("return arguments[0].innerText", documentTitle); }
Source:
private TreeViewer createTreeViewer(final Composite parent) { final int style = SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER; EObjectFilter filter = new EObjectFilter(); filter.setIncludeLeadingWildcard(true); try { Class<?> c = filter.getClass().getSuperclass(); Field f = c.getDeclaredField("useEarlyReturnIfMatcherIsNull"); f.setAccessible(true); f.setBoolean(filter, Boolean.FALSE); } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException x) { } tree = SWTUtil.createFilteredTree(parent, style, filter); ReflectionHelper.invokeMethodWithoutException(tree, "setQuickSelectionMode", new Class[] { Boolean.TYPE }, new Object[] { true }); final TreeViewer viewer = tree.getViewer(); final GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); viewer.getControl().setLayoutData(gridData); viewer.getTree().setHeaderVisible(false); viewer.getTree().setLinesVisible(false); viewer.setContentProvider(new SessionContentProvider()); viewer.setLabelProvider(new AdapterFactoryLabelProvider(ViewHelper.INSTANCE.createAdapterFactory())); return viewer; }

Target:
private TreeViewer createTreeViewer(final Composite parent) { final int style = SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER; EObjectFilter filter = new EObjectFilter(); filter.setIncludeLeadingWildcard(true); ReflectionHelper.setFieldValueWithoutException(filter, "useEarlyReturnIfMatcherIsNull", Boolean.FALSE); tree = SWTUtil.createFilteredTree(parent, style, filter); ReflectionHelper.invokeMethodWithoutException(tree, "setQuickSelectionMode", new Class[] { Boolean.TYPE }, new Object[] { true }); final TreeViewer viewer = tree.getViewer(); final GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); viewer.getControl().setLayoutData(gridData); viewer.getTree().setHeaderVisible(false); viewer.getTree().setLinesVisible(false); viewer.setContentProvider(new SessionContentProvider()); viewer.setLabelProvider(new AdapterFactoryLabelProvider(ViewHelper.INSTANCE.createAdapterFactory())); return viewer; }
Source:
public ArrayList<ItemBatchOperation<?>> getOperations() { return operations; }

Target:
public List<CosmosItemOperation> getOperations() { return UnmodifiableList.unmodifiableList(operations); }
Source:
public StreamlineEvent injectCorrelationInformation(StreamlineEvent event, List<StreamlineEvent> parentEvents, String componentName) { Set<String> rootIds = new HashSet<>(); Set<String> parentIds = new HashSet<>(); if (!parentEvents.isEmpty()) { parentEvents.forEach(parentEvent -> { Set<String> rootIdsForParent = EventCorrelationInjector.getRootIds(parentEvent); if (rootIdsForParent != null && !rootIdsForParent.isEmpty()) { rootIds.addAll(rootIdsForParent); } else { rootIds.add(parentEvent.getId()); } parentIds.add(parentEvent.getId()); }); } Map<String, Object> header = new HashMap<>(); header.putAll(event.getHeader()); header.put(HEADER_KEY_ROOT_IDS, rootIds); header.put(HEADER_KEY_PARENT_IDS, parentIds); header.put(HEADER_KEY_SOURCE_COMPONENT_NAME, componentName); return StreamlineEventImpl.builder() .from(event) .header(ImmutableMap.copyOf(header)) .build(); }

Target:
public StreamlineEvent injectCorrelationInformation(StreamlineEvent event, List<StreamlineEvent> parentEvents, String componentName) { Set<String> rootIds = new HashSet<>(); Set<String> parentIds = new HashSet<>(); if (!parentEvents.isEmpty()) { parentEvents.forEach(parentEvent -> { Set<String> rootIdsForParent = EventCorrelationInjector.getRootIds(parentEvent); if (rootIdsForParent != null && !rootIdsForParent.isEmpty()) { rootIds.addAll(rootIdsForParent); } else { rootIds.add(parentEvent.getId()); } parentIds.add(parentEvent.getId()); }); } Map<String, Object> header = new HashMap<>(); header.putAll(event.getHeader()); header.put(HEADER_KEY_ROOT_IDS, rootIds); header.put(HEADER_KEY_PARENT_IDS, parentIds); header.put(HEADER_KEY_SOURCE_COMPONENT_NAME, componentName); return StreamlineEventImpl.builder() .from(event) .header(header) .build(); }
Source:
default PeekableIntIterator peekableIterator() { return new PeekableIteratorAdapter(iterator()); }

Target:
default PeekableIntIterator peekableIterator() { return new PeekableIteratorAdapter<>(iterator()); }
Source:
public String toString() { return name + (version != null ? ":" + version : ""); }

Target:
public String toString() { return "AgentImpl{" + "name='" + name + '\'' + ", version='" + version + "\'}"; }
Source:
public void afterPropertiesSet() throws Exception { if (StringUtils.hasText(this.location)) { this.script = this.applicationContext.getResource(this.location); } ScriptSource scriptSource = new RefreshableResourceScriptSource(this.script, this.refreshCheckDelay); if (!StringUtils.hasText(this.lang)) { String filename = this.script.getFilename(); int index = filename.lastIndexOf(".") + 1; if (index < 1) { throw new BeanCreationException("'lang' isn't provided and there is 'file extension' for script " + "resource: " + this.script); } this.lang = filename.substring(index); } if (groovyScriptExecutingMessageProcessorConstructor != null && "groovy".equals(this.lang.toLowerCase())) { this.delegate = (AbstractScriptExecutingMessageProcessor) groovyScriptExecutingMessageProcessorConstructor .newInstance(scriptSource, this.variableGenerator); } else { this.delegate = new ScriptExecutingMessageProcessor(scriptSource, this.variableGenerator, ScriptExecutorFactory.getScriptExecutor(this.lang)); } this.delegate.setBeanFactory(this.applicationContext); this.delegate.setBeanClassLoader(this.applicationContext.getClassLoader()); }

Target:
public void afterPropertiesSet() throws Exception { if (StringUtils.hasText(this.location)) { this.script = this.applicationContext.getResource(this.location); } ScriptSource scriptSource = new RefreshableResourceScriptSource(this.script, this.refreshCheckDelay); if (!StringUtils.hasText(this.lang)) { String filename = this.script.getFilename(); int index = filename.lastIndexOf(".") + 1; if (index < 1) { throw new BeanCreationException("'lang' isn't provided and there is 'file extension' for script " + "resource: " + this.script); } this.lang = filename.substring(index); } if (this.applicationContext.containsBean(ScriptExecutingProcessorFactory.BEAN_NAME)) { ScriptExecutingProcessorFactory processorFactory = this.applicationContext.getBean(ScriptExecutingProcessorFactory.BEAN_NAME, ScriptExecutingProcessorFactory.class); this.delegate = processorFactory.createMessageProcessor(this.lang, scriptSource, this.variableGenerator); } else { this.delegate = new ScriptExecutingMessageProcessor(scriptSource, this.variableGenerator, ScriptExecutorFactory.getScriptExecutor(this.lang)); } this.delegate.setBeanFactory(this.applicationContext); this.delegate.setBeanClassLoader(this.applicationContext.getClassLoader()); }
Source:
public String toString() { if (this != defaultInstance) { return String.format("%30s: slot %s, fbo %s, textureType %s, material %s, parameter '%s'", this.getClass().getSimpleName(), textureSlot, fbo.getId(), textureType.name(), materialUrn.toString(), shaderParameterName); } else { return String.format("%30s: slot %s, textureId 0, material %s, parameter '%s'", this.getClass().getSimpleName(), textureSlot, materialUrn.toString(), shaderParameterName); } }

Target:
public String toString() { if (this != defaultInstance) { return String.format("%30s: slot %s, fbo %s (fboId: %s), textureType %s, material %s, parameter '%s'", this.getClass().getSimpleName(), textureSlot, fbo.getName(), fbo.getId(), textureType.name(), materialUrn.toString(), shaderParameterName); } else { return String.format("%30s: slot %s, textureId 0, material %s, parameter '%s'", this.getClass().getSimpleName(), textureSlot, materialUrn.toString(), shaderParameterName); } }
Source:
protected void onGooglePlayServicesReady() { SupportMapFragment fragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map); map = fragment.getMap(); map.setMyLocationEnabled(true); map.setOnMarkerClickListener(new OnMarkerClick()); ModelCallback<Request> markerFactoryCallback = new ModelCallback<Request>() { @Override public void onModelFound(Request request) { if (request.getClient() == null) { Log.d("debug", "bad pointer...skipping this marker"); } else { Marker marker = map.addMarker(MapUtil.getSpeechBubbleMarkerOptions(request.getClient(), iconGenerator, SpeechBubble.ColorType.BLACK)); markerRequestMap.put(marker, request); } } @Override public void onModelError(Throwable e) { RequestMapActivity.this.onError(e); } }; User user = (User) ParseUser.getCurrentUser(); user.findNearbyRequests(Request.State.OPEN, markerFactoryCallback); map.addMarker(MapUtil.getSpeechBubbleMarkerOptions(user.getGoogleMapsLocation(), getResources().getString(R.string.you), iconGenerator, SpeechBubble.ColorType.PURPLE)); MapUtil.panAndZoomToCurrentUser(map, MapUtil.DEFAULT_ZOOM_LEVEL); }

Target:
protected void onGooglePlayServicesReady() { SupportMapFragment fragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map); map = fragment.getMap(); map.setMyLocationEnabled(true); map.setOnMarkerClickListener(new OnMarkerClick()); ModelCallback<Request> markerFactoryCallback = new ModelCallback<Request>() { @Override public void onModelFound(Request request) { if (request.getClient() == null) { onError(new IllegalStateException("Request does not have a Client")); return; } else { Marker marker = map.addMarker(MapUtil.getSpeechBubbleMarkerOptions(request.getClient(), iconGenerator, SpeechBubble.ColorType.BLACK)); markerRequestMap.put(marker, request); } } @Override public void onModelError(Throwable e) { RequestMapActivity.this.onError(e); } }; User user = (User) ParseUser.getCurrentUser(); user.findNearbyRequests(Request.State.OPEN, markerFactoryCallback); if (user.getGoogleMapsLocation() != null) { map.addMarker(MapUtil.getSpeechBubbleMarkerOptions(user.getGoogleMapsLocation(), getResources().getString(R.string.you), iconGenerator, SpeechBubble.ColorType.PURPLE)); MapUtil.panAndZoomToCurrentUser(map, MapUtil.DEFAULT_ZOOM_LEVEL); } }
Source:
public List<vm_pools> getAllForAdGroup(Guid id) { MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource() .addValue("ad_group_id", id); return getCallsHandler().executeReadList("GetVm_poolsByAdGroup_id", new VmPoolRowMapper(), parameterSource); }

Target:
public List<vm_pools> getAllForAdGroup(Guid id) { MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource() .addValue("ad_group_id", id); return getCallsHandler().executeReadList("GetVm_poolsByAdGroup_id", vmPoolRowMapper, parameterSource); }
Source:
public void testGetEObjectChildrenWithGenerics() throws IOException { final GenericsMatchInputData mockModel = new GenericsMatchInputData(); final Resource leftResource = mockModel.getLeft(); final Resource rightResource = mockModel.getRight(); assertNotNull(leftResource); assertNotNull(rightResource); final IComparisonScope resourceScope = new DefaultComparisonScope(leftResource, rightResource, null); final Iterator<EObject> leftContent = EcoreUtil.getAllProperContents(leftResource, false); final Iterator<EObject> rightContent = EcoreUtil.getAllProperContents(rightResource, false); final Iterator<EObject> allEObjects = Iterators.concat(leftContent, rightContent); boolean empty = true; while (allEObjects.hasNext()) { empty = false; final EObject root = allEObjects.next(); final Iterator<? extends EObject> scopeChildren = resourceScope.getChildren(root); final List<EObject> children = Lists.newArrayList(Iterators.filter(EcoreUtil .getAllProperContents(root, false), EObject.class)); while (scopeChildren.hasNext()) { assertTrue(children.remove(scopeChildren.next())); } for (EObject outOfScope : children) { assertTrue(outOfScope instanceof EGenericType); assertTrue(EMFComparePredicates.IS_EGENERIC_TYPE_WITHOUT_PARAMETERS.apply(outOfScope)); } } assertFalse(empty); }

Target:
public void testGetEObjectChildrenWithGenerics() throws IOException { final GenericsMatchInputData mockModel = new GenericsMatchInputData(); final Resource leftResource = mockModel.getLeft(); final Resource rightResource = mockModel.getRight(); assertNotNull(leftResource); assertNotNull(rightResource); final IComparisonScope resourceScope = new DefaultComparisonScope(leftResource, rightResource, null); final Iterator<EObject> leftContent = EcoreUtil.getAllProperContents(leftResource, false); final Iterator<EObject> rightContent = EcoreUtil.getAllProperContents(rightResource, false); final Iterator<EObject> allEObjects = Iterators.concat(leftContent, rightContent); assertTrue(allEObjects.hasNext()); while (allEObjects.hasNext()) { final EObject root = allEObjects.next(); final Iterator<? extends EObject> scopeChildren = resourceScope.getChildren(root); final List<EObject> children = Lists.newArrayList(Iterators.filter(EcoreUtil .getAllProperContents(root, false), EObject.class)); while (scopeChildren.hasNext()) { assertTrue(children.remove(scopeChildren.next())); } for (EObject outOfScope : children) { assertTrue(outOfScope instanceof EGenericType); assertTrue(EMFComparePredicates.IS_EGENERIC_TYPE_WITHOUT_PARAMETERS.apply(outOfScope)); } } }
Source:
public String getActivationEventType() { return "RuleFlow-Milestone-" + getProcessInstance().getProcessId() + "-" + getMilestoneNode().getUniqueId() + "-" + ((WorkflowProcessInstanceImpl) getProcessInstance()).getCorrelationKey(); }

Target:
public String getActivationEventType() { String caseId = (String) getProcessInstance().getKnowledgeRuntime().getEnvironment().get(EnvironmentName.CASE_ID); String eventType = "RuleFlow-Milestone-" + getProcessInstance().getProcessId() + "-" + getMilestoneNode().getUniqueId(); return (caseId != null) ? eventType + "-" + caseId : eventType; }
Source:
public void testListDatacenters() throws Exception { server.enqueue(jsonResponse("/datacenters.json")); Iterable<Datacenter> datacenters = api.getInfrastructureApi().listDatacenters().concat(); assertEquals(size(datacenters), 2); assertEquals(server.getRequestCount(), 2); Uris.UriBuilder uriBuilder = Uris .uriBuilder("/caas/2.4/6ac1e746-b1ea-4da5-a24e-caf1a978789d/infrastructure/datacenter"); Set<String> zones = ctx.utils().injector().getInstance(ZoneIdsSupplier.class).get(); for (String zone : zones) { uriBuilder.addQuery("id", zone); } assertSent(HttpMethod.GET, uriBuilder.toString()); }

Target:
public void testListDatacenters() throws Exception { server.enqueue(jsonResponse("/datacenters.json")); Iterable<Datacenter> datacenters = api.getInfrastructureApi().listDatacenters().concat(); assertEquals(size(datacenters), 2); assertEquals(server.getRequestCount(), 2); assertSent(HttpMethod.GET, expectedListDatacentersUriBuilder().toString()); }
Source:
public AvailabilityType getAvailabilityBMXInternal() { boolean availability = false; try { URL url = new URL(ApacheServerComponent.getBMXUrl()); HttpURLConnection urlConn = (HttpURLConnection) url.openConnection(); urlConn.connect(); if(urlConn.getResponseCode() == HttpURLConnection.HTTP_OK) availability = true; else availability = false; }catch (ConnectException e) { LOG.info("The Apache server is down !"); } catch (MalformedURLException e) { LOG.error("Malformed URL : " + ApacheServerComponent.getBMXUrl()); } catch (IOException e) { e.printStackTrace(); } if(!availability) return AvailabilityType.DOWN; else return AvailabilityType.UP; }

Target:
public AvailabilityType getAvailabilityBMXInternal() { boolean availability = false; HttpURLConnection urlConn = null; try { URL url = new URL(resourceContext.getParentResourceComponent().getBMXUrl()); urlConn = (HttpURLConnection) url.openConnection(); urlConn.connect(); if(urlConn.getResponseCode() == HttpURLConnection.HTTP_OK) availability = true; else availability = false; } catch (ConnectException e) { LOG.info("The Apache server is down !"); } catch (MalformedURLException e) { LOG.error("Malformed URL : " + resourceContext.getParentResourceComponent().getBMXUrl()); } catch (IOException e) { LOG.error("IO Error on : " + resourceContext.getParentResourceComponent().getBMXUrl()); } finally { if (urlConn != null) { try { urlConn.disconnect(); } catch (Exception e) { } } } if(!availability) return AvailabilityType.DOWN; else return AvailabilityType.UP; }
Source:
public static void checkStreamCipher(Cipher cipher) { if (cipher.getTransformation() != CipherTransformation.AES_CTR_NOPADDING && cipher.getTransformation() != CipherTransformation.AES_CBC_NOPADDING && cipher.getTransformation() != CipherTransformation .AES_CBC_PKCS5PADDING) { throw new UnsupportedCipherException("AES/CTR/NoPadding is required"); } }

Target:
public static void checkStreamCipher(Cipher cipher) { if (cipher.getTransformation() != CipherTransformation.AES_CTR_NOPADDING) { throw new UnsupportedCipherException("AES/CTR/NoPadding is required"); } }
Source:
private static SyntaxErrorEvent generateInvalidVariableError(Object offendingSymbol, int line, int charPositionInLine, RecognitionException e, CommonToken token) { String chars = token.getText().length() == 1 ? "character" : "sequence of characters"; if( charPositionInLine == 0 ) { if( "in".equals( token.getText() ) || REUSABLE_KEYWORDS.contains( token.getText() ) ) { return new SyntaxErrorEvent( FEELEvent.Severity.ERROR, Msg.createMessage( Msg.INVALID_VARIABLE_NAME_START, "keyword", token.getText() ), e, line, charPositionInLine, offendingSymbol ); } else { return new SyntaxErrorEvent( FEELEvent.Severity.ERROR, Msg.createMessage( Msg.INVALID_VARIABLE_NAME_START, chars, token.getText() ), e, line, charPositionInLine, offendingSymbol ); } } else if( "in".equals( token.getText() ) ) { return new SyntaxErrorEvent(FEELEvent.Severity.ERROR, Msg.createMessage(Msg.INVALID_VARIABLE_NAME, "keyword", token.getText()), e, line, charPositionInLine, offendingSymbol); } else if( "}".equals( token.getText() ) ) { return new SyntaxErrorEvent(FEELEvent.Severity.ERROR, Msg.createMessage(Msg.MISSING_EXPRESSION), e, line, charPositionInLine, offendingSymbol); } else { return new SyntaxErrorEvent( FEELEvent.Severity.ERROR, Msg.createMessage( Msg.INVALID_VARIABLE_NAME, chars, token.getText() ), e, line, charPositionInLine, offendingSymbol ); } }

Target:
private static SyntaxErrorEvent generateInvalidVariableError(Object offendingSymbol, int line, int charPositionInLine, RecognitionException e, CommonToken token) { String chars = token.getText().length() == 1 ? "character" : "sequence of characters"; if( charPositionInLine == 0 ) { if( "in".equals( token.getText() ) || REUSABLE_KEYWORDS.contains( token.getText() ) ) { return new SyntaxErrorEvent( FEELEvent.Severity.ERROR, Msg.createMessage( Msg.INVALID_VARIABLE_NAME_START, "keyword", token.getText() ), e, line, charPositionInLine, offendingSymbol ); } else { return new SyntaxErrorEvent( FEELEvent.Severity.ERROR, Msg.createMessage( Msg.INVALID_VARIABLE_NAME_START, chars, token.getText() ), e, line, charPositionInLine, offendingSymbol ); } } else if( "in".equals( token.getText() ) ) { return new SyntaxErrorEvent(FEELEvent.Severity.ERROR, Msg.createMessage(Msg.INVALID_VARIABLE_NAME, "keyword", token.getText()), e, line, charPositionInLine, offendingSymbol); } else if( "}".equals( token.getText() ) && e != null && e.getRecognizer() instanceof Parser && ((Parser)e.getRecognizer()).getRuleInvocationStack().contains( "key" ) ) { return new SyntaxErrorEvent(FEELEvent.Severity.ERROR, Msg.createMessage(Msg.MISSING_EXPRESSION, e.getCtx().getText()), e, line, charPositionInLine, offendingSymbol); } else { return new SyntaxErrorEvent( FEELEvent.Severity.ERROR, Msg.createMessage( Msg.INVALID_VARIABLE_NAME, chars, token.getText() ), e, line, charPositionInLine, offendingSymbol ); } }
Source:
private void initializeButtons() { Window window = getWindow(); Resources res = getContext().getResources(); Button positiveButtonView = window.findViewById(R.id.positive_button); positiveButtonView.setText(mPositiveButtonText); positiveButtonView.setOnClickListener(v -> { if (mOnClickListener != null) { mOnClickListener.onClick(this, Arrays.copyOf(mCheckedItems, mCheckedItems.length)); } dismiss(); }); int buttonOffset = res.getDimensionPixelSize(R.dimen.car_padding_4) - res.getDimensionPixelSize(R.dimen.car_padding_2); ViewGroup.MarginLayoutParams positiveButtonLayoutParams = (ViewGroup.MarginLayoutParams) positiveButtonView.getLayoutParams(); Button negativeButtonView = window.findViewById(R.id.negative_button); if (!TextUtils.isEmpty(mNegativeButtonText)) { negativeButtonView.setText(mNegativeButtonText); negativeButtonView.setOnClickListener(v -> dismiss()); ViewGroup.MarginLayoutParams negativeButtonLayoutParams = (ViewGroup.MarginLayoutParams) negativeButtonView.getLayoutParams(); int buttonSpacing = getContext().getResources().getDimensionPixelSize( R.dimen.car_padding_2); positiveButtonLayoutParams.setMarginStart(buttonSpacing); positiveButtonView.requestLayout(); negativeButtonLayoutParams.setMarginStart(buttonOffset); negativeButtonLayoutParams.setMarginEnd(buttonSpacing); negativeButtonView.requestLayout(); } else { negativeButtonView.setVisibility(View.GONE); positiveButtonLayoutParams.setMarginStart(buttonOffset); positiveButtonView.requestLayout(); } }

Target:
private void initializeButtons() { Window window = getWindow(); Resources res = getContext().getResources(); Button positiveButtonView = window.findViewById(R.id.positive_button); positiveButtonView.setText(mPositiveButtonText); positiveButtonView.setOnClickListener(v -> { if (mOnClickListener != null) { mOnClickListener.onClick(this, Arrays.copyOf(mCheckedItems, mCheckedItems.length)); } dismiss(); }); int buttonOffset = res.getDimensionPixelSize(R.dimen.car_padding_4) - res.getDimensionPixelSize(R.dimen.car_padding_2); ViewGroup.MarginLayoutParams positiveButtonLayoutParams = (ViewGroup.MarginLayoutParams) positiveButtonView.getLayoutParams(); Button negativeButtonView = window.findViewById(R.id.negative_button); if (!TextUtils.isEmpty(mNegativeButtonText)) { negativeButtonView.setText(mNegativeButtonText); negativeButtonView.setOnClickListener(v -> dismiss()); ViewGroup.MarginLayoutParams negativeButtonLayoutParams = (ViewGroup.MarginLayoutParams) negativeButtonView.getLayoutParams(); int buttonSpacing = res.getDimensionPixelSize(R.dimen.car_padding_2); positiveButtonLayoutParams.setMarginStart(buttonSpacing); positiveButtonView.requestLayout(); negativeButtonLayoutParams.setMarginStart(buttonOffset); negativeButtonLayoutParams.setMarginEnd(buttonSpacing); negativeButtonView.requestLayout(); } else { negativeButtonView.setVisibility(View.GONE); positiveButtonLayoutParams.setMarginStart(buttonOffset); positiveButtonView.requestLayout(); } }
Source:
public void readingStreamIdsByHashInTheSameTransactionIsPermitted() throws IOException { final byte[] bytes = new byte[2 * StreamTestStreamStore.BLOCK_SIZE_IN_BYTES]; long id = timestampService.getFreshTimestamp(); Random rand = new Random(); rand.nextBytes(bytes); Sha256Hash hash = Sha256Hash.computeHash(bytes); ImmutableMap<Long, InputStream> streams = ImmutableMap.of(id, new ByteArrayInputStream(bytes)); storeStreamAndCheckHash(id, hash, streams); byte[] bytesInKvs = readBytesForSingleStream(id); assertArrayEquals(bytesInKvs, bytes); }

Target:
public void readingStreamIdsByHashInTheSameTransactionIsPermitted() throws IOException { long id = timestampService.getFreshTimestamp(); byte[] bytes = generateRandomTwoBlockStream(); Sha256Hash hash = Sha256Hash.computeHash(bytes); Map<Long, InputStream> streams = ImmutableMap.of(id, new ByteArrayInputStream(bytes)); storeStreamAndCheckHash(id, hash, streams); byte[] bytesInKvs = readBytesForSingleStream(id); assertArrayEquals(bytesInKvs, bytes); }
Source:
public InstructorHomePage(Browser browser){ super(browser); if (!browser.driver.findElements(By.id("fsCopyModal")).isEmpty()) { this.fsCopyModal = new InstructorCopyFsToModal(browser); } }

Target:
public InstructorHomePage(Browser browser){ super(browser); if (InstructorCopyFsToModal.isPresentOnPage(browser)) { this.fsCopyModal = new InstructorCopyFsToModal(browser); } }
Source:
public static State getState(ChannelUID channelUID, AstroChannelConfig config, Object instance) throws Exception { Object value = getPropertyValue(channelUID, instance); if (value == null) { return UnDefType.UNDEF; } else if (value instanceof Calendar) { ZoneId zone= ZoneId.of("+03:00"); GregorianCalendar cal = (GregorianCalendar) value; cal.setTimeZone(TimeZone.getTimeZone(zone)); ZonedDateTime zoned= cal.toZonedDateTime().withFixedOffsetZone(); return new DateTimeType(zoned); } else if (value instanceof Number) { BigDecimal decimalValue = new BigDecimal(value.toString()).setScale(2, RoundingMode.HALF_UP); return new DecimalType(decimalValue); } else if (value instanceof String || value instanceof Enum) { return new StringType(value.toString()); } else { throw new RuntimeException("Unsupported value type " + value.getClass().getSimpleName()); } }

Target:
public static State getState(ChannelUID channelUID, AstroChannelConfig config, Object instance) throws Exception { Object value = getPropertyValue(channelUID, instance); if (value == null) { return UnDefType.UNDEF; } else if (value instanceof Calendar) { Calendar cal = (Calendar) value; GregorianCalendar gregorianCal = (GregorianCalendar) DateTimeUtils.applyConfig(cal, config); cal.setTimeZone(TimeZone.getTimeZone(timeZoneProvider.getTimeZone())); ZonedDateTime zoned = gregorianCal.toZonedDateTime().withFixedOffsetZone(); return new DateTimeType(zoned); } else if (value instanceof Number) { BigDecimal decimalValue = new BigDecimal(value.toString()).setScale(2, RoundingMode.HALF_UP); return new DecimalType(decimalValue); } else if (value instanceof String || value instanceof Enum) { return new StringType(value.toString()); } else { throw new RuntimeException("Unsupported value type " + value.getClass().getSimpleName()); } }
Source:
public void testGetAdapter() { org.eclipse.core.resources.IFolder folder = EasyMock .createMock(org.eclipse.core.resources.IFolder.class); Capture<Class> mappedAdapterClassCapture = new Capture(); EasyMock.expect( folder.getAdapter(EasyMock.capture(mappedAdapterClassCapture))) .andStubReturn(folder); EasyMock.expect(folder.getType()).andStubReturn( org.eclipse.core.resources.IResource.FOLDER); EasyMock.replay(folder); final IFolder coreFolder = new EclipseFolderImpl(folder); final Object adapted = coreFolder.getAdapter(IFolder.class); EasyMock.verify(folder); Assert.assertEquals(org.eclipse.core.resources.IFolder.class, mappedAdapterClassCapture.getValue()); Assert.assertTrue("returned adapter is not a folder", adapted instanceof IFolder); }

Target:
public void testGetAdapter() { org.eclipse.core.resources.IFolder folder = EasyMock .createMock(org.eclipse.core.resources.IFolder.class); Capture<Class<Object>> mappedAdapterClassCapture = new Capture<Class<Object>>(); EasyMock .expect( folder.getAdapter(EasyMock.capture(mappedAdapterClassCapture))) .andStubReturn(folder); EasyMock.expect(folder.getType()) .andStubReturn(org.eclipse.core.resources.IResource.FOLDER); EasyMock.replay(folder); final IFolder coreFolder = new EclipseFolderImpl(folder); final Object adapted = coreFolder.getAdapter(IFolder.class); EasyMock.verify(folder); Assert.assertEquals(org.eclipse.core.resources.IFolder.class, mappedAdapterClassCapture.getValue()); Assert.assertTrue("returned adapter is not a folder", adapted instanceof IFolder); }
Source:
private Map<Column,Bytes> getImpl(Bytes row, Set<Column> columns) throws Exception { env.getSharedResources().getVisCache().validate(columns); ScannerConfiguration config = new ScannerConfiguration(); config.setSpan(Span.exact(row)); for (Column column : columns) { if (column.isQualifierSet()) { config.fetchColumn(column.getFamily(), column.getQualifier()); } else { config.fetchColumnFamily(column.getFamily()); } } RowIterator iter = getImpl(config); Map<Column,Bytes> ret = new HashMap<>(); while (iter.hasNext()) { Entry<Bytes,ColumnIterator> entry = iter.next(); ColumnIterator citer = entry.getValue(); while (citer.hasNext()) { Entry<Column,Bytes> centry = citer.next(); if (columns.contains(centry.getKey())) { ret.put(centry.getKey(), centry.getValue()); } } } updateColumnsRead(row, columns); return ret; }

Target:
private Map<Column,Bytes> getImpl(Bytes row, Set<Column> columns) { env.getSharedResources().getVisCache().validate(columns); ScannerConfiguration config = new ScannerConfiguration(); config.setSpan(Span.exact(row)); for (Column column : columns) { config.fetchColumn(column.getFamily(), column.getQualifier()); } RowIterator iter = getImpl(config); Map<Column,Bytes> ret = new HashMap<>(); while (iter.hasNext()) { Entry<Bytes,ColumnIterator> entry = iter.next(); ColumnIterator citer = entry.getValue(); while (citer.hasNext()) { Entry<Column,Bytes> centry = citer.next(); if (columns.contains(centry.getKey())) { ret.put(centry.getKey(), centry.getValue()); } } } updateColumnsRead(row, columns); return ret; }
Source:
public static ProtocolVersion fromString(String value) { requireNonNull(value, "value is null"); switch (value) { case "v1": return V1; case "v2": return V2; default: throw new IllegalArgumentException("Unknown value: " + value); } }

Target:
public static ProtocolVersion fromString(String value) { requireNonNull(value, "value is null"); return valueOf(value.toUpperCase(ENGLISH)); }
Source:
public void readFrom(ObjectInput input) throws IOException, ClassNotFoundException { ackTarget = (Address) input.readObject(); if (ackTarget != null) { id = input.readLong(); } topologyId = input.readInt(); keys = MarshallUtil.unmarshallCollection(input, ArrayList::new); if (keys == null) { segments = MarshallUtil.unmarshallIntCollection(input, SmallIntSet::new); } }

Target:
public void readFrom(ObjectInput input) throws IOException, ClassNotFoundException { ackTarget = (Address) input.readObject(); if (ackTarget != null) { id = input.readLong(); } topologyId = input.readInt(); keys = MarshallUtil.unmarshallCollection(input, ArrayList::new); }
Source:
public void installed(Viewer viewer) { threadNameChangeListener.attach(); if (fIsScrapbook) { return; } final Viewer finalViewer = viewer; Job job = new Job("Initialize Java Debug Session") { @Override protected IStatus run(IProgressMonitor monitor) { if (!isDisposed()) { doInstalled(finalViewer); } return Status.OK_STATUS; } @Override public boolean belongsTo(Object family) { return JavaDebugTargetProxy.this == family; } }; job.setSystem(true); job.schedule(500); fThreadEventHandler.init(viewer); }

Target:
public void installed(Viewer viewer) { if (fIsScrapbook) { return; } final Viewer finalViewer = viewer; Job job = new Job("Initialize Java Debug Session") { @Override protected IStatus run(IProgressMonitor monitor) { if (!isDisposed()) { doInstalled(finalViewer); } return Status.OK_STATUS; } @Override public boolean belongsTo(Object family) { return JavaDebugTargetProxy.this == family; } }; job.setSystem(true); job.schedule(500); fThreadEventHandler.init(viewer); }
Source:
public void testNoGapsInLocusAccumulator() { final SamReader reader = SamReaderFactory.make().open(new File("src/test/resources/htsjdk/samtools/util/sliver.sam")); final EdgeReadIterator iterator = new EdgeReadIterator(reader, null); AbstractLocusInfo<EdgingRecordAndOffset> previous=null; while (iterator.hasNext() && (previous == null || previous.getPosition() < 1_000_000)) { final AbstractLocusInfo<EdgingRecordAndOffset> next = iterator.next(); if (previous != null) { Assert.assertEquals(next.getPosition(), previous.getPosition() + 1); } previous = next; } }

Target:
public void testNoGapsInLocusAccumulator() { final SamReader reader = SamReaderFactory.make().open(new File("src/test/resources/htsjdk/samtools/util/sliver.sam")); final EdgeReadIterator iterator = new EdgeReadIterator(reader, null); AbstractLocusInfo<EdgingRecordAndOffset> previous = null; int counter = 0; while (iterator.hasNext() && (previous == null || previous.getPosition() < 1_000_000)) { counter++; final AbstractLocusInfo<EdgingRecordAndOffset> next = iterator.next(); if (previous != null) { Assert.assertEquals(next.getPosition(), previous.getPosition() + 1); } previous = next; } Assert.assertEquals(counter, 1_000_000); }
Source:
public B enrich(Consumer<EnricherSpec> enricherConfigurer) { EnricherSpec enricherSpec = new EnricherSpec(); enricherConfigurer.accept(enricherSpec); Collection<Object> componentsToRegister = enricherSpec.getComponentsToRegister(); if (!CollectionUtils.isEmpty(componentsToRegister)) { for (Object component : componentsToRegister) { if (component instanceof IntegrationFlowDefinition) { IntegrationFlowDefinition<?> flowBuilder = (IntegrationFlowDefinition<?>) component; if (flowBuilder.isOutputChannelRequired()) { addComponent(flowBuilder.get()); } else { throw new BeanCreationException("Enricher subFlow must require an output channel"); } } } } if (componentsToRegister != null) { componentsToRegister.clear(); } return register(enricherSpec, null); }

Target:
public B enrich(Consumer<EnricherSpec> enricherConfigurer) { return register(new EnricherSpec(), enricherConfigurer); }
Source:
public WindowPrefs() { this.width = new SimpleIntegerProperty(800); this.height = new SimpleIntegerProperty(600); x = new SimpleDoubleProperty(-1d); y = new SimpleDoubleProperty(-1d); maximized = new SimpleBooleanProperty(); lastView = new SimpleStringProperty(); lastChildViews = new SimpleMapProperty<>(FXCollections.observableHashMap()); backgroundImagePath = new SimpleStringProperty(); }

Target:
public WindowPrefs() { this.width = new SimpleIntegerProperty(800); this.height = new SimpleIntegerProperty(600); x = new SimpleDoubleProperty(-1d); y = new SimpleDoubleProperty(-1d); maximized = new SimpleBooleanProperty(); lastView = new SimpleStringProperty(); lastChildViews = new SimpleMapProperty<>(FXCollections.observableHashMap()); backgroundImagePath = new SimpleObjectProperty<>(); }
Source:
public CairoEngine(CairoConfiguration configuration, @Nullable MessageBus messageBus) { this.configuration = configuration; this.writerPool = new WriterPool(configuration, messageBus); this.readerPool = new ReaderPool(configuration); this.writerMaintenanceJob = new WriterMaintenanceJob(configuration); this.telemetryQueue = new RingQueue<>(TelemetryRow::new, configuration.getTelemetryQueueCapacity()); this.telemetryPubSeq = new SPSequence(configuration.getTelemetryQueueCapacity()); this.telemetrySubSeq = new MCSequence(configuration.getTelemetryQueueCapacity()); this.telemetryPubSeq.then(this.telemetrySubSeq).then(this.telemetryPubSeq); this.messageBus = messageBus; }

Target:
public CairoEngine(CairoConfiguration configuration, @Nullable MessageBus messageBus) { this.configuration = configuration; this.writerPool = new WriterPool(configuration, messageBus); this.readerPool = new ReaderPool(configuration); this.writerMaintenanceJob = new WriterMaintenanceJob(configuration); this.telemetryQueue = new RingQueue<>(TelemetryRow::new, configuration.getTelemetryQueueCapacity()); this.telemetryPubSeq = new MPSequence(configuration.getTelemetryQueueCapacity()); this.telemetrySubSeq = new SCSequence(); this.telemetryPubSeq.then(this.telemetrySubSeq).then(this.telemetryPubSeq); this.messageBus = messageBus; this.compiler = new SqlCompiler(this); this.sqlExecutionContext = new SqlExecutionContextImpl(messageBus, 1, this); }
Source:
public Map<String, PortType> getOutputPorts() { return new HashMap<String, PortType>(); }

Target:
public Map<String, PortType> getOutputPorts() { return Collections.emptyMap(); }