#vulnerable code 
                              @Test
  public void testOverridenFields() throws Exception {
    MappingFileReader fileReader = new MappingFileReader("overridemapping.xml");
    MappingFileData mappingFileData = fileReader.read();
    MappingsParser mappingsParser = MappingsParser.getInstance();
    mappingsParser.processMappings(mappingFileData.getClassMaps(), mappingFileData.getConfiguration());
    // validate class mappings
    Iterator<?> iter = mappingFileData.getClassMaps().iterator();
    while (iter.hasNext()) {
      ClassMap classMap = (ClassMap) iter.next();
      if (classMap.getSrcClassToMap().getName().equals("net.sf.dozer.util.mapping.vo.FurtherTestObject")) {
        assertTrue(classMap.isStopOnErrors());
      }
      if (classMap.getSrcClassToMap().getName().equals("net.sf.dozer.util.mapping.vo.SuperSuperSuperClass")) {
        assertTrue(classMap.isWildcard());
      }
      if (classMap.getSrcClassToMap().getName().equals("net.sf.dozer.util.mapping.vo.TestObject")) {
        assertTrue(!(classMap.getFieldMaps().get(0)).isCopyByReference());
      }
    }
  } 
                            #location 4 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                              @Test
  public void testOverridenFields() throws Exception {
    MappingFileReader fileReader = new MappingFileReader(XMLParserFactory.getInstance());
    MappingFileData mappingFileData = fileReader.read("overridemapping.xml");
    MappingsParser mappingsParser = MappingsParser.getInstance();
    mappingsParser.processMappings(mappingFileData.getClassMaps(), mappingFileData.getConfiguration());
    // validate class mappings
    for (ClassMap classMap : mappingFileData.getClassMaps()) {
      if (classMap.getSrcClassToMap().getName().equals("net.sf.dozer.util.mapping.vo.FurtherTestObject")) {
        assertTrue(classMap.isStopOnErrors());
      }
      if (classMap.getSrcClassToMap().getName().equals("net.sf.dozer.util.mapping.vo.SuperSuperSuperClass")) {
        assertTrue(classMap.isWildcard());
      }
      if (classMap.getSrcClassToMap().getName().equals("net.sf.dozer.util.mapping.vo.TestObject")) {
        assertTrue(!(classMap.getFieldMaps().get(0)).isCopyByReference());
      }
    }
  }