test_class.file: dubbo-plugin/dubbo-qos/src/test/java/org/apache/dubbo/qos/textui/TLadderTest.java
test_class.identifier: TLadderTest
test_case.body: @Test
      public void testRendering() throws Exception {
          TLadder ladder = new TLadder();
          ladder.addItem("1");
          ladder.addItem("2");
          ladder.addItem("3");
          ladder.addItem("4");
          String result = ladder.rendering();
          String expected = "1" + System.lineSeparator() +
                  "  `-2" + System.lineSeparator() +
                  "    `-3" + System.lineSeparator() +
                  "      `-4" + System.lineSeparator();
          assertThat(result, equalTo(expected));
          System.out.println(result);
      }
test_case.class_method_signature: TLadderTest.testRendering()
test_case.full_signature: @Test public void testRendering()
test_case.identifier: testRendering
test_case.invocations: addItem addItem addItem addItem rendering lineSeparator lineSeparator lineSeparator lineSeparator assertThat equalTo println
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRendering()
focal_class.declarator: LADDER_CHAR = "`-"
focal_class.modifier: private static final
focal_class.original_string: private static final String LADDER_CHAR = "`-";
focal_class.type: String
focal_class.var_name: LADDER_CHAR
focal_class.declarator: STEP_CHAR = " "
focal_class.modifier: private static final
focal_class.original_string: private static final String STEP_CHAR = " ";
focal_class.type: String
focal_class.var_name: STEP_CHAR
focal_class.declarator: INDENT_STEP = 2
focal_class.modifier: private static final
focal_class.original_string: private static final int INDENT_STEP = 2;
focal_class.type: int
focal_class.var_name: INDENT_STEP
focal_class.declarator: items = new ArrayList<String>()
focal_class.modifier: private final
focal_class.original_string: private final List<String> items = new ArrayList<String>();
focal_class.type: List<String>
focal_class.var_name: items
focal_class.file: dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/textui/TLadder.java
focal_class.identifier: TLadder
focal_class.interfaces: implements TComponent
focal_class.class_method_signature: TLadder.rendering()
focal_class.full_signature: @Override public String rendering()
focal_class.identifier: rendering
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String rendering()
focal_class.class_method_signature: TLadder.addItem(String item)
focal_class.full_signature: public TLadder addItem(String item)
focal_class.identifier: addItem
focal_class.modifiers: public
focal_class.parameters: (String item)
focal_class.return: TLadder
focal_class.signature: TLadder addItem(String item)
focal_method.body: @Override
      public String rendering() {
          final StringBuilder ladderSB = new StringBuilder();
          int deep = 0;
          for (String item : items) {
  
              // no separator is required for the first item
              if (deep == 0) {
                  ladderSB
                          .append(item)
                          .append(System.lineSeparator());
              }
  
              // need separator for others
              else {
                  ladderSB
                          .append(repeat(STEP_CHAR, deep * INDENT_STEP))
                          .append(LADDER_CHAR)
                          .append(item)
                          .append(System.lineSeparator());
              }
  
              deep++;
  
          }
          return ladderSB.toString();
      }
focal_method.class_method_signature: TLadder.rendering()
focal_method.full_signature: @Override public String rendering()
focal_method.identifier: rendering
focal_method.invocations: append append lineSeparator append append append append repeat lineSeparator toString
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: String
focal_method.signature: String rendering()