auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected Object run(String[] args) throws Exception { if (args != null) fArgs = args; fTestableObject = PlatformUI.getTestableObject(); fTestableObject.setTestHarness(this); try { Object application = getApplicationToRun(args); if (application == null) { return Integer.valueOf(200); } String timeoutParameter = getParameterValue(args, "-timeout"); if (timeoutParameter != null) { <START> DumpStackTracesTimer.startStackDumpTimeoutTimer(timeoutParameter); <END> } runApplication(application, args); } catch (Exception e) { if (fTestRunnerResult == -1) { throw e; } System.err.println("Caught unexpected exception during test framework shutdown"); e.printStackTrace(); } return Integer.valueOf(fTestRunnerResult); }</code><technical_language>great part of TestableObject directly; change build tool day, this feature present</technical_language>

Target:
protected Object run(String[] args) throws Exception { if (args != null) fArgs = args; fTestableObject = PlatformUI.getTestableObject(); fTestableObject.setTestHarness(this); try { Object application = getApplicationToRun(args); if (application == null) { return Integer.valueOf(200); } runApplication(application, args); } catch (Exception e) { if (fTestRunnerResult == -1) { throw e; } System.err.println("Caught unexpected exception during test framework shutdown"); e.printStackTrace(); } return Integer.valueOf(fTestRunnerResult); }
Source:
<code>@Override public ClientConnection open(InetSocketAddress addr, ClientMessageHandler msgHnd, ClientConnectionStateHandler stateHnd) throws ClientConnectionException { try { java.nio.channels.SocketChannel ch = java.nio.channels.SocketChannel.open(); ch.socket().connect(new InetSocketAddress(addr.getHostName(), addr.getPort()), Integer.MAX_VALUE); Map<Integer, Object> meta = new HashMap<>(); GridNioFuture<?> sslHandshakeFut = null; if (sslCtx != null) { sslHandshakeFut = new GridNioFutureImpl<>(null); meta.put(GridNioSslFilter.HANDSHAKE_FUT_META_KEY, sslHandshakeFut); } GridNioSession ses = srv.createSession(ch, meta, false, null).get(); if (sslHandshakeFut != null) sslHandshakeFut.get(); return new GridNioClientConnection(ses, msgHnd, stateHnd); <START> } catch (Exception e) { <END> throw new ClientConnectionException(e.getMessage(), e); } }</code><technical_language>NL } catch code style</technical_language>

Target:
@Override public ClientConnection open(InetSocketAddress addr, ClientMessageHandler msgHnd, ClientConnectionStateHandler stateHnd) throws ClientConnectionException { try { SocketChannel ch = SocketChannel.open(); ch.socket().connect(new InetSocketAddress(addr.getHostName(), addr.getPort()), Integer.MAX_VALUE); Map<Integer, Object> meta = new HashMap<>(); GridNioFuture<?> sslHandshakeFut = null; if (sslCtx != null) { sslHandshakeFut = new GridNioFutureImpl<>(null); meta.put(GridNioSslFilter.HANDSHAKE_FUT_META_KEY, sslHandshakeFut); } GridNioSession ses = srv.createSession(ch, meta, false, null).get(); if (sslHandshakeFut != null) sslHandshakeFut.get(); return new GridNioClientConnection(ses, msgHnd, stateHnd); } catch (Exception e) { throw new ClientConnectionException(e.getMessage(), e); } }
Source:
<code><START> private void checkPasswordValidity(DocumentModel userModel) throws InvalidPasswordException { <END> String schema = dirService.getDirectorySchema(userDirectoryName); String passwordField = dirService.getDirectory(userDirectoryName).getPasswordField(); Property passwordProperty = userModel.getProperty(String.format("%s:%s", schema, passwordField)); if (passwordProperty.isDirty()) { String clearPassword = passwordProperty.getValue(String.class); if (StringUtils.isNotBlank(clearPassword) && !validatePassword(clearPassword)) { throw new InvalidPasswordException(); } } }</code><technical_language>protected, allow easy subclassing</technical_language>

Target:
protected void checkPasswordValidity(DocumentModel userModel) throws InvalidPasswordException { String schema = dirService.getDirectorySchema(userDirectoryName); String passwordField = dirService.getDirectory(userDirectoryName).getPasswordField(); Property passwordProperty = userModel.getProperty(String.format("%s:%s", schema, passwordField)); if (passwordProperty.isDirty()) { String clearPassword = passwordProperty.getValue(String.class); if (StringUtils.isNotBlank(clearPassword) && !validatePassword(clearPassword)) { throw new InvalidPasswordException(); } } }
Source:
<code>public void compress(ByteBuffer input, ByteBuffer output) { if (input.isDirect() || output.isDirect()) { <START> throw new UnsupportedOperationException("Compression of direct byte buffer not supported"); <END> } byte[] inputArray; int inputOffset; if (input.hasArray()) { inputArray = input.array(); inputOffset = input.arrayOffset() + input.position(); } else { throw new IllegalArgumentException("Unsupported input ByteBuffer implementation " + input.getClass().getName()); } byte[] outputArray; int outputOffset; if (output.hasArray()) { outputArray = output.array(); outputOffset = output.arrayOffset() + output.position(); } else { throw new IllegalArgumentException("Unsupported output ByteBuffer implementation " + output.getClass().getName()); } int written = compress(inputArray, inputOffset, input.remaining(), outputArray, outputOffset, output.remaining()); output.position(output.position() + written); }</code><technical_language>IllegalArgumentException</technical_language>

Target:
public void compress(ByteBuffer input, ByteBuffer output) { if (input.isDirect() || output.isDirect() || !input.hasArray() || !output.hasArray()) { throw new IllegalArgumentException("Non-direct byte buffer backed by byte array required"); } int inputOffset = input.arrayOffset() + input.position(); int outputOffset = output.arrayOffset() + output.position(); int written = compress(input.array(), inputOffset, input.remaining(), output.array(), outputOffset, output.remaining()); output.position(output.position() + written); }
Source:
<code>public void setRequestInterceptors(List<HttpConnectionRequestInterceptor> requestInterceptors) { <START> this.requestInterceptors.addAll(requestInterceptors); <END> }</code><technical_language>This change method name controversial set field more. renamed addRequestInterceptors (and similarly for Response). This means interceptors replaced "setter". Is expected pattern if want change interceptors manipulate list get* method create a new CouchConfig</technical_language>

Target:
public void setRequestInterceptors(List<HttpConnectionRequestInterceptor> requestInterceptors) { this.requestInterceptors = requestInterceptors; }
Source:
<code>public String toIndexableString() { <START> return format( "Point{ %s, %s}", getCoordinateReferenceSystem().getName(), Arrays.toString( coordinate ) ); <END> }</code><technical_language>remove extra whitespace {</technical_language>

Target:
public String toIndexableString() { CoordinateReferenceSystem crs = getCoordinateReferenceSystem(); return format( "P:%d-%d%s", crs.getTable().getTableId(), crs.getCode(), Arrays.toString( coordinate ) ); }
Source:
<code><START> public void testSetScopedInstance() throws InterruptedException { <END> AgentMessageProcessor processor = (AgentMessageProcessor) this.agent.getMessagingClient().getMessageProcessor(); TestApplicationTemplate app = new TestApplicationTemplate(); Assert.assertNull( processor.scopedInstance ); processor.processMessage( new MsgCmdSetScopedInstance( app.getMySql())); Assert.assertNull( processor.scopedInstance ); Assert.assertEquals( 0, this.client.messagesForAgents.size()); processor.processMessage( new MsgCmdSetScopedInstance( app.getTomcatVm())); Assert.assertEquals( app.getTomcatVm(), processor.scopedInstance ); Assert.assertEquals( InstanceStatus.DEPLOYED_STARTED, processor.scopedInstance.getStatus()); Assert.assertEquals( 1, this.client.messagesForAgents.size()); processor.processMessage( new MsgCmdSetScopedInstance( app.getMySqlVm())); Assert.assertEquals( app.getTomcatVm(), processor.scopedInstance ); processor.processMessage( new MsgCmdSetScopedInstance( app.getTomcat())); Assert.assertEquals( app.getTomcatVm(), processor.scopedInstance ); processor.scopedInstance = null; this.client.messagesForAgents.clear(); app.getTomcatVm().setStatus( InstanceStatus.DEPLOYED_STARTED ); processor.processMessage( new MsgCmdSetScopedInstance( app.getTomcatVm())); Assert.assertEquals( app.getTomcatVm(), processor.scopedInstance ); Assert.assertEquals( InstanceStatus.DEPLOYED_STARTED, processor.scopedInstance.getStatus()); Assert.assertEquals( "Expected a message for Tomcat, its VM and the WAR.", 1, this.client.messagesForAgents.size()); }</code><technical_language>No, this method throw interrupted exceptions</technical_language>

Target:
public void testSetScopedInstance() { AgentMessageProcessor processor = (AgentMessageProcessor) this.agent.getMessagingClient().getMessageProcessor(); TestApplicationTemplate app = new TestApplicationTemplate(); Assert.assertNull( processor.scopedInstance ); processor.processMessage( new MsgCmdSetScopedInstance( app.getMySql())); Assert.assertNull( processor.scopedInstance ); Assert.assertEquals( 0, this.client.messagesForAgents.size()); processor.processMessage( new MsgCmdSetScopedInstance( app.getTomcatVm())); Assert.assertEquals( app.getTomcatVm(), processor.scopedInstance ); Assert.assertEquals( InstanceStatus.DEPLOYED_STARTED, processor.scopedInstance.getStatus()); Assert.assertEquals( 1, this.client.messagesForAgents.size()); processor.processMessage( new MsgCmdSetScopedInstance( app.getMySqlVm())); Assert.assertEquals( app.getTomcatVm(), processor.scopedInstance ); processor.processMessage( new MsgCmdSetScopedInstance( app.getTomcat())); Assert.assertEquals( app.getTomcatVm(), processor.scopedInstance ); processor.scopedInstance = null; this.client.messagesForAgents.clear(); app.getTomcatVm().setStatus( InstanceStatus.DEPLOYED_STARTED ); processor.processMessage( new MsgCmdSetScopedInstance( app.getTomcatVm())); Assert.assertEquals( app.getTomcatVm(), processor.scopedInstance ); Assert.assertEquals( InstanceStatus.DEPLOYED_STARTED, processor.scopedInstance.getStatus()); Assert.assertEquals( "Expected a message for Tomcat, its VM and the WAR.", 1, this.client.messagesForAgents.size()); }
Source:
<code>private IncomingPhoneNumber findByRegex(List<String> numberQueries, Sid sourceOrganizationSid, Sid destOrg) { IncomingPhoneNumber numberFound = null; IncomingPhoneNumberFilter.Builder filterBuilder = IncomingPhoneNumberFilter.Builder.builder(); filterBuilder.byOrgSid(destOrg.toString()); <START> filterBuilder.byPureSIP(Boolean.FALSE); <END> List<IncomingPhoneNumber> regexList = numbersDao.getIncomingPhoneNumbersRegex(filterBuilder.build()); if (logger.isDebugEnabled()) { logger.debug(String.format("Found %d Regex IncomingPhone numbers.", regexList.size())); } Set<IncomingPhoneNumber> regexSet = new TreeSet<IncomingPhoneNumber>(new NumberLengthComparator()); regexSet.addAll(regexList); if (regexList != null && regexList.size() > 0) { IncomingPhoneNumber matchingRegex = findFirstMatchingRegex(numberQueries, regexSet, sourceOrganizationSid, destOrg); if (matchingRegex != null) { numberFound = matchingRegex; } } return numberFound; }</code><technical_language>@jaimecasero exclude pure sip numbers here? Regex numbers created pure sip numbers created manually a Voip provider integration</technical_language>

Target:
private IncomingPhoneNumber findByRegex(List<String> numberQueries, Sid sourceOrganizationSid, Sid destOrg) { IncomingPhoneNumber numberFound = null; IncomingPhoneNumberFilter.Builder filterBuilder = IncomingPhoneNumberFilter.Builder.builder(); filterBuilder.byOrgSid(destOrg.toString()); filterBuilder.byPureSIP(Boolean.TRUE); List<IncomingPhoneNumber> regexList = numbersDao.getIncomingPhoneNumbersRegex(filterBuilder.build()); if (logger.isDebugEnabled()) { logger.debug(String.format("Found %d Regex IncomingPhone numbers.", regexList.size())); } Set<IncomingPhoneNumber> regexSet = new TreeSet<IncomingPhoneNumber>(new NumberLengthComparator()); regexSet.addAll(regexList); if (regexList != null && regexList.size() > 0) { IncomingPhoneNumber matchingRegex = findFirstMatchingRegex(numberQueries, regexSet); if (matchingRegex != null) { numberFound = matchingRegex; } } return numberFound; }
Source:
<code>public static Message validateVariableValues(final MeasurementVariable variable, final String value) { if ((variable.getDataTypeId() != null && variable.getDataTypeId().equals(DataType.NUMERIC_VARIABLE.getId())) || variable.getDataType().equals(DataType.NUMERIC_VARIABLE.getDataTypeCode())) { if (!StringUtils.isNumeric(value)) { return new Message(Constants.INVALID_NUMERIC_VALUE_MESSAGE, variable.getLabel(), value); } } <START> return null; <END> }</code><technical_language>return Optional.empty instead of null</technical_language>

Target:
public static Optional<Message> validateVariableValues(final MeasurementVariable variable, final String value) { if ((variable.getDataTypeId() != null && variable.getDataTypeId().equals(DataType.NUMERIC_VARIABLE.getId())) || variable.getDataType().equals(DataType.NUMERIC_VARIABLE.getDataTypeCode())) { if (!StringUtils.isNumeric(value)) { return Optional.of(new Message(Constants.INVALID_NUMERIC_VALUE_MESSAGE, variable.getLabel(), value)); } } return Optional.absent(); }
Source:
<code>public void addAbbreviation() { <START> addAbbreviation(Localization.lang("Name"), Localization.lang("Abbreviation"), Localization.lang("Shortest unique")); <END> }</code><technical_language>Please name "Shortest unique abbreviation"</technical_language>

Target:
public void addAbbreviation() { addAbbreviation(Localization.lang("Name"), Localization.lang("Abbreviation"), Localization.lang("Shortest unique abbreviation")); }
Source:
<code>protected boolean mergeImpl() throws IOException { boolean implicitDirCache = false; boolean clean = false; <START> int callDepth = 0; <END> if (dircache == null) { dircache = getRepository().lockDirCache(); implicitDirCache = true; } clean = mergeRecursive(callDepth, sourceCommits[0], sourceCommits[1], getBaseCommits(0, 1)); if (implicitDirCache) dircache.unlock(); return clean; }</code><technical_language>need callDepth clean. I remove variable simply call "return mergeRecursive(0, ..."</technical_language>

Target:
protected boolean mergeImpl() throws IOException { boolean implicitDirCache = false; if (dircache == null) { dircache = getRepository().lockDirCache(); implicitDirCache = true; } try { return mergeRecursive(0, sourceCommits[0], sourceCommits[1], getBaseCommits(0, 1)); } finally { if (implicitDirCache) dircache.unlock(); } }
Source:
<code>void updateButton() { getButtonWidget().setVisible(command.getIsAvailable() && command.getIsVisible()); getButtonWidget().setEnabled(command.getIsExecutionAllowed()); String title = ""; if (!command.getExecuteProhibitionReasons().isEmpty()) { for (String reason : command.getExecuteProhibitionReasons()) { <START> title += reason; <END> } } else { title = command.getTitle(); } getButtonWidget().setTitle(title); if (command.getTitle() != null) { getButtonWidget().setText(command.getTitle()); } }</code><technical_language>Please add delimiter reasons</technical_language>

Target:
void updateButton() { getButtonWidget().setVisible(command.getIsAvailable() && command.getIsVisible()); getButtonWidget().setEnabled(command.getIsExecutionAllowed()); String title = ""; if (!command.getExecuteProhibitionReasons().isEmpty()) { for (String reason : command.getExecuteProhibitionReasons()) { title += reason + ","; } } else { title = command.getTitle(); } getButtonWidget().setTitle(title); if (command.getTitle() != null) { getButtonWidget().setText(command.getTitle()); } }
Source:
<code>public Object execute(ExecutionEvent event) throws ExecutionException { IStructuredSelection selection = getSelection(getPage()); <START> if (selection.isEmpty()) { <END> return null; } RevCommit commit = (RevCommit) selection.getFirstElement(); Object input = getPage().getInputInternal().getSingleFile(); Repository repository = getRepository(event); try { IWorkbenchPage workBenchPage = HandlerUtil .getActiveWorkbenchWindowChecked(event).getActivePage(); if (input instanceof IFile) { IFile file = (IFile) input; if (CompareUtils.canDirectlyOpenInCompare(file)) { CompareUtils.compareWorkspaceWithRef(repository, file, commit.getId().getName(), workBenchPage); } else { GitModelSynchronize.synchronizeModelWithWorkspace(file, repository, commit.getName()); } } else { CompareUtils.compareLocalWithRef(repository, (File) input, commit.getId().getName(), workBenchPage); } } catch (IOException e) { Activator.handleError( UIText.CompareWithRefAction_errorOnSynchronize, e, true); } return null; }</code><technical_language>braces single line blocks</technical_language>

Target:
public Object execute(ExecutionEvent event) throws ExecutionException { IStructuredSelection selection = getSelection(getPage()); if (selection.isEmpty()) return null; RevCommit commit = (RevCommit) selection.getFirstElement(); Object input = getPage().getInputInternal().getSingleFile(); Repository repository = getRepository(event); try { IWorkbenchPage workBenchPage = HandlerUtil .getActiveWorkbenchWindowChecked(event).getActivePage(); if (input instanceof IFile) { IFile file = (IFile) input; if (CompareUtils.canDirectlyOpenInCompare(file)) CompareUtils.compareWorkspaceWithRef(repository, file, commit.getId().getName(), workBenchPage); else GitModelSynchronize.synchronizeModelWithWorkspace(file, repository, commit.getName()); } else CompareUtils.compareLocalWithRef(repository, (File) input, commit.getId().getName(), workBenchPage); } catch (IOException e) { Activator.handleError( UIText.CompareWithRefAction_errorOnSynchronize, e, true); } return null; }
Source:
<code>public void hashcodeTest() { assertEquals(32, fixture.hashCode()); StringDeclaration a = StringDeclaration.getStringDeclaration(Encoding.ASCII); <START> StringDeclaration b = StringDeclaration.getStringDeclaration(Encoding.UTF8); <END> StringDeclaration c = StringDeclaration.getStringDeclaration(Encoding.UTF8); StringDeclaration d = StringDeclaration.getStringDeclaration(Encoding.ASCII); assertEquals(b.hashCode(), c.hashCode()); assertEquals(a.hashCode(), d.hashCode()); assertEquals(a.hashCode(), a.hashCode()); }</code><technical_language>default getStringDeclaration encoding added,</technical_language>

Target:
public void hashcodeTest() { assertEquals(32, fixture.hashCode()); StringDeclaration a = StringDeclaration.getStringDeclaration(Encoding.ASCII); StringDeclaration b = StringDeclaration.getStringDeclaration(); StringDeclaration c = StringDeclaration.getStringDeclaration(Encoding.UTF8); StringDeclaration d = StringDeclaration.getStringDeclaration(Encoding.ASCII); assertEquals(b.hashCode(), c.hashCode()); assertEquals(a.hashCode(), d.hashCode()); assertEquals(a.hashCode(), a.hashCode()); }
Source:
<code>public void startFieldName(JsonParser parser) throws HyracksDataException { if (levelObject > spStack.size()) { keyStack.add(new ArrayBackedValueStorage()); spStack.add(new UTF8StringPointable()); } keyStack.get(levelObject - 1).reset(); DataOutput outk = keyStack.get(levelObject - 1).getDataOutput(); try { svb.write(parser.getText(), outk); spStack.get(levelObject - 1).set(keyStack.get(levelObject - 1)); if (this.valueSeq != null) { <START> ByteArrayOutputStream field = new ByteArrayOutputStream(); <END> int length = 0; byte[] barr = spStack.get(levelObject - 1).getByteArray(); field.write(barr, 0, spStack.get(levelObject - 1).getLength()); field.close(); allKeys.add(ArrayUtils.toObject(field.toByteArray())); for (int i = 0; i < allKeys.size() - 1; i++) { TaggedValuePointable tvp = new TaggedValuePointable(); tvp.set(ArrayUtils.toPrimitive(allKeys.get(i)), 0, ArrayUtils.toPrimitive(allKeys.get(i)).length); length += ArrayUtils.toPrimitive(allKeys.get(i)).length; } if (length <= path.getLength() && (length + 2) <= path.getLength()) { TaggedValuePointable tvp = new TaggedValuePointable(); tvp.set(path.getByteArray(), length, length + 2); if (tvp.getTag() == ValueTag.XS_BOOLEAN_TAG) { abvsStack.get(0).reset(); out.write(ValueTag.XS_STRING_TAG); svb.write(parser.getText(), out); writeElement(abvsStack.get(0)); } } } } catch (Exception e) { throw new HyracksDataException(e.toString()); } }</code><technical_language>create object reuse parser</technical_language>

Target:
public void startFieldName(JsonParser parser) throws HyracksDataException { if (levelObject > spStack.size()) { keyStack.add(new ArrayBackedValueStorage()); spStack.add(new UTF8StringPointable()); } keyStack.get(levelObject - 1).reset(); DataOutput outk = keyStack.get(levelObject - 1).getDataOutput(); try { svb.write(parser.getText(), outk); spStack.get(levelObject - 1).set(keyStack.get(levelObject - 1)); if (this.valueSeq != null) { int length = 0; byte[] barr = spStack.get(levelObject - 1).getByteArray(); outputStream.reset(); outputStream.write(barr, 0, spStack.get(levelObject - 1).getLength()); allKeys.add(ArrayUtils.toObject(outputStream.toByteArray())); for (int i = 0; i < allKeys.size() - 1; i++) { tvp.set(ArrayUtils.toPrimitive(allKeys.get(i)), 0, ArrayUtils.toPrimitive(allKeys.get(i)).length); length += ArrayUtils.toPrimitive(allKeys.get(i)).length; } if (length <= pathStream.size() && (length + 2) <= pathStream.size()) { tvp.set(pathStream.toByteArray(), length, length + 2); if (tvp.getTag() == ValueTag.XS_BOOLEAN_TAG) { abvsStack.get(0).reset(); out.write(ValueTag.XS_STRING_TAG); svb.write(parser.getText(), out); writeElement(abvsStack.get(0)); } } } } catch (Exception e) { throw new HyracksDataException("Writing in out of bounds space", e); } }
Source:
<code>protected void configure() { <START> if (Boolean.parseBoolean(firstNonNull(System.getenv("CHE_PLUGIN_TRAEFIK_ENABLED"), "false"))) { <END> final TraefikCreateContainerInterceptor traefikCreateContainerInterceptor = new TraefikCreateContainerInterceptor(); requestInjection(traefikCreateContainerInterceptor); bindInterceptor(subclassesOf(DockerConnector.class), names("createContainer"), traefikCreateContainerInterceptor); } }</code><technical_language>I suppose Boolean.parseBoolean(System.getenv("CHE_PLUGIN_TRAEFIK_ENABLED")) do same, do think</technical_language>

Target:
protected void configure() { if (parseBoolean(getenv("CHE_PLUGIN_TRAEFIK_ENABLED"))) { final TraefikCreateContainerInterceptor traefikCreateContainerInterceptor = new TraefikCreateContainerInterceptor(); requestInjection(traefikCreateContainerInterceptor); bindInterceptor(subclassesOf(DockerConnector.class), names("createContainer"), traefikCreateContainerInterceptor); } }
Source:
<code>private BucketedValue getValueFromTimeBucketReader(Slice key, long timeBucket) { <START> if (bloomFilter != null) { <END> boolean mightContain = bloomFilter.mightContain(key); verifyBloomFilter(mightContain); if (!mightContain) { return null; } } FileAccess.FileReader fileReader = readers.get(timeBucket); if (fileReader != null) { return readValue(fileReader, key, timeBucket); } try { if (loadFileReader(timeBucket)) { return readValue(readers.get(timeBucket), key, timeBucket); } return null; } catch (IOException e) { throw new RuntimeException("while loading " + bucketId + ", " + timeBucket, e); } }</code><technical_language>I bloom filter get call</technical_language>

Target:
private BucketedValue getValueFromTimeBucketReader(Slice key, long timeBucket) { if (managedStateContext.getTimeBucketAssigner() instanceof MovingBoundaryTimeBucketAssigner && timeBucket <= ((MovingBoundaryTimeBucketAssigner)managedStateContext.getTimeBucketAssigner()).getLowestPurgeableTimeBucket()) { return null; } if (bloomFilter != null) { boolean mightContain = bloomFilter.mightContain(key); verifyBloomFilter(mightContain); if (!mightContain) { return null; } } FileAccess.FileReader fileReader = readers.get(timeBucket); if (fileReader != null) { return readValue(fileReader, key, timeBucket); } try { if (loadFileReader(timeBucket)) { return readValue(readers.get(timeBucket), key, timeBucket); } return null; } catch (IOException e) { throw new RuntimeException("while loading " + bucketId + ", " + timeBucket, e); } }
Source:
<code>public void handleException(@Nullable Throwable exception) { final RuntimeException rException = (exception instanceof RuntimeException) ? (RuntimeException) exception : new RuntimeException("Error in threaded state history backend", exception); fail(rException); fPropagateExceptions = () -> { throw rException; }; <START> ITmfEvent event = fEventsQueue.take(); <END> while (event != END_EVENT) { if (event == EMPTY_QUEUE_EVENT) { event = fEventsQueue.take(); continue; } event = fEventsQueue.take(); } closeStateSystem(); }</code><technical_language>next patch in branch showed, happen thread fails received END_EVENT, closing, case hangs here. check currentEvent is END_EVENT draining</technical_language>

Target:
public void handleException(@Nullable Throwable exception) { final RuntimeException rException = (exception instanceof RuntimeException) ? (RuntimeException) exception : new RuntimeException("Error in threaded state history backend", exception); fail(rException); fPropagateExceptions = () -> { throw rException; }; if (currentEvent == END_EVENT) { return; } ITmfEvent event = fEventsQueue.take(); while (event != END_EVENT) { if (event == EMPTY_QUEUE_EVENT) { event = fEventsQueue.take(); continue; } event = fEventsQueue.take(); } closeStateSystem(); }
Source:
<code>public HighscoreLeaderboard getHighscoreLeaderboard() { HighscoreLeaderboard leaderboard = new HighscoreLeaderboard(); <START> PlayerDTO[] players; <END> try { players = ibs.getLeaderboard(); for (PlayerDTO pdto : players) { leaderboard.addEntry(pdto.getNickname(), pdto.getId(), pdto.getHighScore()); } leaderboard.refresh(); return leaderboard; } catch (RemoteException e) { e.printStackTrace(); } return null; }</code><technical_language>put this try pls</technical_language>

Target:
public HighscoreLeaderboard getHighscoreLeaderboard() { HighscoreLeaderboard leaderboard = new HighscoreLeaderboard(); try { PlayerDTO[] players = ibs.getLeaderboard(); for (PlayerDTO pdto : players) { leaderboard.addEntry(pdto.getNickname(), pdto.getId(), pdto.getHighScore()); } leaderboard.refresh(); } catch (RemoteException e) { e.printStackTrace(); } return leaderboard; }
Source:
<code>private void validateSemanticTagVcardAddressBody(Body body) throws ParamValidationException, PropertyValidationException { <START> if (!(body instanceof VcardAddressBody)) <END> throw new ParamValidationException(ParamValidationException.MESSAGE_MISSING_MANDATORY_FIELD, I18nConstants.MESSAGE_MISSING_MANDATORY_FIELD, new String[] { "tag.body.class", body.getClass().toString() }); Address address = ((VcardAddressBody) body).getAddress(); if (Strings.isNullOrEmpty(address.getVcardStreetAddress())) throw new PropertyValidationException(ParamValidationException.MESSAGE_MISSING_MANDATORY_FIELD, I18nConstants.MESSAGE_MISSING_MANDATORY_FIELD, new String[] { "tag.body.address.streetAddress" }); if (Strings.isNullOrEmpty(address.getVcardLocality())) throw new PropertyValidationException(ParamValidationException.MESSAGE_MISSING_MANDATORY_FIELD, I18nConstants.MESSAGE_MISSING_MANDATORY_FIELD, new String[] { "tag.body.address.locality" }); if (Strings.isNullOrEmpty(address.getVcardCountryName())) throw new PropertyValidationException(ParamValidationException.MESSAGE_MISSING_MANDATORY_FIELD, I18nConstants.MESSAGE_MISSING_MANDATORY_FIELD, new String[] { "tag.body.address.countryName" }); if (body.getType() == null || Strings.isNullOrEmpty(body.getType().get(0)) || !body.getType().get(0).equals(WebAnnotationModelKeywords.CLASS_VCARD_ADDRESS)) throw new PropertyValidationException(ParamValidationException.MESSAGE_MISSING_MANDATORY_FIELD, I18nConstants.MESSAGE_MISSING_MANDATORY_FIELD, new String[] { "tag.body.address.type" }); }</code><technical_language>check implemented based getType(), transcriptions</technical_language>

Target:
private void validateSemanticTagVcardAddressBody(Body body) throws ParamValidationException, PropertyValidationException { if (body.getType() == null || !(body.getType().size() == 1)) { } else if (!ResourceTypes.VCARD_ADDRESS.hasJsonValue(body.getType().get(0))) { throw new PropertyValidationException(I18nConstants.INVALID_PROPERTY_VALUE, I18nConstants.INVALID_PROPERTY_VALUE, new String[] { "vcardAddress.body.type" }); } Address address = ((VcardAddressBody) body).getAddress(); if (StringUtils.isBlank(address.getVcardStreetAddress())) throw new PropertyValidationException(ParamValidationException.MESSAGE_MISSING_MANDATORY_FIELD, I18nConstants.MESSAGE_MISSING_MANDATORY_FIELD, new String[] { "tag.body.address.streetAddress" }); if (StringUtils.isBlank(address.getVcardLocality())) throw new PropertyValidationException(ParamValidationException.MESSAGE_MISSING_MANDATORY_FIELD, I18nConstants.MESSAGE_MISSING_MANDATORY_FIELD, new String[] { "tag.body.address.locality" }); if (StringUtils.isBlank(address.getVcardCountryName())) throw new PropertyValidationException(ParamValidationException.MESSAGE_MISSING_MANDATORY_FIELD, I18nConstants.MESSAGE_MISSING_MANDATORY_FIELD, new String[] { "tag.body.address.countryName" }); if (body.getType() == null || StringUtils.isBlank(body.getType().get(0))) throw new PropertyValidationException(ParamValidationException.MESSAGE_MISSING_MANDATORY_FIELD, I18nConstants.MESSAGE_MISSING_MANDATORY_FIELD, new String[] { "tag.body.address.type" }); }
Source:
<code>public void importFile(String filePath) throws IOException { File file = new File(filePath); if (!file.exists()) { throw new FileNotFoundException( Constant.messages.getString("graphql.error.filenotfound")); } if (!file.canRead() || !file.isFile()) { throw new IOException(Constant.messages.getString("graphql.error.importfile")); } <START> String schemaSDL = FileUtils.readFileToString(file, "UTF-8"); <END> Thread t = new Thread(() -> parse(schemaSDL)); t.start(); }</code><technical_language>StandardCharsets.UTF_8</technical_language>

Target:
public void importFile(String filePath) throws IOException { File file = new File(filePath); if (!file.exists()) { throw new FileNotFoundException( Constant.messages.getString("graphql.error.filenotfound")); } if (!file.canRead() || !file.isFile()) { throw new IOException(Constant.messages.getString("graphql.error.importfile")); } String schemaSdl = FileUtils.readFileToString(file, StandardCharsets.UTF_8); parse(schemaSdl); }
Source:
<code>protected URL toURL(File file) { try { return file.toURI().toURL(); } catch (MalformedURLException e) { <START> throw new RuntimeException(e); <END> } }</code><technical_language>RuntimeServiceException is better, some tools warn if a bare RuntimeException</technical_language>

Target:
protected URL toURL(File file) { try { return file.toURI().toURL(); } catch (MalformedURLException e) { throw new RuntimeServiceException(e); } }
Source:
<code>private boolean evaluateReturnValues(AuditLogType auditLogType, List<VdcReturnValueBase> returnValues) { boolean succeeded = true; List<String> errors = new <START> ArrayList<String>(); <END> for (VdcReturnValueBase currentReturnValue : returnValues) { boolean currentExecutionStatus = currentReturnValue.getSucceeded(); succeeded &= currentExecutionStatus; if (!currentExecutionStatus) { errors.addAll(currentReturnValue.getExecuteFailedMessages()); } } if (!succeeded) { handleVdsErrors(auditLogType, errors); } return succeeded; }</code><technical_language>please diamond right side <> (no need redeclare type)</technical_language>

Target:
private boolean evaluateReturnValues(AuditLogType auditLogType, List<VdcReturnValueBase> returnValues) { boolean succeeded = true; List<String> errors = new ArrayList<>(); for (VdcReturnValueBase currentReturnValue : returnValues) { boolean currentExecutionStatus = currentReturnValue.getSucceeded(); succeeded = succeeded && currentExecutionStatus; if (!currentExecutionStatus) { errors.addAll(currentReturnValue.getExecuteFailedMessages()); } } if (!succeeded) { handleVdsErrors(auditLogType, errors); } return succeeded; }
Source:
<code>public void updated(Dictionary<String, ?> config) throws ConfigurationException { if (config != null) { Enumeration<String> keys = config.keys(); if ( serverList == null ) { serverList = new HashMap<String, OWServerConfig>(); } while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); if ("service.pid".equals(key)) { continue; } Matcher matcher = EXTRACT_CONFIG_PATTERN.matcher(key); if (!matcher.matches()) { continue; } matcher.reset(); matcher.find(); String serverId = matcher.group(1); OWServerConfig deviceConfig = serverList.get(serverId); if (deviceConfig == null) { deviceConfig = new OWServerConfig(); serverList.put(serverId, deviceConfig); } String configKey = matcher.group(2); String value = (String) config.get(key); if ("host".equals(configKey)) { deviceConfig.host = value; } <START> if ("user".equals(configKey)) { <END> deviceConfig.user = value; } if ("password".equals(configKey)) { deviceConfig.password = value; } } String timeoutString = (String) config.get("timeout"); if (StringUtils.isNotBlank(timeoutString)) { timeout = Integer.parseInt(timeoutString); } String granularityString = (String) config.get("granularity"); if (StringUtils.isNotBlank(granularityString)) { granularity = Integer.parseInt(granularityString); } String cacheString = (String) config.get("cache"); if (StringUtils.isNotBlank(cacheString)) { cacheDuration = Integer.parseInt(cacheString); } setProperlyConfigured(true); } }</code><technical_language>please "else if" option valid a time</technical_language>

Target:
public void updated(Dictionary<String, ?> config) throws ConfigurationException { if (config != null) { Enumeration<String> keys = config.keys(); if ( serverList == null ) { serverList = new HashMap<String, OWServerConfig>(); } while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); if ("service.pid".equals(key)) { continue; } Matcher matcher = EXTRACT_CONFIG_PATTERN.matcher(key); if (!matcher.matches()) { continue; } matcher.reset(); matcher.find(); String serverId = matcher.group(1); OWServerConfig deviceConfig = serverList.get(serverId); if (deviceConfig == null) { deviceConfig = new OWServerConfig(); serverList.put(serverId, deviceConfig); } String configKey = matcher.group(2); String value = (String) config.get(key); if ("host".equals(configKey)) { deviceConfig.host = value; } else if ("user".equals(configKey)) { deviceConfig.user = value; } else if ("password".equals(configKey)) { deviceConfig.password = value; } else { throw new ConfigurationException(configKey, "The given OWServer configKey '" + configKey + "' is unknown"); } } String timeoutString = (String) config.get("timeout"); if (StringUtils.isNotBlank(timeoutString)) { timeout = Integer.parseInt(timeoutString); } String granularityString = (String) config.get("granularity"); if (StringUtils.isNotBlank(granularityString)) { granularity = Integer.parseInt(granularityString); } String cacheString = (String) config.get("cache"); if (StringUtils.isNotBlank(cacheString)) { cacheDuration = Integer.parseInt(cacheString); } setProperlyConfigured(true); } }
Source:
<code>public RawDataFile execute() throws MSDKException { logger.info("Started Filter " + this.filteringAlgorithm.getName() + " with Raw Data File #" + rawDataFile.getName()); <START> result = MSDKObjectBuilder.getRawDataFile(this.rawDataFile.getName(), this.rawDataFile.getOriginalFile(), this.rawDataFile.getRawDataFileType(), DataPointStoreFactory.getMemoryDataStore()); <END> List<MsScan> scans = rawDataFile.getScans(); totalScans = scans.size(); for (MsScan scan : scans) { if (canceled) { return null; } MsSpectrum newScan = this.filteringAlgorithm.performFilter(scan); if (newScan != null) { result.addScan((MsScan) newScan); } processedScans++; } logger.info("Finished Filter " + this.filteringAlgorithm.getName() + " with Raw Data File #" + rawDataFile.getName()); return result; }</code><technical_language>data point store a parameter of this method (in constructor). If hardcode in DataPointStoreFactory.getMemoryDataStore() MSDK run out of memory quickly</technical_language>

Target:
public RawDataFile execute() throws MSDKException { logger.info("Started Filter " + this.filteringAlgorithm.getName() + " with Raw Data File #" + rawDataFile.getName()); result = MSDKObjectBuilder.getRawDataFile(this.rawDataFile.getName(), this.rawDataFile.getOriginalFile(), this.rawDataFile.getRawDataFileType(), store); List<MsScan> scans = rawDataFile.getScans(); totalScans = scans.size(); for (MsScan scan : scans) { if (canceled) { return null; } MsSpectrum newScan = this.filteringAlgorithm.performFilter(scan); if (newScan != null) { result.addScan((MsScan) newScan); } processedScans++; } logger.info("Finished Filter " + this.filteringAlgorithm.getName() + " with Raw Data File #" + rawDataFile.getName()); return result; }
Source:
<code>public boolean onNewOptionInDropDownClicked(View v) { spinnerSelectionBuffer = spinner.getSelectedItemPosition(); new NewLookDialogFragment(this, ProjectManager.getInstance().getCurrentScene(), ProjectManager.getInstance().getCurrentSprite()) { @Override public void onCancel(DialogInterface dialog) { super.onCancel(dialog); <START> spinner.setSelection(spinnerSelectionBuffer); <END> } }.show(((Activity) v.getContext()).getFragmentManager(), NewLookDialogFragment.TAG); return false; }</code><technical_language>Please create a new PR for changes. unrelated PR, I guess</technical_language>

Target:
public boolean onNewOptionInDropDownClicked(View v) { previouslySelectedLook = getLook(); new NewLookDialogFragment(this, ProjectManager.getInstance().getCurrentScene(), ProjectManager.getInstance().getCurrentSprite()) { @Override public void onCancel(DialogInterface dialog) { super.onCancel(dialog); setLook(previouslySelectedLook); spinner.setSelection(spinnerAdapter.getPosition(getLook() != null ? getLook().getName() : null)); } }.show(((Activity) v.getContext()).getFragmentManager(), NewLookDialogFragment.TAG); return false; }
Source:
<code>@Test public void jwtDownloadValidation_validSystemScope_Success() { <START> executeAndAssert(DOWNLOAD, VALID_STUDY, NOT_EXPIRED, OK); <END> }</code><technical_language>typo. this VALID_SYSTEM</technical_language>

Target:
@Test public void jwtDownloadValidation_validSystemScope_Success() { executeAndAssert(DOWNLOAD, VALID_SYSTEM, NOT_EXPIRED, OK); }
Source:
<code>public synchronized boolean isTerminated() { <START> List<ManagedChannel> c = new ArrayList<>(channels.get()); <END> boolean allTerminated = true; for (Iterator<ManagedChannel> iterator = c.iterator(); iterator.hasNext();) { ManagedChannel managedChannel = iterator.next(); if (managedChannel.isTerminated()) { iterator.remove(); } else { allTerminated = false; } } setChannels(c); return allTerminated; }</code><technical_language>I is a need clean channels list. name, isTerminated change state of object</technical_language>

Target:
public boolean isTerminated() { boolean allTerminated = true; for (ManagedChannel managedChannel: channels.get()) { if (!managedChannel.isTerminated()) { return false; } } return true; }
Source:
<code>public HttpClient() { logger = LoggerFactory.getLogger(getClass()); commandsQueue = new LinkedList<>(); commandExecutor = () -> { while (true) { try { int delayTime = 0; synchronized (this.commandsQueue) { AsyncPutParameters payloadCallbackPair = HttpClient.this.commandsQueue.poll(); if (payloadCallbackPair != null) { logger.debug("Async sending put to address: delay: body: {}", payloadCallbackPair.address, payloadCallbackPair.delay, payloadCallbackPair.body); try { Result result = HttpClient.this.put(payloadCallbackPair.address, payloadCallbackPair.body); payloadCallbackPair.future.complete(result); } catch (IOException e) { payloadCallbackPair.future.completeExceptionally(e); } delayTime = payloadCallbackPair.delay; } else { return; } } Thread.sleep(delayTime); } catch (InterruptedException e) { <START> logger.debug("commandExecutorThread was interrupted", e); <END> } } }; job = null; }</code><technical_language>thread marked interrupted</technical_language>

Target:
public HttpClient() { logger = LoggerFactory.getLogger(getClass()); commandsQueue = new LinkedList<>(); commandExecutor = () -> { while (true) { try { int delayTime = 0; synchronized (this.commandsQueue) { AsyncPutParameters payloadCallbackPair = HttpClient.this.commandsQueue.poll(); if (payloadCallbackPair != null) { logger.debug("Async sending put to address: delay: body: {}", payloadCallbackPair.address, payloadCallbackPair.delay, payloadCallbackPair.body); try { Result result = HttpClient.this.put(payloadCallbackPair.address, payloadCallbackPair.body); payloadCallbackPair.future.complete(result); } catch (IOException e) { payloadCallbackPair.future.completeExceptionally(e); } delayTime = payloadCallbackPair.delay; } else { return; } } Thread.sleep(delayTime); } catch (InterruptedException e) { logger.debug("commandExecutorThread was interrupted", e); } } }; }
Source:
<code>public void testSetup() { <START> final String expectedWidget = "800px"; <END> modal.setup(); verify(modal).setWidth(eq(expectedWidget)); verify(view).setup(treeList); }</code><technical_language>rename expectedWidgetWidth please</technical_language>

Target:
public void testSetup() { final String expectedWidgetWidth = "800px"; modal.setup(); verify(modal).setWidth(eq(expectedWidgetWidth)); verify(view).setup(treeList); }
Source:
<code>public boolean checkIfJobHasTasks(Guid jobId) { List<Step> steps = step.getStepsByJobIdForVdsmAndGluster(jobId); <START> return steps.size() > 0; <END> }</code><technical_language>Please use: return !steps.isEmpty();</technical_language>

Target:
public boolean checkIfJobHasTasks(Guid jobId) { List<Step> steps = step.getStepsByJobIdForVdsmAndGluster(jobId); return !steps.isEmpty(); }
Source:
<code>public Boolean isPasswordTogglerDisabled() { <START> String togglerDisabled = passwordField.getAttribute("type"); <END> return togglerDisabled.equals("password"); }</code><technical_language>getAttribute() return null, handle</technical_language>

Target:
public Boolean isPasswordTogglerDisabled() { String togglerDisabled = passwordField.getAttribute("type"); return "password".equals(togglerDisabled); }
Source:
<code>public void addExternallyManagedVms(List<VmStatic> externalVmList) { for (VmStatic currVm : externalVmList) { AddVmFromScratchParameters params = new AddVmFromScratchParameters(currVm, null, null); VdcReturnValueBase returnValue = Backend.getInstance().runInternalAction(VdcActionType.AddVmFromScratch, params, ExecutionHandler.createInternalJobContext()); if (!returnValue.getSucceeded()) { <START> log.debugFormat("Failed adding Externally managed VM {0}", params.getVm().getName()); <END> } } }</code><technical_language>important i nicer currVm.getName()</technical_language>

Target:
public void addExternallyManagedVms(List<VmStatic> externalVmList) { for (VmStatic currVm : externalVmList) { AddVmFromScratchParameters params = new AddVmFromScratchParameters(currVm, null, null); VdcReturnValueBase returnValue = Backend.getInstance().runInternalAction(VdcActionType.AddVmFromScratch, params, ExecutionHandler.createInternalJobContext()); if (!returnValue.getSucceeded()) { log.debugFormat("Failed adding Externally managed VM {0}", currVm.getName()); } } }
Source:
<code>private void filterIntervals() { <START> int numberOfMinutes = 600; <END> switch (selectedInterval) { case MINUTES_10: numberOfMinutes = 10; break; case MINUTES_30: numberOfMinutes = 30; break; case HOUR_1: numberOfMinutes = 60; break; case HOURS_2: numberOfMinutes = 120; break; case HOURS_5: numberOfMinutes = 300; break; case HOURS_8: numberOfMinutes = 480; break; case HOURS_10: numberOfMinutes = 600; } ArrayList<IntervalBase> filteredIntervals = new ArrayList<IntervalBase>(); ArrayList<IntervalBase> intervalsToRemove = new ArrayList<IntervalBase>(); if (intervals.size() == 0) { return; } mostRecentDate = intervals.get(intervals.size() - 1).getEnd(); DateTime thresholdDateDatabase = new DateTime(mostRecentDate); thresholdDateDatabase = thresholdDateDatabase .minusMinutes(FILTERED_INTERVALS_IN_MINUTES); DateTime thresholdDateView = new DateTime(mostRecentDate); thresholdDateView = thresholdDateView.minusMinutes(numberOfMinutes); for (IntervalBase interval : intervals) { if (interval.getEnd().after(thresholdDateDatabase.toDate())) { if (interval.getEnd().after(thresholdDateView.toDate())) { IntervalBase clonedInterval = (IntervalBase) interval .clone(); if (interval.getStart().before(thresholdDateView.toDate())) { clonedInterval.setStartTime(thresholdDateView.toDate()); } if (!clonedInterval.isClosed()) { clonedInterval.setEndTime(mostRecentDate); } filteredIntervals.add(clonedInterval); } } else { intervalsToRemove.add(interval); } } oldestDate = filteredIntervals.get(0).getStart(); intervalPersister.removeIntervals(intervalsToRemove); intervals = filteredIntervals; }</code><technical_language>This is a magic number (why FILTERED_INTERVALS_IN_MINUTES?)</technical_language>

Target:
private void filterIntervals() { ArrayList<IntervalBase> filteredIntervals = new ArrayList<IntervalBase>(); ArrayList<IntervalBase> intervalsToRemove = new ArrayList<IntervalBase>(); if (intervals.size() == 0) { return; } mostRecentDate = intervals.get(intervals.size() - 1).getEnd(); DateTime thresholdDateDatabase = new DateTime(mostRecentDate); thresholdDateDatabase = thresholdDateDatabase .minusMinutes(FILTERED_INTERVALS_IN_MINUTES); DateTime thresholdDateView = new DateTime(mostRecentDate); thresholdDateView = thresholdDateView .minusMinutes(selectedInterval.numberOfMinutes); for (IntervalBase interval : intervals) { if (interval.getEnd().after(thresholdDateDatabase.toDate())) { if (interval.getEnd().after(thresholdDateView.toDate())) { IntervalBase clonedInterval = (IntervalBase) interval .clone(); if (interval.getStart().before(thresholdDateView.toDate())) { clonedInterval.setStartTime(thresholdDateView.toDate()); } if (!clonedInterval.isClosed()) { clonedInterval.setEndTime(mostRecentDate); } filteredIntervals.add(clonedInterval); } } else { intervalsToRemove.add(interval); } } oldestDate = filteredIntervals.get(0).getStart(); intervalPersister.removeIntervals(intervalsToRemove); intervals = filteredIntervals; }
Source:
<code>private void logBrickStatusChange(GlusterVolumeEntity volume, final GlusterBrickEntity brick, final GlusterStatus fetchedStatus) { log.debug("Detected that status of brick '{}' in volume '{}' changed from '{}' to '{}'", brick.getQualifiedName(), volume.getName(), brick.getStatus(), fetchedStatus); logUtil.logAuditMessage(volume.getClusterId(), volume, null, AuditLogType.GLUSTER_BRICK_STATUS_CHANGED, new HashMap<String, String>() { { put(GlusterConstants.BRICK_PATH, brick.getQualifiedName()); put(GlusterConstants.OPTION_OLD_VALUE, brick.getStatus().toString()); put(GlusterConstants.OPTION_NEW_VALUE, fetchedStatus.toString()); } }); if(fetchedStatus == GlusterStatus.DOWN){ logUtil.logAuditMessage(volume.getClusterId(), volume, null, AuditLogType.GLUSTER_BRICK_STATUS_DOWN, brick.getId(), brick.getQualifiedName(), new HashMap<String, String>() { { <START> put(GlusterConstants.BRICK_PATH, brick.getQualifiedName()); <END> } }); }else if(fetchedStatus == GlusterStatus.UP){ AlertDirector.RemoveAlertsByBrickIdLogType(brick.getId(), AuditLogType.GLUSTER_BRICK_STATUS_DOWN); } }</code><technical_language>custom values required set brick path</technical_language>

Target:
private void logBrickStatusChange(GlusterVolumeEntity volume, final GlusterBrickEntity brick, final GlusterStatus fetchedStatus) { log.debug("Detected that status of brick '{}' in volume '{}' changed from '{}' to '{}'", brick.getQualifiedName(), volume.getName(), brick.getStatus(), fetchedStatus); logUtil.logAuditMessage(volume.getClusterId(), volume, null, AuditLogType.GLUSTER_BRICK_STATUS_CHANGED, new HashMap<String, String>() { { put(GlusterConstants.BRICK_PATH, brick.getQualifiedName()); put(GlusterConstants.OPTION_OLD_VALUE, brick.getStatus().toString()); put(GlusterConstants.OPTION_NEW_VALUE, fetchedStatus.toString()); } }); if(fetchedStatus == GlusterStatus.DOWN){ logUtil.logAuditMessage(volume.getClusterId(), volume, null, AuditLogType.GLUSTER_BRICK_STATUS_DOWN, brick.getId(), brick.getQualifiedName()); }else if(fetchedStatus == GlusterStatus.UP){ AlertDirector.RemoveAlertsByBrickIdLogType(brick.getId(), AuditLogType.GLUSTER_BRICK_STATUS_DOWN); } }