/*
 * Copyright 2017 The Error Prone Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.google.errorprone.bugpatterns.testdata;

/**
 * @author sulku@google.com (Marsela Sulku)
 * @author mariasam@google.com (Maria Sam)
 */
public class HidingFieldPositiveCases1 {

  /** base class */
  public static class ClassA {
    protected String varOne;
    public int varTwo;
    String varThree;
  }


  /** ClassB has a variable name as parent */
  public static class ClassB extends ClassA {
    // BUG: Diagnostic contains: superclass: ClassA
    private String varOne = "Test";
  }

  /** ClassC has same variable name as grandparent */
  public static class ClassC extends ClassB {
    // BUG: Diagnostic contains: superclass: ClassA
    public int varTwo;
  }

  /** ClassD has same variable name as grandparent and other unrelated members */
  public static class ClassD extends ClassB {
    // BUG: Diagnostic contains: superclass: ClassA
    protected int varThree;
    // BUG: Diagnostic contains: superclass: ClassA
    int varTwo;
    String randOne;
    String randTwo;
  }

  /** ClassE has same variable name as grandparent */
  public static class ClassE extends ClassC {
    // BUG: Diagnostic contains: superclass: ClassC
    public String varTwo;
  }

  public static class ClassF extends ClassA {
    @SuppressWarnings("HidingField") // no warning because it's suppressed
    public String varThree;
  }

  public static class ClassG extends ClassF {
    // BUG: Diagnostic contains: superclass: ClassF
    String varThree;
  }
}

@@ -920,17 +920,16 @@
 e;%0A  %7D%0A%0A
-%0A
   /** Cl
@@ -943,31 +943,53 @@
 s a 
-variable name a
+field with the same name as one in it
 s parent
  */%0A
@@ -980,24 +980,25 @@
 n its parent
+.
  */%0A  public
@@ -1145,36 +1145,55 @@
 ssC has 
-same variable name a
+a field with the same name as one in it
 s grandp
@@ -1189,32 +1189,33 @@
  its grandparent
+.
  */%0A  public sta
@@ -1329,24 +1329,29 @@
 ;%0A  %7D%0A%0A  /**
+%0A   *
  ClassD has 
@@ -1350,36 +1350,65 @@
 ssD has 
-same variable name a
+multiple fields with the same name as those in it
 s grandp
@@ -1416,18 +1416,31 @@
 rent
+,
  a
-nd
+s well as
  other
+%0A   *
  unr
@@ -1453,16 +1453,20 @@
  members
+.%0A  
  */%0A  pu

Update javadocs in HidingFieldPositiveCases1