StrictlyArithmeticBinaryProgramPoint extends BinaryProgramPoint { public static boolean originatesFrom(Tree element) { return element.is( Tree.Kind.MINUS, Tree.Kind.MULTIPLY, Tree.Kind.DIVIDE, Tree.Kind.REMAINDER, Tree.Kind.MINUS_ASSIGNMENT, Tree.Kind.MULTIPLY_ASSIGNMENT, Tree.Kind.DIVIDE_ASSIGNMENT, Tree.Kind.REMAINDER_ASSIGNMENT); }  static boolean originatesFrom(Tree element);  }
@Test public void matchingTrees() throws Exception { assertThat(StrictlyArithmeticBinaryProgramPoint.originatesFrom(tree(Kind.PLUS))).isFalse(); assertThat(StrictlyArithmeticBinaryProgramPoint.originatesFrom(tree(Kind.RETURN_STATEMENT))).isFalse(); assertThat(StrictlyArithmeticBinaryProgramPoint.originatesFrom(tree(Kind.BITWISE_AND))).isFalse(); assertThat(StrictlyArithmeticBinaryProgramPoint.originatesFrom(tree(Kind.LEFT_SHIFT))).isFalse(); assertThat(StrictlyArithmeticBinaryProgramPoint.originatesFrom(tree(Kind.DIVIDE))).isTrue(); assertThat(StrictlyArithmeticBinaryProgramPoint.originatesFrom(tree(Kind.MULTIPLY_ASSIGNMENT))).isTrue(); }