Buggy code:
public class SimplePermClass implements PermClassInterface { static final int DEFAULT_SIZE = 50 ; PermProperty inClass ; HashSet < SimplePermClass . DecoratedSimplePerm > [ ] simples = ( ( HashSet < SimplePermClass . DecoratedSimplePerm > [ ] ) ( new HashSet [ SimplePermClass . DEFAULT_SIZE ] ) ) ; private Simple simplicity = new Simple ( ) ; public SimplePermClass ( ) { } public SimplePermClass ( Permutation ... pArray ) { } public SimplePermClass ( Collection < Permutation > perms ) { } public SimplePermClass ( PermProperty inClass ) { } public SimplePermClass ( String ... strings ) { } @ Override public PermClassInterface clone ( ) { } private void initialise ( ) { } public HashSet < Permutation > getSimples ( int n ) { } private void computeSimples ( int n ) { } @ Override public HashSet < Permutation > getPerms ( int n ) { } @ Override public Collection < Permutation > getPermsTo ( int length ) { PermCollector collector = new PermCollector ( ) ; for ( int i = 4 ; i <= length ; i ++ ) { <START_BUG> processPerms ( length , collector ) ; <END_BUG> } return collector . getCollection ( ) ; } @ Override public void processPerms ( int n , PermProcessor processor ) { } public void processWithTo ( PermProcessor processor , int n ) { } public void DFSProcessSimples ( SimplePermClass . DecoratedSimplePerm s , int i , int n , PermProcessor processor ) { } private void DFSProcessSimplesTo ( SimplePermClass . DecoratedSimplePerm s , int i , int n , PermProcessor processor ) { } @ Override public boolean containsPermutation ( Permutation q ) { } public class DecoratedSimplePerm { Permutation p ; int leftmostSimpleDeletionIndex ; public DecoratedSimplePerm ( Permutation p ) { } public DecoratedSimplePerm ( Permutation p , int leftmostSimpleDeletionIndex ) { } public int getLeftmostSimpleDeletionIndex ( ) { } public Permutation getPermutation ( ) { } public ArrayList < SimplePermClass . DecoratedSimplePerm > leftSimpleExtensions ( ) { } @ Override public boolean equals ( Object other ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } private int leftmostSimpleDeletionIndex ( Permutation q ) { } private Iterable < Permutation > getSimpleExtensions ( Permutation p , int insertionIndex ) { } private boolean isSimpleInsertionCandidate ( Permutation p , int i , int v ) { } } public Iterator < Permutation > getIterator ( int low , int high ) { } public Iterator < Permutation > getRestrictedIterator ( int low , int high , PermProperty prop ) { } public Iterator < Permutation > getIterator ( int n ) { } public Iterator < Permutation > getRestrictedIterator ( int n , PermProperty prop ) { } private class SimplePermIterator implements Iterator < Permutation > { Deque < Permutation > stack = new ArrayDeque < Permutation > ( ) { } ; Permutation next = null ; PermProperty definingProperty ; int low ; int high ; PermProperty extraProperty ; public SimplePermIterator ( PermProperty definingProperty , int low , int high , PermProperty extraProperty ) { } public SimplePermIterator ( PermProperty definingProperty , int n , PermProperty extraProperty ) { } public SimplePermIterator ( PermProperty definingProperty , int n ) { } @ Override public boolean hasNext ( ) { } @ Override public Permutation next ( ) { } @ Override public void remove ( ) { } } public static void main ( String [ ] args ) { } }

Fix:
processPerms ( i , collector ) ;