public void deleteObligation(final Obligation obligation,int basicBlockId) throws ObligationAcquiredOrReleasedInLoopException {
  Map<ObligationSet,State> updatedStateMap=new HashMap<ObligationSet,State>();
  for (Iterator<State> i=stateIterator(); i.hasNext(); ) {
    State state=i.next();
    checkCircularity(state,obligation,basicBlockId);
    ObligationSet obligationSet=state.getObligationSet();
    obligationSet.remove(obligation);
    if (!obligationSet.isEmpty()) {
      updatedStateMap.put(obligationSet,state);
    }
  }
  replaceMap(updatedStateMap);
}

public void deleteObligation ( final Obligation obligation , int basicBlockId ) throws ObligationAcquiredOrReleasedInLoopException { Map < ObligationSet , State > updatedStateMap = new HashMap < ObligationSet , State > ( ) ; for ( Iterator < State > i = stateIterator ( ) ; i . hasNext ( ) ; ) { State state = i . next ( ) ; checkCircularity ( state , obligation , basicBlockId ) ; ObligationSet obligationSet = state . getObligationSet ( ) ; obligationSet . remove ( obligation ) ; if ( ! obligationSet . isEmpty ( ) ) { updatedStateMap . put ( obligationSet , state ) ; } } replaceMap ( updatedStateMap ) ; }
remove an obligation from every state in the stateset .
