test_class.declarator: storedProcSQL = 
  
  		"CREATE OR REPLACE PROCEDURE exec_nzplsql_block(text) RETURNS BOOLEAN \n" +
  		"LANGUAGE NZPLSQL AS \n" +
  		"BEGIN_PROC \n" +
  		"DECLARE lRet BOOLEAN; \n" +
  		"DECLARE sid INTEGER; \n" +
  		"DECLARE nm varchar; \n" +
  		"DECLARE cr varchar; \n" +
  		"BEGIN \n" +
  		"sid := current_sid; \n" +
  		"nm := 'any_block' || sid || '()'; \n" +
  		"cr = 'CREATE OR REPLACE PROCEDURE ' || nm || \n" +
  		"' RETURNS BOOL LANGUAGE NZPLSQL AS BEGIN_PROC ' \n" +
  		"|| $1 || ' END_PROC'; \n" +
  		"EXECUTE IMMEDIATE cr; \n" +
  		"EXECUTE IMMEDIATE 'SELECT ' || nm; \n" +
  		"EXECUTE IMMEDIATE 'DROP PROCEDURE ' || nm; \n" +
  		"RETURN TRUE; \n" +
  		"END; \n" +
  		"END_PROC; \n"
test_class.modifier: private static final
test_class.original_string: private static final String storedProcSQL = 
  
  		"CREATE OR REPLACE PROCEDURE exec_nzplsql_block(text) RETURNS BOOLEAN \n" +
  		"LANGUAGE NZPLSQL AS \n" +
  		"BEGIN_PROC \n" +
  		"DECLARE lRet BOOLEAN; \n" +
  		"DECLARE sid INTEGER; \n" +
  		"DECLARE nm varchar; \n" +
  		"DECLARE cr varchar; \n" +
  		"BEGIN \n" +
  		"sid := current_sid; \n" +
  		"nm := 'any_block' || sid || '()'; \n" +
  		"cr = 'CREATE OR REPLACE PROCEDURE ' || nm || \n" +
  		"' RETURNS BOOL LANGUAGE NZPLSQL AS BEGIN_PROC ' \n" +
  		"|| $1 || ' END_PROC'; \n" +
  		"EXECUTE IMMEDIATE cr; \n" +
  		"EXECUTE IMMEDIATE 'SELECT ' || nm; \n" +
  		"EXECUTE IMMEDIATE 'DROP PROCEDURE ' || nm; \n" +
  		"RETURN TRUE; \n" +
  		"END; \n" +
  		"END_PROC; \n";
test_class.type: String
test_class.var_name: storedProcSQL
test_class.declarator: classUnderTest = null
test_class.modifier: private
test_class.original_string: private NetezzaQueryTokenizer classUnderTest = null;
test_class.type: NetezzaQueryTokenizer
test_class.var_name: classUnderTest
test_class.declarator: prefsBean = 
         EasyMock.createMock(IQueryTokenizerPreferenceBean.class)
test_class.original_string: IQueryTokenizerPreferenceBean prefsBean = 
         EasyMock.createMock(IQueryTokenizerPreferenceBean.class);
test_class.type: IQueryTokenizerPreferenceBean
test_class.var_name: prefsBean
test_class.file: sql12/plugins/netezza/src/test/java/net/sourceforge/squirrel_sql/plugins/netezza/tokenizer/NetezzaQueryTokenizerTest.java
test_class.identifier: NetezzaQueryTokenizerTest
test_class.superclass: extends BaseSQuirreLJUnit4TestCase
test_case.body: @Test
     public final void testSetScriptToTokenizeOneProc() {
     	classUnderTest.setScriptToTokenize(storedProcSQL);
     	while (classUnderTest.hasQuery()) {
     		System.err.println("query: "+classUnderTest.nextQuery());
     	}
     	assertEquals(1, classUnderTest.getQueryCount());
     	
     }
test_case.class_method_signature: NetezzaQueryTokenizerTest.testSetScriptToTokenizeOneProc()
test_case.full_signature: @Test public final void testSetScriptToTokenizeOneProc()
test_case.identifier: testSetScriptToTokenizeOneProc
test_case.invocations: setScriptToTokenize hasQuery println nextQuery assertEquals getQueryCount
test_case.modifiers: @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetScriptToTokenizeOneProc()
focal_class.declarator: s_log = LoggerController.createLogger(NetezzaQueryTokenizer.class)
focal_class.modifier: private final static
focal_class.original_string: private final static ILogger s_log = LoggerController.createLogger(NetezzaQueryTokenizer.class);
focal_class.type: ILogger
focal_class.var_name: s_log
focal_class.declarator: PROCEDURE_PATTERN =
  		"^\\s*CREATE\\s+PROCEDURE.*|^\\s*CREATE\\s+OR\\s+REPLACE\\s+PROCEDURE\\s+.*"
focal_class.modifier: private static final
focal_class.original_string: private static final String PROCEDURE_PATTERN =
  		"^\\s*CREATE\\s+PROCEDURE.*|^\\s*CREATE\\s+OR\\s+REPLACE\\s+PROCEDURE\\s+.*";
focal_class.type: String
focal_class.var_name: PROCEDURE_PATTERN
focal_class.declarator: procPattern = Pattern.compile(PROCEDURE_PATTERN, Pattern.DOTALL)
focal_class.modifier: private
focal_class.original_string: private Pattern procPattern = Pattern.compile(PROCEDURE_PATTERN, Pattern.DOTALL);
focal_class.type: Pattern
focal_class.var_name: procPattern
focal_class.declarator: _prefs = null
focal_class.modifier: private
focal_class.original_string: private IQueryTokenizerPreferenceBean _prefs = null;
focal_class.type: IQueryTokenizerPreferenceBean
focal_class.var_name: _prefs
focal_class.file: sql12/plugins/netezza/src/main/java/net/sourceforge/squirrel_sql/plugins/netezza/tokenizer/NetezzaQueryTokenizer.java
focal_class.identifier: NetezzaQueryTokenizer
focal_class.interfaces: implements IQueryTokenizer
focal_class.class_method_signature: NetezzaQueryTokenizer.NetezzaQueryTokenizer(IQueryTokenizerPreferenceBean prefs)
focal_class.full_signature: public  NetezzaQueryTokenizer(IQueryTokenizerPreferenceBean prefs)
focal_class.identifier: NetezzaQueryTokenizer
focal_class.modifiers: public
focal_class.parameters: (IQueryTokenizerPreferenceBean prefs)
focal_class.signature:  NetezzaQueryTokenizer(IQueryTokenizerPreferenceBean prefs)
focal_class.class_method_signature: NetezzaQueryTokenizer.setScriptToTokenize(String script)
focal_class.full_signature: public void setScriptToTokenize(String script)
focal_class.identifier: setScriptToTokenize
focal_class.modifiers: public
focal_class.parameters: (String script)
focal_class.return: void
focal_class.signature: void setScriptToTokenize(String script)
focal_class.class_method_signature: NetezzaQueryTokenizer.setFactory()
focal_class.full_signature: protected void setFactory()
focal_class.identifier: setFactory
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void setFactory()
focal_class.class_method_signature: NetezzaQueryTokenizer.breakApartNewLines()
focal_class.full_signature: private void breakApartNewLines()
focal_class.identifier: breakApartNewLines
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void breakApartNewLines()
focal_class.class_method_signature: NetezzaQueryTokenizer.joinFragments(Pattern pattern, boolean skipStraySep)
focal_class.full_signature: private void joinFragments(Pattern pattern, boolean skipStraySep)
focal_class.identifier: joinFragments
focal_class.modifiers: private
focal_class.parameters: (Pattern pattern, boolean skipStraySep)
focal_class.return: void
focal_class.signature: void joinFragments(Pattern pattern, boolean skipStraySep)
focal_class.class_method_signature: NetezzaQueryTokenizer.getTokenizerSessPropsInteractions()
focal_class.full_signature: @Override public TokenizerSessPropsInteractions getTokenizerSessPropsInteractions()
focal_class.identifier: getTokenizerSessPropsInteractions
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: TokenizerSessPropsInteractions
focal_class.signature: TokenizerSessPropsInteractions getTokenizerSessPropsInteractions()
focal_class.superclass: extends QueryTokenizer
focal_method.body: public void setScriptToTokenize(String script)
  	{
  		super.setScriptToTokenize(script);
  
  		// Since it is likely to have the procedure separator on it's own line,
  		// and it is key to letting us know that proceeding statements form a
  		// multi-statement procedure or function, it deserves it's own place in
  		// the _queries arraylist. If it is followed by other procedure or
  		// function creation blocks, we may fail to detect that, so this just
  		// goes through the list and breaks apart statements on newline so that
  		// this cannot happen.
  		breakApartNewLines();
  
  		// Netezza allows statement separators in procedure blocks. The process
  		// of tokenizing above renders these procedure blocks as separate
  		// statements, which are not valid to be executed separately. Here, we
  		// re-assemble any create procedure statements that we
  		// find using the beginning procedure block pattern and the procedure
  		// separator.
  		joinFragments(procPattern, false);
  
  		_queryIterator = _queries.iterator();
  	}
focal_method.class_method_signature: NetezzaQueryTokenizer.setScriptToTokenize(String script)
focal_method.full_signature: public void setScriptToTokenize(String script)
focal_method.identifier: setScriptToTokenize
focal_method.invocations: setScriptToTokenize breakApartNewLines joinFragments iterator
focal_method.modifiers: public
focal_method.parameters: (String script)
focal_method.return: void
focal_method.signature: void setScriptToTokenize(String script)