Source:
<code>public void start() throws ReplicationException { virtualReplicatorCluster.addListener(new VirtualReplicatorClusterListener() { @Override public void onPartitionAdded(PartitionId partitionId) { try { addReplica(partitionId); logger.info("Partition added to {}", partitionId, dataNodeId); } catch (ReplicationException e) { vcrMetrics.addPartitionErrorCount.inc(); logger.error("Exception on adding Partition to {}: ", partitionId, dataNodeId, e); } catch (Exception e) { vcrMetrics.addPartitionErrorCount.inc(); logger.error("Unknown Exception on adding Partition to {}: ", partitionId, dataNodeId, e); } } @Override public void onPartitionRemoved(PartitionId partitionId) { try { removeReplica(partitionId); <START> } catch (ReplicationException e) { <END> vcrMetrics.removePartitionErrorCount.inc(); logger.error("Exception on removing Partition to {}: ", partitionId, dataNodeId, e); } catch (Exception e) { vcrMetrics.removePartitionErrorCount.inc(); logger.error("Unknown Exception on removing Partition from {}: ", partitionId, dataNodeId, e); } } }); try { virtualReplicatorCluster.participate(InstanceType.PARTICIPANT); } catch (Exception e) { throw new ReplicationException("Cluster participate failed.", e); } scheduler.scheduleAtFixedRate(persistor, replicationConfig.replicationTokenFlushDelaySeconds, replicationConfig.replicationTokenFlushIntervalSeconds, TimeUnit.SECONDS); Random random = new Random(System.currentTimeMillis()); long delaySec = random.nextInt((int) TimeUnit.HOURS.toSeconds(2)); long intervalSec = TimeUnit.HOURS.toSeconds(cloudConfig.cloudBlobCompactionIntervalHours); scheduler.scheduleAtFixedRate(cloudStorageCompactor, delaySec, intervalSec, TimeUnit.SECONDS); logger.info("Scheduled compaction task to run every hours starting in seconds.", cloudConfig.cloudBlobCompactionIntervalHours, delaySec); }</code><technical_language>minor: catch clauses similar. combine them</technical_language>

Target:
public void start() throws ReplicationException { virtualReplicatorCluster.addListener(new VirtualReplicatorClusterListener() { @Override public void onPartitionAdded(PartitionId partitionId) { try { addReplica(partitionId); logger.info("Partition added to {}", partitionId, dataNodeId); } catch (ReplicationException e) { vcrMetrics.addPartitionErrorCount.inc(); logger.error("Exception on adding Partition to {}: ", partitionId, dataNodeId, e); } catch (Exception e) { vcrMetrics.addPartitionErrorCount.inc(); logger.error("Unknown Exception on adding Partition to {}: ", partitionId, dataNodeId, e); } } @Override public void onPartitionRemoved(PartitionId partitionId) { try { removeReplica(partitionId); } catch (Exception e) { vcrMetrics.removePartitionErrorCount.inc(); logger.error("Exception on removing Partition from {}: ", partitionId, dataNodeId, e); } } }); try { virtualReplicatorCluster.participate(InstanceType.PARTICIPANT); } catch (Exception e) { throw new ReplicationException("Cluster participate failed.", e); } scheduler.scheduleAtFixedRate(persistor, replicationConfig.replicationTokenFlushDelaySeconds, replicationConfig.replicationTokenFlushIntervalSeconds, TimeUnit.SECONDS); Random random = new Random(System.currentTimeMillis()); long delaySec = random.nextInt((int) TimeUnit.HOURS.toSeconds(2)); long intervalSec = TimeUnit.HOURS.toSeconds(cloudConfig.cloudBlobCompactionIntervalHours); scheduler.scheduleAtFixedRate(cloudStorageCompactor, delaySec, intervalSec, TimeUnit.SECONDS); logger.info("Scheduled compaction task to run every hours starting in seconds.", cloudConfig.cloudBlobCompactionIntervalHours, delaySec); }