auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean delete(HttpServletRequest request, HttpServletResponse response) throws IOException, BadRequestException, NotFoundException, UnauthorizedException { Session session = Root.zebedee.getSessions().get(request); if (session == null || !Root.zebedee.getPermissionsService().canEdit(session.getEmail())) { throw new UnauthorizedException("You are not authorised to edit content."); } Collection collection = Collections.getCollection(request); String uri = request.getParameter("uri"); try { info().uri(uri).collectionID(collection).user(session).log("deleting colleciton version content"); collection.deleteVersion(session.getEmail(), uri); } finally { collection.save(); } Audit.Event.COLLECTION_VERSION_DELETED .parameters() .host(request) .collection(collection) .version(uri) .user(session.getEmail()) .log(); return true; }

Target:
public boolean delete(HttpServletRequest request, HttpServletResponse response) throws IOException, BadRequestException, NotFoundException, UnauthorizedException { Session session = Root.zebedee.getSessions().get(request); if (session == null || !Root.zebedee.getPermissionsService().canEdit(session.getEmail())) { throw new UnauthorizedException("You are not authorised to edit content."); } Collection collection = Collections.getCollection(request); String uri = request.getParameter("uri"); try { info().uri(uri).collectionID(collection).user(session).log("deleting collection version content"); collection.deleteVersion(session.getEmail(), uri); } finally { collection.save(); } Audit.Event.COLLECTION_VERSION_DELETED .parameters() .host(request) .collection(collection) .version(uri) .user(session.getEmail()) .log(); return true; }
Source:
public void testUpdateGroupLaunchConfigurationFail() { URI endpoint = URI.create("<LINK_0>"); GroupApi api = requestsSendResponses( keystoneAuthWithUsernameAndPasswordAndTenantName, responseWithKeystoneAccess, authenticatedGET().method("PUT").endpoint(endpoint) .payload(payloadFromResourceWithContentType("/autoscale_groups_update_launch_configuration_request.json", MediaType.APPLICATION_JSON)).build(), HttpResponse.builder().statusCode(404) .build()) .getGroupApiForZone("DFW"); LaunchConfiguration lc = LaunchConfiguration.builder() .loadBalancers(ImmutableList.of(LoadBalancer.builder().port(8080).id(9099).build())) .serverName("autoscale_server") .serverImageRef("0d589460-f177-4b0f-81c1-8ab8903ac7d8") .serverFlavorRef("2") .serverDiskConfig("AUTO") .serverMetadata(ImmutableMap.of("build_config","core","meta_key_1","meta_value_1","meta_key_2","meta_value_2")) .networks(ImmutableList.of("11111111-1111-1111-1111-111111111111","00000000-0000-0000-0000-000000000000")) .personalities(ImmutableList.of(Personality.builder().path("/root/.csivh").contents("VGhpcyBpcyBhIHRlc3QgZmlsZS4=").build())) .type(LaunchConfigurationType.LAUNCH_SERVER) .build(); boolean result = api.updateLaunchConfiguration("1234567890", lc); assertEquals(result, false); }

Target:
public void testUpdateGroupLaunchConfigurationFail() { URI endpoint = URI.create("<LINK_0>"); GroupApi api = requestsSendResponses( keystoneAuthWithUsernameAndPasswordAndTenantName, responseWithKeystoneAccess, authenticatedGET().method("PUT").endpoint(endpoint) .payload(payloadFromResourceWithContentType("/autoscale_groups_update_launch_configuration_request.json", MediaType.APPLICATION_JSON)).build(), HttpResponse.builder().statusCode(404) .build()) .getGroupApiForZone("DFW"); LaunchConfiguration lc = LaunchConfiguration.builder() .loadBalancers(ImmutableList.of(LoadBalancer.builder().port(8080).id(9099).build())) .serverName("autoscale_server") .serverImageRef("0d589460-f177-4b0f-81c1-8ab8903ac7d8") .serverFlavorRef("2") .serverDiskConfig("AUTO") .serverMetadata(ImmutableMap.of("build_config","core","meta_key_1","meta_value_1","meta_key_2","meta_value_2")) .networks(ImmutableList.of("11111111-1111-1111-1111-111111111111","00000000-0000-0000-0000-000000000000")) .personalities(ImmutableList.of(Personality.builder().path("/root/.csivh").contents("VGhpcyBpcyBhIHRlc3QgZmlsZS4=").build())) .type(LaunchConfigurationType.LAUNCH_SERVER) .build(); boolean result = api.updateLaunchConfiguration("1234567890", lc); assertFalse(result); }
Source:
public Set<Row> getRelationships(Row entity, Relationships.Direction direction, String... names) { String cp = entity.getString(Statements.CP); Observable<List<Row>> relationships = getRelationshipTables(direction) .flatMap(table -> { final Clause cond = eq(Statements.RELATIONSHIP_MAIN_CP.get(table), cp); Statement q = select().all().from(table).where(cond).and(in(Statements.NAME, Arrays.asList(names))); return session.execute(q); }) .map(ResultSet::all); return ImmutableSet.copyOf(relationships.toBlocking().first()); }

Target:
public Set<Row> getRelationships(Row entity, Relationships.Direction direction, String... names) { if (direction == outgoing) { String cp = entity.getString(Statements.CP); List<Row> result = statements.findOutRelationshipBySourceAndNames(cp, Arrays.asList(names)) .toList() .toBlocking() .first(); return ImmutableSet.copyOf(result); } else if (direction == incoming) { String cp = entity.getString(Statements.CP); List<Row> result = statements.findInRelationshipByTargetAndNames(cp, Arrays.asList(names)) .toList() .toBlocking() .first(); return ImmutableSet.copyOf(result); } else if (direction == both) { return ImmutableSet.<Row>builder() .addAll(getRelationships(entity, incoming, names)) .addAll(getRelationships(entity, outgoing, names)) .build(); } throw new IllegalStateException("Unsupported direction: " + direction); }
Source:
public void predateEntitlementCerts() throws Exception { consumer.setCreated(new Date()); certServiceAdapter = new DefaultEntitlementCertServiceAdapter( realPKI, extensionUtil, v3extensionUtil, mock(EntitlementCertificateCurator.class), keyPairCurator, serialCurator, entCurator, I18nFactory.getI18n(getClass(), Locale.US, I18nFactory.FALLBACK), config, productCurator); Calendar cal = Calendar.getInstance(); cal.add(Calendar.HOUR, -2); pool.setStartDate(cal.getTime()); X509Certificate result = certServiceAdapter.createX509Certificate(entitlement, product, new HashSet<Product>(), getProductModels(product, new HashSet<Product>(), "prefix", entitlement), new BigInteger("1234"), keyPair, true); assert (result.getNotBefore().getTime() == pool.getStartDate().getTime() / 1000 * 1000); cal.add(Calendar.MINUTE, 90); pool.setStartDate(cal.getTime()); result = certServiceAdapter.createX509Certificate(entitlement, product, new HashSet<Product>(), getProductModels(product, new HashSet<Product>(), "prefix", entitlement), new BigInteger("1234"), keyPair, true); assert (result.getNotBefore().getTime() < pool.getStartDate().getTime() / 1000 * 1000); }

Target:
public void predateEntitlementCerts() throws Exception { consumer.setCreated(new Date()); certServiceAdapter = new DefaultEntitlementCertServiceAdapter( realPKI, extensionUtil, v3extensionUtil, mock(EntitlementCertificateCurator.class), keyPairCurator, serialCurator, entCurator, I18nFactory.getI18n(getClass(), Locale.US, I18nFactory.FALLBACK), config, productCurator); Calendar cal = Calendar.getInstance(); cal.add(Calendar.HOUR, -2); pool.setStartDate(cal.getTime()); X509Certificate result = certServiceAdapter.createX509Certificate(entitlement, product, new HashSet<Product>(), getProductModels(product, new HashSet<Product>(), "prefix", entitlement), new BigInteger("1234"), keyPair, true); assertTrue(result.getNotBefore().getTime() == pool.getStartDate().getTime() / 1000 * 1000); cal.add(Calendar.MINUTE, 90); pool.setStartDate(cal.getTime()); result = certServiceAdapter.createX509Certificate(entitlement, product, new HashSet<Product>(), getProductModels(product, new HashSet<Product>(), "prefix", entitlement), new BigInteger("1234"), keyPair, true); assertTrue(result.getNotBefore().getTime() < pool.getStartDate().getTime() / 1000 * 1000); }
Source:
public VisualEditorPageObject clickInsertToolButton() { for (int i=0; i<toolsList.size(); i++) { if (toolsList.get(i).getText().contentEquals("Insert")) { toolsList.get(i).click(); } } return this; }

Target:
public VisualEditorPageObject clickInsertToolButton() { insertDropdownMenuButton.click(); return this; }
Source:
public void testDataRegionMetrics() throws Exception { List<List<?>> res = execute(ignite0, "SELECT REPLACE(name, 'io.dataregion.default.'), value, description FROM SYS.METRICS"); Set<String> names = new HashSet<>(); DataRegionConfiguration cfg = ignite0.configuration().getDataStorageConfiguration().getDefaultDataRegionConfiguration(); for (List<?> row : res) { String name = (String)row.get(0); names.add(name); if ("InitialSize".equals(name)) assertEquals(Long.toString(cfg.getInitialSize()), row.get(1)); else if ("MaxSize".equals(name)) assertEquals(Long.toString(cfg.getMaxSize()), row.get(1)); assertNotNull("Metric value must be not null [name=" + row.get(0) + ']', row.get(1)); } for (String attr : EXPECTED_ATTRIBUTES) assertTrue(attr + " should be exported via SQL view", names.contains(attr)); }

Target:
public void testDataRegionMetrics() throws Exception { List<List<?>> res = execute(ignite0, "SELECT REPLACE(name, 'io.dataregion.default.'), value, description FROM SYS.METRICS"); Set<String> names = new HashSet<>(); DataRegionConfiguration cfg = ignite0.configuration().getDataStorageConfiguration().getDefaultDataRegionConfiguration(); for (List<?> row : res) { String name = (String)row.get(0); String val = (String)row.get(1); names.add(name); if ("InitialSize".equals(name)) assertEquals(Long.toString(cfg.getInitialSize()), val); else if ("MaxSize".equals(name)) assertEquals(Long.toString(cfg.getMaxSize()), val); assertNotNull("Metric value must be not null [name=" + name + ']', val); } for (String attr : EXPECTED_ATTRIBUTES) assertTrue(attr + " should be exported via SQL view", names.contains(attr)); }
Source:
public boolean onContextItemSelected(MenuItem item) { Message message = itemFromMenuInfo((AdapterContextMenuInfo) item .getMenuInfo()); switch (item.getItemId()) { case R.id.reply_to_stream: mListener.openCompose(message.getStream(), message.getSubject()); return true; case R.id.reply_to_private: mListener.openCompose(message.getReplyTo(app)); return true; case R.id.reply_to_sender: mListener.openCompose(message.getSender().getEmail()); return true; case R.id.narrow_to_private: ((ZulipActivity) getActivity()).doNarrow(new NarrowFilterPM(Arrays .asList(message.getRecipients(app)))); return true; case R.id.narrow_to_stream: ((ZulipActivity) getActivity()).doNarrow(new NarrowFilterStream( message.getStream(), null)); return true; case R.id.narrow_to_subject: ((ZulipActivity) getActivity()).doNarrow(new NarrowFilterStream( message.getStream(), message.getSubject())); return true; case R.id.copy_message: copyMessage(message); return true; case R.id.mute_topic: if (app.isTopicMute(message.getStream().getId(), message.getSubject())) { mListener.unMuteTopic(message.getStream().getId(), message.getSubject()); } else { mListener.MuteTopic(message.getStream().getId(), message.getSubject()); } return true; default: return super.onContextItemSelected(item); } }

Target:
public boolean onContextItemSelected(MenuItem item) { Message message = itemFromMenuInfo(item.getMenuInfo()); switch (item.getItemId()) { case R.id.reply_to_stream: mListener.openCompose(message.getStream(), message.getSubject()); return true; case R.id.reply_to_private: mListener.openCompose(message.getReplyTo(app)); return true; case R.id.reply_to_sender: mListener.openCompose(message.getSender().getEmail()); return true; case R.id.narrow_to_private: if (getActivity() instanceof NarrowListener) { ((NarrowListener) getActivity()).onNarrow(new NarrowFilterPM(Arrays.asList(message.getRecipients(app)))); } return true; case R.id.narrow_to_stream: if (getActivity() instanceof NarrowListener) { ((NarrowListener) getActivity()).onNarrow(new NarrowFilterStream(message.getStream(), null)); } return true; case R.id.narrow_to_subject: if (getActivity() instanceof NarrowListener) { ((NarrowListener) getActivity()).onNarrow(new NarrowFilterStream(message.getStream(), message.getSubject())); } return true; case R.id.copy_message: copyMessage(message); return true; default: return super.onContextItemSelected(item); } }
Source:
public void rulesLoaded() { profile.define(context); Map<String, BuiltInActiveRule> activeRules = getActiveRulesByRuleKey(context); assertThat(activeRules.size()).isGreaterThan(0); }

Target:
public void rulesLoaded() { profile.define(context); Map<String, BuiltInActiveRule> activeRules = getActiveRulesByRuleKey(context); assertThat(activeRules.size()).isGreaterThan(0); assertThat(activeRules.keySet()).contains("HTL-0"); }
Source:
public void servoSetVelocity(ServoControl servo) { log.info("servoSetVelocity id velocity {}", servo.getName(), getDeviceId(servo), (int) servo.getSpeed().intValue()); msg.servoSetVelocity(getDeviceId(servo), (int) servo.getSpeed().intValue()); }

Target:
public void servoSetVelocity(ServoControl servo) { int speed = -1; if (servo.getSpeed() != null) { speed = servo.getSpeed().intValue(); } log.info("servoSetVelocity id velocity {}", servo.getName(), getDeviceId(servo), speed); msg.servoSetVelocity(getDeviceId(servo), speed); }
Source:
public String getLearnerMaster() { QuorumPeer.QuorumServer learnerMaster = observer.getCurrentLearnerMaster(); InetSocketAddress address = learnerMaster.addr.getReachableOrOne(); if (learnerMaster == null || address == null) { return "Unknown"; } return address.getAddress().getHostAddress() + ":" + address.getPort(); }

Target:
public String getLearnerMaster() { QuorumPeer.QuorumServer learnerMaster = observer.getCurrentLearnerMaster(); if (learnerMaster == null || learnerMaster.addr.isEmpty()) { return "Unknown"; } InetSocketAddress address = learnerMaster.addr.getReachableOrOne(); return address.getAddress().getHostAddress() + ":" + address.getPort(); }
Source:
public void configure(Binder binder) { Multibinder<Procedure> procedureMultibinder = newSetBinder(binder, Procedure.class); procedureMultibinder.addBinding().toProvider(CreateEmptyPartitionProcedure.class).in(Scopes.SINGLETON); }

Target:
public void configure(Binder binder) { Multibinder<Procedure> procedures = newSetBinder(binder, Procedure.class); procedures.addBinding().toProvider(CreateEmptyPartitionProcedure.class).in(Scopes.SINGLETON); }
Source:
protected void applyInlineDeployments() { runtime.getComponentManager().refresh(false); runtime.getComponentManager().start(); }

Target:
protected void applyInlineDeployments() throws Exception { runtime.getComponentManager().refresh(false); runtime.getComponentManager().start(); postSetUp(); }
Source:
public TmfXYChartViewer(Composite parent, String title, String xLabel, String yLabel) { super(parent, title); fSwtChart = new Chart(parent, SWT.NONE) { @Override public boolean setFocus() { return fSwtChart.getPlotArea().setFocus(); } }; fSwtChart.addMouseListener(new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { fSwtChart.getPlotArea().setFocus(); } }); IAxis xAxis = fSwtChart.getAxisSet().getXAxis(0); IAxis yAxis = fSwtChart.getAxisSet().getYAxis(0); if (title == null) { fSwtChart.getTitle().setVisible(false); } else { fSwtChart.getTitle().setText(title); } if (xLabel == null) { xAxis.getTitle().setVisible(false); } else { xAxis.getTitle().setText(xLabel); } if (yLabel == null) { yAxis.getTitle().setVisible(false); } else { yAxis.getTitle().setText(yLabel); } fMouseSelectionProvider = new TmfMouseSelectionProvider(this); fMouseDragZoomProvider = new TmfMouseDragZoomProvider(this); fMouseWheelZoomProvider = new TmfMouseWheelZoomProvider(this); fToolTipProvider = new TmfSimpleTooltipProvider(this); fMouseDragProvider = new TmfMouseDragProvider(this); }

Target:
public TmfXYChartViewer(Composite parent, String title, String xLabel, String yLabel) { super(parent, title); fSwtChart = new Chart(parent, SWT.NONE) { @Override public boolean setFocus() { return fSwtChart.getPlotArea().setFocus(); } }; fSwtChart.getPlotArea().addMouseListener(new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { fSwtChart.getPlotArea().setFocus(); } }); IAxis xAxis = fSwtChart.getAxisSet().getXAxis(0); IAxis yAxis = fSwtChart.getAxisSet().getYAxis(0); if (title == null) { fSwtChart.getTitle().setVisible(false); } else { fSwtChart.getTitle().setText(title); } if (xLabel == null) { xAxis.getTitle().setVisible(false); } else { xAxis.getTitle().setText(xLabel); } if (yLabel == null) { yAxis.getTitle().setVisible(false); } else { yAxis.getTitle().setText(yLabel); } fMouseSelectionProvider = new TmfMouseSelectionProvider(this); fMouseDragZoomProvider = new TmfMouseDragZoomProvider(this); fMouseWheelZoomProvider = new TmfMouseWheelZoomProvider(this); fToolTipProvider = new TmfSimpleTooltipProvider(this); fMouseDragProvider = new TmfMouseDragProvider(this); }
Source:
public Blob run() throws IOException { if (!admin.getActions().contains(action)) { throw new NuxeoException("Action '" + action + "' not found"); } if (!admin.isHttpEnabled(action) && !session.getPrincipal().isAdministrator()) { throw new NuxeoException("Action '" + action + "' denied"); } String userName = session.getPrincipal().getName(); BulkCommand.Builder builder = new BulkCommand.Builder(action, query).user(userName).params(parameters); if (repositoryName != null) { builder.repository(repositoryName); } else { builder.repository(session.getRepositoryName()); } if (bucketSize > 0) { builder.bucket(bucketSize); } if (batchSize > 0) { builder.batch(batchSize); } String commandId = service.submit(builder.build()); return Blobs.createJSONBlobFromValue(Collections.singletonMap("commandId", commandId)); }

Target:
public Blob run() throws IOException { if (!admin.getActions().contains(action)) { throw new NuxeoException("Action '" + action + "' not found", HttpServletResponse.SC_NOT_FOUND); } if (!admin.isHttpEnabled(action) && !session.getPrincipal().isAdministrator()) { throw new NuxeoException("Action '" + action + "' denied", HttpServletResponse.SC_FORBIDDEN); } String userName = session.getPrincipal().getName(); BulkCommand.Builder builder = new BulkCommand.Builder(action, query).user(userName).params(parameters); if (repositoryName != null) { builder.repository(repositoryName); } else { builder.repository(session.getRepositoryName()); } if (bucketSize > 0) { builder.bucket(bucketSize); } if (batchSize > 0) { builder.batch(batchSize); } String commandId = service.submit(builder.build()); return Blobs.createJSONBlobFromValue(Collections.singletonMap("commandId", commandId)); }
Source:
public boolean handleSelection() { try { IAtsVersion newSelectedVersion = TargetedVersionColumnUI.promptFoundInVersion(getArtifact(), VersionReleaseType.UnReleased, VersionLockedType.UnLocked, getRelation()); if (newSelectedVersion == null) { return false; } if (this.oldSelectedVersion == null || !this.oldSelectedVersion.getName().equals( newSelectedVersion.getName())) { this.oldSelectedVersion = (Version) newSelectedVersion; IAtsChangeSet changes = AtsClientService.get().createChangeSet("Update Found-In-Location"); changes.setRelation(getArtifact(), getRelation(), newSelectedVersion); changes.executeIfNeeded(); notifyXModifiedListeners(); refresh(); return true; } return false; } catch (Exception ex) { OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex); } return false; }

Target:
public boolean handleSelection() { try { if (FoundInVersionColumnUI.promptFoundInVersion(getArtifact(), VersionReleaseType.UnReleased, VersionLockedType.UnLocked, getRelation())) { notifyXModifiedListeners(); refresh(); return true; } return false; } catch (Exception ex) { OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex); } return false; }
Source:
protected void applyCSSProperty(Control control, String property, CSSValue value, String pseudo, CSSEngine engine) throws Exception { if (!(control instanceof CTabFolder) || value.getCssValueType() != CSSValue.CSS_PRIMITIVE_VALUE || ((CSSPrimitiveValue) value).getPrimitiveType() != CSSPrimitiveValue.CSS_IDENT) { return; } CTabFolder tabFolder = (CTabFolder) control; String postion = ((CSSPrimitiveValue) value).getStringValue(); switch (postion.toLowerCase()) { case "bottom": tabFolder.setTabPosition(SWT.BOTTOM); break; case "top": tabFolder.setTabPosition(SWT.TOP); break; } }

Target:
protected void applyCSSProperty(Control control, String property, CSSValue value, String pseudo, CSSEngine engine) throws Exception { if (!(control instanceof CTabFolder) || value.getCssValueType() != CSSValue.CSS_PRIMITIVE_VALUE || ((CSSPrimitiveValue) value).getPrimitiveType() != CSSPrimitiveValue.CSS_IDENT) { return; } CTabFolder tabFolder = (CTabFolder) control; String position = ((CSSPrimitiveValue) value).getStringValue(); switch (position.toLowerCase()) { case "bottom": tabFolder.setTabPosition(SWT.BOTTOM); break; case "top": tabFolder.setTabPosition(SWT.TOP); break; } }
Source:
public static Map<String,Object> getAppData() { HashMap<String,Object> data = new HashMap<>(); AppData source = getClient().getAppData(); data.putAll(source.getAppData()); data.putAll(source.getAppDataMetaData()); data.putAll(source.getAppDataSummary()); return data; }

Target:
public static Map<String,Object> getAppData() { HashMap<String,Object> data = new HashMap<>(); AppData source = getClient().getAppData(); data.putAll(source.getAppData()); data.putAll(source.getAppDataMetaData()); return data; }
Source:
public Timer.Context timeReadRowsFirstResponse() { if (firstResponseTimer == null) { firstResponseTimer = BigtableClientMetrics.timer( MetricLevel.Info, "grpc.method.ReadRows.firstResponse.latency"); } return firstResponseTimer.time(); }

Target:
public Timer.Context timeReadRowsFirstResponse() { return firstResponseTimer.time(); }
Source:
public final byte[] format(Tag tag) { ByteArrayOutputStream os = new ByteArrayOutputStream(); OutputStreamWriter w = new OutputStreamWriter(os, Constants.CHARSET); try { w.write("object "); tag.getObjId().copyTo(w); w.write('\n'); w.write("type "); w.write(tag.getType()); w.write("\n"); w.write("tag "); w.write(tag.getTag()); w.write("\n"); w.write("tagger "); if(tag.getTagger() != null) w.write(tag.getTagger().toExternalString()); w.write('\n'); w.write('\n'); if(tag.getMessage() != null) w.write(tag.getMessage()); w.close(); } catch (IOException err) { throw new RuntimeException(err); } return os.toByteArray(); }

Target:
public final byte[] format(Tag tag) { ByteArrayOutputStream os = new ByteArrayOutputStream(); OutputStreamWriter w = new OutputStreamWriter(os, Constants.CHARSET); try { w.write("object "); tag.getObjId().copyTo(w); w.write('\n'); w.write("type "); w.write(tag.getType()); w.write("\n"); w.write("tag "); w.write(tag.getTag()); w.write("\n"); if (tag.getTagger() != null) { w.write("tagger "); w.write(tag.getTagger().toExternalString()); w.write('\n'); } w.write('\n'); if(tag.getMessage() != null) w.write(tag.getMessage()); w.close(); } catch (IOException err) { throw new RuntimeException(err); } return os.toByteArray(); }
Source:
public void tapWithOptions(WebElement webElement, EnumMap<GestureOptions, String> gestureOptions) { logger.entering(webElement, gestureOptions); String s = gestureOptions.get(GestureOptions.TOUCH_COUNT); int touchCount = s == null ? 1 : Integer.parseInt(s); s = gestureOptions.get(GestureOptions.DURATION); int duration = s == null ? 100 : Integer.parseInt(s); super.tap(touchCount, webElement, duration); logger.exiting(); }

Target:
public void tapWithOptions(WebElement webElement, EnumMap<GestureOptions, String> gestureOptions) { logger.entering(webElement, gestureOptions); String s = gestureOptions.get(GestureOptions.TOUCH_COUNT); int touchCount = s == null ? 1 : Integer.parseInt(s); s = gestureOptions.get(GestureOptions.DURATION); int duration = s == null ? TAP_DURATION : Integer.parseInt(s); super.tap(touchCount, webElement, duration); logger.exiting(); }
Source:
public void shouldCreateNewAutoGenerationOptionWithoutLocation() throws Exception { long originalCount = getAllCount(); SimpleObject autoGenerationOption = new SimpleObject(); autoGenerationOption.add("identifierType", IDENTIFIER_TYPE_UUID); autoGenerationOption.add("source", SOURCE); autoGenerationOption.add("automaticGenerationEnabled", true); autoGenerationOption.add("manualEntryEnabled", true); String json = new ObjectMapper().writeValueAsString(autoGenerationOption); MockHttpServletRequest req = request(RequestMethod.POST, getURI()); req.setContent(json.getBytes()); SimpleObject newAutoGenerationOption = deserialize(handle(req)); assertNotNull(PropertyUtils.getProperty(newAutoGenerationOption, "uuid")); assertEquals(originalCount + 1, getAllCount()); assertNotNull( PropertyUtils.getProperty(newAutoGenerationOption, "source")); assertNotNull( PropertyUtils.getProperty(newAutoGenerationOption, "location")); assertNotNull(PropertyUtils.getProperty(newAutoGenerationOption, "identifierType")); }

Target:
public void shouldCreateNewAutoGenerationOptionWithoutLocation() throws Exception { long originalCount = getAllCount(); SimpleObject autoGenerationOption = new SimpleObject(); autoGenerationOption.add("identifierType", IDENTIFIER_TYPE_UUID); autoGenerationOption.add("source", SOURCE); autoGenerationOption.add("automaticGenerationEnabled", true); autoGenerationOption.add("manualEntryEnabled", true); String json = new ObjectMapper().writeValueAsString(autoGenerationOption); MockHttpServletRequest req = request(RequestMethod.POST, getURI()); req.setContent(json.getBytes()); SimpleObject response = deserialize(handle(req)); assertEquals(originalCount + 1, getAllCount()); Object autogenerationOptionUuid = PropertyUtils.getProperty(response, "uuid"); AutoGenerationOption newAutoGenerationOption = identifierSourceService .getAutoGenerationOption(Integer.parseInt(autogenerationOptionUuid.toString())); assertEquals(SOURCE, newAutoGenerationOption.getSource().getUuid()); assertNull(newAutoGenerationOption.getLocation()); assertEquals(IDENTIFIER_TYPE_UUID, newAutoGenerationOption.getIdentifierType().getUuid()); assertEquals(true, newAutoGenerationOption.isAutomaticGenerationEnabled()); assertEquals(true, newAutoGenerationOption.isManualEntryEnabled()); }
Source:
private void memoryCacheReset(IMemoryDMContext memoryDMC) { for (IMemoryDMContext ctx : fMemoryCaches.keySet()) { if (ctx.equals(memoryDMC) || DMContexts.isAncestorOf(ctx, memoryDMC)) { fMemoryCaches.get(ctx).reset(); } } }

Target:
private void memoryCacheReset(IMemoryDMContext memoryDMC) { for (IMemoryDMContext ctx : fMemoryCaches.keySet()) { if (ctx != null && ctx.equals(memoryDMC) || DMContexts.isAncestorOf(ctx, memoryDMC)) { fMemoryCaches.get(ctx).reset(); } } }
Source:
void handleResponse(ResponseInfo responseInfo) { if (isOperationComplete()) { return; } int correlationId = ((GetRequest) responseInfo.getRequest()).getCorrelationId(); GetRequestInfo getRequestInfo = correlationIdToGetRequestInfo.remove(correlationId); if (getRequestInfo == null) { return; } if (responseInfo.getError() != null) { setOperationException(new RouterException("Operation timed out", RouterErrorCode.OperationTimedOut)); responseHandler.onRequestResponseException(getRequestInfo.replicaId, new IOException("NetworkClient error")); operationTracker.onResponse(getRequestInfo.replicaId, false); } else { try { GetResponse getResponse = GetResponse .readFrom(new DataInputStream(new ByteBufferInputStream(responseInfo.getResponse())), clusterMap); if (getResponse.getCorrelationId() != correlationId) { setOperationException( new RouterException("The correlation id in the GetResponse " + getResponse.getCorrelationId() + "is not the same as the correlation id in the associated GetRequest: " + correlationId, RouterErrorCode.UnexpectedInternalError)); operationTracker.onResponse(getRequestInfo.replicaId, false); } else { processGetResponse(getRequestInfo, getResponse); } } catch (IOException | MessageFormatException e) { setOperationException(new RouterException("Response deserialization received an unexpected error", e, RouterErrorCode.UnexpectedInternalError)); operationTracker.onResponse(getRequestInfo.replicaId, false); } } checkAndMaybeComplete(); }

Target:
void handleResponse(ResponseInfo responseInfo) { if (isOperationComplete()) { return; } int correlationId = ((GetRequest) responseInfo.getRequest()).getCorrelationId(); GetRequestInfo getRequestInfo = correlationIdToGetRequestInfo.remove(correlationId); if (responseInfo.getError() != null) { setOperationException(new RouterException("Operation timed out", RouterErrorCode.OperationTimedOut)); responseHandler.onRequestResponseException(getRequestInfo.replicaId, new IOException("NetworkClient error")); operationTracker.onResponse(getRequestInfo.replicaId, false); } else { try { GetResponse getResponse = GetResponse .readFrom(new DataInputStream(new ByteBufferInputStream(responseInfo.getResponse())), clusterMap); if (getResponse.getCorrelationId() != correlationId) { setOperationException( new RouterException("The correlation id in the GetResponse " + getResponse.getCorrelationId() + "is not the same as the correlation id in the associated GetRequest: " + correlationId, RouterErrorCode.UnexpectedInternalError)); operationTracker.onResponse(getRequestInfo.replicaId, false); } else { processGetResponse(getRequestInfo, getResponse); } } catch (IOException | MessageFormatException e) { setOperationException(new RouterException("Response deserialization received an unexpected error", e, RouterErrorCode.UnexpectedInternalError)); operationTracker.onResponse(getRequestInfo.replicaId, false); } } checkAndMaybeComplete(); }
Source:
private static final int getFreePort() throws Exception { try (ServerSocket socket = new ServerSocket(0)) { return socket.getLocalPort(); } }

Target:
private static int getFreePort() throws Exception { try (ServerSocket socket = new ServerSocket(0)) { return socket.getLocalPort(); } }
Source:
private void notifyClients(boolean finish) { synchronized (callbackList) { final int N = callbackList.beginBroadcast(); for (int i = 0; i < N; i++) { try { ICacheDownloadServiceCallback cb = callbackList.getBroadcastItem(i); if (finish) { cb.notifyFinish(); } else { cb.notifyRefresh(); } } catch (RemoteException e) { } } callbackList.finishBroadcast(); } }

Target:
private void notifyClients(boolean finish) { synchronized (callbackList) { final int maxClientId = callbackList.beginBroadcast(); for (int i = 0; i < maxClientId; i++) { try { ICacheDownloadServiceCallback cb = callbackList.getBroadcastItem(i); if (finish) { cb.notifyFinish(); } else { cb.notifyRefresh(queue.size()); } } catch (RemoteException e) { } } callbackList.finishBroadcast(); } }
Source:
public ValidationResult canStopOrCommitRemoveBrick(GlusterVolumeEntity volumeEntity, List<GlusterBrickEntity> paramBricks) { GlusterAsyncTask asyncTask = volumeEntity.getAsyncTask(); if (asyncTask == null || asyncTask.getType() != GlusterTaskType.REMOVE_BRICK) { return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_INVALID_TASK_TYPE); } if (paramBricks.isEmpty()) { return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_BRICKS_REQUIRED); } List<GlusterBrickEntity> bricksForTask = getGlusterBrickDao().getGlusterVolumeBricksByTaskId(asyncTask.getTaskId()); if (paramBricks.size() != bricksForTask.size() || !areBricksInTheList(volumeEntity, paramBricks, bricksForTask)) { return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_REMOVE_BRICKS_PARAMS_INVALID); } return ValidationResult.VALID; }

Target:
public ValidationResult canStopOrCommitRemoveBrick(GlusterVolumeEntity volumeEntity, List<GlusterBrickEntity> paramBricks) { GlusterAsyncTask asyncTask = volumeEntity.getAsyncTask(); if (asyncTask == null || asyncTask.getType() != GlusterTaskType.REMOVE_BRICK) { return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_INVALID_TASK_TYPE); } if (paramBricks.isEmpty()) { return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_BRICKS_REQUIRED); } List<GlusterBrickEntity> bricksForTask = getGlusterBrickDao().getGlusterVolumeBricksByTaskId(asyncTask.getTaskId()); if (paramBricks.size() != bricksForTask.size() || !areBricksInTheList(volumeEntity, paramBricks, bricksForTask)) { return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_REMOVE_BRICKS_PARAMS_INVALID, String.format("$validBricks [%s]", getValidBrickNames(bricksForTask))); } return ValidationResult.VALID; }
Source:
private DirectMucInvitationManager(XMPPConnection connection) { super(connection); ServiceDiscoveryManager.getInstanceFor(connection).addFeature(GroupChatInvitation.NAMESPACE); registerExtensionElementListener(); }

Target:
private DirectMucInvitationManager(XMPPConnection connection) { super(connection); serviceDiscoveryManager = ServiceDiscoveryManager.getInstanceFor(connection); registerExtensionElementListener(); serviceDiscoveryManager.addFeature(GroupChatInvitation.NAMESPACE); }
Source:
private UploadProgress checkProgress(File uploadFile, String objectId) { val uploadId = UploadStateStore.fetchUploadId(uploadFile, objectId); UploadProgress progress = null; progress = storageService.getProgress(objectId, uploadFile.length()); if (uploadId.isPresent() && progress != null) { if (!uploadId.get().equalsIgnoreCase(progress.getUploadId())) { val msg = String.format( "Local in-progress upload %s conflicts with remote upload in progress %s. Aborting local upload.", uploadId.get(), progress.getUploadId()); throw new NotResumableException(new IllegalStateException(msg)); } } else if (progress != null) { val msg = String .format( "There is already an upload in progress that was started elsewhere with upload id %s. Aborting local upload.", progress.getUploadId()); throw new NotResumableException(new IllegalStateException(msg)); } return progress; }

Target:
private UploadProgress checkProgress(File uploadFile, String objectId) { val uploadId = UploadStateStore.fetchUploadId(uploadFile, objectId); val progress = storageService.getProgress(objectId, uploadFile.length()); if (uploadId.isPresent() && progress != null) { if (!uploadId.get().equalsIgnoreCase(progress.getUploadId())) { val msg = String.format( "Local in-progress upload %s conflicts with remote upload in progress %s. Aborting local upload.", uploadId.get(), progress.getUploadId()); throw new NotResumableException(new IllegalStateException(msg)); } } else if (progress != null) { val msg = String .format( "There is already an upload in progress that was started elsewhere with upload id %s. Aborting local upload.", progress.getUploadId()); throw new NotResumableException(new IllegalStateException(msg)); } return progress; }
Source:
public Privilege[] getSupportedPrivileges(String path) throws PathNotFoundException, RepositoryException { return privileges.listOfSupported(); }

Target:
public Privilege[] getSupportedPrivileges(String path) { return privileges.listOfSupported(); }
Source:
public synchronized HashSet<BoltServerAddress> update( ClusterComposition cluster ) { expirationTimeout = cluster.expirationTimestamp; HashSet<BoltServerAddress> removed = new HashSet<>(); readers.update( cluster.readers(), removed ); writers.update( cluster.writers(), removed ); routers.update( cluster.routers(), removed ); return removed; }

Target:
public synchronized Set<BoltServerAddress> update( ClusterComposition cluster ) { expirationTimeout = cluster.expirationTimestamp; HashSet<BoltServerAddress> removed = new HashSet<>(); readers.update( cluster.readers(), removed ); writers.update( cluster.writers(), removed ); routers.update( cluster.routers(), removed ); return removed; }
Source:
private static String toArkUrl(String ark) { if (!(ark.startsWith("http://") || ark.startsWith("https://"))) { String arkUrlBase = Constants.DAMS_ARK_URL_BASE; arkUrlBase += arkUrlBase.endsWith("/") ? "" : "/"; return arkUrlBase + "20775/" + ark; } return ark; }

Target:
private static String toArkUrl(String ark) { if (!(ark.startsWith("http://") || ark.startsWith("https://"))) { String arkUrlBase = Constants.DAMS_ARK_URL_BASE; arkUrlBase += arkUrlBase.endsWith("/") ? "" : "/"; return arkUrlBase + Constants.ARK_ORG + "/" + ark; } return ark; }
Source:
private void fireDataChangedEvents(final String path, Set<IZkDataListenerEntry> listeners, final OptionalLong notificationTime, boolean pathExists) { try { final ZkPathStatRecord pathStatRecord = new ZkPathStatRecord(path); for (final IZkDataListenerEntry listener : listeners) { _eventThread.send(new ZkEvent("Data of " + path + " changed sent to " + listener.getDataListener() + " prefetch data: " + listener.isPrefetchData()) { @Override public void run() throws Exception { if (!pathExists) { listener.getDataListener().handleDataDeleted(path); return; } if (!pathStatRecord.pathChecked()) { pathStatRecord.recordPathStat(getStat(path, true), notificationTime); } Object data = null; if (listener.isPrefetchData()) { if (LOG.isDebugEnabled()) { LOG.debug("Prefetch data for path: {}", path); } try { data = readData(path, null, true); } catch (ZkNoNodeException e) { LOG.warn("Prefetch data for path: failed.", path, e); listener.getDataListener().handleDataDeleted(path); return; } } listener.getDataListener().handleDataChange(path, data); } }); } } catch (Exception e) { LOG.error("Failed to fire data changed event for path: {}", path, e); } }

Target:
private void fireDataChangedEvents(final String path, Set<IZkDataListenerEntry> listeners, final OptionalLong notificationTime, boolean pathExists) { try { final ZkPathStatRecord pathStatRecord = new ZkPathStatRecord(path); for (final IZkDataListenerEntry listener : listeners) { _eventThread.send(new ZkEvent("Data of " + path + " changed sent to " + listener.getDataListener() + " prefetch data: " + listener.isPrefetchData()) { @Override public void run() throws Exception { if (!pathStatRecord.pathChecked()) { pathStatRecord.recordPathStat(getStat(path, pathExists), notificationTime); } if (!pathStatRecord.pathExists()) { listener.getDataListener().handleDataDeleted(path); } else { Object data = null; if (listener.isPrefetchData()) { if (LOG.isDebugEnabled()) { LOG.debug("Prefetch data for path: {}", path); } try { data = readData(path, null, true); } catch (ZkNoNodeException e) { LOG.warn("Prefetch data for path: failed.", path, e); listener.getDataListener().handleDataDeleted(path); return; } } listener.getDataListener().handleDataChange(path, data); } } }); } } catch (Exception e) { LOG.error("Failed to fire data changed event for path: {}", path, e); } }
Source:
public void before(){ browser.navigate().refresh(); Graphene.goTo(JVMPage.class); browser.manage().window().maximize(); Console.withBrowser(browser).waitUntilLoaded(); }

Target:
public void before(){ browser.navigate().refresh(); Graphene.goTo(JVMPage.class); Console.withBrowser(browser).maximizeWindow().waitUntilLoaded(); }
Source:
public void testSystemCrashReportEmailContent() throws IOException { ______TS("user is logged in and the error has message"); AssertionError error = new AssertionError("invalid parameter"); String requestMethod = "GET"; String requestUserAgent = "user-agent"; String requestPath = "/page/studentHome"; String requestUrl = "/page/studentHome/"; String requestParam = "{}"; UserType userType = new UserType("Actual user ABC"); EmailWrapper email = new EmailGenerator().generateSystemErrorEmail(requestMethod, requestUserAgent, requestPath, requestUrl, requestParam, userType, error); String lastCommonLineRegex = "(?s)(at org\\.testng\\.TestRunner\\.run\\(TestRunner\\.java:617\\)\\s*)at.*?(\\s*</code>)"; String modifiedContent = email.getContent().replaceAll(lastCommonLineRegex, "$1...$2"); email.setContent(modifiedContent); String subject = String.format(EmailType.ADMIN_SYSTEM_ERROR.getSubject(), Config.getAppVersion(), error.getMessage()); verifyEmail(email, Config.SUPPORT_EMAIL, subject, "/systemCrashReportEmail.html"); ______TS("user is not logged in and the error has no message"); error = new AssertionError(); email = new EmailGenerator().generateSystemErrorEmail(requestMethod, requestUserAgent, requestPath, requestUrl, requestParam, null, error); subject = String.format(EmailType.ADMIN_SYSTEM_ERROR.getSubject(), Config.getAppVersion(), "java.lang.AssertionError"); modifiedContent = email.getContent().replaceAll(lastCommonLineRegex, "$1...$2"); email.setContent(modifiedContent); verifyEmail(email, Config.SUPPORT_EMAIL, subject, "/systemCrashReportEmail2.html"); }

Target:
public void testSystemCrashReportEmailContent() throws IOException { ______TS("user is logged in and the error has message"); AssertionError error = new AssertionError("invalid parameter"); String requestMethod = "GET"; String requestUserAgent = "user-agent"; String requestPath = "/page/studentHome"; String requestUrl = "/page/studentHome/"; String requestParam = "{}"; UserType userType = new UserType("Actual user ABC"); EmailWrapper email = new EmailGenerator().generateSystemErrorEmail(requestMethod, requestUserAgent, requestPath, requestUrl, requestParam, userType, error); String lastCommonLineRegex = "(?s)(at org\\.testng\\.TestRunner\\.run\\(TestRunner\\.java:617\\)\\s*)at.*?(\\s*</code>)"; String modifiedContent = email.getContent().replaceAll(lastCommonLineRegex, "$1...$2"); email.setContent(modifiedContent); String subject = String.format(EmailType.ADMIN_SYSTEM_ERROR.getSubject(), Config.getAppVersion(), error.getMessage()); verifyEmail(email, Config.SUPPORT_EMAIL, subject, "/systemCrashReportEmail.html"); ______TS("user is not logged in and the error has no message"); error = new AssertionError(); email = new EmailGenerator().generateSystemErrorEmail(requestMethod, requestUserAgent, requestPath, requestUrl, requestParam, null, error); subject = String.format(EmailType.ADMIN_SYSTEM_ERROR.getSubject(), Config.getAppVersion(), "java.lang.AssertionError"); modifiedContent = email.getContent().replaceAll(lastCommonLineRegex, "$1...$2"); email.setContent(modifiedContent); verifyEmail(email, Config.SUPPORT_EMAIL, subject, "/systemCrashReportEmailLessInfo.html"); }
Source:
private Object getNameByValue(Object value) { for (GraphQLEnumValueDefinition valueDefinition : valueDefinitionMap.values()) { Object definitionValue = valueDefinition.getValue(); if (value.equals(definitionValue)) { return valueDefinition.getName(); } if (definitionValue instanceof Enum && value instanceof String) { if (value.equals(definitionValue.toString())) { return valueDefinition.getName(); } } } if (value instanceof Enum) { String enumNameValue = ((Enum<?>) value).name(); for (GraphQLEnumValueDefinition valueDefinition : valueDefinitionMap.values()) { Object definitionValue = String.valueOf(valueDefinition.getValue()); if (enumNameValue.equals(definitionValue)) { return valueDefinition.getName(); } } } throw new CoercingSerializeException("Invalid input for Enum '" + name + "'. Unknown value '" + value + "'"); }

Target:
private Object getNameByValue(Object value) { for (GraphQLEnumValueDefinition valueDefinition : valueDefinitionMap.values()) { Object definitionValue = valueDefinition.getValue(); if (value.equals(definitionValue)) { return valueDefinition.getName(); } if (definitionValue instanceof Enum && value instanceof String) { if (value.equals(((Enum) definitionValue).name())) { return valueDefinition.getName(); } } } if (value instanceof Enum) { String enumNameValue = ((Enum<?>) value).name(); for (GraphQLEnumValueDefinition valueDefinition : valueDefinitionMap.values()) { Object definitionValue = String.valueOf(valueDefinition.getValue()); if (enumNameValue.equals(definitionValue)) { return valueDefinition.getName(); } } } throw new CoercingSerializeException("Invalid input for Enum '" + name + "'. Unknown value '" + value + "'"); }
Source:
public void testDifferentLength() { assertFunction( "zip_with(ARRAY[1], ARRAY['a', 'bc'], (x, y) -> (y, x))", new ArrayType(RowType.anonymous(ImmutableList.of(createVarcharType(2), INTEGER))), ImmutableList.of(ImmutableList.of("a", 1), unmodifiableList(asList("bc", null)))); assertFunction( "zip_with(ARRAY[NULL, 2], ARRAY['a'], (x, y) -> (y, x))", new ArrayType(RowType.anonymous(ImmutableList.of(createVarcharType(1), INTEGER))), ImmutableList.of(unmodifiableList(asList("a", null)), unmodifiableList(asList(null, 2)))); assertFunction( "zip_with(ARRAY[NULL, NULL], ARRAY[NULL, 2, 1], (x, y) -> x + y)", new ArrayType(INTEGER), unmodifiableList(asList(null, null, null))); }

Target:
public void testDifferentLength() { assertFunction( "zip_with(ARRAY[1], ARRAY['a', 'bc'], (x, y) -> (y, x))", new ArrayType(RowType.anonymous(ImmutableList.of(createVarcharType(2), INTEGER))), ImmutableList.of(ImmutableList.of("a", 1), asList("bc", null))); assertFunction( "zip_with(ARRAY[NULL, 2], ARRAY['a'], (x, y) -> (y, x))", new ArrayType(RowType.anonymous(ImmutableList.of(createVarcharType(1), INTEGER))), ImmutableList.of(asList("a", null), asList(null, 2))); assertFunction( "zip_with(ARRAY[NULL, NULL], ARRAY[NULL, 2, 1], (x, y) -> x + y)", new ArrayType(INTEGER), asList(null, null, null)); }
Source:
public List<List<Double>> getRubricWeights() { if (hasAssignedWeights && rubricWeightsForEachCell.isEmpty()) { if (rubricWeights.size() != numOfRubricChoices || rubricWeights.isEmpty()) { return new ArrayList<>(); } for (int i = 0; i < numOfRubricSubQuestions; i++) { rubricWeightsForEachCell.add(new ArrayList<Double>()); for (int j = 0; j < numOfRubricChoices; j++) { rubricWeightsForEachCell.get(i).add(rubricWeights.get(j)); } } return new ArrayList<>(rubricWeightsForEachCell); } else if (hasAssignedWeights && !rubricWeightsForEachCell.isEmpty()) { return new ArrayList<>(rubricWeightsForEachCell); } return new ArrayList<>(); }

Target:
public List<List<Double>> getRubricWeights() { if (hasAssignedWeights && rubricWeightsForEachCell.isEmpty()) { if (rubricWeights.size() != numOfRubricChoices || rubricWeights.isEmpty()) { return new ArrayList<>(); } List<List<Double>> weights = new ArrayList<>(); for (int i = 0; i < numOfRubricSubQuestions; i++) { weights.add(new ArrayList<Double>()); for (int j = 0; j < numOfRubricChoices; j++) { weights.get(i).add(rubricWeights.get(j)); } } return weights; } else if (hasAssignedWeights && !rubricWeightsForEachCell.isEmpty()) { return rubricWeightsForEachCell; } return new ArrayList<>(); }
Source:
public PagedFlux<ChatParticipant> listParticipants(ListParticipantsOptions listParticipantsOptions) { try { return pagedFluxConvert(new PagedFlux<>( () -> withContext(context -> this.threadClient.listChatParticipantsSinglePageAsync( chatThreadId, listParticipantsOptions.getMaxPageSize(), listParticipantsOptions.getSkip(), context)), nextLink -> withContext(context -> this.threadClient.listChatParticipantsNextSinglePageAsync(nextLink, context))), f -> ChatParticipantConverter.convert(f)); } catch (RuntimeException ex) { return new PagedFlux<>(() -> monoError(logger, ex)); } }

Target:
public PagedFlux<ChatParticipant> listParticipants(ListParticipantsOptions listParticipantsOptions) { final ListParticipantsOptions serviceListParticipantsOptions = listParticipantsOptions == null ? new ListParticipantsOptions() : listParticipantsOptions; try { return pagedFluxConvert(new PagedFlux<>( () -> withContext(context -> this.chatThreadClient.listChatParticipantsSinglePageAsync( chatThreadId, serviceListParticipantsOptions.getMaxPageSize(), serviceListParticipantsOptions.getSkip(), context)), nextLink -> withContext(context -> this.chatThreadClient.listChatParticipantsNextSinglePageAsync(nextLink, context))), f -> ChatParticipantConverter.convert(f)); } catch (RuntimeException ex) { return new PagedFlux<>(() -> monoError(logger, ex)); } }