auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public String[] getBackendRoles() throws EventBrokerException { UserRealm userRealm = CarbonContext.getThreadLocalCarbonContext().getUserRealm(); String[] cleanedRoles = new String[0]; try { String adminRole = EventBrokerHolder.getInstance().getRealmService(). getBootstrapRealmConfiguration().getAdminRoleName(); String[] allRoles = userRealm.getUserStoreManager().getRoleNames(); if (allRoles != null && allRoles.length > 1) { List<String> allRolesArrayList = new ArrayList<>(); Collections.addAll(allRolesArrayList, allRoles); Iterator<String> it = allRolesArrayList.iterator(); while (it.hasNext()) { <START> String nextRoles = it.next(); <END> if (nextRoles.equals(adminRole) || CarbonConstants.REGISTRY_ANONNYMOUS_ROLE_NAME.equals(nextRoles)) { it.remove(); } } cleanedRoles = allRolesArrayList.toArray(new String[allRolesArrayList.size()]); } } catch (UserStoreException e) { throw new EventBrokerException("Unable to get Roles from user store", e); } return cleanedRoles; }</code><technical_language>it.next() returns a role, variable name a nextRoles</technical_language>

Target:
public String[] getBackendRoles() throws EventBrokerException { UserRealm userRealm = CarbonContext.getThreadLocalCarbonContext().getUserRealm(); String[] cleanedRoles = new String[0]; try { String adminRole = EventBrokerHolder.getInstance().getRealmService(). getBootstrapRealmConfiguration().getAdminRoleName(); String[] allRoles = userRealm.getUserStoreManager().getRoleNames(); if (allRoles != null && allRoles.length > 1) { List<String> allRolesArrayList = new ArrayList<>(); Collections.addAll(allRolesArrayList, allRoles); Iterator<String> it = allRolesArrayList.iterator(); while (it.hasNext()) { String nextRole = it.next(); if (nextRole.equals(adminRole) || nextRole.equals(CarbonConstants.REGISTRY_ANONNYMOUS_ROLE_NAME)) { it.remove(); } } cleanedRoles = allRolesArrayList.toArray(new String[allRolesArrayList.size()]); } } catch (UserStoreException e) { throw new EventBrokerException("Unable to get Roles from user store", e); } return cleanedRoles; }
Source:
<code>public void initialize() { <START> chassisMove.initialize(); <END> try { motionController.resetSafely(); } catch (InvalidSensorException e) { LogKitten.w("Cancelling ChassisMoveDistance"); chassisMove.cancel(); cancel(); if (fallbackCommand != null) { fallbackCommand.initialize(); } return; } motionController.setSetpoint(motionController.getSensorValue() + distance); motionController.enable(); }</code><technical_language>this schedule() initialize()</technical_language>

Target:
public void initialize() { chassisMove.schedule(); try { motionController.resetSafely(); } catch (InvalidSensorException e) { LogKitten.w("Cancelling ChassisMoveDistance with InvalidSensorException"); chassisMove.cancel(); cancel(); if (fallbackCommand != null) { fallbackCommand.schedule(); } return; } motionController.setSetpoint(motionController.getSensorValue() + distance); motionController.enable(); }
Source:
<code>public Object[][] hammingDistance() { return new Object[][] { {"ATAC", "GCAT", 3}, {"ATAGC", "ATAGC", 0}, <START> {"ATAC", "atac", 4}, END> {"", "", 0} }; }</code><technical_language>test for non-DNA bases</technical_language>

Target:
public Object[][] hammingDistance() { return new Object[][] { {"ATAC" , "GCAT" , 3}, {"ATAGC", "ATAGC", 0}, {"ATAC" , "atac" , 4}, {"" , "" , 0}, {"nAGTN", "nAGTN", 0} }; }
Source:
<code>public boolean equals(Object object) { <START> if (object == null && object.getClass() != getClass()) { <END> return false; } if (object == this) { return true; } Syntax rhs = (Syntax) object; return new EqualsBuilder().append(getType(), rhs.getType()).append(getVersion(), rhs.getVersion()) .append(getQualifier(), rhs.getQualifier()).isEquals(); }</code><technical_language>Syntax is designed extended replace this if if (!(object instanceof Syntax)). I move if (object == this)</technical_language>

Target:
public boolean equals(Object object) { if (object == this) { return true; } if (!(object instanceof Syntax)) { return false; } Syntax rhs = (Syntax) object; return new EqualsBuilder().append(getType(), rhs.getType()).append(getVersion(), rhs.getVersion()) .append(getQualifier(), rhs.getQualifier()).isEquals(); }
Source:
<code>public Response createTokenForAccount(JsonNode payload) throws ValidationException { validatePayloadHasFields(payload, ACCOUNT_ID_FIELD, DESCRIPTION_FIELD, CREATED_BY_FIELD); Tokens token = tokenService.issueTokens(); TokenPaymentType tokenPaymentType = Optional.ofNullable(payload.get(TOKEN_TYPE_FIELD)) <START> .map(tokenType -> TokenPaymentType.valueOf(tokenType.asText())) <END> .orElse(CARD); TokenType tokenType = Optional.ofNullable(payload.get(TYPE_FIELD)) .map(type -> valueOf(type.asText())) .orElse(API); TokenLink tokenLink = TokenLink.of(randomUUID().toString()); authDao.storeToken(token.getHashedToken(), tokenLink, tokenType, payload.get(ACCOUNT_ID_FIELD).asText(), payload.get(DESCRIPTION_FIELD).asText(), payload.get(CREATED_BY_FIELD).asText(), tokenPaymentType); LOGGER.info("Created token with ", tokenLink); return ok(ImmutableMap.of("token", token.getApiKey())).build(); }</code><technical_language>Rename tokenType else clash local variable in next statement</technical_language>

Target:
public Response createTokenForAccount(JsonNode payload) throws ValidationException { validatePayloadHasFields(payload, ACCOUNT_ID_FIELD, DESCRIPTION_FIELD, CREATED_BY_FIELD); Tokens token = tokenService.issueTokens(); TokenPaymentType tokenPaymentType = Optional.ofNullable(payload.get(TOKEN_TYPE_FIELD)) .map(paymentType -> TokenPaymentType.fromString(paymentType.asText())) .orElse(CARD); TokenSource tokenSource = Optional.ofNullable(payload.get(TYPE_FIELD)) .map(source -> TokenSource.fromString(source.asText())) .orElse(API); TokenLink tokenLink = TokenLink.of(randomUUID().toString()); authDao.storeToken(token.getHashedToken(), tokenLink, tokenSource, payload.get(ACCOUNT_ID_FIELD).asText(), payload.get(DESCRIPTION_FIELD).asText(), payload.get(CREATED_BY_FIELD).asText(), tokenPaymentType); LOGGER.info("Created token with ", tokenLink); return ok(ImmutableMap.of("token", token.getApiKey())).build(); }
Source:
<code>StudyParticipant(@JsonProperty("firstName") String firstName, @JsonProperty("lastName") String lastName, @JsonProperty("email") String email, @JsonProperty("externalId") String externalId, @JsonProperty("password") String password, @JsonProperty("sharingScope") SharingScope sharingScope, @JsonProperty("notifyByEmail") Boolean notifyByEmail, @JsonProperty("dataGroups") Set<String> dataGroups, @JsonProperty("healthCode") String healthCode, @JsonProperty("attributes") Map<String,String> attributes, @JsonProperty("consentHistories") Map<String,List<UserConsentHistory>> consentHistories, @JsonProperty("roles") Set<Roles> roles, @JsonProperty("createdOn") DateTime createdOn, @JsonProperty("status") AccountStatus status, @JsonProperty("languages") LinkedHashSet<String> languages, @JsonProperty("id") String id) { this.firstName = firstName; this.lastName = lastName; this.externalId = externalId; this.password = password; this.sharingScope = sharingScope; this.notifyByEmail = notifyByEmail; this.email = email; this.dataGroups = dataGroups; this.healthCode = healthCode; this.consentHistories = consentHistories; this.roles = roles; this.createdOn = createdOn; this.status = status; this.id = id; this.languages = languages; <START> this.attributes = attributes; <END> }</code><technical_language>JsonCreator is constructor instead of builder, bypass immutability deserializing JSON. (Or calling constructor directly.)</technical_language>

Target:
StudyParticipant(@JsonProperty("firstName") String firstName, @JsonProperty("lastName") String lastName, @JsonProperty("email") String email, @JsonProperty("externalId") String externalId, @JsonProperty("password") String password, @JsonProperty("sharingScope") SharingScope sharingScope, @JsonProperty("notifyByEmail") Boolean notifyByEmail, @JsonProperty("dataGroups") Set<String> dataGroups, @JsonProperty("healthCode") String healthCode, @JsonProperty("attributes") Map<String,String> attributes, @JsonProperty("consentHistories") Map<String,List<UserConsentHistory>> consentHistories, @JsonProperty("roles") Set<Roles> roles, @JsonProperty("createdOn") DateTime createdOn, @JsonProperty("status") AccountStatus status, @JsonProperty("languages") LinkedHashSet<String> languages, @JsonProperty("id") String id) { ImmutableSet<String> finalDataGroups = (dataGroups == null) ? null : ImmutableSet.copyOf(dataGroups); ImmutableSet<Roles> finalRoles = (roles == null) ? null : ImmutableSet.copyOf(roles); ImmutableMap<String,String> finalAttributes = (attributes == null) ? null : ImmutableMap.copyOf(attributes); LinkedHashSet<String> finalLangs = (languages == null) ? null : new LinkedHashSet<>(languages); this.firstName = firstName; this.lastName = lastName; this.externalId = externalId; this.password = password; this.sharingScope = sharingScope; this.notifyByEmail = notifyByEmail; this.email = email; this.dataGroups = finalDataGroups; this.healthCode = healthCode; this.consentHistories = consentHistories; this.roles = finalRoles; this.createdOn = createdOn; this.status = status; this.id = id; this.languages = finalLangs; this.attributes = finalAttributes; }
Source:
<code>public static boolean shouldRequeue(boolean defaultRequeueRejected, Throwable throwable, Log logger) { <START> throw new UnsupportedOperationException("Use ContainerUtils"); <END> }</code><technical_language>delegate mentioned ontainerUtils.shouldRequeue() then? This for breaking change now... I if need a reflection here, functionality unbroken. moving stuff fix tangles... :smile:</technical_language>

Target:
public static boolean shouldRequeue(boolean defaultRequeueRejected, Throwable throwable, Log logger) { logger.warn("Use ContainerUtils.shouldRequeue()"); boolean shouldRequeue = defaultRequeueRejected || throwable.getClass().getName().equals( "org.springframework.amqp.rabbit.listener.MessageRejectedWhileStoppingException"); Throwable t = throwable; while (shouldRequeue && t != null) { if (t instanceof AmqpRejectAndDontRequeueException) { shouldRequeue = false; } t = t.getCause(); } if (logger.isDebugEnabled()) { logger.debug("Rejecting messages (requeue=" + shouldRequeue + ")"); } return shouldRequeue; }
Source:
<code>private void initProjects() { <START> List<ProjectDTO> projectsSortedByTitle = null; <END> try { projectsSortedByTitle = ServiceManager.getProjectService().findAllProjectsForCurrentUser(); } catch (DataException e) { Helper.setErrorMessage("Error initializing projects", logger, e); } for (ProjectDTO projectSortedByTitle : projectsSortedByTitle) { this.projects.add(projectSortedByTitle.getTitle()); } }</code><technical_language>Assign empty list</technical_language>

Target:
private void initProjects() { List<ProjectDTO> projectsSortedByTitle = Collections.emptyList(); try { projectsSortedByTitle = ServiceManager.getProjectService().findAllProjectsForCurrentUser(); } catch (DataException e) { Helper.setErrorMessage("errorInitializingProjects", logger, e); } for (ProjectDTO projectSortedByTitle : projectsSortedByTitle) { this.projects.add(projectSortedByTitle.getTitle()); } }
Source:
<code>public Response<?> apply(RevisionResource rsrc, Input input) throws AuthException, ResourceNotFoundException, ResourceConflictException, OrmException, IOException, BadRequestException { if (!allowDrafts) { throw new BadRequestException("Draft workflow is disabled."); } PatchSet patchSet = rsrc.getPatchSet(); PatchSet.Id patchSetId = patchSet.getId(); Change change = rsrc.getChange(); if (!patchSet.isDraft()) { throw new ResourceConflictException("Patch set is not a draft."); } <START> if (!allowDrafts) { <END> throw new ResourceConflictException("Draft workflow is disabled."); } if (!rsrc.getControl().canDeleteDraft(dbProvider.get())) { throw new AuthException("Not permitted to delete this draft patch set"); } deleteDraftPatchSet(patchSet, change); deleteOrUpdateDraftChange(patchSetId, change); return Response.none(); }</code><technical_language>this check removed added in line 68</technical_language>

Target:
public Response<?> apply(RevisionResource rsrc, Input input) throws AuthException, ResourceNotFoundException, ResourceConflictException, OrmException, IOException, BadRequestException { if (!allowDrafts) { throw new BadRequestException("Draft workflow is disabled."); } PatchSet patchSet = rsrc.getPatchSet(); PatchSet.Id patchSetId = patchSet.getId(); Change change = rsrc.getChange(); if (!patchSet.isDraft()) { throw new ResourceConflictException("Patch set is not a draft."); } if (!rsrc.getControl().canDeleteDraft(dbProvider.get())) { throw new AuthException("Not permitted to delete this draft patch set"); } deleteDraftPatchSet(patchSet, change); deleteOrUpdateDraftChange(patchSetId, change); return Response.none(); }
Source:
<code>PrometheusMetricsTracker(String poolName, CollectorRegistry registry) { if (!registered.contains(registry)) { CONNECTION_TIMEOUT_COUNTER.register(registry); ELAPSED_ACQUIRED_SUMMARY.register(registry); ELAPSED_BORROWED_SUMMARY.register(registry); ELAPSED_CREATION_SUMMARY.register(registry); <START> registered.add(registry); <END> } this.connectionTimeoutCounterChild = CONNECTION_TIMEOUT_COUNTER.labels(poolName); this.elapsedAcquiredSummaryChild = ELAPSED_ACQUIRED_SUMMARY.labels(poolName); this.elapsedBorrowedSummaryChild = ELAPSED_BORROWED_SUMMARY.labels(poolName); this.elapsedCreationSummaryChild = ELAPSED_CREATION_SUMMARY.labels(poolName); }</code><technical_language>thread-safe, of a wrapped ConcurrentHashMap. registered.contains() registered.add() collectively atomic</technical_language>

Target:
PrometheusMetricsTracker(String poolName, CollectorRegistry registry) { synchronized (registered) { if (!registered.contains(registry)) { CONNECTION_TIMEOUT_COUNTER.register(registry); ELAPSED_ACQUIRED_SUMMARY.register(registry); ELAPSED_BORROWED_SUMMARY.register(registry); ELAPSED_CREATION_SUMMARY.register(registry); registered.add(registry); } } this.connectionTimeoutCounterChild = CONNECTION_TIMEOUT_COUNTER.labels(poolName); this.elapsedAcquiredSummaryChild = ELAPSED_ACQUIRED_SUMMARY.labels(poolName); this.elapsedBorrowedSummaryChild = ELAPSED_BORROWED_SUMMARY.labels(poolName); this.elapsedCreationSummaryChild = ELAPSED_CREATION_SUMMARY.labels(poolName); }
Source:
<code>public boolean add(Properties e) { <START> throw new UnsupportedOperationException(MESSAGE_HISTORY_IS_IMMUTABLE); <END> }</code><technical_language>a UnsupportedOperationException a singleton instance? lose a method context for stack trace</technical_language>

Target:
public boolean add(Properties e) { throw UNSUPPORTED_OPERATION_EXCEPTION_IMMUTABLE; }
Source:
<code>public static boolean artifactExists(WebDriver driver, String name, long timeout) { String url = getUrl(driver, name); String username = getField(url, 1); String password = getField(url, 2); try { return new WebDriverWait(driver, timeout).until((k) -> checkArtifactUsingHttp(url, username, password)); <START> } catch (Exception e) { <END> return false; } }</code><technical_language>add: LOGGER.debug(e)</technical_language>

Target:
public static boolean artifactExists(WebDriver driver, String name, long timeout) { String url = getUrl(driver, name); String username = getField(url, 1); String password = getField(url, 2); try { return new WebDriverWait(driver, timeout).until((k) -> checkArtifactUsingHttp(url, username, password)); } catch (Exception e) { LOGGER.debug(e); return false; } }
Source:
<code>public void testBlobRecordWithMetadataContentV2() throws IOException, MessageFormatException { List<StoreKey> keys = getKeys(60, 5); int chunkSize = ThreadLocalRandom.current().nextInt(1, Integer.MAX_VALUE); <START> long totalSize = (long) keys.size() * chunkSize; <END> ByteBuffer metadataContent = getSerializedMetadataContentV2(chunkSize, totalSize, keys); int metadataContentSize = MessageFormatRecord.Metadata_Content_Format_V2.getMetadataContentSize(keys.get(0).sizeInBytes(), keys.size()); long blobSize = MessageFormatRecord.Blob_Format_V2.getBlobRecordSize(metadataContentSize); ByteBuffer blob = ByteBuffer.allocate((int) blobSize); BlobData blobData = getBlobRecordV2(metadataContentSize, BlobType.MetadataBlob, metadataContent, blob); Assert.assertEquals(metadataContentSize, blobData.getSize()); byte[] verify = new byte[metadataContentSize]; blobData.getStream().read(verify); Assert.assertArrayEquals("Metadata content mismatch", metadataContent.array(), verify); metadataContent.rewind(); CompositeBlobInfo compositeBlobInfo = deserializeMetadataContentV2(metadataContent, new MockIdFactory()); Assert.assertEquals("Chunk size doesn't match", chunkSize, compositeBlobInfo.getChunkSize()); Assert.assertEquals("Total size doesn't match", totalSize, compositeBlobInfo.getTotalSize()); Assert.assertEquals("List of keys dont match", keys, compositeBlobInfo.getKeys()); testBlobCorruption(blob, blobSize, metadataContentSize); }</code><technical_language>explicit test for totalSize a multiple of chunkSize</technical_language>

Target:
public void testBlobRecordWithMetadataContentV2() throws IOException, MessageFormatException { List<StoreKey> keys = getKeys(60, 5); int[] chunkSizes = {ThreadLocalRandom.current().nextInt(1, Integer.MAX_VALUE), 15}; long[] totalSizes = {(long) keys.size() * chunkSizes[0], ((long) keys.size() * chunkSizes[1]) - 11}; for (int i = 0; i < chunkSizes.length; i++) { ByteBuffer metadataContent = getSerializedMetadataContentV2(chunkSizes[i], totalSizes[i], keys); int metadataContentSize = MessageFormatRecord.Metadata_Content_Format_V2.getMetadataContentSize(keys.get(0).sizeInBytes(), keys.size()); long blobSize = MessageFormatRecord.Blob_Format_V2.getBlobRecordSize(metadataContentSize); ByteBuffer blob = ByteBuffer.allocate((int) blobSize); BlobData blobData = getBlobRecordV2(metadataContentSize, BlobType.MetadataBlob, metadataContent, blob); Assert.assertEquals(metadataContentSize, blobData.getSize()); byte[] verify = new byte[metadataContentSize]; blobData.getStream().read(verify); Assert.assertArrayEquals("Metadata content mismatch", metadataContent.array(), verify); metadataContent.rewind(); CompositeBlobInfo compositeBlobInfo = deserializeMetadataContentV2(metadataContent, new MockIdFactory()); Assert.assertEquals("Chunk size doesn't match", chunkSizes[i], compositeBlobInfo.getChunkSize()); Assert.assertEquals("Total size doesn't match", totalSizes[i], compositeBlobInfo.getTotalSize()); Assert.assertEquals("List of keys dont match", keys, compositeBlobInfo.getKeys()); testBlobCorruption(blob, blobSize, metadataContentSize); } }
Source:
<code>public static ByteBuf encode( ByteBufAllocator allocator, int streamId, boolean fragmentFollows, long requestN, ByteBuf metadata, ByteBuf data) { <START> int i = (int) requestN; <END> if (requestN > Integer.MAX_VALUE) { i = Integer.MAX_VALUE; } return encode(allocator, streamId, fragmentFollows, i, metadata, data); }</code><technical_language>Overflows if requestN > Integer.MAX_VALUE</technical_language>

Target:
public static ByteBuf encode( ByteBufAllocator allocator, int streamId, boolean fragmentFollows, long requestN, ByteBuf metadata, ByteBuf data) { int reqN = requestN > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) requestN; return encode(allocator, streamId, fragmentFollows, reqN, metadata, data); }
Source:
<code>private void createProjectedColumn() { Column column = (Column) this.onGoingExpression.pop(); <START> String str = column.getProperty(ParquetMetadataProcessor.COLUMN_NUMBER, false); <END> if (str == null) { this.exceptions.add(new TranslatorException(ParquetPlugin.Event.TEIID23007, ParquetPlugin.Util.gs(ParquetPlugin.Event.TEIID23007, column.getName()))); return; } this.projectedColumns.add(Integer.valueOf(str)); }</code><technical_language>schema is keyed name is column name - column.getSourceName() - filter schema. MessageType.getFieldIndex(name). need for a new extension property a column</technical_language>

Target:
private void createProjectedColumn() { Column column = (Column) this.onGoingExpression.pop(); this.projectedColumnNames.add(column.getSourceName()); }
Source:
<code>public boolean removeWatchedAddress(final Address address) { <START> return removeWatchedAddresses(Lists.newArrayList(address)); <END> }</code><technical_language>FYI ImmutableList.of(address) is more efficient, big deal, a note for future reference</technical_language>

Target:
public boolean removeWatchedAddress(final Address address) { return removeWatchedAddresses(ImmutableList.of(address)); }
Source:
<code>@Override public long processInLongOutLong(int type, long val) throws IgniteCheckedException { switch (type) { case OP_SIZE: { CachePeekMode[] modes = PlatformUtils.decodeCachePeekModes((int)val); return cache.size(modes); } case OP_SIZE_LOC: { CachePeekMode[] modes = PlatformUtils.decodeCachePeekModes((int)val); return cache.localSize(modes); } case OP_ENTER_LOCK: { try { lock(val).lockInterruptibly(); return TRUE; } catch (InterruptedException e) { throw new IgniteCheckedException("Failed to enter cache lock.", e); } } case OP_EXIT_LOCK: { lock(val).unlock(); return TRUE; } case OP_CLOSE_LOCK: { Lock lock = lockMap.remove(val); assert lock != null : "Failed to unregister lock: " + val; return TRUE; } case OP_REBALANCE: { PlatformFutureUtils.listen(platformCtx, cache.rebalance().chain(new C1<IgniteFuture, Object>() { @Override public Object apply(IgniteFuture fut) { return null; } }), val, PlatformFutureUtils.TYP_OBJ, this); return TRUE; } case OP_CLEAR_CACHE: cache.clear(); return TRUE; case OP_REMOVE_ALL2: cache.removeAll(); return TRUE; case OP_RESET_QUERY_METRICS: cache.resetQueryMetrics(); return TRUE; case OP_PRELOAD_PARTITION: cache.preloadPartition((int)val); return TRUE; case OP_ENABLE_STATISTICS: <START> cache.enableStatistics(val == FALSE ? false : true); <END> return TRUE; } return super.processInLongOutLong(type, val); }</code><technical_language>val == FALSE ? false : true -> val == TRUE</technical_language>

Target:
@Override public long processInLongOutLong(int type, long val) throws IgniteCheckedException { switch (type) { case OP_SIZE: { CachePeekMode[] modes = PlatformUtils.decodeCachePeekModes((int)val); return cache.size(modes); } case OP_SIZE_LOC: { CachePeekMode[] modes = PlatformUtils.decodeCachePeekModes((int)val); return cache.localSize(modes); } case OP_ENTER_LOCK: { try { lock(val).lockInterruptibly(); return TRUE; } catch (InterruptedException e) { throw new IgniteCheckedException("Failed to enter cache lock.", e); } } case OP_EXIT_LOCK: { lock(val).unlock(); return TRUE; } case OP_CLOSE_LOCK: { Lock lock = lockMap.remove(val); assert lock != null : "Failed to unregister lock: " + val; return TRUE; } case OP_REBALANCE: { PlatformFutureUtils.listen(platformCtx, cache.rebalance().chain(new C1<IgniteFuture, Object>() { @Override public Object apply(IgniteFuture fut) { return null; } }), val, PlatformFutureUtils.TYP_OBJ, this); return TRUE; } case OP_CLEAR_CACHE: cache.clear(); return TRUE; case OP_REMOVE_ALL2: cache.removeAll(); return TRUE; case OP_RESET_QUERY_METRICS: cache.resetQueryMetrics(); return TRUE; case OP_PRELOAD_PARTITION: cache.preloadPartition((int)val); return TRUE; case OP_ENABLE_STATISTICS: cache.enableStatistics(val == TRUE); return TRUE; } return super.processInLongOutLong(type, val); }
Source:
<code>public void log(String path, Serializable logEntry) { Preconditions.checkNotNull(logEntry, "Null is not supported"); try { buffer.put(new Log(path, logEntry)); } catch (InterruptedException e) { <START> log.error(e.getMessage(), e); <END> } }</code><technical_language>Please fill path logEntry Messsage</technical_language>

Target:
public void log(String path, Serializable logEntry) { Preconditions.checkNotNull(logEntry, "Null is not supported"); try { buffer.put(new Log(path, logEntry)); } catch (InterruptedException e) { log.error("Failed to write by path: {}", new Object[]{logEntry, path}, e); Thread.currentThread().interrupt(); } }
Source:
<code>protected byte[] execute(EmbeddedCacheManager cacheManager, Map<String, String> parameters, EnumSet<CacheContainerAdmin.AdminFlag> adminFlags) { Set<String> cacheNames = cacheManager.getCacheNames(); StringBuilder sb = new StringBuilder("["); for(String s : cacheNames) { <START> if (sb.length() > 0) <END> sb.append(','); sb.append('"'); sb.append(s); sb.append('"'); } sb.append(']'); return sb.toString().getBytes(StandardCharsets.UTF_8); }</code><technical_language>sb.length() > 1, please</technical_language>

Target:
protected byte[] execute(EmbeddedCacheManager cacheManager, Map<String, String> parameters, EnumSet<CacheContainerAdmin.AdminFlag> adminFlags) { Set<String> cacheNames = cacheManager.getCacheNames(); StringBuilder sb = new StringBuilder("["); for(String s : cacheNames) { if (sb.length() > 1) sb.append(','); sb.append('"'); sb.append(s); sb.append('"'); } sb.append(']'); return sb.toString().getBytes(StandardCharsets.UTF_8); }
Source:
<code>private void checkForNoParams(Map<String, Object> params) throws NoParam{ if(params.isEmpty()){ FVLog.log(LogLevel.DEBUG, null, "No parameters are specified. Please input the parameters and the value you want them to be set"); <START> throw new NoParam(" No parameters are specified. Please input the parameters and the value you want them to be set! "); <END> } }</code><technical_language>Stop exclamation marks...</technical_language>

Target:
private void checkForNoParams(Map<String, Object> params) throws NoParamException{ if(params.isEmpty()){ FVLog.log(LogLevel.DEBUG, null, "No parameters are specified. Please input the parameters and the value you want them to be set"); throw new NoParamException(" No parameters are specified. Please input the parameters and the value you want them to be set."); } }
Source:
<code>protected InputStream handleGzipStream(InputStream in) throws Exception { RecordingInputStream stream = new RecordingInputStream(in); try { return new GZIPInputStream(stream); } catch (java.util.zip.ZipException ex) { <START> if (stream.getBytesRead()==0) { <END> return in; } else { log.warn( "gzip response expected but failed to read gzip headers, assuming unencoded response for request " + RequestContext.getCurrentContext() .getRequest().getRequestURL() .toString()); stream.reset(); return stream; } } finally { stream.stopRecording(); } }</code><technical_language>check this throwing exception</technical_language>

Target:
protected InputStream handleGzipStream(InputStream in) throws Exception { RecordingInputStream stream = new RecordingInputStream(in); try { return new GZIPInputStream(stream); } catch (java.util.zip.ZipException | java.io.EOFException ex) { if (stream.getBytesRead()==0) { return in; } else { log.warn( "gzip response expected but failed to read gzip headers, assuming unencoded response for request " + RequestContext.getCurrentContext() .getRequest().getRequestURL() .toString()); stream.reset(); return stream; } } finally { stream.stopRecording(); } }
Source:
<code>public void configure(Object... parameters) { super.configure(parameters); int index = 4; if (parameters != null && parameters.length >= 10) { this.sshOptions = parameters[index++].toString(); this.javaPath = parameters[index++].toString(); if (this.javaPath == null || this.javaPath.equals("")) { throw new IllegalArgumentException("A valid Java path must be supplied."); } this.schedulingPath = parameters[index++].toString(); if (parameters[index] != null) { OperatingSystem configuredTargetOs = OperatingSystem.getOperatingSystem(parameters[index++].toString()); if (configuredTargetOs == null) { throw new IllegalArgumentException("Only 'Linux', 'Windows' and 'Cygwin' are valid values for Target OS Property."); } persistedInfraVariables.put(TARGET_OS_OBJ_KEY, configuredTargetOs); } else { throw new IllegalArgumentException("Target OS parameter cannot be null"); } this.javaOptions = parameters[index++].toString(); try { if (parameters[index] != null) { persistedInfraVariables.put(CREDENTIALS_KEY, <START> Credentials.getCredentialsBase64((byte[]) parameters[index++])); <END> } } catch (KeyException e) { throw new IllegalArgumentException("Could not retrieve base64 credentials", e); } } else { throw new IllegalArgumentException("Invalid parameters for infrastructure creation"); } }</code><technical_language>this is semantically different, increase index parameter is null</technical_language>

Target:
public void configure(Object... parameters) { super.configure(parameters); int index = 4; if (parameters != null && parameters.length >= 10) { this.sshOptions = parameters[index++].toString(); this.javaPath = parameters[index++].toString(); if (this.javaPath == null || this.javaPath.equals("")) { throw new IllegalArgumentException("A valid Java path must be supplied."); } this.schedulingPath = parameters[index++].toString(); if (parameters[index] != null) { OperatingSystem configuredTargetOs = OperatingSystem.getOperatingSystem(parameters[index++].toString()); if (configuredTargetOs == null) { throw new IllegalArgumentException("Only 'Linux', 'Windows' and 'Cygwin' are valid values for Target OS Property."); } persistedInfraVariables.put(TARGET_OS_OBJ_KEY, configuredTargetOs); } else { throw new IllegalArgumentException("Target OS parameter cannot be null"); } this.javaOptions = parameters[index++].toString(); try { Object possibleCredentials = parameters[index++]; if (possibleCredentials != null) { persistedInfraVariables.put(CREDENTIALS_KEY, Credentials.getCredentialsBase64((byte[]) possibleCredentials)); } } catch (KeyException e) { throw new IllegalArgumentException("Could not retrieve base64 credentials", e); } } else { throw new IllegalArgumentException("Invalid parameters for infrastructure creation"); } }
Source:
<code>public void testNumOfSplits(int splitsPerRegion, int expectedNumOfSplits) throws IOException, InterruptedException, ClassNotFoundException { String jobName = "TestJobForNumOfSplits"; LOG.info("Before map/reduce startup - job " + jobName); Configuration c = new Configuration(TEST_UTIL.getConfiguration()); Scan scan = new Scan(); scan.addFamily(INPUT_FAMILY); c.setInt("hbase.mapreduce.input.mappers.per.region", splitsPerRegion); c.set(KEY_STARTROW, ""); c.set(KEY_LASTROW, ""); Job job = new Job(c, jobName); TableMapReduceUtil.initTableMapperJob(TableName.valueOf(TABLE_NAME).getNameAsString(), scan, ScanMapper.class, ImmutableBytesWritable.class, ImmutableBytesWritable.class, job); TableInputFormat tif = new TableInputFormat(); tif.setConf(job.getConfiguration()); List<InputSplit> splits = tif.getSplits(job); for (InputSplit split : splits) { TableSplit tableSplit = (TableSplit) split; <START> Assert.assertEquals(tableSplit.getScan().getStartRow(), HConstants.EMPTY_START_ROW); <END> Assert.assertEquals(tableSplit.getScan().getStopRow(), HConstants.EMPTY_END_ROW); } Assert.assertEquals(expectedNumOfSplits, splits.size()); }</code><technical_language>nit: I checks tight enough differentiate a full table scan object a scan object, instead I assertTrue(tableSplit.getScanAsString().isEmpty()) some such..</technical_language>

Target:
public void testNumOfSplits(int splitsPerRegion, int expectedNumOfSplits) throws IOException, InterruptedException, ClassNotFoundException { String jobName = "TestJobForNumOfSplits"; LOG.info("Before map/reduce startup - job " + jobName); Configuration c = new Configuration(TEST_UTIL.getConfiguration()); Scan scan = new Scan(); scan.addFamily(INPUT_FAMILY); c.setInt("hbase.mapreduce.input.mappers.per.region", splitsPerRegion); c.set(KEY_STARTROW, ""); c.set(KEY_LASTROW, ""); Job job = new Job(c, jobName); TableMapReduceUtil.initTableMapperJob(TableName.valueOf(TABLE_NAME).getNameAsString(), scan, ScanMapper.class, ImmutableBytesWritable.class, ImmutableBytesWritable.class, job); TableInputFormat tif = new TableInputFormat(); tif.setConf(job.getConfiguration()); List<InputSplit> splits = tif.getSplits(job); for (InputSplit split : splits) { TableSplit tableSplit = (TableSplit) split; Assert.assertTrue(tableSplit.getScanAsString().isEmpty()); } Assert.assertEquals(expectedNumOfSplits, splits.size()); }
Source:
<code>@Override public Object fromBody(TypedInput body, Type type) throws ConversionException { String charset = "UTF-8"; <START> if (body.mimeType() != null) <END> charset = MimeUtil.parseCharset(body.mimeType()); InputStreamReader isr = null; try { isr = new InputStreamReader(body.in(), charset); return gson.fromJson(isr, type); } catch (IOException e) { throw new ConversionException(e); } catch (JsonParseException e) { throw new ConversionException(e); } finally { if (isr != null) { try { isr.close(); } catch (IOException ignored) { } } } }</code><technical_language>Wrap body in { }</technical_language>

Target:
@Override public Object fromBody(TypedInput body, Type type) throws ConversionException { String charset = "UTF-8"; if (body.mimeType() != null) { charset = MimeUtil.parseCharset(body.mimeType()); } InputStreamReader isr = null; try { isr = new InputStreamReader(body.in(), charset); return gson.fromJson(isr, type); } catch (IOException e) { throw new ConversionException(e); } catch (JsonParseException e) { throw new ConversionException(e); } finally { if (isr != null) { try { isr.close(); } catch (IOException ignored) { } } } }
Source:
<code>private Schema resolveComposedSchema(ComposedSchema schema) { if (schema.getOneOf() != null) { return schema.getOneOf().get(0); } else if (schema.getAnyOf() != null) { return schema.getAnyOf().get(0); } <START> return null; END> }</code><technical_language>logged thrown if this is reached</technical_language>

Target:
private static Schema<?> resolveComposedSchema(ComposedSchema schema) { if (schema.getOneOf() != null) { return schema.getOneOf().get(0); } else if (schema.getAnyOf() != null) { return schema.getAnyOf().get(0); } LOG.error("Unknown composed schema type: " + schema); return null; }
Source:
<code>public void testParseAutosuggestFeed() <START> throws IOException <END> { ObjectMapper mapper = NpmJacksonMapperFactory.createObjectMapper(); PackageFeed feedDef = mapper.readValue(getClass().getResourceAsStream("/json/antlr4-autosuggest/feed.json"), PackageFeed.class); assertThat(feedDef.getName()).isEqualTo("antlr4-autosuggest"); }</code><technical_language>suggestion throws Exception</technical_language>

Target:
public void testParseAutosuggestFeed() throws Exception { ObjectMapper mapper = NpmJacksonMapperFactory.createObjectMapper(); PackageFeed feedDef = mapper.readValue(getClass().getResourceAsStream("/json/antlr4-autosuggest/feed.json"), PackageFeed.class); assertThat(feedDef.getName()).isEqualTo("antlr4-autosuggest"); }
Source:
<code>public Event complianceCreated(Consumer consumer, SystemPurposeComplianceStatus compliance) { Map<String, Object> eventData = new HashMap<>(); eventData.put("status", compliance.getStatus()); eventData.put("reasons", Collections.unmodifiableSet(compliance.getReasons())); try { String eventDataJson = mapper.writeValueAsString(eventData); return new Event(Event.Type.CREATED, Target.SYSTEM_PURPOSE_COMPLIANCE, consumer.getName(), principalProvider.get(), consumer.getOwnerId(), consumer.getUuid(), consumer.getUuid(), eventDataJson, null, null); } catch (JsonProcessingException e) { log.error("Error while building JSON for system purpose compliance.created event.", e); <START> throw new IseException("Error while building JSON for system purpose compliance.created event."); <END> } }</code><technical_language>This is more of a personal preference, wrap JsonProcessingException here? I.e. java throw new IseException("Error while building JSON for system purpose compliance.created event.", e); recording stack log.error, I maintain chain of exceptions</technical_language>

Target:
public Event complianceCreated(Consumer consumer, SystemPurposeComplianceStatus compliance) { Map<String, Object> eventData = new HashMap<>(); eventData.put("status", compliance.getStatus()); eventData.put("reasons", Collections.unmodifiableSet(compliance.getReasons())); try { String eventDataJson = mapper.writeValueAsString(eventData); return new Event(Event.Type.CREATED, Target.SYSTEM_PURPOSE_COMPLIANCE, consumer.getName(), principalProvider.get(), consumer.getOwnerId(), consumer.getUuid(), consumer.getUuid(), eventDataJson, null, null); } catch (JsonProcessingException e) { log.error("Error while building JSON for system purpose compliance.created event.", e); throw new IseException("Error while building JSON for system purpose compliance.created event.", e); } }
Source:
<code>private boolean equals(ArrayContainer arrayContainer) { if (getCardinality() != arrayContainer.getCardinality()) { return false; } int pos = 0; for (short i = 0; i < nbrruns; ++i) { short runStart = getValue(i); short length = getLength(i); if (arrayContainer.content[pos] != runStart) { return false; } if (arrayContainer.content[pos + length] != runStart + length) { return false; } pos += length + 1; } <START> return pos == arrayContainer.getCardinality(); <END> }</code><technical_language>this line ? give a case this check is required</technical_language>

Target:
private boolean equals(ArrayContainer arrayContainer) { int pos = 0; for (short i = 0; i < nbrruns; ++i) { short runStart = getValue(i); short length = getLength(i); if (pos + length >= arrayContainer.getCardinality()) { return false; } if (arrayContainer.content[pos] != runStart) { return false; } if (arrayContainer.content[pos + length] != runStart + length) { return false; } pos += length + 1; } return pos == arrayContainer.getCardinality(); }
Source:
<code>private long getBestTime() { if (mNtpServer != null) { long ntpAge = SystemClock.elapsedRealtime() - cachedNtpTimestamp; <START> if (mNtpActive) { <END> if (ntpAge < (mMaxNtpCacheAgeSec - 3 * mPolicyPollPeriodSec) * 1000) { if (VDBG) Slog.v(TAG, "using cached time"); return cachedNtp + ntpAge; } } synchronized (mNtpRequestPendingGuard) { if (!mNtpRequestPending) { mNtpRequestPending = true; new Thread() { @Override public void run() { SntpClient client = new SntpClient(); if (client.requestTime(mNtpServer, MAX_NTP_FETCH_WAIT)) { cachedNtp = client.getNtpTime(); cachedNtpTimestamp = SystemClock.elapsedRealtime(); if (!mNtpActive) { mNtpActive = true; if (VDBG) Slog.d(TAG, "found Authoritative time - reseting alarm"); mHandler.obtainMessage(EVENT_RESET_ALARM).sendToTarget(); } } synchronized (mNtpRequestPendingGuard) { mNtpRequestPending = false; } } }.start(); } } if (mNtpActive) { if (ntpAge < mMaxNtpCacheAgeSec * 1000) { if (VDBG) Slog.v(TAG, "using cached time"); return cachedNtp + ntpAge; } } } long time = System.currentTimeMillis(); if (VDBG) Slog.v(TAG, "using User time: " + time); mNtpActive = false; return time; }</code><technical_language>access mNtpActive this thread..</technical_language>

Target:
private long getBestTime() { if (mNtpServer != null) { long ntpAge = SystemClock.elapsedRealtime() - cachedNtpTimestamp; if (mNtpActive && ntpAge < (mMaxNtpCacheAgeSec - 3 * mPolicyPollPeriodSec) * 1000) { if (VDBG) Slog.v(TAG, "using cached time"); return cachedNtp + ntpAge; } mHandler.obtainMessage(EVENT_NTP_ALARM).sendToTarget(); if (mNtpActive && ntpAge < mMaxNtpCacheAgeSec * 1000) { if (VDBG) Slog.v(TAG, "using cached time"); return cachedNtp + ntpAge; } } long time = System.currentTimeMillis(); if (VDBG) Slog.v(TAG, "using User time: " + time); return time; }
Source:
<code>protected String findContractControlAccountNumber(List<InvoiceAccountDetail> details) { for (InvoiceAccountDetail detail : details) { if (StringUtils.isNotBlank(detail.getContractControlAccountNumber())) { return detail.getContractControlAccountNumber(); } } <START> LOG.error("findConntractControllAccountNumber, could not find contract controll account number"); <END> return StringUtils.EMPTY; }</code><technical_language>a typos in error log message: 1) Conntract => Contract 2) Controll => Control 3) controll => control</technical_language>

Target:
protected String findContractControlAccountNumber(List<InvoiceAccountDetail> details) { for (InvoiceAccountDetail detail : details) { if (StringUtils.isNotBlank(detail.getContractControlAccountNumber())) { return detail.getContractControlAccountNumber(); } } LOG.error("findContractControlAccountNumber, could not find contract control account number"); return StringUtils.EMPTY; }
Source:
<code>public void processMessage(final ObjectMessage message) { LOGGER.debug("Processing public lighting set light measurement device request message"); String correlationUid = null; String messageType = null; String organisationIdentification = null; String deviceIdentification = null; Object dataObject = null; try { correlationUid = message.getJMSCorrelationID(); messageType = message.getJMSType(); organisationIdentification = message.getStringProperty(Constants.ORGANISATION_IDENTIFICATION); deviceIdentification = message.getStringProperty(Constants.DEVICE_IDENTIFICATION); dataObject = message.getObject(); } catch (final JMSException e) { LOGGER.error("UNRECOVERABLE ERROR, unable to read ObjectMessage instance, giving up.", e); LOGGER.debug("correlationUid: {}", correlationUid); LOGGER.debug("messageType: {}", messageType); LOGGER.debug("organisationIdentification: {}", organisationIdentification); LOGGER.debug("deviceIdentification: {}", deviceIdentification); return; } try { LOGGER.info("Calling application service function: {}", messageType); <START> this.adHocManagementService.coulpeLightMeasurementDeviceForSsld(organisationIdentification, <END> deviceIdentification, correlationUid, (String) dataObject, messageType); } catch (final Exception e) { this.handleError(e, correlationUid, organisationIdentification, deviceIdentification, messageType); } }</code><technical_language>coulpe => couple</technical_language>

Target:
public void processMessage(final ObjectMessage message) { LOGGER.debug("Processing public lighting set light measurement device request message"); String correlationUid = null; String messageType = null; String organisationIdentification = null; String deviceIdentification = null; Object dataObject = null; try { correlationUid = message.getJMSCorrelationID(); messageType = message.getJMSType(); organisationIdentification = message.getStringProperty(Constants.ORGANISATION_IDENTIFICATION); deviceIdentification = message.getStringProperty(Constants.DEVICE_IDENTIFICATION); dataObject = message.getObject(); } catch (final JMSException e) { LOGGER.error("UNRECOVERABLE ERROR, unable to read ObjectMessage instance, giving up.", e); LOGGER.debug("correlationUid: {}", correlationUid); LOGGER.debug("messageType: {}", messageType); LOGGER.debug("organisationIdentification: {}", organisationIdentification); LOGGER.debug("deviceIdentification: {}", deviceIdentification); return; } try { LOGGER.info("Calling application service function: {}", messageType); this.adHocManagementService.coupleLightMeasurementDeviceForSsld(organisationIdentification, deviceIdentification, correlationUid, (String) dataObject, messageType); } catch (final Exception e) { this.handleError(e, correlationUid, organisationIdentification, deviceIdentification, messageType); } }
Source:
<code>public static void main(String[] args) { MongoConnectionPropertiesLoader.load(); Injector injector = Guice.createInjector(new LotteryModule()); com.iluwatar.hexagonal.domain.LotteryService service = injector.getInstance( com.iluwatar.hexagonal.domain.LotteryService.class); WireTransfers bank = injector.getInstance(WireTransfers.class); try (final Scanner scanner = new Scanner(System.in)) { boolean exit = false; while (!exit) { printMainMenu(); String cmd = readString(scanner); <START> LotteryService lotteryService = new LotteryServiceImpl(LOGGER); <END> if ("1".equals(cmd)) { lotteryService.queryLotteryAccountFunds(bank, scanner); } else if ("2".equals(cmd)) { lotteryService.addFundsToLotteryAccount(bank, scanner); } else if ("3".equals(cmd)) { lotteryService.submitTicket(service, scanner); } else if ("4".equals(cmd)) { lotteryService.checkTicket(service, scanner); } else if ("5".equals(cmd)) { exit = true; } else { LOGGER.info("Unknown command"); } } } }</code><technical_language>LotteryService injected</technical_language>

Target:
public static void main(String[] args) { MongoConnectionPropertiesLoader.load(); Injector injector = Guice.createInjector(new LotteryModule()); LotteryService service = injector.getInstance( LotteryService.class); WireTransfers bank = injector.getInstance(WireTransfers.class); try (final Scanner scanner = new Scanner(System.in)) { boolean exit = false; while (!exit) { printMainMenu(); String cmd = readString(scanner); LotteryConsoleService lotteryConsoleService = new LotteryConsoleServiceImpl(LOGGER); if ("1".equals(cmd)) { lotteryConsoleService.queryLotteryAccountFunds(bank, scanner); } else if ("2".equals(cmd)) { lotteryConsoleService.addFundsToLotteryAccount(bank, scanner); } else if ("3".equals(cmd)) { lotteryConsoleService.submitTicket(service, scanner); } else if ("4".equals(cmd)) { lotteryConsoleService.checkTicket(service, scanner); } else if ("5".equals(cmd)) { exit = true; } else { LOGGER.info("Unknown command"); } } } }
Source:
<code>public void update(CruiseConfig preprocessedConfig) throws Exception { PackageRepository oldRepo = preprocessedConfig.getPackageRepositories().find(oldRepoId); this.newRepo.setPackages(oldRepo.getPackages()); <START> this.newRepo.setPluginConfiguration(getPluginCofiguration(this.newRepo)); <END> PackageRepositories repositories = preprocessedConfig.getPackageRepositories(); repositories.removePackageRepository(oldRepo.getId()); repositories.add(this.newRepo); preprocessedConfig.setPackageRepositories(repositories); }</code><technical_language>plugin configuration allowed change. do allow UI</technical_language>

Target:
public void update(CruiseConfig preprocessedConfig) throws Exception { PackageRepository oldRepo = preprocessedConfig.getPackageRepositories().find(newRepo.getRepoId()); this.newRepo.setPackages(oldRepo.getPackages()); PackageRepositories repositories = preprocessedConfig.getPackageRepositories(); repositories.removePackageRepository(oldRepo.getId()); repositories.add(this.newRepo); preprocessedConfig.setPackageRepositories(repositories); }
Source:
<code>private void savePlaybackState(final StreamInfo info, final long progress) { if (info == null) return; <START> Log.d(TAG, "savePlaybackState() called"); <END> final Disposable stateSaver = recordManager.saveStreamState(info, progress) .observeOn(AndroidSchedulers.mainThread()) .onErrorComplete() .subscribe( ignored -> { }, error -> Log.e(TAG, "savePlaybackState() failure: ", error) ); databaseUpdateReactor.add(stateSaver); }</code><technical_language>suggestion if (DEBUG) Log.d(TAG, "savePlaybackState() called");</technical_language>

Target:
private void savePlaybackState(final StreamInfo info, final long progress) { if (info == null) return; if (DEBUG) Log.d(TAG, "savePlaybackState() called"); final Disposable stateSaver = recordManager.saveStreamState(info, progress) .observeOn(AndroidSchedulers.mainThread()) .onErrorComplete() .subscribe( ignored -> { }, error -> { if (DEBUG) Log.e(TAG, "savePlaybackState() failure: ", error); } ); databaseUpdateReactor.add(stateSaver); }
Source:
<code>public void addCurrentCampaign(List<Campaign> objects) { <START> hubList.add(1, "currently doing"); <END> hubList.addAll(2, objects); notifyItemRangeInserted(hubList.size() - objects.size(), hubList.size() - 1); }</code><technical_language>In case of adding campaigns current campaigns section, get index of campaign section title. final variables for consistency</technical_language>

Target:
public void addCurrentCampaign(List<Campaign> objects) { int i = hubList.indexOf(BEEN_THERE_DONE_GOOD); hubList.addAll(i, objects); notifyItemRangeInserted(hubList.size() - objects.size(), hubList.size() - 1); }
Source:
<code>public String toString() { return "DataProfile=" + mProfileId + "/" + mProtocol + "/" + mAuthType + "/" + <START> ("user".equals(Build.TYPE) <END> ? "*** ***": (mApn + "/" + mUserName + "/" + mPassword)) + "/" + mType + "/" + mMaxConnsTime + "/" + mMaxConns + "/" + mWaitTime + "/" + mEnabled + "/" + mSupportedApnTypesBitmap + "/" + mRoamingProtocol + "/" + mBearerBitmap + "/" + mMtu + "/" + mMvnoType + "/" + mMvnoMatchData + "/" + mModemCognitive; }</code><technical_language>frameworks/base/core/java/android/os/Build.java#IS_USER</technical_language>

Target:
public String toString() { return "DataProfile=" + mProfileId + "/" + mProtocol + "/" + mAuthType + "/" + (Build.IS_USER? "*** ***": (mApn + "/" + mUserName + "/" + mPassword)) + "/" + mType + "/" + mMaxConnsTime + "/" + mMaxConns + "/" + mWaitTime + "/" + mEnabled + "/" + mSupportedApnTypesBitmap + "/" + mRoamingProtocol + "/" + mBearerBitmap + "/" + mMtu + "/" + mMvnoType + "/" + mMvnoMatchData + "/" + mModemCognitive; }