Buggy code:
public final class SearchPeer extends ComponentDefinition { private static final Logger log = LoggerFactory . getLogger ( SearchPeer . class ) ; Positive < SimulationEventsPort > indexPort = positive ( SimulationEventsPort . class ) ; Positive < Network > network = positive ( Network . class ) ; Positive < Timer > timer = positive ( Timer . class ) ; Negative < UiPort > internalUiPort = negative ( UiPort . class ) ; Positive < UiPort > externalUiPort = positive ( UiPort . class ) ; Positive < CCHeartbeatPort > heartbeatPort = requires ( CCHeartbeatPort . class ) ; Positive < SelfAddressUpdatePort > selfAddressUpdatePort = requires ( SelfAddressUpdatePort . class ) ; Positive < SelfViewUpdatePort > selfViewUpdatePort = requires ( SelfViewUpdatePort . class ) ; private Component croupier ; private Component gradient ; private Component tgradient ; private Component search ; private Component aggregatorComponent ; private Component routing ; private Component partitionAwareGradient ; private Component electionLeader ; private Component electionFollower ; private ApplicationSelf self ; private SearchConfiguration searchConfiguration ; private SystemConfig systemConfig ; private GradientConfiguration pseudoGradientConfiguration ; private ChunkManagerConfig chunkManagerConfig ; private PublicKey publicKey ; private PrivateKey privateKey ; public SearchPeer ( SearchPeerInit init ) throws NoSuchAlgorithmException { } private void initiateServiceBootstrapping ( ) { } Handler < TimeoutCollection . CaracalTimeout > caracalTimeoutHandler = new Handler < TimeoutCollection . CaracalTimeout > ( ) { @ Override public void handle ( TimeoutCollection . CaracalTimeout caracalTimeout ) { } } ; private void initiateCroupierServiceBootstrap ( ) { } Handler < CCOverlaySample . Response > overlaySampleResponseHandler = new Handler < CCOverlaySample . Response > ( ) { @ Override public void handle ( CCOverlaySample . Response response ) { } } ; private byte [ ] getCroupierServiceByteArray ( ) { } Handler < CroupierDisconnected > croupierDisconnectedHandler = new Handler < CroupierDisconnected > ( ) { @ Override public void handle ( CroupierDisconnected croupierDisconnected ) { } } ; private void retryCroupierServiceBootstrap ( ) { } private void doInternalConnections ( ) { } private void connectAggregator ( SystemConfig systemConfig ) { } private Map < Class , List < ComponentInfoProcessor > > getComponentProcessorMap ( ) { } private void connectPAG ( SystemConfig systemConfig , GradientConfig gradientConfig ) { } private void generateKeys ( ) throws NoSuchAlgorithmException { } Handler < Start > handleStart = new Handler < Start > ( ) { @ Override public void handle ( final Start init ) { } } ; private void connectElection ( ElectionConfig electionConfig , long seed ) { } private void startPAG ( ) { } private void connectGradient ( GradientConfig gradientConfig , long seed ) { } private void connectTreeGradient ( TreeGradientConfig tgradientConfig , GradientConfig gradientConfig ) { } private void startGradient ( ) { SearchPeer . log . info ( "Starting<seq2seq4repair_space>Gradient<seq2seq4repair_space>component." ) ; <START_BUG> trigger ( new se . sics . p2ptoolbox . gradient . msg . GradientUpdate < se . sics . ms . types . PeerDescriptor > ( new se . sics . ms . types . PeerDescriptor ( self . getAddress ( ) ) ) , tgradient . getPositive ( GradientPort . class ) ) ; <END_BUG> } private void connectCroupier ( CroupierConfig config ) { } private int getCroupierServiceInt ( byte [ ] serviceArray ) { } private Handler < CroupierDisconnected > handleCroupierDisconnect = new Handler < CroupierDisconnected > ( ) { @ Override public void handle ( CroupierDisconnected event ) { } } ; final Handler < UiSearchRequest > searchRequestHandler = new Handler < UiSearchRequest > ( ) { @ Override public void handle ( UiSearchRequest searchRequest ) { } } ; final Handler < UiSearchResponse > searchResponseHandler = new Handler < UiSearchResponse > ( ) { @ Override public void handle ( UiSearchResponse searchResponse ) { } } ; final Handler < UiAddIndexEntryRequest > addIndexEntryRequestHandler = new Handler < UiAddIndexEntryRequest > ( ) { @ Override public void handle ( UiAddIndexEntryRequest addIndexEntryRequest ) { } } ; final Handler < UiAddIndexEntryResponse > addIndexEntryUiResponseHandler = new Handler < UiAddIndexEntryResponse > ( ) { @ Override public void handle ( UiAddIndexEntryResponse addIndexEntryUiResponse ) { } } ; final Handler < se . sics . ms . events . paginateAware . UiSearchRequest > paginateSearchRequestHandler = new Handler < se . sics . ms . events . paginateAware . UiSearchRequest > ( ) { @ Override public void handle ( se . sics . ms . events . paginateAware . UiSearchRequest uiSearchRequest ) { } } ; final Handler < se . sics . ms . events . paginateAware . UiSearchResponse > paginateSearchResponseHandler = new Handler < se . sics . ms . events . paginateAware . UiSearchResponse > ( ) { @ Override public void handle ( se . sics . ms . events . paginateAware . UiSearchResponse uiSearchResponse ) { } } ; ClassMatchedHandler < AddIndexEntryP2pSimulated , BasicContentMsg < DecoratedAddress , DecoratedHeader < DecoratedAddress > , AddIndexEntryP2pSimulated > > addEntrySimulatorHandler = new ClassMatchedHandler < AddIndexEntryP2pSimulated , BasicContentMsg < DecoratedAddress , DecoratedHeader < DecoratedAddress > , AddIndexEntryP2pSimulated > > ( ) { @ Override public void handle ( AddIndexEntryP2pSimulated request , BasicContentMsg < DecoratedAddress , DecoratedHeader < DecoratedAddress > , AddIndexEntryP2pSimulated > event ) { } } ; DecoratedAddress currentSimAddress = null ; ClassMatchedHandler < SearchP2pSimulated . Request , BasicContentMsg < DecoratedAddress , DecoratedHeader < DecoratedAddress > , SearchP2pSimulated . Request > > searchSimulatorHandler = new ClassMatchedHandler < SearchP2pSimulated . Request , BasicContentMsg < DecoratedAddress , DecoratedHeader < DecoratedAddress > , SearchP2pSimulated . Request > > ( ) { @ Override public void handle ( SearchP2pSimulated . Request request , BasicContentMsg < DecoratedAddress , DecoratedHeader < DecoratedAddress > , SearchP2pSimulated . Request > event ) { } } ; Handler < SimulationEventsPort . SearchSimulated . Response > searchSimulatedResponseHandler = new Handler < SimulationEventsPort . SearchSimulated . Response > ( ) { @ Override public void handle ( SimulationEventsPort . SearchSimulated . Response event ) { } } ; }

Fix:
trigger ( new se . sics . p2ptoolbox . gradient . msg . GradientUpdate < se . sics . ms . types . PeerDescriptor > ( new se . sics . ms . types . PeerDescriptor ( self . getAddress ( ) ) ) , tgradient . getNegative ( SelfViewUpdatePort . class ) ) ;