Buggy code:
private static int intersectCompoundsPosPos ( int fromIndex , Automaton from , int toIndex , Automaton to , Object myData , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static int intersectCompoundsPosNeg ( int fromIndex , Automaton from , int toIndex , Automaton to , Object myData , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static int intersectCompoundsNegNeg ( int fromIndex , Automaton from , int toIndex , Automaton to , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static int intersectFunctionsOrMethods ( int fromIndex , boolean fromSign , Automaton from , int toIndex , boolean toSign , Automaton to , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static int intersectFunctionOrMethodsHelper ( int fromIndex , Automaton from , int toIndex , boolean toSign , Automaton to , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static int intersectRecords ( int fromIndex , boolean fromSign , Automaton from , int toIndex , boolean toSign , Automaton to , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static int intersectRecordsPosPos ( int fromIndex , Automaton from , int toIndex , Automaton to , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static int intersectRecordsPosNeg ( int fromIndex , Automaton from , int toIndex , Automaton to , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static int intersectPosNegOpenOpen ( int fromIndex , Automaton from , int toIndex , Automaton to , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static int intersectPosNegClosedOpen ( int fromIndex , Automaton from , int toIndex , Automaton to , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static int intersectNegPosClosedOpen ( int fromIndex , Automaton from , int toIndex , Automaton to , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static boolean isSubset ( ArrayList < String > subset , ArrayList < String > superset ) { } private static void setUnion ( ArrayList < String > lhs , ArrayList < String > rhs , ArrayList < String > result ) { } private static int [ ] contiguousZipIntersection ( int [ ] fromChildren , Automaton from , int [ ] toChildren , Automaton to , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static int [ ] nonContiguousZipIntersection ( ArrayList < String > myLabels , Automaton . State fromState , Automaton from , Automaton . State toState , Automaton to , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static int [ ] contiguousDistributeIntersection ( Automaton . State fromState , boolean fromSign , Automaton from , Automaton . State toState , boolean toSign , Automaton to , Object myData , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { } private static int [ ] nonContiguousDistributeIntersection ( Automaton . State fromState , boolean fromSign , Automaton from , Automaton . State toState , boolean toSign , Automaton to , Object myData , HashMap < TypeAlgorithms . IntersectionPoint , Integer > allocations , ArrayList < Automaton . State > states ) { ArrayList < String > fromLabels = ( ( ArrayList ) ( fromState . data ) ) ; ArrayList < String > toLabels = ( ( ArrayList ) ( toState . data ) ) ; int [ ] fromChildren = fromState . children ; int [ ] toChildren = toState . children ; int [ ] tmpChildren = TypeAlgorithms . extractChildren ( fromChildren , from , states ) ; int [ ] myChildren = new int [ fromChildren . length ] ; for ( int fi = 0 , ti = 0 ; fi != ( fromChildren . length ) ; ++ fi , ++ ti ) { int [ ] myChildChildren = new int [ fromChildren . length ] ; System . arraycopy ( tmpChildren , 0 , myChildChildren , 0 , fromChildren . length ) ; <START_BUG> if ( ti < ( fromLabels . size ( ) ) ) { <END_BUG> String fn = fromLabels . get ( fi ) ; String tn = toLabels . get ( ti ) ; int c = fn . compareTo ( tn ) ; if ( c == 0 ) { myChildChildren [ fi ] = TypeAlgorithms . intersect ( fromChildren [ fi ] , fromSign , from , toChildren [ fi ] , toSign , to , allocations , states ) ; ti ++ ; } else if ( c < 0 ) { myChildChildren [ fi ] = states . size ( ) ; states . add ( new Automaton . State ( Type . K_VOID ) ) ; } } else { myChildChildren [ fi ] = states . size ( ) ; states . add ( new Automaton . State ( Type . K_VOID ) ) ; }

Fix:
if ( ti < ( toLabels . size ( ) ) ) {