Program: 28775
Project: 28775
Buggy source:
private static MatchingMetaInfoHolder aggregationTableMetaInfoHolder(MatchingMetaInfoHolder matchingMetaInfoHolder,AbstractDefinition tableDefinition){
  MetaStreamEvent metaStreamEventForTable=new MetaStreamEvent();
  metaStreamEventForTable.setEventType(MetaStreamEvent.EventType.TABLE);
  metaStreamEventForTable.addInputDefinition(tableDefinition);
  MetaStateEvent metaStateEvent;
  if (matchingMetaInfoHolder.getMetaStateEvent().getMetaStreamEvents().length == 1) {
    metaStateEvent=new MetaStateEvent(1);
    metaStateEvent.addEvent(metaStreamEventForTable);
    return new MatchingMetaInfoHolder(metaStateEvent,0,0,tableDefinition,tableDefinition,0);
  }
 else {
    metaStateEvent=new MetaStateEvent(2);
    metaStateEvent.addEvent(matchingMetaInfoHolder.getMetaStateEvent().getMetaStreamEvent(matchingMetaInfoHolder.getMatchingStreamEventIndex()));
    metaStateEvent.addEvent(metaStreamEventForTable);
    return MatcherParser.constructMatchingMetaStateHolder(metaStateEvent,0,tableDefinition,UNKNOWN_STATE);
  }
}

Fixed version (ground truth):
private static MatchingMetaInfoHolder aggregationTableMetaInfoHolder(MatchingMetaInfoHolder matchingMetaInfoHolder,AbstractDefinition tableDefinition){
  MetaStreamEvent metaStreamEventForTable=new MetaStreamEvent();
  metaStreamEventForTable.setEventType(MetaStreamEvent.EventType.TABLE);
  metaStreamEventForTable.addInputDefinition(tableDefinition);
  MetaStateEvent metaStateEvent;
  if (matchingMetaInfoHolder.getMetaStateEvent().getMetaStreamEvents().length == 1) {
    metaStateEvent=new MetaStateEvent(1);
    metaStateEvent.addEvent(metaStreamEventForTable);
    return new MatchingMetaInfoHolder(metaStateEvent,0,0,tableDefinition,tableDefinition,0);
  }
 else {
    metaStateEvent=new MetaStateEvent(2);
    MetaStreamEvent matchingStreamEvent=matchingMetaInfoHolder.getMetaStateEvent().getMetaStreamEvent(matchingMetaInfoHolder.getMatchingStreamEventIndex());
    MetaStreamEvent newMatchingStreamEvent=new MetaStreamEvent();
    newMatchingStreamEvent.setEventType(MetaStreamEvent.EventType.TABLE);
    StreamDefinition newMatchingStreamDefinition=new StreamDefinition();
    for (    Attribute attribute : matchingStreamEvent.getBeforeWindowData()) {
      newMatchingStreamEvent.addData(attribute);
      newMatchingStreamDefinition.attribute(attribute.getName(),attribute.getType());
      metaStreamArraySizes[0]=++metaStreamArraySizes[0];
    }
    newMatchingStreamEvent.initializeAfterWindowData();
    for (    Attribute attribute : matchingStreamEvent.getOnAfterWindowData()) {
      newMatchingStreamEvent.addData(attribute);
      newMatchingStreamDefinition.attribute(attribute.getName(),attribute.getType());
      metaStreamArraySizes[1]=++metaStreamArraySizes[1];
    }
    for (    Attribute attribute : matchingStreamEvent.getOutputData()) {
      newMatchingStreamEvent.addOutputData(attribute);
      newMatchingStreamDefinition.attribute(attribute.getName(),attribute.getType());
      metaStreamArraySizes[2]=++metaStreamArraySizes[2];
    }
    newMatchingStreamEvent.addOutputData(new Attribute("String_Node_Str",Attribute.Type.LONG));
    newMatchingStreamEvent.addOutputData(new Attribute("String_Node_Str",Attribute.Type.LONG));
    newMatchingStreamDefinition.attribute("String_Node_Str",Attribute.Type.LONG);
    newMatchingStreamDefinition.attribute("String_Node_Str",Attribute.Type.LONG);
    newMatchingStreamEvent.addInputDefinition(newMatchingStreamDefinition);
    metaStateEvent.addEvent(newMatchingStreamEvent);
    metaStateEvent.addEvent(metaStreamEventForTable);
    return MatcherParser.constructMatchingMetaStateHolder(metaStateEvent,0,tableDefinition,UNKNOWN_STATE);
  }
}