Program: 88717
Project: 88717
Buggy source:
/** 
 * looks after pos tags for methods and constructors
 */
private void finishProcedure(polyglot.ast.ProcedureDecl procedure,soot.SootMethod sootMethod){
  addProcedureToClass(sootMethod);
  if (procedure.position() != null) {
    if (procedure.body() != null) {
      if (procedure.body().position() != null) {
        Util.addLnPosTags(sootMethod,procedure.position().line(),procedure.body().position().endLine(),procedure.position().column(),procedure.body().position().endColumn());
      }
    }
  }
  MethodFinalsChecker mfc=new MethodFinalsChecker();
  mfc.setCurrentSootClass(sootClass.getName());
  if (procedure.body() != null) {
    procedure.body().visit(mfc);
  }
  if (newToOuterMap == null) {
    newToOuterMap=new HashMap();
  }
  if (mfc.getNewToOuter().keySet() != null) {
    Iterator newIt=mfc.getNewToOuter().keySet().iterator();
    while (newIt.hasNext()) {
      Object next=newIt.next();
      newToOuterMap.put(next,mfc.getNewToOuter().get(next));
    }
  }
  if ((mfc.getLocals() != null) && (mfc.getClassNames() != null)) {
    if (finalsMap == null) {
      finalsMap=new HashMap();
    }
    Iterator it=mfc.getClassNames().iterator();
    while (it.hasNext()) {
      ArrayList finalLocals=new ArrayList();
      polyglot.ast.New key=(polyglot.ast.New)it.next();
      LocalUsesChecker luc=new LocalUsesChecker();
      key.body().visit(luc);
      Iterator localsIt=luc.getLocals().iterator();
      while (localsIt.hasNext()) {
        polyglot.types.LocalInstance testLocal=(polyglot.types.LocalInstance)((polyglot.util.IdentityKey)localsIt.next()).object();
        if (!luc.getLocalDecls().contains(new polyglot.util.IdentityKey(testLocal))) {
          finalLocals.add(new polyglot.util.IdentityKey(testLocal));
        }
      }
      finalsMap.put(key,finalLocals);
    }
  }
  PolyglotMethodSource mSrc=new PolyglotMethodSource(procedure.body(),procedure.formals());
  mSrc.setFinalsMap(finalsMap);
  mSrc.setNewToOuterMap(newToOuterMap);
  mSrc.setPrivateAccessMap(privateAccessMap);
  if (localClassMap != null) {
    mSrc.setLocalClassMap(localClassMap);
  }
  if (anonClassMap != null) {
    mSrc.setAnonClassMap(anonClassMap);
  }
  sootMethod.setSource(mSrc);
}

Fixed version (ground truth):
/** 
 * looks after pos tags for methods and constructors
 */
private void finishProcedure(polyglot.ast.ProcedureDecl procedure,soot.SootMethod sootMethod){
  addProcedureToClass(sootMethod);
  if (procedure.position() != null) {
    if (procedure.body() != null) {
      if (procedure.body().position() != null) {
        Util.addLnPosTags(sootMethod,procedure.position().line(),procedure.body().position().endLine(),procedure.position().column(),procedure.body().position().endColumn());
      }
    }
  }
  MethodFinalsChecker mfc=new MethodFinalsChecker();
  mfc.setCurrentSootClass(sootClass.getName());
  if (procedure.body() != null) {
    procedure.body().visit(mfc);
  }
  if (newToOuterMap == null) {
    newToOuterMap=new HashMap();
  }
  if (mfc.getNewToOuter().keySet() != null) {
    Iterator newIt=mfc.getNewToOuter().keySet().iterator();
    while (newIt.hasNext()) {
      Object next=newIt.next();
      newToOuterMap.put(next,mfc.getNewToOuter().get(next));
    }
  }
  if ((mfc.getLocals() != null) && (mfc.getClassNames() != null)) {
    if (finalsMap == null) {
      finalsMap=new HashMap();
    }
    Iterator it=mfc.getClassNames().iterator();
    while (it.hasNext()) {
      AnonLocalClassInfo alci=new AnonLocalClassInfo();
      ArrayList finalLocals=new ArrayList();
      if (soot.Modifier.isStatic(sootMethod.getModifiers())) {
        alci.inStaticMethod(true);
      }
      polyglot.ast.New key=(polyglot.ast.New)it.next();
      LocalUsesChecker luc=new LocalUsesChecker();
      key.body().visit(luc);
      Iterator localsIt=luc.getLocals().iterator();
      while (localsIt.hasNext()) {
        polyglot.types.LocalInstance testLocal=(polyglot.types.LocalInstance)((polyglot.util.IdentityKey)localsIt.next()).object();
        if (!luc.getLocalDecls().contains(new polyglot.util.IdentityKey(testLocal))) {
          finalLocals.add(new polyglot.util.IdentityKey(testLocal));
        }
      }
      alci.finalFields(finalLocals);
      finalsMap.put(key,alci);
    }
  }
  PolyglotMethodSource mSrc=new PolyglotMethodSource(procedure.body(),procedure.formals());
  mSrc.setFinalsMap(finalsMap);
  mSrc.setNewToOuterMap(newToOuterMap);
  mSrc.setPrivateAccessMap(privateAccessMap);
  if (localClassMap != null) {
    mSrc.setLocalClassMap(localClassMap);
  }
  if (anonClassMap != null) {
    mSrc.setAnonClassMap(anonClassMap);
  }
  sootMethod.setSource(mSrc);
}