Program: 155979
Project: 155979
Buggy source:
@Override public void handleUpstream(final ChannelHandlerContext ctx,ChannelEvent evt) throws Exception {
  if (!(evt instanceof MessageEvent)) {
    ctx.sendUpstream(evt);
    return;
  }
  final MessageEvent event=(MessageEvent)evt;
  Object message=event.getMessage();
  if (message instanceof Position) {
    final Position position=(Position)message;
    if (processInvalidPositions || position.getValid()) {
      if (geocoderReuseDistance != 0) {
        Position lastPosition=Context.getIdentityManager().getLastPosition(position.getDeviceId());
        if (lastPosition != null && lastPosition.getAddress() != null) {
          if (position.getDouble(Position.KEY_DISTANCE) <= geocoderReuseDistance) {
            position.setAddress(lastPosition.getAddress());
            Channels.fireMessageReceived(ctx,position,event.getRemoteAddress());
            return;
          }
        }
      }
      Context.getStatisticsManager().registerGeocoderRequest();
      geocoder.getAddress(addressFormat,position.getLatitude(),position.getLongitude(),new Geocoder.ReverseGeocoderCallback(){
        @Override public void onSuccess(        String address){
          position.setAddress(address);
          Channels.fireMessageReceived(ctx,position,event.getRemoteAddress());
        }
        @Override public void onFailure(        Throwable e){
          Log.warning("String_Node_Str",e);
          Channels.fireMessageReceived(ctx,position,event.getRemoteAddress());
        }
      }
);
    }
 else {
      Channels.fireMessageReceived(ctx,position,event.getRemoteAddress());
    }
  }
 else {
    Channels.fireMessageReceived(ctx,message,event.getRemoteAddress());
  }
}

Fixed version (ground truth):
@Override public void handleUpstream(final ChannelHandlerContext ctx,ChannelEvent evt) throws Exception {
  if (!(evt instanceof MessageEvent)) {
    ctx.sendUpstream(evt);
    return;
  }
  final MessageEvent event=(MessageEvent)evt;
  Object message=event.getMessage();
  if (message instanceof Position) {
    final Position position=(Position)message;
    if (processInvalidPositions || position.getValid()) {
      if (geocoderReuseDistance != 0) {
        Position lastPosition=Context.getIdentityManager().getLastPosition(position.getDeviceId());
        if (lastPosition != null && lastPosition.getAddress() != null && position.getDouble(Position.KEY_DISTANCE) <= geocoderReuseDistance) {
          position.setAddress(lastPosition.getAddress());
          Channels.fireMessageReceived(ctx,position,event.getRemoteAddress());
          return;
        }
      }
      Context.getStatisticsManager().registerGeocoderRequest();
      geocoder.getAddress(addressFormat,position.getLatitude(),position.getLongitude(),new Geocoder.ReverseGeocoderCallback(){
        @Override public void onSuccess(        String address){
          position.setAddress(address);
          Channels.fireMessageReceived(ctx,position,event.getRemoteAddress());
        }
        @Override public void onFailure(        Throwable e){
          Log.warning("String_Node_Str",e);
          Channels.fireMessageReceived(ctx,position,event.getRemoteAddress());
        }
      }
);
    }
 else {
      Channels.fireMessageReceived(ctx,position,event.getRemoteAddress());
    }
  }
 else {
    Channels.fireMessageReceived(ctx,message,event.getRemoteAddress());
  }
}