private long getInstructionAddress(int index) {
    BinExport2.Instruction instruction = binexport.getInstruction(index);
    if (instruction.hasAddress()) {
      return instruction.getAddress();
    }
    int delta = 0;
    for (--index; index >= 0; --index) {
      instruction = binexport.getInstruction(index);
      delta += instruction.getRawBytes().size();
      if (instruction.hasAddress()) {
        return binexport.getInstruction(index).getAddress() + delta;
      }
    }
    throw new IllegalStateException("Invalid instruction index");
  }
Reads data from BinExport2 files and renders disassemblies.
java/ui/src/main/java/com/google/security/zynamics/bindiff/io/BinExport2Reader.java