Buggy code:
} else { for ( int j = 0 ; j < ( range_select [ 0 ] . length ) ; j ++ ) { if ( range_select [ 0 ] [ j ] ) rlen ++ ; } } if ( rlen == 0 ) return ; DataRenderer renderer = getLink ( ) . getRenderer ( ) ; FunctionType ftype = ( ( FunctionType ) ( Type ) ) ; RealTupleType rtt = ftype . getFlatRange ( ) ; RealType [ ] range_reals = rtt . getRealComponents ( ) ; for ( int k = 0 ; k < ( range_reals . length ) ; k ++ ) { for ( int i = 0 ; i < valueArrayLength ; i ++ ) { ScalarMap map = ( ( ScalarMap ) ( MapVector . elementAt ( valueToMap [ i ] ) ) ) ; DisplayRealType dreal = map . getDisplayScalar ( ) ; ScalarType scalar = map . getScalar ( ) ; if ( ! ( scalar . equals ( range_reals [ k ] ) ) ) continue ; if ( ( ( ( ( ( dreal . equals ( Flow1Elevation ) ) || ( dreal . equals ( Flow2Elevation ) ) ) || ( dreal . equals ( Flow1Azimuth ) ) ) || ( dreal . equals ( Flow2Azimuth ) ) ) || ( dreal . equals ( Flow1Radial ) ) ) || ( dreal . equals ( Flow2Radial ) ) ) { throw new VisADException ( "Elevation,<seq2seq4repair_space>Azimuth,<seq2seq4repair_space>Radial<seq2seq4repair_space>not<seq2seq4repair_space>supported<seq2seq4repair_space>for<seq2seq4repair_space>Trajectory" ) ; } if ( ( dreal . equals ( Flow1X ) ) || ( dreal . equals ( Flow2X ) ) ) { flowUnits [ 0 ] = dataUnits [ k ] [ 0 ] ; } if ( ( dreal . equals ( Flow1Y ) ) || ( dreal . equals ( Flow2Y ) ) ) { flowUnits [ 1 ] = dataUnits [ k ] [ 0 ] ; } if ( ( dreal . equals ( Flow1Z ) ) || ( dreal . equals ( Flow2Z ) ) ) { flowUnits [ 2 ] = dataUnits [ k ] [ 0 ] ; } } } byte [ ] [ ] trajColors = makeTrajColor ( rangeValues , valueArrayLength , valueToMap , MapVector ) ; FlowInfo flwInfo = new FlowInfo ( ) ; flwInfo . flow_values = flow_values ; flwInfo . flow_units = flowUnits ; flwInfo . flowScale = flowScale ; flwInfo . spatial_values = spatial_values ; flwInfo . spatial_set = spatial_set ; flwInfo . spatialManifoldDimension = spatialManifoldDimension ; flwInfo . color_values = color_values ; flwInfo . range_select = range_select ; flwInfo . mode = mode ; flwInfo . constant_alpha = constant_alpha ; flwInfo . constant_color = constant_color ; flwInfo . renderer = renderer ; <START_BUG> flwInfo . which = 0 ; <END_BUG> flwInfo . trajColors = trajColors ; flowInfoList . add ( flwInfo ) ; return ; } public byte [ ] [ ] makeTrajColor ( float [ ] [ ] rangeValues , int valueArrayLength , int [ ] valueToMap , Vector MapVector ) throws RemoteException , VisADException { } private static final float BACK_SCALE = - 0.15F ; private static final float PERP_SCALE = 0.15F ; public VisADGeometryArray [ ] makeFlow ( int which , float [ ] [ ] flow_values , float flowScale , float [ ] [ ] spatial_values , byte [ ] [ ] color_values , boolean [ ] [ ] range_select ) throws VisADException { } private static final double FONT_SCALE = 0.07 ; static void rotateVectors ( double [ ] base , double [ ] up , double rotationDegrees ) { } public VisADGeometryArray makeText ( String [ ] text_values , TextControl text_control , float [ ] [ ] spatial_values , byte [ ] [ ] color_values , boolean [ ] [ ] range_select ) throws VisADException { } public byte [ ] [ ] assembleColor ( float [ ] [ ] display_values , int valueArrayLength , int [ ] valueToScalar , DisplayImpl display , float [ ] default_values , boolean [ ] [ ] range_select , boolean [ ] single_missing , ShadowType shadow_api ) throws RemoteException , VisADException { } public static final float byteToFloat ( byte b ) { } public static final byte floatToByte ( float f ) { } static void colorSum ( int nindex , float [ ] [ ] tuple_values , float [ ] tuple_value_counts , float [ ] tuple_singles , float [ ] tuple_single_counts , DisplayImpl display , DisplayTupleType tuple , float [ ] default_values ) throws VisADException { } public static int getDefaultColorIndex ( DisplayImpl display , int index ) { } static void equalizeAndDefault ( float [ ] [ ] tuple_values , DisplayImpl display , DisplayTupleType tuple , float [ ] default_values ) throws VisADException { } static void colorComposite ( float [ ] [ ] rgba_values , float [ ] rgba_value_counts , float [ ] [ ] tuple_values ) throws VisADException { } static void singleComposite ( int index , float [ ] [ ] rgba_values , float [ ] rgba_value_counts , float [ ] values ) throws VisADException { } public boolean [ ] [ ] assembleSelect ( float [ ] [ ] display_values , int domain_length , int valueArrayLength , int [ ] valueToScalar , DisplayImpl display , ShadowType shadow_api ) throws VisADException { } public boolean terminalTupleOrScalar ( Object group , float [ ] [ ] display_values , String text_value , TextControl text_control , int valueArrayLength , int [ ] valueToScalar , float [ ] default_values , int [ ] inherited_values , DataRenderer renderer , ShadowType shadow_api ) throws RemoteException , VisADException { }

Fix:
flwInfo . which = which ;