auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Optional<AggStats> getSingleStat(final Long accountId, final DeviceId deviceId, final DateTime dateLocal) { Response<ImmutableList<AggStats>> response = getBatchStatsBetweenLocalDate(accountId, deviceId, dateLocal, dateLocal); if (response.status != Response.Status.SUCCESS || response.exception.isPresent()) { LOGGER.debug("action=get-single-stat response_stats={} response_exception={} accountId={} senseId={} dateLocal={}", response.status.toString(), response.exception.toString(), accountId, deviceId.externalDeviceId, dateLocal.toString()); return Optional.absent(); } if (response.data.isEmpty()) { LOGGER.trace("action=get-single-stat response_data=empty accountId={} senseId={} dateLocal={}", accountId, deviceId.externalDeviceId, dateLocal.toString()); return Optional.absent(); } <START> Optional<AggStats> aggStatsOptional = Optional.of(response.data.get(0)); <END> return aggStatsOptional; }</code><technical_language>final</technical_language>

Target:
public Optional<AggStats> getSingleStat(final Long accountId, final DeviceId deviceId, final DateTime dateLocal) { final Response<ImmutableList<AggStats>> response = getBatchStatsBetweenLocalDate(accountId, deviceId, dateLocal, dateLocal); if (response.status != Response.Status.SUCCESS || response.exception.isPresent()) { LOGGER.debug("action=get-single-stat response_stats={} response_exception={} accountId={} senseId={} dateLocal={}", response.status.toString(), response.exception.toString(), accountId, deviceId.externalDeviceId, dateLocal.toString()); return Optional.absent(); } if (response.data.isEmpty()) { LOGGER.trace("action=get-single-stat response_data=empty accountId={} senseId={} dateLocal={}", accountId, deviceId.externalDeviceId, dateLocal.toString()); return Optional.absent(); } final Optional<AggStats> aggStatsOptional = Optional.of(response.data.get(0)); return aggStatsOptional; }
Source:
<code>public void removeSegment(final DataSegment segment, final DataSegmentChangeCallback callback) { try { announcer.unannounceSegment(segment); segmentsToDelete.add(segment); log.info("Completely removing [%s] in [%,d] millis", segment.getIdentifier(), config.getDropSegmentDelayMillis()); exec.schedule( new Runnable() { @Override public void run() { try { synchronized (lock) { if (segmentsToDelete.remove(segment)) { File parentPath = segmentManager.getSegmentLocation(segment); segmentManager.dropSegment(segment); <START> File segmentInfoCacheFile = new File(parentPath, "info.json"); <END> if (!segmentInfoCacheFile.delete()) { log.warn("Unable to delete segmentInfoCacheFile[%s]", segmentInfoCacheFile); } } } } catch (Exception e) { log.makeAlert(e, "Failed to remove segment! Possible resource leak!") .addData("segment", segment) .emit(); } } }, config.getDropSegmentDelayMillis(), TimeUnit.MILLISECONDS ); } catch (Exception e) { log.makeAlert(e, "Failed to remove segment") .addData("segment", segment) .emit(); } finally { callback.execute(); } }</code><technical_language>extra space</technical_language>

Target:
public void removeSegment(final DataSegment segment, final DataSegmentChangeCallback callback) { try { announcer.unannounceSegment(segment); segmentsToDelete.add(segment); log.info("Completely removing [%s] in [%,d] millis", segment.getIdentifier(), config.getDropSegmentDelayMillis()); exec.schedule( new Runnable() { @Override public void run() { try { synchronized (lock) { File segmentToRemove = segmentManager.getSegmentFiles(segment); if (segmentsToDelete.remove(segment)) { segmentManager.dropSegment(segment); File segmentInfoCacheFile = new File(segmentToRemove, SEGMENT_CACHE_FILENAME); if (!segmentInfoCacheFile.delete()) { log.warn("Unable to delete segmentInfoCacheFile[%s]", segmentInfoCacheFile); } } } } catch (Exception e) { log.makeAlert(e, "Failed to remove segment! Possible resource leak!") .addData("segment", segment) .emit(); } } }, config.getDropSegmentDelayMillis(), TimeUnit.MILLISECONDS ); } catch (Exception e) { log.makeAlert(e, "Failed to remove segment") .addData("segment", segment) .emit(); } finally { callback.execute(); } }
Source:
<code>private void ensureWritableBytes(int minWritableBytes) { int neededBufferSize = bufferPosition + minWritableBytes; if (neededBufferSize <= slice.length()) { return; } if (slice.length() >= maxBufferSize) { flushBufferToOutputStream(); return; } int newBufferSize = min(max(slice.length() * 2, minWritableBytes), maxBufferSize); if (neededBufferSize <= newBufferSize) { byte[] previousBuffer = buffer; buffer = new byte[newBufferSize]; System.arraycopy(previousBuffer, 0, buffer, 0, bufferPosition); } else { flushBufferToOutputStream(); buffer = new byte[newBufferSize]; } <START> slice = wrappedBuffer(buffer); <END> }</code><technical_language>I place this assignment of buffer clear linked</technical_language>

Target:
private void ensureWritableBytes(int minWritableBytes) { int neededBufferSize = bufferPosition + minWritableBytes; if (neededBufferSize <= slice.length()) { return; } if (slice.length() >= maxBufferSize) { flushBufferToOutputStream(); return; } int newBufferSize = min(max(slice.length() * 2, minWritableBytes), maxBufferSize); if (neededBufferSize <= newBufferSize) { byte[] previousBuffer = buffer; buffer = new byte[newBufferSize]; slice = wrappedBuffer(buffer); System.arraycopy(previousBuffer, 0, buffer, 0, bufferPosition); } else { flushBufferToOutputStream(); buffer = new byte[newBufferSize]; slice = wrappedBuffer(buffer); } }
Source:
<code>private void composeBuckFile(Path cacheDir) { ImmutableList.Builder<Rule> rulesBuilder = new ImmutableList.Builder<>(); if (dependencies != null) { rulesBuilder.add( new Prebuilt() .prebuiltType(RuleType.PREBUILT_JAR.getProperties().get(0)) .prebuilt(TRANSFORM_JAR) .ruleType(RuleType.PREBUILT_JAR.getBuckName()) .name(TRANSFORM_JAR)); <START> rulesBuilder.add( <END> new JvmBinaryRule() .excludes(Collections.singleton(BINARY_EXCLUDES)) .deps(dependencies) .ruleType(RuleType.JAVA_BINARY.getBuckName()) .name(OKBUCK_TRANSFORM_TARGET_NAME) .defaultVisibility()); } rulesBuilder.addAll( configFileToPathMap .values() .stream() .sorted() .map(configFileName -> new ExportFile().name(configFileName)) .collect(Collectors.toList())); List<Rule> rules = rulesBuilder.build(); File buckFile = cacheDir.resolve(OkBuckGradlePlugin.BUCK).toFile(); Multimap<String, String> loadStatements = LoadStatementsUtil.getLoadStatements(rules, okbuckExt); FileUtil.writeToBuckFile(loadStatements, rulesBuilder.build(), buckFile); }</code><technical_language>nit: chain add's</technical_language>

Target:
private void composeBuckFile(Path cacheDir) { ImmutableList.Builder<Rule> rulesBuilder = new ImmutableList.Builder<>(); if (dependencies != null) { rulesBuilder .add( new Prebuilt() .prebuiltType(RuleType.PREBUILT_JAR.getProperties().get(0)) .prebuilt(TRANSFORM_JAR) .ruleType(RuleType.PREBUILT_JAR.getBuckName()) .name(TRANSFORM_JAR)) .add( new JvmBinaryRule() .excludes(Collections.singleton(BINARY_EXCLUDES)) .deps(dependencies) .ruleType(RuleType.JAVA_BINARY.getBuckName()) .name(OKBUCK_TRANSFORM_TARGET_NAME) .defaultVisibility()); } rulesBuilder.addAll( configFileToPathMap .values() .stream() .sorted() .map(configFileName -> new ExportFile().name(configFileName)) .collect(Collectors.toList())); List<Rule> rules = rulesBuilder.build(); File buckFile = cacheDir.resolve(OkBuckGradlePlugin.BUCK).toFile(); Multimap<String, String> loadStatements = LoadStatementsUtil.getLoadStatements(rules, okbuckExt); FileUtil.writeToBuckFile(loadStatements, rules, buckFile); }
Source:
<code>void setDeltaAttempted(boolean deltaAttempted) { if (deltaAttempted) flags |= DELTA_ATTEMPTED; else <START> flags &= DELTA_ATTEMPTED; <END> }</code><technical_language>Missing ~</technical_language>

Target:
void setDeltaAttempted(boolean deltaAttempted) { if (deltaAttempted) flags |= DELTA_ATTEMPTED; else flags &= ~DELTA_ATTEMPTED; }
Source:
<code>public void resolveTwoLevelHigherRelativeUrl() throws IOException, ConfigInvalidException { final String path = addSubmoduleToIndex(); String base = "git://server/repo.git"; FileBasedConfig config = db.getConfig(); config.setString(ConfigConstants.CONFIG_REMOTE_SECTION, Constants.DEFAULT_REMOTE_NAME, ConfigConstants.CONFIG_KEY_URL, base); config.save(); SubmoduleWalk generator = SubmoduleWalk.forIndex(db); assertTrue(generator.next()); assertNull(generator.getConfigUrl()); assertNull(generator.getConfigUpdate()); FileBasedConfig modulesConfig = new FileBasedConfig(new File( db.getWorkTree(), Constants.DOT_GIT_MODULES), db.getFS()); modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path, ConfigConstants.CONFIG_KEY_PATH, path); String url = "../../sub.git"; modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path, ConfigConstants.CONFIG_KEY_URL, url); String update = "rebase"; modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path, ConfigConstants.CONFIG_KEY_UPDATE, update); modulesConfig.save(); SubmoduleInitCommand command = new SubmoduleInitCommand(db); Collection<String> modules = command.call(); assertNotNull(modules); assertEquals(1, modules.size()); assertEquals(path, modules.iterator().next()); generator = SubmoduleWalk.forIndex(db); assertTrue(generator.next()); <START> assertEquals("git://sub.git", generator.getConfigUrl()); <END> assertEquals(update, generator.getConfigUpdate()); }</code><technical_language>this a valid Url sub.git is in host name section of Url, resolver check this</technical_language>

Target:
public void resolveTwoLevelHigherRelativeUrl() throws IOException, ConfigInvalidException { final String path = addSubmoduleToIndex(); String base = "git://server/repo.git"; FileBasedConfig config = db.getConfig(); config.setString(ConfigConstants.CONFIG_REMOTE_SECTION, Constants.DEFAULT_REMOTE_NAME, ConfigConstants.CONFIG_KEY_URL, base); config.save(); SubmoduleWalk generator = SubmoduleWalk.forIndex(db); assertTrue(generator.next()); assertNull(generator.getConfigUrl()); assertNull(generator.getConfigUpdate()); FileBasedConfig modulesConfig = new FileBasedConfig(new File( db.getWorkTree(), Constants.DOT_GIT_MODULES), db.getFS()); modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path, ConfigConstants.CONFIG_KEY_PATH, path); String url = "../../server2/sub.git"; modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path, ConfigConstants.CONFIG_KEY_URL, url); String update = "rebase"; modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path, ConfigConstants.CONFIG_KEY_UPDATE, update); modulesConfig.save(); SubmoduleInitCommand command = new SubmoduleInitCommand(db); Collection<String> modules = command.call(); assertNotNull(modules); assertEquals(1, modules.size()); assertEquals(path, modules.iterator().next()); generator = SubmoduleWalk.forIndex(db); assertTrue(generator.next()); assertEquals("git://server2/sub.git", generator.getConfigUrl()); assertEquals(update, generator.getConfigUpdate()); }
Source:
<code>protected boolean hasType(JSONObject valueObject, ResourceTypes jsonType) { if (!valueObject.has(WebAnnotationFields.TYPE)) return false; try { String value = parseStringTypeValue(valueObject); return jsonType.getJsonValue().equals(value); } catch (JSONException e) { <START> } catch (ClassCastException e) { <END> } try { String value; JSONArray array = (JSONArray) valueObject.get(WebAnnotationFields.TYPE); for (int i = 0; i < array.length(); i++) { value = array.getString(i); if (jsonType.getJsonValue().equals(value)) return true; } } catch (JSONException e) { logger.warn("Unexpected problem occured when parsing type value: " + valueObject); } return false; }</code><technical_language>simply ignore exceptions</technical_language>

Target:
protected boolean hasType(JSONObject valueObject, ResourceTypes jsonType) { if (!valueObject.has(WebAnnotationFields.TYPE)) return false; try { String value = parseStringTypeValue(valueObject); return jsonType.getJsonValue().equals(value); } catch (JSONException e) { } try { String value; JSONArray array = (JSONArray) valueObject.get(WebAnnotationFields.TYPE); for (int i = 0; i < array.length(); i++) { value = array.getString(i); if (jsonType.getJsonValue().equals(value)) return true; } } catch (JSONException e) { logger.warn("Unexpected problem occured when parsing type value: " + valueObject); } return false; }
Source:
<code>public TransactionalSharedLuceneLock makeLock(Directory dir, String lockName) { if (!(dir instanceof DirectoryLuceneV5)) { throw new UnsupportedOperationException("TransactionalSharedLuceneLock can only be used with DirectoryLuceneV5, got: " + dir); } DirectoryLuceneV5 infinispanDirectory = (DirectoryLuceneV5) dir; Cache cache = infinispanDirectory.getDistLockCache(); String indexName = infinispanDirectory.getIndexName(); TransactionManager tm = cache.getAdvancedCache().getTransactionManager(); if (tm == null) { ComponentStatus status = cache.getAdvancedCache().getComponentRegistry().getStatus(); <START> if (status.equals(ComponentStatus.RUNNING)) { <END> throw new CacheException( "Failed looking up TransactionManager. Check if any transaction manager is associated with Infinispan cache: \'" + cache.getName() + "\'"); } else { throw new CacheException("Failed looking up TransactionManager: the cache is not running"); } } TransactionalSharedLuceneLock lock = new TransactionalSharedLuceneLock(cache, indexName, lockName, tm); if (log.isTraceEnabled()) { log.tracef("Lock prepared, not acquired: %s for index %s", lockName, indexName); } return lock; }</code><technical_language>Is get NPE here? switch order ComponentStatus.RUNNING.equals(status) avoid (of if is get here)</technical_language>

Target:
public TransactionalSharedLuceneLock makeLock(Directory dir, String lockName) { if (!(dir instanceof DirectoryLucene)) { throw new UnsupportedOperationException("TransactionalSharedLuceneLock can only be used with DirectoryLucene, got: " + dir); } DirectoryLucene infinispanDirectory = (DirectoryLucene) dir; Cache cache = infinispanDirectory.getDistLockCache(); String indexName = infinispanDirectory.getIndexName(); TransactionManager tm = cache.getAdvancedCache().getTransactionManager(); if (tm == null) { ComponentStatus status = cache.getAdvancedCache().getComponentRegistry().getStatus(); if (status.equals(ComponentStatus.RUNNING)) { throw new CacheException( "Failed looking up TransactionManager. Check if any transaction manager is associated with Infinispan cache: \'" + cache.getName() + "\'"); } else { throw new CacheException("Failed looking up TransactionManager: the cache is not running"); } } TransactionalSharedLuceneLock lock = new TransactionalSharedLuceneLock(cache, indexName, lockName, tm); if (log.isTraceEnabled()) { log.tracef("Lock prepared, not acquired: %s for index %s", lockName, indexName); } return lock; }
Source:
<code>public PhysicalOperation(OperatorFactory operatorFactory, Map<Symbol, Integer> layout, LocalExecutionPlanContext context, PhysicalOperation source) { requireNonNull(operatorFactory, "operatorFactory is null"); requireNonNull(layout, "layout is null"); requireNonNull(source, "source is null"); int channelCount = layout.values().stream().mapToInt(Integer::intValue).max().orElse(-1) + 1; checkArgument(layout.size() == channelCount, "invalid layout"); <START> checkArgument(ImmutableSet.copyOf(layout.values()).containsAll(ContiguousSet.create(closedOpen(0, channelCount), integers())), "invalid layout"); <END> Map<Integer, Symbol> channelLayout = ImmutableBiMap.copyOf(layout).inverse(); this.operatorFactories = ImmutableList.<OperatorFactory>builder().addAll(source.getOperatorFactories()).add(operatorFactory).build(); this.layout = ImmutableMap.copyOf(layout); this.types = range(0, channelCount) .mapToObj(channelLayout::get) .map(context.getTypes()::get) .collect(toImmutableList()); verify(this.types.equals(operatorFactory.getTypes())); this.pipelineExecutionStrategy = source.pipelineExecutionStrategy; }</code><technical_language>copy. extract a method</technical_language>

Target:
public PhysicalOperation(OperatorFactory operatorFactory, Map<Symbol, Integer> layout, LocalExecutionPlanContext context, PhysicalOperation source) { this(operatorFactory, layout, context, Optional.of(requireNonNull(source, "source is null")), source.getPipelineExecutionStrategy()); }
Source:
<code>protected <T> Observable buildUseCaseObservable(Map<String, T> parameters) { if (parameters == null || parameters.get(PARAM_USER_NAME) == null) { <START> return Observable.error(new IllegalArgumentException("missing user name")); <END> } String userName = (String) parameters.get(PARAM_USER_NAME); return surveyRepository.createUser(userName) .concatMap(new Function<Long, Observable<Boolean>>() { @Override public Observable<Boolean> apply(final Long userId) { if (userId == INVALID_ID) { return Observable.error(new Exception("Error inserting user")); } return userRepository.setSelectedUser(userId); } }); }</code><technical_language>Translation strings</technical_language>

Target:
protected <T> Observable buildUseCaseObservable(Map<String, T> parameters) { if (parameters == null || parameters.get(PARAM_USER_NAME) == null) { return Observable.error(new IllegalArgumentException("missing user name")); } String userName = (String) parameters.get(PARAM_USER_NAME); return surveyRepository.createUser(userName) .concatMap(new Function<Long, Observable<Boolean>>() { @Override public Observable<Boolean> apply(final Long userId) { if (INVALID_USER_ID.equals(userId)) { return Observable.error(new Exception("Error inserting user")); } return userRepository.setSelectedUser(userId); } }); }
Source:
<code>protected void updateActions() { if (! m_actionsInitialized) return; boolean enabled = hasSelection(); m_selectAllAction.setEnabled(enabled); m_refreshAction.setEnabled(enabled); <START> m_enableLoadMetersAction.setEnabled(true); <END> m_loadMetersRefreshSubSubmenu.setVisible(m_loadMetersEnabled); for (SetLoadMeterPeriodAction act : m_setLoadMeterPeriodActions) { act.setEnabled(true); act.refreshLabel(m_loadMeterTimerPeriod); } }</code><technical_language>do this start, enable(true)</technical_language>

Target:
protected void updateActions() { if (! m_actionsInitialized) return; boolean enabled = hasSelection(); m_selectAllAction.setEnabled(enabled); m_refreshAction.setEnabled(enabled); m_enableLoadMetersAction.setEnabled(true); m_loadMetersRefreshSubSubmenu.setVisible(m_loadMetersEnabled); for (SetLoadMeterPeriodAction act : m_setLoadMeterPeriodActions) { act.setEnabled(true); } }
Source:
<code>public void inStoreAnonymousId() { <START> StoreFixtures.withStore(client(), store -> { <END> final String anonymousId = randomKey(); final CartDraft cartDraft = CartDraft.of(EUR).withAnonymousId(anonymousId).withStore(store.toResourceIdentifier()); final Cart cart = client().executeBlocking(CartCreateCommand.of(cartDraft)); final PagedQueryResult<Cart> result = client().executeBlocking(CartQuery.of().withPredicates(m -> m.anonymousId().is(anonymousId))); assertThat(result.getResults()).hasSize(1); assertThat(result.head().get().getId()).isEqualTo(cart.getId()); client().executeBlocking(CartDeleteCommand.of(cart)); }); }</code><technical_language>nice a static import - more consistent other code</technical_language>

Target:
public void inStoreAnonymousId() { withStore(client(), store -> { final String anonymousId = randomKey(); final CartDraft cartDraft = CartDraft.of(EUR).withAnonymousId(anonymousId).withStore(store.toResourceIdentifier()); final Cart cart = client().executeBlocking(CartCreateCommand.of(cartDraft)); final PagedQueryResult<Cart> result = client().executeBlocking(CartQuery.of().withPredicates(m -> m.anonymousId().is(anonymousId))); assertThat(result.getResults()).hasSize(1); assertThat(result.head().get().getId()).isEqualTo(cart.getId()); client().executeBlocking(CartDeleteCommand.of(cart)); }); }
Source:
<code>public void testThrowsExceptionWhenFieldNameMissing() throws IOException { List<String> readerFields = new ArrayList<>(Arrays.asList("field_a", "field_b", "field_c")); List<String> writerFields = new ArrayList<>(Arrays.asList("field_a", "field_b", "field_c")); List<String> writerData = new ArrayList<>(Arrays.asList("field_a_value", "field_b_value", "field_c_value")); Type readerType = getTypeNullName(readerFields.size()); Type writerType = getType(writerFields); write(tempFile, writerType, writerData); <START> RowBlock readBlock = read(tempFile, readerType); <END> }</code><technical_language>variable is needed</technical_language>

Target:
public void testThrowsExceptionWhenFieldNameMissing() throws IOException { List<String> readerFields = new ArrayList<>(Arrays.asList("field_a", "field_b", "field_c")); List<String> writerFields = new ArrayList<>(Arrays.asList("field_a", "field_b", "field_c")); List<String> writerData = new ArrayList<>(Arrays.asList("field_a_value", "field_b_value", "field_c_value")); Type readerType = getTypeNullName(readerFields.size()); Type writerType = getType(writerFields); write(tempFile, writerType, writerData); read(tempFile, readerType); }
Source:
<code>public void writeFloat(float v) { int vAsInt = Float.floatToIntBits(v); byte[] bytes = new byte[FLOAT_SIZE_IN_BYTES]; for (int i = 0; i < FLOAT_SIZE_IN_BYTES; ++i) { <START> byte b = (byte) ((vAsInt >> (i * 8)) & 0xFF); <END> bytes[i] = b; } super.scatterBytes(bytes); }</code><technical_language>need variable 'b' here</technical_language>

Target:
public void writeFloat(float v) { super.scatterBytes(BytesUtils.intToBytes(Float.floatToIntBits(v))); }
Source:
<code>void syncSSMInitialize() { try { addIfMissing(m_stateMachineMemberPath, CreateMode.PERSISTENT, null); addIfMissing(ZKUtil.joinZKPath(m_stateMachineMemberPath, m_memberId), CreateMode.EPHEMERAL, null); m_groupMembers = ImmutableSet.copyOf(m_zk.getChildren(m_stateMachineMemberPath, m_membershipWatcher)); for (StateMachineInstance instance : m_registeredStateMachines) { instance.syncStateMachineInitialize(m_groupMembers); } } catch (KeeperException.SessionExpiredException e) { m_done.set(true); } catch (KeeperException.ConnectionLossException e) { m_done.set(true); } catch (InterruptedException e) { m_done.set(true); } catch (Exception e) { org.voltdb.VoltDB.crashLocalVoltDB( <START> "Unexpected failure in initializeInstances.", true, e); <END> m_done.set(true); } }</code><technical_language>collapse catch blocks a single multi-catch block</technical_language>

Target:
void syncSSMInitialize() { try { addIfMissing(m_stateMachineMemberPath, CreateMode.PERSISTENT, null); addIfMissing(ZKUtil.joinZKPath(m_stateMachineMemberPath, m_memberId), CreateMode.EPHEMERAL, null); m_groupMembers = ImmutableSet.copyOf(m_zk.getChildren(m_stateMachineMemberPath, m_membershipWatcher)); for (StateMachineInstance instance : m_registeredStateMachines) { instance.syncStateMachineInitialize(m_groupMembers); } } catch (KeeperException.SessionExpiredException | KeeperException.ConnectionLossException e) { m_done.set(true); } catch (InterruptedException e) { m_done.set(true); } catch (Exception e) { org.voltdb.VoltDB.crashLocalVoltDB( "Unexpected failure in initializeInstances.", true, e); } }
Source:
<code>public ASTNode transform(BuiltinSet builtinSet) { boolean changed = false; BuiltinSet.Builder builder = BuiltinSet.builder(); for(Term element : builtinSet.elements()) { Term transformedElement = (Term) element.accept(this); builder.add(transformedElement); changed = changed || (transformedElement != element); } <START> for (KItem kItem : builtinSet.collectionPatterns()) { <END> Term term = (Term) kItem.accept(this); changed = changed || (term != kItem); builder.concatenate(term); } for (Variable variable : builtinSet.collectionVariables()) { Term term = (Term) variable.accept(this); changed = changed || (term != variable); builder.concatenate(term); } for (Term term : builtinSet.collectionFunctions()) { Term transformedTerm = (Term) term.accept(this); changed = changed || (transformedTerm != term); builder.concatenate(transformedTerm); } return changed ? builder.build() : builtinSet; }</code><technical_language>return collections in method</technical_language>

Target:
public ASTNode transform(BuiltinSet builtinSet) { boolean changed = false; BuiltinSet.Builder builder = BuiltinSet.builder(); for(Term element : builtinSet.elements()) { Term transformedElement = (Term) element.accept(this); builder.add(transformedElement); changed = changed || (transformedElement != element); } for (Term term : builtinSet.baseTerms()) { Term transformedTerm = (Term) term.accept(this); changed = changed || (transformedTerm != term); builder.concatenate(transformedTerm); } return changed ? builder.build() : builtinSet; }
Source:
<code>public List<Product> resolveProductsByIds(Owner recipientOwner, Collection<String> productIds, boolean includeShares) { Map<String, Product> result = new HashMap<String, Product>(); List<Product> existingProducts; Set<String> missingProducts = new HashSet<String>(); <START> if (productIds != null && !productIds.isEmpty()) { <END> missingProducts.addAll(productIds); existingProducts = ownerProductCurator.getProductsByIds(recipientOwner, productIds).list(); } else { existingProducts = ownerProductCurator.getProductsByOwner(recipientOwner).list(); } for (Product product : existingProducts) { result.put(product.getId(), product); missingProducts.remove(product.getId()); } if (includeShares && CollectionUtils.isNotEmpty(missingProducts)) { List<OwnerProductShare> shares = shareCurator.findProductSharesByRecipient(recipientOwner, true, missingProducts); for (OwnerProductShare share : shares) { if (!result.containsKey(share.getId())) { result.put(share.getId(), share.getProduct()); } } } return new ArrayList<Product>(result.values()); }</code><technical_language>confused productIds null empty. If expected case, I a public method named resolveAllProducts(Owner owner, boolean includeShares) resolveProductsByIds delegate private method</technical_language>

Target:
public List<Product> resolveProductsByIds(Owner recipientOwner, Collection<String> productIds, boolean includeShares) { return resolveProducts(recipientOwner, productIds, includeShares); }
Source:
<code>private void leaveBreadcrumb(String activityName, String lifecycleCallback) { Map<String, Object> metadata = new HashMap<>(); metadata.put(KEY_LIFECYCLE_CALLBACK, lifecycleCallback); try { client.leaveBreadcrumb(activityName, BreadcrumbType.NAVIGATION, metadata); } catch (Exception ex) { <START> Logger.warn("Failed to leave breadcrumb in SessionTracker: " + ex.getMessage()); <END> } }</code><technical_language>Client.leaveBreadcrumb check auto capture flag, this is a separate PR, need drop check entirely</technical_language>

Target:
private void leaveBreadcrumb(String activityName, String lifecycleCallback) { Map<String, Object> metadata = new HashMap<>(); metadata.put(KEY_LIFECYCLE_CALLBACK, lifecycleCallback); try { client.leaveBreadcrumb(activityName, BreadcrumbType.NAVIGATION, metadata); } catch (Exception ex) { logger.w("Failed to leave breadcrumb in SessionTracker: " + ex.getMessage()); } }
Source:
<code>public void onStop(){ try { Dhis2Application.bus.unregister(this); <START> }catch(Exception e){} <END> super.onStop(); }</code><technical_language>@ivanarrizabalaga show a warning dialog</technical_language>

Target:
public void onStop(){ Dhis2Application.bus.unregister(this); super.onStop(); }
Source:
<code><START> public int getDeletedByUserId() { <END> return deletedByUserId; }</code><technical_language>This Integer, int match type line 57. If this return null error occur int null (but deleteByUserId can)</technical_language>

Target:
public Integer getDeletedByUserId() { return deletedByUserId; }
Source:
<code>public static void changeValueNoncompoundAttribute(WebDriver driver, By context, String simpleName, String value) { <START> WebElement attribuetContainer = findAttributeContainerWebElement(driver, context, simpleName, false); <END> changeValueAttribute(attribuetContainer, simpleName, value); }</code><technical_language>typo in attribuetContainer</technical_language>

Target:
public static void changeValueNoncompoundAttribute(WebDriver driver, By context, String simpleName, String value) { WebElement attributeContainer = findAttributeContainerWebElement(driver, context, simpleName, false); changeValueAttributeTextNumberEmailUrl(attributeContainer, simpleName, value); assertEquals(getValueNoncompoundAttribute(driver, context, simpleName), value); }
Source:
<code>protected Collection<MultiMapRecord> getNewRecordsCollection() { <START> final MultiMapConfig.ValueCollectionType valueCollectionType = config.getValueCollectionType(); <END> return createCollection(valueCollectionType); }</code><technical_language>I declare local variable. method more complex needs be</technical_language>

Target:
protected Collection<MultiMapRecord> getNewRecordsCollection() { return createCollection(config.getValueCollectionType()); }
Source:
<code>private void recursiveTar(String entryFilename, String rootPath, String itemPath, TarArchiveOutputStream tarArchive) { try { final File sourceFile = new File(itemPath).getCanonicalFile(); final File sourceRootFile = new File(rootPath).getCanonicalFile(); final String relativePathToSourceFile = sourceRootFile.toPath().relativize(sourceFile.toPath()).toFile().toString(); final String tarEntryFilename; if (relativePathToSourceFile.isEmpty()) { <START> tarEntryFilename = entryFilename; END> } else { tarEntryFilename = entryFilename + "/" + relativePathToSourceFile; } final TarArchiveEntry tarEntry = new TarArchiveEntry(sourceFile, tarEntryFilename); tarEntry.setMode(getUnixFileMode(itemPath)); tarArchive.putArchiveEntry(tarEntry); if (sourceFile.isFile()) { Files.copy(sourceFile.toPath(), tarArchive); } tarArchive.closeArchiveEntry(); final File[] children = sourceFile.listFiles(); if (children != null) { for (final File child : children) { recursiveTar(entryFilename, sourceRootFile.getCanonicalPath(), child.getCanonicalPath(), tarArchive); } } } catch (IOException e) { log.error("Error when copying TAR file entry: {}", itemPath, e); throw new UncheckedIOException(e); } }</code><technical_language>I happen if user call /some/entry? strip / prefix tarEntryFilename passing TarArchiveEntry's constructor, for additional safety</technical_language>

Target:
private void recursiveTar(String entryFilename, String rootPath, String itemPath, TarArchiveOutputStream tarArchive) { try { final File sourceFile = new File(itemPath).getCanonicalFile(); final File sourceRootFile = new File(rootPath).getCanonicalFile(); final String relativePathToSourceFile = sourceRootFile.toPath().relativize(sourceFile.toPath()).toFile().toString(); final String tarEntryFilename; if (relativePathToSourceFile.isEmpty()) { tarEntryFilename = entryFilename; } else { tarEntryFilename = entryFilename + "/" + relativePathToSourceFile; } final TarArchiveEntry tarEntry = new TarArchiveEntry(sourceFile, tarEntryFilename.replaceAll("^/", "")); tarEntry.setMode(getUnixFileMode(itemPath)); tarArchive.putArchiveEntry(tarEntry); if (sourceFile.isFile()) { Files.copy(sourceFile.toPath(), tarArchive); } tarArchive.closeArchiveEntry(); final File[] children = sourceFile.listFiles(); if (children != null) { for (final File child : children) { recursiveTar(entryFilename, sourceRootFile.getCanonicalPath(), child.getCanonicalPath(), tarArchive); } } } catch (IOException e) { log.error("Error when copying TAR file entry: {}", itemPath, e); throw new UncheckedIOException(e); } }
Source:
<code>private void handleMultiFetchReply(TransferWrap response, DelegationIOConnection from) { MultiFetchReply multiFetchReply = (MultiFetchReply)response.unwrap(); List<String> partitions = multiFetchReply.getPartitionList(); <START> List<MessageSet> messageSets = multiFetchReply.getMessagesList(); <END> List<Long> offsets = multiFetchReply.getOffsetList(); for (int i = 0; i < partitions.size(); i++) { PartitionTopicInfo info = partitionMap.get(partitions.get(i)); long offset = offsets.get(i); if (offset == MessageAndOffset.OFFSET_OUT_OF_RANGE) { partitionBlockMap.put(info, true); senOffsetRequest(from, info); } else { try { info.enqueue((ByteBufferMessageSet)messageSets.get(i), info.getFetchedOffset()); } catch (InterruptedException e) { LOG.error("Oops, catch an Interrupted Exception of queue.put()," + " but ignore it.", e); } catch (RuntimeException e) { throw e; } } } if (!needBlocking()) { sendMultiFetchRequest(from); } }</code><technical_language>cast List<ByteBufferMessageSet> here, change info.enqueue((ByteBufferMessageSet)messageSets.get(i), ...)</technical_language>

Target:
private void handleMultiFetchReply(TransferWrap response, DelegationIOConnection from) { MultiFetchReply multiFetchReply = (MultiFetchReply)response.unwrap(); List<String> partitions = multiFetchReply.getPartitionList(); List<MessageSet> messageSets = multiFetchReply.getMessagesList(); List<Long> offsets = multiFetchReply.getOffsetList(); for (int i = 0; i < partitions.size(); i++) { PartitionTopicInfo info = partitionMap.get(partitions.get(i)); long offset = offsets.get(i); if (offset == MessageAndOffset.OFFSET_OUT_OF_RANGE) { partitionBlockMap.put(info, true); sendOffsetRequest(from, info); } else { try { info.enqueue((ByteBufferMessageSet)messageSets.get(i), info.getFetchedOffset()); } catch (InterruptedException e) { LOG.error("Oops, catch an Interrupted Exception of queue.put()," + " but ignore it.", e); } catch (RuntimeException e) { throw e; } } } if (!needBlocking()) { sendMultiFetchRequest(from); } }
Source:
<code>private void refreshMinTrackDurationInSeconds() { final int minTrackDurationInSeconds = WAILSettings.getMinTrackDurationInSeconds(getActivity()); minDurationInSecondsDescription.setText( getString( R.string.settings_min_track_elapsed_time_in_seconds_desc, <START> minTrackDurationInSeconds <END> ) ); }</code><technical_language>WordFormUtil required generation correct word form for passed number, for example: 1 -> second, 2 -> seconds on. I remove here</technical_language>

Target:
private void refreshMinTrackDurationInSeconds() { final int minTrackDurationInSeconds = WAILSettings.getMinTrackDurationInSeconds(getActivity()); minDurationInSecondsDescription.setText( getString( R.string.settings_min_track_elapsed_time_in_seconds_desc, minTrackDurationInSeconds + " " + WordFormUtil.getWordForm(minTrackDurationInSeconds, getResources().getStringArray(R.array.word_forms_second)) ) ); }
Source:
<code>public static double readDouble(DataInput in) throws IOException { <START> return Double.longBitsToDouble(in.readLong()); <END> }</code><technical_language>I checking protobuf do: java public double readDouble() throws IOException { return Double.longBitsToDouble(readRawLittleEndian64()); }</technical_language>

Target:
public static double readDouble(DataInput in) throws IOException { return in.readDouble(); }
Source:
<code>public void onWriteFailure( BoltServerAddress address ) { <START> routingTable.removeWriter( address ); <END> }</code><technical_language>rename RoutingTable.removeWriter RoutingTable.forgetWriter</technical_language>

Target:
public void onWriteFailure( BoltServerAddress address ) { routingTable.forgetWriter( address ); }
Source:
<code>public void onEventMainThread(@NonNull MoveToDiscoveryTabEvent event) { if (!ConfigUtil.Companion.isCourseDiscoveryEnabled(environment)) { return; } if (binding != null) { <START> binding.viewPager2.setCurrentItem(binding.viewPager2.getAdapter().getItemCount() - 1, true); <END> if (event.getScreenName() != null) { EventBus.getDefault().post(ScreenArgumentsEvent.Companion.getNewInstance(event.getScreenName())); } } }</code><technical_language>IMO, default, setCurrentItem smoothScrolling true skip passing true</technical_language>

Target:
public void onEventMainThread(@NonNull MoveToDiscoveryTabEvent event) { if (!ConfigUtil.Companion.isCourseDiscoveryEnabled(environment)) { return; } if (binding != null) { binding.viewPager2.setCurrentItem(binding.viewPager2.getAdapter().getItemCount() - 1); if (event.getScreenName() != null) { EventBus.getDefault().post(ScreenArgumentsEvent.Companion.getNewInstance(event.getScreenName())); } } }
Source:
<code>public String resolve(String variable, String defaultValue) { IVariableResolver delegate = new ExpressionResolver.SystemPropertiesVariableResolver(); String result = delegate.resolve(variable, null); if (result == null) { try { <START> result = propertiesProvider.getValue(variable, defaultValue, new NullProgressMonitor()); <END> } catch (CoreException e) { throw new ExpressionResolutionException(e); } } return result; }</code><technical_language>properties provider return defaultValue in case of network</technical_language>

Target:
public String resolve(String variable, String defaultValue) { IVariableResolver delegate = new ExpressionResolver.SystemPropertiesVariableResolver(); String result = delegate.resolve(variable, null); if (result == null) { result = propertiesProvider.getValue(variable, defaultValue); } return result; }
Source:
<code>private boolean canPullItem(EntityItem item) { <START> if(item.isDead || item.pickupDelay <= 40 || SubTileSolegnolia.hasSolegnoliaAround(item)) <END> return false; ItemStack stack = item.getItem(); if(stack.isEmpty() || stack.getItem() instanceof IManaItem || stack.getItem() instanceof IRelic || BLACKLIST.contains(Item.REGISTRY.getNameForObject(stack.getItem())) || BotaniaAPI.isItemBlacklistedFromMagnet(stack)) return false; BlockPos pos = new BlockPos(item); if(BotaniaAPI.isBlockBlacklistedFromMagnet(item.world.getBlockState(pos))) return false; if(BotaniaAPI.isBlockBlacklistedFromMagnet(item.world.getBlockState(pos.down()))) return false; return true; }</code><technical_language>this is logic of PR description says</technical_language>

Target:
private boolean canPullItem(EntityItem item) { if(item.isDead || item.pickupDelay >= 40 || SubTileSolegnolia.hasSolegnoliaAround(item)) return false; ItemStack stack = item.getItem(); if(stack.isEmpty() || stack.getItem() instanceof IManaItem || stack.getItem() instanceof IRelic || BLACKLIST.contains(Item.REGISTRY.getNameForObject(stack.getItem())) || BotaniaAPI.isItemBlacklistedFromMagnet(stack)) return false; BlockPos pos = new BlockPos(item); if(BotaniaAPI.isBlockBlacklistedFromMagnet(item.world.getBlockState(pos))) return false; if(BotaniaAPI.isBlockBlacklistedFromMagnet(item.world.getBlockState(pos.down()))) return false; return true; }
Source:
<code>private void storagePoolType_SelectedItemChanged() { AsyncDataProvider.getInstance().getDataCenterVersions(new AsyncQuery<>(versions -> { Version selectedVersion = null; if (getVersion().getSelectedItem() != null) { selectedVersion = getVersion().getSelectedItem(); boolean hasSelectedVersion = false; for (Version version : versions) { if (selectedVersion.equals(version)) { selectedVersion = version; hasSelectedVersion = true; break; } } if (!hasSelectedVersion) { selectedVersion = null; } } if (getIsEdit()) { final Version maxVersion = versions.stream().max(Comparator.naturalOrder()).get(); if <START> ( <END> getEntity() != null ) { final Version compatibilityVersion = getEntity().getCompatibilityVersion(); List<Version> filteredVersions = versions.stream().filter(version -> version.compareTo(compatibilityVersion) >= 0).collect(Collectors.toList()); getVersion().setItems(filteredVersions); } } else { getVersion().setItems(versions); } if (selectedVersion == null) { getVersion().setSelectedItem(versions.stream().max(Comparator.naturalOrder()).orElse(null)); if (getEntity() != null) { initVersion(); } } else { getVersion().setSelectedItem(selectedVersion); } }), getDataCenterId()); }</code><technical_language>redundant spaces</technical_language>

Target:
private void storagePoolType_SelectedItemChanged() { AsyncDataProvider.getInstance().getDataCenterVersions(new AsyncQuery<>(versions -> { Version selectedVersion = null; if (getVersion().getSelectedItem() != null) { selectedVersion = getVersion().getSelectedItem(); boolean hasSelectedVersion = false; for (Version version : versions) { if (selectedVersion.equals(version)) { selectedVersion = version; hasSelectedVersion = true; break; } } if (!hasSelectedVersion) { selectedVersion = null; } } if (getIsEdit() && getEntity() != null) { final Version compatibilityVersion = getEntity().getCompatibilityVersion(); List<Version> filteredVersions = versions.stream().filter(version -> version.compareTo(compatibilityVersion) >= 0).collect(Collectors.toList()); getVersion().setItems(filteredVersions); } else { getVersion().setItems(versions); } if (selectedVersion == null) { getVersion().setSelectedItem(versions.stream().max(Comparator.naturalOrder()).orElse(null)); if (getEntity() != null) { initVersion(); } } else { getVersion().setSelectedItem(selectedVersion); } }), getDataCenterId()); }
Source:
<code>public AtomClientServiceImpl(FeedRecordDataService feedRecordDataService, EventRelay eventRelay, AtomClientConfigService configService, MotechSchedulerService motechSchedulerService) { feedFetcher = new HttpURLFeedFetcher(new FeedCache(feedRecordDataService, eventRelay, configService)); <START> feedFetcher.setAllowDoctypes(true); <END> this.configService = configService; this.motechSchedulerService = motechSchedulerService; this.feedRecordDataService = feedRecordDataService; }</code><technical_language>is true ? set this in FeedCache constructor</technical_language>

Target:
public AtomClientServiceImpl(FeedRecordDataService feedRecordDataService, EventRelay eventRelay, AtomClientConfigService configService, MotechSchedulerService motechSchedulerService) { feedFetcher = new HttpURLFeedFetcher(new FeedCache(feedRecordDataService, eventRelay, configService)); this.configService = configService; this.motechSchedulerService = motechSchedulerService; this.feedRecordDataService = feedRecordDataService; }
Source:
<code>public TestResult getResultByRunAndNodes(@Nonnull String runId, @Nonnull List<String> nodeIds) { TestResult result = new TestResult(); if (suitesByRunAndNode.containsKey(runId)) { for (String n : nodeIds) { List<SuiteResult> suites = suitesByRunAndNode.get(runId).get(n); if (suites != null) { for (SuiteResult s : suites) { <START> s.setParent(null); <END> result.add(s); } } } } result.tally(); return result; }</code><technical_language>clear implications of setParent -- feels odd this in getter though, changing persistent state</technical_language>

Target:
public TestResult getResultByRunAndNodes(@Nonnull String runId, @Nonnull List<String> nodeIds) { TestResult result = new TestResult(); if (suitesByRunAndNode.containsKey(runId)) { for (String n : nodeIds) { List<SuiteResult> suites = suitesByRunAndNode.get(runId).get(n); if (suites != null) { for (SuiteResult s : suites) { result.add(s); } } } } result.setParentAction(parentAction); return result; }
Source:
<code><START> public void lockDiskStore(String diskStoreName) { CountDownLatch countDownLatch = diskStoreLatches.get(diskStoreName); if (countDownLatch == null) { countDownLatch = diskStoreLatches.putIfAbsent(diskStoreName, new CountDownLatch(1)); if (countDownLatch != null) { try { countDownLatch.await(); } catch (InterruptedException e) { throw new InternalGemFireError(e); } } } else { try { countDownLatch.await(); } catch (InterruptedException e) { throw new InternalGemFireError(e); } } } <END></code><technical_language>simplified like: public void lockDiskStore(String diskStoreName) { CountDownLatch latch = JavaWorkarounds.computeIfAbsent(diskStoreLatches, diskStoreName, -> new CountDownLatch(1)); try { countDownLatch.await(); } catch (InterruptedException e) { throw new InternalGemFireError(e); } }</technical_language>

Target:
public void lockDiskStore(String diskStoreName) { doLockDiskStore(diskStoreName); }
Source:
<code><START> private boolean isSchemaChangeQuery(String sql) { <END> String q = sql.toLowerCase().trim(); q = q.replaceAll(" {2,}", " "); return (q.startsWith("alter table") || q.startsWith("alter ignore table") || q.startsWith("drop table")); }</code><technical_language>static</technical_language>

Target:
private static boolean isSchemaChangeQuery(String sql) { String q = sql.toLowerCase().trim(); q = q.replaceAll(" {2,}", " "); return (q.startsWith("alter table") || q.startsWith("alter ignore table") || q.startsWith("drop table")); }
Source:
<code>public ByteBuffer getBinaryValue() throws IllegalStateException { <START> if (mode == Mode.DETACHED) { <END> return binaryValue.duplicate(); } else { throw new IllegalStateException("This OffHeapValueHolder has not been prepared to hand off its binary form"); } }</code><technical_language>Reads nicely if this is written if (isBinaryValueAvailable()) {</technical_language>

Target:
public ByteBuffer getBinaryValue() throws IllegalStateException { if (isBinaryValueAvailable()) { return binaryValue.duplicate(); } else { throw new IllegalStateException("This OffHeapValueHolder has not been prepared to hand off its binary form"); } }
Source:
<code><START> public boolean equals(Object o) { <END> if(o instanceof java.lang.Iterable) { java.lang.Iterable<?> iterable = (java.lang.Iterable<?>) o; Objects.requireNonNull(iterable, "iterable is null"); java.util.Iterator<?> that = iterable.iterator(); while (this.hasNext() && that.hasNext()) { if (!Objects.equals(this.next(), that.next())) { return false; } } return this.hasNext() == that.hasNext(); } else { return false; } }</code><technical_language>is case for overriding Iterator.equals? If compare it, is gone</technical_language>

Target:
public boolean equals(Object o) { if(o instanceof Iterator) { final Iterator<?> that = (Iterator<?>) o; while (this.hasNext() && that.hasNext()) { if (!Objects.equals(this.next(), that.next())) { return false; } } return this.hasNext() == that.hasNext(); } else { return false; } }
Source:
<code>protected Insults doInsultRequest(Map<String, String> messageMap, SsmlDocumentBuilder builder, QuipMetadata metadata) { <START> Deque<String> insultsUsed = metadata.getInsultsUsed(); <END> LOG.debug("Recently used insults in user session:\n"+insultsUsed.toString()); int maxQuipHistorySize = determineMaxQuipHistorySize(Insults.values().length); Insults insult = Insults.getRandomInsult(); while(insultsUsed.contains(insult.name())){ insult = Insults.getRandomInsult(); } insultsUsed.add(insult.name()); while(insultsUsed.size() > maxQuipHistorySize){ insultsUsed.pop(); } LOG.debug("Insult being used ("+insult.name()+"): "+insult.getInsult()); builder.text(insult.getInsult()); return insult; }</code><technical_language>Some portion of next 11 lines extracted method methods shared (currently) 4 of methods</technical_language>

Target:
protected Insults doInsultRequest(Map<String, String> messageMap, SsmlDocumentBuilder builder, QuipMetadata metadata) { Queue<String> insultsUsed = metadata.getInsultsUsed(); LOG.debug("Recently used insults in user session:\n"+insultsUsed.toString()); int maxQuipHistorySize = determineMaxQuipHistorySize(Insults.values().length); Insults insult = Insults.getRandomInsult(); while(insultsUsed.contains(insult.name())){ insult = Insults.getRandomInsult(); } insultsUsed.add(insult.name()); while(insultsUsed.size() > maxQuipHistorySize){ insultsUsed.remove(); } LOG.debug("Insult being used ("+insult.name()+"): "+insult.getInsult()); builder.text(insult.getInsult()); return insult; }
Source:
<code>private void wipeStorageForFourTwelveSync(SQLiteDatabase userDb) { <START> userDb.beginTransaction(); <END> SqlStorage.wipeTableWithoutCommit(userDb, ACase.STORAGE_KEY); SqlStorage.wipeTableWithoutCommit(userDb, Ledger.STORAGE_KEY); SqlStorage.wipeTableWithoutCommit(userDb, AndroidCaseIndexTable.TABLE_NAME); SqlStorage.wipeTableWithoutCommit(userDb, EntityStorageCache.TABLE_NAME); EntityStorageCache.setCachedWipedPref(); }</code><technical_language>I functionally equivalent move this call line wipeStorageForFourTwelveSync() is called instead? improves readability of transaction start end in a linear manner</technical_language>

Target:
private void wipeStorageForFourTwelveSync(SQLiteDatabase userDb) { SqlStorage.wipeTableWithoutCommit(userDb, ACase.STORAGE_KEY); SqlStorage.wipeTableWithoutCommit(userDb, Ledger.STORAGE_KEY); SqlStorage.wipeTableWithoutCommit(userDb, AndroidCaseIndexTable.TABLE_NAME); EntityStorageCache.wipeCacheForCurrentAppWithoutCommit(userDb); }
Source:
<code>public static int[] cellsAsColumnIndices(Set<Cell> cells, int cellsPerColumn) { return cells.stream().mapToInt(c -> c.getColumn().getIndex()) .sorted().distinct().toArray(); <START> } <END></code><technical_language>I remove cellsPerColumn parameter..</technical_language>

Target:
public static int[] cellsAsColumnIndices(Set<Cell> cells, int cellsPerColumn) { return SDR.asColumnList(cells); }