Buggy code:
public Interpolator ( Logger logger , Theory theory , Set < String > [ ] partitions , Clausifier clausifier ) { } private Term unfoldLAs ( Interpolant interpolant ) { } public Term [ ] getInterpolants ( Clause refutation ) { } private void checkInductivity ( Collection < Literal > clause , Interpolant [ ] ipls ) { } public Interpolant [ ] interpolate ( Clause cl ) { } private Interpolant [ ] computeEQInterpolant ( CCEquality ccEq , LAEquality laEq , int sign ) { } public void colorLiterals ( Clause root , HashSet < Clause > visited ) { } Interpolator . Occurrence getOccurrence ( SharedTerm shared ) { } void addOccurrence ( SharedTerm term , int part ) { } void addOccurrence ( LinVar var , int part ) { } Interpolator . LitInfo getLiteralInfo ( DPLLAtom lit ) { } public Interpolator . LitInfo colorMixedLiteral ( DPLLAtom atom ) { Interpolator . LitInfo info = mLiteralInfos . get ( atom ) ; assert info == null ; ArrayList < SharedTerm > subterms = new ArrayList < SharedTerm > ( ) ; Sort auxSort ; if ( atom instanceof CCEquality ) { CCEquality eq = ( ( CCEquality ) ( atom ) ) ; SharedTerm l = eq . getLhs ( ) . getFlatTerm ( ) ; SharedTerm r = eq . getRhs ( ) . getFlatTerm ( ) ; subterms . add ( l ) ; subterms . add ( r ) ; if ( ( l . getSort ( ) ) == ( r . getSort ( ) ) ) auxSort = l . getSort ( ) ; else { assert mTheory . getLogic ( ) . isIRA ( ) ; auxSort = mTheory . getRealSort ( ) ; } } else { LinVar lv = null ; if ( atom instanceof BoundConstraint ) { lv = ( ( BoundConstraint ) ( atom ) ) . getVar ( ) ; } else if ( atom instanceof LAEquality ) { lv = ( ( LAEquality ) ( atom ) ) . getVar ( ) ; } Collection < LinVar > components ; if ( lv . isInitiallyBasic ( ) ) { components = lv . getLinTerm ( ) . keySet ( ) ; } else { components = Collections . singleton ( lv ) ; } boolean allInt = true ; for ( LinVar c : components ) { allInt &= c . isInt ( ) ; subterms . add ( c . getSharedTerm ( ) ) ; } auxSort = ( allInt ) ? mTheory . getNumericSort ( ) : mTheory . getRealSort ( ) ; } info = computeMixedOccurrence ( subterms ) ; this . mLiteralInfos . put ( atom , info ) ; BitSet shared = new BitSet ( ) ; shared . or ( info . mInA ) ; shared . or ( info . mInB ) ; if ( ( shared . nextClearBit ( 0 ) ) >= ( mNumInterpolants ) ) return info ; info . mMixedVar = mTheory . createFreshTermVariable ( "litaux" , auxSort ) ; if ( atom instanceof CCEquality ) { CCEquality eq = ( ( CCEquality ) ( atom ) ) ; info . mLhsOccur = getOccurrence ( eq . getLhs ( ) . getFlatTerm ( ) ) ; } else if ( ( atom instanceof BoundConstraint ) || ( atom instanceof LAEquality ) ) { LinVar lv = null ; if ( atom instanceof BoundConstraint ) lv = ( ( BoundConstraint ) ( atom ) ) . getVar ( ) ; else lv = ( ( LAEquality ) ( atom ) ) . getVar ( ) ; assert lv . isInitiallyBasic ( ) : ( ( "Not<seq2seq4repair_space>initially<seq2seq4repair_space>basic:<seq2seq4repair_space>" + lv ) + "<seq2seq4repair_space>atom:<seq2seq4repair_space>" ) + atom ; info . mAPart = new MutableAffinTerm [ mNumInterpolants ] ; for ( int part = 0 ; part < ( mNumInterpolants ) ; part ++ ) { if ( ! ( info . isMixed ( part ) ) ) continue ; MutableAffinTerm sumApart = new MutableAffinTerm ( ) ; for ( Map . Entry < LinVar , BigInteger > en : lv . getLinTerm ( ) . entrySet ( ) ) { LinVar var = en . getKey ( ) ; <START_BUG> Interpolator . Occurrence occ = mSymbolPartition . get ( en . getKey ( ) . getSharedTerm ( ) ) ; <END_BUG> if ( occ . isALocal ( part ) ) { Rational coeff = Rational . valueOf ( en . getValue ( ) , BigInteger . ONE ) ; sumApart . add ( coeff , var ) ; } } info . mAPart [ part ] = sumApart ; } } return info ; } private Interpolator . LitInfo computeMixedOccurrence ( ArrayList < SharedTerm > subterms ) { } public static class Substitutor extends TermTransformer { TermVariable mTermVar ; Term mReplacement ; public Substitutor ( TermVariable termVar , Term replacement ) { } public void convert ( Term term ) { } } Term substitute ( Term mainTerm , final TermVariable termVar , final Term replacement ) { } class EQInterpolator extends TermTransformer { Interpolant mI2 ; TermVariable mAuxVar ; EQInterpolator ( Interpolant i2 , TermVariable auxVar ) { } public void convert ( Term term ) { } } private Interpolant mixedEqInterpolate ( Interpolant eqIpol , Interpolant neqIpol , TermVariable mixedVar ) { } static abstract class MixedLAInterpolator extends TermTransformer { TermVariable mMixedVar ; Term mI2 ; LATerm mLA1 ; public MixedLAInterpolator ( Term i2 , TermVariable mixed ) { } abstract Term interpolate ( LATerm la1 , LATerm la2 ) { } public void convert ( Term term ) { } } class RealInterpolator extends Interpolator . MixedLAInterpolator { public RealInterpolator ( Term i2 , TermVariable mixedVar ) { } public Term interpolate ( LATerm la1 , LATerm la2 ) { }

Fix:
Interpolator . Occurrence occ = getOccurrence ( en . getKey ( ) . getSharedTerm ( ) ) ;