auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Object visitLockControlCommand(TxInvocationContext ctx, LockControlCommand command) throws Throwable { if (!ctx.isInTxScope()) throw new IllegalStateException("Locks should only be acquired within the scope of a transaction!"); if (command.isUnlock()) { if (ctx.isOriginLocal()) { <START> throw new AssertionError( <END> "There's no advancedCache.unlock so this must have originated remotely."); } return false; } if (hasSkipLocking(command) || areAllKeysAlreadyLocked(ctx, command.getKeys())) { if (trace) { log.tracef("Skip locking or keys already locked. Skipping command %s", command); } return false; } else if (isLocalOnly(command)) { lockOrRegisterBackupLock(ctx, command.getKeys(), getLockTimeoutMillis(command)); ctx.addAffectedKey(command.getKeys()); return invokeNext(ctx, command); } else { return ctx.isOriginLocal() ? handleLocalLockCommand(ctx, command) : handleRemoteLockCommand(ctx, command); } }</code><technical_language>assert ctx.isOriginLocal() : "There's ..." throw new IllegalStateException(...)</technical_language>

Target:
public Object visitLockControlCommand(TxInvocationContext ctx, LockControlCommand command) throws Throwable { assert ctx.isInTxScope() : "Locks should only be acquired within the scope of a transaction!"; if (command.isUnlock()) { assert !ctx.isOriginLocal() : "There's no advancedCache.unlock so this must have originated remotely."; return false; } if (hasSkipLocking(command)) { throw log.lockCommandWithSkipLocking(); } if (hasSkipLocking(command) || areAllKeysAlreadyLocked(ctx, command.getKeys())) { if (trace) { log.tracef("Skip locking or keys already locked. Skipping command %s", command); } return false; } else if (isLocalOnly(command)) { lockOrRegisterBackupLock(ctx, command.getKeys(), getLockTimeoutMillis(command)); ctx.addAffectedKey(command.getKeys()); return invokeNext(ctx, command); } else { return ctx.isOriginLocal() ? handleLocalLockCommand(ctx, command) : handleRemoteLockCommand(ctx, command); } }
Source:
<code>private boolean isStaged(Repository repository, IPath location, boolean checkIndex) { if (location == null || location.toFile().isDirectory()) { return false; } String resRelPath = null; RepositoryMapping mapping = RepositoryMapping.getMapping(location); <START> if (mapping != null) { <END> resRelPath = mapping.getRepoRelativePath(location); } else { IPath workDir = new Path( repository.getWorkTree().getAbsolutePath()); resRelPath = location.makeRelativeTo(workDir).toString(); } if (resRelPath == null || resRelPath.length() == 0) { return false; } if (!checkIndex) { return true; } try { FileTreeIterator fileTreeIterator = new FileTreeIterator(repository); IndexDiff indexDiff = new IndexDiff(repository, Constants.HEAD, fileTreeIterator); indexDiff.setFilter(PathFilterGroup.createFromStrings(Collections.singletonList(resRelPath))); indexDiff.diff(); return indexDiff.getAdded().contains(resRelPath) || indexDiff.getChanged().contains(resRelPath) || indexDiff.getRemoved().contains(resRelPath); } catch (IOException e) { Activator.error(NLS.bind(UIText.GitHistoryPage_errorLookingUpPath, location.toString()), e); return false; } }</code><technical_language>not? I it</technical_language>

Target:
private boolean isStaged(Repository repository, IPath location, boolean checkIndex) { if (location == null || location.toFile().isDirectory() || repository.isBare()) { return false; } File workTree = repository.getWorkTree(); if (workTree == null) { return false; } IPath workDir = new Path(workTree.getAbsolutePath()); String resRelPath = location.makeRelativeTo(workDir).toString(); if (resRelPath.length() == 0 || resRelPath.equals(location)) { return false; } if (!checkIndex) { return true; } try { FileTreeIterator fileTreeIterator = new FileTreeIterator(repository); IndexDiff indexDiff = new IndexDiff(repository, Constants.HEAD, fileTreeIterator); indexDiff.setFilter(PathFilterGroup.createFromStrings(Collections.singletonList(resRelPath))); indexDiff.diff(); return indexDiff.getAdded().contains(resRelPath) || indexDiff.getChanged().contains(resRelPath) || indexDiff.getRemoved().contains(resRelPath); } catch (IOException e) { Activator.error(NLS.bind(UIText.GitHistoryPage_errorLookingUpPath, location.toString()), e); return false; } }
Source:
<code>public List<T> listByKeys(List<Long> idsList, Class<T> clazz){ if (idsList == null || idsList.isEmpty()) { return Collections.emptyList(); } PersistenceManager pm = PersistenceFilter.getManager(); List<Object> datastoreKeysList = new ArrayList<>(); for (Long id : idsList) { Key key = KeyFactory.createKey(clazz.getSimpleName(), id); Object objectId = pm.newObjectIdInstance(clazz, key); datastoreKeysList.add(objectId); } final List<T> resultsList = new ArrayList<>(); try { <START> resultsList.addAll(pm.getObjectsById(datastoreKeysList)); <END> } catch (NucleusObjectNotFoundException nfe) { log.warning("No " + clazz.getCanonicalName() + " found: " + nfe.getMessage()); } return resultsList; }</code><technical_language>happen if some of ids others not, work returns throw exception</technical_language>

Target:
public List<T> listByKeys(List<Long> idsList, Class<T> clazz){ if (idsList == null || idsList.isEmpty()) { return Collections.emptyList(); } PersistenceManager pm = PersistenceFilter.getManager(); List<Object> datastoreKeysList = new ArrayList<>(); for (Long id : idsList) { Key key = KeyFactory.createKey(clazz.getSimpleName(), id); Object objectId = pm.newObjectIdInstance(clazz, key); datastoreKeysList.add(objectId); } final List<T> resultsList = new ArrayList<>(); try { resultsList.addAll(pm.getObjectsById(datastoreKeysList)); } catch (NucleusObjectNotFoundException nfe) { log.warning(nfe.getMessage()); return listByKeysIndividually(idsList); } catch (ArrayIndexOutOfBoundsException exception) { log.warning("Some entities were not found"); return listByKeysIndividually(idsList); } return resultsList; }
Source:
<code>public void addToLogLikelihoods(final Snp snp, final List<Allele> alleles, final double[] logGenotypeLikelihoods) { assertSnpPartOfHaplotype(snp); assert (logGenotypeLikelihoods.length == nGeno); assert (alleles.size() == 2); <START> for (int i = 0; i < alleles.size(); i++) { <END> assert (alleles.get(i).getBases().length == 1); } final byte allele1 = alleles.get(0).getBases()[0]; final byte allele2 = alleles.get(1).getBases()[0]; if (snp.getAllele1() == allele1 && snp.getAllele2() == allele2) { setLogLikelihoods(MathUtil.sum(getLogLikelihoods(),logGenotypeLikelihoods)); return; } if (snp.getAllele2() == allele1 && snp.getAllele1() == allele2) { final double ll = getLogLikelihoods(); ll[Genotype.HOM_ALLELE1.v] += logGenotypeLikelihoods[Genotype.HOM_ALLELE2.v]; ll[Genotype.HET_ALLELE12.v] += logGenotypeLikelihoods[Genotype.HET_ALLELE12.v]; ll[Genotype.HOM_ALLELE2.v] += logGenotypeLikelihoods[Genotype.HOM_ALLELE1.v]; setLogLikelihoods(ll); return; } assert false; }</code><technical_language>suggestion for (allele : alleles) {</technical_language>

Target:
public void addToLogLikelihoods(final Snp snp, final List<Allele> alleles, final double[] logGenotypeLikelihoods) { assertSnpPartOfHaplotype(snp); ValidationUtils.validateArg(logGenotypeLikelihoods.length == NUM_GENOTYPES, () -> "LogGenotypueLikelihoods must be length 3, found " + logGenotypeLikelihoods.length); ValidationUtils.validateArg(alleles.size() == 2, () -> "alleles must be length 2, found " + alleles.size()); for (final Allele a : alleles) { ValidationUtils.validateArg(a.getBases().length == 1, () -> "allele is supposed to be a SNP, found " + a.getBaseString()); } final byte allele1 = alleles.get(0).getBases()[0]; final byte allele2 = alleles.get(1).getBases()[0]; if (snp.getAllele1() == allele1 && snp.getAllele2() == allele2) { setLogLikelihoods(MathUtil.sum(getLogLikelihoods(),logGenotypeLikelihoods)); return; } if (snp.getAllele2() == allele1 && snp.getAllele1() == allele2) { final double ll = getLogLikelihoods(); ll[Genotype.HOM_ALLELE1.v] += logGenotypeLikelihoods[Genotype.HOM_ALLELE2.v]; ll[Genotype.HET_ALLELE12.v] += logGenotypeLikelihoods[Genotype.HET_ALLELE12.v]; ll[Genotype.HOM_ALLELE2.v] += logGenotypeLikelihoods[Genotype.HOM_ALLELE1.v]; setLogLikelihoods(ll); return; } ValidationUtils.nonNull(null,"We really should not have reached this point in the code..."); }
Source:
<code>public boolean <START> hasValidFallthroughAttribute(IASTStatement <END> statement) { IASTStatement nullstatement = null; if(statement instanceof IASTNullStatement) nullstatement = statement; else if(statement instanceof IASTCompoundStatement && statement.getChildren().length>0) { IASTNode lastnode = statement.getChildren()[statement.getChildren().length-1]; if(lastnode instanceof IASTNullStatement) nullstatement = (IASTStatement) lastnode; } if(nullstatement!=null) { for (IASTAttribute attribute : nullstatement.getAttributes()) { if(String.valueOf(attribute.getName()).equals("fallthrough")) return true; } } return false; }</code><technical_language>Check formatting AttributeUtil for this</technical_language>

Target:
public boolean hasValidFallthroughAttribute(IASTStatement statement) { IASTStatement nullstatement = null; if (statement instanceof IASTNullStatement) nullstatement = statement; else if (statement instanceof IASTCompoundStatement && statement.getChildren().length > 0) { IASTNode lastnode = statement.getChildren()[statement.getChildren().length - 1]; if (lastnode instanceof IASTNullStatement) nullstatement = (IASTStatement) lastnode; } if (nullstatement != null) { if (AttributeUtil.hasAttribute(nullstatement, new String[] { StandardAttributes.FALLTHROUGH })) return true; } return false; }
Source:
<code>public boolean removeShares(List<OwnerProductShare> shares) { int rows = 0; if (CollectionUtils.isNotEmpty(shares)) { List<String> ids = new LinkedList<String>(); for (OwnerProductShare share : shares) { ids.add(share.getId()); } String jpql = "DELETE FROM OwnerProductShare s " + "WHERE s.id in (:ids)"; rows = this.getEntityManager() .createQuery(jpql) .setParameter("ids", ids) .executeUpdate(); } return rows > 0; <START> } <END></code><technical_language>Do need worry in clause limit here</technical_language>

Target:
public boolean removeShares(List<OwnerProductShare> shares) { int rows = 0; if (CollectionUtils.isNotEmpty(shares)) { List<String> ids = new LinkedList<String>(); for (OwnerProductShare share : shares) { ids.add(share.getId()); } String jpql = "DELETE FROM OwnerProductShare s " + "WHERE s.id in (:ids)"; Query query = this.getEntityManager().createQuery(jpql); for (List<String> block : Iterables.partition(ids, getInBlockSize())) { rows += query.setParameter("ids", block).executeUpdate(); } } return rows > 0; }
Source:
<code>private BigInteger computeRetrievalCost(QueryPlanNode root) { <START> CostAndSize cs=((IndexedFieldScorerData)root.getData()).getCostAndSize(); <END> BigInteger cost=cs.cost; for(QueryPlanNode dest:root.getDestinations()) { cost=cost.add(cs.size.multiply(computeRetrievalCost(dest))); } return cost; }</code><technical_language>Unchecked cast</technical_language>

Target:
private BigInteger computeRetrievalCost(QueryPlanNode root) { CostAndSize cs=getData(root).getCostAndSize(); BigInteger cost=cs.cost; for(QueryPlanNode dest:root.getDestinations()) { cost=cost.add(cs.size.multiply(computeRetrievalCost(dest))); } return cost; }
Source:
<code>private void renameModelDialog() { try { modelNameInput = new EditText(this); modelNameInput.setSingleLine(true); modelNameInput.setText(models.get(currentPos).getString("name")); modelNameInput.setSelection(modelNameInput.getText().length()); new MaterialDialog.Builder(this) .title(R.string.rename_model) .positiveText(R.string.dialog_ok) .customView(modelNameInput, true) .callback(new MaterialDialog.ButtonCallback() { @Override public void onPositive(MaterialDialog dialog) { JSONObject model = models.get(currentPos); String deckName = modelNameInput.getText().toString() .replaceAll("[\'\"\\n\\r\\[\\]\\(\\)]", ""); getCol().getDecks().id(deckName, true); if (deckName.length() > 0) { try { model.put("name", deckName); } catch (JSONException e) { throw new RuntimeException(e); } col.getModels().update(model); try { models.get(currentPos).put("name", deckName); modelDisplay.set(currentPos, new DisplayPair(models.get(currentPos).getString("name"), cardCounts.get(currentPos))); } catch (JSONException e) { throw new RuntimeException(e); } refreshList(); } <START> else{ <END> showToast(getResources().getString(R.string.toast_empty_name)); } } }) .negativeText(R.string.dialog_cancel) .show(); } catch (JSONException e) { closeActivity(DB_ERROR_EXIT); } }</code><technical_language>noticed a lot of small formatting errors this. Instead of nitpicking one, I letting IDE auto-format classes created cover of them</technical_language>

Target:
private void renameModelDialog() { try { mModelNameInput = new EditText(this); mModelNameInput.setSingleLine(true); mModelNameInput.setText(mModels.get(mModelListPosition).getString("name")); mModelNameInput.setSelection(mModelNameInput.getText().length()); new MaterialDialog.Builder(this) .title(R.string.rename_model) .positiveText(R.string.dialog_ok) .customView(mModelNameInput, true) .callback(new MaterialDialog.ButtonCallback() { @Override public void onPositive(MaterialDialog dialog) { JSONObject model = mModels.get(mModelListPosition); String deckName = mModelNameInput.getText().toString() .replaceAll("[\'\"\\n\\r\\[\\]\\(\\)]", ""); getCol().getDecks().id(deckName, true); if (deckName.length() > 0) { try { model.put("name", deckName); col.getModels().update(model); mModels.get(mModelListPosition).put("name", deckName); mModelDisplayList.set(mModelListPosition, new DisplayPair(mModels.get(mModelListPosition).getString("name"), mCardCounts.get(mModelListPosition))); } catch (JSONException e) { throw new RuntimeException(e); } refreshList(); } else { showToast(getResources().getString(R.string.toast_empty_name)); } } }) .negativeText(R.string.dialog_cancel) .show(); } catch (JSONException e) { throw new RuntimeException(e); } }
Source:
<code>static String getPort(Element element, ParserContext parserContext) { String port = element.getAttribute(IpAdapterParserUtils.PORT); if (!StringUtils.hasText(port)) { parserContext.getReaderContext().error(IpAdapterParserUtils.PORT <START> + " is required for IP outbound channel adapters", element); <END> } return port; }</code><technical_language>This method is UdpInboundChannelAdapterParser well. outbound word correct. change reverted</technical_language>

Target:
static String getPort(Element element, ParserContext parserContext) { String port = element.getAttribute(IpAdapterParserUtils.PORT); if (!StringUtils.hasText(port)) { parserContext.getReaderContext().error(IpAdapterParserUtils.PORT + " is required for IP channel adapters", element); } return port; }
Source:
<code>public void shouldReturnBadRequestResponseOnMissingMetadataFieldInSchema() { Schema schema = AvroUserSchemaLoader.load("/schema/user_no_metadata.avsc"); Topic topic = randomTopic("pl.allegro.test", "Topic") .withContentType(AVRO) .build(); operations.buildTopicWithSchema(topicWithSchema(topic, schema.toString())); Response response = publisher.publish(topic.getQualifiedName(), user.asJson()); <START> assertThat(response).hasStatus(BAD_REQUEST); <END> }</code><technical_language>test check for existence of a metadata-related user-friendly message</technical_language>

Target:
public void shouldReturnBadRequestResponseOnMissingMetadataFieldInSchema() { Schema schema = AvroUserSchemaLoader.load("/schema/user_no_metadata.avsc"); Topic topic = randomTopic("pl.allegro.test", "Topic") .withContentType(AVRO) .build(); operations.buildTopicWithSchema(topicWithSchema(topic, schema.toString())); Response response = publisher.publish(topic.getQualifiedName(), user.asJson()); assertThat(response).hasStatus(BAD_REQUEST); assertThat(response.readEntity(String.class)) .isEqualTo("{\"message\":\"Schema does not contain mandatory __metadata field for Hermes internal metadata. " + "Please fix topic schema.\",\"code\":\"AVRO_SCHEMA_INVALID_METADATA\"}"); }
Source:
<code><START> public void testMigrationEvent() { <END> hazelcastInstance3.getLifecycleService().terminate(); final Message<?> msg = cmChannel3.receive(TIMEOUT); verifyMigrationEvent(msg); }</code><technical_language>This test pass. partition migrate? Sorry, familiar subject..</technical_language>

Target:
public void testMigrationEvent() { final IMap<Integer, String> distributedMap = hazelcastInstance3 .getMap("Test_Distributed_Map2"); distributedMap.put(1, "TestValue1"); distributedMap.put(2, "TestValue2"); hazelcastInstance3.getLifecycleService().terminate(); final Message<?> msg = cmChannel3.receive(TIMEOUT); verifyMigrationEvent(msg); }
Source:
<code>protected void appendDetail(final StringBuffer buffer, final String fieldName, final Collection<?> coll) { if (coll != null && !coll.isEmpty()) { coll.stream().findFirst() .map(Object::getClass) <START> .filter(Class::isEnum) <END> .ifPresent((clazz) -> appendDetail(buffer, fieldName, coll.toArray())); return; } buffer.append(coll); }</code><technical_language>Hello, this restrict enums appended a collection, a list of other types (e.g. Collection of Integers Strings) ignored. This filter removed allow types of collections (or allow buffer.append(col1) line of method run for other types, way)</technical_language>

Target:
protected void appendDetail(final StringBuffer buffer, final String fieldName, final Collection<?> coll) { if (coll != null && !coll.isEmpty()) { appendDetail(buffer, fieldName, coll.toArray()); return; } buffer.append(coll); }
Source:
<code>public void testClusterDoesNOTShutdownWhenApplicationStatusUknown() throws Exception { final Tuple1<Boolean> clusterShutdown = new Tuple1<>(false); final TestingDispatcherGateway.Builder dispatcherBuilder = new TestingDispatcherGateway.Builder() .setSubmitFunction(jobGraph -> CompletableFuture.completedFuture(Acknowledge.get())) .setRequestJobStatusFunction(jobId -> CompletableFuture.completedFuture(JobStatus.FAILED)) .setRequestJobResultFunction(jobId -> CompletableFuture.completedFuture(createUnknownJobResult(jobId))) .setClusterShutdownFunction(status -> { if (clusterShutdown.f0) { throw new FlinkRuntimeException("This should be called only once"); } clusterShutdown.f0 = true; return CompletableFuture.completedFuture(Acknowledge.get()); }); final TestingDispatcherGateway dispatcherGateway = dispatcherBuilder.build(); final ApplicationDispatcherBootstrap bootstrap = createApplicationDispatcherBootstrap(3, dispatcherGateway, scheduledExecutor); final CompletableFuture<Acknowledge> applicationFuture = bootstrap.getClusterShutdownFuture(); final ApplicationFailureException exception = assertException(applicationFuture, ApplicationFailureException.class); assertEquals(exception.getStatus(), ApplicationStatus.UNKNOWN); <START> assertFalse(clusterShutdown.f0); dispatcherGateway.shutDownCluster(ApplicationStatus.SUCCEEDED); assertTrue(clusterShutdown.f0); <END> }</code><technical_language>here, do need this</technical_language>

Target:
public void testClusterDoesNOTShutdownWhenApplicationStatusUknown() throws Exception { final TestingDispatcherGateway.Builder dispatcherBuilder = new TestingDispatcherGateway.Builder() .setSubmitFunction(jobGraph -> CompletableFuture.completedFuture(Acknowledge.get())) .setRequestJobStatusFunction(jobId -> CompletableFuture.completedFuture(JobStatus.FAILED)) .setRequestJobResultFunction(jobId -> CompletableFuture.completedFuture(createUnknownJobResult(jobId))) .setClusterShutdownFunction(status -> { fail("We should not call shutdownCluster()"); return CompletableFuture.completedFuture(Acknowledge.get()); }); final TestingDispatcherGateway dispatcherGateway = dispatcherBuilder.build(); final ApplicationDispatcherBootstrap bootstrap = createApplicationDispatcherBootstrap(3, dispatcherGateway, scheduledExecutor); final CompletableFuture<Acknowledge> applicationFuture = bootstrap.getClusterShutdownFuture(); final ApplicationFailureException exception = assertException(applicationFuture, ApplicationFailureException.class); assertEquals(exception.getStatus(), ApplicationStatus.UNKNOWN); }
Source:
<code>protected boolean processEntryForContext(final ILogData data) { if (data != null) { try { <START> final Object payload = data.getPayload(runtime); <END> } catch (Throwable e) { log.error("Exception caught at address {}, {}, {}", data.getGlobalAddress(), data.getStreams(), data.getType()); throw e; } } return false; }</code><technical_language>push this LogData::getPayload ? (since deserialize is invoked)</technical_language>

Target:
protected boolean processEntryForContext(final ILogData data) { if (data != null) { final Object payload = data.getPayload(runtime); } return false; }
Source:
<code><START> public void addInfo(final SamLocusIterator.LocusInfo info) { <END> final HashSet<String> readNames = new HashSet<>(info.getRecordAndPositions().size()); int pileupSize = 0; int unfilteredDepth = 0; for (final SamLocusIterator.RecordAndOffset recs : info.getRecordAndPositions()) { if (recs.getBaseQuality() <= 2) { ++basesExcludedByBaseq; continue; } if (unfilteredDepth < coverageCap) { unfilteredBaseQHistogramArray[recs.getRecord().getBaseQualities()[recs.getOffset()]]++; unfilteredDepth++; } if (recs.getBaseQuality() < MINIMUM_BASE_QUALITY || SequenceUtil.isNoCall(recs.getReadBase())) { ++basesExcludedByBaseq; continue; } if (!readNames.add(recs.getRecord().getReadName())) { ++basesExcludedByOverlap; continue; } pileupSize++; } final int highQualityDepth = Math.min(pileupSize, coverageCap); if (highQualityDepth < pileupSize) basesExcludedByCapping += pileupSize - coverageCap; highQualityDepthHistogramArray[highQualityDepth]++; unfilteredDepthHistogramArray[unfilteredDepth]++; if (Arrays.stream(unfilteredBaseQHistogramArray).sum() != LongStream.rangeClosed(0,coverageCap).map(i -> (i * unfilteredDepthHistogramArray[(int)i])).sum()) { throw new PicardException("updated coverage and baseQ distributions unequally"); } }</code><technical_language>please reverse contract change</technical_language>

Target:
public void addInfo(final SamLocusIterator.LocusInfo info) { final HashSet<String> readNames = new HashSet<>(info.getRecordAndPositions().size()); int pileupSize = 0; int unfilteredDepth = 0; for (final SamLocusIterator.RecordAndOffset recs : info.getRecordAndPositions()) { if (recs.getBaseQuality() <= 2) { ++basesExcludedByBaseq; continue; } if (unfilteredDepth < coverageCap) { unfilteredBaseQHistogramArray[recs.getRecord().getBaseQualities()[recs.getOffset()]]++; unfilteredDepth++; } if (recs.getBaseQuality() < MINIMUM_BASE_QUALITY || SequenceUtil.isNoCall(recs.getReadBase())) { ++basesExcludedByBaseq; continue; } if (!readNames.add(recs.getRecord().getReadName())) { ++basesExcludedByOverlap; continue; } pileupSize++; } final int highQualityDepth = Math.min(pileupSize, coverageCap); if (highQualityDepth < pileupSize) basesExcludedByCapping += pileupSize - coverageCap; highQualityDepthHistogramArray[highQualityDepth]++; unfilteredDepthHistogramArray[unfilteredDepth]++; }
Source:
<code><START> private Map<String, Map<String, Long>> collectValidDataSizeByContainer(long deleteAndExpirationRefTimeInMs) <END> throws StoreException { Set<String> deletedKeys = new HashSet<>(); Map<String, Map<String, Long>> validDataSizePerContainer = new HashMap<>(); for (IndexSegment indexSegment : index.getIndexSegments().descendingMap().values()) { List<IndexValue> validIndexValues = getValidIndexValues(indexSegment, deleteAndExpirationRefTimeInMs, deleteAndExpirationRefTimeInMs, deletedKeys); for (IndexValue value : validIndexValues) { if (!value.isFlagSet(IndexValue.Flags.Delete_Index)) { updateNestedMapHelper(validDataSizePerContainer, String.valueOf(value.getServiceId()), String.valueOf(value.getContainerId()), value.getSize()); } } } return validDataSizePerContainer; }</code><technical_language>minor: if this needs a function of</technical_language>

Target:
private Map<String, Map<String, Long>> collectValidDataSizeByContainer(long deleteAndExpirationRefTimeInMs) throws StoreException { Set<StoreKey> deletedKeys = new HashSet<>(); Map<String, Map<String, Long>> validDataSizePerContainer = new HashMap<>(); for (IndexSegment indexSegment : index.getIndexSegments().descendingMap().values()) { List<IndexValue> validIndexValues = getValidIndexValues(indexSegment, deleteAndExpirationRefTimeInMs, deleteAndExpirationRefTimeInMs, deletedKeys); for (IndexValue value : validIndexValues) { if (!value.isFlagSet(IndexValue.Flags.Delete_Index)) { updateNestedMapHelper(validDataSizePerContainer, String.valueOf(value.getServiceId()), String.valueOf(value.getContainerId()), value.getSize()); } } } return validDataSizePerContainer; }
Source:
<code>public static RebaseInteractivePlan getPlan(Repository repo) { <START> RebaseInteractivePlan plan = planRegistry.get(repo); <END> if (plan == null) { plan = new RebaseInteractivePlan(repo, false); planRegistry.put(repo.getDirectory(), plan); } return plan; }</code><technical_language>s/repo/repo.getDirectory()/</technical_language>

Target:
public static RebaseInteractivePlan getPlan(Repository repo) { RebaseInteractivePlan plan = planRegistry.get(repo.getDirectory()); if (plan == null) { plan = new RebaseInteractivePlan(repo, false); planRegistry.put(repo.getDirectory(), plan); } return plan; }
Source:
<code>private void fetchJetpackModuleSettings() { ++mFetchRequestCount; WordPress.getRestClientUtilsV1_1().getJetpackModuleSettings( mSite.getSiteId(), new RestRequest.Listener() { @Override public void onResponse(JSONObject response) { AppLog.v(AppLog.T.API, "Received Jetpack module settings"); if (response == null) return; JSONArray array = response.optJSONArray("modules"); <START> if (array == null) return; <END> for (int i = 0; i < array.length(); i++) { JSONObject module = array.optJSONObject(i); if (module == null) { continue; } String id = module.optString("id"); if (id == null) { continue; } if (id.equals(SERVE_IMAGES_FROM_OUR_SERVERS)) { mRemoteJpSettings.serveImagesFromOurServers = module.optBoolean("active", false); } else if (id.equals(LAZY_LOAD_IMAGES)) { mRemoteJpSettings.lazyLoadImages = module.optBoolean("active", false); } } mJpSettings.serveImagesFromOurServers = mRemoteJpSettings.serveImagesFromOurServers; mJpSettings.lazyLoadImages = mRemoteJpSettings.lazyLoadImages; onFetchResponseReceived(null); } }, new RestRequest.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { AppLog.w(AppLog.T.API, "Error fetching Jetpack module settings: " + error); onFetchResponseReceived(error); } }); }</code><technical_language>sure, try emit onFetchResponseReceived return statements</technical_language>

Target:
private void fetchJetpackModuleSettings() { ++mFetchRequestCount; WordPress.getRestClientUtilsV1_1().getJetpackModuleSettings( mSite.getSiteId(), new RestRequest.Listener() { @Override public void onResponse(JSONObject response) { if (response == null) { AppLog.w(AppLog.T.API, "Unexpected state: Received empty Jetpack modules response"); onFetchResponseReceived(null); return; } AppLog.v(AppLog.T.API, "Received Jetpack module settings"); JSONArray array = response.optJSONArray("modules"); if (array != null) { for (int i = 0; i < array.length(); i++) { JSONObject module = array.optJSONObject(i); if (module == null) { continue; } String id = module.optString("id"); if (id == null) { continue; } if (id.equals(SERVE_IMAGES_FROM_OUR_SERVERS)) { mRemoteJpSettings.serveImagesFromOurServers = module.optBoolean("active", false); } else if (id.equals(LAZY_LOAD_IMAGES)) { mRemoteJpSettings.lazyLoadImages = module.optBoolean("active", false); } } mJpSettings.serveImagesFromOurServers = mRemoteJpSettings.serveImagesFromOurServers; mJpSettings.lazyLoadImages = mRemoteJpSettings.lazyLoadImages; } onFetchResponseReceived(null); } }, new RestRequest.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { AppLog.w(AppLog.T.API, "Error fetching Jetpack module settings: " + error); onFetchResponseReceived(error); } }); }
Source:
<code>public void start(Stage pStage) throws Exception { Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds(); int screenWidth = (int) primaryScreenBounds.getWidth(); int screenHeight = (int) primaryScreenBounds.getHeight(); pStage.setX(screenWidth / (MARGIN_SCREEN*2)); pStage.setY(screenHeight / (MARGIN_SCREEN*2)); pStage.setWidth((screenWidth * (MARGIN_SCREEN-1)) / MARGIN_SCREEN); pStage.setHeight((screenHeight * (MARGIN_SCREEN-1))/ MARGIN_SCREEN); final SwingNode swingNode = new SwingNode(); createAndSetSwingContent(swingNode, pStage); Properties props = System.getProperties(); props.setProperty("swing.jlf.contentPaneTransparent", "true"); pStage.setOnCloseRequest(pWindowEvent -> { pWindowEvent.consume(); <START> EditorFrame frame = EditorFrame.getInstance(); <END> if(frame != null) { frame.exit(); } else { pStage.close(); } }); BorderPane pane = new BorderPane(); pane.setCenter(swingNode); ResourceBundle aAppResources = ResourceBundle.getBundle(this.getClass().getName() + "Strings"); pStage.setTitle(aAppResources.getString("app.name")); String imagePath = aAppResources.getString("app.icon"); pStage.getIcons().add(new Image(imagePath)); pStage.setScene(new Scene(pane)); pStage.show(); }</code><technical_language>Obtain object graph, eliminate need for a null check</technical_language>

Target:
public void start(Stage pStage) throws Exception { Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds(); int screenWidth = (int) primaryScreenBounds.getWidth(); int screenHeight = (int) primaryScreenBounds.getHeight(); pStage.setX(screenWidth / (MARGIN_SCREEN*2)); pStage.setY(screenHeight / (MARGIN_SCREEN*2)); pStage.setWidth((screenWidth * (MARGIN_SCREEN-1)) / MARGIN_SCREEN); pStage.setHeight((screenHeight * (MARGIN_SCREEN-1))/ MARGIN_SCREEN); final SwingNode swingNode = new SwingNode(); EditorFrame frame = initializeEditorFrame(pStage); swingNode.setContent(frame); pStage.setOnCloseRequest(pWindowEvent -> { pWindowEvent.consume(); frame.exit(); }); BorderPane pane = new BorderPane(); pane.setCenter(swingNode); ResourceBundle aAppResources = ResourceBundle.getBundle(this.getClass().getName() + "Strings"); pStage.setTitle(aAppResources.getString("app.name")); String imagePath = aAppResources.getString("app.icon"); pStage.getIcons().add(new Image(imagePath)); pStage.setScene(new Scene(pane)); pStage.show(); }
Source:
<code><START> public boolean isSuperclassOf(ReferenceBinding otherType) { <END> return this.intersectingTypes[0].isClass() && this.superclass().isSuperclassOf(otherType); }</code><technical_language>I more checks needed indeed, RB.isCompatibleWith0() this check a short cut determine compatibility. Alternatively, interface checks need added RB.isCompatibleWith0() for interface case</technical_language>

Target:
public boolean isSuperclassOf(ReferenceBinding otherType) { return this.intersectingTypes[0].isClass() && this.intersectingTypes[0].isSuperclassOf(otherType); }
Source:
<code>private Object fetchObjects(Environment context) { if (context.data.isPresent()) { throw new BadRequestException("FETCH must not include data"); } if (context.isRoot()) { return handleRootQuery(context); <START> } else if (context.rawSource instanceof GraphQLContainer) { <END> return ((GraphQLContainer) context.rawSource).process(context, this); } Class parentClass = context.parentResource.getResourceClass(); String fieldName = context.field.getName(); throw new IllegalStateException("Illegal fetch. Tried to access field: " + fieldName + " for: " + parentClass); }</code><technical_language>Root handled other GraphQLContainer - need instanceof - commonize logic determine if pageTotals requested</technical_language>

Target:
private Object fetchObjects(Environment context) { if (context.data.isPresent()) { throw new BadRequestException("FETCH must not include data"); } return context.container.processFetch(context, this); }
Source:
<code>public void run() { try{ while(active.get()) { <START> WatchKey key = watcher.poll(5, TimeUnit.SECONDS); <END> if (key != null) { for (WatchEvent<?> event : key.pollEvents()) { Path updatedFile = (Path) event.context(); File modifiedFile = updatedFile.toFile(); if (modifiedFile.getName().endsWith("html")) { if (event.kind().equals(ENTRY_DELETE)) { logger.debug("Found deleted template file {}, removing it", modifiedFile); removeTemplate(new File(templateDirectory, modifiedFile.getName())); } else { logger.debug("Found updated or new template file {}, loading it", modifiedFile); loadTemplate(new File(templateDirectory, modifiedFile.getName())); } } } key.reset(); } } } catch (InterruptedException e) { logger.debug("Interrupted exception received..."); } }</code><technical_language>making interval configurable a system property</technical_language>

Target:
public void run() { try{ while(active.get()) { WatchKey key = watcher.poll(watcherInterval, TimeUnit.SECONDS); if (key != null && active.get()) { for (WatchEvent<?> event : key.pollEvents()) { Path updatedFile = (Path) event.context(); File modifiedFile = updatedFile.toFile(); if (modifiedFile.getName().endsWith("html")) { if (event.kind().equals(ENTRY_DELETE)) { logger.debug("Found deleted template file {}, removing it", modifiedFile); removeTemplate(new File(templateDirectory, modifiedFile.getName())); } else { logger.debug("Found updated or new template file {}, loading it", modifiedFile); loadTemplate(new File(templateDirectory, modifiedFile.getName())); } } } key.reset(); } } } catch (InterruptedException e) { logger.debug("Interrupted exception received..."); } }
Source:
<code>public EmailAddress(String fullAddress) { if (fullAddress.contains("(")) { Pattern RE = Pattern.compile(PATTERN_EMAIL); Matcher matcher = RE.matcher(fullAddress); if (matcher.matches()) { email = matcher.group(1); name = matcher.group(2); } else { throw new IllegalArgumentException("invalid email address"); } } else if (fullAddress.contains("<")) { Pattern RE = Pattern.compile(PATTERN_EMAIL_ALT); Matcher matcher = RE.matcher(fullAddress); if (matcher.matches()) { name = matcher.group(1); if (name == null) { name = ""; } email = matcher.group(2); } else { throw new IllegalArgumentException("invalid email address"); } } else { email = fullAddress; name = ""; } <START> if (!email.matches("[^\\s,<>]+@[^\\s,<>]+")) { <END> throw new IllegalArgumentException("invalid email address"); } }</code><technical_language>a static precompiled pattern here</technical_language>

Target:
public EmailAddress(String fullAddress) { if (fullAddress.contains("(")) { Matcher matcher = PATTERN_EMAIL.matcher(fullAddress); if (matcher.matches()) { email = matcher.group(1); name = matcher.group(2); } else { throw new IllegalArgumentException("invalid email address"); } } else if (fullAddress.contains("<")) { Matcher matcher = PATTERN_EMAIL_ANGLE.matcher(fullAddress); if (matcher.matches()) { name = matcher.group(1); if (name == null) { name = ""; } email = matcher.group(2); } else { throw new IllegalArgumentException("invalid email address"); } } else { email = fullAddress; name = ""; } if (!PATTERN_EMAIL_INVALID.matcher(email).matches()) { throw new IllegalArgumentException("invalid email address"); } }
Source:
<code>public int compareTo(PersonAttribute other) { if (getAttributeType() == null) { <START> if (other.getAttributeType() == null) { <END> return 0; } return 1; } int retValue; if ((retValue = getAttributeType().compareTo(other.getAttributeType())) != 0) { return retValue; } if ((retValue = isVoided().compareTo(other.isVoided())) != 0) { return retValue; } if ((retValue = OpenmrsUtil.compareWithNullAsLatest(getDateCreated(), other.getDateCreated())) != 0) { return retValue; } if ((retValue = OpenmrsUtil.compareWithNullAsGreatest(getValue(), other.getValue())) != 0) { return retValue; } return OpenmrsUtil.compareWithNullAsGreatest(getPersonAttributeId(), other.getPersonAttributeId()); }</code><technical_language>If attributes types null for both, i compare other fields of attribute</technical_language>

Target:
public int compareTo(PersonAttribute other) { int retValue = -1; if (getAttributeType() == null) { if (other.getAttributeType() != null) { return 1; } retValue = 0; } if (retValue != 0 && (retValue = getAttributeType().compareTo(other.getAttributeType())) != 0) { return retValue; } if ((retValue = isVoided().compareTo(other.isVoided())) != 0) { return retValue; } if ((retValue = OpenmrsUtil.compareWithNullAsLatest(getDateCreated(), other.getDateCreated())) != 0) { return retValue; } if ((retValue = OpenmrsUtil.compareWithNullAsGreatest(getValue(), other.getValue())) != 0) { return retValue; } return OpenmrsUtil.compareWithNullAsGreatest(getPersonAttributeId(), other.getPersonAttributeId()); }
Source:
<code>public void onExitTab() { if (!isFragmentActive(SurveyFragment.class)) { return; } <START> DomainEventPublisher.instance().unSubscribe( <END> new ValueChangedEvent()); SurveyDB survey = Session.getSurveyByModule(getSimpleName()); if (survey.isCompleted() || survey.isSent()) { dashboardController.setNavigatingBackwards(false); closeSurveyFragment(); return; } new AsyncOnCloseSurveyFragment(surveyFragment, survey, org.eyeseetea.malariacare.domain .utils.Action.CHANGE_TAB).execute(); }</code><technical_language>unSubscribe realized onDestroy fragment</technical_language>

Target:
public void onExitTab() { if (!isFragmentActive(SurveyFragment.class)) { return; } final SurveyDB survey = Session.getSurveyByModule(getSimpleName()); if (survey.isCompleted() || survey.isSent()) { dashboardController.setNavigatingBackwards(false); closeSurveyFragment(); return; } surveyFragment.showProgress(); closeSurveyFragment(survey, org.eyeseetea.malariacare.domain .utils.Action.CHANGE_TAB); }
Source:
<code>public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception { String kickReason = args.length > 0 ? getFinalArg(args, 0) : tl("kickDefault"); kickReason = FormatUtil.replaceFormat(kickReason.replace("\\n", "\n").replace("|", "\n")); for (Player onlinePlayer : ess.getOnlinePlayers()) { if (!sender.isPlayer() || !onlinePlayer.getName().equalsIgnoreCase(sender.getPlayer().getName())) { if (onlinePlayer.isAuthorized("essentials.kickall.exempt")) { <START> throw new Exception(); <END> } onlinePlayer.kickPlayer(kickReason); } } sender.sendMessage(tl("kickedAll")); }</code><technical_language>This throw exception - completely interrupt kickall. Instead, onlinePlayer.kickPlayer(kickReason) called if player *not* essentials.kickall.exempt permission</technical_language>

Target:
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception { String kickReason = args.length > 0 ? getFinalArg(args, 0) : tl("kickDefault"); kickReason = FormatUtil.replaceFormat(kickReason.replace("\\n", "\n").replace("|", "\n")); for (Player onlinePlayer : ess.getOnlinePlayers()) { if (!sender.isPlayer() || !onlinePlayer.getName().equalsIgnoreCase(sender.getPlayer().getName())) { if (!onlinePlayer.isAuthorized("essentials.kickall.exempt")) { onlinePlayer.kickPlayer(kickReason); } } } sender.sendMessage(tl("kickedAll")); }
Source:
<code>private void verifyColumnConsistency() { Iterator<Cube> cubeIt = cubeCache.cubesIterator(); while (cubeIt.hasNext()) { Cube cube = cubeIt.next(); IColumn cubeCol = cube.getColumn(); IColumn storedCol = cubeCache.getLoadedColumn(cube.getX(), cube.getZ()); if (storedCol == null) { throw new RuntimeException("Cube with no stored column!"); } if (storedCol != cubeCol) { throw new RuntimeException("CubeColumn and StoredColumn are different!"); } } Iterator<IColumn> columnIt = cubeCache.columnsIterator(); int totalCubes = 0; while (columnIt.hasNext()) { IColumn storedCol = columnIt.next(); Collection<Cube> storedColumnCubes = storedCol.getLoadedCubes(); for (Cube c : storedColumnCubes) { CubePos crd = c.getCoords(); <START> if (cubeCache.getCube(crd.getX(), crd.getY(), crd.getZ(), Requirement.GET_CACHED) != c) { <END> throw new RuntimeException("Cube in column not the same as stored cube!"); } } totalCubes += storedColumnCubes.size(); } if (totalCubes != cubeCache.getLoadedCubeCount()) { throw new RuntimeException("Counted " + totalCubes + " cubes in columns, but there are total of " + cubeCache.getLoadedCubeCount() + " cubes!"); } }</code><technical_language>formatting. is wrong getLoadedCube? shorter, more readable</technical_language>

Target:
private void verifyColumnConsistency() { Iterator<Cube> cubeIt = cubeCache.cubesIterator(); while (cubeIt.hasNext()) { Cube cube = cubeIt.next(); IColumn cubeCol = cube.getColumn(); IColumn storedCol = cubeCache.getLoadedColumn(cube.getX(), cube.getZ()); if (storedCol == null) { throw new RuntimeException("Cube with no stored column!"); } if (storedCol != cubeCol) { throw new RuntimeException("CubeColumn and StoredColumn are different!"); } } Iterator<IColumn> columnIt = cubeCache.columnsIterator(); int totalCubes = 0; while (columnIt.hasNext()) { IColumn storedCol = columnIt.next(); Collection<Cube> storedColumnCubes = storedCol.getLoadedCubes(); for (Cube c : storedColumnCubes) { if (cubeCache.getLoadedCube(c.getCoords()) != c) { throw new RuntimeException("Cube in column not the same as stored cube!"); } } totalCubes += storedColumnCubes.size(); } if (totalCubes != cubeCache.getLoadedCubeCount()) { throw new RuntimeException("Counted " + totalCubes + " cubes in columns, but there are total of " + cubeCache.getLoadedCubeCount() + " cubes!"); } }
Source:
<code>public static ListenableFuture<Void> init(@NonNull Context context, @NonNull AppConfig appConfig) { Preconditions.checkNotNull(context); Preconditions.checkNotNull(appConfig); synchronized (sInitDeinitLock) { if (sTargetInitialized) { deinit(); } Preconditions.checkState(!sTargetInitialized, "Must call CameraX.deinit() first."); sTargetInitialized = true; Executor executor = appConfig.getCameraExecutor(null); if (executor == null) { executor = new CoreCameraExecutor(); } CameraX cameraX = new CameraX(executor); sInstance = cameraX; ListenableFuture<Void> deinitFuture = sInitDeinitFuture; sInitDeinitFuture = <START> CallbackToFutureAdapter.getFuture( <END> completer -> { deinitFuture.addListener(() -> { Futures.propagate(cameraX.initInternal(context, appConfig), completer); }, cameraX.mCameraExecutor); return "CameraX init"; }); return sInitDeinitFuture; } }</code><technical_language>want Wenhung's changes merged for chaining Futures. this code a easier read</technical_language>

Target:
public static ListenableFuture<Void> init(@NonNull Context context, @NonNull AppConfig appConfig) { Preconditions.checkNotNull(context); Preconditions.checkNotNull(appConfig); synchronized (sInitDeinitLock) { if (sTargetInitialized) { deinit(); } Preconditions.checkState(!sTargetInitialized, "Must call CameraX.deinit() first."); sTargetInitialized = true; Executor executor = appConfig.getCameraExecutor(null); if (executor == null) { executor = new CoreCameraExecutor(); } CameraX cameraX = new CameraX(executor); sInstance = cameraX; sInitFuture = FutureChain.from(sDeinitFuture) .transformAsync(input -> cameraX.initInternal(context, appConfig), CameraXExecutors.directExecutor()); return sInitFuture; } }
Source:
<code>private void flushRaw(int limit) throws IOException { int expectedPacketSize = limit + HEADER_LENGTH * ((limit / maxPacketSize) + 1); int notCompressPosition = 0; while (notCompressPosition < expectedPacketSize) { int length = buffer.remaining(); if (length > maxPacketSize) { length = maxPacketSize; } byte[] header = new byte[HEADER_LENGTH]; header[0] = (byte) (length & 0xff); header[1] = (byte) (length >>> 8); header[2] = (byte) (length >>> 16); header[3] = (byte) seqNo++; outputStream.write(header, 0, HEADER_LENGTH); notCompressPosition += 4; if (length > 0) { <START> this.buffer.writeTo(this.outputStream); <END> this.outputStream.flush(); notCompressPosition += length; } } }</code><technical_language>write "length" bytes, this.buffer.writeTo(this.outputStream, 0, length); Packet max size is set in variable maxPacketSize (server option max_allowed_packet). if sending more this size, database close socket</technical_language>

Target:
private void flushRaw(int limit) throws IOException { int expectedPacketSize = limit + HEADER_LENGTH * ((limit / maxPacketSize) + 1); if (limit < maxPacketSize) { byte[] header = this.header; header[0] = (byte) (limit & 0xff); header[1] = (byte) (limit >>> 8); header[2] = (byte) (limit >>> 16); header[3] = (byte) seqNo++; outputStream.write(header, 0, HEADER_LENGTH); this.buffer.writeTo(this.outputStream); } else { int notCompressPosition = 0; while (notCompressPosition < expectedPacketSize) { int length = buffer.remaining(); if (length > maxPacketSize) { length = maxPacketSize; } byte[] header = this.header; header[0] = (byte) (length & 0xff); header[1] = (byte) (length >>> 8); header[2] = (byte) (length >>> 16); header[3] = (byte) seqNo++; outputStream.write(header, 0, HEADER_LENGTH); notCompressPosition += 4; if (length > 0) { this.buffer.writePartTo(this.outputStream, length); notCompressPosition += length; } } } }
Source:
<code>private void setupButtons() { Button closeButton = (Button)findViewById(R.id.RestartCommCare); closeButton.setText(Localization.get("crash.warning.button")); closeButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { <START> CommCareApplication._().restartCommCare(CrashWarningActivity.this); <END> } }); infoButton = (ImageButton)findViewById(R.id.InfoButton); infoButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { toggleErrorMessageVisibility(); } }); }</code><technical_language>Calls restartCommCare delegated instance (like _()) is a static method</technical_language>

Target:
private void setupButtons() { Button closeButton = (Button)findViewById(R.id.RestartCommCare); closeButton.setText(Localization.get("crash.warning.button")); closeButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { CommCareApplication.restartCommCare(CrashWarningActivity.this); } }); infoButton = (ImageButton)findViewById(R.id.InfoButton); infoButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { toggleErrorMessageVisibility(); } }); }
Source:
<code>private Optional<LocalMemoryContext> getSystemMemoryContext() { try { return Optional.of(systemMemoryContextSupplier.get()); } <START> catch (Exception ignored) { <END> } return Optional.empty(); }</code><technical_language>RuntimeException</technical_language>

Target:
private Optional<LocalMemoryContext> getSystemMemoryContext() { try { return Optional.of(systemMemoryContextSupplier.get()); } catch (RuntimeException ignored) { } return Optional.empty(); }
Source:
<code>public void requestPinReset(UUID userID) { <START> ConfirmationCode confirmationCode = createConfirmationCode(); <END> setConfirmationCode(userID, confirmationCode); }</code><technical_language>This a check exist a pin reset request (see remark test). is stil bruteforce code other around</technical_language>

Target:
public void requestPinReset(UUID userID) { User userEntity = userService.getUserByID(userID); ConfirmationCode confirmationCode = createConfirmationCode(); setConfirmationCode(userEntity, confirmationCode); if (confirmationCode.getConfirmationCode() != null) { userService.sendConfirmationCodeTextMessage(userEntity.getMobileNumber(), confirmationCode, SmsService.TemplateName_AddUserNumberConfirmation); } }