Program: 52828
Project: 52828
Buggy source:
public DynamicMBeanWrapper(final Class<?> annotatedMBean,final boolean normalScope,final Annotation[] qualifiers){
  this.clazz=annotatedMBean;
  this.classloader=Thread.currentThread().getContextClassLoader();
  this.normalScope=normalScope;
  this.qualifiers=qualifiers;
  final List<MBeanAttributeInfo> attributeInfos=new ArrayList<MBeanAttributeInfo>();
  final List<MBeanOperationInfo> operationInfos=new ArrayList<MBeanOperationInfo>();
  final List<MBeanNotificationInfo> notificationInfos=new ArrayList<MBeanNotificationInfo>();
  final String description=getDescription(annotatedMBean.getAnnotation(MBean.class).description(),annotatedMBean.getName());
  final NotificationInfo notification=annotatedMBean.getAnnotation(NotificationInfo.class);
  if (notification != null) {
    notificationInfos.add(getNotificationInfo(notification,annotatedMBean.getName()));
  }
  final NotificationInfo.List notifications=annotatedMBean.getAnnotation(NotificationInfo.List.class);
  if (notifications != null) {
    for (    NotificationInfo notificationInfo : notifications.value()) {
      notificationInfos.add(getNotificationInfo(notificationInfo,annotatedMBean.getName()));
    }
  }
  for (  Method method : annotatedMBean.getMethods()) {
    final int modifiers=method.getModifiers();
    final JmxManaged annotation=method.getAnnotation(JmxManaged.class);
    if (method.getDeclaringClass().equals(Object.class) || !Modifier.isPublic(modifiers) || Modifier.isAbstract(modifiers)|| Modifier.isStatic(modifiers)|| annotation == null) {
      continue;
    }
    operations.put(method.getName(),method);
    String operationDescr=getDescription(annotation.description(),annotatedMBean.getName() + "String_Node_Str" + method.getName());
    operationInfos.add(new MBeanOperationInfo(operationDescr,method));
  }
  Class<?> clazz=annotatedMBean;
  while (!Object.class.equals(clazz) && clazz != null) {
    for (    Field field : clazz.getDeclaredFields()) {
      final JmxManaged annotation=field.getAnnotation(JmxManaged.class);
      if (annotation != null) {
        field.setAccessible(true);
        final String name=field.getName();
        final String fieldDescription=getDescription(annotation.description(),annotatedMBean.getClass() + "String_Node_Str" + name);
        final Class<?> type=field.getType();
        final String javaMtdName;
        if (name.length() > 1) {
          javaMtdName=Character.toUpperCase(name.charAt(0)) + name.substring(1);
        }
 else {
          javaMtdName="String_Node_Str" + Character.toUpperCase(name.charAt(0));
        }
        Method setter=null;
        Method getter=null;
        try {
          getter=clazz.getMethod("String_Node_Str" + javaMtdName);
        }
 catch (        NoSuchMethodException e1) {
          try {
            getter=clazz.getMethod("String_Node_Str" + javaMtdName);
          }
 catch (          NoSuchMethodException e2) {
          }
        }
        try {
          setter=clazz.getMethod("String_Node_Str" + javaMtdName,field.getType());
        }
 catch (        NoSuchMethodException e) {
        }
        attributeInfos.add(new MBeanAttributeInfo(name,type.getName(),fieldDescription,getter != null,setter != null,false));
        fields.put(name,new FieldInfo(field,getter,setter));
      }
    }
    clazz=clazz.getSuperclass();
  }
  info=new MBeanInfo(annotatedMBean.getName(),description,attributeInfos.toArray(new MBeanAttributeInfo[attributeInfos.size()]),null,operationInfos.toArray(new MBeanOperationInfo[operationInfos.size()]),notificationInfos.toArray(new MBeanNotificationInfo[notificationInfos.size()]));
}

Fixed version (ground truth):
public DynamicMBeanWrapper(final Class<?> annotatedMBean,final boolean normalScope,final Annotation[] qualifiers,final MBean mBeanAnnotation){
  this.clazz=annotatedMBean;
  this.classloader=Thread.currentThread().getContextClassLoader();
  this.normalScope=normalScope;
  this.qualifiers=qualifiers;
  final List<MBeanAttributeInfo> attributeInfos=new ArrayList<MBeanAttributeInfo>();
  final List<MBeanOperationInfo> operationInfos=new ArrayList<MBeanOperationInfo>();
  final List<MBeanNotificationInfo> notificationInfos=new ArrayList<MBeanNotificationInfo>();
  final String description=getDescription(mBeanAnnotation.description(),annotatedMBean.getName());
  final NotificationInfo notification=annotatedMBean.getAnnotation(NotificationInfo.class);
  if (notification != null) {
    notificationInfos.add(getNotificationInfo(notification,annotatedMBean.getName()));
  }
  final NotificationInfo.List notifications=annotatedMBean.getAnnotation(NotificationInfo.List.class);
  if (notifications != null) {
    for (    NotificationInfo notificationInfo : notifications.value()) {
      notificationInfos.add(getNotificationInfo(notificationInfo,annotatedMBean.getName()));
    }
  }
  for (  Method method : annotatedMBean.getMethods()) {
    final int modifiers=method.getModifiers();
    final JmxManaged annotation=method.getAnnotation(JmxManaged.class);
    if (method.getDeclaringClass().equals(Object.class) || !Modifier.isPublic(modifiers) || Modifier.isAbstract(modifiers)|| Modifier.isStatic(modifiers)|| annotation == null) {
      continue;
    }
    operations.put(method.getName(),method);
    String operationDescr=getDescription(annotation.description(),annotatedMBean.getName() + "String_Node_Str" + method.getName());
    operationInfos.add(new MBeanOperationInfo(operationDescr,method));
  }
  Class<?> clazz=annotatedMBean;
  while (!Object.class.equals(clazz) && clazz != null) {
    for (    Field field : clazz.getDeclaredFields()) {
      final JmxManaged annotation=field.getAnnotation(JmxManaged.class);
      if (annotation != null) {
        field.setAccessible(true);
        final String name=field.getName();
        final String fieldDescription=getDescription(annotation.description(),annotatedMBean.getClass() + "String_Node_Str" + name);
        final Class<?> type=field.getType();
        final String javaMtdName;
        if (name.length() > 1) {
          javaMtdName=Character.toUpperCase(name.charAt(0)) + name.substring(1);
        }
 else {
          javaMtdName="String_Node_Str" + Character.toUpperCase(name.charAt(0));
        }
        Method setter=null;
        Method getter=null;
        try {
          getter=clazz.getMethod("String_Node_Str" + javaMtdName);
        }
 catch (        NoSuchMethodException e1) {
          try {
            getter=clazz.getMethod("String_Node_Str" + javaMtdName);
          }
 catch (          NoSuchMethodException e2) {
          }
        }
        try {
          setter=clazz.getMethod("String_Node_Str" + javaMtdName,field.getType());
        }
 catch (        NoSuchMethodException e) {
        }
        attributeInfos.add(new MBeanAttributeInfo(name,type.getName(),fieldDescription,getter != null,setter != null,false));
        fields.put(name,new FieldInfo(field,getter,setter));
      }
    }
    clazz=clazz.getSuperclass();
  }
  info=new MBeanInfo(annotatedMBean.getName(),description,attributeInfos.toArray(new MBeanAttributeInfo[attributeInfos.size()]),null,operationInfos.toArray(new MBeanOperationInfo[operationInfos.size()]),notificationInfos.toArray(new MBeanNotificationInfo[notificationInfos.size()]));
}