Buggy code:
public class AttitudeXmlParser { private static Date endOfMission ; private static DateFormat format ; public static BinarySearchTree parseFolder ( FileHandle folder ) { } private static Date parseActivationTime ( FileHandle fh ) throws IOException { } private static AttitudeIntervalBean parseFile ( FileHandle fh , Duration duration ) throws IOException , ClassNotFoundException , IllegalAccessException , InstantiationException , NoSuchMethodException , InvocationTargetException { BaseAttitudeDataServer result = null ; XmlReader reader = new XmlReader ( ) ; XmlReader . Element element = reader . parse ( fh ) ; XmlReader . Element model = element . getChildByName ( "model" ) ; String name = model . get ( "name" ) ; String className = model . get ( "classname" ) ; String activTime = model . get ( "starttime" ) ; Date activationTime = AttitudeXmlParser . getDate ( activTime ) ; double startTimeNsSince2010 = ( ( AstroUtils . getJulianDate ( activationTime ) ) - ( AstroUtils . JD_J2010 ) ) * ( AstroUtils . DAY_TO_NS ) ; Class clazz = Class . forName ( className ) ; XmlReader . Element scanlaw = model . getChildByName ( "scanlaw" ) ; String epochRef = scanlaw . getAttribute ( "epochref" ) ; Date refEpochDate = AttitudeXmlParser . getDate ( epochRef ) ; double refEpoch = ( AstroUtils . getJulianDate ( refEpochDate ) ) * ( AstroUtils . DAY_TO_NS ) ; double refEpochJ2010 = refEpoch - ( ( AstroUtils . JD_J2010 ) * ( AstroUtils . DAY_TO_NS ) ) ; XmlReader . Element spinphase = scanlaw . getChildByName ( "spinphase" ) ; Quantity . Angle spinPhase = new Quantity . Angle ( AttitudeXmlParser . getDouble ( spinphase , "value" ) , spinphase . get ( "unit" ) ) ; XmlReader . Element precessphase = scanlaw . getChildByName ( "precessphase" ) ; Quantity . Angle precessionPhase = new Quantity . Angle ( AttitudeXmlParser . getDouble ( precessphase , "value" ) , precessphase . get ( "unit" ) ) ; XmlReader . Element precessrate = scanlaw . getChildByName ( "precessrate" ) ; Double precessionRate = AttitudeXmlParser . getDouble ( precessrate , "value" ) ; XmlReader . Element scanrate = scanlaw . getChildByName ( "scanrate" ) ; Quantity . Angle scanRate = new Quantity . Angle ( AttitudeXmlParser . getDouble ( scanrate , "value" ) , scanrate . get ( "unit" ) . split ( "_" ) [ 0 ] ) ; XmlReader . Element saa = scanlaw . getChildByName ( "solaraspectangle" ) ; Quantity . Angle solarAspectAngle = new Quantity . Angle ( AttitudeXmlParser . getDouble ( saa , "value" ) , saa . get ( "unit" ) ) ; if ( className . contains ( "MslAttitudeDataServer" ) ) { ModifiedScanningLaw msl = new ModifiedScanningLaw ( ( ( long ) ( startTimeNsSince2010 ) ) ) ; msl . setRefEpoch ( ( ( long ) ( refEpochJ2010 ) ) ) ; msl . setRefOmega ( spinPhase . get ( RAD ) ) ; msl . setRefNu ( precessionPhase . get ( RAD ) ) ; msl . setPrecRate ( precessionRate ) ; msl . setScanRate ( scanRate . get ( ARCSEC ) ) ; msl . setRefXi ( solarAspectAngle . get ( RAD ) ) ; msl . initialize ( ) ; MslAttitudeDataServer mslDatServ = ( ( MslAttitudeDataServer ) ( clazz . getConstructor ( new Class [ ] { long . class , Duration . class , ModifiedScanningLaw . class } ) . newInstance ( new Object [ ] { ( ( long ) ( startTimeNsSince2010 ) ) , duration , msl } ) ) ) ; mslDatServ . initialize ( ) ; result = mslDatServ ; } else if ( className . contains ( "Epsl" ) ) { Epsl . Mode mode = ( name . equals ( "EPSL_F" ) ) ? Mode . FOLLOWING : Mode . PRECEDING ; Epsl epsl = ( ( Epsl ) ( clazz . getConstructor ( Mode . class ) . newInstance ( mode ) ) ) ; epsl . setRefTime ( ( ( long ) ( refEpochJ2010 ) ) ) ; epsl . setNuRef ( precessionPhase . get ( RAD ) ) ; epsl . setOmegaRef ( spinPhase . get ( RAD ) ) ; epsl . setXiRef ( solarAspectAngle . get ( RAD ) ) ; epsl . setTargetScanRate ( scanRate . get ( ARCSEC ) ) ; epsl . setTargetPrecessionRate ( precessionRate ) ; result = epsl ; } <START_BUG> return new AttitudeIntervalBean ( name , activationTime , result ) ; <END_BUG> } private static Date getDate ( String date ) { } private static Double getDouble ( XmlReader . Element e , String property ) { } }

Fix:
return new AttitudeIntervalBean ( name , activationTime , result , fh . name ( ) ) ;