Program: 56242
Project: 56242
Buggy source:
private static Map<ExecutionGroupVertex,ManagementGroupVertex> addGroupVertices(Map<ExecutionStage,ManagementStage> stageMap){
  final Map<ExecutionGroupVertex,ManagementGroupVertex> groupMap=new HashMap<ExecutionGroupVertex,ManagementGroupVertex>();
  Iterator<ExecutionStage> iterator=stageMap.keySet().iterator();
  while (iterator.hasNext()) {
    final ExecutionStage executionStage=iterator.next();
    ManagementStage parent=stageMap.get(executionStage);
    for (int i=0; i < executionStage.getNumberOfStageMembers(); i++) {
      final ExecutionGroupVertex groupVertex=executionStage.getStageMember(i);
      final ManagementGroupVertex managementGroupVertex=new ManagementGroupVertex(parent,groupVertex.getName());
      groupMap.put(groupVertex,managementGroupVertex);
    }
  }
  iterator=stageMap.keySet().iterator();
  while (iterator.hasNext()) {
    final ExecutionStage executionStage=iterator.next();
    for (int i=0; i < executionStage.getNumberOfStageMembers(); i++) {
      final ExecutionGroupVertex sourceVertex=executionStage.getStageMember(i);
      final ManagementGroupVertex sourceGroupVertex=groupMap.get(sourceVertex);
      for (int j=0; j < sourceVertex.getNumberOfForwardLinks(); j++) {
        final ExecutionGroupEdge edge=sourceVertex.getForwardEdge(j);
        final ExecutionGroupVertex targetVertex=edge.getTargetVertex();
        final ManagementGroupVertex targetGroupVertex=groupMap.get(targetVertex);
        new ManagementGroupEdge(sourceGroupVertex,j,targetGroupVertex,edge.getIndexOfInputGate(),edge.getChannelType(),edge.getCompressionLevel());
      }
    }
  }
  return groupMap;
}

Fixed version (ground truth):
private static Map<ExecutionGroupVertex,ManagementGroupVertex> addGroupVertices(Map<ExecutionStage,ManagementStage> stageMap){
  final Map<ExecutionGroupVertex,ManagementGroupVertex> groupMap=new HashMap<ExecutionGroupVertex,ManagementGroupVertex>();
  Iterator<Map.Entry<ExecutionStage,ManagementStage>> iterator=stageMap.entrySet().iterator();
  while (iterator.hasNext()) {
    final Map.Entry<ExecutionStage,ManagementStage> entry=iterator.next();
    final ExecutionStage executionStage=entry.getKey();
    final ManagementStage parent=entry.getValue();
    for (int i=0; i < executionStage.getNumberOfStageMembers(); i++) {
      final ExecutionGroupVertex groupVertex=executionStage.getStageMember(i);
      final ManagementGroupVertex managementGroupVertex=new ManagementGroupVertex(parent,groupVertex.getName());
      groupMap.put(groupVertex,managementGroupVertex);
    }
  }
  iterator=stageMap.entrySet().iterator();
  while (iterator.hasNext()) {
    final Map.Entry<ExecutionStage,ManagementStage> entry=iterator.next();
    final ExecutionStage executionStage=entry.getKey();
    for (int i=0; i < executionStage.getNumberOfStageMembers(); i++) {
      final ExecutionGroupVertex sourceVertex=executionStage.getStageMember(i);
      final ManagementGroupVertex sourceGroupVertex=groupMap.get(sourceVertex);
      for (int j=0; j < sourceVertex.getNumberOfForwardLinks(); j++) {
        final ExecutionGroupEdge edge=sourceVertex.getForwardEdge(j);
        final ExecutionGroupVertex targetVertex=edge.getTargetVertex();
        final ManagementGroupVertex targetGroupVertex=groupMap.get(targetVertex);
        new ManagementGroupEdge(sourceGroupVertex,j,targetGroupVertex,edge.getIndexOfInputGate(),edge.getChannelType(),edge.getCompressionLevel());
      }
    }
  }
  return groupMap;
}