Program: 85647
Project: 85647
Buggy source:
/** 
 * Creates a new PeerGroup allowing you to specify the   {@link ClientConnectionManager} which is used to create newconnections and keep track of existing ones.
 */
private PeerGroup(NetworkParameters params,@Nullable AbstractBlockChain chain,ClientConnectionManager connectionManager,@Nullable TorClient torClient){
  this.params=checkNotNull(params);
  this.chain=chain;
  fastCatchupTimeSecs=params.getGenesisBlock().getTimeSeconds();
  wallets=new CopyOnWriteArrayList<Wallet>();
  peerFilterProviders=new CopyOnWriteArrayList<PeerFilterProvider>();
  this.torClient=torClient;
  executor=createPrivateExecutor();
  maxConnections=0;
  int height=chain == null ? 0 : chain.getBestChainHeight();
  versionMessage=new VersionMessage(params,height);
  versionMessage.relayTxesBeforeFilter=true;
  downloadTxDependencies=true;
  memoryPool=new MemoryPool();
  inactives=new PriorityQueue<PeerAddress>(1,new Comparator<PeerAddress>(){
    @SuppressWarnings("String_Node_Str") @Override public int compare(    PeerAddress a,    PeerAddress b){
      int result=backoffMap.get(a).compareTo(backoffMap.get(b));
      if (result == 0)       result=Ints.compare(a.getPort(),b.getPort());
      return result;
    }
  }
);
  backoffMap=new HashMap<PeerAddress,ExponentialBackoff>();
  peers=new CopyOnWriteArrayList<Peer>();
  pendingPeers=new CopyOnWriteArrayList<Peer>();
  channels=connectionManager;
  peerDiscoverers=new CopyOnWriteArraySet<PeerDiscovery>();
  peerEventListeners=new CopyOnWriteArrayList<ListenerRegistration<PeerEventListener>>();
  runningBroadcasts=Collections.synchronizedSet(new HashSet<TransactionBroadcast>());
  bloomFilterMerger=new FilterMerger(DEFAULT_BLOOM_FILTER_FP_RATE);
}

Fixed version (ground truth):
/** 
 * Creates a new PeerGroup allowing you to specify the   {@link ClientConnectionManager} which is used to create newconnections and keep track of existing ones.
 */
private PeerGroup(NetworkParameters params,@Nullable AbstractBlockChain chain,ClientConnectionManager connectionManager,@Nullable TorClient torClient){
  this.params=checkNotNull(params);
  this.chain=chain;
  fastCatchupTimeSecs=params.getGenesisBlock().getTimeSeconds();
  wallets=new CopyOnWriteArrayList<Wallet>();
  peerFilterProviders=new CopyOnWriteArrayList<PeerFilterProvider>();
  this.torClient=torClient;
  executor=createPrivateExecutor();
  maxConnections=0;
  int height=chain == null ? 0 : chain.getBestChainHeight();
  versionMessage=new VersionMessage(params,height);
  versionMessage.relayTxesBeforeFilter=true;
  downloadTxDependencies=true;
  memoryPool=new MemoryPool();
  inactives=new PriorityQueue<PeerAddress>(1,new Comparator<PeerAddress>(){
    @SuppressWarnings("String_Node_Str") @Override public int compare(    PeerAddress a,    PeerAddress b){
      checkState(lock.isHeldByCurrentThread());
      int result=backoffMap.get(a).compareTo(backoffMap.get(b));
      if (result == 0)       result=Ints.compare(a.getPort(),b.getPort());
      return result;
    }
  }
);
  backoffMap=new HashMap<PeerAddress,ExponentialBackoff>();
  peers=new CopyOnWriteArrayList<Peer>();
  pendingPeers=new CopyOnWriteArrayList<Peer>();
  channels=connectionManager;
  peerDiscoverers=new CopyOnWriteArraySet<PeerDiscovery>();
  peerEventListeners=new CopyOnWriteArrayList<ListenerRegistration<PeerEventListener>>();
  runningBroadcasts=Collections.synchronizedSet(new HashSet<TransactionBroadcast>());
  bloomFilterMerger=new FilterMerger(DEFAULT_BLOOM_FILTER_FP_RATE);
}