Mech mech = new Mech();
if ( null != chassisConfig ) chassisConfig = chassisConfig.substring(7).trim();  Mech mech = null;  if ( "Quad".equals(chassisConfig) ) mech = new QuadMech(); else mech = new BipedMech();
    public Mech getMech() {        Mech mech = new Mech();        if (techYear == null || !techYear.substring(4).equalsIgnoreCase("3025")) {            return null;        }                mech.setName(name);        mech.setModel(model);                mech.weight = (float)Integer.parseInt(tonnage.substring(5));        mech.heatSinks = Integer.parseInt(heatSinks.substring(11, 14).trim()) - 10;                mech.setOriginalWalkMP(Integer.parseInt(walkMP.substring(8)));        mech.setOriginalJumpMP(Integer.parseInt(jumpMP.substring(8)));                mech.autoSetInternal();                mech.initializeArmor(Integer.parseInt(larmArmor.substring(9)), Mech.LOC_LARM);        mech.initializeArmor(Integer.parseInt(rarmArmor.substring(9)), Mech.LOC_RARM);        mech.initializeArmor(Integer.parseInt(ltArmor.substring(9)), Mech.LOC_LT);        mech.initializeArmor(Integer.parseInt(rtArmor.substring(9)), Mech.LOC_RT);        mech.initializeArmor(Integer.parseInt(ctArmor.substring(9)), Mech.LOC_CT);        mech.initializeArmor(Integer.parseInt(headArmor.substring(9)), Mech.LOC_HEAD);        mech.initializeArmor(Integer.parseInt(llegArmor.substring(9)), Mech.LOC_LLEG);        mech.initializeArmor(Integer.parseInt(rlegArmor.substring(9)), Mech.LOC_RLEG);        mech.initializeRearArmor(Integer.parseInt(ltrArmor.substring(10)), Mech.LOC_LT);        mech.initializeRearArmor(Integer.parseInt(rtrArmor.substring(10)), Mech.LOC_RT);        mech.initializeRearArmor(Integer.parseInt(ctrArmor.substring(10)), Mech.LOC_CT);                // oog, crits.        for (int i = 0; i < mech.locations(); i++) {            parseCrits(mech, i);        }        return mech;    }