Buggy code:
public class BitcoinNetworkService extends AbstractService { private static final Logger log = LoggerFactory . getLogger ( BitcoinNetworkService . class ) ; public static final Coin DEFAULT_FEE_PER_KB = Transaction . REFERENCE_DEFAULT_MIN_TX_FEE ; public static final int MAXIMUM_NUMBER_OF_PEERS = 6 ; private static final int MINING_FEE_BOUNDARY = 1000 ; private BlockStore blockStore ; private PeerGroup peerGroup ; private BlockChain blockChain ; private MultiBitPeerEventListener peerEventListener ; private final NetworkParameters networkParameters ; private boolean startedOk = false ; private Optional < SendRequestSummary > lastSendRequestSummaryOptional = Optional . absent ( ) ; private Optional < Wallet > lastWalletOptional = Optional . absent ( ) ; public BitcoinNetworkService ( NetworkParameters networkParameters ) { } @ Override public boolean startInternal ( ) { } @ Override protected boolean shutdownNowInternal ( ShutdownEvent . ShutdownType shutdownType ) { } public BlockStore openBlockStore ( File applicationDataDirectory , Optional < Date > replayDateOptional ) { } public boolean isStartedOk ( ) { } public void recalculateFastCatchupAndFilter ( ) { } private void downloadBlockChainInBackground ( ) { } public void replayWallet ( File applicationDataDirectory , Optional < Date > dateToReplayFromOptional ) { } public void send ( final SendRequestSummary sendRequestSummary ) { } private boolean performSend ( SendRequestSummary sendRequestSummary ) { } public void commitAndBroadcast ( final SendRequestSummary sendRequestSummary , final Wallet wallet ) { } private boolean performCommitAndBroadcast ( SendRequestSummary sendRequestSummary , Wallet wallet ) { } private boolean appendKeyParameter ( SendRequestSummary sendRequestSummary , Wallet wallet ) { } private boolean appendClientFee ( SendRequestSummary sendRequestSummary , boolean forceNow ) { } private boolean checkWalletSummary ( SendRequestSummary sendRequestSummary ) { } private boolean appendSendRequest ( SendRequestSummary sendRequestSummary ) { } public boolean prepareTransaction ( SendRequestSummary sendRequestSummary ) { } private boolean setFiatEquivalent ( SendRequestSummary sendRequestSummary ) { } private boolean completeWithoutSigning ( SendRequestSummary sendRequestSummary , Wallet wallet ) { } private boolean signUsingTrezor ( SendRequestSummary sendRequestSummary , Wallet wallet ) { } private boolean signDirectly ( SendRequestSummary sendRequestSummary , Wallet wallet ) { } private boolean commit ( SendRequestSummary sendRequestSummary , Wallet wallet ) { } private boolean broadcast ( SendRequestSummary sendRequestSummary , Wallet wallet ) { } private Map < Integer , ImmutableList < ChildNumber > > buildReceivingAddressPathMap ( Transaction unsignedTx , Wallet wallet ) { } private Map < Address , ImmutableList < ChildNumber > > buildChangeAddressPathMap ( Transaction unsignedTx , Wallet wallet ) { } private void createNewPeerGroup ( Wallet wallet ) throws TimeoutException { if ( currentConfiguration . isTor ( ) ) { BitcoinNetworkService . log . info ( "Creating<seq2seq4repair_space>new<seq2seq4repair_space>TOR<seq2seq4repair_space>peer<seq2seq4repair_space>group<seq2seq4repair_space>for<seq2seq4repair_space>'{}'" , networkParameters ) ; InstallationManager . removeCryptographyRestrictions ( ) ; peerGroup = PeerGroup . newWithTor ( networkParameters , blockChain , new TorClient ( ) ) ; } else { BitcoinNetworkService . log . info ( "Creating<seq2seq4repair_space>new<seq2seq4repair_space>DNS<seq2seq4repair_space>peer<seq2seq4repair_space>group<seq2seq4repair_space>for<seq2seq4repair_space>'{}'" , networkParameters ) ; peerGroup = new PeerGroup ( networkParameters , blockChain ) ; peerGroup . addPeerDiscovery ( new org . bitcoinj . net . discovery . DnsDiscovery ( networkParameters ) ) ; } <START_BUG> peerGroup . setUserAgent ( MBHD_APP_NAME , currentConfiguration . getAppearance ( ) . getCurrentVersion ( ) ) ; <END_BUG> peerGroup . setFastCatchupTimeSecs ( 0 ) ; peerGroup . setMaxConnections ( BitcoinNetworkService . MAXIMUM_NUMBER_OF_PEERS ) ; peerGroup . setUseLocalhostPeerWhenPossible ( false ) ; peerEventListener = new MultiBitPeerEventListener ( ) ; peerGroup . addEventListener ( peerEventListener ) ; addWalletToPeerGroup ( wallet ) ; } public void addWalletToPeerGroup ( Wallet wallet ) { } public void addWalletToBlockChain ( Wallet wallet ) { } public Address getNextChangeAddress ( ) { } public boolean pingPeers ( ) { } private void closeBlockstore ( ) { } private void stopPeerGroup ( ) { } private void restartNetwork ( BlockStore blockStore ) throws IOException , TimeoutException , BlockStoreException { } private int calculateSize ( Transaction transaction ) throws IOException { } public Optional < SendRequestSummary > getLastSendRequestSummaryOptional ( ) { } public Optional < Wallet > getLastWalletOptional ( ) { } public void setLastSendRequestSummaryOptional ( Optional < SendRequestSummary > lastSendRequestSummaryOptional ) { } public void setLastWalletOptional ( Optional < Wallet > lastWalletOptional ) { } public BlockStore getBlockStore ( ) { } public int getNumberOfConnectedPeers ( ) { } No newline ; at end ; of file ; }

Fix:
peerGroup . setUserAgent ( MBHD_APP_NAME , currentConfiguration . getCurrentVersion ( ) ) ;