auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testFailoverDuringNomadCommitForPassiveRemoval() throws Exception { final int activeId = findActive(1).getAsInt(); final int passiveId = findPassives(1)[0]; String propertySettingString = "stripe.1.node." + activeId + ".tc-properties.failoverDeletion=killDeletion-commit"; assertThat(configToolInvocation("set", "-s", "localhost:" + getNodePort(1, 1), "-c", propertySettingString), is(successful())); assertThat( configToolInvocation("-e", "40s", "detach", "-f", "-d", "localhost:" + getNodePort(1, activeId), "-s", "localhost:" + getNodePort(1, passiveId)), containsOutput("Two-Phase commit failed")); assertPassiveStopped(passiveId); startNode(1, activeId, "-r", getNode(1, activeId).getConfigRepo()); assertThat( configToolInvocation("-t", "5s", "repair", "-f", "commit", "-s", "localhost:" + getNodePort(1, activeId)), is(successful())); withTopologyService(1, activeId, topologyService -> assertTrue(topologyService.isActivated())); withTopologyService(1, activeId, topologyService -> assertFalse(topologyService.hasIncompleteChange())); assertThat(getUpcomingCluster("localhost", getNodePort(1, activeId)).getNodeCount(), is(equalTo(1))); assertThat(getRuntimeCluster("localhost", getNodePort(1, activeId)).getNodeCount(), is(equalTo(1))); }

Target:
public void testFailoverDuringNomadCommitForPassiveRemoval() throws Exception { final int activeId = findActive(1).getAsInt(); final int passiveId = findPassives(1)[0]; String propertySettingString = "stripe.1.node." + activeId + ".tc-properties.failoverDeletion=killDeletion-commit"; assertThat(configToolInvocation("set", "-s", "localhost:" + getNodePort(1, 1), "-c", propertySettingString), is(successful())); assertThat( configToolInvocation("-e", "40s", "detach", "-f", "-d", "localhost:" + getNodePort(1, activeId), "-s", "localhost:" + getNodePort(1, passiveId)), containsOutput("Two-Phase commit failed")); waitUntil(() -> tsa.getStopped().size(), is(2)); startNode(1, activeId, "-r", getNode(1, activeId).getConfigRepo()); assertThat( configToolInvocation("-t", "5s", "repair", "-f", "commit", "-s", "localhost:" + getNodePort(1, activeId)), is(successful())); withTopologyService(1, activeId, topologyService -> assertTrue(topologyService.isActivated())); withTopologyService(1, activeId, topologyService -> assertFalse(topologyService.hasIncompleteChange())); assertThat(getUpcomingCluster("localhost", getNodePort(1, activeId)).getNodeCount(), is(equalTo(1))); assertThat(getRuntimeCluster("localhost", getNodePort(1, activeId)).getNodeCount(), is(equalTo(1))); }
Source:
public boolean isWakeupEvent(ITmfEvent event) { String eventName = event.getName(); if (eventName.equals("sched_ttwu")) { System.out.println(event); } ITmfTrace trace = event.getTrace(); IKernelAnalysisEventLayout eventLayout = getProvider().getEventLayout(event.getTrace()); String wakeupEventName = NonNullUtils.nullToEmptyString(fWakeupEventMap.get(trace)); if (eventLayout instanceof LttngEventLayout) { LttngEventLayout layoutDefault = (LttngEventLayout) eventLayout; if (wakeupEventName.equals(layoutDefault.eventSchedProcessTTWU())) { return eventName.equals(layoutDefault.eventSchedProcessTTWU()); } } if (eventLayout instanceof Lttng28EventLayout) { Lttng28EventLayout layout28 = (Lttng28EventLayout) eventLayout; if (wakeupEventName.equals(layout28.eventSchedProcessWaking())) { return (eventName.equals(layout28.eventSchedProcessWaking()) || eventName.equals(layout28.eventSchedProcessWakeupNew())); } } return false; }

Target:
public boolean isWakeupEvent(ITmfEvent event) { String eventName = event.getName(); ITmfTrace trace = event.getTrace(); IKernelAnalysisEventLayout eventLayout = getProvider().getEventLayout(event.getTrace()); String wakeupEventName = NonNullUtils.nullToEmptyString(fWakeupEventMap.get(trace)); if (eventLayout instanceof LttngEventLayout) { LttngEventLayout layoutDefault = (LttngEventLayout) eventLayout; if (wakeupEventName.equals(layoutDefault.eventSchedProcessTTWU())) { return eventName.equals(layoutDefault.eventSchedProcessTTWU()); } } if (eventLayout instanceof Lttng28EventLayout) { Lttng28EventLayout layout28 = (Lttng28EventLayout) eventLayout; if (wakeupEventName.equals(layout28.eventSchedProcessWaking())) { return (eventName.equals(layout28.eventSchedProcessWaking()) || eventName.equals(layout28.eventSchedProcessWakeupNew())); } } return false; }
Source:
public void checkDeploymentOrder(boolean set) { boolean orderIsBlank = StringUtils.isBlank(deploymentOrder.getText()); if (set) { assertFalse(orderIsBlank); } else { assertTrue(orderIsBlank); } }

Target:
public void checkDeploymentOrder(boolean set) { assertEquals(!set, StringUtils.isBlank(deploymentOrder.getText())); }
Source:
public static void main(String[] args) throws IOException { User user1 = new User(); user1.setName("Alyssa"); user1.setFavoriteNumber(256); User user2 = new User("Ben", 7, "red"); User user3 = User.newBuilder() .setName("Charlie") .setFavoriteColor("blue") .setFavoriteNumber(null) .build(); File file = new File("users.avro"); DatumWriter<User> userDatumWriter = new SpecificDatumWriter<User>(User.class); DataFileWriter<User> dataFileWriter = new DataFileWriter<User>(userDatumWriter); dataFileWriter.create(user1.getSchema(), file); dataFileWriter.append(user1); dataFileWriter.append(user2); dataFileWriter.append(user3); dataFileWriter.close(); DatumReader<User> userDatumReader = new SpecificDatumReader<User>(User.class); DataFileReader<User> dataFileReader = new DataFileReader<User>(file, userDatumReader); User user = null; while (dataFileReader.hasNext()) { user = dataFileReader.next(user); System.out.println(user); } dataFileReader.close(); }

Target:
public static void main(String[] args) throws IOException { User user1 = new User(); user1.setName("Alyssa"); user1.setFavoriteNumber(256); User user2 = new User("Ben", 7, "red"); User user3 = User.newBuilder() .setName("Charlie") .setFavoriteColor("blue") .setFavoriteNumber(null) .build(); File file = new File("users.avro"); DatumWriter<User> userDatumWriter = new SpecificDatumWriter<User>(User.class); DataFileWriter<User> dataFileWriter = new DataFileWriter<User>(userDatumWriter); dataFileWriter.create(user1.getSchema(), file); dataFileWriter.append(user1); dataFileWriter.append(user2); dataFileWriter.append(user3); dataFileWriter.close(); DatumReader<User> userDatumReader = new SpecificDatumReader<User>(User.class); User user = null; try(DataFileReader<User> dataFileReader = new DataFileReader<User>(file, userDatumReader)){ while (dataFileReader.hasNext()) { user = dataFileReader.next(user); System.out.println(user); } } }
Source:
public void updateFeaturedImage(long id) { if (mFeaturedImageId != id) { mFeaturedImageId = id; if (mFeaturedImageId > 0) { MediaModel media = mMediaStore.getSiteMediaWithId(mSite, mFeaturedImageId); if (media == null || getActivity() == null) { return; } mFeaturedImageView.setVisibility(View.VISIBLE); mFeaturedImageButton.setVisibility(View.GONE); int width = DisplayUtils.getDisplayPixelWidth(getActivity()); int height = DisplayUtils.getDisplayPixelHeight(getActivity()); int size = Math.max(width, height); String mediaUri = media.getThumbnailUrl(); if (SiteUtils.isPhotonCapable(mSite)) { mediaUri = PhotonUtils.getPhotonImageUrl(mediaUri, size, 0); } WordPressMediaUtils.loadNetworkImage(mediaUri, mFeaturedImageView, mImageLoader); } else { mFeaturedImageView.setVisibility(View.GONE); mFeaturedImageButton.setVisibility(View.VISIBLE); } } }

Target:
public void updateFeaturedImage(long id) { if (mFeaturedImageId != id) { mFeaturedImageId = id; if (mFeaturedImageId > 0) { MediaModel media = mMediaStore.getSiteMediaWithId(mSite, mFeaturedImageId); if (media == null || !isAdded()) { return; } mFeaturedImageView.setVisibility(View.VISIBLE); mFeaturedImageButton.setVisibility(View.GONE); int width = DisplayUtils.getDisplayPixelWidth(getActivity()); int height = DisplayUtils.getDisplayPixelHeight(getActivity()); int size = Math.max(width, height); String mediaUri = media.getThumbnailUrl(); if (SiteUtils.isPhotonCapable(mSite)) { mediaUri = PhotonUtils.getPhotonImageUrl(mediaUri, size, 0); } WordPressMediaUtils.loadNetworkImage(mediaUri, mFeaturedImageView, mImageLoader); } else { mFeaturedImageView.setVisibility(View.GONE); mFeaturedImageButton.setVisibility(View.VISIBLE); } } }
Source:
public void glancingTest() { Rectangle bounds = new Rectangle(0, 0, 0, 0); bounds.x = 0; bounds.y = 0; bounds.height = 638; bounds.width = 1119; int x0 = 1115; int y0 = -468; int x1 = 1132; int y1 = 42; Rectangle rect = LineClipper.clip(bounds, x0, y0, x1, y1); assertEquals(null, rect); }

Target:
public void glancingTest() { Rectangle bounds = new Rectangle(0, 0, 638, 1119); int x0 = 1115; int y0 = -468; int x1 = 1132; int y1 = 42; Rectangle rect = LineClipper.clip(bounds, x0, y0, x1, y1); assertEquals(null, rect); }
Source:
public void adminSignInWithPhone() { account.setReauthToken(REAUTH_TOKEN); StudyParticipant participant = new StudyParticipant.Builder() .copyOf(PARTICIPANT).withRoles(Sets.newHashSet(Roles.RESEARCHER)).build(); doReturn(account).when(accountDao).authenticate(study, PHONE_PASSWORD_SIGN_IN); doReturn(participant).when(participantService).getParticipant(study, account, false); UserSession retrieved = service.signIn(study, CONTEXT, PHONE_PASSWORD_SIGN_IN); assertEquals(REAUTH_TOKEN, retrieved.getReauthToken()); }

Target:
public void adminSignInWithPhone() { account.setReauthToken(REAUTH_TOKEN); StudyParticipant participant = new StudyParticipant.Builder() .copyOf(PARTICIPANT).withRoles(Sets.newHashSet(Roles.RESEARCHER)).build(); doReturn(account).when(accountDao).authenticate(study, PHONE_PASSWORD_SIGN_IN); doReturn(participant).when(participantService).getParticipant(study, account, false); doReturn(UNCONSENTED_STATUS_MAP).when(consentService).getConsentStatuses(any(), any()); UserSession retrieved = service.signIn(study, CONTEXT, PHONE_PASSWORD_SIGN_IN); assertEquals(REAUTH_TOKEN, retrieved.getReauthToken()); assertEquals(UNCONSENTED_STATUS_MAP, retrieved.getConsentStatuses()); }
Source:
public boolean uploadSuppliers(List<PaymentWorksSupplierUploadDTO> paymentWorksSupplierUploadDTO) { PaymentWorksSupplierConversionUtil paymentWorksSupplierConversionUtil = new PaymentWorksSupplierConversionUtil(); boolean isUploaded = false; MultiPart multiPart = new MultiPart(); multiPart.setMediaType(MediaType.MULTIPART_FORM_DATA_TYPE); String supplierUploadFileName = paymentWorksSupplierConversionUtil.createSupplierUploadFile(paymentWorksSupplierUploadDTO, directoryPath); FormDataBodyPart fileDataBodyPart = new FileDataBodyPart("suppliers", new File(supplierUploadFileName), MediaType.MULTIPART_FORM_DATA_TYPE); multiPart.bodyPart(fileDataBodyPart); Client client = buildClient(); String URL = (new StringBuilder(getPaymentworksApiUrl()).append(NEW_VENDOR_REQUEST_SUPPLIER_UPLOAD)).toString(); ClientResponse response = client.handle(buildClientRequest(URL, multiPart)); LOG.debug("updateNewVendorStatusInPaymentWorks, Status: " + response.getStatus()); paymentWorksSupplierConversionUtil.deleteSupplierUploadFile(supplierUploadFileName); LOG.info("Status: " + response.getStatus()); if (response.getStatus() == 200) { isUploaded = true; LOG.debug("Supplier upload succeeded for " + paymentWorksSupplierUploadDTO.size() + " vendor records"); } else { isUploaded = false; LOG.error("Failed to upload Supplier File for " + paymentWorksSupplierUploadDTO.size() + " vendor records: " + response.getEntity(String.class)); } return isUploaded; }

Target:
public boolean uploadSuppliers(List<PaymentWorksSupplierUploadDTO> paymentWorksSupplierUploadDTO) { PaymentWorksSupplierConversionUtil paymentWorksSupplierConversionUtil = new PaymentWorksSupplierConversionUtil(); boolean isUploaded = false; MultiPart multiPart = new MultiPart(); multiPart.setMediaType(MediaType.MULTIPART_FORM_DATA_TYPE); String supplierUploadFileName = paymentWorksSupplierConversionUtil .createSupplierUploadFile(paymentWorksSupplierUploadDTO, directoryPath); FormDataBodyPart fileDataBodyPart = new FileDataBodyPart("suppliers", new File(supplierUploadFileName), MediaType.MULTIPART_FORM_DATA_TYPE); multiPart.bodyPart(fileDataBodyPart); Client client = buildClient(); String URL = (new StringBuilder(getPaymentworksApiUrl()).append(NEW_VENDOR_REQUEST_SUPPLIER_UPLOAD)).toString(); ClientResponse response = client.handle(buildClientRequest(URL, multiPart)); LOG.debug("updateNewVendorStatusInPaymentWorks, Status: " + response.getStatus()); paymentWorksSupplierConversionUtil.deleteSupplierUploadFile(supplierUploadFileName); if (response.getStatus() == HttpURLConnection.HTTP_OK) { isUploaded = true; LOG.debug("Supplier upload succeeded for " + paymentWorksSupplierUploadDTO.size() + " vendor records"); } else { isUploaded = false; LOG.error("Failed to upload Supplier File for " + paymentWorksSupplierUploadDTO.size() + " vendor records: " + response.getEntity(String.class)); throw new RuntimeException("Unable to send supplier file to PaymentWorks"); } return isUploaded; }
Source:
public boolean isItemBlock() { if (stack.isEmpty()) { return false; } return stack.getItem() instanceof ItemBlock; }

Target:
public boolean isItemBlock() { return stack.getItem() instanceof ItemBlock; }
Source:
public LocalizationUtils(final String fileName) { log.info("Start initializing {}", getClass().getSimpleName()); messageSource = fileName.replaceAll("\\.properties$", ""); resourceBundlesByLocale = new HashMap<>(); for (Locale locale : Locale.getAvailableLocales()) { getResourceBundle(locale); } log.info("Finished initializing {}", getClass().getSimpleName()); }

Target:
public LocalizationUtils(final String fileName) { log.info("Start initializing {}", getClass().getSimpleName()); messageSource = fileName.replaceAll("\\.properties$", ""); resourceBundlesByLocale = new ConcurrentHashMap<>(); getResourceBundle(Locale.getDefault()); log.info("Finished initializing {}", getClass().getSimpleName()); }
Source:
public JdbcOAuth2AuthorizedClientService(JdbcOperations jdbcOperations, ClientRegistrationRepository clientRegistrationRepository, LobHandler lobHandler) { Assert.notNull(lobHandler, "LobHandler must not be null"); this.lobHandler = lobHandler; Assert.notNull(jdbcOperations, "jdbcOperations cannot be null"); Assert.notNull(clientRegistrationRepository, "clientRegistrationRepository cannot be null"); this.jdbcOperations = jdbcOperations; OAuth2AuthorizedClientRowMapper oAuth2AuthorizedClientRowMapper = new OAuth2AuthorizedClientRowMapper( clientRegistrationRepository); oAuth2AuthorizedClientRowMapper.setLobHandler(lobHandler); this.authorizedClientRowMapper = oAuth2AuthorizedClientRowMapper; this.authorizedClientParametersMapper = new OAuth2AuthorizedClientParametersMapper(); }

Target:
public JdbcOAuth2AuthorizedClientService(JdbcOperations jdbcOperations, ClientRegistrationRepository clientRegistrationRepository, LobHandler lobHandler) { Assert.notNull(jdbcOperations, "jdbcOperations cannot be null"); Assert.notNull(clientRegistrationRepository, "clientRegistrationRepository cannot be null"); Assert.notNull(lobHandler, "LobHandler must not be null"); this.jdbcOperations = jdbcOperations; this.lobHandler = lobHandler; OAuth2AuthorizedClientRowMapper authorizedClientRowMapper = new OAuth2AuthorizedClientRowMapper( clientRegistrationRepository); authorizedClientRowMapper.setLobHandler(lobHandler); this.authorizedClientRowMapper = authorizedClientRowMapper; this.authorizedClientParametersMapper = new OAuth2AuthorizedClientParametersMapper(); }
Source:
public DateTimeSettings(DateTimeSettings other) { this.datepicker = other.datepicker; this.timepicker = other.timepicker; }

Target:
public DateTimeSettings(DateTimeSettings other) { this.datepicker = (other.datepicker != null) ? new Datepicker(other.datepicker) : null; this.timepicker = (other.timepicker != null) ? new Timepicker(other.timepicker) : null; }
Source:
public Response getVersion() { CacheScheduler.CacheState cacheState = factory.entry.getCacheState(); if (cacheState instanceof CacheScheduler.NoCache) { return Response.status(Response.Status.NOT_FOUND).build(); } else { String version = ((CacheScheduler.VersionedCache) cacheState).getVersion(); return Response.ok(ImmutableMap.of("version", version)).build(); } }

Target:
public Response getVersion() { final CacheScheduler.CacheState cacheState = factory.entry.getCacheState(); if (cacheState instanceof CacheScheduler.NoCache) { return Response.status(Response.Status.NOT_FOUND).build(); } else { String version = ((CacheScheduler.VersionedCache) cacheState).getVersion(); return Response.ok(ImmutableMap.of("version", version)).build(); } }
Source:
public EnvironmentAuthentication dtoToAuthentication(AuthenticationDto authenticationDto) { EnvironmentAuthentication environmentAuthentication = new EnvironmentAuthentication(); if (StringUtils.isNotEmpty(authenticationDto.getPublicKey())) { ValidationResult validationResult = publicKeyValidator.validatePublicKey(authenticationDto.getPublicKey()); if (!validationResult.hasError()) { List<String> parts = Arrays.asList(StringUtils.split(authenticationDto.getPublicKey(), " ")); environmentAuthentication.setPublicKey(String.format("%s %s %s", parts.get(0), parts.get(1), "cloudbreak")); } } environmentAuthentication.setLoginUserName(authenticationDto.getLoginUserName()); environmentAuthentication.setPublicKeyId(authenticationDto.getPublicKeyId()); environmentAuthentication.setManagedKey(authenticationDto.isManagedKey()); return environmentAuthentication; }

Target:
public EnvironmentAuthentication dtoToAuthentication(AuthenticationDto authenticationDto) { EnvironmentAuthentication environmentAuthentication = new EnvironmentAuthentication(); if (StringUtils.isNotEmpty(authenticationDto.getPublicKey())) { ValidationResult validationResult = publicKeyValidator.validatePublicKey(authenticationDto.getPublicKey()); if (!validationResult.hasError()) { List<String> parts = Arrays.asList(StringUtils.split(authenticationDto.getPublicKey(), " ")); environmentAuthentication.setPublicKey(String.format("%s %s %s", parts.get(0), parts.get(1), authenticationDto.getLoginUserName())); } } environmentAuthentication.setLoginUserName(authenticationDto.getLoginUserName()); environmentAuthentication.setPublicKeyId(authenticationDto.getPublicKeyId()); environmentAuthentication.setManagedKey(authenticationDto.isManagedKey()); return environmentAuthentication; }
Source:
public void testImportUserWithNullAttribute() { RealmRepresentation rep = loadJson(getClass().getResourceAsStream("/import/testrealm-user-null-attr.json"), RealmRepresentation.class); try (Creator<RealmResource> c = Creator.create(adminClient, rep)) { List<UserRepresentation> users = c.resource().users().list(); assertThat(users.size(), equalTo(1)); assertThat(users.get(0).getAttributes().size(), equalTo(2)); } }

Target:
public void testImportUserWithNullAttribute() { RealmRepresentation rep = loadJson(getClass().getResourceAsStream("/import/testrealm-user-null-attr.json"), RealmRepresentation.class); try (Creator<RealmResource> c = Creator.create(adminClient, rep)) { List<UserRepresentation> users = c.resource().users().list(); assertThat(users, hasSize(1)); assertThat(users.get(0).getAttributes().size(), equalTo(2)); } }
Source:
public TaskStats summarizeFinal() { return new TaskStats( createTime, firstStartTime, lastStartTime, lastEndTime, endTime, elapsedTime, queuedTime, totalDrivers, queuedDrivers, queuedPartitionedDrivers, runningDrivers, runningPartitionedDrivers, completedDrivers, cumulativeMemory, memoryReservation, systemMemoryReservation, totalScheduledTime, totalCpuTime, totalUserTime, totalBlockedTime, fullyBlocked, blockedReasons, rawInputDataSize, rawInputPositions, processedInputDataSize, processedInputPositions, outputDataSize, outputPositions, spilledDataSize, pipelines.stream() .map(PipelineStats::summarize) .collect(Collectors.toList()) ); }

Target:
public TaskStats summarizeFinal() { return new TaskStats( createTime, firstStartTime, lastStartTime, lastEndTime, endTime, elapsedTime, queuedTime, totalDrivers, queuedDrivers, queuedPartitionedDrivers, runningDrivers, runningPartitionedDrivers, blockedDrivers, completedDrivers, cumulativeMemory, memoryReservation, systemMemoryReservation, totalScheduledTime, totalCpuTime, totalUserTime, totalBlockedTime, fullyBlocked, blockedReasons, rawInputDataSize, rawInputPositions, processedInputDataSize, processedInputPositions, outputDataSize, outputPositions, spilledDataSize, pipelines.stream() .map(PipelineStats::summarize) .collect(Collectors.toList())); }
Source:
public void onReceive(Context ctx, Intent intent) { String referrerStr = intent.getStringExtra(REFERRER_KEY); if (!INSTALL_ACTION.equals(intent.getAction()) || referrerStr == null) { return; } L.d(">>>>> Received install referrer: " + referrerStr); Map<String, String> params = NetworkUtils.getUrlQueryParams(referrerStr); InstallReferrerFunnel funnel = new InstallReferrerFunnel(WikipediaApp.getInstance(), Site.forLanguage("en")); funnel.logInstall(params.get(InstallReferrerFunnel.PARAM_REFERRER_URL), params.get(InstallReferrerFunnel.PARAM_CAMPAIGN_ID), params.get(InstallReferrerFunnel.PARAM_INSTALL_ID)); }

Target:
public void onReceive(Context ctx, Intent intent) { String referrerStr = intent.getStringExtra(REFERRER_KEY); L.d(">>>>> Received install referrer: " + referrerStr); if (!INSTALL_ACTION.equals(intent.getAction()) || TextUtils.isEmpty(referrerStr)) { return; } Uri uri = Uri.parse("/?" + referrerStr); InstallReferrerFunnel funnel = new InstallReferrerFunnel(WikipediaApp.getInstance(), Site.forLanguage("test")); funnel.logInstall(uri.getQueryParameter(InstallReferrerFunnel.PARAM_REFERRER_URL), uri.getQueryParameter(InstallReferrerFunnel.PARAM_CAMPAIGN_ID), uri.getQueryParameter(InstallReferrerFunnel.PARAM_CAMPAIGN_INSTALL_ID)); }
Source:
public void testGetAllForVMFilteredWithPermissionsNoPermissions() { List<DiskImage> disks = dao.getAllForVm(EXISTING_VM_ID, UNPRIVILEGED_USER_ID, true); assertEquals("VM should have two disks", 0, disks.size()); }

Target:
public void testGetAllForVMFilteredWithPermissionsNoPermissions() { List<DiskImage> disks = dao.getAllForVm(EXISTING_VM_ID, UNPRIVILEGED_USER_ID, true); assertTrue("VM should have no disks viewable to the user", disks.isEmpty()); }
Source:
public ResponseEntity<GeoJsonDiseaseOccurrenceFeatureCollection> getDiseaseOccurrencesForReviewByCurrentUser( @PathVariable Integer validatorDiseaseGroupId) { Integer userId = currentUserService.getCurrentUserId(); boolean userIsSeeg = userIsSeegMember(userId); try { List<DiseaseOccurrence> occurrences = expertService.getDiseaseOccurrencesYetToBeReviewedByExpert( userId, userIsSeeg, validatorDiseaseGroupId); return new ResponseEntity<>(new GeoJsonDiseaseOccurrenceFeatureCollection(occurrences), HttpStatus.OK); } catch (IllegalArgumentException e) { return new ResponseEntity<>(HttpStatus.BAD_REQUEST); } }

Target:
public ResponseEntity<GeoJsonDiseaseOccurrenceFeatureCollection> getDiseaseOccurrencesForReviewByCurrentUser( @PathVariable Integer validatorDiseaseGroupId) { Integer expertId = currentUserService.getCurrentUserId(); boolean userIsSeeg = userIsSeegMember(expertId); try { List<DiseaseOccurrence> occurrences = expertService.getDiseaseOccurrencesYetToBeReviewedByExpert( expertId, userIsSeeg, validatorDiseaseGroupId); return new ResponseEntity<>(new GeoJsonDiseaseOccurrenceFeatureCollection(occurrences), HttpStatus.OK); } catch (IllegalArgumentException e) { return new ResponseEntity<>(HttpStatus.BAD_REQUEST); } }
Source:
public static Job getWorkspaceLoadingJob(CliCommandLine commandLine) { ExecuteCliParsersJob job = new ExecuteCliParsersJob(commandLine); return job; }

Target:
public static Job getWorkspaceLoadingJob(CliCommandLine commandLine) { return new ExecuteCliParsersJob(commandLine); }
Source:
protected void executeQueryCommand() { getQueryReturnValue().setReturnValue(CpuFlagsManagerHandler.AllServerCpuList(getVersion())); }

Target:
protected void executeQueryCommand() { getQueryReturnValue().setReturnValue(CpuFlagsManagerHandler.AllServerCpuList( getParameters().<Version>getParameterValue(GenericVdcParameter.Version))); }
Source:
@Override public boolean validRexOperands(int count, Litmus litmus) { if (count <= 0) { return litmus.fail("wrong operand count for {}, Need at least one RexOperand!", count, this); } return litmus.succeed(); }

Target:
@Override public boolean validRexOperands(int count, Litmus litmus) { return litmus.succeed(); }
Source:
@Override public void push(Row row) { checkThread(); assert downstream != null; waiting--; if (!ended && rowNum >= offset) { requested--; downstream.push(row); } rowNum++; if (requested > 0 && limit > 0 && rowNum >= limit + offset) end(); if (!ended && requested > 0 && waiting == 0) request0(IN_BUFFER_SIZE); }

Target:
@Override public void push(Row row) { checkThread(); assert downstream != null; waiting--; if (!ended && rowNum >= offset) { requested--; downstream.push(row); } rowNum++; if (requested > 0 && limit > 0 && rowNum >= limit + offset) { sources.get(0).cancel(); end(); } if (!ended && requested > 0 && waiting == 0) request0(IN_BUFFER_SIZE); }
Source:
public void testAuthorizer() throws Exception { ResourcePattern resource = new ResourcePattern(ResourceType.TOPIC, "resource-1", PatternType.LITERAL); List<Action> actions = Collections.singletonList(new Action(AclOperation.WRITE, resource, 1, true, true)); RequestHeader header = new RequestHeader(ApiKeys.PRODUCE, new Integer(1).shortValue(), "someclient", 1); RequestContext context = new RequestContext(header, "1", InetAddress.getLocalHost(), KafkaPrincipal.ANONYMOUS, ListenerName.normalised("listener"), SecurityProtocol.PLAINTEXT, ClientInformation.EMPTY); aclAuthorizer.authorize(context, actions); }

Target:
public void testAuthorizer() throws Exception { aclAuthorizer.authorize(context, actions); }
Source:
LedgerMetadataBuilder withWriteQuorumSize(int writeQuorumSize) { checkArgument(ensembleSize >= writeQuorumSize, "Write quorum must be less or equal to ensemble size"); this.writeQuorumSize = writeQuorumSize; return this; }

Target:
LedgerMetadataBuilder withWriteQuorumSize(int writeQuorumSize) { checkArgument(ensembleSize >= writeQuorumSize, "Write quorum must be less or equal to ensemble size"); checkArgument(writeQuorumSize >= ackQuorumSize, "Write quorum must be greater or equal to ack quorum"); this.writeQuorumSize = writeQuorumSize; return this; }
Source:
public CompletableFuture<Void> visitReplaceCommand(InvocationContext ctx, ReplaceCommand command) throws Throwable { ctx.onReturn((ctx1, command1, rv, throwable) -> { if (throwable != null) throw throwable; if (!isStoreEnabled(command) || ctx.isInTxScope() || !command.isSuccessful()) return null; if (!isProperWriter(ctx, command, command.getKey())) return null; Object key = command.getKey(); storeEntry(ctx, key, command); if (getStatisticsEnabled()) cacheStores.incrementAndGet(); return null; }); return ctx.continueInvocation(); }

Target:
public CompletableFuture<Void> visitReplaceCommand(InvocationContext ctx, ReplaceCommand command) throws Throwable { return ctx.onReturn((rCtx, rCommand, rv, throwable) -> { if (throwable != null) throw throwable; ReplaceCommand replaceCommand = (ReplaceCommand) rCommand; if (!isStoreEnabled(replaceCommand) || rCtx.isInTxScope() || !replaceCommand.isSuccessful()) return null; if (!isProperWriter(rCtx, replaceCommand, replaceCommand.getKey())) return null; Object key = replaceCommand.getKey(); storeEntry(rCtx, key, replaceCommand); if (getStatisticsEnabled()) cacheStores.incrementAndGet(); return null; }); }
Source:
public void createCorrelationId() { final String projectKey = "my-project"; final CorrelationIdGenerator correlationIdGenerator = CorrelationIdGenerator.of(projectKey); assertThat(correlationIdGenerator.getProjectKey()).isEqualTo(projectKey); final String correlationId = correlationIdGenerator.createCorrelationId(); final List<String> correlationIdParts = Arrays.asList(correlationId.split("/")); assertThat(correlationIdParts).hasSize(2); assertThat(correlationIdParts.get(0)).isEqualTo(projectKey); final UUID uuid = UUID.fromString(correlationIdParts.get(1)); assertThat(uuid).isNotNull(); }

Target:
public void createCorrelationId() { final String projectKey = "my-project"; final CorrelationIdGenerator correlationIdGenerator = CorrelationIdGenerator.of(projectKey); final String correlationId = correlationIdGenerator.get(); final List<String> correlationIdParts = Arrays.asList(correlationId.split("/")); assertThat(correlationIdParts).hasSize(2); assertThat(correlationIdParts.get(0)).isEqualTo(projectKey); final UUID uuid = UUID.fromString(correlationIdParts.get(1)); assertThat(uuid).isNotNull(); }
Source:
private int[] createNewQuestionsForDifferentRecipientTypes() throws Exception { int[] num = new int[] { 2, 3, 1, 2 }; FeedbackQuestionAttributes fqa; for (int i = 1; i <= num[0]; i++) { fqa = getNewFeedbackQuestionAttributes(); fqa.questionNumber = i; fqa.giverType = FeedbackParticipantType.INSTRUCTORS; fqDb.createEntity(fqa); } for (int i = 1; i <= num[1]; i++) { fqa = getNewFeedbackQuestionAttributes(); fqa.questionNumber = num[0] + i; fqa.giverType = FeedbackParticipantType.STUDENTS; fqDb.createEntity(fqa); } for (int i = 1; i <= num[2]; i++) { fqa = getNewFeedbackQuestionAttributes(); fqa.giverType = FeedbackParticipantType.SELF; fqa.questionNumber = num[0] + num[1] + i; fqDb.createEntity(fqa); } for (int i = 1; i <= num[3]; i++) { fqa = getNewFeedbackQuestionAttributes(); fqa.giverType = FeedbackParticipantType.TEAMS; fqa.questionNumber = num[0] + num[1] + num[2] + i; fqDb.createEntity(fqa); } return num; }

Target:
private int[] createNewQuestionsForDifferentRecipientTypes() throws Exception { int[] numberOfQuestionsToCreate = new int[] { 2, 3, 1, 2 }; FeedbackQuestionAttributes fqa; for (int i = 1; i <= numberOfQuestionsToCreate[0]; i++) { fqa = getNewFeedbackQuestionAttributes(); fqa.questionNumber = i; fqa.giverType = FeedbackParticipantType.INSTRUCTORS; fqDb.createEntity(fqa); } for (int i = 1; i <= numberOfQuestionsToCreate[1]; i++) { fqa = getNewFeedbackQuestionAttributes(); fqa.questionNumber = numberOfQuestionsToCreate[0] + i; fqa.giverType = FeedbackParticipantType.STUDENTS; fqDb.createEntity(fqa); } for (int i = 1; i <= numberOfQuestionsToCreate[2]; i++) { fqa = getNewFeedbackQuestionAttributes(); fqa.giverType = FeedbackParticipantType.SELF; fqa.questionNumber = numberOfQuestionsToCreate[0] + numberOfQuestionsToCreate[1] + i; fqDb.createEntity(fqa); } for (int i = 1; i <= numberOfQuestionsToCreate[3]; i++) { fqa = getNewFeedbackQuestionAttributes(); fqa.giverType = FeedbackParticipantType.TEAMS; fqa.questionNumber = numberOfQuestionsToCreate[0] + numberOfQuestionsToCreate[1] + numberOfQuestionsToCreate[2] + i; fqDb.createEntity(fqa); } return numberOfQuestionsToCreate; }
Source:
private void validate() { inOrderOrEqual(expiry.toLocalDate(), paymentCurrencyAmount.getDate().getUnadjusted(), "expiry.date", "underlying.paymentDate"); }

Target:
private void validate() { inOrderOrEqual(expiry.toLocalDate(), paymentCurrencyAmount.getDate(), "expiry.date", "underlying.paymentDate"); ArgChecker.isTrue(index.getCurrencyPair().contains(paymentCurrencyAmount.getCurrency()), "The payment currency must be one of the underlying currency pairs"); }
Source:
public boolean equals(Object o) { boolean equals = false; if (ObjectUtils.isNotNull(o) && o instanceof GroupLevel) { GroupLevel otherGl = (GroupLevel) o; equals = StringUtils.equals(groupName, otherGl.getGroupName()) && StringUtils.equals(groupValue, otherGl.getGroupValue()) && StringUtils.equals(friendlyName, otherGl.getFriendlyName()) && Objects.equals(cost, otherGl.getCost()) && Objects.equals(usageQuantity, otherGl.getUsageQuantity()) && CollectionUtils.isEqualCollection(nextLevel, otherGl.getNextLevel()); } return equals; }

Target:
public boolean equals(Object o) { boolean equals = false; if (ObjectUtils.isNotNull(o) && o instanceof GroupLevel) { GroupLevel otherGroupLevel = (GroupLevel) o; equals = StringUtils.equals(groupName, otherGroupLevel.getGroupName()) && StringUtils.equals(groupValue, otherGroupLevel.getGroupValue()) && StringUtils.equals(friendlyName, otherGroupLevel.getFriendlyName()) && Objects.equals(cost, otherGroupLevel.getCost()) && Objects.equals(usageQuantity, otherGroupLevel.getUsageQuantity()) && CollectionUtils.isEqualCollection(nextLevel, otherGroupLevel.getNextLevel()); } return equals; }
Source:
public OMRequest preExecute(OzoneManager ozoneManager) throws IOException { S3DeleteBucketRequest s3DeleteBucketRequest = getOmRequest().getDeleteS3BucketRequest(); Preconditions.checkNotNull(s3DeleteBucketRequest); int bucketLength = s3DeleteBucketRequest.getS3BucketName().length(); if (bucketLength < 3 || bucketLength >= 64) { throw new OMException("S3BucketName must be at least 3 and not more " + "than 63 characters long", OMException.ResultCodes.S3_BUCKET_INVALID_LENGTH); } return getOmRequest().toBuilder().setUserInfo(getUserInfo()).build(); }

Target:
public OMRequest preExecute(OzoneManager ozoneManager) throws IOException { S3DeleteBucketRequest s3DeleteBucketRequest = getOmRequest().getDeleteS3BucketRequest(); int bucketLength = s3DeleteBucketRequest.getS3BucketName().length(); if (bucketLength < S3_BUCKET_MIN_LENGTH || bucketLength >= S3_BUCKET_MAX_LENGTH) { throw new OMException("S3BucketName must be at least 3 and not more " + "than 63 characters long", OMException.ResultCodes.S3_BUCKET_INVALID_LENGTH); } return getOmRequest().toBuilder().setUserInfo(getUserInfo()).build(); }
Source:
public String getName() { return getHeader(Constants.BUNDLE_NAME) != null ? bundle.getHeaders().get(Constants.BUNDLE_NAME) : getSymbolicName(); }

Target:
public String getName() { return getHeader(Constants.BUNDLE_NAME) != null ? getHeader(Constants.BUNDLE_NAME) : getSymbolicName(); }
Source:
private static int sumOfDivisors(int n) { final int sqrtN = (int) Math.sqrt(n); return Stream.rangeClosed(2, sqrtN) .filter(d -> n % d == 0) .foldLeft(0, (sum, d) -> sum + d + n / d) - (isPerfectSquare(n) ? sqrtN : 0) + 1; }

Target:
private static int sumOfDivisors(int n) { return 1 + Stream.rangeClosed(2, (int) Math.sqrt(n)) .map(d -> Tuple.of(d, n / d)) .filter(t -> t._1 * t._2 == n && !Objects.equals(t._1, t._2)) .map(t -> t._1 + t._2) .foldLeft(0, (sum, x) -> sum + x); }
Source:
public void processHostVmStateReport(long hostId, Map<String, HostVmStateReportEntry> report) { if (s_logger.isDebugEnabled()) s_logger.debug("Process host VM state report. host: " + hostId); Map<Long, VirtualMachine.PowerState> translatedInfo = convertVmStateReport(report); processReport(hostId, translatedInfo); }

Target:
public void processHostVmStateReport(long hostId, Map<String, HostVmStateReportEntry> report) { s_logger.debug("Process host VM state report. host: " + hostId); Map<Long, VirtualMachine.PowerState> translatedInfo = convertVmStateReport(report); processReport(hostId, translatedInfo); }
Source:
private String loadProperty(String name) { try { Statement sta = conn.createStatement(); String payload = "SELECT * FROM PROPERTIES WHERE NAME = '" + name + "'"; ResultSet rs = sta.executeQuery(payload); if (rs.next()) { String value = rs.getString("Value"); rs.close(); return value; } rs.close(); } catch (SQLException e) { log.warn("Unable to load property " + name + "!"); log.warn(e.toString()); e.printStackTrace(); } return ""; }

Target:
private String loadProperty(String name) { try { PreparedStatement sta = conn.prepareStatement("SELECT * FROM PROPERTIES WHERE NAME = ?"); sta.setString(1, name); ResultSet rs = sta.executeQuery(); if (rs.next()) { String value = rs.getString("Value"); rs.close(); return value; } rs.close(); } catch (SQLException e) { log.warn("Unable to load property " + name + "!"); log.warn(e.toString()); e.printStackTrace(); } return ""; }
Source:
public GoogleCloudStorageImpl(GoogleCloudStorageOptions options, Storage gcs) { Preconditions.checkNotNull(options, "options must not be null"); logger.atFine().log("GCS(%s)", options.getAppName()); options.throwIfNotValid(); this.storageOptions = options; Preconditions.checkNotNull(gcs, "gcs must not be null"); this.gcs = gcs; if (gcs.getRequestFactory() != null) { this.httpRequestInitializer = gcs.getRequestFactory().getInitializer(); } initAuthorizationProvider(storageOptions.getAuthorizationProvider(), storageOptions.getAuthorizationProviderInitArgument()); }

Target:
public GoogleCloudStorageImpl(GoogleCloudStorageOptions options, Storage gcs) { Preconditions.checkNotNull(options, "options must not be null"); logger.atFine().log("GCS(%s)", options.getAppName()); options.throwIfNotValid(); this.storageOptions = options; Preconditions.checkNotNull(gcs, "gcs must not be null"); this.gcs = gcs; if (gcs.getRequestFactory() != null) { this.httpRequestInitializer = gcs.getRequestFactory().getInitializer(); } storageRequestAuthorizer = initializeStorageRequestAuthorizer(storageOptions); }
Source:
public ConstraintMatch(String constraintPackage, String constraintName, List<Object> justificationList, Score score) { this.constraintPackage = constraintPackage; this.constraintName = constraintName; this.justificationList = new ArrayList<>(justificationList); this.score = score; this.hashCode = (((17 * 37) + constraintPackage.hashCode()) * 37 + constraintName.hashCode()) * 37 + justificationList.hashCode(); }

Target:
public ConstraintMatch(String constraintPackage, String constraintName, List<Object> justificationList, Score score) { this.constraintPackage = constraintPackage; this.constraintName = constraintName; this.justificationList = Collections.unmodifiableList(justificationList); this.score = score; }
Source:
private long getBundleTime(Bundle bundle) { long bundleTime = JitterClock.globalTime(); if (timeField != null) { ValueObject vo = bundle.getValue(bundle.getFormat().getField(timeField.getField())); if (vo == null) { if (log.isDebugEnabled()) { log.debug("missing time " + timeField.getField() + " in [" + bundle.getCount() + "] --> " + bundle); } } else { bundleTime = timeField.toUnix(vo); } } return bundleTime; }

Target:
private long getBundleTime(Bundle bundle) { long bundleTime = JitterClock.globalTime(); ValueObject vo = bundle.getValue(bundle.getFormat().getField(timeField.getField())); if (vo == null) { if (log.isDebugEnabled()) { log.debug("missing time " + timeField.getField() + " in [" + bundle.getCount() + "] --> " + bundle); } } else { bundleTime = timeField.toUnix(vo); } return bundleTime; }
Source:
public SignatureKeyPairImpl get(String workspaceId) throws NotFoundException { final EntityManager manager = managerProvider.get(); try { return new SignatureKeyPairImpl( manager .createNamedQuery("SignKeyPair.getAll", SignatureKeyPairImpl.class) .setParameter("workspaceId", workspaceId) .getSingleResult()); } catch (NoResultException x) { throw new NotFoundException( format("Signature key pair for workspace '%s' doesn't exist", workspaceId)); } }

Target:
public SignatureKeyPairImpl get(String workspaceId) throws NotFoundException, ServerException { final EntityManager manager = managerProvider.get(); try { return new SignatureKeyPairImpl( manager .createNamedQuery("SignKeyPair.getAll", SignatureKeyPairImpl.class) .setParameter("workspaceId", workspaceId) .getSingleResult()); } catch (NoResultException x) { throw new NotFoundException( format("Signature key pair for workspace '%s' doesn't exist", workspaceId)); } catch (RuntimeException ex) { throw new ServerException(ex.getMessage(), ex); } }
Source:
public ReleasableBytesReference retainedSlice(int from, int length) { BytesReference slice = delegate.slice(from, length); refCounted.incRef(); return new ReleasableBytesReference(slice, refCounted); }

Target:
public ReleasableBytesReference retainedSlice(int from, int length) { return new ReleasableBytesReference(delegate.slice(from, length), refCounted); }
Source:
public WorkspaceConfig convert(Devfile devfile) throws ServerException { try { return devFileToWorkspaceConfig( new DevfileImpl(devfile), new CachingProvider(urlFileContentProvider)); } catch (DevfileException e) { throw new ServerException(e.getMessage(), e); } }

Target:
public WorkspaceConfig convert(Devfile devfile) throws ServerException { try { return devFileToWorkspaceConfig( new DevfileImpl(devfile), FileContentProvider.cached(urlFileContentProvider)); } catch (DevfileException e) { throw new ServerException(e.getMessage(), e); } }
Source:
public long getLong() { final long timestampMSB = timestamp & timestampMSBmask; final int driftAdjust = driftCorrection & correctionMask; final long timestampLSB = timestamp & timestampLSBmask; final long instanceId = uniqueInstanceId & instanceIdMask; final int resolutionAdjust = resolutionCorrection & correctionMask; return ((timestampMSB << timestampMSBShift) | (driftAdjust << driftAdjustShift) | (timestampLSB << timestampLSBShift) | (instanceId << instanceIdShift) | resolutionAdjust); }

Target:
public long getLong() { final long timestampMSB = timestamp & TIMESTAMP_MSB_MASK; final long driftAdjust = driftCorrection & CORRECTION_MASK; final long timestampLSB = timestamp & TIMESTAMP_LSB_MASK; final long instanceId = uniqueInstanceId & INSTANCE_ID_MASK; final long resolutionAdjust = resolutionCorrection & CORRECTION_MASK; return ((timestampMSB << TIMESTAMP_MSB_SHIFT) | (driftAdjust << DRIFT_ADJUST_SHIFT) | (timestampLSB << TIMESTAMP_LSB_SHIFT) | (instanceId << INSTANCE_ID_SHIFT) | resolutionAdjust); }
Source:
private static void register() { try { new JmxCollector("").register(); DefaultExports.initialize(); log.info("Prometheus JmxCollector registered."); } catch (Exception e) { log.warn("Prometheus collector not registerd: ", e); } }

Target:
private static void register() { try { File promConfig = new File(PROMETHEUS_CONFIG); if(promConfig.exists()) { new JmxCollector(promConfig).register(); log.info("Using prometheus config file: {}", PROMETHEUS_CONFIG); } else { new JmxCollector("").register(); log.warn("No prometheus config file found. Using prometheus default."); } DefaultExports.initialize(); log.info("Prometheus collector registerd."); } catch (Exception e) { log.error("Prometheus collector not registerd: ", e); } }
Source:
public ImagesActionsParametersBase(Guid imageId) { super(Guid.Empty); setEntityInfo(new EntityInfo(VdcObjectType.Disk, imageId)); this.imageId = imageId; imageGroupID = Guid.Empty; }

Target:
public ImagesActionsParametersBase(Guid imageId) { super(Guid.Empty); setEntityInfo(new EntityInfo(VdcObjectType.Disk, imageId)); this.imageId = imageId; destinationImageId = Guid.Empty; imageGroupID = Guid.Empty; }
Source:
public LinkedBlockingQueue<Event> getEventQueue() { return eventQueue; }

Target:
public BlockingQueue<Event> getEventQueue() { return eventQueue; }
Source:
public GlusterVolumeSnapshotCreatePopupView(EventBus eventBus, ApplicationResources resources, ApplicationConstants constants, ApplicationMessages messages, CommonApplicationTemplates templates) { super(eventBus, resources); this.messages = messages; this.constants = constants; this.templates = templates; initEditors(); initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); ViewIdHandler.idHandler.generateAndSetIds(this); localize(); driver.initialize(this); setTitle(constants.newSnapshot()); }

Target:
public GlusterVolumeSnapshotCreatePopupView(EventBus eventBus, ApplicationResources resources, ApplicationConstants constants, ApplicationMessages messages, CommonApplicationTemplates templates) { super(eventBus, resources); this.messages = messages; this.constants = constants; this.templates = templates; initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); ViewIdHandler.idHandler.generateAndSetIds(this); localize(); driver.initialize(this); setTitle(constants.newSnapshot()); }
Source:
public PipelineConfig getEntityFromRequestBody(Request req) { HashMap<String, Object> options = new HashMap<>(); options.put("goConfig", goConfigService.getCurrentConfig() ); options.put("passwordDeserializer", passwordDeserializer ); JsonReader jsonReader = GsonTransformer.getInstance().jsonReaderFrom(req.body()); return PipelineConfigRepresenter.fromJSON(jsonReader.readJsonObject("pipeline"), options); }

Target:
public PipelineConfig getEntityFromRequestBody(Request req) { ConfigHelperOptions options = new ConfigHelperOptions(goConfigService.getCurrentConfig(), passwordDeserializer); JsonReader jsonReader = GsonTransformer.getInstance().jsonReaderFrom(req.body()); if ("PUT".equalsIgnoreCase(req.requestMethod())) { return PipelineConfigRepresenter.fromJSON(jsonReader, options); } return PipelineConfigRepresenter.fromJSON(jsonReader.readJsonObject("pipeline"), options); }
Source:
public void initialize(final Resource it) { Account _createAccount = this.createAccount("Lorenzo", "lorenzo@foobar"); final Procedure1<Account> _function = (Account account) -> { EList<EObject> _contents = it.getContents(); _contents.add(account); this.createDefaultFolders(account); }; ObjectExtensions.<Account>operator_doubleArrow(_createAccount, _function); Account _createAccount_1 = this.createAccount("Francesco", "francesco@foobar"); final Procedure1<Account> _function_1 = (Account account) -> { EList<EObject> _contents = it.getContents(); _contents.add(account); this.createDefaultFolders(account); }; ObjectExtensions.<Account>operator_doubleArrow(_createAccount_1, _function_1); Account _createAccount_2 = this.createAccount("Vicenzo", "vincenzo@foobar"); final Procedure1<Account> _function_2 = (Account account) -> { EList<EObject> _contents = it.getContents(); _contents.add(account); this.createDefaultFolders(account); }; ObjectExtensions.<Account>operator_doubleArrow(_createAccount_2, _function_2); }

Target:
public void initialize(final Resource it) { Account _createAccount = this.createAccount("Lorenzo", "lorenzo@foobar"); final Procedure1<Account> _function = new Procedure1<Account>() { @Override public void apply(final Account account) { EList<EObject> _contents = it.getContents(); _contents.add(account); AccountsviewResourceManager.this.createDefaultFolders(account); } }; ObjectExtensions.<Account>operator_doubleArrow(_createAccount, _function); Account _createAccount_1 = this.createAccount("Francesco", "francesco@foobar"); final Procedure1<Account> _function_1 = new Procedure1<Account>() { @Override public void apply(final Account account) { EList<EObject> _contents = it.getContents(); _contents.add(account); AccountsviewResourceManager.this.createDefaultFolders(account); } }; ObjectExtensions.<Account>operator_doubleArrow(_createAccount_1, _function_1); Account _createAccount_2 = this.createAccount("Vicenzo", "vincenzo@foobar"); final Procedure1<Account> _function_2 = new Procedure1<Account>() { @Override public void apply(final Account account) { EList<EObject> _contents = it.getContents(); _contents.add(account); AccountsviewResourceManager.this.createDefaultFolders(account); } }; ObjectExtensions.<Account>operator_doubleArrow(_createAccount_2, _function_2); }