auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> public void shouldShowMyResourcesAndRemoveShares() { <END> final int row = 2; myResourcesPage.clickExpandButton(row); assertEquals("Resource is shared with alice.", myResourcesPage.getSharedWith(row)); myResourcesPage.clickRemoveButton(row); myResourcesPage.clickExpandButton(row); myResourcesPage.alert().assertSuccess(); assertEquals("This resource is not shared.", myResourcesPage.getSharedWith(row)); }</code><technical_language>test collapsing works well</technical_language>

Target:
public void shouldShowMyResourcesAndRemoveShares() { final int row = 2; myResourcesPage.clickExpandButton(row); testModalDialog(() -> myResourcesPage.clickRemoveButton(row), () -> assertEquals("Resource is shared with alice.", myResourcesPage.getSharedWith(row))); myResourcesPage.alert().assertSuccess(); assertEquals("This resource is not shared.", myResourcesPage.getSharedWith(row)); }
Source:
<code>protected URI rewriteURI(HttpServletRequest request) { final StringBuilder uri = new StringBuilder(request.getScheme()); uri.append("://"); uri.append(selector.pick().getHost()); uri.append(request.getRequestURI()); final String queryString = request.getQueryString(); if (queryString != null) { uri.append("?").append(queryString); } <START> return URI.create(uri.toString()); <END> }</code><technical_language>new URI(scheme, host, path, query, null) more clear</technical_language>

Target:
protected URI rewriteURI(HttpServletRequest request) { try { final Server indexer = selector.pick(); if (indexer == null) { throw new ISE("Cannot find instance of indexingService"); } return new URI( request.getScheme(), indexer.getHost(), request.getRequestURI(), request.getQueryString(), null ); } catch (URISyntaxException e) { throw Throwables.propagate(e); } }
Source:
<code>public BasePostsCreator startPostCreationWith(String description) { <START> click() <END> .closeGuidelinesMessage() .addTitleWith(TextGenerator.defaultText()) .addDescriptionWith(description) .clickAddCategoryButton() .selectFirstCategory(); return this; }</code><technical_language>tbh, this java startPostCreationWithoutText() .addDescriptionWith(description)</technical_language>

Target:
public BasePostsCreator startPostCreationWith(String description) { startPostCreationWithoutDescription() .addDescriptionWith(description); return this; }
Source:
<code><START> public Serializable toPersistedValue(@Nullable Object columnValue) { <END> if (columnValue == null) { return null; } checkTypeMatches(columnValue); return valuePersistor.toPersistedValue(columnValue); }</code><technical_language>need additionally explain argument null sense return null in this case well</technical_language>

Target:
public Serializable toPersistedValue(@Nullable Object columnValue) { if (columnValue == null) { return null; } checkTypeMatches(columnValue); return valueConverter.convert(columnValue); }
Source:
<code>private OrcBatchRecordReader createRecordReader() throws IOException { OrcDataSource dataSource = new FileOrcDataSource(orcFile, new DataSize(1, MEGABYTE), new DataSize(1, MEGABYTE), new DataSize(1, MEGABYTE), true); OrcReader orcReader = new OrcReader( dataSource, ORC, new StorageOrcFileTailSource(), new StorageStripeMetadataSource(), OrcReaderTestingUtils.createDefaultTestConfig(), <START> new HiveFileContext(false, Optional.empty())); <END> return orcReader.createBatchRecordReader( ImmutableMap.of(0, type), OrcPredicate.TRUE, UTC, newSimpleAggregatedMemoryContext(), INITIAL_BATCH_SIZE); }</code><technical_language>DEFAULT_HIVE_FILE_CONTEXT</technical_language>

Target:
private OrcBatchRecordReader createRecordReader() throws IOException { OrcDataSource dataSource = new FileOrcDataSource(orcFile, new DataSize(1, MEGABYTE), new DataSize(1, MEGABYTE), new DataSize(1, MEGABYTE), true); OrcReader orcReader = new OrcReader( dataSource, ORC, new StorageOrcFileTailSource(), new StorageStripeMetadataSource(), OrcReaderTestingUtils.createDefaultTestConfig(), DEFAULT_HIVE_FILE_CONTEXT); return orcReader.createBatchRecordReader( ImmutableMap.of(0, type), OrcPredicate.TRUE, UTC, newSimpleAggregatedMemoryContext(), INITIAL_BATCH_SIZE); }
Source:
<code>protected AbstractSegmentStoreTableViewer createSegmentStoreTableViewer(Composite parent) { return new FunctionTableViewer(new TableViewer(parent, SWT.FULL_SELECTION | SWT.VIRTUAL), getViewSite().getSecondaryId()) { @Override protected void createProviderColumns() { super.createProviderColumns(); Table t = (Table) getControl(); moveColumnTo(t, SegmentDurationAspect.SEGMENT_DURATION_ASPECT.getName(), 0); moveColumnTo(t, SegmentStartTimeAspect.SEGMENT_START_TIME_ASPECT.getName(), 1); moveColumnTo(t, SegmentEndTimeAspect.SEGMENT_END_TIME_ASPECT.getName(), 2); } private void moveColumnTo(Table t, String aspectName, int desiredIndex) { int[] order = t.getColumnOrder(); int foundIndex = -1; <START> for(int i = 0 ; i < t.getColumnCount(); i++) { <END> TableColumn col = t.getColumn(i); if(col.getText().equals(aspectName)) { foundIndex = i; } } int tmp = order[desiredIndex]; order[desiredIndex] = order[foundIndex]; order[foundIndex] = tmp; t.setColumnOrder(order); } }; }</code><technical_language>missing white space</technical_language>

Target:
protected AbstractSegmentStoreTableViewer createSegmentStoreTableViewer(Composite parent) { return new FunctionTableViewer(new TableViewer(parent, SWT.FULL_SELECTION | SWT.VIRTUAL), getViewSite().getSecondaryId()) { @Override protected void createProviderColumns() { super.createProviderColumns(); Table t = (Table) getControl(); moveColumnTo(t, SegmentDurationAspect.SEGMENT_DURATION_ASPECT.getName(), 0); moveColumnTo(t, SegmentStartTimeAspect.SEGMENT_START_TIME_ASPECT.getName(), 1); moveColumnTo(t, SegmentEndTimeAspect.SEGMENT_END_TIME_ASPECT.getName(), 2); } private void moveColumnTo(Table t, String aspectName, int desiredIndex) { int[] order = t.getColumnOrder(); int foundIndex = -1; for (int i = 0 ; i < t.getColumnCount(); i++) { TableColumn col = t.getColumn(i); if(col.getText().equals(aspectName)) { foundIndex = i; } } if (index == -1) { return; } int tmp = order[desiredIndex]; order[desiredIndex] = order[foundIndex]; order[foundIndex] = tmp; t.setColumnOrder(order); } }; }
Source:
<code>private void handle(HttpServletRequest req, HttpServletResponse res) throws IOException { try { Tokens tokens = controller.handle(req); TokenAuthentication tokenAuth = new TokenAuthentication(JWT.decode(tokens.getIdToken())); Authentication authentication = GoogleAccountsAuthenticationProvider.getAuthentication( false, new UserDao(), tokenAuth, tokenAuth.getClaims().get("email").asString(), tokenAuth.getClaims().get("nickname").asString() ); SecurityContextHolder.getContext().setAuthentication(authentication); res.sendRedirect(redirectOnSuccess); } catch (AuthenticationException | IdentityVerificationException e) { String errorDescriptionId = "error_description"; String errorDescription= req.getParameter(errorDescriptionId); <START> log.log(Level.SEVERE, errorDescriptionId+": "+errorDescription+" Error Message: "+e.getMessage()); <END> SecurityContextHolder.clearContext(); if(errorDescription != null){ res.sendRedirect(redirectOnFail+"?errorCode="+errorDescription); }else{ res.sendRedirect(redirectOnFail); } } }</code><technical_language>Do log SEVERE in case of EMAIL_VERIFIED_ERROR. is expected a lot of noise. Log INFO for this case. Leave SEVERE for other cases</technical_language>

Target:
private void handle(HttpServletRequest req, HttpServletResponse res) throws IOException { try { Tokens tokens = controller.handle(req); TokenAuthentication tokenAuth = new TokenAuthentication(JWT.decode(tokens.getIdToken())); Authentication authentication = GoogleAccountsAuthenticationProvider.getAuthentication( false, new UserDao(), tokenAuth, tokenAuth.getClaims().get("email").asString(), tokenAuth.getClaims().get("nickname").asString() ); SecurityContextHolder.getContext().setAuthentication(authentication); res.sendRedirect(redirectOnSuccess); } catch (AuthenticationException | IdentityVerificationException e) { String errorDescriptionId = "error_description"; String errorDescription = req.getParameter(errorDescriptionId); log.log(getLogLevel(errorDescription), errorDescriptionId + ": " + errorDescription + " Error Message: " + e.getMessage()); SecurityContextHolder.clearContext(); res.sendRedirect(redirectOnFail + "?errorCode=" + errorDescription); } }
Source:
<code>public boolean isJobExecutionComplete() { return execution != null && execution.getStatus().compareTo(BatchStatus.COMPLETED) == 0 && execution.getExitStatus().compareTo(ExitStatus.COMPLETED) == 0; <START> } <END></code><technical_language>I remember if do this a bit more clear: java public boolean isJobExecutionComplete() { return BatchStatus.COMPLETED.equals(execution.getStatus() && ExitStatus.COMPLETED.equals(execution.getExitStatus()); }</technical_language>

Target:
public boolean isJobExecutionComplete() { return execution != null && execution.getStatus().equals(BatchStatus.COMPLETED) && execution.getExitStatus().compareTo(ExitStatus.COMPLETED) == 0; }
Source:
<code>public Trace getTraceFragment(String tenantId, String id) { Span span = getSpan(tenantId, id); Trace trace = spanToTrace(span); LinkedList<Node> nodes = recursiveTraceFragment(tenantId, id); <START> nodes.push(spanToNode(span)); <END> trace.setNodes(nodes); return trace; }</code><technical_language>result of 'spanToNode(span)' added a node trace. list 'nodes' set node list node returned spanToNode</technical_language>

Target:
public Trace getTraceFragment(String tenantId, String id) { Span span = getSpan(tenantId, id); if (span == null) { return null; } InteractionNode interactionNode = spanToNode(span); interactionNode.setNodes(recursiveTraceFragment(tenantId, span)); Trace trace = spanToTrace(span); trace.getNodes().add(interactionNode); return trace; }
Source:
<code>public LargestSeriesProductCalculator(String inputNumber) { throw new UnsupportedOperationException <START> ("Delete this statement and write your own implementation."); <END> }</code><technical_language>This line :)</technical_language>

Target:
LargestSeriesProductCalculator(String inputNumber) { throw new UnsupportedOperationException ("Delete this statement and write your own implementation."); }
Source:
<code>void fun() { int i = nextInt(); Random random = new Random(); byte[] bytes = new byte[20]; random.nextBytes(bytes); double rand1 = Math.random(); double abs = Math.abs(12); int rand2 = ThreadLocalRandom.current().nextInt(); JVMRandom jvmRandom = new JVMRandom(); <START> double rand3 = jvmRandom.nextDouble(); END> RandomUtils randomUtils = new RandomUtils(); float rand4 = randomUtils.nextFloat(); float rand5 = RandomUtils.nextFloat(); org.apache.commons.lang3.RandomUtils randomUtils2 = new org.apache.commons.lang3.RandomUtils(); float rand6 = randomUtils2.nextFloat(); float rand7 = org.apache.commons.lang3.RandomUtils.nextFloat(); RandomStringUtils randomStringUtils = new RandomStringUtils(); String rand8 = randomStringUtils.random(1); String rand9 = RandomStringUtils.random(1); org.apache.commons.lang3.RandomStringUtils randomStringUtils2 = new org.apache.commons.lang3.RandomStringUtils(); String rand10 = randomStringUtils.random(1); String rand11 = org.apache.commons.lang3.RandomStringUtils.random(1); }</code><technical_language>report 1 issue 2. For class statically "on method invocation" (ex: Math.random(), RandomUtils.nextFloat()) Otherwise, "on new class" (ex: new Random(), new JVMRandom())</technical_language>

Target:
void fun() { int i = nextInt(); Random random = new Random(); byte[] bytes = new byte[20]; random.nextBytes(bytes); JVMRandom jvmRandom = new JVMRandom(); double rand3 = jvmRandom.nextDouble(); double rand1 = Math.random(); double abs = Math.abs(12); int rand2 = ThreadLocalRandom.current().nextInt(); RandomUtils randomUtils = new RandomUtils(); float rand4 = randomUtils.nextFloat(); float rand5 = RandomUtils.nextFloat(); org.apache.commons.lang3.RandomUtils randomUtils2 = new org.apache.commons.lang3.RandomUtils(); float rand6 = randomUtils2.nextFloat(); float rand7 = org.apache.commons.lang3.RandomUtils.nextFloat(); RandomStringUtils randomStringUtils = new RandomStringUtils(); String rand8 = randomStringUtils.random(1); String rand9 = RandomStringUtils.random(1); org.apache.commons.lang3.RandomStringUtils randomStringUtils2 = new org.apache.commons.lang3.RandomStringUtils(); String rand10 = randomStringUtils.random(1); String rand11 = org.apache.commons.lang3.RandomStringUtils.random(1); }
Source:
<code>private void logFailureResponseObject(MockHttpException httpEx, String url, long callDelay) { LogLevel logLevel = restAdapter.logLevel; RestAdapter.Log log = restAdapter.log; if (logLevel.log()) { log.log(String.format("<--- MOCK %s %s (%sms)", httpEx.code, url, callDelay)); if (logLevel.ordinal() >= LogLevel.FULL.ordinal()) { <START> log.log(httpEx.responseBody + ""); END> log.log("<--- END MOCK"); } } }</code><technical_language>String.valueOf</technical_language>

Target:
private void logFailureResponseObject(MockHttpException httpEx, String url, long callDelay) { LogLevel logLevel = restAdapter.logLevel; RestAdapter.Log log = restAdapter.log; if (logLevel.log()) { log.log(String.format("<--- MOCK %s %s (%sms)", httpEx.code, url, callDelay)); if (logLevel.ordinal() >= LogLevel.FULL.ordinal()) { log.log(String.valueOf(httpEx.responseBody)); log.log("<--- END MOCK"); } } }
Source:
<code>public void matchWildcardIdentifier() { <START> ErrorType wildcardErrorType = ErrorTypeBuilder.builder().namespace(CORE_NAMESPACE_NAME).identifier(WILDCARD_TOKEN) <END> .parentErrorType(transformationErrorType).build(); ErrorType test1ErrorType = ErrorTypeBuilder.builder().namespace(CORE_NAMESPACE_NAME).identifier("test1") .parentErrorType(transformationErrorType).build(); ErrorType test2ErrorType = ErrorTypeBuilder.builder().namespace(CORE_NAMESPACE_NAME).identifier("test2") .parentErrorType(transformationErrorType).build(); ErrorType test3ErrorType = ErrorTypeBuilder.builder().namespace("unknown").identifier("test3").parentErrorType(transformationErrorType).build(); ErrorTypeMatcher wildcardMatcher = new WildcardErrorTypeMatcher(wildcardErrorType); assertThat(wildcardMatcher.match(test1ErrorType), is(true)); assertThat(wildcardMatcher.match(test2ErrorType), is(true)); assertThat(wildcardMatcher.match(test3ErrorType), is(false)); }</code><technical_language>This mixes matching typing together. Error types represent actual errors occur, collected restricted, guaranteeing throw error declared catch a existent error</technical_language>

Target:
public void matchWildcardIdentifier() { ComponentIdentifier wildcardErrorType = buildFromStringRepresentation(CORE_NAMESPACE_NAME + ":" + WILDCARD_TOKEN); ErrorType test1ErrorType = ErrorTypeBuilder.builder().namespace(CORE_NAMESPACE_NAME).identifier("test1") .parentErrorType(transformationErrorType).build(); ErrorType test2ErrorType = ErrorTypeBuilder.builder().namespace(CORE_NAMESPACE_NAME).identifier("test2") .parentErrorType(transformationErrorType).build(); ErrorTypeMatcher wildcardMatcher = new WildcardErrorTypeMatcher(wildcardErrorType); assertThat(wildcardMatcher.match(test1ErrorType), is(true)); assertThat(wildcardMatcher.match(test2ErrorType), is(true)); }
Source:
<code>public void testCreateReadDelete() throws Exception { DocumentModel userModel = userManager.getBareUserModel(); String schemaName = userManager.getUserSchemaName(); userModel.setProperty(schemaName, "username", "Foo"); userModel = userManager.createUser(userModel); DocumentModel folder = systemSession.createDocumentModel("/", "folder", "Folder"); folder = systemSession.createDocument(folder); DocumentModel doc = systemSession.createDocumentModel("/folder/", "TestFile", "File"); doc = systemSession.createDocument(doc); ACP acp = doc.getACP(); ACE grantRead = new ACE("Foo", SecurityConstants.READ, true); acp.addACE(ACL.LOCAL_ACL, grantRead); doc.setACP(acp, true); try (CoreSession userSession = coreFeature.openCoreSession("Foo")) { DocumentModel userDoc = userSession.getDocument(doc.getRef()); DocumentModel comment = userSession.createDocumentModel(CommentsConstants.COMMENT_DOC_TYPE); comment.setProperty("comment", "text", "This is my comment"); commentManager.createComment(userDoc, comment); <START> List<DocumentModel> dml = systemSession.query("SELECT * FROM " + CommentsConstants.COMMENT_DOC_TYPE); <END> assertEquals(1, dml.size()); dml = userSession.query("SELECT * FROM " + CommentsConstants.COMMENT_DOC_TYPE); assertEquals(0, dml.size()); List<DocumentModel> comments = commentManager.getComments(userDoc); assertEquals(1, comments.size()); commentManager.deleteComment(userDoc, comments.get(0)); comments = commentManager.getComments(userDoc); assertEquals(0, comments.size()); } }</code><technical_language>This query a constant 2 times</technical_language>

Target:
public void testCreateReadDelete() { DocumentModel userModel = userManager.getBareUserModel(); String schemaName = userManager.getUserSchemaName(); userModel.setProperty(schemaName, "username", USERNAME); DocumentModel folder = systemSession.createDocumentModel("/", "folder", "Folder"); systemSession.createDocument(folder); DocumentModel doc = systemSession.createDocumentModel("/folder/", "TestFile", "File"); doc = systemSession.createDocument(doc); ACP acp = doc.getACP(); ACE grantRead = new ACE(USERNAME, SecurityConstants.READ, true); acp.addACE(ACL.LOCAL_ACL, grantRead); doc.setACP(acp, true); try (CoreSession userSession = coreFeature.openCoreSession(USERNAME)) { DocumentModel userDoc = userSession.getDocument(doc.getRef()); DocumentModel comment = userSession.createDocumentModel(CommentsConstants.COMMENT_DOC_TYPE); comment.setPropertyValue(COMMENT_CONTENT_PROPERTY_XPATH, COMMENT_CONTENT); commentManager.createComment(userDoc, comment); List<DocumentModel> dml = systemSession.query(QUERY_COMMENTS_AS_DOCUMENTS); assertEquals(1, dml.size()); dml = userSession.query(QUERY_COMMENTS_AS_DOCUMENTS); assertEquals(0, dml.size()); List<DocumentModel> comments = commentManager.getComments(userDoc); assertEquals(1, comments.size()); assertEquals(COMMENT_CONTENT, comments.get(0).getPropertyValue(COMMENT_CONTENT_PROPERTY_XPATH)); commentManager.deleteComment(userDoc, comments.get(0)); comments = commentManager.getComments(userDoc); assertEquals(0, comments.size()); } }
Source:
<code>protected void release(boolean wait, boolean writer) { final int refCount = this.refCount.decrementAndGet(); if (canEvict(refCount, writer)) { assert (next != null); final Runnable storer = getStorer(data, readingOffset, writingOffset, storage); if (future != null && future.cancel(false)) { logger.debug("Block future is cancelled", this); } final int numberOfInMemBlockPermits = DataList.this.numberOfInMemBlockPermits.get(); if (wait && numberOfInMemBlockPermits == 0) { future = null; storer.run(); } else if (numberOfInMemBlockPermits < MAX_COUNT_OF_INMEM_BLOCKS / 2) { future = storageExecutor.submit(storer); } else { future = null; } } else if (storage == null) { <START> resumeSuspendedClients(-1); <END> } }</code><technical_language>is call necessary? do other debug logging. If is needed, pass actual number of blocks in memory? part of canEvict</technical_language>

Target:
protected void release(boolean wait, boolean writer) { final int refCount = this.refCount.decrementAndGet(); if (canEvict(refCount, writer)) { assert (next != null); if (storage != null) { evictBlock(wait); } else { if (!isPublisherAheadByMax()) { resumeSuspendedClients(); } } } }
Source:
<code>public void testPollAndResponseHandling() throws Exception { NonBlockingRouter.currentOperationsCount.incrementAndGet(); GetBlobInfoOperation op = new GetBlobInfoOperation(routerConfig, routerMetrics, mockClusterMap, responseHandler, blobIdStr, options, null, routerCallback, kms, cryptoService, cryptoJobHandler, time); ArrayList<RequestInfo> requestListToFill = new ArrayList<>(); requestRegistrationCallback.requestListToFill = requestListToFill; op.poll(requestRegistrationCallback); Assert.assertEquals("There should only be as many requests at this point as requestParallelism", requestParallelism, correlationIdToGetOperation.size()); List<ResponseInfo> responses = sendAndWaitForResponses(requestListToFill); for (ResponseInfo responseInfo : responses) { GetResponse getResponse = responseInfo.getError() == null ? GetResponse.readFrom( new DataInputStream(new ByteBufferInputStream(responseInfo.getResponse())), mockClusterMap) : null; op.handleResponse(responseInfo, getResponse); if (op.isOperationComplete()) { break; } } if (testEncryption) { int timeout = 1000; int timeSoFar = 0; while (timeSoFar < timeout && !op.isOperationComplete()) { op.poll(requestRegistrationCallback); <START> Thread.sleep(10); <END> timeSoFar += 10; } } Assert.assertTrue("Operation should be complete at this time", op.isOperationComplete()); assertSuccess(op); }</code><technical_language>is deterministic of this</technical_language>

Target:
public void testPollAndResponseHandling() throws Exception { NonBlockingRouter.currentOperationsCount.incrementAndGet(); GetBlobInfoOperation op = new GetBlobInfoOperation(routerConfig, routerMetrics, mockClusterMap, responseHandler, blobIdStr, options, null, routerCallback, kms, cryptoService, cryptoJobHandler, time); ArrayList<RequestInfo> requestListToFill = new ArrayList<>(); requestRegistrationCallback.requestListToFill = requestListToFill; op.poll(requestRegistrationCallback); Assert.assertEquals("There should only be as many requests at this point as requestParallelism", requestParallelism, correlationIdToGetOperation.size()); CountDownLatch onPollLatch = new CountDownLatch(1); if (testEncryption) { routerCallback.setOnPollLatch(onPollLatch); } List<ResponseInfo> responses = sendAndWaitForResponses(requestListToFill); for (ResponseInfo responseInfo : responses) { GetResponse getResponse = responseInfo.getError() == null ? GetResponse.readFrom( new DataInputStream(new ByteBufferInputStream(responseInfo.getResponse())), mockClusterMap) : null; op.handleResponse(responseInfo, getResponse); if (op.isOperationComplete()) { break; } } if (testEncryption) { Assert.assertTrue("Latch should have been zeroed ", onPollLatch.await(500, TimeUnit.MILLISECONDS)); op.poll(requestRegistrationCallback); } Assert.assertTrue("Operation should be complete at this time", op.isOperationComplete()); assertSuccess(op); }
Source:
<code>protected void handleError(final Exception e, final String correlationUid, final String organisationIdentification, final String deviceIdentification, final String messageType) { LOGGER.info("handeling error: for message type: {}", e.getMessage(), messageType); OsgpException osgpException = null; if (e instanceof OsgpException) { osgpException = (OsgpException) e; } else { osgpException = new TechnicalException(ComponentType.DOMAIN_TARIFF_SWITCHING, "An unknown error occurred", e); } <START> this.webServiceResponseMessageSender.send(ResponseMessage.newResponseMessageBuilder() <END> .withCorrelationUid(correlationUid).withOrganisationIdentification(organisationIdentification) .withDeviceIdentification(deviceIdentification).withResult(ResponseMessageResultType.NOT_OK) .withOsgpException(osgpException).withDataObject(e).build()); }</code><technical_language>Extract building of ResponseMessage variable (in eclipse, select text, right-click > refactor > extract local variable / select code + shift+alt+L). This code a bit more readable, especially passing in other besides ResponseMessage</technical_language>

Target:
protected void handleError(final Exception e, final String correlationUid, final String organisationIdentification, final String deviceIdentification, final String messageType) { LOGGER.info("handeling error: for message type: {}", e.getMessage(), messageType); OsgpException osgpException = null; if (e instanceof OsgpException) { osgpException = (OsgpException) e; } else { osgpException = new TechnicalException(ComponentType.DOMAIN_TARIFF_SWITCHING, "An unknown error occurred", e); } ResponseMessage responseMessage = ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(correlationUid).withOrganisationIdentification(organisationIdentification) .withDeviceIdentification(deviceIdentification).withResult(ResponseMessageResultType.NOT_OK) .withOsgpException(osgpException).withDataObject(e).build(); this.webServiceResponseMessageSender.send(responseMessage); }
Source:
<code>private HttpURLConnection connect(final String service) throws TransportException, NotSupportedException { final URL u; try { final StringBuilder b = new StringBuilder(); b.append(baseUrl); if (b.charAt(b.length() - 1) != '/') b.append('/'); b.append(Constants.INFO_REFS); if (useSmartHttp) { b.append(b.indexOf("?") < 0 ? '?' : '&'); b.append("service="); b.append(service); } u = new URL(b.toString()); } catch (MalformedURLException e) { throw new NotSupportedException(MessageFormat.format(JGitText.get().invalidURL, uri), e); } try { final HttpURLConnection conn = httpOpen(u); if (useSmartHttp) { String expType = "application/x-" + service + "-advertisement"; conn.setRequestProperty(HDR_ACCEPT, expType + ", * *"); } final int status = HttpSupport.response(conn); switch (status) { case HttpURLConnection.HTTP_OK: return conn; case HttpURLConnection.HTTP_NOT_FOUND: throw new NoRemoteRepositoryException(uri, MessageFormat.format(JGitText.get().URLNotFound, u)); case HttpURLConnection.HTTP_FORBIDDEN: throw new TransportException(uri, MessageFormat.format(JGitText.get().serviceNotPermitted, service)); default: String err = status + " " + conn.getResponseMessage(); throw new TransportException(uri, err); } } catch (NotSupportedException e) { throw e; } catch (TransportException e) { throw e; } catch (IOException e) { <START> throw new TransportException(uri, MessageFormat.format(JGitText.get().cannotOpen, service), e); <END> } }</code><technical_language>more specific: serviceCannotOpen</technical_language>

Target:
private HttpURLConnection connect(final String service) throws TransportException, NotSupportedException { final URL u; try { final StringBuilder b = new StringBuilder(); b.append(baseUrl); if (b.charAt(b.length() - 1) != '/') b.append('/'); b.append(Constants.INFO_REFS); if (useSmartHttp) { b.append(b.indexOf("?") < 0 ? '?' : '&'); b.append("service="); b.append(service); } u = new URL(b.toString()); } catch (MalformedURLException e) { throw new NotSupportedException(MessageFormat.format(JGitText.get().invalidURL, uri), e); } try { final HttpURLConnection conn = httpOpen(u); if (useSmartHttp) { String expType = "application/x-" + service + "-advertisement"; conn.setRequestProperty(HDR_ACCEPT, expType + ", * *"); } final int status = HttpSupport.response(conn); switch (status) { case HttpURLConnection.HTTP_OK: return conn; case HttpURLConnection.HTTP_NOT_FOUND: throw new NoRemoteRepositoryException(uri, MessageFormat.format(JGitText.get().URLNotFound, u)); case HttpURLConnection.HTTP_FORBIDDEN: throw new TransportException(uri, MessageFormat.format(JGitText.get().serviceNotPermitted, service)); default: String err = status + " " + conn.getResponseMessage(); throw new TransportException(uri, err); } } catch (NotSupportedException e) { throw e; } catch (TransportException e) { throw e; } catch (IOException e) { throw new TransportException(uri, MessageFormat.format(JGitText.get().cannotOpenService, service), e); } }
Source:
<code>public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; <START> PhoenixJson other = (PhoenixJson) obj; <END> if ((this.jsonAsString != null) && (other.jsonAsString != null)) { if (this.jsonAsString.equals(other.jsonAsString)) return true; } if (this.rootNode == null) { if (other.rootNode != null) return false; } else if (!this.rootNode.equals(other.rootNode)) return false; return true; }</code><technical_language>do need compare String JsonNode here? compare JsonNode instead</technical_language>

Target:
public boolean equals(Object obj) { throw new EqualityNotSupportedException(PJson.INSTANCE); }
Source:
<code><START> public synchronized boolean isOpen() { <END> return true; }</code><technical_language>this need synchronized if returns true</technical_language>

Target:
public boolean isOpen() { return true; }
Source:
<code>void testWhenResultEventDataIsNullThenNoUtilizerCallHappens() { AttemptAuditEventResult source = makeMinimalAttemptAuditEventResult(null); underTest.convert(source); <START> verify(mockAuditEventDataUtilizer, times(0)).modifyAuditEventBuilderWithEventData(any(), any()); <END> }</code><technical_language>times(0) -> never() (although cosmetics)</technical_language>

Target:
void testWhenResultEventDataIsNullThenNoUtilizerCallHappens() { AttemptAuditEventResult source = makeMinimalAttemptAuditEventResult(null); underTest.convert(source); verify(mockAttemptAuditEventResultBuilderUpdater, never()).update(any(), any()); }
Source:
<code>public void onRoutingTableChange() { rwlock1.readLock().lock(); try { for (String partitionName : peerLeaderReplicasByPartition.keySet()) { ReplicaId localLeaderReplica = storeManager.getReplica(partitionName); PartitionId partition = localLeaderReplica.getPartitionId(); List<ReplicaId> currentRemoteLeaderReplicas = peerLeaderReplicasByPartition.get(partitionName); <START> List<ReplicaId> updatedRemoteLeaderReplicas = partition.getReplicaIdsByState(ReplicaState.LEADER, null) <END> .stream() .filter(r -> !r.getDataNodeId().getDatacenterName().equals(dataNodeId.getDatacenterName())) .collect(Collectors.toList()); Set<ReplicaId> addedRemoteReplicas = new HashSet<>(updatedRemoteLeaderReplicas); addedRemoteReplicas.removeAll(currentRemoteLeaderReplicas); Set<ReplicaId> removedRemoteReplicas = new HashSet<>(currentRemoteLeaderReplicas); removedRemoteReplicas.removeAll(updatedRemoteLeaderReplicas); for (ReplicaId remoteReplica : addedRemoteReplicas) { logger.info("Adding new remote leader for Partition to replicate from dc {}", getInstanceName(remoteReplica.getDataNodeId().getHostname(), remoteReplica.getDataNodeId().getPort()), partitionName, remoteReplica.getDataNodeId().getDatacenterName()); } List<RemoteReplicaInfo> replicaInfosToRemove = new ArrayList<>(); for (ReplicaId remoteReplica : removedRemoteReplicas) { logger.info("Removing old remote leader for Partition from dc {}", getInstanceName(remoteReplica.getDataNodeId().getHostname(), remoteReplica.getDataNodeId().getPort()), partitionName, remoteReplica.getDataNodeId().getDatacenterName()); } peerLeaderReplicasByPartition.put(partitionName, updatedRemoteLeaderReplicas); } } finally { rwlock1.readLock().unlock(); } }</code><technical_language>I suggest renaming (1)currentRemoteLeaderReplicas previousRemoteLeaderReplicas ; (2) updatedRemoteLeaderReplicas currentRemoteLeaderReplicas</technical_language>

Target:
public void onRoutingTableChange() { try { startupLatch.await(); } catch (InterruptedException e) { logger.warn("Waiting for startup is interrupted."); throw new IllegalStateException( "Replication manager startup is interrupted while handling routing table change"); } partitionLeaderInfo.refreshPeerLeadersForAllPartitions(); }
Source:
<code>public void testLongFixedSizeRangeFieldPartitionerRangePredicate() { final FieldPartitioner<Long, Long> fp = new LongFixedSizeRangeFieldPartitioner("num", 5); Assert.assertEquals(Ranges.closed(-5L, 10L), fp.project(Ranges.open(-2L, 15L))); Assert.assertEquals(Ranges.closed(5L, 10L), fp.project(Ranges.open(5L, 15L))); Assert.assertEquals(Ranges.closed(5L, 10L), fp.project(Ranges.open(4L, 15L))); Assert.assertEquals(Ranges.closed(0L, 15L), fp.project(Ranges.closed(4L, 15L))); Assert.assertEquals(Ranges.closed(5L, 20L), <START> fp.project(Ranges.openClosed(5L, 21L))); <END> Assert.assertEquals(Ranges.singleton(10L), fp.projectStrict(Ranges.open(5L, 15L))); Assert.assertNull(fp.projectStrict(Ranges.open(5L, 14L))); Assert.assertEquals(Ranges.atMost(10L), fp.projectStrict(Ranges.atMost(15L))); Assert.assertEquals(Ranges.atMost(15L), fp.projectStrict(Ranges.lessThan(21L))); Assert.assertEquals(Ranges.atLeast(15L), fp.projectStrict(Ranges.atLeast(14L))); }</code><technical_language>good some ranges bound tested project, too</technical_language>

Target:
public void testLongFixedSizeRangeFieldPartitionerRangePredicate() { final FieldPartitioner<Long, Long> fp = new LongFixedSizeRangeFieldPartitioner("num", 5); Assert.assertEquals(Ranges.closed(-5L, 10L), fp.project(Ranges.open(-2L, 15L))); Assert.assertEquals(Ranges.closed(5L, 10L), fp.project(Ranges.open(5L, 15L))); Assert.assertEquals(Ranges.closed(5L, 10L), fp.project(Ranges.open(4L, 15L))); Assert.assertEquals(Ranges.closed(0L, 15L), fp.project(Ranges.closed(4L, 15L))); Assert.assertEquals(Ranges.closed(5L, 20L), fp.project(Ranges.openClosed(5L, 21L))); Assert.assertEquals(Ranges.atMost(15L), fp.project(Ranges.atMost(15L))); Assert.assertEquals(Ranges.atMost(20L), fp.project(Ranges.lessThan(21L))); Assert.assertEquals(Ranges.atLeast(10L), fp.project(Ranges.atLeast(14L))); Assert.assertEquals(Ranges.singleton(10L), fp.projectStrict(Ranges.open(5L, 15L))); Assert.assertNull(fp.projectStrict(Ranges.open(5L, 14L))); Assert.assertEquals(Ranges.atMost(10L), fp.projectStrict(Ranges.atMost(15L))); Assert.assertEquals(Ranges.atMost(15L), fp.projectStrict(Ranges.lessThan(21L))); Assert.assertEquals(Ranges.atLeast(15L), fp.projectStrict(Ranges.atLeast(14L))); }
Source:
<code>private String getTestSuiteNameToExecute(TestEnvironmentEntity testEnv) { List<String> testSuitesNames = testEnv.getTestSuites().stream().map(TestSuiteEntity::getTestSuiteId).collect(toList()); <START> return jobExecutionService.readAll().stream() <END> .map(JobExecutionEntity::getJob) .filter(job -> job.getEnvId().equals(testEnv.getEnvironmentId())) .map(JobEntity::getTestSuiteId) .filter(testSuitesNames::contains) .findFirst() .orElse(null); }</code><technical_language>return Optional</technical_language>

Target:
private Optional<String> getTestSuiteNameToExecute(TestEnvironmentEntity testEnv) { List<String> testSuitesNames = testEnv.getTestSuites().stream().map(TestSuiteEntity::getTestSuiteId).collect(toList()); return jobExecutionService.readAllPending().stream() .map(JobExecutionEntity::getJob) .filter(job -> job.getEnvId().equals(testEnv.getEnvironmentId())) .map(JobEntity::getTestSuiteId) .filter(testSuitesNames::contains) .findFirst(); }
Source:
<code>public void throw_UnauthorizedException_if_not_logged_in() throws Exception { expectedException.expect(UnauthorizedException.class); <START> actionTester.newRequest().setMethod("POST").execute(); <END> }</code><technical_language>remark: name variable ws everywhere. a pity named actionTester. I check is. I if name actionTester</technical_language>

Target:
public void throw_UnauthorizedException_if_not_logged_in() throws Exception { expectedException.expect(UnauthorizedException.class); ws.newRequest().setMethod("POST").execute(); }
Source:
<code>public static Value sin( AnyValue in ) { if ( in == NO_VALUE ) { return NO_VALUE; } else if ( in instanceof NumberValue ) { return doubleValue( Math.sin( ((NumberValue) in).doubleValue() ) ); } else { <START> throw new CypherTypeException( "sin requires numbers", null ); <END> } }</code><technical_language>thinking "sin() requires number read</technical_language>

Target:
public static Value sin( AnyValue in ) { if ( in == NO_VALUE ) { return NO_VALUE; } else if ( in instanceof NumberValue ) { return doubleValue( Math.sin( ((NumberValue) in).doubleValue() ) ); } else { throw needsNumbers( "sin()" ); } }
Source:
<code>public ClassRequest(Class<?> testClass, boolean canUseSuiteMethod) { <START> fRunner = new AllDefaultPossibilitiesBuilder(canUseSuiteMethod).safeRunnerForClass(testClass); <END> }</code><technical_language>I change ClassRequest create runner in constructor. change initialization order of in subtle ways. I code fine</technical_language>

Target:
public ClassRequest(Class<?> testClass, boolean canUseSuiteMethod) { fTestClass = testClass; fCanUseSuiteMethod = canUseSuiteMethod; }
Source:
<code>private String generateRandomUniqueWord(int maxLength, boolean randomLength) { String singleByteChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; String multiByteChars = "ÅÄÇÉÑÖÕÜàäâáãçëèêéîïìíñôöòóüûùúÿ"; StringBuilder data = new StringBuilder(); int byteLength = maxLength; if (randomLength && maxLength - 1 > 0) { byteLength = random.nextInt(maxLength - 1) + 1; } for (int i = byteLength; i > 0; i--) { <START> if (i == 1) { <END> data.append(singleByteChars.charAt(random.nextInt(singleByteChars.length() - 1))); } else { data.append(multiByteChars.charAt(random.nextInt(multiByteChars.length() - 1))); } } return data.toString(); }</code><technical_language>want sure: do want create a string byteLenght - 1 multibyte-characters single-byte character</technical_language>

Target:
private String generateRandomUniqueWord(int maxLength, boolean randomLength) { String singleByteChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; String multiByteChars = "ÅÄÇÉÑÖÕÜàäâáãçëèêéîïìíñôöòóüûùúÿ"; StringBuilder data = new StringBuilder(); int wordLength = maxLength; if (randomLength && maxLength - 1 > 0) { wordLength = random.nextInt(maxLength - 1) + 1; } for (int i = wordLength; i > 0; i--) { if (random.nextBoolean()) { data.append(multiByteChars.charAt(random.nextInt(multiByteChars.length() - 1))); } else { data.append(singleByteChars.charAt(random.nextInt(singleByteChars.length() - 1))); } } return data.toString(); }
Source:
<code>private void canvasRestApiCall(HttpServletRequest request, HttpServletResponse response) throws IOException { request.setCharacterEncoding("UTF-8"); M_log.debug("canvasRestApiCall(): called"); PrintWriter out = response.getWriter(); response.setContentType("application/json"); Properties appExtSecureProperties = SectionUtilityToolFilter.appExtSecurePropertiesFile; if(appExtSecureProperties!=null) { canvasToken = appExtSecureProperties.getProperty(SectionUtilityToolFilter.PROPERTY_CANVAS_ADMIN); canvasURL = appExtSecureProperties.getProperty(SectionUtilityToolFilter.PROPERTY_CANVAS_URL); } else { response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); out = response.getWriter(); out.print(props.getString("property.file.load.error")); out.flush(); M_log.error("Failed to load system properties(sectionsToolProps.properties) for SectionsTool"); return; } if(isAllowedApiRequest(request)) { <START> callType = props.getString(SectionUtilityToolFilter.PROPERTY_CALL_TYPE); <END> if(callType.equals("canvas")){ apiConnectionLogic(request,response); } else{ esbRestApiCall(request,response); } }else { response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); out = response.getWriter(); out.print(props.getString("api.not.allowed.error")); out.flush(); } }</code><technical_language>talk this face face</technical_language>

Target:
private void canvasRestApiCall(HttpServletRequest request, HttpServletResponse response) throws IOException { request.setCharacterEncoding("UTF-8"); M_log.debug("canvasRestApiCall(): called"); PrintWriter out = response.getWriter(); response.setContentType("application/json"); Properties appExtSecureProperties = SectionUtilityToolFilter.appExtSecureProperties; if(appExtSecureProperties!=null) { canvasToken = appExtSecureProperties.getProperty(SectionUtilityToolFilter.PROPERTY_CANVAS_ADMIN); canvasURL = appExtSecureProperties.getProperty(SectionUtilityToolFilter.PROPERTY_CANVAS_URL); } else { response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); out = response.getWriter(); out.print(appExtPropertiesFile.getProperty("property.file.load.error")); out.flush(); M_log.error("Failed to load system properties(sectionsToolProps.properties) for SectionsTool"); return; } if(isAllowedApiRequest(request)) { callType = appExtPropertiesFile.getProperty(SectionUtilityToolFilter.PROPERTY_CALL_TYPE); if(callType.equals("canvas")){ apiConnectionLogic(request,response); } else{ esbRestApiCall(request,response); } }else { response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); out = response.getWriter(); out.print(appExtPropertiesFile.getProperty("api.not.allowed.error")); out.flush(); } }
Source:
<code>private static List<Comparable<Object>> getTagsAfterExecution(SuppressionCommentFilter filter, String filename, String... lines) { final FileContents contents = new FileContents(filename, lines); for (int lineNo = 1; lineNo <= lines.length; lineNo++) { final int colNo = lines[lineNo - 1].indexOf(" if (colNo >= 0) { contents.reportSingleLineComment(lineNo, colNo); } } final TreeWalkerAuditEvent dummyEvent = new TreeWalkerAuditEvent(contents, filename, new LocalizedMessage(1, null, null, null, null, Object.class, ""), null); <START> filter.accept(dummyEvent); <END> return Whitebox.getInternalState(filter, "tags"); }</code><technical_language>In real world, key parameter is specified, customMessage is optional. in testing key parameter is omitted, causing NPE if customMessage is missing too. I this change</technical_language>

Target:
private static List<Comparable<Object>> getTagsAfterExecution(SuppressionCommentFilter filter, String filename, String... lines) { final FileContents contents = new FileContents(filename, lines); for (int lineNo = 0; lineNo < lines.length; lineNo++) { final int colNo = lines[lineNo].indexOf(" if (colNo >= 0) { contents.reportSingleLineComment(lineNo + 1, colNo); } } final TreeWalkerAuditEvent dummyEvent = new TreeWalkerAuditEvent(contents, filename, new LocalizedMessage(1, null, null, null, null, Object.class, ""), null); filter.accept(dummyEvent); return Whitebox.getInternalState(filter, "tags"); }
Source:
<code>public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { if (mItemList.get(position) instanceof ParentObject) { ParentViewHolder parentViewHolder = (ParentViewHolder) holder; parentViewHolder.setParentItemClickListener(this); onBindParentViewHolder(parentViewHolder, position); } else if (mItemList.get(position) instanceof ChildObject) { onBindChildViewHolder((ChildViewHolder) holder, position); } else { <START> return; END> } }</code><technical_language>log throw weird state</technical_language>

Target:
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { if (mItemList.get(position) instanceof ParentObject) { ParentViewHolder parentViewHolder = (ParentViewHolder) holder; parentViewHolder.setExpanded(((ParentObject) mItemList.get(position)).isExpanded()); parentViewHolder.setParentItemClickListener(this); onBindParentViewHolder(parentViewHolder, position); } else if (mItemList.get(position) instanceof ChildObject) { onBindChildViewHolder((ChildViewHolder) holder, position); } else { throw new IllegalStateException("Incorrect ViewHolder found"); } }
Source:
<code>protected Type[] getFreshArgs() { <START> List<Type> fresh = new LinkedList<>(); <END> for (Type arg : this.args) { if (fresh.contains(arg)) { fresh.add(fresh.get(fresh.indexOf(arg))); } else { fresh.add(arg.getFresh()); } } return fresh.toArray(new Type[fresh.size()]); }</code><technical_language>specific reason LinkedList here? wrong, curious</technical_language>

Target:
protected Type[] getFreshArgs() { List<Type> fresh = new LinkedList<>(); Map<Type, Type> staleToFresh = new HashMap<>(); for (Type arg : this.args) { if (staleToFresh.containsKey(arg)) { fresh.add(staleToFresh.get(arg)); } else { Type freshArg = arg.getFresh(); staleToFresh.put(arg, freshArg); fresh.add(freshArg); } } return fresh.toArray(new Type[fresh.size()]); }
Source:
<code>public void testSendAndReceiveBad() throws Exception { Binder<MessageChannel> binder = getBinder(); DirectChannel moduleOutputChannel = new DirectChannel(); DirectChannel moduleInputChannel = new DirectChannel(); Binding<MessageChannel> producerBinding = binder.bindProducer("bad.0", moduleOutputChannel, null); Binding<MessageChannel> consumerBinding = binder.bindConsumer("bad.0", "test", moduleInputChannel, null); Message<?> message = MessageBuilder.withPayload("bad").setHeader(MessageHeaders.CONTENT_TYPE, "foo/bar").build(); final CountDownLatch latch = new CountDownLatch(3); moduleInputChannel.subscribe(new MessageHandler() { @Override public void handleMessage(Message<?> message) throws MessagingException { latch.countDown(); throw new RuntimeException("bad"); } }); moduleOutputChannel.send(message); assertTrue(latch.await(10, TimeUnit.SECONDS)); consumerBinding.unbind(); <START> consumerBinding.unbind(); <END> }</code><technical_language>2nd producerBinding</technical_language>

Target:
public void testSendAndReceiveBad() throws Exception { Binder<MessageChannel> binder = getBinder(); DirectChannel moduleOutputChannel = new DirectChannel(); DirectChannel moduleInputChannel = new DirectChannel(); Binding<MessageChannel> producerBinding = binder.bindProducer("bad.0", moduleOutputChannel, null); Binding<MessageChannel> consumerBinding = binder.bindConsumer("bad.0", "test", moduleInputChannel, null); Message<?> message = MessageBuilder.withPayload("bad").setHeader(MessageHeaders.CONTENT_TYPE, "foo/bar").build(); final CountDownLatch latch = new CountDownLatch(3); moduleInputChannel.subscribe(new MessageHandler() { @Override public void handleMessage(Message<?> message) throws MessagingException { latch.countDown(); throw new RuntimeException("bad"); } }); moduleOutputChannel.send(message); assertTrue(latch.await(10, TimeUnit.SECONDS)); producerBinding.unbind(); consumerBinding.unbind(); }
Source:
<code>public void run() { <START> processSLALowCandidates(); <END> processSLAHighCandidates(); }</code><technical_language>2 methods some overlapping logic methods getFeedSLAMissPendingAlerts getSLAStatus of FeedSLAMonitoringService. Please reuse methods, API this service in sync</technical_language>

Target:
public void run() { processSLACandidates(); }
Source:
<code>public static RemoteWebDriver driver() { AbstractTestSession testSession = getTestSession(); if (! testSession.isStarted()) { testSession.startSesion(); } RemoteWebDriver rwd = threadLocalWebDriver.get(); if (rwd == null) { <START> throw new IllegalStateException("Driver not initialized. Is @WebTest annotation missing on method?"); <END> } return rwd; }</code><technical_language>@MobileTest.. If user is running session sharing, annotation class vs. method</technical_language>

Target:
public static RemoteWebDriver driver() { AbstractTestSession testSession = getTestSession(); if (! testSession.isStarted()) { testSession.startSesion(); } RemoteWebDriver rwd = threadLocalWebDriver.get(); if (rwd == null) { throw new IllegalStateException("Driver not initialized. Is @WebTest/@MobileTest missing on class/method?"); } return rwd; }
Source:
<code>public void shutdown() throws StoreException { <START> logger.info("Shutting down store manager"); <END> for (DiskManager diskManager : diskManagers) { diskManager.shutdown(); } logger.info("Shutting down store manager complete"); }</code><technical_language>4 instances of "store manager" this. replace storage manager</technical_language>

Target:
public void shutdown() throws StoreException { logger.info("Shutting down storage manager"); for (DiskManager diskManager : diskManagers) { diskManager.shutdown(); } logger.info("Shutting down storage manager complete"); }