package redundant_method_override;

import java.util.ArrayList;

public class RedundantMethodOverride extends S {

  @Override
  void <warning descr="Method 'foo()' is identical to its super method">foo</warning>() {
    System.out.println();
  }

  void bar() {
    System.out.println();
  }

  public void m() {
    System.out.println();
  }
}
class S {

  void foo() {
    System.out.println();
  }

  synchronized void bar() {
    System.out.println();
  }

  void m() {
    System.out.println();
  }
}
class A {
  void f() {
    new X();
  }

  class X {}
}
class BB extends A {
  void f() {
    new X();
  }

  class X {}
}
class CC extends A {
  void <warning descr="Method 'f()' is identical to its super method">f</warning>() {
    new X();
  }
}
class SuperCall {
  void some() {
  }
}
class S2 extends SuperCall {
  @Override
  void <warning descr="Method 'some()' is identical to its super method">some</warning>() {
    super.some();
  }
}
class B {
  int some() {
    return 1;
  }
}
class C extends B {
  @Override
  int <warning descr="Method 'some()' is identical to its super method">some</warning>() {
    return super.some();
  }
}
class MyList extends ArrayList {
  @Override
  protected void removeRange(int fromIndex, int toIndex) {
    super.removeRange(fromIndex, toIndex);
  }
}
////////////////
class Sup {
  void overload1(int i) {}
  void overload1(int i, boolean b) {}

  protected void foox() {
    overload1(0);
  }
}
class Sub extends Sup {
  @Override
  protected void foox() { // not redundant
    overload1(0, true);
  }
}
///////////////////////////////
class Params {
  int fooy(int param1, Object param2) {
    return param1 + param2.hashCode();
  }
}
class ComplexParameterEquivalent extends Params {
  @Override
  int <warning descr="Method 'fooy()' is identical to its super method">fooy</warning>(int p1, Object p2) {
    return ((p1) + p2.hashCode());
  }
}

@@ -328,32 +328,72 @@
 t.println();%0A  %7D
+%0A%0A  void n(int i) %7B%0A    super.n(10);%0A  %7D
 %0A%7D%0Aclass S %7B%0A%0A  
@@ -533,24 +533,74 @@
 intln();%0A  %7D
+%0A%0A  void n(int i) %7B%0A    System.out.println(i);%0A  %7D
 %0A%7D%0Aclass A %7B
@@ -623,32 +623,47 @@
   new X();%0A  %7D%0A%0A
+  void g() %7B%7D%0A%0A
   class X %7B%7D%0A%7D%0Ac
@@ -687,32 +687,32 @@
  %7B%0A  void f() %7B%0A
-
     new X();%0A  %7D
@@ -713,16 +713,67 @@
 );%0A  %7D%0A%0A
+  @Override%0A  final void g() %7B%0A    super.g();%0A  %7D%0A%0A
   class 

add test case data