auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static Object getValue(ValueReference ref) { NumberLiterals literals = new NumberLiterals(); Object value = null; if (ref instanceof BoolValue) { value = ((BoolValue)ref).getValue().isIsTrue(); } else if (ref instanceof NumberValue) { XNumberLiteral xLiteral = ((NumberValue)ref).getValue(); value = literals.numberValue(xLiteral, literals.getJavaType(xLiteral)); } else if (ref instanceof StringValue) { value = ((StringValue)ref).getValue(); } else if (ref instanceof VariableReference) { value = new ParameterReference(((VariableReference) ref).getVar()); } else if (ref instanceof VariableValue) { value = new ParameterReference(((VariableValue)ref).getValue().getVar()); } else if (ref instanceof ListValue) { value = Lists.transform(((ListValue) ref).getValues(), new Function<ValueReference, Object>() { @Override public Object apply(ValueReference ref) { return getValue(ref); } }); } else { throw new UnsupportedOperationException("Unknown attribute parameter type"); } return value; }

Target:
private static Object getValue(ValueReference ref) { Object value = null; if (ref instanceof BoolValue) { value = ((BoolValue)ref).getValue().isIsTrue(); } else if (ref instanceof NumberValue) { NumberLiterals literals = new NumberLiterals(); XNumberLiteral xLiteral = ((NumberValue)ref).getValue(); value = literals.numberValue(xLiteral, literals.getJavaType(xLiteral)); } else if (ref instanceof StringValue) { value = ((StringValue)ref).getValue(); } else if (ref instanceof VariableReference) { value = new ParameterReference(((VariableReference) ref).getVar()); } else if (ref instanceof VariableValue) { value = new ParameterReference(((VariableValue)ref).getValue().getVar()); } else if (ref instanceof ListValue) { value = Lists.transform(((ListValue) ref).getValues(), new Function<ValueReference, Object>() { @Override public Object apply(ValueReference ref) { return getValue(ref); } }); } else { throw new UnsupportedOperationException("Unknown attribute parameter type"); } return value; }
Source:
private void updateVerbs(RepositoryDTO repositoryDTO) { this.verbsManager.fetchAvailableVerbs(repositoryDTO, verbs -> Platform.runLater(() -> this.verbs = verbs)); }

Target:
private void updateVerbs(RepositoryDTO repositoryDTO) { this.verbsManager.fetchAvailableVerbs(repositoryDTO, verbs -> this.verbs = verbs); }
Source:
private List<Integer> parsePorts(URI connectionURI) { String uriString = connectionURI.toString(); String withoutProtocol = uriString.substring(13); String[] stripes = withoutProtocol.split(STRIPE_SEPARATOR); List<Integer> ports = new ArrayList<>(stripes.length); for (String stripe : stripes) { String portString = stripe.substring(stripe.indexOf(":") + 1); int port = Integer.parseInt(portString); ports.add(port); } return ports; }

Target:
private List<Integer> parsePorts(URI connectionURI) { String uriString = connectionURI.toString(); String withoutProtocol = uriString.substring(13); String[] stripes = withoutProtocol.split(STRIPE_SEPARATOR); return Arrays.stream(stripes) .map(stripe -> stripe.substring(stripe.indexOf(":") + 1)) .mapToInt(Integer::parseInt) .boxed() .collect(Collectors.toList()); }
Source:
public void shouldErrorIfTriesToSaveTheSameTokenTwice() throws Exception { app.getDatabaseHelper().insertAccount(BEARER_TOKEN, ACCOUNT_ID); authTokenDao.createToken(BEARER_TOKEN, ACCOUNT_ID); }

Target:
public void shouldErrorIfTriesToSaveTheSameTokenTwice() throws Exception { app.getDatabaseHelper().insertAccount(BEARER_TOKEN, ACCOUNT_ID); authTokenDao.storeToken(BEARER_TOKEN, ACCOUNT_ID); }
Source:
public int isApplicable(VElement vElement, ViewModelContext viewModelContext) { if (!VControl.class.isInstance(vElement)) { return NOT_APPLICABLE; } final VControl control = (VControl) vElement; IValueProperty valueProperty; try { valueProperty = Activator.getDefault().getEMFFormsDatabinding() .getValueProperty(control.getDomainModelReference(), viewModelContext.getDomainModel()); } catch (final DatabindingFailedException ex) { Activator.getDefault().getReportService().report(new DatabindingFailedReport(ex)); return NOT_APPLICABLE; } catch (final IllegalArgumentException ex) { Activator.getDefault().getReportService().report(new AbstractReport(ex)); return NOT_APPLICABLE; } final EStructuralFeature feature = (EStructuralFeature) valueProperty.getValueType(); if (feature.isMany()) { return NOT_APPLICABLE; } if (!EAttribute.class.isInstance(feature)) { return NOT_APPLICABLE; } final EAttribute eAttribute = EAttribute.class.cast(feature); if (eAttribute.getEContainingClass().equals(VStackPackage.eINSTANCE.getStackItem())) { return 3; } return NOT_APPLICABLE; }

Target:
public int isApplicable(VElement vElement, ViewModelContext viewModelContext) { if (!VControl.class.isInstance(vElement)) { return NOT_APPLICABLE; } final VControl control = (VControl) vElement; if (control.getDomainModelReference() == null) { return NOT_APPLICABLE; } IValueProperty valueProperty; try { valueProperty = Activator.getDefault().getEMFFormsDatabinding() .getValueProperty(control.getDomainModelReference(), viewModelContext.getDomainModel()); } catch (final DatabindingFailedException ex) { Activator.getDefault().getReportService().report(new DatabindingFailedReport(ex)); return NOT_APPLICABLE; } catch (final IllegalArgumentException ex) { Activator.getDefault().getReportService().report(new AbstractReport(ex)); return NOT_APPLICABLE; } final EStructuralFeature feature = (EStructuralFeature) valueProperty.getValueType(); if (feature.isMany()) { return NOT_APPLICABLE; } if (!EAttribute.class.isInstance(feature)) { return NOT_APPLICABLE; } final EAttribute eAttribute = EAttribute.class.cast(feature); if (eAttribute.getEContainingClass().equals(VStackPackage.eINSTANCE.getStackItem())) { return 3; } return NOT_APPLICABLE; }
Source:
public void secondBackupFileCorrectModifiedDate() throws IOException { long expectedLastModifiedDate; final int kNumberOfBackups = 2; Process process = new Process(); process.setId(2); process.setProcessBaseUri(URI.create("2")); expectedLastModifiedDate = getLastModifiedFileDate( processService.getProcessDataDirectory(process) + BACKUP_FILE_NAME); runBackup(kNumberOfBackups, process); fileService.createResource(processService.getProcessDataDirectory(process), BACKUP_FILE_NAME); runBackup(kNumberOfBackups, process); assertLastModifiedDate(processService.getProcessDataDirectory(process) + BACKUP_FILE_NAME + ".2", expectedLastModifiedDate); }

Target:
public void secondBackupFileCorrectModifiedDate() throws IOException { long expectedLastModifiedDate; final int numberOfBackups = 2; Process process = new Process(); process.setId(2); process.setProcessBaseUri(URI.create("2")); expectedLastModifiedDate = getLastModifiedFileDate( processService.getProcessDataDirectory(process) + BACKUP_FILE_NAME); runBackup(numberOfBackups, process); fileService.createResource(processService.getProcessDataDirectory(process), BACKUP_FILE_NAME); runBackup(numberOfBackups, process); assertLastModifiedDate(processService.getProcessDataDirectory(process) + BACKUP_FILE_NAME + ".2", expectedLastModifiedDate); }
Source:
public void printTrader() { System.out.println("Trader Name: " + name); System.out.println("====================="); System.out.println("Cash: " + cashInHand); System.out.println("Stocks Owned: "); for (Order o : position) { o.printStockNameInOrder(); } System.out.println("Stocks Desired: "); for (Order o : ordersPlaced) { o.printOrder(); } System.out.println("+++++++++++++++++++++"); System.out.println("+++++++++++++++++++++"); }

Target:
public void printTrader() { System.out.println("Trader Name: " + name); System.out.println("====================="); System.out.println("Cash: " + cashInHand); System.out.println("Stocks Owned: "); for (Order order : position) { o.printStockNameInOrder(); } System.out.println("Stocks Desired: "); for (Order order : ordersPlaced) { o.printOrder(); } System.out.println("+++++++++++++++++++++"); System.out.println("+++++++++++++++++++++"); }
Source:
public Results calculateResults(LocalDate valuationDate, TradeSource tradeSource, List<Measure> measures) { ExampleMarketDataBuilder marketDataBuilder = ExampleMarketData.builder(); CalculationRules rules = CalculationRules.builder() .pricingRules(StandardComponents.pricingRules()) .marketDataRules(marketDataBuilder.rules()) .reportingRules(ReportingRules.fixedCurrency(Currency.USD)) .build(); MarketEnvironment marketSnapshot = marketDataBuilder.buildSnapshot(valuationDate); List<Column> columns = measures.stream().map(Column::of).collect(Collectors.toList()); ImmutableList<Trade> trades = ImmutableList.of(tradeSource.apply()); try (CalculationRunner runner = CalculationRunner.of(MoreExecutors.newDirectExecutorService())) { return runner.calculateSingleScenario(trades, columns, rules, marketSnapshot); } }

Target:
public Results calculateResults(LocalDate valuationDate, TradeSource tradeSource, List<Measure> measures) { ExampleMarketDataBuilder marketDataBuilder = ExampleMarketData.builder(); CalculationRules rules = CalculationRules.builder() .pricingRules(StandardComponents.pricingRules()) .marketDataRules(marketDataBuilder.rules()) .reportingRules(ReportingRules.fixedCurrency(Currency.USD)) .build(); MarketEnvironment marketSnapshot = marketDataBuilder.buildSnapshot(valuationDate); List<Column> columns = measures.stream().map(Column::of).collect(Collectors.toList()); ImmutableList<Trade> trades = ImmutableList.of(tradeSource.apply()); CalculationRunner runner = CalculationRunner.of(MoreExecutors.newDirectExecutorService()); return runner.calculateSingleScenario(trades, columns, rules, marketSnapshot); }
Source:
public void loadRunningCluster(MesosCluster cluster) { String clusterId = cluster.getClusterId(); List<ClusterProcess> containers = cluster.getMemberProcesses(); List<Container> dockerContainers = DockerClientFactory.build().listContainersCmd().exec(); Collections.sort(dockerContainers, (c1, c2) -> Long.compare(c1.getCreated(), c2.getCreated())); for (Container container : dockerContainers) { String name = ContainerName.getFromDockerNames(container.getNames()); if (ContainerName.belongsToCluster(name, clusterId)) { String containerId = container.getId(); String[] parts = name.split("-"); String role = parts[1]; String uuid = parts[3]; switch (role) { case "zookeeper": containers.add(createZooKeeper(cluster, uuid, containerId)); break; case "agent": containers.add(createMesosAgent(cluster, uuid, containerId)); break; case "master": MesosMaster master = createMesosMaster(cluster, uuid, containerId); containers.add(master); Container.Port[] ports = container.getPorts(); if (ports != null) { for (Container.Port port : ports) { if (port.getIp() != null && port.getPrivatePort() == MesosMasterConfig.MESOS_MASTER_PORT) { cluster.setExposedHostPorts(true); } } } break; case "marathon": containers.add(createMarathon(cluster, uuid, containerId)); break; case "consul": containers.add(createConsul(cluster, uuid, containerId)); break; case "registrator": containers.add(createRegistrator(cluster, uuid, containerId)); break; } } } }

Target:
public void loadRunningCluster(MesosCluster cluster) { String clusterId = cluster.getClusterId(); List<ClusterProcess> containers = cluster.getMemberProcesses(); List<Container> dockerContainers = DockerClientFactory.build().listContainersCmd().exec(); Collections.sort(dockerContainers, (c1, c2) -> Long.compare(c1.getCreated(), c2.getCreated())); for (Container container : dockerContainers) { String name = ContainerName.getFromDockerNames(container.getNames()); if (ContainerName.belongsToCluster(name, clusterId)) { String containerId = container.getId(); String[] parts = name.split("-"); if (parts.length > 3) { String role = parts[1]; String uuid = parts[3]; switch (role) { case "zookeeper": containers.add(createZooKeeper(cluster, uuid, containerId)); break; case "agent": containers.add(createMesosAgent(cluster, uuid, containerId)); break; case "master": MesosMaster master = createMesosMaster(cluster, uuid, containerId); containers.add(master); Container.Port[] ports = container.getPorts(); if (ports != null) { for (Container.Port port : ports) { if (port.getIp() != null && port.getPrivatePort() == MesosMasterConfig.MESOS_MASTER_PORT) { cluster.setExposedHostPorts(true); } } } break; case "marathon": containers.add(createMarathon(cluster, uuid, containerId)); break; case "consul": containers.add(createConsul(cluster, uuid, containerId)); break; case "registrator": containers.add(createRegistrator(cluster, uuid, containerId)); break; } } } } }
Source:
public void notifyBegin(List<Response.ResponseListener> listeners, Response response) { for (int i = 0; i < listeners.size(); i++) { Response.ResponseListener listener = listeners.get(i); if (listener instanceof Response.BeginListener) notifyBegin((Response.BeginListener)listener, response); } }

Target:
public void notifyBegin(List<Response.ResponseListener> listeners, Response response) { for (Response.ResponseListener listener : listeners) { if (listener instanceof Response.BeginListener) notifyBegin((Response.BeginListener)listener, response); } }
Source:
public NettyConfig(VerifiableProperties verifiableProperties) { nettyServerBossThreadCount = verifiableProperties.getInt("netty.server.boss.thread.count", 1); nettyServerIdleTimeSeconds = verifiableProperties.getInt("netty.server.idle.time.seconds", 60); nettyServerPort = verifiableProperties.getInt("netty.server.port", 1174); nettyServerSoBacklog = verifiableProperties.getInt("netty.server.so.backlog", 100); nettyServerWorkerThreadCount = verifiableProperties.getInt("netty.server.worker.thread.count", 1); nettyServerMaxInitialLineLength = verifiableProperties.getInt("netty.server.max.initial.line.length", 4096); nettyServerMaxHeaderSize = verifiableProperties.getInt("netty.server.max.header.size", 8192); nettyServerMaxChunkSize = verifiableProperties.getInt("netty.server.max.chunk.size", 8192); nettyServerRequestBufferWatermark = verifiableProperties.getInt("netty.server.request.buffer.watermark", 33554432); }

Target:
public NettyConfig(VerifiableProperties verifiableProperties) { nettyServerBossThreadCount = verifiableProperties.getInt("netty.server.boss.thread.count", 1); nettyServerIdleTimeSeconds = verifiableProperties.getInt("netty.server.idle.time.seconds", 60); nettyServerPort = verifiableProperties.getInt("netty.server.port", 1174); nettyServerSoBacklog = verifiableProperties.getInt("netty.server.so.backlog", 100); nettyServerWorkerThreadCount = verifiableProperties.getInt("netty.server.worker.thread.count", 1); nettyServerMaxInitialLineLength = verifiableProperties.getInt("netty.server.max.initial.line.length", 4096); nettyServerMaxHeaderSize = verifiableProperties.getInt("netty.server.max.header.size", 8192); nettyServerMaxChunkSize = verifiableProperties.getInt("netty.server.max.chunk.size", 8192); nettyServerRequestBufferWatermark = verifiableProperties.getInt("netty.server.request.buffer.watermark", 32 * 1024 * 1024); }
Source:
public void testIsDrawable_UserTask() throws Exception { testIsDrawable(AdHocSubprocess.class, UserTask.class, true); }

Target:
public void testIsDrawable_UserTask() { testIsDrawable(AdHocSubprocess.class, UserTask.class, true); }
Source:
public void testTranslateServiceCreationConfiguration() { ManagementRegistryServiceConfigurationParser configTranslator = new ManagementRegistryServiceConfigurationParser(); DefaultManagementRegistryConfiguration defaultManagementRegistryConfiguration = new DefaultManagementRegistryConfiguration().setCacheManagerAlias("my-cache-alias"). setCollectorExecutorAlias("my-executor").addTag("tag1").addTag("tag2"); Node retElement = configTranslator.unparseServiceCreationConfiguration(defaultManagementRegistryConfiguration); assertThat(retElement, is(notNullValue())); assertThat(retElement.getNodeName(), is("mgm:management")); assertThat(retElement.getAttributes(), is(notNullValue())); assertThat(retElement.getAttributes().getLength(), is(3)); assertThat(retElement.getAttributes().item(0).getNodeName(), is("cache-manager-alias")); assertThat(retElement.getAttributes().item(0).getNodeValue(), is("my-cache-alias")); assertThat(retElement.getAttributes().item(1).getNodeName(), is("collector-executor-alias")); assertThat(retElement.getAttributes().item(1).getNodeValue(), is("my-executor")); assertThat(retElement.getAttributes().item(2).getNodeName(), is("xmlns:mgm")); assertThat(retElement.getAttributes().item(2).getNodeValue(), is("<LINK_0>")); Node tagsElement = retElement.getFirstChild(); assertThat(tagsElement, is(notNullValue())); assertThat(tagsElement.getNodeName(), is("mgm:tags")); assertThat(tagsElement.getAttributes().getLength(), is(0)); Node tag1 = tagsElement.getFirstChild(); assertThat(tag1, is(notNullValue())); assertThat(tag1.getFirstChild(), is(notNullValue())); assertThat(tag1.getFirstChild().getNodeValue(), is("tag1")); Node tag2 = tagsElement.getLastChild(); assertThat(tag2, is(notNullValue())); assertThat(tag2.getFirstChild(), is(notNullValue())); assertThat(tag2.getFirstChild().getNodeValue(), is("tag2")); }

Target:
public void testTranslateServiceCreationConfiguration() { ManagementRegistryServiceConfigurationParser configTranslator = new ManagementRegistryServiceConfigurationParser(); DefaultManagementRegistryConfiguration defaultManagementRegistryConfiguration = new DefaultManagementRegistryConfiguration().setCacheManagerAlias("my-cache-alias"). setCollectorExecutorAlias("my-executor").addTag("tag1").addTag("tag2"); Node retElement = configTranslator.unparseServiceCreationConfiguration(defaultManagementRegistryConfiguration); assertThat(retElement, is(notNullValue())); assertThat(retElement.getNodeName(), is("mgm:management")); checkAttributeItems(retElement); checkTags(retElement); }
Source:
private Constraint distanceFromLastVisitToDomicile(ConstraintFactory constraintFactory) { return constraintFactory.from(Visit.class) .ifNotExists(Visit.class, Joiners.equal(visit -> visit, Visit::getPreviousStandstill)) .join(Domicile.class) .penalizeLong("Distance from last visit to domicile", SimpleLongScore.of(1), Visit::getDistanceTo); }

Target:
private Constraint distanceFromLastVisitToDomicile(ConstraintFactory constraintFactory) { return constraintFactory.from(Visit.class) .ifNotExists(Visit.class, Joiners.equal(visit -> visit, Visit::getPreviousStandstill)) .join(Domicile.class) .penalizeLong("Distance from last visit to domicile", SimpleLongScore.ONE, Visit::getDistanceTo); }
Source:
private void translateSupremeCourt(SolrDocument document, JudgmentSearchResult result) { String personnelType = fieldFetcher.fetchValue(document, JudgmentIndexField.SC_PERSONNEL_TYPE); result.setPersonnelType(personnelType); List<Pair<String, List<String>>> chambers = fieldFetcher.fetchValuesWithAttributes(document, JudgmentIndexField.SC_CHAMBER); List<SupremeCourtChamberResult> chambersResult = Lists.newLinkedList(); for (Pair<String, List<String>> singleChamber : chambers) { try { int scChamberId = Integer.parseInt(singleChamber.getLeft()); if (singleChamber.getRight().size() > 0) { SupremeCourtChamberResult scChamberResult = new SupremeCourtChamberResult(scChamberId, singleChamber.getRight().get(0)); chambersResult.add(scChamberResult); } } catch (NumberFormatException e) { } } result.setCourtChambers(chambersResult); Integer divisionId = fieldFetcher.fetchIntValue(document, JudgmentIndexField.SC_DIVISION_ID); String divisionName = fieldFetcher.fetchValue(document, JudgmentIndexField.SC_DIVISION_NAME); result.setCourtChamberDivisionId(divisionId); result.setCourtChamberDivisionName(divisionName); }

Target:
private void translateSupremeCourt(SolrDocument document, JudgmentSearchResult result) { String personnelType = fieldFetcher.fetchValue(document, JudgmentIndexField.SC_PERSONNEL_TYPE); result.setPersonnelType(personnelType); List<Pair<String, List<String>>> chambers = fieldFetcher.fetchValuesWithAttributes(document, JudgmentIndexField.SC_CHAMBER); List<SupremeCourtChamberResult> chambersResult = Lists.newLinkedList(); chambers .stream() .filter(x -> x.getRight().size() > 0) .forEach(x -> chambersResult.add(new SupremeCourtChamberResult(Integer.parseInt(x.getLeft()), x.getRight().get(0)))); result.setCourtChambers(chambersResult); Integer divisionId = fieldFetcher.fetchIntValue(document, JudgmentIndexField.SC_DIVISION_ID); String divisionName = fieldFetcher.fetchValue(document, JudgmentIndexField.SC_DIVISION_NAME); result.setCourtChamberDivisionId(divisionId); result.setCourtChamberDivisionName(divisionName); }
Source:
protected boolean validateInputs() { if (!super.validateInputs()) { return false; } VdcQueryReturnValue returnValue = getQueryReturnValue(); returnValue.setExceptionString(""); try { String hostName = getParameters().getVdsHostName(); if (StringUtils.isBlank(hostName)) { returnValue.setExceptionString("Cannot register Host - no Hostname address specified."); return false; } List<VDS> vdssByUniqueId = getVdssByUniqueId(); if (vdssByUniqueId.size() > 1) { returnValue.setExceptionString("Cannot register Host - unique id is ambigious."); return false; } if (vdssByUniqueId.size() == 1) { VDS vds = vdssByUniqueId.get(0); if (!VdsHandler.isPendingOvirt(vds)) { returnValue.setExceptionString(VdcBllMessages.VDS_STATUS_NOT_VALID_FOR_UPDATE.name()); return false; } Long otp = getParameters().getOtp(); if (otp != null && !isValidOtp(vds, otp)) { returnValue.setExceptionString(String.format("Invalid OTP for host %s", hostName)); return false; } } } catch (RuntimeException ex) { log.error(ex); returnValue.setExceptionString(String.format("Cannot register Host - An exception has been thrown: %1$s", ex.getMessage())); return false; } return true; }

Target:
protected boolean validateInputs() { if (!super.validateInputs()) { return false; } VdcQueryReturnValue returnValue = getQueryReturnValue(); returnValue.setExceptionString(""); try { String hostName = getParameters().getVdsHostName(); if (StringUtils.isEmpty(hostName)) { returnValue.setExceptionString("Cannot register Host - no Hostname address specified."); return false; } List<VDS> vdssByUniqueId = getVdssByUniqueId(); if (vdssByUniqueId.size() > 1) { returnValue.setExceptionString("Cannot register Host - unique id is ambigious."); return false; } if (vdssByUniqueId.size() == 1) { VDS vds = vdssByUniqueId.get(0); if (!VdsHandler.isPendingOvirt(vds)) { returnValue.setExceptionString(VdcBllMessages.VDS_STATUS_NOT_VALID_FOR_UPDATE.name()); return false; } Long otp = getParameters().getOtp(); if (otp != null && !isValidOtp(vds, otp)) { returnValue.setExceptionString(String.format("Invalid OTP for host %s", hostName)); return false; } } } catch (RuntimeException ex) { log.error(ex); returnValue.setExceptionString(String.format("Cannot register Host - An exception has been thrown: %1$s", ex.getMessage())); return false; } return true; }
Source:
private long extractLongKey(Data entryKey, Object entryValue) { Object key = QueryableEntry.extractAttributeValue(extractors, serializationService, keyAttribute, entryKey, entryValue, null); if (key == null) { throw new NullPointerException("non-null unique key value is required"); } if (!Numbers.isLongRepresentable(key.getClass())) { throw new NullPointerException("integer-valued unique key value is required"); } return ((Number) key).longValue(); }

Target:
private long extractLongKey(Data entryKey, Object entryValue) { Object key = extractAttributeValue(extractors, serializationService, keyAttribute, entryKey, entryValue, null); return extractLongKey(key); }
Source:
public ActionForward prorateBill(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ContractsGrantsInvoiceDocumentForm contractsGrantsInvoiceDocumentForm = (ContractsGrantsInvoiceDocumentForm) form; KualiDecimal budgetTotalAmount = findAwardBUdgetTotal(contractsGrantsInvoiceDocumentForm); if (budgetTotalAmount == null || budgetTotalAmount.isLessEqual(KualiDecimal.ZERO)) { String budetTotalAmountString = budgetTotalAmount != null ? budgetTotalAmount.toString() : "0"; ErrorMessage errorMessage = new ErrorMessage(CUKFSKeyConstants.ERROR_DOCUMENT_CONTRACT_GRANT_INVOICE_DOCUMENT_PRORATE_NO_AWARD_BUDGET_TOTAL, budetTotalAmountString); KNSGlobalVariables.getMessageList().add(errorMessage); LOG.error("prorateBill, Prorate is not valid as the budgetTotalAmount is " + budgetTotalAmount); return mapping.findForward(KFSConstants.MAPPING_BASIC); } return super.prorateBill(mapping, form, request, response); }

Target:
public ActionForward prorateBill(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ContractsGrantsInvoiceDocumentForm contractsGrantsInvoiceDocumentForm = (ContractsGrantsInvoiceDocumentForm) form; KualiDecimal budgetTotalAmount = findAwardBudgetTotal(contractsGrantsInvoiceDocumentForm); if (budgetTotalAmount == null || budgetTotalAmount.isLessEqual(KualiDecimal.ZERO)) { String budgetTotalAmountString = budgetTotalAmount != null ? budgetTotalAmount.toString() : "0"; GlobalVariables.getMessageMap().putError(KFSConstants.GLOBAL_ERRORS, CUKFSKeyConstants.ERROR_DOCUMENT_CONTRACT_GRANT_INVOICE_PRORATE_NO_AWARD_BUDGET_TOTAL, budgetTotalAmountString); LOG.error("prorateBill, Prorate is not valid as the budgetTotalAmount is " + budgetTotalAmount); return mapping.findForward(KFSConstants.MAPPING_BASIC); } return super.prorateBill(mapping, form, request, response); }
Source:
public HttpServiceResponse handle(HttpServiceRequest request) throws Exception { HttpServiceResponse response = new HttpServiceResponse(); if (HttpServer.Method.GET != request.getMethod()) { response.setCode(HttpServer.StatusCode.NOT_FOUND); response.setBody("Only support GET method check if bookie is ready."); return response; } StateManager sm = bookie.getStateManager(); if (sm.isRunning()) { response.setCode(HttpServer.StatusCode.OK); } else { response.setCode(HttpServer.StatusCode.SERVICE_UNAVAILABLE); response.setBody("Bookie is not fully started yet"); } return response; }

Target:
public HttpServiceResponse handle(HttpServiceRequest request) throws Exception { HttpServiceResponse response = new HttpServiceResponse(); if (HttpServer.Method.GET != request.getMethod()) { response.setCode(HttpServer.StatusCode.NOT_FOUND); response.setBody("Only support GET method check if bookie is ready."); return response; } StateManager sm = bookie.getStateManager(); if (sm.isRunning() && !sm.isShuttingDown()) { response.setCode(HttpServer.StatusCode.OK); response.setBody(""); } else { response.setCode(HttpServer.StatusCode.SERVICE_UNAVAILABLE); response.setBody("Bookie is not fully started yet"); } return response; }
Source:
private ArrayList<String> loadFile(String file, Charset charset) { ArrayList<String> list = new ArrayList<String>(); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), charset)); String line = reader.readLine(); while (line != null) { list.add(line); line = reader.readLine(); } } catch (IOException e) { controller.actionShowInfoDialog(getShell(), Resources.getMessage("DialogOrderSelection.3"), Resources.getMessage("DialogOrderSelection.4")+e.getMessage()); return null; } finally { if (reader != null) try { reader.close(); } catch (IOException e) { controller.actionShowInfoDialog(getShell(), Resources.getMessage("DialogOrderSelection.5"), Resources.getMessage("DialogOrderSelection.6")+e.getMessage()); return null; } } return list; }

Target:
private List<String> loadFile(String file, Charset charset) { List<String> list = new ArrayList<String>(); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), charset)); String line = reader.readLine(); Set<String> _elements = new HashSet<String>(); _elements.addAll(Arrays.asList(elements)); while (line != null) { list.add(line); if (list.size() > _elements.size() || !_elements.contains(line)) { controller.actionShowInfoDialog(getShell(), Resources.getMessage("DialogOrderSelection.16"), Resources.getMessage("DialogOrderSelection.17")); return null; } line = reader.readLine(); } if (list.size() != _elements.size()) { controller.actionShowInfoDialog(getShell(), Resources.getMessage("DialogOrderSelection.16"), Resources.getMessage("DialogOrderSelection.17")); return null; } } catch (IOException e) { controller.actionShowInfoDialog(getShell(), Resources.getMessage("DialogOrderSelection.3"), Resources.getMessage("DialogOrderSelection.4") + e.getMessage()); return null; } finally { if (reader != null) try { reader.close(); } catch (IOException e) { controller.actionShowInfoDialog(getShell(), Resources.getMessage("DialogOrderSelection.5"), Resources.getMessage("DialogOrderSelection.6") + e.getMessage()); return null; } } return list; }
Source:
private boolean processOutput(CallContextImpl callContext){ InputStream output = processExec(callContext); switch(getPhase()) { case INTERRUPTING: setPhase(WorkPhase.INTERRUPTED); logger.info("exec interrupted endpoint={} count={} work={}", callContext.getEndpoint().getEndpointPath(), getCallCount(), callContext.getWorkUnit()); return false; case RUNNING: if (output == null ) { if(getCallerThreadPoolExecutor() == null || getCallerThreadPoolExecutor().getActiveCount() <= 1) setPhase(WorkPhase.COMPLETED); logger.info("exec completed endpoint={} count={} work={}", callContext.getEndpoint().getEndpointPath(), getCallCount(), callContext.getWorkUnit()); return false; } return true; default: throw new MarkLogicInternalException( "unexpected state for "+callContext.getEndpoint().getEndpointPath()+" during loop: "+getPhase().name() ); } }

Target:
private boolean processOutput(CallContextImpl callContext){ InputStream output = processExec(callContext); switch(getPhase()) { case INTERRUPTING: setPhase(WorkPhase.INTERRUPTED); logger.info("exec interrupted endpoint={} count={} work={}", callContext.getEndpoint().getEndpointPath(), getCallCount(), callContext.getWorkUnit()); return false; case RUNNING: if (output == null ) { if(getCallerThreadPoolExecutor() == null || aliveCallContextCount.get() == 0) setPhase(WorkPhase.COMPLETED); logger.info("exec completed endpoint={} count={} work={}", callContext.getEndpoint().getEndpointPath(), getCallCount(), callContext.getWorkUnit()); return false; } return true; default: throw new MarkLogicInternalException( "unexpected state for "+callContext.getEndpoint().getEndpointPath()+" during loop: "+getPhase().name() ); } }
Source:
public void test_futureValueSensitivity_compoundNone_fx() { DiscountingRatePaymentPeriodPricer pricer = DiscountingRatePaymentPeriodPricer.DEFAULT; RatesProvider mockProv = mock(RatesProvider.class); when(mockProv.getValuationDate()).thenReturn(VALUATION_DATE); when(mockProv.fxIndexRate(WM_GBP_USD, GBP, FX_DATE_1)).thenReturn(RATE_FX); when(mockProv.fxIndexRateSensitivity(WM_GBP_USD, GBP, FX_DATE_1)) .thenReturn(FxIndexSensitivity.of(WM_GBP_USD, GBP, FX_DATE_1, 1.0)); PointSensitivityBuilder sensiComputed = pricer.futureValueSensitivity(PAYMENT_PERIOD_FULL_GS_FX, mockProv); PointSensitivityBuilder sensiExpected = FxIndexSensitivity.of(WM_GBP_USD, USD, GBP, FX_DATE_1, NOTIONAL_100); assertTrue(sensiComputed.build().equalWithTolerance( sensiExpected.build(), EPS_FD * PAYMENT_PERIOD_FULL_GS_FX.getNotional())); }

Target:
public void test_futureValueSensitivity_compoundNone_fx() { DiscountingRatePaymentPeriodPricer pricer = DiscountingRatePaymentPeriodPricer.DEFAULT; ImmutableRatesProvider provider = MULTI_GBP_USD; PointSensitivityBuilder pointSensiComputedUSD = pricer.futureValueSensitivity(PAYMENT_PERIOD_FULL_GS_FX_USD, provider); CurveParameterSensitivity sensiComputedUSD = provider.parameterSensitivity(pointSensiComputedUSD.build().normalized()); CurveParameterSensitivity sensiExpectedUSD = CAL_FD.sensitivity( provider, (p) -> CurrencyAmount.of(USD, pricer.futureValue(PAYMENT_PERIOD_FULL_GS_FX_USD, (p)))); assertTrue(sensiComputedUSD.equalWithTolerance( sensiExpectedUSD, EPS_FD * PAYMENT_PERIOD_FULL_GS_FX_USD.getNotional())); PointSensitivityBuilder pointSensiComputedGBP = pricer.futureValueSensitivity(PAYMENT_PERIOD_FULL_GS_FX_GBP, provider); CurveParameterSensitivity sensiComputedGBP = provider.parameterSensitivity(pointSensiComputedGBP.build().normalized()); CurveParameterSensitivity sensiExpectedGBP = CAL_FD.sensitivity( provider, (p) -> CurrencyAmount.of(GBP, pricer.futureValue(PAYMENT_PERIOD_FULL_GS_FX_GBP, (p)))); assertTrue(sensiComputedGBP.equalWithTolerance( sensiExpectedGBP, EPS_FD * PAYMENT_PERIOD_FULL_GS_FX_GBP.getNotional())); }
Source:
public void afterConnectionEstablished() throws SQLException { if(currentConnection.getTransactionIsolation()==0){ System.out.println("afterConnectionEstablished method"); currentConnection.setAutoCommit(true); }else{ currentConnection.setAutoCommit(false); } }

Target:
public void afterConnectionEstablished() throws SQLException { if (currentConnection.getMetaData().supportsTransactions()) { Options.setOption(Options.OPTION_AUTO_COMMIT, "false"); currentConnection.setAutoCommit(false); } else { Options.setOption(Options.OPTION_AUTO_COMMIT, "true"); currentConnection.setAutoCommit(true); } }
Source:
private void finishLookupSourceUnspilling() { if (!unspillInProgress.get().isDone()) { return; } Queue<Page> pages = new ArrayDeque<>(getDone(unspillInProgress.get())); long memoryRetainedByRemainingPages = pages.stream() .mapToLong(Page::getRetainedSizeInBytes) .sum(); operatorContext.setMemoryReservation(memoryRetainedByRemainingPages + index.getEstimatedSize().toBytes()); while (!pages.isEmpty()) { Page next = pages.remove(); index.addPage(next); memoryRetainedByRemainingPages -= next.getRetainedSizeInBytes(); operatorContext.setMemoryReservation(memoryRetainedByRemainingPages + index.getEstimatedSize().toBytes()); } LookupSourceSupplier partition = buildLookupSource(); operatorContext.setMemoryReservation(partition.get().getInMemorySizeInBytes()); spilledLookupSourceHandle.setLookupSource(partition); state = State.LOOKUP_SOURCE_UNSPILLED_AND_BUILT; }

Target:
private void finishLookupSourceUnspilling() { checkState(state == State.INPUT_UNSPILLING); if (!unspillInProgress.get().isDone()) { return; } Queue<Page> pages = new ArrayDeque<>(getDone(unspillInProgress.get())); long memoryRetainedByRemainingPages = pages.stream() .mapToLong(Page::getRetainedSizeInBytes) .sum(); operatorContext.setMemoryReservation(memoryRetainedByRemainingPages + index.getEstimatedSize().toBytes()); while (!pages.isEmpty()) { Page next = pages.remove(); index.addPage(next); memoryRetainedByRemainingPages -= next.getRetainedSizeInBytes(); operatorContext.setMemoryReservation(memoryRetainedByRemainingPages + index.getEstimatedSize().toBytes()); } LookupSourceSupplier partition = buildLookupSource(); lookupSourceChecksum.ifPresent(checksum -> checkState(partition.checksum() == checksum, "Unspilled lookupSource checksum does not match original one")); operatorContext.setMemoryReservation(partition.get().getInMemorySizeInBytes()); spilledLookupSourceHandle.setLookupSource(partition); state = State.INPUT_UNSPILLED_AND_BUILT; }
Source:
private void addUpstreamCommittersTriggeringBuild(AbstractBuild<?, ?> build, Set<InternetAddress> to, Set<InternetAddress> cc, Set<InternetAddress> bcc, EnvVars env, TaskListener listener) { listener.getLogger().println(String.format("Adding upstream committer from job %s with build number %s", build.getProject().getDisplayName(), build.getNumber())); for (ChangeLogSet.Entry change : build.getChangeSet()) { User user = change.getAuthor(); String email = user.getProperty(Mailer.UserProperty.class).getAddress(); if (email != null) { listener.getLogger().println(String.format("Adding upstream committer %s to recipient list with email %s", user.getFullName(), email)); EmailRecipientUtils.addAddressesFromRecipientList(to, cc, bcc, email, env, listener); } else { listener.getLogger().println(String.format("The user %s does not have a configured email email, trying the user's id", user.getFullName())); EmailRecipientUtils.addAddressesFromRecipientList(to, cc, bcc, user.getId(), env, listener); } } }

Target:
private void addUpstreamCommittersTriggeringBuild(AbstractBuild<?, ?> build, Set<InternetAddress> to, Set<InternetAddress> cc, Set<InternetAddress> bcc, EnvVars env, TaskListener listener) { descriptor.debug(listener.getLogger(), "Adding upstream committer from job %s with build number %s", build.getProject().getDisplayName(), build.getNumber()); for (ChangeLogSet.Entry change : build.getChangeSet()) { User user = change.getAuthor(); String email = user.getProperty(Mailer.UserProperty.class).getAddress(); if (email != null) { descriptor.debug(listener.getLogger(), "Adding upstream committer %s to recipient list with email %s", user.getFullName(), email); EmailRecipientUtils.addAddressesFromRecipientList(to, cc, bcc, email, env, listener); } else { descriptor.debug(listener.getLogger(), "The user %s does not have a configured email email, trying the user's id", user.getFullName()); EmailRecipientUtils.addAddressesFromRecipientList(to, cc, bcc, user.getId(), env, listener); } } }
Source:
public static String opToSparkString(ValueNode operand) { String retval = null; try { SPARK_EXPRESSION.set(Boolean.TRUE); initRelationalOpDepth(); retval = opToString2(operand); } catch (Exception e) { } finally { SPARK_EXPRESSION.set(Boolean.FALSE); } return retval; }

Target:
public static String opToSparkString(ValueNode operand) throws StandardException { String retval = ""; try { OperatorToString vars = new OperatorToString(true, new MutableInt(0)); retval = opToString2(operand, vars); } catch (StandardException e) { if (e.getSQLState() != SQLState.LANG_DOES_NOT_IMPLEMENT) throw e; } return retval; }
Source:
public Future<String> putBlobWithIdVersion(BlobProperties blobProperties, byte[] usermetadata, ReadableStreamChannel channel, Short blobIdVersion) { FutureResult<String> futureResult = new FutureResult<>(); PostData postData = new PostData(blobProperties, usermetadata, channel, null, new PutBlobOptionsBuilder().build(), null, futureResult); operationPool.submit(new InMemoryBlobPoster(postData, blobs, notificationSystem, clusterMap, blobIdVersion)); return futureResult; }

Target:
public Future<String> putBlobWithIdVersion(BlobProperties blobProperties, byte[] usermetadata, ReadableStreamChannel channel, Short blobIdVersion) { FutureResult<String> futureResult = new FutureResult<>(); PostData postData = new PostData(blobProperties, usermetadata, channel, null, PutBlobOptions.DEFAULT, null, futureResult); operationPool.submit(new InMemoryBlobPoster(postData, blobs, notificationSystem, clusterMap, blobIdVersion)); return futureResult; }
Source:
private static int toPositive(int number) { return number & 2147483647; }

Target:
private static int toPositive(int number) { return number & Integer.MAX_VALUE; }
Source:
private void update() { if (colWidth.getIntValue() == 0) { new ErrorDialog("The number of columns cannot be zero").center(); return; } AccountDiffPreference dp = new AccountDiffPreference(getValue()); dp.setIgnoreWhitespace(getIgnoreWhitespace()); dp.setContext(getContext()); dp.setTabSize(tabWidth.getIntValue()); dp.setLineLength(colWidth.getIntValue()); dp.setSyntaxHighlighting(syntaxHighlighting.getValue()); dp.setIntralineDifference(intralineDifference.getValue()); dp.setShowWhitespaceErrors(whitespaceErrors.getValue()); dp.setShowTabs(showTabs.getValue()); dp.setSkipDeleted(skipDeleted.getValue()); dp.setSkipUncommented(skipUncommented.getValue()); listenablePrefs.set(dp); if (Gerrit.isSignedIn()) { persistDiffPreferences(); } }

Target:
private void update() { if (colWidth.getIntValue() <= 0) { new ErrorDialog(PatchUtil.C.illegalNumberOfColumns()).center(); return; } AccountDiffPreference dp = new AccountDiffPreference(getValue()); dp.setIgnoreWhitespace(getIgnoreWhitespace()); dp.setContext(getContext()); dp.setTabSize(tabWidth.getIntValue()); dp.setLineLength(colWidth.getIntValue()); dp.setSyntaxHighlighting(syntaxHighlighting.getValue()); dp.setIntralineDifference(intralineDifference.getValue()); dp.setShowWhitespaceErrors(whitespaceErrors.getValue()); dp.setShowTabs(showTabs.getValue()); dp.setSkipDeleted(skipDeleted.getValue()); dp.setSkipUncommented(skipUncommented.getValue()); listenablePrefs.set(dp); if (Gerrit.isSignedIn()) { persistDiffPreferences(); } }
Source:
protected boolean isValidChar(final char c) { return isValidChar(regExp, c); }

Target:
private boolean isValidChar(final char c) { return isValidChar(regExp, c); }
Source:
private String shareKey(FileTreeNode file) { if(file == null) { return ""; } String key = file.getPointer().filePointer.toString(); return key; }

Target:
private String shareKey(FileTreeNode file) { if(file == null) { return ""; } String key = file.getPointer().filePointer.getLocation().toString(); return key; }
Source:
public void before() { for (int i = 0; i < srcPath.length; ++i) { final Path src = FileSystems.getDefault().getPath(srcPath[i]); final Path dst = FileSystems.getDefault().getPath( FilenameUtils.concat(DeploymentUtils.getPathToWorkerDir(workingDir, workerIDs[i]), "worker_" + workerIDs[i] + "_data.db")); try { Files.copy(src, dst); } catch (final Exception e) { throw new RuntimeException("unable to copy files from " + src.toAbsolutePath() + " to " + dst.toAbsolutePath() + ". you can find the dataset at /projects/db7/dataset/twitter/speedtest.", e); } } successfulSetup = true; }

Target:
public void before() { for (int i = 0; i < srcPath.length; ++i) { final Path src = FileSystems.getDefault().getPath(srcPath[i]); final Path dst = Paths.get(DeploymentUtils.getPathToWorkerDir(workingDir, workerIDs[i]), "data.db"); try { Files.copy(src, dst); } catch (final Exception e) { throw new RuntimeException("unable to copy files from " + src.toAbsolutePath() + " to " + dst.toAbsolutePath() + ". you can find the dataset at /projects/db7/dataset/twitter/speedtest.", e); } } successfulSetup = true; }
Source:
public Status update(String table, String key, HashMap<String, ByteIterator> values) { try { SolrQuery query = new SolrQuery(); query.setQuery("id:" + key); final QueryResponse response = (cloudMode) ? cloudClient.query(table, query) : httpClient.query(table, query); if ((response.getResults() != null) && (response.getResults().getNumFound() > 0)) { final SolrDocument updatedDoc = response.getResults().get(0); for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { updatedDoc.setField(entry.getKey(), entry.getValue()); } if (cloudMode) { cloudClient.add(table, ClientUtils.toSolrInputDocument(updatedDoc)); cloudClient.commit(table); } else { httpClient.add(table, ClientUtils.toSolrInputDocument(updatedDoc)); httpClient.commit(table); } return Status.OK; } return Status.NOT_FOUND; } catch (Exception e) { e.printStackTrace(); } return Status.ERROR; }

Target:
public Status update(String table, String key, HashMap<String, ByteIterator> values) { try { SolrInputDocument updatedDoc = new SolrInputDocument(); updatedDoc.addField("id", key); for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { updatedDoc.addField(entry.getKey(), Collections.singletonMap("set", entry.getValue())); } UpdateResponse writeResponse; if (batchMode) { writeResponse = client.add(table, updatedDoc, commitTime); } else { writeResponse = client.add(table, updatedDoc); client.commit(table); } return checkStatus(writeResponse.getStatus()); } catch (IOException | SolrServerException e) { e.printStackTrace(); } return Status.ERROR; }
Source:
protected boolean validateContent(AzureBlobFileSystem fs, Path path, byte[] originalByteArray) throws IOException { FSDataInputStream in = fs.open(path); int pos = 0; int lenOfOriginalByteArray = originalByteArray.length; byte valueOfContentAtPos = (byte) in.read(); while (valueOfContentAtPos != -1 && pos < lenOfOriginalByteArray) { if (originalByteArray[pos] != valueOfContentAtPos) return false; valueOfContentAtPos = (byte) in.read(); pos++; } if (valueOfContentAtPos != -1) return false; return true; }

Target:
protected boolean validateContent(AzureBlobFileSystem fs, Path path, byte[] originalByteArray) throws IOException { int pos = 0; int lenOfOriginalByteArray = originalByteArray.length; try (FSDataInputStream in = fs.open(path)) { byte valueOfContentAtPos = (byte) in.read(); while (valueOfContentAtPos != -1 && pos < lenOfOriginalByteArray) { if (originalByteArray[pos] != valueOfContentAtPos) { assertEquals("Mismatch in content validation at position {}", pos, originalByteArray[pos], valueOfContentAtPos); return false; } valueOfContentAtPos = (byte) in.read(); pos++; } if (valueOfContentAtPos != -1) { assertEquals("Expected end of file", -1, valueOfContentAtPos); return false; } return true; } }
Source:
public CompilerClassloaderUtilsTest() { super("target/test-classes/kjar-2-single-resources", new HashSet<>(Arrays.asList(KieDecorator.STORE_KIE_OBJECTS , KieDecorator.STORE_BUILD_CLASSPATH, KieDecorator.ENABLE_INCREMENTAL_BUILD))); }

Target:
public CompilerClassloaderUtilsTest() { super("target/test-classes/kjar-2-single-resources", EnumSet.of(KieDecorator.STORE_KIE_OBJECTS , KieDecorator.STORE_BUILD_CLASSPATH, KieDecorator.ENABLE_INCREMENTAL_BUILD)); }
Source:
ReplicatorCableAI(ReplicatorEntity entity) { load.setAsPrivate(); this.entity = entity; Eln.instance.highVoltageCableDescriptor.applyTo(load); load.setRs(load.getRs() * 10); this.setMutexBits(1); }

Target:
ReplicatorCableAI(ReplicatorEntity entity) { load.setAsPrivate(); this.entity = entity; Cable.Companion.getHighVoltage().descriptor.applyTo(load); load.setRs(load.getRs() * 10); this.setMutexBits(1); }
Source:
public ConditionEvaluator(String eval) { super(); this.eval = eval; this.queryVars = new HashMap<>(); this.expression = new Expression(replaceQueriesWithVariables(eval)); log.debugf("eval [%s] produced [%s] with variables %s", eval, expression.getOriginalExpression(), queryVars); try { for (String var : queryVars.keySet()) { this.expression.setVariable(var, "1"); } this.expression.eval(); } catch (Exception e) { throw new ExpressionException("Invalid eval [" + eval + "]: " + e.getMessage()); } }

Target:
public ConditionEvaluator(String eval) { super(); this.eval = eval; this.queryVars = new HashMap<>(); this.expression = new Expression(replaceQueriesWithVariables(eval)); log.debugf("eval [%s] produced [%s] with variables %s", eval, expression.getOriginalExpression(), queryVars); try { for (String var : queryVars.keySet()) { this.expression.setVariable(var, "1"); } this.expression.eval(); } catch (Exception e) { throw new IllegalArgumentException("Invalid eval expression [" + eval + "]: " + e.getMessage()); } }
Source:
public Flux<HandleItem> getHandles(Integer maxResult, boolean recursive) { return azureFileStorageClient.directorys().listHandlesWithRestResponseAsync(shareName, directoryName, null, maxResult, null, snapshot, recursive, Context.NONE) .flatMapMany(response -> nextPageForHandles(response, maxResult, recursive)); }

Target:
public Flux<HandleItem> getHandles(Integer maxResult, boolean recursive) { return azureFileStorageClient.directorys().listHandlesWithRestResponseAsync(shareName, directoryPath, null, maxResult, null, snapshot, recursive, Context.NONE) .flatMapMany(response -> nextPageForHandles(response, maxResult, recursive)); }