Program: 54663
Project: 54663
Buggy source:
public void processStatement(RootStatement root,ConstantPool pool){
  FlattenStatementsHelper flatthelper=new FlattenStatementsHelper();
  DirectGraph dgraph=flatthelper.buildDirectGraph(root);
  Set<String> setFinallyShortRangeEntryPoints=new HashSet<String>();
  for (  List<FinallyPathWrapper> lst : dgraph.mapShortRangeFinallyPaths.values()) {
    for (    FinallyPathWrapper finwrap : lst) {
      setFinallyShortRangeEntryPoints.add(finwrap.entry);
    }
  }
  Set<String> setFinallyLongRangeEntryPaths=new HashSet<String>();
  for (  List<FinallyPathWrapper> lst : dgraph.mapLongRangeFinallyPaths.values()) {
    for (    FinallyPathWrapper finwrap : lst) {
      setFinallyLongRangeEntryPaths.add(finwrap.source + "String_Node_Str" + finwrap.entry);
    }
  }
  Map<String,VarExprent> mapCatch=new HashMap<String,VarExprent>();
  collectCatchVars(root,flatthelper,mapCatch);
  Map<DirectNode,Map<String,PrimitiveExprsList>> mapData=new HashMap<DirectNode,Map<String,PrimitiveExprsList>>();
  LinkedList<DirectNode> stack=new LinkedList<DirectNode>();
  LinkedList<LinkedList<String>> stackEntryPoint=new LinkedList<LinkedList<String>>();
  stack.add(dgraph.first);
  stackEntryPoint.add(new LinkedList<String>());
  Map<String,PrimitiveExprsList> map=new HashMap<String,PrimitiveExprsList>();
  map.put(null,new PrimitiveExprsList());
  mapData.put(dgraph.first,map);
  while (!stack.isEmpty()) {
    DirectNode node=stack.removeFirst();
    LinkedList<String> entrypoints=stackEntryPoint.removeFirst();
    PrimitiveExprsList data;
    if (mapCatch.containsKey(node.id)) {
      data=getExpressionData(mapCatch.get(node.id));
    }
 else {
      data=mapData.get(node).get(buildEntryPointKey(entrypoints));
    }
    BasicBlockStatement block=node.block;
    if (block != null) {
      processBlock(block,data,pool);
      block.setExprents(data.getLstExprents());
    }
    String currentEntrypoint=entrypoints.isEmpty() ? null : entrypoints.getLast();
    for (    DirectNode nd : node.succs) {
      boolean isSuccessor=true;
      if (currentEntrypoint != null && dgraph.mapLongRangeFinallyPaths.containsKey(node.id)) {
        isSuccessor=false;
        for (        FinallyPathWrapper finwraplong : dgraph.mapLongRangeFinallyPaths.get(node.id)) {
          if (finwraplong.source.equals(currentEntrypoint) && finwraplong.destination.equals(nd.id)) {
            isSuccessor=true;
            break;
          }
        }
      }
      if (isSuccessor) {
        Map<String,PrimitiveExprsList> mapSucc=mapData.get(nd);
        if (mapSucc == null) {
          mapData.put(nd,mapSucc=new HashMap<String,PrimitiveExprsList>());
        }
        LinkedList<String> ndentrypoints=new LinkedList<String>(entrypoints);
        if (setFinallyLongRangeEntryPaths.contains(node.id + "String_Node_Str" + nd.id)) {
          ndentrypoints.addLast(node.id);
        }
 else         if (!setFinallyShortRangeEntryPoints.contains(nd.id) && dgraph.mapLongRangeFinallyPaths.containsKey(node.id)) {
          ndentrypoints.removeLast();
        }
        int succ_entry_index=ndentrypoints.indexOf(nd.id);
        if (succ_entry_index >= 0) {
          for (int elements_to_remove=ndentrypoints.size() - succ_entry_index; elements_to_remove > 0; elements_to_remove--) {
            ndentrypoints.removeLast();
          }
        }
        String ndentrykey=buildEntryPointKey(ndentrypoints);
        if (!mapSucc.containsKey(ndentrykey)) {
          mapSucc.put(ndentrykey,copyVarExprents(data.copyStack()));
          stack.add(nd);
          stackEntryPoint.add(ndentrypoints);
        }
      }
    }
  }
  initStatementExprents(root);
}

Fixed version (ground truth):
public void processStatement(RootStatement root,StructClass cl){
  FlattenStatementsHelper flatthelper=new FlattenStatementsHelper();
  DirectGraph dgraph=flatthelper.buildDirectGraph(root);
  Set<String> setFinallyShortRangeEntryPoints=new HashSet<String>();
  for (  List<FinallyPathWrapper> lst : dgraph.mapShortRangeFinallyPaths.values()) {
    for (    FinallyPathWrapper finwrap : lst) {
      setFinallyShortRangeEntryPoints.add(finwrap.entry);
    }
  }
  Set<String> setFinallyLongRangeEntryPaths=new HashSet<String>();
  for (  List<FinallyPathWrapper> lst : dgraph.mapLongRangeFinallyPaths.values()) {
    for (    FinallyPathWrapper finwrap : lst) {
      setFinallyLongRangeEntryPaths.add(finwrap.source + "String_Node_Str" + finwrap.entry);
    }
  }
  Map<String,VarExprent> mapCatch=new HashMap<String,VarExprent>();
  collectCatchVars(root,flatthelper,mapCatch);
  Map<DirectNode,Map<String,PrimitiveExprsList>> mapData=new HashMap<DirectNode,Map<String,PrimitiveExprsList>>();
  LinkedList<DirectNode> stack=new LinkedList<DirectNode>();
  LinkedList<LinkedList<String>> stackEntryPoint=new LinkedList<LinkedList<String>>();
  stack.add(dgraph.first);
  stackEntryPoint.add(new LinkedList<String>());
  Map<String,PrimitiveExprsList> map=new HashMap<String,PrimitiveExprsList>();
  map.put(null,new PrimitiveExprsList());
  mapData.put(dgraph.first,map);
  while (!stack.isEmpty()) {
    DirectNode node=stack.removeFirst();
    LinkedList<String> entrypoints=stackEntryPoint.removeFirst();
    PrimitiveExprsList data;
    if (mapCatch.containsKey(node.id)) {
      data=getExpressionData(mapCatch.get(node.id));
    }
 else {
      data=mapData.get(node).get(buildEntryPointKey(entrypoints));
    }
    BasicBlockStatement block=node.block;
    if (block != null) {
      processBlock(block,data,cl);
      block.setExprents(data.getLstExprents());
    }
    String currentEntrypoint=entrypoints.isEmpty() ? null : entrypoints.getLast();
    for (    DirectNode nd : node.succs) {
      boolean isSuccessor=true;
      if (currentEntrypoint != null && dgraph.mapLongRangeFinallyPaths.containsKey(node.id)) {
        isSuccessor=false;
        for (        FinallyPathWrapper finwraplong : dgraph.mapLongRangeFinallyPaths.get(node.id)) {
          if (finwraplong.source.equals(currentEntrypoint) && finwraplong.destination.equals(nd.id)) {
            isSuccessor=true;
            break;
          }
        }
      }
      if (isSuccessor) {
        Map<String,PrimitiveExprsList> mapSucc=mapData.get(nd);
        if (mapSucc == null) {
          mapData.put(nd,mapSucc=new HashMap<String,PrimitiveExprsList>());
        }
        LinkedList<String> ndentrypoints=new LinkedList<String>(entrypoints);
        if (setFinallyLongRangeEntryPaths.contains(node.id + "String_Node_Str" + nd.id)) {
          ndentrypoints.addLast(node.id);
        }
 else         if (!setFinallyShortRangeEntryPoints.contains(nd.id) && dgraph.mapLongRangeFinallyPaths.containsKey(node.id)) {
          ndentrypoints.removeLast();
        }
        int succ_entry_index=ndentrypoints.indexOf(nd.id);
        if (succ_entry_index >= 0) {
          for (int elements_to_remove=ndentrypoints.size() - succ_entry_index; elements_to_remove > 0; elements_to_remove--) {
            ndentrypoints.removeLast();
          }
        }
        String ndentrykey=buildEntryPointKey(ndentrypoints);
        if (!mapSucc.containsKey(ndentrykey)) {
          mapSucc.put(ndentrykey,copyVarExprents(data.copyStack()));
          stack.add(nd);
          stackEntryPoint.add(ndentrypoints);
        }
      }
    }
  }
  initStatementExprents(root);
}