auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static boolean registerFluidContainer(FluidContainerData data) { if (isFilledContainer(data.filledContainer)) { return false; } <START> containerFluidMap.put(Arrays.asList(data.filledContainer.itemID, data.filledContainer.getItemDamage()), data); <END> if (data.emptyContainer != null) { filledContainerMap.put(Arrays.asList(data.emptyContainer.itemID, data.emptyContainer.getItemDamage(), data.fluid.fluidID), data); emptyContainers.add(Arrays.asList(data.emptyContainer.itemID, data.emptyContainer.getItemDamage())); } MinecraftForge.EVENT_BUS.post(new FluidContainerRegisterEvent(data)); return true; }</code><technical_language>please rewrite this a new key class? this a high overhead. [Here's example fixed version of LiquidContainerRegistry.](<LINK_0></technical_language>

Target:
public static boolean registerFluidContainer(FluidContainerData data) { if (isFilledContainer(data.filledContainer)) { return false; } containerFluidMap.put(getHashcode(data.filledContainer.itemID, data.filledContainer.getItemDamage()), data); if (data.emptyContainer != null) { filledContainerMap.put(Arrays.asList(data.emptyContainer.itemID, data.emptyContainer.getItemDamage(), data.fluid.fluidID), data); emptyContainers.add(getHashcode(data.emptyContainer.itemID, data.emptyContainer.getItemDamage())); } MinecraftForge.EVENT_BUS.post(new FluidContainerRegisterEvent(data)); return true; }
Source:
<code>private Group createAuthenticationGroup(final Composite parent) { final Group g = createGroup(parent, UIText.RepositorySelectionPage_groupAuthentication); newLabel(g, UIText.RepositorySelectionPage_promptUser + ":"); userText = new Text(g, SWT.BORDER); userText.setLayoutData(createFieldGridData()); userText.addModifyListener(new ModifyListener() { public void modifyText(final ModifyEvent e) { setURI(uri.setUser(nullString(userText.getText()))); user = userText.getText(); } }); newLabel(g, UIText.RepositorySelectionPage_promptPassword + ":"); passText = new Text(g, SWT.BORDER | SWT.PASSWORD); passText.setLayoutData(createFieldGridData()); passText.addModifyListener(new ModifyListener() { public void modifyText(final ModifyEvent e) { setURI(uri.setPass(null)); password = passText.getText(); } }); <START> newLabel(g, "Store in Secure Store"); END> storeCheckbox = new Button(g, SWT.CHECK); storeCheckbox.setSelection(storeInSecureStore); storeCheckbox.addSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent e) { storeInSecureStore = storeCheckbox.getSelection(); } public void widgetDefaultSelected(SelectionEvent e) { storeInSecureStore = storeCheckbox.getSelection(); } }); return g; }</code><technical_language>deferring string externalization</technical_language>

Target:
private Group createAuthenticationGroup(final Composite parent) { final Group g = createGroup(parent, UIText.RepositorySelectionPage_groupAuthentication); newLabel(g, UIText.RepositorySelectionPage_promptUser + ":"); userText = new Text(g, SWT.BORDER); userText.setLayoutData(createFieldGridData()); userText.addModifyListener(new ModifyListener() { public void modifyText(final ModifyEvent e) { setURI(uri.setUser(nullString(userText.getText()))); user = userText.getText(); } }); newLabel(g, UIText.RepositorySelectionPage_promptPassword + ":"); passText = new Text(g, SWT.BORDER | SWT.PASSWORD); passText.setLayoutData(createFieldGridData()); passText.addModifyListener(new ModifyListener() { public void modifyText(final ModifyEvent e) { setURI(uri.setPass(null)); password = passText.getText(); } }); newLabel(g, UIText.RepositorySelectionPage_storeInSecureStore); storeCheckbox = new Button(g, SWT.CHECK); storeCheckbox.setSelection(storeInSecureStore); storeCheckbox.addSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent e) { storeInSecureStore = storeCheckbox.getSelection(); } public void widgetDefaultSelected(SelectionEvent e) { storeInSecureStore = storeCheckbox.getSelection(); } }); return g; }
Source:
<code>public boolean start() { for (int i = 0; i < memberCount; i++) { Task task = this.getTask(); TaskDescription taskDescription = new TaskDescription(); taskDescription.setName(TASK_PREFIX + name + i); taskDescription.setTaskGroup(MessageProcessorConstants.SCHEDULED_MESSAGE_PROCESSOR_GROUP); if (interval < MessageProcessorConstants.THRESHOULD_INTERVAL) { taskDescription.setInterval(MessageProcessorConstants.THRESHOULD_INTERVAL); } else { taskDescription.setInterval(interval); } taskDescription.setIntervalInMs(true); taskDescription.addResource(TaskDescription.INSTANCE, task); taskDescription.addResource(TaskDescription.CLASSNAME, task.getClass().getName()); if (cronExpression != null) { taskDescription.setCronExpression(cronExpression); } taskManager.schedule(taskDescription); } <START> logger.info("Started message processor. [" + getName() + "]."); <END> return true; }</code><technical_language>character "." word "processor" changed ":"</technical_language>

Target:
public boolean start() { for (int i = 0; i < memberCount; i++) { Task task = this.getTask(); TaskDescription taskDescription = new TaskDescription(); taskDescription.setName(TASK_PREFIX + name + i); taskDescription.setTaskGroup(MessageProcessorConstants.SCHEDULED_MESSAGE_PROCESSOR_GROUP); if (interval < MessageProcessorConstants.THRESHOULD_INTERVAL) { taskDescription.setInterval(MessageProcessorConstants.THRESHOULD_INTERVAL); } else { taskDescription.setInterval(interval); } taskDescription.setIntervalInMs(true); taskDescription.addResource(TaskDescription.INSTANCE, task); taskDescription.addResource(TaskDescription.CLASSNAME, task.getClass().getName()); if (cronExpression != null) { taskDescription.setCronExpression(cronExpression); } taskManager.schedule(taskDescription); } logger.info("Started message processor: [" + getName() + "]."); return true; }
Source:
<code>public void testHardwareFlavourToHardware() { server.enqueue( new MockResponse().setBody(stringFromResource("/compute/hardware.json")) ); <START> org.apache.jclouds.oneandone.rest.domain.HardwareFlavour hardware = api.serverApi().getHardwareFlavour("some-id"); <END> Hardware actual = fnHardware.apply(hardware); int MinRamSize = (int) hardware.hardware().ram(); if (hardware.hardware().ram() < 1) { MinRamSize = 1; } List<Volume> volumes = new ArrayList<Volume>(); for (HardwareFlavour.Hardware.Hdd hdd : hardware.hardware().hdds()) { Volume vol = new VolumeBuilder() .bootDevice(hdd.isMain()) .device("hdd") .type(Volume.Type.LOCAL) .size((float) hdd.size()) .build(); volumes.add(vol); } List<Processor> processors = new ArrayList<Processor>(); for (int i = 0; i < hardware.hardware().vcore(); i++) { Processor proc = new Processor(hardware.hardware().coresPerProcessor(), 1); processors.add(proc); } Hardware expected = new HardwareBuilder() .ids(hardware.id()) .name(hardware.name()) .ram(MinRamSize) .volumes(volumes) .processors(ImmutableList.copyOf(processors)).build(); assertEquals(actual, expected); }</code><technical_language>is need mock api calls implement this test</technical_language>

Target:
public void testHardwareFlavourToHardware() { List<Hdd> sourceHdds = new ArrayList<Hdd>(); Hdd sourceHdd = Hdd.create("GB", 40, true); sourceHdds.add(sourceHdd); org.apache.jclouds.oneandone.rest.domain.HardwareFlavour.Hardware hrdware = org.apache.jclouds.oneandone.rest.domain.HardwareFlavour.Hardware.create(null, 1, 1, 1, sourceHdds); org.apache.jclouds.oneandone.rest.domain.HardwareFlavour hardware = HardwareFlavour.create("65929629F35BBFBA63022008F773F3EB", "name", hrdware); Hardware actual = fnHardware.apply(hardware); int MinRamSize = (int) hardware.hardware().ram(); if (hardware.hardware().ram() < 1) { MinRamSize = 1; } List<Volume> volumes = new ArrayList<Volume>(); for (HardwareFlavour.Hardware.Hdd hdd : hardware.hardware().hdds()) { Volume vol = new VolumeBuilder() .bootDevice(hdd.isMain()) .device("hdd") .type(Volume.Type.LOCAL) .size((float) hdd.size()) .build(); volumes.add(vol); } List<Processor> processors = new ArrayList<Processor>(); for (int i = 0; i < hardware.hardware().vcore(); i++) { Processor proc = new Processor(hardware.hardware().coresPerProcessor(), 1); processors.add(proc); } Hardware expected = new HardwareBuilder() .ids(hardware.id()) .name(hardware.name()) .ram(MinRamSize) .volumes(volumes) .processors(ImmutableList.copyOf(processors)).build(); assertEquals(actual, expected); }
Source:
<code>public HttpRequestIntent httpRequestIntent() { final JsonNode variables = getVariables(); final String variablesPart = variables == null ? null : String.format("\"variables\": %s", variables); final String queryPart = String.format("\"query\": \"%s\"", getQuery().replace("\n", "\\n").replace("\"", "\\\"")); final String body = Stream.of(queryPart, variablesPart) .filter(Objects::nonNull) <START> .collect(joining(",", "{", "}")); <END> return HttpRequestIntent.of(HttpMethod.POST, "/graphql", body); }</code><technical_language>Cool This is a good example shows power of Stream API</technical_language>

Target:
public HttpRequestIntent httpRequestIntent() { final JsonNode variables = getVariables(); final String variablesPart = variables == null ? null : String.format("\"variables\": %s", Json.stringify(variables)); final String queryPart = String.format("\"query\": \"%s\"", getQuery().replace("\n", "\\n").replace("\"", "\\\"")); final String body = Stream.of(queryPart, variablesPart) .filter(Objects::nonNull) .collect(joining(",", "{", "}")); return HttpRequestIntent.of(HttpMethod.POST, "/graphql", body); }
Source:
<code>public static String writeImageDataToGcs(String googleId, byte[] imageData) throws IOException { GcsFilename gcsFilename = new GcsFilename(Config.GCS_BUCKETNAME, googleId); <START> GcsOutputChannel outputChannel = <END> GcsServiceFactory.createGcsService(RetryParams.getDefaultInstance()) .createOrReplace(gcsFilename, new GcsFileOptions.Builder().mimeType("image/png").build()); outputChannel.write(ByteBuffer.wrap(imageData)); outputChannel.close(); return BlobstoreServiceFactory.getBlobstoreService() .createGsBlobKey("/gs/" + Config.GCS_BUCKETNAME + "/" + googleId).getKeyString(); }</code><technical_language>I positive this is AutoCloseable</technical_language>

Target:
public static String writeImageDataToGcs(String googleId, byte[] imageData) throws IOException { GcsFilename gcsFilename = new GcsFilename(Config.GCS_BUCKETNAME, googleId); try (GcsOutputChannel outputChannel = GcsServiceFactory.createGcsService(RetryParams.getDefaultInstance()) .createOrReplace(gcsFilename, new GcsFileOptions.Builder().mimeType("image/png").build())) { outputChannel.write(ByteBuffer.wrap(imageData)); } return BlobstoreServiceFactory.getBlobstoreService() .createGsBlobKey("/gs/" + Config.GCS_BUCKETNAME + "/" + googleId).getKeyString(); }
Source:
<code><START> public void setAnyTextAttributes(List<String> anyTextAttributes) { <END> this.anyTextAttributes.clear(); if (CollectionUtils.isNotEmpty(anyTextAttributes)) { this.anyTextAttributes.addAll(anyTextAttributes); } if (metacardClient instanceof CacheSolrMetacardClient) { ((CacheSolrMetacardClient) metacardClient).setAnyTextAttributes(anyTextAttributes); } }</code><technical_language>clearing content if list add items in it. is multi-threading here</technical_language>

Target:
public void setAnyTextAttributes(List<String> anyTextAttributes) { this.anyTextAttributes.clear(); if (CollectionUtils.isNotEmpty(anyTextAttributes)) { this.anyTextAttributes.addAll(anyTextAttributes); } metacardClient.setAnyTextAttributes(anyTextAttributes); }
Source:
<code>public TaskBatchExecutionListenerFactoryBean taskBatchExecutionListener(TaskExplorer taskExplorer) { if(!CollectionUtils.isEmpty(dataSources) && dataSources.size() == 1) { return new TaskBatchExecutionListenerFactoryBean( <START> dataSources.iterator().next(), taskExplorer, taskProperties.getTablePrefix()); <END> } else if(CollectionUtils.isEmpty(dataSources)) { return new TaskBatchExecutionListenerFactoryBean(null, taskExplorer); } else { throw new IllegalStateException("Expected one datasource and found " + dataSources.size()); } }</code><technical_language>TaskConfigurer for this now</technical_language>

Target:
public TaskBatchExecutionListenerFactoryBean taskBatchExecutionListener(TaskExplorer taskExplorer) { TaskConfigurer taskConfigurer = null; if(!context.getBeansOfType(TaskConfigurer.class).isEmpty()) { taskConfigurer = context.getBean(TaskConfigurer.class); } if(taskConfigurer != null && taskConfigurer.getTaskDataSource() != null) { return new TaskBatchExecutionListenerFactoryBean( taskConfigurer.getTaskDataSource(), taskExplorer); } else { return new TaskBatchExecutionListenerFactoryBean(null, taskExplorer); } }
Source:
<code>public Func1<ManualInput, ManualInput> createAnomalyFunc(final Anomaly an) { return new Func1<ManualInput, ManualInput>() { int cellsPerColumn = connections.getCellsPerColumn(); @Override public ManualInput call(ManualInput t1) { int[] ffActiveCols = t1.getFeedForwardSparseActives(); int[] prevPredictedCols = SDR.cellsAsColumnIndices(t1.getPreviousPredictiveCells(), cellsPerColumn); if(ffActiveCols == null || t1.getPreviousPredictiveCells() == null) { return t1.anomalyScore(1.0); } return t1.anomalyScore(an.compute(ffActiveCols, prevPredictedCols, 0, 0)); } }; <START> } <END></code><technical_language>This temporary debug main issue this is of is done (by creating temporary variables heap (i.e. ffActiveCols & prevPredictedCols). In general rule of thumb is if called 3 more times create a temporary variable locally, twice. do think</technical_language>

Target:
public Func1<ManualInput, ManualInput> createAnomalyFunc(final Anomaly an) { return new Func1<ManualInput, ManualInput>() { @Override public ManualInput call(ManualInput mi) { int[] ffActiveCols = mi.getFeedForwardSparseActives(); if(ffActiveCols == null || mi.getPreviousPredictiveCells() == null) { return mi.anomalyScore(1.0); } int[] prevPredictedCols = Cell.asColumnList(mi.getPreviousPredictiveCells()); return mi.anomalyScore(anomalyComputer.compute(ffActiveCols, prevPredictedCols, 0, 0)); } }; }
Source:
<code>private static ArrayList<String> getDatadogTags(String datadogTags) { ArrayList<String> tags = new ArrayList<>(); for (String tag : datadogTags.split(",")) { <START> tags.add(tag); <END> } return tags; }</code><technical_language>nit: if datadog cares, skip tag if equal ""</technical_language>

Target:
private static ArrayList<String> getDatadogTags(String datadogTags) { ArrayList<String> tags = new ArrayList<>(); for (String tag : datadogTags.split(",")) { if (!StringUtils.isEmpty(tag)) { tags.add(tag); } } return tags; }
Source:
<code>private void selectRepresentationElements(ISelection selection, DialectEditor dialectEditor) { List<DRepresentationElement> representationElements = getRepresentationElements(dialectEditor.getRepresentation(), ((IStructuredSelection) selection).toList()); if (!representationElements.isEmpty()) { DialectUIManager.INSTANCE.selectAndReveal(dialectEditor, representationElements); <START> } <END> }</code><technical_language>If list is empty, change selection select (erase current editor selection). For example, for diagram editor, select diagram in this case</technical_language>

Target:
private void selectRepresentationElements(ISelection selection, DialectEditor dialectEditor) { List<DRepresentationElement> representationElements = getRepresentationElements(dialectEditor.getRepresentation(), ((IStructuredSelection) selection).toList()); DialectUIManager.INSTANCE.selectAndReveal(dialectEditor, representationElements); }
Source:
<code>public Response killPendingSegments( @PathParam("dataSource") String dataSource, <START> @QueryParam("interval") String deleteIntervalString, <END> @Context HttpServletRequest request ) { final Interval deleteInterval = Intervals.of(deleteIntervalString); final Access authResult = AuthorizationUtils.authorizeAllResourceActions( request, ImmutableList.of( new ResourceAction(new Resource(dataSource, ResourceType.DATASOURCE), Action.READ), new ResourceAction(new Resource(dataSource, ResourceType.DATASOURCE), Action.WRITE) ), authorizerMapper ); if (!authResult.isAllowed()) { throw new ForbiddenException(authResult.toString()); } if (taskMaster.isLeader()) { final int numDeleted = indexerMetadataStorageAdapter.deletePendingSegments(dataSource, deleteInterval); return Response.ok().entity(ImmutableMap.of("numDeleted", numDeleted)).build(); } else { return Response.status(Status.SERVICE_UNAVAILABLE).build(); } }</code><technical_language>work this Interval String? do a jackson deserializer set json strings Druid Intervals</technical_language>

Target:
public Response killPendingSegments( @PathParam("dataSource") String dataSource, @QueryParam("interval") String deleteIntervalString, @Context HttpServletRequest request ) { final Interval deleteInterval = Intervals.of(deleteIntervalString); final Access authResult = AuthorizationUtils.authorizeAllResourceActions( request, ImmutableList.of( new ResourceAction(new Resource(dataSource, ResourceType.DATASOURCE), Action.READ), new ResourceAction(new Resource(dataSource, ResourceType.DATASOURCE), Action.WRITE) ), authorizerMapper ); if (!authResult.isAllowed()) { throw new ForbiddenException(authResult.getMessage()); } if (taskMaster.isLeader()) { final int numDeleted = indexerMetadataStorageAdapter.deletePendingSegments(dataSource, deleteInterval); return Response.ok().entity(ImmutableMap.of("numDeleted", numDeleted)).build(); } else { return Response.status(Status.SERVICE_UNAVAILABLE).build(); } }
Source:
<code>public void writeGuestbookAndStartDownload(GuestbookResponse guestbookResponse){ if (guestbookResponse.getDataFile() != null) logger.info("FDL File: " + guestbookResponse.getDataFile().getId()); if (guestbookResponse.getSelectedFileIds() != null) { logger.info("FDL File Ids: " + guestbookResponse.getSelectedFileIds()); String[] fileIds = guestbookResponse.getSelectedFileIds().split(","); if (fileIds.length == 1) { logger.info("FDL: id: " + fileIds[0]); <START> DataFile df = datafileService.findCheapAndEasy(Long.parseLong(fileIds[0])); <END> if (df != null) logger.info("FDL: Have df"); guestbookResponse.setDataFile(df); } } if (guestbookResponse != null && guestbookResponse.getDataFile() != null ){ writeGuestbookResponseRecord(guestbookResponse); callDownloadServlet(guestbookResponse.getFileFormat(), guestbookResponse.getDataFile().getId(), true); } if (guestbookResponse != null && guestbookResponse.getDataFile() == null && guestbookResponse.getSelectedFileIds() != null ){ List<String> list = new ArrayList<>(Arrays.asList(guestbookResponse.getSelectedFileIds().split(","))); for (String idAsString : list) { DataFile df = datafileService.findCheapAndEasy(new Long(idAsString)) ; if (df != null) { guestbookResponse.setDataFile(df); writeGuestbookResponseRecord(guestbookResponse); } } callDownloadServlet(guestbookResponse.getSelectedFileIds(), true); } }</code><technical_language>loggers .fine instead .info</technical_language>

Target:
public void writeGuestbookAndStartDownload(GuestbookResponse guestbookResponse){ if (guestbookResponse.getSelectedFileIds() != null) { String[] fileIds = guestbookResponse.getSelectedFileIds().split(","); if (fileIds.length == 1) { DataFile df = datafileService.findCheapAndEasy(Long.parseLong(fileIds[0])); guestbookResponse.setDataFile(df); } } if (guestbookResponse != null && guestbookResponse.getDataFile() != null ){ writeGuestbookResponseRecord(guestbookResponse); callDownloadServlet(guestbookResponse.getFileFormat(), guestbookResponse.getDataFile().getId(), true); } if (guestbookResponse != null && guestbookResponse.getDataFile() == null && guestbookResponse.getSelectedFileIds() != null ){ List<String> list = new ArrayList<>(Arrays.asList(guestbookResponse.getSelectedFileIds().split(","))); for (String idAsString : list) { DataFile df = datafileService.findCheapAndEasy(new Long(idAsString)) ; if (df != null) { guestbookResponse.setDataFile(df); writeGuestbookResponseRecord(guestbookResponse); } } callDownloadServlet(guestbookResponse.getSelectedFileIds(), true); } }
Source:
<code>private KeyValueCollectionPermission isPermitted( CollectionPermission subject, KeyValueCollectionPermission match, KeyValueCollectionPermission allPerms) { List<KeyValuePermission> permissions = getPermissions(allPerms); Map<String, Set<String>> grouped = groupPermissionsByKey(permissions); if (Collections.disjoint(grouped.keySet(), SHARED_PERMISSIONS_IMPLIED)) { return match; } boolean isSystem = system(subject); boolean isOwner = owner(subject, grouped); boolean hasAccessIndividuals = individuals(subject, grouped); boolean hasAccessGroups = groups(subject, grouped); Supplier<Set<String>> impliedPermissions = () -> { if (isSystem || isOwner) { return grouped.keySet(); } else if (hasAccessIndividuals || hasAccessGroups) { return SHARED_PERMISSIONS_IMPLIED; } else { return Constants.SHAREABLE_TAGS; } }; Function<Set<String>, KeyValueCollectionPermission> filterPermissions = (impliedKeys) -> { KeyValueCollectionPermission implied = new KeyValueCollectionPermission( match.getAction(), impliedKeys .stream() .map(key -> new KeyValuePermission(key, grouped.get(key))) .collect(Collectors.toList())); List<Permission> remaining = allPerms .<Permission>getKeyValuePermissionList() .stream() .filter(p -> !implied.implies(p)) .collect(Collectors.toList()); KeyValueCollectionPermission collection = new KeyValueCollectionPermission(match.getAction()); collection.addAll(remaining); return collection; }; <START> <END> return filterPermissions.apply(impliedPermissions.get()); }</code><technical_language>KeyValueCollectionPermission constructor a collection a argument</technical_language>

Target:
private KeyValueCollectionPermission isPermitted( CollectionPermission subject, KeyValueCollectionPermission match, KeyValueCollectionPermission allPerms) { List<KeyValuePermission> permissions = getPermissions(match); Map<String, Set<String>> grouped = groupPermissionsByKey(permissions); if (Collections.disjoint(grouped.keySet(), SHARED_PERMISSIONS_IMPLIED)) { return match; } boolean isSystem = systemImplied(subject); boolean isOwner = ownerImplied(subject, grouped); boolean hasAccessIndividuals = individualsImplied(subject, grouped); boolean hasAccessGroups = groupsImplied(subject, grouped); Set<String> impliedKeys = Constants.SHAREABLE_TAGS; if (hasAccessIndividuals || hasAccessGroups) { impliedKeys = SHARED_PERMISSIONS_IMPLIED; } if (isSystem || isOwner) { impliedKeys = grouped.keySet(); } KeyValueCollectionPermission implied = new KeyValueCollectionPermission( match.getAction(), impliedKeys .stream() .map(key -> new KeyValuePermission(key, grouped.get(key))) .collect(Collectors.toList())); List<Permission> remaining = match .<Permission>getKeyValuePermissionList() .stream() .filter(p -> !implied.implies(p)) .collect(Collectors.toList()); KeyValueCollectionPermission collection = new KeyValueCollectionPermission(match.getAction()); collection.addAll(remaining); return collection; }
Source:
<code>public Object combine(Object lhs, Object rhs) { <START> return ((Number) lhs).longValue() + ((Number) rhs).longValue(); <END> }</code><technical_language>in some cases lhs/rhs null, pls do null checks appropriately</technical_language>

Target:
public Object combine(Object lhs, Object rhs) { if (lhs == null && rhs == null) { return 0L; } if (rhs == null) { return ((Number) lhs).longValue(); } if (lhs == null) { return ((Number) rhs).longValue(); } return ((Number) lhs).longValue() + ((Number) rhs).longValue(); }
Source:
<code>public void onDrawerSpecialItemClick(MenuItem item) { final ArrayList<TaggedEventSeries> currentEventSeries = App.getInstance().currentTaggedEventSeries(); for (TaggedEventSeries taggedEventSeries : currentEventSeries) { <START> if (getString(taggedEventSeries.getTitleResId()) == item.getTitle()) { <END> Bundle special = new Bundle(); special.putString(Const.EXTRA_TAGGED_EVENT_CACHEKEY, taggedEventSeries.getTag()); special.putParcelable(Const.EXTRA_TAGGED_EVENT, taggedEventSeries); navigateTo(TaggedEventSeriesActivity.class, special); break; } } }</code><technical_language>do comparison .equals()</technical_language>

Target:
public void onDrawerSpecialItemClick(MenuItem item) { final ArrayList<TaggedEventSeries> currentEventSeries = App.getInstance().currentTaggedEventSeries(); for (TaggedEventSeries taggedEventSeries : currentEventSeries) { if (getString(taggedEventSeries.getTitleResId()).equals(item.getTitle())) { Bundle special = new Bundle(); special.putString(Const.EXTRA_TAGGED_EVENT_CACHEKEY, taggedEventSeries.getTag()); special.putParcelable(Const.EXTRA_TAGGED_EVENT, taggedEventSeries); navigateTo(TaggedEventSeriesActivity.class, special); break; } } }
Source:
<code>public void testCheck() throws Exception { final DefaultConfiguration config = createModuleConfig(AnnotationOnSameLineCheck.class); final String[] expected = { "9: " + getCheckMessage(MSG_KEY_ANNOTATION_ON_SAME_LINE, "Annotation"), <START> "10: " + getCheckMessage(MSG_KEY_ANNOTATION_ON_SAME_LINE, "SomeClass"), <END> }; verify(config, getPath("InputAnnotationOnSameLineCheck.java"), expected); }</code><technical_language>annotation name Annotation SomeClass? If I wrote out java.lang.Override, annotation name java, is Override. Please add java.lang.Override example too</technical_language>

Target:
public void testCheck() throws Exception { final DefaultConfiguration config = createModuleConfig(AnnotationOnSameLineCheck.class); final String[] expected = { "9: " + getCheckMessage(MSG_KEY_ANNOTATION_ON_SAME_LINE, "Annotation"), "10: " + getCheckMessage(MSG_KEY_ANNOTATION_ON_SAME_LINE, "Annotation"), "11: " + getCheckMessage(MSG_KEY_ANNOTATION_ON_SAME_LINE, "Deprecated"), }; verify(config, getPath("InputAnnotationOnSameLineCheck.java"), expected); }
Source:
<code>public static List<ProtoGrade> gradingRequestHandler(final Institution institution, final ItemRequest request, final String authId) throws DatabaseAccessException, InvalidProtocolBufferException, AuthenticationException { final GradingQuery query = GradingQuery.parseFrom(request.getAdvanceQuery()); final boolean instructor = query.getPermissionLevel() == GradingQuery.PermissionLevel.INSTRUCTOR; final boolean student = query.getPermissionLevel() == GradingQuery.PermissionLevel.STUDENT; final boolean allGrades = query.getSearchType() == GradingQuery.SearchType.ALL_GRADES; final boolean singleGrade = query.getSearchType() == GradingQuery.SearchType.SINGLE_GRADE; LOG.debug("Query State instructor: {}, student: {}, allGrades: {}, singleGrade: {}", instructor, student, allGrades, singleGrade); List<ProtoGrade> returnList = new ArrayList<>(); if (instructor && allGrades) { returnList = institution.getAllAssignmentGradesInstructor(request.getItemId(COURSE_INDEX), authId); } else if (student && allGrades) { returnList = institution.getAllAssignmentGradesStudent(request.getItemId(COURSE_INDEX), authId); } else { final ProtoGrade gradeData = ProtoGrade.newBuilder() .setUserId(request.getItemId(USER_INDEX)) .setCourseId(request.getItemId(COURSE_INDEX)) .setAssignmentId(request.getItemId(ASSIGNMENT_INDEX)) .setProblemId(request.getItemId(PROBLEM_INDEX)) .build(); if (instructor && singleGrade) { returnList.add(institution.getGrade(authId, gradeData)); <START> } else if (student && singleGrade) { <END> returnList.add(institution.getGrade(authId, gradeData)); } } return returnList; }</code><technical_language>combine thesse if do</technical_language>

Target:
public static List<ProtoGrade> gradingRequestHandler(final Institution institution, final ItemRequest request, final String authId) throws DatabaseAccessException, InvalidProtocolBufferException, AuthenticationException { final GradingQuery query = GradingQuery.parseFrom(request.getAdvanceQuery()); final boolean instructor = query.getPermissionLevel() == GradingQuery.PermissionLevel.INSTRUCTOR; final boolean student = query.getPermissionLevel() == GradingQuery.PermissionLevel.STUDENT; final boolean allGrades = query.getSearchType() == GradingQuery.SearchType.ALL_GRADES; final boolean singleGrade = query.getSearchType() == GradingQuery.SearchType.SINGLE_GRADE; LOG.debug("Query State instructor: {}, student: {}, allGrades: {}, singleGrade: {}", instructor, student, allGrades, singleGrade); List<ProtoGrade> returnList = new ArrayList<>(); if (instructor && allGrades) { returnList = institution.getAllAssignmentGradesInstructor(request.getItemId(COURSE_INDEX), authId); } else if (student && allGrades) { returnList = institution.getAllAssignmentGradesStudent(request.getItemId(COURSE_INDEX), authId); } else { final ProtoGrade gradeData = ProtoGrade.newBuilder() .setUserId(request.getItemId(USER_INDEX)) .setCourseId(request.getItemId(COURSE_INDEX)) .setAssignmentId(request.getItemId(ASSIGNMENT_INDEX)) .setProblemId(request.getItemId(PROBLEM_INDEX)) .build(); returnList.add(institution.getGrade(authId, gradeData)); } return returnList; }
Source:
<code>public void selectFileByName(String nameOfFile) { WebElement webElement = new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until( visibilityOfElementLocated( By.xpath(format(Locators.FILE_NAME_LIST_SELECT, nameOfFile)))); webElement.click(); <START> WaitUtils.sleepQuietly(500, MILLISECONDS); <END> actionsFactory.createAction(seleniumWebDriver).doubleClick(webElement).perform(); }</code><technical_language>Suggest consider replacing **WaitUtils.sleepQuietly** **TestWebElementRenderChecker.waitElementIsRendered**</technical_language>

Target:
public void selectFileByName(String nameOfFile) { WebElement webElement = new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until( visibilityOfElementLocated( By.xpath(format(Locators.FILE_NAME_LIST_SELECT, nameOfFile)))); webElement.click(); testWebElementRenderChecker.waitElementIsRendered(webElement); actionsFactory.createAction(seleniumWebDriver).doubleClick(webElement).perform(); }
Source:
<code>private Geometry onlyLines(Geometry result) { if ((result instanceof LineString) || (result instanceof MultiLineString)) return result; List lines = com.vividsolutions.jts.geom.util.LineStringExtracter.getLines(result); if (lines.size() == 0) return null; if (lines.size() == 1) <START> return (LineString) lines.get(0); <END> return new MultiLineString((LineString[]) lines.toArray(new LineString[lines.size()]), result.getFactory()); }</code><technical_language>More missing braces</technical_language>

Target:
private Geometry onlyLines(Geometry result) { if ((result instanceof LineString) || (result instanceof MultiLineString)) { return result; } List lines = com.vividsolutions.jts.geom.util.LineStringExtracter.getLines(result); if (lines.size() == 0) { return null; } if (lines.size() == 1) { return (LineString) lines.get(0); } return new MultiLineString((LineString[]) lines.toArray(new LineString[lines.size()]), result.getFactory()); }
Source:
<code><START> public static <T> Stream<T> getStream(Iterator<T> iterator) { <END> Iterable<T> iterable = () -> iterator; return getStream(iterable); }</code><technical_language>This changes iterator, in jdoc. Also. this needs testing, is state of iterator running this</technical_language>

Target:
public static <T> Stream<T> getStream(Iterator<T> iterator) { Spliterator<T> spliterator = Spliterators.spliteratorUnknownSize(iterator, 0); return StreamSupport.stream(spliterator, false); }
Source:
<code>public void write(T objectToWrite) throws IOException { if (objectsSorted && prevObject != null && strategy.compare(prevObject, objectToWrite) >= 0) { objectsSorted = false; } byte[] bytesToWrite = strategy.toBytes(objectToWrite); ++numWritten; valuesOut.write(Ints.toByteArray(bytesToWrite.length)); valuesOut.write(bytesToWrite); headerOut.write(Ints.toByteArray((int) valuesOut.getCount())); <START> headerOutLong.write(Longs.toByteArray(valuesOut.getCount())); <END> if (getSerializedSize() > fileSizeLimit) { requireMultipleFiles = true; } prevObject = objectToWrite; }</code><technical_language>avoid writing headerOutLong file in cases needed? be, write headerOutLong demand point fileSizeLimit is crossed (and stop writing headerOut afterwards)? in cases, headerOutLong need written all</technical_language>

Target:
public void write(T objectToWrite) throws IOException { if (objectsSorted && prevObject != null && strategy.compare(prevObject, objectToWrite) >= 0) { objectsSorted = false; } byte[] bytesToWrite = strategy.toBytes(objectToWrite); ++numWritten; valuesOut.write(Ints.toByteArray(bytesToWrite.length)); valuesOut.write(bytesToWrite); if (!requireMultipleFiles) { writeIntValueToOutputStream(buf, Ints.checkedCast(valuesOut.getCount()), headerOut); } else { writeLongValueToOutputStream(buf, valuesOut.getCount(), headerOutLong); } if (!requireMultipleFiles && getSerializedSize() > fileSizeLimit) { requireMultipleFiles = true; initializeHeaderOutLong(); buf = ByteBuffer.allocate(Longs.BYTES).order(ByteOrder.nativeOrder()); } prevObject = objectToWrite; }
Source:
<code>private boolean toggleChild(TableRow row, Question rowQuestion, Question childQuestion) { if (childQuestion.getId_question().equals(rowQuestion.getId_question())) { Survey survey = SurveyFragmentStrategy.getSessionSurveyByQuestion(rowQuestion); if (rowQuestion.isHiddenBySurveyAndHeader(survey)) { row.clearFocus(); row.setVisibility(View.GONE); ((CommonQuestionView) row.getChildAt(0)).setActive(false); <START> Object inputView = ((AKeyboardQuestionView) row.getChildAt(0)).getInputView(); <END> Validation.getInstance().removeInputError(inputView); hideDefaultValue(rowQuestion); } else { row.setVisibility(View.VISIBLE); ((CommonQuestionView) row.getChildAt(0)).setActive(true); Object inputView = ((AKeyboardQuestionView) row.getChildAt(0)).getInputView(); Validation.getInstance().addInput(inputView); showDefaultValue(row, rowQuestion); } return true; } return false; }</code><technical_language>I dont't this code, if a question is active remove input error, this responsibility is of questionview dynamictabadapter</technical_language>

Target:
private boolean toggleChild(TableRow row, Question rowQuestion, Question childQuestion) { if (childQuestion.getId_question().equals(rowQuestion.getId_question())) { Survey survey = SurveyFragmentStrategy.getSessionSurveyByQuestion(rowQuestion); if (rowQuestion.isHiddenBySurveyAndHeader(survey)) { row.clearFocus(); row.setVisibility(View.GONE); ((CommonQuestionView) row.getChildAt(0)).deactivateQuestion(); hideDefaultValue(rowQuestion); } else { row.setVisibility(View.VISIBLE); ((CommonQuestionView) row.getChildAt(0)).activateQuestion(); showDefaultValue(row, rowQuestion); } return true; } return false; }
Source:
<code>public void receiveHeader(PacketLineIn pckIn) throws IOException { try { <START> String s = pckIn.readStringRaw(); <END> if (!s.startsWith(VERSION)) throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "expected push certificate version")); String version = s.substring(VERSION.length()); if (!version.equals("0.1\n")) { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "version not supported")); } pusher = parseNextLine(pckIn, PUSHER, "expected pusher"); pushee = parseNextLine(pckIn, PUSHEE, "expected pushee"); receivedNonce = parseNextLine(pckIn, NONCE, "expected nonce"); parseNextLine(pckIn, "\n", "expected new line"); } catch (EOFException eof) { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "broken push certificate Header")); } nonceStatus = nonceGenerator.verify(receivedNonce, sentNonce, seed, db, nonceSlopLimit); }</code><technical_language>readString() for version ignore LF</technical_language>

Target:
public void receiveHeader(PacketLineIn pckIn) throws IOException { try { String s = pckIn.readString(); String version = parseNextLine(pckIn, VERSION); if (!version.equals("0.1")) { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "version not supported")); } pusher = parseNextLine(pckIn, PUSHER); pushee = parseNextLine(pckIn, PUSHEE); receivedNonce = parseNextLine(pckIn, NONCE); if (pckIn.readString() != "") { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "expected empty line after header")); } } catch (EOFException eof) { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "broken push certificate Header")); } nonceStatus = nonceGenerator.verify(receivedNonce, sentNonce, seed, db, nonceSlopLimit); }
Source:
<code>public void shouldFailUpdatePasswordContainsOnlyDigits() throws Exception { final User user = createUser(); final String newPassword = "12345678"; final Map<String, List<String>> headers = new HashMap<>(); headers.put("Content-Type", singletonList("application/x-www-form-urlencoded")); final ContainerResponse response = launcher.service("POST", SERVICE_PATH + "/password", BASE_URI, headers, ("password=" + newPassword).getBytes(), null, environmentContext); assertEquals(response.getStatus(), CONFLICT.getStatusCode()); <START> verify(userDao, times(0)).update(user.withPassword(newPassword)); <END> }</code><technical_language><code>never()</code> instead of <code>times(0)</code></technical_language>

Target:
public void shouldFailUpdatePasswordContainsOnlyDigits() throws Exception { final User user = createUser(); final String newPassword = "12345678"; final Map<String, List<String>> headers = new HashMap<>(); headers.put("Content-Type", singletonList("application/x-www-form-urlencoded")); final ContainerResponse response = launcher.service("POST", SERVICE_PATH + "/password", BASE_URI, headers, ("password=" + newPassword).getBytes(), null, environmentContext); assertEquals(response.getStatus(), CONFLICT.getStatusCode()); verify(userDao, never()).update(user.withPassword(newPassword)); }
Source:
<code>public PlanNode visitUnion(UnionNode node, RewriteContext<Void> context) { <START> return new UnionNode(node.getId(), rewriteSources(node, context).build(), fromListMultimap(canonicalizeSetOperationVariableMap(toListMultimap(node.getVariableMapping())))); <END> }</code><technical_language>Instead of convert back/forth, update canonicalizeSetOperationVariableMap return Map<VariableReferenceExpression, List<VariableReferenceExpression>></technical_language>

Target:
public PlanNode visitUnion(UnionNode node, RewriteContext<Void> context) { return new UnionNode(node.getId(), rewriteSources(node, context).build(), canonicalizeSetOperationOutputVariables(node.getOutputVariables()), canonicalizeSetOperationVariableMap(node.getVariableMapping())); }
Source:
<code><START> public Element( <END> final String name, final String type, final String componentType, final ImmutableList<Ds3Annotation> annotations) { this.name = name; this.type = type; this.componentType = componentType; this.annotations = annotations; }</code><technical_language>This class responsibilities in it. in addition a model, knowledge displayed in generated code. Split responsibilities out</technical_language>

Target:
public Element( final String name, final String type, final String componentType, final ImmutableList<Ds3Annotation> annotations) { this.name = name; this.type = type; this.componentType = componentType; this.annotations = annotations; this.elementHelper = ElementHelper.getInstance(); }
Source:
<code>protected void ExecuteVdsBrokerCommand() { _result = null; if (getParameters().getStoragePoolId() != null) { HashSet<Version> hostVersions = null; VDS vds = DbFacade.getInstance().getVdsDao().get(getParameters().getVdsId()); Version clusterCompatibility = vds.getVdsGroupCompatibilityVersion(); <START> hostVersions = vds.getSupportedClusterVersionsSet(); <END> if (FeatureSupported.improvedGetAllTasks(clusterCompatibility) && (hostVersions != null) && hostVersions.contains(clusterCompatibility)) { _result = getBroker().getAllTasksInfo(getParameters().getStoragePoolId().toString()); } } if (_result == null) { _result = getBroker().getAllTasksInfo(); } ProceedProxyReturnValue(); setReturnValue(ParseTaskInfoList(_result.TaskInfoList)); }</code><technical_language>1. do need this? if host is in cluster..it means supported, not? 2. check storage pool version? do want behaviour pool hosts</technical_language>

Target:
protected void ExecuteVdsBrokerCommand() { _result = null; if (getParameters().getStoragePoolId() != null) { VDS vds = DbFacade.getInstance().getVdsDao().get(getParameters().getVdsId()); if (FeatureSupported.saferGetAllTasksRequest(vds.getVdsGroupCompatibilityVersion())) { _result = getBroker().getAllTasksInfo(getParameters().getStoragePoolId().toString()); } } if (_result == null) { _result = getBroker().getAllTasksInfo(); } ProceedProxyReturnValue(); setReturnValue(ParseTaskInfoList(_result.TaskInfoList)); }
Source:
<code>public void processTimer(ComputationContext context, String key, long timestamp) { KeyValueStore kvStore = Framework.getService(KeyValueService.class).getKeyValueStore(BULK_KV_STORE_NAME); List<BulkStatus> statuses = new ArrayList<>(); counters.forEach((commandId, processedDocs) -> { BulkStatus status = BulkCodecs.getBulkStatusCodec().decode(kvStore.get(commandId + STATUS)); Long previousProcessedDocs = status.getProcessed(); if (previousProcessedDocs == null) { <START> previousProcessedDocs = 0L; <END> } Long currentProcessedDocs = previousProcessedDocs + processedDocs; if (status.getCount() != null && currentProcessedDocs.longValue() == status.getCount().longValue()) { status.setState(COMPLETED); } status.setProcessed(currentProcessedDocs); statuses.add(status); }); statuses.forEach(status -> context.produceRecord(KVWRITER_STREAM_NAME, key, BulkCodecs.getBulkStatusCodec().encode(status))); counters.clear(); context.askForCheckpoint(); context.setTimer("counter", System.currentTimeMillis() + counterThresholdMs); }</code><technical_language>design condition is false</technical_language>

Target:
public void processTimer(ComputationContext context, String key, long timestamp) { if (!counters.isEmpty()) { KeyValueStore kvStore = Framework.getService(KeyValueService.class) .getKeyValueStore(BULK_KV_STORE_NAME); counters.entrySet() .stream() .map(entry -> getStatusAndUpdate(kvStore, entry.getKey(), entry.getValue())) .map(BulkCodecs.getBulkStatusCodec()::encode) .forEach(status -> context.produceRecord(KVWRITER_STREAM_NAME, key, status)); counters.clear(); context.askForCheckpoint(); } context.setTimer("counter", System.currentTimeMillis() + counterThresholdMs); }
Source:
<code>public void safeExecute(Shell shell) { viewModel = new DeleteComponentsViewModel(SERVER.getDependenciesModel().getDependencies()); MultipleConfigsSelectionDialog dialog = new DeleteComponentsDialog(shell, SERVER.componentsInfo().getValue(), viewModel.getDependencies().keySet()); if (dialog.open() == Window.OK) { Map <String, Boolean> compNamesWithFlags = SERVER.compNamesWithFlags(); Collection<String> toDelete = dialog.selectedConfigs(); Map<String, Collection<String>> selectedDependencies = viewModel.filterSelected(toDelete); if (selectedDependencies.isEmpty()) { configService.uncheckedWrite(toDelete); } else { displayWarning(selectedDependencies, shell); safeExecute(shell); } try { if (!ManagerModeModel.getInstance().isInManagerMode()) { for (String item: dialog.selectedConfigs()) { if (compNamesWithFlags.get(item)) { <START> dispalyError(shell); <END> break; } } } } catch (ManagerModePvNotConnectedException e) { MessageDialog error = new MessageDialog(shell, "Error", null, e.getMessage(), MessageDialog.ERROR, new String[] {"OK"},0); error.open(); } } }</code><technical_language>Spelling incorrect</technical_language>

Target:
public void safeExecute(Shell shell) { viewModel = new DeleteComponentsViewModel(SERVER.getDependenciesModel().getDependencies()); Map <String, Boolean> compNamesWithFlags = SERVER.compNamesWithFlags(); MultipleConfigsSelectionDialog dialog = new DeleteComponentsDialog(shell, SERVER.componentsInfo().getValue(), viewModel.getDependencies().keySet(), compNamesWithFlags); if (dialog.open() == Window.OK) { Collection<String> toDelete = dialog.selectedConfigs(); Map<String, Collection<String>> selectedDependencies = viewModel.filterSelected(toDelete); try { if (selectedDependencies.isEmpty()) { configService.write(toDelete); } else { displayWarning(selectedDependencies, shell); safeExecute(shell); } if (!ManagerModeModel.getInstance().isInManagerMode()) { for (String item: dialog.selectedConfigs()) { if (compNamesWithFlags.get(item)) { displayError(shell); break; } } } } catch (ManagerModePvNotConnectedException|IOException e) { MessageDialog error = new MessageDialog(shell, "Error", null, e.getMessage(), MessageDialog.ERROR, new String[] {"OK"},0); error.open(); } } }
Source:
<code><START> private Action getFindAction() { <END> if (findAction == null) { findAction = new AbstractAction("findAction") { private static final long serialVersionUID = 8365172573382425660L; @Override public void actionPerformed(ActionEvent e) { Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); if (focusOwner instanceof JTextComponent) { FindDialog findDialog = new FindDialog(SwingUtilities.getWindowAncestor(focusOwner), false); findDialog.setLastInvoker((JTextComponent) focusOwner); findDialog.setVisible(true); } } }; } return findAction; }</code><technical_language>added static modifier</technical_language>

Target:
private static Action getFindAction() { if (findAction == null) { findAction = new AbstractAction("findAction") { private static final long serialVersionUID = 8365172573382425660L; @Override public void actionPerformed(ActionEvent e) { Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); if (focusOwner instanceof JTextComponent) { FindDialog findDialog = new FindDialog(SwingUtilities.getWindowAncestor(focusOwner), false); findDialog.setLastInvoker((JTextComponent) focusOwner); findDialog.setVisible(true); } } }; } return findAction; }
Source:
<code>public GrillSessionImpl getSession(GrillSessionHandle sessionHandle) { try { return ((GrillSessionImpl)getSessionManager().getSession(getHiveSessionHandle(sessionHandle))); } catch (HiveSQLException exc) { <START> LOG.warn("Session not found", exc); <END> throw new NotFoundException("Session not found " + sessionHandle); } }</code><technical_language>add session handle log</technical_language>

Target:
public GrillSessionImpl getSession(GrillSessionHandle sessionHandle) { try { return ((GrillSessionImpl)getSessionManager().getSession(getHiveSessionHandle(sessionHandle))); } catch (HiveSQLException exc) { LOG.warn("Session " + sessionHandle.getPublicId() + " not found", exc); throw new NotFoundException("Session " + sessionHandle.getPublicId() + " not found " + sessionHandle); } }
Source:
<code>private void registerMetrics(GenericObjectPool<CassandraClient> pool) { registerPoolMetric("meanActiveTimeMillis", pool::getMeanActiveTimeMillis); registerPoolMetric("meanIdleTimeMillis", pool::getMeanIdleTimeMillis); registerPoolMetric("meanBorrowWaitTimeMillis", pool::getMeanBorrowWaitTimeMillis); registerPoolMetric("numIdle", pool::getNumIdle); <START> registerPoolMetric("numActive", pool::getNumActive); <END> registerPoolMetric("created", pool::getCreatedCount); registerPoolMetric("destroyedByEvictor", pool::getDestroyedByEvictorCount); }</code><technical_language>I this is a good change. wondering if basically metrics in memory filtering infra report outliers? report set of metrics for pools</technical_language>

Target:
private void registerMetrics(GenericObjectPool<CassandraClient> pool) { registerPoolMetric("meanActiveTimeMillis", pool::getMeanActiveTimeMillis); registerPoolMetric("numIdle", pool::getNumIdle); registerPoolMetric("numActive", pool::getNumActive); registerPoolMetric("created", pool::getCreatedCount); registerPoolMetric("destroyedByEvictor", pool::getDestroyedByEvictorCount); }