auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>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( <START> configToolInvocation("-t", "5s", "repair", "-f", "commit", "-s", "localhost:" + getNodePort(1, activeId)), <END> 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))); }</code><technical_language>failure, repair, recover</technical_language>

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:
<code>public boolean isWakeupEvent(ITmfEvent event) { String eventName = event.getName(); if (eventName.equals("sched_ttwu")) { <START> System.out.println(event); <END> } 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; }</code><technical_language>no! guessing this is a debugging check</technical_language>

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:
<code>public void checkDeploymentOrder(boolean set) { boolean orderIsBlank = StringUtils.isBlank(deploymentOrder.getText()); <START> if (set) { assertFalse(orderIsBlank); } else { assertTrue(orderIsBlank); } <END> }</code><technical_language>suggestion assertEquals(!set, orderIsBlank); (same elsewhere)</technical_language>

Target:
public void checkDeploymentOrder(boolean set) { assertEquals(!set, StringUtils.isBlank(deploymentOrder.getText())); }
Source:
<code>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); } <START> dataFileReader.close(); <END> }</code><technical_language>a try-with-resource pattern here</technical_language>

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:
<code>public void updateFeaturedImage(long id) { if (mFeaturedImageId != id) { mFeaturedImageId = id; if (mFeaturedImageId > 0) { MediaModel media = mMediaStore.getSiteMediaWithId(mSite, mFeaturedImageId); <START> if (media == null || getActivity() == null) { <END> 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); } } }</code><technical_language>|| !isAdded()</technical_language>

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:
<code>public void glancingTest() { Rectangle bounds = new Rectangle(0, 0, 0, 0); <START> bounds.x = 0; bounds.y = 0; bounds.height = 638; bounds.width = 1119; <END> int x0 = 1115; int y0 = -468; int x1 = 1132; int y1 = 42; Rectangle rect = LineClipper.clip(bounds, x0, y0, x1, y1); assertEquals(null, rect); }</code><technical_language>give constructor</technical_language>

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:
<code>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); <START> <END> UserSession retrieved = service.signIn(study, CONTEXT, PHONE_PASSWORD_SIGN_IN); assertEquals(REAUTH_TOKEN, retrieved.getReauthToken()); }</code><technical_language>Is worth applying fix other tests in this class? * adminSignInWithPhone() * emailSignInThrowsConsentRequired() * emailSignInAdminOK() * reauthTokenRequired() * phoneSignInThrowsConsentRequired()</technical_language>

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:
<code>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); <START> LOG.info("Status: " + response.getStatus()); <END> 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; }</code><technical_language>this debug level instead of info</technical_language>

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:
<code>public boolean isItemBlock() { <START> if (stack.isEmpty()) { <END> return false; } return stack.getItem() instanceof ItemBlock; }</code><technical_language>Technically, happen, ^^</technical_language>

Target:
public boolean isItemBlock() { return stack.getItem() instanceof ItemBlock; }
Source:
<code>public LocalizationUtils(final String fileName) { log.info("Start initializing {}", getClass().getSimpleName()); messageSource = fileName.replaceAll("\\.properties$", ""); <START> resourceBundlesByLocale = new HashMap<>(); <END> for (Locale locale : Locale.getAvailableLocales()) { getResourceBundle(locale); } log.info("Finished initializing {}", getClass().getSimpleName()); }</code><technical_language>ConcurrentHashMap safer here, plan updates in map ..</technical_language>

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:
<code><START> public JdbcOAuth2AuthorizedClientService(JdbcOperations jdbcOperations, <END> 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(); }</code><technical_language>Add @since 5.5</technical_language>

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:
<code>public DateTimeSettings(DateTimeSettings other) { <START> this.datepicker = other.datepicker; <END> this.timepicker = other.timepicker; }</code><technical_language>Original datepicker timepicker instance assigned a clone. Please cloning constructor avoid change reference</technical_language>

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:
<code>public Response getVersion() { <START> CacheScheduler.CacheState cacheState = factory.entry.getCacheState(); <END> 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(); } }</code><technical_language>suggest final</technical_language>

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:
<code>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(), " ")); <START> environmentAuthentication.setPublicKey(String.format("%s %s %s", parts.get(0), parts.get(1), "cloudbreak")); <END> } } environmentAuthentication.setLoginUserName(authenticationDto.getLoginUserName()); environmentAuthentication.setPublicKeyId(authenticationDto.getPublicKeyId()); environmentAuthentication.setManagedKey(authenticationDto.isManagedKey()); return environmentAuthentication; }</code><technical_language>cloudbreak end</technical_language>

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:
<code>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(); <START> assertThat(users.size(), equalTo(1)); <END> assertThat(users.get(0).getAttributes().size(), equalTo(2)); } }</code><technical_language>nit: assertThat(users, hasSize(1));</technical_language>

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:
<code>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) <START> .collect(Collectors.toList()) <END> ); }</code><technical_language>Move end line</technical_language>

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:
<code>public void onReceive(Context ctx, Intent intent) { String referrerStr = intent.getStringExtra(REFERRER_KEY); if (!INSTALL_ACTION.equals(intent.getAction()) || referrerStr == null) { return; } <START> L.d(">>>>> Received install referrer: " + referrerStr); <END> 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)); }</code><technical_language>useful move this conditional return statement</technical_language>

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:
<code>public void testGetAllForVMFilteredWithPermissionsNoPermissions() { List<DiskImage> disks = dao.getAllForVm(EXISTING_VM_ID, UNPRIVILEGED_USER_ID, true); <START> assertEquals("VM should have two disks", 0, disks.size()); <END> }</code><technical_language>Text "zero disks"</technical_language>

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:
<code>public ResponseEntity<GeoJsonDiseaseOccurrenceFeatureCollection> getDiseaseOccurrencesForReviewByCurrentUser( @PathVariable Integer validatorDiseaseGroupId) { <START> Integer userId = currentUserService.getCurrentUserId(); <END> 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); } }</code><technical_language>more consistent "expertId" instead of "userId"</technical_language>

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:
<code>public static Job getWorkspaceLoadingJob(CliCommandLine commandLine) { <START> ExecuteCliParsersJob job = new ExecuteCliParsersJob(commandLine); return job; <END> }</code><technical_language>return new ExecuteCliParsersJob(commandLine);</technical_language>

Target:
public static Job getWorkspaceLoadingJob(CliCommandLine commandLine) { return new ExecuteCliParsersJob(commandLine); }
Source:
<code>protected void executeQueryCommand() { <START> getQueryReturnValue().setReturnValue(CpuFlagsManagerHandler.AllServerCpuList(getVersion())); <END> }</code><technical_language>I expect a simple: getQueryReturnValue().setReturnValue( CpuFlagsManagerHandler.AllServerCpuList( getParameters().getParameterValue<Version>(VdcParameter.Version) ) )</technical_language>

Target:
protected void executeQueryCommand() { getQueryReturnValue().setReturnValue(CpuFlagsManagerHandler.AllServerCpuList( getParameters().<Version>getParameterValue(GenericVdcParameter.Version))); }
Source:
<code>@Override public boolean validRexOperands(int count, Litmus litmus) { if (count <= 0) { <START> return litmus.fail("wrong operand count for {}, Need at least one RexOperand!", <END> count, this); } return litmus.succeed(); }</code><technical_language>is java doc of SqlNewOperator: >SqlNewOperator represents SQL <code>new specification</code> <code>NEW UDT(1, 2)</code>. in SqlCall, SqlNewOperator takes a single operand, is invocation of constructor method; in a RexCall, operands initial values for new instance. validRexOperands method is invoked in RexCall constructor, i overriding is right go. require count bigger 0, is a user defined constructor operands</technical_language>

Target:
@Override public boolean validRexOperands(int count, Litmus litmus) { return litmus.succeed(); }
Source:
<code>@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) <START> end(); <END> if (!ended && requested > 0 && waiting == 0) request0(IN_BUFFER_SIZE); }</code><technical_language>cancel upstream do do end() method</technical_language>

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:
<code>public void testAuthorizer() throws Exception { <START> ResourcePattern resource = new ResourcePattern(ResourceType.TOPIC, "resource-1", PatternType.LITERAL); <END> 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); }</code><technical_language>matching prefixed ACLs for this resource. is good add matching prefixed ACLs</technical_language>

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

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:
<code>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; }); <START> return ctx.continueInvocation(); <END> }</code><technical_language>needed onReturn() returns CONTINUE_INVOCATION</technical_language>

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:
<code>public void createCorrelationId() { final String projectKey = "my-project"; final CorrelationIdGenerator correlationIdGenerator = CorrelationIdGenerator.of(projectKey); assertThat(correlationIdGenerator.getProjectKey()).isEqualTo(projectKey); final String correlationId = correlationIdGenerator.createCorrelationId(); <START> final List<String> correlationIdParts = Arrays.asList(correlationId.split("/")); <END> assertThat(correlationIdParts).hasSize(2); assertThat(correlationIdParts.get(0)).isEqualTo(projectKey); final UUID uuid = UUID.fromString(correlationIdParts.get(1)); assertThat(uuid).isNotNull(); }</code><technical_language>I more readable assertThat(correlationId).matches("my-project/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")</technical_language>

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:
<code>private int[] createNewQuestionsForDifferentRecipientTypes() throws Exception { int[] num = new int[] { 2, 3, 1, 2 <START> }; <END> 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; }</code><technical_language>magic numbers. do mean</technical_language>

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:
<code>private void validate() { <START> inOrderOrEqual(expiry.toLocalDate(), paymentCurrencyAmount.getDate().getUnadjusted(), "expiry.date", "underlying.paymentDate"); <END> }</code><technical_language>Need check Currency of payoff is of currency pair</technical_language>

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:
<code>public boolean equals(Object o) { boolean equals = false; if (ObjectUtils.isNotNull(o) && o instanceof GroupLevel) { <START> GroupLevel otherGl = (GroupLevel) o; <END> 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; }</code><technical_language>otherGl changed otherGroupLevel</technical_language>

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:
<code>public OMRequest preExecute(OzoneManager ozoneManager) throws IOException { S3DeleteBucketRequest s3DeleteBucketRequest = getOmRequest().getDeleteS3BucketRequest(); <START> Preconditions.checkNotNull(s3DeleteBucketRequest); <END> 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(); }</code><technical_language>Is this checkNotNull for findbugs</technical_language>

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:
<code>public String getName() { return getHeader(Constants.BUNDLE_NAME) != null <START> ? bundle.getHeaders().get(Constants.BUNDLE_NAME) <END> : getSymbolicName(); }</code><technical_language>re-use getHeader(...) method - I - here</technical_language>

Target:
public String getName() { return getHeader(Constants.BUNDLE_NAME) != null ? getHeader(Constants.BUNDLE_NAME) : getSymbolicName(); }
Source:
<code>private static int sumOfDivisors(int n) { final int sqrtN = (int) Math.sqrt(n); return Stream.rangeClosed(2, sqrtN) <START> .filter(d -> n % d == 0) <END> .foldLeft(0, (sum, d) -> sum + d + n / d) - (isPerfectSquare(n) ? sqrtN : 0) + 1; }</code><technical_language>map complement in a tuple need isPerfectSquare anymore (if (t._1 == t._2) something). separate concerns of summing calculating factors, I think</technical_language>

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:
<code>public void processHostVmStateReport(long hostId, Map<String, HostVmStateReportEntry> report) { <START> if (s_logger.isDebugEnabled()) <END> s_logger.debug("Process host VM state report. host: " + hostId); Map<Long, VirtualMachine.PowerState> translatedInfo = convertVmStateReport(report); processReport(hostId, translatedInfo); }</code><technical_language>remove this IF condition well</technical_language>

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:
<code>private String loadProperty(String name) { try { Statement sta = conn.createStatement(); <START> String payload = "SELECT * FROM PROPERTIES WHERE NAME = '" + name + "'"; <END> 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 ""; }</code><technical_language>I remember, is some protection names unique</technical_language>

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:
<code>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(); } <START> initAuthorizationProvider(storageOptions.getAuthorizationProvider(), <END> storageOptions.getAuthorizationProviderInitArgument()); }</code><technical_language>delete this part</technical_language>

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:
<code>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 <START> + justificationList.hashCode(); <END> }</code><technical_language>1 discussed. This affects ConstraintMatch DRL usage Bavet's ConstraintMatch usage. Do want that? isolate this a flag ScoreHolder active CS-D special stuff</technical_language>

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:
<code>private long getBundleTime(Bundle bundle) { long bundleTime = JitterClock.globalTime(); <START> if (timeField != null) { <END> 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; }</code><technical_language>need this conditional</technical_language>

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:
<code>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()); <START> } catch (NoResultException x) { <END> throw new NotFoundException( format("Signature key pair for workspace '%s' doesn't exist", workspaceId)); } }</code><technical_language>RuntimeException catched rethrown ServerException</technical_language>

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:
<code>public ReleasableBytesReference retainedSlice(int from, int length) { BytesReference slice = delegate.slice(from, length); <START> refCounted.incRef(); <END> return new ReleasableBytesReference(slice, refCounted); }</code><technical_language>I prefer move this call private ReleasableBytesReference constructor</technical_language>

Target:
public ReleasableBytesReference retainedSlice(int from, int length) { return new ReleasableBytesReference(delegate.slice(from, length), refCounted); }
Source:
<code>public WorkspaceConfig convert(Devfile devfile) throws ServerException { try { return devFileToWorkspaceConfig( <START> new DevfileImpl(devfile), new CachingProvider(urlFileContentProvider)); <END> } catch (DevfileException e) { throw new ServerException(e.getMessage(), e); } }</code><technical_language>a factory method FileContentProvider.cached() slightly more readable</technical_language>

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:
<code>public long getLong() { <START> final long timestampMSB = timestamp & timestampMSBmask; <END> 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); }</code><technical_language>timestampMsb timestampMSB. Other variables well</technical_language>

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:
<code>private static void register() { try { <START> new JmxCollector("").register(); <END> DefaultExports.initialize(); log.info("Prometheus JmxCollector registered."); } catch (Exception e) { log.warn("Prometheus collector not registerd: ", e); } }</code><technical_language>curious if passing empty yaml string is a normal usage pattern</technical_language>

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:
<code>public ImagesActionsParametersBase(Guid imageId) { super(Guid.Empty); setEntityInfo(new EntityInfo(VdcObjectType.Disk, imageId)); this.imageId = imageId; <START> imageGroupID = Guid.Empty; <END> }</code><technical_language>need destinationImageId = Guid.Empty also</technical_language>

Target:
public ImagesActionsParametersBase(Guid imageId) { super(Guid.Empty); setEntityInfo(new EntityInfo(VdcObjectType.Disk, imageId)); this.imageId = imageId; destinationImageId = Guid.Empty; imageGroupID = Guid.Empty; }
Source:
<code><START> public LinkedBlockingQueue<Event> getEventQueue() { <END> return eventQueue; }</code><technical_language>return type of method BlockingQueue</technical_language>

Target:
public BlockingQueue<Event> getEventQueue() { return eventQueue; }