Program: 171250
Project: 171250
Buggy source:
public static Body loadFromXML(StringBuilder log,Element parentElement,Document doc){
  Element element=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  int importedFemininity=(Integer.valueOf(element.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + Integer.valueOf(element.getAttribute("String_Node_Str")));
  int importedHeight=(Integer.valueOf(element.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + Integer.valueOf(element.getAttribute("String_Node_Str")));
  int importedBodySize=(Integer.valueOf(element.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + Integer.valueOf(element.getAttribute("String_Node_Str")));
  int importedMuscle=(Integer.valueOf(element.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + Integer.valueOf(element.getAttribute("String_Node_Str")));
  GenitalArrangement importedGenitalArrangement=GenitalArrangement.NORMAL;
  if (element.getAttribute("String_Node_Str") != null && !element.getAttribute("String_Node_Str").isEmpty()) {
    importedGenitalArrangement=GenitalArrangement.valueOf(element.getAttribute("String_Node_Str"));
  }
  BodyMaterial importedBodyMaterial=BodyMaterial.FLESH;
  if (element.getAttribute("String_Node_Str") != null && !element.getAttribute("String_Node_Str").isEmpty()) {
    importedBodyMaterial=BodyMaterial.valueOf(element.getAttribute("String_Node_Str"));
  }
  Element antennae=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Antenna importedAntenna=new Antenna(AntennaType.valueOf(antennae.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedAntenna.getType());
  importedAntenna.rows=Integer.valueOf(antennae.getAttribute("String_Node_Str"));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + importedAntenna.getAntennaRows());
  Element arm=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Arm importedArm=new Arm(ArmType.valueOf(arm.getAttribute("String_Node_Str")),Integer.valueOf(arm.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedArm.getType());
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + importedArm.getArmRows());
  try {
    importedArm.underarmHair=BodyHair.valueOf(arm.getAttribute("String_Node_Str"));
    CharacterUtils.appendToImportLog(log,"String_Node_Str" + importedArm.getUnderarmHair());
  }
 catch (  IllegalArgumentException e) {
    importedArm.underarmHair=BodyHair.ZERO_NONE;
    CharacterUtils.appendToImportLog(log,"String_Node_Str");
  }
  Element ass=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Element anus=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Ass importedAss=new Ass(AssType.valueOf(ass.getAttribute("String_Node_Str")),Integer.valueOf(ass.getAttribute("String_Node_Str")),Integer.valueOf(anus.getAttribute("String_Node_Str")),Float.valueOf(anus.getAttribute("String_Node_Str")),Integer.valueOf(anus.getAttribute("String_Node_Str")),Integer.valueOf(anus.getAttribute("String_Node_Str")),Boolean.valueOf(anus.getAttribute("String_Node_Str")));
  importedAss.hipSize=Integer.valueOf(ass.getAttribute("String_Node_Str"));
  importedAss.anus.orificeAnus.stretchedCapacity=(Float.valueOf(anus.getAttribute("String_Node_Str")));
  importedAss.anus.bleached=(Boolean.valueOf(anus.getAttribute("String_Node_Str")));
  try {
    importedAss.anus.assHair=(BodyHair.valueOf(anus.getAttribute("String_Node_Str")));
  }
 catch (  IllegalArgumentException e) {
    importedAss.anus.assHair=BodyHair.ZERO_NONE;
    CharacterUtils.appendToImportLog(log,"String_Node_Str");
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedAss.getType() + "String_Node_Str"+ importedAss.getAssSize()+ "String_Node_Str"+ importedAss.getHipSize());
  if (anus != null) {
    CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedAss.anus.orificeAnus.wetness + "String_Node_Str"+ importedAss.anus.orificeAnus.elasticity+ "String_Node_Str"+ importedAss.anus.orificeAnus.plasticity+ "String_Node_Str"+ importedAss.anus.orificeAnus.capacity+ "String_Node_Str"+ importedAss.anus.orificeAnus.stretchedCapacity+ "String_Node_Str"+ importedAss.anus.orificeAnus.virgin+ "String_Node_Str"+ importedAss.anus.bleached+ "String_Node_Str"+ importedAss.anus.assHair+ "String_Node_Str");
    Element anusModifiersElement=(Element)anus.getElementsByTagName("String_Node_Str").item(0);
    Collection<OrificeModifier> anusModifiers=importedAss.anus.orificeAnus.orificeModifiers;
    anusModifiers.clear();
    handleLoadingOfModifiers(OrificeModifier.values(),log,anusModifiersElement,anusModifiers);
  }
  Element breasts=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Element nipples=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  BreastShape breastShape=BreastShape.ROUND;
  try {
    breastShape=BreastShape.valueOf(breasts.getAttribute("String_Node_Str"));
  }
 catch (  Exception e) {
  }
  int milkStorage=0;
  try {
    if (!breasts.getAttribute("String_Node_Str").isEmpty()) {
      milkStorage=Integer.valueOf(breasts.getAttribute("String_Node_Str"));
    }
 else {
      milkStorage=Integer.valueOf(breasts.getAttribute("String_Node_Str"));
    }
  }
 catch (  Exception ex) {
  }
  Breast importedBreast=new Breast(BreastType.valueOf(breasts.getAttribute("String_Node_Str")),breastShape,Integer.valueOf(breasts.getAttribute("String_Node_Str")),milkStorage,Integer.valueOf(breasts.getAttribute("String_Node_Str")),Integer.valueOf(nipples.getAttribute("String_Node_Str")),NippleShape.valueOf(nipples.getAttribute("String_Node_Str")),Integer.valueOf(nipples.getAttribute("String_Node_Str")),Integer.valueOf(breasts.getAttribute("String_Node_Str")),Float.valueOf(nipples.getAttribute("String_Node_Str")),Integer.valueOf(nipples.getAttribute("String_Node_Str")),Integer.valueOf(nipples.getAttribute("String_Node_Str")),Boolean.valueOf(nipples.getAttribute("String_Node_Str")));
  try {
    importedBreast.milkStored=Integer.valueOf(breasts.getAttribute("String_Node_Str"));
    importedBreast.milkRegeneration=Integer.valueOf(breasts.getAttribute("String_Node_Str"));
  }
 catch (  Exception ex) {
  }
  importedBreast.nipples.orificeNipples.stretchedCapacity=(Float.valueOf(nipples.getAttribute("String_Node_Str")));
  importedBreast.nipples.pierced=(Boolean.valueOf(nipples.getAttribute("String_Node_Str")));
  importedBreast.nipples.areolaeShape=(AreolaeShape.valueOf(nipples.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedBreast.getType() + "String_Node_Str"+ importedBreast.getSize()+ "String_Node_Str"+ importedBreast.getRows()+ "String_Node_Str"+ importedBreast.getRawMilkStorageValue()+ "String_Node_Str"+ importedBreast.getNippleCountPerBreast()+ "String_Node_Str"+ "String_Node_Str"+ importedBreast.nipples.orificeNipples.getElasticity()+ "String_Node_Str"+ importedBreast.nipples.orificeNipples.getPlasticity()+ "String_Node_Str"+ importedBreast.nipples.orificeNipples.getRawCapacityValue()+ "String_Node_Str"+ importedBreast.nipples.orificeNipples.getStretchedCapacity()+ "String_Node_Str"+ importedBreast.nipples.orificeNipples.isVirgin()+ "String_Node_Str"+ importedBreast.nipples.isPierced()+ "String_Node_Str"+ importedBreast.nipples.getNippleSize()+ "String_Node_Str"+ importedBreast.nipples.getNippleShape()+ "String_Node_Str"+ importedBreast.nipples.getAreolaeSize()+ "String_Node_Str"+ importedBreast.nipples.getAreolaeShape()+ "String_Node_Str");
  Element nippleModifiersElement=(Element)nipples.getElementsByTagName("String_Node_Str").item(0);
  Collection<OrificeModifier> nippleOrificeModifiers=importedBreast.nipples.orificeNipples.orificeModifiers;
  nippleOrificeModifiers.clear();
  handleLoadingOfModifiers(OrificeModifier.values(),log,nippleModifiersElement,nippleOrificeModifiers);
  CharacterUtils.appendToImportLog(log,"String_Node_Str");
  importedBreast.milk=FluidMilk.loadFromXML(parentElement,doc);
  if (Main.isVersionOlderThan(Main.VERSION_NUMBER,"String_Node_Str")) {
    importedBreast.milk.type=importedBreast.getType().getFluidType();
  }
  Element ear=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Ear importedEar=new Ear(EarType.valueOf(ear.getAttribute("String_Node_Str")));
  importedEar.pierced=(Boolean.valueOf(ear.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedEar.getType() + "String_Node_Str"+ importedEar.isPierced());
  Element eye=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  String eyeTypeFromSave=eye.getAttribute("String_Node_Str");
  Map<String,String> eyeTypeConverterMap=new HashMap<>();
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  if (eyeTypeConverterMap.containsKey(eyeTypeFromSave)) {
    eyeTypeFromSave=eyeTypeConverterMap.get(eyeTypeFromSave);
  }
  Eye importedEye=new Eye(EyeType.valueOf(eyeTypeFromSave));
  importedEye.eyePairs=(Integer.valueOf(eye.getAttribute("String_Node_Str")));
  importedEye.irisShape=(EyeShape.valueOf(eye.getAttribute("String_Node_Str")));
  importedEye.pupilShape=(EyeShape.valueOf(eye.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedEye.getType() + "String_Node_Str"+ importedEye.getEyePairs()+ "String_Node_Str"+ importedEye.getIrisShape()+ "String_Node_Str"+ importedEye.getPupilShape());
  Element face=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Element mouth=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Face importedFace=new Face(FaceType.valueOf(face.getAttribute("String_Node_Str")),Integer.valueOf(mouth.getAttribute("String_Node_Str")));
  importedFace.piercedNose=(Boolean.valueOf(face.getAttribute("String_Node_Str")));
  try {
    importedFace.facialHair=(BodyHair.valueOf(face.getAttribute("String_Node_Str")));
  }
 catch (  IllegalArgumentException e) {
    importedFace.facialHair=BodyHair.ZERO_NONE;
    CharacterUtils.appendToImportLog(log,"String_Node_Str");
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedFace.getType() + "String_Node_Str"+ importedFace.isPiercedNose()+ "String_Node_Str"+ importedFace.getFacialHair()+ "String_Node_Str");
  importedFace.mouth.orificeMouth.elasticity=(Integer.valueOf(mouth.getAttribute("String_Node_Str")));
  importedFace.mouth.orificeMouth.plasticity=(Integer.valueOf(mouth.getAttribute("String_Node_Str")));
  importedFace.mouth.orificeMouth.capacity=(Float.valueOf(mouth.getAttribute("String_Node_Str")));
  try {
    importedFace.mouth.orificeMouth.wetness=(Integer.valueOf(mouth.getAttribute("String_Node_Str")));
  }
 catch (  Exception ex) {
  }
  importedFace.mouth.orificeMouth.stretchedCapacity=(Float.valueOf(mouth.getAttribute("String_Node_Str")));
  importedFace.mouth.orificeMouth.virgin=(Boolean.valueOf(mouth.getAttribute("String_Node_Str")));
  importedFace.mouth.piercedLip=(Boolean.valueOf(mouth.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + importedFace.mouth.orificeMouth.getElasticity() + "String_Node_Str"+ importedFace.mouth.orificeMouth.getPlasticity()+ "String_Node_Str"+ importedFace.mouth.orificeMouth.getCapacity()+ "String_Node_Str"+ importedFace.mouth.orificeMouth.getStretchedCapacity()+ "String_Node_Str"+ importedFace.mouth.orificeMouth.isVirgin()+ "String_Node_Str"+ importedFace.mouth.isPiercedLip()+ "String_Node_Str"+ importedFace.mouth.getLipSize()+ "String_Node_Str");
  Element mouthModifiersElement=(Element)mouth.getElementsByTagName("String_Node_Str").item(0);
  Collection<OrificeModifier> mouthOrificeModifiers=importedFace.mouth.orificeMouth.orificeModifiers;
  mouthOrificeModifiers.clear();
  handleLoadingOfModifiers(OrificeModifier.values(),log,mouthModifiersElement,mouthOrificeModifiers);
  Element tongue=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  importedFace.tongue.pierced=(Boolean.valueOf(tongue.getAttribute("String_Node_Str")));
  importedFace.tongue.tongueLength=(Integer.valueOf(tongue.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedFace.tongue.isPierced() + "String_Node_Str"+ importedFace.tongue.getTongueLength()+ "String_Node_Str");
  Element tongueModifiersElement=(Element)tongue.getElementsByTagName("String_Node_Str").item(0);
  Collection<TongueModifier> tongueModifiers=importedFace.tongue.tongueModifiers;
  tongueModifiers.clear();
  handleLoadingOfModifiers(TongueModifier.values(),log,tongueModifiersElement,tongueModifiers);
  Element hair=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  String hairTypeFromSave=hair.getAttribute("String_Node_Str");
  Map<String,String> hairTypeConverterMap=new HashMap<>();
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  if (hairTypeConverterMap.containsKey(hairTypeFromSave)) {
    hairTypeFromSave=hairTypeConverterMap.get(hairTypeFromSave);
  }
  Hair importedHair=new Hair(HairType.valueOf(hairTypeFromSave),Integer.valueOf(hair.getAttribute("String_Node_Str")),HairStyle.valueOf(hair.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedHair.getType() + "String_Node_Str"+ importedHair.getLength()+ "String_Node_Str"+ importedHair.getStyle());
  Element horn=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Horn importedHorn=new Horn(HornType.NONE,0);
  int rows=(Integer.valueOf(horn.getAttribute("String_Node_Str")));
  String hornType=horn.getAttribute("String_Node_Str");
  if (hornType.equals("String_Node_Str")) {
    hornType="String_Node_Str";
  }
  if (hornType.equals("String_Node_Str")) {
    hornType="String_Node_Str";
  }
  int length=0;
  if (!hornType.equals("String_Node_Str")) {
    length=HornLength.TWO_LONG.getMedianValue();
  }
  if (!horn.getAttribute("String_Node_Str").isEmpty()) {
    try {
      length=Integer.valueOf(horn.getAttribute("String_Node_Str"));
    }
 catch (    IllegalArgumentException e) {
    }
  }
  try {
    importedHorn=new Horn(HornType.valueOf(hornType),length);
    importedHorn.rows=rows;
    CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedHorn.getType() + "String_Node_Str"+ length+ "String_Node_Str"+ importedHorn.getHornRows());
  }
 catch (  IllegalArgumentException e) {
    if (horn.getAttribute("String_Node_Str").startsWith("String_Node_Str")) {
      importedHorn=new Horn(HornType.SWEPT_BACK,length);
      importedHorn.rows=rows;
    }
 else     if (horn.getAttribute("String_Node_Str").startsWith("String_Node_Str")) {
      importedHorn=new Horn(HornType.CURVED,length);
      importedHorn.rows=rows;
    }
    CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedHorn.getType() + "String_Node_Str"+ importedHorn.getHornRows());
  }
  Element leg=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Leg importedLeg=new Leg(LegType.valueOf(leg.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedLeg.getType());
  Element penis=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Element testicles=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  int girth=2;
  if (penis.getAttribute("String_Node_Str") != null && !penis.getAttribute("String_Node_Str").isEmpty()) {
    girth=Integer.valueOf(penis.getAttribute("String_Node_Str"));
  }
  int cumStorage=0;
  try {
    if (testicles.hasAttribute("String_Node_Str")) {
      cumStorage=Integer.valueOf(testicles.getAttribute("String_Node_Str"));
    }
 else {
      cumStorage=Integer.valueOf(testicles.getAttribute("String_Node_Str"));
    }
  }
 catch (  Exception ex) {
  }
  Penis importedPenis=new Penis(PenisType.valueOf(penis.getAttribute("String_Node_Str")),Integer.valueOf(penis.getAttribute("String_Node_Str")),girth,Integer.valueOf(testicles.getAttribute("String_Node_Str")),cumStorage,Integer.valueOf(testicles.getAttribute("String_Node_Str")));
  importedPenis.pierced=(Boolean.valueOf(penis.getAttribute("String_Node_Str")));
  if (!penis.getAttribute("String_Node_Str").isEmpty()) {
    importedPenis.virgin=(Boolean.valueOf(penis.getAttribute("String_Node_Str")));
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedPenis.getType() + "String_Node_Str"+ importedPenis.getRawSizeValue()+ "String_Node_Str"+ importedPenis.isPierced()+ "String_Node_Str");
  Collection<PenisModifier> penisModifiers=importedPenis.penisModifiers;
  penisModifiers.clear();
  Element penisModifiersElement=(Element)penis.getElementsByTagName("String_Node_Str").item(0);
  if (penisModifiersElement == null) {
    for (    PenisModifier pm : PenisModifier.values()) {
      CharacterUtils.appendToImportLog(log,"String_Node_Str" + pm.toString() + "String_Node_Str");
    }
  }
 else {
    handleLoadingOfModifiers(PenisModifier.values(),log,penisModifiersElement,penisModifiers);
  }
  importedPenis.orificeUrethra.elasticity=(Integer.valueOf(penis.getAttribute("String_Node_Str")));
  importedPenis.orificeUrethra.plasticity=(Integer.valueOf(penis.getAttribute("String_Node_Str")));
  importedPenis.orificeUrethra.capacity=(Float.valueOf(penis.getAttribute("String_Node_Str")));
  importedPenis.orificeUrethra.stretchedCapacity=(Float.valueOf(penis.getAttribute("String_Node_Str")));
  if (!penis.getAttribute("String_Node_Str").isEmpty()) {
    importedPenis.orificeUrethra.virgin=(Boolean.valueOf(penis.getAttribute("String_Node_Str")));
  }
 else {
    importedPenis.orificeUrethra.virgin=true;
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + importedPenis.orificeUrethra.getElasticity() + "String_Node_Str"+ importedPenis.orificeUrethra.getPlasticity()+ "String_Node_Str"+ importedPenis.orificeUrethra.getCapacity()+ "String_Node_Str"+ importedPenis.orificeUrethra.getStretchedCapacity()+ "String_Node_Str"+ importedPenis.orificeUrethra.isVirgin()+ "String_Node_Str");
  Element urethraModifiersElement=(Element)penis.getElementsByTagName("String_Node_Str").item(0);
  Collection<OrificeModifier> urethraOrificeModifiers=importedPenis.orificeUrethra.orificeModifiers;
  urethraOrificeModifiers.clear();
  handleLoadingOfModifiers(OrificeModifier.values(),log,urethraModifiersElement,urethraOrificeModifiers);
  importedPenis.testicle.internal=(Boolean.valueOf(testicles.getAttribute("String_Node_Str")));
  try {
    importedPenis.testicle.cumStored=(Integer.valueOf(testicles.getAttribute("String_Node_Str")));
    importedPenis.testicle.cumRegeneration=(Integer.valueOf(testicles.getAttribute("String_Node_Str")));
    importedPenis.testicle.cumExpulsion=(Float.valueOf(testicles.getAttribute("String_Node_Str")));
  }
 catch (  Exception ex) {
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedPenis.testicle.getCumStorage() + "String_Node_Str"+ importedPenis.testicle.getTesticleCount()+ "String_Node_Str"+ importedPenis.testicle.getTesticleSize()+ "String_Node_Str"+ importedPenis.testicle.isInternal());
  CharacterUtils.appendToImportLog(log,"String_Node_Str");
  importedPenis.testicle.cum=FluidCum.loadFromXML(parentElement,doc);
  if (Main.isVersionOlderThan(Main.VERSION_NUMBER,"String_Node_Str")) {
    importedPenis.testicle.cum.type=importedPenis.getType().getTesticleType().getFluidType();
  }
  Element skin=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  String skinTypeFromSave=skin.getAttribute("String_Node_Str");
  Map<String,String> skinTypeConverterMap=new HashMap<>();
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  if (skinTypeConverterMap.containsKey(skinTypeFromSave)) {
    skinTypeFromSave=skinTypeConverterMap.get(skinTypeFromSave);
  }
  Skin importedSkin=new Skin(SkinType.valueOf(skinTypeFromSave));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedSkin.getType());
  Element tail=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Tail importedTail=new Tail(TailType.valueOf(tail.getAttribute("String_Node_Str")));
  importedTail.tailCount=(Integer.valueOf(tail.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedTail.getType() + "String_Node_Str"+ importedTail.getTailCount());
  Element vagina=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Vagina importedVagina=new Vagina(VaginaType.valueOf(vagina.getAttribute("String_Node_Str")),(vagina.getAttribute("String_Node_Str").isEmpty() ? 1 : Integer.valueOf(vagina.getAttribute("String_Node_Str"))),Integer.valueOf(vagina.getAttribute("String_Node_Str")),Integer.valueOf(vagina.getAttribute("String_Node_Str")),Float.valueOf(vagina.getAttribute("String_Node_Str")),Integer.valueOf(vagina.getAttribute("String_Node_Str")),Integer.valueOf(vagina.getAttribute("String_Node_Str")),Boolean.valueOf(vagina.getAttribute("String_Node_Str")));
  importedVagina.pierced=(Boolean.valueOf(vagina.getAttribute("String_Node_Str")));
  importedVagina.orificeVagina.stretchedCapacity=(Float.valueOf(vagina.getAttribute("String_Node_Str")));
  try {
    importedVagina.orificeVagina.squirter=(Boolean.valueOf(vagina.getAttribute("String_Node_Str")));
  }
 catch (  Exception ex) {
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedVagina.getType() + "String_Node_Str"+ importedVagina.getClitorisSize()+ "String_Node_Str"+ importedVagina.isPierced()+ "String_Node_Str"+ importedVagina.orificeVagina.wetness+ "String_Node_Str"+ importedVagina.orificeVagina.getElasticity()+ "String_Node_Str"+ importedVagina.orificeVagina.getPlasticity()+ "String_Node_Str"+ importedVagina.orificeVagina.getCapacity()+ "String_Node_Str"+ importedVagina.orificeVagina.getStretchedCapacity()+ "String_Node_Str"+ importedVagina.orificeVagina.isVirgin());
  Element vaginaModifiers=(Element)vagina.getElementsByTagName("String_Node_Str").item(0);
  Collection<OrificeModifier> vaginaOrificeModifiers=importedVagina.orificeVagina.orificeModifiers;
  vaginaOrificeModifiers.clear();
  if (vaginaModifiers != null) {
    handleLoadingOfModifiers(OrificeModifier.values(),log,vaginaModifiers,vaginaOrificeModifiers);
  }
  try {
    importedVagina.orificeUrethra.elasticity=(Integer.valueOf(vagina.getAttribute("String_Node_Str")));
    importedVagina.orificeUrethra.plasticity=(Integer.valueOf(vagina.getAttribute("String_Node_Str")));
    importedVagina.orificeUrethra.capacity=(Float.valueOf(vagina.getAttribute("String_Node_Str")));
    importedVagina.orificeUrethra.stretchedCapacity=(Float.valueOf(vagina.getAttribute("String_Node_Str")));
    if (!vagina.getAttribute("String_Node_Str").isEmpty()) {
      importedVagina.orificeUrethra.virgin=(Boolean.valueOf(vagina.getAttribute("String_Node_Str")));
    }
 else {
      importedVagina.orificeUrethra.virgin=true;
    }
    urethraModifiersElement=(Element)vagina.getElementsByTagName("String_Node_Str").item(0);
    Collection<OrificeModifier> vaginaUrethraOrificeModifiers=importedVagina.orificeUrethra.orificeModifiers;
    vaginaUrethraOrificeModifiers.clear();
    handleLoadingOfModifiers(OrificeModifier.values(),log,urethraModifiersElement,vaginaUrethraOrificeModifiers);
  }
 catch (  Exception ex) {
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str");
  importedVagina.girlcum=FluidGirlCum.loadFromXML(parentElement,doc);
  if (Main.isVersionOlderThan(Main.VERSION_NUMBER,"String_Node_Str")) {
    importedVagina.girlcum.type=importedVagina.getType().getFluidType();
  }
  Element wing=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  int wingSize=0;
  if (!wing.getAttribute("String_Node_Str").isEmpty()) {
    wingSize=Integer.valueOf(wing.getAttribute("String_Node_Str"));
  }
  Wing importedWing=new Wing(WingType.valueOf(wing.getAttribute("String_Node_Str")),wingSize);
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedWing.getType() + "String_Node_Str"+ "String_Node_Str"+ importedWing.getSizeValue()+ "String_Node_Str");
  Body body=new Body.BodyBuilder(importedArm,importedAss,importedBreast,importedFace,importedEye,importedEar,importedHair,importedLeg,importedSkin,importedBodyMaterial,importedGenitalArrangement,importedHeight,importedFemininity,importedBodySize,importedMuscle).vagina(importedVagina).penis(importedPenis).horn(importedHorn).antenna(importedAntenna).tail(importedTail).wing(importedWing).build();
  body.setPiercedStomach(Boolean.valueOf(element.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + Boolean.valueOf(element.getAttribute("String_Node_Str")));
  if (element.getAttribute("String_Node_Str") != null && !element.getAttribute("String_Node_Str").isEmpty()) {
    try {
      body.setPubicHair(BodyHair.valueOf(element.getAttribute("String_Node_Str")));
      CharacterUtils.appendToImportLog(log,"String_Node_Str" + body.getPubicHair());
    }
 catch (    IllegalArgumentException e) {
      body.pubicHair=BodyHair.ZERO_NONE;
      CharacterUtils.appendToImportLog(log,"String_Node_Str");
    }
  }
  for (int i=0; i < element.getElementsByTagName("String_Node_Str").getLength(); i++) {
    Element e=((Element)element.getElementsByTagName("String_Node_Str").item(i));
    String type=e.getAttribute("String_Node_Str");
    if (type.equals("String_Node_Str") || type.equals("String_Node_Str")) {
      type="String_Node_Str";
    }
    try {
      String colourPrimary=e.getAttribute("String_Node_Str");
      String colourSecondary=e.getAttribute("String_Node_Str");
      if (type.startsWith("String_Node_Str")) {
        if (colourPrimary.equals("String_Node_Str")) {
          colourPrimary="String_Node_Str";
        }
        if (colourSecondary.equals("String_Node_Str")) {
          colourSecondary="String_Node_Str";
        }
      }
      if (e.getAttribute("String_Node_Str").isEmpty()) {
        body.setBodyCoveringForXMLImport(BodyCoveringType.valueOf(type),CoveringPattern.valueOf(e.getAttribute("String_Node_Str")),Colour.valueOf(colourPrimary),!e.getAttribute("String_Node_Str").isEmpty() ? Boolean.valueOf(e.getAttribute("String_Node_Str")) : false,Colour.valueOf(colourSecondary),!e.getAttribute("String_Node_Str").isEmpty() ? Boolean.valueOf(e.getAttribute("String_Node_Str")) : false);
      }
 else {
        BodyCoveringType coveringType=BodyCoveringType.valueOf(type);
        CoveringModifier modifier=CoveringModifier.valueOf(e.getAttribute("String_Node_Str"));
        body.setBodyCoveringForXMLImport(coveringType,CoveringPattern.valueOf(e.getAttribute("String_Node_Str")),coveringType.getNaturalModifiers().contains(modifier) || coveringType.getExtraModifiers().contains(modifier) ? modifier : coveringType.getNaturalModifiers().get(0),Colour.valueOf(colourPrimary),!e.getAttribute("String_Node_Str").isEmpty() ? Boolean.valueOf(e.getAttribute("String_Node_Str")) : false,Colour.valueOf(colourSecondary),!e.getAttribute("String_Node_Str").isEmpty() ? Boolean.valueOf(e.getAttribute("String_Node_Str")) : false);
      }
      if (!e.getAttribute("String_Node_Str").isEmpty() && Boolean.valueOf(e.getAttribute("String_Node_Str"))) {
        body.getBodyCoveringTypesDiscovered().add(BodyCoveringType.valueOf(type));
      }
      CharacterUtils.appendToImportLog(log,"String_Node_Str" + e.getAttribute("String_Node_Str") + "String_Node_Str"+ CoveringPattern.valueOf(e.getAttribute("String_Node_Str"))+ "String_Node_Str"+ Colour.valueOf(e.getAttribute("String_Node_Str"))+ "String_Node_Str"+ Boolean.valueOf(e.getAttribute("String_Node_Str"))+ "String_Node_Str"+ Colour.valueOf(e.getAttribute("String_Node_Str"))+ "String_Node_Str"+ Boolean.valueOf(e.getAttribute("String_Node_Str"))+ "String_Node_Str"+ e.getAttribute("String_Node_Str")+ "String_Node_Str");
    }
 catch (    Exception ex) {
    }
  }
  body.calculateRace();
  return body;
}

Fixed version (ground truth):
public static Body loadFromXML(StringBuilder log,Element parentElement,Document doc){
  Element element=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  int importedFemininity=(Integer.valueOf(element.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + Integer.valueOf(element.getAttribute("String_Node_Str")));
  int importedHeight=(Integer.valueOf(element.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + Integer.valueOf(element.getAttribute("String_Node_Str")));
  int importedBodySize=(Integer.valueOf(element.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + Integer.valueOf(element.getAttribute("String_Node_Str")));
  int importedMuscle=(Integer.valueOf(element.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + Integer.valueOf(element.getAttribute("String_Node_Str")));
  GenitalArrangement importedGenitalArrangement=GenitalArrangement.NORMAL;
  if (element.getAttribute("String_Node_Str") != null && !element.getAttribute("String_Node_Str").isEmpty()) {
    importedGenitalArrangement=GenitalArrangement.valueOf(element.getAttribute("String_Node_Str"));
  }
  BodyMaterial importedBodyMaterial=BodyMaterial.FLESH;
  if (element.getAttribute("String_Node_Str") != null && !element.getAttribute("String_Node_Str").isEmpty()) {
    importedBodyMaterial=BodyMaterial.valueOf(element.getAttribute("String_Node_Str"));
  }
  Element antennae=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Antenna importedAntenna=new Antenna(AntennaType.valueOf(antennae.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedAntenna.getType());
  importedAntenna.rows=Integer.valueOf(antennae.getAttribute("String_Node_Str"));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + importedAntenna.getAntennaRows());
  Element arm=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Arm importedArm=new Arm(ArmType.valueOf(arm.getAttribute("String_Node_Str")),Integer.valueOf(arm.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedArm.getType());
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + importedArm.getArmRows());
  try {
    importedArm.underarmHair=BodyHair.valueOf(arm.getAttribute("String_Node_Str"));
    CharacterUtils.appendToImportLog(log,"String_Node_Str" + importedArm.getUnderarmHair());
  }
 catch (  IllegalArgumentException e) {
    importedArm.underarmHair=BodyHair.ZERO_NONE;
    CharacterUtils.appendToImportLog(log,"String_Node_Str");
  }
  Element ass=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Element anus=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Ass importedAss=new Ass(AssType.valueOf(ass.getAttribute("String_Node_Str")),Integer.valueOf(ass.getAttribute("String_Node_Str")),Integer.valueOf(anus.getAttribute("String_Node_Str")),Float.valueOf(anus.getAttribute("String_Node_Str")),Integer.valueOf(anus.getAttribute("String_Node_Str")),Integer.valueOf(anus.getAttribute("String_Node_Str")),Boolean.valueOf(anus.getAttribute("String_Node_Str")));
  importedAss.hipSize=Integer.valueOf(ass.getAttribute("String_Node_Str"));
  importedAss.anus.orificeAnus.stretchedCapacity=(Float.valueOf(anus.getAttribute("String_Node_Str")));
  importedAss.anus.bleached=(Boolean.valueOf(anus.getAttribute("String_Node_Str")));
  try {
    importedAss.anus.assHair=(BodyHair.valueOf(anus.getAttribute("String_Node_Str")));
  }
 catch (  IllegalArgumentException e) {
    importedAss.anus.assHair=BodyHair.ZERO_NONE;
    CharacterUtils.appendToImportLog(log,"String_Node_Str");
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedAss.getType() + "String_Node_Str"+ importedAss.getAssSize()+ "String_Node_Str"+ importedAss.getHipSize());
  if (anus != null) {
    CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedAss.anus.orificeAnus.wetness + "String_Node_Str"+ importedAss.anus.orificeAnus.elasticity+ "String_Node_Str"+ importedAss.anus.orificeAnus.plasticity+ "String_Node_Str"+ importedAss.anus.orificeAnus.capacity+ "String_Node_Str"+ importedAss.anus.orificeAnus.stretchedCapacity+ "String_Node_Str"+ importedAss.anus.orificeAnus.virgin+ "String_Node_Str"+ importedAss.anus.bleached+ "String_Node_Str"+ importedAss.anus.assHair+ "String_Node_Str");
    Element anusModifiersElement=(Element)anus.getElementsByTagName("String_Node_Str").item(0);
    Collection<OrificeModifier> anusModifiers=importedAss.anus.orificeAnus.orificeModifiers;
    anusModifiers.clear();
    handleLoadingOfModifiers(OrificeModifier.values(),log,anusModifiersElement,anusModifiers);
  }
  Element breasts=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Element nipples=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  BreastShape breastShape=BreastShape.ROUND;
  try {
    breastShape=BreastShape.valueOf(breasts.getAttribute("String_Node_Str"));
  }
 catch (  Exception e) {
  }
  int milkStorage=0;
  try {
    if (!breasts.getAttribute("String_Node_Str").isEmpty()) {
      milkStorage=Integer.valueOf(breasts.getAttribute("String_Node_Str"));
    }
 else {
      milkStorage=Integer.valueOf(breasts.getAttribute("String_Node_Str"));
    }
  }
 catch (  Exception ex) {
  }
  Breast importedBreast=new Breast(BreastType.valueOf(breasts.getAttribute("String_Node_Str")),breastShape,Integer.valueOf(breasts.getAttribute("String_Node_Str")),milkStorage,Integer.valueOf(breasts.getAttribute("String_Node_Str")),Integer.valueOf(nipples.getAttribute("String_Node_Str")),NippleShape.valueOf(nipples.getAttribute("String_Node_Str")),Integer.valueOf(nipples.getAttribute("String_Node_Str")),Integer.valueOf(breasts.getAttribute("String_Node_Str")),Float.valueOf(nipples.getAttribute("String_Node_Str")),Integer.valueOf(nipples.getAttribute("String_Node_Str")),Integer.valueOf(nipples.getAttribute("String_Node_Str")),Boolean.valueOf(nipples.getAttribute("String_Node_Str")));
  try {
    importedBreast.milkStored=Integer.valueOf(breasts.getAttribute("String_Node_Str"));
    importedBreast.milkRegeneration=Integer.valueOf(breasts.getAttribute("String_Node_Str"));
  }
 catch (  Exception ex) {
  }
  importedBreast.nipples.orificeNipples.stretchedCapacity=(Float.valueOf(nipples.getAttribute("String_Node_Str")));
  importedBreast.nipples.pierced=(Boolean.valueOf(nipples.getAttribute("String_Node_Str")));
  importedBreast.nipples.areolaeShape=(AreolaeShape.valueOf(nipples.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedBreast.getType() + "String_Node_Str"+ importedBreast.getSize()+ "String_Node_Str"+ importedBreast.getRows()+ "String_Node_Str"+ importedBreast.getRawMilkStorageValue()+ "String_Node_Str"+ importedBreast.getNippleCountPerBreast()+ "String_Node_Str"+ "String_Node_Str"+ importedBreast.nipples.orificeNipples.getElasticity()+ "String_Node_Str"+ importedBreast.nipples.orificeNipples.getPlasticity()+ "String_Node_Str"+ importedBreast.nipples.orificeNipples.getRawCapacityValue()+ "String_Node_Str"+ importedBreast.nipples.orificeNipples.getStretchedCapacity()+ "String_Node_Str"+ importedBreast.nipples.orificeNipples.isVirgin()+ "String_Node_Str"+ importedBreast.nipples.isPierced()+ "String_Node_Str"+ importedBreast.nipples.getNippleSize()+ "String_Node_Str"+ importedBreast.nipples.getNippleShape()+ "String_Node_Str"+ importedBreast.nipples.getAreolaeSize()+ "String_Node_Str"+ importedBreast.nipples.getAreolaeShape()+ "String_Node_Str");
  Element nippleModifiersElement=(Element)nipples.getElementsByTagName("String_Node_Str").item(0);
  Collection<OrificeModifier> nippleOrificeModifiers=importedBreast.nipples.orificeNipples.orificeModifiers;
  nippleOrificeModifiers.clear();
  handleLoadingOfModifiers(OrificeModifier.values(),log,nippleModifiersElement,nippleOrificeModifiers);
  CharacterUtils.appendToImportLog(log,"String_Node_Str");
  importedBreast.milk=FluidMilk.loadFromXML(parentElement,doc);
  if (Main.isVersionOlderThan(Main.VERSION_NUMBER,"String_Node_Str")) {
    importedBreast.milk.type=importedBreast.getType().getFluidType();
  }
  Element ear=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Ear importedEar=new Ear(EarType.valueOf(ear.getAttribute("String_Node_Str")));
  importedEar.pierced=(Boolean.valueOf(ear.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedEar.getType() + "String_Node_Str"+ importedEar.isPierced());
  Element eye=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  String eyeTypeFromSave=eye.getAttribute("String_Node_Str");
  Map<String,String> eyeTypeConverterMap=new HashMap<>();
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  eyeTypeConverterMap.put("String_Node_Str","String_Node_Str");
  if (eyeTypeConverterMap.containsKey(eyeTypeFromSave)) {
    eyeTypeFromSave=eyeTypeConverterMap.get(eyeTypeFromSave);
  }
  Eye importedEye=new Eye(EyeType.valueOf(eyeTypeFromSave));
  importedEye.eyePairs=(Integer.valueOf(eye.getAttribute("String_Node_Str")));
  importedEye.irisShape=(EyeShape.valueOf(eye.getAttribute("String_Node_Str")));
  importedEye.pupilShape=(EyeShape.valueOf(eye.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedEye.getType() + "String_Node_Str"+ importedEye.getEyePairs()+ "String_Node_Str"+ importedEye.getIrisShape()+ "String_Node_Str"+ importedEye.getPupilShape());
  Element face=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Element mouth=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Face importedFace=new Face(FaceType.valueOf(face.getAttribute("String_Node_Str")),Integer.valueOf(mouth.getAttribute("String_Node_Str")));
  importedFace.piercedNose=(Boolean.valueOf(face.getAttribute("String_Node_Str")));
  try {
    importedFace.facialHair=(BodyHair.valueOf(face.getAttribute("String_Node_Str")));
  }
 catch (  IllegalArgumentException e) {
    importedFace.facialHair=BodyHair.ZERO_NONE;
    CharacterUtils.appendToImportLog(log,"String_Node_Str");
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedFace.getType() + "String_Node_Str"+ importedFace.isPiercedNose()+ "String_Node_Str"+ importedFace.getFacialHair()+ "String_Node_Str");
  importedFace.mouth.orificeMouth.elasticity=(Integer.valueOf(mouth.getAttribute("String_Node_Str")));
  importedFace.mouth.orificeMouth.plasticity=(Integer.valueOf(mouth.getAttribute("String_Node_Str")));
  importedFace.mouth.orificeMouth.capacity=(Float.valueOf(mouth.getAttribute("String_Node_Str")));
  try {
    importedFace.mouth.orificeMouth.wetness=(Integer.valueOf(mouth.getAttribute("String_Node_Str")));
  }
 catch (  Exception ex) {
  }
  importedFace.mouth.orificeMouth.stretchedCapacity=(Float.valueOf(mouth.getAttribute("String_Node_Str")));
  importedFace.mouth.orificeMouth.virgin=(Boolean.valueOf(mouth.getAttribute("String_Node_Str")));
  importedFace.mouth.piercedLip=(Boolean.valueOf(mouth.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + importedFace.mouth.orificeMouth.getElasticity() + "String_Node_Str"+ importedFace.mouth.orificeMouth.getPlasticity()+ "String_Node_Str"+ importedFace.mouth.orificeMouth.getCapacity()+ "String_Node_Str"+ importedFace.mouth.orificeMouth.getStretchedCapacity()+ "String_Node_Str"+ importedFace.mouth.orificeMouth.isVirgin()+ "String_Node_Str"+ importedFace.mouth.isPiercedLip()+ "String_Node_Str"+ importedFace.mouth.getLipSize()+ "String_Node_Str");
  Element mouthModifiersElement=(Element)mouth.getElementsByTagName("String_Node_Str").item(0);
  Collection<OrificeModifier> mouthOrificeModifiers=importedFace.mouth.orificeMouth.orificeModifiers;
  mouthOrificeModifiers.clear();
  handleLoadingOfModifiers(OrificeModifier.values(),log,mouthModifiersElement,mouthOrificeModifiers);
  Element tongue=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  importedFace.tongue.pierced=(Boolean.valueOf(tongue.getAttribute("String_Node_Str")));
  importedFace.tongue.tongueLength=(Integer.valueOf(tongue.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedFace.tongue.isPierced() + "String_Node_Str"+ importedFace.tongue.getTongueLength()+ "String_Node_Str");
  Element tongueModifiersElement=(Element)tongue.getElementsByTagName("String_Node_Str").item(0);
  Collection<TongueModifier> tongueModifiers=importedFace.tongue.tongueModifiers;
  tongueModifiers.clear();
  handleLoadingOfModifiers(TongueModifier.values(),log,tongueModifiersElement,tongueModifiers);
  Element hair=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  String hairTypeFromSave=hair.getAttribute("String_Node_Str");
  Map<String,String> hairTypeConverterMap=new HashMap<>();
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  hairTypeConverterMap.put("String_Node_Str","String_Node_Str");
  if (hairTypeConverterMap.containsKey(hairTypeFromSave)) {
    hairTypeFromSave=hairTypeConverterMap.get(hairTypeFromSave);
  }
  Hair importedHair=new Hair(HairType.valueOf(hairTypeFromSave),Integer.valueOf(hair.getAttribute("String_Node_Str")),HairStyle.valueOf(hair.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedHair.getType() + "String_Node_Str"+ importedHair.getLength()+ "String_Node_Str"+ importedHair.getStyle());
  Element horn=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Horn importedHorn=new Horn(HornType.NONE,0);
  int rows=(Integer.valueOf(horn.getAttribute("String_Node_Str")));
  String hornType=horn.getAttribute("String_Node_Str");
  if (hornType.equals("String_Node_Str")) {
    hornType="String_Node_Str";
  }
  if (hornType.equals("String_Node_Str")) {
    hornType="String_Node_Str";
  }
  int length=0;
  if (!hornType.equals("String_Node_Str")) {
    length=HornLength.TWO_LONG.getMedianValue();
  }
  if (!horn.getAttribute("String_Node_Str").isEmpty()) {
    try {
      length=Integer.valueOf(horn.getAttribute("String_Node_Str"));
    }
 catch (    IllegalArgumentException e) {
    }
  }
  try {
    importedHorn=new Horn(HornType.valueOf(hornType),length);
    importedHorn.rows=rows;
    CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedHorn.getType() + "String_Node_Str"+ length+ "String_Node_Str"+ importedHorn.getHornRows());
  }
 catch (  IllegalArgumentException e) {
    if (horn.getAttribute("String_Node_Str").startsWith("String_Node_Str")) {
      importedHorn=new Horn(HornType.SWEPT_BACK,length);
      importedHorn.rows=rows;
    }
 else     if (horn.getAttribute("String_Node_Str").startsWith("String_Node_Str")) {
      importedHorn=new Horn(HornType.CURVED,length);
      importedHorn.rows=rows;
    }
    CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedHorn.getType() + "String_Node_Str"+ importedHorn.getHornRows());
  }
  Element leg=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Leg importedLeg=new Leg(LegType.valueOf(leg.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedLeg.getType());
  Element penis=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Element testicles=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  int girth=2;
  if (penis.getAttribute("String_Node_Str") != null && !penis.getAttribute("String_Node_Str").isEmpty()) {
    girth=Integer.valueOf(penis.getAttribute("String_Node_Str"));
  }
  int cumStorage=0;
  try {
    if (testicles.hasAttribute("String_Node_Str")) {
      cumStorage=Integer.valueOf(testicles.getAttribute("String_Node_Str"));
    }
 else {
      cumStorage=Integer.valueOf(testicles.getAttribute("String_Node_Str"));
    }
  }
 catch (  Exception ex) {
  }
  Penis importedPenis=new Penis(PenisType.valueOf(penis.getAttribute("String_Node_Str")),Integer.valueOf(penis.getAttribute("String_Node_Str")),girth,Integer.valueOf(testicles.getAttribute("String_Node_Str")),cumStorage,Integer.valueOf(testicles.getAttribute("String_Node_Str")));
  importedPenis.pierced=(Boolean.valueOf(penis.getAttribute("String_Node_Str")));
  if (!penis.getAttribute("String_Node_Str").isEmpty()) {
    importedPenis.virgin=(Boolean.valueOf(penis.getAttribute("String_Node_Str")));
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedPenis.getType() + "String_Node_Str"+ importedPenis.getRawSizeValue()+ "String_Node_Str"+ importedPenis.isPierced()+ "String_Node_Str");
  Collection<PenisModifier> penisModifiers=importedPenis.penisModifiers;
  penisModifiers.clear();
  Element penisModifiersElement=(Element)penis.getElementsByTagName("String_Node_Str").item(0);
  if (penisModifiersElement == null) {
    for (    PenisModifier pm : PenisModifier.values()) {
      CharacterUtils.appendToImportLog(log,"String_Node_Str" + pm.toString() + "String_Node_Str");
    }
  }
 else {
    handleLoadingOfModifiers(PenisModifier.values(),log,penisModifiersElement,penisModifiers);
  }
  importedPenis.orificeUrethra.elasticity=(Integer.valueOf(penis.getAttribute("String_Node_Str")));
  importedPenis.orificeUrethra.plasticity=(Integer.valueOf(penis.getAttribute("String_Node_Str")));
  importedPenis.orificeUrethra.capacity=(Float.valueOf(penis.getAttribute("String_Node_Str")));
  importedPenis.orificeUrethra.stretchedCapacity=(Float.valueOf(penis.getAttribute("String_Node_Str")));
  if (!penis.getAttribute("String_Node_Str").isEmpty()) {
    importedPenis.orificeUrethra.virgin=(Boolean.valueOf(penis.getAttribute("String_Node_Str")));
  }
 else {
    importedPenis.orificeUrethra.virgin=true;
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + importedPenis.orificeUrethra.getElasticity() + "String_Node_Str"+ importedPenis.orificeUrethra.getPlasticity()+ "String_Node_Str"+ importedPenis.orificeUrethra.getCapacity()+ "String_Node_Str"+ importedPenis.orificeUrethra.getStretchedCapacity()+ "String_Node_Str"+ importedPenis.orificeUrethra.isVirgin()+ "String_Node_Str");
  Element urethraModifiersElement=(Element)penis.getElementsByTagName("String_Node_Str").item(0);
  Collection<OrificeModifier> urethraOrificeModifiers=importedPenis.orificeUrethra.orificeModifiers;
  urethraOrificeModifiers.clear();
  handleLoadingOfModifiers(OrificeModifier.values(),log,urethraModifiersElement,urethraOrificeModifiers);
  importedPenis.testicle.internal=(Boolean.valueOf(testicles.getAttribute("String_Node_Str")));
  try {
    importedPenis.testicle.cumStored=(Integer.valueOf(testicles.getAttribute("String_Node_Str")));
    importedPenis.testicle.cumRegeneration=(Integer.valueOf(testicles.getAttribute("String_Node_Str")));
    importedPenis.testicle.cumExpulsion=(Integer.valueOf(testicles.getAttribute("String_Node_Str")));
  }
 catch (  Exception ex) {
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedPenis.testicle.getCumStorage() + "String_Node_Str"+ importedPenis.testicle.getTesticleCount()+ "String_Node_Str"+ importedPenis.testicle.getTesticleSize()+ "String_Node_Str"+ importedPenis.testicle.isInternal());
  CharacterUtils.appendToImportLog(log,"String_Node_Str");
  importedPenis.testicle.cum=FluidCum.loadFromXML(parentElement,doc);
  if (Main.isVersionOlderThan(Main.VERSION_NUMBER,"String_Node_Str")) {
    importedPenis.testicle.cum.type=importedPenis.getType().getTesticleType().getFluidType();
  }
  Element skin=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  String skinTypeFromSave=skin.getAttribute("String_Node_Str");
  Map<String,String> skinTypeConverterMap=new HashMap<>();
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  skinTypeConverterMap.put("String_Node_Str","String_Node_Str");
  if (skinTypeConverterMap.containsKey(skinTypeFromSave)) {
    skinTypeFromSave=skinTypeConverterMap.get(skinTypeFromSave);
  }
  Skin importedSkin=new Skin(SkinType.valueOf(skinTypeFromSave));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedSkin.getType());
  Element tail=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Tail importedTail=new Tail(TailType.valueOf(tail.getAttribute("String_Node_Str")));
  importedTail.tailCount=(Integer.valueOf(tail.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedTail.getType() + "String_Node_Str"+ importedTail.getTailCount());
  Element vagina=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  Vagina importedVagina=new Vagina(VaginaType.valueOf(vagina.getAttribute("String_Node_Str")),(vagina.getAttribute("String_Node_Str").isEmpty() ? 1 : Integer.valueOf(vagina.getAttribute("String_Node_Str"))),Integer.valueOf(vagina.getAttribute("String_Node_Str")),Integer.valueOf(vagina.getAttribute("String_Node_Str")),Float.valueOf(vagina.getAttribute("String_Node_Str")),Integer.valueOf(vagina.getAttribute("String_Node_Str")),Integer.valueOf(vagina.getAttribute("String_Node_Str")),Boolean.valueOf(vagina.getAttribute("String_Node_Str")));
  importedVagina.pierced=(Boolean.valueOf(vagina.getAttribute("String_Node_Str")));
  importedVagina.orificeVagina.stretchedCapacity=(Float.valueOf(vagina.getAttribute("String_Node_Str")));
  try {
    importedVagina.orificeVagina.squirter=(Boolean.valueOf(vagina.getAttribute("String_Node_Str")));
  }
 catch (  Exception ex) {
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedVagina.getType() + "String_Node_Str"+ importedVagina.getClitorisSize()+ "String_Node_Str"+ importedVagina.isPierced()+ "String_Node_Str"+ importedVagina.orificeVagina.wetness+ "String_Node_Str"+ importedVagina.orificeVagina.getElasticity()+ "String_Node_Str"+ importedVagina.orificeVagina.getPlasticity()+ "String_Node_Str"+ importedVagina.orificeVagina.getCapacity()+ "String_Node_Str"+ importedVagina.orificeVagina.getStretchedCapacity()+ "String_Node_Str"+ importedVagina.orificeVagina.isVirgin());
  Element vaginaModifiers=(Element)vagina.getElementsByTagName("String_Node_Str").item(0);
  Collection<OrificeModifier> vaginaOrificeModifiers=importedVagina.orificeVagina.orificeModifiers;
  vaginaOrificeModifiers.clear();
  if (vaginaModifiers != null) {
    handleLoadingOfModifiers(OrificeModifier.values(),log,vaginaModifiers,vaginaOrificeModifiers);
  }
  try {
    importedVagina.orificeUrethra.elasticity=(Integer.valueOf(vagina.getAttribute("String_Node_Str")));
    importedVagina.orificeUrethra.plasticity=(Integer.valueOf(vagina.getAttribute("String_Node_Str")));
    importedVagina.orificeUrethra.capacity=(Float.valueOf(vagina.getAttribute("String_Node_Str")));
    importedVagina.orificeUrethra.stretchedCapacity=(Float.valueOf(vagina.getAttribute("String_Node_Str")));
    if (!vagina.getAttribute("String_Node_Str").isEmpty()) {
      importedVagina.orificeUrethra.virgin=(Boolean.valueOf(vagina.getAttribute("String_Node_Str")));
    }
 else {
      importedVagina.orificeUrethra.virgin=true;
    }
    urethraModifiersElement=(Element)vagina.getElementsByTagName("String_Node_Str").item(0);
    Collection<OrificeModifier> vaginaUrethraOrificeModifiers=importedVagina.orificeUrethra.orificeModifiers;
    vaginaUrethraOrificeModifiers.clear();
    handleLoadingOfModifiers(OrificeModifier.values(),log,urethraModifiersElement,vaginaUrethraOrificeModifiers);
  }
 catch (  Exception ex) {
  }
  CharacterUtils.appendToImportLog(log,"String_Node_Str");
  importedVagina.girlcum=FluidGirlCum.loadFromXML(parentElement,doc);
  if (Main.isVersionOlderThan(Main.VERSION_NUMBER,"String_Node_Str")) {
    importedVagina.girlcum.type=importedVagina.getType().getFluidType();
  }
  Element wing=(Element)parentElement.getElementsByTagName("String_Node_Str").item(0);
  int wingSize=0;
  if (!wing.getAttribute("String_Node_Str").isEmpty()) {
    wingSize=Integer.valueOf(wing.getAttribute("String_Node_Str"));
  }
  Wing importedWing=new Wing(WingType.valueOf(wing.getAttribute("String_Node_Str")),wingSize);
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + "String_Node_Str" + importedWing.getType() + "String_Node_Str"+ "String_Node_Str"+ importedWing.getSizeValue()+ "String_Node_Str");
  Body body=new Body.BodyBuilder(importedArm,importedAss,importedBreast,importedFace,importedEye,importedEar,importedHair,importedLeg,importedSkin,importedBodyMaterial,importedGenitalArrangement,importedHeight,importedFemininity,importedBodySize,importedMuscle).vagina(importedVagina).penis(importedPenis).horn(importedHorn).antenna(importedAntenna).tail(importedTail).wing(importedWing).build();
  body.setPiercedStomach(Boolean.valueOf(element.getAttribute("String_Node_Str")));
  CharacterUtils.appendToImportLog(log,"String_Node_Str" + Boolean.valueOf(element.getAttribute("String_Node_Str")));
  if (element.getAttribute("String_Node_Str") != null && !element.getAttribute("String_Node_Str").isEmpty()) {
    try {
      body.setPubicHair(BodyHair.valueOf(element.getAttribute("String_Node_Str")));
      CharacterUtils.appendToImportLog(log,"String_Node_Str" + body.getPubicHair());
    }
 catch (    IllegalArgumentException e) {
      body.pubicHair=BodyHair.ZERO_NONE;
      CharacterUtils.appendToImportLog(log,"String_Node_Str");
    }
  }
  for (int i=0; i < element.getElementsByTagName("String_Node_Str").getLength(); i++) {
    Element e=((Element)element.getElementsByTagName("String_Node_Str").item(i));
    String type=e.getAttribute("String_Node_Str");
    if (type.equals("String_Node_Str") || type.equals("String_Node_Str")) {
      type="String_Node_Str";
    }
    try {
      String colourPrimary=e.getAttribute("String_Node_Str");
      String colourSecondary=e.getAttribute("String_Node_Str");
      if (type.startsWith("String_Node_Str")) {
        if (colourPrimary.equals("String_Node_Str")) {
          colourPrimary="String_Node_Str";
        }
        if (colourSecondary.equals("String_Node_Str")) {
          colourSecondary="String_Node_Str";
        }
      }
      if (e.getAttribute("String_Node_Str").isEmpty()) {
        body.setBodyCoveringForXMLImport(BodyCoveringType.valueOf(type),CoveringPattern.valueOf(e.getAttribute("String_Node_Str")),Colour.valueOf(colourPrimary),!e.getAttribute("String_Node_Str").isEmpty() ? Boolean.valueOf(e.getAttribute("String_Node_Str")) : false,Colour.valueOf(colourSecondary),!e.getAttribute("String_Node_Str").isEmpty() ? Boolean.valueOf(e.getAttribute("String_Node_Str")) : false);
      }
 else {
        BodyCoveringType coveringType=BodyCoveringType.valueOf(type);
        CoveringModifier modifier=CoveringModifier.valueOf(e.getAttribute("String_Node_Str"));
        body.setBodyCoveringForXMLImport(coveringType,CoveringPattern.valueOf(e.getAttribute("String_Node_Str")),coveringType.getNaturalModifiers().contains(modifier) || coveringType.getExtraModifiers().contains(modifier) ? modifier : coveringType.getNaturalModifiers().get(0),Colour.valueOf(colourPrimary),!e.getAttribute("String_Node_Str").isEmpty() ? Boolean.valueOf(e.getAttribute("String_Node_Str")) : false,Colour.valueOf(colourSecondary),!e.getAttribute("String_Node_Str").isEmpty() ? Boolean.valueOf(e.getAttribute("String_Node_Str")) : false);
      }
      if (!e.getAttribute("String_Node_Str").isEmpty() && Boolean.valueOf(e.getAttribute("String_Node_Str"))) {
        body.getBodyCoveringTypesDiscovered().add(BodyCoveringType.valueOf(type));
      }
      CharacterUtils.appendToImportLog(log,"String_Node_Str" + e.getAttribute("String_Node_Str") + "String_Node_Str"+ CoveringPattern.valueOf(e.getAttribute("String_Node_Str"))+ "String_Node_Str"+ Colour.valueOf(e.getAttribute("String_Node_Str"))+ "String_Node_Str"+ Boolean.valueOf(e.getAttribute("String_Node_Str"))+ "String_Node_Str"+ Colour.valueOf(e.getAttribute("String_Node_Str"))+ "String_Node_Str"+ Boolean.valueOf(e.getAttribute("String_Node_Str"))+ "String_Node_Str"+ e.getAttribute("String_Node_Str")+ "String_Node_Str");
    }
 catch (    Exception ex) {
    }
  }
  body.calculateRace();
  return body;
}