Source:
<code>private boolean resolveConflict(LedgerMetadata newMeta) { LedgerMetadata metadata = getLedgerMetadata(); <START> testStubResolveConflict(); <END> if (LOG.isDebugEnabled()) { LOG.debug("[EnsembleChange-L{}-{}] : resolving conflicts - local metadata = \n \n," + " zk metadata = \n \n", ledgerId, ensembleChangeIdx, metadata, newMeta); } if (metadata.getState() != newMeta.getState()) { if (LOG.isDebugEnabled()) { LOG.info("[EnsembleChange-L{}-{}] : resolving conflicts but state changed," + " local metadata = \n \n, zk metadata = \n \n", ledgerId, ensembleChangeIdx, metadata, newMeta); } return false; } int diff = newMeta.getEnsembles().size() - metadata.getEnsembles().size(); if (0 != diff) { if (LOG.isDebugEnabled()) { LOG.debug("[EnsembleChange-L{}-{}] : resolving conflicts but ensembles have differences," + " local metadata = \n \n, zk metadata = \n \n", ledgerId, ensembleChangeIdx, diff, metadata, newMeta); } if (-1 == diff) { return updateMetadataIfPossible(metadata, newMeta); } return false; } if (!areFailedBookiesReplaced(newMeta, ensembleInfo)) { return updateMetadataIfPossible(newMeta); } else { ensembleChangeCounter.inc(); int newBlockAddCompletions = blockAddCompletions.decrementAndGet(); unsetSuccessAndSendWriteRequest(ensembleInfo.replacedBookies); if (LOG.isDebugEnabled()) { LOG.info("[EnsembleChange-L{}-{}] : resolved conflicts, block add complectiosn => {}.", ledgerId, ensembleChangeIdx, curBlockAddCompletions, newBlockAddCompletions); } } return true; }</code><technical_language>hmm.. i dont get is this method impacting this method return value</technical_language>

Target:
private boolean resolveConflict(LedgerMetadata newMeta) { LedgerMetadata metadata = getLedgerMetadata(); if (testStubResolveConflict()) { LOG.info("Invoked the Stub - Checkout the test case for the expected behavior"); } if (LOG.isDebugEnabled()) { LOG.debug("[EnsembleChange-L{}-{}] : resolving conflicts - local metadata = \n \n," + " zk metadata = \n \n", ledgerId, ensembleChangeIdx, metadata, newMeta); } if (metadata.getState() != newMeta.getState()) { if (LOG.isDebugEnabled()) { LOG.info("[EnsembleChange-L{}-{}] : resolving conflicts but state changed," + " local metadata = \n \n, zk metadata = \n \n", ledgerId, ensembleChangeIdx, metadata, newMeta); } return false; } int diff = newMeta.getEnsembles().size() - metadata.getEnsembles().size(); if (0 != diff) { if (LOG.isDebugEnabled()) { LOG.debug("[EnsembleChange-L{}-{}] : resolving conflicts but ensembles have differences," + " local metadata = \n \n, zk metadata = \n \n", ledgerId, ensembleChangeIdx, diff, metadata, newMeta); } if (-1 == diff) { return updateMetadataIfPossible(metadata, newMeta); } return false; } if (!areFailedBookiesReplaced(newMeta, ensembleInfo)) { return updateMetadataIfPossible(metadata, newMeta); } else { ensembleChangeCounter.inc(); int newBlockAddCompletions = blockAddCompletions.decrementAndGet(); unsetSuccessAndSendWriteRequest(ensembleInfo.replacedBookies); if (LOG.isDebugEnabled()) { LOG.info("[EnsembleChange-L{}-{}] : resolved conflicts, block add complectiosn => {}.", ledgerId, ensembleChangeIdx, curBlockAddCompletions, newBlockAddCompletions); } } return true; }