Program: 148111
Project: 148111
Buggy source:
public EObject convertFromBean2EObj(Object bean,EObject eObj){
  Class beanCls=bean.getClass();
  EClass eCls=(EClass)classMap.get(beanCls);
  if (eObj == null) {
    eObj=MdmserverobjectFactory.eINSTANCE.create(eCls);
  }
  if (eCls != null) {
    Map<Field,Method[]> beanFieldMap=beanClassUtil.findFieldMap(beanCls);
    if (beanFieldMap == null)     return null;
    for (    Field field : beanFieldMap.keySet()) {
      try {
        EStructuralFeature feature=(EStructuralFeature)fieldMap.get(field);
        if (feature == null) {
          dumpMap();
        }
        if (feature != null) {
          Method getMethod=beanFieldMap.get(field)[0];
          Object value=getMethod.invoke(bean);
          if (beanClassUtil.isColletionField(field)) {
            if (value != null) {
              ((EList)eObj.eGet(feature)).clear();
              for (              Object childObj : (Object[])value) {
                EObject eChildObj=convertFromBean2EObj(childObj,null);
                ((EList)eObj.eGet(feature)).add(eChildObj);
              }
            }
          }
 else {
            Object eValue=null;
            if (beanClassUtil.isJavaField(field)) {
              eValue=value;
            }
 else {
              if (value != null) {
                eValue=convertFromBean2EObj(value,null);
              }
 else {
                eValue=null;
              }
            }
            eObj.eSet(feature,eValue);
          }
        }
      }
 catch (      IllegalArgumentException e) {
        log.error(e.getMessage(),e);
      }
catch (      IllegalAccessException e) {
        log.error(e.getMessage(),e);
      }
catch (      InvocationTargetException e) {
        log.error(e.getMessage(),e);
      }
    }
    return eObj;
  }
  return null;
}

Fixed version (ground truth):
public EObject convertFromBean2EObj(Object bean,EObject eObj){
  Class beanCls=bean.getClass();
  EClass eCls=(EClass)classMap.get(beanCls);
  if (eObj == null) {
    eObj=MdmserverobjectFactory.eINSTANCE.create(eCls);
  }
  if (eCls != null) {
    Map<Field,Method[]> beanFieldMap=beanClassUtil.findFieldMap(beanCls);
    if (beanFieldMap == null)     return null;
    for (    Field field : beanFieldMap.keySet()) {
      try {
        EStructuralFeature feature=(EStructuralFeature)fieldMap.get(field);
        if (feature == null) {
          dumpMap();
        }
        if (feature != null) {
          Method getMethod=beanFieldMap.get(field)[0];
          Object value=getMethod.invoke(bean);
          if (beanClassUtil.isColletionField(field)) {
            if (value != null) {
              ((EList)eObj.eGet(feature)).clear();
              for (              Object childObj : (Object[])value) {
                if (childObj != null) {
                  Object eChildObj=null;
                  if (beanClassUtil.isJavaClass(childObj.getClass())) {
                    eChildObj=childObj;
                  }
 else {
                    eChildObj=convertFromBean2EObj(childObj,null);
                  }
                  if (eChildObj != null) {
                    ((EList)eObj.eGet(feature)).add(eChildObj);
                  }
                }
              }
            }
          }
 else {
            Object eValue=null;
            if (beanClassUtil.isJavaField(field)) {
              eValue=value;
            }
 else {
              if (value != null) {
                eValue=convertFromBean2EObj(value,null);
              }
 else {
                eValue=null;
              }
            }
            eObj.eSet(feature,eValue);
          }
        }
      }
 catch (      IllegalArgumentException e) {
        log.error(e.getMessage(),e);
      }
catch (      IllegalAccessException e) {
        log.error(e.getMessage(),e);
      }
catch (      InvocationTargetException e) {
        log.error(e.getMessage(),e);
      }
    }
    return eObj;
  }
  return null;
}