Program: 12864
Project: 12864
Buggy source:
private static void buildTree(ConfigNode node,Set visited){
  if (node.subject == null) {
    return;
  }
  for (  Method m : node.subject.getClass().getMethods()) {
    if (!m.isAnnotationPresent(InvokableAction.class)) {
      continue;
    }
    InvokableAction action=m.getDeclaredAnnotation(InvokableAction.class);
    node.hotkeys.put(m.getName(),action.defaultKeyMapping());
  }
  for (  Field f : node.subject.getClass().getFields()) {
    System.out.println("String_Node_Str" + f.getName());
    try {
      Object o=f.get(node.subject);
      if (visited.contains(o)) {
        continue;
      }
      visited.add(o);
      if (f.isAnnotationPresent(ConfigurableField.class)) {
        if (o != null && ISelection.class.isAssignableFrom(o.getClass())) {
          ISelection selection=(ISelection)o;
          node.setRawFieldValue(f.getName(),(Serializable)selection.getSelections().get(selection.getValue()));
        }
 else {
          node.setRawFieldValue(f.getName(),(Serializable)o);
        }
        continue;
      }
 else       if (o == null) {
        continue;
      }
      if (o instanceof Reconfigurable) {
        Reconfigurable r=(Reconfigurable)o;
        ConfigNode child=node.findChild(f.getName());
        if (child == null || !child.subject.equals(o)) {
          child=new ConfigNode(node,r);
          node.putChild(f.getName(),child);
        }
        buildTree(child,visited);
      }
 else       if (o.getClass().isArray()) {
        String fieldName=f.getName();
        Class type=o.getClass().getComponentType();
        System.out.println("String_Node_Str" + node.subject.getShortName() + "String_Node_Str"+ fieldName+ "String_Node_Str"+ type.toGenericString());
        List<Reconfigurable> children=new ArrayList<>();
        if (!Reconfigurable.class.isAssignableFrom(type)) {
          System.out.println("String_Node_Str" + type.getName() + "String_Node_Str");
          if (Optional.class.isAssignableFrom(type)) {
            Type genericTypes=f.getGenericType();
            System.out.println("String_Node_Str" + genericTypes.getTypeName() + "String_Node_Str"+ genericTypes.getClass().getName());
            if (genericTypes instanceof GenericArrayType) {
              GenericArrayType aType=(GenericArrayType)genericTypes;
              ParameterizedType pType=(ParameterizedType)aType.getGenericComponentType();
              if (pType.getActualTypeArguments().length != 1) {
                continue;
              }
              Type genericType=pType.getActualTypeArguments()[0];
              if (!Reconfigurable.class.isAssignableFrom((Class)genericType)) {
                continue;
              }
            }
 else {
              continue;
            }
            for (            Optional<Reconfigurable> child : (Optional<Reconfigurable>[])o) {
              if (child.isPresent()) {
                children.add(child.get());
              }
 else {
                children.add(null);
              }
            }
          }
        }
 else {
          children=Arrays.asList((Reconfigurable[])o);
        }
        for (int i=0; i < children.size(); i++) {
          Reconfigurable child=children.get(i);
          String childName=fieldName + i;
          if (child == null) {
            node.removeChild(childName);
            continue;
          }
          ConfigNode grandchild=node.findChild(childName);
          if (grandchild == null || !grandchild.subject.equals(child)) {
            grandchild=new ConfigNode(node,child);
            node.putChild(childName,grandchild);
          }
          buildTree(grandchild,visited);
        }
      }
    }
 catch (    IllegalArgumentException|IllegalAccessException ex) {
      Logger.getLogger(Configuration.class.getName()).log(Level.SEVERE,null,ex);
    }
  }
}

Fixed version (ground truth):
private static void buildTree(ConfigNode node,Set visited){
  if (node.subject == null) {
    return;
  }
  for (  Method m : node.subject.getClass().getMethods()) {
    if (!m.isAnnotationPresent(InvokableAction.class)) {
      continue;
    }
    InvokableAction action=m.getDeclaredAnnotation(InvokableAction.class);
    node.hotkeys.put(m.getName(),action.defaultKeyMapping());
  }
  for (  Field f : node.subject.getClass().getFields()) {
    try {
      Object o=f.get(node.subject);
      if (!f.getType().isPrimitive() && visited.contains(o)) {
        continue;
      }
      visited.add(o);
      if (f.isAnnotationPresent(ConfigurableField.class)) {
        if (o != null && ISelection.class.isAssignableFrom(o.getClass())) {
          ISelection selection=(ISelection)o;
          node.setRawFieldValue(f.getName(),(Serializable)selection.getSelections().get(selection.getValue()));
        }
 else {
          node.setRawFieldValue(f.getName(),(Serializable)o);
        }
        continue;
      }
 else       if (o == null) {
        continue;
      }
      if (o instanceof Reconfigurable) {
        Reconfigurable r=(Reconfigurable)o;
        ConfigNode child=node.findChild(r.getName());
        if (child == null || !child.subject.equals(o)) {
          child=new ConfigNode(node,r);
          node.putChild(f.getName(),child);
        }
        buildTree(child,visited);
      }
 else       if (o.getClass().isArray()) {
        String fieldName=f.getName();
        Class type=o.getClass().getComponentType();
        List<Reconfigurable> children=new ArrayList<>();
        if (!Reconfigurable.class.isAssignableFrom(type)) {
          if (Optional.class.isAssignableFrom(type)) {
            Type genericTypes=f.getGenericType();
            if (genericTypes instanceof GenericArrayType) {
              GenericArrayType aType=(GenericArrayType)genericTypes;
              ParameterizedType pType=(ParameterizedType)aType.getGenericComponentType();
              if (pType.getActualTypeArguments().length != 1) {
                continue;
              }
              Type genericType=pType.getActualTypeArguments()[0];
              if (!Reconfigurable.class.isAssignableFrom((Class)genericType)) {
                continue;
              }
            }
 else {
              continue;
            }
            for (            Optional<Reconfigurable> child : (Optional<Reconfigurable>[])o) {
              if (child.isPresent()) {
                children.add(child.get());
              }
 else {
                children.add(null);
              }
            }
          }
        }
 else {
          children=Arrays.asList((Reconfigurable[])o);
        }
        for (int i=0; i < children.size(); i++) {
          Reconfigurable child=children.get(i);
          String childId=fieldName + i;
          if (child == null) {
            node.removeChild(childId);
            continue;
          }
          ConfigNode grandchild=node.findChild(childId);
          if (grandchild == null || !grandchild.subject.equals(child)) {
            grandchild=new ConfigNode(node,child,childId);
            node.putChild(childId,grandchild);
          }
          buildTree(grandchild,visited);
        }
      }
    }
 catch (    IllegalArgumentException|IllegalAccessException ex) {
      Logger.getLogger(Configuration.class.getName()).log(Level.SEVERE,null,ex);
    }
  }
}