at line 179 doesn't use the last arg. The method setMBeanDescriptor() is passed createDefaultDescriptor(). I think it should be passed mbeandescriptor. When I put in this change and re-ran the code, it worked. Thus it is now:
Note that inside setMBeanDescriptor if the arg is null then it automatically creates a default descriptor for you so you need not check for null. Is this fix correct?