private static String renderInstructionOperands(
      final BinExport2 proto, final BinExport2.Instruction instruction) {
    final StringBuilder disassembly = new StringBuilder();
    final ImmutableList<BinExport2.Comment> instructionComments =
        instruction.getCommentIndexList().stream()
            .map(proto::getComment)
            .collect(toImmutableList());
    for (int i = 0; i < instruction.getOperandIndexCount(); i++) {
      final BinExport2.Operand operand = proto.getOperand(instruction.getOperandIndex(i));
      final int operandIndex = i;
      final ImmutableMap<Integer, String> operandComments =
          instructionComments.stream()
              .filter(comment -> comment.getInstructionOperandIndex() == operandIndex)
              .collect(
                  toImmutableMap(
                      Comment::getOperandExpressionIndex,
                      comment -> proto.getStringTable(comment.getStringTableIndex())));

      for (int j = 0; j < operand.getExpressionIndexCount(); j++) {
        final BinExport2.Expression expression = proto.getExpression(operand.getExpressionIndex(j));
        if (!expression.hasParentIndex()) {
          renderExpression(proto, operand, j, operandComments, disassembly);
        }
      }
      if (i != instruction.getOperandIndexCount() - 1) {
        disassembly.append(", ");
      }
    }
    return disassembly.toString();
  }
Reads data from BinExport2 files and renders disassemblies.
java/ui/src/main/java/com/google/security/zynamics/bindiff/io/BinExport2Reader.java