Buggy code:
i < n ; i ++ ) { attribName = attrib . getQName ( i ) . intern ( ) ; attribValue = attrib . getValue ( i ) ; if ( attribName == "set_point" ) { setpoint = Float . parseFloat ( attribValue ) ; } else if ( attribName == "deadband" ) { deadband = Float . parseFloat ( attribValue ) ; } else if ( attribName == "thermometer" ) { thermometerUID = attribValue ; } else if ( attribName == "power_source" ) { powerSourceUID = attribValue ; } } if ( ( ( ! ( Float . isNaN ( setpoint ) ) ) && ( ! ( Float . isNaN ( deadband ) ) ) ) && ( powerSourceUID != null ) ) { Part p = box . model . getPart ( powerSourceUID ) ; if ( p != null ) { Thermometer t = null ; if ( thermometerUID != null ) t = box . model . getThermometer ( thermometerUID ) ; Thermostat ts = box . model . addThermostat ( t , p ) ; ts . setDeadband ( deadband ) ; ts . setSetPoint ( setpoint ) ; } } } } else if ( qName == "cloud" ) { if ( attrib != null ) { float x = Float . NaN ; float y = Float . NaN ; float w = Float . NaN ; float h = Float . NaN ; float speed = 0 ; String label = null ; String uid = null ; Color color = Color . WHITE ; for ( int i = 0 , n = attrib . getLength ( ) ; i < n ; i ++ ) { attribName = attrib . getQName ( i ) . intern ( ) ; attribValue = attrib . getValue ( i ) ; if ( attribName == "x" ) { x = Float . parseFloat ( attribValue ) ; } else if ( attribName == "y" ) { y = Float . parseFloat ( attribValue ) ; } else if ( attribName == "width" ) { w = Float . parseFloat ( attribValue ) ; } else if ( attribName == "height" ) { h = Float . parseFloat ( attribValue ) ; } else if ( attribName == "speed" ) { speed = Float . parseFloat ( attribValue ) ; } else if ( attribName == "uid" ) { uid = attribValue ; } else if ( attribName == "label" ) { label = attribValue ; } else if ( attribName == "color" ) { color = new Color ( Integer . parseInt ( attribValue , 16 ) ) ; } } if ( ( ( ( ! ( Float . isNaN ( x ) ) ) && ( ! ( Float . isNaN ( y ) ) ) ) && ( ! ( Float . isNaN ( w ) ) ) ) && ( ! ( Float . isNaN ( h ) ) ) ) { Cloud c = new Cloud ( new Rectangle2D . Float ( 0 , 0 , w , h ) ) ; c . setX ( x ) ; c . setY ( y ) ; c . setSpeed ( speed ) ; c . setUid ( uid ) ; c . setLabel ( label ) ; c . setColor ( color ) ; box . model . addCloud ( c ) ; } } } else if ( qName == "tree" ) { if ( attrib != null ) { float x = Float . NaN ; float y = Float . NaN ; float w = Float . NaN ; float h = Float . NaN ; byte type = Tree . REGULAR ; String label = null ; String uid = null ; <START_BUG> Color color = Color . white ; <END_BUG> for ( int i = 0 , n = attrib . getLength ( ) ; i < n ; i ++ ) { attribName = attrib . getQName ( i ) . intern ( ) ; attribValue = attrib . getValue ( i ) ; if ( attribName == "x" ) { x = Float . parseFloat ( attribValue ) ; } else if ( attribName == "y" ) { y = Float . parseFloat ( attribValue ) ; } else if ( attribName == "width" ) { w = Float . parseFloat ( attribValue ) ; } else if ( attribName == "height" ) { h = Float . parseFloat ( attribValue ) ; } else if ( attribName == "type" ) { type = Byte . parseByte ( attribValue ) ; } else if ( attribName == "uid" ) { uid = attribValue ; } else if ( attribName == "label" ) { label = attribValue ; } else if ( attribName == "color" ) { color = new Color ( Integer . parseInt ( attribValue , 16 ) ) ; } } if ( ( ( ( ! ( Float . isNaN ( x ) ) ) && ( ! ( Float . isNaN ( y ) ) ) ) && ( ! ( Float . isNaN ( w ) ) ) ) && ( ! ( Float . isNaN ( h ) ) ) ) { Tree t = new Tree ( new Rectangle2D . Float ( 0 , 0 , w , h ) , type ) ; t . setX ( x ) ; t . setY ( y ) ; t . setUid ( uid ) ; t . setLabel ( label ) ; t . setColor ( color ) ; box . model . addTree ( t ) ; } } } else if ( qName == "text" ) { if ( attrib != null ) { float x = Float . NaN ; float y = Float . NaN ; int size = 14 ; int style = Font . PLAIN ;

Fix:
Color color = Color . GREEN . darker ( ) ;