auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> protected void executeQueryCommand() { <END> Map<Map.Entry<ConfigurationValues, String>, Object> configValuesMap = new HashMap<Map.Entry<ConfigurationValues, String>, Object>(); for (ConfigurationValues configValue : ConfigurationValues.values()) { if (!shouldReturnValue(configValue) || !EnumCompat.IsDefined(ConfigValues.class, configValue.toString())) { continue; } for (String version : versions) { Map.Entry<ConfigurationValues, String> key = new KeyValuePairCompat<ConfigurationValues, String>(configValue, version); Object value = Config.<Object> GetValue(ConfigValues.valueOf(configValue.toString()), version); configValuesMap.put(key, value); } } getQueryReturnValue().setReturnValue(configValuesMap); }</code><technical_language>is ugly, need a pass Map.Entry<>, a Pair, classes</technical_language>

Target:
protected void executeQueryCommand() { Map<KeyValuePairCompat<ConfigurationValues, String>, Object> configValuesMap = new HashMap<KeyValuePairCompat<ConfigurationValues, String>, Object>(); for (ConfigurationValues configValue : ConfigurationValues.values()) { if (!shouldReturnValue(configValue) || !EnumCompat.IsDefined(ConfigValues.class, configValue.toString())) { continue; } List<String> versions = new ArrayList<String>(); versions.add(Config.DefaultConfigurationVersion); for (Version version : Version.ALL) { versions.add(version.toString()); } for (String version : versions) { KeyValuePairCompat<ConfigurationValues, String> key = new KeyValuePairCompat<ConfigurationValues, String>(configValue, version); Object value = Config.<Object> GetValue(ConfigValues.valueOf(configValue.toString()), version); configValuesMap.put(key, value); } } getQueryReturnValue().setReturnValue(configValuesMap); }
Source:
<code>public static void deleteStructure(Structure structure) throws DotDataException { WorkFlowFactory wff = FactoryLocator.getWorkFlowFactory(); wff.deleteSchemeForStruct(structure.getInode()); InodeFactory.deleteInode(structure); try { systemEventsAPI.push(SystemEventType.DELETE_BASE_CONTENT_TYPE, new Payload(structure, Visibility.PERMISSION, String.valueOf(PermissionAPI.PERMISSION_READ))); } catch (DotDataException e) { <START> throw new RuntimeException( e ); <END> } }</code><technical_language>a i18n runtime base class, instead</technical_language>

Target:
public static void deleteStructure(Structure structure) throws DotDataException { WorkFlowFactory wff = FactoryLocator.getWorkFlowFactory(); wff.deleteSchemeForStruct(structure.getInode()); InodeFactory.deleteInode(structure); try { String actionUrl = contentTypeUtil.getActionUrl(structure); ContentTypePayloadDataWrapper contentTypePayloadDataWrapper = new ContentTypePayloadDataWrapper(actionUrl, structure); systemEventsAPI.push(SystemEventType.DELETE_BASE_CONTENT_TYPE, new Payload(contentTypePayloadDataWrapper, Visibility.PERMISSION, String.valueOf(PermissionAPI.PERMISSION_READ))); } catch (DotDataException e) { throw new BaseRuntimeInternationalizationException( e ); } }
Source:
<code>protected Map<DropStrategy, List<Command>> findStrategies(Request request) { Map<DropStrategy, List<Command>> matchingStrategies = new LinkedHashMap<DropStrategy, List<Command>>(); for (DropStrategy strategy : DropStrategyManager.instance.getActiveStrategies()) { ArrayList<Command> selectedCommands = new ArrayList<Command>(); if(strategy instanceof TransactionalCommandsDropStrategy){ List<Command> cs = ((TransactionalCommandsDropStrategy)strategy).getCommands(request, getHost()); for(Command command : cs){ if (command != null && command.canExecute()) { selectedCommands.add(command); } } } else{ Command command = strategy.getCommand(request, getHost()); if (command != null && command.canExecute()) { selectedCommands.add(command); } } if(selectedCommands.size()>0){ matchingStrategies.put(strategy, selectedCommands); } } Command command = <START> defaultDropStrategy.getCommand(request, getHost()); <END> if (command != null && command.canExecute()) { ArrayList<Command> selectedCommands = new ArrayList<Command>(); selectedCommands.add(defaultDropStrategy.getCommand(request, getHost())); matchingStrategies.put(defaultDropStrategy, selectedCommands); } return matchingStrategies; }</code><technical_language>duplicate 1</technical_language>

Target:
protected Map<DropStrategy, List<Command>> findStrategies(Request request) { Map<DropStrategy, List<Command>> matchingStrategies = new LinkedHashMap<DropStrategy, List<Command>>(); for (DropStrategy strategy : DropStrategyManager.instance.getActiveStrategies()) { ArrayList<Command> selectedCommands = new ArrayList<Command>(); if(strategy instanceof TransactionalCommandsDropStrategy){ List<Command> cs = ((TransactionalCommandsDropStrategy)strategy).getCommands(request, getHost()); for(Command command : cs){ if (command != null && command.canExecute()) { selectedCommands.add(command); } } } else{ Command command = strategy.getCommand(request, getHost()); if (command != null && command.canExecute()) { selectedCommands.add(command); } } if(selectedCommands.size()>0){ matchingStrategies.put(strategy, selectedCommands); } } Command command = defaultDropStrategy.getCommand(request, getHost()); if (command != null && command.canExecute()) { ArrayList<Command> selectedCommands = new ArrayList<Command>(); selectedCommands.add(command); matchingStrategies.put(defaultDropStrategy, selectedCommands); } return matchingStrategies; }
Source:
<code><START> public void trade() { for(Entry<String, ArrayList<Order>> buyList : buyOrders.entrySet()) { for ( Entry<String, ArrayList<Order>> sellList : sellOrders.entrySet()) { if (buyList.getKey() == sellList.getKey()) { ArrayList<Order> buySorted = buyOrderSort(buyList.getValue()); ArrayList<Order> sellSorted = sellOrderSort(sellList.getValue()); int buyNum = 0; int sellNum = 0; double price = 0.0; int sellVolume = 0; ArrayList<Double> values = findMarketPrice(buySorted, sellSorted); buyNum = values.get(0).intValue(); sellNum = values.get(1).intValue(); price = values.get(2); sellVolume = values.get(3).intValue(); if (buyNum != -1 && sellNum != -1 && price != -1.0){ PriceSetter set = new PriceSetter(); set.registerObserver(m.getMarketHistory()); m.getMarketHistory().setSubject(set); set.setNewPrice(m, (String)buyList.getKey(), price); for (int i = 0; i <= buyNum; i++) { Order order = buySorted.get(i); if (buyOrder.getSize() <= sellVolume) { buyOrders.get(order.getStockSymbol()).remove(order); sellVolume -= order.getSize(); } else { order.setSize(o1.getSize() - sellVolume); } try { order.getTrader().tradePerformed(order, price); } catch (StockMarketExpection e) { e.printStackTrace(); } } for (int i = 0; i <= sellNum; i++) { Order order = sellSorted.get(i); sellOrders.get(order.getStockSymbol()).remove(order); try { order.getTrader().tradePerformed(order, price); } catch (StockMarketExpection e) { e.printStackTrace(); } } } } } } } <END></code><technical_language>trade method is long. Consider refactoring multiple smaller more concise methods</technical_language>

Target:
public void trade() { for(Entry<String, ArrayList<Order>> buyList : buyOrders.entrySet()) { for ( Entry<String, ArrayList<Order>> sellList : sellOrders.entrySet()) { if (buyList.getKey() == sellList.getKey()) { ArrayList<Order> buySorted = buyOrderSort(buyList.getValue()); ArrayList<Order> sellSorted = sellOrderSort(sellList.getValue()); int buyNum = 0; int sellNum = 0; double price = 0.0; int sellVolume = 0; ArrayList<Double> values = findMarketPrice(buySorted, sellSorted); buyNum = values.get(0).intValue(); sellNum = values.get(1).intValue(); price = values.get(2); sellVolume = values.get(3).intValue(); if (buyNum != -1 && sellNum != -1 && price != -1.0){ PriceSetter set = new PriceSetter(); set.registerObserver(m.getMarketHistory()); m.getMarketHistory().setSubject(set); set.setNewPrice(m, (String)buyList.getKey(), price); performBuyOrderTrade(buySorted, buyNum, price, sellVolume); performSellOrderTrade(sellSorted, sellNum, price); } } } } }
Source:
<code>private void storeCache() { if (progress.isShowing()) { showToast(res.getString(R.string.err_detail_still_working)); return; } if (Settings.getChooseList()) { new StoredList.UserInterface(this).promptForListSelection(R.string.list_title, new Action1<Integer>() { @Override public void call(final Integer selectedListId) { if (cache.isOffline()) { DataStore.addToList(Collections.singletonList(cache), selectedListId); new StoreCacheHandler(CacheDetailActivity.this, progress).sendEmptyMessage(CancellableHandler.DONE); } else { storeCache(selectedListId, new StoreCacheHandler(CacheDetailActivity.this, progress)); } } }, true, cache.getLists()); } else { if (cache.isOffline()) { DataStore.addToList(Collections.singletonList(cache), StoredList.TEMPORARY_LIST.id); new StoreCacheHandler(CacheDetailActivity.this, progress).sendEmptyMessage(CancellableHandler.DONE); } else { storeCache(StoredList.TEMPORARY_LIST.id, new StoreCacheHandler(this, progress)); } <START> } <END> }</code><technical_language>This fragment, is more a repetition of fragment above, refactored repeated</technical_language>

Target:
private void storeCache() { if (progress.isShowing()) { showToast(res.getString(R.string.err_detail_still_working)); return; } if (Settings.getChooseList()) { new StoredList.UserInterface(this).promptForListSelection(R.string.list_title, new Action1<Integer>() { @Override public void call(final Integer selectedListId) { storeCacheInList(selectedListId, new StoreCacheHandler(CacheDetailActivity.this, progress)); } }, true, cache.getLists()); } else { storeCacheInList(StoredList.TEMPORARY_LIST.id, new StoreCacheHandler(this, progress)); } }
Source:
<code>public void writeExternal( ObjectOutput out ) throws IOException { super.writeExternal(out); out.writeObject(specificName); out.writeInt(dynamicResultSets); out.writeInt(parameterCount); out.writeShort(parameterStyle); out.writeShort(sqlOptions); out.writeObject(returnType); out.writeBoolean(calledOnNullInput); out.writeInt(1); if (parameterCount != 0) { ArrayUtil.writeArrayItems(out, parameterNames); ArrayUtil.writeArrayItems(out, parameterTypes); ArrayUtil.writeIntArray(out, parameterModes); } out.writeObject(language); <START> out.writeObject(compiledPyCode); <END> }</code><technical_language>Prefer put lines "if (expansionNum ==1)" statement</technical_language>

Target:
public void writeExternal( ObjectOutput out ) throws IOException { super.writeExternal(out); out.writeObject(specificName); out.writeInt(dynamicResultSets); out.writeInt(parameterCount); out.writeShort(parameterStyle); out.writeShort(sqlOptions); out.writeObject(returnType); out.writeBoolean(calledOnNullInput); out.writeInt(expansionNum); if (parameterCount != 0) { ArrayUtil.writeArrayItems(out, parameterNames); ArrayUtil.writeArrayItems(out, parameterTypes); ArrayUtil.writeIntArray(out, parameterModes); } if(expansionNum==1){ out.writeObject(language); out.writeObject(compiledPyCode); } }
Source:
<code>public void addQc(Library library, LibraryQC qc) throws IOException { Library managed = libraryDao.get(library.getId()); authorizationManager.throwIfNotWritable(managed); qc.setQcCreator(authorizationManager.getCurrentUsername()); <START> if ("QuBit".equals(qc.getQcType().getName())) { <END> managed.setInitialConcentration(qc.getResults()); } libraryQcDao.save(qc); libraryDao.save(library); }</code><technical_language>if a field in QcType table purpose=concentration hard-coding exist in DB. this is temporarily</technical_language>

Target:
public void addQc(Library library, LibraryQC qc) throws IOException { Library managed = libraryDao.get(library.getId()); authorizationManager.throwIfNotWritable(managed); qc.setQcCreator(authorizationManager.getCurrentUsername()); libraryQcDao.save(qc); libraryDao.save(library); }
Source:
<code>public static Backup map(VmBackup entity, Backup template) { Backup model = template == null ? new Backup() : template; model.setId(entity.getId().toString()); if (entity.getFromCheckpointId() != null) { model.setFromCheckpointId(entity.getFromCheckpointId().toString()); } if (entity.getToCheckpointId() != null) { model.setToCheckpointId(entity.getToCheckpointId().toString()); } if (entity.getPhase() != null) { model.setPhase(map(entity.getPhase())); } <START> if (entity.getDisks() != null) { <END> model.setDisks(new Disks()); entity.getDisks().stream().map(id -> { Disk disk = new Disk(); disk.setId(id.toString()); return disk; }).forEach(model.getDisks().getDisks()::add); } if (entity.getCreationDate() != null) { model.setCreationDate(DateMapper.map(entity.getCreationDate(), null)); } if (entity.getVmId() != null) { Vm vm = new Vm(); vm.setId(entity.getVmId().toString()); model.setVm(vm); } return model; }</code><technical_language>I this proper link. a for example Snapshot SnapshotDisks modeled</technical_language>

Target:
public static Backup map(VmBackup entity, Backup template) { Backup model = template == null ? new Backup() : template; model.setId(entity.getId().toString()); if (entity.getFromCheckpointId() != null) { model.setFromCheckpointId(entity.getFromCheckpointId().toString()); } if (entity.getToCheckpointId() != null) { model.setToCheckpointId(entity.getToCheckpointId().toString()); } if (entity.getPhase() != null) { model.setPhase(map(entity.getPhase())); } if (entity.getCreationDate() != null) { model.setCreationDate(DateMapper.map(entity.getCreationDate(), null)); } if (entity.getVmId() != null) { Vm vm = new Vm(); vm.setId(entity.getVmId().toString()); model.setVm(vm); } return model; }
Source:
<code>public void store(String tenantId, List<Span> spans, Function<Span, String> cacheKeyEntrySupplier) throws CacheException { if (cacheContainer != null) { spansCache.startBatch(); } for (Span span : spans) { if (log.isLoggable(Level.FINEST)) { log.finest("Store span [id=" + span.getId() + "]: " + span); } spansCache.put(cacheKeyEntrySupplier.apply(span), span, 1, TimeUnit.MINUTES); if (span.getParentId() != null && !span.serverSpan()) { Set<Span> children = childrenCache.get(span.getParentId()); if (children == null) { children = new HashSet<>(); childrenCache.put(span.getParentId(), children); <START> } <END> children.add(span); } } if (cacheContainer != null) { spansCache.endBatch(true); } }</code><technical_language>Need do 'put' set changed. In case put results in written disk distributed clustered caches</technical_language>

Target:
public void store(String tenantId, List<Span> spans, Function<Span, String> cacheKeyEntrySupplier) throws CacheException { if (cacheContainer != null) { spansCache.startBatch(); childrenCache.startBatch(); traceCache.startBatch(); } for (Span span : spans) { log.debugf("Store span [%s]" + span); spansCache.put(cacheKeyEntrySupplier.apply(span), span, 1, TimeUnit.MINUTES); if (span.getTraceId() != null) { Set<Span> trace = traceCache.get(span.getTraceId()); if (trace == null) { trace = new HashSet<>(); } trace.add(span); traceCache.put(span.getTraceId(), trace); } if (span.getParentId() != null && !span.serverSpan()) { Set<Span> children = childrenCache.get(span.getParentId()); if (children == null) { children = new HashSet<>(); } children.add(span); childrenCache.put(span.getParentId(), children); } } EmbeddedCacheManager embeddedCacheManager; if (cacheContainer != null) { spansCache.endBatch(true); childrenCache.endBatch(true); traceCache.endBatch(true); } }
Source:
<code>public Result beginTransaction(HttpServletRequest request, HttpServletResponse response) throws IOException, FileUploadException { <START> Logger logger = newLogger().endpoint(this); <END> Transaction transaction = null; try { String encryptionPassword = request.getParameter(ENCRYPTION_PASSWORD_KEY); if (StringUtils.isEmpty(encryptionPassword)) { logger.responseStatus(BAD_REQUEST_400) .warn("encryption password required but none provided"); response.setStatus(BAD_REQUEST_400); return new Result("encryption password required but none provided", true, null); } logger.info("creating new publishing transaction"); transaction = getTransactionService().create(encryptionPassword); logger.transactionID(transaction.id()).info("transaction created successfully"); response.setStatus(OK_200); return new Result("New transaction created.", false, transaction); } catch (IOException e) { response.setStatus(INTERNAL_SERVER_ERROR_500); logger.error(e, "unexpected error while attempting to create transaction"); return new Result("beingTransaction encountered unexpected error", true, transaction); } }</code><technical_language>Rename Logger LogBuilder similar</technical_language>

Target:
public Result beginTransaction(HttpServletRequest request, HttpServletResponse response) throws IOException, FileUploadException { LogBuilder log = logBuilder().endpoint(this); Transaction transaction = null; try { String encryptionPassword = request.getParameter(ENCRYPTION_PASSWORD_KEY); if (StringUtils.isEmpty(encryptionPassword)) { log.responseStatus(BAD_REQUEST_400) .warn("bad request: encryption password required but none provided"); response.setStatus(BAD_REQUEST_400); return new Result("encryption password required but none provided", true, null); } log.info("creating new publishing transaction"); transaction = getTransactionsService().create(encryptionPassword); log.transactionID(transaction.id()).info("transaction created successfully"); response.setStatus(OK_200); return new Result("New transaction created.", false, transaction); } catch (IOException e) { response.setStatus(INTERNAL_SERVER_ERROR_500); log.error(e, "unexpected error while attempting to create transaction"); return new Result("beingTransaction encountered unexpected error", true, transaction); } }
Source:
<code>public static FileSystem write(final FileSystem fs, final Path path, final Iterable<? extends CharSequence> lines, final Charset cs) throws IOException { Objects.requireNonNull(path); Objects.requireNonNull(lines); Objects.requireNonNull(cs); CharsetEncoder encoder = cs.newEncoder(); <START> try (FSDataOutputStream out = fs.create(path); <END> BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, encoder))) { for (CharSequence line : lines) { writer.append(line); writer.newLine(); } } return fs; }</code><technical_language>createFile builder, set overwrite=true</technical_language>

Target:
public static FileSystem write(final FileSystem fs, final Path path, final Iterable<? extends CharSequence> lines, final Charset cs) throws IOException { Objects.requireNonNull(path); Objects.requireNonNull(lines); Objects.requireNonNull(cs); CharsetEncoder encoder = cs.newEncoder(); try (FSDataOutputStream out = fs.createFile(path).overwrite(true).build(); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out, encoder))) { for (CharSequence line : lines) { writer.append(line); writer.newLine(); } } return fs; }
Source:
<code>IRemoteAndroidTestRunner createRemoteAndroidTestRunner(String packageName, String runnerName, IDevice device) throws DeviceNotAvailableException { RemoteAndroidTestRunner runner = new DefaultRemoteAndroidTestRunner(packageName, runnerName, device); String abiName = resolveAbiName(); String runOptions = ""; if (!mHiddenApiChecks && getDevice().getApiLevel() >= 28) { runOptions += "--no-hidden-api-checks "; } if (!mIsolatedStorage && getDevice().checkApiLevelAgainstNextRelease(29)) { runOptions += "--no-isolated-storage "; } if (!mWindowAnimation && <START> getDevice().checkApiLevelAgainstNextRelease(14)) <END> { runOptions += "--no-window-animation "; } if (abiName != null) { mInstallArgs.add(String.format("--abi %s", abiName)); runOptions += String.format("--abi %s", abiName); } if (!runOptions.isEmpty()) { runner.setRunOptions(runOptions); } runner.setEnforceTimeStamp(mShouldEnforceFormat); return runner; }</code><technical_language>release getApiLevel() directly. refactor hiddenApiChecks getAPiLevel() call</technical_language>

Target:
IRemoteAndroidTestRunner createRemoteAndroidTestRunner(String packageName, String runnerName, IDevice device) throws DeviceNotAvailableException { RemoteAndroidTestRunner runner = new DefaultRemoteAndroidTestRunner(packageName, runnerName, device); String abiName = resolveAbiName(); String runOptions = ""; int apiLevel = getDevice().getApiLevel(); if (!mHiddenApiChecks && apiLevel >= 28) { runOptions += "--no-hidden-api-checks "; } if (!mIsolatedStorage && getDevice().checkApiLevelAgainstNextRelease(29)) { runOptions += "--no-isolated-storage "; } if (!mWindowAnimation && apiLevel >= 14) { runOptions += "--no-window-animation "; } if (abiName != null) { mInstallArgs.add(String.format("--abi %s", abiName)); runOptions += String.format("--abi %s", abiName); } if (!runOptions.isEmpty()) { runner.setRunOptions(runOptions); } runner.setEnforceTimeStamp(mShouldEnforceFormat); return runner; }
Source:
<code>public void testGetCSR() throws Exception { keyCodec.writePublicKey(publicKey); keyCodec.writePrivateKey(privateKey); PKCS10CertificationRequest csr = <START> service.getCSR(client, conf); <END> Assert.assertNotNull(csr); csr = service.getCSR(client, conf); Assert.assertNotNull(csr); csr = service.getCSR(client, conf); Assert.assertNotNull(csr); csr = service.getCSR(client, conf); Assert.assertNotNull(csr); }</code><technical_language>remove SCM_ID/CLUSTER_ID CSR, assert certificate returned contains a valid SCM_ID CLUSTER_ID here</technical_language>

Target:
public void testGetCSR() throws Exception { keyCodec.writePublicKey(publicKey); keyCodec.writePrivateKey(privateKey); service.setCertificateClient(client); PKCS10CertificationRequest csr = service.getCSR(conf); Assert.assertNotNull(csr); csr = service.getCSR(conf); Assert.assertNotNull(csr); csr = service.getCSR(conf); Assert.assertNotNull(csr); csr = service.getCSR(conf); Assert.assertNotNull(csr); }
Source:
<code>public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if(getContext()!=null){ if(Utils.isNetworkConnected(getContext())){ Call<Search> call = apiClient.getTotalProductCount(); call.enqueue(new Callback<Search>() { @Override public void onResponse(Call<Search> call, Response<Search> response) { <START> textHome.setText("Open Food Facts is an open database of more than "+response.body().getCount()+" food products (plus the ones you'll contribute) with ingredients, allergens, nutrition facts and all the tidbits of information we can find on product labels."); <END> } @Override public void onFailure(Call<Search> call, Throwable t) { textHome.setText(R.string.txtHome); } }); } else { textHome.setText(R.string.txtHome); } } }</code><technical_language>string resource display results. This is translatable</technical_language>

Target:
public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if(getContext()!=null){ if(Utils.isNetworkConnected(getContext())){ Call<Search> call = apiClient.getTotalProductCount(); call.enqueue(new Callback<Search>() { @Override public void onResponse(Call<Search> call, Response<Search> response) { String txtHomeOnline = getResources().getString(R.string.txtHomeOnline); int totalProductCount = Integer.parseInt(response.body().getCount()); textHome.setText(String.format(txtHomeOnline,totalProductCount)); } @Override public void onFailure(Call<Search> call, Throwable t) { textHome.setText(R.string.txtHome); } }); } else { textHome.setText(R.string.txtHome); } } }
Source:
<code>public ExtensionManagerBus create(final CreationalContext< ExtensionManagerBus > ctx) { final ExtensionManagerBus instance = injectionTarget.produce(ctx); <START> if ("true".equals(SystemPropertyAction.getProperty("org.apache.cxf.cdi.useCdiUnwrapper", "true"))) { <END> instance.setProperty(ClassUnwrapper.class.getName(), new CdiClassUnwrapper()); } BusFactory.possiblySetDefaultBus(instance); instance.initialize(); injectionTarget.inject(instance, ctx); injectionTarget.postConstruct(instance); return instance; }</code><technical_language>@johnament pretty minor, merging please rename property org.apache.cxf.cdi.useCdiUnwrapper org.apache.cxf.cdi.unwrap.proxies (or similar) kind of explains purpose</technical_language>

Target:
public ExtensionManagerBus create(final CreationalContext< ExtensionManagerBus > ctx) { final ExtensionManagerBus instance = injectionTarget.produce(ctx); if ("true".equals(SystemPropertyAction.getProperty("org.apache.cxf.cdi.unwrap.proxies", "true"))) { instance.setProperty(ClassUnwrapper.class.getName(), new CdiClassUnwrapper()); } BusFactory.possiblySetDefaultBus(instance); instance.initialize(); injectionTarget.inject(instance, ctx); injectionTarget.postConstruct(instance); return instance; }
Source:
<code>public void testIscsiLunCannotBeAddedIfAddingFloatingDisk() { LunDisk disk = createISCSILunDisk(ScsiGenericIO.UNFILTERED, true, DiskInterface.IDE); AddDiskParameters parameters = createParameters(); parameters.setDiskInfo(disk); initializeCommand(Guid.newGuid(), parameters); assertFalse("Floating disk with SCSI reservation set successfully added", command.checkIfLunDiskCanBeAdded(spyDiskValidator(disk))); assertTrue(command.getReturnValue() .getCanDoActionMessages() <START> .contains(VdcBllMessages.ACTION_TYPE_FAILED_SCSI_RESERVATION_NOT_VALID_FOR_FLOATING_DISK.toString())); <END> }</code><technical_language>replace verifyCanDoActionMessagesContainMessage</technical_language>

Target:
public void testIscsiLunCannotBeAddedIfAddingFloatingDisk() { LunDisk disk = createISCSILunDisk(ScsiGenericIO.UNFILTERED, true, DiskInterface.IDE); AddDiskParameters parameters = createParameters(); parameters.setDiskInfo(disk); initializeCommand(Guid.newGuid(), parameters); assertFalse("Floating disk with SCSI reservation set successfully added", command.checkIfLunDiskCanBeAdded(spyDiskValidator(disk))); verifyCanDoActionMessagesContainMessage(VdcBllMessages.ACTION_TYPE_FAILED_SCSI_RESERVATION_NOT_VALID_FOR_FLOATING_DISK); }
Source:
<code>public void parseBasicEvent() throws Exception { GCModel model = getGCModelFromLogFile("SampleShenandoahBasic.txt"); assertThat("size", model.size(), is(5)); assertThat("amount of STW GC pause types", model.getGcEventPauses().size(), is(2)); assertThat("amount of STW Full GC pause types", model.getFullGcEventPauses().size(), is(0)); assertThat("amount of concurrent pause types", model.getConcurrentEventPauses().size(), is(3)); <START> assertThat("total pause time", model.getPause().getSum(), is(0.001318)); <END> assertThat("gc pause time", model.getGCPause().getSum(), is(0.001318)); assertThat("full gc pause time", model.getFullGCPause().getSum(), is(0.0)); assertThat("heap size after concurrent cycle", model.getPostConcurrentCycleHeapUsedSizes().getMax(), is(33 * 1024)); assertThat("max memory freed during STW pauses", model.getFreedMemoryByGC().getMax(), is(34 * 1024)); }</code><technical_language>I think, tests for "double" values Matchers.closeTo() (examples in TestDataReaderSun1_8_0G1). reason is, representation of double values is exact lead tests failing randomly</technical_language>

Target:
public void parseBasicEvent() throws Exception { GCModel model = getGCModelFromLogFile("SampleShenandoahBasic.txt"); assertThat("size", model.size(), is(5)); assertThat("amount of STW GC pause types", model.getGcEventPauses().size(), is(2)); assertThat("amount of STW Full GC pause types", model.getFullGcEventPauses().size(), is(0)); assertThat("amount of concurrent pause types", model.getConcurrentEventPauses().size(), is(3)); assertThat("total pause time", model.getPause().getSum(), closeTo(0.001318, 0.000001)); assertThat("gc pause time", model.getGCPause().getSum(), closeTo(0.001318, 0.000001)); assertThat("full gc pause time", model.getFullGCPause().getSum(), is(0.0)); assertThat("heap size after concurrent cycle", model.getPostConcurrentCycleHeapUsedSizes().getMax(), is(33 * 1024)); assertThat("max memory freed during STW pauses", model.getFreedMemoryByGC().getMax(), is(34 * 1024)); }
Source:
<code><START> private void logTransferBytes(File[] files){ <END> long bytes = 0; for (File file : files) { if (!isSupportedFiletype(file)) { continue; } bytes += file.length(); } Log.d(TAG, "Storing " + bytes + " form bytes"); }</code><technical_language>static</technical_language>

Target:
private static void logTransferBytes(File[] files){ long bytes = 0; for (File file : files) { if (!isSupportedFiletype(file)) { continue; } bytes += file.length(); } Log.d(TAG, "Storing " + bytes + " form bytes"); }
Source:
<code><START> public @Nullable static <F> F[] purgeUnwantedElements(F[] fileArray, Predicate<F> predicate) { <END> List<F> files = new LinkedList<>(Arrays.asList(fileArray)); Iterator<F> iterator = files.iterator(); boolean removed = false; while (iterator.hasNext()) { F next = iterator.next(); if (predicate.test(next)) { iterator.remove(); removed = true; } } if (!removed) { return fileArray; } else if (files.size() == 0) { return null; } else { return toGenericArray(files); } }</code><technical_language>do this instead: java @SuppressWarnings("unchecked") @Nullable public static <F> F[] purgeUnwantedElements(F[] fileArray, Predicate<F> predicate) { Object[] files = Arrays.stream(fileArray) .filter(predicate.negate()) .toArray(); if (files.length == 0) { return null; } else { return (F[]) files; } } do worry Stream instances support objects, empty array object if that? time do new LinkedList<>(Arrays.asList(fileArray));..</technical_language>

Target:
public static <F> F[] purgeUnwantedElements(F[] fileArray, Predicate<F> predicate) { if (ObjectUtils.isEmpty(fileArray)) { return fileArray; } else { return Arrays.stream(fileArray) .filter(predicate.negate()) .toArray(size -> (F[]) Array.newInstance(fileArray[0].getClass(), size)); } }
Source:
<code><START> public String getAlias() { <END> if (alias == null) { return null; } return alias; }</code><technical_language>need check alias is null</technical_language>

Target:
public String getAlias() { return alias; }
Source:
<code>protected S getNext() { S next = super.getNext(); if (next != null) { <START> for (KeyWatchingCompletionListener keyWatchingCompletionListener : completionListeners) { <END> keyWatchingCompletionListener.valueIterated(next); } } else { completionListeners.forEach(KeyWatchingCompletionListener::completed); } return next; }</code><technical_language>is guaranteed listeners initialized this called</technical_language>

Target:
protected S getNext() { S next = super.getNext(); if (next != null) { completionRehashPublisherDecorator.valueIterated(next); } else { completionRehashPublisherDecorator.complete(); } return next; }
Source:
<code>public void testSetCheckpointWhenModified() throws Exception { CouchDB mockRemoteDb = mock(CouchDB.class); when(mockRemoteDb.changes((PullFilter) null, "9-d9e5b0147af143e5b6d1979378ad957b", 1000)).then(new Answer<Object>() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { FileReader fr = new FileReader(TestUtils.loadFixture ("fixture/empty_changes.json")); return JSONUtils.fromJson(fr, ChangesResult.class); } }); when(mockRemoteDb.exists()).thenReturn(true); <START> DatastoreWrapper mockLocalDb = mock(DatastoreWrapper.class); when(mockLocalDb.getCheckpoint(any(String.class))).thenReturn("9" + "-d9e5b0147af143e5b6d1979378ad957b"); StrategyListener mockListener = mock(StrategyListener.class); PullStrategy pullStrategy = super.getPullStrategy(); pullStrategy.sourceDb = mockRemoteDb; pullStrategy.targetDb = mockLocalDb; pullStrategy.getEventBus().register(mockListener); pullStrategy.run(); verify(mockListener).complete(any(ReplicationStrategyCompleted.class)); verify(mockListener, never()).error(any(ReplicationStrategyErrored.class)); verify(mockLocalDb).putCheckpoint(anyString(), eq("10-d9e5b0147af143e5b6d1979378ad957b")); <END> }</code><technical_language>above, try/catch assumeNoException skip this class proxied</technical_language>

Target:
public void testSetCheckpointWhenModified() throws Exception { try { CouchDB mockRemoteDb = mock(CouchDB.class); when(mockRemoteDb.changes((PullFilter) null, "9-d9e5b0147af143e5b6d1979378ad957b", 1000)).then(new Answer<Object>() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { FileReader fr = new FileReader(TestUtils.loadFixture ("fixture/empty_changes.json")); return JSONUtils.fromJson(fr, ChangesResult.class); } }); when(mockRemoteDb.exists()).thenReturn(true); DatastoreWrapper mockLocalDb = mock(DatastoreWrapper.class); when(mockLocalDb.getCheckpoint(any(String.class))).thenReturn("9" + "-d9e5b0147af143e5b6d1979378ad957b"); StrategyListener mockListener = mock(StrategyListener.class); PullStrategy pullStrategy = super.getPullStrategy(); pullStrategy.sourceDb = mockRemoteDb; pullStrategy.targetDb = mockLocalDb; pullStrategy.getEventBus().register(mockListener); pullStrategy.run(); verify(mockListener).complete(any(ReplicationStrategyCompleted.class)); verify(mockListener, never()).error(any(ReplicationStrategyErrored.class)); verify(mockLocalDb).putCheckpoint(anyString(), eq("10" + "-d9e5b0147af143e5b6d1979378ad957b")); } catch (UnsupportedOperationException uoe) { assumeNoException("Cannot proxy DatastoreWrapper on Dalvik", uoe); } }
Source:
<code><START> private void augmentDirectoryWithAsyncDeletes(org.infinispan.lucene.directory.BuildContext directoryBuildContext) { <END> Executor executor = deletesExecutor.getExecutor(); try { Method operationsExecutor = directoryBuildContext.getClass().getMethod( "deleteOperationsExecutor", Executor.class ); operationsExecutor.invoke( directoryBuildContext, executor ); } catch (NoSuchMethodException e) { log.notSettingAsyncDeletes(); } catch (InvocationTargetException e) { log.notSettingAsyncDeletes(); } catch (IllegalAccessException e) { log.notSettingAsyncDeletes(); } }</code><technical_language>Ok sounds a reasonable plan. totally unable test this though, try this built integrated Infinispan 6? (I'm ok word this, a great idea test it)</technical_language>

Target:
private void augmentDirectoryWithAsyncDeletes(org.infinispan.lucene.directory.BuildContext directoryBuildContext) { Executor executor = deletesExecutor.getExecutor(); try { Method operationsExecutor = directoryBuildContext.getClass().getMethod( "deleteOperationsExecutor", Executor.class ); operationsExecutor.invoke( directoryBuildContext, executor ); } catch (NoSuchMethodException e) { log.asyncDeletesNotSupported(); } catch (InvocationTargetException e) { log.asyncDeletesInvocationError( e.getMessage() ); } catch (IllegalAccessException e) { log.asyncDeletesIllegalAccess( e.getMessage() ); } }
Source:
<code>private static FileSystem getCachedHttpFileSystem(final Configuration conf, final AzkabanCommonModuleConfig azConfig) { if (azConfig.getOriginDependencyRootUri() == null) return null; <START> else validateURI(azConfig.getOriginDependencyRootUri(), CHTTP_SCHEME); <END> try { return FileSystem.get(azConfig.getOriginDependencyRootUri(), conf); } catch (final IOException e) { log.error("Unable to initialize CachedHttpFileSystem.", e); throw new AzkabanException(e); } }</code><technical_language>Please follow style guide mentioned in CONTRIBUTING.md, braces for if/else statements, <LINK_0></technical_language>

Target:
private static FileSystem getCachedHttpFileSystem(final Configuration conf, final AzkabanCommonModuleConfig azConfig) { if (azConfig.getOriginDependencyRootUri() == null) { return null; } validateURI(azConfig.getOriginDependencyRootUri(), CHTTP_SCHEME, true); try { return FileSystem.get(azConfig.getOriginDependencyRootUri(), conf); } catch (final IOException e) { log.error("Unable to initialize CachedHttpFileSystem.", e); throw new AzkabanException(e); } }
Source:
<code>public static Slice urlExtractRawParameter(@SqlType("varchar(x)") Slice url, @SqlType("varchar(y)") Slice parameterName) { URI uri = parseUrl(url); if ((uri == null) || (uri.getRawQuery() == null)) { return null; } <START> Slice query = slice(uri.getRawQuery()); <END> String parameter = parameterName.toStringUtf8(); Iterable<String> queryArgs = QUERY_SPLITTER.split(query.toStringUtf8()); for (String queryArg : queryArgs) { Iterator<String> arg = ARG_SPLITTER.split(queryArg).iterator(); if (arg.next().equals(parameter)) { if (arg.hasNext()) { return utf8Slice(arg.next()); } return Slices.EMPTY_SLICE; } } return null; }</code><technical_language>This code duplicated above. I refactor a method: java return extractParameter(uri.getRawQuery(), parameterName);</technical_language>

Target:
public static Slice urlExtractRawParameter(@SqlType("varchar(x)") Slice url, @SqlType("varchar(y)") Slice parameterName) { URI uri = parseUrl(url); if ((uri == null) || (uri.getRawQuery() == null)) { return null; } return extractParameter(uri.getRawQuery(), parameterName); }
Source:
<code>public void testDeserialize() throws IOException { String json = resource("topup.json"); Topup topup = APIResource.GSON.fromJson(json, Topup.class); assertEquals("tu_HASH", topup.getId()); assertEquals("topup", topup.getObject()); <START> assertEquals(1000, topup.getAmount().intValue()); <END> assertEquals("usd", topup.getCurrency()); assertEquals("Testing", topup.getDescription()); assertEquals(1518134400, topup.getExpectedAvailabilityDate().intValue()); assertEquals(1517619386, topup.getCreated().intValue()); assertEquals("pending", topup.getStatus()); assertEquals("statement_descriptor", topup.getStatementDescriptor()); assertEquals("txn_HASH", topup.getBalanceTransaction()); assertFalse(topup.getLivemode()); assertFalse(topup.getMetadata().isEmpty()); assertTrue(topup.getMetadata().containsKey("email")); assertEquals("test@test.com", topup.getMetadata().get("email")); Source source = topup.getSource(); assertEquals("src_HASH", source.getId()); assertEquals("ach_debit", source.getType()); }</code><technical_language>Hmm, is intValue needed here? This automatically resolve right</technical_language>

Target:
public void testDeserialize() throws IOException { String json = resource("topup.json"); Topup topup = APIResource.GSON.fromJson(json, Topup.class); assertEquals("tu_123", topup.getId()); assertEquals("topup", topup.getObject()); assertEquals(1000, topup.getAmount().intValue()); assertEquals("usd", topup.getCurrency()); assertEquals("Testing", topup.getDescription()); assertEquals(1518134400, topup.getExpectedAvailabilityDate().longValue()); assertEquals(1517619386, topup.getCreated().longValue()); assertEquals("pending", topup.getStatus()); assertEquals("statement_descriptor", topup.getStatementDescriptor()); assertEquals("txn_123", topup.getBalanceTransaction()); assertFalse(topup.getLivemode()); assertFalse(topup.getMetadata().isEmpty()); assertTrue(topup.getMetadata().containsKey("email")); assertEquals("test@test.com", topup.getMetadata().get("email")); Source source = topup.getSource(); assertEquals("src_123", source.getId()); assertEquals("ach_debit", source.getType()); }
Source:
<code>public static void renderHUD(RenderGameOverlayEvent event) { Entity renderViewEntity = Minecraft.getInstance().renderViewEntity; if (event.getType() == ElementType.TEXT && renderViewEntity instanceof PlayerEntity) { PlayerEntity player = (PlayerEntity) renderViewEntity; ItemStack chestStack = player.getItemStackFromSlot(EquipmentSlotType.CHEST); Item chestItem = chestStack.getItem(); if (chestItem instanceof ScubaArmorItem) { LazyOptional<ScubaData> data = player.getCapability(ScubaData.CAPABILITY); int airRemaining = ((ScubaArmorItem)chestItem).getRemainingAir(chestStack); TextFormatting airColor; if (airRemaining < 20 * 60) { int speed = airRemaining < 20 * 10 ? 5 : 10; airColor = (player.world.getGameTime() / speed) % 4 == 0 ? TextFormatting.WHITE : TextFormatting.RED; } else if (airRemaining < 20 * 60 * 5) { airColor = TextFormatting.GOLD; } else { airColor = TextFormatting.GREEN; } double depth = ScubaData.getDepth(player); String depthStr; if (depth > 0) { depthStr = String.format("%.1fm", depth); } else { <START> depthStr = "N/A"; END> } data.ifPresent(d -> drawHUDStrings( TropicraftLangKeys.SCUBA_AIR_TIME.format(airColor + DurationFormatUtils.formatDuration(airRemaining * (1000 / 20), "HH:mm:ss")), TropicraftLangKeys.SCUBA_DIVE_TIME.format(DurationFormatUtils.formatDuration(d.getDiveTime() * (1000 / 20), "HH:mm:ss")), TropicraftLangKeys.SCUBA_DEPTH.format(depthStr), TropicraftLangKeys.SCUBA_MAX_DEPTH.format(String.format("%.1fm", d.getMaxDepth())))); } } }</code><technical_language>TODO later</technical_language>

Target:
public static void renderHUD(RenderGameOverlayEvent event) { Entity renderViewEntity = Minecraft.getInstance().renderViewEntity; if (event.getType() == ElementType.TEXT && renderViewEntity instanceof PlayerEntity) { PlayerEntity player = (PlayerEntity) renderViewEntity; ItemStack chestStack = player.getItemStackFromSlot(EquipmentSlotType.CHEST); Item chestItem = chestStack.getItem(); if (chestItem instanceof ScubaArmorItem) { LazyOptional<ScubaData> data = player.getCapability(ScubaData.CAPABILITY); int airRemaining = ((ScubaArmorItem)chestItem).getRemainingAir(chestStack); TextFormatting airColor = getAirTimeColor(airRemaining, player.world); double depth = ScubaData.getDepth(player); String depthStr; if (depth > 0) { depthStr = String.format("%.1fm", depth); } else { depthStr = TropicraftLangKeys.NA.getLocalizedText(); } data.ifPresent(d -> drawHUDStrings( TropicraftLangKeys.SCUBA_AIR_TIME.format(airColor + formatTime(airRemaining)), TropicraftLangKeys.SCUBA_DIVE_TIME.format(formatTime(d.getDiveTime())), TropicraftLangKeys.SCUBA_DEPTH.format(depthStr), TropicraftLangKeys.SCUBA_MAX_DEPTH.format(String.format("%.1fm", d.getMaxDepth())))); } } }
Source:
<code>public void processBindingConfiguration(String context, Item item, String bindingConfig) throws BindingConfigParseException { <START> super.processBindingConfiguration(context, item, bindingConfig); <END> HorizonBindingConfig config = new HorizonBindingConfig(); parseBindingConfig(bindingConfig, config); addBindingConfig(item, config); }</code><technical_language>Move super call end, if earlier steps throw exception, adding a bad binding config</technical_language>

Target:
public void processBindingConfiguration(String context, Item item, String bindingConfig) throws BindingConfigParseException { HorizonBindingConfig config = new HorizonBindingConfig(); parseBindingConfig(bindingConfig, config); addBindingConfig(item, config); super.processBindingConfiguration(context, item, bindingConfig); }
Source:
<code>public Map<StoreKey, StoreKey> retrieveAndMaybeConvertStoreKeys(File[] replicas) throws Exception { Map<File, IndexProcessingResults> results = processIndex(new HashSet<>(Arrays.asList(replicas)), null, 1); boolean success = true; for (DumpIndexTool.IndexProcessingResults result : results.values()) { if (!result.isIndexSane()) { success = false; break; } } <START> if (success) { <END> return createConversionKeyMap(replicas, results); } return null; }</code><technical_language>this method is temporarily used</technical_language>

Target:
public Map<StoreKey, StoreKey> retrieveAndMaybeConvertStoreKeys(File[] replicas) throws Exception { Map<File, IndexProcessingResults> results = processIndex(new HashSet<>(Arrays.asList(replicas)), null, 1, false); boolean success = true; for (DumpIndexTool.IndexProcessingResults result : results.values()) { if (!result.isIndexSane()) { success = false; break; } } if (success) { return createConversionKeyMap(replicas, results); } return null; }
Source:
<code>private SqlAggFunction createSqlAggFunction(@Nullable FunctionIdentifier identifier, FunctionDefinition definition) { if (definition instanceof AggregateFunctionDefinition) { <START> final AggregateFunctionDefinition aggDef = (AggregateFunctionDefinition) definition; <END> final AggregateFunction<?, ?> aggFunc = aggDef.getAggregateFunction(); final FunctionIdentifier adjustedIdentifier; if (identifier != null) { adjustedIdentifier = identifier; } else { adjustedIdentifier = FunctionIdentifier.of(aggFunc.functionIdentifier()); } return new AggSqlFunction( adjustedIdentifier, aggFunc.toString(), aggFunc, fromLegacyInfoToDataType(aggDef.getResultTypeInfo()), fromLegacyInfoToDataType(aggDef.getAccumulatorTypeInfo()), ShortcutUtils.unwrapTypeFactory(relBuilder), aggFunc.getRequirements().contains(FunctionRequirement.OVER_WINDOW_ONLY), scala.Option.empty()); } else if (definition instanceof TableAggregateFunctionDefinition) { final TableAggregateFunctionDefinition aggDef = (TableAggregateFunctionDefinition) definition; final TableAggregateFunction<?, ?> aggFunc = aggDef.getTableAggregateFunction(); final FunctionIdentifier adjustedIdentifier; if (identifier != null) { adjustedIdentifier = identifier; } else { adjustedIdentifier = FunctionIdentifier.of(aggFunc.functionIdentifier()); } return new AggSqlFunction( adjustedIdentifier, aggFunc.toString(), aggFunc, fromLegacyInfoToDataType(aggDef.getResultTypeInfo()), fromLegacyInfoToDataType(aggDef.getAccumulatorTypeInfo()), ShortcutUtils.unwrapTypeFactory(relBuilder), false, scala.Option.empty()); } final DataTypeFactory dataTypeFactory = ShortcutUtils.unwrapContext(relBuilder) .getCatalogManager() .getDataTypeFactory(); final TypeInference typeInference = definition.getTypeInference(dataTypeFactory); return BridgingSqlAggFunction.of( dataTypeFactory, ShortcutUtils.unwrapTypeFactory(relBuilder), SqlKind.OTHER_FUNCTION, identifier, definition, typeInference); }</code><technical_language>clean code nerd in I if-else branches function calls, including new code if. I.e: if (definition instanceof AggregateFunctionDefinition) { return translateLegacyAggregateFunction(...) } else if (...) { return translateLegacyTableAggregateFunction(...) } return translateFunction(...)</technical_language>

Target:
private SqlAggFunction createSqlAggFunction(@Nullable FunctionIdentifier identifier, FunctionDefinition definition) { if (definition instanceof AggregateFunctionDefinition) { return createLegacySqlAggregateFunction(identifier, (AggregateFunctionDefinition) definition); } else if (definition instanceof TableAggregateFunctionDefinition) { return createLegacySqlTableAggregateFunction(identifier, (TableAggregateFunctionDefinition) definition); } final DataTypeFactory dataTypeFactory = ShortcutUtils.unwrapContext(relBuilder) .getCatalogManager() .getDataTypeFactory(); final TypeInference typeInference = definition.getTypeInference(dataTypeFactory); return BridgingSqlAggFunction.of( dataTypeFactory, ShortcutUtils.unwrapTypeFactory(relBuilder), SqlKind.OTHER_FUNCTION, identifier, definition, typeInference); }
Source:
<code>public Object deserialize(Object object) { if (object instanceof String) { return DoubleMeanHolder.fromBytes(StringUtils.decodeBase64(StringUtils.toUtf8((String) object))); } else if (object instanceof DoubleMeanHolder) { return object; <START> } else if (object instanceof byte[]) { <END> return DoubleMeanHolder.fromBytes((byte[]) object); } else { throw new IAE("Unknown object type [%s]", Utils.safeObjectClassGetName(object)); } }</code><technical_language>byte[] firs if check in places</technical_language>

Target:
public Object deserialize(Object object) { if (object instanceof byte[]) { return DoubleMeanHolder.fromBytes((byte[]) object); } else if (object instanceof String) { return DoubleMeanHolder.fromBytes(StringUtils.decodeBase64(StringUtils.toUtf8((String) object))); } else if (object instanceof DoubleMeanHolder) { return object; } else { throw new IAE("Unknown object type [%s]", Utils.safeObjectClassGetName(object)); } }
Source:
<code>public List<RenderPipelineTask> generateFrom(List<Node> orderedNodes) { logger.info("Task List: "); List<RenderPipelineTask> taskList = Lists.newArrayList(); for (Node node : orderedNodes) { <START> <END> for (StateChange stateChange : node.getStateChanges()) { taskList.add(generateTask(stateChange)); } RenderPipelineTask task = generateTask(node); taskList.add(task); } return taskList; }</code><technical_language>missing a step here! orderedNodes generate a List<Object> StateChanges Nodes. This list includes state changes return parameters defaults. list is in place generate tasklist, making do include redundant tasks</technical_language>

Target:
public List<RenderPipelineTask> generateFrom(List<Node> orderedNodes) { generateIntermediateList(orderedNodes); logList("-- Intermediate List --", intermediateList); generateTaskList(); logList("-- Task List --", taskList); return taskList; }