auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static PersonalizationInfo extractPersonalizationStatusFromAlexaRequest(HandlerInput handlerInput) { if (handlerInput == null) { throw new OneBusAwayException(promptHelper.getPrompt(GENERAL_ERROR_MESSAGE)); } final String userId = handlerInput.getRequestEnvelope().getSession().getUser().getUserId(); final String principleId = SessionUtil.getSessionAttribute(handlerInput.getAttributesManager(), PRINCIPLE_ID, String.class); if (StringUtils.isNotBlank(principleId)) { return new PersonalizationInfo(principleId, userId, principleId, principleId.startsWith(PERSONID_PREFIX)); } return Optional.of(handlerInput) .map(HandlerInput::getRequestEnvelope) .map(RequestEnvelope::getContext) .map(Context::getSystem) .map(SystemState::getPerson) .map(Person::getPersonId) .filter(StringUtils::isNotBlank) .map((pid) -> { log.info("Person ID is " + pid); return new PersonalizationInfo(pid, userId, pid, true); }).orElseGet(() -> { log.info("Person ID is not exist, using userId as principleId"); return new PersonalizationInfo(userId, userId, StringUtils.EMPTY, false); }); }

Target:
public static PersonalizationInfo extractPersonalizationStatusFromAlexaRequest(HandlerInput handlerInput) { if (handlerInput == null) { throw new OneBusAwayException(promptHelper.getPrompt(GENERAL_ERROR_MESSAGE)); } final String userId = handlerInput.getRequestEnvelope().getSession().getUser().getUserId(); final String principleId = SessionUtil.getSessionAttribute(handlerInput.getAttributesManager(), PRINCIPLE_ID, String.class); if (StringUtils.isNotBlank(principleId)) { return new PersonalizationInfo(principleId, userId, principleId, principleId.startsWith(PERSONID_PREFIX)); } return Optional.of(handlerInput) .map(HandlerInput::getRequestEnvelope) .map(RequestEnvelope::getContext) .map(Context::getSystem) .map(SystemState::getPerson) .map(Person::getPersonId) .filter(StringUtils::isNotBlank) .map((pid) -> { log.info("Person ID is " + pid); return new PersonalizationInfo(pid, userId, pid, true); }).orElseGet(() -> { log.info("Person ID does not exist, using userId as principleId"); return new PersonalizationInfo(userId, userId, StringUtils.EMPTY, false); }); }
Source:
public String toString() { return new ToStringBuilder(this) .append("name", name) .append("properties", properties) .append("oneTimeExecution", oneTimeExecution) .append("immediateExecution", immediateExecution) .append("uuid", uuid) .toString(); }

Target:
public String toString() { final StringBuilder sb = new StringBuilder("CronTaskConfiguration{"); sb.append("name='").append(name).append('\''); sb.append(", properties=").append(properties); sb.append(", oneTimeExecution=").append(oneTimeExecution); sb.append(", immediateExecution=").append(immediateExecution); sb.append(", uuid='").append(uuid).append('\''); sb.append('}'); return sb.toString(); }
Source:
public void addBackgroundPage(final ScenarioGridWidget scenarioGridWidget) { addPage(new PageImpl(scenarioGridWidget, ScenarioSimulationEditorConstants.INSTANCE.backgroundTabTitle()) { @Override public void onFocus() { scenarioSimulationEditorPresenter.setFocusedContext(scenarioGridWidget.getScenarioSimulationContext()); scenarioSimulationEditorPresenter.setItemMenuForMainGridEnabled(false); } }); }

Target:
public void addBackgroundPage(final ScenarioGridWidget scenarioGridWidget) { addPage(new PageImpl(scenarioGridWidget, ScenarioSimulationEditorConstants.INSTANCE.backgroundTabTitle()) { @Override public void onFocus() { super.onFocus(); enableBackgroundTab(); } }); }
Source:
public static WebArchive getDeployment() { return AbstractTestCase.getDeployment() .addClasses(LoggingParticipant.class, AbstractTestCase.class, TestSuiteEnvironment.class) .addAsWebInfResource(InboundBridgeTestCase.class.getClassLoader().getResource("web.xml"),"web.xml") .addAsManifestResource(new StringAsset(DEPENDENCIES), "MANIFEST.MF") .addAsManifestResource(PermissionUtils.createPermissionsXmlAsset( new PropertyPermission("management.address", "read"), new PropertyPermission("node0", "read"), new PropertyPermission("jboss.http.port", "read"), new PropertyPermission("arquillian.debug", "read"), new ReflectPermission("suppressAccessChecks"), new RuntimePermission("accessDeclaredMembers"), new SocketPermission(SERVER_HOST_PORT, "connect,resolve") ), "permissions.xml"); }

Target:
public static WebArchive getDeployment() { return AbstractTestCase.getDeployment() .addClasses(LoggingParticipant.class, AbstractTestCase.class, TestSuiteEnvironment.class) .addAsWebInfResource(ParticipantTestCase.class.getClassLoader().getResource("web.xml"),"web.xml") .addAsManifestResource(new StringAsset(DEPENDENCIES), "MANIFEST.MF") .addAsManifestResource(PermissionUtils.createPermissionsXmlAsset( new PropertyPermission("management.address", "read"), new PropertyPermission("node0", "read"), new PropertyPermission("jboss.http.port", "read"), new PropertyPermission("arquillian.debug", "read"), new ReflectPermission("suppressAccessChecks"), new RuntimePermission("accessDeclaredMembers"), new SocketPermission(SERVER_HOST_PORT, "connect,resolve") ), "permissions.xml"); }
Source:
public Status doGet() { return new Status( getVersion("/druid-server.version"), getVersion("/druid-api.version"), getExtensionVersions(), new Memory(Runtime.getRuntime()) ); }

Target:
public Status doGet() { return getStatus(); }
Source:
public LockWatchStateUpdate getWatchState(OptionalLong lastKnownVersion) { return lockWatchingService.getWatchState(lastKnownVersion); }

Target:
public LockWatchStateUpdate getWatchState(OptionalLong lastKnownVersion) { return lockWatchingService.getWatchStateUpdate(lastKnownVersion); }
Source:
RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException { for (;;) { final RevCommit c = pending.next(); if (c == null) return null; if (c.inDegree > 0) { continue; } if ((c.flags & TOPO_PRODUCED) != 0) { continue; } for (RevCommit p : c.parents) { if (--p.inDegree == 0) { pending.unpop(p); } if (firstParent) { break; } } c.flags |= TOPO_PRODUCED; return c; } }

Target:
RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException { for (;;) { final RevCommit c = pending.next(); if (c == null) return null; if (c.inDegree > 0) { continue; } for (RevCommit p : c.parents) { if (--p.inDegree == 0 && (p.flags & TOPO_QUEUED) != 0) { pending.unpop(p); } if (firstParent) { break; } } if ((c.flags & TOPO_QUEUED) == 0) { continue; } c.flags &= ~TOPO_QUEUED; return c; } }
Source:
public static LogFileInformation getLogFileInformation() { if (shouldFetchLogFileInformation()) { File logFile = new File(rootFileAppender.getFile()); LogFileInformation logFileInfo = new LogFileInformation(rootFileAppender.getFile(), logFile.length()); return logFileInfo; } return new LogFileInformation(null, 0); }

Target:
public static LogFileInformation getLogFileInformation() { if (shouldFetchLogFileInfo) { File logFile = new File(fileAppender.getFile()); LogFileInformation logFileInfo = new LogFileInformation(fileAppender.getFile(), logFile.length()); return logFileInfo; } return null; }
Source:
public void outputTest(){ DataSet data = new DataSet(Nd4j.zeros(10, 10), Nd4j.zeros(10, 10)); SameDiff sd = SameDiff.create(); SDVariable in = sd.placeHolder("input", DataType.FLOAT, 10, 10); SDVariable out = in.add("out", 2); TrainingConfig conf = new TrainingConfig.Builder() .l2(1e-4) .updater(new Sgd(3e-1)) .dataSetFeatureMapping("input") .dataSetLabelMapping() .build(); sd.setTrainingConfig(conf); INDArray output = sd.output(data, "out").get("out"); assertTrue(output.toString().equals(Nd4j.zeros(10, 10).add(2).toString())); }

Target:
public void outputTest(){ DataSet data = new DataSet(Nd4j.zeros(10, 10), Nd4j.zeros(10, 10)); SameDiff sd = SameDiff.create(); SDVariable in = sd.placeHolder("input", DataType.FLOAT, 10, 10); SDVariable out = in.add("out", 2); TrainingConfig conf = new TrainingConfig.Builder() .l2(1e-4) .updater(new Sgd(3e-1)) .dataSetFeatureMapping("input") .dataSetLabelMapping() .build(); sd.setTrainingConfig(conf); INDArray output = sd.output(data, "out").get("out"); assertTrue("output != input + 2", output.equalsWithEps( Nd4j.zeros(10, 10).add(2).castTo(DataType.FLOAT), 0.0001)); }
Source:
public void testTopologyValidator() throws Exception { putValid(DEFAULT_CACHE_NAME); remove(DEFAULT_CACHE_NAME); putInvalid(CACHE_NAME_1); removeInvalid(CACHE_NAME_1); putInvalid(CACHE_NAME_2); removeInvalid(CACHE_NAME_2); startGrid(1); putValid(DEFAULT_CACHE_NAME); remove(DEFAULT_CACHE_NAME); putValid(CACHE_NAME_1); putValid(CACHE_NAME_2); remove(CACHE_NAME_2); startGrid(2); putValid(DEFAULT_CACHE_NAME); remove(DEFAULT_CACHE_NAME); getInvalid(CACHE_NAME_1); putInvalid(CACHE_NAME_1); removeInvalid(CACHE_NAME_1); putValid(CACHE_NAME_2); remove(CACHE_NAME_2); client = true; startClientGrid(3); putValid(DEFAULT_CACHE_NAME); remove(DEFAULT_CACHE_NAME); getInvalid(CACHE_NAME_1); putInvalid(CACHE_NAME_1); removeInvalid(CACHE_NAME_1); putValid(CACHE_NAME_2); remove(CACHE_NAME_2); }

Target:
public void testTopologyValidator() throws Exception { putValid(DEFAULT_CACHE_NAME); remove(DEFAULT_CACHE_NAME); putInvalid(CACHE_NAME_1); removeInvalid(CACHE_NAME_1); putInvalid(CACHE_NAME_2); removeInvalid(CACHE_NAME_2); startGrid(1); putValid(DEFAULT_CACHE_NAME); remove(DEFAULT_CACHE_NAME); putValid(CACHE_NAME_1); putValid(CACHE_NAME_2); remove(CACHE_NAME_2); startGrid(2); putValid(DEFAULT_CACHE_NAME); remove(DEFAULT_CACHE_NAME); getInvalid(CACHE_NAME_1); putInvalid(CACHE_NAME_1); removeInvalid(CACHE_NAME_1); putValid(CACHE_NAME_2); remove(CACHE_NAME_2); startClientGrid(3); putValid(DEFAULT_CACHE_NAME); remove(DEFAULT_CACHE_NAME); getInvalid(CACHE_NAME_1); putInvalid(CACHE_NAME_1); removeInvalid(CACHE_NAME_1); putValid(CACHE_NAME_2); remove(CACHE_NAME_2); }
Source:
private String calculateUptime() { long different = System.currentTimeMillis() - startTimestamp; long secondsInMilli = 1000; long minutesInMilli = secondsInMilli * 60; long hoursInMilli = minutesInMilli * 60; long daysInMilli = hoursInMilli * 24; long elapsedDays = different / daysInMilli; different = different % daysInMilli; long elapsedHours = different / hoursInMilli; different = different % hoursInMilli; long elapsedMinutes = different / minutesInMilli; different = different % minutesInMilli; long elapsedSeconds = different / secondsInMilli; return String.format("%d days, %d hours, %d minutes, %d seconds", elapsedDays, elapsedHours, elapsedMinutes, elapsedSeconds); }

Target:
private String calculateUptime() { long different = System.currentTimeMillis() - startTimestamp; return DurationFormatUtils.formatDurationWords(different, false, false); }
Source:
public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) { XmlEntry entry = (XmlEntry) event.getEntry(); if (!entry.showText()) { return; } if (fAverageCharacterWidth == null) { fAverageCharacterWidth = gc.getFontMetrics().getAverageCharWidth(); } if (bounds.width <= fAverageCharacterWidth) { return; } String eventName = getEventName(event); if (eventName == null) { return; } gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_WHITE)); Utils.drawText(gc, eventName, bounds.x, bounds.y, bounds.width, bounds.height, true, true); }

Target:
public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) { XmlEntry entry = (XmlEntry) event.getEntry(); if (!entry.showText()) { return; } if (fAverageCharacterWidth == null) { fAverageCharacterWidth = gc.getFontMetrics().getAverageCharWidth(); } if (bounds.width <= fAverageCharacterWidth) { return; } String eventName = getEventName(event); if (eventName == null) { return; } Color stateColor = gc.getBackground(); gc.setForeground(Utils.getDistinctColor(stateColor.getRGB())); Utils.drawText(gc, eventName, bounds.x, bounds.y, bounds.width, bounds.height, true, true); }
Source:
public void execute(FunctionContext context) { String memberName = context.getMemberName(); try { Object[] arguments; Boolean stop = getStopFromArguments(context.getArguments()); if (stop == null) { context.getResultSender().lastResult(new CliFunctionResult("", false, "Wrong arguments passed")); return; } String senderId = getSenderIdFromArguments(context.getArguments()); if (senderId == null) { context.getResultSender().lastResult(new CliFunctionResult("", false, "Wrong arguments passed")); return; } Cache cache = context.getCache(); GatewaySender sender = cache.getGatewaySender(senderId); if (sender == null) { context.getResultSender().lastResult(new CliFunctionResult(memberName, false, String.format("Sender '%s' does not exist", senderId))); return; } sender.setMustQueueDroppedEvents(!stop); XmlEntity xmlEntity = new XmlEntity(CacheXml.GATEWAY_SENDER, "name", senderId); context.getResultSender().lastResult(new CliFunctionResult(memberName, xmlEntity, String.format("Set mustQueueTempDroppedEvents to '%b', for Sender '%s'", !stop, senderId))); } catch (IllegalStateException ex) { context.getResultSender() .lastResult(new CliFunctionResult(memberName, false, ex.getMessage())); } catch (Exception ex) { LogService.getLogger().error(ex.getMessage(), ex); context.getResultSender().lastResult(new CliFunctionResult(memberName, ex, ex.getMessage())); } }

Target:
public void execute(FunctionContext context) { String memberName = context.getMemberName(); try { Object[] arguments = (Object[]) context.getArguments(); String senderId = (String) arguments[0]; Boolean stop = (Boolean) arguments[1]; Cache cache = context.getCache(); GatewaySender sender = cache.getGatewaySender(senderId); if (sender == null) { context.getResultSender() .lastResult( new CliFunctionResult(memberName, false, "sender " + senderId + " not found ")); return; } sender.setAllInstancesStopped(stop); context.getResultSender().lastResult(new CliFunctionResult(memberName, String.format("Set allInstancesStopped to '%b', for Sender '%s'", stop, senderId))); } catch (IllegalStateException ex) { context.getResultSender() .lastResult(new CliFunctionResult(memberName, false, ex.getMessage())); } catch (Exception ex) { LogService.getLogger().error(ex.getMessage(), ex); context.getResultSender().lastResult(new CliFunctionResult(memberName, ex, ex.getMessage())); } }
Source:
public ViewActionSetActivated(View view) { this.view = view; }

Target:
public ViewActionSetActivated(View view) { super(view); }
Source:
public static void copyRsdl(String outputDirectory) throws IOException { copy(loadAsStream(RSDL_FILE_NAME), new FileWriter(new File(outputDirectory + RSDL_FILE_NAME))); copy(loadAsStream(GLUSTER_RSDL_FILE_NAME), new FileWriter(new File(outputDirectory + GLUSTER_RSDL_FILE_NAME))); }

Target:
public static void copyRsdl(String outputDirectory) throws IOException { copy(loadAsStream(RSDL_FILE_NAME), new FileWriter(new File(outputDirectory + RSDL_FILE_NAME))); copy(loadAsStream(GLUSTER_RSDL_FILE_NAME), new FileWriter(new File(outputDirectory + GLUSTER_RSDL_FILE_NAME))); copy(loadAsStream(SCHEMA_FILE_NAME), new FileWriter(new File(outputDirectory + SCHEMA_FILE_NAME))); }
Source:
public void deregisterCacheEntryListener(CacheEntryListenerConfiguration<K, V> listenerCfg) { notifier.removeListener(listenerCfg, cache); configuration.getCacheEntryListenerConfigurations().remove(listenerCfg); }

Target:
public void deregisterCacheEntryListener(CacheEntryListenerConfiguration<K, V> listenerCfg) { notifier.removeListener(listenerCfg, cache); removeCacheEntryListenerConfiguration(listenerCfg); }
Source:
public PostgreSQLWeekDiffFunction() { super("(select sign(i1) * floor(abs(i1)) from (values (extract('day' from (?1::timestamp - ?2::timestamp)) / -7)) as temp(i1))"); }

Target:
public PostgreSQLWeekDiffFunction() { super("-cast(trunc(date_part('day', (?1)::timestamp - (?2)::timestamp) / 7) as integer)"); }
Source:
public void testMergeLocalChangesPerFeature_Bug3() throws Exception { CDOSession session = openSession(); CDOTransaction transaction1 = session.openTransaction(); transaction1.options().addConflictResolver(createConflictResolver()); EList<EObject> contents1 = transaction1.getOrCreateResource(getResourcePath("/res1")).getContents(); contents1.add(getModel1Factory().createAddress()); CDOTransaction transaction2 = session.openTransaction(); transaction2.options().addConflictResolver(createConflictResolver()); EList<EObject> contents2 = transaction2.getOrCreateResource(getResourcePath("/res1")).getContents(); CDOTransaction transaction3 = session.openTransaction(); transaction3.options().addConflictResolver(createConflictResolver()); EList<EObject> contents3 = transaction2.getOrCreateResource(getResourcePath("/res1")).getContents(); contents1.add(getModel1Factory().createAddress()); Address address2 = getModel1Factory().createAddress(); contents2.add(address2); contents3.add(getModel1Factory().createAddress()); contents2.remove(address2); contents3.add(getModel1Factory().createAddress()); commitAndSync(transaction3, transaction2, transaction1); commitAndSync(transaction2, transaction1, transaction3); commitAndSync(transaction1, transaction2, transaction3); }

Target:
public void testMergeLocalChangesPerFeature_Bug3() throws Exception { CDOSession session = openSession(); CDOTransaction transaction1 = session.openTransaction(); transaction1.options().addConflictResolver(createConflictResolver()); CDOResource resource1 = transaction1.getOrCreateResource(getResourcePath("/res1")); EList<EObject> contents1 = resource1.getContents(); contents1.add(getModel1Factory().createAddress()); contents1.add(getModel1Factory().createAddress()); CDOTransaction transaction2 = session.openTransaction(); transaction2.options().addConflictResolver(createConflictResolver()); CDOResource resource2 = transaction2.getOrCreateResource(getResourcePath("/res1")); EList<EObject> contents2 = resource2.getContents(); contents2.add(getModel1Factory().createAddress()); contents2.remove(0); CDOTransaction transaction3 = session.openTransaction(); transaction3.options().addConflictResolver(createConflictResolver()); CDOResource resource3 = transaction3.getOrCreateResource(getResourcePath("/res1")); EList<EObject> contents3 = resource3.getContents(); contents3.add(getModel1Factory().createAddress()); contents3.add(getModel1Factory().createAddress()); commitAndSync(transaction3, transaction2, transaction1); commitAndSync(transaction2, transaction1, transaction3); commitAndSync(transaction1, transaction2, transaction3); }
Source:
public static Level parseLevel(String levelName) { if ("ALL".equalsIgnoreCase(levelName)) { return Level.ALL; } else if ("FINEST".equalsIgnoreCase(levelName)) { return Level.FINEST; } else if ("TRACE".equalsIgnoreCase(levelName) || "FINER".equalsIgnoreCase(levelName)) { return Level.FINER; } else if ("DEBUG".equalsIgnoreCase(levelName) || "FINE".equalsIgnoreCase(levelName)) { return Level.FINE; } else if ("CONFIG".equalsIgnoreCase(levelName)) { return Level.CONFIG; } else if ("INFO".equalsIgnoreCase(levelName)) { return Level.INFO; } else if ("WARN".equalsIgnoreCase(levelName) || "WARNING".equalsIgnoreCase(levelName)) { return Level.WARNING; } else if ("ERROR".equalsIgnoreCase(levelName) || "FATAL".equalsIgnoreCase(levelName) || "SEVERE".equalsIgnoreCase(levelName)) { return Level.SEVERE; } else if ("OFF".equalsIgnoreCase(levelName)) { return Level.OFF; } throw new IllegalArgumentException(String.format("Invalid log level value: '%s'", levelName)); }

Target:
public static Level parseLevel(String levelName) { if (levelName == null) { throw new IllegalArgumentException(String.format("Invalid log level value: '%s'", levelName)); } return Level.parse(levelName.toUpperCase()); }
Source:
private static void check(CheckArguments param) throws CommandFormatException, IOException { if (param.isSearchTypeStatus() && UNKNOWN.equals(param.getExpectedState())) { throw new IllegalStateException("Could not verify deployment state " + UNKNOWN + "!"); } if (!param.isOutputEmpty()) { for (String row : param.getRows()) { if (row.contains(param.getName())) { if (param.isSearchTypeMissing()) { fail("Found non wanted application deployment " + "" + param.getName() + " in \n" + param.getResult()); } else if (param.isSearchTypeExist()) { log.info("Check existence application deployment '" + param.getName() + "' Success"); doubleCheck(param); return; } else if (param.isSearchTypeStatus()) { assertThat("", row, containsString(param.getExpectedState().getTitle())); log.info("Check application deployment in right state '" + param.getName() + "'->'" + param.getExpectedState().getTitle() + " by command '" + param.getResult().getCommand() + " Success"); doubleCheck(param); return; } fail(param.getName() + " not in right state" + param.getResult().getServerGroupInfo() + "! Expected '" + param.getExpectedState().getTitle() + "' but is\n" + row); } } } if (param.isSearchTypeMissing()) { log.info("Check non-existence application deployment '" + param.getName() + "' Success"); doubleCheck(param); return; } throw new CommandFormatException("No result for " + param.getName() + " in \n" + param.getResult()); }

Target:
private static void check(CheckArguments param) throws CommandFormatException, IOException { if (param.isSearchTypeStatus() && UNKNOWN.equals(param.getExpectedState())) { throw new IllegalStateException("Could not verify deployment state " + UNKNOWN + "!"); } if (!param.isOutputEmpty()) { for (String row : param.getRows()) { if (row.contains(param.getName())) { if (param.isSearchTypeMissing()) { fail("Found non wanted application deployment " + "" + param.getName() + " in \n" + param.getResult()); } else if (param.isSearchTypeExist()) { log.trace("Check existence application deployment '" + param.getName() + "' Success"); doubleCheck(param); return; } else if (param.isSearchTypeStatus()) { assertThat("", row, containsString(param.getExpectedState().getTitle())); log.trace("Check application deployment in right state '" + param.getName() + "'->'" + param.getExpectedState().getTitle() + " by command '" + param.getResult().getCommand() + " Success"); doubleCheck(param); return; } fail(param.getName() + " not in right state" + param.getResult().getServerGroupInfo() + "! Expected '" + param.getExpectedState().getTitle() + "' but is\n" + row); } } } if (param.isSearchTypeMissing()) { log.trace("Check non-existence application deployment '" + param.getName() + "' Success"); doubleCheck(param); return; } throw new CommandFormatException("No result for " + param.getName() + " in \n" + param.getResult()); }
Source:
boolean needsCompaction() { if (!isCompactionPossible()) return false; if (this.unrecoveredRegionCount.get() > 0) return false; if (parent.getCompactionThreshold() == 100) return true; if (parent.getCompactionThreshold() == 0) return false; long rvHWMtmp = this.totalCount.get(); if (rvHWMtmp > 0) { long tlc = this.totalLiveCount.get(); if (tlc < 0) { tlc = 0; } double rv = tlc; if (((rv / (double) rvHWMtmp) * 100) <= parent.getCompactionThreshold()) { return true; } } return false; }

Target:
boolean needsCompaction() { if (!isCompactionPossible()) return false; if (this.unrecoveredRegionCount.get() > 0) return false; if (parent.getCompactionThreshold() == 100) return true; if (parent.getCompactionThreshold() == 0) return false; long rvHWMtmp = this.totalCount.get(); if (rvHWMtmp > 0) { long tlc = this.totalLiveCount.get(); if (tlc < 0) { tlc = 0; } double rv = tlc; if (((rv / (double) rvHWMtmp) * 100) <= parent.getCompactionThreshold()) { return true; } } else { return true; } return false; }
Source:
private static List<String> getErlangModulePathsDefault(@NotNull ErlangTarget target, boolean isTests) { LOG.warn("Erlang module" + target.getModule().getName() + "will be fully rebuilt."); CommonProcessors.CollectProcessor<File> erlFilesCollector = new CommonProcessors.CollectProcessor<File>() { @Override protected boolean accept(@NotNull File file) { return !file.isDirectory() && FileUtilRt.extensionEquals(file.getName(), "erl"); } }; List<JpsModuleSourceRoot> sourceRoots = ContainerUtil.newArrayList(); JpsModule module = target.getModule(); ContainerUtil.addAll(sourceRoots, module.getSourceRoots(JavaSourceRootType.SOURCE)); if (isTests) { ContainerUtil.addAll(sourceRoots, module.getSourceRoots(JavaSourceRootType.TEST_SOURCE)); } for (JpsModuleSourceRoot root : sourceRoots) { FileUtil.processFilesRecursively(root.getFile(), erlFilesCollector); } return ContainerUtil.map(erlFilesCollector.getResults(), new Function<File, String>() { @NotNull @Override public String fun(@NotNull File file) { return file.getAbsolutePath(); } }); }

Target:
private static List<String> getErlangModulePathsDefault(@NotNull ErlangTarget target, boolean isTests) { CommonProcessors.CollectProcessor<File> erlFilesCollector = new CommonProcessors.CollectProcessor<File>() { @Override protected boolean accept(@NotNull File file) { return !file.isDirectory() && isSource(file.getName()); } }; List<JpsModuleSourceRoot> sourceRoots = ContainerUtil.newArrayList(); JpsModule module = target.getModule(); ContainerUtil.addAll(sourceRoots, module.getSourceRoots(JavaSourceRootType.SOURCE)); if (isTests) { ContainerUtil.addAll(sourceRoots, module.getSourceRoots(JavaSourceRootType.TEST_SOURCE)); } for (JpsModuleSourceRoot root : sourceRoots) { FileUtil.processFilesRecursively(root.getFile(), erlFilesCollector); } return ContainerUtil.map(erlFilesCollector.getResults(), new Function<File, String>() { @NotNull @Override public String fun(@NotNull File file) { return file.getAbsolutePath(); } }); }
Source:
public DataSet<V> windows(WindowContext windowContext, OperationContext context, boolean pushScope, String scopeDetail) { pushScopeIfNeeded(context, pushScope, scopeDetail); try { Dataset<Row> dataset = toSparkRow(this,context); for(WindowAggregator aggregator : windowContext.getWindowFunctions()) { DataType resultDataType = dataset.schema().fields()[aggregator.getResultColumnId()-1].dataType(); Column col = SparkWindow.partitionBy(aggregator.getPartitions()) .function(aggregator.getType()) .inputs(aggregator.getInputColumnIds()) .orderBy(aggregator.getOrderings()) .frameBoundary(aggregator.getFrameDefinition()) .specificArgs(aggregator.getFunctionSpecificArgs()) .specificArgs(aggregator.getFunctionSpecificArgs()) .resultColumn(aggregator.getResultColumnId()) .resultDataType(resultDataType) .toColumn(); dataset = dataset.withColumn(String.valueOf(aggregator.getResultColumnId()-1),col); } return toSpliceLocatedRow(dataset, context); } catch (Exception se){ throw new RuntimeException(se); }finally { if (pushScope) context.popScope(); } }

Target:
public DataSet<V> windows(WindowContext windowContext, OperationContext context, boolean pushScope, String scopeDetail) { pushScopeIfNeeded(context, pushScope, scopeDetail); try { Dataset<Row> dataset = toSparkRow(this,context); for(WindowAggregator aggregator : windowContext.getWindowFunctions()) { DataType resultDataType = dataset.schema().fields()[aggregator.getResultColumnId()-1].dataType(); Column col = SparkWindow.partitionBy(aggregator.getPartitions()) .function(aggregator.getType()) .inputs(aggregator.getInputColumnIds()) .orderBy(aggregator.getOrderings()) .frameBoundary(aggregator.getFrameDefinition()) .specificArgs(aggregator.getFunctionSpecificArgs()) .resultColumn(aggregator.getResultColumnId()) .resultDataType(resultDataType) .toColumn(); dataset = dataset.withColumn(String.valueOf(aggregator.getResultColumnId()-1),col); } return toSpliceLocatedRow(dataset, context); } catch (Exception se){ throw new RuntimeException(se); }finally { if (pushScope) context.popScope(); } }
Source:
public int getEnd() { return 0; }

Target:
public int getEnd() { return getAlignmentEnd(); }
Source:
CryptographyAsyncClient(JsonWebKey jsonWebKey, HttpPipeline pipeline, CryptographyServiceVersion version) { Objects.requireNonNull(jsonWebKey, "The Json web key is required."); if (!jsonWebKey.isValid()) { throw new IllegalArgumentException("Json Web Key is not valid"); } if (jsonWebKey.getId() == null) { throw new IllegalArgumentException("Json Web Key's id property is not configured"); } if (jsonWebKey.getKeyOps() == null) { throw new IllegalArgumentException("Json Web Key's key operations property is not configured"); } if (jsonWebKey.getKeyType() == null) { throw new IllegalArgumentException("Json Web Key's key type property is not configured"); } this.key = jsonWebKey; this.keyId = key.getId(); service = pipeline != null ? RestProxy.create(CryptographyService.class, pipeline) : null; if (!Strings.isNullOrEmpty(key.getId()) && version != null && service != null) { unpackAndValidateId(key.getId()); cryptographyServiceClient = new CryptographyServiceClient(key.getId(), service, version); } else { cryptographyServiceClient = null; } initializeCryptoClients(); }

Target:
CryptographyAsyncClient(JsonWebKey jsonWebKey, HttpPipeline pipeline, CryptographyServiceVersion version) { Objects.requireNonNull(jsonWebKey, "The Json web key is required."); if (!jsonWebKey.isValid()) { throw new IllegalArgumentException("Json Web Key is not valid"); } if (jsonWebKey.getKeyOps() == null) { throw new IllegalArgumentException("Json Web Key's key operations property is not configured"); } if (jsonWebKey.getKeyType() == null) { throw new IllegalArgumentException("Json Web Key's key type property is not configured"); } this.key = jsonWebKey; this.keyId = key.getId(); service = pipeline != null ? RestProxy.create(CryptographyService.class, pipeline) : null; if (!Strings.isNullOrEmpty(key.getId()) && version != null && service != null) { unpackAndValidateId(key.getId()); cryptographyServiceClient = new CryptographyServiceClient(key.getId(), service, version); } else { cryptographyServiceClient = null; } initializeCryptoClients(); }
Source:
private void updateSheetTable(CTTable ctTable, String title, int index) { CTTableColumns tableColumnList = ctTable.getTableColumns(); CTTableColumn column = null; int columnCount = tableColumnList.getTableColumnList().size()-1; for( int i = columnCount; columnCount < index; i++) { column = tableColumnList.addNewTableColumn(); column.setId(i); ++columnCount; } column = tableColumnList.getTableColumnArray(index); column.setName(title); }

Target:
private void updateSheetTable(CTTable ctTable, String title, int index) { CTTableColumns tableColumnList = ctTable.getTableColumns(); CTTableColumn column = null; int columnCount = tableColumnList.getTableColumnList().size()-1; for( int i = columnCount; i < index; i++) { column = tableColumnList.addNewTableColumn(); column.setId(i); } column = tableColumnList.getTableColumnArray(index); column.setName(title); }
Source:
public DefaultKieCompilationResponseOffProcess(KieCompilationResponse res) { this.kieModuleMetaInfo = res.getKieModuleMetaInfo().get(); this.kieModule = res.getKieModule().get(); this.successful = res.isSuccessful(); this.requestUUID = ((DefaultKieCompilationResponse) res).getRequestUUID(); if(res.getProjectClassLoaderStore() != null) { this.projectClassLoaderStore = res.getProjectClassLoaderStore(); }else{ this.projectClassLoaderStore = Collections.emptyMap(); } if(res.getEventTypeClasses() != null) { this.eventsTypeClasses = res.getEventTypeClasses(); }else{ this.eventsTypeClasses = Collections.emptySet(); } if(res.getMavenOutput() != null) { this.mavenOutput = res.getMavenOutput(); }else{ this.mavenOutput = Collections.emptyList(); } if(res.getWorkingDir().isPresent()) { this.workingDir = res.getWorkingDir().get().toString(); }else { this.workingDir = ""; } if(res.getDependencies()!= null) { this.projectDependencies = res.getDependencies(); }else { this.projectDependencies = Collections.emptyList(); } if(res.getTargetContent()!= null) { this.targetContent = res.getTargetContent(); }else{ this.targetContent = Collections.emptyList(); } }

Target:
public DefaultKieCompilationResponseOffProcess(KieCompilationResponse res) { this.kieModuleMetaInfo = res.getKieModuleMetaInfo().orElse(null); this.kieModule = res.getKieModule().orElse(null); this.successful = res.isSuccessful(); this.requestUUID = ((DefaultKieCompilationResponse) res).getRequestUUID(); this.projectClassLoaderStore = Optional.ofNullable(res.getProjectClassLoaderStore()).orElse(Collections.emptyMap()); this.eventsTypeClasses = Optional.ofNullable(res.getEventTypeClasses()).orElse(Collections.emptySet()); this.mavenOutput = Optional.ofNullable(res.getMavenOutput()).orElse(Collections.emptyList()); this.projectDependencies = Optional.ofNullable(res.getDependencies()).orElse(Collections.emptyList()); this.targetContent = Optional.ofNullable(res.getTargetContent()).orElse(Collections.emptyList()); this.workingDir = res.getWorkingDir().map(Object::toString).orElse(""); }
Source:
public Mono<Void> send(Iterable<ServiceBusMessage> messages) { Objects.requireNonNull(messages, "'messages' cannot be null."); return createBatch().flatMap(messageBatch -> { messages.forEach(serviceBusMessage -> messageBatch.tryAdd(serviceBusMessage)); return send(messageBatch); }).then(); }

Target:
public Mono<Void> send(Iterable<ServiceBusMessage> messages) { if (Objects.isNull(messages)) { return monoError(logger, new NullPointerException("'messages' cannot be null.")); } return createBatch().flatMap(messageBatch -> { messages.forEach(message -> messageBatch.tryAdd(message)); return send(messageBatch); }); }
Source:
@Override public Long call() { Channel c = Channel.current(); if (c == null) { return (long) -1; } return resource ? c.resourceLoadingTime.get() : c.classLoadingTime.get(); }

Target:
@Override public Long call() { Channel c = Channel.current(); if (c == null) { return -1L; } return resource ? c.resourceLoadingTime.get() : c.classLoadingTime.get(); }
Source:
private void createAndTestJob(Connection conn) throws SQLException, IOException, InterruptedException, ClassNotFoundException { String stockTableName = generateUniqueName(); String stockStatsTableName = generateUniqueName(); conn.createStatement().execute(String.format(CREATE_STOCK_TABLE, stockTableName)); conn.createStatement().execute(String.format(CREATE_STOCK_STATS_TABLE, stockStatsTableName)); conn.commit(); final Configuration conf = ((PhoenixConnection) conn).getQueryServices().getConfiguration(); Job job = Job.getInstance(conf); PhoenixMapReduceUtil.setInput(job, MapReduceIT.StockWritable.class, PhoenixTestingInputFormat.class, stockTableName, null, STOCK_NAME, RECORDING_YEAR, "0." + RECORDINGS_QUARTER); testJob(conn, job, stockTableName, stockStatsTableName); }

Target:
private Job createAndTestJob(Connection conn) throws SQLException, IOException, InterruptedException, ClassNotFoundException { String stockTableName = generateUniqueName(); String stockStatsTableName = generateUniqueName(); conn.createStatement().execute(String.format(CREATE_STOCK_TABLE, stockTableName)); conn.createStatement().execute(String.format(CREATE_STOCK_STATS_TABLE, stockStatsTableName)); conn.commit(); final Configuration conf = ((PhoenixConnection) conn).getQueryServices().getConfiguration(); Job job = Job.getInstance(conf); PhoenixMapReduceUtil.setInput(job, MapReduceIT.StockWritable.class, PhoenixTestingInputFormat.class, stockTableName, null, STOCK_NAME, RECORDING_YEAR, "0." + RECORDINGS_QUARTER); testJob(conn, job, stockTableName, stockStatsTableName); return job; }
Source:
public HeaderView(ApplicationConstants constants, ApplicationDynamicMessages dynamicMessages) { this.configureLink = new Anchor(constants.configureLinkLabel()); this.logoutLink = new Anchor(constants.logoutLinkLabel()); this.aboutLink = new Anchor(constants.aboutLinkLabel()); this.guideLink = new Anchor(constants.guideLinkLabel()); initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); ViewIdHandler.idHandler.generateAndSetIds(this); mainTabBarPanel.getElement().getStyle().setZIndex(1); setMainTabBarOffset(mainTabBarInitialOffset); localize(dynamicMessages); feedbackImage.setVisible(false); feedbackImage.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (feedbackLink != null && feedbackLink.length() > 0) { Window.open(feedbackLink, "_blank", null); } } }); }

Target:
public HeaderView(ApplicationConstants constants, ApplicationDynamicMessages dynamicMessages) { this.configureLink = new Anchor(constants.configureLinkLabel()); this.logoutLink = new Anchor(constants.logoutLinkLabel()); this.aboutLink = new Anchor(constants.aboutLinkLabel()); this.guideLink = new Anchor(constants.guideLinkLabel()); initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); ViewIdHandler.idHandler.generateAndSetIds(this); mainTabBarPanel.getElement().getStyle().setZIndex(1); setMainTabBarOffset(mainTabBarInitialOffset); localize(dynamicMessages); feedbackImage.setVisible(false); }
Source:
private void setGroovyScriptName(final Expression scriptExpression, final BusinessObjectData data, final ContractInput contractInput, final boolean isOnPool) { if (isOnPool) { scriptExpression.setName("init" + data.getName().substring(0, 1).toUpperCase() + data.getName().substring(1) + "()"); } else { scriptExpression.setName(Joiner.on(".").join(toAncestorNameList().apply(contractInput))); } }

Target:
private void setGroovyScriptName(final Expression scriptExpression, final BusinessObjectData data, final ContractInput contractInput, final boolean isOnPool) { if (isOnPool) { final String dataName = data.getName(); final String nameToUpperCase = dataName.length() > 1 ? dataName.substring(0, 1).toUpperCase() + dataName.substring(1) : dataName.toUpperCase(); scriptExpression.setName("init" + nameToUpperCase + "()"); } else { scriptExpression.setName(Joiner.on(".").join(toAncestorNameList().apply(contractInput))); } }
Source:
public void run() { TmfTraceManager.getInstance().updateTraceContext(fTrace, builder -> builder.setData(CriticalPathModule.PARAM_WORKER, new OsWorker(fHostThread, String.valueOf(fThreadName), 0))); try { PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(CRITICALPATHVIEW_ID); } catch (PartInitException e) { Activator.getDefault().logError("Failed to open Critical Path View", e); } fView.broadcast(new TmfGraphPathSignal(fView, fHostThread.getHost())); super.run(); }

Target:
public void run() { TmfTraceManager.getInstance().updateTraceContext(fTrace, builder -> builder.setData(CriticalPathModule.PARAM_WORKER, new OsWorker(fHostThread, String.valueOf(fThreadName), 0))); try { PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(CRITICALPATHVIEW_ID); } catch (PartInitException e) { Activator.getDefault().logError("Failed to open Critical Path View", e); } fView.broadcast(new TmfCriticalPathSignal(fView, fHostThread.getHost())); super.run(); }
Source:
private void markExpiredCommandsAsFailure() { Calendar cal = Calendar.getInstance(); cal.add(Calendar.MINUTE, (-1) * Config.<Integer>getValue(ConfigValues.CoCoCommandLifeInMinutes)); long maxTime = cal.getTime().getTime(); for (Entry<Guid, CommandContainer> entry : cmdCallbackMap.entrySet()) { List<Guid> childCmdIds = coco.getChildCommandIds(entry.getKey()); if (childCmdIds.isEmpty()) { markExpiredCommandAsFailure(entry.getKey(), maxTime); } else { for (Guid childId : childCmdIds) { markExpiredCommandAsFailure(childId, maxTime); } } } }

Target:
private void markExpiredCommandsAsFailure() { for (Entry<Guid, CommandContainer> entry : cmdCallbackMap.entrySet()) { List<Guid> childCmdIds = coco.getChildCommandIds(entry.getKey()); if (childCmdIds.isEmpty()) { markExpiredCommandAsFailure(entry.getKey()); } else { for (Guid childId : childCmdIds) { markExpiredCommandAsFailure(childId); } } } }
Source:
void checkSegmentsAndSubmitTasks() { synchronized (taskLock) { for (Map.Entry<Interval, HadoopIndexTask> entry : runningTasks.entrySet()) { if (!taskStorage.getStatus(entry.getValue().getId()).get().isRunnable()) { runningTasks.remove(entry.getKey()); runningVersion.remove(entry.getKey()); } } if (runningTasks.size() == maxTaskCount) { return; } Pair<SortedMap<Interval, String>, Map<Interval, List<DataSegment>>> toBuildInterval = checkSegments(); SortedMap<Interval, String> sortedToBuildVersion = toBuildInterval.lhs; Map<Interval, List<DataSegment>> baseSegments = toBuildInterval.rhs; missInterval = sortedToBuildVersion.keySet(); submitTasks(sortedToBuildVersion, baseSegments); } }

Target:
void checkSegmentsAndSubmitTasks() { synchronized (taskLock) { for (Map.Entry<Interval, HadoopIndexTask> entry : runningTasks.entrySet()) { Optional<TaskStatus> taskStatus = taskStorage.getStatus(entry.getValue().getId()); if (!taskStatus.isPresent() || !taskStatus.get().isRunnable()) { runningTasks.remove(entry.getKey()); runningVersion.remove(entry.getKey()); } } if (runningTasks.size() == maxTaskCount) { return; } Pair<SortedMap<Interval, String>, Map<Interval, List<DataSegment>>> toBuildIntervalAndBaseSegments = checkSegments(); SortedMap<Interval, String> sortedToBuildVersion = toBuildIntervalAndBaseSegments.lhs; Map<Interval, List<DataSegment>> baseSegments = toBuildIntervalAndBaseSegments.rhs; missInterval = sortedToBuildVersion.keySet(); submitTasks(sortedToBuildVersion, baseSegments); } }
Source:
protected void notify(URL url, NotifyListener listener, List<URL> urls) { if (url == null) { throw new IllegalArgumentException("notify url == null"); } if (listener == null) { throw new IllegalArgumentException("notify listener == null"); } if ((urls == null || urls.isEmpty()) && !Constants.ANY_VALUE.equals(url.getServiceInterface())) { logger.warn("Ignore empty notify urls for subscribe url " + url); return; } if (urls == null) { logger.warn("Ignore empty notify urls for subscribe url " + url); return; } if (logger.isInfoEnabled()) { logger.info("Notify urls for subscribe url " + url + ", urls: " + urls); } Map<String, List<URL>> result = new HashMap<>(); for (URL u : urls) { if (UrlUtils.isMatch(url, u)) { String category = u.getParameter(Constants.CATEGORY_KEY, Constants.DEFAULT_CATEGORY); List<URL> categoryList = result.computeIfAbsent(category, k -> new ArrayList<>()); categoryList.add(u); } } if (result.size() == 0) { return; } Map<String, List<URL>> categoryNotified = notified.computeIfAbsent(url, u -> new ConcurrentHashMap<>()); for (Map.Entry<String, List<URL>> entry : result.entrySet()) { String category = entry.getKey(); List<URL> categoryList = entry.getValue(); categoryNotified.put(category, categoryList); saveProperties(url); listener.notify(categoryList); } }

Target:
protected void notify(URL url, NotifyListener listener, List<URL> urls) { if (url == null) { throw new IllegalArgumentException("notify url == null"); } if (listener == null) { throw new IllegalArgumentException("notify listener == null"); } if (urls == null) { logger.warn("Ignore empty notify urls for subscribe url " + url); return; } if (urls.isEmpty() && !Constants.ANY_VALUE.equals(url.getServiceInterface())) { logger.warn("Ignore empty notify urls for subscribe url " + url); return; } if (logger.isInfoEnabled()) { logger.info("Notify urls for subscribe url " + url + ", urls: " + urls); } Map<String, List<URL>> result = new HashMap<>(); for (URL u : urls) { if (UrlUtils.isMatch(url, u)) { String category = u.getParameter(Constants.CATEGORY_KEY, Constants.DEFAULT_CATEGORY); List<URL> categoryList = result.computeIfAbsent(category, k -> new ArrayList<>()); categoryList.add(u); } } if (result.size() == 0) { return; } Map<String, List<URL>> categoryNotified = notified.computeIfAbsent(url, u -> new ConcurrentHashMap<>()); for (Map.Entry<String, List<URL>> entry : result.entrySet()) { String category = entry.getKey(); List<URL> categoryList = entry.getValue(); categoryNotified.put(category, categoryList); saveProperties(url); listener.notify(categoryList); } }
Source:
private void clearAsyncTasksWithOutVdsmId() { for (Guid asyncTaskId : getReturnValue().getTaskPlaceHolderIdList()) { AsyncTasks task = getAsyncTaskDao().get(asyncTaskId); if (NGuid.Empty.equals(task.getVdsmTaskId())) { AsyncTaskManager.failTaskWithoutVdsmId(task); } } }

Target:
private void clearAsyncTasksWithOutVdsmId() { for (Guid asyncTaskId : getReturnValue().getTaskPlaceHolderIdList()) { AsyncTasks task = getAsyncTaskDao().get(asyncTaskId); if (Guid.isNullOrEmpty(task.getVdsmTaskId())) { AsyncTaskManager.failTaskWithoutVdsmId(task); } } }
Source:
public long getItemId(int position) { Person person = getItem(position); if (person == null) { return -1; } return person.getPersonID(); }

Target:
public long getItemId(int position) { Person person = getPerson(position); if (person == null) { return -1; } return person.getPersonID(); }
Source:
public String getExpression(RexNode node, RelDataType inputRowType, RelDataType outputRowType) { final RexProgramBuilder programBuilder = new RexProgramBuilder(inputRowType, rexBuilder); programBuilder.addProject(node, null); final RexProgram program = programBuilder.getProgram(); final BlockBuilder builder = new BlockBuilder(); final JavaTypeFactoryImpl javaTypeFactory = new JavaTypeFactoryImpl(rexBuilder.getTypeFactory().getTypeSystem()); final RexToLixTranslator.InputGetter inputGetter = new RexToLixTranslator.InputGetterImpl(ImmutableList .of(Pair.<Expression, PhysType>of(Expressions.variable(Object[].class, "inputValues"), PhysTypeImpl.of(javaTypeFactory, inputRowType, JavaRowFormat.ARRAY, false)))); final Function1<String, RexToLixTranslator.InputGetter> correlates = new Function1<String, RexToLixTranslator.InputGetter>() { public RexToLixTranslator.InputGetter apply(String a0) { throw new UnsupportedOperationException(); } }; final List<Expression> list = RexToLixTranslator.translateProjects(program, javaTypeFactory, builder, PhysTypeImpl.of(javaTypeFactory, outputRowType, JavaRowFormat.ARRAY, false), null, inputGetter, correlates); for (int i = 0; i < list.size(); i++) { Statement statement = Expressions.statement(list.get(i)); builder.add(statement); } return finalizeExpression(builder.toBlock(), inputRowType); }

Target:
public String getExpression(RexNode node, RelDataType inputRowType, RelDataType outputRowType) { final RexProgramBuilder programBuilder = new RexProgramBuilder(inputRowType, rexBuilder); programBuilder.addProject(node, null); final RexProgram program = programBuilder.getProgram(); final BlockBuilder builder = new BlockBuilder(); final JavaTypeFactory javaTypeFactory = (JavaTypeFactory)rexBuilder.getTypeFactory(); final RexToLixTranslator.InputGetter inputGetter = new RexToLixTranslator.InputGetterImpl(ImmutableList .of(Pair.<Expression, PhysType>of(Expressions.variable(Object[].class, "inputValues"), PhysTypeImpl.of(javaTypeFactory, inputRowType, JavaRowFormat.ARRAY, false)))); final Function1<String, RexToLixTranslator.InputGetter> correlates = new Function1<String, RexToLixTranslator.InputGetter>() { public RexToLixTranslator.InputGetter apply(String a0) { throw new UnsupportedOperationException(); } }; final List<Expression> list = RexToLixTranslator.translateProjects(program, javaTypeFactory, builder, PhysTypeImpl.of(javaTypeFactory, outputRowType, JavaRowFormat.ARRAY, false), null, inputGetter, correlates); for (int i = 0; i < list.size(); i++) { Statement statement = Expressions.statement(list.get(i)); builder.add(statement); } return finalizeExpression(builder.toBlock(), inputRowType); }
Source:
AbstractAbstractFileNode(T abstractFile) { super(abstractFile); String ext = abstractFile.getNameExtension(); if (StringUtils.isNotBlank(ext)) { ext = "." + ext; if (FileTypeExtensions.getArchiveExtensions().contains(ext)) { IngestManager.getInstance().addIngestModuleEventListener(INGEST_MODULE_EVENTS_OF_INTEREST, weakPcl); } } try { this.content.getUniquePath(); } catch (TskCoreException ex) { logger.log(Level.SEVERE, String.format("Failed attempt to cache the " + "unique path of the abstract file instance. Name: %s (objID=%d)", this.content.getName(), this.content.getId()), ex); } if (TextTranslationService.getInstance().hasProvider() && UserPreferences.displayTranslatedFileNames()) { backgroundTasksPool.submit(new TranslationTask( new WeakReference<>(this), weakPcl)); } Case.addEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakPcl); }

Target:
AbstractAbstractFileNode(T abstractFile) { super(abstractFile); String ext = abstractFile.getNameExtension(); if (StringUtils.isNotBlank(ext)) { ext = "." + ext; if (FileTypeExtensions.getArchiveExtensions().contains(ext)) { IngestManager.getInstance().addIngestModuleEventListener(INGEST_MODULE_EVENTS_OF_INTEREST, weakPcl); } } try { this.content.getUniquePath(); } catch (TskCoreException ex) { logger.log(Level.SEVERE, String.format("Failed attempt to cache the " + "unique path of the abstract file instance. Name: %s (objID=%d)", this.content.getName(), this.content.getId()), ex); } if (UserPreferences.displayTranslatedFileNames()) { backgroundTasksPool.submit(new TranslationTask( new WeakReference<>(this), weakPcl)); } Case.addEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakPcl); }