test_class.declarator: splitter
test_class.modifier: private
test_class.original_string: private QueryStatementSplitter splitter;
test_class.type: QueryStatementSplitter
test_class.var_name: splitter
test_class.file: dbdeploy-core/src/test/java/com/dbdeploy/database/QueryStatementSplitterTest.java
test_class.identifier: QueryStatementSplitterTest
test_case.body: @Test
      public void shouldNotSplitStatementsThatHaveNoDelimter() throws Exception {
          List<String> result = splitter.split("SELECT 1");
          assertThat(result, hasItem("SELECT 1"));
          assertThat(result.size(), is(1));
      }
test_case.class_method_signature: QueryStatementSplitterTest.shouldNotSplitStatementsThatHaveNoDelimter()
test_case.full_signature: @Test public void shouldNotSplitStatementsThatHaveNoDelimter()
test_case.identifier: shouldNotSplitStatementsThatHaveNoDelimter
test_case.invocations: split assertThat hasItem assertThat size is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldNotSplitStatementsThatHaveNoDelimter()
focal_class.declarator: delimiter = ";"
focal_class.modifier: private
focal_class.original_string: private String delimiter = ";";
focal_class.type: String
focal_class.var_name: delimiter
focal_class.declarator: delimiterType = DelimiterType.normal
focal_class.modifier: private
focal_class.original_string: private DelimiterType delimiterType = DelimiterType.normal;
focal_class.type: DelimiterType
focal_class.var_name: delimiterType
focal_class.declarator: lineEnding = LineEnding.platform
focal_class.modifier: private
focal_class.original_string: private LineEnding lineEnding = LineEnding.platform;
focal_class.type: LineEnding
focal_class.var_name: lineEnding
focal_class.file: dbdeploy-core/src/main/java/com/dbdeploy/database/QueryStatementSplitter.java
focal_class.identifier: QueryStatementSplitter
focal_class.class_method_signature: QueryStatementSplitter.QueryStatementSplitter()
focal_class.full_signature: public  QueryStatementSplitter()
focal_class.identifier: QueryStatementSplitter
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  QueryStatementSplitter()
focal_class.class_method_signature: QueryStatementSplitter.split(String input)
focal_class.full_signature: public List<String> split(String input)
focal_class.identifier: split
focal_class.modifiers: public
focal_class.parameters: (String input)
focal_class.return: List<String>
focal_class.signature: List<String> split(String input)
focal_class.class_method_signature: QueryStatementSplitter.getDelimiter()
focal_class.full_signature: public String getDelimiter()
focal_class.identifier: getDelimiter
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getDelimiter()
focal_class.class_method_signature: QueryStatementSplitter.setDelimiter(String delimiter)
focal_class.full_signature: public void setDelimiter(String delimiter)
focal_class.identifier: setDelimiter
focal_class.modifiers: public
focal_class.parameters: (String delimiter)
focal_class.return: void
focal_class.signature: void setDelimiter(String delimiter)
focal_class.class_method_signature: QueryStatementSplitter.getDelimiterType()
focal_class.full_signature: public DelimiterType getDelimiterType()
focal_class.identifier: getDelimiterType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: DelimiterType
focal_class.signature: DelimiterType getDelimiterType()
focal_class.class_method_signature: QueryStatementSplitter.setDelimiterType(DelimiterType delimiterType)
focal_class.full_signature: public void setDelimiterType(DelimiterType delimiterType)
focal_class.identifier: setDelimiterType
focal_class.modifiers: public
focal_class.parameters: (DelimiterType delimiterType)
focal_class.return: void
focal_class.signature: void setDelimiterType(DelimiterType delimiterType)
focal_class.class_method_signature: QueryStatementSplitter.setOutputLineEnding(LineEnding lineEnding)
focal_class.full_signature: public void setOutputLineEnding(LineEnding lineEnding)
focal_class.identifier: setOutputLineEnding
focal_class.modifiers: public
focal_class.parameters: (LineEnding lineEnding)
focal_class.return: void
focal_class.signature: void setOutputLineEnding(LineEnding lineEnding)
focal_method.body: public List<String> split(String input) {
          List<String> statements = new ArrayList<String>();
          StrBuilder currentSql = new StrBuilder();
  
          StrTokenizer lineTokenizer = new StrTokenizer(input);
          lineTokenizer.setDelimiterMatcher(StrMatcher.charSetMatcher("\r\n"));
  
          for (String line : lineTokenizer.getTokenArray()) {
  	        String strippedLine = StringUtils.stripEnd(line, null);
              if (!currentSql.isEmpty()) {
                  currentSql.append(lineEnding.get());
              }
  
              currentSql.append(strippedLine);
  
             if (delimiterType.matches(strippedLine, delimiter)) {
                  statements.add(currentSql.substring(0, currentSql.length() - delimiter.length()));
                  currentSql.clear();
              }
          }
  
          if (!currentSql.isEmpty()) {
              statements.add(currentSql.toString());
          }
          
          return statements;
      }
focal_method.class_method_signature: QueryStatementSplitter.split(String input)
focal_method.full_signature: public List<String> split(String input)
focal_method.identifier: split
focal_method.invocations: setDelimiterMatcher charSetMatcher getTokenArray stripEnd isEmpty append get append matches add substring length length clear isEmpty add toString
focal_method.modifiers: public
focal_method.parameters: (String input)
focal_method.return: List<String>
focal_method.signature: List<String> split(String input)