test_class.file: gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalExplanationTest.java
test_class.identifier: TraversalExplanationTest
test_case.body: @Test
      public void shouldWordWrapCorrectly() {
          GraphTraversal<?, ?> traversal = __.V().out().out();
          String toString = traversal.explain().prettyPrint();
          assertFalse(toString.contains("VertexStep(OUT,vertex),\n"));
          //System.out.println(toString);
          ///
          traversal = __.V().out().out().out().out();
          toString = traversal.explain().prettyPrint();
          assertTrue(toString.contains("VertexStep(OUT,vertex),"));
          //System.out.println(toString);
          ///
          for (int i = 0; i < 30; i++) {
              traversal = __.V();
              for (int j = 0; j < i; j++) {
                  traversal.out();
              }
              traversal.asAdmin().setStrategies(TraversalStrategies.GlobalCache.getStrategies(Graph.class));
              toString = traversal.explain().prettyPrint();
              if (i < 3)
                  assertFalse(toString.contains("VertexStep(OUT,vertex),\n"));
              else {
                  assertTrue(Stream.of(toString.split("\n"))
                          .filter(s -> s.startsWith(" "))
                          .map(String::trim)
                          .filter(s -> Character.isLowerCase(s.charAt(0)))
                          .findAny()
                          .isPresent()); // all indented word wraps should start with steps
                  assertTrue(toString.contains("vertex"));
              }
              for (int j = 80; j < 200; j++) {
                  for (final String line : traversal.explain().prettyPrint(j).split("\n")) {
                      assertTrue(line.length() <= j);
                  }
              }
              // System.out.println(toString);
          }
      }
test_case.class_method_signature: TraversalExplanationTest.shouldWordWrapCorrectly()
test_case.full_signature: @Test public void shouldWordWrapCorrectly()
test_case.identifier: shouldWordWrapCorrectly
test_case.invocations: out out V prettyPrint explain assertFalse contains out out out out V prettyPrint explain assertTrue contains V out setStrategies asAdmin getStrategies prettyPrint explain assertFalse contains assertTrue isPresent findAny filter map filter of split startsWith isLowerCase charAt assertTrue contains split prettyPrint explain assertTrue length
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldWordWrapCorrectly()
focal_class.declarator: traversal
focal_class.modifier: private
focal_class.original_string: private Traversal.Admin<?, ?> traversal;
focal_class.type: Traversal.Admin<?, ?>
focal_class.var_name: traversal
focal_class.declarator: strategyTraversals = new ArrayList<>()
focal_class.modifier: private
focal_class.original_string: private List<Pair<TraversalStrategy, Traversal.Admin<?, ?>>> strategyTraversals = new ArrayList<>();
focal_class.type: List<Pair<TraversalStrategy, Traversal.Admin<?, ?>>>
focal_class.var_name: strategyTraversals
focal_class.file: gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalExplanation.java
focal_class.identifier: TraversalExplanation
focal_class.interfaces: implements Serializable
focal_class.class_method_signature: TraversalExplanation.TraversalExplanation()
focal_class.full_signature: private  TraversalExplanation()
focal_class.identifier: TraversalExplanation
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  TraversalExplanation()
focal_class.class_method_signature: TraversalExplanation.TraversalExplanation(final Traversal.Admin<?, ?> traversal)
focal_class.full_signature: public  TraversalExplanation(final Traversal.Admin<?, ?> traversal)
focal_class.identifier: TraversalExplanation
focal_class.modifiers: public
focal_class.parameters: (final Traversal.Admin<?, ?> traversal)
focal_class.signature:  TraversalExplanation(final Traversal.Admin<?, ?> traversal)
focal_class.class_method_signature: TraversalExplanation.getStrategyTraversals()
focal_class.full_signature: public List<Pair<TraversalStrategy, Traversal.Admin<?, ?>>> getStrategyTraversals()
focal_class.identifier: getStrategyTraversals
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Pair<TraversalStrategy, Traversal.Admin<?, ?>>>
focal_class.signature: List<Pair<TraversalStrategy, Traversal.Admin<?, ?>>> getStrategyTraversals()
focal_class.class_method_signature: TraversalExplanation.getOriginalTraversal()
focal_class.full_signature: public Traversal.Admin<?, ?> getOriginalTraversal()
focal_class.identifier: getOriginalTraversal
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Traversal.Admin<?, ?>
focal_class.signature: Traversal.Admin<?, ?> getOriginalTraversal()
focal_class.class_method_signature: TraversalExplanation.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: TraversalExplanation.prettyPrint()
focal_class.full_signature: public String prettyPrint()
focal_class.identifier: prettyPrint
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String prettyPrint()
focal_class.class_method_signature: TraversalExplanation.prettyPrint(final int maxLineLength)
focal_class.full_signature: public String prettyPrint(final int maxLineLength)
focal_class.identifier: prettyPrint
focal_class.modifiers: public
focal_class.parameters: (final int maxLineLength)
focal_class.return: String
focal_class.signature: String prettyPrint(final int maxLineLength)
focal_class.class_method_signature: TraversalExplanation.wordWrap(final String longString, final int maxLengthPerLine, final int newLineIndent)
focal_class.full_signature: private String wordWrap(final String longString, final int maxLengthPerLine, final int newLineIndent)
focal_class.identifier: wordWrap
focal_class.modifiers: private
focal_class.parameters: (final String longString, final int maxLengthPerLine, final int newLineIndent)
focal_class.return: String
focal_class.signature: String wordWrap(final String longString, final int maxLengthPerLine, final int newLineIndent)
focal_method.body: public String prettyPrint() {
          return this.prettyPrint(100);
      }
focal_method.class_method_signature: TraversalExplanation.prettyPrint()
focal_method.full_signature: public String prettyPrint()
focal_method.identifier: prettyPrint
focal_method.invocations: prettyPrint
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: String
focal_method.signature: String prettyPrint()