Program: 87551
Project: 87551
Buggy source:
@Override public PtNodeInfo readPtNode(final int ptNodePos,final FormatOptions options){
  int addressPointer=ptNodePos;
  final int flags=PtNodeReader.readPtNodeOptionFlags(mDictBuffer);
  addressPointer+=FormatSpec.PTNODE_FLAGS_SIZE;
  final int parentAddress=PtNodeReader.readParentAddress(mDictBuffer,options);
  if (BinaryDictIOUtils.supportsDynamicUpdate(options)) {
    addressPointer+=FormatSpec.PARENT_ADDRESS_SIZE;
  }
  final int characters[];
  if (0 != (flags & FormatSpec.FLAG_HAS_MULTIPLE_CHARS)) {
    int index=0;
    int character=CharEncoding.readChar(mDictBuffer);
    addressPointer+=CharEncoding.getCharSize(character);
    while (FormatSpec.INVALID_CHARACTER != character) {
      mCharacterBuffer[index++]=character;
      character=CharEncoding.readChar(mDictBuffer);
      addressPointer+=CharEncoding.getCharSize(character);
    }
    characters=Arrays.copyOfRange(mCharacterBuffer,0,index);
  }
 else {
    final int character=CharEncoding.readChar(mDictBuffer);
    addressPointer+=CharEncoding.getCharSize(character);
    characters=new int[]{character};
  }
  final int frequency;
  if (0 != (FormatSpec.FLAG_IS_TERMINAL & flags)) {
    frequency=PtNodeReader.readFrequency(mDictBuffer);
    addressPointer+=FormatSpec.PTNODE_FREQUENCY_SIZE;
  }
 else {
    frequency=PtNode.NOT_A_TERMINAL;
  }
  int childrenAddress=PtNodeReader.readChildrenAddress(mDictBuffer,flags,options);
  if (childrenAddress != FormatSpec.NO_CHILDREN_ADDRESS) {
    childrenAddress+=addressPointer;
  }
  addressPointer+=BinaryDictIOUtils.getChildrenAddressSize(flags,options);
  final ArrayList<WeightedString> shortcutTargets;
  if (0 != (flags & FormatSpec.FLAG_HAS_SHORTCUT_TARGETS)) {
    shortcutTargets=new ArrayList<WeightedString>();
    addressPointer+=PtNodeReader.readShortcut(mDictBuffer,shortcutTargets);
  }
 else {
    shortcutTargets=null;
  }
  final ArrayList<PendingAttribute> bigrams;
  if (0 != (flags & FormatSpec.FLAG_HAS_BIGRAMS)) {
    bigrams=new ArrayList<PendingAttribute>();
    addressPointer+=PtNodeReader.readBigramAddresses(mDictBuffer,bigrams,addressPointer);
    if (bigrams.size() >= FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) {
      MakedictLog.d("String_Node_Str");
    }
  }
 else {
    bigrams=null;
  }
  return new PtNodeInfo(ptNodePos,addressPointer,flags,characters,frequency,parentAddress,childrenAddress,shortcutTargets,bigrams);
}

Fixed version (ground truth):
@Override public PtNodeInfo readPtNode(final int ptNodePos,final FormatOptions options){
  int addressPointer=ptNodePos;
  final int flags=PtNodeReader.readPtNodeOptionFlags(mDictBuffer);
  addressPointer+=FormatSpec.PTNODE_FLAGS_SIZE;
  final int parentAddress=PtNodeReader.readParentAddress(mDictBuffer,options);
  if (BinaryDictIOUtils.supportsDynamicUpdate(options)) {
    addressPointer+=FormatSpec.PARENT_ADDRESS_SIZE;
  }
  final int characters[];
  if (0 != (flags & FormatSpec.FLAG_HAS_MULTIPLE_CHARS)) {
    int index=0;
    int character=CharEncoding.readChar(mDictBuffer);
    addressPointer+=CharEncoding.getCharSize(character);
    while (FormatSpec.INVALID_CHARACTER != character) {
      mCharacterBuffer[index++]=character;
      character=CharEncoding.readChar(mDictBuffer);
      addressPointer+=CharEncoding.getCharSize(character);
    }
    characters=Arrays.copyOfRange(mCharacterBuffer,0,index);
  }
 else {
    final int character=CharEncoding.readChar(mDictBuffer);
    addressPointer+=CharEncoding.getCharSize(character);
    characters=new int[]{character};
  }
  final int frequency;
  if (0 != (FormatSpec.FLAG_IS_TERMINAL & flags)) {
    frequency=PtNodeReader.readFrequency(mDictBuffer);
    addressPointer+=FormatSpec.PTNODE_FREQUENCY_SIZE;
  }
 else {
    frequency=PtNode.NOT_A_TERMINAL;
  }
  int childrenAddress=PtNodeReader.readChildrenAddress(mDictBuffer,flags,options);
  if (childrenAddress != FormatSpec.NO_CHILDREN_ADDRESS) {
    childrenAddress+=addressPointer;
  }
  addressPointer+=BinaryDictIOUtils.getChildrenAddressSize(flags,options);
  final ArrayList<WeightedString> shortcutTargets;
  if (0 != (flags & FormatSpec.FLAG_HAS_SHORTCUT_TARGETS)) {
    shortcutTargets=new ArrayList<WeightedString>();
    addressPointer+=PtNodeReader.readShortcut(mDictBuffer,shortcutTargets);
  }
 else {
    shortcutTargets=null;
  }
  final ArrayList<PendingAttribute> bigrams;
  if (0 != (flags & FormatSpec.FLAG_HAS_BIGRAMS)) {
    bigrams=new ArrayList<PendingAttribute>();
    addressPointer+=PtNodeReader.readBigramAddresses(mDictBuffer,bigrams,addressPointer);
    if (bigrams.size() >= FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) {
      throw new RuntimeException("String_Node_Str" + bigrams.size() + "String_Node_Str"+ FormatSpec.MAX_BIGRAMS_IN_A_PTNODE+ "String_Node_Str");
    }
  }
 else {
    bigrams=null;
  }
  return new PtNodeInfo(ptNodePos,addressPointer,flags,characters,frequency,parentAddress,childrenAddress,shortcutTargets,bigrams);
}