Program: 91728
Project: 91728
Buggy source:
public void parseData(DataInput stream) throws IOException, CoreException {
  int magic=0;
  ArrayList<Block> blocks=null;
  SourceFile source=null;
  boolean parseFirstFnctn=false;
  magic=stream.readInt();
  if (magic == GCOV_NOTE_MAGIC) {
    stream=new BEDataInputStream((DataInputStream)stream);
  }
 else {
    magic=(magic >> 16) | (magic << 16);
    magic=((magic & 0xff00ff) << 8) | ((magic >> 8) & 0xff00ff);
    if (magic == GCOV_NOTE_MAGIC) {
      stream=new LEDataInputStream((DataInputStream)stream);
    }
 else {
      String message=NLS.bind(Messages.GcnoRecordsParser_magic_num_error,magic);
      Status status=new Status(IStatus.ERROR,Activator.PLUGIN_ID,message);
      throw new CoreException(status);
    }
  }
  int version=stream.readInt();
  stream.readInt();
  while (true) {
    try {
      int tag;
      while (true) {
        tag=stream.readInt();
        if (tag == GCOV_TAG_FUNCTION || tag == GCOV_TAG_BLOCKS || tag == GCOV_TAG_ARCS || tag == GCOV_TAG_LINES)         break;
      }
      int length=stream.readInt();
      if (tag == GCOV_TAG_FUNCTION) {
        if (parseFirstFnctn) {
          fnctns.add(fnctn);
        }
        long fnctnIdent=(stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
        long fnctnChksm=(stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
        if (version >= 875575082) {
          stream.readInt();
        }
        String fnctnName=GcovStringReader.readString(stream);
        String fnctnSrcFle=GcovStringReader.readString(stream);
        long fnctnFrstLnNmbr=(stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
        fnctn=new GcnoFunction(fnctnIdent,fnctnChksm,fnctnName,fnctnSrcFle,fnctnFrstLnNmbr);
        SourceFile srcFle2=findOrAdd(fnctn.getSrcFile());
        if (fnctn.getFirstLineNmbr() >= srcFle2.getNumLines()) {
          srcFle2.setNumLines((int)fnctn.getFirstLineNmbr() + 1);
        }
        srcFle2.addFnctn(fnctn);
        parseFirstFnctn=true;
        continue;
      }
 else       if (tag == GCOV_TAG_BLOCKS) {
        blocks=new ArrayList<>();
        for (int i=0; i < length; i++) {
          long BlckFlag=stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK;
          Block blck=new Block(BlckFlag);
          blocks.add(blck);
        }
        fnctn.setNumBlocks(length);
        continue;
      }
 else       if (tag == GCOV_TAG_ARCS) {
        int srcBlockIndice=stream.readInt();
        int nmbrArcs=(length - 1) / 2;
        ArrayList<Arc> arcs=new ArrayList<>(nmbrArcs);
        for (int i=0; i < nmbrArcs; i++) {
          int dstnatnBlockIndice=stream.readInt();
          long flag=(stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
          Arc arc=new Arc(srcBlockIndice,dstnatnBlockIndice,flag,blocks);
          arcs.add(arc);
        }
        Block srcBlk=blocks.get(srcBlockIndice);
        for (        Arc a : arcs) {
          srcBlk.addExitArcs(a);
          srcBlk.incNumSuccs();
        }
        for (        Arc a : arcs) {
          Block dstntnBlk=a.getDstnatnBlock();
          dstntnBlk.addEntryArcs(a);
          dstntnBlk.incNumPreds();
        }
        for (        Arc a : arcs) {
          if (a.isFake()) {
            if (a.getSrcBlock() != null) {
              srcBlk=blocks.get(srcBlockIndice);
              srcBlk.setCallSite(true);
              a.setCallNonReturn(true);
            }
 else {
              a.setNonLoclaReturn(true);
              Block dstntnBlk=a.getDstnatnBlock();
              dstntnBlk.setNonLocalReturn(true);
            }
          }
          if (!a.isOnTree()) {
            fnctn.incNumCounts();
          }
        }
        fnctn.setFunctionBlocks(blocks);
        continue;
      }
 else       if (tag == GCOV_TAG_LINES) {
        int numBlock=stream.readInt();
        long[] lineNos=new long[length - 1];
        int ix=0;
        do {
          long lineNumber=stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK;
          if (lineNumber != 0) {
            if (ix == 0) {
              lineNos[ix++]=0;
              lineNos[ix++]=source.getIndex();
            }
            lineNos[ix++]=lineNumber;
            if (lineNumber >= source.getNumLines()) {
              source.setNumLines((int)lineNumber + 1);
            }
          }
 else {
            String fileName=GcovStringReader.readString(stream);
            if (fileName.equals(Messages.GcnoRecordsParser_null_string)) {
              break;
            }
            source=findOrAdd(fileName);
            lineNos[ix++]=0;
            lineNos[ix++]=source.getIndex();
          }
        }
 while (true);
        fnctn.getFunctionBlocks().get((numBlock)).setEncoding(lineNos);
        fnctn.getFunctionBlocks().get((numBlock)).setNumLine(ix);
        continue;
      }
    }
 catch (    EOFException e) {
      fnctn.setFunctionBlocks(blocks);
      fnctns.add(fnctn);
      break;
    }
  }
}

Fixed version (ground truth):
public void parseData(DataInput stream) throws IOException, CoreException {
  int magic=0;
  ArrayList<Block> blocks=null;
  SourceFile source=null;
  boolean parseFirstFnctn=false;
  magic=stream.readInt();
  if (magic == GCOV_NOTE_MAGIC) {
    stream=new BEDataInputStream((DataInputStream)stream);
  }
 else {
    magic=(magic >> 16) | (magic << 16);
    magic=((magic & 0xff00ff) << 8) | ((magic >> 8) & 0xff00ff);
    if (magic == GCOV_NOTE_MAGIC) {
      stream=new LEDataInputStream((DataInputStream)stream);
    }
 else {
      String message=NLS.bind(Messages.GcnoRecordsParser_magic_num_error,magic);
      Status status=new Status(IStatus.ERROR,Activator.PLUGIN_ID,message);
      throw new CoreException(status);
    }
  }
  int version=stream.readInt();
  stream.readInt();
  while (true) {
    try {
      int tag;
      while (true) {
        tag=stream.readInt();
        if (tag == GCOV_TAG_FUNCTION || tag == GCOV_TAG_BLOCKS || tag == GCOV_TAG_ARCS || tag == GCOV_TAG_LINES)         break;
      }
      int length=stream.readInt();
      if (tag == GCOV_TAG_FUNCTION) {
        if (parseFirstFnctn) {
          fnctns.add(fnctn);
        }
        long fnctnIdent=(stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
        long fnctnChksm=(stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
        if (version >= GCC_VER_407) {
          stream.readInt();
        }
        String fnctnName=GcovStringReader.readString(stream);
        if (version >= GCC_VER_810R) {
          stream.readInt();
        }
        String fnctnSrcFle=GcovStringReader.readString(stream);
        long fnctnFrstLnNmbr=(stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
        if (version >= GCC_VER_810R) {
          stream.readInt();
          stream.readInt();
        }
        fnctn=new GcnoFunction(fnctnIdent,fnctnChksm,fnctnName,fnctnSrcFle,fnctnFrstLnNmbr);
        SourceFile srcFle2=findOrAdd(fnctn.getSrcFile());
        if (fnctn.getFirstLineNmbr() >= srcFle2.getNumLines()) {
          srcFle2.setNumLines((int)fnctn.getFirstLineNmbr() + 1);
        }
        srcFle2.addFnctn(fnctn);
        parseFirstFnctn=true;
        continue;
      }
 else       if (tag == GCOV_TAG_BLOCKS) {
        if (version >= GCC_VER_810R) {
          length=stream.readInt();
        }
        blocks=new ArrayList<>();
        Block blck;
        for (int i=0; i < length; i++) {
          if (version >= GCC_VER_810R) {
            blck=new Block(0);
          }
 else {
            long BlckFlag=stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK;
            blck=new Block(BlckFlag);
          }
          blocks.add(blck);
        }
        fnctn.setNumBlocks(length);
        continue;
      }
 else       if (tag == GCOV_TAG_ARCS) {
        int srcBlockIndice=stream.readInt();
        int nmbrArcs=(length - 1) / 2;
        ArrayList<Arc> arcs=new ArrayList<>(nmbrArcs);
        for (int i=0; i < nmbrArcs; i++) {
          int dstnatnBlockIndice=stream.readInt();
          long flag=(stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
          Arc arc=new Arc(srcBlockIndice,dstnatnBlockIndice,flag,blocks);
          arcs.add(arc);
        }
        Block srcBlk=blocks.get(srcBlockIndice);
        for (        Arc a : arcs) {
          srcBlk.addExitArcs(a);
          srcBlk.incNumSuccs();
        }
        for (        Arc a : arcs) {
          Block dstntnBlk=a.getDstnatnBlock();
          dstntnBlk.addEntryArcs(a);
          dstntnBlk.incNumPreds();
        }
        for (        Arc a : arcs) {
          if (a.isFake()) {
            if (a.getSrcBlock() != null) {
              srcBlk=blocks.get(srcBlockIndice);
              srcBlk.setCallSite(true);
              a.setCallNonReturn(true);
            }
 else {
              a.setNonLoclaReturn(true);
              Block dstntnBlk=a.getDstnatnBlock();
              dstntnBlk.setNonLocalReturn(true);
            }
          }
          if (!a.isOnTree()) {
            fnctn.incNumCounts();
          }
        }
        fnctn.setFunctionBlocks(blocks);
        continue;
      }
 else       if (tag == GCOV_TAG_LINES) {
        int numBlock=stream.readInt();
        long[] lineNos=new long[length - 1];
        int ix=0;
        do {
          long lineNumber=stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK;
          if (lineNumber != 0) {
            if (ix == 0) {
              lineNos[ix++]=0;
              lineNos[ix++]=source.getIndex();
            }
            lineNos[ix++]=lineNumber;
            if (lineNumber >= source.getNumLines()) {
              source.setNumLines((int)lineNumber + 1);
            }
          }
 else {
            String fileName=GcovStringReader.readString(stream);
            if (fileName.equals(Messages.GcnoRecordsParser_null_string)) {
              break;
            }
            source=findOrAdd(fileName);
            lineNos[ix++]=0;
            lineNos[ix++]=source.getIndex();
          }
        }
 while (true);
        fnctn.getFunctionBlocks().get((numBlock)).setEncoding(lineNos);
        fnctn.getFunctionBlocks().get((numBlock)).setNumLine(ix);
        continue;
      }
    }
 catch (    EOFException e) {
      fnctn.setFunctionBlocks(blocks);
      fnctns.add(fnctn);
      break;
    }
  }
}