Program: 148110
Project: 148110
Buggy source:
public Object convertFromEObj2Bean(EObject eObj){
  EClass eCls=eObj.eClass();
  Class beanCls=(Class)classMap.getKey(eCls);
  if (beanCls != null) {
    try {
      Object bean=beanCls.newInstance();
      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) {
            Method setMethod=beanFieldMap.get(field)[1];
            Object value=eObj.eGet(feature);
            if (value != null) {
              if (feature.isMany()) {
                EList list=(EList)value;
                Object newInstance=Array.newInstance(field.getType().getComponentType(),list.size());
                Object[] children=(Object[])newInstance;
                int i=0;
                for (                Object echildObj : list) {
                  Object childObj=convertFromEObj2Bean((EObject)echildObj);
                  children[i]=childObj;
                  i++;
                }
                setMethod.invoke(bean,newInstance);
              }
 else {
                Object eValue=null;
                if (beanClassUtil.isJavaField(field)) {
                  eValue=value;
                }
 else {
                  eValue=convertFromEObj2Bean((EObject)value);
                }
                setMethod.invoke(bean,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 bean;
    }
 catch (    InstantiationException e) {
      log.error(e.getMessage(),e);
    }
catch (    IllegalAccessException e) {
      log.error(e.getMessage(),e);
    }
  }
  return null;
}

Fixed version (ground truth):
public Object convertFromEObj2Bean(EObject eObj){
  EClass eCls=eObj.eClass();
  Class beanCls=(Class)classMap.getKey(eCls);
  if (beanCls != null) {
    try {
      Object bean=beanCls.newInstance();
      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) {
            Method setMethod=beanFieldMap.get(field)[1];
            Object value=eObj.eGet(feature);
            if (value != null) {
              if (feature.isMany()) {
                EList list=(EList)value;
                Object newInstance=Array.newInstance(field.getType().getComponentType(),list.size());
                Object[] children=(Object[])newInstance;
                int i=0;
                for (                Object echildObj : list) {
                  Object childObj=null;
                  if (echildObj != null && beanClassUtil.isJavaClass(echildObj.getClass())) {
                    childObj=echildObj;
                  }
 else {
                    childObj=convertFromEObj2Bean((EObject)echildObj);
                  }
                  children[i]=childObj;
                  i++;
                }
                setMethod.invoke(bean,newInstance);
              }
 else {
                Object eValue=null;
                if (beanClassUtil.isJavaField(field)) {
                  eValue=value;
                }
 else {
                  eValue=convertFromEObj2Bean((EObject)value);
                }
                setMethod.invoke(bean,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 bean;
    }
 catch (    InstantiationException e) {
      log.error(e.getMessage(),e);
    }
catch (    IllegalAccessException e) {
      log.error(e.getMessage(),e);
    }
  }
  return null;
}