Buggy code:
public class IteratorUtils { public static final ResettableIterator EMPTY_ITERATOR = EmptyIterator . RESETTABLE_INSTANCE ; public static final ResettableListIterator EMPTY_LIST_ITERATOR = EmptyListIterator . RESETTABLE_INSTANCE ; public static final OrderedIterator EMPTY_ORDERED_ITERATOR = EmptyOrderedIterator . INSTANCE ; public static final MapIterator EMPTY_MAP_ITERATOR = EmptyMapIterator . INSTANCE ; public static final OrderedMapIterator EMPTY_ORDERED_MAP_ITERATOR = EmptyOrderedMapIterator . INSTANCE ; public IteratorUtils ( ) { } public static ResettableIterator emptyIterator ( ) { } public static ResettableListIterator emptyListIterator ( ) { } public static OrderedIterator emptyOrderedIterator ( ) { } public static MapIterator emptyMapIterator ( ) { } public static OrderedMapIterator emptyOrderedMapIterator ( ) { } public static ResettableIterator singletonIterator ( Object object ) { } public static ListIterator singletonListIterator ( Object object ) { } public static ResettableIterator arrayIterator ( Object [ ] array ) { } public static ResettableIterator arrayIterator ( Object array ) { } public static ResettableIterator arrayIterator ( Object [ ] array , int start ) { } public static ResettableIterator arrayIterator ( Object array , int start ) { } public static ResettableIterator arrayIterator ( Object [ ] array , int start , int end ) { } public static ResettableIterator arrayIterator ( Object array , int start , int end ) { } public static ResettableListIterator arrayListIterator ( Object [ ] array ) { } public static ResettableListIterator arrayListIterator ( Object array ) { } public static ResettableListIterator arrayListIterator ( Object [ ] array , int start ) { } public static ResettableListIterator arrayListIterator ( Object array , int start ) { } public static ResettableListIterator arrayListIterator ( Object [ ] array , int start , int end ) { } public static ResettableListIterator arrayListIterator ( Object array , int start , int end ) { } public static Iterator unmodifiableIterator ( Iterator iterator ) { } public static ListIterator unmodifiableListIterator ( ListIterator listIterator ) { } public static MapIterator unmodifiableMapIterator ( MapIterator mapIterator ) { } public static Iterator chainedIterator ( Iterator iterator1 , Iterator iterator2 ) { } public static Iterator chainedIterator ( Iterator [ ] iterators ) { } public static Iterator chainedIterator ( Collection iterators ) { } public static Iterator collatedIterator ( Comparator comparator , Iterator iterator1 , Iterator iterator2 ) { } public static Iterator collatedIterator ( Comparator comparator , Iterator [ ] iterators ) { } public static Iterator collatedIterator ( Comparator comparator , Collection iterators ) { } public static Iterator objectGraphIterator ( Object root , Transformer transformer ) { } public static Iterator transformedIterator ( Iterator iterator , Transformer transform ) { } public static Iterator filteredIterator ( Iterator iterator , Predicate predicate ) { } public static ListIterator filteredListIterator ( ListIterator listIterator , Predicate predicate ) { } public static ResettableIterator loopingIterator ( Collection coll ) { } public static ResettableListIterator loopingListIterator ( List list ) { } public static Iterator asIterator ( Enumeration enumeration ) { } public static Iterator asIterator ( Enumeration enumeration , Collection removeCollection ) { } public static Enumeration asEnumeration ( Iterator iterator ) { } public static ListIterator toListIterator ( Iterator iterator ) { } public static Object [ ] toArray ( Iterator iterator ) { } public static Object [ ] toArray ( Iterator iterator , Class arrayClass ) { } public static List toList ( Iterator iterator ) { } public static List toList ( Iterator iterator , int estimatedSize ) { } public static Iterator getIterator ( Object obj ) { if ( obj == null ) { return IteratorUtils . emptyIterator ( ) ; } else if ( obj instanceof Iterator ) { return ( ( Iterator ) ( obj ) ) ; } else if ( obj instanceof Collection ) { return ( ( Collection ) ( obj ) ) . iterator ( ) ; } else if ( obj instanceof Object [ ] ) { return new ObjectArrayIterator ( ( ( Object [ ] ) ( obj ) ) ) ; } else if ( obj instanceof Enumeration ) { return new EnumerationIterator ( ( ( Enumeration ) ( obj ) ) ) ; } else if ( obj instanceof Map ) { return ( ( Map ) ( obj ) ) . values ( ) . iterator ( ) ; } else if ( obj instanceof Dictionary ) { return new EnumerationIterator ( ( ( Dictionary ) ( obj ) ) . elements ( ) ) ; } else <START_BUG> if ( ( obj != null ) && ( obj . getClass ( ) . isArray ( ) ) ) { <END_BUG> return new ArrayIterator ( obj ) ; } else { try { Method method = obj . getClass ( ) . getMethod ( "iterator" , ( ( Class [ ] ) ( null ) ) ) ; if ( Iterator . class . isAssignableFrom ( method . getReturnType ( ) ) ) { Iterator it = ( ( Iterator ) ( method . invoke ( obj , ( ( Object [ ] ) ( null ) ) ) ) ) ; if ( it != null ) { return it ; } } } catch ( Exception ex ) { } return IteratorUtils . singletonIterator ( obj ) ; } } }

Fix:
if ( obj . getClass ( ) . isArray ( ) ) {