code: public static InsnList ifObjectsEqual(InsnList lhs, InsnList rhs, InsnList action) {
          Validate.notNull(lhs);
          Validate.notNull(rhs);
          Validate.notNull(action);
          
          
          InsnList ret = new InsnList();
          
          LabelNode notEqualLabelNode = new LabelNode();
          
          ret.add(lhs);
          ret.add(rhs);
          ret.add(new JumpInsnNode(Opcodes.IF_ACMPNE, notEqualLabelNode));
          ret.add(action);
          ret.add(notEqualLabelNode);
          
          return ret;
      }
docs: Compares two objects and performs some action if the objects are the same (uses == to check if same, not the equals method).
  @param lhs left hand side instruction list -- must leave an object on the stack
  @param rhs right hand side instruction list -- must leave an object on the stack
  @param action action to perform if results of {@code lhs} and {@code rhs} are equal
  @return instructions instruction list to perform some action if two objects are equal
  @throws NullPointerException if any argument is {@code null}