cobertura-1.9.4.1+dfsg.orig/0000755000175000017500000000000011345540725015474 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src-2/0000755000175000017500000000000011343534517016422 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src-2/someotherpackage/0000755000175000017500000000000011345540725021743 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src-2/someotherpackage/SomeOtherClass.java0000644000175000017500000000307611343534517025507 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Jeremy Thomerson * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package someotherpackage; /** * This class is only for testing that stuff from multiple source * directories works properly. * * @author Jeremy Thomerson */ public class SomeOtherClass { private int counter; public SomeOtherClass() { // no-op } public int incrementCounter() { return ++counter; } public int decrementCounter() { return --counter; } public int getCounter() { return counter; } /** * Don't call this method. It is one that is supposed to not be called * by the unit tests so that we can verify that everything is being * recorded properly. */ public void neverCallThisMethod() { throw new UnsupportedOperationException("You weren't supposed to call this method."); } } cobertura-1.9.4.1+dfsg.orig/cobertura-merge.sh0000644000175000017500000000032311343534512021104 0ustar twernertwernerjava -cp `dirname $0`/cobertura.jar:`dirname $0`/lib/asm-3.0.jar:`dirname $0`/lib/asm-tree-3.0.jar:`dirname $0`/lib/log4j-1.2.9.jar:`dirname $0`/lib/jakarta-oro-2.0.8.jar net.sourceforge.cobertura.merge.Main $* cobertura-1.9.4.1+dfsg.orig/cobertura-check.bat0000644000175000017500000000114311343534513021220 0ustar twernertwerner@echo off REM REM Grab the directory where this script resides, for use later REM set COBERTURA_HOME=%~dp0 REM REM Read all parameters into a single variable using an ugly loop REM set CMD_LINE_ARGS=%1 if ""%1""=="""" goto doneStart shift :getArgs if ""%1""=="""" goto doneStart set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto getArgs :doneStart java -cp "%COBERTURA_HOME%cobertura.jar;%COBERTURA_HOME%lib\asm-3.0.jar;%COBERTURA_HOME%lib\asm-tree-3.0.jar;%COBERTURA_HOME%lib\log4j-1.2.9.jar;%COBERTURA_HOME%lib\jakarta-oro-2.0.8.jar" net.sourceforge.cobertura.check.Main %CMD_LINE_ARGS% cobertura-1.9.4.1+dfsg.orig/cobertura-merge.bat0000644000175000017500000000114311343534521021241 0ustar twernertwerner@echo off REM REM Grab the directory where this script resides, for use later REM set COBERTURA_HOME=%~dp0 REM REM Read all parameters into a single variable using an ugly loop REM set CMD_LINE_ARGS=%1 if ""%1""=="""" goto doneStart shift :getArgs if ""%1""=="""" goto doneStart set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto getArgs :doneStart java -cp "%COBERTURA_HOME%cobertura.jar;%COBERTURA_HOME%lib\asm-3.0.jar;%COBERTURA_HOME%lib\asm-tree-3.0.jar;%COBERTURA_HOME%lib\log4j-1.2.9.jar;%COBERTURA_HOME%lib\jakarta-oro-2.0.8.jar" net.sourceforge.cobertura.merge.Main %CMD_LINE_ARGS% cobertura-1.9.4.1+dfsg.orig/lib/0000755000175000017500000000000011345540725016242 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/0000755000175000017500000000000011345540725016453 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/0000755000175000017500000000000011343534512017234 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/0000755000175000017500000000000011343534512021557 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/0000755000175000017500000000000011343534520023544 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/0000755000175000017500000000000011345540725025563 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/html/0000755000175000017500000000000011345540725026527 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/html/JavaToHtmlTest.java0000644000175000017500000000507111343534514032243 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting.html; import junit.framework.TestCase; public class JavaToHtmlTest extends TestCase { public static void testSyntaxHighlight() { JavaToHtml javaToHtml = new JavaToHtml(); assertEquals( "package net.sourceforge.cobertura.reporting.html;", javaToHtml .process("package net.sourceforge.cobertura.reporting.html;")); assertEquals( "import junit.framework.TestCase;", javaToHtml.process("import junit.framework.TestCase;")); assertEquals( "public class javaToHtmlTest extends TestCase {", javaToHtml .process("public class javaToHtmlTest extends TestCase {")); assertEquals( "public static void testSyntaxHighlight() {", javaToHtml .process("public static void testSyntaxHighlight() {")); assertEquals( "System.out.println(javaToHtml.process(\"\"));", javaToHtml .process("System.out.println(javaToHtml.process(\"\"));")); assertEquals("}", javaToHtml.process("}")); assertEquals(" ", javaToHtml.process(" ")); assertEquals(" ", javaToHtml.process(" ")); assertEquals( "System.out.println('Q');", javaToHtml.process("System.out.println('Q');")); assertEquals( ".charAt(currentIndex - 1) == '\\\\')));", javaToHtml.process(".charAt(currentIndex - 1) == '\\\\')));")); assertEquals("'\\n'", javaToHtml .process("'\\n'")); } }cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/html/files/0000755000175000017500000000000011345540725027631 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/html/files/CopyFilesTest.java0000644000175000017500000000527011343534521033230 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting.html.files; import java.io.File; import java.io.IOException; import junit.framework.TestCase; public class CopyFilesTest extends TestCase { private final static String basedir = (System.getProperty("basedir") != null) ? System.getProperty("basedir") : "./"; private final static File tmpDir = new File(basedir, "/build/test/tmp"); public void setUp() { tmpDir.mkdirs(); } private final static void removeDir(File dir) { File files[] = dir.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) removeDir(files[i]); else files[i].delete(); } dir.delete(); } public void tearDown() { removeDir(tmpDir); } public static void testCopy() throws IOException { CopyFiles.copy(tmpDir); assertTrue(new File(tmpDir, "help.html").isFile()); assertTrue(new File(tmpDir, "index.html").isFile()); File cssDir = new File(tmpDir, "css"); assertTrue(cssDir.isDirectory()); assertTrue(new File(cssDir, "help.css").isFile()); assertTrue(new File(cssDir, "main.css").isFile()); assertTrue(new File(cssDir, "sortabletable.css").isFile()); assertTrue(new File(cssDir, "source-viewer.css").isFile()); assertTrue(new File(cssDir, "tooltip.css").isFile()); File imagesDir = new File(tmpDir, "images"); assertTrue(imagesDir.isDirectory()); assertTrue(new File(imagesDir, "blank.png").isFile()); assertTrue(new File(imagesDir, "downsimple.png").isFile()); assertTrue(new File(imagesDir, "upsimple.png").isFile()); File jsDir = new File(tmpDir, "js"); assertTrue(jsDir.isDirectory()); assertTrue(new File(jsDir, "customsorttypes.js").isFile()); assertTrue(new File(jsDir, "popup.js").isFile()); assertTrue(new File(jsDir, "sortabletable.js").isFile()); assertTrue(new File(jsDir, "stringbuilder.js").isFile()); } }././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/JUnitXMLParserErrorHandler.javacobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/JUnitXMLParserErrorHandler.java0000644000175000017500000000360711343534513033527 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Grzegorz Lukasik * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting; import junit.framework.Assert; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXParseException; /** * This is a very simple SAX XML parser ErrorHandler. If * you are parsing an XML document using a DocumentBuilder, * and you set the DocumentBuilder's ErrorHandler to an * instance of this class, and the XML document contains * any suspect XML, then this class will throw a JUnit * assertion failure. */ public class JUnitXMLParserErrorHandler implements ErrorHandler { private void createErrorMessage(SAXParseException exception) { Assert.fail("Line number: " + exception.getLineNumber() + " column: " + exception.getColumnNumber() + "\n" + exception.toString()); } public void error(SAXParseException exception) { createErrorMessage(exception); } public void fatalError(SAXParseException exception) { createErrorMessage(exception); } public void warning(SAXParseException exception) { createErrorMessage(exception); } }././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/JUnitXMLParserEntityResolver.javacobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/JUnitXMLParserEntityResolver.ja0000644000175000017500000000541011343534515033603 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; /** *

* This is a very simple XML EntityResolver. If * you are parsing an XML document using a DocumentBuilder, * and you set the DocumentBuilder's EntityResolver to an * instance of this class, then we never attempt to resolve * XML documents on the Internet. Instead we use a local * copy of the DTD. *

* *

* This is done so that the XMLReportTest.java JUnit test will * not fail when the test is run on a non-networked machine, * or when webpages must be accessed through a proxy server. *

*/ public class JUnitXMLParserEntityResolver extends DefaultHandler { private final File DTD_DIRECTORY; public JUnitXMLParserEntityResolver(File dtdDirectory) { this.DTD_DIRECTORY = dtdDirectory; } public InputSource resolveEntity(String publicId, String systemId) throws SAXException { System.out.println("systemId=" + systemId); String systemIdBasename = systemId.substring(systemId.lastIndexOf('/')); File localDtd = new File(this.DTD_DIRECTORY, systemIdBasename); try { return new InputSource(new FileInputStream(localDtd)); } catch (FileNotFoundException e) { System.out.println("Unable to open local DTD file " + localDtd.getAbsolutePath() + ", using " + systemId + " instead."); } InputSource source = null; try { super.resolveEntity(publicId, systemId); } catch (Exception exception) { // apparently 1.5 throws an IOException here, but we can't catch it specifically if // we're not on 1.5 (docs on both kind of say that they throw it) // actual code on 1.4.2 has it remmed out so that it only throws SAXException throw new SAXException(exception); } return source; } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/ComplexityCalculatorTest.java0000644000175000017500000001566411343534521033444 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Grzegorz Lukasik * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting; import net.sourceforge.cobertura.coveragedata.ClassData; import net.sourceforge.cobertura.coveragedata.PackageData; import net.sourceforge.cobertura.coveragedata.ProjectData; import net.sourceforge.cobertura.coveragedata.SourceFileData; import net.sourceforge.cobertura.util.FileFinder; import net.sourceforge.cobertura.util.FileFixture; import junit.framework.TestCase; public class ComplexityCalculatorTest extends TestCase { private FileFixture fileFixture; private FileFinder fileFinder; private ComplexityCalculator complexity; public void testGetCCNForSourceFile() { /* * Sample1.java has a @Deprecated annotation to make sure the complexity works with annotations. */ double ccn1 = complexity.getCCNForSourceFile( new SourceFileData("com/example/Sample1.java")); assertTrue( ccn1!=0.0); double ccn2 = complexity.getCCNForSourceFile( new SourceFileData("com/example/Sample2.java")); assertTrue( ccn2!=0.0); assertTrue( ccn1!=ccn2); ccn1 = complexity.getCCNForSourceFile( new SourceFileData("com/example/Sample5.java")); assertTrue( ccn1!=0.0); ccn2 = complexity.getCCNForSourceFile( new SourceFileData("com/example/Sample6.java")); assertTrue( ccn2!=0.0); assertTrue( ccn1!=ccn2); double ccn0 = complexity.getCCNForSourceFile( new SourceFileData("com/example/Sample8.java")); assertTrue( ccn0==0.0); ccn0 = complexity.getCCNForSourceFile( new SourceFileData("Foo.java")); assertTrue( ccn0==0.0); } public void testGetCCNForClass() { double ccn1 = complexity.getCCNForClass( new ClassData("com.example.Sample3")); assertTrue( ccn1!=0.0); double ccn2 = complexity.getCCNForClass( new ClassData("com.example.Sample4")); assertTrue( ccn2!=0.0); assertTrue( ccn1!=ccn2); ccn1 = complexity.getCCNForClass( new ClassData("com.example.Sample5")); assertTrue( ccn1!=0.0); ccn2 = complexity.getCCNForClass( new ClassData("com.example.Sample6")); assertTrue( ccn2!=0.0); assertTrue( ccn1!=ccn2); double ccn0 = complexity.getCCNForClass( new ClassData("com.example.Sample8")); assertEquals( 0.0, ccn0, 0.0); ccn0 = complexity.getCCNForClass( new ClassData("Foo")); assertEquals( 0.0, ccn0, 0.0); } public void testGetCCNForPackage() { PackageData pd = new PackageData("com.example"); pd.addClassData( new ClassData("com.example.Sample3")); double ccn1 = complexity.getCCNForPackage( pd); assertTrue( ccn1!=0.0); ComplexityCalculator complexity2 = new ComplexityCalculator( fileFinder); pd.addClassData( new ClassData("com.example.Sample4")); double ccn2 = complexity2.getCCNForPackage( pd); double ccn3 = complexity2.getCCNForPackage( pd); assertTrue( ccn2!=0.0); assertTrue( ccn1!=ccn2); assertEquals( ccn2, ccn3, 0e-9); PackageData empty = new PackageData( "com.example2"); ComplexityCalculator complexity3 = new ComplexityCalculator( fileFinder); assertEquals( 0.0, complexity3.getCCNForPackage( empty), 0.0); } public void testGetCCNForProject() { ProjectData project = new ProjectData(); project.addClassData( new ClassData("com.example.Sample5")); double ccn1 = complexity.getCCNForProject( project); assertTrue( ccn1!=0.0); ComplexityCalculator complexity2 = new ComplexityCalculator( fileFinder); project.addClassData( new ClassData("com.example.Sample4")); double ccn2 = complexity2.getCCNForProject( project); assertTrue( ccn2!=0.0); assertTrue( ccn1!=ccn2); ComplexityCalculator complexity3 = new ComplexityCalculator( fileFinder); project.addClassData( new ClassData("com.example.Sample8")); double ccn3 = complexity3.getCCNForProject( project); assertEquals( ccn2, ccn3, 0e-9); ComplexityCalculator complexity4 = new ComplexityCalculator( fileFinder); double ccn0 = complexity4.getCCNForProject( new ProjectData()); assertEquals( 0.0, ccn0, 0.0); } public void testGetCCNForSourceFile_null() { try { complexity.getCCNForSourceFile(null); fail( "NullPointerException expected"); } catch( NullPointerException ex) {} } public void testGetCCNForPackage_null() { try { complexity.getCCNForPackage(null); fail( "NullPointerException expected"); } catch( NullPointerException ex) {} } public void testGetCCNForProject_null() { try { complexity.getCCNForProject(null); fail( "NullPointerException expected"); } catch( NullPointerException ex) {} } public void testConstructor_null() { try { new ComplexityCalculator(null); fail( "NullPointerException expected"); } catch( NullPointerException ex) {} } protected void setUp() throws Exception { super.setUp(); fileFixture = new FileFixture(); fileFixture.setUp(); fileFinder = new FileFinder(); fileFinder.addSourceDirectory(fileFixture.sourceDirectory(FileFixture.SOURCE_DIRECTORY_IDENTIFIER[0]).toString()); fileFinder.addSourceDirectory(fileFixture.sourceDirectory(FileFixture.SOURCE_DIRECTORY_IDENTIFIER[1]).toString()); fileFinder.addSourceFile( fileFixture.sourceDirectory(FileFixture.SOURCE_DIRECTORY_IDENTIFIER[2]).toString(), "com/example\\Sample5.java"); fileFinder.addSourceFile( fileFixture.sourceDirectory(FileFixture.SOURCE_DIRECTORY_IDENTIFIER[2]).toString(), "com/example/Sample6.java"); fileFinder.addSourceFile( fileFixture.sourceDirectory(FileFixture.SOURCE_DIRECTORY_IDENTIFIER[3]).toString(), "com/example/Sample7.java"); // Do not add com/example/Sample8.java // fileFinder.addSourceFile( fileFixture.sourceDirectory(FileFixture.SOURCE_DIRECTORY_IDENTIFIER[3]).toString(), "com/example/Sample8.java"); complexity = new ComplexityCalculator( fileFinder); } protected void tearDown() throws Exception { super.tearDown(); fileFixture.tearDown(); } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/JUnitXMLHelper.java0000644000175000017500000000436311343534520031200 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 Mark Doliner * Copyright (C) 2006 John Lewis * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import org.jdom.Document; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; public class JUnitXMLHelper { private final static String BASEDIR = (System.getProperty("basedir") != null) ? System .getProperty("basedir") : "."; /** * This reads the given file into an XML Document. * @param file A valid file on the file system. * @param validate Whether to validate the XML or not. * @return An XML document representing the given XML file. * @throws FileNotFoundException If the file does not exist. * @throws IOException If the file could not be open/read. * @throws JDOMException If the file is not well-formed XML, or * if validation is enabled and the document is not * valid. */ public static Document readXmlFile(File file, boolean validate) throws FileNotFoundException, IOException, JDOMException { System.out.println("Reading " + file.getAbsolutePath()); // First create an XML document parser SAXBuilder saxBuilder = new SAXBuilder(); saxBuilder.setValidation(validate); saxBuilder.setEntityResolver(new JUnitXMLParserEntityResolver( new File(BASEDIR, "/etc/dtds"))); saxBuilder.setErrorHandler(new JUnitXMLParserErrorHandler()); return saxBuilder.build(file); } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/xml/0000755000175000017500000000000011345540725026363 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/xml/XMLReportTest.java0000644000175000017500000000503511343534520031717 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting.xml; import java.io.File; import junit.framework.TestCase; import net.sourceforge.cobertura.coveragedata.ClassData; import net.sourceforge.cobertura.coveragedata.ProjectData; import net.sourceforge.cobertura.reporting.ComplexityCalculator; import net.sourceforge.cobertura.reporting.JUnitXMLHelper; import net.sourceforge.cobertura.util.FileFinder; public class XMLReportTest extends TestCase { private final static String BASEDIR = (System.getProperty("basedir") != null) ? System .getProperty("basedir") : "."; private final static String PATH_TO_TEST_OUTPUT = BASEDIR + "/build/test/XMLReportTest"; private File tmpDir; public void setUp() { tmpDir = new File(PATH_TO_TEST_OUTPUT); tmpDir.mkdirs(); } public void tearDown() { tmpDir = new File(PATH_TO_TEST_OUTPUT); File files[] = tmpDir.listFiles(); for (int i = 0; i < files.length; i++) files[i].delete(); tmpDir.delete(); } public void testXMLReportWithNonSourceLines() throws Exception { ProjectData projectData = new ProjectData(); // Adding line to the project data that hasn't been yet marked as source line ClassData cd = projectData.getOrCreateClassData(XMLReport.class.getName()); cd.touch(7777,1); File reportDir = File.createTempFile("XMLReportTest", ""); reportDir.delete(); reportDir.mkdir(); FileFinder fileFinder = new FileFinder(); ComplexityCalculator complexity = new ComplexityCalculator(fileFinder); new XMLReport(projectData, reportDir, fileFinder, complexity); File coverageFile = new File(reportDir, "coverage.xml"); JUnitXMLHelper.readXmlFile(coverageFile, true); coverageFile.delete(); reportDir.delete(); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/ComplexityCalculator2Test.groovycobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/reporting/ComplexityCalculator2Test.groov0000644000175000017500000001365511343534513033740 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2008 John Lewis * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.reporting import junit.framework.TestCase import net.sourceforge.cobertura.test.util.TestUtil import net.sourceforge.cobertura.util.FileFinder import net.sourceforge.cobertura.coveragedata.SourceFileData import net.sourceforge.cobertura.reporting.ComplexityCalculator public class ComplexityCalculator2Test extends TestCase { /* (non-Javadoc) * @see junit.framework.TestCase#setUp() */ void setUp() throws Exception { } public void testSearchJarsForSourceInJar() { TestUtil.withTempDir { tempDir -> def zipFile = TestUtil.createSourceArchive(tempDir) //create a ComplexityCalculator that will use the archive def fileFinder = new FileFinder(); fileFinder.addSourceDirectory(zipFile.parentFile.absolutePath); def complexity = new ComplexityCalculator( fileFinder) double ccn1 = complexity.getCCNForSourceFile( new SourceFileData(TestUtil.SIMPLE_SOURCE_PATHNAME)); assertTrue( ccn1==1.0); } } public void testAnnotatedSource() { /* * Test for bug #2818738. */ TestUtil.withTempDir { tempDir -> def filename = "TBSException.java" def sourceFile = new File(tempDir, filename) sourceFile.write(''' public class TBSException extends Exception { public TBSException (ErrorHandler handler, Exception wrap) { super(wrap); @SuppressWarnings("unchecked") final Iterator iter = handler.getExceptions().iterator(); // LINE 27 for (; iter.hasNext();) { Exception exception = iter.next(); this.errors.add(exception.getMessage()); } } } ''') //create a ComplexityCalculator that will use the archive def fileFinder = new FileFinder(); fileFinder.addSourceDirectory(tempDir.absolutePath); def complexity = new ComplexityCalculator( fileFinder) double ccn1 = complexity.getCCNForSourceFile( new SourceFileData(filename)); assertNotNull(ccn1) assertEquals( 2.0, ccn1 as Double, 0.01); } } /** * This test highlights an issue with Javancss. * * http://jira.codehaus.org/browse/JAVANCSS-37 * */ public void testGenericsProblem() { TestUtil.withTempDir { tempDir -> def filename = "UserAudit.java" def sourceFile = new File(tempDir, filename) sourceFile.write(''' import java.util.ArrayList; import java.util.List; public class UserAudit extends UserAuditParent { void postCopyOnDestination(String str) throws InstantiationException, IllegalAccessException { List listToReset = new ArrayList(); List auditProducts; auditProducts = this.copyListFromParent(AllowedMMProductAudit.class, getMmAuthorisedProducts_()); } List getMmAuthorisedProducts_() { return null; } } ''') //create a ComplexityCalculator that will use the archive def fileFinder = new FileFinder(); fileFinder.addSourceDirectory(tempDir.absolutePath); def complexity = new ComplexityCalculator( fileFinder) double ccn1 = complexity.getCCNForSourceFile( new SourceFileData(filename)); assertNotNull(ccn1) assertEquals( "Javancss issue has been fixed: http://jira.codehaus.org/browse/JAVANCSS-37. Now fix this test.", 0.0/*should be 2.0?*/, ccn1 as Double, 0.01); } } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/ant/0000755000175000017500000000000011345540725024334 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/ant/Util.java0000644000175000017500000000452411343534513026115 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 John Lewis * Copyright (C) 2006 Mark Doliner * * Note: This file is dual licensed under the GPL and the Apache * Source License 1.1 (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.ant; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.PrintStream; class Util { static File createTemporaryTextFile(String prefix) throws IOException { File outputFile; outputFile = File.createTempFile(prefix, ".txt"); outputFile.deleteOnExit(); return outputFile; } /** * Returns the text of a file as a string. * * @param file The file to read. * @return A string containing the text of the file */ static String getText(File file) throws FileNotFoundException, IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(file)); String line; while ((line = reader.readLine()) != null) { ps.println(line); } ps.close(); } finally { ps.close(); if (reader != null) { try { reader.close(); } catch (IOException e) { System.err.println("IOException when closing file " + file.getAbsolutePath()); e.printStackTrace(); } } } return baos.toString(); } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/ant/FunctionalConditionCoverageTest.java0000644000175000017500000003666711343534514033503 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 John Lewis * Copyright (C) 2006 Mark Doliner * * Note: This file is dual licensed under the GPL and the Apache * Source License 1.1 (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.ant; import java.io.File; import java.io.FilenameFilter; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import junit.framework.TestCase; import net.sourceforge.cobertura.reporting.JUnitXMLHelper; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Java; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Path.PathElement; import org.jdom.Attribute; import org.jdom.DataConversionException; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.xpath.XPath; import test.condition.ConditionCalls; /** * These tests generally exec ant to run a test.xml file. A different target is used for * each test. The text.xml file sets up a test, instruments, runs junit, and generates a * coverage xml report. Then the xml report is parsed and checked. * * @author jwlewi */ public class FunctionalConditionCoverageTest extends TestCase { private final static File BASEDIR = new File((System.getProperty("basedir") != null) ? System .getProperty("basedir") : ".", "examples/functionalconditiontest"); private final static String CONDITION_MISSING_TRUE = "50%"; private final static String CONDITION_MISSING_FALSE = "50%"; private final static Map testInfoMap = new HashMap(); static { ConditionTestInfo[] expectedConditions; TestInfo info; /* * Load expected information into testInfoMap for each method. */ expectedConditions = new ConditionTestInfo[1]; expectedConditions[0] = new ConditionTestInfo("0", "jump", CONDITION_MISSING_FALSE); info = new TestInfo(ConditionCalls.CALL_CONDITION_LINE_NUMBER, "50% (1/2)", expectedConditions); info.setIgnoreLineNumber(ConditionCalls.CALL_IGNORE_LINE_NUMBER); testInfoMap.put("call", info); expectedConditions = new ConditionTestInfo[1]; expectedConditions[0] = new ConditionTestInfo("0", "switch", "33%"); info = new TestInfo(ConditionCalls.LOOKUP_SWITCH_LINE_NUMBER, "33% (1/3)", expectedConditions); testInfoMap.put("callLookupSwitch", info); expectedConditions = new ConditionTestInfo[1]; expectedConditions[0] = new ConditionTestInfo("0", "switch", "10%"); info = new TestInfo(ConditionCalls.TABLE_SWITCH_LINE_NUMBER, "10% (1/10)", expectedConditions); testInfoMap.put("callTableSwitch", info); expectedConditions = new ConditionTestInfo[3]; expectedConditions[0] = new ConditionTestInfo("0", "jump", CONDITION_MISSING_TRUE); expectedConditions[1] = new ConditionTestInfo("1", "jump", "0%"); expectedConditions[2] = new ConditionTestInfo("2", "jump", CONDITION_MISSING_FALSE); info = new TestInfo(ConditionCalls.MULTI_CONDITION_LINE_NUMBER, "33% (2/6)", expectedConditions); testInfoMap.put("callMultiCondition", info); expectedConditions = new ConditionTestInfo[3]; expectedConditions[0] = new ConditionTestInfo("0", "jump", CONDITION_MISSING_FALSE); expectedConditions[1] = new ConditionTestInfo("1", "jump", CONDITION_MISSING_FALSE); expectedConditions[2] = new ConditionTestInfo("2", "jump", "0%"); info = new TestInfo(ConditionCalls.MULTI_CONDITION2_LINE_NUMBER, "33% (2/6)", expectedConditions); testInfoMap.put("callMultiCondition2", info); }; private static class TestInfo { int conditionNumber; String expectedLineConditionCoverage; ConditionTestInfo[] expectedConditions; Integer ignoreLineNumber; TestInfo(int conditionNumber, String expectedLineConditionCoverage, ConditionTestInfo[] expectedConditions) { this.conditionNumber = conditionNumber; this.expectedLineConditionCoverage = expectedLineConditionCoverage; this.expectedConditions = expectedConditions; } public void setIgnoreLineNumber(int number) { ignoreLineNumber = new Integer(number); } } private static class ConditionTestInfo { String number; String type; String coverage; ConditionTestInfo(String number, String type, String coverage) { this.number = number; this.type = type; this.coverage = coverage; } } public static void testConditionCoverage() throws Exception { runTestAntScript("condition-coverage", "test-condition-coverage"); verify("condition-coverage"); } private static void verify(String testName) throws Exception { verifyXml(testName); verifyHtml(testName); } private static void verifyXml(String testName) throws Exception { // Get a list of all classes listed in the XML report List classesList = getClassElements(); assertTrue("Test " + testName + ": Did not find any classes listed in the XML report.", classesList.size() > 0); boolean conditionCallsClassFound = false; for (Iterator iter = classesList.iterator(); iter.hasNext();) { Element classElement = (Element)iter.next(); String className = classElement.getAttributeValue("name"); if (className.equals("test.condition.ConditionCalls")) { conditionCallsClassFound = true; } else fail("Test " + testName + ": Found a class with the name '" + className + "' in the XML report, but was only expecting 'test.condition.ConditionCalls'."); verifyClass(testName, classElement); } assertTrue("Test " + testName + ": Did not find class 'test.condition.ConditionCalls' in the XML report.", conditionCallsClassFound); } /** * Use XPath to get all <class> elements in the * cobertura.xml file under the given directory. * @return A list of JDOM Elements. */ private static List getClassElements() throws IOException, JDOMException { File xmlFile = new File(BASEDIR, "reports/cobertura-xml/coverage.xml"); Document document = JUnitXMLHelper.readXmlFile(xmlFile, true); XPath xpath = XPath.newInstance("/coverage/packages/package/classes/class"); List classesList = xpath.selectNodes(document); return classesList; } /** * Verify that the class's condition information is correct. */ private static void verifyClass(String testName, Element classElement) { // Get a list of methods Element methodsElement = classElement.getChild("methods"); List methodList = methodsElement.getChildren("method"); assertTrue("Test " + testName + ": Did not find any methods listed in the class " + classElement.getAttributeValue("name"), methodList.size() > 0); List methodsFound = new ArrayList(); for (Iterator iter = methodList.iterator(); iter.hasNext();) { Element methodElement = (Element)iter.next(); String methodName = methodElement.getAttributeValue("name"); TestInfo info = (TestInfo) testInfoMap.get(methodName); if (info != null) { if (methodsFound.contains(methodName)) { fail("Test " + testName + ": Found more than one instance of the method " + methodName + " in the class " + classElement.getAttributeValue("name")); } methodsFound.add(methodName); verifyMethod(info, testName, classElement, methodElement); } else if (methodName.equals("") || methodName.equals("") || methodName.startsWith("util") || methodName.equals("class$")) { // These methods are ok--ignore them. } else { fail("Test " + testName + ": Found method " + methodName + " in the class " + classElement.getAttributeValue("name") + ", but was only expecting either 'call' or 'dontCall'."); } } /* * now make sure all methods in testInfoMap were found and verified */ for (Iterator iter = testInfoMap.keySet().iterator(); iter.hasNext();) { String methodName = (String) iter.next(); assertTrue("Test " + testName + ": Did not find method " + methodName + " in the class " + classElement.getAttributeValue("name"), methodsFound.contains(methodName)); } } private static void verifyMethod(TestInfo info, String testName, Element classElement, Element methodElement) { Element linesElement = methodElement.getChild("lines"); List lineList = linesElement.getChildren("line"); String methodName = methodElement.getAttributeValue("name"); assertTrue("Test " + testName + ", class " + classElement.getAttributeValue("name") + ": Did not find any lines in the method " + methodName, lineList.size() > 0); boolean foundCondition = false; for (Iterator iter = lineList.iterator(); iter.hasNext();) { Element lineElement = (Element)iter.next(); int number; try { number = lineElement.getAttribute("number").getIntValue(); if ((info.ignoreLineNumber != null) && (info.ignoreLineNumber.intValue() == number)) { fail("Expected line " + info.ignoreLineNumber + " to be ignored."); } } catch (DataConversionException e) { throw new RuntimeException(e.toString()); } if (number == info.conditionNumber) { foundCondition = true; verifyLineConditionInfo(lineElement, info.conditionNumber, info.expectedLineConditionCoverage, info.expectedConditions); } } assertTrue("Expected condition element for line " + info.conditionNumber + " of " + methodName, foundCondition); } private static void verifyLineConditionInfo(Element lineElement, int conditionLineNumber, String expectedLineConditionCoverage, ConditionTestInfo[] expectedConditions) { String errorMessage = "Line " + conditionLineNumber; boolean branch = false; try { branch = lineElement.getAttribute("branch").getBooleanValue(); } catch (DataConversionException e) { fail(errorMessage + " has missing or wrong branch attribute"); } assertTrue(errorMessage + "Branch attribute should be true", branch); String lineCoverageStr = getRequiredAttribute(lineElement, "condition-coverage", errorMessage).getValue(); assertEquals(errorMessage + " has incorrect condition-coverage", expectedLineConditionCoverage, lineCoverageStr); List conditionList = lineElement.getChildren("conditions"); assertTrue(errorMessage + " should have one and only one conditions element.", conditionList.size() == 1); conditionList = ((Element) conditionList.get(0)).getChildren("condition"); assertEquals(errorMessage + " has incorrect number of condition elements.", expectedConditions.length, conditionList.size()); errorMessage = "Condition for " + conditionLineNumber; int i = 0; for (Iterator iter = conditionList.iterator(); iter.hasNext(); i++) { Element element = (Element) iter.next(); verifyCondition(element, errorMessage, expectedConditions[i]); } } private static void verifyCondition(Element conditionElement, String errorMessage, ConditionTestInfo info) { String numberStr = getRequiredAttribute(conditionElement, "number", errorMessage).getValue(); assertEquals(errorMessage + " has incorrect number", info.number, numberStr); String typeStr = getRequiredAttribute(conditionElement, "type", errorMessage).getValue(); assertEquals(errorMessage + " has incorrect type", info.type, typeStr); String coverageStr = getRequiredAttribute(conditionElement, "coverage", errorMessage).getValue(); assertEquals(errorMessage + " has incorrect coverage", info.coverage, coverageStr); } private static Attribute getRequiredAttribute(Element element, String attribute, String errorMessage) { Attribute attr = element.getAttribute(attribute); assertNotNull(errorMessage + " has missing " + attribute + " attribute.", attr); return attr; } private static void verifyHtml(String testName) throws Exception { File htmlReportDir = new File(BASEDIR, "reports/cobertura-html"); // Get all files from report directory String htmlFiles[] = htmlReportDir.list(new FilenameFilter() { public boolean accept(File dir, String name) { return name.endsWith(".html"); } }); Arrays.sort(htmlFiles); assertTrue(htmlFiles.length >= 5); // Assert that all required files are there String[] requiredFiles = { "index.html", "help.html", "frame-packages.html", "frame-summary.html", "frame-sourcefiles.html" }; for (int i = 0; i < requiredFiles.length; i++) { if (!containsFile(htmlFiles, requiredFiles[i])) { fail("Test " + testName + ": File " + requiredFiles[i] + " not found among report files"); } } // Validate selected files String previousPrefix = "NONE"; for (int i = 0; i < htmlFiles.length; i++) { // Validate file if has prefix different than previous one, or is required file if (containsFile(requiredFiles, htmlFiles[i]) || !htmlFiles[i].startsWith(previousPrefix)) { JUnitXMLHelper.readXmlFile(new File(htmlReportDir, htmlFiles[i]), true); } if (htmlFiles[i].length() > 7) { previousPrefix = htmlFiles[i].substring(0, 7); } else { previousPrefix = htmlFiles[i]; } } } private static boolean containsFile(String[] files, String fileName) { for (int i = 0; i < files.length; i++) { if (files[i].equals(fileName)) return true; } return false; } /** * Use the ant 'java' task to run the test.xml * file and the specified target. */ private static void runTestAntScript(String testName, String target) throws IOException { Java task = new Java(); task.setTaskName("java"); task.setProject(new Project()); task.init(); // Call ant launcher. Requires ant-lancher.jar. task.setClassname("org.apache.tools.ant.launch.Launcher"); task.setFork(true); AntUtil.transferCoberturaDataFileProperty(task); task.createArg().setValue("-f"); task.createArg().setValue(BASEDIR + "/build.xml"); task.createArg().setValue(target); task.setFailonerror(true); // Set output to go to a temp file File outputFile = Util.createTemporaryTextFile("cobertura-test"); task.setOutput(outputFile); // Set the classpath to the same classpath as this JVM Path classpath = task.createClasspath(); PathElement pathElement = classpath.createPathElement(); pathElement.setPath(System.getProperty("java.class.path")); try { task.execute(); } finally { if (outputFile.exists()) { // Put the contents of the output file in the exception System.out.println("\n\n\nOutput from Ant for " + testName + " test:\n----------------------------------------\n" + Util.getText(outputFile) + "----------------------------------------"); outputFile.delete(); } } } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/ant/FunctionalTest.java0000644000175000017500000003156111343534522030143 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2008 John Lewis * Copyright (C) 2006 Mark Doliner * * Note: This file is dual licensed under the GPL and the Apache * Source License 1.1 (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.ant; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.FilenameFilter; import java.io.IOException; import java.util.Arrays; import java.util.Iterator; import java.util.List; import junit.framework.TestCase; import net.sourceforge.cobertura.reporting.JUnitXMLHelper; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Java; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Path.PathElement; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.xpath.XPath; /** * These tests generally exec ant to run a test.xml file. A different target is used for * each test. The text.xml file sets up a test, instruments, runs junit, and generates a * coverage xml report. Then the xml report is parsed and checked. * * @author jwlewi */ public class FunctionalTest extends TestCase { private static int forkedJVMDebugPort = 0; private final static File BASEDIR = new File((System.getProperty("basedir") != null) ? System .getProperty("basedir") : ".", "examples/functionaltest1"); public static void testInstrumentUsingDirSet() throws Exception { runTestAntScript("dirset", "test-dirset"); verify("dirset"); } public static void testInstrumentUsingIncludesAndExcludes() throws Exception { runTestAntScript("includes-and-excludes", "test-includes-and-excludes"); verify("includes-and-excludes"); } public static void testInstrumentUsingClassPath() throws Exception { runTestAntScript("classpath", "test-classpath"); verify("classpath"); } public static void testInstrumentUsingWar() throws Exception { runTestAntScript("classpath", "test-war"); verify("war"); } private static void verify(String testName) throws Exception { verifyXml(testName); verifyHtml(testName); } private static void verifyXml(String testName) throws Exception { Document document = getSummaryXmlReportDocument(); verifyOverallComplexity(document); document = getXmlReportDocument(); verifyOverallComplexity(document); // Get a list of all classes listed in the XML report List classesList = getClassElements(document); assertTrue("Test " + testName + ": Did not find any classes listed in the XML report.", classesList.size() > 0); // text.xml only instruments the two "A" classes, so make // sure those are the only classes listed in the XML report. boolean firstPackageFound = false; boolean secondPackageFound = false; for (Iterator iter = classesList.iterator(); iter.hasNext();) { boolean verify = true; Element classElement = (Element)iter.next(); String className = classElement.getAttributeValue("name"); if (className.equals("test.first.A")) { firstPackageFound = true; } else if (className.equals("test.second.A")) { secondPackageFound = true; } else if (className.equals("test.first.RemoteInterface") || (className.equals("test.first.RemoteListener")) || (className.equals("test.first.RemoteListener_Stub"))) { //just ignore - it is ok verify = false; } else fail("Test " + testName + ": Found a class with the name '" + className + "' in the XML report, but was only expecting either 'test.first.A' or 'test.second.A'."); if (verify) { verifyClass(className, testName, classElement); } } assertTrue("Test " + testName + ": Did not find class 'test.first.A' in the XML report.", firstPackageFound); assertTrue("Test " + testName + ": Did not find class 'test.second.A' in the XML report.", secondPackageFound); } private static void verifyOverallComplexity(Document document) { String complexity = document.getRootElement().getAttributeValue("complexity"); assertEquals("Invalid overall complexity ", "1.0", complexity); } private static Document getXmlReportDocument() throws IOException, JDOMException { File xmlFile = new File(BASEDIR, "reports/cobertura-xml/coverage.xml"); Document document = JUnitXMLHelper.readXmlFile(xmlFile, true); return document; } private static Document getSummaryXmlReportDocument() throws IOException, JDOMException { File xmlFile = new File(BASEDIR, "reports/cobertura-xml/coverage-summary.xml"); Document document = JUnitXMLHelper.readXmlFile(xmlFile, true); return document; } /** * Use XPath to get all <class> elements in the * cobertura.xml file under the given directory. * @return A list of JDOM Elements. */ private static List getClassElements(Document document) throws IOException, JDOMException { XPath xpath = XPath.newInstance("/coverage/packages/package/classes/class"); List classesList = xpath.selectNodes(document); return classesList; } /** * Verify that the class's expected methods are found. Look for * a method called "call" which should have a hit count of 1. * The method called "dontCall" should have a hit count of 0. * @param testName */ private static void verifyClass(String className, String testName, Element classElement) { verifyComplexity(className, classElement); // Get a list of methods Element methodsElement = classElement.getChild("methods"); List methodList = methodsElement.getChildren("method"); assertTrue("Test " + testName + ": Did not find any methods listed in the class " + classElement.getAttributeValue("name"), methodList.size() > 0); boolean callMethodFound = false; boolean dontCallMethodFound = false; for (Iterator iter = methodList.iterator(); iter.hasNext();) { Element methodElement = (Element)iter.next(); String methodName = methodElement.getAttributeValue("name"); if (methodName.equals("call")) { if (callMethodFound) { fail("Test " + testName + ": Found more than one instance of the method 'call' in the class " + classElement.getAttributeValue("name")); } callMethodFound = true; verifyMethod(testName, classElement, methodElement, 1); } else if (methodName.equals("dontCall")) { if (dontCallMethodFound) { fail("Test " + testName + ": Found more than one instance of the method 'dontCall' in the class " + classElement.getAttributeValue("name")); } dontCallMethodFound = true; verifyMethod(testName, classElement, methodElement, 0); } else if (methodName.equals("") || methodName.equals("someMethod")) { // These methods are ok--ignore them. } else { fail("Test " + testName + ": Found method " + methodName + " in the class " + classElement.getAttributeValue("name") + ", but was only expecting either 'call' or 'dontCall'."); } } assertTrue("Test " + testName + ": Did not find method 'call' in the class " + classElement.getAttributeValue("name"), callMethodFound); assertTrue("Test " + testName + ": Did not find method 'dontCall' in the class " + classElement.getAttributeValue("name"), dontCallMethodFound); } private static void verifyComplexity(String className, Element classElement) { String complexity = classElement.getAttributeValue("complexity"); assertEquals("Invalid complexity with class " + className, "1.0", complexity); } /** * Look at all lines in a method and make sure they have hit counts that * match the expectedHits. */ private static void verifyMethod(String testName, Element classElement, Element methodElement, int expectedHits) { Element linesElement = methodElement.getChild("lines"); List lineList = linesElement.getChildren("line"); assertTrue("Test " + testName + ", class " + classElement.getAttributeValue("name") + ": Did not find any lines in the method " + methodElement.getAttributeValue("name"), lineList.size() > 0); for (Iterator iter = lineList.iterator(); iter.hasNext();) { Element lineElement = (Element)iter.next(); String hitsString = lineElement.getAttributeValue("hits"); int hits = Integer.parseInt(hitsString); assertEquals("Test " + testName + ", class " + classElement.getAttributeValue("name") + ": Found incorrect hit count for the method " + methodElement.getAttributeValue("name"), expectedHits, hits); } } private static void verifyHtml(String testName) throws Exception { File htmlReportDir = new File(BASEDIR, "reports/cobertura-html"); // Get all files from report directory String htmlFiles[] = htmlReportDir.list(new FilenameFilter() { public boolean accept(File dir, String name) { return name.endsWith(".html"); } }); Arrays.sort(htmlFiles); assertTrue(htmlFiles.length >= 5); // Assert that all required files are there String[] requiredFiles = { "index.html", "help.html", "frame-packages.html", "frame-summary.html", "frame-sourcefiles.html" , "test.first.A.html"}; for (int i = 0; i < requiredFiles.length; i++) { if (!containsFile(htmlFiles, requiredFiles[i])) { fail("Test " + testName + ": File " + requiredFiles[i] + " not found among report files"); } } // Validate selected files String previousPrefix = "NONE"; for (int i = 0; i < htmlFiles.length; i++) { // Validate file if has prefix different than previous one, or is required file if (containsFile(requiredFiles, htmlFiles[i]) || !htmlFiles[i].startsWith(previousPrefix)) { JUnitXMLHelper.readXmlFile(new File(htmlReportDir, htmlFiles[i]), true); } if (htmlFiles[i].length() > 7) { previousPrefix = htmlFiles[i].substring(0, 7); } else { previousPrefix = htmlFiles[i]; } } BufferedReader reader = new BufferedReader(new FileReader(new File(htmlReportDir, "test.first.A.html"))); String line; boolean foundSomeMethod = false; while ((line = reader.readLine()) != null) { if (line.matches(".*someMethod.*")) { foundSomeMethod = true; } } assertTrue("someMethod not found in test.first.A.html", foundSomeMethod); } private static boolean containsFile(String[] files, String fileName) { for (int i = 0; i < files.length; i++) { if (files[i].equals(fileName)) return true; } return false; } /** * Use the ant 'java' task to run the test.xml * file and the specified target. */ private static void runTestAntScript(String testName, String target) throws IOException { Java task = new Java(); task.setTaskName("java"); task.setProject(new Project()); task.init(); // Call ant launcher. Requires ant-lancher.jar. task.setClassname("org.apache.tools.ant.launch.Launcher"); task.setFork(true); AntUtil.transferCoberturaDataFileProperty(task); if (forkedJVMDebugPort > 0) { task.createJvmarg().setValue("-Xdebug"); task.createJvmarg().setValue("-Xrunjdwp:transport=dt_socket,address=" + forkedJVMDebugPort + ",server=y,suspend=y"); } task.createArg().setValue("-f"); task.createArg().setValue(BASEDIR + "/build.xml"); task.createArg().setValue(target); task.setFailonerror(true); // Set output to go to a temp file File outputFile = Util.createTemporaryTextFile("cobertura-test"); task.setOutput(outputFile); // Set the classpath to the same classpath as this JVM Path classpath = task.createClasspath(); PathElement pathElement = classpath.createPathElement(); pathElement.setPath(System.getProperty("java.class.path")); try { task.execute(); } finally { if (outputFile.exists()) { // Put the contents of the output file in the exception System.out.println("\n\n\nOutput from Ant for " + testName + " test:\n----------------------------------------\n" + Util.getText(outputFile) + "----------------------------------------"); outputFile.delete(); } } } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/test/0000755000175000017500000000000011343534516024530 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/test/util/0000755000175000017500000000000011345540725025506 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/test/util/TestUtil.groovy0000644000175000017500000002057411343534516030541 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2009 John Lewis * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.test.util import junit.framework.Assert public class TestUtil { public static final antBuilder = new AntBuilder() private static File coberturaClassDir public static final String SOURCE_TEXT = ''' package a.mypackage; public class SimpleSource { public void aSimpleMethod() { } } ''' public static final String SIMPLE_SOURCE_PATHNAME = 'a/mypackage/SimpleSource.java' /** * Usage TestUtil.withTempDir { tempDir -> doSomethingWith(tempDir) } * * Create a directory under the system's temporary directory, and automatically * delete it before returning from withTempDir. * */ public static withTempDir(Closure worker) { File tempDir = new File(System.getProperty("java.io.tmpdir")); File tempSubdir = new File(tempDir, "cobertura_test" + System.currentTimeMillis()); Throwable savedThrowable = null try { tempSubdir.mkdirs() //now call the closure passing it the subdir worker(tempSubdir) } catch (Throwable t) { savedThrowable = t } finally { try { antBuilder.delete(dir:tempSubdir, failonerror:false) } catch (Throwable t) { if (savedThrowable) { //something went wrong with the delete, but the savedThrowable is more important t.printStackTrace(System.err) throw savedThrowable } else { throw t } } if (savedThrowable) { throw savedThrowable } } } public static createSourceArchive(dir) { /* * Create a simple source file in the temporary directory */ def sourceDir = new File(dir, "src") def sourceFile = new File(sourceDir, SIMPLE_SOURCE_PATHNAME) sourceFile.parentFile.mkdirs() sourceFile.write(SOURCE_TEXT) //create a source zip file with the simple source file def zipDir = new File(dir, "zip") zipDir.mkdirs() def zipFile = new File(zipDir, "source.zip") antBuilder.zip(destfile:zipFile, basedir:sourceDir) //now delete the source file to make sure we use the zip file Assert.assertTrue(sourceFile.delete()) return zipFile } public static synchronized getCoberturaClassDir() { if (coberturaClassDir == null) { coberturaClassDir = new File("build/test/cobertura_classes") coberturaClassDir.mkdirs() antBuilder.javac(srcdir:'src', destdir:coberturaClassDir, debug:true, target:"1.5") { classpath { fileset(dir:'lib') { include(name:'**/*.jar') } } } } return coberturaClassDir } private static waitForLiveServer(webContainerHostname, webContainerPort, timeoutMin) { InetSocketAddress address = new InetSocketAddress(webContainerHostname, webContainerPort); antBuilder.echo(message:"Waiting $timeoutMin min for web server...") long beginTime = System.currentTimeMillis(); long endTime = System.currentTimeMillis() + (timeoutMin * 60 * 1000); boolean portOpened = false; while ((!portOpened) && (System.currentTimeMillis() < endTime)) { portOpened = trySocket(address); if (portOpened) { antBuilder.echo("Web server has opened the port in " + (System.currentTimeMillis() - beginTime)/1000.0/60.0 + " min."); } else { try { Thread.sleep(2000); //2 sec } catch (InterruptedException e) { e.printStackTrace(); } } } if (!portOpened) { throw new RuntimeException("Timed out waiting for webapp server to initialize"); } } /** * Checks to see if a socket is opened. */ public static boolean trySocket(InetSocketAddress address) { boolean success = false; Socket socket = null try { socket = new Socket() socket.connect(address); success = true; } catch (ConnectException e) { //this is expected } catch (Throwable e) { e.printStackTrace(); } finally { if (socket) { socket.close(); } } return success; } public static getXMLReportDOM(xmlReport) { def parser = new XmlParser() parser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd",false) parser.parse(xmlReport) } public static isMethodHit(dom, methodName) { def methods = dom.packages.'package'.classes.'class'.methods.method def getMethod = methods.grep { it.'@name' == methodName } def hitsPerLine = getMethod.lines.line.'@hits'[0] return (hitsPerLine.any { it.toInteger() >= 1 }) } public static getHitCount(dom, className, methodName) { def classes = dom.packages.'package'.classes.'class' def clazz = classes.grep { it.'@name' == className }[0] if (clazz == null) { return 0 } def methods = clazz.methods.method def method = methods.grep { it.'@name' == methodName }[0] if (method == null) { return 0 } def firstLine = method.lines.line[0] if (firstLine == null) { return 0 } def hitCount = firstLine.'@hits' return hitCount.toInteger() } public static getLineCounts(dom, className, methodName) { def classes = dom.packages.'package'.classes.'class' def clazz = classes.grep { it.'@name' == className }[0] if (clazz == null) { return 0 } def methods = clazz.methods.method def method = methods.grep { it.'@name' == methodName }[0] if (method == null) { return 0 } def lines = method.lines.line.collect {[number:it.'@number', hits:it.'@hits'.toInteger()]} return lines } public static getCoberturaAntBuilder(cobertura) { def ret = new AntBuilder() ret.taskdef(resource:"tasks.properties") { classpath { pathelement(location:cobertura) fileset(dir:'lib') { include(name:"**/*.jar") } } } ret.taskdef(name:'groovyc', classname:'org.codehaus.groovy.ant.Groovyc') { classpath { fileset(dir:'antLibrary/common/groovy') { include(name:'*.groovy') } } } return ret } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/test/util/WebappServer.groovy0000644000175000017500000002645011343534521031364 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2009 John Lewis * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.test.util import static org.junit.Assert.* public class WebappServer { static final SIMPLE_SERVLET_CLASSNAME = "com.acme.servlet.SimpleServlet" static final SIMPLE_SERVLET_TEXT = ''' package com.acme.servlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.PrintWriter; import java.io.IOException; public class SimpleServlet extends HttpServlet { protected void doGet(HttpServletRequest req, HttpServletResponse response) throws IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { out.println("Hi"); } finally { if (out != null) { out.close(); } } } } ''' static final SIMPLE_SERVLET_WEB_XML_TEXT = ''' SimpleServlet com.acme.servlet.SimpleServlet SimpleServlet /SimpleServlet ''' private static final ant = TestUtil.antBuilder private static final LOCALHOST = "127.0.0.1" def dir = "." def msecNeededToStop = 10000 def coberturaAnt def modifyMainCoberturaDataFile boolean tomcat /** * Copies a web server installation into dir and deploys a webapp to it. * */ public deployApp(map) { modifyMainCoberturaDataFile = map.modifyMainCoberturaDataFile def extractedDir = new File(dir, "extracted") def webInfDir = new File(extractedDir, "WEB-INF") def classesDir = new File(webInfDir, "classes") def webInfFile = writeWebInfFile(webInfDir, map.webInfText) compileSourceFiles(map.srcDir, classesDir) copyJettyFiles(dir) def war = makeWarFile(map.appName, webInfFile, classesDir) ant.delete(dir:extractedDir) def coberturaJar = createCoberturaJar() coberturaAnt = TestUtil.getCoberturaAntBuilder(TestUtil.getCoberturaClassDir()) if (map.instrumentRegEx) { instrumentWar(war, map.instrumentRegEx) } if (map.instrumentCobertura) { instrumentCoberturaJar(coberturaJar) } if (map.deployCoberturaFlush) { deployCoberturaFlush(map.instrumentCobertura) } } private writeWebInfFile(webInfDir, text) { webInfDir.mkdirs() def webInfFile = new File(webInfDir, "web.xml") webInfFile.write(text) return webInfFile } private compileSourceFiles(srcDir, classesDir) { ant.mkdir(dir:classesDir) ant.javac(srcdir:srcDir, destdir:classesDir, debug:'true', target:'1.5') { classpath { fileset(dir:"jetty") { include(name:"**/*.jar") } } } } private copyJettyFiles(todir) { ant.copy(todir:todir) { fileset(dir:"jetty") } } private makeWarFile(appName, webInfFile, classesDir) { def webappsDir = new File(dir, "webapps") def war = new File(webappsDir, "${appName}.war") ant.war(destfile:war, webxml:webInfFile) { classes(dir:classesDir) } return war } private deployCoberturaFlush(instrumentCobertura) { def webappsDir = new File(dir, "webapps") def war = new File(webappsDir, "coberturaFlush.war") /* * Here we want to make the coberturaFlush war similar to the way * the production build does it. So, use the same file. */ GroovyScriptEngine gse = new GroovyScriptEngine(".") Binding binding = new Binding() binding.setVariable("ant", ant) gse.run("buildUtil.groovy", binding) //now call the buildWar closure binding.getVariable("buildWar")(war) if (instrumentCobertura) { instrumentWar(war, "net.sourceforge.cobertura.*") } } private instrumentWar(war, instrumentRegEx) { coberturaAnt.'cobertura-instrument'(datafile:"${dir}/cobertura.ser") { includeClasses(regex:instrumentRegEx) excludeClasses(regex:'.*Test.*') fileset(dir:war.getParent()) { include(name:'*.war') } } } private instrumentCoberturaJar(coberturaJar) { coberturaAnt.'cobertura-instrument'(datafile:"${dir}/cobertura.ser") { includeClasses(regex:"net.sourceforge.cobertura.*") excludeClasses(regex:'.*Test.*') fileset(dir:coberturaJar.getParent()) { include(name:coberturaJar.name) } } } /** * Starts the web server and calls the closure. The web server will be stopped * when the closure exits (successfully or not). * */ public withRunningServer(closure) { def freePorts = findFreePorts() startWebServer(freePorts) def data = null try { data = [ xmlReport:new File("${dir}/coverage.xml"), hostname:LOCALHOST, webappPort:freePorts.webapp, coberturaAnt:coberturaAnt] data.datafile = getDatafileToUse() /* * add a closure that can be called to flush the cobertura data */ data.flushCobertura = { def webappResponse = (new java.net.URL("http://${data.hostname}:${data.webappPort}/coberturaFlush/flushCobertura")).text assertEquals("Response of coberturaFlush unexpected", "", webappResponse.trim()) } TestUtil.waitForLiveServer(data.hostname, data.webappPort, 1) //1 min timeout closure.call(data) } finally { stopWebServer(freePorts.stop) } /* * Wait a bit for the server to stop completely */ Thread.sleep(msecNeededToStop) coberturaAnt.'cobertura-report'(datafile:data.datafile, format:'xml', destdir:data.xmlReport.getParent()) def dom = TestUtil.getXMLReportDOM(data.xmlReport) data.dom = dom return data } private getDatafileToUse() { def datafile = new File("${dir}/cobertura.ser") if (modifyMainCoberturaDataFile) { /* * modify the cobertura.ser file created by the instrumentation target * of the main build.xml file. That way, the counts * will end up in the overall coverage report */ def tempfile = new File("build/cobertura.ser") if (tempfile.exists()) { datafile = tempfile } else { /* * It looks like the main build.xml's instrument target has not been run. * So, a coverage report is not being generated. */ } } return datafile } /** * Find two port numbers that can be used to start a webapp server (one port for * http connections; one port for a stop command). */ private findFreePorts() { def freePorts = [webapp:null, stop:null] def webappSocket = null def stopSocket = null try { webappSocket = new ServerSocket(0, 1, null) stopSocket = new ServerSocket(0, 1, null) freePorts.webapp = webappSocket.getLocalPort() freePorts.stop = stopSocket.getLocalPort() } finally { closeSocket(webappSocket) closeSocket(stopSocket) } return freePorts } private closeSocket(socket) { try { if (socket) { socket.close() } } catch (Throwable t) { t.printStackTrace(System.err) } } private startWebServer(freePorts) { ant.echo(message:"Starting Jetty webapp server on ${freePorts.webapp}") ant.java(jar:"${dir}/start.jar", dir:dir, fork:true, spawn:true) { sysproperty(key:'jetty.port', value:freePorts.webapp) sysproperty(key:'STOP.PORT', value:freePorts.stop) sysproperty(key:'STOP.KEY', value:'cobertura') // fool Cobertura into thinking it is running in Tomcat if (tomcat) { sysproperty(key:'catalina.home', value:dir.absolutePath) } if (modifyMainCoberturaDataFile) { sysproperty(key:'net.sourceforge.cobertura.datafile', value:getDatafileToUse().getAbsolutePath()) } } } private stopWebServer(stopPort) { ant.java(jar:"${dir}/start.jar", dir:dir, fork:true) { arg(value:'--stop') sysproperty(key:'STOP.PORT', value:stopPort) sysproperty(key:'STOP.KEY', value:'cobertura') } } private createCoberturaJar() { def coberturaJar = new File(dir, "lib/cobertura.jar") def coberturaClassDir = TestUtil.getCoberturaClassDir() ant.zip(destfile:coberturaJar) { fileset(dir:coberturaClassDir) } return coberturaJar } public static writeSimpleServletSource(srcDir) { def servletSourceFile = new File(srcDir, "com/acme/servlet/SimpleServlet.java") servletSourceFile.parentFile.mkdirs() servletSourceFile.write(SIMPLE_SERVLET_TEXT) } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/coveragedata/0000755000175000017500000000000011345540725026177 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/coveragedata/ClassDataTest.java0000644000175000017500000002072711343534522031545 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.util.Collection; import junit.framework.TestCase; public class ClassDataTest extends TestCase { private final ClassData a = new ClassData("com.example.HelloWorld"); private final ClassData b = new ClassData("com.example.HelloWorld"); private final ClassData c = new ClassData("com.example.HelloWorld"); private final ClassData defPckg = new ClassData("DefaultPackageClass"); public void setUp() { a.setSourceFileName("com/example/HelloWorld.java"); b.setSourceFileName("com/example/HelloWorld.java"); c.setSourceFileName("com/example/HelloWorld.java"); defPckg.setSourceFileName("DefaultPackageClass.java"); for (int i = 1; i <= 5; i++) b.addLine(i, "test", "(I)B"); for (int i = 1; i <= 5; i++) c.addLine(i, "test", "(I)B"); for (int i = 1; i <= 5; i++) defPckg.addLine(i, "test", "(I)B"); b.touch(1,1); b.touch(2,1); } public void testBranch() { // Setting an invalid line as a branch should not make the line valid assertFalse(a.hasBranch(2)); a.addLineJump(2, 0); assertFalse(a.hasBranch(2)); assertFalse(b.hasBranch(2)); b.addLineJump(2, 0); assertTrue(b.hasBranch(2)); assertTrue(b.hasBranch(2)); b.addLineJump(2, 1); assertTrue(b.hasBranch(2)); assertFalse(b.hasBranch(4)); b.addLineSwitch(4, 0, 1, 9); assertTrue(b.hasBranch(4)); Collection branches = b.getBranches(); assertEquals(2, branches.size()); assertEquals(14, b.getNumberOfValidBranches()); assertTrue(branches.contains(new Integer(2))); assertTrue(branches.contains(new Integer(4))); //assertTrue(branches.contains(new LineData(2, "test", "(I)B"))); //assertTrue(branches.contains(new LineData(4, "test", "(I)B"))); } public void testBranchCoverage() { assertEquals(0, a.getNumberOfValidBranches()); assertEquals(0, b.getNumberOfValidBranches()); assertEquals(1.00d, a.getBranchCoverageRate(), 0d); assertEquals(1.00d, b.getBranchCoverageRate(), 0d); assertEquals(1.00d, a.getBranchCoverageRate("test(I)B"), 0d); assertEquals(1.00d, b.getBranchCoverageRate("test(I)B"), 0d); c.addLineJump(1, 0); c.addLineJump(2, 0); c.addLineSwitch(3, 0, 1, 3); c.addLineSwitch(4, 0, 1, 3); assertEquals(12, c.getNumberOfValidBranches()); assertEquals(0, c.getNumberOfCoveredBranches()); assertEquals(0.00d, c.getBranchCoverageRate(), 0d); assertEquals(0.00d, c.getBranchCoverageRate("test(I)B"), 0d); c.touchJump(1, 0, true,1); c.touchJump(1, 0, false,1); c.touchJump(2, 0, true,1); c.touchJump(2, 0, false,1); assertEquals(12, c.getNumberOfValidBranches()); assertEquals(4, c.getNumberOfCoveredBranches()); assertEquals(0.33d, c.getBranchCoverageRate(), 0.01d); assertEquals(0.33d, c.getBranchCoverageRate("test(I)B"), 0.01d); c.touchSwitch(3, 0, 0,1); c.touchSwitch(3, 0, 1,1); c.touchSwitch(4, 0, 2,1); c.touchSwitch(4, 0, -1,1); assertEquals(12, c.getNumberOfValidBranches()); assertEquals(8, c.getNumberOfCoveredBranches()); assertEquals(0.66d, c.getBranchCoverageRate(), 0.01d); assertEquals(0.66d, c.getBranchCoverageRate("test(I)B"), 0.01d); } public void testConstructor() { try { new ClassData(null); fail("Expected an IllegalArgumentException but did not receive one!"); } catch (IllegalArgumentException e) { // Good! } assertEquals("HelloWorld", a.getBaseName()); assertEquals("com.example", a.getPackageName()); assertEquals("com.example.HelloWorld", a.getName()); assertEquals("DefaultPackageClass", defPckg.getBaseName()); assertEquals("", defPckg.getPackageName()); assertEquals("DefaultPackageClass", defPckg.getName()); } public void testEquals() { assertFalse(a.equals(null)); assertFalse(a.equals(new Integer(4))); assertFalse(a.equals(new PackageData("com.example"))); assertTrue(a.equals(a)); assertFalse(a.equals(b)); assertFalse(a.equals(c)); assertFalse(a.equals(defPckg)); assertFalse(b.equals(a)); assertTrue(b.equals(b)); assertFalse(b.equals(c)); assertFalse(b.equals(defPckg)); assertFalse(c.equals(a)); assertFalse(c.equals(b)); assertTrue(c.equals(c)); assertFalse(c.equals(defPckg)); assertFalse(defPckg.equals(a)); assertFalse(defPckg.equals(b)); assertFalse(defPckg.equals(c)); assertTrue(defPckg.equals(defPckg)); c.touch(1,1); c.touch(2,1); assertTrue(b.equals(c)); } public void testLineCoverage() { assertEquals(0, a.getNumberOfCoveredLines()); assertEquals(0, a.getNumberOfValidLines()); assertEquals(2, b.getNumberOfCoveredLines()); assertEquals(5, b.getNumberOfValidLines()); assertEquals(0, c.getNumberOfCoveredLines()); assertEquals(5, c.getNumberOfValidLines()); assertEquals(1d, a.getLineCoverageRate(), 0d); assertEquals(0.4d, b.getLineCoverageRate(), 0d); assertEquals(0d, c.getLineCoverageRate(), 0d); assertEquals(1d, a.getLineCoverageRate("test(I)B"), 0d); assertEquals(0.4d, b.getLineCoverageRate("test(I)B"), 0d); assertEquals(0d, c.getLineCoverageRate("test(I)B"), 0d); assertEquals(1d, a.getLineCoverageRate("notReal(I)B"), 0d); assertEquals(1d, b.getLineCoverageRate("notReal(I)B"), 0d); assertEquals(1d, c.getLineCoverageRate("notReal(I)B"), 0d); } public void testRemoveLine() { assertEquals(0, a.getNumberOfValidBranches()); assertEquals(0, a.getNumberOfCoveredBranches()); assertEquals(0, a.getNumberOfValidLines()); a.removeLine(3); assertEquals(0, a.getNumberOfValidBranches()); assertEquals(0, a.getNumberOfCoveredBranches()); assertEquals(0, a.getNumberOfValidLines()); assertEquals(0, b.getNumberOfValidBranches()); assertEquals(0, a.getNumberOfCoveredBranches()); assertEquals(5, b.getNumberOfValidLines()); b.removeLine(3); assertEquals(0, b.getNumberOfValidBranches()); assertEquals(0, a.getNumberOfCoveredBranches()); assertEquals(4, b.getNumberOfValidLines()); c.addLineJump(2, 0); c.addLineSwitch(3, 0, 1, 2); c.addLineJump(3, 0); c.addLineJump(4, 0); assertEquals(9, c.getNumberOfValidBranches()); assertEquals(0, a.getNumberOfCoveredBranches()); assertEquals(5, c.getNumberOfValidLines()); c.removeLine(3); assertEquals(4, c.getNumberOfValidBranches()); assertEquals(0, a.getNumberOfCoveredBranches()); assertEquals(4, c.getNumberOfValidLines()); } public void testSourceFileName() { a.setSourceFileName(null); assertEquals("com/example/HelloWorld.java", a.getSourceFileName()); a.setSourceFileName("HelloWorld.java"); assertEquals("com/example/HelloWorld.java", a.getSourceFileName()); ClassData d = new ClassData("org.jaxen.expr.IdentitySet$IdentityWrapp"); assertEquals("org/jaxen/expr/IdentitySet.java", d.getSourceFileName()); ClassData e = new ClassData("org.jaxen.expr.NodeComparator$1"); assertEquals("org/jaxen/expr/NodeComparator.java", e.getSourceFileName()); assertEquals( "DefaultPackageClass.java", defPckg.getSourceFileName()); ClassData f = new ClassData("$strangeClass"); assertEquals( "$strangeClass.java", f.getSourceFileName()); } public void testTouch() { int line = 3; assertFalse(a.isValidSourceLineNumber(line)); a.touch(line,1); assertTrue(a.isValidSourceLineNumber(line)); assertTrue(b.isValidSourceLineNumber(line)); assertEquals(0, b.getLineCoverage(line).getHits()); b.touch(line,1); assertTrue(b.isValidSourceLineNumber(line)); assertEquals(1, b.getLineCoverage(line).getHits()); b.touch(line,1); assertEquals(2, b.getLineCoverage(line).getHits()); assertTrue(b.isValidSourceLineNumber(line)); } }././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/coveragedata/CoverageDataFileHandlerTest.javacobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/coveragedata/CoverageDataFileHandlerTest.0000644000175000017500000000516111343534514033463 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.io.File; import junit.framework.TestCase; public class CoverageDataFileHandlerTest extends TestCase { private final static String basedir = (System.getProperty("basedir") != null) ? System.getProperty("basedir") : "."; private final static String pathToTestOutput = basedir + "/build/test/CoverageDataFileHandlerTest"; private final ProjectData a = new ProjectData(); private File tmpDir = new File(pathToTestOutput); public void setUp() { // Create some coverage data ClassData classData; assertEquals(0, a.getNumberOfClasses()); assertEquals(0, a.getNumberOfChildren()); classData = new ClassData("HelloWorld"); classData.setSourceFileName("com/example/HelloWorld.java"); for (int i = 0; i < 10; i++) classData.addLine(i, "test", "(I)B"); a.addClassData(classData); assertEquals(1, a.getNumberOfClasses()); assertEquals(1, a.getNumberOfChildren()); classData = new ClassData("HelloWorldHelper"); classData.setSourceFileName("com/example/HelloWorldHelper.java"); for (int i = 0; i < 14; i++) classData.addLine(i, "test", "(I)B"); a.addClassData(classData); assertEquals(2, a.getNumberOfClasses()); assertEquals(1, a.getNumberOfChildren()); // Create the directory for our serialized coverage data tmpDir.mkdirs(); } public void tearDown() { tmpDir = new File(pathToTestOutput); File files[] = tmpDir.listFiles(); for (int i = 0; i < files.length; i++) files[i].delete(); tmpDir.delete(); } public void testSaveAndRestore() { File dataFile = new File(tmpDir, "cobertura.ser"); CoverageDataFileHandler.saveCoverageData(a, dataFile); ProjectData b; b = CoverageDataFileHandler.loadCoverageData(dataFile); assertEquals(a, b); } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/coveragedata/ProjectDataTest.java0000644000175000017500000001321111343534515032076 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * Copyright (C) 2010 Charlie Squires * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.util.Iterator; import java.util.SortedSet; import junit.framework.TestCase; public class ProjectDataTest extends TestCase { private ProjectData coverageData; public void setUp() { coverageData = new ProjectData(); } public void testAddClass() { ClassData classData; assertEquals(0, coverageData.getNumberOfChildren()); assertEquals(0, coverageData.getClasses().size()); assertEquals(null, coverageData.getClassData("gobbleDeeGoop")); classData = new ClassData("com.example.HelloWorld"); classData.setSourceFileName("com/example/HelloWorld.java"); for (int i = 0; i < 10; i++) classData.addLine(i, "test", "(I)B"); coverageData.addClassData(classData); assertEquals(1, coverageData.getNumberOfChildren()); assertEquals(1, coverageData.getClasses().size()); assertEquals(classData, coverageData.getClassData(classData.getName())); classData = new ClassData("com.example.HelloWorldHelper"); classData.setSourceFileName("com/example/HelloWorldHelper.java"); for (int i = 0; i < 14; i++) classData.addLine(i, "test", "(I)B"); coverageData.addClassData(classData); assertEquals(1, coverageData.getNumberOfChildren()); assertEquals(2, coverageData.getClasses().size()); assertEquals(classData, coverageData.getClassData(classData.getName())); // See what happens when we try to add the same class twice classData = new ClassData("com.example.HelloWorld"); classData.setSourceFileName("com/example/HelloWorld.java"); for (int i = 0; i < 19; i++) classData.addLine(i, "test", "(I)B"); try { coverageData.addClassData(classData); // removed by Jeremy Thomerson when changing PackageData // fail("Expected an IllegalArgumentException but did not receive one!"); } catch (IllegalArgumentException e) { // Good! } assertEquals(1, coverageData.getNumberOfChildren()); assertEquals(2, coverageData.getClasses().size()); } public void testEquals() { ProjectData a = new ProjectData(); ProjectData b = new ProjectData(); ProjectData c = new ProjectData(); ClassData classData1 = new ClassData("com.example.HelloWorld1"); ClassData classData2 = new ClassData("com.example.HelloWorld2"); ClassData classData3 = new ClassData("com.example.HelloWorld3"); ClassData classData4 = new ClassData("com.example.HelloWorld4"); classData1.setSourceFileName("com/example/HelloWorld1.java"); classData2.setSourceFileName("com/example/HelloWorld2.java"); classData3.setSourceFileName("com/example/HelloWorld3.java"); classData4.setSourceFileName("com/example/HelloWorld4.java"); a.addClassData(classData1); a.addClassData(classData2); a.addClassData(classData3); b.addClassData(classData1); b.addClassData(classData2); c.addClassData(classData1); c.addClassData(classData2); c.addClassData(classData4); assertFalse(a.equals(null)); assertFalse(a.equals(classData1)); assertTrue(a.equals(a)); assertFalse(a.equals(b)); assertFalse(a.equals(c)); assertFalse(b.equals(a)); assertTrue(b.equals(b)); assertFalse(b.equals(c)); assertFalse(c.equals(a)); assertFalse(c.equals(b)); assertTrue(c.equals(c)); b.addClassData(classData3); assertTrue(a.equals(b)); assertTrue(b.equals(a)); assertFalse(a.equals(c)); assertFalse(c.equals(a)); } public void testHashCode() { ProjectData a = new ProjectData(); ProjectData b = new ProjectData(); ClassData classData1 = new ClassData("com.example.HelloWorld1"); ClassData classData2 = new ClassData("com.example.HelloWorld2"); ClassData classData3 = new ClassData("com.example.HelloWorld3"); classData1.setSourceFileName("com/example/HelloWorld1.java"); classData2.setSourceFileName("com/example/HelloWorld2.java"); classData3.setSourceFileName("com/example/HelloWorld3.java"); a.addClassData(classData1); a.addClassData(classData2); a.addClassData(classData3); b.addClassData(classData1); b.addClassData(classData2); assertEquals(a.hashCode(), a.hashCode()); assertEquals(b.hashCode(), b.hashCode()); b.addClassData(classData3); assertEquals(a.hashCode(), b.hashCode()); } public void testGetSubPackages() { coverageData.addClassData(new ClassData("com.example.HelloWorld")); coverageData.addClassData(new ClassData("com.example.test.HelloWorldTest")); coverageData.addClassData(new ClassData("com.examplesomething.HelloWorld")); SortedSet subPackagesSet = coverageData.getSubPackages("com.example"); assertEquals(2, subPackagesSet.size()); Iterator subPackages = subPackagesSet.iterator(); assertEquals("com.example", ((PackageData)subPackages.next()).getName()); assertEquals("com.example.test", ((PackageData)subPackages.next()).getName()); } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/coveragedata/TouchCollectorTest.java0000644000175000017500000000606511343534522032636 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2010 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.util.concurrent.atomic.AtomicReference; import junit.framework.TestCase; public class TouchCollectorTest extends TestCase { private static void touchIteratively(int num) { for (int i=0; i<2000; i++) { /* * The following yield is needed to make sure the other thread gets * some CPU. Otherwise, this thread will get too much of a jump ahead * of the other thread. */ Thread.yield(); TouchCollector.touch(Integer.toString(i),1); } } private void runTestWithTwoThreads() throws Throwable { final AtomicReference possibleThrowable = new AtomicReference(); ThreadGroup threadGroup = new ThreadGroup("TestThreadGroup") { public void uncaughtException(Thread thread, Throwable t) { /* * Save the Throwable for later use and interrupt this thread so it exits */ possibleThrowable.set(t); thread.interrupt(); } }; /* * Create two threads using the above thread group */ Thread thread1 = new Thread(threadGroup, "1") { public void run() { touchIteratively(0); } }; Thread thread2 = new Thread(threadGroup, "2") { public void run() { touchIteratively(1); } }; thread1.start(); thread2.start(); /* * Wait for the threads to exit */ if (thread1.isAlive()) thread1.join(); if (thread2.isAlive()) thread2.join(); Throwable t = possibleThrowable.get(); if (t != null) { throw t; } TouchCollector.applyTouchesOnProjectData(new ProjectData()); } /** * Tests the thread safety of the TouchCollector. Since TouchCollector has all * static methods, it is difficult to get this test to fail everytime if * there is a thread problem. * * At the time this test was written, TouchCollector had a problem, but * this test needed to be run a few times before seeing a failure. The * majority of times it would fail though. */ public void testMultiThreaded() throws Throwable { runTestWithTwoThreads(); } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/coveragedata/SwitchDataTest.java0000644000175000017500000001420111343534513031727 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.util.concurrent.atomic.AtomicReference; import junit.framework.TestCase; public class SwitchDataTest extends TestCase { private final SwitchData a = new SwitchData(0, new int[] { 0, 1, 2, 3 }); private final SwitchData b = new SwitchData(1, 1, 9); public void testEquals() { assertFalse(a.equals(null)); assertFalse(a.equals(Integer.valueOf(4))); assertTrue(a.equals(a)); assertFalse(a.equals(b)); SwitchData aPrime = new SwitchData(0, new int[] { 0, 1, 2, 3 }); assertTrue(a.equals(aPrime)); } public void testHashCode() { assertEquals(a.hashCode(), a.hashCode()); SwitchData aPrime = new SwitchData(0, new int[] { 0, 1, 2, 3 }); assertEquals(a.hashCode(), aPrime.hashCode()); } public void testGetSwitchNumber() { assertEquals(0, a.getSwitchNumber()); assertEquals(1, b.getSwitchNumber()); } public void testGetNumbers() { assertEquals(0, a.getBranchCoverageRate(), 0); assertEquals(5, a.getNumberOfValidBranches(), 0); assertEquals(0, a.getNumberOfCoveredBranches(), 0); for (int i = 0; i < 5; i++) { a.touchBranch(1,1); assertEquals(0.2, a.getBranchCoverageRate(), 0); assertEquals(5, a.getNumberOfValidBranches(), 0); assertEquals(1, a.getNumberOfCoveredBranches(), 0); } a.touchBranch(-1,1); assertEquals(0.4, a.getBranchCoverageRate(), 0); assertEquals(5, a.getNumberOfValidBranches(), 0); assertEquals(2, a.getNumberOfCoveredBranches(), 0); a.touchBranch(0,1); assertEquals(0.6, a.getBranchCoverageRate(), 0); assertEquals(5, a.getNumberOfValidBranches(), 0); assertEquals(3, a.getNumberOfCoveredBranches(), 0); a.touchBranch(2,1); assertEquals(0.8, a.getBranchCoverageRate(), 0); assertEquals(5, a.getNumberOfValidBranches(), 0); assertEquals(4, a.getNumberOfCoveredBranches(), 0); a.touchBranch(3,1); assertEquals(1, a.getBranchCoverageRate(), 0); assertEquals(5, a.getNumberOfValidBranches(), 0); assertEquals(5, a.getNumberOfCoveredBranches(), 0); } public void testTouch() { assertEquals(0, a.getHits(0)); for (int i = 0; i < 400; i++) a.touchBranch(0,1); assertEquals(400, a.getHits(0)); assertEquals(0, a.getHits(1)); for (int i = 0; i < 4500; i++) a.touchBranch(1,1); assertEquals(4500, a.getHits(1)); assertEquals(0, a.getHits(2)); for (int i = 0; i < 300; i++) a.touchBranch(2,1); assertEquals(300, a.getHits(2)); assertEquals(0, a.getHits(3)); for (int i = 0; i < 800; i++) a.touchBranch(3,1); assertEquals(800, a.getHits(3)); assertEquals(0, a.getDefaultHits()); for (int i = 0; i < 200; i++) a.touchBranch(-1,1); assertEquals(200, a.getDefaultHits()); } public void testMerge() { a.touchBranch(0,1); a.touchBranch(0,1); a.touchBranch(2,1); a.touchBranch(-1,1); SwitchData x = new SwitchData(0); x.touchBranch(3,1); x.touchBranch(3,1); a.merge(x); assertEquals(2, a.getHits(0)); assertEquals(0, a.getHits(1)); assertEquals(1, a.getHits(2)); assertEquals(2, a.getHits(3)); assertEquals(1, a.getDefaultHits()); x = new SwitchData(0); x.touchBranch(5,1); x.touchBranch(-1,1); a.merge(x); assertEquals(2, a.getHits(0)); assertEquals(0, a.getHits(1)); assertEquals(1, a.getHits(2)); assertEquals(2, a.getHits(3)); assertEquals(0, a.getHits(4)); assertEquals(1, a.getHits(5)); assertEquals(2, a.getDefaultHits()); } private static void touchIteratively(SwitchData data, int num) { /* * When this test fails, it usually does so well before 2000 iterations. If it * gets past 2000, it will usually pass, so there is not much need in going much * past 2000. */ for (int i=0; i<2000; i++) { /* * The following yield is needed to make sure the other thread gets * some CPU. Otherwise, this thread will get too much of a jump ahead * of the other thread. */ Thread.yield(); data.touchBranch(i,1); } } private void runTestWithTwoThreads() throws Throwable { final SwitchData data = new SwitchData(2); final AtomicReference possibleThrowable = new AtomicReference(); ThreadGroup threadGroup = new ThreadGroup("TestThreadGroup") { public void uncaughtException(Thread thread, Throwable t) { /* * Save the Throwable for later use and interrupt this thread so it exits */ possibleThrowable.set(t); thread.interrupt(); } }; /* * Create two threads using the above thread group */ Thread thread1 = new Thread(threadGroup, "1") { public void run() { touchIteratively(data, 0); } }; Thread thread2 = new Thread(threadGroup, "2") { public void run() { touchIteratively(data, 1); } }; thread1.start(); thread2.start(); /* * Wait for the threads to exit */ if (thread1.isAlive()) thread1.join(); if (thread2.isAlive()) thread2.join(); Throwable t = possibleThrowable.get(); if (t != null) { throw t; } } public void testMultiThreaded() throws Throwable { /* * This test will often pass with only one iteration. * It passes once in a while with 4. It never passes * with 10 (I hope). */ for (int i=0; i<10; i++) { runTestWithTwoThreads(); } } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/coveragedata/LineDataTest.java0000644000175000017500000002174611343534513031371 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.util.concurrent.atomic.AtomicReference; import junit.framework.TestCase; public class LineDataTest extends TestCase { private final LineData a = new LineData(10, "test1", "(I)B"); private final LineData b = new LineData(11, "test1", "(I)B"); private final LineData c = new LineData(12, "test2", "(I)B"); private final LineData d = new LineData(13, "test2", "(I)B"); private final LineData e = new LineData(14); private final LineData f = new LineData(15); public void testEquals() { assertFalse(a.equals(null)); assertFalse(a.equals(new Integer(4))); assertTrue(a.equals(a)); assertFalse(a.equals(b)); assertFalse(a.equals(c)); assertFalse(a.equals(d)); assertFalse(a.equals(e)); assertFalse(a.equals(f)); LineData aPrime = new LineData(10, "test1", "(I)B"); assertTrue(a.equals(aPrime)); } public void testHashCode() { assertEquals(a.hashCode(), a.hashCode()); LineData aPrime = new LineData(10, "test1", "(I)B"); assertEquals(a.hashCode(), aPrime.hashCode()); } public void testGetLineNumber() { assertEquals(10, a.getLineNumber()); assertEquals(11, b.getLineNumber()); assertEquals(12, c.getLineNumber()); assertEquals(13, d.getLineNumber()); assertEquals(14, e.getLineNumber()); assertEquals(15, f.getLineNumber()); } public void testGetNumbers() { assertEquals(1, a.getBranchCoverageRate(), 0); assertEquals(0, a.getLineCoverageRate(), 0); assertEquals(0, a.getNumberOfCoveredLines()); assertEquals(0, a.getNumberOfCoveredBranches()); assertEquals(0, a.getNumberOfValidBranches()); assertEquals(1, a.getNumberOfValidLines()); a.addJump(0); a.addJump(1); assertEquals(0, a.getBranchCoverageRate(), 0); assertEquals(0, a.getLineCoverageRate(), 0); assertEquals(0, a.getNumberOfCoveredLines()); assertEquals(0, a.getNumberOfCoveredBranches()); assertEquals(4, a.getNumberOfValidBranches()); assertEquals(1, a.getNumberOfValidLines()); for (int i = 0; i < 5; i++) { a.touch(1); assertEquals(0, a.getBranchCoverageRate(), 0); assertEquals(1, a.getLineCoverageRate(), 0); assertEquals(1, a.getNumberOfCoveredLines()); assertEquals(0, a.getNumberOfCoveredBranches()); assertEquals(4, a.getNumberOfValidBranches()); assertEquals(1, a.getNumberOfValidLines()); } a.touchJump(0, true,1); assertEquals(0.25, a.getBranchCoverageRate(), 0); assertEquals(1, a.getLineCoverageRate(), 0); assertEquals(1, a.getNumberOfCoveredLines()); assertEquals(1, a.getNumberOfCoveredBranches()); assertEquals(4, a.getNumberOfValidBranches()); assertEquals(1, a.getNumberOfValidLines()); a.touchJump(1, false,1); assertEquals(0.5, a.getBranchCoverageRate(), 0); assertEquals(1, a.getLineCoverageRate(), 0); assertEquals(1, a.getNumberOfCoveredLines()); assertEquals(2, a.getNumberOfCoveredBranches()); assertEquals(4, a.getNumberOfValidBranches()); assertEquals(1, a.getNumberOfValidLines()); a.touchJump(1, true,1); assertEquals(0.75, a.getBranchCoverageRate(), 0); assertEquals(1, a.getLineCoverageRate(), 0); assertEquals(1, a.getNumberOfCoveredLines()); assertEquals(3, a.getNumberOfCoveredBranches()); assertEquals(4, a.getNumberOfValidBranches()); assertEquals(1, a.getNumberOfValidLines()); a.touchJump(0, false,1); assertEquals(1, a.getBranchCoverageRate(), 0); assertEquals(1, a.getLineCoverageRate(), 0); assertEquals(1, a.getNumberOfCoveredLines()); assertEquals(4, a.getNumberOfCoveredBranches()); assertEquals(4, a.getNumberOfValidBranches()); assertEquals(1, a.getNumberOfValidLines()); } public void testSetConditional() { assertFalse(c.hasBranch()); c.addJump(0); assertTrue(c.hasBranch()); c.addJump(1); assertTrue(c.hasBranch()); } public void testSetMethodNameAndDescriptor() { e.setMethodNameAndDescriptor("test3", "(I)B"); assertEquals("test3", e.getMethodName()); assertEquals("(I)B", e.getMethodDescriptor()); f.setMethodNameAndDescriptor("test4", "(I)B"); assertEquals("test4", f.getMethodName()); assertEquals("(I)B", f.getMethodDescriptor()); } public void testTouch() { assertEquals(0, a.getHits()); for (int i = 0; i < 400; i++) a.touch(2); assertEquals(800, a.getHits()); } private static void getSwitchDataIteratively(LineData data) { /* * When this test fails, it usually does so well before 2000 iterations. If it * gets past 2000, it will usually pass, so there is not much need in going much * past 2000. */ for (int i=0; i<2000; i++) { /* * The following yield is needed to make sure the other thread gets * some CPU. Otherwise, this thread will get too much of a jump ahead * of the other thread. */ Thread.yield(); data.getSwitchData(i, new SwitchData(1)); } } private void runGetSwitchDataTestWithTwoThreads() throws Throwable { final LineData data = new LineData(2); final AtomicReference possibleThrowable = new AtomicReference(); ThreadGroup threadGroup = new ThreadGroup("TestThreadGroup") { public void uncaughtException(Thread thread, Throwable t) { /* * Save the Throwable for later use and interrupt this thread so it exits */ possibleThrowable.set(t); thread.interrupt(); } }; /* * Create two threads using the above thread group */ Thread thread1 = new Thread(threadGroup, "1") { public void run() { getSwitchDataIteratively(data); } }; Thread thread2 = new Thread(threadGroup, "2") { public void run() { getSwitchDataIteratively(data); } }; thread1.start(); thread2.start(); /* * Wait for the threads to exit */ if (thread1.isAlive()) thread1.join(); if (thread2.isAlive()) thread2.join(); Throwable t = possibleThrowable.get(); if (t != null) { throw t; } } public void testMultiThreadedGetSwitchData() throws Throwable { /* * This test will often pass with only one iteration. * It passes once in a while with 10. It never passes * with 100 (I hope). */ for (int i=0; i<100; i++) { runGetSwitchDataTestWithTwoThreads(); } } private static void getJumpDataIteratively(LineData data) { /* * When this test fails, it usually does so well before 2000 iterations. If it * gets past 2000, it will usually pass, so there is not much need in going much * past 2000. */ for (int i=0; i<2000; i++) { /* * The following yield is needed to make sure the other thread gets * some CPU. Otherwise, this thread will get too much of a jump ahead * of the other thread. */ Thread.yield(); data.getJumpData(i); } } private void runGetJumpDataTestWithTwoThreads() throws Throwable { final LineData data = new LineData(2); final AtomicReference possibleThrowable = new AtomicReference(); ThreadGroup threadGroup = new ThreadGroup("TestThreadGroup") { public void uncaughtException(Thread thread, Throwable t) { /* * Save the Throwable for later use and interrupt this thread so it exits */ possibleThrowable.set(t); thread.interrupt(); } }; /* * Create two threads using the above thread group */ Thread thread1 = new Thread(threadGroup, "1") { public void run() { getJumpDataIteratively(data); } }; Thread thread2 = new Thread(threadGroup, "2") { public void run() { getJumpDataIteratively(data); } }; thread1.start(); thread2.start(); /* * Wait for the threads to exit */ if (thread1.isAlive()) thread1.join(); if (thread2.isAlive()) thread2.join(); Throwable t = possibleThrowable.get(); if (t != null) { throw t; } } public void testMultiThreadedGetJumpData() throws Throwable { /* * This test will often pass with only one iteration. * It passes once in a while with 10. It never passes * with 100 (I hope). */ for (int i=0; i<100; i++) { runGetJumpDataTestWithTwoThreads(); } } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/coveragedata/PackageDataTest.java0000644000175000017500000001472411343534515032035 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import junit.framework.TestCase; public class PackageDataTest extends TestCase { private PackageData packageData; public void setUp() { packageData = new PackageData("com.example"); assertEquals("com.example", packageData.getName()); } public void testAddClass() { ClassData classData; assertEquals(0, packageData.getNumberOfChildren()); classData = new ClassData("com.example.HelloWorld"); classData.setSourceFileName("com/example/HelloWorld.java"); for (int i = 0; i < 10; i++) classData.addLine(i, "test", "(I)B"); packageData.addClassData(classData); assertEquals(1, packageData.getNumberOfChildren()); assertTrue(packageData.contains(classData.getBaseName())); classData = new ClassData("com.example.HelloWorldHelper"); classData.setSourceFileName("com/example/HelloWorldHelper.java"); for (int i = 0; i < 14; i++) classData.addLine(i, "test", "(I)B"); packageData.addClassData(classData); assertEquals(2, packageData.getNumberOfChildren()); assertTrue(packageData.contains(classData.getBaseName())); // See what happens when we try to add the same class twice classData = new ClassData("com.example.HelloWorld"); classData.setSourceFileName("com/example/HelloWorld.java"); for (int i = 0; i < 19; i++) classData.addLine(i, "test", "(I)B"); try { packageData.addClassData(classData); // removed by Jeremy Thomerson when changing PackageData // fail("Expected an IllegalArgumentException but did not receive one!"); } catch (IllegalArgumentException e) { // Good! } assertEquals(2, packageData.getNumberOfChildren()); } public void testBranchCoverage() { assertEquals(0, packageData.getNumberOfCoveredBranches()); assertEquals(0, packageData.getNumberOfValidBranches()); assertEquals(1.00d, packageData.getBranchCoverageRate(), 0d); ClassData classData = new ClassData("com.example.HelloWorld"); classData.setSourceFileName("com/example/HelloWorld.java"); for (int i = 0; i < 10; i++) classData.addLine(i, "test", "(I)B"); packageData.addClassData(classData); assertEquals(0, packageData.getNumberOfCoveredBranches()); assertEquals(0, packageData.getNumberOfValidBranches()); assertEquals(1.00d, packageData.getBranchCoverageRate(), 0d); classData.addLineJump(1, 0); classData.addLineSwitch(1, 1, new int[] {1,5}); classData.addLineJump(2, 0); classData.addLineSwitch(3, 0, 1, 3); assertEquals(0, packageData.getNumberOfCoveredBranches()); assertEquals(12, packageData.getNumberOfValidBranches()); assertEquals(0.00d, packageData.getBranchCoverageRate(), 0d); classData.touch(1,1); classData.touchJump(1, 0, true,1); classData.touch(1,1); classData.touchJump(1, 0, false,1); classData.touchSwitch(1, 1, 0,1); classData.touch(2,1); classData.touchJump(2, 0, false,1); assertEquals(4, packageData.getNumberOfCoveredBranches()); assertEquals(12, packageData.getNumberOfValidBranches()); assertEquals(0.33d, packageData.getBranchCoverageRate(), 0.01d); } public void testConstructor() { try { new PackageData(null); fail("Expected an IllegalArgumentException but did not receive one!"); } catch (IllegalArgumentException e) { // Good! } } public void testEquals() { PackageData a = new PackageData("com.example"); PackageData b = new PackageData("com.example"); PackageData c = new PackageData("com.example"); ClassData classData1 = new ClassData("com.example.HelloWorld1"); ClassData classData2 = new ClassData("com.example.HelloWorld2"); ClassData classData3 = new ClassData("com.example.HelloWorld3"); ClassData classData4 = new ClassData("com.example.HelloWorld4"); classData1.setSourceFileName("com/example/HelloWorld1.java"); classData2.setSourceFileName("com/example/HelloWorld2.java"); classData3.setSourceFileName("com/example/HelloWorld3.java"); classData4.setSourceFileName("com/example/HelloWorld4.java"); a.addClassData(classData1); a.addClassData(classData2); a.addClassData(classData3); b.addClassData(classData1); b.addClassData(classData2); c.addClassData(classData1); c.addClassData(classData2); c.addClassData(classData4); assertFalse(a.equals(null)); assertFalse(a.equals(classData1)); assertTrue(a.equals(a)); assertFalse(a.equals(b)); assertFalse(a.equals(c)); assertFalse(b.equals(a)); assertTrue(b.equals(b)); assertFalse(b.equals(c)); assertFalse(c.equals(a)); assertFalse(c.equals(b)); assertTrue(c.equals(c)); b.addClassData(classData3); assertTrue(a.equals(b)); assertTrue(b.equals(a)); assertFalse(a.equals(c)); assertFalse(c.equals(a)); } public void testHashCode() { PackageData a = new PackageData("com.example"); PackageData b = new PackageData("com.example"); ClassData classData1 = new ClassData("com.example.HelloWorld1"); ClassData classData2 = new ClassData("com.example.HelloWorld2"); ClassData classData3 = new ClassData("com.example.HelloWorld3"); classData1.setSourceFileName("com/example/HelloWorld1.java"); classData2.setSourceFileName("com/example/HelloWorld2.java"); classData3.setSourceFileName("com/example/HelloWorld3.java"); a.addClassData(classData1); a.addClassData(classData2); a.addClassData(classData3); b.addClassData(classData1); b.addClassData(classData2); assertEquals(a.hashCode(), a.hashCode()); assertEquals(b.hashCode(), b.hashCode()); b.addClassData(classData3); assertEquals(a.hashCode(), b.hashCode()); assertEquals(b.hashCode(), b.hashCode()); } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/coveragedata/JumpDataTest.java0000644000175000017500000000473711343534522031416 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import junit.framework.TestCase; public class JumpDataTest extends TestCase { private final JumpData a = new JumpData(0); private final JumpData b = new JumpData(1); public void testEquals() { assertFalse(a.equals(null)); assertFalse(a.equals(new Integer(4))); assertTrue(a.equals(a)); assertFalse(a.equals(b)); JumpData aPrime = new JumpData(0); assertTrue(a.equals(aPrime)); } public void testHashCode() { assertEquals(a.hashCode(), a.hashCode()); JumpData aPrime = new JumpData(0); assertEquals(a.hashCode(), aPrime.hashCode()); } public void testGetBranchNumber() { assertEquals(0, a.getConditionNumber()); assertEquals(1, b.getConditionNumber()); } public void testGetNumbers() { assertEquals(0, a.getBranchCoverageRate(), 0); assertEquals(2, a.getNumberOfValidBranches()); assertEquals(0, a.getNumberOfCoveredBranches()); for (int i = 0; i < 5; i++) { a.touchBranch(true,1); assertEquals(0.5, a.getBranchCoverageRate(), 0); assertEquals(2, a.getNumberOfValidBranches()); assertEquals(1, a.getNumberOfCoveredBranches()); } a.touchBranch(false,1); assertEquals(1, a.getBranchCoverageRate(), 0); assertEquals(2, a.getNumberOfValidBranches()); assertEquals(2, a.getNumberOfCoveredBranches()); } public void testTouchBranch() { assertEquals(0, a.getTrueHits()); for (int i = 0; i < 400; i++) a.touchBranch(true,1); assertEquals(400, a.getTrueHits()); assertEquals(0, a.getFalseHits()); for (int i = 0; i < 200; i++) a.touchBranch(false,1); assertEquals(200, a.getFalseHits()); } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/coveragedata/countermaps/0000755000175000017500000000000011345540725030537 5ustar twernertwerner././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/coveragedata/countermaps/AtomicCounterMapTest.javacobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/coveragedata/countermaps/AtomicCounterMap0000644000175000017500000000550111343534516033674 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2010 Piotr Tabor * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata.countermaps; import java.util.Map; import junit.framework.Assert; import org.junit.Test; public class AtomicCounterMapTest { @Test public void incrementTest(){ AtomicCounterMap map=new AtomicCounterMap(); for(int i=0; i<1000; i++){ for(int j=i; j>=0; j-- ){ map.incrementValue(j); } } Map res=map.getFinalStateAndCleanIt(); Assert.assertEquals(1000, res.size()); for(Map.Entry ii:res.entrySet()){ Assert.assertEquals(1000,ii.getKey()+ii.getValue()); } Assert.assertEquals(0, map.getFinalStateAndCleanIt().size()); for(int i=0; i<100; i++){ for(int j=i; j>=0; j-- ){ map.incrementValue(j,2); map.incrementValue(j,-1); } } res=map.getFinalStateAndCleanIt(); Assert.assertEquals(100, res.size()); for(Map.Entry ii:res.entrySet()){ Assert.assertEquals(100,ii.getKey()+ii.getValue()); } } //1.347;1.288;1.729;1.287 - counters.putIfAbsent(key, new AtomicInteger(inc)); return ... //1.982;1.965;1.965 //1.935;1.944,1.937 - no return //1.923;1.960;1.325;1.951 - final @Test public void performanceTestInit(){ AtomicCounterMap map=new AtomicCounterMap(); for(int i=0; i<1000000; i++){ map.incrementValue(i); } } //1.349;1,760;1.363;1.780 //0.718;0.678;0,681 AtomicInteger v=counters.get(key);if(v!=null){return v.incrementAndGet();}else{v=counters.putIfAbsent(key, new AtomicInteger(1));return (v!=null)?v.incrementAndGet():1;} //0.679,0.689,0.681 - no return //0.675;0.680,0.710,0.679 - final @Test public void performanceTestOverride(){ AtomicCounterMap map=new AtomicCounterMap(); for(int i=0; i<10000000; i++){ map.incrementValue(1); } } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/util/0000755000175000017500000000000011345540725024527 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/util/StringUtilTest.java0000644000175000017500000000350311343534520030331 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Jeremy Thomerson * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; import junit.framework.TestCase; /** * @author Jeremy Thomerson */ public class StringUtilTest extends TestCase { public void testReplace() { String result; result = StringUtil.replaceAll( "cobertura is a very, very cool coverage tool", "very", "really"); assertEquals("cobertura is a really, really cool coverage tool", result); result = StringUtil.replaceAll("V", "<", "<"); result = StringUtil.replaceAll(result, ">", ">"); assertEquals(result, "<init>V"); result = StringUtil.replaceAll("V", "<", "<"); result = StringUtil.replaceAll(result, ">", ">"); assertEquals(result, "<init>V"); assertEquals(null, StringUtil.replaceAll(null, "something", "anything")); } public void testGetPercentValue() { assertEquals("99%", StringUtil.getPercentValue((double) 199/200)); } public static void main(String[] args) { new StringUtilTest().testReplace(); } }cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/util/FileFixture.java0000644000175000017500000001051211343534513027613 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 James Seigel * Copyright (C) 2005 Grzegorz Lukasik * Copyright (C) 2008 John Lewis * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.util.HashMap; // Creates structre: // src0/ // com/ // example/ // Sample1.java (contains a @Deprecated annotation to make sure the complexity works with annotations) // Sample2.java // src1/ // com/ // example/ // Sample3.java // Sample4.java // src2/ // com/ // example/ // Sample5.java // Sample6.java // src3/ // com/ // example/ // Sample7.java // Sample8.java public class FileFixture { public static final String[] SOURCE_DIRECTORY_IDENTIFIER = { "src0", "src1", "src2", "src3" }; public HashMap sourceDirectories; public void setUp() throws IOException { File tempFile = File.createTempFile("temp", ".tmp"); tempFile.deleteOnExit(); sourceDirectories = new HashMap(); for( int i=0; i. */ package net.sourceforge.cobertura.util import junit.framework.TestCase import net.sourceforge.cobertura.test.util.TestUtil import net.sourceforge.cobertura.util.FileFinder public class FileFinder2Test extends TestCase { /* (non-Javadoc) * @see junit.framework.TestCase#setUp() */ void setUp() throws Exception { } public void testSearchJarsForSourceInJar() { TestUtil.withTempDir { tempDir -> def zipFile = TestUtil.createSourceArchive(tempDir) //now test the FileFinder def fileFinder = new FileFinder(); fileFinder.addSourceDirectory(zipFile.parentFile.absolutePath); def source = fileFinder.getSource(TestUtil.SIMPLE_SOURCE_PATHNAME) verifySource(source) /* * Now make sure jar files are used. Rename the zip file to be a jar file */ def jarFile = new File(zipFile.parentFile, "source.jar") assertTrue(zipFile.renameTo(jarFile)) fileFinder = new FileFinder() fileFinder.addSourceDirectory(zipFile.parentFile.absolutePath) source = fileFinder.getSource(TestUtil.SIMPLE_SOURCE_PATHNAME) verifySource(source) } } def verifySource(source) { assertNotNull(source) assertNotNull(source.inputStream) def sourceText = source.inputStream.text assertEquals(TestUtil.SOURCE_TEXT, sourceText) source.close() } public void testSearchJarsForSourceNotFound() { def fileFinder = new FileFinder(); assertNull(fileFinder.searchJarsForSource("doesnotexist")) } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/util/CommandLineBuilderTest.java0000644000175000017500000001240611343534517031732 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Grzegorz Lukasik * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; import java.io.File; import java.io.IOException; import junit.framework.TestCase; /** * @author Grzegorz Lukasik */ public class CommandLineBuilderTest extends TestCase { private String[] testArguments( String[] args) throws Exception { CommandLineBuilder builder = new CommandLineBuilder(); for( int i=0; i?,./'" }; String[] args = testArguments( options); assertEquals( options, args); } public void testEmptyOptions() throws Exception { String[] args = testArguments( new String[0]); assertEquals( new String[0], args); } public void testInvalidArguments() throws Exception { CommandLineBuilder builder = new CommandLineBuilder(); try { builder.addArg(null); fail( "NullPointerException expected"); } catch( NullPointerException ex) {} try { builder.addArg( "someArgument", null); fail( "NullPointerException expected"); } catch( NullPointerException ex) {} try { builder.addArg( null, "someValue"); fail( "NullPointerException expected"); } catch( NullPointerException ex) {} try { CommandLineBuilder.preprocessCommandLineArguments(null); fail( "NullPointerException expected"); } catch( NullPointerException ex) {} try { CommandLineBuilder.preprocessCommandLineArguments(new String[] { "Hello", null }); fail( "NullPointerException expected"); } catch( NullPointerException ex) {} try { CommandLineBuilder.preprocessCommandLineArguments(new String[] { "--commandsfile", "hello", null }); fail( "NullPointerException expected"); } catch( NullPointerException ex) {} } public void testCommandsFileOption() throws Exception { String[] args = { "Hello", "world" }; String[] result = CommandLineBuilder.preprocessCommandLineArguments( args); assertSame( args, result); try { args = new String[]{ "Hello", "--commandsfile" }; CommandLineBuilder.preprocessCommandLineArguments( args); fail( "IllegalArgumentException expected"); } catch( IllegalArgumentException ex) {} try { args = new String[]{ "Hello", "--commandsfile", "hello.cmd" }; CommandLineBuilder.preprocessCommandLineArguments( args); fail( "IO Exception expected"); } catch( IOException ex) {} } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/util/IOUtilTest.java0000644000175000017500000001257511343534517027411 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Grzegorz Lukasik * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import junit.framework.TestCase; /** * @author Grzegorz Lukasik */ public class IOUtilTest extends TestCase { private static final byte[] emptyByteArray = new byte[] {}; private static final byte[] singletonByteArray = new byte[] { 7 }; private static final byte[] smallByteArray = new byte[] { 1, 0, 2, -128, 127 }; private File createFileWithData(byte[] data) throws IOException { File file = File.createTempFile("IOUtilTest", ".txt"); file.deleteOnExit(); OutputStream src = new FileOutputStream(file); src.write(data); src.close(); return file; } public void testMoveFile() throws IOException { // Move file if destination does not exist File srcFile = createFileWithData(smallByteArray); File destFile = createFileWithData(emptyByteArray); destFile.delete(); assertTrue(!destFile.isFile()); IOUtil.moveFile(srcFile, destFile); assertTrue(destFile.isFile()); InputStream in = new FileInputStream(destFile); for (int i = 0; i < smallByteArray.length; i++) assertEquals(smallByteArray[i], (byte)in.read()); assertEquals(-1, in.read()); in.close(); // Move file if destination exists srcFile = createFileWithData(singletonByteArray); destFile = createFileWithData(smallByteArray); IOUtil.moveFile(srcFile, destFile); assertTrue(destFile.isFile()); in = new FileInputStream(destFile); for (int i = 0; i < singletonByteArray.length; i++) assertEquals(singletonByteArray[i], (byte)in.read()); assertEquals(-1, in.read()); in.close(); // Pass null values srcFile = createFileWithData(smallByteArray); try { IOUtil.moveFile(srcFile, null); fail("Expected NullPointerException"); } catch (NullPointerException ex) { } destFile = createFileWithData(smallByteArray); try { IOUtil.moveFile(null, destFile); fail("Expected NullPointerException"); } catch (NullPointerException ex) { } } public void testCopyStream() throws IOException { ByteArrayInputStream in = new ByteArrayInputStream(smallByteArray); ByteArrayOutputStream out = new ByteArrayOutputStream(); IOUtil.copyStream(in, out); assertEquals(smallByteArray, out.toByteArray()); in = new ByteArrayInputStream(singletonByteArray); out = new ByteArrayOutputStream(); IOUtil.copyStream(in, out); assertEquals(singletonByteArray, out.toByteArray()); in = new ByteArrayInputStream(emptyByteArray); out = new ByteArrayOutputStream(); IOUtil.copyStream(in, out); assertEquals(emptyByteArray, out.toByteArray()); byte[] bigArray = generateBigByteArray(); in = new ByteArrayInputStream(bigArray); out = new ByteArrayOutputStream(); IOUtil.copyStream(in, out); assertEquals(bigArray, out.toByteArray()); try { IOUtil.copyStream(null, new ByteArrayOutputStream()); fail("NullPointerException expected"); } catch (NullPointerException ex) { } try { IOUtil.copyStream(new ByteArrayInputStream(bigArray), null); fail("NullPointerException expected"); } catch (NullPointerException ex) { } } public void testFillByteArrayFromInputStream() throws IOException { byte[] out = IOUtil .createByteArrayFromInputStream(new ByteArrayInputStream( smallByteArray)); assertEquals(smallByteArray, out); out = IOUtil.createByteArrayFromInputStream(new ByteArrayInputStream( emptyByteArray)); assertEquals(emptyByteArray, out); out = IOUtil.createByteArrayFromInputStream(new ByteArrayInputStream( singletonByteArray)); assertEquals(singletonByteArray, out); byte[] bigArray = generateBigByteArray(); out = IOUtil.createByteArrayFromInputStream(new ByteArrayInputStream( bigArray)); assertEquals(bigArray, out); try { IOUtil.createByteArrayFromInputStream(null); fail("NullPointerException expected"); } catch (NullPointerException ex) { } } private void assertEquals(byte[] first, byte[] second) { assertEquals(first.length, second.length); for (int i = 0; i < first.length; i++) { assertEquals(first[i], second[i]); } } private byte[] generateBigByteArray() { byte[] bigArray = new byte[1000000]; for (int i = 0; i < bigArray.length; i++) { bigArray[i] = (byte)i; } return bigArray; } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/merge/0000755000175000017500000000000011345540725024651 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/merge/MergeTest.java0000644000175000017500000002520211343534522027410 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Grzegorz Lukasik * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.merge; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import junit.framework.TestCase; import net.sourceforge.cobertura.coveragedata.ClassData; import net.sourceforge.cobertura.coveragedata.LineData; import net.sourceforge.cobertura.coveragedata.PackageData; import net.sourceforge.cobertura.coveragedata.ProjectData; import net.sourceforge.cobertura.coveragedata.SourceFileData; /** * Tests merge feature by calling directly ProjectData.merge method. */ public class MergeTest extends TestCase { private ClassData firstClass = new ClassData("test.First"); private ClassData secondClass = new ClassData("test.Second"); private ClassData thirdClass = new ClassData("test.Third"); private ClassData firstClassB = new ClassData("test.First"); private ClassData fourthClass = new ClassData("test.me.Fourth"); private ClassData fifthClass = new ClassData("beautiful.Fourth"); private ClassData sixthClass = new ClassData("Fourth"); private ClassData seventhClass = new ClassData("Seventh"); private ProjectData greenProject = new ProjectData(); private ProjectData redProject = new ProjectData(); public void testMergePackages() { greenProject.addClassData( firstClass); greenProject.addClassData( fourthClass); redProject.addClassData( fifthClass); redProject.addClassData( sixthClass); redProject.addClassData( seventhClass); //merge with null - should not change the greenProject greenProject.merge(null); greenProject.merge( redProject); Iterator subpackages = greenProject.getSubPackages( "").iterator(); assertEquals( "", ((PackageData)subpackages.next()).getName()); assertEquals( "beautiful", ((PackageData)subpackages.next()).getName()); assertEquals( "test", ((PackageData)subpackages.next()).getName()); assertEquals( "test.me", ((PackageData)subpackages.next()).getName()); assertFalse( subpackages.hasNext()); assertEquals(5, greenProject.getClasses().size()); assertEquals(3, redProject.getClasses().size()); assertNotNull( greenProject.getClassData("test.First")); assertNotNull( greenProject.getClassData("test.me.Fourth")); assertNotNull( greenProject.getClassData("beautiful.Fourth")); assertNotNull( greenProject.getClassData("Fourth")); assertNotNull( greenProject.getClassData("Seventh")); assertNull( redProject.getClassData( "test.First")); Iterator packages = greenProject.getPackages().iterator(); PackageData first = (PackageData) packages.next(); assertEquals( "", first.getName()); assertEquals( 2, first.getNumberOfChildren()); assertNotNull( first.getChild("Fourth")); assertNotNull( first.getChild("Seventh")); PackageData beautiful = (PackageData) packages.next(); assertEquals( "beautiful", beautiful.getName()); assertEquals( 1, beautiful.getNumberOfChildren()); assertNotNull( beautiful.getChild("Fourth")); PackageData test = (PackageData) packages.next(); assertEquals( "test", test.getName()); assertEquals( 1, test.getNumberOfChildren()); assertNotNull( test.getChild("First")); assertNull( test.getChild("test/me/First.java")); assertNull( test.getChild("Fourth.java")); PackageData testMe = (PackageData) packages.next(); assertEquals( "test.me", testMe.getName()); assertEquals( 1, testMe.getNumberOfChildren()); assertNull( testMe.getChild("test/First.java")); assertNotNull( testMe.getChild("Fourth")); assertNull( testMe.getChild("Fourth.java")); assertFalse( packages.hasNext()); } public void testMergeDifferentClassData() { greenProject.addClassData( firstClass); redProject.addClassData( secondClass); redProject.addClassData( thirdClass); greenProject.merge( redProject); assertEquals( 1, greenProject.getNumberOfChildren()); assertEquals( 3, greenProject.getClasses().size()); assertNotNull( greenProject.getClassData("test.First")); assertNotNull( greenProject.getClassData("test.Second")); assertNotNull( greenProject.getClassData("test.Third")); assertNull( redProject.getClassData("test.First")); assertNotNull( redProject.getClassData("test.Second")); assertNotNull( redProject.getClassData("test.Third")); } public void testMergeSimillarClassData() { greenProject.addClassData( secondClass); greenProject.addClassData( thirdClass); redProject.addClassData( firstClass); redProject.addClassData( thirdClass); greenProject.merge( redProject); assertEquals( 1, greenProject.getNumberOfChildren()); assertEquals( 3, greenProject.getClasses().size()); assertNotNull( greenProject.getClassData("test.First")); assertNotNull( greenProject.getClassData("test.Second")); assertNotNull( greenProject.getClassData("test.Third")); assertNotNull( redProject.getClassData("test.First")); assertNull( redProject.getClassData("test.Second")); assertNotNull( redProject.getClassData("test.Third")); } public void testMergeDifferentLineNumbers() { firstClass.addLine( 2, "helloWorld","()V"); firstClass.addLine( 3, "helloWorld","()V"); greenProject.addClassData( firstClass); firstClassB.addLine( 1, "helloWorld","()V"); firstClassB.addLine( 5, "helloWorld","()V"); redProject.addClassData( firstClassB); greenProject.merge( redProject); ClassData cd = greenProject.getClassData("test.First"); assertNotNull( cd); assertEquals( 4, cd.getNumberOfValidLines()); assertEquals( 2, redProject.getClassData("test.First").getNumberOfValidLines()); Iterator lines = cd.getLines().iterator(); LineData line1 = (LineData) lines.next(); assertEquals( 1, line1.getLineNumber()); LineData line2 = (LineData) lines.next(); assertEquals( 2, line2.getLineNumber()); LineData line3 = (LineData) lines.next(); assertEquals( 3, line3.getLineNumber()); LineData line5 = (LineData) lines.next(); assertEquals( 5, line5.getLineNumber()); assertFalse( lines.hasNext()); } public void testMergeSimillarLineNumbers() { firstClass.addLine( 2, "helloWorld","()V"); firstClass.touch(2,1); firstClass.touch(2,1); firstClass.addLine( 3, "helloWorld","()V"); greenProject.addClassData( firstClass); firstClassB.addLine( 2, "helloWorld","()V"); firstClassB.touch(2,1); firstClassB.touch(2,1); firstClassB.touch(2,1); firstClassB.addLine( 3, "helloWorld","()V"); firstClassB.touch(3,1); firstClassB.addLine( 7, "helloWorld","()V"); redProject.addClassData( firstClassB); greenProject.merge( redProject); ClassData cd = greenProject.getClassData("test.First"); assertNotNull( cd); assertEquals( 3, cd.getNumberOfValidLines()); assertEquals( 3, redProject.getClassData("test.First").getNumberOfValidLines()); Iterator lines = cd.getLines().iterator(); LineData line2 = (LineData) lines.next(); assertEquals( 2, line2.getLineNumber()); assertEquals( 5, line2.getHits()); LineData line3 = (LineData) lines.next(); assertEquals( 3, line3.getLineNumber()); assertEquals( 1, line3.getHits()); LineData line7 = (LineData) lines.next(); assertEquals( 7, line7.getLineNumber()); assertEquals( 0, line7.getHits()); assertFalse( lines.hasNext()); } public void testMergeBranches() { firstClass.addLine( 1, "helloWorld","()V"); firstClass.addLineJump(1, 0); firstClass.addLine( 2, "helloWorld","()V"); firstClass.addLineJump(2, 0); firstClass.addLineJump(2, 1); firstClass.addLine( 3, "helloWorld","()V"); firstClass.addLine( 4, "helloWorld","()V"); firstClass.addLineSwitch(4, 0, 0, 2); firstClass.addLine( 5, "helloWorld","()V"); firstClass.addLine( 8, "helloWorld","()V"); greenProject.addClassData( firstClass); firstClassB.addLine( 1, "helloWorld","()V"); firstClassB.addLineJump(1, 0); firstClassB.addLine( 2, "helloWorld","()V"); firstClassB.addLine( 3, "helloWorld","()V"); firstClassB.addLineSwitch(3, 0, 2, 4); firstClassB.addLine( 6, "helloWorld","()V"); firstClassB.addLineJump(6, 0); firstClassB.addLine( 7, "helloWorld","()V"); firstClassB.addLine( 8, "helloWorld","()V"); redProject.addClassData( firstClassB); greenProject.merge( redProject); ClassData cd = greenProject.getClassData("test.First"); Iterator lines = cd.getLines().iterator(); LineData line1 = (LineData) lines.next(); assertTrue( line1.hasBranch()); LineData line2 = (LineData) lines.next(); assertTrue( line2.hasBranch()); LineData line3 = (LineData) lines.next(); assertTrue( line3.hasBranch()); LineData line4 = (LineData) lines.next(); assertTrue( line4.hasBranch()); LineData line5 = (LineData) lines.next(); assertFalse( line5.hasBranch()); LineData line6 = (LineData) lines.next(); assertTrue( line6.hasBranch()); LineData line7 = (LineData) lines.next(); assertFalse( line7.hasBranch()); LineData line8 = (LineData) lines.next(); assertFalse( line8.hasBranch()); assertFalse( lines.hasNext()); } public void testMergeSourceFiles() { greenProject.addClassData( secondClass); greenProject.addClassData( fourthClass); redProject.addClassData( firstClass); redProject.addClassData( fifthClass); redProject.addClassData( seventhClass); greenProject.merge( redProject); Collection sources = greenProject.getSourceFiles(); assertEquals( 5, sources.size()); Set sourceNames = new HashSet(); Iterator it = sources.iterator(); while( it.hasNext()) sourceNames.add( ((SourceFileData)it.next()).getName()); assertTrue( sourceNames.contains("test/First.java")); assertTrue( sourceNames.contains("test/Second.java")); assertTrue( sourceNames.contains("test/me/Fourth.java")); assertTrue( sourceNames.contains("beautiful/Fourth.java")); assertTrue( sourceNames.contains("Seventh.java")); } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/merge/MergeMainTest.java0000644000175000017500000001250311343534517030221 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Grzegorz Lukasik * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.merge; import java.util.List; import java.io.File; import java.io.IOException; import java.util.ArrayList; import junit.framework.TestCase; import net.sourceforge.cobertura.coveragedata.ClassData; import net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler; import net.sourceforge.cobertura.coveragedata.ProjectData; /** * Tests merging feature by launching Main class. */ public class MergeMainTest extends TestCase { private ClassData firstClass = new ClassData("test.First"); private ClassData secondClass = new ClassData("test.Second"); private ClassData seventhClass = new ClassData("Seventh"); private ProjectData greenProject = new ProjectData(); private ProjectData redProject = new ProjectData(); private ProjectData blueProject = new ProjectData(); private List filesToRemove = new ArrayList(); private File createTempSerFile() throws IOException { File result = File.createTempFile( "cobertura", ".ser"); result.delete(); filesToRemove.add(result); return result; } protected void tearDown() throws Exception { for( int i=0; i. */ package net.sourceforge.cobertura.thread.test import net.sourceforge.cobertura.test.util.TestUtil import org.junit.Before import org.junit.Test import static org.junit.Assert.* public class ThreadedFunctionalTest { /* * This tests the thread safety of Cobertura. * * Multiple threads are kicked off that will execute the same switch or * if statement. The switch statement would like like this: * * switch(counter) * { * case 0: counter++; break; * case 1: counter++; break; * etc. * default: counter = 0; * } * The if statement looks like this: * if (counter==0||counter==1||counter==2 ... ) * { * counter++; * } * * Notice that the counter is incremented so the cases or conditionals are * hit in order with each call. * * Multiple threads will process the switch or if statement at the same time. * Since the case and conditional information is handled with arrays that grow * dynamically larger as each case or conditional is hit, you will get index * out of bounds exceptions if Cobertura is not thread safe. One thread * will increase the array while another is trying to do the same. Only one * thread's change is saved, and the other thread is likely to throw an * out of bounds exception. */ def ant = TestUtil.getCoberturaAntBuilder(TestUtil.getCoberturaClassDir()) static numberOfCalls = 300 //this number can't be too high or you will get a stack overflow (due to the inject below) static numberOfThreads = 2 static numberOfRetries = 10 def branchOrSwitchCode /* * A big switch statement with number of cases equal to numberOfCalls: * * switch(counter) * { * case 0: counter++; break; * case 1: counter++; break; * etc. * default: counter = 0; * } */ static SWITCH_CODE = """ switch(counter) { ${(0..numberOfCalls).inject('') { cases, num -> "${cases}\ncase ${num}: counter++; break;"}} default: counter = 0; } """ /* * A big if statement with number of conditionals equal to numberOfCalls: * * if (counter==0||counter==1||counter==2 ... ) * { * counter++; * } */ static IF_STATEMENT_CODE = """ if (${(1..numberOfCalls).inject('counter==0') { conditionals, num -> "${conditionals}||counter==${num}"}}) { counter++; } """ def getThreadedCode(branchOrSwitchCode) { /* * This code will kick off a number of threads equal to numberOfThreads. * Each thread will do a number of calls equal to numberOfCalls. * Each call will be a call to the method acall(). The body of this * method is passed in as branchOrSwithcCode and is either a switch * statement with a large number of cases or an if statement with * a large number of conditionals. */ return """ package mypackage; import java.util.ArrayList; class MyThreads extends Thread { int counter = 0; void acall() { ${branchOrSwitchCode} } public void run() { try { for (int i=0; i<${numberOfCalls}; i++) { yield(); acall(); } } catch (Throwable t) { t.printStackTrace(); System.exit(1); } } public static void main(String[] args) { ArrayList threads = new ArrayList(); for (int i=0; i<${numberOfThreads}; i++) { threads.add(new MyThreads()); } for (int i=0; i<${numberOfThreads}; i++) { ((Thread) threads.get(i)).start(); } } } """ } @Before void setUp() { } @Test void simpleThreadTest() { ant.echo(message:"Running threaded test with switch statement.") runTest(SWITCH_CODE) } @Test void simpleThreadTestWithIfStatement() { ant.echo(message:"Running threaded test with if statement.") runTest(IF_STATEMENT_CODE) } private void runTest(code) { /* * Use a temporary directory and create a MyThreads.java source file * that creates multiple threads which do repetitive calls into * a method. The method contains either a switch with a large number * of cases or an if statement with a large number of conditionals depending * on the code passed into this method. */ TestUtil.withTempDir { tempDir -> def srcDir = new File(tempDir, "src") def sourceFile = new File(srcDir, "mypackage/MyThreads.java") def datafile = new File(srcDir, "cobertura.ser") sourceFile.parentFile.mkdirs() sourceFile.write(getThreadedCode(code)) compileSource(srcDir) instrumentClasses(srcDir, datafile) /* * This test does not seem to fail all the time, so we will need to try several times. */ numberOfRetries.times { index -> ant.echo(message:"Try $index") ant.java(classname:'mypackage.MyThreads', dir:srcDir, fork:true, failonerror:true) { classpath { dirset(dir:srcDir) fileset(dir:'antLibrary/common/groovy') { include(name:'*.jar') } dirset(dir:TestUtil.getCoberturaClassDir()) } } } ant.'cobertura-report'(datafile:datafile, format:'xml', destdir:srcDir) def dom = TestUtil.getXMLReportDOM("${srcDir}/coverage.xml") def hitCount = TestUtil.getHitCount(dom, 'mypackage.MyThreads', 'acall') assertEquals("hit count incorrect", numberOfRetries * numberOfThreads * numberOfCalls, hitCount) } } def compileSource(srcDir) { ant.groovyc(srcdir:srcDir, destDir:srcDir) { javac(debug:'true') } } def instrumentClasses(srcDir, datafile) { ant.'cobertura-instrument'(datafile:datafile) { includeClasses(regex:'mypackage.*') fileset(dir:srcDir) { include(name:'**/*.class') } } } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/thread/test/MultipleClassloaderFunctionalTest.groovycobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/thread/test/MultipleClassloaderFunctional0000644000175000017500000001715311343534521033720 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2009 John Lewis * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.thread.test import net.sourceforge.cobertura.test.util.TestUtil import org.junit.Before import org.junit.Test import static org.junit.Assert.* public class MultipleClassloaderFunctionalTest { /* * This tests the case where there are multiple classloaders that each * load the Cobertura classes. Cobertura uses static fields to * hold the data. When there are multiple classloaders, each classloader * will keep track of the line counts for the classes that it loads. * * The static initializers for the Cobertura classes are also called for * each classloader. So, there is one shutdown hook for each classloader. * So, when the JVM exits, each shutdown hook will try to write the * data it has kept to the datafile. They will do this at the same * time. Before Java 6, this seemed to work fine, but with Java 6, there * seems to have been a change with how file locks are implemented. So, * care has to be taken to make sure only one thread locks a file at a time. * */ def ant = TestUtil.getCoberturaAntBuilder(TestUtil.getCoberturaClassDir()) private static CALLED_CODE = """ package mypackage; public class Called { public static void callThis() { } } """ @Before void setUp() { } @Test void multipleClassloadersTest() { ant.echo(message:"Running multiple classloader test.") runTest() } /* * This code creates a Java class that has a main method that will create two * classloaders. Each classloader will then load the mypackage.Called class * defined above. Then, the mypackage.Called.callThis() method is called once. */ def getMainCode(instrumentDir) { return """ package mypackage; import java.net.URLClassLoader; import java.net.URL; import java.io.File; import java.lang.reflect.Method; public class Main { public static void main(String[] args) throws Throwable { createClassloaderAndCallMethod(); createClassloaderAndCallMethod(); } /* * Create a classloader that loads the instrumented code and the cobertura classes. * Then, call the mypackage.Called.callThis() static method. */ public static void createClassloaderAndCallMethod() throws Throwable { File instrumentDir = new File("${instrumentDir.absolutePath.replace('\\', '\\\\')}"); File coberturaClassDir = new File("${TestUtil.getCoberturaClassDir().absolutePath.replace('\\', '\\\\')}"); /* * Create a classloader with a null parent classloader to ensure that this * classloader loads the Cobertura classes itself. */ URLClassLoader loader = new URLClassLoader( new URL[] {instrumentDir.toURL(), coberturaClassDir.toURL()}, null); // use reflection to call mypackage.Called.callThis() once. Class calledClass = loader.loadClass("mypackage.Called"); Method method = calledClass.getMethod("callThis", null); method.invoke(null, null); } } """ } private void runTest() { /* * Use a temporary directory and create a Main.java source file * that creates multiple classloaders. Also, create a Called.java * file that defines the mypackage.Called.callThis() method that * will be called by mypackage.Main.main(). */ TestUtil.withTempDir { tempDir -> def srcDir = new File(tempDir, "src") def instrumentDir = new File(tempDir, "instrument") def mainSourceFile = new File(srcDir, "mypackage/Main.java") def datafile = new File(srcDir, "cobertura.ser") mainSourceFile.parentFile.mkdirs() mainSourceFile.write(getMainCode(instrumentDir)) def calledSourceFile = new File(srcDir, "mypackage/Called.java") calledSourceFile.write(CALLED_CODE) compileSource(srcDir) instrumentClasses(srcDir, datafile, instrumentDir) /* * Kick off the Main class. I'll use the non-instrumented classes, but * I think you could use the instrumented ones as well. */ ant.java(classname:'mypackage.Main', dir:srcDir, fork:true, failonerror:true) { classpath { dirset(dir:srcDir) } } /* * Now create a cobertura xml file and make sure the correct counts are in it. */ ant.'cobertura-report'(datafile:datafile, format:'xml', destdir:srcDir) def dom = TestUtil.getXMLReportDOM("${srcDir}/coverage.xml") def lines = TestUtil.getLineCounts(dom, 'mypackage.Called', 'callThis') // the callThis() method is empty, so the only line is the ending brace. assertEquals(1, lines.size()) lines.each { // The callThis() method is called once for each classloader. // There are 2 classloaders. assertEquals("hit count incorrect", 2, it.hits) } } } def compileSource(srcDir) { ant.groovyc(srcdir:srcDir, destDir:srcDir) { javac(debug:'true') } } def instrumentClasses(srcDir, datafile, todir) { ant.'cobertura-instrument'(datafile:datafile, todir:todir) { includeClasses(regex:'mypackage.*') fileset(dir:srcDir) { include(name:'**/*.class') } } } } cobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/webapp/0000755000175000017500000000000011343534520025022 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/webapp/test/0000755000175000017500000000000011345540725026007 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/test/net/sourceforge/cobertura/webapp/test/WebAppFunctionalTest.groovy0000644000175000017500000002520211343534521033313 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2009 John Lewis * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.webapp.test import net.sourceforge.cobertura.test.util.TestUtil import net.sourceforge.cobertura.test.util.WebappServer import org.junit.Before import org.junit.Test import static org.junit.Assert.* public class WebAppFunctionalTest { /* * For the next two constants, it would be preferable to use saveGlobalProjectData * in class net.sourceforge.cobertura.coveragedata.ProjectData, but ProjectData is * not instrumented since it extends HasBeenInstrumented. So, the best we can * do is make sure the doGet method in FlushCoberturaServlet is called. */ private static final SAVE_DATA_CLASSNAME = "net.sourceforge.cobertura.webapp.FlushCoberturaServlet" private static final SAVE_DATA_METHOD_NAME = "doGet" private static final boolean TOMCAT = true def ant = TestUtil.antBuilder @Before void setUp() { } @Test void basicStartAndStopOfWebApp() { basicStartAndStopOfWebApp(!TOMCAT) } @Test void basicStartAndStopOfWebAppInTomcat() { basicStartAndStopOfWebApp(TOMCAT) } void basicStartAndStopOfWebApp(tomcat) { TestUtil.withTempDir { tempDir -> def webappServerDir = new File(tempDir, "webserver") def srcDir = new File(tempDir, "src") WebappServer.writeSimpleServletSource(srcDir) def appName = "simple" def webappServer = new WebappServer(dir:webappServerDir, tomcat:tomcat) webappServer.deployApp( webInfText:WebappServer.SIMPLE_SERVLET_WEB_XML_TEXT, srcDir:srcDir, appName:appName, instrumentRegEx:'com.acme.*') def data = webappServer.withRunningServer { data -> //do a HTTP get so the doGet method will be hit def webappResponse = (new java.net.URL("http://${data.hostname}:${data.webappPort}/${appName}/SimpleServlet")).text assertEquals("Webapp response was incorrect", "Hi", webappResponse.trim()) data.coberturaAnt.'cobertura-report'(datafile:data.datafile, format:'xml', destdir:data.xmlReport.getParent()) def dom = TestUtil.getXMLReportDOM(data.xmlReport) //make sure the report shows the doGet method has not been hit yet - the data is not flushed until the server stops assertFalse(TestUtil.isMethodHit(dom, "doGet")) } //now that the server has stopped, make sure the report shows it has been hit assertTrue("doGet has hits=0 in cobertura report", TestUtil.isMethodHit(data.dom, "doGet")) } } @Test void flushCoberturaData() { TestUtil.withTempDir { tempDir -> def webappServerDir = new File(tempDir, "webserver") def srcDir = new File(tempDir, "src") WebappServer.writeSimpleServletSource(srcDir) def appName = "simple" def webappServer = new WebappServer(dir:webappServerDir) webappServer.deployApp( webInfText:WebappServer.SIMPLE_SERVLET_WEB_XML_TEXT, srcDir:srcDir, appName:appName, instrumentCobertura:true, deployCoberturaFlush:true, modifyMainCoberturaDataFile:true) def data = webappServer.withRunningServer { data -> /* * do a HTTP get of the simple webapp - this is just to get somewhat close to a * real world scenario */ def webappResponse = (new java.net.URL("http://${data.hostname}:${data.webappPort}/${appName}/SimpleServlet")).text assertEquals("Webapp response was incorrect", "Hi", webappResponse.trim()) //Do a coverage report of the main cobertura.ser file at the root of the project data.coberturaAnt.'cobertura-report'(datafile:data.datafile, format:'xml', destdir:data.xmlReport.getParent()) def dom = TestUtil.getXMLReportDOM(data.xmlReport) def hitCountBefore = TestUtil.getHitCount(dom, SAVE_DATA_CLASSNAME, SAVE_DATA_METHOD_NAME) //flush the cobertura data by doing an HTTP get data.flushCobertura() //run the report again data.coberturaAnt.'cobertura-report'(datafile:data.datafile, format:'xml', destdir:data.xmlReport.getParent()) dom = TestUtil.getXMLReportDOM(data.xmlReport) def hitCountAfter = TestUtil.getHitCount(dom, SAVE_DATA_CLASSNAME, SAVE_DATA_METHOD_NAME) assertEquals("hit count should have increased by one", hitCountBefore + 1, hitCountAfter) } } } @Test void flushCoberturaData2() { TestUtil.withTempDir { tempDir -> def webappServerDir = new File(tempDir, "webserver") def srcDir = new File(tempDir, "src") WebappServer.writeSimpleServletSource(srcDir) def appName = "simple" def webappServer = new WebappServer(dir:webappServerDir) webappServer.deployApp( webInfText:WebappServer.SIMPLE_SERVLET_WEB_XML_TEXT, srcDir:srcDir, appName:appName, deployCoberturaFlush:true, instrumentRegEx:'com.acme.*') def data = webappServer.withRunningServer { data -> /* * do a HTTP get of the simple webapp */ def webappResponse = (new java.net.URL("http://${data.hostname}:${data.webappPort}/${appName}/SimpleServlet")).text assertEquals("Webapp response was incorrect", "Hi", webappResponse.trim()) //Do a coverage report of the main cobertura.ser file at the root of the project data.coberturaAnt.'cobertura-report'(datafile:data.datafile, format:'xml', destdir:data.xmlReport.getParent()) def dom = TestUtil.getXMLReportDOM(data.xmlReport) def hitCountBefore = TestUtil.getHitCount(dom, WebappServer.SIMPLE_SERVLET_CLASSNAME, "doGet") assertEquals(0, hitCountBefore) //flush the cobertura data by doing an HTTP get data.flushCobertura() //run the report again data.coberturaAnt.'cobertura-report'(datafile:data.datafile, format:'xml', destdir:data.xmlReport.getParent()) dom = TestUtil.getXMLReportDOM(data.xmlReport) def hitCountAfter = TestUtil.getHitCount(dom, WebappServer.SIMPLE_SERVLET_CLASSNAME, "doGet") assertEquals(1, hitCountAfter) } //run the report again data.coberturaAnt.'cobertura-report'(datafile:data.datafile, format:'xml', destdir:data.xmlReport.getParent()) def dom = TestUtil.getXMLReportDOM(data.xmlReport) def finalCount = TestUtil.getHitCount(dom, WebappServer.SIMPLE_SERVLET_CLASSNAME, "doGet") assertEquals(1, finalCount) } } @Test void flushCoberturaDataOnly() { /* * Test case where a flush is done before any instrumented code is executed. */ TestUtil.withTempDir { tempDir -> def webappServerDir = new File(tempDir, "webserver") def srcDir = new File(tempDir, "src") WebappServer.writeSimpleServletSource(srcDir) def appName = "simple" def webappServer = new WebappServer(dir:webappServerDir) webappServer.deployApp( webInfText:WebappServer.SIMPLE_SERVLET_WEB_XML_TEXT, srcDir:srcDir, appName:appName, deployCoberturaFlush:true, instrumentRegEx:'com.acme.*') def data = webappServer.withRunningServer { data -> //Do a coverage report of the main cobertura.ser file at the root of the project data.coberturaAnt.'cobertura-report'(datafile:data.datafile, format:'xml', destdir:data.xmlReport.getParent()) def dom = TestUtil.getXMLReportDOM(data.xmlReport) def hitCountBefore = TestUtil.getHitCount(dom, WebappServer.SIMPLE_SERVLET_CLASSNAME, "doGet") assertEquals(0, hitCountBefore) //flush the cobertura data by doing an HTTP get data.flushCobertura() //run the report again data.coberturaAnt.'cobertura-report'(datafile:data.datafile, format:'xml', destdir:data.xmlReport.getParent()) dom = TestUtil.getXMLReportDOM(data.xmlReport) def hitCountAfter = TestUtil.getHitCount(dom, WebappServer.SIMPLE_SERVLET_CLASSNAME, "doGet") assertEquals(0, hitCountAfter) } //run the report again data.coberturaAnt.'cobertura-report'(datafile:data.datafile, format:'xml', destdir:data.xmlReport.getParent()) def dom = TestUtil.getXMLReportDOM(data.xmlReport) def finalCount = TestUtil.getHitCount(dom, WebappServer.SIMPLE_SERVLET_CLASSNAME, "doGet") assertEquals(0, finalCount) } } } cobertura-1.9.4.1+dfsg.orig/test/SomeOtherClassTest.java0000644000175000017500000000244611343534517023057 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Jeremy Thomerson * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ import someotherpackage.SomeOtherClass; import junit.framework.TestCase; public class SomeOtherClassTest extends TestCase { public void testFoo() { SomeOtherClass obj = new SomeOtherClass(); obj.incrementCounter(); obj.incrementCounter(); obj.incrementCounter(); obj.decrementCounter(); obj.decrementCounter(); obj.decrementCounter(); obj.decrementCounter(); obj.getCounter(); assertNotNull(obj); // obviously a no-op assertion } } cobertura-1.9.4.1+dfsg.orig/test/HelloWorld.java0000644000175000017500000000377611343534517021406 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /** * This class is used by the JUnit test for instrumenting * a class. This is just a basic class where we can check * that the number of lines and branches is correct. * * If you change this file you'll need to update the line * numbers referenced in net.sourceforge.cobertura.instrument.InstrumentTest */ public class HelloWorld { private final static String inEnglish = "Hello, world!"; private final static String enEspanol = "¡Hola, mundo!"; private String useThisOne; private int iterations; public HelloWorld(boolean useSpanish, int iterations) { if (useSpanish) useThisOne = enEspanol; else useThisOne = inEnglish; try { this.iterations = iterations; } catch (Exception e) { iterations = 1; } } public void sayHello() { for (int i = 0; i < iterations; i++) { System.out.println(useThisOne); } switch (iterations) { case 0: System.out .println("Why don't you want to greet the world?!?"); default: System.out.println("Hello to you too, bub."); } } public static void main(String[] args) { HelloWorld helloWorld = new HelloWorld(false, 3); helloWorld.sayHello(); } }cobertura-1.9.4.1+dfsg.orig/test/log4j.xml0000644000175000017500000000065311343534514020215 0ustar twernertwerner cobertura-1.9.4.1+dfsg.orig/test/test/0000755000175000017500000000000011343534522017426 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/etc/0000755000175000017500000000000011345540725016247 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/etc/dtds/0000755000175000017500000000000011345540725017205 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/etc/plugin.properties0000644000175000017500000000007611343534520021660 0ustar twernertwernerpluginName=cobertura providerName=cobertura.sourceforge.net cobertura-1.9.4.1+dfsg.orig/etc/tasks.properties0000644000175000017500000000036011343534514021506 0ustar twernertwernercobertura-instrument=net.sourceforge.cobertura.ant.InstrumentTask cobertura-merge=net.sourceforge.cobertura.ant.MergeTask cobertura-report=net.sourceforge.cobertura.ant.ReportTask cobertura-check=net.sourceforge.cobertura.ant.CheckTask cobertura-1.9.4.1+dfsg.orig/etc/jalopy.xml0000644000175000017500000003511111343534521020263 0ustar twernertwerner 13 false [A-Z][a-zA-Z0-9]+ [A-Z][a-zA-Z0-9]+ [a-z][\w]+ [a-z][\w]+ [a-zA-Z][\w]+ [a-z][\w]+ [a-z][\w]+ [a-zA-Z][\w]+ [a-z][\w]+ [a-z][\w]+ [a-zA-Z][\w]+ [a-z][\w]+ [a-z][\w]+ [a-zA-Z][\w]+ [A-Z][a-zA-Z0-9]+ \w+ [a-z][\w]+ [a-z][\w]+ [a-z][\w]+ [a-z][\w]+ [a-z][\w]+ [a-z][\w]+ [a-z][\w]+ [a-z][\w]+ [a-z][\w]+ [a-z][\w]+ [a-z][\w]+ [a-z][\w]+ [a-z]+(?:\.[a-z]+)* [a-z][\w]+ [a-z][\w]+ [a-z][\w]* false false false false false false false false false false false false false false false false false false 6 30000 30000 30000 30000 30000 30000 true 1 false false false false false bak 0 1 0 1 0
1
0
1 1 1 1
1 0 1 1 1 1 1 1
0
0
3
false false true true false true true false false false false false false true true false false true true false 0 0 0 0 false */ * @throws $exceptionType$ DOCUMENT ME! * @param $paramType$ DOCUMENT ME! * @return DOCUMENT ME! /**| * DOCUMENT ME! false false false - false false Inner Classes Constructors Instance fields Instance initializers Inner Interfaces Methods Static fields/initializers
0 false
0 false
disabled 2 *:0|gnu:2|java:2|javax:2 disabled true true true true false false 1 0 0 0 4 55 -1 4 -1 0 8 -1 1 true true false false true false true false true true false true true static|field|initializer|constructor|method|interface|class true false public|protected|private|abstract|static|final|synchronized|transient|volatile|native|strictfp true true false true false false false false false false true true false true true true true true true false false 2147483647 true false false false false false false true false false false false false false false true 78 true false false false false false false false
cobertura-1.9.4.1+dfsg.orig/etc/log4j.properties0000644000175000017500000000205611343534513021403 0ustar twernertwerner # set default logging level and appender log4j.rootCategory=WARN, console #log4j.category.net.sourceforge.cobertura=WARN, console #log4j.category.net.sourceforge.cobertura.check=DEBUG, console #log4j.category.net.sourceforge.cobertura.coverage=DEBUG, file #log4j.category.net.sourceforge.cobertura.coverage.CoverageDataFactory=INFO, file #log4j.category.net.sourceforge.cobertura.coverage.SaveInstrumentationTimer=DEBUG, file #log4j.category.net.sourceforge.cobertura.merge=DEGUG, console #log4j.category.net.sourceforge.cobertura.reporting=DEBUG, file log4j.appender.console=org.apache.log4j.ConsoleAppender log4j.appender.console.layout=org.apache.log4j.PatternLayout log4j.appender.console.layout.ConversionPattern=%-6p %M, %m%n log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.File=cobertura.log log4j.appender.file.MaxFileSize=3000KB log4j.appender.file.MaxBackupIndex=3 log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d %-2p [%t] %c{3} - %m - (%F:%L) %n cobertura-1.9.4.1+dfsg.orig/etc/plugin.xml0000644000175000017500000000155611343534515020274 0ustar twernertwerner cobertura-1.9.4.1+dfsg.orig/examples/0000755000175000017500000000000011343534514017307 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/basic/0000755000175000017500000000000011345540725020373 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/basic/build_with_specific_data_file.xml0000644000175000017500000001024111343534521027075 0ustar twernertwerner Cobertura - http://cobertura.sourceforge.net/ Copyright (C) 2003 jcoverage ltd. Copyright (C) 2005 Mark Doliner <thekingant@users.sourceforge.net> Cobertura is licensed under the GNU General Public License Cobertura comes with ABSOLUTELY NO WARRANTY cobertura-1.9.4.1+dfsg.orig/examples/basic/build.properties0000644000175000017500000000136111343534514023606 0ustar twernertwerner# The source code for the examples can be found in this directory src.dir=src # The path to cobertura.jar cobertura.dir=../.. # Classes generated by the javac compiler are deposited in this directory classes.dir=classes # Instrumented classes are deposited into this directory instrumented.dir=instrumented # All reports go into this directory reports.dir=reports # Unit test reports from JUnit are deposited into this directory reports.xml.dir=${reports.dir}/junit-xml reports.html.dir=${reports.dir}/junit-html # Coverage reports are deposited into these directories coverage.xml.dir=${reports.dir}/cobertura-xml coverage.summaryxml.dir=${reports.dir}/cobertura-summary-xml coverage.html.dir=${reports.dir}/cobertura-html cobertura-1.9.4.1+dfsg.orig/examples/basic/src/0000755000175000017500000000000011343534517021162 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/basic/src/com/0000755000175000017500000000000011343534520021732 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/basic/src/com/example/0000755000175000017500000000000011343534520023365 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/basic/src/com/example/simple/0000755000175000017500000000000011345540725024664 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/basic/src/com/example/simple/SimpleTest.java0000644000175000017500000000303511343534520027613 0ustar twernertwerner/** * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package com.example.simple; import java.util.Collection; import java.util.LinkedList; import junit.framework.TestCase; public class SimpleTest extends TestCase { final Simple simple = new Simple(); public SimpleTest(String nm) { super(nm); } public void testSquare() { assertEquals(1, simple.square(1)); assertEquals(1, simple.square(-1)); } public void testF() { assertEquals(1, simple.f(-1)); assertEquals(12, simple.f(6)); } public void testSum() { Collection c = new LinkedList(); c.add(new Integer(3)); c.add(new Integer(5)); c.add(new Integer(8)); assertEquals(16, simple.sum(c)); } }cobertura-1.9.4.1+dfsg.orig/examples/basic/src/com/example/simple/Simple.java0000644000175000017500000000413611343534521026757 0ustar twernertwerner/** * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package com.example.simple; import java.util.Collection; import java.util.Iterator; import org.apache.log4j.Logger; public class Simple { private static final Logger logger = Logger.getLogger(Simple.class); public int square(int x) { if (logger.isDebugEnabled()) { logger.debug("x: " + x); } int result = x * x; if (logger.isDebugEnabled()) { logger.debug("result: " + result); } return result; } public int f(int x) { if (logger.isDebugEnabled()) { logger.debug("x: " + x); } if (x < 0) { if (logger.isDebugEnabled()) { logger.debug("negative x"); } return square(x); } else if ((x >= 0) && (x <= 5)) { if (logger.isDebugEnabled()) { logger.debug("0<=x<=5"); } return x + 3; } else { return 2 * x; } } public int sum(Collection c) { int result = 0; for (Iterator i = c.iterator(); i.hasNext();) { int value = ((Number)i.next()).intValue(); if (logger.isDebugEnabled()) { logger.debug("value: " + value); } result += value; } if (logger.isDebugEnabled()) { logger.debug("result: " + result); } return result; } }cobertura-1.9.4.1+dfsg.orig/examples/basic/build.xml0000644000175000017500000001111611343534520022206 0ustar twernertwerner Cobertura - http://cobertura.sourceforge.net/ Copyright (C) 2003 jcoverage ltd. Copyright (C) 2005 Mark Doliner <thekingant@users.sourceforge.net> Copyright (C) 2006 Dan Godfrey Cobertura is licensed under the GNU General Public License Cobertura comes with ABSOLUTELY NO WARRANTY cobertura-1.9.4.1+dfsg.orig/examples/basic/README0000644000175000017500000000070411343534515021252 0ustar twernertwernerThis directory contains a simple example of using Cobertura to instrument an application and generate coverage reports. To run the example: ant The application and its tests will be compiled, Cobertura will instrument the application, the instrumented application will then be tested, and a Cobertura report produced in HTML and XML. The Cobertura reports can be found in: reports/cobertura-html/index.html reports/cobertura-xml/coverage.xml cobertura-1.9.4.1+dfsg.orig/examples/functionalconditiontest/0000755000175000017500000000000011345540725024263 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/functionalconditiontest/build.properties0000644000175000017500000000035411343534514027477 0ustar twernertwerner # The path to cobertura.jar cobertura.dir=../.. src.dir=src classes.dir=classes instrumented.dir=instrumented reports.dir=reports coverage.xml.dir=${reports.dir}/cobertura-xml coverage.html.dir=${reports.dir}/cobertura-html cobertura-1.9.4.1+dfsg.orig/examples/functionalconditiontest/src/0000755000175000017500000000000011343534517025052 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/functionalconditiontest/src/test/0000755000175000017500000000000011343534517026031 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/functionalconditiontest/src/test/condition/0000755000175000017500000000000011345540725030017 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/functionalconditiontest/src/test/condition/Test.java0000644000175000017500000000302211343534517031576 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2007 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package test.condition; import junit.framework.TestCase; /** * Simple class used in functional testing of branch coverage. * * @author John Lewis */ public class Test extends TestCase { public Test(String name) { super(name); } /** * Call the methods called "call" */ public void testMethod() { ConditionCalls branch = new ConditionCalls(); branch.call(7); branch.callLookupSwitch(1); branch.callTableSwitch(100); branch.callMultiCondition(3, 7, 1); branch.callMultiCondition2(7, 7, 100); } } cobertura-1.9.4.1+dfsg.orig/examples/functionalconditiontest/src/test/condition/ConditionCalls.java0000644000175000017500000000470211343534522033566 0ustar twernertwernerpackage test.condition; import org.apache.log4j.Logger; public class ConditionCalls { /* * See the note at FirstPassMethodInstrumenter.visitJumpInsn() * regarding initialization of static variables. This next static * is intended to cover that condition. */ public static String whatEver = null; private static final Logger logger = Logger.getLogger(ConditionCalls.class); public void call(int i) { if (i>=5) //set CALL_CONDITION_LINE_NUMBER to this line number { try { logger.error("whatEver"); //set CALL_IGNORE_LINE_NUMBER to this line number throw new RuntimeException(); } catch (Throwable t) { //eat it } finally { System.out.println("true"); } } else { System.out.println("false"); } } public void callLookupSwitch(int branch) { switch (branch) //set LOOKUP_SWITCH_LINE_NUMBER to this line number { case 1: System.out.println("1"); break; case 5: System.out.println("5"); break; default: System.out.println("default"); break; } } public String callTableSwitch(int branch) { int[][] multiArray; switch (branch) //set TABLE_SWITCH_LINE_NUMBER to this line number { case 0: return("0"); case 1: return("1"); case 2: return("2"); case 3: return("3"); case 4: return("4"); case 5: return("5"); case 6: return("6"); case 7: return("7"); case 8: return("8"); default: multiArray = new int[3][3]; return("" + multiArray[1][1]); } } public void callMultiCondition(int a, int b, int c) { //The c++ is to get SecondPassMethodInstrumenter.visitIincInsn called. if ((a == b) && (b >= 3) || (c++ < a)) //set MULTI_CONDITION_LINE_NUMBER to this line number { System.out.println("true"); } } public void callMultiCondition2(int a, int b, int c) { if ((a == b) && (b >= utilEcho(3)) || (c < a)) //set MULTI_CONDITION2_LINE_NUMBER to this line number { System.out.println("true"); } } int utilEcho(int number) { return number; } static { whatEver = "whatEver"; }; public static final int CALL_CONDITION_LINE_NUMBER = 17; public static final int CALL_IGNORE_LINE_NUMBER = 21; public static final int LOOKUP_SWITCH_LINE_NUMBER = 39; public static final int TABLE_SWITCH_LINE_NUMBER = 56; public static final int MULTI_CONDITION_LINE_NUMBER = 74; public static final int MULTI_CONDITION2_LINE_NUMBER = 82; } cobertura-1.9.4.1+dfsg.orig/examples/functionalconditiontest/build.xml0000644000175000017500000000636111343534521026105 0ustar twernertwerner Cobertura - http://cobertura.sourceforge.net/ Copyright (C) 2003 jcoverage ltd. Copyright (C) 2005 Mark Doliner Copyright (C) 2006 John Lewis Cobertura is licensed under the GNU General Public License Cobertura comes with ABSOLUTELY NO WARRANTY This example is only used for testing, and is not meant to be run from the command line. It requires certain classes to be on the class path to work correctly. cobertura-1.9.4.1+dfsg.orig/examples/functionalconditiontest/README0000644000175000017500000000071411343534515025143 0ustar twernertwernerThis directory contains an example of using Cobertura to instrument an application and generate coverage reports. To run the example: ant The application and its tests will be compiled, Cobertura will instrument the application, the instrumented application will then be tested, and a Cobertura report produced in HTML and XML. The Cobertura reports can be found in: reports/cobertura-html/index.html reports/cobertura-xml/coverage.xml cobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/0000755000175000017500000000000011345540725022435 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/build.properties0000644000175000017500000000035411343534521025647 0ustar twernertwerner # The path to cobertura.jar cobertura.dir=../.. src.dir=src classes.dir=classes instrumented.dir=instrumented reports.dir=reports coverage.xml.dir=${reports.dir}/cobertura-xml coverage.html.dir=${reports.dir}/cobertura-html cobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/src/0000755000175000017500000000000011343534513023220 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/src/test/0000755000175000017500000000000011343534515024201 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/src/test/second/0000755000175000017500000000000011345540725025456 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/src/test/second/A.java0000644000175000017500000000246411343534515026505 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package test.second; /** * Simple class used in functional testing. * * @author John Lewis */ public class A { public void call() { someMethod(); } public void dontCall() { someMethod(); } public static void someMethod() { String a = null; String b = null; a = b; b = a; } } cobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/src/test/second/B.java0000644000175000017500000000231611343534517026504 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package test.second; /** * Simple class used in functional testing. * * @author John Lewis */ public class B { public void call() { A.someMethod(); } public void dontCall() { A.someMethod(); } } cobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/src/test/first/0000755000175000017500000000000011345540725025332 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/src/test/first/Test.java0000644000175000017500000000273511343534517027123 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package test.first; import junit.framework.TestCase; /** * Simple class used in functional testing. * * @author John Lewis */ public class Test extends TestCase { public Test(String name) { super(name); } /** * Call the methods called "call" */ public void testMethod() { A a = new A(); a.call(); B b = new B(); b.call(); test.second.A a2 = new test.second.A(); a2.call(); test.second.B b2 = new test.second.B(); b2.call(); } } cobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/src/test/first/A.java0000644000175000017500000000265711343534513026363 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2008 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package test.first; /** * Simple class used in functional testing. * * @author John Lewis */ public class A { /* * Add an annotation to make sure complexity is calculated correctly for source with annotations */ @Deprecated public void call() { someMethod(); } public void dontCall() { someMethod(); } public static void someMethod() { String a = null; String b = null; a = b; b = a; } } cobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/src/test/first/B.java0000644000175000017500000000231511343534515026355 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package test.first; /** * Simple class used in functional testing. * * @author John Lewis */ public class B { public void call() { A.someMethod(); } public void dontCall() { A.someMethod(); } } cobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/src/test/first/RemoteListener.java0000644000175000017500000000051611343534515031136 0ustar twernertwernerpackage test.first; import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; public final class RemoteListener extends UnicastRemoteObject implements RemoteInterface { /** * */ private static final long serialVersionUID = 1L; protected RemoteListener() throws RemoteException { } } cobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/src/test/first/RemoteInterface.java0000644000175000017500000000015211343534517031247 0ustar twernertwernerpackage test.first; import java.rmi.Remote; public interface RemoteInterface extends Remote { } cobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/build.xml0000644000175000017500000002075711343534521024264 0ustar twernertwerner Cobertura - http://cobertura.sourceforge.net/ Copyright (C) 2003 jcoverage ltd. Copyright (C) 2005 Mark Doliner Copyright (C) 2006 John Lewis Cobertura is licensed under the GNU General Public License Cobertura comes with ABSOLUTELY NO WARRANTY This example is only used for testing, and is not meant to be run from the command line. It requires certain classes to be on the class path to work correctly. cobertura-1.9.4.1+dfsg.orig/examples/functionaltest1/README0000644000175000017500000000071411343534521023312 0ustar twernertwernerThis directory contains an example of using Cobertura to instrument an application and generate coverage reports. To run the example: ant The application and its tests will be compiled, Cobertura will instrument the application, the instrumented application will then be tested, and a Cobertura report produced in HTML and XML. The Cobertura reports can be found in: reports/cobertura-html/index.html reports/cobertura-xml/coverage.xml cobertura-1.9.4.1+dfsg.orig/examples/groovy/0000755000175000017500000000000011345540725020637 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/groovy/build.properties0000644000175000017500000000136411343534515024056 0ustar twernertwerner# The source code for the examples can be found in this directory src.dir=src # The path to cobertura.jar cobertura.dir=../.. # The path to groovy.jar groovy.dir=C:/groovy-1.0-jsr-05/lib # Classes generated by the javac compiler are deposited in this directory classes.dir=classes # Instrumented classes are deposited into this directory instrumented.dir=instrumented # All reports go into this directory reports.dir=reports # Unit test reports from JUnit are deposited into this directory reports.xml.dir=${reports.dir}/junit-xml reports.html.dir=${reports.dir}/junit-html # Coverage reports are deposited into these directories coverage.xml.dir=${reports.dir}/cobertura-xml coverage.html.dir=${reports.dir}/cobertura-html cobertura-1.9.4.1+dfsg.orig/examples/groovy/src/0000755000175000017500000000000011343534517021426 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/groovy/src/com/0000755000175000017500000000000011343534517022204 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/groovy/src/com/example/0000755000175000017500000000000011343534517023637 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/groovy/src/com/example/simple/0000755000175000017500000000000011345540725025130 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/examples/groovy/src/com/example/simple/SimpleTest.groovy0000644000175000017500000000264711343534517030501 0ustar twernertwerner/** * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2006 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package com.example.simple; import junit.framework.TestCase; public class SimpleTest extends TestCase { final def simple = new Simple() public SimpleTest(String nm) { super(nm) } public void testSquare() { assertEquals(1, simple.square(1)) assertEquals(1, simple.square(-1)) } public void testF() { assertEquals(1, simple.f(-1)) assertEquals(12, simple.f(6)) } public void testSum() { def c = new LinkedList() c.add(new Integer(3)) c.add(new Integer(5)) c.add(new Integer(8)) assertEquals(16, simple.sum(c)) } }cobertura-1.9.4.1+dfsg.orig/examples/groovy/src/com/example/simple/Simple.groovy0000644000175000017500000000362711343534517027640 0ustar twernertwerner/** * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2006 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package com.example.simple; import org.apache.log4j.Logger; public class Simple { private static final Logger logger = Logger.getLogger(Simple.class) public int square(int x) { if (logger.isDebugEnabled()) { logger.debug("x: " + x) } def result = x * x if (logger.isDebugEnabled()) { logger.debug("result: " + result) } return result } public int f(int x) { if (logger.isDebugEnabled()) { logger.debug("x: " + x) } if (x < 0) { if (logger.isDebugEnabled()) { logger.debug("negative x") } return square(x) } else if ((x >= 0) && (x <= 5)) { if (logger.isDebugEnabled()) { logger.debug("0<=x<=5") } return x + 3 } else { return 2 * x } } public int sum(Collection c) { def result = 0; for (i in c) { if (logger.isDebugEnabled()) { logger.debug("value: " + i) } result += i; } if (logger.isDebugEnabled()) { logger.debug("result: " + result) } return result } }cobertura-1.9.4.1+dfsg.orig/examples/groovy/build.xml0000644000175000017500000001047611343534521022463 0ustar twernertwerner Cobertura - http://cobertura.sourceforge.net/ Copyright (C) 2003 jcoverage ltd. Copyright (C) 2006 Mark Doliner <thekingant@users.sourceforge.net> Cobertura is licensed under the GNU General Public License Cobertura comes with ABSOLUTELY NO WARRANTY cobertura-1.9.4.1+dfsg.orig/examples/groovy/README0000644000175000017500000000073011343534522021513 0ustar twernertwernerThis directory contains a simple example of using Cobertura to instrument a Groovy application and generate coverage reports. To run the example: ant The application and its tests will be compiled, Cobertura will instrument the application, the instrumented application will then be tested, and a Cobertura report produced in HTML and XML. The Cobertura reports can be found in: reports/cobertura-html/index.html reports/cobertura-xml/coverage.xml cobertura-1.9.4.1+dfsg.orig/antLibrary/0000755000175000017500000000000011345540725017603 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/antLibrary/common/0000755000175000017500000000000011343534515021071 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/antLibrary/common/junit/0000755000175000017500000000000011345540725022224 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/antLibrary/common/groovy/0000755000175000017500000000000011345540725022420 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/antLibrary/library.xml0000644000175000017500000000714311343534521021771 0ustar twernertwerner cobertura-1.9.4.1+dfsg.orig/cobertura-instrument.bat0000644000175000017500000000115011343534514022352 0ustar twernertwerner@echo off REM REM Grab the directory where this script resides, for use later REM set COBERTURA_HOME=%~dp0 REM REM Read all parameters into a single variable using an ugly loop REM set CMD_LINE_ARGS=%1 if ""%1""=="""" goto doneStart shift :getArgs if ""%1""=="""" goto doneStart set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto getArgs :doneStart java -cp "%COBERTURA_HOME%cobertura.jar;%COBERTURA_HOME%lib\asm-3.0.jar;%COBERTURA_HOME%lib\asm-tree-3.0.jar;%COBERTURA_HOME%lib\log4j-1.2.9.jar;%COBERTURA_HOME%lib\jakarta-oro-2.0.8.jar" net.sourceforge.cobertura.instrument.Main %CMD_LINE_ARGS% cobertura-1.9.4.1+dfsg.orig/build.properties0000644000175000017500000000204211343534517020707 0ustar twernertwernerversion=1.9.4.1 description=A code coverage analysis tool. # TODO: Make this better. eclipse.dir=/opt/eclipse # Directories of source files etc.dir=etc examples.dir=examples examples.functionalconditiontest.dir=examples/functionalconditiontest/src lib.dir=lib src.dir=src othersrc.dir=src-2 test.src.dir=test jetty.dir=jetty # Directories for generated output build.dir=build build.classes.dir=${build.dir}/classes build.otherclasses.dir=${build.dir}/otherclasses build.functionalconditiontest.dir=${build.dir}/functionalconditiontestclasses build.instrumented.dir=${build.dir}/instrumented build.api.dir=${build.dir}/api build.dist.dir=${build.dir}/dist build.dist.eclipse.dir=${build.dist.dir}/eclipse build.test.dir=${build.dir}/test build.test.classes.dir=${build.test.dir}/classes build.reports.dir=${build.dir}/reports build.bundle.dir=${build.dir}/bundle build.bundle.source.dir=${build.bundle.dir}/source build.bundle.runtime.dir=${build.bundle.dir}/runtime build.maven.repo=${build.dir}/m2repo javac.target=1.5 cobertura-1.9.4.1+dfsg.orig/src/0000755000175000017500000000000011345540725016263 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/0000755000175000017500000000000011343534513017045 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/0000755000175000017500000000000011343534513021370 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/0000755000175000017500000000000011343534522023356 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/0000755000175000017500000000000011345540725025373 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/0000755000175000017500000000000011345540725026337 5ustar twernertwerner././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/SourceFileDataBaseNameComparator.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/SourceFileDataBaseNameCompa0000644000175000017500000000277511343534515033501 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting.html; import java.io.Serializable; import java.util.Comparator; import net.sourceforge.cobertura.coveragedata.SourceFileData; public class SourceFileDataBaseNameComparator implements Comparator, Serializable { private static final long serialVersionUID = 0L; public int compare(Object arg0, Object arg1) { SourceFileData sourceFileData0 = (SourceFileData)arg0; SourceFileData sourceFileData1 = (SourceFileData)arg1; int comparison = sourceFileData0.getBaseName().compareTo(sourceFileData1.getBaseName()); if (comparison != 0) return comparison; return sourceFileData0.getName().compareTo(sourceFileData1.getName()); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/HTMLReport.java0000644000175000017500000006404511343534516031152 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Grzegorz Lukasik * Copyright (C) 2005 Jeremy Thomerson * Copyright (C) 2006 Naoki Iwami * Copyright (C) 2009 Charlie Squires * Copyright (C) 2009 John Lewis * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting.html; import java.io.BufferedReader; import java.io.File; import java.io.InputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.text.DateFormat; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.Collection; import java.util.Collections; import java.util.Date; import java.util.Iterator; import java.util.SortedSet; import java.util.TreeSet; import java.util.Vector; import net.sourceforge.cobertura.coveragedata.ClassData; import net.sourceforge.cobertura.coveragedata.CoverageData; import net.sourceforge.cobertura.coveragedata.LineData; import net.sourceforge.cobertura.coveragedata.PackageData; import net.sourceforge.cobertura.coveragedata.ProjectData; import net.sourceforge.cobertura.coveragedata.SourceFileData; import net.sourceforge.cobertura.reporting.ComplexityCalculator; import net.sourceforge.cobertura.reporting.html.files.CopyFiles; import net.sourceforge.cobertura.util.FileFinder; import net.sourceforge.cobertura.util.Header; import net.sourceforge.cobertura.util.IOUtil; import net.sourceforge.cobertura.util.Source; import net.sourceforge.cobertura.util.StringUtil; import org.apache.log4j.Logger; public class HTMLReport { private static final Logger LOGGER = Logger.getLogger(HTMLReport.class); private File destinationDir; private FileFinder finder; private ComplexityCalculator complexity; private ProjectData projectData; private String encoding; /** * Create a coverage report * @param encoding */ public HTMLReport(ProjectData projectData, File outputDir, FileFinder finder, ComplexityCalculator complexity, String encoding) throws Exception { this.destinationDir = outputDir; this.finder = finder; this.complexity = complexity; this.projectData = projectData; this.encoding = encoding; CopyFiles.copy(outputDir); generatePackageList(); generateSourceFileLists(); generateOverviews(); generateSourceFiles(); } private String generatePackageName(PackageData packageData) { if (packageData.getName().equals("")) return "(default)"; return packageData.getName(); } private void generatePackageList() throws IOException { File file = new File(destinationDir, "frame-packages.html"); PrintWriter out = null; try { out = IOUtil.getPrintWriter(file); out .println(""); out .println(""); out.println(""); out .println(""); out.println("Coverage Report"); out .println(""); out.println(""); out.println(""); out.println("
Packages
"); out.println(""); out.println(""); out .println(""); out.println(""); Iterator iter = projectData.getPackages().iterator(); while (iter.hasNext()) { PackageData packageData = (PackageData)iter.next(); String url1 = "frame-summary-" + packageData.getName() + ".html"; String url2 = "frame-sourcefiles-" + packageData.getName() + ".html"; out.println(""); out.println(""); out.println(""); } out.println("
All
" + generatePackageName(packageData) + "
"); out.println(""); out.println(""); } finally { if (out != null) { out.close(); } } } private void generateSourceFileLists() throws IOException { generateSourceFileList(null); Iterator iter = projectData.getPackages().iterator(); while (iter.hasNext()) { PackageData packageData = (PackageData)iter.next(); generateSourceFileList(packageData); } } private void generateSourceFileList(PackageData packageData) throws IOException { String filename; Collection sourceFiles; if (packageData == null) { filename = "frame-sourcefiles.html"; sourceFiles = projectData.getSourceFiles(); } else { filename = "frame-sourcefiles-" + packageData.getName() + ".html"; sourceFiles = packageData.getSourceFiles(); } // sourceFiles may be sorted, but if so it's sorted by // the full path to the file, and we only want to sort // based on the file's basename. Vector sortedSourceFiles = new Vector(); sortedSourceFiles.addAll(sourceFiles); Collections.sort(sortedSourceFiles, new SourceFileDataBaseNameComparator()); File file = new File(destinationDir, filename); PrintWriter out = null; try { out = IOUtil.getPrintWriter(file); out .println(""); out.println(""); out.println(""); out .println(""); out.println("Coverage Report Classes"); out .println(""); out.println(""); out.println(""); out.println("
"); out.println(packageData == null ? "All Packages" : generatePackageName(packageData)); out.println("
"); out.println("
 
"); out.println("
Classes
"); if (!sortedSourceFiles.isEmpty()) { out.println(""); out.println(""); for (Iterator iter = sortedSourceFiles.iterator(); iter .hasNext();) { SourceFileData sourceFileData = (SourceFileData)iter.next(); out.println(""); String percentCovered; if (sourceFileData.getNumberOfValidLines() > 0) percentCovered = getPercentValue(sourceFileData .getLineCoverageRate()); else percentCovered = "N/A"; out .println(""); out.println(""); } out.println(""); out.println("
" + sourceFileData.getBaseName() + " (" + percentCovered + ")
"); } out.println(""); out.println(""); } finally { if (out != null) { out.close(); } } } private void generateOverviews() throws IOException { generateOverview(null); Iterator iter = projectData.getPackages().iterator(); while (iter.hasNext()) { PackageData packageData = (PackageData)iter.next(); generateOverview(packageData); } } private void generateOverview(PackageData packageData) throws IOException { Iterator iter; String filename; if (packageData == null) { filename = "frame-summary.html"; } else { filename = "frame-summary-" + packageData.getName() + ".html"; } File file = new File(destinationDir, filename); PrintWriter out = null; try { out = IOUtil.getPrintWriter(file);; out .println(""); out.println(""); out.println(""); out .println(""); out.println("Coverage Report"); out .println(""); out .println(""); out .println(""); out .println(""); out .println(""); out.println(""); out.println(""); out.print("
Coverage Report - "); out.print(packageData == null ? "All Packages" : generatePackageName(packageData)); out.println("
"); out.println("
 
"); out.println(""); out.println(generateTableHeader("Package", true)); out.println(""); SortedSet packages; if (packageData == null) { // Output a summary line for all packages out.println(generateTableRowForTotal()); // Get packages packages = projectData.getPackages(); } else { // Get subpackages packages = projectData.getSubPackages(packageData.getName()); } // Output a line for each package or subpackage iter = packages.iterator(); while (iter.hasNext()) { PackageData subPackageData = (PackageData)iter.next(); out.println(generateTableRowForPackage(subPackageData)); } out.println(""); out.println("
"); out.println(""); // Get the list of source files in this package Collection sourceFiles; if (packageData == null) { PackageData defaultPackage = (PackageData)projectData .getChild(""); if (defaultPackage != null) { sourceFiles = defaultPackage.getSourceFiles(); } else { sourceFiles = new TreeSet(); } } else { sourceFiles = packageData.getSourceFiles(); } // Output a line for each source file if (sourceFiles.size() > 0) { out.println("
 
"); out.println(""); out.println(generateTableHeader("Classes in this Package", false)); out.println(""); iter = sourceFiles.iterator(); while (iter.hasNext()) { SourceFileData sourceFileData = (SourceFileData)iter.next(); out.println(generateTableRowsForSourceFile(sourceFileData)); } out.println(""); out.println("
"); out.println(""); } out.println(generateFooter()); out.println(""); out.println(""); } finally { if (out != null) { out.close(); } } } private void generateSourceFiles() { Iterator iter = projectData.getSourceFiles().iterator(); while (iter.hasNext()) { SourceFileData sourceFileData = (SourceFileData)iter.next(); try { generateSourceFile(sourceFileData); } catch (IOException e) { LOGGER.info("Could not generate HTML file for source file " + sourceFileData.getName() + ": " + e.getLocalizedMessage()); } } } private void generateSourceFile(SourceFileData sourceFileData) throws IOException { if (!sourceFileData.containsInstrumentationInfo()) { LOGGER.info("Data file does not contain instrumentation " + "information for the file " + sourceFileData.getName() + ". Ensure this class was instrumented, and this " + "data file contains the instrumentation information."); } String filename = sourceFileData.getNormalizedName() + ".html"; File file = new File(destinationDir, filename); PrintWriter out = null; try { out = IOUtil.getPrintWriter(file); out .println(""); out.println(""); out.println(""); out .println(""); out.println("Coverage Report"); out .println(""); out .println(""); out.println(""); out.println(""); out.print("
Coverage Report - "); String classPackageName = sourceFileData.getPackageName(); if ((classPackageName != null) && classPackageName.length() > 0) { out.print(classPackageName + "."); } out.print(sourceFileData.getBaseName()); out.println("
"); // Output the coverage summary for this class out.println("
 
"); out.println(""); out.println(generateTableHeader("Classes in this File", false)); out.println(generateTableRowsForSourceFile(sourceFileData)); out.println("
"); // Output the coverage summary for methods in this class // TODO // Output this class's source code with syntax and coverage highlighting out.println("
 
"); out.println(generateHtmlizedJavaSource(sourceFileData)); out.println(generateFooter()); out.println(""); out.println(""); } finally { if (out != null) { out.close(); } } } private String generateBranchInfo(LineData lineData, String content) { boolean hasBranch = (lineData != null) ? lineData.hasBranch() : false; if (hasBranch) { StringBuffer ret = new StringBuffer(); ret.append(" 1) { ret.append(" [each condition: "); for (int i = 0; i < lineData.getConditionSize(); i++) { if (i > 0) ret.append(", "); ret.append(lineData.getConditionCoverage(i)); } ret.append("]"); } ret.append(".\">").append(content).append(""); return ret.toString(); } else { return content; } } private String generateHtmlizedJavaSource(SourceFileData sourceFileData) { Source source = finder.getSource(sourceFileData.getName()); if (source == null) { return "

Unable to locate " + sourceFileData.getName() + ". Have you specified the source directory?

"; } BufferedReader br = null; try { br = new BufferedReader(new InputStreamReader(source.getInputStream(), encoding)); } catch (UnsupportedEncodingException e) { return "

Unable to open " + source.getOriginDesc() + ": The encoding '" + encoding +"' is not supported by your JVM.

"; } catch (Throwable t) { return "

Unable to open " + source.getOriginDesc() + ": " + t.getLocalizedMessage() + "

"; } StringBuffer ret = new StringBuffer(); ret .append("\n"); try { String lineStr; JavaToHtml javaToHtml = new JavaToHtml(); int lineNumber = 1; while ((lineStr = br.readLine()) != null) { ret.append(""); if (sourceFileData.isValidSourceLineNumber(lineNumber)) { LineData lineData = sourceFileData.getLineCoverage(lineNumber); ret.append(" "); if ((lineData != null) && (lineData.isCovered())) { ret.append(" "); ret .append(" "); } else { ret.append(" "); ret .append(" "); } } else { ret.append(" "); ret.append(" \n"); ret.append(" "); } ret.append("\n"); lineNumber++; } } catch (IOException e) { ret.append("\n"); } finally { try { br.close(); source.close(); } catch (IOException e) { } } ret.append("
 " + lineNumber + "" + generateBranchInfo(lineData, " " + ((lineData != null) ? lineData.getHits() : 0)) + "
 "
									+ generateBranchInfo(lineData, javaToHtml.process(lineStr))
									+ "
" + generateBranchInfo(lineData, " " + ((lineData != null) ? lineData.getHits() : 0)) + "
 "
									+ generateBranchInfo(lineData, javaToHtml.process(lineStr))
									+ "
 " + lineNumber + " 
 "
							+ javaToHtml.process(lineStr) + "
Error reading " + source.getOriginDesc() + ": " + e.getLocalizedMessage() + "
\n"); return ret.toString(); } private static String generateFooter() { return "
Report generated by " + "Cobertura " + Header.version() + " on " + DateFormat.getInstance().format(new Date()) + ".
"; } private static String generateTableHeader(String title, boolean showColumnForNumberOfClasses) { StringBuffer ret = new StringBuffer(); ret.append(""); ret.append(""); ret.append(" " + title + ""); if (showColumnForNumberOfClasses) { ret.append(" # Classes"); } ret.append(" " + generateHelpURL("Line Coverage", "The percent of lines executed by this test run.") + ""); ret.append(" " + generateHelpURL("Branch Coverage", "The percent of branches executed by this test run.") + ""); ret .append(" " + generateHelpURL( "Complexity", "Average McCabe's cyclomatic code complexity for all methods. This is basically a count of the number of different code paths in a method (incremented by 1 for each if statement, while loop, etc.)") + ""); ret.append(""); ret.append(""); return ret.toString(); } private static String generateHelpURL(String text, String description) { StringBuffer ret = new StringBuffer(); boolean popupTooltips = false; if (popupTooltips) { ret .append(""); ret.append(text); ret.append("" + description + ""); ret.append(""); } else { ret .append(""); ret.append(text); ret.append(""); } return ret.toString(); } private String generateTableRowForTotal() { StringBuffer ret = new StringBuffer(); double ccn = complexity.getCCNForProject(projectData); ret.append(" "); ret.append("All Packages"); ret.append("" + projectData.getNumberOfClasses() + ""); ret.append(generateTableColumnsFromData(projectData, ccn)); ret.append(""); return ret.toString(); } private String generateTableRowForPackage(PackageData packageData) { StringBuffer ret = new StringBuffer(); String url1 = "frame-summary-" + packageData.getName() + ".html"; String url2 = "frame-sourcefiles-" + packageData.getName() + ".html"; double ccn = complexity.getCCNForPackage(packageData); ret.append(" "); ret.append("" + generatePackageName(packageData) + ""); ret.append("" + packageData.getNumberOfChildren() + ""); ret.append(generateTableColumnsFromData(packageData, ccn)); ret.append(""); return ret.toString(); } private String generateTableRowsForSourceFile(SourceFileData sourceFileData) { StringBuffer ret = new StringBuffer(); String sourceFileName = sourceFileData.getNormalizedName(); // TODO: ccn should be calculated per-class, not per-file double ccn = complexity.getCCNForSourceFile(sourceFileData); Iterator iter = sourceFileData.getClasses().iterator(); while (iter.hasNext()) { ClassData classData = (ClassData)iter.next(); ret .append(generateTableRowForClass(classData, sourceFileName, ccn)); } return ret.toString(); } private String generateTableRowForClass(ClassData classData, String sourceFileName, double ccn) { StringBuffer ret = new StringBuffer(); ret.append(" "); // TODO: URL should jump straight to the class (only for inner classes?) ret.append("" + classData.getBaseName() + ""); ret.append(generateTableColumnsFromData(classData, ccn)); ret.append("\n"); return ret.toString(); } /** * Return a string containing three HTML table cells. The first * cell contains a graph showing the line coverage, the second * cell contains a graph showing the branch coverage, and the * third cell contains the code complexity. * * @param ccn The code complexity to display. This should be greater * than 1. * @return A string containing the HTML for three table cells. */ private static String generateTableColumnsFromData(CoverageData coverageData, double ccn) { int numLinesCovered = coverageData.getNumberOfCoveredLines(); int numLinesValid = coverageData.getNumberOfValidLines(); int numBranchesCovered = coverageData.getNumberOfCoveredBranches(); int numBranchesValid = coverageData.getNumberOfValidBranches(); // The "hidden" CSS class is used below to write the ccn without // any formatting so that the table column can be sorted correctly return "" + generatePercentResult(numLinesCovered, numLinesValid) +"" + generatePercentResult(numBranchesCovered, numBranchesValid) + "" + ccn + ";" + getDoubleValue(ccn) + ""; } /** * This is crazy complicated, and took me a while to figure out, * but it works. It creates a dandy little percentage meter, from * 0 to 100. * @param dividend The number of covered lines or branches. * @param divisor The number of valid lines or branches. * @return A percentage meter. */ private static String generatePercentResult(int dividend, int divisor) { StringBuffer sb = new StringBuffer(); sb.append("
"); if (divisor > 0) sb.append(getPercentValue((double)dividend / divisor)); else sb.append(generateHelpURL( "N/A", "Line coverage and branch coverage will appear as \"Not Applicable\" when Cobertura can not find line number information in the .class file. This happens for stub and skeleton classes, interfaces, or when the class was not compiled with \"debug=true.\"")); sb.append("
"); if (divisor > 0) { sb.append("
"); sb.append(""); sb.append(dividend); sb.append("/"); sb.append(divisor); } else { sb.append("
"); sb.append(""); sb.append(generateHelpURL( "N/A", "Line coverage and branch coverage will appear as \"Not Applicable\" when Cobertura can not find line number information in the .class file. This happens for stub and skeleton classes, interfaces, or when the class was not compiled with \"debug=true.\"")); } sb.append("
"); return sb.toString(); } private static String getDoubleValue(double value) { return new DecimalFormat().format(value); } private static String getPercentValue(double value) { return StringUtil.getPercentValue(value); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/0000755000175000017500000000000011345540725027441 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/blank.png0000644000175000017500000000022011343534521031223 0ustar twernertwernerPNG  IHDR !tIME +T pHYs B4PLTEٟtRNS0JIDATxc{-=KIENDB`cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/help.css0000644000175000017500000000043611343534517031106 0ustar twernertwernerdl { float: left; width: 100%; } dt { border-top: 1px solid #808080; float: left; font-weight: bold; margin: 0; padding: 1em; width: 20%; } dd { border-top: 1px solid #808080; float: left; font-style: italic; margin: 0; padding: 1em; width: 60%; } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/downsimple.png0000644000175000017500000000031111343534517032323 0ustar twernertwernerPNG  IHDRlgAMA7tEXtSoftwareAdobe ImageReadyqe< PLTE-ȭtRNS A7IDATxb`b`db` & H@@" "V_JIENDB`cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/sortabletable.js0000644000175000017500000003637711343534522032636 0ustar twernertwerner /*----------------------------------------------------------------------------\ | Sortable Table 1.12 | |-----------------------------------------------------------------------------| | Created by Erik Arvidsson | | (http://webfx.eae.net/contact.html#erik) | | For WebFX (http://webfx.eae.net/) | |-----------------------------------------------------------------------------| | A DOM 1 based script that allows an ordinary HTML table to be sortable. | |-----------------------------------------------------------------------------| | Copyright (c) 1998 - 2004 Erik Arvidsson | |-----------------------------------------------------------------------------| | This software is provided "as is", without warranty of any kind, express or | | implied, including but not limited to the warranties of merchantability, | | fitness for a particular purpose and noninfringement. In no event shall the | | authors or copyright holders be liable for any claim, damages or other | | liability, whether in an action of contract, tort or otherwise, arising | | from, out of or in connection with the software or the use or other | | dealings in the software. | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | This software is available under the three different licenses mentioned | | below. To use this software you must chose, and qualify, for one of those. | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | The WebFX Non-Commercial License http://webfx.eae.net/license.html | | Permits anyone the right to use the software in a non-commercial context | | free of charge. | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | The WebFX Commercial license http://webfx.eae.net/commercial.html | | Permits the license holder the right to use the software in a commercial | | context. Such license must be specifically obtained, however it's valid for | | any number of implementations of the licensed software. | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | GPL - The GNU General Public License http://www.gnu.org/licenses/gpl.txt | | Permits anyone the right to use and modify the software without limitations | | as long as proper credits are given and the original and modified source | | code are included. Requires that the final product, software derivate from | | the original source or any software utilizing a GPL component, such as | | this, is also licensed under the GPL license. | |-----------------------------------------------------------------------------| | 2003-01-10 | First version | | 2003-01-19 | Minor changes to the date parsing | | 2003-01-28 | JScript 5.0 fixes (no support for 'in' operator) | | 2003-02-01 | Sloppy typo like error fixed in getInnerText | | 2003-07-04 | Added workaround for IE cellIndex bug. | | 2003-11-09 | The bDescending argument to sort was not correctly working | | | Using onclick DOM0 event if no support for addEventListener | | | or attachEvent | | 2004-01-13 | Adding addSortType and removeSortType which makes it a lot | | | easier to add new, custom sort types. | | 2004-01-27 | Switch to use descending = false as the default sort order. | | | Change defaultDescending to suit your needs. | | 2004-03-14 | Improved sort type None look and feel a bit | | 2004-08-26 | Made the handling of tBody and tHead more flexible. Now you | | | can use another tHead or no tHead, and you can chose some | | | other tBody. | |-----------------------------------------------------------------------------| | Created 2003-01-10 | All changes are in the log above. | Updated 2004-08-26 | \----------------------------------------------------------------------------*/ function SortableTable(oTable, oSortTypes) { this.sortTypes = oSortTypes || []; this.sortColumn = null; this.descending = null; var oThis = this; this._headerOnclick = function (e) { oThis.headerOnclick(e); }; if (oTable) { this.setTable( oTable ); this.document = oTable.ownerDocument || oTable.document; } else { this.document = document; } // only IE needs this var win = this.document.defaultView || this.document.parentWindow; this._onunload = function () { oThis.destroy(); }; if (win && typeof win.attachEvent != "undefined") { win.attachEvent("onunload", this._onunload); } } SortableTable.gecko = navigator.product == "Gecko"; SortableTable.msie = /msie/i.test(navigator.userAgent); // Mozilla is faster when doing the DOM manipulations on // an orphaned element. MSIE is not SortableTable.removeBeforeSort = SortableTable.gecko; SortableTable.prototype.onsort = function () {}; // default sort order. true -> descending, false -> ascending SortableTable.prototype.defaultDescending = false; // shared between all instances. This is intentional to allow external files // to modify the prototype SortableTable.prototype._sortTypeInfo = {}; SortableTable.prototype.setTable = function (oTable) { if ( this.tHead ) this.uninitHeader(); this.element = oTable; this.setTHead( oTable.tHead ); this.setTBody( oTable.tBodies[0] ); }; SortableTable.prototype.setTHead = function (oTHead) { if (this.tHead && this.tHead != oTHead ) this.uninitHeader(); this.tHead = oTHead; this.initHeader( this.sortTypes ); }; SortableTable.prototype.setTBody = function (oTBody) { this.tBody = oTBody; }; SortableTable.prototype.setSortTypes = function ( oSortTypes ) { if ( this.tHead ) this.uninitHeader(); this.sortTypes = oSortTypes || []; if ( this.tHead ) this.initHeader( this.sortTypes ); }; // adds arrow containers and events // also binds sort type to the header cells so that reordering columns does // not break the sort types SortableTable.prototype.initHeader = function (oSortTypes) { if (!this.tHead) return; var cells = this.tHead.rows[0].cells; var doc = this.tHead.ownerDocument || this.tHead.document; this.sortTypes = oSortTypes || []; var l = cells.length; var img, c; for (var i = 0; i < l; i++) { c = cells[i]; if (this.sortTypes[i] != null && this.sortTypes[i] != "None") { img = doc.createElement("IMG"); img.src = "images/blank.png"; c.appendChild(img); if (this.sortTypes[i] != null) c._sortType = this.sortTypes[i]; if (typeof c.addEventListener != "undefined") c.addEventListener("click", this._headerOnclick, false); else if (typeof c.attachEvent != "undefined") c.attachEvent("onclick", this._headerOnclick); else c.onclick = this._headerOnclick; } else { c.setAttribute( "_sortType", oSortTypes[i] ); c._sortType = "None"; } } this.updateHeaderArrows(); }; // remove arrows and events SortableTable.prototype.uninitHeader = function () { if (!this.tHead) return; var cells = this.tHead.rows[0].cells; var l = cells.length; var c; for (var i = 0; i < l; i++) { c = cells[i]; if (c._sortType != null && c._sortType != "None") { c.removeChild(c.lastChild); if (typeof c.removeEventListener != "undefined") c.removeEventListener("click", this._headerOnclick, false); else if (typeof c.detachEvent != "undefined") c.detachEvent("onclick", this._headerOnclick); c._sortType = null; c.removeAttribute( "_sortType" ); } } }; SortableTable.prototype.updateHeaderArrows = function () { if (!this.tHead) return; var cells = this.tHead.rows[0].cells; var l = cells.length; var img; for (var i = 0; i < l; i++) { if (cells[i]._sortType != null && cells[i]._sortType != "None") { img = cells[i].lastChild; if (i == this.sortColumn) img.className = "sort-arrow " + (this.descending ? "descending" : "ascending"); else img.className = "sort-arrow"; } } }; SortableTable.prototype.headerOnclick = function (e) { // find TD element var el = e.target || e.srcElement; while (el.tagName != "TD") el = el.parentNode; this.sort(SortableTable.msie ? SortableTable.getCellIndex(el) : el.cellIndex); }; // IE returns wrong cellIndex when columns are hidden SortableTable.getCellIndex = function (oTd) { var cells = oTd.parentNode.childNodes var l = cells.length; var i; for (i = 0; cells[i] != oTd && i < l; i++) ; return i; }; SortableTable.prototype.getSortType = function (nColumn) { return this.sortTypes[nColumn] || "String"; }; // only nColumn is required // if bDescending is left out the old value is taken into account // if sSortType is left out the sort type is found from the sortTypes array SortableTable.prototype.sort = function (nColumn, bDescending, sSortType) { if (!this.tBody) return; if (sSortType == null) sSortType = this.getSortType(nColumn); // exit if None if (sSortType == "None") return; if (bDescending == null) { if (this.sortColumn != nColumn) this.descending = this.defaultDescending; else this.descending = !this.descending; } else this.descending = bDescending; this.sortColumn = nColumn; if (typeof this.onbeforesort == "function") this.onbeforesort(); var f = this.getSortFunction(sSortType, nColumn); var a = this.getCache(sSortType, nColumn); var tBody = this.tBody; a.sort(f); if (this.descending) a.reverse(); if (SortableTable.removeBeforeSort) { // remove from doc var nextSibling = tBody.nextSibling; var p = tBody.parentNode; p.removeChild(tBody); } // insert in the new order var l = a.length; for (var i = 0; i < l; i++) tBody.appendChild(a[i].element); if (SortableTable.removeBeforeSort) { // insert into doc p.insertBefore(tBody, nextSibling); } this.updateHeaderArrows(); this.destroyCache(a); if (typeof this.onsort == "function") this.onsort(); }; SortableTable.prototype.asyncSort = function (nColumn, bDescending, sSortType) { var oThis = this; this._asyncsort = function () { oThis.sort(nColumn, bDescending, sSortType); }; window.setTimeout(this._asyncsort, 1); }; SortableTable.prototype.getCache = function (sType, nColumn) { if (!this.tBody) return []; var rows = this.tBody.rows; var l = rows.length; var a = new Array(l); var r; for (var i = 0; i < l; i++) { r = rows[i]; a[i] = { value: this.getRowValue(r, sType, nColumn), element: r }; }; return a; }; SortableTable.prototype.destroyCache = function (oArray) { var l = oArray.length; for (var i = 0; i < l; i++) { oArray[i].value = null; oArray[i].element = null; oArray[i] = null; } }; SortableTable.prototype.getRowValue = function (oRow, sType, nColumn) { // if we have defined a custom getRowValue use that if (this._sortTypeInfo[sType] && this._sortTypeInfo[sType].getRowValue) return this._sortTypeInfo[sType].getRowValue(oRow, nColumn); var s; var c = oRow.cells[nColumn]; if (typeof c.innerText != "undefined") s = c.innerText; else s = SortableTable.getInnerText(c); return this.getValueFromString(s, sType); }; SortableTable.getInnerText = function (oNode) { var s = ""; var cs = oNode.childNodes; var l = cs.length; for (var i = 0; i < l; i++) { switch (cs[i].nodeType) { case 1: //ELEMENT_NODE s += SortableTable.getInnerText(cs[i]); break; case 3: //TEXT_NODE s += cs[i].nodeValue; break; } } return s; }; SortableTable.prototype.getValueFromString = function (sText, sType) { if (this._sortTypeInfo[sType]) return this._sortTypeInfo[sType].getValueFromString( sText ); return sText; /* switch (sType) { case "Number": return Number(sText); case "CaseInsensitiveString": return sText.toUpperCase(); case "Date": var parts = sText.split("-"); var d = new Date(0); d.setFullYear(parts[0]); d.setDate(parts[2]); d.setMonth(parts[1] - 1); return d.valueOf(); } return sText; */ }; SortableTable.prototype.getSortFunction = function (sType, nColumn) { if (this._sortTypeInfo[sType]) return this._sortTypeInfo[sType].compare; return SortableTable.basicCompare; }; SortableTable.prototype.destroy = function () { this.uninitHeader(); var win = this.document.parentWindow; if (win && typeof win.detachEvent != "undefined") { // only IE needs this win.detachEvent("onunload", this._onunload); } this._onunload = null; this.element = null; this.tHead = null; this.tBody = null; this.document = null; this._headerOnclick = null; this.sortTypes = null; this._asyncsort = null; this.onsort = null; }; // Adds a sort type to all instance of SortableTable // sType : String - the identifier of the sort type // fGetValueFromString : function ( s : string ) : T - A function that takes a // string and casts it to a desired format. If left out the string is just // returned // fCompareFunction : function ( n1 : T, n2 : T ) : Number - A normal JS sort // compare function. Takes two values and compares them. If left out less than, // <, compare is used // fGetRowValue : function( oRow : HTMLTRElement, nColumn : int ) : T - A function // that takes the row and the column index and returns the value used to compare. // If left out then the innerText is first taken for the cell and then the // fGetValueFromString is used to convert that string the desired value and type SortableTable.prototype.addSortType = function (sType, fGetValueFromString, fCompareFunction, fGetRowValue) { this._sortTypeInfo[sType] = { type: sType, getValueFromString: fGetValueFromString || SortableTable.idFunction, compare: fCompareFunction || SortableTable.basicCompare, getRowValue: fGetRowValue }; }; // this removes the sort type from all instances of SortableTable SortableTable.prototype.removeSortType = function (sType) { delete this._sortTypeInfo[sType]; }; SortableTable.basicCompare = function compare(n1, n2) { if (n1.value < n2.value) return -1; if (n2.value < n1.value) return 1; return 0; }; SortableTable.idFunction = function (x) { return x; }; SortableTable.toUpperCase = function (s) { return s.toUpperCase(); }; SortableTable.toDate = function (s) { var parts = s.split("-"); var d = new Date(0); d.setFullYear(parts[0]); d.setDate(parts[2]); d.setMonth(parts[1] - 1); return d.valueOf(); }; // add sort types SortableTable.prototype.addSortType("Number", Number); SortableTable.prototype.addSortType("CaseInsensitiveString", SortableTable.toUpperCase); SortableTable.prototype.addSortType("Date", SortableTable.toDate); SortableTable.prototype.addSortType("String"); // None is a special case cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/popup.js0000644000175000017500000000027111343534515031140 0ustar twernertwernervar newwindow; function popupwindow(url) { newwindow=window.open(url,'name','height=500,width=500,resizable=yes,scrollbars=yes'); if (window.focus) { newwindow.focus() } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/customsorttypes.js0000644000175000017500000000306311343534517033310 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Olivier Parent * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ function percentageSortType( s ) { var ret; var i = s.indexOf( "%" ); if (i != -1) { s = s.substr( 0, i ); } ret = parseFloat(s); if (isNaN(ret)) { ret = -1; } return ret; } SortableTable.prototype.addSortType( "Percentage", percentageSortType ); // This is needed for correctly sorting numbers in different // locales. The stock number converter only expects to sort // numbers which use a period as a separator instead of a // comma (like French). function formattedNumberSortType( s ) { var ret; var i = s.indexOf(';'); if (i != -1) { s = s.substring(0, i); } ret = parseFloat(s); if (isNaN(ret)) { return -1; } return ret; } SortableTable.prototype.addSortType( "FormattedNumber", formattedNumberSortType ); cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/help.html0000644000175000017500000000214311343534521031252 0ustar twernertwerner Coverage Report - Help
Line Coverage
The percent of lines executed by this test run.
Branch Coverage
The percent of branches executed by this test run.
Complexity
Average McCabe's cyclomatic code complexity for all methods. This is basically a count of the number of different code paths in a method (incremented by 1 for each if statement, while loop, etc.)
N/A
Line coverage and branch coverage will appear as "Not Applicable" when Cobertura can not find line number information in the .class file. This happens for stub and skeleton classes, interfaces, or when the class was not compiled with "debug=true."
cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/CopyFiles.java0000644000175000017500000000655411343534514032210 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting.html.files; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; public abstract class CopyFiles { public static void copy(File destinationDir) throws IOException { File cssOutputDir = new File(destinationDir, "css"); File imagesOutputDir = new File(destinationDir, "images"); File jsOutputDir = new File(destinationDir, "js"); destinationDir.mkdirs(); cssOutputDir.mkdir(); imagesOutputDir.mkdir(); jsOutputDir.mkdir(); copyResourceFromJar("help.css", cssOutputDir); copyResourceFromJar("main.css", cssOutputDir); copyResourceFromJar("sortabletable.css", cssOutputDir); copyResourceFromJar("source-viewer.css", cssOutputDir); copyResourceFromJar("tooltip.css", cssOutputDir); copyResourceFromJar("blank.png", imagesOutputDir); copyResourceFromJar("downsimple.png", imagesOutputDir); copyResourceFromJar("upsimple.png", imagesOutputDir); copyResourceFromJar("customsorttypes.js", jsOutputDir); copyResourceFromJar("popup.js", jsOutputDir); copyResourceFromJar("sortabletable.js", jsOutputDir); copyResourceFromJar("stringbuilder.js", jsOutputDir); copyResourceFromJar("help.html", destinationDir); copyResourceFromJar("index.html", destinationDir); } /** * Copy a file from the jar to a directory on the local machine. * * @param resourceName The name of the file in the jar. This file * must exist the same package as this method. * @param directory The directory to copy the jar to. * @throws IOException If the file could not be read from the * jar or written to the disk. */ private static void copyResourceFromJar(String resourceName, File directory) throws IOException { int n; byte[] buf = new byte[1024]; InputStream in = null; FileOutputStream out = null; directory.mkdirs(); try { in = CopyFiles.class.getResourceAsStream(resourceName); if (in == null) throw new IllegalArgumentException("Resource " + resourceName + " does not exist in this package."); out = new FileOutputStream(new File(directory, resourceName)); while ((n = in.read(buf, 0, buf.length)) != -1) { out.write(buf, 0, n); } } finally { if (in != null) { try { in.close(); } catch (IOException e) { } } if (out != null) { try { out.close(); } catch (IOException e) { } } } } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/upsimple.png0000644000175000017500000000031111343534521031773 0ustar twernertwernerPNG  IHDRlgAMA7tEXtSoftwareAdobe ImageReadyqe< PLTEWtRNS A7IDATxb`bbb`,3DXg  OW{IENDB`cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/sortabletable.css0000644000175000017500000000172311343534521032774 0ustar twernertwerner.sort-table { font: Icon; border: 1px Solid ThreeDShadow; background: Window; color: WindowText; } .sort-table thead { background: ButtonFace; } .sort-table td { padding: 2px 5px; } .sort-table thead td { border: 1px solid; border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; cursor: default; } .sort-table thead td:active { border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; padding: 3px 4px 1px 6px; } .sort-table thead td[_sortType=None]:active { border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; padding: 2px 5px; } .sort-arrow { width: 11px; height: 11px; background-position: center center; background-repeat: no-repeat; margin: 0 2px; } .sort-arrow.descending { background-image: url("../images/downsimple.png"); } .sort-arrow.ascending { background-image: url("../images/upsimple.png"); }cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/stringbuilder.js0000644000175000017500000001034311343534521032650 0ustar twernertwerner/*----------------------------------------------------------------------------\ | String Builder 1.02 | |-----------------------------------------------------------------------------| | Created by Erik Arvidsson | | (http://webfx.eae.net/contact.html#erik) | | For WebFX (http://webfx.eae.net/) | |-----------------------------------------------------------------------------| | A class that allows more efficient building of strings than concatenation. | |-----------------------------------------------------------------------------| | Copyright (c) 1999 - 2002 Erik Arvidsson | |-----------------------------------------------------------------------------| | This software is provided "as is", without warranty of any kind, express or | | implied, including but not limited to the warranties of merchantability, | | fitness for a particular purpose and noninfringement. In no event shall the | | authors or copyright holders be liable for any claim, damages or other | | liability, whether in an action of contract, tort or otherwise, arising | | from, out of or in connection with the software or the use or other | | dealings in the software. | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | This software is available under the three different licenses mentioned | | below. To use this software you must chose, and qualify, for one of those. | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | The WebFX Non-Commercial License http://webfx.eae.net/license.html | | Permits anyone the right to use the software in a non-commercial context | | free of charge. | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | The WebFX Commercial license http://webfx.eae.net/commercial.html | | Permits the license holder the right to use the software in a commercial | | context. Such license must be specifically obtained, however it's valid for | | any number of implementations of the licensed software. | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | GPL - The GNU General Public License http://www.gnu.org/licenses/gpl.txt | | Permits anyone the right to use and modify the software without limitations | | as long as proper credits are given and the original and modified source | | code are included. Requires that the final product, software derivate from | | the original source or any software utilizing a GPL component, such as | | this, is also licensed under the GPL license. | |-----------------------------------------------------------------------------| | 2000-10-02 | First version | | 2000-10-05 | Added a cache of the string so that it does not need to be | | | regenerated every time in toString | | 2002-10-03 | Added minor improvement in the toString method | |-----------------------------------------------------------------------------| | Created 2000-10-02 | All changes are in the log above. | Updated 2002-10-03 | \----------------------------------------------------------------------------*/ function StringBuilder(sString) { // public this.length = 0; this.append = function (sString) { // append argument this.length += (this._parts[this._current++] = String(sString)).length; // reset cache this._string = null; return this; }; this.toString = function () { if (this._string != null) return this._string; var s = this._parts.join(""); this._parts = [s]; this._current = 1; this.length = s.length; return this._string = s; }; // private this._current = 0; this._parts = []; this._string = null; // used to cache the string // init if (sString != null) this.append(sString); } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/tooltip.css0000644000175000017500000000151511343534515031645 0ustar twernertwernera.hastooltip { border-bottom: 1px dotted #00aa00; color: #000000; cursor: help; font-style: normal; position: relative; /* This is the key */ text-decoration: none; z-index: 24; /* What does this do? */ } a.hastooltip:active { color: #000000; text-decoration: none; } a.hastooltip:link { color: #000000; text-decoration: none; } a.hastooltip:hover { background-color: #a0b8ff; color: #000000; text-decoration: none; z-index: 25; } a.hastooltip:visited { color: #000000; text-decoration: none; } a.hastooltip span { display: none; } a.hastooltip:hover span { background-color: #eeeeee; border: 1px solid #000000; color: #000000; display: block; padding: 5px; left: -15.2em; position: absolute; text-align: center; text-decoration: none; top: 2em; width: 20em; } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/source-viewer.css0000644000175000017500000000223711343534514032753 0ustar twernertwernerpre.src { background: #ffffff; margin-top: 0px; margin-bottom: 0px; } table.src { border: #dcdcdc 1px solid; font-size: 16px; } td.numLine { background: #f0f0f0; border-right: #dcdcdc 1px solid; padding-right: 3px; text-align: right; } td.numLineCover { background: #80ff80; border-right: #dcdcdc 1px solid; padding-right: 3px; text-align: right; } td.nbHits { background: #f0f0f0; border-right: #dcdcdc 1px solid; padding-right: 3px; text-align: right; } td.nbHitsCovered { background: #80ff80; border-right: #dcdcdc 1px solid; padding-right: 3px; text-align: right; } td.nbHitsUncovered { background: #ff9090; border-right: #dcdcdc 1px solid; font-weight: bold; padding-right: 3px; text-align: right; } td.src { width: 100%; } span.comment { color: #b22222; font-style: italic; } span.keyword { color: #2020bf; font-weight: bold; } span.srcUncovered { background: #ff9090; } span.string { color: #2a00ff; } span.text_italic { font-size: 12px; font-style: italic; } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/main.css0000644000175000017500000000350211343534522031073 0ustar twernertwerner@import url("help.css"); @import url("source-viewer.css"); @import url("tooltip.css"); .hidden { display: none; } a.dfn { border-bottom: 1px dotted #00aa00; cursor: help; } a.dfn:active, a.dfn:link, a.dfn:visited { color: #000000; text-decoration: none; } a.dfn:hover { color: #0000ff; text-decoration: none; } body { font-family: verdana, arial, helvetica; } h1, h2, h3, h4, h5, h6 { margin-bottom: 0.5em; } h5 { margin-top: 0.5em; } div.footer { font-size: 68%; margin-top: 1.5em; } div.percentgraph { background-color: #f02020; border: #808080 1px solid; height: 1.3em; margin: 0px; padding: 0px; width: 100px; } div.percentgraph div.greenbar { background-color: #00f000; height: 1.3em; margin: 0px; padding: 0px; } div.percentgraph div.na { background-color: #eaeaea; height: 1.3em; margin: 0px; padding: 0px; } div.percentgraph span.text { display: block; position: absolute; text-align: center; width: 100px; } div.separator { height: 10px; } table tr td, table tr th { font-size: 68%; } td.value table tr td { font-size: 11px; } table.percentgraph { border: 0px; font-size: 130%; margin: 0px; margin-left: auto; margin-right: 0px; padding: 0px; } table.percentgraph tr.percentgraph { border: 0px; margin: 0px; padding: 0px; } table.percentgraph td.percentgraph { border: 0px; margin: 0px; padding: 0px; padding-left: 4px; } table.report { border-collapse: collapse; width: 100%; } table.report td { border: #d0d0d0 1px solid; } table.report td.heading { background: #dcecff; font-weight: bold; text-align: center; } table.report td.heading:hover { background: #c0ffc0; cursor: pointer; } table.report td.value { text-align: right; } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/files/index.html0000644000175000017500000000177111343534522031440 0ustar twernertwerner Coverage Report <body> <p>This document is designed to be viewed using the frames feature. If you see this message, you are using a frame-incapable web client.</p> <p><a href="frame-summary.html">Click here to view a non-frame version.</a></p> </body> cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/html/JavaToHtml.java0000644000175000017500000002443611343534514031221 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting.html; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; public class JavaToHtml { // Could use a J2SE 5.0 enum instead of this. public abstract static class State { public final static int COMMENT_JAVADOC = 0; public final static int COMMENT_MULTI = 1; public final static int COMMENT_SINGLE = 2; public final static int DEFAULT = 3; public final static int KEYWORD = 4; public final static int IMPORT_NAME = 5; public final static int PACKAGE_NAME = 6; public final static int QUOTE_DOUBLE = 8; public final static int QUOTE_SINGLE = 9; } // TODO: Set a style for JavaDoc tags //private static final Collection javaJavaDocTags; private static final Collection javaKeywords; private static final Collection javaPrimitiveLiterals; private static final Collection javaPrimitiveTypes; static { // TODO: Probably need to add anything new in J2SE 5.0 //final String javaJavaDocTagsArray[] = { "see", "author", "version", "param", "return", "exception", // "deprecated", "throws", "link", "since", "serial", "serialField", "serialData", "beaninfo" }; final String[] javaKeywordsArray = { "abstract", "assert", "break", "case", "catch", "class", "const", "continue", "default", "do", "else", "extends", "final", "finally", "for", "goto", "if", "interface", "implements", "import", "instanceof", "native", "new", "package", "private", "protected", "public", "return", "static", "strictfp", "super", "switch", "synchronized", "this", "throw", "throws", "transient", "try", "volatile", "while" }; final String javaPrimitiveTypesArray[] = { "boolean", "byte", "char", "double", "float", "int", "long", "short", "void" }; final String javaPrimitiveLiteralsArray[] = { "false", "null", "true" }; //javaJavaDocTags = new HashSet(Arrays.asList(javaJavaDocTagsArray)); javaKeywords = new HashSet(Arrays.asList(javaKeywordsArray)); javaPrimitiveTypes = new HashSet(Arrays .asList(javaPrimitiveTypesArray)); javaPrimitiveLiterals = new HashSet(Arrays .asList(javaPrimitiveLiteralsArray)); } private int state = State.DEFAULT; private static String escapeEntity(final char character) { if (character == '&') return "&"; else if (character == '<') return "<"; else if (character == '>') return ">"; else if (character == '\t') return " "; else return new Character(character).toString(); } /** * Add HTML colorization to a block of Java code. * * @param text The block of Java code. * @return The same block of Java code with added span tags. * Newlines are preserved. */ public String process(final String text) { if (text == null) throw new IllegalArgumentException("\"text\" can not be null."); StringBuffer ret = new StringBuffer(); // This look is really complicated because it preserves all // combinations of \r, \n, \r\n, and \n\r int begin, end, nextCR; begin = 0; end = text.indexOf('\n', begin); nextCR = text.indexOf('\r', begin); if ((nextCR != -1) && ((end == -1) || (nextCR < end))) end = nextCR; while (end != -1) { ret.append(processLine(text.substring(begin, end)) + "
"); if ((end + 1 < text.length()) && ((text.charAt(end + 1) == '\n') || (text .charAt(end + 1) == '\r'))) { ret.append(text.substring(end, end + 1)); begin = end + 2; } else { ret.append(text.charAt(end)); begin = end + 1; } end = text.indexOf('\n', begin); nextCR = text.indexOf('\r', begin); if ((nextCR != -1) && ((end == -1) || (nextCR < end))) end = nextCR; } ret.append(processLine(text.substring(begin))); return ret.toString(); } /** * Add HTML colorization to a single line of Java code. * * @param line One line of Java code. * @return The same line of Java code with added span tags. */ private String processLine(final String line) { if (line == null) throw new IllegalArgumentException("\"line\" can not be null."); if ((line.indexOf('\n') != -1) || (line.indexOf('\r') != -1)) throw new IllegalArgumentException( "\"line\" can not contain newline or carriage return characters."); StringBuffer ret = new StringBuffer(); int currentIndex = 0; while (currentIndex != line.length()) { if (state == State.DEFAULT) { if ((currentIndex + 2 < line.length()) && line.substring(currentIndex, currentIndex + 3) .equals("/**")) { state = State.COMMENT_JAVADOC; } else if ((currentIndex + 1 < line.length()) && line.substring(currentIndex, currentIndex + 2) .equals("/*")) { state = State.COMMENT_MULTI; } else if ((currentIndex + 1 < line.length()) && (line.substring(currentIndex, currentIndex + 2) .equals("//"))) { state = State.COMMENT_SINGLE; } else if (Character.isJavaIdentifierStart(line .charAt(currentIndex))) { state = State.KEYWORD; } else if (line.charAt(currentIndex) == '\'') { state = State.QUOTE_SINGLE; } else if (line.charAt(currentIndex) == '"') { state = State.QUOTE_DOUBLE; } else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } } // End of State.DEFAULT else if ((state == State.COMMENT_MULTI) || (state == State.COMMENT_JAVADOC)) { // Print everything from the current character until the // closing */ No exceptions. ret.append(""); while ((currentIndex != line.length()) && !((currentIndex + 1 < line.length()) && (line .substring(currentIndex, currentIndex + 2) .equals("*/")))) { ret.append(escapeEntity(line.charAt(currentIndex++))); } if (currentIndex == line.length()) { ret.append(""); } else { ret.append("*/"); state = State.DEFAULT; currentIndex += 2; } } // End of State.COMMENT_MULTI else if (state == State.COMMENT_SINGLE) { // Print everything from the current character until the // end of the line ret.append(""); while (currentIndex != line.length()) { ret.append(escapeEntity(line.charAt(currentIndex++))); } ret.append(""); state = State.DEFAULT; } // End of State.COMMENT_SINGLE else if (state == State.KEYWORD) { StringBuffer tmp = new StringBuffer(); do { tmp.append(line.charAt(currentIndex++)); } while ((currentIndex != line.length()) && (Character.isJavaIdentifierPart(line .charAt(currentIndex)))); if (javaKeywords.contains(tmp.toString())) ret.append("" + tmp + ""); else if (javaPrimitiveLiterals.contains(tmp.toString())) ret.append("" + tmp + ""); else if (javaPrimitiveTypes.contains(tmp.toString())) ret.append("" + tmp + ""); else ret.append(tmp); if (tmp.toString().equals("import")) state = State.IMPORT_NAME; else if (tmp.toString().equals("package")) state = State.PACKAGE_NAME; else state = State.DEFAULT; } // End of State.KEYWORD else if (state == State.IMPORT_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.IMPORT_NAME else if (state == State.PACKAGE_NAME) { ret.append(escapeEntity(line.charAt(currentIndex++))); state = State.DEFAULT; } // End of State.PACKAGE_NAME else if (state == State.QUOTE_DOUBLE) { // Print everything from the current character until the // closing ", checking for \" ret.append(""); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '"') || ((line .charAt(currentIndex - 1) == '\\') && (line .charAt(currentIndex - 2) != '\\')))); if (currentIndex == line.length()) { ret.append(""); } else { ret.append("\""); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_DOUBLE else if (state == State.QUOTE_SINGLE) { // Print everything from the current character until the // closing ', checking for \' ret.append(""); do { ret.append(escapeEntity(line.charAt(currentIndex++))); } while ((currentIndex != line.length()) && (!(line.charAt(currentIndex) == '\'') || ((line .charAt(currentIndex - 1) == '\\') && (line .charAt(currentIndex - 2) != '\\')))); if (currentIndex == line.length()) { ret.append(""); } else { ret.append("\'"); state = State.DEFAULT; currentIndex++; } } // End of State.QUOTE_SINGLE else { // Default: No highlighting. ret.append(escapeEntity(line.charAt(currentIndex++))); } // End of unknown state } return ret.toString(); } /** * Reset the state of this Java parser. Call this if you have * been parsing one Java file and you want to begin parsing * another Java file. * */ public void reset() { state = State.DEFAULT; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/Main.java0000644000175000017500000001261011343534514027117 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Jeremy Thomerson * Copyright (C) 2005 Grzegorz Lukasik * Copyright (C) 2006 Dan Godfrey * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting; import java.io.File; import net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler; import net.sourceforge.cobertura.coveragedata.ProjectData; import net.sourceforge.cobertura.reporting.html.HTMLReport; import net.sourceforge.cobertura.reporting.xml.SummaryXMLReport; import net.sourceforge.cobertura.reporting.xml.XMLReport; import net.sourceforge.cobertura.util.CommandLineBuilder; import net.sourceforge.cobertura.util.FileFinder; import net.sourceforge.cobertura.util.Header; import org.apache.log4j.Logger; public class Main { private static final Logger LOGGER = Logger.getLogger(Main.class); private String format = "html"; private File dataFile = null; private File destinationDir = null; private String encoding = "UTF-8"; private void parseArguments(String[] args) throws Exception { FileFinder finder = new FileFinder(); String baseDir = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) { baseDir = args[++i]; } else if (args[i].equals("--datafile")) { setDataFile( args[++i]); } else if (args[i].equals("--destination")) { setDestination( args[++i]); } else if (args[i].equals("--format")) { setFormat( args[++i]); } else if (args[i].equals("--encoding")) { setEncoding( args[++i]); } else { if( baseDir==null) { finder.addSourceDirectory( args[i]); } else { finder.addSourceFile( baseDir, args[i]); } } } if (dataFile == null) dataFile = CoverageDataFileHandler.getDefaultDataFile(); if (destinationDir == null) { System.err.println("Error: destination directory must be set"); System.exit(1); } if (format == null) { System.err.println("Error: format must be set"); System.exit(1); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("format is " + format + " encoding is " + encoding); LOGGER.debug("dataFile is " + dataFile.getAbsolutePath()); LOGGER.debug("destinationDir is " + destinationDir.getAbsolutePath()); } ProjectData projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } ComplexityCalculator complexity = new ComplexityCalculator(finder); if (format.equalsIgnoreCase("html")) { new HTMLReport(projectData, destinationDir, finder, complexity, encoding); } else if (format.equalsIgnoreCase("xml")) { new XMLReport(projectData, destinationDir, finder, complexity); } else if (format.equalsIgnoreCase("summaryXml")) { new SummaryXMLReport(projectData, destinationDir, finder, complexity); } } private void setFormat(String value) { format = value; if (!format.equalsIgnoreCase("html") && !format.equalsIgnoreCase("xml") && !format.equalsIgnoreCase("summaryXml")) { System.err.println("" + "Error: format \"" + format + "\" is invalid. Must be either html or xml or summaryXml" ); System.exit(1); } } private void setDataFile(String value) { dataFile = new File(value); if (!dataFile.exists()) { System.err.println("Error: data file " + dataFile.getAbsolutePath() + " does not exist"); System.exit(1); } if (!dataFile.isFile()) { System.err.println("Error: data file " + dataFile.getAbsolutePath() + " must be a regular file"); System.exit(1); } } private void setDestination(String value) { destinationDir = new File(value); if (destinationDir.exists() && !destinationDir.isDirectory()) { System.err.println("Error: destination directory " + destinationDir + " already exists but is not a directory"); System.exit(1); } destinationDir.mkdirs(); } private void setEncoding(String encoding){ this.encoding = encoding; } public static void main(String[] args) throws Exception { Header.print(System.out); long startTime = System.currentTimeMillis(); Main main = new Main(); try { args = CommandLineBuilder.preprocessCommandLineArguments( args); } catch( Exception ex) { System.err.println( "Error: Cannot process arguments: " + ex.getMessage()); System.exit(1); } main.parseArguments(args); long stopTime = System.currentTimeMillis(); System.out.println("Report time: " + (stopTime - startTime) + "ms"); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/ComplexityCalculator.java0000644000175000017500000002233011343534513032401 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Jeremy Thomerson * Copyright (C) 2005 Grzegorz Lukasik * Copyright (C) 2008 Tri Bao Ho * Copyright (C) 2009 John Lewis * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting; import java.io.IOException; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import net.sourceforge.cobertura.coveragedata.ClassData; import net.sourceforge.cobertura.coveragedata.PackageData; import net.sourceforge.cobertura.coveragedata.ProjectData; import net.sourceforge.cobertura.coveragedata.SourceFileData; import net.sourceforge.cobertura.javancss.FunctionMetric; import net.sourceforge.cobertura.javancss.Javancss; import net.sourceforge.cobertura.util.FileFinder; import net.sourceforge.cobertura.util.Source; import org.apache.log4j.Logger; /** * Allows complexity computing for source files, packages and a whole project. Average * McCabe's number for methods contained in the specified entity is returned. This class * depends on FileFinder which is used to map source file names to existing files. * *

One instance of this class should be used for the same set of source files - an * object of this class can cache computed results.

* * @author Grzegorz Lukasik */ public class ComplexityCalculator { private static final Logger logger = Logger.getLogger(ComplexityCalculator.class); public static final Complexity ZERO_COMPLEXITY = new Complexity(); // Finder used to map source file names to existing files private final FileFinder finder; // Contains pairs (String sourceFileName, Complexity complexity) private Map sourceFileCNNCache = new HashMap(); // Contains pairs (String packageName, Complexity complexity) private Map packageCNNCache = new HashMap(); /** * Creates new calculator. Passed {@link FileFinder} will be used to * map source file names to existing files when needed. * * @param finder {@link FileFinder} that allows to find source files * @throws NullPointerException if finder is null */ public ComplexityCalculator( FileFinder finder) { if( finder==null) throw new NullPointerException(); this.finder = finder; } /** * Calculates the code complexity number for an input stream. * "CCN" stands for "code complexity number." This is * sometimes referred to as McCabe's number. This method * calculates the average cyclomatic code complexity of all * methods of all classes in a given directory. * * @param file The input stream for which you want to calculate * the complexity * @return average complexity for the specified input stream */ private Complexity getAccumlatedCCNForSource(String sourceFileName, Source source) { if (source == null) { return ZERO_COMPLEXITY; } if (!sourceFileName.endsWith(".java")) { return ZERO_COMPLEXITY; } Javancss javancss = new Javancss(source.getInputStream()); if (javancss.getLastErrorMessage() != null) { //there is an error while parsing the java file. log it logger.warn("JavaNCSS got an error while parsing the java " + source.getOriginDesc() + "\n" + javancss.getLastErrorMessage()); } List methodMetrics = javancss.getFunctionMetrics(); int classCcn = 0; for( Iterator method = methodMetrics.iterator(); method.hasNext();) { FunctionMetric singleMethodMetrics = (FunctionMetric)method.next(); classCcn += singleMethodMetrics.ccn; } return new Complexity( classCcn, methodMetrics.size()); } /** * Calculates the code complexity number for single source file. * "CCN" stands for "code complexity number." This is * sometimes referred to as McCabe's number. This method * calculates the average cyclomatic code complexity of all * methods of all classes in a given directory. * @param sourceFileName * * @param file The source file for which you want to calculate * the complexity * @return average complexity for the specified source file * @throws IOException */ private Complexity getAccumlatedCCNForSingleFile(String sourceFileName) throws IOException { Source source = finder.getSource(sourceFileName); try { return getAccumlatedCCNForSource(sourceFileName, source); } finally { if (source != null) { source.close(); } } } /** * Computes CCN for all sources contained in the project. * CCN for whole project is an average CCN for source files. * All source files for which CCN cannot be computed are ignored. * * @param projectData project to compute CCN for * @throws NullPointerException if projectData is null * @return CCN for project or 0 if no source files were found */ public double getCCNForProject( ProjectData projectData) { // Sum complexity for all packages Complexity act = new Complexity(); for( Iterator it = projectData.getPackages().iterator(); it.hasNext();) { PackageData packageData = (PackageData)it.next(); act.add( getCCNForPackageInternal( packageData)); } // Return average CCN for source files return act.averageCCN(); } /** * Computes CCN for all sources contained in the specified package. * All source files that cannot be mapped to existing files are ignored. * * @param packageData package to compute CCN for * @throws NullPointerException if packageData is null * @return CCN for the specified package or 0 if no source files were found */ public double getCCNForPackage(PackageData packageData) { return getCCNForPackageInternal(packageData).averageCCN(); } private Complexity getCCNForPackageInternal(PackageData packageData) { // Return CCN if computed earlier Complexity cachedCCN = (Complexity) packageCNNCache.get( packageData.getName()); if( cachedCCN!=null) { return cachedCCN; } // Compute CCN for all source files inside package Complexity act = new Complexity(); for( Iterator it = packageData.getSourceFiles().iterator(); it.hasNext();) { SourceFileData sourceData = (SourceFileData)it.next(); act.add( getCCNForSourceFileNameInternal( sourceData.getName())); } // Cache result and return it packageCNNCache.put( packageData.getName(), act); return act; } /** * Computes CCN for single source file. * * @param sourceFile source file to compute CCN for * @throws NullPointerException if sourceFile is null * @return CCN for the specified source file, 0 if cannot map sourceFile to existing file */ public double getCCNForSourceFile(SourceFileData sourceFile) { return getCCNForSourceFileNameInternal( sourceFile.getName()).averageCCN(); } private Complexity getCCNForSourceFileNameInternal(String sourceFileName) { // Return CCN if computed earlier Complexity cachedCCN = (Complexity) sourceFileCNNCache.get( sourceFileName); if( cachedCCN!=null) { return cachedCCN; } // Compute CCN and cache it for further use Complexity result = ZERO_COMPLEXITY; try { result = getAccumlatedCCNForSingleFile( sourceFileName ); } catch( IOException ex) { logger.info( "Cannot find source file during CCN computation, source=["+sourceFileName+"]"); } sourceFileCNNCache.put( sourceFileName, result); return result; } /** * Computes CCN for source file the specified class belongs to. * * @param classData package to compute CCN for * @return CCN for source file the specified class belongs to * @throws NullPointerException if classData is null */ public double getCCNForClass(ClassData classData) { return getCCNForSourceFileNameInternal( classData.getSourceFileName()).averageCCN(); } /** * Represents complexity of source file, package or project. Stores the number of * methods inside entity and accumlated complexity for these methods. */ private static class Complexity { private double accumlatedCCN; private int methodsNum; public Complexity(double accumlatedCCN, int methodsNum) { this.accumlatedCCN = accumlatedCCN; this.methodsNum = methodsNum; } public Complexity() { this(0,0); } public double averageCCN() { if( methodsNum==0) { return 0; } return accumlatedCCN/methodsNum; } public void add( Complexity second) { accumlatedCCN += second.accumlatedCCN; methodsNum += second.methodsNum; } } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/xml/0000755000175000017500000000000011345540725026173 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/xml/XMLReport.java0000644000175000017500000002365411343534521030677 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Jeremy Thomerson * Copyright (C) 2006 Jiri Mares * Copyright (C) 2008 Julian Gamble * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting.xml; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.Collection; import java.util.Date; import java.util.Iterator; import java.util.SortedSet; import java.util.TreeSet; import net.sourceforge.cobertura.coveragedata.ClassData; import net.sourceforge.cobertura.coveragedata.JumpData; import net.sourceforge.cobertura.coveragedata.LineData; import net.sourceforge.cobertura.coveragedata.PackageData; import net.sourceforge.cobertura.coveragedata.ProjectData; import net.sourceforge.cobertura.coveragedata.SourceFileData; import net.sourceforge.cobertura.coveragedata.SwitchData; import net.sourceforge.cobertura.reporting.ComplexityCalculator; import net.sourceforge.cobertura.util.FileFinder; import net.sourceforge.cobertura.util.Header; import net.sourceforge.cobertura.util.IOUtil; import net.sourceforge.cobertura.util.StringUtil; import org.apache.log4j.Logger; public class XMLReport { private static final Logger logger = Logger.getLogger(XMLReport.class); protected final static String coverageDTD = "coverage-04.dtd"; private final PrintWriter pw; private final FileFinder finder; private final ComplexityCalculator complexity; private int indent = 0; public XMLReport(ProjectData projectData, File destinationDir, FileFinder finder, ComplexityCalculator complexity) throws IOException { this.complexity = complexity; this.finder = finder; File file = new File(destinationDir, "coverage.xml"); pw = IOUtil.getPrintWriter(file); try { println(""); println(""); println(""); double ccn = complexity.getCCNForProject(projectData); int numLinesCovered = projectData.getNumberOfCoveredLines(); int numLinesValid = projectData.getNumberOfValidLines(); int numBranchesCovered = projectData.getNumberOfCoveredBranches(); int numBranchesValid = projectData.getNumberOfValidBranches(); // TODO: Set a schema? //println(""); println( ""); increaseIndentation(); dumpSources(); dumpPackages(projectData); decreaseIndentation(); println(""); } finally { pw.close(); } } void increaseIndentation() { indent++; } void decreaseIndentation() { if (indent > 0) indent--; } void indent() { for (int i = 0; i < indent; i++) { pw.print("\t"); } } void println(String ln) { indent(); pw.println(ln); } private void dumpSources() { println(""); increaseIndentation(); for (Iterator it = finder.getSourceDirectoryList().iterator(); it.hasNext(); ) { String dir = (String) it.next(); dumpSource(dir); } decreaseIndentation(); println(""); } private void dumpSource(String sourceDirectory) { println("" + sourceDirectory + ""); } private void dumpPackages(ProjectData projectData) { println(""); increaseIndentation(); Iterator it = projectData.getPackages().iterator(); while (it.hasNext()) { dumpPackage((PackageData)it.next()); } decreaseIndentation(); println(""); } private void dumpPackage(PackageData packageData) { logger.debug("Dumping package " + packageData.getName()); println(""); increaseIndentation(); dumpSourceFiles(packageData); decreaseIndentation(); println(""); } private void dumpSourceFiles(PackageData packageData) { println(""); increaseIndentation(); Iterator it = packageData.getSourceFiles().iterator(); while (it.hasNext()) { dumpClasses((SourceFileData)it.next()); } decreaseIndentation(); println(""); } private void dumpClasses(SourceFileData sourceFileData) { Iterator it = sourceFileData.getClasses().iterator(); while (it.hasNext()) { dumpClass((ClassData)it.next()); } } private void dumpClass(ClassData classData) { logger.debug("Dumping class " + classData.getName()); println(""); increaseIndentation(); dumpMethods(classData); dumpLines(classData); decreaseIndentation(); println(""); } private void dumpMethods(ClassData classData) { println(""); increaseIndentation(); SortedSet sortedMethods = new TreeSet(); sortedMethods.addAll(classData.getMethodNamesAndDescriptors()); Iterator iter = sortedMethods.iterator(); while (iter.hasNext()) { dumpMethod(classData, (String)iter.next()); } decreaseIndentation(); println(""); } private void dumpMethod(ClassData classData, String nameAndSig) { String name = nameAndSig.substring(0, nameAndSig.indexOf('(')); String signature = nameAndSig.substring(nameAndSig.indexOf('(')); double lineRate = classData.getLineCoverageRate(nameAndSig); double branchRate = classData.getBranchCoverageRate(nameAndSig); println(""); increaseIndentation(); dumpLines(classData, nameAndSig); decreaseIndentation(); println(""); } private static String xmlEscape(String str) { str = StringUtil.replaceAll(str, "<", "<"); str = StringUtil.replaceAll(str, ">", ">"); return str; } private void dumpLines(ClassData classData) { dumpLines(classData.getLines()); } private void dumpLines(ClassData classData, String methodNameAndSig) { dumpLines(classData.getLines(methodNameAndSig)); } private void dumpLines(Collection lines) { println(""); increaseIndentation(); SortedSet sortedLines = new TreeSet(); sortedLines.addAll(lines); Iterator iter = sortedLines.iterator(); while (iter.hasNext()) { dumpLine((LineData)iter.next()); } decreaseIndentation(); println(""); } private void dumpLine(LineData lineData) { int lineNumber = lineData.getLineNumber(); long hitCount = lineData.getHits(); boolean hasBranch = lineData.hasBranch(); String conditionCoverage = lineData.getConditionCoverage(); String lineInfo = ""); dumpConditions(lineData); println(""); } else { println(lineInfo + "/>"); } } private void dumpConditions(LineData lineData) { increaseIndentation(); println(""); for (int i = 0; i < lineData.getConditionSize(); i++) { Object conditionData = lineData.getConditionData(i); String coverage = lineData.getConditionCoverage(i); dumpCondition(conditionData, coverage); } println(""); decreaseIndentation(); } private void dumpCondition(Object conditionData, String coverage) { increaseIndentation(); StringBuffer buffer = new StringBuffer(""); println(buffer.toString()); decreaseIndentation(); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/reporting/xml/SummaryXMLReport.java0000644000175000017500000000651011343534516032251 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2008 Julian Gamble * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.reporting.xml; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.Date; import net.sourceforge.cobertura.coveragedata.ProjectData; import net.sourceforge.cobertura.reporting.ComplexityCalculator; import net.sourceforge.cobertura.util.FileFinder; import net.sourceforge.cobertura.util.Header; import net.sourceforge.cobertura.util.IOUtil; public class SummaryXMLReport { private final PrintWriter pw; private int indent = 0; public SummaryXMLReport(ProjectData projectData, File destinationDir, FileFinder finder, ComplexityCalculator complexity) throws IOException { File file = new File(destinationDir, "coverage-summary.xml"); pw = IOUtil.getPrintWriter(file); try { println(""); println(""); println(""); double ccn = complexity.getCCNForProject(projectData); int numLinesCovered = projectData.getNumberOfCoveredLines(); int numLinesValid = projectData.getNumberOfValidLines(); int numBranchesCovered = projectData.getNumberOfCoveredBranches(); int numBranchesValid = projectData.getNumberOfValidBranches(); // TODO: Set a schema? //println(""); println( ""); //the DTD requires a "packages" element increaseIndentation(); println(""); decreaseIndentation(); println(""); } finally { pw.close(); } } void increaseIndentation() { indent++; } void decreaseIndentation() { if (indent > 0) indent--; } private void println(String ln) { indent(); pw.println(ln); } private void indent() { for (int i = 0; i < indent; i++) { pw.print("\t"); } } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/0000755000175000017500000000000011345540725025572 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/Archive.java0000644000175000017500000000524611343534515030023 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 John Lewis * Copyright (C) 2006 Mark Doliner * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.instrument; import java.io.ByteArrayInputStream; import java.io.InputStream; /** * This class represents an archive within an archive. * * @author John Lewis */ class Archive { private byte[] bytes; private boolean modified; private CoberturaFile file; /** * Create an object that holds a buffer to an archive that is within a parent archive. * * @param file The parent archive on the hard drive that holds the child archive. * @param bytes The contents of the child archive. */ Archive(CoberturaFile file, byte[] bytes) { this.bytes = bytes; this.file = file; } /** * Return an input stream for the contents of this archive (the child). * * @return An InputStream for the contents. */ InputStream getInputStream() { return new ByteArrayInputStream(this.bytes); } /** * Set this archive's bytes after they have been modified via instrumentation. * * @param bytes The new contents of the archive (instrumented). */ void setModifiedBytes(byte[] bytes) { this.bytes = bytes; this.modified = true; } /** * Return true if this archive has been modified (instrumented). * * @return true if modified. */ boolean isModified() { return modified; } /** * Return the contents of this archive. * * @return A byte array with the contents of this archive. */ byte[] getBytes() { return this.bytes; } /** * Returns the parent archive that contains this archive. * * @return A CoberturaFile representing the parent archive. */ CoberturaFile getCoberturaFile() { return this.file; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/ClassPattern.java0000644000175000017500000000724311343534520031040 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.instrument; import java.util.Collection; import java.util.HashSet; import net.sourceforge.cobertura.util.RegexUtil; /** * This class represents a collection of regular expressions that will be used to see * if a classname matches them. * * Regular expressions are specified by calling add methods. If no add methods are * called, this class will match any classname. * * @author John Lewis * */ public class ClassPattern { private Collection includeClassesRegexes = new HashSet(); private Collection excludeClassesRegexes = new HashSet(); private static final String WEBINF_CLASSES = "WEB-INF/classes/"; /** * Returns true if any regular expressions have been specified by calling the * add methods. If none are specified, this class matches anything. * * @return true if any regular expressions have been specified */ boolean isSpecified() { return includeClassesRegexes.size() > 0; } /** * Check to see if a class matches this ClassPattern * * If a pattern has not been specified, this matches anything. * * This method also looks for "WEB-INF/classes" at the beginning of the * classname. It is removed before checking for a match. * * @param filename Either a full classname or a full class filename * @return true if the classname matches this ClassPattern or if this ClassPattern * has not been specified. */ boolean matches(String filename) { boolean matches = true; if (isSpecified()) { matches = false; // Remove .class extension if it exists if (filename.endsWith(".class")) { filename = filename.substring(0, filename.length() - 6); } filename = filename.replace('\\', '/'); filename = removeAnyWebInfClassesString(filename); filename = filename.replace('/', '.'); if (RegexUtil.matches(includeClassesRegexes, filename)) { matches = true; } if (matches && RegexUtil.matches(excludeClassesRegexes, filename)) { matches = false; } } return matches; } private String removeAnyWebInfClassesString(String filename) { if (filename.startsWith(WEBINF_CLASSES)) { filename = filename.substring(WEBINF_CLASSES.length()); } return filename; } /** * Add a regex to the list of class regexes to include. * * @param regex A regular expression to add. */ void addIncludeClassesRegex(String regex) { RegexUtil.addRegex(includeClassesRegexes, regex); } /** * Add a regex to the list of class regexes to exclude. * * @param regex */ void addExcludeClassesRegex(String regex) { RegexUtil.addRegex(excludeClassesRegexes, regex); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/SecondPassMethodInstrumenter.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/SecondPassMethodInstrumenter.ja0000644000175000017500000002514011343534521033726 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * Copyright (C) 2006 Jiri Mares * Copyright (C) 2010 Piotr Tabor * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.instrument; import net.sourceforge.cobertura.util.RegexUtil; import org.objectweb.asm.Label; import org.objectweb.asm.Opcodes; /* * TODO: If class is abstract then do not count the "public abstract class bleh" line as a SLOC. */ public class SecondPassMethodInstrumenter extends NewLocalVariableMethodAdapter implements Opcodes { private String TOUCH_COLLECTOR_CLASS="net/sourceforge/cobertura/coveragedata/TouchCollector"; private int currentLine; private int currentJump; private boolean methodStarted; private int myVariableIndex; private Label startLabel; private Label endLabel; private JumpHolder lastJump; private FirstPassMethodInstrumenter firstPass; private static final int BOOLEAN_TRUE = ICONST_0; private static final int BOOLEAN_FALSE = ICONST_1; public SecondPassMethodInstrumenter(FirstPassMethodInstrumenter firstPass) { super(firstPass.getWriterMethodVisitor(), firstPass.getMyAccess(), firstPass.getMyDescriptor(), 2); this.firstPass = firstPass; this.currentLine = 0; } public void visitJumpInsn(int opcode, Label label) { //to touch the previous branch (when there is such) touchBranchFalse(); // Ignore any jump instructions in the "class init" method. // When initializing static variables, the JVM first checks // that the variable is null before attempting to set it. // This check contains an IFNONNULL jump instruction which // would confuse people if it showed up in the reports. if ((opcode != GOTO) && (opcode != JSR) && (currentLine != 0) && (!this.firstPass.getMyName().equals(""))) { lastJump = new JumpHolder(currentLine, currentJump++); mv.visitIntInsn(SIPUSH, currentLine); mv.visitVarInsn(ISTORE, myVariableIndex); mv.visitIntInsn(SIPUSH, lastJump.getJumpNumber()); mv.visitVarInsn(ISTORE, myVariableIndex + 1); } super.visitJumpInsn(opcode, label); } public void visitLineNumber(int line, Label start) { // Record initial information about this line of code currentLine = line; currentJump = 0; instrumentOwnerClass(); // Mark the current line number as covered: // classData.touch(line) mv.visitIntInsn(SIPUSH, line); mv.visitMethodInsn(INVOKESTATIC, TOUCH_COLLECTOR_CLASS, "touch", "(Ljava/lang/String;I)V"); super.visitLineNumber(line, start); } public void visitMethodInsn(int opcode, String owner, String name, String desc) { //to touch the previous branch (when there is such) touchBranchFalse(); super.visitMethodInsn(opcode, owner, name, desc); // If any of the ignore patterns match this line // then remove it from our data if (RegexUtil.matches(firstPass.getIgnoreRegexs(), owner)) { firstPass.removeLine(currentLine); } } public void visitFieldInsn(int opcode, String owner, String name, String desc) { //to touch the previous branch (when there is such) touchBranchFalse(); super.visitFieldInsn(opcode, owner, name, desc); } public void visitIincInsn(int var, int increment) { //to touch the previous branch (when there is such) touchBranchFalse(); super.visitIincInsn(var, increment); } public void visitInsn(int opcode) { //to touch the previous branch (when there is such) touchBranchFalse(); super.visitInsn(opcode); } public void visitIntInsn(int opcode, int operand) { //to touch the previous branch (when there is such) touchBranchFalse(); super.visitIntInsn(opcode, operand); } public void visitLabel(Label label) { //When this is the first method's label ... create the 2 new local variables (lineNumber and branchNumber) if (methodStarted) { methodStarted = false; myVariableIndex = getFirstStackVariable(); mv.visitInsn(ICONST_0); mv.visitVarInsn(ISTORE, myVariableIndex); mv.visitIntInsn(SIPUSH, -1); mv.visitVarInsn(ISTORE, myVariableIndex + 1); startLabel = label; } //to have the last label for visitLocalVariable endLabel = label; super.visitLabel(label); //instrument the branch coverage collection if (firstPass.getJumpTargetLabels().keySet().contains(label)) { //this label is the true branch label if (lastJump != null) { //this is also label after jump - we have to check the branch number whether this is the true or false branch Label newLabelX = instrumentIsLastJump(); instrumentOwnerClass(); instrumentPutLineAndBranchNumbers(); mv.visitInsn(BOOLEAN_FALSE); instrumentInvokeTouchJump(); Label newLabelY = new Label(); mv.visitJumpInsn(GOTO, newLabelY); mv.visitLabel(newLabelX); mv.visitVarInsn(ILOAD, myVariableIndex + 1); mv.visitJumpInsn(IFLT, newLabelY); instrumentOwnerClass(); instrumentPutLineAndBranchNumbers(); mv.visitInsn(BOOLEAN_TRUE); instrumentInvokeTouchJump(); mv.visitLabel(newLabelY); } else { //just hit te true branch //just check whether the jump has been invoked or the label has been touched other way mv.visitVarInsn(ILOAD, myVariableIndex + 1); Label newLabelX = new Label(); mv.visitJumpInsn(IFLT, newLabelX); instrumentJumpHit(true); mv.visitLabel(newLabelX); } } else if (lastJump != null) { //this is "only" after jump label, hit the false branch only if the lastJump is same as stored stack lineNumber and jumpNumber Label newLabelX = instrumentIsLastJump(); instrumentJumpHit(false); mv.visitLabel(newLabelX); } lastJump = null; SwitchHolder sh = (SwitchHolder) firstPass.getSwitchTargetLabels().get(label); if (sh != null) { instrumentSwitchHit(sh.getLineNumber(), sh.getSwitchNumber(), sh.getBranch()); } //we have to manually invoke the visitLineNumber because of not correct MedthodNode's handling Integer line = (Integer) firstPass.getLineLabels().get(label); if (line != null) { visitLineNumber(line.intValue(), label); } } public void visitLdcInsn(Object cst) { //to touch the previous branch (when there is such) touchBranchFalse(); super.visitLdcInsn(cst); } public void visitMultiANewArrayInsn(String desc, int dims) { //to touch the previous branch (when there is such) touchBranchFalse(); super.visitMultiANewArrayInsn(desc, dims); } public void visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels) { //to touch the previous branch (when there is such) touchBranchFalse(); super.visitLookupSwitchInsn(dflt, keys, labels); } public void visitTableSwitchInsn(int min, int max, Label dflt, Label[] labels) { //to touch the previous branch (when there is such) touchBranchFalse(); super.visitTableSwitchInsn(min, max, dflt, labels); } public void visitTryCatchBlock(Label start, Label end, Label handler, String type) { //to touch the previous branch (when there is such) touchBranchFalse(); super.visitTryCatchBlock(start, end, handler, type); } public void visitTypeInsn(int opcode, String desc) { //to touch the previous branch (when there is such) touchBranchFalse(); super.visitTypeInsn(opcode, desc); } public void visitVarInsn(int opcode, int var) { //to touch the previous branch (when there is such) touchBranchFalse(); //this is to change the variable instructions to conform to 2 new variables super.visitVarInsn(opcode, var); } public void visitCode() { methodStarted = true; super.visitCode(); } private void touchBranchFalse() { if (lastJump != null) { lastJump = null; instrumentJumpHit(false); } } private void instrumentOwnerClass() { // OwnerClass is the name of the class being instrumented mv.visitLdcInsn(firstPass.getOwnerClass()); } private void instrumentSwitchHit(int lineNumber, int switchNumber, int branch) { instrumentOwnerClass(); //Invoke the touchSwitch(lineNumber, switchNumber, branch) mv.visitIntInsn(SIPUSH, lineNumber); mv.visitIntInsn(SIPUSH, switchNumber); mv.visitIntInsn(SIPUSH, branch); instrumentInvokeTouchSwitch(); } private void instrumentJumpHit(boolean branch) { instrumentOwnerClass(); //Invoke the touchJump(lineNumber, branchNumber, branch) instrumentPutLineAndBranchNumbers(); mv.visitInsn(branch ? BOOLEAN_TRUE : BOOLEAN_FALSE); instrumentInvokeTouchJump(); } private void instrumentInvokeTouchJump() { mv.visitMethodInsn(INVOKESTATIC, TOUCH_COLLECTOR_CLASS, "touchJump", "(Ljava/lang/String;IIZ)V"); mv.visitIntInsn(SIPUSH, -1); //is important to reset current branch, because we have to know that the branch info on stack has already been used and can't be used mv.visitVarInsn(ISTORE, myVariableIndex + 1); } private void instrumentInvokeTouchSwitch() { mv.visitMethodInsn(INVOKESTATIC, TOUCH_COLLECTOR_CLASS, "touchSwitch", "(Ljava/lang/String;III)V"); } private void instrumentPutLineAndBranchNumbers() { mv.visitVarInsn(ILOAD, myVariableIndex); mv.visitVarInsn(ILOAD, myVariableIndex + 1); } private Label instrumentIsLastJump() { mv.visitVarInsn(ILOAD, myVariableIndex); mv.visitIntInsn(SIPUSH, lastJump.getLineNumber()); Label newLabelX = new Label(); mv.visitJumpInsn(IF_ICMPNE, newLabelX); mv.visitVarInsn(ILOAD, myVariableIndex + 1); mv.visitIntInsn(SIPUSH, lastJump.getJumpNumber()); mv.visitJumpInsn(IF_ICMPNE, newLabelX); return newLabelX; } public void visitMaxs(int maxStack, int maxLocals) { mv.visitLocalVariable("__cobertura__line__number__", "I", null, startLabel, endLabel, myVariableIndex); mv.visitLocalVariable("__cobertura__branch__number__", "I", null, startLabel, endLabel, myVariableIndex + 1); super.visitMaxs(maxStack, maxLocals); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/JumpHolder.java0000644000175000017500000000234411343534521030504 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.instrument; public class JumpHolder { protected int lineNumber; protected int jumpNumber; public JumpHolder(int lineNumber, int jumpNumber) { super(); this.lineNumber = lineNumber; this.jumpNumber = jumpNumber; } public int getJumpNumber() { return jumpNumber; } public int getLineNumber() { return lineNumber; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/SwitchHolder.java0000644000175000017500000000231211343534514031027 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.instrument; public class SwitchHolder extends JumpHolder { protected int branch; public SwitchHolder(int lineNumber, int switchNumber, int branch) { super(lineNumber, switchNumber); this.branch = branch; } public int getSwitchNumber() { return jumpNumber; } public int getBranch() { return branch; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/CoberturaFile.java0000644000175000017500000000430711343534521031162 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.instrument; import java.io.File; import net.sourceforge.cobertura.util.ArchiveUtil; /** * This represents a regular File, but unlike java.io.File, the baseDir and * relative pathname used to create it are saved for later use. * * @author John Lewis */ class CoberturaFile extends File { private static final long serialVersionUID = 0L; private String baseDir; private String pathname; CoberturaFile(String baseDir, String pathname) { super(baseDir, pathname); this.baseDir = baseDir; this.pathname = pathname; } public String getBaseDir() { return baseDir; } public String getPathname() { return pathname; } /** * @return True if file has an extension that matches one of the * standard java archives, false otherwise. */ boolean isArchive() { if (!isFile()) { return false; } return ArchiveUtil.isArchive(pathname); } /** * @return True if file has "class" as its extension, * false otherwise. */ boolean isClass() { return isFile() && pathname.endsWith(".class"); } public String toString() { return "pathname=" + pathname + " and baseDir=" + baseDir; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/Main.java0000644000175000017500000003504711343534513027326 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Joakim Erdfelt * Copyright (C) 2005 Grzegorz Lukasik * Copyright (C) 2006 John Lewis * Copyright (C) 2006 Jiri Mares * Contact information for the above is given in the COPYRIGHT file. * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.instrument; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Vector; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; import net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler; import net.sourceforge.cobertura.coveragedata.ProjectData; import net.sourceforge.cobertura.util.ArchiveUtil; import net.sourceforge.cobertura.util.CommandLineBuilder; import net.sourceforge.cobertura.util.Header; import net.sourceforge.cobertura.util.IOUtil; import net.sourceforge.cobertura.util.RegexUtil; import org.apache.log4j.Logger; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassWriter; /** *

* Add coverage instrumentation to existing classes. *

* *

What does that mean, exactly?

*

* It means Cobertura will look at each class you give it. It * loads the bytecode into memory. For each line of source, * Cobertura adds a few extra instructions. These instructions * do the following: *

* *
    *
  1. Get an instance of the ProjectData class.
  2. *
  3. Call a method in this ProjectData class that increments * a counter for this line of code. *
* *

* After every line in a class has been "instrumented," Cobertura * edits the bytecode for the class one more time and adds * "implements net.sourceforge.cobertura.coveragedata.HasBeenInstrumented" * This is basically just a flag used internally by Cobertura to * determine whether a class has been instrumented or not, so * as not to instrument the same class twice. *

*/ public class Main { private static final Logger logger = Logger.getLogger(Main.class); private File destinationDirectory = null; private Collection ignoreRegexes = new Vector(); private Collection ignoreBranchesRegexes = new Vector(); private ClassPattern classPattern = new ClassPattern(); private ProjectData projectData = null; /** * @param entry A zip entry. * @return True if the specified entry has "class" as its extension, * false otherwise. */ private static boolean isClass(ZipEntry entry) { return entry.getName().endsWith(".class"); } private boolean addInstrumentationToArchive(CoberturaFile file, InputStream archive, OutputStream output) throws Exception { ZipInputStream zis = null; ZipOutputStream zos = null; try { zis = new ZipInputStream(archive); zos = new ZipOutputStream(output); return addInstrumentationToArchive(file, zis, zos); } finally { zis = (ZipInputStream)IOUtil.closeInputStream(zis); zos = (ZipOutputStream)IOUtil.closeOutputStream(zos); } } private boolean addInstrumentationToArchive(CoberturaFile file, ZipInputStream archive, ZipOutputStream output) throws Exception { /* * "modified" is returned and indicates that something was instrumented. * If nothing is instrumented, the original entry will be used by the * caller of this method. */ boolean modified = false; ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { String entryName = entry.getName(); /* * If this is a signature file then don't copy it, * but don't set modified to true. If the only * thing we do is strip the signature, just use * the original entry. */ if (ArchiveUtil.isSignatureFile(entry.getName())) { continue; } ZipEntry outputEntry = new ZipEntry(entry.getName()); outputEntry.setComment(entry.getComment()); outputEntry.setExtra(entry.getExtra()); outputEntry.setTime(entry.getTime()); output.putNextEntry(outputEntry); // Read current entry byte[] entryBytes = IOUtil .createByteArrayFromInputStream(archive); // Instrument embedded archives if a classPattern has been specified if ((classPattern.isSpecified()) && ArchiveUtil.isArchive(entryName)) { Archive archiveObj = new Archive(file, entryBytes); addInstrumentationToArchive(archiveObj); if (archiveObj.isModified()) { modified = true; entryBytes = archiveObj.getBytes(); outputEntry.setTime(System.currentTimeMillis()); } } else if (isClass(entry) && classPattern.matches(entryName)) { try { // Instrument class ClassReader cr = new ClassReader(entryBytes); ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); ClassInstrumenter cv = new ClassInstrumenter(projectData, cw, ignoreRegexes, ignoreBranchesRegexes); cr.accept(cv, 0); // If class was instrumented, get bytes that define the // class if (cv.isInstrumented()) { logger.debug("Putting instrumented entry: " + entry.getName()); entryBytes = cw.toByteArray(); modified = true; outputEntry.setTime(System.currentTimeMillis()); } } catch (Throwable t) { if (entry.getName().endsWith("_Stub.class")) { //no big deal - it is probably an RMI stub, and they don't need to be instrumented logger.debug("Problems instrumenting archive entry: " + entry.getName(), t); } else { logger.warn("Problems instrumenting archive entry: " + entry.getName(), t); } } } // Add entry to the output output.write(entryBytes); output.closeEntry(); archive.closeEntry(); } catch (Exception e) { logger.warn("Problems with archive entry: " + entry.getName(), e); } catch (Throwable t) { logger.warn("Problems with archive entry: " + entry.getName(), t); } output.flush(); } return modified; } private void addInstrumentationToArchive(Archive archive) throws Exception { InputStream in = null; ByteArrayOutputStream out = null; try { in = archive.getInputStream(); out = new ByteArrayOutputStream(); boolean modified = addInstrumentationToArchive(archive.getCoberturaFile(), in, out); if (modified) { out.flush(); byte[] bytes = out.toByteArray(); archive.setModifiedBytes(bytes); } } finally { in = IOUtil.closeInputStream(in); out = (ByteArrayOutputStream)IOUtil.closeOutputStream(out); } } private void addInstrumentationToArchive(CoberturaFile archive) { logger.debug("Instrumenting archive " + archive.getAbsolutePath()); File outputFile = null; ZipInputStream input = null; ZipOutputStream output = null; boolean modified = false; try { // Open archive try { input = new ZipInputStream(new FileInputStream(archive)); } catch (FileNotFoundException e) { logger.warn("Cannot open archive file: " + archive.getAbsolutePath(), e); return; } // Open output archive try { // check if destination folder is set if (destinationDirectory != null) { // if so, create output file in it outputFile = new File(destinationDirectory, archive.getPathname()); } else { // otherwise create output file in temporary location outputFile = File.createTempFile( "CoberturaInstrumentedArchive", "jar"); outputFile.deleteOnExit(); } output = new ZipOutputStream(new FileOutputStream(outputFile)); } catch (IOException e) { logger.warn("Cannot open file for instrumented archive: " + archive.getAbsolutePath(), e); return; } // Instrument classes in archive try { modified = addInstrumentationToArchive(archive, input, output); } catch (Throwable e) { logger.warn("Cannot instrument archive: " + archive.getAbsolutePath(), e); return; } } finally { input = (ZipInputStream)IOUtil.closeInputStream(input); output = (ZipOutputStream)IOUtil.closeOutputStream(output); } // If destination folder was not set, overwrite orginal archive with // instrumented one if (modified && (destinationDirectory == null)) { try { logger.debug("Moving " + outputFile.getAbsolutePath() + " to " + archive.getAbsolutePath()); IOUtil.moveFile(outputFile, archive); } catch (IOException e) { logger.warn("Cannot instrument archive: " + archive.getAbsolutePath(), e); return; } } if ((destinationDirectory != null) && (!modified)) { outputFile.delete(); } } private void addInstrumentationToSingleClass(File file) { logger.debug("Instrumenting class " + file.getAbsolutePath()); InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); cv = new ClassInstrumenter(projectData, cw, ignoreRegexes, ignoreBranchesRegexes); cr.accept(cv, 0); } catch (Throwable t) { logger.warn("Unable to instrument file " + file.getAbsolutePath(), t); return; } finally { inputStream = IOUtil.closeInputStream(inputStream); } OutputStream outputStream = null; try { if (cv.isInstrumented()) { // If destinationDirectory is null, then overwrite // the original, uninstrumented file. File outputFile; if (destinationDirectory == null) outputFile = file; else outputFile = new File(destinationDirectory, cv .getClassName().replace('.', File.separatorChar) + ".class"); File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } byte[] instrumentedClass = cw.toByteArray(); outputStream = new FileOutputStream(outputFile); outputStream.write(instrumentedClass); } } catch (Throwable t) { logger.warn("Unable to instrument file " + file.getAbsolutePath(), t); return; } finally { outputStream = IOUtil.closeOutputStream(outputStream); } } // TODO: Don't attempt to instrument a file if the outputFile already // exists and is newer than the input file, and the output and // input file are in different locations? private void addInstrumentation(CoberturaFile coberturaFile) { if (coberturaFile.isClass() && classPattern.matches(coberturaFile.getPathname())) { addInstrumentationToSingleClass(coberturaFile); } else if (coberturaFile.isDirectory()) { String[] contents = coberturaFile.list(); for (int i = 0; i < contents.length; i++) { File relativeFile = new File(coberturaFile.getPathname(), contents[i]); CoberturaFile relativeCoberturaFile = new CoberturaFile(coberturaFile.getBaseDir(), relativeFile.toString()); //recursion! addInstrumentation(relativeCoberturaFile); } } } private void parseArguments(String[] args) { File dataFile = CoverageDataFileHandler.getDefaultDataFile(); // Parse our parameters List filePaths = new ArrayList(); String baseDir = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--basedir")) baseDir = args[++i]; else if (args[i].equals("--datafile")) dataFile = new File(args[++i]); else if (args[i].equals("--destination")) destinationDirectory = new File(args[++i]); else if (args[i].equals("--ignore")) { RegexUtil.addRegex(ignoreRegexes, args[++i]); } else if (args[i].equals("--ignoreBranches")) { RegexUtil.addRegex(ignoreBranchesRegexes, args[++i]); } else if (args[i].equals("--includeClasses")) { classPattern.addIncludeClassesRegex(args[++i]); } else if (args[i].equals("--excludeClasses")) { classPattern.addExcludeClassesRegex(args[++i]); } else { CoberturaFile coberturaFile = new CoberturaFile(baseDir, args[i]); filePaths.add(coberturaFile); } } // Load coverage data if (dataFile.isFile()) projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) projectData = new ProjectData(); // Instrument classes System.out.println("Instrumenting " + filePaths.size() + " " + (filePaths.size() == 1 ? "file" : "files") + (destinationDirectory != null ? " to " + destinationDirectory.getAbsoluteFile() : "")); Iterator iter = filePaths.iterator(); while (iter.hasNext()) { CoberturaFile coberturaFile = (CoberturaFile)iter.next(); if (coberturaFile.isArchive()) { addInstrumentationToArchive(coberturaFile); } else { addInstrumentation(coberturaFile); } } // Save coverage data CoverageDataFileHandler.saveCoverageData(projectData, dataFile); } public static void main(String[] args) { Header.print(System.out); long startTime = System.currentTimeMillis(); Main main = new Main(); try { args = CommandLineBuilder.preprocessCommandLineArguments( args); } catch( Exception ex) { System.err.println( "Error: Cannot process arguments: " + ex.getMessage()); System.exit(1); } main.parseArguments(args); long stopTime = System.currentTimeMillis(); System.out.println("Instrument time: " + (stopTime - startTime) + "ms"); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/ClassInstrumenter.java0000644000175000017500000001041111343534521032112 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.instrument; import java.util.Collection; import net.sourceforge.cobertura.coveragedata.ClassData; import net.sourceforge.cobertura.coveragedata.ProjectData; import org.apache.log4j.Logger; import org.objectweb.asm.ClassAdapter; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; class ClassInstrumenter extends ClassAdapter { private static final Logger logger = Logger .getLogger(ClassInstrumenter.class); private final static String hasBeenInstrumented = "net/sourceforge/cobertura/coveragedata/HasBeenInstrumented"; private Collection ignoreRegexs; private Collection ignoreBranchesRegexs; private ProjectData projectData; private ClassData classData; private String myName; private boolean instrument = false; public String getClassName() { return this.myName; } public boolean isInstrumented() { return instrument; } public ClassInstrumenter(ProjectData projectData, final ClassVisitor cv, final Collection ignoreRegexs, final Collection ignoreBranchesRegexes) { super(cv); this.projectData = projectData; this.ignoreRegexs = ignoreRegexs; this.ignoreBranchesRegexs = ignoreBranchesRegexs; } private boolean arrayContains(Object[] array, Object key) { for (int i = 0; i < array.length; i++) { if (array[i].equals(key)) return true; } return false; } /** * @param name In the format * "net/sourceforge/cobertura/coverage/ClassInstrumenter" */ public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { this.myName = name.replace('/', '.'); this.classData = this.projectData.getOrCreateClassData(this.myName); this.classData.setContainsInstrumentationInfo(); // Do not attempt to instrument interfaces or classes that // have already been instrumented if (((access & Opcodes.ACC_INTERFACE) != 0) || arrayContains(interfaces, hasBeenInstrumented)) { super.visit(version, access, name, signature, superName, interfaces); } else { instrument = true; // Flag this class as having been instrumented String[] newInterfaces = new String[interfaces.length + 1]; System.arraycopy(interfaces, 0, newInterfaces, 0, interfaces.length); newInterfaces[newInterfaces.length - 1] = hasBeenInstrumented; super.visit(version, access, name, signature, superName, newInterfaces); } } /** * @param source In the format "ClassInstrumenter.java" */ public void visitSource(String source, String debug) { super.visitSource(source, debug); classData.setSourceFileName(source); } public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { MethodVisitor mv = cv.visitMethod(access, name, desc, signature, exceptions); if (!instrument) return mv; return mv == null ? null : new FirstPassMethodInstrumenter(classData, mv, this.myName, access, name, desc, signature, exceptions, ignoreRegexs, ignoreBranchesRegexs); } public void visitEnd() { if (instrument && classData.getNumberOfValidLines() == 0) logger.warn("No line number information found for class " + this.myName + ". Perhaps you need to compile with debug=true?"); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/FirstPassMethodInstrumenter.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/FirstPassMethodInstrumenter.jav0000644000175000017500000001425511343534517034002 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.instrument; import java.util.Collection; import java.util.HashMap; import java.util.Map; import net.sourceforge.cobertura.coveragedata.ClassData; import net.sourceforge.cobertura.util.RegexUtil; import org.objectweb.asm.Label; import org.objectweb.asm.MethodAdapter; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.MethodNode; public class FirstPassMethodInstrumenter extends MethodAdapter implements Opcodes { private final String ownerClass; private String myName; private String myDescriptor; private int myAccess; private Collection ignoreRegexs; private Collection ignoreBranchesRegexs; private ClassData classData; private int currentLine; private int currentJump; private int currentSwitch; private Map jumpTargetLabels; private Map switchTargetLabels; private Map lineLabels; private MethodVisitor writerMethodVisitor; private MethodNode methodNode; public FirstPassMethodInstrumenter(ClassData classData, final MethodVisitor mv, final String owner, final int access, final String name, final String desc, final String signature, final String[] exceptions, final Collection ignoreRegexs, final Collection ignoreBranchesRegexs) { super(new MethodNode(access, name, desc, signature, exceptions)); writerMethodVisitor = mv; this.ownerClass = owner; this.methodNode = (MethodNode) this.mv; this.classData = classData; this.myAccess = access; this.myName = name; this.myDescriptor = desc; this.ignoreRegexs = ignoreRegexs; this.ignoreBranchesRegexs = ignoreBranchesRegexs; this.jumpTargetLabels = new HashMap(); this.switchTargetLabels = new HashMap(); this.lineLabels = new HashMap(); this.currentLine = 0; } public void visitEnd() { super.visitEnd(); methodNode.accept(lineLabels.isEmpty() ? writerMethodVisitor : new SecondPassMethodInstrumenter(this)); //when there is no line number info -> no instrumentation } public void visitJumpInsn(int opcode, Label label) { // Ignore any jump instructions in the "class init" method. // When initializing static variables, the JVM first checks // that the variable is null before attempting to set it. // This check contains an IFNONNULL jump instruction which // would confuse people if it showed up in the reports. if ((opcode != GOTO) && (opcode != JSR) && (currentLine != 0) && (!this.myName.equals(""))) { classData.addLineJump(currentLine, currentJump); jumpTargetLabels.put(label, new JumpHolder(currentLine, currentJump++)); } super.visitJumpInsn(opcode, label); } public void visitLineNumber(int line, Label start) { // Record initial information about this line of code currentLine = line; classData.addLine(currentLine, myName, myDescriptor); currentJump = 0; currentSwitch = 0; lineLabels.put(start, new Integer(line)); //removed because the MethodNode doesn't reproduce visitLineNumber where they are but at the end of the file :-(( //therefore we don't need them //We can directly instrument the visit line number here, but it is better to leave all instrumentation in the second pass //therefore we just collects what label is the line ... //super.visitLineNumber(line, start); } public void visitMethodInsn(int opcode, String owner, String name, String desc) { super.visitMethodInsn(opcode, owner, name, desc); // If any of the ignore patterns match this line // then remove it from our data if (RegexUtil.matches(ignoreRegexs, owner)) { classData.removeLine(currentLine); } } public void visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels) { super.visitLookupSwitchInsn(dflt, keys, labels); if (currentLine != 0) { switchTargetLabels.put(dflt, new SwitchHolder(currentLine, currentSwitch, -1)); for (int i = labels.length -1; i >=0; i--) switchTargetLabels.put(labels[i], new SwitchHolder(currentLine, currentSwitch, i)); classData.addLineSwitch(currentLine, currentSwitch++, keys); } } public void visitTableSwitchInsn(int min, int max, Label dflt, Label[] labels) { super.visitTableSwitchInsn(min, max, dflt, labels); if (currentLine != 0) { switchTargetLabels.put(dflt, new SwitchHolder(currentLine, currentSwitch, -1)); for (int i = labels.length -1; i >=0; i--) switchTargetLabels.put(labels[i], new SwitchHolder(currentLine, currentSwitch, i)); classData.addLineSwitch(currentLine, currentSwitch++, min, max); } } protected void removeLine(int lineNumber) { classData.removeLine(lineNumber); } protected MethodVisitor getWriterMethodVisitor() { return writerMethodVisitor; } protected Collection getIgnoreRegexs() { return ignoreRegexs; } protected Map getJumpTargetLabels() { return jumpTargetLabels; } protected Map getSwitchTargetLabels() { return switchTargetLabels; } protected int getMyAccess() { return myAccess; } protected String getMyDescriptor() { return myDescriptor; } protected String getMyName() { return myName; } protected String getOwnerClass() { return ownerClass; } protected Map getLineLabels() { return lineLabels; } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/NewLocalVariableMethodAdapter.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/instrument/NewLocalVariableMethodAdapter.j0000644000175000017500000000445711343534517033573 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.instrument; import org.objectweb.asm.Label; import org.objectweb.asm.MethodAdapter; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; /** * Expects that the visitMaxs is calculated for me .... */ public class NewLocalVariableMethodAdapter extends MethodAdapter implements Opcodes { protected int firstStackVariable; protected int addedStackWords; public NewLocalVariableMethodAdapter(MethodVisitor mv, int access, String desc, int addedStackWords) { super(mv); Type[] args = Type.getArgumentTypes(desc); firstStackVariable = ((ACC_STATIC & access) != 0) ? 0 : 1; for (int i = 0; i < args.length; i++) { firstStackVariable += args[i].getSize(); } this.addedStackWords = addedStackWords; } public void visitVarInsn(int opcode, int var) { mv.visitVarInsn(opcode, (var >= firstStackVariable) ? var + addedStackWords : var); } public void visitIincInsn(int var, int increment) { mv.visitIincInsn((var >= firstStackVariable) ? var + addedStackWords : var, increment); } public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index) { mv.visitLocalVariable(name, desc, signature, start, end, (index >= firstStackVariable) ? index + addedStackWords : index); } public int getAddedStackWords() { return addedStackWords; } public int getFirstStackVariable() { return firstStackVariable; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/0000755000175000017500000000000011345540725024144 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/Regex.java0000644000175000017500000000630611343534514026063 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.ant; public class Regex { String pattern; String lineRate; String branchRate; public void setPattern(String pattern) { this.pattern = pattern; } public void setBranchRate(String branchRate) { this.branchRate = branchRate; } public void setLineRate(String lineRate) { this.lineRate = lineRate; } public String toString() { StringBuffer sb = new StringBuffer(); sb.append(pattern); sb.append(':'); sb.append(lineRate); sb.append(':'); sb.append(branchRate); return sb.toString(); } }cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/CheckTask.java0000644000175000017500000001444511343534522026653 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Nathan Wilson * Copyright (C) 2005 Alex Ruiz * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.ant; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import org.apache.tools.ant.BuildException; /** * An ant task that can be used to optionally fail an ant build if * the coverage percentage for lines or branches is below a certain, * user specifiable threshold. */ public class CheckTask extends CommonMatchingTask { private String dataFile = null; final Set regexes = new HashSet(); private String branchRate = null; private String lineRate = null; private String packageBranchRate = null; private String packageLineRate = null; private String totalBranchRate = null; private String totalLineRate = null; private String failureProperty = null; private boolean haltOnFailure = true; public CheckTask() { super("net.sourceforge.cobertura.check.Main"); } public void execute() throws BuildException { if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } if (branchRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchRate); } if (lineRate != null) { getJava().createArg().setValue("--line"); getJava().createArg().setValue(lineRate); } if (packageBranchRate != null) { getJava().createArg().setValue("--packagebranch"); getJava().createArg().setValue(packageBranchRate); } if (packageLineRate != null) { getJava().createArg().setValue("--packageline"); getJava().createArg().setValue(packageLineRate); } if (totalBranchRate != null) { getJava().createArg().setValue("--totalbranch"); getJava().createArg().setValue(totalBranchRate); } if (totalLineRate != null) { getJava().createArg().setValue("--totalline"); getJava().createArg().setValue(totalLineRate); } Iterator iter = regexes.iterator(); while (iter.hasNext()) { getJava().createArg().setValue("--regex"); getJava().createArg().setValue(iter.next().toString()); } AntUtil.transferCoberturaDataFileProperty(getJava()); int returnCode = getJava().executeJava(); // Check the return code and print a message if (returnCode == 0) { System.out.println("All checks passed."); } else { if (haltOnFailure) throw new BuildException( "Coverage check failed. See messages above."); else if (failureProperty != null) getProject().setProperty(failureProperty, "true"); else System.err .println("Coverage check failed. See messages above."); } } public Regex createRegex() { Regex regex = new Regex(); regexes.add(regex); return regex; } public void setDataFile(String dataFile) { this.dataFile = dataFile; } public void setBranchRate(String branchRate) { this.branchRate = branchRate; } public void setLineRate(String lineRate) { this.lineRate = lineRate; } public void setPackageBranchRate(String packageBranchRate) { this.packageBranchRate = packageBranchRate; } public void setPackageLineRate(String packageLineRate) { this.packageLineRate = packageLineRate; } public void setTotalBranchRate(String totalBranchRate) { this.totalBranchRate = totalBranchRate; } public void setTotalLineRate(String totalLineRate) { this.totalLineRate = totalLineRate; } public void setFailureProperty(String failureProperty) { this.failureProperty = failureProperty; } public void setHaltOnFailure(boolean haltOnFailure) { this.haltOnFailure = haltOnFailure; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/ExcludeClasses.java0000644000175000017500000000556711343534514027730 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2006 John Lewis * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.ant; public class ExcludeClasses { String regex; public void setRegex(String regex) { this.regex = regex; } public String getRegex() { return regex; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/CommonMatchingTask.java0000644000175000017500000002044211343534517030537 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Joakim Erdfelt * Copyright (C) 2005 Grzegorz Lukasik * Copyright (C) 2006 Srivathsan Varadarajan * Copyright (C) 2008 Matt Cordes * Copyright (C) 2008 John Lewis * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.ant; import java.io.File; import java.io.IOException; import java.net.URL; import java.net.URLClassLoader; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import net.sourceforge.cobertura.util.CommandLineBuilder; import net.sourceforge.cobertura.util.StringUtil; import org.apache.tools.ant.AntClassLoader; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Java; import org.apache.tools.ant.taskdefs.MatchingTask; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.AbstractFileSet; import org.apache.tools.ant.types.DirSet; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Reference; public abstract class CommonMatchingTask extends MatchingTask { final String className; final List fileSets = new LinkedList(); private Java java = null; private String maxMemory = null; private int forkedJVMDebugPort; public CommonMatchingTask(String className) { this.className = className; } private String getClassName() { return className; } protected Java getJava() { if (java == null) { java = (Java)getProject().createTask("java"); java.setTaskName(getTaskName()); java.setClassname(getClassName()); java.setFork(true); java.setDir(getProject().getBaseDir()); if (maxMemory != null) java.setJvmargs("-Xmx" + maxMemory); if (forkedJVMDebugPort > 0) { java.setJvmargs("-Xdebug"); java.setJvmargs("-Xrunjdwp:transport=dt_socket,address=" + forkedJVMDebugPort + ",server=y,suspend=y"); } /** * We replace %20 with a space character because, for some * reason, when we call Cobertura from within CruiseControl, * the classpath here contains %20's instead of spaces. I * don't know if this is our problem, or CruiseControl, or * ant, but this seems to fix it. --Mark */ if (getClass().getClassLoader() instanceof AntClassLoader) { String classpath = ((AntClassLoader)getClass() .getClassLoader()).getClasspath(); createClasspath().setPath( StringUtil.replaceAll(classpath, "%20", " ")); } else if (getClass().getClassLoader() instanceof URLClassLoader) { URL[] earls = ((URLClassLoader)getClass().getClassLoader()) .getURLs(); for (int i = 0; i < earls.length; i++) { String classpath = (new File(earls[i].getFile())).getAbsolutePath(); createClasspath().setPath( StringUtil.replaceAll(classpath, "%20", " ")); } } } return java; } protected void createArgumentsForFilesets( CommandLineBuilder builder) throws IOException { Iterator iter = fileSets.iterator(); boolean filesetFound = false; while (iter.hasNext()) { AbstractFileSet fileSet = (AbstractFileSet)iter.next(); if (fileSet instanceof FileSet) { filesetFound = true; builder.addArg("--basedir", baseDir(fileSet)); createArgumentsForFilenames( builder, getFilenames(fileSet)); } else { if (filesetFound) { /* * Once --basedir has been used, it cannot be undone without changes to the * Main methods. So, any dirsets have to come before filesets. */ throw new BuildException("Dirsets have to come before filesets"); } createArgumentsForFilenames( builder, getDirectoryScanner(fileSet).getIncludedDirectories()); } } } private void createArgumentsForFilenames( CommandLineBuilder builder, String[] filenames) throws IOException { for (int i = 0; i < filenames.length; i++) { getProject().log("Adding " + filenames[i] + " to list", Project.MSG_VERBOSE); builder.addArg(filenames[i]); } } public Path createClasspath() { return getJava().createClasspath().createPath(); } public void setClasspath(Path classpath) { createClasspath().append(classpath); } public void setClasspathRef(Reference r) { createClasspath().setRefid(r); } DirectoryScanner getDirectoryScanner(AbstractFileSet fileSet) { return fileSet.getDirectoryScanner(getProject()); } String[] getIncludedFiles(AbstractFileSet fileSet) { return getDirectoryScanner(fileSet).getIncludedFiles(); } String[] getExcludedFiles(FileSet fileSet) { return getDirectoryScanner(fileSet).getExcludedFiles(); } String[] getFilenames(AbstractFileSet fileSet) { String[] filesToReturn = getIncludedFiles(fileSet); return filesToReturn; } String baseDir(AbstractFileSet fileSet) { return fileSet.getDirectoryScanner(getProject()).getBasedir() .toString(); } public void addDirSet(DirSet dirSet) { fileSets.add(dirSet); } public void addFileset(FileSet fileSet) { fileSets.add(fileSet); } /** * @param maxMemory Assumed to be something along the lines of * 100M or 50K or 1G. */ public void setMaxMemory(String maxMemory) { this.maxMemory = maxMemory != null ? maxMemory.trim() : null; } /** * Used to debug the process that is forked to perform the operation. * Setting this to a non-zero number will cause the process to open * a debug port on that port number. It will suspend until a * remote debugger is attached to the port. * * @param forkedJVMDebugPort */ public void setForkedJVMDebugPort(int forkedJVMDebugPort) { this.forkedJVMDebugPort = forkedJVMDebugPort; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/package.html0000644000175000017500000000105111343534516026421 0ustar twernertwerner

The ant tasks for Cobertura and assorted helper classes.

The license for the ant tasks is different than the license for the rest of Cobertura (Apache Software License version 1.1 v. GPL version 2). The GPL prohibits linking GPL-licensed code with code licensed under a GPL-incompatible license such as the Apache Software License version 1.1. For this reason, the Cobertura ant tasks do not directly invoke the Cobertura classes. Rather, they invoke a JVM which runs the Cobertura classes.

cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/MergeTask.java0000644000175000017500000000776611343534514026706 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Joakim Erdfelt * Copyright (C) 2005 Grzegorz Lukasik * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.ant; import java.io.IOException; import net.sourceforge.cobertura.util.CommandLineBuilder; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; public class MergeTask extends CommonMatchingTask { private String dataFile = null; public MergeTask() { super("net.sourceforge.cobertura.merge.Main"); } public void execute() throws BuildException { CommandLineBuilder builder = null; try { builder = new CommandLineBuilder(); if (dataFile != null) builder.addArg("--datafile", dataFile); createArgumentsForFilesets(builder); builder.saveArgs(); } catch (IOException ioe) { getProject().log("Error creating commands file.", Project.MSG_ERR); throw new BuildException("Unable to create the commands file.", ioe); } // Execute GPL licensed code in separate virtual machine getJava().createArg().setValue("--commandsfile"); getJava().createArg().setValue(builder.getCommandLineFile()); AntUtil.transferCoberturaDataFileProperty(getJava()); if (getJava().executeJava() != 0) { throw new BuildException( "Error running reports. See messages above."); } builder.dispose(); } public void setDataFile(String dataFile) { this.dataFile = dataFile; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/antlib.xml0000644000175000017500000000056211343534521026135 0ustar twernertwerner cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/Ignore.java0000644000175000017500000000551511343534515026236 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.ant; public class Ignore { String regex; public void setRegex(String regex) { this.regex = regex; } public String getRegex() { return regex; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/AntUtil.java0000644000175000017500000000764311343534515026377 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2006 Mark Doliner * Copyright (C) 2006 John Lewis * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.ant; import org.apache.tools.ant.taskdefs.Java; import org.apache.tools.ant.types.Environment.Variable; abstract class AntUtil { /** * Used to transfer the net.sourceforge.cobertura.datafile property to a JVM * that is about to be forked. * * This is confusing, but it's required by our functional test. * What happens is, we have a JUnit test that runs ant to * instrument some classes. When the instrumentation is running, * we want to get the coverage info that is created by exercising * our instrumentation classes. * * So we pass in two different coverage files: * 1. The coverage data file command line parameter. This tells * the instrument task where to write the new coverage data. * 2. The coverage data system property. This tells the * instrumentation inside the instrumented classes where to * keep track of the line hit counts, etc. * * @param task The Java task that will do the forking. */ static void transferCoberturaDataFileProperty(Java task) { String coberturaProperty = System.getProperty("net.sourceforge.cobertura.datafile"); if (coberturaProperty != null) { Variable sysproperty = new Variable(); sysproperty.setKey("net.sourceforge.cobertura.datafile"); sysproperty.setValue(coberturaProperty); task.addSysproperty(sysproperty); } } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/IgnoreBranches.java0000644000175000017500000000545611343534515027710 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2006 Jiri Mares * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.ant; public class IgnoreBranches { String regex; public void setRegex(String regex) { this.regex = regex; } public String getRegex() { return regex; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/ReportTask.java0000644000175000017500000001146211343534520027103 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Jeremy Thomerson * Copyright (C) 2005 Grzegorz Lukasik * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.ant; import java.io.File; import java.io.IOException; import net.sourceforge.cobertura.util.CommandLineBuilder; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; /** * Generate a coverage report based on coverage data generated * by instrumented classes. */ public class ReportTask extends CommonMatchingTask { private String dataFile = null; private String format = "html"; private File destDir; private String srcDir; private String encoding; public ReportTask() { super("net.sourceforge.cobertura.reporting.Main"); } public void execute() throws BuildException { CommandLineBuilder builder = null; try { builder = new CommandLineBuilder(); if (dataFile != null) builder.addArg("--datafile", dataFile); if (destDir != null) builder.addArg("--destination", destDir.getAbsolutePath()); if (format != null) builder.addArg("--format", format); if (encoding != null) builder.addArg("--encoding", encoding); if (srcDir != null) builder.addArg(srcDir); createArgumentsForFilesets(builder); builder.saveArgs(); } catch (IOException ioe) { getProject().log("Error creating commands file.", Project.MSG_ERR); throw new BuildException("Unable to create the commands file.", ioe); } // Execute GPL licensed code in separate virtual machine getJava().createArg().setValue("--commandsfile"); getJava().createArg().setValue(builder.getCommandLineFile()); AntUtil.transferCoberturaDataFileProperty(getJava()); if (getJava().executeJava() != 0) { throw new BuildException( "Error running reports. See messages above."); } builder.dispose(); } public void setDataFile(String dataFile) { this.dataFile = dataFile; } public void setDestDir(File destDir) { this.destDir = destDir; } public void setFormat(String format) { this.format = format; } public void setEncoding(String encoding) { this.encoding = encoding; } public void setSrcDir(String dir) { srcDir = dir; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/InstrumentTask.java0000644000175000017500000002112011343534521027771 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Joakim Erdfelt * Copyright (C) 2005 Grzegorz Lukasik * Copyright (C) 2005 Alexei Yudichev * Copyright (C) 2006 John Lewis * Copyright (C) 2006 Jiri Mares * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.ant; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import net.sourceforge.cobertura.util.CommandLineBuilder; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.Path; public class InstrumentTask extends CommonMatchingTask { private String dataFile = null; private File toDir = null; List ignoreRegexs = new ArrayList(); List ignoreBranchesRegexs = new ArrayList(); List includeClassesRegexs = new ArrayList(); List excludeClassesRegexs = new ArrayList(); private Integer forkedJVMDebugPort; private Path instrumentationClasspath = null; private HashMap fileSetMap = new HashMap(); public InstrumentTask() { super("net.sourceforge.cobertura.instrument.Main"); } public Ignore createIgnore() { Ignore ignoreRegex = new Ignore(); ignoreRegexs.add(ignoreRegex); return ignoreRegex; } public IgnoreBranches createIgnoreBranches() { IgnoreBranches ignoreBranchesRegex = new IgnoreBranches(); ignoreBranchesRegexs.add(ignoreBranchesRegex); return ignoreBranchesRegex; } public IncludeClasses createIncludeClasses() { IncludeClasses includeClassesRegex = new IncludeClasses(); includeClassesRegexs.add(includeClassesRegex); return includeClassesRegex; } public ExcludeClasses createExcludeClasses() { ExcludeClasses excludeClassesRegex = new ExcludeClasses(); excludeClassesRegexs.add(excludeClassesRegex); return excludeClassesRegex; } public Path createInstrumentationClasspath() { if (instrumentationClasspath == null) { instrumentationClasspath = new Path(getProject()); } return instrumentationClasspath.createPath(); } /* * TODO: Is the following method needed to use a classpath ref? If so, * test it and uncomment it. */ /* public void setInstrumentationClasspathRef(Reference r) { createInstrumentationClasspath().setRefid(r); } */ public void execute() throws BuildException { CommandLineBuilder builder = null; try { builder = new CommandLineBuilder(); if (dataFile != null) builder.addArg("--datafile", dataFile); if (toDir != null) builder.addArg("--destination", toDir.getAbsolutePath()); for (int i = 0; i < ignoreRegexs.size(); i++) { Ignore ignoreRegex = (Ignore)ignoreRegexs.get(i); builder.addArg("--ignore", ignoreRegex.getRegex()); } for (int i = 0; i < ignoreBranchesRegexs.size(); i++) { IgnoreBranches ignoreBranchesRegex = (IgnoreBranches)ignoreBranchesRegexs.get(i); builder.addArg("--ignoreBranches", ignoreBranchesRegex.getRegex()); } for (int i = 0; i < includeClassesRegexs.size(); i++) { IncludeClasses includeClassesRegex = (IncludeClasses)includeClassesRegexs.get(i); builder.addArg("--includeClasses", includeClassesRegex.getRegex()); } for (int i = 0; i < excludeClassesRegexs.size(); i++) { ExcludeClasses excludeClassesRegex = (ExcludeClasses)excludeClassesRegexs.get(i); builder.addArg("--excludeClasses", excludeClassesRegex.getRegex()); } if (instrumentationClasspath != null) { processInstrumentationClasspath(); } createArgumentsForFilesets(builder); builder.saveArgs(); } catch (IOException ioe) { getProject().log("Error creating commands file.", Project.MSG_ERR); throw new BuildException("Unable to create the commands file.", ioe); } // Execute GPL licensed code in separate virtual machine getJava().createArg().setValue("--commandsfile"); getJava().createArg().setValue(builder.getCommandLineFile()); if (forkedJVMDebugPort != null && forkedJVMDebugPort.intValue() > 0) { getJava().createJvmarg().setValue("-Xdebug"); getJava().createJvmarg().setValue("-Xrunjdwp:transport=dt_socket,address=" + forkedJVMDebugPort + ",server=y,suspend=y"); } AntUtil.transferCoberturaDataFileProperty(getJava()); if (getJava().executeJava() != 0) { throw new BuildException( "Error instrumenting classes. See messages above."); } builder.dispose(); } private void processInstrumentationClasspath() { if (includeClassesRegexs.size() == 0) { throw new BuildException("'includeClasses' is required when 'instrumentationClasspath' is used"); } String[] sources = instrumentationClasspath.list(); for (int i = 0; i < sources.length; i++) { File fileOrDir = new File(sources[i]); if (fileOrDir.exists()) { if (fileOrDir.isDirectory()) { createFilesetForDirectory(fileOrDir); } else { addFileToFilesets(fileOrDir); } } } } private void addFileToFilesets(File file) { File dir = file.getParentFile(); String filename = file.getName(); FileSet fileSet = getFileSet(dir); fileSet.createInclude().setName(filename); } private FileSet getFileSet(File dir) { String key = dir.getAbsolutePath(); FileSet fileSet = (FileSet)fileSetMap.get(key); if (fileSet == null) { fileSet = new FileSet(); fileSet.setProject(getProject()); fileSet.setDir(dir); // Now add the new fileset to the map and to the fileSets list fileSetMap.put(key, fileSet); addFileset(fileSet); } return fileSet; } private void createFilesetForDirectory(File dir) { FileSet fileSet = getFileSet(dir); fileSet.createInclude().setName("**/*.class"); } public void setDataFile(String dataFile) { this.dataFile = dataFile; } public void setToDir(File toDir) { this.toDir = toDir; } public void setForkedJVMDebugPort(Integer forkedJVMDebugPort) { this.forkedJVMDebugPort = forkedJVMDebugPort; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/ant/IncludeClasses.java0000644000175000017500000000556711343534520027717 0ustar twernertwerner/* * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2006 John Lewis * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.ant; public class IncludeClasses { String regex; public void setRegex(String regex) { this.regex = regex; } public String getRegex() { return regex; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/check/0000755000175000017500000000000011345540725024437 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/check/Main.java0000644000175000017500000002777011343534521026176 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Nathan Wilson * Copyright (C) 2009 Charlie Squires * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.check; import java.io.File; import java.math.BigDecimal; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.StringTokenizer; import net.sourceforge.cobertura.coveragedata.ClassData; import net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler; import net.sourceforge.cobertura.coveragedata.ProjectData; import net.sourceforge.cobertura.util.Header; import org.apache.log4j.Logger; import org.apache.oro.text.regex.MalformedPatternException; import org.apache.oro.text.regex.Pattern; import org.apache.oro.text.regex.Perl5Compiler; import org.apache.oro.text.regex.Perl5Matcher; public class Main { private static final Logger logger = Logger.getLogger(Main.class); final Perl5Matcher pm = new Perl5Matcher(); final Perl5Compiler pc = new Perl5Compiler(); /** * The default CoverageRate needed for a class to pass the check. */ CoverageRate minimumCoverageRate; /** * The keys of this map contain regular expression Patterns that * match against classes. The values of this map contain * CoverageRate objects that specify the minimum coverage rates * needed for a class that matches the pattern. */ Map minimumCoverageRates = new HashMap(); /** * The keys of this map contain package names. The values of this * map contain PackageCoverage objects that track the line and * branch coverage values for a package. */ Map packageCoverageMap = new HashMap(); double inRangeAndDivideByOneHundred(String coverageRateAsPercentage) { return inRangeAndDivideByOneHundred(Integer.valueOf( coverageRateAsPercentage).intValue()); } double inRangeAndDivideByOneHundred(int coverageRateAsPercentage) { if ((coverageRateAsPercentage >= 0) && (coverageRateAsPercentage <= 100)) { return (double)coverageRateAsPercentage / 100; } throw new IllegalArgumentException("The value " + coverageRateAsPercentage + "% is invalid. Percentages must be between 0 and 100."); } void setMinimumCoverageRate(String minimumCoverageRate) throws MalformedPatternException { StringTokenizer tokenizer = new StringTokenizer(minimumCoverageRate, ":"); this.minimumCoverageRates.put(pc.compile(tokenizer.nextToken()), new CoverageRate(inRangeAndDivideByOneHundred(tokenizer .nextToken()), inRangeAndDivideByOneHundred(tokenizer .nextToken()))); } /** * This method returns the CoverageRate object that * applies to the given class. If checks if there is a * pattern that matches the class name, and returns that * if it finds one. Otherwise it uses the global minimum * rates that were passed in. */ CoverageRate findMinimumCoverageRate(String classname) { Iterator iter = this.minimumCoverageRates.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry)iter.next(); if (pm.matches(classname, (Pattern)entry.getKey())) { return (CoverageRate)entry.getValue(); } } return this.minimumCoverageRate; } public Main(String[] args) throws MalformedPatternException { int exitStatus = 0; Header.print(System.out); File dataFile = CoverageDataFileHandler.getDefaultDataFile(); double branchCoverageRate = -1.0; double lineCoverageRate = -1.0; double packageBranchCoverageRate = -1.0; double packageLineCoverageRate = -1.0; double totalBranchCoverageRate = -1.0; double totalLineCoverageRate = -1.0; for (int i = 0; i < args.length; i++) { if (args[i].equals("--branch")) { branchCoverageRate = inRangeAndDivideByOneHundred(args[++i]); } else if (args[i].equals("--datafile")) { dataFile = new File(args[++i]); } else if (args[i].equals("--line")) { lineCoverageRate = inRangeAndDivideByOneHundred(args[++i]); } else if (args[i].equals("--regex")) { setMinimumCoverageRate(args[++i]); } else if (args[i].equals("--packagebranch")) { packageBranchCoverageRate = inRangeAndDivideByOneHundred(args[++i]); } else if (args[i].equals("--packageline")) { packageLineCoverageRate = inRangeAndDivideByOneHundred(args[++i]); } else if (args[i].equals("--totalbranch")) { totalBranchCoverageRate = inRangeAndDivideByOneHundred(args[++i]); } else if (args[i].equals("--totalline")) { totalLineCoverageRate = inRangeAndDivideByOneHundred(args[++i]); } } ProjectData projectData = CoverageDataFileHandler .loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } // If they didn't specify any thresholds, then use some defaults if ((branchCoverageRate == -1.0) && (lineCoverageRate == -1.0) && (packageLineCoverageRate == -1.0) && (packageBranchCoverageRate == -1.0) && (totalLineCoverageRate == -1.0) && (totalBranchCoverageRate == -1.0) && (this.minimumCoverageRates.size() == 0)) { branchCoverageRate = 0.5; lineCoverageRate = 0.5; packageBranchCoverageRate = 0.5; packageLineCoverageRate = 0.5; totalBranchCoverageRate = 0.5; totalLineCoverageRate = 0.5; } // If they specified one or more thresholds, default everything else to 0 else { if (branchCoverageRate == -1.0) branchCoverageRate = 0.0; if (lineCoverageRate == -1.0) lineCoverageRate = 0.0; if (packageLineCoverageRate == -1.0) packageLineCoverageRate = 0.0; if (packageBranchCoverageRate == -1.0) packageBranchCoverageRate = 0.0; if (totalLineCoverageRate == -1.0) totalLineCoverageRate = 0.0; if (totalBranchCoverageRate == -1.0) totalBranchCoverageRate = 0.0; } this.minimumCoverageRate = new CoverageRate(lineCoverageRate, branchCoverageRate); double totalLines = 0; double totalLinesCovered = 0; double totalBranches = 0; double totalBranchesCovered = 0; Iterator iter = projectData.getClasses().iterator(); while (iter.hasNext()) { ClassData classData = (ClassData)iter.next(); CoverageRate coverageRate = findMinimumCoverageRate(classData .getName()); if (totalBranchCoverageRate > 0.0) { totalBranches += classData.getNumberOfValidBranches(); totalBranchesCovered += classData.getNumberOfCoveredBranches(); } if (totalLineCoverageRate > 0.0) { totalLines += classData.getNumberOfValidLines(); totalLinesCovered += classData.getNumberOfCoveredLines(); } PackageCoverage packageCoverage = getPackageCoverage(classData .getPackageName()); if (packageBranchCoverageRate > 0.0) { packageCoverage.addBranchCount(classData .getNumberOfValidBranches()); packageCoverage.addBranchCoverage(classData .getNumberOfCoveredBranches()); } if (packageLineCoverageRate > 0.0) { packageCoverage.addLineCount(classData.getNumberOfValidLines()); packageCoverage.addLineCoverage(classData .getNumberOfCoveredLines()); } logger.debug("Class " + classData.getName() + ", line coverage rate: " + percentage(classData.getLineCoverageRate()) + "%, branch coverage rate: " + percentage(classData.getBranchCoverageRate()) + "%"); if (classData.getBranchCoverageRate() < coverageRate .getBranchCoverageRate()) { System.err.println(classData.getName() + " failed check. Branch coverage rate of " + percentage(classData.getBranchCoverageRate()) + "% is below " + percentage(coverageRate.getBranchCoverageRate()) + "%"); exitStatus |= 2; } if (classData.getLineCoverageRate() < coverageRate .getLineCoverageRate()) { System.err.println(classData.getName() + " failed check. Line coverage rate of " + percentage(classData.getLineCoverageRate()) + "% is below " + percentage(coverageRate.getLineCoverageRate()) + "%"); exitStatus |= 4; } } exitStatus |= checkPackageCoverageLevels(packageBranchCoverageRate, packageLineCoverageRate); // Check the rates for the overall project if ((totalBranches > 0) && (totalBranchCoverageRate > (totalBranchesCovered / totalBranches))) { System.err .println("Project failed check. " + "Total branch coverage rate of " + percentage(totalBranchesCovered / totalBranches) + "% is below " + percentage(totalBranchCoverageRate) + "%"); exitStatus |= 8; } if ((totalLines > 0) && (totalLineCoverageRate > (totalLinesCovered / totalLines))) { System.err.println("Project failed check. " + "Total line coverage rate of " + percentage(totalLinesCovered / totalLines) + "% is below " + percentage(totalLineCoverageRate) + "%"); exitStatus |= 16; } System.exit(exitStatus); } private PackageCoverage getPackageCoverage(String packageName) { PackageCoverage packageCoverage = (PackageCoverage)packageCoverageMap .get(packageName); if (packageCoverage == null) { packageCoverage = new PackageCoverage(); packageCoverageMap.put(packageName, packageCoverage); } return packageCoverage; } private int checkPackageCoverageLevels(double packageBranchCoverageRate, double packageLineCoverageRate) { int exitStatus = 0; Iterator iter = packageCoverageMap.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry)iter.next(); String packageName = (String)entry.getKey(); PackageCoverage packageCoverage = (PackageCoverage)entry.getValue(); exitStatus |= checkPackageCoverage(packageBranchCoverageRate, packageLineCoverageRate, packageName, packageCoverage); } return exitStatus; } private int checkPackageCoverage(double packageBranchCoverageRate, double packageLineCoverageRate, String packageName, PackageCoverage packageCoverage) { int exitStatus = 0; double branchCoverage = packageCoverage.getBranchCoverage() / packageCoverage.getBranchCount(); if ((packageCoverage.getBranchCount() > 0) && (packageBranchCoverageRate > branchCoverage)) { System.err.println("Package " + packageName + " failed check. Package branch coverage rate of " + percentage(branchCoverage) + "% is below " + percentage(packageBranchCoverageRate) + "%"); exitStatus |= 32; } double lineCoverage = packageCoverage.getLineCoverage() / packageCoverage.getLineCount(); if ((packageCoverage.getLineCount() > 0) && (packageLineCoverageRate > lineCoverage)) { System.err.println("Package " + packageName + " failed check. Package line coverage rate of " + percentage(lineCoverage) + "% is below " + percentage(packageLineCoverageRate) + "%"); exitStatus |= 64; } return exitStatus; } private String percentage(double coverateRate) { BigDecimal decimal = new BigDecimal(coverateRate * 100); return decimal.setScale(1, BigDecimal.ROUND_DOWN).toString(); } public static void main(String[] args) throws MalformedPatternException { new Main(args); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/check/CoverageRate.java0000644000175000017500000000251411343534513027647 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.check; public class CoverageRate { private final double lineCoverageRate; private final double branchCoverageRate; public CoverageRate(double lineCoverageRate, double branchCoverageRate) { this.lineCoverageRate = lineCoverageRate; this.branchCoverageRate = branchCoverageRate; } public double getLineCoverageRate() { return lineCoverageRate; } public double getBranchCoverageRate() { return branchCoverageRate; } }cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/check/PackageCoverage.java0000644000175000017500000000322511343534513030307 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.check; public class PackageCoverage { private double branchCount; private double lineCount; private double branchCoverage; private double lineCoverage; public double getBranchCount() { return branchCount; } public void addBranchCount(double branchCount) { this.branchCount += branchCount; } public double getLineCount() { return lineCount; } public void addLineCount(double lineCount) { this.lineCount += lineCount; } public double getBranchCoverage() { return branchCoverage; } public void addBranchCoverage(double branchCoverage) { this.branchCoverage += branchCoverage; } public double getLineCoverage() { return lineCoverage; } public void addLineCoverage(double lineCoverage) { this.lineCoverage += lineCoverage; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/0000755000175000017500000000000011345540725025172 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/PackageMetric.java0000644000175000017500000000456311343534513030540 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ package net.sourceforge.cobertura.javancss; /** * Basic data class to store all metrics attached to a package. * * @author Chr. Clemens Lee * @version $Id: PackageMetric.java 121 2009-01-17 22:19:45Z hboutemy $ */ public class PackageMetric extends Metric { public int classes = 0; public int functions = 0; public PackageMetric() { super(); } public void clear() { super.clear(); classes = 0; functions = 0; } public void add(PackageMetric pPackageMetric_) { if (pPackageMetric_ == null) { return; } classes += pPackageMetric_.classes; functions += pPackageMetric_.functions; ncss += pPackageMetric_.ncss; javadocs += pPackageMetric_.javadocs; javadocsLn += pPackageMetric_.javadocsLn; singleLn += pPackageMetric_.singleLn; multiLn += pPackageMetric_.multiLn; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/ccl/0000755000175000017500000000000011345540725025733 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/ccl/Init.java0000644000175000017500000000401611343534514027477 0ustar twernertwerner/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is the reusable ccl java library * (http://www.kclee.com/clemens/java/ccl/). * * The Initial Developer of the Original Code is * Chr. Clemens Lee. * Portions created by Chr. Clemens Lee are Copyright (C) 2002 * Chr. Clemens Lee. All Rights Reserved. * * Contributor(s): Chr. Clemens Lee * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package net.sourceforge.cobertura.javancss.ccl; import java.util.Hashtable; //cobertura - most of this class was removed - unused for the most part. public class Init { public Hashtable getOptions() { return null; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/ccl/Util.java0000644000175000017500000002023411343534521027507 0ustar twernertwerner/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is the reusable ccl java library * (http://www.kclee.com/clemens/java/ccl/). * * The Initial Developer of the Original Code is * Chr. Clemens Lee. * Portions created by Chr. Clemens Lee are Copyright (C) 2002 * Chr. Clemens Lee. All Rights Reserved. * * Contributor(s): Chr. Clemens Lee * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package net.sourceforge.cobertura.javancss.ccl; import java.util.Vector; /** * A general purpose class with a variety of support and convenience methods. * *

There are different groups of methods in this class: *
*
print methods - convenience methods for System.out.print etc. that additionally make sure output is gets flushed immediately. *
string methods *
string/vector converter methods *
miscellaneous methods *

* * Some basic but none the less the most used methods by myself are:
* - {@link #isEmpty(java.lang.String) isEmpty}
* - {@link #stringToLines(java.lang.String) stringToLines}
* - {@link #sleep(int) sleep}
*

* * @author * Chr. Clemens Lee * < * clemens@kclee.com * > */ /* * cobertura - this file was moved from net.sourceforge.cobertura.javancss package. * * Mark Doliner apparently got the source from somewhere, but it is not available now. */ public class Util { public static final Object CONSTANT_OBJECT = new Object(); /** * This is an utility class, there is (should be) no need * for an instance of this class. */ private Util() { super(); } // ----------------------------------------------------- // debug methods and assertion stuff // ----------------------------------------------------- /** * panicIf <=> not assert. Throws ApplicationException if true. * It's not necessary to catch this exception. */ public static void panicIf(boolean bPanic_) { if (bPanic_) { throw (new RuntimeException()); } } /** * panicIf <=> not assert. Throws ApplicationException if true. * It's not necessary to catch this exception. * * @param sMessage_ The error message for the Exception. */ public static void panicIf(boolean bPanic_, String sMessage_) { if (bPanic_) { throw (new RuntimeException(sMessage_)); } } /** * Tests, if a given String equals null or "". */ public static boolean isEmpty(String sTest_) { if (sTest_ == null || sTest_.equals("")) { return true; } return false; } /** * This function takes a String and separates it into different * lines. The last line does not need to have a separator character. * * @param lines_ The number of lines that should be extracted. * Zero if maximum number of lines is requested. * @param cCutter_ The character that separates pString_ into * different lines * * @return The single lines do not contain the cCutter_ * character at the end. */ private static Vector stringToLines(int lines_, String pString_, char cCutter_) { int maxLines = Integer.MAX_VALUE; if (lines_ > 0) { maxLines = lines_; } Vector vRetVal = new Vector(); if (pString_ == null) { return vRetVal; } int startIndex = 0; for (; maxLines > 0; maxLines--) { int endIndex = pString_.indexOf(cCutter_, startIndex); if (endIndex == -1) { if (startIndex < pString_.length()) { endIndex = pString_.length(); } else { break; } } String sLine = pString_.substring(startIndex, endIndex); vRetVal.addElement(sLine); startIndex = endIndex + 1; } return vRetVal; } /** * This function takes a String and separates it into different * lines. The last line does not need to have a separator character. * * @param cCutter_ The character that separates pString_ into * different lines * * @return The single lines do not contain the cCutter_ character * at the end. */ public static Vector stringToLines(String pString_, char cCutter_) { return stringToLines(0, pString_, cCutter_); } /** * This function takes a String and separates it into different * lines. The last line does not need to have a '\n'. The function * can't handle dos carriage returns. * * @return The single lines do not contain the '\n' character * at the end. */ public static Vector stringToLines(String pString_) { return stringToLines(pString_, '\n'); } /** * Current thread sleeps in seconds. */ private static void sleep(int seconds_) { try { Thread.sleep(seconds_ * 1000); } catch (Exception pException) { } } public static Vector concat(Vector vFirst_, Vector vSecond_) { //cobertura Mark Doliner appears to have simplified this. vFirst_.addAll(vSecond_); return vFirst_; } public static Vector sort(Vector input) { //cobertura - apparently Mark Doliner didn't think we need to sort. return input; } // cobertura - gotten from decompile of ccl.jar. public static void debug(Object oMessage_) { if(_bDebug) printlnErr(oMessage_.toString()); } public static Object getConstantObject() { return CONSTANT_OBJECT; } // cobertura - gotten from decompile of ccl.jar. public static void setDebug(boolean bDebug_) { _bDebug = bDebug_; } // cobertura = gotten from decompile of ccl.jar. public static boolean isDebug() { return _bDebug; } // cobertura = gotten from decompile of ccl.jar. public static void println(String pString_) { System.out.println(pString_); System.out.flush(); } // cobertura = gotten from decompile of ccl.jar. public static void printErr(char c_) { System.err.print(c_); System.err.flush(); } // cobertura = gotten from decompile of ccl.jar. public static void printErr(String pString_) { System.err.print(pString_); System.err.flush(); } // cobertura = gotten from decompile of ccl.jar. public static void printlnErr() { printErr('\n'); } // cobertura = gotten from decompile of ccl.jar. public static void printlnErr(String sMessage_) { printErr(sMessage_); printlnErr(); } // cobertura = gotten from decompile of ccl.jar. private static boolean _bDebug = false; }cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/ccl/Exitable.java0000644000175000017500000000701411343534520030327 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * Alternatively, the contents may be licensed with: * * The Apache Software License, Version 1.1 * * Copyright (C) 2000-2002 The Apache Software Foundation. All rights * reserved. * Copyright (C) 2009 John Lewis * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . */ package net.sourceforge.cobertura.javancss.ccl; public interface Exitable { public abstract void setExit(); } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/ccl/FileUtil.java0000644000175000017500000001666511343534514030326 0ustar twernertwerner/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is the reusable ccl java library * (http://www.kclee.com/clemens/java/ccl/). * * The Initial Developer of the Original Code is * Chr. Clemens Lee. * Portions created by Chr. Clemens Lee are Copyright (C) 2002 * Chr. Clemens Lee. All Rights Reserved. * * Contributor(s): Chr. Clemens Lee * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ package net.sourceforge.cobertura.javancss.ccl; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; /** * Utility class for file operations.

* * Simple but most commonly used methods of this class are:
* - {@link #readFile(java.lang.String) readFile}
* - {@link #concatPath(java.lang.String, java.lang.String) concatPath}
* * Other less frequently used but still handy methods are:
* - {@link #normalizeFileName(java.lang.String) normalizeFileName} to take the current user directory into account via the 'user.dir' system property
* * @version $Id: FileUtil.java 384 2006-03-17 20:10:49Z thekingant $ * @author * Chr. Clemens Lee * < * clemens@kclee.com * > */ /* * cobertura - this file was moved from net.sourceforge.cobertura.javancss package. * Mark Doliner apparently got the source from somewhere, but it is not available now. */ public class FileUtil { /** * Utility class which should never instanciate itself. */ private FileUtil() { super(); } /** * Concatenates a file path with the file name. If * necessary it adds a File.separator between the path * and file name. For example "/home" or "/home/" and "clemens" both * become "/home/clemens".

* * This method is inspired from the FrIJDE project out * of the gCollins.File.FileTools class.

* * FrIJDE Homepage: * http://amber.wpi.edu/~thethe/Document/Besiex/Java/FrIJDE/ * * @param sPath_ a directory path. Is not allowed to be null. * @param sFile_ the base name of a file. * * @return sPath_ if sFile_ is empty. */ public static String concatPath(String sPath_, String sFile_) { Util.panicIf(sPath_ == null); //System.out.println("ccl.util.FileUtil.concatPath(..).sPath_: --->" + sPath_ + "<---"); //System.out.println("ccl.util.FileUtil.concatPath(..).sFile_: " + sFile_); String sRetVal = sPath_; if (!Util.isEmpty(sFile_)) { if (sPath_.length() > 0 && !sPath_.endsWith(File.separator)) { sRetVal += File.separator; } sRetVal += sFile_; } return sRetVal; } /** * Reads a File and returns the content in a String. * CRLF -> LF conversion takes place. This is a convenience method so you don't * need to bother creating a file reader object and closing it after it has * been used. * * @param sFileName_ the name of the file to read. * * @return a string with the content of the file but without * any CR characters. * * @throws FileNotFoundException if file does not exist. * @throws IOException if any file operation fails. */ public static String readFile(String sFileName_) throws IOException, FileNotFoundException { StringBuffer sFileContent = new StringBuffer(100000); try { FileReader frIni = new FileReader(sFileName_); if (frIni != null) { BufferedReader brIni = new BufferedReader(frIni); if (brIni != null) { while (brIni.ready()) { String sLine = brIni.readLine(); if (sLine == null) { break; } sFileContent.append(sLine).append('\n'); } brIni.close(); } frIni.close(); } } catch (FileNotFoundException fileNotFoundException) { throw new FileNotFoundException("No such file: '" + sFileName_ + "'"); } return sFileContent.toString(); } /** * @return It's the canonical path of sFileName_. */ public static String getAbsoluteFileName(String sFileName_) { String sRetVal = null; try { File pFile = new File(sFileName_); sRetVal = pFile.getCanonicalPath(); } catch (Exception e) { return null; } return sRetVal; } /** * This method returns an absolute (canonical) * file name. The difference to getAbsoluteFileName * is that this method uses the system property * "user.dir" instead of the native system's current * directory. This way you get a chance of changing * the current directory inside Java and let your * program reflect that change. */ public static String normalizeFileName(String sFile) { return normalizeFileName(sFile, (String)System.getProperties().get("user.dir")); } /** * This method returns an absolute (canonical) * file name. The difference to getAbsoluteFileName * is that this method uses the system property * sUserDir instead of the native system's current * directory. This way you get a chance of changing * the current directory inside Java and let your * program reflect that change. */ private static String normalizeFileName(String sFile, String sUserDir) { sFile = sFile.trim(); if (Util.isEmpty(sFile) || sFile.equals(".")) { sFile = sUserDir; } else if (!FileUtil.isAbsolute(sFile)) { sFile = FileUtil.concatPath(sUserDir, sFile); } sFile = FileUtil.getAbsoluteFileName(sFile); return sFile; } /** * Tests if the file represented by this File object is an absolute * pathname. The definition of an absolute pathname is system * dependent. For example, on UNIX, a pathname is absolute if its first * character is the separator character. On Windows * platforms, a pathname is absolute if its first character is an * ASCII '\' or '/', or if it begins with a letter followed by a colon. */ private static boolean isAbsolute(String sFileName_) { return new File(sFileName_).isAbsolute(); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/Javancss.java0000644000175000017500000004602311343534514027607 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ package net.sourceforge.cobertura.javancss; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.InputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.Reader; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import net.sourceforge.cobertura.javancss.ccl.Exitable; import net.sourceforge.cobertura.javancss.ccl.FileUtil; import net.sourceforge.cobertura.javancss.ccl.Init; import net.sourceforge.cobertura.javancss.ccl.Util; import net.sourceforge.cobertura.javancss.parser.JavaParser; import net.sourceforge.cobertura.javancss.parser.JavaParserInterface; import net.sourceforge.cobertura.javancss.parser.JavaParserTokenManager; import net.sourceforge.cobertura.javancss.parser.ParseException; import net.sourceforge.cobertura.javancss.parser.TokenMgrError; import net.sourceforge.cobertura.javancss.parser.debug.JavaParserDebug; import net.sourceforge.cobertura.javancss.parser.java15.JavaParser15; import net.sourceforge.cobertura.javancss.parser.java15.debug.JavaParser15Debug; import net.sourceforge.cobertura.javancss.test.JavancssTest; /** * While the Java parser class might be the heart of JavaNCSS, * this class is the brain. This class controls input and output and * invokes the Java parser. * * @author Chr. Clemens Lee * , recursive feature by Pk Hannu * , additional javadoc metrics by Emilio Gongora * , and Guillermo Rodriguez . * @version $Id: Javancss.java 676 2009-09-04 13:42:13Z lewijw $ */ public class Javancss implements Exitable { private static final String S_INIT__FILE_CONTENT = "[Init]\n" + "Author=Chr. Clemens Lee\n" + "\n" + "[Help]\n"+ "; Please do not edit the Help section\n"+ "HelpUsage=@srcfiles.txt | *.java | \n" + "Options=ncss,package,object,function,all,gui,xml,out,recursive,check,encoding,parser15\n" + "ncss=b,o,Counts the program NCSS (default).\n" + "package=b,o,Assembles a statistic on package level.\n" + "object=b,o,Counts the object NCSS.\n" + "function=b,o,Counts the function NCSS.\n" + "all=b,o,The same as '-function -object -package'.\n" + "gui=b,o,Opens a gui to present the '-all' output in tabbed panels.\n" + "xml=b,o,Output in xml format.\n" + "out=s,o,Output file name. By default output goes to standard out.\n"+ "recursive=b,o,Recurse to subdirs.\n" + "check=b,o,Triggers a javancss self test.\n" + "encoding=s,o,Encoding used while reading source files (default: platform encoding).\n" + "parser15=b,o,Use new experimental Java 1.5 parser.\n" + "\n" + "[Colors]\n" + "UseSystemColors=true\n"; private boolean _bExit = false; private List/**/ _vJavaSourceFiles = null; private String encoding = null; private String _sErrorMessage = null; private Throwable _thrwError = null; private JavaParserInterface _pJavaParser = null; private int _ncss = 0; private int _loc = 0; private List/**/ _vFunctionMetrics = new ArrayList(); private List/**/ _vObjectMetrics = new ArrayList(); private List/**/ _vPackageMetrics = null; private List _vImports = null; private Map/**/ _htPackages = null; private Object[] _aoPackage = null; /** * Just used for parseImports. */ private File _sJavaSourceFile = null; private Reader createSourceReader( File sSourceFile_ ) { try { return newReader( sSourceFile_ ); } catch ( IOException pIOException ) { if ( Util.isEmpty( _sErrorMessage ) ) { _sErrorMessage = ""; } else { _sErrorMessage += "\n"; } _sErrorMessage += "File not found: " + sSourceFile_.getAbsolutePath(); _thrwError = pIOException; return null; } } private void _measureSource( File sSourceFile_ ) throws IOException, Exception, Error { Reader reader = null; // opens the file try { reader = newReader( sSourceFile_ ); } catch ( IOException pIOException ) { if ( Util.isEmpty( _sErrorMessage ) ) { _sErrorMessage = ""; } else { _sErrorMessage += "\n"; } _sErrorMessage += "File not found: " + sSourceFile_.getAbsolutePath(); _thrwError = pIOException; throw pIOException; } String sTempErrorMessage = _sErrorMessage; try { // the same method but with a Reader _measureSource( reader ); } catch ( Exception pParseException ) { if ( sTempErrorMessage == null ) { sTempErrorMessage = ""; } sTempErrorMessage += "ParseException in " + sSourceFile_.getAbsolutePath() + "\nLast useful checkpoint: \"" + _pJavaParser.getLastFunction() + "\"\n"; sTempErrorMessage += pParseException.getMessage() + "\n"; _sErrorMessage = sTempErrorMessage; _thrwError = pParseException; throw pParseException; } catch ( Error pTokenMgrError ) { if ( sTempErrorMessage == null ) { sTempErrorMessage = ""; } sTempErrorMessage += "TokenMgrError in " + sSourceFile_.getAbsolutePath() + "\n" + pTokenMgrError.getMessage() + "\n"; _sErrorMessage = sTempErrorMessage; _thrwError = pTokenMgrError; throw pTokenMgrError; } } private void _measureSource( Reader reader ) throws IOException, Exception, Error { Util.debug( "_measureSource(Reader).ENTER" ); //Util.debug( "_measureSource(Reader).parser15: -->" + (_pInit.getOptions().get( "parser15" ) + "<--" ); //Util.panicIf( _pInit == null ); //Util.panicIf( _pInit.getOptions() == null ); Util.debug( "_measureSource(Reader).ENTER2" ); try { // create a parser object if ( Util.isDebug() == false ) { if ( _pInit == null || _pInit.getOptions() == null || _pInit.getOptions().get( "parser15" ) == null ) { Util.debug( "creating JavaParser" ); _pJavaParser = (JavaParserInterface)(new JavaParser( reader )); } else { Util.debug( "creating JavaParser15" ); _pJavaParser = (JavaParserInterface)(new JavaParser15( reader )); } } else { if ( _pInit == null || _pInit.getOptions() == null || _pInit.getOptions().get( "parser15" ) == null ) { Util.debug( "creating JavaParserDebug" ); Util.println( "creating JavaParserDebug" ); _pJavaParser = (JavaParserInterface)(new JavaParserDebug( reader )); } else { Util.debug( "creating JavaParser15Debug" ); _pJavaParser = (JavaParserInterface)(new JavaParser15Debug( reader )); } } // execute the parser _pJavaParser.parse(); Util.debug( "Javancss._measureSource(DataInputStream).SUCCESSFULLY_PARSED" ); _ncss += _pJavaParser.getNcss(); // increment the ncss _loc += _pJavaParser.getLOC(); // and loc // add new data to global vector _vFunctionMetrics.addAll( _pJavaParser.getFunction() ); _vObjectMetrics.addAll( _pJavaParser.getObject() ); Map htNewPackages = _pJavaParser.getPackage(); /* List vNewPackages = new Vector(); */ for ( Iterator ePackages = htNewPackages.entrySet().iterator(); ePackages.hasNext(); ) { String sPackage = (String) ( (Map.Entry) ePackages.next() ).getKey(); PackageMetric pckmNext = (PackageMetric) htNewPackages.get( sPackage ); pckmNext.name = sPackage; PackageMetric pckmPrevious = (PackageMetric) _htPackages.get( sPackage ); pckmNext.add( pckmPrevious ); _htPackages.put( sPackage, pckmNext ); } } catch ( Exception pParseException ) { if ( _sErrorMessage == null ) { _sErrorMessage = ""; } _sErrorMessage += "ParseException in STDIN"; if ( _pJavaParser != null ) { _sErrorMessage += "\nLast useful checkpoint: \"" + _pJavaParser.getLastFunction() + "\"\n"; } _sErrorMessage += pParseException.getMessage() + "\n"; _thrwError = pParseException; throw pParseException; } catch ( Error pTokenMgrError ) { if ( _sErrorMessage == null ) { _sErrorMessage = ""; } _sErrorMessage += "TokenMgrError in STDIN\n"; _sErrorMessage += pTokenMgrError.getMessage() + "\n"; _thrwError = pTokenMgrError; throw pTokenMgrError; } } private void _measureFiles( List/**/ vJavaSourceFiles_ ) throws IOException, ParseException, TokenMgrError { // for each file for ( Iterator e = vJavaSourceFiles_.iterator(); e.hasNext(); ) { File file = (File) e.next(); try { _measureSource( file ); } catch ( Throwable pThrowable ) { // hmm, do nothing? Use getLastError() or so to check for details. } } } /** * If arguments were provided, they are used, otherwise * the input stream is used. */ private void _measureRoot( Reader reader ) throws IOException, Exception, Error { _htPackages = new HashMap(); // either there are argument files, or stdin is used if ( _vJavaSourceFiles == null ) { _measureSource( reader ); } else { // the collection of files get measured _measureFiles( _vJavaSourceFiles ); } _vPackageMetrics = new ArrayList(); for ( Iterator ePackages = _htPackages.keySet().iterator(); ePackages.hasNext(); ) { String sPackage = (String) ePackages.next(); PackageMetric pckmNext = (PackageMetric) _htPackages.get( sPackage ); _vPackageMetrics.add( pckmNext ); } } public List getImports() { return _vImports; } /** * Return info about package statement. * First element has name of package, * then begin of line, etc. */ public Object[] getPackage() { return _aoPackage; } /** * The same as getFunctionMetrics?! */ public List/**/ getFunctions() { return _vFunctionMetrics; } public Javancss( List/**/ vJavaSourceFiles_ ) { _vJavaSourceFiles = vJavaSourceFiles_; try { _measureRoot(newReader(System.in)); } catch(Exception e) { e.printStackTrace(); } catch(TokenMgrError pError) { pError.printStackTrace(); } } public Javancss( File sJavaSourceFile_ ) { Util.debug( "Javancss.(String).sJavaSourceFile_: " + sJavaSourceFile_ ); _sErrorMessage = null; _vJavaSourceFiles = new ArrayList(); _vJavaSourceFiles.add(sJavaSourceFile_); try { _measureRoot(newReader(System.in)); } catch(Exception e) { Util.debug( "Javancss.(String).e: " + e ); e.printStackTrace(); } catch(TokenMgrError pError) { Util.debug( "Javancss.(String).pError: " + pError ); pError.printStackTrace(); } } /* * cobertura: add this next constructor so any input stream can be used. * * It should be a copy of the Javancss(String) constructor, but just * make sure _vJavaSourceFiles is null. _measureRoot will * use the input stream if it is null. */ public Javancss(InputStream isJavaSource_) { Util.debug( "Javancss.(InputStream).sJavaSourceFile_: " + isJavaSource_ ); _sErrorMessage = null; _vJavaSourceFiles = null; try { _measureRoot(newReader(isJavaSource_)); } catch(Exception e) { Util.debug( "Javancss.(InputStream).e: " + e ); e.printStackTrace(); } catch(TokenMgrError pError) { Util.debug( "Javancss.(InputStream).pError: " + pError ); pError.printStackTrace(); } } /** * Only way to create object that does not immediately * start to parse. */ public Javancss() { super(); _sErrorMessage = null; _thrwError = null; } public boolean parseImports() { if ( _sJavaSourceFile == null ) { Util.debug( "Javancss.parseImports().NO_FILE" ); return true; } Reader reader = createSourceReader( _sJavaSourceFile ); if ( reader == null ) { Util.debug( "Javancss.parseImports().NO_DIS" ); return true; } try { Util.debug( "Javancss.parseImports().START_PARSING" ); if ( Util.isDebug() == false ) { _pJavaParser = (JavaParserInterface)(new JavaParser(reader)); } else { _pJavaParser = (JavaParserInterface)(new JavaParserDebug(reader)); } _pJavaParser.parseImportUnit(); _vImports = _pJavaParser.getImports(); _aoPackage = _pJavaParser.getPackageObjects(); Util.debug( "Javancss.parseImports().END_PARSING" ); } catch(Exception pParseException) { Util.debug( "Javancss.parseImports().PARSE_EXCEPTION" ); if (_sErrorMessage == null) { _sErrorMessage = ""; } _sErrorMessage += "ParseException in STDIN"; if (_pJavaParser != null) { _sErrorMessage += "\nLast useful checkpoint: \"" + _pJavaParser.getLastFunction() + "\"\n"; } _sErrorMessage += pParseException.getMessage() + "\n"; _thrwError = pParseException; return true; } catch(Error pTokenMgrError) { Util.debug( "Javancss.parseImports().TOKEN_ERROR" ); if (_sErrorMessage == null) { _sErrorMessage = ""; } _sErrorMessage += "TokenMgrError in STDIN\n"; _sErrorMessage += pTokenMgrError.getMessage() + "\n"; _thrwError = pTokenMgrError; return true; } return false; } public void setSourceFile( File javaSourceFile_ ) { _sJavaSourceFile = javaSourceFile_; _vJavaSourceFiles = new ArrayList(); _vJavaSourceFiles.add(javaSourceFile_); } private Init _pInit = null; public int getNcss() { return _ncss; } public int getLOC() { return _loc; } // added by SMS public int getJvdc() { return _pJavaParser.getJvdc(); } /** * JDCL stands for javadoc comment lines (while jvdc stands * for number of javadoc comments). */ public int getJdcl() { return JavaParserTokenManager._iFormalComments; } public int getSl() { return JavaParserTokenManager._iSingleComments; } public int getMl() { return JavaParserTokenManager._iMultiComments; } // public List getFunctionMetrics() { return(_vFunctionMetrics); } public List/**/ getObjectMetrics() { return(_vObjectMetrics); } /** * Returns list of packages in the form * PackageMetric objects. */ public List getPackageMetrics() { return(_vPackageMetrics); } public String getLastErrorMessage() { if (_sErrorMessage == null) { return null; } return _sErrorMessage; } public Throwable getLastError() { return _thrwError; } public void setExit() { _bExit = true; } public String getEncoding() { return encoding; } public void setEncoding( String encoding ) { this.encoding = encoding; } private Reader newReader( InputStream stream ) throws UnsupportedEncodingException { return ( encoding == null ) ? new InputStreamReader( stream ) : new InputStreamReader( stream, encoding ); } private Reader newReader( File file ) throws FileNotFoundException, UnsupportedEncodingException { return newReader( new FileInputStream( file ) ); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/test/0000755000175000017500000000000011345540725026151 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/test/JavancssTest.java0000644000175000017500000000176211343534521031425 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.javancss.test; public class JavancssTest { } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/coberturaREADME.txt0000644000175000017500000000034311343534515030575 0ustar twernertwernerThe files in this directory should not be modified directly. Instead the files in the javancss directory at the root of the cobertura project should be modified. See the coberturaREADME.txt file located in that directory.cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/ObjectMetric.java0000644000175000017500000000544011343534520030404 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Copyright (C) 2000 Chr. Clemens Lee . This file is part of JavaNCSS (http://www.kclee.com/clemens/java/javancss/). JavaNCSS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. JavaNCSS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with JavaNCSS; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package net.sourceforge.cobertura.javancss; /** * Basic data class to store all metrics attached to an object. * * @author Herv Boutemy * @version $Id: ObjectMetric.java 121 2009-01-17 22:19:45Z hboutemy $ */ public class ObjectMetric extends Metric { /** Cyclomatic Complexity Number (McCabe metric) */ public int ccn = 0; public int functions = 0; public int classes = 0; public ObjectMetric() { super(); } public void clear() { super.clear(); ccn = 0; functions = 0; classes = 0; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/0000755000175000017500000000000011345540725026466 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/JavaCharStream.java0000644000175000017500000004147611343534522032174 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 4.1 */ /* JavaCCOptions:STATIC=false */ package net.sourceforge.cobertura.javancss.parser; /** * An implementation of interface CharStream, where the stream is assumed to * contain only ASCII characters (with java-like unicode escape processing). */ public class JavaCharStream { /** Whether parser is static. */ public static final boolean staticFlag = false; static final int hexval(char c) throws java.io.IOException { switch(c) { case '0' : return 0; case '1' : return 1; case '2' : return 2; case '3' : return 3; case '4' : return 4; case '5' : return 5; case '6' : return 6; case '7' : return 7; case '8' : return 8; case '9' : return 9; case 'a' : case 'A' : return 10; case 'b' : case 'B' : return 11; case 'c' : case 'C' : return 12; case 'd' : case 'D' : return 13; case 'e' : case 'E' : return 14; case 'f' : case 'F' : return 15; } throw new java.io.IOException(); // Should never come here } /** Position in buffer. */ public int bufpos = -1; int bufsize; int available; int tokenBegin; protected int bufline[]; protected int bufcolumn[]; protected int column = 0; protected int line = 1; protected boolean prevCharIsCR = false; protected boolean prevCharIsLF = false; protected java.io.Reader inputStream; protected char[] nextCharBuf; protected char[] buffer; protected int maxNextCharInd = 0; protected int nextCharInd = -1; protected int inBuf = 0; protected int tabSize = 8; protected void setTabSize(int i) { tabSize = i; } protected int getTabSize(int i) { return tabSize; } protected void ExpandBuff(boolean wrapAround) { char[] newbuffer = new char[bufsize + 2048]; int newbufline[] = new int[bufsize + 2048]; int newbufcolumn[] = new int[bufsize + 2048]; try { if (wrapAround) { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); bufcolumn = newbufcolumn; bufpos += (bufsize - tokenBegin); } else { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); bufcolumn = newbufcolumn; bufpos -= tokenBegin; } } catch (Throwable t) { throw new Error(t.getMessage()); } available = (bufsize += 2048); tokenBegin = 0; } protected void FillBuff() throws java.io.IOException { int i; if (maxNextCharInd == 4096) maxNextCharInd = nextCharInd = 0; try { if ((i = inputStream.read(nextCharBuf, maxNextCharInd, 4096 - maxNextCharInd)) == -1) { inputStream.close(); throw new java.io.IOException(); } else maxNextCharInd += i; return; } catch(java.io.IOException e) { if (bufpos != 0) { --bufpos; backup(0); } else { bufline[bufpos] = line; bufcolumn[bufpos] = column; } throw e; } } protected char ReadByte() throws java.io.IOException { if (++nextCharInd >= maxNextCharInd) FillBuff(); return nextCharBuf[nextCharInd]; } /** @return starting character for token. */ public char BeginToken() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; tokenBegin = bufpos; return buffer[bufpos]; } tokenBegin = 0; bufpos = -1; return readChar(); } protected void AdjustBuffSize() { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = 0; available = tokenBegin; } else ExpandBuff(false); } else if (available > tokenBegin) available = bufsize; else if ((tokenBegin - available) < 2048) ExpandBuff(true); else available = tokenBegin; } protected void UpdateLineColumn(char c) { column++; if (prevCharIsLF) { prevCharIsLF = false; line += (column = 1); } else if (prevCharIsCR) { prevCharIsCR = false; if (c == '\n') { prevCharIsLF = true; } else line += (column = 1); } switch (c) { case '\r' : prevCharIsCR = true; break; case '\n' : prevCharIsLF = true; break; case '\t' : column--; column += (tabSize - (column % tabSize)); break; default : break; } bufline[bufpos] = line; bufcolumn[bufpos] = column; } /** Read a character. */ public char readChar() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; return buffer[bufpos]; } char c; if (++bufpos == available) AdjustBuffSize(); if ((buffer[bufpos] = c = ReadByte()) == '\\') { UpdateLineColumn(c); int backSlashCnt = 1; for (;;) // Read all the backslashes { if (++bufpos == available) AdjustBuffSize(); try { if ((buffer[bufpos] = c = ReadByte()) != '\\') { UpdateLineColumn(c); // found a non-backslash char. if ((c == 'u') && ((backSlashCnt & 1) == 1)) { if (--bufpos < 0) bufpos = bufsize - 1; break; } backup(backSlashCnt); return '\\'; } } catch(java.io.IOException e) { if (backSlashCnt > 1) backup(backSlashCnt-1); return '\\'; } UpdateLineColumn(c); backSlashCnt++; } // Here, we have seen an odd number of backslash's followed by a 'u' try { while ((c = ReadByte()) == 'u') ++column; buffer[bufpos] = c = (char)(hexval(c) << 12 | hexval(ReadByte()) << 8 | hexval(ReadByte()) << 4 | hexval(ReadByte())); column += 4; } catch(java.io.IOException e) { throw new Error("Invalid escape character at line " + line + " column " + column + "."); } if (backSlashCnt == 1) return c; else { backup(backSlashCnt - 1); return '\\'; } } else { UpdateLineColumn(c); return c; } } /** * @deprecated * @see #getEndColumn */ public int getColumn() { return bufcolumn[bufpos]; } /** * @deprecated * @see #getEndLine */ public int getLine() { return bufline[bufpos]; } /** Get end column. */ public int getEndColumn() { return bufcolumn[bufpos]; } /** Get end line. */ public int getEndLine() { return bufline[bufpos]; } /** @return column of token start */ public int getBeginColumn() { return bufcolumn[tokenBegin]; } /** @return line number of token start */ public int getBeginLine() { return bufline[tokenBegin]; } /** Retreat. */ public void backup(int amount) { inBuf += amount; if ((bufpos -= amount) < 0) bufpos += bufsize; } /** Constructor. */ public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { inputStream = dstream; line = startline; column = startcolumn - 1; available = bufsize = buffersize; buffer = new char[buffersize]; bufline = new int[buffersize]; bufcolumn = new int[buffersize]; nextCharBuf = new char[4096]; } /** Constructor. */ public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn) { this(dstream, startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.Reader dstream) { this(dstream, 1, 1, 4096); } /** Reinitialise. */ public void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { inputStream = dstream; line = startline; column = startcolumn - 1; if (buffer == null || buffersize != buffer.length) { available = bufsize = buffersize; buffer = new char[buffersize]; bufline = new int[buffersize]; bufcolumn = new int[buffersize]; nextCharBuf = new char[4096]; } prevCharIsLF = prevCharIsCR = false; tokenBegin = inBuf = maxNextCharInd = 0; nextCharInd = bufpos = -1; } /** Reinitialise. */ public void ReInit(java.io.Reader dstream, int startline, int startcolumn) { ReInit(dstream, startline, startcolumn, 4096); } /** Reinitialise. */ public void ReInit(java.io.Reader dstream) { ReInit(dstream, 1, 1, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException { this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) { this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException { this(dstream, encoding, startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, int startline, int startcolumn) { this(dstream, startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException { this(dstream, encoding, 1, 1, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream) { this(dstream, 1, 1, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException { ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) { ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException { ReInit(dstream, encoding, startline, startcolumn, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, int startline, int startcolumn) { ReInit(dstream, startline, startcolumn, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException { ReInit(dstream, encoding, 1, 1, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream) { ReInit(dstream, 1, 1, 4096); } /** @return token image as String */ public String GetImage() { if (bufpos >= tokenBegin) return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); else return new String(buffer, tokenBegin, bufsize - tokenBegin) + new String(buffer, 0, bufpos + 1); } /** @return suffix */ public char[] GetSuffix(int len) { char[] ret = new char[len]; if ((bufpos + 1) >= len) System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); else { System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, len - bufpos - 1); System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); } return ret; } /** Set buffers back to null when finished. */ public void Done() { nextCharBuf = null; buffer = null; bufline = null; bufcolumn = null; } /** * Method to adjust line and column numbers for the start of a token. */ public void adjustBeginLineColumn(int newLine, int newCol) { int start = tokenBegin; int len; if (bufpos >= tokenBegin) { len = bufpos - tokenBegin + inBuf + 1; } else { len = bufsize - tokenBegin + bufpos + 1 + inBuf; } int i = 0, j = 0, k = 0; int nextColDiff = 0, columnDiff = 0; while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) { bufline[j] = newLine; nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; bufcolumn[j] = newCol + columnDiff; columnDiff = nextColDiff; i++; } if (i < len) { bufline[j] = newLine++; bufcolumn[j] = newCol + columnDiff; while (i++ < len) { if (bufline[j = start % bufsize] != bufline[++start % bufsize]) bufline[j] = newLine++; else bufline[j] = newLine; } } line = bufline[j]; column = bufcolumn[j]; } } /* JavaCC - OriginalChecksum=a71d76bc4e3e50f1cadfe216520f8634 (do not edit this line) */ cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/Token.java0000644000175000017500000001240211343534513030404 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */ /* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */ package net.sourceforge.cobertura.javancss.parser; /** * Describes the input token stream. */ public class Token { /** * An integer that describes the kind of this token. This numbering * system is determined by JavaCCParser, and a table of these numbers is * stored in the file ...Constants.java. */ public int kind; /** The line number of the first character of this Token. */ public int beginLine; /** The column number of the first character of this Token. */ public int beginColumn; /** The line number of the last character of this Token. */ public int endLine; /** The column number of the last character of this Token. */ public int endColumn; /** * The string image of the token. */ public String image; /** * A reference to the next regular (non-special) token from the input * stream. If this is the last token from the input stream, or if the * token manager has not read tokens beyond this one, this field is * set to null. This is true only if this token is also a regular * token. Otherwise, see below for a description of the contents of * this field. */ public Token next; /** * This field is used to access special tokens that occur prior to this * token, but after the immediately preceding regular (non-special) token. * If there are no such special tokens, this field is set to null. * When there are more than one such special token, this field refers * to the last of these special tokens, which in turn refers to the next * previous special token through its specialToken field, and so on * until the first special token (whose specialToken field is null). * The next fields of special tokens refer to other special tokens that * immediately follow it (without an intervening regular token). If there * is no such token, this field is null. */ public Token specialToken; /** * An optional attribute value of the Token. * Tokens which are not used as syntactic sugar will often contain * meaningful values that will be used later on by the compiler or * interpreter. This attribute value is often different from the image. * Any subclass of Token that actually wants to return a non-null value can * override this method as appropriate. */ public Object getValue() { return null; } /** * No-argument constructor */ public Token() {} /** * Constructs a new token for the specified Image. */ public Token(int kind) { this(kind, null); } /** * Constructs a new token for the specified Image and Kind. */ public Token(int kind, String image) { this.kind = kind; this.image = image; } /** * Returns the image. */ public String toString() { return image; } /** * Returns a new Token object, by default. However, if you want, you * can create and return subclass objects based on the value of ofKind. * Simply add the cases to the switch for all those special cases. * For example, if you have a subclass of Token called IDToken that * you want to create if ofKind is ID, simply add something like : * * case MyParserConstants.ID : return new IDToken(ofKind, image); * * to the following switch statement. Then you can cast matchedToken * variable to the appropriate type and use sit in your lexical actions. */ public static Token newToken(int ofKind, String image) { switch(ofKind) { default : return new Token(ofKind, image); } } public static Token newToken(int ofKind) { return newToken(ofKind, null); } } /* JavaCC - OriginalChecksum=48c8965b1d2c7366d2b53a19209a1660 (do not edit this line) */ cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/debug/0000755000175000017500000000000011345540725027554 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/debug/JavaCharStream.java0000644000175000017500000004166111343534517033262 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 4.1 */ /* JavaCCOptions:STATIC=false */ //cobertura - put the import on its own line - otherwise, it messes up the script that changes the package. package net.sourceforge.cobertura.javancss.parser.debug; /** * An implementation of interface CharStream, where the stream is assumed to * contain only ASCII characters (with java-like unicode escape processing). */ public class JavaCharStream { /** Whether parser is static. */ public static final boolean staticFlag = false; static final int hexval(char c) throws java.io.IOException { switch(c) { case '0' : return 0; case '1' : return 1; case '2' : return 2; case '3' : return 3; case '4' : return 4; case '5' : return 5; case '6' : return 6; case '7' : return 7; case '8' : return 8; case '9' : return 9; case 'a' : case 'A' : return 10; case 'b' : case 'B' : return 11; case 'c' : case 'C' : return 12; case 'd' : case 'D' : return 13; case 'e' : case 'E' : return 14; case 'f' : case 'F' : return 15; } throw new java.io.IOException(); // Should never come here } /** Position in buffer. */ public int bufpos = -1; int bufsize; int available; int tokenBegin; protected int bufline[]; protected int bufcolumn[]; protected int column = 0; protected int line = 1; protected boolean prevCharIsCR = false; protected boolean prevCharIsLF = false; protected java.io.Reader inputStream; protected char[] nextCharBuf; protected char[] buffer; protected int maxNextCharInd = 0; protected int nextCharInd = -1; protected int inBuf = 0; protected int tabSize = 8; protected void setTabSize(int i) { tabSize = i; } protected int getTabSize(int i) { return tabSize; } protected void ExpandBuff(boolean wrapAround) { char[] newbuffer = new char[bufsize + 2048]; int newbufline[] = new int[bufsize + 2048]; int newbufcolumn[] = new int[bufsize + 2048]; try { if (wrapAround) { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); bufcolumn = newbufcolumn; bufpos += (bufsize - tokenBegin); } else { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); bufcolumn = newbufcolumn; bufpos -= tokenBegin; } } catch (Throwable t) { throw new Error(t.getMessage()); } available = (bufsize += 2048); tokenBegin = 0; } protected void FillBuff() throws java.io.IOException { int i; if (maxNextCharInd == 4096) maxNextCharInd = nextCharInd = 0; try { if ((i = inputStream.read(nextCharBuf, maxNextCharInd, 4096 - maxNextCharInd)) == -1) { inputStream.close(); throw new java.io.IOException(); } else maxNextCharInd += i; return; } catch(java.io.IOException e) { if (bufpos != 0) { --bufpos; backup(0); } else { bufline[bufpos] = line; bufcolumn[bufpos] = column; } throw e; } } protected char ReadByte() throws java.io.IOException { if (++nextCharInd >= maxNextCharInd) FillBuff(); return nextCharBuf[nextCharInd]; } /** @return starting character for token. */ public char BeginToken() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; tokenBegin = bufpos; return buffer[bufpos]; } tokenBegin = 0; bufpos = -1; return readChar(); } protected void AdjustBuffSize() { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = 0; available = tokenBegin; } else ExpandBuff(false); } else if (available > tokenBegin) available = bufsize; else if ((tokenBegin - available) < 2048) ExpandBuff(true); else available = tokenBegin; } protected void UpdateLineColumn(char c) { column++; if (prevCharIsLF) { prevCharIsLF = false; line += (column = 1); } else if (prevCharIsCR) { prevCharIsCR = false; if (c == '\n') { prevCharIsLF = true; } else line += (column = 1); } switch (c) { case '\r' : prevCharIsCR = true; break; case '\n' : prevCharIsLF = true; break; case '\t' : column--; column += (tabSize - (column % tabSize)); break; default : break; } bufline[bufpos] = line; bufcolumn[bufpos] = column; } /** Read a character. */ public char readChar() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; return buffer[bufpos]; } char c; if (++bufpos == available) AdjustBuffSize(); if ((buffer[bufpos] = c = ReadByte()) == '\\') { UpdateLineColumn(c); int backSlashCnt = 1; for (;;) // Read all the backslashes { if (++bufpos == available) AdjustBuffSize(); try { if ((buffer[bufpos] = c = ReadByte()) != '\\') { UpdateLineColumn(c); // found a non-backslash char. if ((c == 'u') && ((backSlashCnt & 1) == 1)) { if (--bufpos < 0) bufpos = bufsize - 1; break; } backup(backSlashCnt); return '\\'; } } catch(java.io.IOException e) { if (backSlashCnt > 1) backup(backSlashCnt-1); return '\\'; } UpdateLineColumn(c); backSlashCnt++; } // Here, we have seen an odd number of backslash's followed by a 'u' try { while ((c = ReadByte()) == 'u') ++column; buffer[bufpos] = c = (char)(hexval(c) << 12 | hexval(ReadByte()) << 8 | hexval(ReadByte()) << 4 | hexval(ReadByte())); column += 4; } catch(java.io.IOException e) { throw new Error("Invalid escape character at line " + line + " column " + column + "."); } if (backSlashCnt == 1) return c; else { backup(backSlashCnt - 1); return '\\'; } } else { UpdateLineColumn(c); return c; } } /** * @deprecated * @see #getEndColumn */ public int getColumn() { return bufcolumn[bufpos]; } /** * @deprecated * @see #getEndLine */ public int getLine() { return bufline[bufpos]; } /** Get end column. */ public int getEndColumn() { return bufcolumn[bufpos]; } /** Get end line. */ public int getEndLine() { return bufline[bufpos]; } /** @return column of token start */ public int getBeginColumn() { return bufcolumn[tokenBegin]; } /** @return line number of token start */ public int getBeginLine() { return bufline[tokenBegin]; } /** Retreat. */ public void backup(int amount) { inBuf += amount; if ((bufpos -= amount) < 0) bufpos += bufsize; } /** Constructor. */ public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { inputStream = dstream; line = startline; column = startcolumn - 1; available = bufsize = buffersize; buffer = new char[buffersize]; bufline = new int[buffersize]; bufcolumn = new int[buffersize]; nextCharBuf = new char[4096]; } /** Constructor. */ public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn) { this(dstream, startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.Reader dstream) { this(dstream, 1, 1, 4096); } /** Reinitialise. */ public void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { inputStream = dstream; line = startline; column = startcolumn - 1; if (buffer == null || buffersize != buffer.length) { available = bufsize = buffersize; buffer = new char[buffersize]; bufline = new int[buffersize]; bufcolumn = new int[buffersize]; nextCharBuf = new char[4096]; } prevCharIsLF = prevCharIsCR = false; tokenBegin = inBuf = maxNextCharInd = 0; nextCharInd = bufpos = -1; } /** Reinitialise. */ public void ReInit(java.io.Reader dstream, int startline, int startcolumn) { ReInit(dstream, startline, startcolumn, 4096); } /** Reinitialise. */ public void ReInit(java.io.Reader dstream) { ReInit(dstream, 1, 1, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException { this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) { this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException { this(dstream, encoding, startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, int startline, int startcolumn) { this(dstream, startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException { this(dstream, encoding, 1, 1, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream) { this(dstream, 1, 1, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException { ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) { ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException { ReInit(dstream, encoding, startline, startcolumn, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, int startline, int startcolumn) { ReInit(dstream, startline, startcolumn, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException { ReInit(dstream, encoding, 1, 1, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream) { ReInit(dstream, 1, 1, 4096); } /** @return token image as String */ public String GetImage() { if (bufpos >= tokenBegin) return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); else return new String(buffer, tokenBegin, bufsize - tokenBegin) + new String(buffer, 0, bufpos + 1); } /** @return suffix */ public char[] GetSuffix(int len) { char[] ret = new char[len]; if ((bufpos + 1) >= len) System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); else { System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, len - bufpos - 1); System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); } return ret; } /** Set buffers back to null when finished. */ public void Done() { nextCharBuf = null; buffer = null; bufline = null; bufcolumn = null; } /** * Method to adjust line and column numbers for the start of a token. */ public void adjustBeginLineColumn(int newLine, int newCol) { int start = tokenBegin; int len; if (bufpos >= tokenBegin) { len = bufpos - tokenBegin + inBuf + 1; } else { len = bufsize - tokenBegin + bufpos + 1 + inBuf; } int i = 0, j = 0, k = 0; int nextColDiff = 0, columnDiff = 0; while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) { bufline[j] = newLine; nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; bufcolumn[j] = newCol + columnDiff; columnDiff = nextColDiff; i++; } if (i < len) { bufline[j] = newLine++; bufcolumn[j] = newCol + columnDiff; while (i++ < len) { if (bufline[j = start % bufsize] != bufline[++start % bufsize]) bufline[j] = newLine++; else bufline[j] = newLine; } } line = bufline[j]; column = bufcolumn[j]; } } /* JavaCC - OriginalChecksum=52e51dbf6ad22b1d0caf753e276d8904 (do not edit this line) */ cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/debug/Token.java0000644000175000017500000001256511343534515031506 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */ /* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */ //cobertura - put the import on its own line - otherwise, it messes up the script that changes the package. package net.sourceforge.cobertura.javancss.parser.debug; /** * Describes the input token stream. */ public class Token { /** * An integer that describes the kind of this token. This numbering * system is determined by JavaCCParser, and a table of these numbers is * stored in the file ...Constants.java. */ public int kind; /** The line number of the first character of this Token. */ public int beginLine; /** The column number of the first character of this Token. */ public int beginColumn; /** The line number of the last character of this Token. */ public int endLine; /** The column number of the last character of this Token. */ public int endColumn; /** * The string image of the token. */ public String image; /** * A reference to the next regular (non-special) token from the input * stream. If this is the last token from the input stream, or if the * token manager has not read tokens beyond this one, this field is * set to null. This is true only if this token is also a regular * token. Otherwise, see below for a description of the contents of * this field. */ public Token next; /** * This field is used to access special tokens that occur prior to this * token, but after the immediately preceding regular (non-special) token. * If there are no such special tokens, this field is set to null. * When there are more than one such special token, this field refers * to the last of these special tokens, which in turn refers to the next * previous special token through its specialToken field, and so on * until the first special token (whose specialToken field is null). * The next fields of special tokens refer to other special tokens that * immediately follow it (without an intervening regular token). If there * is no such token, this field is null. */ public Token specialToken; /** * An optional attribute value of the Token. * Tokens which are not used as syntactic sugar will often contain * meaningful values that will be used later on by the compiler or * interpreter. This attribute value is often different from the image. * Any subclass of Token that actually wants to return a non-null value can * override this method as appropriate. */ public Object getValue() { return null; } /** * No-argument constructor */ public Token() {} /** * Constructs a new token for the specified Image. */ public Token(int kind) { this(kind, null); } /** * Constructs a new token for the specified Image and Kind. */ public Token(int kind, String image) { this.kind = kind; this.image = image; } /** * Returns the image. */ public String toString() { return image; } /** * Returns a new Token object, by default. However, if you want, you * can create and return subclass objects based on the value of ofKind. * Simply add the cases to the switch for all those special cases. * For example, if you have a subclass of Token called IDToken that * you want to create if ofKind is ID, simply add something like : * * case MyParserConstants.ID : return new IDToken(ofKind, image); * * to the following switch statement. Then you can cast matchedToken * variable to the appropriate type and use sit in your lexical actions. */ public static Token newToken(int ofKind, String image) { switch(ofKind) { default : return new Token(ofKind, image); } } public static Token newToken(int ofKind) { return newToken(ofKind, null); } } /* JavaCC - OriginalChecksum=15522ecc409e4693bb99cff1a147148b (do not edit this line) */ ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/debug/JavaParserDebugTokenManager.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/debug/JavaParserDebugToken0000644000175000017500000021702011343534517033507 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaParserDebugTokenManager.java */ //cobertura - put the import on its own line - otherwise, it messes up the script that changes the package. package net.sourceforge.cobertura.javancss.parser.debug; import net.sourceforge.cobertura.javancss.parser.JavaParserInterface; import java.util.*; import net.sourceforge.cobertura.javancss.ccl.Util; import net.sourceforge.cobertura.javancss.FunctionMetric; import net.sourceforge.cobertura.javancss.ObjectMetric; import net.sourceforge.cobertura.javancss.PackageMetric; /** Token Manager. */ public class JavaParserDebugTokenManager implements JavaParserDebugConstants { // added by SMS public static int _iSingleComments = 0; public static int _iMultiComments = 0; public static int _iFormalComments = 0; public static int _iMultiCommentsLast = 0; /** Debug output. */ public java.io.PrintStream debugStream = System.out; /** Set debug output. */ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) { switch (pos) { case 0: if ((active0 & 0xffffffffffffe000L) != 0L || (active1 & 0x3L) != 0L) { jjmatchedKind = 74; return 28; } if ((active1 & 0x400000000200000L) != 0L) return 4; return -1; case 1: if ((active0 & 0x1006000000L) != 0L) return 28; if ((active0 & 0xffffffeff9ffe000L) != 0L || (active1 & 0x3L) != 0L) { if (jjmatchedPos != 1) { jjmatchedKind = 74; jjmatchedPos = 1; } return 28; } return -1; case 2: if ((active0 & 0x4000130400000000L) != 0L) return 28; if ((active0 & 0xbfffecebfdffe000L) != 0L || (active1 & 0x3L) != 0L) { if (jjmatchedPos != 2) { jjmatchedKind = 74; jjmatchedPos = 2; } return 28; } return -1; case 3: if ((active0 & 0x1dffcae3e5e9e000L) != 0L || (active1 & 0x3L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 3; return 28; } if ((active0 & 0xa200240818160000L) != 0L) return 28; return -1; case 4: if ((active0 & 0xc480003c0690000L) != 0L || (active1 & 0x2L) != 0L) return 28; if ((active0 & 0x11b7cae02580e000L) != 0L || (active1 & 0x1L) != 0L) { if (jjmatchedPos != 4) { jjmatchedKind = 74; jjmatchedPos = 4; } return 28; } return -1; case 5: if ((active0 & 0x896084004004000L) != 0L) return 28; if ((active0 & 0x1121c2a12180a000L) != 0L || (active1 & 0x1L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 5; return 28; } return -1; case 6: if ((active0 & 0xc00121008000L) != 0L) return 28; if ((active0 & 0x112102a000802000L) != 0L || (active1 & 0x1L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 6; return 28; } return -1; case 7: if ((active0 & 0x20000000802000L) != 0L || (active1 & 0x1L) != 0L) return 28; if ((active0 & 0x110102a000000000L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 7; return 28; } return -1; case 8: if ((active0 & 0x1001020000000000L) != 0L) return 28; if ((active0 & 0x10000a000000000L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 8; return 28; } return -1; case 9: if ((active0 & 0xa000000000L) != 0L) return 28; if ((active0 & 0x100000000000000L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 9; return 28; } return -1; case 10: if ((active0 & 0x100000000000000L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 10; return 28; } return -1; default : return -1; } } private final int jjStartNfa_0(int pos, long active0, long active1) { return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1); } private int jjStopAtPos(int pos, int kind) { jjmatchedKind = kind; jjmatchedPos = pos; return pos + 1; } private int jjMoveStringLiteralDfa0_0() { switch(curChar) { case 33: jjmatchedKind = 90; return jjMoveStringLiteralDfa1_0(0x0L, 0x200000000L); case 37: jjmatchedKind = 109; return jjMoveStringLiteralDfa1_0(0x0L, 0x40000000000000L); case 38: jjmatchedKind = 106; return jjMoveStringLiteralDfa1_0(0x0L, 0x8000800000000L); case 40: return jjStopAtPos(0, 77); case 41: return jjStopAtPos(0, 78); case 42: jjmatchedKind = 104; return jjMoveStringLiteralDfa1_0(0x0L, 0x2000000000000L); case 43: jjmatchedKind = 102; return jjMoveStringLiteralDfa1_0(0x0L, 0x801000000000L); case 44: return jjStopAtPos(0, 84); case 45: jjmatchedKind = 103; return jjMoveStringLiteralDfa1_0(0x0L, 0x1002000000000L); case 46: jjmatchedKind = 85; return jjMoveStringLiteralDfa1_0(0x0L, 0x400000000000000L); case 47: jjmatchedKind = 105; return jjMoveStringLiteralDfa1_0(0x180L, 0x4000000000000L); case 58: return jjStopAtPos(0, 93); case 59: return jjStopAtPos(0, 83); case 60: jjmatchedKind = 89; return jjMoveStringLiteralDfa1_0(0x0L, 0x80400080000000L); case 61: jjmatchedKind = 87; return jjMoveStringLiteralDfa1_0(0x0L, 0x40000000L); case 62: jjmatchedKind = 88; return jjMoveStringLiteralDfa1_0(0x0L, 0x300000100000000L); case 63: return jjStopAtPos(0, 92); case 64: return jjStopAtPos(0, 86); case 91: return jjStopAtPos(0, 81); case 93: return jjStopAtPos(0, 82); case 94: jjmatchedKind = 108; return jjMoveStringLiteralDfa1_0(0x0L, 0x20000000000000L); case 97: return jjMoveStringLiteralDfa1_0(0x6000L, 0x0L); case 98: return jjMoveStringLiteralDfa1_0(0x38000L, 0x0L); case 99: return jjMoveStringLiteralDfa1_0(0xfc0000L, 0x0L); case 100: return jjMoveStringLiteralDfa1_0(0x7000000L, 0x0L); case 101: return jjMoveStringLiteralDfa1_0(0x38000000L, 0x0L); case 102: return jjMoveStringLiteralDfa1_0(0x7c0000000L, 0x0L); case 103: return jjMoveStringLiteralDfa1_0(0x800000000L, 0x0L); case 105: return jjMoveStringLiteralDfa1_0(0x3f000000000L, 0x0L); case 108: return jjMoveStringLiteralDfa1_0(0x40000000000L, 0x0L); case 110: return jjMoveStringLiteralDfa1_0(0x380000000000L, 0x0L); case 112: return jjMoveStringLiteralDfa1_0(0x3c00000000000L, 0x0L); case 114: return jjMoveStringLiteralDfa1_0(0x4000000000000L, 0x0L); case 115: return jjMoveStringLiteralDfa1_0(0x1f8000000000000L, 0x0L); case 116: return jjMoveStringLiteralDfa1_0(0x7e00000000000000L, 0x0L); case 118: return jjMoveStringLiteralDfa1_0(0x8000000000000000L, 0x1L); case 119: return jjMoveStringLiteralDfa1_0(0x0L, 0x2L); case 123: return jjStopAtPos(0, 79); case 124: jjmatchedKind = 107; return jjMoveStringLiteralDfa1_0(0x0L, 0x10000400000000L); case 125: return jjStopAtPos(0, 80); case 126: return jjStopAtPos(0, 91); default : return jjMoveNfa_0(0, 0); } } private int jjMoveStringLiteralDfa1_0(long active0, long active1) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(0, active0, active1); return 1; } switch(curChar) { case 38: if ((active1 & 0x800000000L) != 0L) return jjStopAtPos(1, 99); break; case 42: if ((active0 & 0x80L) != 0L) return jjStopAtPos(1, 7); break; case 43: if ((active1 & 0x1000000000L) != 0L) return jjStopAtPos(1, 100); break; case 45: if ((active1 & 0x2000000000L) != 0L) return jjStopAtPos(1, 101); break; case 46: return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x400000000000000L); case 47: if ((active0 & 0x100L) != 0L) return jjStopAtPos(1, 8); break; case 60: if ((active1 & 0x400000000000L) != 0L) { jjmatchedKind = 110; jjmatchedPos = 1; } return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x80000000000000L); case 61: if ((active1 & 0x40000000L) != 0L) return jjStopAtPos(1, 94); else if ((active1 & 0x80000000L) != 0L) return jjStopAtPos(1, 95); else if ((active1 & 0x100000000L) != 0L) return jjStopAtPos(1, 96); else if ((active1 & 0x200000000L) != 0L) return jjStopAtPos(1, 97); else if ((active1 & 0x800000000000L) != 0L) return jjStopAtPos(1, 111); else if ((active1 & 0x1000000000000L) != 0L) return jjStopAtPos(1, 112); else if ((active1 & 0x2000000000000L) != 0L) return jjStopAtPos(1, 113); else if ((active1 & 0x4000000000000L) != 0L) return jjStopAtPos(1, 114); else if ((active1 & 0x8000000000000L) != 0L) return jjStopAtPos(1, 115); else if ((active1 & 0x10000000000000L) != 0L) return jjStopAtPos(1, 116); else if ((active1 & 0x20000000000000L) != 0L) return jjStopAtPos(1, 117); else if ((active1 & 0x40000000000000L) != 0L) return jjStopAtPos(1, 118); break; case 62: return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x300000000000000L); case 97: return jjMoveStringLiteralDfa2_0(active0, 0x4800400c0000L, active1, 0L); case 98: return jjMoveStringLiteralDfa2_0(active0, 0x2000L, active1, 0L); case 101: return jjMoveStringLiteralDfa2_0(active0, 0x4100001000000L, active1, 0L); case 102: if ((active0 & 0x1000000000L) != 0L) return jjStartNfaWithStates_0(1, 36, 28); break; case 104: return jjMoveStringLiteralDfa2_0(active0, 0xe08000000100000L, active1, 0x2L); case 105: return jjMoveStringLiteralDfa2_0(active0, 0x180000000L, active1, 0L); case 108: return jjMoveStringLiteralDfa2_0(active0, 0x208200000L, active1, 0L); case 109: return jjMoveStringLiteralDfa2_0(active0, 0x6000000000L, active1, 0L); case 110: return jjMoveStringLiteralDfa2_0(active0, 0x38010000000L, active1, 0L); case 111: if ((active0 & 0x2000000L) != 0L) { jjmatchedKind = 25; jjmatchedPos = 1; } return jjMoveStringLiteralDfa2_0(active0, 0x8000040c04c08000L, active1, 0x1L); case 114: return jjMoveStringLiteralDfa2_0(active0, 0x7001800000010000L, active1, 0L); case 115: return jjMoveStringLiteralDfa2_0(active0, 0x4000L, active1, 0L); case 116: return jjMoveStringLiteralDfa2_0(active0, 0x30000000000000L, active1, 0L); case 117: return jjMoveStringLiteralDfa2_0(active0, 0x42200000000000L, active1, 0L); case 119: return jjMoveStringLiteralDfa2_0(active0, 0x80000000000000L, active1, 0L); case 120: return jjMoveStringLiteralDfa2_0(active0, 0x20000000L, active1, 0L); case 121: return jjMoveStringLiteralDfa2_0(active0, 0x100000000020000L, active1, 0L); case 124: if ((active1 & 0x400000000L) != 0L) return jjStopAtPos(1, 98); break; default : break; } return jjStartNfa_0(0, active0, active1); } private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(0, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(1, active0, active1); return 2; } switch(curChar) { case 46: if ((active1 & 0x400000000000000L) != 0L) return jjStopAtPos(2, 122); break; case 61: if ((active1 & 0x80000000000000L) != 0L) return jjStopAtPos(2, 119); else if ((active1 & 0x100000000000000L) != 0L) return jjStopAtPos(2, 120); break; case 62: return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x200000000000000L); case 97: return jjMoveStringLiteralDfa3_0(active0, 0x1010000000300000L, active1, 0L); case 98: return jjMoveStringLiteralDfa3_0(active0, 0x2000000000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L, active1, 0L); case 101: return jjMoveStringLiteralDfa3_0(active0, 0x10000L, active1, 0L); case 102: return jjMoveStringLiteralDfa3_0(active0, 0x1000000L, active1, 0L); case 105: return jjMoveStringLiteralDfa3_0(active0, 0x8280800000000000L, active1, 0x2L); case 108: return jjMoveStringLiteralDfa3_0(active0, 0x200040000000L, active1, 0x1L); case 110: return jjMoveStringLiteralDfa3_0(active0, 0x100040180c00000L, active1, 0L); case 111: return jjMoveStringLiteralDfa3_0(active0, 0x9000200008000L, active1, 0L); case 112: return jjMoveStringLiteralDfa3_0(active0, 0x40006000000000L, active1, 0L); case 114: if ((active0 & 0x400000000L) != 0L) return jjStartNfaWithStates_0(2, 34, 28); return jjMoveStringLiteralDfa3_0(active0, 0xc20000000000000L, active1, 0L); case 115: return jjMoveStringLiteralDfa3_0(active0, 0x8008046000L, active1, 0L); case 116: if ((active0 & 0x10000000000L) != 0L) { jjmatchedKind = 40; jjmatchedPos = 2; } return jjMoveStringLiteralDfa3_0(active0, 0x40a08200a0000L, active1, 0L); case 117: return jjMoveStringLiteralDfa3_0(active0, 0x2000000014000000L, active1, 0L); case 119: if ((active0 & 0x100000000000L) != 0L) return jjStartNfaWithStates_0(2, 44, 28); break; case 121: if ((active0 & 0x4000000000000000L) != 0L) return jjStartNfaWithStates_0(2, 62, 28); break; default : break; } return jjStartNfa_0(1, active0, active1); } private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(1, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(2, active0, active1); return 3; } switch(curChar) { case 61: if ((active1 & 0x200000000000000L) != 0L) return jjStopAtPos(3, 121); break; case 97: return jjMoveStringLiteralDfa4_0(active0, 0x381010000L, active1, 0x1L); case 98: return jjMoveStringLiteralDfa4_0(active0, 0x4000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa4_0(active0, 0x100000000080000L, active1, 0L); case 100: if ((active0 & 0x8000000000000000L) != 0L) return jjStartNfaWithStates_0(3, 63, 28); break; case 101: if ((active0 & 0x20000L) != 0L) return jjStartNfaWithStates_0(3, 17, 28); else if ((active0 & 0x40000L) != 0L) return jjStartNfaWithStates_0(3, 18, 28); else if ((active0 & 0x8000000L) != 0L) return jjStartNfaWithStates_0(3, 27, 28); else if ((active0 & 0x2000000000000000L) != 0L) return jjStartNfaWithStates_0(3, 61, 28); return jjMoveStringLiteralDfa4_0(active0, 0x40020020004000L, active1, 0L); case 103: if ((active0 & 0x40000000000L) != 0L) return jjStartNfaWithStates_0(3, 42, 28); break; case 105: return jjMoveStringLiteralDfa4_0(active0, 0x20080000000000L, active1, 0L); case 107: return jjMoveStringLiteralDfa4_0(active0, 0x400000000000L, active1, 0L); case 108: if ((active0 & 0x200000000000L) != 0L) return jjStartNfaWithStates_0(3, 45, 28); return jjMoveStringLiteralDfa4_0(active0, 0x2002000008000L, active1, 0x2L); case 109: if ((active0 & 0x10000000L) != 0L) return jjStartNfaWithStates_0(3, 28, 28); break; case 110: return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000000L, active1, 0L); case 111: if ((active0 & 0x800000000L) != 0L) return jjStartNfaWithStates_0(3, 35, 28); return jjMoveStringLiteralDfa4_0(active0, 0xc00004000000000L, active1, 0L); case 114: if ((active0 & 0x100000L) != 0L) return jjStartNfaWithStates_0(3, 20, 28); return jjMoveStringLiteralDfa4_0(active0, 0x8000000000000L, active1, 0L); case 115: if ((active0 & 0x200000000000000L) != 0L) return jjStartNfaWithStates_0(3, 57, 28); return jjMoveStringLiteralDfa4_0(active0, 0x40600000L, active1, 0L); case 116: return jjMoveStringLiteralDfa4_0(active0, 0x91008000802000L, active1, 0L); case 117: return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000L, active1, 0L); case 118: return jjMoveStringLiteralDfa4_0(active0, 0x800000000000L, active1, 0L); default : break; } return jjStartNfa_0(2, active0, active1); } private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(2, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(3, active0, active1); return 4; } switch(curChar) { case 97: return jjMoveStringLiteralDfa5_0(active0, 0xc08000000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa5_0(active0, 0xa0000000000000L, active1, 0L); case 101: if ((active0 & 0x40000000L) != 0L) return jjStartNfaWithStates_0(4, 30, 28); else if ((active1 & 0x2L) != 0L) return jjStartNfaWithStates_0(4, 65, 28); return jjMoveStringLiteralDfa5_0(active0, 0x1002000008000L, active1, 0L); case 104: if ((active0 & 0x80000L) != 0L) return jjStartNfaWithStates_0(4, 19, 28); return jjMoveStringLiteralDfa5_0(active0, 0x100000000000000L, active1, 0L); case 105: return jjMoveStringLiteralDfa5_0(active0, 0x12000000800000L, active1, 0L); case 107: if ((active0 & 0x10000L) != 0L) return jjStartNfaWithStates_0(4, 16, 28); break; case 108: if ((active0 & 0x80000000L) != 0L) { jjmatchedKind = 31; jjmatchedPos = 4; } return jjMoveStringLiteralDfa5_0(active0, 0x104000000L, active1, 0L); case 110: return jjMoveStringLiteralDfa5_0(active0, 0x20000000L, active1, 0L); case 114: if ((active0 & 0x40000000000000L) != 0L) return jjStartNfaWithStates_0(4, 54, 28); return jjMoveStringLiteralDfa5_0(active0, 0x4024000006000L, active1, 0L); case 115: if ((active0 & 0x200000L) != 0L) return jjStartNfaWithStates_0(4, 21, 28); return jjMoveStringLiteralDfa5_0(active0, 0x1000000000000000L, active1, 0L); case 116: if ((active0 & 0x400000L) != 0L) return jjStartNfaWithStates_0(4, 22, 28); else if ((active0 & 0x200000000L) != 0L) return jjStartNfaWithStates_0(4, 33, 28); else if ((active0 & 0x8000000000000L) != 0L) return jjStartNfaWithStates_0(4, 51, 28); return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x1L); case 117: return jjMoveStringLiteralDfa5_0(active0, 0x1000000L, active1, 0L); case 118: return jjMoveStringLiteralDfa5_0(active0, 0x80000000000L, active1, 0L); case 119: if ((active0 & 0x400000000000000L) != 0L) { jjmatchedKind = 58; jjmatchedPos = 4; } return jjMoveStringLiteralDfa5_0(active0, 0x800000000000000L, active1, 0L); default : break; } return jjStartNfa_0(3, active0, active1); } private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(3, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(4, active0, active1); return 5; } switch(curChar) { case 97: return jjMoveStringLiteralDfa6_0(active0, 0xa000L, active1, 0L); case 99: if ((active0 & 0x2000000000000L) != 0L) return jjStartNfaWithStates_0(5, 49, 28); else if ((active0 & 0x10000000000000L) != 0L) return jjStartNfaWithStates_0(5, 52, 28); return jjMoveStringLiteralDfa6_0(active0, 0x1000000000000L, active1, 0L); case 100: return jjMoveStringLiteralDfa6_0(active0, 0x20000000L, active1, 0L); case 101: if ((active0 & 0x4000000L) != 0L) return jjStartNfaWithStates_0(5, 26, 28); else if ((active0 & 0x80000000000L) != 0L) return jjStartNfaWithStates_0(5, 43, 28); break; case 102: return jjMoveStringLiteralDfa6_0(active0, 0x20000000000L, active1, 0L); case 103: return jjMoveStringLiteralDfa6_0(active0, 0x400000000000L, active1, 0L); case 104: if ((active0 & 0x80000000000000L) != 0L) return jjStartNfaWithStates_0(5, 55, 28); break; case 105: return jjMoveStringLiteralDfa6_0(active0, 0x1000000000000000L, active1, 0x1L); case 108: return jjMoveStringLiteralDfa6_0(active0, 0x101000000L, active1, 0L); case 109: return jjMoveStringLiteralDfa6_0(active0, 0x2000000000L, active1, 0L); case 110: if ((active0 & 0x4000000000000L) != 0L) return jjStartNfaWithStates_0(5, 50, 28); return jjMoveStringLiteralDfa6_0(active0, 0x8000800000L, active1, 0L); case 114: return jjMoveStringLiteralDfa6_0(active0, 0x100000000000000L, active1, 0L); case 115: if ((active0 & 0x800000000000000L) != 0L) return jjStartNfaWithStates_0(5, 59, 28); break; case 116: if ((active0 & 0x4000L) != 0L) return jjStartNfaWithStates_0(5, 14, 28); else if ((active0 & 0x4000000000L) != 0L) return jjStartNfaWithStates_0(5, 38, 28); return jjMoveStringLiteralDfa6_0(active0, 0x20800000000000L, active1, 0L); default : break; } return jjStartNfa_0(4, active0, active1); } private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(4, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(5, active0, active1); return 6; } switch(curChar) { case 97: return jjMoveStringLiteralDfa7_0(active0, 0x20000000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa7_0(active0, 0x8000002000L, active1, 0L); case 101: if ((active0 & 0x400000000000L) != 0L) return jjStartNfaWithStates_0(6, 46, 28); else if ((active0 & 0x800000000000L) != 0L) return jjStartNfaWithStates_0(6, 47, 28); return jjMoveStringLiteralDfa7_0(active0, 0x1000002000000000L, active1, 0L); case 102: return jjMoveStringLiteralDfa7_0(active0, 0x20000000000000L, active1, 0L); case 108: return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x1L); case 110: if ((active0 & 0x8000L) != 0L) return jjStartNfaWithStates_0(6, 15, 28); break; case 111: return jjMoveStringLiteralDfa7_0(active0, 0x100000000000000L, active1, 0L); case 115: if ((active0 & 0x20000000L) != 0L) return jjStartNfaWithStates_0(6, 29, 28); break; case 116: if ((active0 & 0x1000000L) != 0L) return jjStartNfaWithStates_0(6, 24, 28); return jjMoveStringLiteralDfa7_0(active0, 0x1000000000000L, active1, 0L); case 117: return jjMoveStringLiteralDfa7_0(active0, 0x800000L, active1, 0L); case 121: if ((active0 & 0x100000000L) != 0L) return jjStartNfaWithStates_0(6, 32, 28); break; default : break; } return jjStartNfa_0(5, active0, active1); } private int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(5, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(6, active0, active1); return 7; } switch(curChar) { case 99: return jjMoveStringLiteralDfa8_0(active0, 0x20000000000L, active1, 0L); case 101: if ((active0 & 0x800000L) != 0L) return jjStartNfaWithStates_0(7, 23, 28); else if ((active1 & 0x1L) != 0L) return jjStartNfaWithStates_0(7, 64, 28); return jjMoveStringLiteralDfa8_0(active0, 0x1008000000000L, active1, 0L); case 110: return jjMoveStringLiteralDfa8_0(active0, 0x1100002000000000L, active1, 0L); case 112: if ((active0 & 0x20000000000000L) != 0L) return jjStartNfaWithStates_0(7, 53, 28); break; case 116: if ((active0 & 0x2000L) != 0L) return jjStartNfaWithStates_0(7, 13, 28); break; default : break; } return jjStartNfa_0(6, active0, active1); } private int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(6, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(7, active0, 0L); return 8; } switch(curChar) { case 100: if ((active0 & 0x1000000000000L) != 0L) return jjStartNfaWithStates_0(8, 48, 28); break; case 101: if ((active0 & 0x20000000000L) != 0L) return jjStartNfaWithStates_0(8, 41, 28); break; case 105: return jjMoveStringLiteralDfa9_0(active0, 0x100000000000000L); case 111: return jjMoveStringLiteralDfa9_0(active0, 0x8000000000L); case 116: if ((active0 & 0x1000000000000000L) != 0L) return jjStartNfaWithStates_0(8, 60, 28); return jjMoveStringLiteralDfa9_0(active0, 0x2000000000L); default : break; } return jjStartNfa_0(7, active0, 0L); } private int jjMoveStringLiteralDfa9_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(7, old0, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(8, active0, 0L); return 9; } switch(curChar) { case 102: if ((active0 & 0x8000000000L) != 0L) return jjStartNfaWithStates_0(9, 39, 28); break; case 115: if ((active0 & 0x2000000000L) != 0L) return jjStartNfaWithStates_0(9, 37, 28); break; case 122: return jjMoveStringLiteralDfa10_0(active0, 0x100000000000000L); default : break; } return jjStartNfa_0(8, active0, 0L); } private int jjMoveStringLiteralDfa10_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(8, old0, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(9, active0, 0L); return 10; } switch(curChar) { case 101: return jjMoveStringLiteralDfa11_0(active0, 0x100000000000000L); default : break; } return jjStartNfa_0(9, active0, 0L); } private int jjMoveStringLiteralDfa11_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(9, old0, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(10, active0, 0L); return 11; } switch(curChar) { case 100: if ((active0 & 0x100000000000000L) != 0L) return jjStartNfaWithStates_0(11, 56, 28); break; default : break; } return jjStartNfa_0(10, active0, 0L); } private int jjStartNfaWithStates_0(int pos, int kind, int state) { jjmatchedKind = kind; jjmatchedPos = pos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return pos + 1; } return jjMoveNfa_0(state, pos + 1); } static final long[] jjbitVec0 = { 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL }; static final long[] jjbitVec2 = { 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL }; static final long[] jjbitVec3 = { 0xfff0000000200002L, 0xffffffffffffdfffL, 0xfffff00f7fffffffL, 0x12000000007fffffL }; static final long[] jjbitVec4 = { 0x0L, 0x0L, 0x420043c00000000L, 0xff7fffffff7fffffL }; static final long[] jjbitVec5 = { 0xffffcffffffffL, 0xffffffffffff0000L, 0xf9ff3fffffffffffL, 0x401f00030003L }; static final long[] jjbitVec6 = { 0x0L, 0x400000000000000L, 0xfffffffbffffd740L, 0xffffffcff7fffL }; static final long[] jjbitVec7 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xfffffffffffff003L, 0x33fffffffff199fL }; static final long[] jjbitVec8 = { 0xfffe000000000000L, 0xfffffffe027fffffL, 0xffL, 0x707ffffff0000L }; static final long[] jjbitVec9 = { 0x7fffffe00000000L, 0xfffe0000000007ffL, 0xffffffffffffffffL, 0x1c000060002fffffL }; static final long[] jjbitVec10 = { 0x1ffffffd0000L, 0x0L, 0x3fffffffffL, 0x0L }; static final long[] jjbitVec11 = { 0x23ffffffffffffe0L, 0x3ff010000L, 0x3c5fdfffff99fe0L, 0xf0003b0000000L }; static final long[] jjbitVec12 = { 0x36dfdfffff987e0L, 0x1c00005e000000L, 0x23edfdfffffbafe0L, 0x100010000L }; static final long[] jjbitVec13 = { 0x23cdfdfffff99fe0L, 0x3b0000000L, 0x3bfc718d63dc7e0L, 0x0L }; static final long[] jjbitVec14 = { 0x3effdfffffddfe0L, 0x300000000L, 0x3effdfffffddfe0L, 0x340000000L }; static final long[] jjbitVec15 = { 0x3fffdfffffddfe0L, 0x300000000L, 0x2ffbfffffc7fffe0L, 0x7fL }; static final long[] jjbitVec16 = { 0x800dfffffffffffeL, 0x7fL, 0x200decaefef02596L, 0x3000005fL }; static final long[] jjbitVec17 = { 0x1L, 0x7fffffffeffL, 0xf00L, 0x0L }; static final long[] jjbitVec18 = { 0x6fbffffffffL, 0x3f0000L, 0xffffffff00000000L, 0x7fffffffff003fL }; static final long[] jjbitVec19 = { 0xffffffffffffffffL, 0xffffffff83ffffffL, 0xffffff07ffffffffL, 0x3ffffffffffffffL }; static final long[] jjbitVec20 = { 0xffffffffffffff7fL, 0xffffffff3d7f3d7fL, 0x7f3d7fffffff3d7fL, 0xffff7fffff7f7f3dL }; static final long[] jjbitVec21 = { 0xffffffff7f3d7fffL, 0x7ffff7fL, 0xffffffff00000000L, 0x1fffffffffffffL }; static final long[] jjbitVec22 = { 0xffffffffffffffffL, 0x7f9fffffffffffL, 0xffffffff07fffffeL, 0x7ffffffffffL }; static final long[] jjbitVec23 = { 0x0L, 0x0L, 0xfffffffffffffL, 0x8000000L }; static final long[] jjbitVec24 = { 0xffffffff00000000L, 0xffffffffffffffL, 0x1ffffffffffL, 0x0L }; static final long[] jjbitVec25 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffff0fffffffL, 0x3ffffffffffffffL }; static final long[] jjbitVec26 = { 0xffffffff3f3fffffL, 0x3fffffffaaff3f3fL, 0x5fdfffffffffffffL, 0x1fdc1fff0fcf1fdcL }; static final long[] jjbitVec27 = { 0x8000000000000000L, 0x8000000000000001L, 0xffff00000000L, 0x0L }; static final long[] jjbitVec28 = { 0x3fbbd503e2ffc84L, 0xffffffff00000000L, 0xfL, 0x0L }; static final long[] jjbitVec29 = { 0x73e03fe000000e0L, 0xfffffffffffffffeL, 0xfffffffe601fffffL, 0x7fffffffffffffffL }; static final long[] jjbitVec30 = { 0xfffe1fffffffffe0L, 0xffffffffffffffffL, 0xffffff00007fffL, 0x0L }; static final long[] jjbitVec31 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0x3fffffffffffffL, 0x0L }; static final long[] jjbitVec32 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0x3fffffffffL, 0x0L }; static final long[] jjbitVec33 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0x1fffL, 0x0L }; static final long[] jjbitVec34 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xfffffffffL, 0x0L }; static final long[] jjbitVec35 = { 0x3fffffffffffL, 0x0L, 0x0L, 0x0L }; static final long[] jjbitVec36 = { 0x5f7ffdffa0f8007fL, 0xffffffffffffffdbL, 0x3ffffffffffffL, 0xfffffffffff80000L }; static final long[] jjbitVec37 = { 0x3fffffffffffffffL, 0xffffffffffff0000L, 0xfffffffffffcffffL, 0xfff0000000000ffL }; static final long[] jjbitVec38 = { 0x18000000000000L, 0xffd702000000e000L, 0xffffffffffffffffL, 0x1fffffffffffffffL }; static final long[] jjbitVec39 = { 0x87fffffe00000010L, 0xffffffe007fffffeL, 0x7fffffffffffffffL, 0x631cfcfcfcL }; static final long[] jjbitVec40 = { 0x7fffffe00000000L, 0xfffe03ff000007ffL, 0xffffffffffffffffL, 0x1fff0060002fffffL }; static final long[] jjbitVec41 = { 0x23ffffffffffffe0L, 0xffc3ff010000L, 0x3c5fdfffff99fe0L, 0xfffc3b0000000L }; static final long[] jjbitVec42 = { 0x36dfdfffff987e0L, 0x1cffc05e000000L, 0x23edfdfffffbafe0L, 0xffc100010000L }; static final long[] jjbitVec43 = { 0x23cdfdfffff99fe0L, 0xffc3b0000000L, 0x3bfc718d63dc7e0L, 0xff8000000000L }; static final long[] jjbitVec44 = { 0x3effdfffffddfe0L, 0xffc300000000L, 0x3effdfffffddfe0L, 0xffc340000000L }; static final long[] jjbitVec45 = { 0x3fffdfffffddfe0L, 0xffc300000000L, 0x2ffbfffffc7fffe0L, 0x7fL }; static final long[] jjbitVec46 = { 0x800dfffffffffffeL, 0x3ff007fL, 0x200decaefef02596L, 0x33ff005fL }; static final long[] jjbitVec47 = { 0x6fbffffffffL, 0x3f03ffL, 0xffffffff00000000L, 0x7fffffffff003fL }; private int jjMoveNfa_0(int startState, int curPos) { int startsAt = 0; jjnewStateCnt = 48; int i = 1; jjstateSet[0] = startState; int kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; do { switch(jjstateSet[--i]) { case 0: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 6); else if (curChar == 36) { if (kind > 74) kind = 74; jjCheckNAdd(28); } else if (curChar == 34) jjCheckNAddStates(7, 9); else if (curChar == 39) jjAddStates(10, 11); else if (curChar == 46) jjCheckNAdd(4); if ((0x3fe000000000000L & l) != 0L) { if (kind > 66) kind = 66; jjCheckNAddTwoStates(1, 2); } else if (curChar == 48) { if (kind > 66) kind = 66; jjCheckNAddStates(12, 14); } break; case 1: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 66) kind = 66; jjCheckNAddTwoStates(1, 2); break; case 3: if (curChar == 46) jjCheckNAdd(4); break; case 4: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 70) kind = 70; jjCheckNAddStates(15, 17); break; case 6: if ((0x280000000000L & l) != 0L) jjCheckNAdd(7); break; case 7: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 70) kind = 70; jjCheckNAddTwoStates(7, 8); break; case 9: if (curChar == 39) jjAddStates(10, 11); break; case 10: if ((0xfffffffffffffbffL & l) != 0L) jjCheckNAdd(11); break; case 11: if (curChar == 39 && kind > 72) kind = 72; break; case 13: if ((0x8400000000L & l) != 0L) jjCheckNAdd(11); break; case 14: if ((0xff000000000000L & l) != 0L) jjCheckNAddTwoStates(15, 11); break; case 15: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(11); break; case 16: if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 17; break; case 17: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(15); break; case 18: if (curChar == 34) jjCheckNAddStates(7, 9); break; case 19: if ((0xfffffffbffffdbffL & l) != 0L) jjCheckNAddStates(7, 9); break; case 21: if ((0x8400000000L & l) != 0L) jjCheckNAddStates(7, 9); break; case 22: if (curChar == 34 && kind > 73) kind = 73; break; case 23: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(18, 21); break; case 24: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(7, 9); break; case 25: if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(24); break; case 27: if (curChar != 36) break; if (kind > 74) kind = 74; jjCheckNAdd(28); break; case 28: if ((0x3ff001000000000L & l) == 0L) break; if (kind > 74) kind = 74; jjCheckNAdd(28); break; case 29: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 6); break; case 30: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if (curChar != 46) break; if (kind > 70) kind = 70; jjCheckNAddStates(22, 24); break; case 32: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 70) kind = 70; jjCheckNAddStates(22, 24); break; case 34: if ((0x280000000000L & l) != 0L) jjCheckNAdd(35); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 70) kind = 70; jjCheckNAddTwoStates(35, 8); break; case 36: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(36, 37); break; case 38: if ((0x280000000000L & l) != 0L) jjCheckNAdd(39); break; case 39: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 70) kind = 70; jjCheckNAddTwoStates(39, 8); break; case 40: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(25, 27); break; case 42: if ((0x280000000000L & l) != 0L) jjCheckNAdd(43); break; case 43: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(43, 8); break; case 44: if (curChar != 48) break; if (kind > 66) kind = 66; jjCheckNAddStates(12, 14); break; case 46: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 66) kind = 66; jjCheckNAddTwoStates(46, 2); break; case 47: if ((0xff000000000000L & l) == 0L) break; if (kind > 66) kind = 66; jjCheckNAddTwoStates(47, 2); break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); do { switch(jjstateSet[--i]) { case 0: case 28: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 74) kind = 74; jjCheckNAdd(28); break; case 2: if ((0x100000001000L & l) != 0L && kind > 66) kind = 66; break; case 5: if ((0x2000000020L & l) != 0L) jjAddStates(28, 29); break; case 8: if ((0x5000000050L & l) != 0L && kind > 70) kind = 70; break; case 10: if ((0xffffffffefffffffL & l) != 0L) jjCheckNAdd(11); break; case 12: if (curChar == 92) jjAddStates(30, 32); break; case 13: if ((0x14404410000000L & l) != 0L) jjCheckNAdd(11); break; case 19: if ((0xffffffffefffffffL & l) != 0L) jjCheckNAddStates(7, 9); break; case 20: if (curChar == 92) jjAddStates(33, 35); break; case 21: if ((0x14404410000000L & l) != 0L) jjCheckNAddStates(7, 9); break; case 33: if ((0x2000000020L & l) != 0L) jjAddStates(36, 37); break; case 37: if ((0x2000000020L & l) != 0L) jjAddStates(38, 39); break; case 41: if ((0x2000000020L & l) != 0L) jjAddStates(40, 41); break; case 45: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(46); break; case 46: if ((0x7e0000007eL & l) == 0L) break; if (kind > 66) kind = 66; jjCheckNAddTwoStates(46, 2); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); do { switch(jjstateSet[--i]) { case 0: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 74) kind = 74; jjCheckNAdd(28); break; case 10: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjstateSet[jjnewStateCnt++] = 11; break; case 19: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(7, 9); break; case 28: if (!jjCanMove_2(hiByte, i1, i2, l1, l2)) break; if (kind > 74) kind = 74; jjCheckNAdd(28); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 48 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } } } private final int jjStopStringLiteralDfa_2(int pos, long active0) { switch (pos) { default : return -1; } } private final int jjStartNfa_2(int pos, long active0) { return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1); } private int jjMoveStringLiteralDfa0_2() { switch(curChar) { case 42: return jjMoveStringLiteralDfa1_2(0x800L); default : return jjMoveNfa_2(0, 0); } } private int jjMoveStringLiteralDfa1_2(long active0) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_2(0, active0); return 1; } switch(curChar) { case 47: if ((active0 & 0x800L) != 0L) return jjStopAtPos(1, 11); break; default : break; } return jjStartNfa_2(0, active0); } private int jjMoveNfa_2(int startState, int curPos) { int startsAt = 0; jjnewStateCnt = 3; int i = 1; jjstateSet[0] = startState; int kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; do { switch(jjstateSet[--i]) { case 0: if ((0x2400L & l) != 0L) { if (kind > 10) kind = 10; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 1; break; case 1: if (curChar == 10 && kind > 10) kind = 10; break; case 2: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 1; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); do { switch(jjstateSet[--i]) { default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); do { switch(jjstateSet[--i]) { default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } } } private int jjMoveStringLiteralDfa0_1() { return jjMoveNfa_1(4, 0); } private int jjMoveNfa_1(int startState, int curPos) { int startsAt = 0; jjnewStateCnt = 4; int i = 1; jjstateSet[0] = startState; int kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; do { switch(jjstateSet[--i]) { case 4: if ((0xffffffffffffdbffL & l) != 0L) { if (kind > 9) kind = 9; jjCheckNAddStates(42, 44); } else if ((0x2400L & l) != 0L) { if (kind > 9) kind = 9; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: if ((0xffffffffffffdbffL & l) == 0L) break; kind = 9; jjCheckNAddStates(42, 44); break; case 1: if ((0x2400L & l) != 0L && kind > 9) kind = 9; break; case 2: if (curChar == 10 && kind > 9) kind = 9; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); do { switch(jjstateSet[--i]) { case 4: case 0: kind = 9; jjCheckNAddStates(42, 44); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); do { switch(jjstateSet[--i]) { case 4: case 0: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 9) kind = 9; jjCheckNAddStates(42, 44); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 4 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } } } static final int[] jjnextStates = { 30, 31, 36, 37, 40, 41, 8, 19, 20, 22, 10, 12, 45, 47, 2, 4, 5, 8, 19, 20, 24, 22, 32, 33, 8, 40, 41, 8, 6, 7, 13, 14, 16, 21, 23, 25, 34, 35, 38, 39, 42, 43, 0, 1, 3, }; private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) { switch(hiByte) { case 0: return ((jjbitVec2[i2] & l2) != 0L); default : if ((jjbitVec0[i1] & l1) != 0L) return true; return false; } } private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2) { switch(hiByte) { case 0: return ((jjbitVec4[i2] & l2) != 0L); case 2: return ((jjbitVec5[i2] & l2) != 0L); case 3: return ((jjbitVec6[i2] & l2) != 0L); case 4: return ((jjbitVec7[i2] & l2) != 0L); case 5: return ((jjbitVec8[i2] & l2) != 0L); case 6: return ((jjbitVec9[i2] & l2) != 0L); case 7: return ((jjbitVec10[i2] & l2) != 0L); case 9: return ((jjbitVec11[i2] & l2) != 0L); case 10: return ((jjbitVec12[i2] & l2) != 0L); case 11: return ((jjbitVec13[i2] & l2) != 0L); case 12: return ((jjbitVec14[i2] & l2) != 0L); case 13: return ((jjbitVec15[i2] & l2) != 0L); case 14: return ((jjbitVec16[i2] & l2) != 0L); case 15: return ((jjbitVec17[i2] & l2) != 0L); case 16: return ((jjbitVec18[i2] & l2) != 0L); case 17: return ((jjbitVec19[i2] & l2) != 0L); case 18: return ((jjbitVec20[i2] & l2) != 0L); case 19: return ((jjbitVec21[i2] & l2) != 0L); case 20: return ((jjbitVec0[i2] & l2) != 0L); case 22: return ((jjbitVec22[i2] & l2) != 0L); case 23: return ((jjbitVec23[i2] & l2) != 0L); case 24: return ((jjbitVec24[i2] & l2) != 0L); case 30: return ((jjbitVec25[i2] & l2) != 0L); case 31: return ((jjbitVec26[i2] & l2) != 0L); case 32: return ((jjbitVec27[i2] & l2) != 0L); case 33: return ((jjbitVec28[i2] & l2) != 0L); case 48: return ((jjbitVec29[i2] & l2) != 0L); case 49: return ((jjbitVec30[i2] & l2) != 0L); case 77: return ((jjbitVec31[i2] & l2) != 0L); case 159: return ((jjbitVec32[i2] & l2) != 0L); case 164: return ((jjbitVec33[i2] & l2) != 0L); case 215: return ((jjbitVec34[i2] & l2) != 0L); case 250: return ((jjbitVec35[i2] & l2) != 0L); case 251: return ((jjbitVec36[i2] & l2) != 0L); case 253: return ((jjbitVec37[i2] & l2) != 0L); case 254: return ((jjbitVec38[i2] & l2) != 0L); case 255: return ((jjbitVec39[i2] & l2) != 0L); default : if ((jjbitVec3[i1] & l1) != 0L) return true; return false; } } private static final boolean jjCanMove_2(int hiByte, int i1, int i2, long l1, long l2) { switch(hiByte) { case 0: return ((jjbitVec4[i2] & l2) != 0L); case 2: return ((jjbitVec5[i2] & l2) != 0L); case 3: return ((jjbitVec6[i2] & l2) != 0L); case 4: return ((jjbitVec7[i2] & l2) != 0L); case 5: return ((jjbitVec8[i2] & l2) != 0L); case 6: return ((jjbitVec40[i2] & l2) != 0L); case 7: return ((jjbitVec10[i2] & l2) != 0L); case 9: return ((jjbitVec41[i2] & l2) != 0L); case 10: return ((jjbitVec42[i2] & l2) != 0L); case 11: return ((jjbitVec43[i2] & l2) != 0L); case 12: return ((jjbitVec44[i2] & l2) != 0L); case 13: return ((jjbitVec45[i2] & l2) != 0L); case 14: return ((jjbitVec46[i2] & l2) != 0L); case 15: return ((jjbitVec17[i2] & l2) != 0L); case 16: return ((jjbitVec47[i2] & l2) != 0L); case 17: return ((jjbitVec19[i2] & l2) != 0L); case 18: return ((jjbitVec20[i2] & l2) != 0L); case 19: return ((jjbitVec21[i2] & l2) != 0L); case 20: return ((jjbitVec0[i2] & l2) != 0L); case 22: return ((jjbitVec22[i2] & l2) != 0L); case 23: return ((jjbitVec23[i2] & l2) != 0L); case 24: return ((jjbitVec24[i2] & l2) != 0L); case 30: return ((jjbitVec25[i2] & l2) != 0L); case 31: return ((jjbitVec26[i2] & l2) != 0L); case 32: return ((jjbitVec27[i2] & l2) != 0L); case 33: return ((jjbitVec28[i2] & l2) != 0L); case 48: return ((jjbitVec29[i2] & l2) != 0L); case 49: return ((jjbitVec30[i2] & l2) != 0L); case 77: return ((jjbitVec31[i2] & l2) != 0L); case 159: return ((jjbitVec32[i2] & l2) != 0L); case 164: return ((jjbitVec33[i2] & l2) != 0L); case 215: return ((jjbitVec34[i2] & l2) != 0L); case 250: return ((jjbitVec35[i2] & l2) != 0L); case 251: return ((jjbitVec36[i2] & l2) != 0L); case 253: return ((jjbitVec37[i2] & l2) != 0L); case 254: return ((jjbitVec38[i2] & l2) != 0L); case 255: return ((jjbitVec39[i2] & l2) != 0L); default : if ((jjbitVec3[i1] & l1) != 0L) return true; return false; } } /** Token literal values. */ public static final String[] jjstrLiteralImages = { "", null, null, null, null, null, null, null, null, null, null, null, null, "\141\142\163\164\162\141\143\164", "\141\163\163\145\162\164", "\142\157\157\154\145\141\156", "\142\162\145\141\153", "\142\171\164\145", "\143\141\163\145", "\143\141\164\143\150", "\143\150\141\162", "\143\154\141\163\163", "\143\157\156\163\164", "\143\157\156\164\151\156\165\145", "\144\145\146\141\165\154\164", "\144\157", "\144\157\165\142\154\145", "\145\154\163\145", "\145\156\165\155", "\145\170\164\145\156\144\163", "\146\141\154\163\145", "\146\151\156\141\154", "\146\151\156\141\154\154\171", "\146\154\157\141\164", "\146\157\162", "\147\157\164\157", "\151\146", "\151\155\160\154\145\155\145\156\164\163", "\151\155\160\157\162\164", "\151\156\163\164\141\156\143\145\157\146", "\151\156\164", "\151\156\164\145\162\146\141\143\145", "\154\157\156\147", "\156\141\164\151\166\145", "\156\145\167", "\156\165\154\154", "\160\141\143\153\141\147\145", "\160\162\151\166\141\164\145", "\160\162\157\164\145\143\164\145\144", "\160\165\142\154\151\143", "\162\145\164\165\162\156", "\163\150\157\162\164", "\163\164\141\164\151\143", "\163\164\162\151\143\164\146\160", "\163\165\160\145\162", "\163\167\151\164\143\150", "\163\171\156\143\150\162\157\156\151\172\145\144", "\164\150\151\163", "\164\150\162\157\167", "\164\150\162\157\167\163", "\164\162\141\156\163\151\145\156\164", "\164\162\165\145", "\164\162\171", "\166\157\151\144", "\166\157\154\141\164\151\154\145", "\167\150\151\154\145", null, null, null, null, null, null, null, null, null, null, null, "\50", "\51", "\173", "\175", "\133", "\135", "\73", "\54", "\56", "\100", "\75", "\76", "\74", "\41", "\176", "\77", "\72", "\75\75", "\74\75", "\76\75", "\41\75", "\174\174", "\46\46", "\53\53", "\55\55", "\53", "\55", "\52", "\57", "\46", "\174", "\136", "\45", "\74\74", "\53\75", "\55\75", "\52\75", "\57\75", "\46\75", "\174\75", "\136\75", "\45\75", "\74\74\75", "\76\76\75", "\76\76\76\75", "\56\56\56", }; /** Lexer state names. */ public static final String[] lexStateNames = { "DEFAULT", "IN_SINGLE_LINE_COMMENT", "IN_MULTI_LINE_COMMENT", }; /** Lex State array. */ public static final int[] jjnewLexState = { -1, -1, -1, -1, -1, -1, -1, 2, 1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, }; static final long[] jjtoToken = { 0xffffffffffffe001L, 0x7ffffffffffe747L, }; static final long[] jjtoSkip = { 0xf7eL, 0x0L, }; static final long[] jjtoSpecial = { 0xf00L, 0x0L, }; static final long[] jjtoMore = { 0x1080L, 0x0L, }; protected JavaCharStream input_stream; private final int[] jjrounds = new int[48]; private final int[] jjstateSet = new int[96]; private final StringBuffer jjimage = new StringBuffer(); private StringBuffer image = jjimage; private int jjimageLen; private int lengthOfMatch; protected char curChar; /** Constructor. */ public JavaParserDebugTokenManager(JavaCharStream stream){ if (JavaCharStream.staticFlag) throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); input_stream = stream; } /** Constructor. */ public JavaParserDebugTokenManager(JavaCharStream stream, int lexState){ this(stream); SwitchTo(lexState); } /** Reinitialise parser. */ public void ReInit(JavaCharStream stream) { jjmatchedPos = jjnewStateCnt = 0; curLexState = defaultLexState; input_stream = stream; ReInitRounds(); } private void ReInitRounds() { int i; jjround = 0x80000001; for (i = 48; i-- > 0;) jjrounds[i] = 0x80000000; } /** Reinitialise parser. */ public void ReInit(JavaCharStream stream, int lexState) { ReInit(stream); SwitchTo(lexState); } /** Switch to specified lex state. */ public void SwitchTo(int lexState) { if (lexState >= 3 || lexState < 0) throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); else curLexState = lexState; } protected Token jjFillToken() { final Token t; final String curTokenImage; final int beginLine; final int endLine; final int beginColumn; final int endColumn; if (jjmatchedPos < 0) { if (image == null) curTokenImage = ""; else curTokenImage = image.toString(); beginLine = endLine = input_stream.getBeginLine(); beginColumn = endColumn = input_stream.getBeginColumn(); } else { String im = jjstrLiteralImages[jjmatchedKind]; curTokenImage = (im == null) ? input_stream.GetImage() : im; beginLine = input_stream.getBeginLine(); beginColumn = input_stream.getBeginColumn(); endLine = input_stream.getEndLine(); endColumn = input_stream.getEndColumn(); } t = Token.newToken(jjmatchedKind, curTokenImage); t.beginLine = beginLine; t.endLine = endLine; t.beginColumn = beginColumn; t.endColumn = endColumn; return t; } int curLexState = 0; int defaultLexState = 0; int jjnewStateCnt; int jjround; int jjmatchedPos; int jjmatchedKind; /** Get the next Token. */ public Token getNextToken() { Token specialToken = null; Token matchedToken; int curPos = 0; EOFLoop : for (;;) { try { curChar = input_stream.BeginToken(); } catch(java.io.IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; return matchedToken; } image = jjimage; image.setLength(0); jjimageLen = 0; for (;;) { switch(curLexState) { case 0: try { input_stream.backup(0); while (curChar <= 32 && (0x104003600L & (1L << curChar)) != 0L) curChar = input_stream.BeginToken(); } catch (java.io.IOException e1) { continue EOFLoop; } jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); break; case 1: jjmatchedKind = 9; jjmatchedPos = -1; curPos = 0; curPos = jjMoveStringLiteralDfa0_1(); if (jjmatchedPos < 0 || (jjmatchedPos == 0 && jjmatchedKind > 12)) { jjmatchedKind = 12; jjmatchedPos = 0; } break; case 2: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_2(); if (jjmatchedPos == 0 && jjmatchedKind > 12) { jjmatchedKind = 12; } break; } if (jjmatchedKind != 0x7fffffff) { if (jjmatchedPos + 1 < curPos) input_stream.backup(curPos - jjmatchedPos - 1); if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; return matchedToken; } else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); if (specialToken == null) specialToken = matchedToken; else { matchedToken.specialToken = specialToken; specialToken = (specialToken.next = matchedToken); } SkipLexicalActions(matchedToken); } else SkipLexicalActions(null); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; continue EOFLoop; } MoreLexicalActions(); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; curPos = 0; jjmatchedKind = 0x7fffffff; try { curChar = input_stream.readChar(); continue; } catch (java.io.IOException e1) { } } int error_line = input_stream.getEndLine(); int error_column = input_stream.getEndColumn(); String error_after = null; boolean EOFSeen = false; try { input_stream.readChar(); input_stream.backup(1); } catch (java.io.IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; } if (!EOFSeen) { input_stream.backup(1); error_after = curPos <= 1 ? "" : input_stream.GetImage(); } throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); } } } void SkipLexicalActions(Token matchedToken) { switch(jjmatchedKind) { case 8 : image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); _iSingleComments++; break; case 10 : image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); _iMultiComments++; _iMultiCommentsLast++; break; case 11 : image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); _iMultiComments++; _iMultiCommentsLast++; break; default : break; } } void MoreLexicalActions() { jjimageLen += (lengthOfMatch = jjmatchedPos + 1); switch(jjmatchedKind) { case 7 : image.append(input_stream.GetSuffix(jjimageLen)); jjimageLen = 0; _iMultiCommentsLast = 0; break; default : break; } } private void jjCheckNAdd(int state) { if (jjrounds[state] != jjround) { jjstateSet[jjnewStateCnt++] = state; jjrounds[state] = jjround; } } private void jjAddStates(int start, int end) { do { jjstateSet[jjnewStateCnt++] = jjnextStates[start]; } while (start++ != end); } private void jjCheckNAddTwoStates(int state1, int state2) { jjCheckNAdd(state1); jjCheckNAdd(state2); } private void jjCheckNAddStates(int start, int end) { do { jjCheckNAdd(jjnextStates[start]); } while (start++ != end); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/debug/ParseException.java0000644000175000017500000002033711343534522033351 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */ /* JavaCCOptions:KEEP_LINE_COL=null */ //cobertura - put the import on its own line - otherwise, it messes up the script that changes the package. package net.sourceforge.cobertura.javancss.parser.debug; /** * This exception is thrown when parse errors are encountered. * You can explicitly create objects of this exception type by * calling the method generateParseException in the generated * parser. * * You can modify this class to customize your error reporting * mechanisms so long as you retain the public fields. */ public class ParseException extends Exception { /** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", * "expectedTokenSequences", and "tokenImage" set. The boolean * flag "specialConstructor" is also set to true to indicate that * this constructor was used to create this object. * This constructor calls its super class with the empty string * to force the "toString" method of parent class "Throwable" to * print the error message in the form: * ParseException: */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal ) { super(""); specialConstructor = true; currentToken = currentTokenVal; expectedTokenSequences = expectedTokenSequencesVal; tokenImage = tokenImageVal; } /** * The following constructors are for use by you for whatever * purpose you can think of. Constructing the exception in this * manner makes the exception behave in the normal way - i.e., as * documented in the class "Throwable". The fields "errorToken", * "expectedTokenSequences", and "tokenImage" do not contain * relevant information. The JavaCC generated code does not use * these constructors. */ public ParseException() { super(); specialConstructor = false; } /** Constructor with message. */ public ParseException(String message) { super(message); specialConstructor = false; } /** * This variable determines which constructor was used to create * this object and thereby affects the semantics of the * "getMessage" method (see below). */ protected boolean specialConstructor; /** * This is the last token that has been consumed successfully. If * this object has been created due to a parse error, the token * followng this token will (therefore) be the first error token. */ public Token currentToken; /** * Each entry in this array is an array of integers. Each array * of integers represents a sequence of tokens (by their ordinal * values) that is expected at this point of the parse. */ public int[][] expectedTokenSequences; /** * This is a reference to the "tokenImage" array of the generated * parser within which the parse error occurred. This array is * defined in the generated ...Constants interface. */ public String[] tokenImage; /** * This method has the standard behavior when this object has been * created using the standard constructors. Otherwise, it uses * "currentToken" and "expectedTokenSequences" to generate a parse * error message and returns it. If this object has been created * due to a parse error, and you do not catch it (it gets thrown * from the parser), then this method is called during the printing * of the final stack trace, and hence the correct error message * gets displayed. */ public String getMessage() { if (!specialConstructor) { return super.getMessage(); } StringBuffer expected = new StringBuffer(); int maxSize = 0; for (int i = 0; i < expectedTokenSequences.length; i++) { if (maxSize < expectedTokenSequences[i].length) { maxSize = expectedTokenSequences[i].length; } for (int j = 0; j < expectedTokenSequences[i].length; j++) { expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' '); } if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { expected.append("..."); } expected.append(eol).append(" "); } String retval = "Encountered \""; Token tok = currentToken.next; for (int i = 0; i < maxSize; i++) { if (i != 0) retval += " "; if (tok.kind == 0) { retval += tokenImage[0]; break; } retval += " " + tokenImage[tok.kind]; retval += " \""; retval += add_escapes(tok.image); retval += " \""; tok = tok.next; } retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; retval += "." + eol; if (expectedTokenSequences.length == 1) { retval += "Was expecting:" + eol + " "; } else { retval += "Was expecting one of:" + eol + " "; } retval += expected.toString(); return retval; } /** * The end of line string for this machine. */ protected String eol = System.getProperty("line.separator", "\n"); /** * Used to convert raw characters to their escaped version * when these raw version cannot be used as part of an ASCII * string literal. */ protected String add_escapes(String str) { StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) { case 0 : continue; case '\b': retval.append("\\b"); continue; case '\t': retval.append("\\t"); continue; case '\n': retval.append("\\n"); continue; case '\f': retval.append("\\f"); continue; case '\r': retval.append("\\r"); continue; case '\"': retval.append("\\\""); continue; case '\'': retval.append("\\\'"); continue; case '\\': retval.append("\\\\"); continue; default: if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { String s = "0000" + Integer.toString(ch, 16); retval.append("\\u" + s.substring(s.length() - 4, s.length())); } else { retval.append(ch); } continue; } } return retval.toString(); } } /* JavaCC - OriginalChecksum=1dc25ef3bbdc3cc4c510b31013f38e78 (do not edit this line) */ cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/debug/TokenMgrError.java0000644000175000017500000001377311343534522033166 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */ /* JavaCCOptions: */ //cobertura - put the import on its own line - otherwise, it messes up the script that changes the package. package net.sourceforge.cobertura.javancss.parser.debug; /** Token Manager Error. */ public class TokenMgrError extends Error { /* * Ordinals for various reasons why an Error of this type can be thrown. */ /** * Lexical error occurred. */ static final int LEXICAL_ERROR = 0; /** * An attempt was made to create a second instance of a static token manager. */ static final int STATIC_LEXER_ERROR = 1; /** * Tried to change to an invalid lexical state. */ static final int INVALID_LEXICAL_STATE = 2; /** * Detected (and bailed out of) an infinite loop in the token manager. */ static final int LOOP_DETECTED = 3; /** * Indicates the reason why the exception is thrown. It will have * one of the above 4 values. */ int errorCode; /** * Replaces unprintable characters by their escaped (or unicode escaped) * equivalents in the given string */ protected static final String addEscapes(String str) { StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) { case 0 : continue; case '\b': retval.append("\\b"); continue; case '\t': retval.append("\\t"); continue; case '\n': retval.append("\\n"); continue; case '\f': retval.append("\\f"); continue; case '\r': retval.append("\\r"); continue; case '\"': retval.append("\\\""); continue; case '\'': retval.append("\\\'"); continue; case '\\': retval.append("\\\\"); continue; default: if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { String s = "0000" + Integer.toString(ch, 16); retval.append("\\u" + s.substring(s.length() - 4, s.length())); } else { retval.append(ch); } continue; } } return retval.toString(); } /** * Returns a detailed message for the Error when it is thrown by the * token manager to indicate a lexical error. * Parameters : * EOFSeen : indicates if EOF caused the lexical error * curLexState : lexical state in which this error occurred * errorLine : line number when the error occurred * errorColumn : column number when the error occurred * errorAfter : prefix that was seen before this error occurred * curchar : the offending character * Note: You can customize the lexical error message by modifying this method. */ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { return("Lexical error at line " + errorLine + ", column " + errorColumn + ". Encountered: " + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + "after : \"" + addEscapes(errorAfter) + "\""); } /** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * * "Internal Error : Please file a bug report .... " * * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); } /* * Constructors of various flavors follow. */ /** No arg constructor. */ public TokenMgrError() { } /** Constructor with message and reason. */ public TokenMgrError(String message, int reason) { super(message); errorCode = reason; } /** Full Constructor. */ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); } } /* JavaCC - OriginalChecksum=78b83ead2b9be6e85dfd6cf582647f66 (do not edit this line) */ ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/debug/JavaParserDebugConstants.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/debug/JavaParserDebugConst0000644000175000017500000002411711343534514033515 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaParserDebugConstants.java */ //cobertura - put the import on its own line - otherwise, it messes up the script that changes the package. package net.sourceforge.cobertura.javancss.parser.debug; /** * Token literal values and constants. * Generated by org.javacc.parser.OtherFilesGen#start() */ public interface JavaParserDebugConstants { /** End of File. */ int EOF = 0; /** RegularExpression Id. */ int SINGLE_LINE_COMMENT = 8; /** RegularExpression Id. */ int SINGLE_LINE_COMMENT2 = 9; /** RegularExpression Id. */ int END_OF_LINE_MULTI = 10; /** RegularExpression Id. */ int MULTI_LINE_COMMENT = 11; /** RegularExpression Id. */ int ABSTRACT = 13; /** RegularExpression Id. */ int ASSERT = 14; /** RegularExpression Id. */ int BOOLEAN = 15; /** RegularExpression Id. */ int BREAK = 16; /** RegularExpression Id. */ int BYTE = 17; /** RegularExpression Id. */ int CASE = 18; /** RegularExpression Id. */ int CATCH = 19; /** RegularExpression Id. */ int CHAR = 20; /** RegularExpression Id. */ int CLASS = 21; /** RegularExpression Id. */ int CONST = 22; /** RegularExpression Id. */ int CONTINUE = 23; /** RegularExpression Id. */ int _DEFAULT = 24; /** RegularExpression Id. */ int DO = 25; /** RegularExpression Id. */ int DOUBLE = 26; /** RegularExpression Id. */ int ELSE = 27; /** RegularExpression Id. */ int ENUM = 28; /** RegularExpression Id. */ int EXTENDS = 29; /** RegularExpression Id. */ int FALSE = 30; /** RegularExpression Id. */ int FINAL = 31; /** RegularExpression Id. */ int FINALLY = 32; /** RegularExpression Id. */ int FLOAT = 33; /** RegularExpression Id. */ int FOR = 34; /** RegularExpression Id. */ int GOTO = 35; /** RegularExpression Id. */ int IF = 36; /** RegularExpression Id. */ int IMPLEMENTS = 37; /** RegularExpression Id. */ int IMPORT = 38; /** RegularExpression Id. */ int INSTANCEOF = 39; /** RegularExpression Id. */ int INT = 40; /** RegularExpression Id. */ int INTERFACE = 41; /** RegularExpression Id. */ int LONG = 42; /** RegularExpression Id. */ int NATIVE = 43; /** RegularExpression Id. */ int NEW = 44; /** RegularExpression Id. */ int NULL = 45; /** RegularExpression Id. */ int PACKAGE = 46; /** RegularExpression Id. */ int PRIVATE = 47; /** RegularExpression Id. */ int PROTECTED = 48; /** RegularExpression Id. */ int PUBLIC = 49; /** RegularExpression Id. */ int RETURN = 50; /** RegularExpression Id. */ int SHORT = 51; /** RegularExpression Id. */ int STATIC = 52; /** RegularExpression Id. */ int TESTAAAA = 53; /** RegularExpression Id. */ int SUPER = 54; /** RegularExpression Id. */ int SWITCH = 55; /** RegularExpression Id. */ int SYNCHRONIZED = 56; /** RegularExpression Id. */ int THIS = 57; /** RegularExpression Id. */ int THROW = 58; /** RegularExpression Id. */ int THROWS = 59; /** RegularExpression Id. */ int TRANSIENT = 60; /** RegularExpression Id. */ int TRUE = 61; /** RegularExpression Id. */ int TRY = 62; /** RegularExpression Id. */ int VOID = 63; /** RegularExpression Id. */ int VOLATILE = 64; /** RegularExpression Id. */ int WHILE = 65; /** RegularExpression Id. */ int INTEGER_LITERAL = 66; /** RegularExpression Id. */ int DECIMAL_LITERAL = 67; /** RegularExpression Id. */ int HEX_LITERAL = 68; /** RegularExpression Id. */ int OCTAL_LITERAL = 69; /** RegularExpression Id. */ int FLOATING_POINT_LITERAL = 70; /** RegularExpression Id. */ int EXPONENT = 71; /** RegularExpression Id. */ int CHARACTER_LITERAL = 72; /** RegularExpression Id. */ int STRING_LITERAL = 73; /** RegularExpression Id. */ int IDENTIFIER = 74; /** RegularExpression Id. */ int LETTER = 75; /** RegularExpression Id. */ int DIGIT = 76; /** RegularExpression Id. */ int LPAREN = 77; /** RegularExpression Id. */ int RPAREN = 78; /** RegularExpression Id. */ int LBRACE = 79; /** RegularExpression Id. */ int RBRACE = 80; /** RegularExpression Id. */ int LBRACKET = 81; /** RegularExpression Id. */ int RBRACKET = 82; /** RegularExpression Id. */ int SEMICOLON = 83; /** RegularExpression Id. */ int COMMA = 84; /** RegularExpression Id. */ int DOT = 85; /** RegularExpression Id. */ int AT = 86; /** RegularExpression Id. */ int ASSIGN = 87; /** RegularExpression Id. */ int GT = 88; /** RegularExpression Id. */ int LT = 89; /** RegularExpression Id. */ int BANG = 90; /** RegularExpression Id. */ int TILDE = 91; /** RegularExpression Id. */ int HOOK = 92; /** RegularExpression Id. */ int COLON = 93; /** RegularExpression Id. */ int EQ = 94; /** RegularExpression Id. */ int LE = 95; /** RegularExpression Id. */ int GE = 96; /** RegularExpression Id. */ int NE = 97; /** RegularExpression Id. */ int SC_OR = 98; /** RegularExpression Id. */ int SC_AND = 99; /** RegularExpression Id. */ int INCR = 100; /** RegularExpression Id. */ int DECR = 101; /** RegularExpression Id. */ int PLUS = 102; /** RegularExpression Id. */ int MINUS = 103; /** RegularExpression Id. */ int STAR = 104; /** RegularExpression Id. */ int SLASH = 105; /** RegularExpression Id. */ int BIT_AND = 106; /** RegularExpression Id. */ int BIT_OR = 107; /** RegularExpression Id. */ int XOR = 108; /** RegularExpression Id. */ int REM = 109; /** RegularExpression Id. */ int LSHIFT = 110; /** RegularExpression Id. */ int PLUSASSIGN = 111; /** RegularExpression Id. */ int MINUSASSIGN = 112; /** RegularExpression Id. */ int STARASSIGN = 113; /** RegularExpression Id. */ int SLASHASSIGN = 114; /** RegularExpression Id. */ int ANDASSIGN = 115; /** RegularExpression Id. */ int ORASSIGN = 116; /** RegularExpression Id. */ int XORASSIGN = 117; /** RegularExpression Id. */ int REMASSIGN = 118; /** RegularExpression Id. */ int LSHIFTASSIGN = 119; /** RegularExpression Id. */ int RSIGNEDSHIFTASSIGN = 120; /** RegularExpression Id. */ int RUNSIGNEDSHIFTASSIGN = 121; /** RegularExpression Id. */ int ELLIPSIS = 122; /** Lexical state. */ int DEFAULT = 0; /** Lexical state. */ int IN_SINGLE_LINE_COMMENT = 1; /** Lexical state. */ int IN_MULTI_LINE_COMMENT = 2; /** Literal token values. */ String[] tokenImage = { "", "\" \"", "\"\\t\"", "\"\\n\"", "\"\\r\"", "\"\\f\"", "\"\\u001a\"", "\"/*\"", "\"//\"", "", "", "\"*/\"", "", "\"abstract\"", "\"assert\"", "\"boolean\"", "\"break\"", "\"byte\"", "\"case\"", "\"catch\"", "\"char\"", "\"class\"", "\"const\"", "\"continue\"", "\"default\"", "\"do\"", "\"double\"", "\"else\"", "\"enum\"", "\"extends\"", "\"false\"", "\"final\"", "\"finally\"", "\"float\"", "\"for\"", "\"goto\"", "\"if\"", "\"implements\"", "\"import\"", "\"instanceof\"", "\"int\"", "\"interface\"", "\"long\"", "\"native\"", "\"new\"", "\"null\"", "\"package\"", "\"private\"", "\"protected\"", "\"public\"", "\"return\"", "\"short\"", "\"static\"", "\"strictfp\"", "\"super\"", "\"switch\"", "\"synchronized\"", "\"this\"", "\"throw\"", "\"throws\"", "\"transient\"", "\"true\"", "\"try\"", "\"void\"", "\"volatile\"", "\"while\"", "", "", "", "", "", "", "", "", "", "", "", "\"(\"", "\")\"", "\"{\"", "\"}\"", "\"[\"", "\"]\"", "\";\"", "\",\"", "\".\"", "\"@\"", "\"=\"", "\">\"", "\"<\"", "\"!\"", "\"~\"", "\"?\"", "\":\"", "\"==\"", "\"<=\"", "\">=\"", "\"!=\"", "\"||\"", "\"&&\"", "\"++\"", "\"--\"", "\"+\"", "\"-\"", "\"*\"", "\"/\"", "\"&\"", "\"|\"", "\"^\"", "\"%\"", "\"<<\"", "\"+=\"", "\"-=\"", "\"*=\"", "\"/=\"", "\"&=\"", "\"|=\"", "\"^=\"", "\"%=\"", "\"<<=\"", "\">>=\"", "\">>>=\"", "\"...\"", }; } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/debug/JavaParserDebug.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/debug/JavaParserDebug.java0000644000175000017500000106066711343534515033442 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaParserDebug.java */ //cobertura - put the import on its own line - otherwise, it messes up the script that changes the package. package net.sourceforge.cobertura.javancss.parser.debug; import net.sourceforge.cobertura.javancss.parser.JavaParserInterface; import java.util.*; import net.sourceforge.cobertura.javancss.ccl.Util; import net.sourceforge.cobertura.javancss.FunctionMetric; import net.sourceforge.cobertura.javancss.ObjectMetric; import net.sourceforge.cobertura.javancss.PackageMetric; /** * Java source code parser based on a grammar compiled by * JavaCC from Java1.1.jj to the JavaParserDebug class.

* * This class is responsible for parsing Java code and counting * all metrics during this parsing process. * The rest of the application is only responsible for invoking * this parser in a convenient way and to present the results * to the user.

* * This grammar is based on the Java grammar that comes as an * example with JavaCC, but has been extended to collect the * metrics data (and adapted to support real life and jdk 1.4 * Java sources as well). * * @author Sriram Sankar (original JavaCC grammar) * , Chr. Clemens Lee (JavaNCSS metrics) * , additional counting of javadoc comments done by * Emilio Gongora, and * Guillermo Rodriguez, . * Anonymous class count patch by Vesa Karvonnen, 2002-10-30. * @version 2000-01-31 $Id: Java1.1.jj 159 2009-05-27 22:18:55Z hboutemy $ */ public class JavaParserDebug implements JavaParserInterface, JavaParserDebugConstants { { //* // DEBUG MODE Util.setDebug( true ); // */ } private boolean _bReturn = false; private int _ncss = 0; // general counter private int _loc = 0; private int _cyc = 1; private int _localCases = 0; private String _sName = ""; // name of last token private String _sParameter = ""; private String _sPackage = ""; private String _sClass = ""; private String _sFunction = ""; private int _functions = 0; // number of functions in this class //private int _topLevelClasses = 0; private int _classes = 0; private int _classLevel = 0; private int _anonClassCount = 1; private int _jvdcLines = 0; // added by SMS private int _jvdc = 0; private boolean _bPrivate = true;//false; // added by SMS private boolean _bPublic = true; // added by SMS /** * For each class the number of formal * comments in toplevel methods, constructors, inner * classes, and for the class itself are counted. * The top level comment has to be directly before * the class definition, not before the package or * import statement as it is often seen in source code * examples (at the beginning of your source files you * should instead put your copyright notice). */ private int _javadocs = 0; // global javadocs private List/**/ _vFunctions = new ArrayList(); // holds the statistics for each method /** * Metrics for each class/interface are stored in this * vector. */ private List/**/ _vClasses = new ArrayList(); private List _vImports = new ArrayList(); private Object[] _aoPackage = null; private Map/**/ _htPackage = new HashMap(); private PackageMetric _pPackageMetric; private Token _tmpToken = null; /** Argh, too much of a state machine. */ private Token _tmpResultToken = null; private String _formatPackage(String sPackage_) { if (sPackage_.equals("")) { return "."; } return sPackage_.substring(0, sPackage_.length() - 1); } public void parse() throws Exception { CompilationUnit(); } public void parseImportUnit() throws Exception { ImportUnit(); } public int getNcss() { return _ncss; } public int getLOC() { return _loc; } // added by SMS public int getJvdc() { return _jvdc; } /*public int getTopLevelClasses() { return _topLevelClasses; }*/ public List/**/ getFunction() { return _vFunctions; } /** * @return Top level classes in sorted order */ public List/**/ getObject() { Collections.sort(_vClasses); return _vClasses; } /** * @return The empty package consists of the name ".". */ public Map/**/ getPackage() { return _htPackage; } public List getImports() { return _vImports; } /** * name, beginLine, ... */ public Object[] getPackageObjects() { return _aoPackage; } /** * if javancss is used with cat *.java a long * input stream might get generated, so line * number information in case of an parse exception * is not very useful. */ public String getLastFunction() { return _sPackage + _sClass + _sFunction; } /** * Class to hold modifiers. */ static public final class ModifierSet { /* Definitions of the bits in the modifiers field. */ public static final int PUBLIC = 0x0001; public static final int PROTECTED = 0x0002; public static final int PRIVATE = 0x0004; public static final int ABSTRACT = 0x0008; public static final int STATIC = 0x0010; public static final int FINAL = 0x0020; public static final int SYNCHRONIZED = 0x0040; public static final int NATIVE = 0x0080; public static final int TRANSIENT = 0x0100; public static final int VOLATILE = 0x0200; public static final int STRICTFP = 0x1000; /** A set of accessors that indicate whether the specified modifier is in the set. */ public boolean isPublic(int modifiers) { return (modifiers & PUBLIC) != 0; } public boolean isProtected(int modifiers) { return (modifiers & PROTECTED) != 0; } public boolean isPrivate(int modifiers) { return (modifiers & PRIVATE) != 0; } public boolean isStatic(int modifiers) { return (modifiers & STATIC) != 0; } public boolean isAbstract(int modifiers) { return (modifiers & ABSTRACT) != 0; } public boolean isFinal(int modifiers) { return (modifiers & FINAL) != 0; } public boolean isNative(int modifiers) { return (modifiers & NATIVE) != 0; } public boolean isStrictfp(int modifiers) { return (modifiers & STRICTFP) != 0; } public boolean isSynchronized(int modifiers) { return (modifiers & SYNCHRONIZED) != 0; } public boolean isTransient(int modifiers) { return (modifiers & TRANSIENT) != 0; } public boolean isVolatile(int modifiers) { return (modifiers & VOLATILE) != 0; } /** * Removes the given modifier. */ static int removeModifier(int modifiers, int mod) { return modifiers & ~mod; } } /***************************************** * THE JAVA LANGUAGE GRAMMAR STARTS HERE * *****************************************/ /* * Program structuring syntax follows. */ final public void CompilationUnit() throws ParseException { trace_call("CompilationUnit"); try { int oldNcss = 0; // added by SMS int oldFormal = 0; int oldSingle = 0; int oldMulti = 0; JavaParserDebugTokenManager._iSingleComments = 0; JavaParserDebugTokenManager._iMultiComments = 0; JavaParserDebugTokenManager._iFormalComments = 0; JavaParserDebugTokenManager._iMultiCommentsLast = 0; _bPrivate = true; _sPackage = ""; _pPackageMetric = new PackageMetric(); // this object manages the metrics if (jj_2_1(2147483647)) { PackageDeclaration(); } else { ; } label_1: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPORT: ; break; default: jj_la1[0] = jj_gen; break label_1; } ImportDeclaration(); } label_2: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case CLASS: case ENUM: case FINAL: case INTERFACE: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case SEMICOLON: case AT: ; break; default: jj_la1[1] = jj_gen; break label_2; } TypeDeclaration(); } // Package classes and functions are set inside // class and interface bodies. _pPackageMetric.ncss = _ncss; // added by SMS _pPackageMetric.javadocsLn = JavaParserDebugTokenManager._iFormalComments; _pPackageMetric.singleLn = JavaParserDebugTokenManager._iSingleComments; _pPackageMetric.multiLn = JavaParserDebugTokenManager._iMultiComments; // _htPackage.put(_formatPackage(_sPackage), _pPackageMetric); label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPORT: case PACKAGE: case AT: ; break; default: jj_la1[2] = jj_gen; break label_3; } oldNcss = _ncss; _sPackage = ""; _pPackageMetric = new PackageMetric(); // added by SMS oldFormal = JavaParserDebugTokenManager._iFormalComments; oldSingle = JavaParserDebugTokenManager._iSingleComments; oldMulti = JavaParserDebugTokenManager._iMultiComments; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PACKAGE: case AT: PackageDeclaration(); break; case IMPORT: ImportDeclaration(); break; default: jj_la1[3] = jj_gen; jj_consume_token(-1); throw new ParseException(); } label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPORT: ; break; default: jj_la1[4] = jj_gen; break label_4; } ImportDeclaration(); } label_5: while (true) { TypeDeclaration(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case CLASS: case ENUM: case FINAL: case INTERFACE: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case SEMICOLON: case AT: ; break; default: jj_la1[5] = jj_gen; break label_5; } } // Package classes and functions are set inside // class and interface bodies. _pPackageMetric.ncss = _ncss - oldNcss; // added by SMS _pPackageMetric.javadocsLn = JavaParserDebugTokenManager._iFormalComments - oldFormal; _pPackageMetric.singleLn = JavaParserDebugTokenManager._iSingleComments - oldSingle; _pPackageMetric.multiLn = JavaParserDebugTokenManager._iMultiComments - oldMulti; // PackageMetric pckmPrevious = (PackageMetric)_htPackage. get(_formatPackage(_sPackage)); _pPackageMetric.add(pckmPrevious); _htPackage.put(_formatPackage(_sPackage), _pPackageMetric); } jj_consume_token(0); Token pToken = getToken(1); _loc = pToken.endLine; } finally { trace_return("CompilationUnit"); } } final public void ImportUnit() throws ParseException { trace_call("ImportUnit"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PACKAGE: case AT: PackageDeclaration(); break; default: jj_la1[6] = jj_gen; ; } label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPORT: ; break; default: jj_la1[7] = jj_gen; break label_6; } ImportDeclaration(); } label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case PUBLIC: case TESTAAAA: case SYNCHRONIZED: ; break; default: jj_la1[8] = jj_gen; break label_7; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: jj_consume_token(ABSTRACT); break; case FINAL: jj_consume_token(FINAL); break; case PUBLIC: jj_consume_token(PUBLIC); break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); break; case TESTAAAA: jj_consume_token(TESTAAAA); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: jj_consume_token(CLASS); break; case INTERFACE: jj_consume_token(INTERFACE); break; default: jj_la1[10] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("ImportUnit"); } } final public void PackageDeclaration() throws ParseException { trace_call("PackageDeclaration"); try { int beginLine = 1; int beginColumn = 1; label_8: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[11] = jj_gen; break label_8; } Annotation(); } jj_consume_token(PACKAGE); _anonClassCount = 1; Token pToken = getToken( 0 ); beginLine = pToken.beginLine ; beginColumn = pToken.beginColumn; _aoPackage = new Object[ 5 ]; Name(); _aoPackage[ 0 ] = _sName; _aoPackage[ 1 ] = new Integer( beginLine ); _aoPackage[ 2 ] = new Integer( beginColumn ); jj_consume_token(SEMICOLON); _aoPackage[ 3 ] = new Integer( getToken( 0 ).endLine ); _aoPackage[ 4 ] = new Integer( getToken( 0 ).endColumn ); _ncss++; Util.debug( "_ncss++" ); _sPackage = _sName + "."; } finally { trace_return("PackageDeclaration"); } } final public void ImportDeclaration() throws ParseException { trace_call("ImportDeclaration"); try { int beginLine = 1; int beginColumn = 1; Object[] aoImport = null; jj_consume_token(IMPORT); Token pToken = getToken( 0 ); beginLine = pToken.beginLine ; beginColumn = pToken.beginColumn; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); break; default: jj_la1[12] = jj_gen; ; } Name(); aoImport = new Object[ 5 ]; aoImport[ 0 ] = _sName; aoImport[ 1 ] = new Integer( beginLine ); aoImport[ 2 ] = new Integer( beginColumn ); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: jj_consume_token(DOT); jj_consume_token(STAR); aoImport[ 0 ] = aoImport[ 0 ].toString() + ".*"; break; default: jj_la1[13] = jj_gen; ; } jj_consume_token(SEMICOLON); aoImport[ 3 ] = new Integer( getToken( 0 ).endLine ); aoImport[ 4 ] = new Integer( getToken( 0 ).endColumn ); _vImports.add( aoImport ); _ncss++; Util.debug( "_ncss++" ); } finally { trace_return("ImportDeclaration"); } } final public void TypeDeclaration() throws ParseException { trace_call("TypeDeclaration"); try { int modifiers; if (jj_2_2(2147483647)) { ClassDeclaration(); } else if (jj_2_3(2147483647)) { modifiers = Modifiers(); EnumDeclaration(modifiers); } else if (jj_2_4(2147483647)) { InterfaceDeclaration(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case AT: modifiers = Modifiers(); AnnotationTypeDeclaration(modifiers); break; case SEMICOLON: jj_consume_token(SEMICOLON); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("TypeDeclaration"); } } /* * Declaration syntax follows. */ final public void ClassDeclaration() throws ParseException { trace_call("ClassDeclaration"); try { Token tmpToken = null; _javadocs = 0; ObjectMetric metric = null; // added by SMS int oldSingle = 0; int oldMulti = 0; _jvdcLines = 0; boolean bTemp = _bPublic; _bPublic = false; // //Added by REYNAUD Sebastien (LOGICA) Token myToken = null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: myToken = getToken(1); Annotation(); tmpToken = myToken; break; default: jj_la1[15] = jj_gen; ; } label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[16] = jj_gen; break label_9; } Annotation(); } label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case PUBLIC: case TESTAAAA: case SYNCHRONIZED: ; break; default: jj_la1[17] = jj_gen; break label_10; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: jj_consume_token(ABSTRACT); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case FINAL: jj_consume_token(FINAL); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case PUBLIC: jj_consume_token(PUBLIC); _bPublic = true; // added by SMS if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case TESTAAAA: jj_consume_token(TESTAAAA); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } if ( tmpToken == null ) { tmpToken = getToken( 1 ); } while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; Util.debug( "ClassDeclaration()._javadocs++" ); if (_bPublic || _bPrivate) { Util.debug( "_jvdc++" ); _jvdc++; _jvdcLines += JavaParserDebugTokenManager._iMultiCommentsLast; JavaParserDebugTokenManager._iFormalComments += JavaParserDebugTokenManager._iMultiCommentsLast; } JavaParserDebugTokenManager._iMultiComments -= JavaParserDebugTokenManager._iMultiCommentsLast; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } oldSingle = JavaParserDebugTokenManager._iSingleComments; oldMulti = JavaParserDebugTokenManager._iMultiComments; UnmodifiedClassDeclaration(); /* removed by SMS while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; } tmpToken = tmpToken.specialToken; } */ metric = (ObjectMetric)_vClasses.get( _vClasses.size() - 1); metric.javadocs = _javadocs; // added by SMS metric.javadocsLn = _jvdcLines; metric.singleLn = JavaParserDebugTokenManager._iSingleComments - oldSingle; metric.multiLn = JavaParserDebugTokenManager._iMultiComments - oldMulti; // // added by SMS _bPublic = bTemp; } finally { trace_return("ClassDeclaration"); } } final public void UnmodifiedClassDeclaration() throws ParseException { trace_call("UnmodifiedClassDeclaration"); try { String sOldClass = _sClass; int oldNcss = _ncss; int oldFunctions = _functions; int oldClasses = _classes; //Added by REYNAUD Sebastien (LOGICA) int oldJavadocs = _javadocs; if (!_sClass.equals("")) { _sClass += "."; } _sClass += getToken(2).image; _classLevel ++; Modifiers(); jj_consume_token(CLASS); Identifier(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: jj_la1[19] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: jj_consume_token(EXTENDS); Name(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: jj_la1[20] = jj_gen; ; } label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: ; break; default: jj_la1[21] = jj_gen; break label_11; } jj_consume_token(DOT); Name(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: jj_la1[22] = jj_gen; ; } } break; default: jj_la1[23] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPLEMENTS: jj_consume_token(IMPLEMENTS); NameList(); break; default: jj_la1[24] = jj_gen; ; } ClassBody(); _ncss++; Util.debug( "_ncss++" ); _classLevel--; if (_classLevel == 0) { //_topLevelClasses++; ObjectMetric metric = new ObjectMetric(); metric.name = _sPackage + _sClass; metric.ncss = _ncss - oldNcss; metric.functions = _functions - oldFunctions; metric.classes = _classes - oldClasses; Token lastToken = getToken( 0 ); //metric.add( new Integer( lastToken.endLine ) ); //metric.add( new Integer( lastToken.endColumn ) ); //metric.add( new Integer( _javadocs ) ); _vClasses.add( metric ); _pPackageMetric.functions += _functions - oldFunctions; _pPackageMetric.classes++; // added by SMS _pPackageMetric.javadocs += _javadocs; //_pPackageMetric.javadocsLn += JavaParserDebugTokenManager._iFormalComments - oldFormal; //_pPackageMetric.singleLn += JavaParserDebugTokenManager._iSingleComments - oldSingle; //_pPackageMetric.multiLn += JavaParserDebugTokenManager._iMultiComments - oldMulti; // } //Added by REYNAUD Sebastien (LOGICA) else { ObjectMetric metric1 = new ObjectMetric(); metric1.name = _sPackage + _sClass ; metric1.ncss = _ncss - oldNcss; metric1.functions = _functions - oldFunctions; metric1.classes = _classes - oldClasses; Token lastToken = getToken( 0 ); _vClasses.add( metric1 ); _pPackageMetric.functions += _functions - oldFunctions; _pPackageMetric.classes++; metric1.javadocs = _javadocs - oldJavadocs; } // _functions = oldFunctions; _classes = oldClasses + 1; _sClass = sOldClass; } finally { trace_return("UnmodifiedClassDeclaration"); } } final public void ClassBody() throws ParseException { trace_call("ClassBody"); try { jj_consume_token(LBRACE); label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case LBRACE: case SEMICOLON: case AT: case LT: ; break; default: jj_la1[25] = jj_gen; break label_12; } ClassBodyDeclaration(); } jj_consume_token(RBRACE); } finally { trace_return("ClassBody"); } } final public void NestedClassDeclaration() throws ParseException { trace_call("NestedClassDeclaration"); try { // added by SMS Token tmpToken = null; boolean bTemp = _bPublic; _bPublic = false; boolean bPublic = false; //Added by REYNAUD Sebastien (LOGICA) Token myToken = null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: myToken = getToken(1); Annotation(); tmpToken = myToken; break; default: jj_la1[26] = jj_gen; ; } label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[27] = jj_gen; break label_13; } Annotation(); } if(tmpToken==null) { tmpToken = getToken( 1 ); } label_14: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: ; break; default: jj_la1[28] = jj_gen; break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); break; case ABSTRACT: jj_consume_token(ABSTRACT); break; case FINAL: jj_consume_token(FINAL); break; case PUBLIC: jj_consume_token(PUBLIC); bPublic = true; break; case PROTECTED: jj_consume_token(PROTECTED); bPublic = true; break; case PRIVATE: jj_consume_token(PRIVATE); break; case TESTAAAA: jj_consume_token(TESTAAAA); break; default: jj_la1[29] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } //tmpToken = getToken( 0 );//Removed by REYNAUD Sebastien (LOGICA) while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; Util.debug( "NestedClassDeclaration()._javadocs++" ); if ((_bPublic && bPublic) || _bPrivate) { Util.debug( "_jvdc++" ); _jvdc++; _jvdcLines += JavaParserDebugTokenManager._iMultiCommentsLast; JavaParserDebugTokenManager._iFormalComments += JavaParserDebugTokenManager._iMultiCommentsLast; } JavaParserDebugTokenManager._iMultiComments -= JavaParserDebugTokenManager._iMultiCommentsLast; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } UnmodifiedClassDeclaration(); //added by SMS _bPublic = bTemp; } finally { trace_return("NestedClassDeclaration"); } } final public void ClassBodyDeclaration() throws ParseException { trace_call("ClassBodyDeclaration"); try { int modifiers; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SEMICOLON: EmptyStatement(); break; default: jj_la1[31] = jj_gen; if (jj_2_5(2)) { Initializer(); } else if (jj_2_6(2147483647)) { modifiers = Modifiers(); AnnotationTypeDeclaration(modifiers); } else if (jj_2_7(2147483647)) { CreationAnnotation(); } else if (jj_2_8(2147483647)) { NestedClassDeclaration(); } else if (jj_2_9(2147483647)) { //LOOKAHEAD( ( "static" | "abstract" | "final" | "public" | "protected" | "private" | "strictfp" )* "interface" ) modifiers = Modifiers(); NestedInterfaceDeclaration(); } else if (jj_2_10(2147483647)) { modifiers = Modifiers(); EnumDeclaration(modifiers); } else if (jj_2_11(2147483647)) { ConstructorDeclaration(); } else if (jj_2_12(2147483647)) { MethodDeclaration(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FINAL: case FLOAT: case INT: case LONG: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: label_15: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[30] = jj_gen; break label_15; } Annotation(); } FieldDeclaration(); break; default: jj_la1[32] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } } finally { trace_return("ClassBodyDeclaration"); } } // This production is to determine lookahead only. final public void MethodDeclarationLookahead() throws ParseException { trace_call("MethodDeclarationLookahead"); try { label_16: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[33] = jj_gen; break label_16; } Annotation(); } label_17: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case SYNCHRONIZED: ; break; default: jj_la1[34] = jj_gen; break label_17; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); break; case PROTECTED: jj_consume_token(PROTECTED); break; case PRIVATE: jj_consume_token(PRIVATE); break; case STATIC: jj_consume_token(STATIC); break; case ABSTRACT: jj_consume_token(ABSTRACT); break; case FINAL: jj_consume_token(FINAL); break; case NATIVE: jj_consume_token(NATIVE); break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); break; case TESTAAAA: jj_consume_token(TESTAAAA); break; default: jj_la1[35] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } label_18: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[36] = jj_gen; break label_18; } Annotation(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: jj_la1[37] = jj_gen; ; } ResultType(); Identifier(); jj_consume_token(LPAREN); } finally { trace_return("MethodDeclarationLookahead"); } } final public void InterfaceDeclaration() throws ParseException { trace_call("InterfaceDeclaration"); try { Token tmpToken = null; _javadocs = 0; //boolean bClassComment = false; ObjectMetric metric = null; // added by SMS int oldSingle; int oldMulti; _jvdcLines = 0; boolean bTemp = _bPublic; _bPublic = false; // //Added by REYNAUD Sebastien (LOGICA) Token myToken=null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: myToken = getToken(1); Annotation(); tmpToken = myToken; break; default: jj_la1[38] = jj_gen; ; } label_19: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[39] = jj_gen; break label_19; } Annotation(); } label_20: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case PUBLIC: case TESTAAAA: ; break; default: jj_la1[40] = jj_gen; break label_20; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TESTAAAA: jj_consume_token(TESTAAAA); break; case ABSTRACT: jj_consume_token(ABSTRACT); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case PUBLIC: jj_consume_token(PUBLIC); _bPublic = true; // added by SMS if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; default: jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } if ( tmpToken == null ) { tmpToken = getToken( 1 ); } while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; Util.debug( "InterfaceDeclaration()._javadocs++" ); if (_bPublic || _bPrivate) { Util.debug( "_jvdc++" ); _jvdc++; _jvdcLines += JavaParserDebugTokenManager._iMultiCommentsLast; JavaParserDebugTokenManager._iFormalComments += JavaParserDebugTokenManager._iMultiCommentsLast; } JavaParserDebugTokenManager._iMultiComments -= JavaParserDebugTokenManager._iMultiCommentsLast; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } oldSingle = JavaParserDebugTokenManager._iSingleComments; oldMulti = JavaParserDebugTokenManager._iMultiComments; UnmodifiedInterfaceDeclaration(); /* removed by SMS while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; bClassComment = true; } tmpToken = tmpToken.specialToken; }*/ metric = (ObjectMetric)_vClasses.get( _vClasses.size() - 1 ); metric.javadocs = _javadocs; // added by SMS metric.javadocsLn = _jvdcLines; metric.singleLn = JavaParserDebugTokenManager._iSingleComments - oldSingle; metric.multiLn = JavaParserDebugTokenManager._iMultiComments - oldMulti; // // added by SMS _bPublic = bTemp; } finally { trace_return("InterfaceDeclaration"); } } final public void NestedInterfaceDeclaration() throws ParseException { trace_call("NestedInterfaceDeclaration"); try { // added by SMS Token tmpToken = null; boolean bTemp = _bPublic; _bPublic = false; boolean bPublic = false; //Added by REYNAUD Sebastien (LOGICA) Token myToken=null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: myToken = getToken(1); Annotation(); tmpToken = myToken; break; default: jj_la1[42] = jj_gen; ; } label_21: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[43] = jj_gen; break label_21; } Annotation(); } if(tmpToken==null) { tmpToken = getToken( 1 ); } label_22: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: ; break; default: jj_la1[44] = jj_gen; break label_22; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); break; case ABSTRACT: jj_consume_token(ABSTRACT); break; case FINAL: jj_consume_token(FINAL); break; case PUBLIC: jj_consume_token(PUBLIC); bPublic = true; break; case PROTECTED: jj_consume_token(PROTECTED); bPublic = true; break; case PRIVATE: jj_consume_token(PRIVATE); break; case TESTAAAA: jj_consume_token(TESTAAAA); break; default: jj_la1[45] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } //tmpToken = getToken( 0 ); //Removed by REYNAUD Sebastien (LOGICA) while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; if ((_bPublic && bPublic) || _bPrivate) { Util.debug( "_jvdc++" ); _jvdc++; _jvdcLines += JavaParserDebugTokenManager._iMultiCommentsLast; JavaParserDebugTokenManager._iFormalComments += JavaParserDebugTokenManager._iMultiCommentsLast; } JavaParserDebugTokenManager._iMultiComments -= JavaParserDebugTokenManager._iMultiCommentsLast; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } UnmodifiedInterfaceDeclaration(); // added by SMS _bPublic = bTemp; } finally { trace_return("NestedInterfaceDeclaration"); } } final public void UnmodifiedInterfaceDeclaration() throws ParseException { trace_call("UnmodifiedInterfaceDeclaration"); try { String sOldClass = _sClass; int oldNcss = _ncss; int oldFunctions = _functions; int oldClasses = _classes; //Added by REYNAUD Sebastien (LOGICA) int oldJavadocs = _javadocs; if (!_sClass.equals("")) { _sClass += "."; } _sClass += getToken(2).image; _classLevel ++; jj_consume_token(INTERFACE); Identifier(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: jj_la1[46] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: jj_consume_token(EXTENDS); NameList(); break; default: jj_la1[47] = jj_gen; ; } jj_consume_token(LBRACE); label_23: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case SEMICOLON: case AT: case LT: ; break; default: jj_la1[48] = jj_gen; break label_23; } InterfaceMemberDeclaration(); } jj_consume_token(RBRACE); _ncss++; Util.debug( "_ncss++" ); _classLevel--; if (_classLevel == 0) { //_topLevelClasses++; ObjectMetric metric = new ObjectMetric(); metric.name = _sPackage + _sClass; metric.ncss = _ncss - oldNcss; metric.functions = _functions - oldFunctions; metric.classes = _classes - oldClasses; //metric.add( Util.getConstantObject() ); //metric.add( Util.getConstantObject() ); _vClasses.add( metric ); _pPackageMetric.functions += _functions - oldFunctions; _pPackageMetric.classes++; // added by SMS _pPackageMetric.javadocs += _javadocs; //_pPackageMetric.javadocsLn += JavaParserDebugTokenManager._iFormalComments - oldFormal; //_pPackageMetric.singleLn += JavaParserDebugTokenManager._iSingleComments - oldSingle; //_pPackageMetric.multiLn += JavaParserDebugTokenManager._iMultiComments - oldMulti; // } //Added by REYNAUD Sebastien (LOGICA) else { ObjectMetric metric1 = new ObjectMetric(); metric1.name = _sPackage + _sClass; metric1.ncss = _ncss - oldNcss; metric1.functions = _functions - oldFunctions; metric1.classes = _classes - oldClasses; Token lastToken = getToken( 0 ); _vClasses.add( metric1 ); _pPackageMetric.functions += _functions - oldFunctions; _pPackageMetric.classes++; //_pPackageMetric.javadocs += _javadocs; metric1.javadocs = _javadocs - oldJavadocs; } // _functions = oldFunctions; _classes = oldClasses + 1; _sClass = sOldClass; } finally { trace_return("UnmodifiedInterfaceDeclaration"); } } final public void InterfaceMemberDeclaration() throws ParseException { trace_call("InterfaceMemberDeclaration"); try { int modifiers; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SEMICOLON: EmptyStatement(); break; default: jj_la1[49] = jj_gen; if (jj_2_13(2147483647)) { NestedClassDeclaration(); } else if (jj_2_14(2147483647)) { NestedInterfaceDeclaration(); } else if (jj_2_15(2147483647)) { modifiers = Modifiers(); EnumDeclaration(modifiers); } else if (jj_2_16(2147483647)) { MethodDeclaration(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: modifiers = Modifiers(); FieldDeclaration(); break; default: jj_la1[50] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } } finally { trace_return("InterfaceMemberDeclaration"); } } final public void FieldDeclaration() throws ParseException { trace_call("FieldDeclaration"); try { // added by SMS Token tmpToken = null; boolean bPublic = false; label_24: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FINAL: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TRANSIENT: case VOLATILE: ; break; default: jj_la1[51] = jj_gen; break label_24; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); bPublic = true; break; case PROTECTED: jj_consume_token(PROTECTED); bPublic = true; break; case PRIVATE: jj_consume_token(PRIVATE); break; case STATIC: jj_consume_token(STATIC); break; case FINAL: jj_consume_token(FINAL); break; case TRANSIENT: jj_consume_token(TRANSIENT); break; case VOLATILE: jj_consume_token(VOLATILE); break; default: jj_la1[52] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } tmpToken = getToken( 0 ); while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { if ((bPublic && _bPublic) || _bPrivate) { //_javadocs++; Util.debug( "_jvdc++" ); _jvdc++; _jvdcLines += JavaParserDebugTokenManager._iMultiCommentsLast; JavaParserDebugTokenManager._iFormalComments += JavaParserDebugTokenManager._iMultiCommentsLast; } JavaParserDebugTokenManager._iMultiComments -= JavaParserDebugTokenManager._iMultiCommentsLast; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } label_25: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[53] = jj_gen; break label_25; } Annotation(); } Type(); VariableDeclarator(); label_26: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[54] = jj_gen; break label_26; } jj_consume_token(COMMA); VariableDeclarator(); } jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } finally { trace_return("FieldDeclaration"); } } final public void VariableDeclarator() throws ParseException { trace_call("VariableDeclarator"); try { VariableDeclaratorId(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: jj_consume_token(ASSIGN); VariableInitializer(); break; default: jj_la1[55] = jj_gen; ; } } finally { trace_return("VariableDeclarator"); } } final public void VariableDeclaratorId() throws ParseException { trace_call("VariableDeclaratorId"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ENUM: jj_consume_token(ENUM); break; case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[56] = jj_gen; jj_consume_token(-1); throw new ParseException(); } label_27: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[57] = jj_gen; break label_27; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); _sName += "[]"; } } finally { trace_return("VariableDeclaratorId"); } } final public void VariableInitializer() throws ParseException { trace_call("VariableInitializer"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: ArrayInitializer(); break; case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: Expression(); break; default: jj_la1[58] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("VariableInitializer"); } } final public void ArrayInitializer() throws ParseException { trace_call("ArrayInitializer"); try { jj_consume_token(LBRACE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: VariableInitializer(); label_28: while (true) { if (jj_2_17(2)) { ; } else { break label_28; } jj_consume_token(COMMA); VariableInitializer(); } break; default: jj_la1[59] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); break; default: jj_la1[60] = jj_gen; ; } jj_consume_token(RBRACE); } finally { trace_return("ArrayInitializer"); } } final public void MethodDeclaration() throws ParseException { trace_call("MethodDeclaration"); try { int oldNcss = _ncss; int oldFunctions = _functions; String sOldFunction = _sFunction; int oldcyc = _cyc; boolean bOldReturn = _bReturn; Token tmpToken = null; int jvdc = 0; // added by SMS int jvdcLines = 0; int oldSingle; int oldMulti; boolean bPublic = false; // //Added by REYNAUD Sebastien (LOGICA) Token myToken = null; _tmpToken=null; if ( _tmpToken != null ) { tmpToken = _tmpToken; } label_29: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[61] = jj_gen; break label_29; } myToken = getToken(1); Annotation(); if ( tmpToken == null ) { //tmpToken = getToken( 0 ); //Removed by REYNAUD Sebastien (LOGICA) //Added by REYNAUD Sebastien (LOGICA) tmpToken = myToken; // } } label_30: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case SYNCHRONIZED: ; break; default: jj_la1[62] = jj_gen; break label_30; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); bPublic = true; if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case PROTECTED: jj_consume_token(PROTECTED); bPublic = true; if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case PRIVATE: jj_consume_token(PRIVATE); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case STATIC: jj_consume_token(STATIC); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case ABSTRACT: jj_consume_token(ABSTRACT); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case FINAL: jj_consume_token(FINAL); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case NATIVE: jj_consume_token(NATIVE); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case TESTAAAA: jj_consume_token(TESTAAAA); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; default: jj_la1[63] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } label_31: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[64] = jj_gen; break label_31; } Annotation(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: jj_la1[65] = jj_gen; ; } _tmpResultToken = null; ResultType(); if ( tmpToken == null ) { tmpToken = _tmpResultToken; if ( tmpToken == null ) { tmpToken = getToken( 0 ); } Util.debug( "result type tmpToken: " + tmpToken ); } MethodDeclarator(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THROWS: jj_consume_token(THROWS); NameList(); break; default: jj_la1[66] = jj_gen; ; } _cyc = 1; _bReturn = false; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: Block(); break; case SEMICOLON: jj_consume_token(SEMICOLON); break; default: jj_la1[67] = jj_gen; jj_consume_token(-1); throw new ParseException(); } // added by SMS { Util.debug( "Token: " + String.valueOf( tmpToken.image ) ); while( tmpToken.specialToken != null ) { Util.debug( "Token comment: " + String.valueOf( tmpToken.specialToken.image ) ); if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; Util.debug( "MethodDeclaration()._javadocs++" ); jvdc++; if ((bPublic && _bPublic) || _bPrivate) { Util.debug( "_jvdc++" ); _jvdc++; jvdcLines = JavaParserDebugTokenManager._iMultiCommentsLast; _jvdcLines += jvdcLines; JavaParserDebugTokenManager._iFormalComments += jvdcLines; } JavaParserDebugTokenManager._iMultiComments -= jvdcLines; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { jvdcLines = 0; break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } oldSingle = JavaParserDebugTokenManager._iSingleComments; oldMulti = JavaParserDebugTokenManager._iMultiComments; } // removed by ccl /* while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { jvdc++; _javadocs++; } tmpToken = tmpToken.specialToken; } */ // removed by SMS /* while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { jvdc++; _javadocs++; _bJavadoc = true; } tmpToken = tmpToken.specialToken; } */ if (_bReturn) { _cyc--; } _ncss++; Util.debug( "MethodDeclaration()._ncss++" ); FunctionMetric functionMetrics = new FunctionMetric(); functionMetrics.name = _sPackage + _sClass + _sFunction; functionMetrics.ncss = _ncss - oldNcss; functionMetrics.ccn = _cyc; functionMetrics.javadocs = jvdc; // added by SMS functionMetrics.javadocsLn = 0; //jvdcLines; functionMetrics.singleLn = 0; //JavaParserDebugTokenManager._iSingleComments - oldSingle; functionMetrics.multiLn = 0; //JavaParserDebugTokenManager._iMultiComments - oldMulti; // _vFunctions.add(functionMetrics); _sFunction = sOldFunction; _functions = oldFunctions + 1; _cyc = oldcyc; _bReturn = bOldReturn; //Added by REYNAUD Sebastien (LOGICA) _tmpToken = null; // } finally { trace_return("MethodDeclaration"); } } final public void MethodDeclarator() throws ParseException { trace_call("MethodDeclarator"); try { _sFunction = "." + getToken(1).image; Identifier(); FormalParameters(); _sFunction += _sParameter; label_32: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[68] = jj_gen; break label_32; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); _sFunction += "[]"; } } finally { trace_return("MethodDeclarator"); } } final public void FormalParameters() throws ParseException { trace_call("FormalParameters"); try { _sParameter = "("; jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: FormalParameter(); _sParameter += _sName; label_33: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[69] = jj_gen; break label_33; } jj_consume_token(COMMA); FormalParameter(); _sParameter += "," + _sName; } break; default: jj_la1[70] = jj_gen; ; } jj_consume_token(RPAREN); _sParameter += ")"; } finally { trace_return("FormalParameters"); } } final public void FormalParameter() throws ParseException { trace_call("FormalParameter"); try { Modifiers(); Type(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ELLIPSIS: jj_consume_token(ELLIPSIS); break; default: jj_la1[71] = jj_gen; ; } VariableDeclaratorId(); } finally { trace_return("FormalParameter"); } } final public void ConstructorDeclaration() throws ParseException { trace_call("ConstructorDeclaration"); try { int oldNcss = _ncss; int oldFunctions = _functions; String sOldFunction = _sFunction; int oldcyc = _cyc; boolean bOldReturn = _bReturn; Token tmpToken = null; int jvdc = 0; // added by SMS int oldSingle; int oldMulti; int jvdcLines = 0; boolean bPublic = false; // //Added by REYNAUD Sebastien (LOGICA) Token myToken = null; label_34: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[72] = jj_gen; break label_34; } myToken = getToken(1); Annotation(); if ( tmpToken == null ) { tmpToken = myToken; } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PRIVATE: case PROTECTED: case PUBLIC: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); bPublic = true; if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case PROTECTED: jj_consume_token(PROTECTED); bPublic = true; if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case PRIVATE: jj_consume_token(PRIVATE); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; default: jj_la1[73] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[74] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: jj_la1[75] = jj_gen; ; } Identifier(); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } _cyc = 1; _sFunction = _sPackage + _sClass + "." + getToken(0).image; FormalParameters(); _sFunction += _sParameter; _bReturn = false; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THROWS: jj_consume_token(THROWS); NameList(); break; default: jj_la1[76] = jj_gen; ; } jj_consume_token(LBRACE); if (jj_2_18(2147483647)) { ExplicitConstructorInvocation(); } else { ; } if (jj_2_19(2147483647)) { ExplicitConstructorInvocation(); } else { ; } while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; jvdc++; if ((bPublic && _bPublic) || _bPrivate) { Util.debug( "_jvdc++" ); _jvdc++; jvdcLines = JavaParserDebugTokenManager._iMultiCommentsLast; _jvdcLines += jvdcLines; JavaParserDebugTokenManager._iFormalComments += jvdcLines; } JavaParserDebugTokenManager._iMultiComments -= jvdcLines; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { jvdcLines = 0; break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } oldSingle = JavaParserDebugTokenManager._iSingleComments; oldMulti = JavaParserDebugTokenManager._iMultiComments; label_35: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CLASS: case CONTINUE: case DO: case DOUBLE: case ENUM: case FALSE: case FINAL: case FLOAT: case FOR: case IF: case INT: case INTERFACE: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case RETURN: case SHORT: case STATIC: case TESTAAAA: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRANSIENT: case TRUE: case TRY: case VOID: case VOLATILE: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case AT: case INCR: case DECR: ; break; default: jj_la1[77] = jj_gen; break label_35; } BlockStatement(); } jj_consume_token(RBRACE); /* while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { jvdc++; _javadocs++; } tmpToken = tmpToken.specialToken; } */ if (_bReturn) { _cyc--; } _ncss++; Util.debug( "_ncss++" ); FunctionMetric functionMetrics = new FunctionMetric(); functionMetrics.name = _sFunction; functionMetrics.ncss = _ncss - oldNcss; functionMetrics.ccn = _cyc; functionMetrics.javadocs = jvdc; // added by SMS functionMetrics.javadocsLn = jvdcLines; functionMetrics.singleLn = JavaParserDebugTokenManager._iSingleComments - oldSingle; functionMetrics.multiLn = JavaParserDebugTokenManager._iMultiComments - oldMulti; // _vFunctions.add(functionMetrics); _sFunction = sOldFunction; _functions = oldFunctions + 1; _cyc = oldcyc; _bReturn = bOldReturn; //Added by REYNAUD Sebastien (LOGICA) _tmpToken = null; // } finally { trace_return("ConstructorDeclaration"); } } final public void ExplicitConstructorInvocation() throws ParseException { trace_call("ExplicitConstructorInvocation"); try { if (jj_2_21(2147483647)) { jj_consume_token(THIS); Arguments(); jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: if (jj_2_20(2147483647)) { PrimaryExpression(); jj_consume_token(DOT); } else { ; } jj_consume_token(SUPER); Arguments(); jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); //System.out.println( "\n\nAfter ExplicitConstructorInvocation\n" ); break; default: jj_la1[78] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("ExplicitConstructorInvocation"); } } final public void Initializer() throws ParseException { trace_call("Initializer"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); break; default: jj_la1[79] = jj_gen; ; } Block(); _ncss++; Util.debug( "_ncss++" ); } finally { trace_return("Initializer"); } } /* * Type, name and expression syntax follows. */ final public void Type() throws ParseException { trace_call("Type"); try { if (jj_2_22(2)) { ReferenceType(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: PrimitiveType(); _sName = getToken(0).image; break; default: jj_la1[80] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("Type"); } } /* ccl 2008-01-24 { ( PrimitiveType() { _sName = getToken(0).image; } | Name() [TypeArguments() ["." Identifier()] ] ) ( "[" "]" { _sName += "[]"; } )* } */ /* * Takes special consideration for assert. */ final public void FieldTypeLookahead() throws ParseException { trace_call("FieldTypeLookahead"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: PrimitiveType(); break; case IDENTIFIER: FieldTypeNameLookahead(); break; default: jj_la1[81] = jj_gen; jj_consume_token(-1); throw new ParseException(); } label_36: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[82] = jj_gen; break label_36; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } } finally { trace_return("FieldTypeLookahead"); } } final public void PrimitiveType() throws ParseException { trace_call("PrimitiveType"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: jj_consume_token(BOOLEAN); break; case CHAR: jj_consume_token(CHAR); break; case BYTE: jj_consume_token(BYTE); break; case SHORT: jj_consume_token(SHORT); break; case INT: jj_consume_token(INT); break; case LONG: jj_consume_token(LONG); break; case FLOAT: jj_consume_token(FLOAT); break; case DOUBLE: jj_consume_token(DOUBLE); break; default: jj_la1[83] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("PrimitiveType"); } } final public void ResultType() throws ParseException { trace_call("ResultType"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VOID: jj_consume_token(VOID); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: Type(); break; default: jj_la1[84] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("ResultType"); } } final public void Name() throws ParseException { trace_call("Name"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ENUM: jj_consume_token(ENUM); break; case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } _sName = getToken(0).image; _tmpResultToken = getToken( 0 ); Util.debug( "Name._tmpResultToken: " + _tmpResultToken ); label_37: while (true) { if (jj_2_23(2)) { ; } else { break label_37; } jj_consume_token(DOT); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ENUM: jj_consume_token(ENUM); break; case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } _sName += "." + getToken(0).image; } } finally { trace_return("Name"); } } /** * Takes special consideration for assert. */ final public void FieldTypeNameLookahead() throws ParseException { trace_call("FieldTypeNameLookahead"); try { jj_consume_token(IDENTIFIER); label_38: while (true) { if (jj_2_24(2)) { ; } else { break label_38; } jj_consume_token(DOT); Identifier(); } } finally { trace_return("FieldTypeNameLookahead"); } } final public void NameList() throws ParseException { trace_call("NameList"); try { Name(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: jj_la1[87] = jj_gen; ; } label_39: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[88] = jj_gen; break label_39; } jj_consume_token(COMMA); Name(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: jj_la1[89] = jj_gen; ; } } } finally { trace_return("NameList"); } } /* * Expression syntax follows. */ final public void Expression() throws ParseException { trace_call("Expression"); try { if (jj_2_25(2147483647)) { Assignment(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: ConditionalExpression(); break; default: jj_la1[90] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("Expression"); } } final public void Assignment() throws ParseException { trace_call("Assignment"); try { PrimaryExpression(); AssignmentOperator(); Expression(); } finally { trace_return("Assignment"); } } final public void AssignmentOperator() throws ParseException { trace_call("AssignmentOperator"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: jj_consume_token(ASSIGN); break; case STARASSIGN: jj_consume_token(STARASSIGN); break; case SLASHASSIGN: jj_consume_token(SLASHASSIGN); break; case REMASSIGN: jj_consume_token(REMASSIGN); break; case PLUSASSIGN: jj_consume_token(PLUSASSIGN); break; case MINUSASSIGN: jj_consume_token(MINUSASSIGN); break; case LSHIFTASSIGN: jj_consume_token(LSHIFTASSIGN); break; case RSIGNEDSHIFTASSIGN: jj_consume_token(RSIGNEDSHIFTASSIGN); break; case RUNSIGNEDSHIFTASSIGN: jj_consume_token(RUNSIGNEDSHIFTASSIGN); break; case ANDASSIGN: jj_consume_token(ANDASSIGN); break; case XORASSIGN: jj_consume_token(XORASSIGN); break; case ORASSIGN: jj_consume_token(ORASSIGN); break; default: jj_la1[91] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("AssignmentOperator"); } } final public void ConditionalExpression() throws ParseException { trace_call("ConditionalExpression"); try { ConditionalOrExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case HOOK: jj_consume_token(HOOK); Expression(); jj_consume_token(COLON); ConditionalExpression(); _cyc++; break; default: jj_la1[92] = jj_gen; ; } } finally { trace_return("ConditionalExpression"); } } final public void ConditionalOrExpression() throws ParseException { trace_call("ConditionalOrExpression"); try { ConditionalAndExpression(); label_40: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SC_OR: ; break; default: jj_la1[93] = jj_gen; break label_40; } jj_consume_token(SC_OR); _cyc++; ConditionalAndExpression(); } } finally { trace_return("ConditionalOrExpression"); } } final public void ConditionalAndExpression() throws ParseException { trace_call("ConditionalAndExpression"); try { InclusiveOrExpression(); label_41: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SC_AND: ; break; default: jj_la1[94] = jj_gen; break label_41; } jj_consume_token(SC_AND); _cyc++; InclusiveOrExpression(); } } finally { trace_return("ConditionalAndExpression"); } } final public void InclusiveOrExpression() throws ParseException { trace_call("InclusiveOrExpression"); try { ExclusiveOrExpression(); label_42: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_OR: ; break; default: jj_la1[95] = jj_gen; break label_42; } jj_consume_token(BIT_OR); ExclusiveOrExpression(); } } finally { trace_return("InclusiveOrExpression"); } } final public void ExclusiveOrExpression() throws ParseException { trace_call("ExclusiveOrExpression"); try { AndExpression(); label_43: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case XOR: ; break; default: jj_la1[96] = jj_gen; break label_43; } jj_consume_token(XOR); AndExpression(); } } finally { trace_return("ExclusiveOrExpression"); } } final public void AndExpression() throws ParseException { trace_call("AndExpression"); try { EqualityExpression(); label_44: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_AND: ; break; default: jj_la1[97] = jj_gen; break label_44; } jj_consume_token(BIT_AND); EqualityExpression(); } } finally { trace_return("AndExpression"); } } final public void EqualityExpression() throws ParseException { trace_call("EqualityExpression"); try { InstanceOfExpression(); label_45: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ: case NE: ; break; default: jj_la1[98] = jj_gen; break label_45; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ: jj_consume_token(EQ); break; case NE: jj_consume_token(NE); break; default: jj_la1[99] = jj_gen; jj_consume_token(-1); throw new ParseException(); } InstanceOfExpression(); } } finally { trace_return("EqualityExpression"); } } final public void InstanceOfExpression() throws ParseException { trace_call("InstanceOfExpression"); try { RelationalExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INSTANCEOF: jj_consume_token(INSTANCEOF); Type(); break; default: jj_la1[100] = jj_gen; ; } } finally { trace_return("InstanceOfExpression"); } } final public void RelationalExpression() throws ParseException { trace_call("RelationalExpression"); try { ShiftExpression(); label_46: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case GT: case LT: case LE: case GE: ; break; default: jj_la1[101] = jj_gen; break label_46; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: jj_consume_token(LT); break; case GT: jj_consume_token(GT); break; case LE: jj_consume_token(LE); break; case GE: jj_consume_token(GE); break; default: jj_la1[102] = jj_gen; jj_consume_token(-1); throw new ParseException(); } ShiftExpression(); } } finally { trace_return("RelationalExpression"); } } final public void ShiftExpression() throws ParseException { trace_call("ShiftExpression"); try { AdditiveExpression(); label_47: while (true) { if (jj_2_26(3)) { ; } else { break label_47; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LSHIFT: jj_consume_token(LSHIFT); break; case GT: jj_consume_token(GT); jj_consume_token(GT); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case GT: jj_consume_token(GT); break; default: jj_la1[103] = jj_gen; ; } break; default: jj_la1[104] = jj_gen; jj_consume_token(-1); throw new ParseException(); } AdditiveExpression(); } } finally { trace_return("ShiftExpression"); } } final public void AdditiveExpression() throws ParseException { trace_call("AdditiveExpression"); try { MultiplicativeExpression(); label_48: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: ; break; default: jj_la1[105] = jj_gen; break label_48; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: jj_consume_token(PLUS); break; case MINUS: jj_consume_token(MINUS); break; default: jj_la1[106] = jj_gen; jj_consume_token(-1); throw new ParseException(); } MultiplicativeExpression(); } } finally { trace_return("AdditiveExpression"); } } final public void MultiplicativeExpression() throws ParseException { trace_call("MultiplicativeExpression"); try { UnaryExpression(); label_49: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: case SLASH: case REM: ; break; default: jj_la1[107] = jj_gen; break label_49; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: jj_consume_token(STAR); break; case SLASH: jj_consume_token(SLASH); break; case REM: jj_consume_token(REM); break; default: jj_la1[108] = jj_gen; jj_consume_token(-1); throw new ParseException(); } UnaryExpression(); } } finally { trace_return("MultiplicativeExpression"); } } final public void UnaryExpression() throws ParseException { trace_call("UnaryExpression"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: jj_consume_token(PLUS); break; case MINUS: jj_consume_token(MINUS); break; default: jj_la1[109] = jj_gen; jj_consume_token(-1); throw new ParseException(); } UnaryExpression(); break; case INCR: PreIncrementExpression(); break; case DECR: PreDecrementExpression(); break; case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: UnaryExpressionNotPlusMinus(); break; default: jj_la1[110] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("UnaryExpression"); } } final public void PreIncrementExpression() throws ParseException { trace_call("PreIncrementExpression"); try { jj_consume_token(INCR); PrimaryExpression(); } finally { trace_return("PreIncrementExpression"); } } final public void PreDecrementExpression() throws ParseException { trace_call("PreDecrementExpression"); try { jj_consume_token(DECR); PrimaryExpression(); } finally { trace_return("PreDecrementExpression"); } } final public void UnaryExpressionNotPlusMinus() throws ParseException { trace_call("UnaryExpressionNotPlusMinus"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BANG: case TILDE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TILDE: jj_consume_token(TILDE); break; case BANG: jj_consume_token(BANG); break; default: jj_la1[111] = jj_gen; jj_consume_token(-1); throw new ParseException(); } UnaryExpression(); break; default: jj_la1[112] = jj_gen; if (jj_2_27(2147483647)) { CastExpression(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: PostfixExpression(); break; default: jj_la1[113] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } } finally { trace_return("UnaryExpressionNotPlusMinus"); } } // This production is to determine lookahead only. The LOOKAHEAD specifications // below are not used, but they are there just to indicate that we know about // this. final public void CastLookahead() throws ParseException { trace_call("CastLookahead"); try { if (jj_2_28(2)) { jj_consume_token(LPAREN); PrimitiveType(); } else if (jj_2_29(2147483647)) { jj_consume_token(LPAREN); Type(); jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: jj_consume_token(LPAREN); Type(); jj_consume_token(RPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TILDE: jj_consume_token(TILDE); break; case BANG: jj_consume_token(BANG); break; case LPAREN: jj_consume_token(LPAREN); break; case ASSERT: case IDENTIFIER: Identifier(); break; case THIS: jj_consume_token(THIS); break; case SUPER: jj_consume_token(SUPER); break; case NEW: jj_consume_token(NEW); break; case FALSE: case NULL: case TRUE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: Literal(); break; default: jj_la1[114] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[115] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("CastLookahead"); } } // To fix bug Test48.java. Clemens [2000-10-03] final public void PostfixLookahead() throws ParseException { trace_call("PostfixLookahead"); try { jj_consume_token(LPAREN); Name(); label_50: while (true) { if (jj_2_30(2)) { ; } else { break label_50; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } jj_consume_token(DOT); } finally { trace_return("PostfixLookahead"); } } final public void PostfixExpression() throws ParseException { trace_call("PostfixExpression"); try { PrimaryExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: case DECR: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: jj_consume_token(INCR); break; case DECR: jj_consume_token(DECR); break; default: jj_la1[116] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[117] = jj_gen; ; } } finally { trace_return("PostfixExpression"); } } final public void CastExpression() throws ParseException { trace_call("CastExpression"); try { if (jj_2_31(2147483647)) { jj_consume_token(LPAREN); Type(); jj_consume_token(RPAREN); UnaryExpression(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: jj_consume_token(LPAREN); Type(); jj_consume_token(RPAREN); UnaryExpressionNotPlusMinus(); break; default: jj_la1[118] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("CastExpression"); } } final public void PrimaryExpression() throws ParseException { trace_call("PrimaryExpression"); try { PrimaryPrefix(); label_51: while (true) { if (jj_2_32(2)) { ; } else { break label_51; } PrimarySuffix(); } } finally { trace_return("PrimaryExpression"); } } final public void PrimaryPrefix() throws ParseException { trace_call("PrimaryPrefix"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FALSE: case NULL: case TRUE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: Literal(); break; case THIS: jj_consume_token(THIS); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: jj_consume_token(DOT); break; default: jj_la1[119] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[120] = jj_gen; ; } break; default: jj_la1[123] = jj_gen; if (jj_2_34(2)) { jj_consume_token(SUPER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: jj_consume_token(DOT); break; default: jj_la1[121] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[122] = jj_gen; ; } } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); break; case NEW: AllocationExpression(); break; default: jj_la1[124] = jj_gen; if (jj_2_35(2147483647)) { ResultType(); jj_consume_token(DOT); jj_consume_token(CLASS); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case ENUM: case IDENTIFIER: Name(); if (jj_2_33(3)) { jj_consume_token(DOT); jj_consume_token(SUPER); jj_consume_token(DOT); Identifier(); } else { ; } break; default: jj_la1[125] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } } } } finally { trace_return("PrimaryPrefix"); } } final public void PrimarySuffix() throws ParseException { trace_call("PrimarySuffix"); try { if (jj_2_36(2)) { jj_consume_token(DOT); jj_consume_token(THIS); } else if (jj_2_37(2)) { jj_consume_token(DOT); AllocationExpression(); } else if (jj_2_38(3)) { MemberSelector(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: jj_consume_token(LBRACKET); Expression(); jj_consume_token(RBRACKET); break; case DOT: jj_consume_token(DOT); Identifier(); break; case LPAREN: Arguments(); break; default: jj_la1[126] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("PrimarySuffix"); } } final public void Literal() throws ParseException { trace_call("Literal"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_LITERAL: jj_consume_token(INTEGER_LITERAL); break; case FLOATING_POINT_LITERAL: jj_consume_token(FLOATING_POINT_LITERAL); break; case CHARACTER_LITERAL: jj_consume_token(CHARACTER_LITERAL); break; case STRING_LITERAL: jj_consume_token(STRING_LITERAL); break; case FALSE: case TRUE: BooleanLiteral(); break; case NULL: NullLiteral(); break; default: jj_la1[127] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("Literal"); } } final public void BooleanLiteral() throws ParseException { trace_call("BooleanLiteral"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TRUE: jj_consume_token(TRUE); break; case FALSE: jj_consume_token(FALSE); break; default: jj_la1[128] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("BooleanLiteral"); } } final public void NullLiteral() throws ParseException { trace_call("NullLiteral"); try { jj_consume_token(NULL); } finally { trace_return("NullLiteral"); } } final public void Arguments() throws ParseException { trace_call("Arguments"); try { jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: ArgumentList(); break; default: jj_la1[129] = jj_gen; ; } jj_consume_token(RPAREN); } finally { trace_return("Arguments"); } } final public void ArgumentList() throws ParseException { trace_call("ArgumentList"); try { Expression(); label_52: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[130] = jj_gen; break label_52; } jj_consume_token(COMMA); Expression(); } } finally { trace_return("ArgumentList"); } } final public void AllocationExpression() throws ParseException { trace_call("AllocationExpression"); try { String sOldClass = _sClass; //int oldNcss = _ncss; int oldFunctions = _functions; int oldClasses = _classes; String sName; //Added by REYNAUD Sebastien (LOGICA) int oldJavadocs = _javadocs; int oldNcss = _ncss; if (jj_2_39(2)) { jj_consume_token(NEW); PrimitiveType(); ArrayDimsAndInits(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NEW: jj_consume_token(NEW); Name(); sName = _sName; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: jj_la1[131] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ArrayDimsAndInits(); break; case LPAREN: Arguments(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: if (!_sClass.equals("")) { _sClass += "."; } /*_sClass += sName;*/ //_sClass += sName + "$" + _anonClassCount ;//Removed by REYNAUD Sebastien (LOGICA) //Added by REYNAUD Sebastien (LOGICA) _sClass += sName; // _classLevel ++; ClassBody(); //Added by REYNAUD Sebastien (LOGICA) ObjectMetric metric = new ObjectMetric(); metric.name = _sPackage + _sClass; metric.ncss = _ncss - oldNcss; metric.functions = _functions - oldFunctions; metric.classes = _classes - oldClasses; Token lastToken = getToken( 0 ); _vClasses.add( metric ); _pPackageMetric.functions += _functions - oldFunctions; _pPackageMetric.classes++; metric.javadocs = _javadocs - oldJavadocs; // _classLevel--; _functions = oldFunctions; _classes = oldClasses + 1; _sClass = sOldClass; break; default: jj_la1[132] = jj_gen; ; } break; default: jj_la1[133] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[134] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("AllocationExpression"); } } /* * The third LOOKAHEAD specification below is to parse to PrimarySuffix * if there is an expression between the "[...]". */ final public void ArrayDimsAndInits() throws ParseException { trace_call("ArrayDimsAndInits"); try { if (jj_2_42(2)) { label_53: while (true) { jj_consume_token(LBRACKET); Expression(); jj_consume_token(RBRACKET); if (jj_2_40(2)) { ; } else { break label_53; } } label_54: while (true) { if (jj_2_41(2)) { ; } else { break label_54; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: label_55: while (true) { jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[135] = jj_gen; break label_55; } } ArrayInitializer(); break; default: jj_la1[136] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("ArrayDimsAndInits"); } } /* * Statement syntax follows. */ final public void Statement() throws ParseException { trace_call("Statement"); try { _bReturn = false; if (jj_2_43(2)) { LabeledStatement(); } else if (jj_2_44(2147483647)) { AssertStatement(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: Block(); break; case SEMICOLON: EmptyStatement(); break; case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case INCR: case DECR: StatementExpression(); jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); break; case SWITCH: SwitchStatement(); break; case IF: IfStatement(); _cyc++; break; case WHILE: WhileStatement(); _cyc++; break; case DO: DoStatement(); _cyc++; break; case FOR: ForStatement(); _cyc++; break; case BREAK: BreakStatement(); break; case CONTINUE: ContinueStatement(); break; case RETURN: ReturnStatement(); break; case THROW: ThrowStatement(); break; case SYNCHRONIZED: SynchronizedStatement(); break; case TRY: TryStatement(); break; default: jj_la1[137] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("Statement"); } } final public void LabeledStatement() throws ParseException { trace_call("LabeledStatement"); try { Identifier(); jj_consume_token(COLON); Statement(); _ncss++; Util.debug( "_ncss++" ); } finally { trace_return("LabeledStatement"); } } final public void AssertStatementLookahead() throws ParseException { trace_call("AssertStatementLookahead"); try { jj_consume_token(ASSERT); Expression(); } finally { trace_return("AssertStatementLookahead"); } } final public void AssertStatement() throws ParseException { trace_call("AssertStatement"); try { jj_consume_token(ASSERT); Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COLON: jj_consume_token(COLON); Expression(); break; default: jj_la1[138] = jj_gen; ; } jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } finally { trace_return("AssertStatement"); } } final public void Block() throws ParseException { trace_call("Block"); try { jj_consume_token(LBRACE); label_56: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CLASS: case CONTINUE: case DO: case DOUBLE: case ENUM: case FALSE: case FINAL: case FLOAT: case FOR: case IF: case INT: case INTERFACE: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case RETURN: case SHORT: case STATIC: case TESTAAAA: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRANSIENT: case TRUE: case TRY: case VOID: case VOLATILE: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case AT: case INCR: case DECR: ; break; default: jj_la1[139] = jj_gen; break label_56; } BlockStatement(); } jj_consume_token(RBRACE); } finally { trace_return("Block"); } } final public void BlockStatement() throws ParseException { trace_call("BlockStatement"); try { if (jj_2_45(2147483647)) { LocalVariableDeclaration(); jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CONTINUE: case DO: case DOUBLE: case ENUM: case FALSE: case FLOAT: case FOR: case IF: case INT: case LONG: case NEW: case NULL: case RETURN: case SHORT: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRUE: case TRY: case VOID: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case INCR: case DECR: Statement(); break; case ABSTRACT: case CLASS: case FINAL: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case TRANSIENT: case VOLATILE: case AT: UnmodifiedClassDeclaration(); break; case INTERFACE: UnmodifiedInterfaceDeclaration(); break; default: jj_la1[140] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("BlockStatement"); } } /*void LocalVariableDeclaration() : {} { [ "final" ] Type() VariableDeclarator() ( "," VariableDeclarator() )* }*/ final public void LocalVariableDeclaration() throws ParseException { trace_call("LocalVariableDeclaration"); try { Modifiers(); Type(); VariableDeclarator(); label_57: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[141] = jj_gen; break label_57; } jj_consume_token(COMMA); VariableDeclarator(); } } finally { trace_return("LocalVariableDeclaration"); } } final public void EmptyStatement() throws ParseException { trace_call("EmptyStatement"); try { jj_consume_token(SEMICOLON); } finally { trace_return("EmptyStatement"); } } final public void StatementExpression() throws ParseException { trace_call("StatementExpression"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: PreIncrementExpression(); break; case DECR: PreDecrementExpression(); break; case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: PrimaryExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: case INCR: case DECR: case PLUSASSIGN: case MINUSASSIGN: case STARASSIGN: case SLASHASSIGN: case ANDASSIGN: case ORASSIGN: case XORASSIGN: case REMASSIGN: case LSHIFTASSIGN: case RSIGNEDSHIFTASSIGN: case RUNSIGNEDSHIFTASSIGN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: jj_consume_token(INCR); break; case DECR: jj_consume_token(DECR); break; case ASSIGN: case PLUSASSIGN: case MINUSASSIGN: case STARASSIGN: case SLASHASSIGN: case ANDASSIGN: case ORASSIGN: case XORASSIGN: case REMASSIGN: case LSHIFTASSIGN: case RSIGNEDSHIFTASSIGN: case RUNSIGNEDSHIFTASSIGN: AssignmentOperator(); Expression(); break; default: jj_la1[142] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[143] = jj_gen; ; } break; default: jj_la1[144] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("StatementExpression"); } } final public void SwitchStatement() throws ParseException { trace_call("SwitchStatement"); try { _localCases = 0; jj_consume_token(SWITCH); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); jj_consume_token(LBRACE); label_58: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CASE: case _DEFAULT: ; break; default: jj_la1[145] = jj_gen; break label_58; } SwitchLabel(); label_59: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CLASS: case CONTINUE: case DO: case DOUBLE: case ENUM: case FALSE: case FINAL: case FLOAT: case FOR: case IF: case INT: case INTERFACE: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case RETURN: case SHORT: case STATIC: case TESTAAAA: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRANSIENT: case TRUE: case TRY: case VOID: case VOLATILE: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case AT: case INCR: case DECR: ; break; default: jj_la1[146] = jj_gen; break label_59; } BlockStatement(); } } jj_consume_token(RBRACE); _ncss++; Util.debug( "_ncss++" ); } finally { trace_return("SwitchStatement"); } } final public void SwitchLabel() throws ParseException { trace_call("SwitchLabel"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CASE: jj_consume_token(CASE); Expression(); jj_consume_token(COLON); _ncss++; Util.debug( "_ncss++" ); _localCases++; _cyc++; break; case _DEFAULT: jj_consume_token(_DEFAULT); jj_consume_token(COLON); _ncss++; Util.debug( "_ncss++" ); break; default: jj_la1[147] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("SwitchLabel"); } } final public void IfStatement() throws ParseException { trace_call("IfStatement"); try { jj_consume_token(IF); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); Statement(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ELSE: jj_consume_token(ELSE); _ncss++; Util.debug( "_ncss++" ); Statement(); break; default: jj_la1[148] = jj_gen; ; } _ncss++; Util.debug( "_ncss++" ); } finally { trace_return("IfStatement"); } } final public void WhileStatement() throws ParseException { trace_call("WhileStatement"); try { jj_consume_token(WHILE); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); Statement(); _ncss++; Util.debug( "_ncss++" ); } finally { trace_return("WhileStatement"); } } final public void DoStatement() throws ParseException { trace_call("DoStatement"); try { jj_consume_token(DO); Statement(); jj_consume_token(WHILE); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } finally { trace_return("DoStatement"); } } final public void ForStatement() throws ParseException { trace_call("ForStatement"); try { jj_consume_token(FOR); jj_consume_token(LPAREN); if (jj_2_46(2147483647)) { Modifiers(); Type(); jj_consume_token(IDENTIFIER); jj_consume_token(COLON); Expression(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SUPER: case SYNCHRONIZED: case THIS: case TRANSIENT: case TRUE: case VOID: case VOLATILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case SEMICOLON: case AT: case INCR: case DECR: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SUPER: case SYNCHRONIZED: case THIS: case TRANSIENT: case TRUE: case VOID: case VOLATILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case AT: case INCR: case DECR: ForInit(); break; default: jj_la1[149] = jj_gen; ; } jj_consume_token(SEMICOLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: Expression(); break; default: jj_la1[150] = jj_gen; ; } jj_consume_token(SEMICOLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case INCR: case DECR: ForUpdate(); break; default: jj_la1[151] = jj_gen; ; } break; default: jj_la1[152] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RPAREN); Statement(); _ncss++; Util.debug( "_ncss++" ); } finally { trace_return("ForStatement"); } } final public void ForInit() throws ParseException { trace_call("ForInit"); try { if (jj_2_47(2147483647)) { LocalVariableDeclaration(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case INCR: case DECR: StatementExpressionList(); break; default: jj_la1[153] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("ForInit"); } } final public void StatementExpressionList() throws ParseException { trace_call("StatementExpressionList"); try { StatementExpression(); label_60: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[154] = jj_gen; break label_60; } jj_consume_token(COMMA); StatementExpression(); } } finally { trace_return("StatementExpressionList"); } } final public void ForUpdate() throws ParseException { trace_call("ForUpdate"); try { StatementExpressionList(); } finally { trace_return("ForUpdate"); } } final public void BreakStatement() throws ParseException { trace_call("BreakStatement"); try { jj_consume_token(BREAK); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[155] = jj_gen; ; } jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } finally { trace_return("BreakStatement"); } } final public void ContinueStatement() throws ParseException { trace_call("ContinueStatement"); try { jj_consume_token(CONTINUE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[156] = jj_gen; ; } jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } finally { trace_return("ContinueStatement"); } } final public void ReturnStatement() throws ParseException { trace_call("ReturnStatement"); try { jj_consume_token(RETURN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: Expression(); break; default: jj_la1[157] = jj_gen; ; } jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); _cyc++; _bReturn = true; } finally { trace_return("ReturnStatement"); } } final public void ThrowStatement() throws ParseException { trace_call("ThrowStatement"); try { jj_consume_token(THROW); Expression(); jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); _cyc++; } finally { trace_return("ThrowStatement"); } } final public void SynchronizedStatement() throws ParseException { trace_call("SynchronizedStatement"); try { jj_consume_token(SYNCHRONIZED); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); Block(); _ncss++; Util.debug( "_ncss++" ); } finally { trace_return("SynchronizedStatement"); } } final public void TryStatement() throws ParseException { trace_call("TryStatement"); try { jj_consume_token(TRY); Block(); label_61: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CATCH: ; break; default: jj_la1[158] = jj_gen; break label_61; } jj_consume_token(CATCH); jj_consume_token(LPAREN); FormalParameter(); jj_consume_token(RPAREN); Block(); _ncss++; Util.debug( "_ncss++" ); _cyc++; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FINALLY: jj_consume_token(FINALLY); Block(); _ncss++; Util.debug( "_ncss++" ); break; default: jj_la1[159] = jj_gen; ; } } finally { trace_return("TryStatement"); } } final public void Identifier() throws ParseException { trace_call("Identifier"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: jj_consume_token(IDENTIFIER); break; case ASSERT: jj_consume_token(ASSERT); break; default: jj_la1[160] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("Identifier"); } } /* Annotation syntax follows. */ final public void Annotation() throws ParseException { trace_call("Annotation"); try { if (jj_2_48(2147483647)) { NormalAnnotation(); } else if (jj_2_49(2147483647)) { SingleMemberAnnotation(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: MarkerAnnotation(); break; default: jj_la1[161] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("Annotation"); } } final public void NormalAnnotation() throws ParseException { trace_call("NormalAnnotation"); try { jj_consume_token(AT); Name(); jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: MemberValuePairs(); break; default: jj_la1[162] = jj_gen; ; } jj_consume_token(RPAREN); } finally { trace_return("NormalAnnotation"); } } final public void MarkerAnnotation() throws ParseException { trace_call("MarkerAnnotation"); try { jj_consume_token(AT); Name(); } finally { trace_return("MarkerAnnotation"); } } final public void SingleMemberAnnotation() throws ParseException { trace_call("SingleMemberAnnotation"); try { jj_consume_token(AT); Name(); jj_consume_token(LPAREN); MemberValue(); jj_consume_token(RPAREN); } finally { trace_return("SingleMemberAnnotation"); } } final public void MemberValuePairs() throws ParseException { trace_call("MemberValuePairs"); try { MemberValuePair(); label_62: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[163] = jj_gen; break label_62; } jj_consume_token(COMMA); MemberValuePair(); } } finally { trace_return("MemberValuePairs"); } } final public void MemberValuePair() throws ParseException { trace_call("MemberValuePair"); try { jj_consume_token(IDENTIFIER); jj_consume_token(ASSIGN); MemberValue(); } finally { trace_return("MemberValuePair"); } } final public void MemberValue() throws ParseException { trace_call("MemberValue"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: Annotation(); break; case LBRACE: MemberValueArrayInitializer(); break; case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: ConditionalExpression(); break; default: jj_la1[164] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("MemberValue"); } } final public void MemberValueArrayInitializer() throws ParseException { trace_call("MemberValueArrayInitializer"); try { jj_consume_token(LBRACE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case AT: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: MemberValue(); break; default: jj_la1[165] = jj_gen; ; } label_63: while (true) { if (jj_2_50(2)) { ; } else { break label_63; } jj_consume_token(COMMA); MemberValue(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); break; default: jj_la1[166] = jj_gen; ; } jj_consume_token(RBRACE); } finally { trace_return("MemberValueArrayInitializer"); } } /* ================================================= Java 1.5 stuff starts here ================================================= */ /* Annotation Types. */ //Added by REYNAUD Sebastien (LOGICA) final public void CreationAnnotation() throws ParseException { trace_call("CreationAnnotation"); try { jj_consume_token(AT); jj_consume_token(INTERFACE); jj_consume_token(IDENTIFIER); jj_consume_token(LBRACE); label_64: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case SEMICOLON: case AT: ; break; default: jj_la1[167] = jj_gen; break label_64; } AnnotationTypeMemberDeclaration(); } jj_consume_token(RBRACE); } finally { trace_return("CreationAnnotation"); } } // final public void AnnotationTypeDeclaration(int modifiers) throws ParseException { trace_call("AnnotationTypeDeclaration"); try { jj_consume_token(AT); jj_consume_token(INTERFACE); jj_consume_token(IDENTIFIER); AnnotationTypeBody(); } finally { trace_return("AnnotationTypeDeclaration"); } } final public void AnnotationTypeBody() throws ParseException { trace_call("AnnotationTypeBody"); try { jj_consume_token(LBRACE); _ncss++; Util.debug( "_ncss++" ); label_65: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case SEMICOLON: case AT: ; break; default: jj_la1[168] = jj_gen; break label_65; } AnnotationTypeMemberDeclaration(); } jj_consume_token(RBRACE); } finally { trace_return("AnnotationTypeBody"); } } final public void AnnotationTypeMemberDeclaration() throws ParseException { trace_call("AnnotationTypeMemberDeclaration"); try { int modifiers; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: modifiers = Modifiers(); if (jj_2_51(2147483647)) { Type(); jj_consume_token(IDENTIFIER); jj_consume_token(LPAREN); jj_consume_token(RPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case _DEFAULT: DefaultValue(); break; default: jj_la1[169] = jj_gen; ; } jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: case INTERFACE: ClassOrInterfaceDeclaration(modifiers); break; case ENUM: EnumDeclaration(modifiers); break; case AT: AnnotationTypeDeclaration(modifiers); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: FieldDeclaration15(modifiers); break; default: jj_la1[170] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } break; case SEMICOLON: jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); break; default: jj_la1[171] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("AnnotationTypeMemberDeclaration"); } } final public void DefaultValue() throws ParseException { trace_call("DefaultValue"); try { jj_consume_token(_DEFAULT); MemberValue(); } finally { trace_return("DefaultValue"); } } /* * Modifiers. We match all modifiers in a single rule to reduce the chances of * syntax errors for simple modifier mistakes. It will also enable us to give * better error messages. */ final public int Modifiers() throws ParseException { trace_call("Modifiers"); try { int modifiers = 0; _tmpToken = null; label_66: while (true) { if (jj_2_52(2)) { ; } else { break label_66; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); modifiers |= ModifierSet.PUBLIC; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case STATIC: jj_consume_token(STATIC); modifiers |= ModifierSet.STATIC; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case PROTECTED: jj_consume_token(PROTECTED); modifiers |= ModifierSet.PROTECTED; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case PRIVATE: jj_consume_token(PRIVATE); modifiers |= ModifierSet.PRIVATE; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case FINAL: jj_consume_token(FINAL); modifiers |= ModifierSet.FINAL; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case ABSTRACT: jj_consume_token(ABSTRACT); modifiers |= ModifierSet.ABSTRACT; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); modifiers |= ModifierSet.SYNCHRONIZED; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case NATIVE: jj_consume_token(NATIVE); modifiers |= ModifierSet.NATIVE; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case TRANSIENT: jj_consume_token(TRANSIENT); modifiers |= ModifierSet.TRANSIENT; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case VOLATILE: jj_consume_token(VOLATILE); modifiers |= ModifierSet.VOLATILE; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case TESTAAAA: jj_consume_token(TESTAAAA); modifiers |= ModifierSet.STRICTFP; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case AT: Annotation(); break; default: jj_la1[172] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } {if (true) return modifiers;} throw new Error("Missing return statement in function"); } finally { trace_return("Modifiers"); } } final public void ClassOrInterfaceDeclaration(int modifiers) throws ParseException { trace_call("ClassOrInterfaceDeclaration"); try { boolean isInterface = false; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: jj_consume_token(CLASS); break; case INTERFACE: jj_consume_token(INTERFACE); isInterface = true; break; default: jj_la1[173] = jj_gen; jj_consume_token(-1); throw new ParseException(); } jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: jj_la1[174] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: ExtendsList(isInterface); break; default: jj_la1[175] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPLEMENTS: ImplementsList(isInterface); break; default: jj_la1[176] = jj_gen; ; } ClassOrInterfaceBody(isInterface); } finally { trace_return("ClassOrInterfaceDeclaration"); } } final public void EnumDeclaration(int modifiers) throws ParseException { trace_call("EnumDeclaration"); try { String sOldClass = _sClass; int oldClasses = _classes; int oldNcss = _ncss; int oldFunctions = _functions; // Chris Povirk int oldSingle; int oldMulti; Util.debug( "EnumDeclaration().START" ); jj_consume_token(ENUM); jj_consume_token(IDENTIFIER); if (!_sClass.equals("")) { _sClass += "."; } _sClass += getToken(0).image; _classLevel ++; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPLEMENTS: ImplementsList(false); break; default: jj_la1[177] = jj_gen; ; } // Chris Povirk oldSingle = JavaParserDebugTokenManager._iSingleComments; oldMulti = JavaParserDebugTokenManager._iMultiComments; EnumBody(); _classLevel--; if (_classLevel == 0) { //_topLevelClasses++; ObjectMetric metric = new ObjectMetric(); metric.name = _sPackage + _sClass; metric.ncss = _ncss - oldNcss; metric.functions = _functions - oldFunctions; metric.classes = _classes - oldClasses; Token lastToken = getToken( 0 ); //metric.add( new Integer( lastToken.endLine ) ); //metric.add( new Integer( lastToken.endColumn ) ); metric.javadocs = _javadocs; // Chris Povirk metric.javadocsLn = _jvdcLines; metric.singleLn = JavaParserDebugTokenManager._iSingleComments - oldSingle; metric.multiLn = JavaParserDebugTokenManager._iMultiComments - oldMulti; _vClasses.add(metric); _pPackageMetric.functions += _functions - oldFunctions; _pPackageMetric.classes++; // added by SMS _pPackageMetric.javadocs += _javadocs; //_pPackageMetric.javadocsLn += JavaParserDebugTokenManager._iFormalComments - oldFormal; //_pPackageMetric.singleLn += JavaParserDebugTokenManager._iSingleComments - oldSingle; //_pPackageMetric.multiLn += Manager._iMultiComments - oldMulti; // } _functions = oldFunctions; _classes = oldClasses + 1; _sClass = sOldClass; } finally { trace_return("EnumDeclaration"); } } final public void TypeParameters() throws ParseException { trace_call("TypeParameters"); try { jj_consume_token(LT); TypeParameter(); label_67: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[178] = jj_gen; break label_67; } jj_consume_token(COMMA); TypeParameter(); } jj_consume_token(GT); } finally { trace_return("TypeParameters"); } } final public void ExtendsList(boolean isInterface) throws ParseException { trace_call("ExtendsList"); try { boolean extendsMoreThanOne = false; jj_consume_token(EXTENDS); ClassOrInterfaceType(); label_68: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[179] = jj_gen; break label_68; } jj_consume_token(COMMA); ClassOrInterfaceType(); extendsMoreThanOne = true; } if (extendsMoreThanOne && !isInterface) {if (true) throw new ParseException("A class cannot extend more than one other class");} } finally { trace_return("ExtendsList"); } } final public void ImplementsList(boolean isInterface) throws ParseException { trace_call("ImplementsList"); try { jj_consume_token(IMPLEMENTS); ClassOrInterfaceType(); label_69: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[180] = jj_gen; break label_69; } jj_consume_token(COMMA); ClassOrInterfaceType(); } if (isInterface) {if (true) throw new ParseException("An interface cannot implement other interfaces");} } finally { trace_return("ImplementsList"); } } final public void ClassOrInterfaceBody(boolean isInterface) throws ParseException { trace_call("ClassOrInterfaceBody"); try { jj_consume_token(LBRACE); _ncss++; Util.debug( "ClassOrInterfaceBody()._ncss++" ); label_70: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case LBRACE: case SEMICOLON: case AT: case LT: ; break; default: jj_la1[181] = jj_gen; break label_70; } ClassOrInterfaceBodyDeclaration(isInterface); } jj_consume_token(RBRACE); } finally { trace_return("ClassOrInterfaceBody"); } } final public void EnumBody() throws ParseException { trace_call("EnumBody"); try { jj_consume_token(LBRACE); _ncss++; Util.debug( "_ncss++" ); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: EnumConstant(); label_71: while (true) { if (jj_2_53(2)) { ; } else { break label_71; } jj_consume_token(COMMA); EnumConstant(); } break; default: jj_la1[182] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); break; default: jj_la1[183] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SEMICOLON: jj_consume_token(SEMICOLON); label_72: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case LBRACE: case SEMICOLON: case AT: case LT: ; break; default: jj_la1[184] = jj_gen; break label_72; } ClassOrInterfaceBodyDeclaration(false); } break; default: jj_la1[185] = jj_gen; ; } jj_consume_token(RBRACE); } finally { trace_return("EnumBody"); } } final public void TypeParameter() throws ParseException { trace_call("TypeParameter"); try { jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: TypeBound(); break; default: jj_la1[186] = jj_gen; ; } } finally { trace_return("TypeParameter"); } } final public void ClassOrInterfaceType() throws ParseException { trace_call("ClassOrInterfaceType"); try { jj_consume_token(IDENTIFIER); _sName = getToken(0).image; if ( _tmpResultToken == null ) { _tmpResultToken = getToken( 0 ); Util.debug( "ClassOrInterfaceType._tmpResultToken: " + _tmpResultToken ); } if (jj_2_54(4)) { TypeArguments(); } else { ; } label_73: while (true) { if (jj_2_55(2)) { ; } else { break label_73; } jj_consume_token(DOT); jj_consume_token(IDENTIFIER); _sName += "." + getToken(0).image; if (jj_2_56(2)) { TypeArguments(); } else { ; } } } finally { trace_return("ClassOrInterfaceType"); } } final public void ClassOrInterfaceBodyDeclaration(boolean isInterface) throws ParseException { trace_call("ClassOrInterfaceBodyDeclaration"); try { //boolean isNestedInterface = false; int modifiers; if (jj_2_59(2)) { Initializer(); if (isInterface) {if (true) throw new ParseException("An interface cannot have initializers");} } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case AT: case LT: modifiers = Modifiers(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: case INTERFACE: ClassOrInterfaceDeclaration(modifiers); break; case ENUM: EnumDeclaration(modifiers); break; default: jj_la1[187] = jj_gen; if (jj_2_57(2147483647)) { ConstructorDeclaration(); } else if (jj_2_58(2147483647)) { FieldDeclaration15(modifiers); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case VOID: case IDENTIFIER: case AT: case LT: MethodDeclaration15(modifiers); break; default: jj_la1[188] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } break; case SEMICOLON: jj_consume_token(SEMICOLON); break; default: jj_la1[189] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("ClassOrInterfaceBodyDeclaration"); } } final public void EnumConstant() throws ParseException { trace_call("EnumConstant"); try { Modifiers(); jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: Arguments(); break; default: jj_la1[190] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: ClassOrInterfaceBody(false); break; default: jj_la1[191] = jj_gen; ; } } finally { trace_return("EnumConstant"); } } final public void TypeBound() throws ParseException { trace_call("TypeBound"); try { jj_consume_token(EXTENDS); ClassOrInterfaceType(); label_74: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_AND: ; break; default: jj_la1[192] = jj_gen; break label_74; } jj_consume_token(BIT_AND); ClassOrInterfaceType(); } } finally { trace_return("TypeBound"); } } final public void TypeArguments() throws ParseException { trace_call("TypeArguments"); try { jj_consume_token(LT); TypeArgument(); label_75: while (true) { if (jj_2_60(2)) { ; } else { break label_75; } jj_consume_token(COMMA); TypeArgument(); } jj_consume_token(GT); } finally { trace_return("TypeArguments"); } } final public void TypeArgument() throws ParseException { trace_call("TypeArgument"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: ReferenceType(); break; case HOOK: jj_consume_token(HOOK); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: case SUPER: WildcardBounds(); break; default: jj_la1[193] = jj_gen; ; } break; default: jj_la1[194] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("TypeArgument"); } } final public void ReferenceType() throws ParseException { trace_call("ReferenceType"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: PrimitiveType(); label_76: while (true) { jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); _sName += "[]"; if (jj_2_61(2)) { ; } else { break label_76; } } break; case IDENTIFIER: ClassOrInterfaceType(); label_77: while (true) { if (jj_2_62(2)) { ; } else { break label_77; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); _sName += "[]"; } break; default: jj_la1[195] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("ReferenceType"); } } final public void WildcardBounds() throws ParseException { trace_call("WildcardBounds"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: jj_consume_token(EXTENDS); ReferenceType(); break; case SUPER: jj_consume_token(SUPER); ReferenceType(); break; default: jj_la1[196] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("WildcardBounds"); } } final public void FieldDeclaration15(int modifiers) throws ParseException { trace_call("FieldDeclaration15"); try { Type(); VariableDeclarator(); label_78: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[197] = jj_gen; break label_78; } jj_consume_token(COMMA); VariableDeclarator(); } jj_consume_token(SEMICOLON); } finally { trace_return("FieldDeclaration15"); } } final public void MethodDeclaration15(int modifiers) throws ParseException { trace_call("MethodDeclaration15"); try { MethodDeclaration(); } finally { trace_return("MethodDeclaration15"); } } final public void MethodDeclarator15() throws ParseException { trace_call("MethodDeclarator15"); try { jj_consume_token(IDENTIFIER); FormalParameters(); label_79: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[198] = jj_gen; break label_79; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } } finally { trace_return("MethodDeclarator15"); } } final public void FormalParameters15() throws ParseException { trace_call("FormalParameters15"); try { jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: FormalParameter15(); label_80: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[199] = jj_gen; break label_80; } jj_consume_token(COMMA); FormalParameter15(); } break; default: jj_la1[200] = jj_gen; ; } jj_consume_token(RPAREN); } finally { trace_return("FormalParameters15"); } } final public void FormalParameter15() throws ParseException { trace_call("FormalParameter15"); try { Modifiers(); Type(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ELLIPSIS: jj_consume_token(ELLIPSIS); break; default: jj_la1[201] = jj_gen; ; } VariableDeclaratorId(); } finally { trace_return("FormalParameter15"); } } final public void MemberSelector() throws ParseException { trace_call("MemberSelector"); try { jj_consume_token(DOT); TypeArguments(); jj_consume_token(IDENTIFIER); } finally { trace_return("MemberSelector"); } } private boolean jj_2_1(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_1(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(0, xla); } } private boolean jj_2_2(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_2(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(1, xla); } } private boolean jj_2_3(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_3(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(2, xla); } } private boolean jj_2_4(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_4(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(3, xla); } } private boolean jj_2_5(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_5(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(4, xla); } } private boolean jj_2_6(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_6(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(5, xla); } } private boolean jj_2_7(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_7(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(6, xla); } } private boolean jj_2_8(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_8(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(7, xla); } } private boolean jj_2_9(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_9(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(8, xla); } } private boolean jj_2_10(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_10(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(9, xla); } } private boolean jj_2_11(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_11(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(10, xla); } } private boolean jj_2_12(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_12(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(11, xla); } } private boolean jj_2_13(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_13(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(12, xla); } } private boolean jj_2_14(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_14(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(13, xla); } } private boolean jj_2_15(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_15(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(14, xla); } } private boolean jj_2_16(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_16(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(15, xla); } } private boolean jj_2_17(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_17(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(16, xla); } } private boolean jj_2_18(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_18(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(17, xla); } } private boolean jj_2_19(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_19(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(18, xla); } } private boolean jj_2_20(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_20(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(19, xla); } } private boolean jj_2_21(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_21(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(20, xla); } } private boolean jj_2_22(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_22(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(21, xla); } } private boolean jj_2_23(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_23(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(22, xla); } } private boolean jj_2_24(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_24(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(23, xla); } } private boolean jj_2_25(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_25(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(24, xla); } } private boolean jj_2_26(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_26(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(25, xla); } } private boolean jj_2_27(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_27(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(26, xla); } } private boolean jj_2_28(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_28(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(27, xla); } } private boolean jj_2_29(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_29(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(28, xla); } } private boolean jj_2_30(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_30(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(29, xla); } } private boolean jj_2_31(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_31(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(30, xla); } } private boolean jj_2_32(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_32(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(31, xla); } } private boolean jj_2_33(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_33(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(32, xla); } } private boolean jj_2_34(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_34(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(33, xla); } } private boolean jj_2_35(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_35(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(34, xla); } } private boolean jj_2_36(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_36(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(35, xla); } } private boolean jj_2_37(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_37(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(36, xla); } } private boolean jj_2_38(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_38(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(37, xla); } } private boolean jj_2_39(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_39(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(38, xla); } } private boolean jj_2_40(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_40(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(39, xla); } } private boolean jj_2_41(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_41(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(40, xla); } } private boolean jj_2_42(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_42(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(41, xla); } } private boolean jj_2_43(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_43(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(42, xla); } } private boolean jj_2_44(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_44(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(43, xla); } } private boolean jj_2_45(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_45(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(44, xla); } } private boolean jj_2_46(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_46(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(45, xla); } } private boolean jj_2_47(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_47(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(46, xla); } } private boolean jj_2_48(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_48(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(47, xla); } } private boolean jj_2_49(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_49(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(48, xla); } } private boolean jj_2_50(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_50(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(49, xla); } } private boolean jj_2_51(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_51(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(50, xla); } } private boolean jj_2_52(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_52(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(51, xla); } } private boolean jj_2_53(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_53(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(52, xla); } } private boolean jj_2_54(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_54(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(53, xla); } } private boolean jj_2_55(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_55(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(54, xla); } } private boolean jj_2_56(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_56(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(55, xla); } } private boolean jj_2_57(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_57(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(56, xla); } } private boolean jj_2_58(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_58(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(57, xla); } } private boolean jj_2_59(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_59(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(58, xla); } } private boolean jj_2_60(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_60(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(59, xla); } } private boolean jj_2_61(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_61(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(60, xla); } } private boolean jj_2_62(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_62(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(61, xla); } } private boolean jj_3R_379() { if (jj_3R_84()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_394()) { jj_scanpos = xsp; if (jj_3R_395()) { jj_scanpos = xsp; if (jj_3R_396()) { jj_scanpos = xsp; if (jj_3R_397()) { jj_scanpos = xsp; if (jj_3R_398()) return true; } } } } return false; } private boolean jj_3R_345() { Token xsp; xsp = jj_scanpos; if (jj_3R_379()) { jj_scanpos = xsp; if (jj_3R_380()) return true; } return false; } private boolean jj_3R_165() { if (jj_3R_191()) return true; return false; } private boolean jj_3R_408() { if (jj_3R_137()) return true; return false; } private boolean jj_3R_117() { Token xsp; xsp = jj_scanpos; if (jj_3R_164()) { jj_scanpos = xsp; if (jj_3R_165()) return true; } return false; } private boolean jj_3R_164() { if (jj_3R_190()) return true; return false; } private boolean jj_3R_314() { if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_344()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_388() { if (jj_3R_137()) return true; return false; } private boolean jj_3R_352() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3R_351() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3R_321() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_3R_351()) { jj_scanpos = xsp; if (jj_3R_352()) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } return false; } private boolean jj_3R_303() { if (jj_scan_token(AT)) return true; if (jj_scan_token(INTERFACE)) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_3R_314()) return true; return false; } private boolean jj_3_50() { if (jj_scan_token(COMMA)) return true; if (jj_3R_123()) return true; return false; } private boolean jj_3R_389() { if (jj_scan_token(COMMA)) return true; if (jj_3R_94()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_408()) jj_scanpos = xsp; return false; } private boolean jj_3R_104() { if (jj_3R_105()) return true; return false; } private boolean jj_3R_363() { if (jj_3R_94()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_388()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3R_389()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_320() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_304() { if (jj_scan_token(AT)) return true; if (jj_scan_token(INTERFACE)) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_315()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_319() { if (jj_3R_141()) return true; return false; } private boolean jj_3_24() { if (jj_scan_token(DOT)) return true; if (jj_3R_105()) return true; return false; } private boolean jj_3R_306() { Token xsp; xsp = jj_scanpos; if (jj_3R_319()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3R_320()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_321()) { jj_scanpos = xsp; break; } } if (jj_3R_225()) return true; return false; } private boolean jj_3R_261() { if (jj_3R_123()) return true; return false; } private boolean jj_3R_192() { if (jj_scan_token(LBRACE)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_261()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3_50()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_scan_token(84)) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_240() { if (jj_scan_token(COMMA)) return true; if (jj_3R_239()) return true; return false; } private boolean jj_3R_144() { if (jj_3R_105()) return true; return false; } private boolean jj_3_23() { if (jj_scan_token(DOT)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(28)) { jj_scanpos = xsp; if (jj_3R_104()) return true; } return false; } private boolean jj_3R_168() { if (jj_3R_191()) return true; return false; } private boolean jj_3R_167() { if (jj_3R_192()) return true; return false; } private boolean jj_3R_123() { Token xsp; xsp = jj_scanpos; if (jj_3R_166()) { jj_scanpos = xsp; if (jj_3R_167()) { jj_scanpos = xsp; if (jj_3R_168()) return true; } } return false; } private boolean jj_3R_166() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_94() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(28)) { jj_scanpos = xsp; if (jj_3R_144()) return true; } while (true) { xsp = jj_scanpos; if (jj_3_23()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_239() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(ASSIGN)) return true; if (jj_3R_123()) return true; return false; } private boolean jj_3R_221() { if (jj_3R_239()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_240()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_207() { if (jj_3R_221()) return true; return false; } private boolean jj_3R_122() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(ASSIGN)) return true; return false; } private boolean jj_3R_162() { if (jj_3R_111()) return true; return false; } private boolean jj_3R_114() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(63)) { jj_scanpos = xsp; if (jj_3R_162()) return true; } return false; } private boolean jj_3R_194() { if (jj_scan_token(AT)) return true; if (jj_3R_94()) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_123()) return true; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_195() { if (jj_scan_token(AT)) return true; if (jj_3R_94()) return true; return false; } private boolean jj_3_49() { if (jj_scan_token(AT)) return true; if (jj_3R_94()) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_193() { if (jj_scan_token(AT)) return true; if (jj_3R_94()) return true; if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_207()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3_48() { if (jj_scan_token(AT)) return true; if (jj_3R_94()) return true; if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_122()) { jj_scanpos = xsp; if (jj_scan_token(78)) return true; } return false; } private boolean jj_3R_173() { if (jj_3R_195()) return true; return false; } private boolean jj_3R_110() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(15)) { jj_scanpos = xsp; if (jj_scan_token(20)) { jj_scanpos = xsp; if (jj_scan_token(17)) { jj_scanpos = xsp; if (jj_scan_token(51)) { jj_scanpos = xsp; if (jj_scan_token(40)) { jj_scanpos = xsp; if (jj_scan_token(42)) { jj_scanpos = xsp; if (jj_scan_token(33)) { jj_scanpos = xsp; if (jj_scan_token(26)) return true; } } } } } } } return false; } private boolean jj_3R_172() { if (jj_3R_194()) return true; return false; } private boolean jj_3R_141() { Token xsp; xsp = jj_scanpos; if (jj_3R_171()) { jj_scanpos = xsp; if (jj_3R_172()) { jj_scanpos = xsp; if (jj_3R_173()) return true; } } return false; } private boolean jj_3R_171() { if (jj_3R_193()) return true; return false; } private boolean jj_3R_105() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(74)) { jj_scanpos = xsp; if (jj_scan_token(14)) return true; } return false; } private boolean jj_3R_439() { if (jj_scan_token(FINALLY)) return true; if (jj_3R_142()) return true; return false; } private boolean jj_3R_93() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_438() { if (jj_scan_token(CATCH)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_386()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_142()) return true; return false; } private boolean jj_3R_274() { if (jj_scan_token(TRY)) return true; if (jj_3R_142()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_438()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3R_439()) jj_scanpos = xsp; return false; } private boolean jj_3R_158() { if (jj_3R_110()) return true; return false; } private boolean jj_3R_111() { Token xsp; xsp = jj_scanpos; if (jj_3_22()) { jj_scanpos = xsp; if (jj_3R_158()) return true; } return false; } private boolean jj_3_22() { if (jj_3R_103()) return true; return false; } private boolean jj_3R_273() { if (jj_scan_token(SYNCHRONIZED)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_142()) return true; return false; } private boolean jj_3R_85() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) jj_scanpos = xsp; if (jj_3R_142()) return true; return false; } private boolean jj_3R_272() { if (jj_scan_token(THROW)) return true; if (jj_3R_117()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_437() { if (jj_3R_117()) return true; return false; } private boolean jj_3_20() { if (jj_3R_102()) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_436() { if (jj_3R_105()) return true; return false; } private boolean jj_3_21() { if (jj_scan_token(THIS)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_121() { if (jj_3R_105()) return true; return false; } private boolean jj_3R_409() { if (jj_3R_102()) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_271() { if (jj_scan_token(RETURN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_437()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_391() { Token xsp; xsp = jj_scanpos; if (jj_3R_409()) jj_scanpos = xsp; if (jj_scan_token(SUPER)) return true; if (jj_3R_189()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_92() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(48)) { jj_scanpos = xsp; if (jj_scan_token(47)) return true; } } return false; } private boolean jj_3R_455() { if (jj_scan_token(COMMA)) return true; if (jj_3R_263()) return true; return false; } private boolean jj_3R_446() { if (jj_3R_451()) return true; return false; } private boolean jj_3R_435() { if (jj_3R_105()) return true; return false; } private boolean jj_3R_390() { if (jj_scan_token(THIS)) return true; if (jj_3R_189()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_364() { Token xsp; xsp = jj_scanpos; if (jj_3R_390()) { jj_scanpos = xsp; if (jj_3R_391()) return true; } return false; } private boolean jj_3R_270() { if (jj_scan_token(CONTINUE)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_436()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_147() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_148() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_146() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(48)) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(43)) { jj_scanpos = xsp; if (jj_scan_token(56)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } } } return false; } private boolean jj_3R_269() { if (jj_scan_token(BREAK)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_435()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_145() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_95() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_145()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_146()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_147()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3R_148()) jj_scanpos = xsp; if (jj_3R_114()) return true; if (jj_3R_105()) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_91() { if (jj_3R_141()) return true; return false; } private boolean jj_3_11() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_91()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3R_92()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_93()) jj_scanpos = xsp; if (jj_3R_94()) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3_12() { if (jj_3R_95()) return true; return false; } private boolean jj_3R_451() { if (jj_3R_454()) return true; return false; } private boolean jj_3R_90() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(48)) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } return false; } private boolean jj_3_47() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(31)) jj_scanpos = xsp; if (jj_3R_111()) return true; xsp = jj_scanpos; if (jj_scan_token(28)) { jj_scanpos = xsp; if (jj_3R_121()) return true; } return false; } private boolean jj_3R_445() { if (jj_3R_117()) return true; return false; } private boolean jj_3R_310() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_454() { if (jj_3R_263()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_455()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_300() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_310()) { jj_scanpos = xsp; break; } } if (jj_3R_311()) return true; return false; } private boolean jj_3R_432() { if (jj_scan_token(ELSE)) return true; if (jj_3R_223()) return true; return false; } private boolean jj_3R_299() { if (jj_3R_309()) return true; return false; } private boolean jj_3R_298() { if (jj_3R_308()) return true; return false; } private boolean jj_3_10() { if (jj_3R_84()) return true; if (jj_scan_token(ENUM)) return true; return false; } private boolean jj_3R_453() { if (jj_3R_454()) return true; return false; } private boolean jj_3_46() { if (jj_3R_84()) return true; if (jj_3R_111()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(COLON)) return true; return false; } private boolean jj_3R_87() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(48)) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } return false; } private boolean jj_3R_452() { if (jj_3R_222()) return true; return false; } private boolean jj_3R_450() { Token xsp; xsp = jj_scanpos; if (jj_3R_452()) { jj_scanpos = xsp; if (jj_3R_453()) return true; } return false; } private boolean jj_3_9() { if (jj_3R_84()) return true; if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_297() { if (jj_3R_84()) return true; if (jj_3R_307()) return true; return false; } private boolean jj_3R_89() { if (jj_3R_141()) return true; return false; } private boolean jj_3_8() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_89()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_90()) { jj_scanpos = xsp; break; } } if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3R_444() { if (jj_3R_450()) return true; return false; } private boolean jj_3R_433() { if (jj_3R_84()) return true; if (jj_3R_111()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(COLON)) return true; if (jj_3R_117()) return true; return false; } private boolean jj_3R_350() { if (jj_scan_token(IMPLEMENTS)) return true; if (jj_3R_363()) return true; return false; } private boolean jj_3R_434() { Token xsp; xsp = jj_scanpos; if (jj_3R_444()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; xsp = jj_scanpos; if (jj_3R_445()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; xsp = jj_scanpos; if (jj_3R_446()) jj_scanpos = xsp; return false; } private boolean jj_3R_296() { if (jj_3R_84()) return true; if (jj_3R_306()) return true; return false; } private boolean jj_3R_88() { if (jj_3R_141()) return true; return false; } private boolean jj_3_7() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_88()) { jj_scanpos = xsp; break; } } if (jj_scan_token(AT)) return true; if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_268() { if (jj_scan_token(FOR)) return true; if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_433()) { jj_scanpos = xsp; if (jj_3R_434()) return true; } if (jj_scan_token(RPAREN)) return true; if (jj_3R_223()) return true; return false; } private boolean jj_3R_86() { if (jj_3R_141()) return true; return false; } private boolean jj_3_6() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_86()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_87()) { jj_scanpos = xsp; break; } } if (jj_scan_token(AT)) return true; if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_295() { if (jj_3R_305()) return true; return false; } private boolean jj_3R_331() { if (jj_3R_196()) return true; return false; } private boolean jj_3R_267() { if (jj_scan_token(DO)) return true; if (jj_3R_223()) return true; if (jj_scan_token(WHILE)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_294() { if (jj_3R_304()) return true; return false; } private boolean jj_3R_293() { if (jj_3R_84()) return true; if (jj_3R_303()) return true; return false; } private boolean jj_3R_266() { if (jj_scan_token(WHILE)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_223()) return true; return false; } private boolean jj_3_5() { if (jj_3R_85()) return true; return false; } private boolean jj_3R_290() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(83)) { jj_scanpos = xsp; if (jj_3_5()) { jj_scanpos = xsp; if (jj_3R_293()) { jj_scanpos = xsp; if (jj_3R_294()) { jj_scanpos = xsp; if (jj_3R_295()) { jj_scanpos = xsp; if (jj_3R_296()) { jj_scanpos = xsp; if (jj_3R_297()) { jj_scanpos = xsp; if (jj_3R_298()) { jj_scanpos = xsp; if (jj_3R_299()) { jj_scanpos = xsp; if (jj_3R_300()) return true; } } } } } } } } } return false; } private boolean jj_3R_265() { if (jj_scan_token(IF)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_223()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_432()) jj_scanpos = xsp; return false; } private boolean jj_3R_399() { if (jj_3R_137()) return true; return false; } private boolean jj_3R_101() { if (jj_3R_102()) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_443() { if (jj_3R_196()) return true; return false; } private boolean jj_3_19() { Token xsp; xsp = jj_scanpos; if (jj_3R_101()) jj_scanpos = xsp; if (jj_scan_token(SUPER)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3_18() { if (jj_scan_token(THIS)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_449() { if (jj_scan_token(_DEFAULT)) return true; if (jj_scan_token(COLON)) return true; return false; } private boolean jj_3R_382() { if (jj_scan_token(DOT)) return true; if (jj_3R_94()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_399()) jj_scanpos = xsp; return false; } private boolean jj_3R_330() { if (jj_3R_364()) return true; return false; } private boolean jj_3R_329() { if (jj_3R_364()) return true; return false; } private boolean jj_3R_448() { if (jj_scan_token(CASE)) return true; if (jj_3R_117()) return true; if (jj_scan_token(COLON)) return true; return false; } private boolean jj_3R_442() { Token xsp; xsp = jj_scanpos; if (jj_3R_448()) { jj_scanpos = xsp; if (jj_3R_449()) return true; } return false; } private boolean jj_3R_431() { if (jj_3R_442()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_443()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_120() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_264() { if (jj_scan_token(SWITCH)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_431()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_415() { if (jj_scan_token(COMMA)) return true; if (jj_3R_341()) return true; return false; } private boolean jj_3R_328() { if (jj_scan_token(THROWS)) return true; if (jj_3R_363()) return true; return false; } private boolean jj_3R_447() { if (jj_3R_106()) return true; if (jj_3R_117()) return true; return false; } private boolean jj_3R_347() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3R_346() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3R_318() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_3R_346()) { jj_scanpos = xsp; if (jj_3R_347()) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } return false; } private boolean jj_3R_441() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(100)) { jj_scanpos = xsp; if (jj_scan_token(101)) { jj_scanpos = xsp; if (jj_3R_447()) return true; } } return false; } private boolean jj_3R_326() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_317() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_285() { if (jj_3R_102()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_441()) jj_scanpos = xsp; return false; } private boolean jj_3R_284() { if (jj_3R_215()) return true; return false; } private boolean jj_3R_361() { if (jj_scan_token(PRIVATE)) return true; return false; } private boolean jj_3R_263() { Token xsp; xsp = jj_scanpos; if (jj_3R_283()) { jj_scanpos = xsp; if (jj_3R_284()) { jj_scanpos = xsp; if (jj_3R_285()) return true; } } return false; } private boolean jj_3R_283() { if (jj_3R_214()) return true; return false; } private boolean jj_3R_316() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_305() { Token xsp; xsp = jj_scanpos; if (jj_3R_316()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3R_317()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_318()) { jj_scanpos = xsp; break; } } if (jj_3R_224()) return true; return false; } private boolean jj_3R_360() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3R_359() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3R_325() { Token xsp; xsp = jj_scanpos; if (jj_3R_359()) { jj_scanpos = xsp; if (jj_3R_360()) { jj_scanpos = xsp; if (jj_3R_361()) return true; } } return false; } private boolean jj_3R_324() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_222() { if (jj_3R_84()) return true; if (jj_3R_111()) return true; if (jj_3R_341()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_415()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_381() { if (jj_3R_137()) return true; return false; } private boolean jj_3R_308() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_324()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3R_325()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_326()) jj_scanpos = xsp; if (jj_3R_105()) return true; if (jj_3R_327()) return true; xsp = jj_scanpos; if (jj_3R_328()) jj_scanpos = xsp; if (jj_scan_token(LBRACE)) return true; xsp = jj_scanpos; if (jj_3R_329()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_330()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3R_331()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_287() { if (jj_3R_290()) return true; return false; } private boolean jj_3R_276() { if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_287()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3_45() { if (jj_3R_84()) return true; if (jj_3R_111()) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(28)) { jj_scanpos = xsp; if (jj_scan_token(74)) return true; } xsp = jj_scanpos; if (jj_scan_token(83)) { jj_scanpos = xsp; if (jj_scan_token(87)) { jj_scanpos = xsp; if (jj_scan_token(84)) { jj_scanpos = xsp; if (jj_3R_120()) return true; } } } return false; } private boolean jj_3R_211() { if (jj_3R_225()) return true; return false; } private boolean jj_3R_210() { if (jj_3R_224()) return true; return false; } private boolean jj_3R_209() { if (jj_3R_223()) return true; return false; } private boolean jj_3R_349() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_94()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_381()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3R_382()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_196() { Token xsp; xsp = jj_scanpos; if (jj_3R_208()) { jj_scanpos = xsp; if (jj_3R_209()) { jj_scanpos = xsp; if (jj_3R_210()) { jj_scanpos = xsp; if (jj_3R_211()) return true; } } } return false; } private boolean jj_3R_208() { if (jj_3R_222()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_174() { if (jj_3R_196()) return true; return false; } private boolean jj_3R_386() { if (jj_3R_84()) return true; if (jj_3R_111()) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(122)) jj_scanpos = xsp; if (jj_3R_377()) return true; return false; } private boolean jj_3R_142() { if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_174()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_430() { if (jj_scan_token(COLON)) return true; if (jj_3R_117()) return true; return false; } private boolean jj_3R_348() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_362() { if (jj_3R_386()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_387()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_262() { if (jj_scan_token(ASSERT)) return true; if (jj_3R_117()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_430()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_387() { if (jj_scan_token(COMMA)) return true; if (jj_3R_386()) return true; return false; } private boolean jj_3R_327() { if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_362()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_119() { if (jj_scan_token(ASSERT)) return true; if (jj_3R_117()) return true; return false; } private boolean jj_3R_374() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_336() { if (jj_3R_105()) return true; if (jj_3R_327()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_374()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_118() { if (jj_3R_105()) return true; if (jj_scan_token(COLON)) return true; if (jj_3R_223()) return true; return false; } private boolean jj_3R_224() { if (jj_3R_84()) return true; if (jj_scan_token(CLASS)) return true; if (jj_3R_105()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_348()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_349()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_350()) jj_scanpos = xsp; if (jj_3R_276()) return true; return false; } private boolean jj_3R_254() { if (jj_3R_274()) return true; return false; } private boolean jj_3R_253() { if (jj_3R_273()) return true; return false; } private boolean jj_3R_252() { if (jj_3R_272()) return true; return false; } private boolean jj_3R_251() { if (jj_3R_271()) return true; return false; } private boolean jj_3R_250() { if (jj_3R_270()) return true; return false; } private boolean jj_3R_249() { if (jj_3R_269()) return true; return false; } private boolean jj_3R_248() { if (jj_3R_268()) return true; return false; } private boolean jj_3_41() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_247() { if (jj_3R_267()) return true; return false; } private boolean jj_3R_246() { if (jj_3R_266()) return true; return false; } private boolean jj_3R_116() { if (jj_scan_token(DOT)) return true; if (jj_3R_137()) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3R_245() { if (jj_3R_265()) return true; return false; } private boolean jj_3R_244() { if (jj_3R_264()) return true; return false; } private boolean jj_3_44() { if (jj_3R_119()) return true; return false; } private boolean jj_3R_421() { if (jj_scan_token(COMMA)) return true; if (jj_3R_341()) return true; return false; } private boolean jj_3R_243() { if (jj_3R_263()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_242() { if (jj_3R_142()) return true; return false; } private boolean jj_3R_241() { if (jj_3R_262()) return true; return false; } private boolean jj_3_43() { if (jj_3R_118()) return true; return false; } private boolean jj_3R_223() { Token xsp; xsp = jj_scanpos; if (jj_3_43()) { jj_scanpos = xsp; if (jj_3R_241()) { jj_scanpos = xsp; if (jj_3R_242()) { jj_scanpos = xsp; if (jj_scan_token(83)) { jj_scanpos = xsp; if (jj_3R_243()) { jj_scanpos = xsp; if (jj_3R_244()) { jj_scanpos = xsp; if (jj_3R_245()) { jj_scanpos = xsp; if (jj_3R_246()) { jj_scanpos = xsp; if (jj_3R_247()) { jj_scanpos = xsp; if (jj_3R_248()) { jj_scanpos = xsp; if (jj_3R_249()) { jj_scanpos = xsp; if (jj_3R_250()) { jj_scanpos = xsp; if (jj_3R_251()) { jj_scanpos = xsp; if (jj_3R_252()) { jj_scanpos = xsp; if (jj_3R_253()) { jj_scanpos = xsp; if (jj_3R_254()) return true; } } } } } } } } } } } } } } } return false; } private boolean jj_3_62() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_429() { if (jj_3R_309()) return true; return false; } private boolean jj_3R_275() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3_40() { if (jj_scan_token(LBRACKET)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_255() { Token xsp; if (jj_3R_275()) return true; while (true) { xsp = jj_scanpos; if (jj_3R_275()) { jj_scanpos = xsp; break; } } if (jj_3R_177()) return true; return false; } private boolean jj_3_42() { Token xsp; if (jj_3_40()) return true; while (true) { xsp = jj_scanpos; if (jj_3_40()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3_41()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_228() { Token xsp; xsp = jj_scanpos; if (jj_3_42()) { jj_scanpos = xsp; if (jj_3R_255()) return true; } return false; } private boolean jj_3_61() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_412() { if (jj_3R_111()) return true; if (jj_3R_341()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_421()) { jj_scanpos = xsp; break; } } if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_238() { if (jj_scan_token(SUPER)) return true; if (jj_3R_103()) return true; return false; } private boolean jj_3R_220() { Token xsp; xsp = jj_scanpos; if (jj_3R_237()) { jj_scanpos = xsp; if (jj_3R_238()) return true; } return false; } private boolean jj_3R_237() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_103()) return true; return false; } private boolean jj_3R_406() { if (jj_3R_413()) return true; return false; } private boolean jj_3_60() { if (jj_scan_token(COMMA)) return true; if (jj_3R_140()) return true; return false; } private boolean jj_3R_226() { if (jj_scan_token(BIT_AND)) return true; if (jj_3R_184()) return true; return false; } private boolean jj_3R_153() { if (jj_3R_184()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_62()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_152() { if (jj_3R_110()) return true; Token xsp; if (jj_3_61()) return true; while (true) { xsp = jj_scanpos; if (jj_3_61()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_103() { Token xsp; xsp = jj_scanpos; if (jj_3R_152()) { jj_scanpos = xsp; if (jj_3R_153()) return true; } return false; } private boolean jj_3R_206() { if (jj_3R_220()) return true; return false; } private boolean jj_3R_337() { if (jj_scan_token(THROWS)) return true; if (jj_3R_363()) return true; return false; } private boolean jj_3R_170() { if (jj_scan_token(HOOK)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_206()) jj_scanpos = xsp; return false; } private boolean jj_3R_256() { if (jj_3R_276()) return true; return false; } private boolean jj_3R_140() { Token xsp; xsp = jj_scanpos; if (jj_3R_169()) { jj_scanpos = xsp; if (jj_3R_170()) return true; } return false; } private boolean jj_3R_169() { if (jj_3R_103()) return true; return false; } private boolean jj_3R_405() { if (jj_3R_189()) return true; return false; } private boolean jj_3R_139() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_137() { if (jj_scan_token(LT)) return true; if (jj_3R_140()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_60()) { jj_scanpos = xsp; break; } } if (jj_scan_token(GT)) return true; return false; } private boolean jj_3R_338() { if (jj_3R_142()) return true; return false; } private boolean jj_3R_231() { if (jj_3R_189()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_256()) jj_scanpos = xsp; return false; } private boolean jj_3R_230() { if (jj_3R_228()) return true; return false; } private boolean jj_3R_163() { if (jj_scan_token(NEW)) return true; if (jj_3R_94()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_229()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_230()) { jj_scanpos = xsp; if (jj_3R_231()) return true; } return false; } private boolean jj_3R_229() { if (jj_3R_137()) return true; return false; } private boolean jj_3R_212() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_184()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_226()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3_58() { if (jj_3R_111()) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_139()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_scan_token(84)) { jj_scanpos = xsp; if (jj_scan_token(87)) { jj_scanpos = xsp; if (jj_scan_token(83)) return true; } } return false; } private boolean jj_3R_138() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_115() { Token xsp; xsp = jj_scanpos; if (jj_3_39()) { jj_scanpos = xsp; if (jj_3R_163()) return true; } return false; } private boolean jj_3_39() { if (jj_scan_token(NEW)) return true; if (jj_3R_110()) return true; if (jj_3R_228()) return true; return false; } private boolean jj_3R_136() { if (jj_3R_84()) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_405()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_406()) jj_scanpos = xsp; return false; } private boolean jj_3_57() { Token xsp; xsp = jj_scanpos; if (jj_3R_138()) jj_scanpos = xsp; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_277() { if (jj_scan_token(COMMA)) return true; if (jj_3R_117()) return true; return false; } private boolean jj_3R_427() { if (jj_3R_429()) return true; return false; } private boolean jj_3R_335() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_426() { if (jj_3R_412()) return true; return false; } private boolean jj_3R_425() { if (jj_3R_308()) return true; return false; } private boolean jj_3R_424() { if (jj_3R_307()) return true; return false; } private boolean jj_3R_334() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_423() { if (jj_3R_411()) return true; return false; } private boolean jj_3R_217() { if (jj_3R_117()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_277()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_204() { if (jj_3R_217()) return true; return false; } private boolean jj_3R_414() { if (jj_3R_84()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_423()) { jj_scanpos = xsp; if (jj_3R_424()) { jj_scanpos = xsp; if (jj_3R_425()) { jj_scanpos = xsp; if (jj_3R_426()) { jj_scanpos = xsp; if (jj_3R_427()) return true; } } } } return false; } private boolean jj_3_4() { if (jj_3R_84()) return true; if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_189() { if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_204()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_373() { if (jj_scan_token(TESTAAAA)) return true; return false; } private boolean jj_3R_83() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(56)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } return false; } private boolean jj_3R_407() { Token xsp; xsp = jj_scanpos; if (jj_3_59()) { jj_scanpos = xsp; if (jj_3R_414()) { jj_scanpos = xsp; if (jj_scan_token(83)) return true; } } return false; } private boolean jj_3_59() { if (jj_3R_85()) return true; return false; } private boolean jj_3R_372() { if (jj_scan_token(SYNCHRONIZED)) return true; return false; } private boolean jj_3R_371() { if (jj_scan_token(NATIVE)) return true; return false; } private boolean jj_3_3() { if (jj_3R_84()) return true; if (jj_scan_token(ENUM)) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3_56() { if (jj_3R_137()) return true; return false; } private boolean jj_3R_227() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(61)) { jj_scanpos = xsp; if (jj_scan_token(30)) return true; } return false; } private boolean jj_3_55() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3_56()) jj_scanpos = xsp; return false; } private boolean jj_3R_197() { if (jj_3R_212()) return true; return false; } private boolean jj_3R_82() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_370() { if (jj_scan_token(FINAL)) return true; return false; } private boolean jj_3_2() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_82()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_83()) { jj_scanpos = xsp; break; } } if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3_54() { if (jj_3R_137()) return true; return false; } private boolean jj_3_53() { if (jj_scan_token(COMMA)) return true; if (jj_3R_136()) return true; return false; } private boolean jj_3R_213() { if (jj_3R_227()) return true; return false; } private boolean jj_3R_369() { if (jj_scan_token(ABSTRACT)) return true; return false; } private boolean jj_3R_184() { if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3_54()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3_55()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_368() { if (jj_scan_token(STATIC)) return true; return false; } private boolean jj_3R_385() { if (jj_3R_407()) return true; return false; } private boolean jj_3R_198() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(66)) { jj_scanpos = xsp; if (jj_scan_token(70)) { jj_scanpos = xsp; if (jj_scan_token(72)) { jj_scanpos = xsp; if (jj_scan_token(73)) { jj_scanpos = xsp; if (jj_3R_213()) { jj_scanpos = xsp; if (jj_scan_token(45)) return true; } } } } } return false; } private boolean jj_3R_175() { if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_197()) jj_scanpos = xsp; return false; } private boolean jj_3R_367() { if (jj_scan_token(PRIVATE)) return true; return false; } private boolean jj_3R_358() { if (jj_scan_token(SEMICOLON)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_385()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_366() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3R_161() { if (jj_3R_189()) return true; return false; } private boolean jj_3R_357() { if (jj_3R_136()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_53()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_160() { if (jj_scan_token(DOT)) return true; if (jj_3R_105()) return true; return false; } private boolean jj_3R_159() { if (jj_scan_token(LBRACKET)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_365() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3R_333() { Token xsp; xsp = jj_scanpos; if (jj_3R_365()) { jj_scanpos = xsp; if (jj_3R_366()) { jj_scanpos = xsp; if (jj_3R_367()) { jj_scanpos = xsp; if (jj_3R_368()) { jj_scanpos = xsp; if (jj_3R_369()) { jj_scanpos = xsp; if (jj_3R_370()) { jj_scanpos = xsp; if (jj_3R_371()) { jj_scanpos = xsp; if (jj_3R_372()) { jj_scanpos = xsp; if (jj_3R_373()) return true; } } } } } } } } return false; } private boolean jj_3R_323() { if (jj_scan_token(LBRACE)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_357()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(84)) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_358()) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3_38() { if (jj_3R_116()) return true; return false; } private boolean jj_3_33() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(SUPER)) return true; if (jj_scan_token(DOT)) return true; if (jj_3R_105()) return true; return false; } private boolean jj_3_37() { if (jj_scan_token(DOT)) return true; if (jj_3R_115()) return true; return false; } private boolean jj_3R_112() { Token xsp; xsp = jj_scanpos; if (jj_3_36()) { jj_scanpos = xsp; if (jj_3_37()) { jj_scanpos = xsp; if (jj_3_38()) { jj_scanpos = xsp; if (jj_3R_159()) { jj_scanpos = xsp; if (jj_3R_160()) { jj_scanpos = xsp; if (jj_3R_161()) return true; } } } } } return false; } private boolean jj_3_36() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(THIS)) return true; return false; } private boolean jj_3R_422() { if (jj_3R_407()) return true; return false; } private boolean jj_3R_413() { if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_422()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3_35() { if (jj_3R_114()) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3R_183() { if (jj_3R_94()) return true; Token xsp; xsp = jj_scanpos; if (jj_3_33()) jj_scanpos = xsp; return false; } private boolean jj_3R_332() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_188() { if (jj_3R_198()) return true; return false; } private boolean jj_3R_384() { if (jj_scan_token(COMMA)) return true; if (jj_3R_184()) return true; return false; } private boolean jj_3R_113() { if (jj_3R_105()) return true; return false; } private boolean jj_3R_356() { if (jj_scan_token(IMPLEMENTS)) return true; if (jj_3R_184()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_384()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3_17() { if (jj_scan_token(COMMA)) return true; if (jj_3R_100()) return true; return false; } private boolean jj_3R_182() { if (jj_3R_114()) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3R_176() { if (jj_scan_token(COMMA)) return true; if (jj_3R_175()) return true; return false; } private boolean jj_3R_309() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_332()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_333()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_334()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3R_335()) jj_scanpos = xsp; if (jj_3R_114()) return true; if (jj_3R_336()) return true; xsp = jj_scanpos; if (jj_3R_337()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_338()) { jj_scanpos = xsp; if (jj_scan_token(83)) return true; } return false; } private boolean jj_3R_181() { if (jj_3R_115()) return true; return false; } private boolean jj_3R_180() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_440() { if (jj_scan_token(COMMA)) return true; if (jj_3R_184()) return true; return false; } private boolean jj_3R_428() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_184()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_440()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_342() { if (jj_scan_token(COMMA)) return true; if (jj_3R_341()) return true; return false; } private boolean jj_3R_393() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_199() { if (jj_3R_105()) return true; return false; } private boolean jj_3_34() { if (jj_scan_token(SUPER)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(85)) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_113()) jj_scanpos = xsp; return false; } private boolean jj_3_32() { if (jj_3R_112()) return true; return false; } private boolean jj_3R_143() { if (jj_scan_token(LT)) return true; if (jj_3R_175()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_176()) { jj_scanpos = xsp; break; } } if (jj_scan_token(GT)) return true; return false; } private boolean jj_3R_286() { if (jj_3R_100()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_17()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_378() { if (jj_scan_token(ASSIGN)) return true; if (jj_3R_100()) return true; return false; } private boolean jj_3R_179() { if (jj_scan_token(THIS)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(85)) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_199()) jj_scanpos = xsp; return false; } private boolean jj_3R_392() { if (jj_3R_105()) return true; return false; } private boolean jj_3R_177() { if (jj_scan_token(LBRACE)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_286()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(84)) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_151() { Token xsp; xsp = jj_scanpos; if (jj_3R_178()) { jj_scanpos = xsp; if (jj_3R_179()) { jj_scanpos = xsp; if (jj_3_34()) { jj_scanpos = xsp; if (jj_3R_180()) { jj_scanpos = xsp; if (jj_3R_181()) { jj_scanpos = xsp; if (jj_3R_182()) { jj_scanpos = xsp; if (jj_3R_183()) return true; } } } } } } return false; } private boolean jj_3R_178() { if (jj_3R_198()) return true; return false; } private boolean jj_3R_280() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(100)) { jj_scanpos = xsp; if (jj_scan_token(101)) return true; } return false; } private boolean jj_3R_187() { if (jj_3R_105()) return true; return false; } private boolean jj_3R_150() { if (jj_3R_117()) return true; return false; } private boolean jj_3R_99() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(48)) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } return false; } private boolean jj_3R_102() { if (jj_3R_151()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_32()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_377() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(28)) { jj_scanpos = xsp; if (jj_3R_392()) return true; } while (true) { xsp = jj_scanpos; if (jj_3R_393()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_149() { if (jj_3R_177()) return true; return false; } private boolean jj_3R_100() { Token xsp; xsp = jj_scanpos; if (jj_3R_149()) { jj_scanpos = xsp; if (jj_3R_150()) return true; } return false; } private boolean jj_3_31() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_110()) return true; return false; } private boolean jj_3R_97() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(48)) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } return false; } private boolean jj_3R_279() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_111()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_216()) return true; return false; } private boolean jj_3_30() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_257() { Token xsp; xsp = jj_scanpos; if (jj_3R_278()) { jj_scanpos = xsp; if (jj_3R_279()) return true; } return false; } private boolean jj_3R_278() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_111()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_185()) return true; return false; } private boolean jj_3R_341() { if (jj_3R_377()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_378()) jj_scanpos = xsp; return false; } private boolean jj_3R_258() { if (jj_3R_102()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_280()) jj_scanpos = xsp; return false; } private boolean jj_3R_340() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_98() { if (jj_3R_141()) return true; return false; } private boolean jj_3_14() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_98()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_99()) { jj_scanpos = xsp; break; } } if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_96() { if (jj_3R_141()) return true; return false; } private boolean jj_3_13() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_96()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_97()) { jj_scanpos = xsp; break; } } if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3_29() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_111()) return true; if (jj_scan_token(LBRACKET)) return true; return false; } private boolean jj_3R_322() { if (jj_3R_356()) return true; return false; } private boolean jj_3R_157() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_111()) return true; if (jj_scan_token(RPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(91)) { jj_scanpos = xsp; if (jj_scan_token(90)) { jj_scanpos = xsp; if (jj_scan_token(77)) { jj_scanpos = xsp; if (jj_3R_187()) { jj_scanpos = xsp; if (jj_scan_token(57)) { jj_scanpos = xsp; if (jj_scan_token(54)) { jj_scanpos = xsp; if (jj_scan_token(44)) { jj_scanpos = xsp; if (jj_3R_188()) return true; } } } } } } } return false; } private boolean jj_3R_156() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_111()) return true; if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_307() { if (jj_scan_token(ENUM)) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_322()) jj_scanpos = xsp; if (jj_3R_323()) return true; return false; } private boolean jj_3R_109() { Token xsp; xsp = jj_scanpos; if (jj_3_28()) { jj_scanpos = xsp; if (jj_3R_156()) { jj_scanpos = xsp; if (jj_3R_157()) return true; } } return false; } private boolean jj_3_28() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_110()) return true; return false; } private boolean jj_3_27() { if (jj_3R_109()) return true; return false; } private boolean jj_3R_81() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_417() { if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_376() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3R_375() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3R_339() { Token xsp; xsp = jj_scanpos; if (jj_3R_375()) { jj_scanpos = xsp; if (jj_3R_376()) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(60)) { jj_scanpos = xsp; if (jj_scan_token(64)) return true; } } } } } } return false; } private boolean jj_3_1() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_81()) { jj_scanpos = xsp; break; } } if (jj_scan_token(PACKAGE)) return true; return false; } private boolean jj_3R_311() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_339()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_340()) { jj_scanpos = xsp; break; } } if (jj_3R_111()) return true; if (jj_3R_341()) return true; while (true) { xsp = jj_scanpos; if (jj_3R_342()) { jj_scanpos = xsp; break; } } if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_234() { if (jj_3R_258()) return true; return false; } private boolean jj_3R_420() { if (jj_3R_356()) return true; return false; } private boolean jj_3_16() { if (jj_3R_95()) return true; return false; } private boolean jj_3R_419() { if (jj_3R_428()) return true; return false; } private boolean jj_3R_233() { if (jj_3R_257()) return true; return false; } private boolean jj_3R_418() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_107() { if (jj_scan_token(GT)) return true; if (jj_scan_token(GT)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(88)) jj_scanpos = xsp; return false; } private boolean jj_3R_411() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(21)) { jj_scanpos = xsp; if (jj_3R_417()) return true; } if (jj_scan_token(IDENTIFIER)) return true; xsp = jj_scanpos; if (jj_3R_418()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_419()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_420()) jj_scanpos = xsp; if (jj_3R_413()) return true; return false; } private boolean jj_3R_216() { Token xsp; xsp = jj_scanpos; if (jj_3R_232()) { jj_scanpos = xsp; if (jj_3R_233()) { jj_scanpos = xsp; if (jj_3R_234()) return true; } } return false; } private boolean jj_3R_232() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(91)) { jj_scanpos = xsp; if (jj_scan_token(90)) return true; } if (jj_3R_185()) return true; return false; } private boolean jj_3_15() { if (jj_3R_84()) return true; if (jj_scan_token(ENUM)) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3R_404() { if (jj_3R_84()) return true; if (jj_3R_311()) return true; return false; } private boolean jj_3R_403() { if (jj_3R_309()) return true; return false; } private boolean jj_3R_215() { if (jj_scan_token(DECR)) return true; if (jj_3R_102()) return true; return false; } private boolean jj_3R_155() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(102)) { jj_scanpos = xsp; if (jj_scan_token(103)) return true; } if (jj_3R_154()) return true; return false; } private boolean jj_3R_186() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(104)) { jj_scanpos = xsp; if (jj_scan_token(105)) { jj_scanpos = xsp; if (jj_scan_token(109)) return true; } } if (jj_3R_185()) return true; return false; } private boolean jj_3R_402() { if (jj_3R_84()) return true; if (jj_3R_307()) return true; return false; } private boolean jj_3R_214() { if (jj_scan_token(INCR)) return true; if (jj_3R_102()) return true; return false; } private boolean jj_3R_135() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_401() { if (jj_3R_306()) return true; return false; } private boolean jj_3R_400() { if (jj_3R_305()) return true; return false; } private boolean jj_3R_203() { if (jj_3R_216()) return true; return false; } private boolean jj_3R_134() { if (jj_scan_token(TESTAAAA)) return true; return false; } private boolean jj_3R_383() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(83)) { jj_scanpos = xsp; if (jj_3R_400()) { jj_scanpos = xsp; if (jj_3R_401()) { jj_scanpos = xsp; if (jj_3R_402()) { jj_scanpos = xsp; if (jj_3R_403()) { jj_scanpos = xsp; if (jj_3R_404()) return true; } } } } } return false; } private boolean jj_3R_202() { if (jj_3R_215()) return true; return false; } private boolean jj_3_26() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(110)) { jj_scanpos = xsp; if (jj_3R_107()) return true; } if (jj_3R_108()) return true; return false; } private boolean jj_3R_201() { if (jj_3R_214()) return true; return false; } private boolean jj_3R_133() { if (jj_scan_token(VOLATILE)) return true; return false; } private boolean jj_3R_185() { Token xsp; xsp = jj_scanpos; if (jj_3R_200()) { jj_scanpos = xsp; if (jj_3R_201()) { jj_scanpos = xsp; if (jj_3R_202()) { jj_scanpos = xsp; if (jj_3R_203()) return true; } } } return false; } private boolean jj_3R_200() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(102)) { jj_scanpos = xsp; if (jj_scan_token(103)) return true; } if (jj_3R_185()) return true; return false; } private boolean jj_3R_132() { if (jj_scan_token(TRANSIENT)) return true; return false; } private boolean jj_3R_354() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_363()) return true; return false; } private boolean jj_3R_154() { if (jj_3R_185()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_186()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_131() { if (jj_scan_token(NATIVE)) return true; return false; } private boolean jj_3R_343() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(89)) { jj_scanpos = xsp; if (jj_scan_token(88)) { jj_scanpos = xsp; if (jj_scan_token(95)) { jj_scanpos = xsp; if (jj_scan_token(96)) return true; } } } if (jj_3R_312()) return true; return false; } private boolean jj_3R_313() { if (jj_scan_token(INSTANCEOF)) return true; if (jj_3R_111()) return true; return false; } private boolean jj_3R_108() { if (jj_3R_154()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_155()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_130() { if (jj_scan_token(SYNCHRONIZED)) return true; return false; } private boolean jj_3R_302() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(94)) { jj_scanpos = xsp; if (jj_scan_token(97)) return true; } if (jj_3R_291()) return true; return false; } private boolean jj_3R_129() { if (jj_scan_token(ABSTRACT)) return true; return false; } private boolean jj_3R_312() { if (jj_3R_108()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_26()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_128() { if (jj_scan_token(FINAL)) return true; return false; } private boolean jj_3R_353() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_292() { if (jj_scan_token(BIT_AND)) return true; if (jj_3R_288()) return true; return false; } private boolean jj_3R_127() { if (jj_scan_token(PRIVATE)) return true; return false; } private boolean jj_3R_301() { if (jj_3R_312()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_343()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_282() { if (jj_scan_token(BIT_OR)) return true; if (jj_3R_259()) return true; return false; } private boolean jj_3R_126() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3R_289() { if (jj_scan_token(XOR)) return true; if (jj_3R_281()) return true; return false; } private boolean jj_3R_291() { if (jj_3R_301()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_313()) jj_scanpos = xsp; return false; } private boolean jj_3R_125() { if (jj_scan_token(STATIC)) return true; return false; } private boolean jj_3R_260() { if (jj_scan_token(SC_AND)) return true; if (jj_3R_235()) return true; return false; } private boolean jj_3R_288() { if (jj_3R_291()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_302()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_236() { if (jj_scan_token(SC_OR)) return true; if (jj_3R_218()) return true; return false; } private boolean jj_3R_355() { if (jj_3R_383()) return true; return false; } private boolean jj_3R_124() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3R_281() { if (jj_3R_288()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_292()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3_52() { Token xsp; xsp = jj_scanpos; if (jj_3R_124()) { jj_scanpos = xsp; if (jj_3R_125()) { jj_scanpos = xsp; if (jj_3R_126()) { jj_scanpos = xsp; if (jj_3R_127()) { jj_scanpos = xsp; if (jj_3R_128()) { jj_scanpos = xsp; if (jj_3R_129()) { jj_scanpos = xsp; if (jj_3R_130()) { jj_scanpos = xsp; if (jj_3R_131()) { jj_scanpos = xsp; if (jj_3R_132()) { jj_scanpos = xsp; if (jj_3R_133()) { jj_scanpos = xsp; if (jj_3R_134()) { jj_scanpos = xsp; if (jj_3R_135()) return true; } } } } } } } } } } } return false; } private boolean jj_3R_219() { if (jj_scan_token(HOOK)) return true; if (jj_3R_117()) return true; if (jj_scan_token(COLON)) return true; if (jj_3R_191()) return true; return false; } private boolean jj_3R_84() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_52()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_225() { if (jj_scan_token(INTERFACE)) return true; if (jj_3R_105()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_353()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_354()) jj_scanpos = xsp; if (jj_scan_token(LBRACE)) return true; while (true) { xsp = jj_scanpos; if (jj_3R_355()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_344() { if (jj_3R_345()) return true; return false; } private boolean jj_3R_259() { if (jj_3R_281()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_289()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_410() { if (jj_3R_416()) return true; return false; } private boolean jj_3R_235() { if (jj_3R_259()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_282()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_416() { if (jj_scan_token(_DEFAULT)) return true; if (jj_3R_123()) return true; return false; } private boolean jj_3R_218() { if (jj_3R_235()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_260()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_380() { if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_205() { if (jj_3R_218()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_236()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_398() { if (jj_3R_412()) return true; return false; } private boolean jj_3R_191() { if (jj_3R_205()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_219()) jj_scanpos = xsp; return false; } private boolean jj_3R_397() { if (jj_3R_303()) return true; return false; } private boolean jj_3R_315() { if (jj_3R_345()) return true; return false; } private boolean jj_3R_396() { if (jj_3R_307()) return true; return false; } private boolean jj_3_51() { if (jj_3R_111()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_395() { if (jj_3R_411()) return true; return false; } private boolean jj_3R_106() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(87)) { jj_scanpos = xsp; if (jj_scan_token(113)) { jj_scanpos = xsp; if (jj_scan_token(114)) { jj_scanpos = xsp; if (jj_scan_token(118)) { jj_scanpos = xsp; if (jj_scan_token(111)) { jj_scanpos = xsp; if (jj_scan_token(112)) { jj_scanpos = xsp; if (jj_scan_token(119)) { jj_scanpos = xsp; if (jj_scan_token(120)) { jj_scanpos = xsp; if (jj_scan_token(121)) { jj_scanpos = xsp; if (jj_scan_token(115)) { jj_scanpos = xsp; if (jj_scan_token(117)) { jj_scanpos = xsp; if (jj_scan_token(116)) return true; } } } } } } } } } } } return false; } private boolean jj_3_25() { if (jj_3R_102()) return true; if (jj_3R_106()) return true; return false; } private boolean jj_3R_190() { if (jj_3R_102()) return true; if (jj_3R_106()) return true; if (jj_3R_117()) return true; return false; } private boolean jj_3R_394() { if (jj_3R_111()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_scan_token(RPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_410()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } /** Generated Token Manager. */ public JavaParserDebugTokenManager token_source; JavaCharStream jj_input_stream; /** Current token. */ public Token token; /** Next token. */ public Token jj_nt; private int jj_ntk; private Token jj_scanpos, jj_lastpos; private int jj_la; private int jj_gen; final private int[] jj_la1 = new int[202]; static private int[] jj_la1_0; static private int[] jj_la1_1; static private int[] jj_la1_2; static private int[] jj_la1_3; static { jj_la1_init_0(); jj_la1_init_1(); jj_la1_init_2(); jj_la1_init_3(); } private static void jj_la1_init_0() { jj_la1_0 = new int[] {0x0,0x90202000,0x0,0x0,0x0,0x90202000,0x0,0x0,0x80002000,0x80002000,0x200000,0x0,0x0,0x0,0x80002000,0x0,0x0,0x80002000,0x80002000,0x0,0x0,0x0,0x0,0x20000000,0x0,0x9432e000,0x0,0x0,0x80002000,0x80002000,0x0,0x0,0x84128000,0x0,0x80002000,0x80002000,0x0,0x0,0x0,0x0,0x2000,0x2000,0x0,0x0,0x80002000,0x80002000,0x0,0x20000000,0x9432a000,0x0,0x8412a000,0x80000000,0x80000000,0x0,0x0,0x0,0x10004000,0x0,0x5412c000,0x5412c000,0x0,0x0,0x80002000,0x80002000,0x0,0x0,0x0,0x0,0x0,0x0,0x8412a000,0x0,0x0,0x0,0x0,0x0,0x0,0xd6b3e000,0x5412c000,0x0,0x4128000,0x4128000,0x0,0x4128000,0x4128000,0x10004000,0x10004000,0x0,0x0,0x0,0x5412c000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x5412c000,0x0,0x0,0x5412c000,0x40004000,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x4000,0x40000000,0x0,0x10004000,0x0,0x40000000,0x40000000,0x5412c000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x5693c000,0x0,0xd6b3e000,0xd6b3e000,0x0,0x0,0x0,0x5412c000,0x1040000,0xd6b3e000,0x1040000,0x8000000,0xd412e000,0x5412c000,0x5412c000,0xd412e000,0x5412c000,0x0,0x4000,0x4000,0x5412c000,0x80000,0x0,0x4000,0x0,0x0,0x0,0x5412c000,0x5412c000,0x0,0x9432a000,0x9432a000,0x1000000,0x14328000,0x9432a000,0x80002000,0x200000,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x9432e000,0x80002000,0x0,0x9432e000,0x0,0x20000000,0x10200000,0x8412a000,0x9432e000,0x0,0x0,0x0,0x20000000,0x4128000,0x4128000,0x20000000,0x0,0x0,0x0,0x8412a000,0x0,}; } private static void jj_la1_init_1() { jj_la1_1 = new int[] {0x40,0x11338a00,0x4040,0x4040,0x40,0x11338a00,0x4000,0x40,0x1220000,0x1220000,0x200,0x0,0x100000,0x0,0x11338800,0x0,0x0,0x1220000,0x1220000,0x0,0x0,0x0,0x0,0x0,0x20,0x913b8f02,0x0,0x0,0x338000,0x338000,0x0,0x0,0x101b8502,0x0,0x1338800,0x1338800,0x0,0x0,0x0,0x0,0x220000,0x220000,0x0,0x0,0x338000,0x338000,0x0,0x0,0x913b8f02,0x0,0x113b8d02,0x10138000,0x10138000,0x0,0x0,0x0,0x0,0x0,0xa2483502,0xa2483502,0x0,0x0,0x1338800,0x1338800,0x0,0x0,0x8000000,0x0,0x0,0x0,0x113b8d02,0x0,0x0,0x38000,0x38000,0x0,0x8000000,0xf7ffbf16,0xa2483502,0x100000,0x80502,0x80502,0x0,0x80502,0x80080502,0x0,0x0,0x0,0x0,0x0,0xa2483502,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa2483502,0x0,0x0,0xa2483502,0x22403000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x22002000,0x1000,0x0,0x0,0x20002000,0x20000000,0xa2483502,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0xe7cc3516,0x0,0xf7ffbf16,0xf7ffbf16,0x0,0x0,0x0,0xa2483502,0x0,0xf7ffbf16,0x0,0x0,0xb37bbd02,0xa2483502,0xa2483502,0xb37bbd02,0xa2483502,0x0,0x0,0x0,0xa2483502,0x0,0x1,0x0,0x0,0x0,0x0,0xa2483502,0xa2483502,0x0,0x113b8f02,0x113b8f02,0x0,0x80702,0x113b8f02,0x11338800,0x200,0x0,0x0,0x20,0x20,0x0,0x0,0x0,0x913b8f02,0x11338800,0x0,0x913b8f02,0x0,0x0,0x200,0x813b8d02,0x913b8f02,0x0,0x0,0x0,0x400000,0x80502,0x80502,0x400000,0x0,0x0,0x0,0x113b8d02,0x0,}; } private static void jj_la1_init_2() { jj_la1_2 = new int[] {0x0,0x480001,0x400000,0x400000,0x0,0x480001,0x400000,0x0,0x0,0x0,0x0,0x400000,0x0,0x200000,0x480001,0x400000,0x400000,0x0,0x0,0x2000000,0x2000000,0x200000,0x2000000,0x0,0x0,0x2488401,0x400000,0x400000,0x0,0x0,0x400000,0x80000,0x400401,0x400000,0x0,0x0,0x400000,0x2000000,0x400000,0x400000,0x0,0x0,0x400000,0x400000,0x0,0x0,0x2000000,0x0,0x2480401,0x80000,0x400401,0x1,0x1,0x400000,0x100000,0x800000,0x400,0x20000,0xc00a744,0xc00a744,0x100000,0x400000,0x0,0x0,0x400000,0x2000000,0x0,0x88000,0x20000,0x100000,0x400401,0x0,0x400000,0x0,0x0,0x2000000,0x0,0x48a747,0x2744,0x0,0x0,0x400,0x20000,0x0,0x400,0x400,0x400,0x2000000,0x100000,0x2000000,0xc002744,0x800000,0x10000000,0x0,0x0,0x0,0x0,0x0,0x40000000,0x40000000,0x0,0x83000000,0x83000000,0x1000000,0x1000000,0x0,0x0,0x0,0x0,0x0,0xc002744,0xc000000,0xc000000,0x2744,0xc002744,0x2000,0x0,0x0,0x2000,0x200000,0x400,0x200000,0x400,0x344,0x2000,0x400,0x222000,0x344,0x0,0xc002744,0x100000,0x2000000,0x8000,0x22000,0x0,0x20000,0x20000,0x8a746,0x20000000,0x48a747,0x48a747,0x100000,0x800000,0x800000,0x2744,0x0,0x48a747,0x0,0x0,0x402745,0xc002744,0x2744,0x482745,0x2744,0x100000,0x400,0x400,0xc002744,0x0,0x0,0x400,0x400000,0x400,0x100000,0xc40a744,0xc40a744,0x100000,0x480401,0x480401,0x0,0x400400,0x480401,0x400001,0x0,0x2000000,0x0,0x0,0x0,0x100000,0x100000,0x100000,0x2488401,0x400401,0x100000,0x2488401,0x80000,0x0,0x0,0x2400400,0x2480401,0x2000,0x8000,0x0,0x0,0x10000400,0x400,0x0,0x100000,0x20000,0x100000,0x400401,0x0,}; } private static void jj_la1_init_3() { jj_la1_3 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0x0,0x0,0x30,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0x3ff8000,0x0,0x4,0x8,0x800,0x1000,0x400,0x2,0x2,0x0,0x1,0x1,0x0,0x4000,0xc0,0xc0,0x2300,0x2300,0xc0,0xf0,0x0,0x0,0x0,0x0,0x0,0x30,0x30,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30,0x0,0x30,0x30,0x0,0x3ff8030,0x3ff8030,0x30,0x0,0x30,0x0,0x0,0x30,0xf0,0x30,0x30,0x30,0x0,0x0,0x0,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,}; } final private JJCalls[] jj_2_rtns = new JJCalls[62]; private boolean jj_rescan = false; private int jj_gc = 0; /** Constructor with InputStream. */ public JavaParserDebug(java.io.InputStream stream) { this(stream, null); } /** Constructor with InputStream and supplied encoding */ public JavaParserDebug(java.io.InputStream stream, String encoding) { try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source = new JavaParserDebugTokenManager(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 202; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Reinitialise. */ public void ReInit(java.io.InputStream stream) { ReInit(stream, null); } /** Reinitialise. */ public void ReInit(java.io.InputStream stream, String encoding) { try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source.ReInit(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 202; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Constructor. */ public JavaParserDebug(java.io.Reader stream) { jj_input_stream = new JavaCharStream(stream, 1, 1); token_source = new JavaParserDebugTokenManager(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 202; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Reinitialise. */ public void ReInit(java.io.Reader stream) { jj_input_stream.ReInit(stream, 1, 1); token_source.ReInit(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 202; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Constructor with generated Token Manager. */ public JavaParserDebug(JavaParserDebugTokenManager tm) { token_source = tm; token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 202; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Reinitialise. */ public void ReInit(JavaParserDebugTokenManager tm) { token_source = tm; token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 202; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } private Token jj_consume_token(int kind) throws ParseException { Token oldToken; if ((oldToken = token).next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; if (token.kind == kind) { jj_gen++; if (++jj_gc > 100) { jj_gc = 0; for (int i = 0; i < jj_2_rtns.length; i++) { JJCalls c = jj_2_rtns[i]; while (c != null) { if (c.gen < jj_gen) c.first = null; c = c.next; } } } trace_token(token, ""); return token; } token = oldToken; jj_kind = kind; throw generateParseException(); } static private final class LookaheadSuccess extends java.lang.Error { } final private LookaheadSuccess jj_ls = new LookaheadSuccess(); private boolean jj_scan_token(int kind) { if (jj_scanpos == jj_lastpos) { jj_la--; if (jj_scanpos.next == null) { jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); } else { jj_lastpos = jj_scanpos = jj_scanpos.next; } } else { jj_scanpos = jj_scanpos.next; } if (jj_rescan) { int i = 0; Token tok = token; while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } if (tok != null) jj_add_error_token(kind, i); } if (jj_scanpos.kind != kind) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; return false; } /** Get the next Token. */ final public Token getNextToken() { if (token.next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; jj_gen++; trace_token(token, " (in getNextToken)"); return token; } /** Get the specific Token. */ final public Token getToken(int index) { Token t = token; for (int i = 0; i < index; i++) { if (t.next != null) t = t.next; else t = t.next = token_source.getNextToken(); } return t; } private int jj_ntk() { if ((jj_nt=token.next) == null) return (jj_ntk = (token.next=token_source.getNextToken()).kind); else return (jj_ntk = jj_nt.kind); } private java.util.List jj_expentries = new java.util.ArrayList(); private int[] jj_expentry; private int jj_kind = -1; private int[] jj_lasttokens = new int[100]; private int jj_endpos; private void jj_add_error_token(int kind, int pos) { if (pos >= 100) return; if (pos == jj_endpos + 1) { jj_lasttokens[jj_endpos++] = kind; } else if (jj_endpos != 0) { jj_expentry = new int[jj_endpos]; for (int i = 0; i < jj_endpos; i++) { jj_expentry[i] = jj_lasttokens[i]; } jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { int[] oldentry = (int[])(it.next()); if (oldentry.length == jj_expentry.length) { for (int i = 0; i < jj_expentry.length; i++) { if (oldentry[i] != jj_expentry[i]) { continue jj_entries_loop; } } jj_expentries.add(jj_expentry); break jj_entries_loop; } } if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; } } /** Generate ParseException. */ public ParseException generateParseException() { jj_expentries.clear(); boolean[] la1tokens = new boolean[123]; if (jj_kind >= 0) { la1tokens[jj_kind] = true; jj_kind = -1; } for (int i = 0; i < 202; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { if ((jj_la1_0[i] & (1<" + where); } } private void trace_scan(Token t1, int t2) { if (trace_enabled) { for (int i = 0; i < trace_indent; i++) { System.out.print(" "); } System.out.print("Visited token: <" + tokenImage[t1.kind]); if (t1.kind != 0 && !tokenImage[t1.kind].equals("\"" + t1.image + "\"")) { System.out.print(": \"" + t1.image + "\""); } System.out.println(" at line " + t1.beginLine + " column " + t1.beginColumn + ">; Expected token: <" + tokenImage[t2] + ">"); } } private void jj_rescan_token() { jj_rescan = true; for (int i = 0; i < 62; i++) { try { JJCalls p = jj_2_rtns[i]; do { if (p.gen > jj_gen) { jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; switch (i) { case 0: jj_3_1(); break; case 1: jj_3_2(); break; case 2: jj_3_3(); break; case 3: jj_3_4(); break; case 4: jj_3_5(); break; case 5: jj_3_6(); break; case 6: jj_3_7(); break; case 7: jj_3_8(); break; case 8: jj_3_9(); break; case 9: jj_3_10(); break; case 10: jj_3_11(); break; case 11: jj_3_12(); break; case 12: jj_3_13(); break; case 13: jj_3_14(); break; case 14: jj_3_15(); break; case 15: jj_3_16(); break; case 16: jj_3_17(); break; case 17: jj_3_18(); break; case 18: jj_3_19(); break; case 19: jj_3_20(); break; case 20: jj_3_21(); break; case 21: jj_3_22(); break; case 22: jj_3_23(); break; case 23: jj_3_24(); break; case 24: jj_3_25(); break; case 25: jj_3_26(); break; case 26: jj_3_27(); break; case 27: jj_3_28(); break; case 28: jj_3_29(); break; case 29: jj_3_30(); break; case 30: jj_3_31(); break; case 31: jj_3_32(); break; case 32: jj_3_33(); break; case 33: jj_3_34(); break; case 34: jj_3_35(); break; case 35: jj_3_36(); break; case 36: jj_3_37(); break; case 37: jj_3_38(); break; case 38: jj_3_39(); break; case 39: jj_3_40(); break; case 40: jj_3_41(); break; case 41: jj_3_42(); break; case 42: jj_3_43(); break; case 43: jj_3_44(); break; case 44: jj_3_45(); break; case 45: jj_3_46(); break; case 46: jj_3_47(); break; case 47: jj_3_48(); break; case 48: jj_3_49(); break; case 49: jj_3_50(); break; case 50: jj_3_51(); break; case 51: jj_3_52(); break; case 52: jj_3_53(); break; case 53: jj_3_54(); break; case 54: jj_3_55(); break; case 55: jj_3_56(); break; case 56: jj_3_57(); break; case 57: jj_3_58(); break; case 58: jj_3_59(); break; case 59: jj_3_60(); break; case 60: jj_3_61(); break; case 61: jj_3_62(); break; } } p = p.next; } while (p != null); } catch(LookaheadSuccess ls) { } } jj_rescan = false; } private void jj_save(int index, int xla) { JJCalls p = jj_2_rtns[index]; while (p.gen > jj_gen) { if (p.next == null) { p = p.next = new JJCalls(); break; } p = p.next; } p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; } static final class JJCalls { int gen; Token first; int arg; JJCalls next; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/JavaParser.java0000644000175000017500000100062411343534515031370 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaParser.java */ package net.sourceforge.cobertura.javancss.parser; import java.util.*; import net.sourceforge.cobertura.javancss.ccl.Util; import net.sourceforge.cobertura.javancss.FunctionMetric; import net.sourceforge.cobertura.javancss.ObjectMetric; import net.sourceforge.cobertura.javancss.PackageMetric; /** * Java source code parser based on a grammar compiled by * JavaCC from Java1.1.jj to the JavaParser class.

* * This class is responsible for parsing Java code and counting * all metrics during this parsing process. * The rest of the application is only responsible for invoking * this parser in a convenient way and to present the results * to the user.

* * This grammar is based on the Java grammar that comes as an * example with JavaCC, but has been extended to collect the * metrics data (and adapted to support real life and jdk 1.4 * Java sources as well). * * @author Sriram Sankar (original JavaCC grammar) * , Chr. Clemens Lee (JavaNCSS metrics) * , additional counting of javadoc comments done by * Emilio Gongora, and * Guillermo Rodriguez, . * Anonymous class count patch by Vesa Karvonnen, 2002-10-30. * @version 2000-01-31 $Id: Java1.1.jj 171 2009-05-31 20:12:01Z hboutemy $ */ public class JavaParser implements JavaParserInterface, JavaParserConstants { { /* // DEBUG MODE Util.setDebug( true ); // */ } private boolean _bReturn = false; private int _ncss = 0; // general counter private int _loc = 0; private int _cyc = 1; private int _localCases = 0; private String _sName = ""; // name of last token private String _sParameter = ""; private String _sPackage = ""; private String _sClass = ""; private String _sFunction = ""; private int _functions = 0; // number of functions in this class //private int _topLevelClasses = 0; private int _classes = 0; private int _classLevel = 0; private int _anonClassCount = 1; private int _jvdcLines = 0; // added by SMS private int _jvdc = 0; private boolean _bPrivate = true;//false; // added by SMS private boolean _bPublic = true; // added by SMS /** * For each class the number of formal * comments in toplevel methods, constructors, inner * classes, and for the class itself are counted. * The top level comment has to be directly before * the class definition, not before the package or * import statement as it is often seen in source code * examples (at the beginning of your source files you * should instead put your copyright notice). */ private int _javadocs = 0; // global javadocs private List/**/ _vFunctions = new ArrayList(); // holds the statistics for each method /** * Metrics for each class/interface are stored in this * vector. */ private List/**/ _vClasses = new ArrayList(); private List _vImports = new ArrayList(); private Object[] _aoPackage = null; private Map/**/ _htPackage = new HashMap(); private PackageMetric _pPackageMetric; private Token _tmpToken = null; /** Argh, too much of a state machine. */ private Token _tmpResultToken = null; private String _formatPackage(String sPackage_) { if (sPackage_.equals("")) { return "."; } return sPackage_.substring(0, sPackage_.length() - 1); } public void parse() throws Exception { CompilationUnit(); } public void parseImportUnit() throws Exception { ImportUnit(); } public int getNcss() { return _ncss; } public int getLOC() { return _loc; } // added by SMS public int getJvdc() { return _jvdc; } /*public int getTopLevelClasses() { return _topLevelClasses; }*/ public List/**/ getFunction() { return _vFunctions; } /** * @return Top level classes in sorted order */ public List/**/ getObject() { Collections.sort(_vClasses); return _vClasses; } /** * @return The empty package consists of the name ".". */ public Map/**/ getPackage() { return _htPackage; } public List getImports() { return _vImports; } /** * name, beginLine, ... */ public Object[] getPackageObjects() { return _aoPackage; } /** * if javancss is used with cat *.java a long * input stream might get generated, so line * number information in case of an parse exception * is not very useful. */ public String getLastFunction() { return _sPackage + _sClass + _sFunction; } /** * Class to hold modifiers. */ static public final class ModifierSet { /* Definitions of the bits in the modifiers field. */ public static final int PUBLIC = 0x0001; public static final int PROTECTED = 0x0002; public static final int PRIVATE = 0x0004; public static final int ABSTRACT = 0x0008; public static final int STATIC = 0x0010; public static final int FINAL = 0x0020; public static final int SYNCHRONIZED = 0x0040; public static final int NATIVE = 0x0080; public static final int TRANSIENT = 0x0100; public static final int VOLATILE = 0x0200; public static final int STRICTFP = 0x1000; /** A set of accessors that indicate whether the specified modifier is in the set. */ public boolean isPublic(int modifiers) { return (modifiers & PUBLIC) != 0; } public boolean isProtected(int modifiers) { return (modifiers & PROTECTED) != 0; } public boolean isPrivate(int modifiers) { return (modifiers & PRIVATE) != 0; } public boolean isStatic(int modifiers) { return (modifiers & STATIC) != 0; } public boolean isAbstract(int modifiers) { return (modifiers & ABSTRACT) != 0; } public boolean isFinal(int modifiers) { return (modifiers & FINAL) != 0; } public boolean isNative(int modifiers) { return (modifiers & NATIVE) != 0; } public boolean isStrictfp(int modifiers) { return (modifiers & STRICTFP) != 0; } public boolean isSynchronized(int modifiers) { return (modifiers & SYNCHRONIZED) != 0; } public boolean isTransient(int modifiers) { return (modifiers & TRANSIENT) != 0; } public boolean isVolatile(int modifiers) { return (modifiers & VOLATILE) != 0; } /** * Removes the given modifier. */ static int removeModifier(int modifiers, int mod) { return modifiers & ~mod; } } /***************************************** * THE JAVA LANGUAGE GRAMMAR STARTS HERE * *****************************************/ /* * Program structuring syntax follows. */ final public void CompilationUnit() throws ParseException { int oldNcss = 0; // added by SMS int oldFormal = 0; int oldSingle = 0; int oldMulti = 0; JavaParserTokenManager._iSingleComments = 0; JavaParserTokenManager._iMultiComments = 0; JavaParserTokenManager._iFormalComments = 0; JavaParserTokenManager._iMultiCommentsLast = 0; _bPrivate = true; _sPackage = ""; _pPackageMetric = new PackageMetric(); // this object manages the metrics if (jj_2_1(2147483647)) { PackageDeclaration(); } else { ; } label_1: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPORT: ; break; default: jj_la1[0] = jj_gen; break label_1; } ImportDeclaration(); } label_2: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case CLASS: case ENUM: case FINAL: case INTERFACE: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case SEMICOLON: case AT: ; break; default: jj_la1[1] = jj_gen; break label_2; } TypeDeclaration(); } // Package classes and functions are set inside // class and interface bodies. _pPackageMetric.ncss = _ncss; // added by SMS _pPackageMetric.javadocsLn = JavaParserTokenManager._iFormalComments; _pPackageMetric.singleLn = JavaParserTokenManager._iSingleComments; _pPackageMetric.multiLn = JavaParserTokenManager._iMultiComments; // _htPackage.put(_formatPackage(_sPackage), _pPackageMetric); label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPORT: case PACKAGE: case AT: ; break; default: jj_la1[2] = jj_gen; break label_3; } oldNcss = _ncss; _sPackage = ""; _pPackageMetric = new PackageMetric(); // added by SMS oldFormal = JavaParserTokenManager._iFormalComments; oldSingle = JavaParserTokenManager._iSingleComments; oldMulti = JavaParserTokenManager._iMultiComments; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PACKAGE: case AT: PackageDeclaration(); break; case IMPORT: ImportDeclaration(); break; default: jj_la1[3] = jj_gen; jj_consume_token(-1); throw new ParseException(); } label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPORT: ; break; default: jj_la1[4] = jj_gen; break label_4; } ImportDeclaration(); } label_5: while (true) { TypeDeclaration(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case CLASS: case ENUM: case FINAL: case INTERFACE: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case SEMICOLON: case AT: ; break; default: jj_la1[5] = jj_gen; break label_5; } } // Package classes and functions are set inside // class and interface bodies. _pPackageMetric.ncss = _ncss - oldNcss; // added by SMS _pPackageMetric.javadocsLn = JavaParserTokenManager._iFormalComments - oldFormal; _pPackageMetric.singleLn = JavaParserTokenManager._iSingleComments - oldSingle; _pPackageMetric.multiLn = JavaParserTokenManager._iMultiComments - oldMulti; // PackageMetric pckmPrevious = (PackageMetric)_htPackage. get(_formatPackage(_sPackage)); _pPackageMetric.add(pckmPrevious); _htPackage.put(_formatPackage(_sPackage), _pPackageMetric); } jj_consume_token(0); Token pToken = getToken(1); _loc = pToken.endLine; } final public void ImportUnit() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PACKAGE: case AT: PackageDeclaration(); break; default: jj_la1[6] = jj_gen; ; } label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPORT: ; break; default: jj_la1[7] = jj_gen; break label_6; } ImportDeclaration(); } label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case PUBLIC: case TESTAAAA: case SYNCHRONIZED: ; break; default: jj_la1[8] = jj_gen; break label_7; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: jj_consume_token(ABSTRACT); break; case FINAL: jj_consume_token(FINAL); break; case PUBLIC: jj_consume_token(PUBLIC); break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); break; case TESTAAAA: jj_consume_token(TESTAAAA); break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: jj_consume_token(CLASS); break; case INTERFACE: jj_consume_token(INTERFACE); break; default: jj_la1[10] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void PackageDeclaration() throws ParseException { int beginLine = 1; int beginColumn = 1; label_8: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[11] = jj_gen; break label_8; } Annotation(); } jj_consume_token(PACKAGE); _anonClassCount = 1; Token pToken = getToken( 0 ); beginLine = pToken.beginLine ; beginColumn = pToken.beginColumn; _aoPackage = new Object[ 5 ]; Name(); _aoPackage[ 0 ] = _sName; _aoPackage[ 1 ] = new Integer( beginLine ); _aoPackage[ 2 ] = new Integer( beginColumn ); jj_consume_token(SEMICOLON); _aoPackage[ 3 ] = new Integer( getToken( 0 ).endLine ); _aoPackage[ 4 ] = new Integer( getToken( 0 ).endColumn ); _ncss++; Util.debug( "_ncss++" ); _sPackage = _sName + "."; } final public void ImportDeclaration() throws ParseException { int beginLine = 1; int beginColumn = 1; Object[] aoImport = null; jj_consume_token(IMPORT); Token pToken = getToken( 0 ); beginLine = pToken.beginLine ; beginColumn = pToken.beginColumn; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); break; default: jj_la1[12] = jj_gen; ; } Name(); aoImport = new Object[ 5 ]; aoImport[ 0 ] = _sName; aoImport[ 1 ] = new Integer( beginLine ); aoImport[ 2 ] = new Integer( beginColumn ); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: jj_consume_token(DOT); jj_consume_token(STAR); aoImport[ 0 ] = aoImport[ 0 ].toString() + ".*"; break; default: jj_la1[13] = jj_gen; ; } jj_consume_token(SEMICOLON); aoImport[ 3 ] = new Integer( getToken( 0 ).endLine ); aoImport[ 4 ] = new Integer( getToken( 0 ).endColumn ); _vImports.add( aoImport ); _ncss++; Util.debug( "_ncss++" ); } final public void TypeDeclaration() throws ParseException { int modifiers; if (jj_2_2(2147483647)) { ClassDeclaration(); } else if (jj_2_3(2147483647)) { modifiers = Modifiers(); EnumDeclaration(modifiers); } else if (jj_2_4(2147483647)) { InterfaceDeclaration(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case AT: modifiers = Modifiers(); AnnotationTypeDeclaration(modifiers); break; case SEMICOLON: jj_consume_token(SEMICOLON); break; default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } /* * Declaration syntax follows. */ final public void ClassDeclaration() throws ParseException { Token tmpToken = null; _javadocs = 0; ObjectMetric metric = null; // added by SMS int oldSingle = 0; int oldMulti = 0; _jvdcLines = 0; boolean bTemp = _bPublic; _bPublic = false; // //Added by REYNAUD Sebastien (LOGICA) Token myToken = null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: myToken = getToken(1); Annotation(); tmpToken = myToken; break; default: jj_la1[15] = jj_gen; ; } label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[16] = jj_gen; break label_9; } Annotation(); } label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case PUBLIC: case TESTAAAA: case SYNCHRONIZED: ; break; default: jj_la1[17] = jj_gen; break label_10; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: jj_consume_token(ABSTRACT); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case FINAL: jj_consume_token(FINAL); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case PUBLIC: jj_consume_token(PUBLIC); _bPublic = true; // added by SMS if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case TESTAAAA: jj_consume_token(TESTAAAA); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; default: jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } if ( tmpToken == null ) { tmpToken = getToken( 1 ); } while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; Util.debug( "ClassDeclaration()._javadocs++" ); if (_bPublic || _bPrivate) { Util.debug( "_jvdc++" ); _jvdc++; _jvdcLines += JavaParserTokenManager._iMultiCommentsLast; JavaParserTokenManager._iFormalComments += JavaParserTokenManager._iMultiCommentsLast; } JavaParserTokenManager._iMultiComments -= JavaParserTokenManager._iMultiCommentsLast; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } oldSingle = JavaParserTokenManager._iSingleComments; oldMulti = JavaParserTokenManager._iMultiComments; UnmodifiedClassDeclaration(); /* removed by SMS while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; } tmpToken = tmpToken.specialToken; } */ metric = (ObjectMetric)_vClasses.get( _vClasses.size() - 1); metric.javadocs = _javadocs; // added by SMS metric.javadocsLn = _jvdcLines; metric.singleLn = JavaParserTokenManager._iSingleComments - oldSingle; metric.multiLn = JavaParserTokenManager._iMultiComments - oldMulti; // // added by SMS _bPublic = bTemp; } final public void UnmodifiedClassDeclaration() throws ParseException { String sOldClass = _sClass; int oldNcss = _ncss; int oldFunctions = _functions; int oldClasses = _classes; //Added by REYNAUD Sebastien (LOGICA) int oldJavadocs = _javadocs; if (!_sClass.equals("")) { _sClass += "."; } _sClass += getToken(2).image; _classLevel ++; Modifiers(); jj_consume_token(CLASS); Identifier(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: jj_la1[19] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: jj_consume_token(EXTENDS); Name(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: jj_la1[20] = jj_gen; ; } label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: ; break; default: jj_la1[21] = jj_gen; break label_11; } jj_consume_token(DOT); Name(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: jj_la1[22] = jj_gen; ; } } break; default: jj_la1[23] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPLEMENTS: jj_consume_token(IMPLEMENTS); NameList(); break; default: jj_la1[24] = jj_gen; ; } ClassBody(); _ncss++; Util.debug( "_ncss++" ); _classLevel--; if (_classLevel == 0) { //_topLevelClasses++; ObjectMetric metric = new ObjectMetric(); metric.name = _sPackage + _sClass; metric.ncss = _ncss - oldNcss; metric.functions = _functions - oldFunctions; metric.classes = _classes - oldClasses; Token lastToken = getToken( 0 ); //metric.add( new Integer( lastToken.endLine ) ); //metric.add( new Integer( lastToken.endColumn ) ); //metric.add( new Integer( _javadocs ) ); _vClasses.add( metric ); _pPackageMetric.functions += _functions - oldFunctions; _pPackageMetric.classes++; // added by SMS _pPackageMetric.javadocs += _javadocs; //_pPackageMetric.javadocsLn += JavaParserTokenManager._iFormalComments - oldFormal; //_pPackageMetric.singleLn += JavaParserTokenManager._iSingleComments - oldSingle; //_pPackageMetric.multiLn += JavaParserTokenManager._iMultiComments - oldMulti; // } //Added by REYNAUD Sebastien (LOGICA) else { ObjectMetric metric1 = new ObjectMetric(); metric1.name = _sPackage + _sClass ; metric1.ncss = _ncss - oldNcss; metric1.functions = _functions - oldFunctions; metric1.classes = _classes - oldClasses; Token lastToken = getToken( 0 ); _vClasses.add( metric1 ); _pPackageMetric.functions += _functions - oldFunctions; _pPackageMetric.classes++; metric1.javadocs = _javadocs - oldJavadocs; } // _functions = oldFunctions; _classes = oldClasses + 1; _sClass = sOldClass; } final public void ClassBody() throws ParseException { jj_consume_token(LBRACE); label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case LBRACE: case SEMICOLON: case AT: case LT: ; break; default: jj_la1[25] = jj_gen; break label_12; } ClassBodyDeclaration(); } jj_consume_token(RBRACE); } final public void NestedClassDeclaration() throws ParseException { // added by SMS Token tmpToken = null; boolean bTemp = _bPublic; _bPublic = false; boolean bPublic = false; //Added by REYNAUD Sebastien (LOGICA) Token myToken = null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: myToken = getToken(1); Annotation(); tmpToken = myToken; break; default: jj_la1[26] = jj_gen; ; } label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[27] = jj_gen; break label_13; } Annotation(); } if(tmpToken==null) { tmpToken = getToken( 1 ); } label_14: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: ; break; default: jj_la1[28] = jj_gen; break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); break; case ABSTRACT: jj_consume_token(ABSTRACT); break; case FINAL: jj_consume_token(FINAL); break; case PUBLIC: jj_consume_token(PUBLIC); bPublic = true; break; case PROTECTED: jj_consume_token(PROTECTED); bPublic = true; break; case PRIVATE: jj_consume_token(PRIVATE); break; case TESTAAAA: jj_consume_token(TESTAAAA); break; default: jj_la1[29] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } //tmpToken = getToken( 0 );//Removed by REYNAUD Sebastien (LOGICA) while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; Util.debug( "NestedClassDeclaration()._javadocs++" ); if ((_bPublic && bPublic) || _bPrivate) { Util.debug( "_jvdc++" ); _jvdc++; _jvdcLines += JavaParserTokenManager._iMultiCommentsLast; JavaParserTokenManager._iFormalComments += JavaParserTokenManager._iMultiCommentsLast; } JavaParserTokenManager._iMultiComments -= JavaParserTokenManager._iMultiCommentsLast; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } UnmodifiedClassDeclaration(); //added by SMS _bPublic = bTemp; } final public void ClassBodyDeclaration() throws ParseException { int modifiers; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SEMICOLON: EmptyStatement(); break; default: jj_la1[31] = jj_gen; if (jj_2_5(2)) { Initializer(); } else if (jj_2_6(2147483647)) { modifiers = Modifiers(); AnnotationTypeDeclaration(modifiers); } else if (jj_2_7(2147483647)) { CreationAnnotation(); } else if (jj_2_8(2147483647)) { NestedClassDeclaration(); } else if (jj_2_9(2147483647)) { //LOOKAHEAD( ( "static" | "abstract" | "final" | "public" | "protected" | "private" | "strictfp" )* "interface" ) modifiers = Modifiers(); NestedInterfaceDeclaration(); } else if (jj_2_10(2147483647)) { modifiers = Modifiers(); EnumDeclaration(modifiers); } else if (jj_2_11(2147483647)) { ConstructorDeclaration(); } else if (jj_2_12(2147483647)) { MethodDeclaration(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FINAL: case FLOAT: case INT: case LONG: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: label_15: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[30] = jj_gen; break label_15; } Annotation(); } FieldDeclaration(); break; default: jj_la1[32] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } } // This production is to determine lookahead only. final public void MethodDeclarationLookahead() throws ParseException { label_16: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[33] = jj_gen; break label_16; } Annotation(); } label_17: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case SYNCHRONIZED: ; break; default: jj_la1[34] = jj_gen; break label_17; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); break; case PROTECTED: jj_consume_token(PROTECTED); break; case PRIVATE: jj_consume_token(PRIVATE); break; case STATIC: jj_consume_token(STATIC); break; case ABSTRACT: jj_consume_token(ABSTRACT); break; case FINAL: jj_consume_token(FINAL); break; case NATIVE: jj_consume_token(NATIVE); break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); break; case TESTAAAA: jj_consume_token(TESTAAAA); break; default: jj_la1[35] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } label_18: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[36] = jj_gen; break label_18; } Annotation(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: jj_la1[37] = jj_gen; ; } ResultType(); Identifier(); jj_consume_token(LPAREN); } final public void InterfaceDeclaration() throws ParseException { Token tmpToken = null; _javadocs = 0; //boolean bClassComment = false; ObjectMetric metric = null; // added by SMS int oldSingle; int oldMulti; _jvdcLines = 0; boolean bTemp = _bPublic; _bPublic = false; // //Added by REYNAUD Sebastien (LOGICA) Token myToken=null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: myToken = getToken(1); Annotation(); tmpToken = myToken; break; default: jj_la1[38] = jj_gen; ; } label_19: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[39] = jj_gen; break label_19; } Annotation(); } label_20: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case PUBLIC: case TESTAAAA: ; break; default: jj_la1[40] = jj_gen; break label_20; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TESTAAAA: jj_consume_token(TESTAAAA); break; case ABSTRACT: jj_consume_token(ABSTRACT); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case PUBLIC: jj_consume_token(PUBLIC); _bPublic = true; // added by SMS if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; default: jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } if ( tmpToken == null ) { tmpToken = getToken( 1 ); } while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; Util.debug( "InterfaceDeclaration()._javadocs++" ); if (_bPublic || _bPrivate) { Util.debug( "_jvdc++" ); _jvdc++; _jvdcLines += JavaParserTokenManager._iMultiCommentsLast; JavaParserTokenManager._iFormalComments += JavaParserTokenManager._iMultiCommentsLast; } JavaParserTokenManager._iMultiComments -= JavaParserTokenManager._iMultiCommentsLast; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } oldSingle = JavaParserTokenManager._iSingleComments; oldMulti = JavaParserTokenManager._iMultiComments; UnmodifiedInterfaceDeclaration(); /* removed by SMS while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; bClassComment = true; } tmpToken = tmpToken.specialToken; }*/ metric = (ObjectMetric)_vClasses.get( _vClasses.size() - 1 ); metric.javadocs = _javadocs; // added by SMS metric.javadocsLn = _jvdcLines; metric.singleLn = JavaParserTokenManager._iSingleComments - oldSingle; metric.multiLn = JavaParserTokenManager._iMultiComments - oldMulti; // // added by SMS _bPublic = bTemp; } final public void NestedInterfaceDeclaration() throws ParseException { // added by SMS Token tmpToken = null; boolean bTemp = _bPublic; _bPublic = false; boolean bPublic = false; //Added by REYNAUD Sebastien (LOGICA) Token myToken=null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: myToken = getToken(1); Annotation(); tmpToken = myToken; break; default: jj_la1[42] = jj_gen; ; } label_21: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[43] = jj_gen; break label_21; } Annotation(); } if(tmpToken==null) { tmpToken = getToken( 1 ); } label_22: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: ; break; default: jj_la1[44] = jj_gen; break label_22; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); break; case ABSTRACT: jj_consume_token(ABSTRACT); break; case FINAL: jj_consume_token(FINAL); break; case PUBLIC: jj_consume_token(PUBLIC); bPublic = true; break; case PROTECTED: jj_consume_token(PROTECTED); bPublic = true; break; case PRIVATE: jj_consume_token(PRIVATE); break; case TESTAAAA: jj_consume_token(TESTAAAA); break; default: jj_la1[45] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } //tmpToken = getToken( 0 ); //Removed by REYNAUD Sebastien (LOGICA) while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; if ((_bPublic && bPublic) || _bPrivate) { Util.debug( "_jvdc++" ); _jvdc++; _jvdcLines += JavaParserTokenManager._iMultiCommentsLast; JavaParserTokenManager._iFormalComments += JavaParserTokenManager._iMultiCommentsLast; } JavaParserTokenManager._iMultiComments -= JavaParserTokenManager._iMultiCommentsLast; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } UnmodifiedInterfaceDeclaration(); // added by SMS _bPublic = bTemp; } final public void UnmodifiedInterfaceDeclaration() throws ParseException { String sOldClass = _sClass; int oldNcss = _ncss; int oldFunctions = _functions; int oldClasses = _classes; //Added by REYNAUD Sebastien (LOGICA) int oldJavadocs = _javadocs; if (!_sClass.equals("")) { _sClass += "."; } _sClass += getToken(2).image; _classLevel ++; jj_consume_token(INTERFACE); Identifier(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: jj_la1[46] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: jj_consume_token(EXTENDS); NameList(); break; default: jj_la1[47] = jj_gen; ; } jj_consume_token(LBRACE); label_23: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case SEMICOLON: case AT: case LT: ; break; default: jj_la1[48] = jj_gen; break label_23; } InterfaceMemberDeclaration(); } jj_consume_token(RBRACE); _ncss++; Util.debug( "_ncss++" ); _classLevel--; if (_classLevel == 0) { //_topLevelClasses++; ObjectMetric metric = new ObjectMetric(); metric.name = _sPackage + _sClass; metric.ncss = _ncss - oldNcss; metric.functions = _functions - oldFunctions; metric.classes = _classes - oldClasses; //metric.add( Util.getConstantObject() ); //metric.add( Util.getConstantObject() ); _vClasses.add( metric ); _pPackageMetric.functions += _functions - oldFunctions; _pPackageMetric.classes++; // added by SMS _pPackageMetric.javadocs += _javadocs; //_pPackageMetric.javadocsLn += JavaParserTokenManager._iFormalComments - oldFormal; //_pPackageMetric.singleLn += JavaParserTokenManager._iSingleComments - oldSingle; //_pPackageMetric.multiLn += JavaParserTokenManager._iMultiComments - oldMulti; // } //Added by REYNAUD Sebastien (LOGICA) else { ObjectMetric metric1 = new ObjectMetric(); metric1.name = _sPackage + _sClass; metric1.ncss = _ncss - oldNcss; metric1.functions = _functions - oldFunctions; metric1.classes = _classes - oldClasses; Token lastToken = getToken( 0 ); _vClasses.add( metric1 ); _pPackageMetric.functions += _functions - oldFunctions; _pPackageMetric.classes++; //_pPackageMetric.javadocs += _javadocs; metric1.javadocs = _javadocs - oldJavadocs; } // _functions = oldFunctions; _classes = oldClasses + 1; _sClass = sOldClass; } final public void InterfaceMemberDeclaration() throws ParseException { int modifiers; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SEMICOLON: EmptyStatement(); break; default: jj_la1[49] = jj_gen; if (jj_2_13(2147483647)) { NestedClassDeclaration(); } else if (jj_2_14(2147483647)) { NestedInterfaceDeclaration(); } else if (jj_2_15(2147483647)) { modifiers = Modifiers(); EnumDeclaration(modifiers); } else if (jj_2_16(2147483647)) { MethodDeclaration(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: modifiers = Modifiers(); FieldDeclaration(); break; default: jj_la1[50] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } } final public void FieldDeclaration() throws ParseException { // added by SMS Token tmpToken = null; boolean bPublic = false; label_24: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FINAL: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TRANSIENT: case VOLATILE: ; break; default: jj_la1[51] = jj_gen; break label_24; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); bPublic = true; break; case PROTECTED: jj_consume_token(PROTECTED); bPublic = true; break; case PRIVATE: jj_consume_token(PRIVATE); break; case STATIC: jj_consume_token(STATIC); break; case FINAL: jj_consume_token(FINAL); break; case TRANSIENT: jj_consume_token(TRANSIENT); break; case VOLATILE: jj_consume_token(VOLATILE); break; default: jj_la1[52] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } tmpToken = getToken( 0 ); while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { if ((bPublic && _bPublic) || _bPrivate) { //_javadocs++; Util.debug( "_jvdc++" ); _jvdc++; _jvdcLines += JavaParserTokenManager._iMultiCommentsLast; JavaParserTokenManager._iFormalComments += JavaParserTokenManager._iMultiCommentsLast; } JavaParserTokenManager._iMultiComments -= JavaParserTokenManager._iMultiCommentsLast; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } label_25: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[53] = jj_gen; break label_25; } Annotation(); } Type(); VariableDeclarator(); label_26: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[54] = jj_gen; break label_26; } jj_consume_token(COMMA); VariableDeclarator(); } jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } final public void VariableDeclarator() throws ParseException { VariableDeclaratorId(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: jj_consume_token(ASSIGN); VariableInitializer(); break; default: jj_la1[55] = jj_gen; ; } } final public void VariableDeclaratorId() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ENUM: jj_consume_token(ENUM); break; case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[56] = jj_gen; jj_consume_token(-1); throw new ParseException(); } label_27: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[57] = jj_gen; break label_27; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); _sName += "[]"; } } final public void VariableInitializer() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: ArrayInitializer(); break; case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: Expression(); break; default: jj_la1[58] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void ArrayInitializer() throws ParseException { jj_consume_token(LBRACE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: VariableInitializer(); label_28: while (true) { if (jj_2_17(2)) { ; } else { break label_28; } jj_consume_token(COMMA); VariableInitializer(); } break; default: jj_la1[59] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); break; default: jj_la1[60] = jj_gen; ; } jj_consume_token(RBRACE); } final public void MethodDeclaration() throws ParseException { int oldNcss = _ncss; int oldFunctions = _functions; String sOldFunction = _sFunction; int oldcyc = _cyc; boolean bOldReturn = _bReturn; Token tmpToken = null; int jvdc = 0; // added by SMS int jvdcLines = 0; int oldSingle; int oldMulti; boolean bPublic = false; // //Added by REYNAUD Sebastien (LOGICA) Token myToken = null; _tmpToken=null; if ( _tmpToken != null ) { tmpToken = _tmpToken; } label_29: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[61] = jj_gen; break label_29; } myToken = getToken(1); Annotation(); if ( tmpToken == null ) { //tmpToken = getToken( 0 ); //Removed by REYNAUD Sebastien (LOGICA) //Added by REYNAUD Sebastien (LOGICA) tmpToken = myToken; // } } label_30: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case SYNCHRONIZED: ; break; default: jj_la1[62] = jj_gen; break label_30; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); bPublic = true; if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case PROTECTED: jj_consume_token(PROTECTED); bPublic = true; if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case PRIVATE: jj_consume_token(PRIVATE); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case STATIC: jj_consume_token(STATIC); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case ABSTRACT: jj_consume_token(ABSTRACT); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case FINAL: jj_consume_token(FINAL); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case NATIVE: jj_consume_token(NATIVE); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case TESTAAAA: jj_consume_token(TESTAAAA); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; default: jj_la1[63] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } label_31: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[64] = jj_gen; break label_31; } Annotation(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: jj_la1[65] = jj_gen; ; } _tmpResultToken = null; ResultType(); if ( tmpToken == null ) { tmpToken = _tmpResultToken; if ( tmpToken == null ) { tmpToken = getToken( 0 ); } Util.debug( "result type tmpToken: " + tmpToken ); } MethodDeclarator(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THROWS: jj_consume_token(THROWS); NameList(); break; default: jj_la1[66] = jj_gen; ; } _cyc = 1; _bReturn = false; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: Block(); break; case SEMICOLON: jj_consume_token(SEMICOLON); break; default: jj_la1[67] = jj_gen; jj_consume_token(-1); throw new ParseException(); } // added by SMS { Util.debug( "Token: " + String.valueOf( tmpToken.image ) ); while( tmpToken.specialToken != null ) { Util.debug( "Token comment: " + String.valueOf( tmpToken.specialToken.image ) ); if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; Util.debug( "MethodDeclaration()._javadocs++" ); jvdc++; if ((bPublic && _bPublic) || _bPrivate) { Util.debug( "_jvdc++" ); _jvdc++; jvdcLines = JavaParserTokenManager._iMultiCommentsLast; _jvdcLines += jvdcLines; JavaParserTokenManager._iFormalComments += jvdcLines; } JavaParserTokenManager._iMultiComments -= jvdcLines; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { jvdcLines = 0; break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } oldSingle = JavaParserTokenManager._iSingleComments; oldMulti = JavaParserTokenManager._iMultiComments; } // removed by ccl /* while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { jvdc++; _javadocs++; } tmpToken = tmpToken.specialToken; } */ // removed by SMS /* while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { jvdc++; _javadocs++; _bJavadoc = true; } tmpToken = tmpToken.specialToken; } */ if (_bReturn) { _cyc--; } _ncss++; Util.debug( "MethodDeclaration()._ncss++" ); FunctionMetric functionMetrics = new FunctionMetric(); functionMetrics.name = _sPackage + _sClass + _sFunction; functionMetrics.ncss = _ncss - oldNcss; functionMetrics.ccn = _cyc; functionMetrics.javadocs = jvdc; // added by SMS functionMetrics.javadocsLn = 0; //jvdcLines; functionMetrics.singleLn = 0; //JavaParserTokenManager._iSingleComments - oldSingle; functionMetrics.multiLn = 0; //JavaParserTokenManager._iMultiComments - oldMulti; // // specially added for Cobertura // Commenting out for now until the rest of patch 2353196 is applied. //functionMetrics.beginLine = (new Integer(beginLine)); //functionMetrics.endLine = (new Integer(endLine)); _vFunctions.add(functionMetrics); _sFunction = sOldFunction; _functions = oldFunctions + 1; _cyc = oldcyc; _bReturn = bOldReturn; //Added by REYNAUD Sebastien (LOGICA) _tmpToken = null; // } final public void MethodDeclarator() throws ParseException { _sFunction = "." + getToken(1).image; Identifier(); FormalParameters(); _sFunction += _sParameter; label_32: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[68] = jj_gen; break label_32; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); _sFunction += "[]"; } } final public void FormalParameters() throws ParseException { _sParameter = "("; jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: FormalParameter(); _sParameter += _sName; label_33: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[69] = jj_gen; break label_33; } jj_consume_token(COMMA); FormalParameter(); _sParameter += "," + _sName; } break; default: jj_la1[70] = jj_gen; ; } jj_consume_token(RPAREN); _sParameter += ")"; } final public void FormalParameter() throws ParseException { Modifiers(); Type(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ELLIPSIS: jj_consume_token(ELLIPSIS); break; default: jj_la1[71] = jj_gen; ; } VariableDeclaratorId(); } final public void ConstructorDeclaration() throws ParseException { int oldNcss = _ncss; int oldFunctions = _functions; String sOldFunction = _sFunction; int oldcyc = _cyc; boolean bOldReturn = _bReturn; Token tmpToken = null; int jvdc = 0; // added by SMS int oldSingle; int oldMulti; int jvdcLines = 0; boolean bPublic = false; // //Added by REYNAUD Sebastien (LOGICA) Token myToken = null; label_34: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: ; break; default: jj_la1[72] = jj_gen; break label_34; } myToken = getToken(1); Annotation(); if ( tmpToken == null ) { tmpToken = myToken; } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PRIVATE: case PROTECTED: case PUBLIC: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); bPublic = true; if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case PROTECTED: jj_consume_token(PROTECTED); bPublic = true; if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; case PRIVATE: jj_consume_token(PRIVATE); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } break; default: jj_la1[73] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[74] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: jj_la1[75] = jj_gen; ; } Identifier(); if ( tmpToken == null ) { tmpToken = getToken( 0 ); } _cyc = 1; _sFunction = _sPackage + _sClass + "." + getToken(0).image; FormalParameters(); _sFunction += _sParameter; _bReturn = false; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THROWS: jj_consume_token(THROWS); NameList(); break; default: jj_la1[76] = jj_gen; ; } jj_consume_token(LBRACE); if (jj_2_18(2147483647)) { ExplicitConstructorInvocation(); } else { ; } if (jj_2_19(2147483647)) { ExplicitConstructorInvocation(); } else { ; } while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { _javadocs++; jvdc++; if ((bPublic && _bPublic) || _bPrivate) { Util.debug( "_jvdc++" ); _jvdc++; jvdcLines = JavaParserTokenManager._iMultiCommentsLast; _jvdcLines += jvdcLines; JavaParserTokenManager._iFormalComments += jvdcLines; } JavaParserTokenManager._iMultiComments -= jvdcLines; break; } else if ( tmpToken.specialToken.image.startsWith( "/*" ) ) { jvdcLines = 0; break; } //System.out.println("\n"+tmpToken.specialToken.image); tmpToken = tmpToken.specialToken; } oldSingle = JavaParserTokenManager._iSingleComments; oldMulti = JavaParserTokenManager._iMultiComments; label_35: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CLASS: case CONTINUE: case DO: case DOUBLE: case ENUM: case FALSE: case FINAL: case FLOAT: case FOR: case IF: case INT: case INTERFACE: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case RETURN: case SHORT: case STATIC: case TESTAAAA: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRANSIENT: case TRUE: case TRY: case VOID: case VOLATILE: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case AT: case INCR: case DECR: ; break; default: jj_la1[77] = jj_gen; break label_35; } BlockStatement(); } jj_consume_token(RBRACE); /* while( tmpToken.specialToken != null ) { if ( tmpToken.specialToken.image.startsWith( "/**" ) ) { jvdc++; _javadocs++; } tmpToken = tmpToken.specialToken; } */ if (_bReturn) { _cyc--; } _ncss++; Util.debug( "_ncss++" ); FunctionMetric functionMetrics = new FunctionMetric(); functionMetrics.name = _sFunction; functionMetrics.ncss = _ncss - oldNcss; functionMetrics.ccn = _cyc; functionMetrics.javadocs = jvdc; // added by SMS functionMetrics.javadocsLn = jvdcLines; functionMetrics.singleLn = JavaParserTokenManager._iSingleComments - oldSingle; functionMetrics.multiLn = JavaParserTokenManager._iMultiComments - oldMulti; // // specially added for Cobertura // Commenting out for now until the rest of patch 2353196 is applied. //functionMetrics.endLine = beginLine; //functionMetrics.endLine = endLine; _vFunctions.add(functionMetrics); _sFunction = sOldFunction; _functions = oldFunctions + 1; _cyc = oldcyc; _bReturn = bOldReturn; //Added by REYNAUD Sebastien (LOGICA) _tmpToken = null; // } final public void ExplicitConstructorInvocation() throws ParseException { if (jj_2_21(2147483647)) { jj_consume_token(THIS); Arguments(); jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: if (jj_2_20(2147483647)) { PrimaryExpression(); jj_consume_token(DOT); } else { ; } jj_consume_token(SUPER); Arguments(); jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); //System.out.println( "\n\nAfter ExplicitConstructorInvocation\n" ); break; default: jj_la1[78] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } final public void Initializer() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); break; default: jj_la1[79] = jj_gen; ; } Block(); _ncss++; Util.debug( "_ncss++" ); } /* * Type, name and expression syntax follows. */ final public void Type() throws ParseException { if (jj_2_22(2)) { ReferenceType(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: PrimitiveType(); _sName = getToken(0).image; break; default: jj_la1[80] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } /* ccl 2008-01-24 { ( PrimitiveType() { _sName = getToken(0).image; } | Name() [TypeArguments() ["." Identifier()] ] ) ( "[" "]" { _sName += "[]"; } )* } */ /* * Takes special consideration for assert. */ final public void FieldTypeLookahead() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: PrimitiveType(); break; case IDENTIFIER: FieldTypeNameLookahead(); break; default: jj_la1[81] = jj_gen; jj_consume_token(-1); throw new ParseException(); } label_36: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[82] = jj_gen; break label_36; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } } final public void PrimitiveType() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: jj_consume_token(BOOLEAN); break; case CHAR: jj_consume_token(CHAR); break; case BYTE: jj_consume_token(BYTE); break; case SHORT: jj_consume_token(SHORT); break; case INT: jj_consume_token(INT); break; case LONG: jj_consume_token(LONG); break; case FLOAT: jj_consume_token(FLOAT); break; case DOUBLE: jj_consume_token(DOUBLE); break; default: jj_la1[83] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void ResultType() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VOID: jj_consume_token(VOID); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: Type(); break; default: jj_la1[84] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void Name() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ENUM: jj_consume_token(ENUM); break; case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } _sName = getToken(0).image; _tmpResultToken = getToken( 0 ); Util.debug( "Name._tmpResultToken: " + _tmpResultToken ); label_37: while (true) { if (jj_2_23(2)) { ; } else { break label_37; } jj_consume_token(DOT); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ENUM: jj_consume_token(ENUM); break; case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } _sName += "." + getToken(0).image; } } /** * Takes special consideration for assert. */ final public void FieldTypeNameLookahead() throws ParseException { jj_consume_token(IDENTIFIER); label_38: while (true) { if (jj_2_24(2)) { ; } else { break label_38; } jj_consume_token(DOT); Identifier(); } } final public void NameList() throws ParseException { Name(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: jj_la1[87] = jj_gen; ; } label_39: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[88] = jj_gen; break label_39; } jj_consume_token(COMMA); Name(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: jj_la1[89] = jj_gen; ; } } } /* * Expression syntax follows. */ final public void Expression() throws ParseException { if (jj_2_25(2147483647)) { Assignment(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: ConditionalExpression(); break; default: jj_la1[90] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } final public void Assignment() throws ParseException { PrimaryExpression(); AssignmentOperator(); Expression(); } final public void AssignmentOperator() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: jj_consume_token(ASSIGN); break; case STARASSIGN: jj_consume_token(STARASSIGN); break; case SLASHASSIGN: jj_consume_token(SLASHASSIGN); break; case REMASSIGN: jj_consume_token(REMASSIGN); break; case PLUSASSIGN: jj_consume_token(PLUSASSIGN); break; case MINUSASSIGN: jj_consume_token(MINUSASSIGN); break; case LSHIFTASSIGN: jj_consume_token(LSHIFTASSIGN); break; case RSIGNEDSHIFTASSIGN: jj_consume_token(RSIGNEDSHIFTASSIGN); break; case RUNSIGNEDSHIFTASSIGN: jj_consume_token(RUNSIGNEDSHIFTASSIGN); break; case ANDASSIGN: jj_consume_token(ANDASSIGN); break; case XORASSIGN: jj_consume_token(XORASSIGN); break; case ORASSIGN: jj_consume_token(ORASSIGN); break; default: jj_la1[91] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void ConditionalExpression() throws ParseException { ConditionalOrExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case HOOK: jj_consume_token(HOOK); Expression(); jj_consume_token(COLON); ConditionalExpression(); _cyc++; break; default: jj_la1[92] = jj_gen; ; } } final public void ConditionalOrExpression() throws ParseException { ConditionalAndExpression(); label_40: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SC_OR: ; break; default: jj_la1[93] = jj_gen; break label_40; } jj_consume_token(SC_OR); _cyc++; ConditionalAndExpression(); } } final public void ConditionalAndExpression() throws ParseException { InclusiveOrExpression(); label_41: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SC_AND: ; break; default: jj_la1[94] = jj_gen; break label_41; } jj_consume_token(SC_AND); _cyc++; InclusiveOrExpression(); } } final public void InclusiveOrExpression() throws ParseException { ExclusiveOrExpression(); label_42: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_OR: ; break; default: jj_la1[95] = jj_gen; break label_42; } jj_consume_token(BIT_OR); ExclusiveOrExpression(); } } final public void ExclusiveOrExpression() throws ParseException { AndExpression(); label_43: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case XOR: ; break; default: jj_la1[96] = jj_gen; break label_43; } jj_consume_token(XOR); AndExpression(); } } final public void AndExpression() throws ParseException { EqualityExpression(); label_44: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_AND: ; break; default: jj_la1[97] = jj_gen; break label_44; } jj_consume_token(BIT_AND); EqualityExpression(); } } final public void EqualityExpression() throws ParseException { InstanceOfExpression(); label_45: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ: case NE: ; break; default: jj_la1[98] = jj_gen; break label_45; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ: jj_consume_token(EQ); break; case NE: jj_consume_token(NE); break; default: jj_la1[99] = jj_gen; jj_consume_token(-1); throw new ParseException(); } InstanceOfExpression(); } } final public void InstanceOfExpression() throws ParseException { RelationalExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INSTANCEOF: jj_consume_token(INSTANCEOF); Type(); break; default: jj_la1[100] = jj_gen; ; } } final public void RelationalExpression() throws ParseException { ShiftExpression(); label_46: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case GT: case LT: case LE: case GE: ; break; default: jj_la1[101] = jj_gen; break label_46; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: jj_consume_token(LT); break; case GT: jj_consume_token(GT); break; case LE: jj_consume_token(LE); break; case GE: jj_consume_token(GE); break; default: jj_la1[102] = jj_gen; jj_consume_token(-1); throw new ParseException(); } ShiftExpression(); } } final public void ShiftExpression() throws ParseException { AdditiveExpression(); label_47: while (true) { if (jj_2_26(3)) { ; } else { break label_47; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LSHIFT: jj_consume_token(LSHIFT); break; case GT: jj_consume_token(GT); jj_consume_token(GT); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case GT: jj_consume_token(GT); break; default: jj_la1[103] = jj_gen; ; } break; default: jj_la1[104] = jj_gen; jj_consume_token(-1); throw new ParseException(); } AdditiveExpression(); } } final public void AdditiveExpression() throws ParseException { MultiplicativeExpression(); label_48: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: ; break; default: jj_la1[105] = jj_gen; break label_48; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: jj_consume_token(PLUS); break; case MINUS: jj_consume_token(MINUS); break; default: jj_la1[106] = jj_gen; jj_consume_token(-1); throw new ParseException(); } MultiplicativeExpression(); } } final public void MultiplicativeExpression() throws ParseException { UnaryExpression(); label_49: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: case SLASH: case REM: ; break; default: jj_la1[107] = jj_gen; break label_49; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: jj_consume_token(STAR); break; case SLASH: jj_consume_token(SLASH); break; case REM: jj_consume_token(REM); break; default: jj_la1[108] = jj_gen; jj_consume_token(-1); throw new ParseException(); } UnaryExpression(); } } final public void UnaryExpression() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: jj_consume_token(PLUS); break; case MINUS: jj_consume_token(MINUS); break; default: jj_la1[109] = jj_gen; jj_consume_token(-1); throw new ParseException(); } UnaryExpression(); break; case INCR: PreIncrementExpression(); break; case DECR: PreDecrementExpression(); break; case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: UnaryExpressionNotPlusMinus(); break; default: jj_la1[110] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void PreIncrementExpression() throws ParseException { jj_consume_token(INCR); PrimaryExpression(); } final public void PreDecrementExpression() throws ParseException { jj_consume_token(DECR); PrimaryExpression(); } final public void UnaryExpressionNotPlusMinus() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BANG: case TILDE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TILDE: jj_consume_token(TILDE); break; case BANG: jj_consume_token(BANG); break; default: jj_la1[111] = jj_gen; jj_consume_token(-1); throw new ParseException(); } UnaryExpression(); break; default: jj_la1[112] = jj_gen; if (jj_2_27(2147483647)) { CastExpression(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: PostfixExpression(); break; default: jj_la1[113] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } } // This production is to determine lookahead only. The LOOKAHEAD specifications // below are not used, but they are there just to indicate that we know about // this. final public void CastLookahead() throws ParseException { if (jj_2_28(2)) { jj_consume_token(LPAREN); PrimitiveType(); } else if (jj_2_29(2147483647)) { jj_consume_token(LPAREN); Type(); jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: jj_consume_token(LPAREN); Type(); jj_consume_token(RPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TILDE: jj_consume_token(TILDE); break; case BANG: jj_consume_token(BANG); break; case LPAREN: jj_consume_token(LPAREN); break; case ASSERT: case IDENTIFIER: Identifier(); break; case THIS: jj_consume_token(THIS); break; case SUPER: jj_consume_token(SUPER); break; case NEW: jj_consume_token(NEW); break; case FALSE: case NULL: case TRUE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: Literal(); break; default: jj_la1[114] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[115] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } // To fix bug Test48.java. Clemens [2000-10-03] final public void PostfixLookahead() throws ParseException { jj_consume_token(LPAREN); Name(); label_50: while (true) { if (jj_2_30(2)) { ; } else { break label_50; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } jj_consume_token(DOT); } final public void PostfixExpression() throws ParseException { PrimaryExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: case DECR: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: jj_consume_token(INCR); break; case DECR: jj_consume_token(DECR); break; default: jj_la1[116] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[117] = jj_gen; ; } } final public void CastExpression() throws ParseException { if (jj_2_31(2147483647)) { jj_consume_token(LPAREN); Type(); jj_consume_token(RPAREN); UnaryExpression(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: jj_consume_token(LPAREN); Type(); jj_consume_token(RPAREN); UnaryExpressionNotPlusMinus(); break; default: jj_la1[118] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } final public void PrimaryExpression() throws ParseException { PrimaryPrefix(); label_51: while (true) { if (jj_2_32(2)) { ; } else { break label_51; } PrimarySuffix(); } } final public void PrimaryPrefix() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FALSE: case NULL: case TRUE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: Literal(); break; case THIS: jj_consume_token(THIS); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: jj_consume_token(DOT); break; default: jj_la1[119] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[120] = jj_gen; ; } break; default: jj_la1[123] = jj_gen; if (jj_2_34(2)) { jj_consume_token(SUPER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: jj_consume_token(DOT); break; default: jj_la1[121] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[122] = jj_gen; ; } } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); break; case NEW: AllocationExpression(); break; default: jj_la1[124] = jj_gen; if (jj_2_35(2147483647)) { ResultType(); jj_consume_token(DOT); jj_consume_token(CLASS); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case ENUM: case IDENTIFIER: Name(); if (jj_2_33(3)) { jj_consume_token(DOT); jj_consume_token(SUPER); jj_consume_token(DOT); Identifier(); } else { ; } break; default: jj_la1[125] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } } } } final public void PrimarySuffix() throws ParseException { if (jj_2_36(2)) { jj_consume_token(DOT); jj_consume_token(THIS); } else if (jj_2_37(2)) { jj_consume_token(DOT); AllocationExpression(); } else if (jj_2_38(3)) { MemberSelector(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: jj_consume_token(LBRACKET); Expression(); jj_consume_token(RBRACKET); break; case DOT: jj_consume_token(DOT); Identifier(); break; case LPAREN: Arguments(); break; default: jj_la1[126] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } final public void Literal() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_LITERAL: jj_consume_token(INTEGER_LITERAL); break; case FLOATING_POINT_LITERAL: jj_consume_token(FLOATING_POINT_LITERAL); break; case CHARACTER_LITERAL: jj_consume_token(CHARACTER_LITERAL); break; case STRING_LITERAL: jj_consume_token(STRING_LITERAL); break; case FALSE: case TRUE: BooleanLiteral(); break; case NULL: NullLiteral(); break; default: jj_la1[127] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void BooleanLiteral() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TRUE: jj_consume_token(TRUE); break; case FALSE: jj_consume_token(FALSE); break; default: jj_la1[128] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void NullLiteral() throws ParseException { jj_consume_token(NULL); } final public void Arguments() throws ParseException { jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: ArgumentList(); break; default: jj_la1[129] = jj_gen; ; } jj_consume_token(RPAREN); } final public void ArgumentList() throws ParseException { Expression(); label_52: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[130] = jj_gen; break label_52; } jj_consume_token(COMMA); Expression(); } } final public void AllocationExpression() throws ParseException { String sOldClass = _sClass; //int oldNcss = _ncss; int oldFunctions = _functions; int oldClasses = _classes; String sName; //Added by REYNAUD Sebastien (LOGICA) int oldJavadocs = _javadocs; int oldNcss = _ncss; if (jj_2_39(2)) { jj_consume_token(NEW); PrimitiveType(); ArrayDimsAndInits(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NEW: jj_consume_token(NEW); Name(); sName = _sName; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: jj_la1[131] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ArrayDimsAndInits(); break; case LPAREN: Arguments(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: if (!_sClass.equals("")) { _sClass += "."; } /*_sClass += sName;*/ //_sClass += sName + "$" + _anonClassCount ;//Removed by REYNAUD Sebastien (LOGICA) //Added by REYNAUD Sebastien (LOGICA) _sClass += sName; // _classLevel ++; ClassBody(); //Added by REYNAUD Sebastien (LOGICA) ObjectMetric metric = new ObjectMetric(); metric.name = _sPackage + _sClass; metric.ncss = _ncss - oldNcss; metric.functions = _functions - oldFunctions; metric.classes = _classes - oldClasses; Token lastToken = getToken( 0 ); _vClasses.add( metric ); _pPackageMetric.functions += _functions - oldFunctions; _pPackageMetric.classes++; metric.javadocs = _javadocs - oldJavadocs; // _classLevel--; _functions = oldFunctions; _classes = oldClasses + 1; _sClass = sOldClass; break; default: jj_la1[132] = jj_gen; ; } break; default: jj_la1[133] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[134] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } /* * The third LOOKAHEAD specification below is to parse to PrimarySuffix * if there is an expression between the "[...]". */ final public void ArrayDimsAndInits() throws ParseException { if (jj_2_42(2)) { label_53: while (true) { jj_consume_token(LBRACKET); Expression(); jj_consume_token(RBRACKET); if (jj_2_40(2)) { ; } else { break label_53; } } label_54: while (true) { if (jj_2_41(2)) { ; } else { break label_54; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: label_55: while (true) { jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[135] = jj_gen; break label_55; } } ArrayInitializer(); break; default: jj_la1[136] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } /* * Statement syntax follows. */ final public void Statement() throws ParseException { _bReturn = false; if (jj_2_43(2)) { LabeledStatement(); } else if (jj_2_44(2147483647)) { AssertStatement(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: Block(); break; case SEMICOLON: EmptyStatement(); break; case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case INCR: case DECR: StatementExpression(); jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); break; case SWITCH: SwitchStatement(); break; case IF: IfStatement(); _cyc++; break; case WHILE: WhileStatement(); _cyc++; break; case DO: DoStatement(); _cyc++; break; case FOR: ForStatement(); _cyc++; break; case BREAK: BreakStatement(); break; case CONTINUE: ContinueStatement(); break; case RETURN: ReturnStatement(); break; case THROW: ThrowStatement(); break; case SYNCHRONIZED: SynchronizedStatement(); break; case TRY: TryStatement(); break; default: jj_la1[137] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } final public void LabeledStatement() throws ParseException { Identifier(); jj_consume_token(COLON); Statement(); _ncss++; Util.debug( "_ncss++" ); } final public void AssertStatementLookahead() throws ParseException { jj_consume_token(ASSERT); Expression(); } final public void AssertStatement() throws ParseException { jj_consume_token(ASSERT); Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COLON: jj_consume_token(COLON); Expression(); break; default: jj_la1[138] = jj_gen; ; } jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } final public void Block() throws ParseException { jj_consume_token(LBRACE); label_56: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CLASS: case CONTINUE: case DO: case DOUBLE: case ENUM: case FALSE: case FINAL: case FLOAT: case FOR: case IF: case INT: case INTERFACE: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case RETURN: case SHORT: case STATIC: case TESTAAAA: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRANSIENT: case TRUE: case TRY: case VOID: case VOLATILE: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case AT: case INCR: case DECR: ; break; default: jj_la1[139] = jj_gen; break label_56; } BlockStatement(); } jj_consume_token(RBRACE); } final public void BlockStatement() throws ParseException { if (jj_2_45(2147483647)) { LocalVariableDeclaration(); jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CONTINUE: case DO: case DOUBLE: case ENUM: case FALSE: case FLOAT: case FOR: case IF: case INT: case LONG: case NEW: case NULL: case RETURN: case SHORT: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRUE: case TRY: case VOID: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case INCR: case DECR: Statement(); break; case ABSTRACT: case CLASS: case FINAL: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case TRANSIENT: case VOLATILE: case AT: UnmodifiedClassDeclaration(); break; case INTERFACE: UnmodifiedInterfaceDeclaration(); break; default: jj_la1[140] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } /*void LocalVariableDeclaration() : {} { [ "final" ] Type() VariableDeclarator() ( "," VariableDeclarator() )* }*/ final public void LocalVariableDeclaration() throws ParseException { Modifiers(); Type(); VariableDeclarator(); label_57: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[141] = jj_gen; break label_57; } jj_consume_token(COMMA); VariableDeclarator(); } } final public void EmptyStatement() throws ParseException { jj_consume_token(SEMICOLON); } final public void StatementExpression() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: PreIncrementExpression(); break; case DECR: PreDecrementExpression(); break; case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: PrimaryExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: case INCR: case DECR: case PLUSASSIGN: case MINUSASSIGN: case STARASSIGN: case SLASHASSIGN: case ANDASSIGN: case ORASSIGN: case XORASSIGN: case REMASSIGN: case LSHIFTASSIGN: case RSIGNEDSHIFTASSIGN: case RUNSIGNEDSHIFTASSIGN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: jj_consume_token(INCR); break; case DECR: jj_consume_token(DECR); break; case ASSIGN: case PLUSASSIGN: case MINUSASSIGN: case STARASSIGN: case SLASHASSIGN: case ANDASSIGN: case ORASSIGN: case XORASSIGN: case REMASSIGN: case LSHIFTASSIGN: case RSIGNEDSHIFTASSIGN: case RUNSIGNEDSHIFTASSIGN: AssignmentOperator(); Expression(); break; default: jj_la1[142] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[143] = jj_gen; ; } break; default: jj_la1[144] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void SwitchStatement() throws ParseException { _localCases = 0; jj_consume_token(SWITCH); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); jj_consume_token(LBRACE); label_58: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CASE: case _DEFAULT: ; break; default: jj_la1[145] = jj_gen; break label_58; } SwitchLabel(); label_59: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CLASS: case CONTINUE: case DO: case DOUBLE: case ENUM: case FALSE: case FINAL: case FLOAT: case FOR: case IF: case INT: case INTERFACE: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case RETURN: case SHORT: case STATIC: case TESTAAAA: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRANSIENT: case TRUE: case TRY: case VOID: case VOLATILE: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case AT: case INCR: case DECR: ; break; default: jj_la1[146] = jj_gen; break label_59; } BlockStatement(); } } jj_consume_token(RBRACE); _ncss++; Util.debug( "_ncss++" ); } final public void SwitchLabel() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CASE: jj_consume_token(CASE); Expression(); jj_consume_token(COLON); _ncss++; Util.debug( "_ncss++" ); _localCases++; _cyc++; break; case _DEFAULT: jj_consume_token(_DEFAULT); jj_consume_token(COLON); _ncss++; Util.debug( "_ncss++" ); break; default: jj_la1[147] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void IfStatement() throws ParseException { jj_consume_token(IF); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); Statement(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ELSE: jj_consume_token(ELSE); _ncss++; Util.debug( "_ncss++" ); Statement(); break; default: jj_la1[148] = jj_gen; ; } _ncss++; Util.debug( "_ncss++" ); } final public void WhileStatement() throws ParseException { jj_consume_token(WHILE); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); Statement(); _ncss++; Util.debug( "_ncss++" ); } final public void DoStatement() throws ParseException { jj_consume_token(DO); Statement(); jj_consume_token(WHILE); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } final public void ForStatement() throws ParseException { jj_consume_token(FOR); jj_consume_token(LPAREN); if (jj_2_46(2147483647)) { Modifiers(); Type(); jj_consume_token(IDENTIFIER); jj_consume_token(COLON); Expression(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SUPER: case SYNCHRONIZED: case THIS: case TRANSIENT: case TRUE: case VOID: case VOLATILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case SEMICOLON: case AT: case INCR: case DECR: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SUPER: case SYNCHRONIZED: case THIS: case TRANSIENT: case TRUE: case VOID: case VOLATILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case AT: case INCR: case DECR: ForInit(); break; default: jj_la1[149] = jj_gen; ; } jj_consume_token(SEMICOLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: Expression(); break; default: jj_la1[150] = jj_gen; ; } jj_consume_token(SEMICOLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case INCR: case DECR: ForUpdate(); break; default: jj_la1[151] = jj_gen; ; } break; default: jj_la1[152] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RPAREN); Statement(); _ncss++; Util.debug( "_ncss++" ); } final public void ForInit() throws ParseException { if (jj_2_47(2147483647)) { LocalVariableDeclaration(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case INCR: case DECR: StatementExpressionList(); break; default: jj_la1[153] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } final public void StatementExpressionList() throws ParseException { StatementExpression(); label_60: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[154] = jj_gen; break label_60; } jj_consume_token(COMMA); StatementExpression(); } } final public void ForUpdate() throws ParseException { StatementExpressionList(); } final public void BreakStatement() throws ParseException { jj_consume_token(BREAK); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[155] = jj_gen; ; } jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } final public void ContinueStatement() throws ParseException { jj_consume_token(CONTINUE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case IDENTIFIER: Identifier(); break; default: jj_la1[156] = jj_gen; ; } jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } final public void ReturnStatement() throws ParseException { jj_consume_token(RETURN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: Expression(); break; default: jj_la1[157] = jj_gen; ; } jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); _cyc++; _bReturn = true; } final public void ThrowStatement() throws ParseException { jj_consume_token(THROW); Expression(); jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); _cyc++; } final public void SynchronizedStatement() throws ParseException { jj_consume_token(SYNCHRONIZED); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); Block(); _ncss++; Util.debug( "_ncss++" ); } final public void TryStatement() throws ParseException { jj_consume_token(TRY); Block(); label_61: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CATCH: ; break; default: jj_la1[158] = jj_gen; break label_61; } jj_consume_token(CATCH); jj_consume_token(LPAREN); FormalParameter(); jj_consume_token(RPAREN); Block(); _ncss++; Util.debug( "_ncss++" ); _cyc++; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FINALLY: jj_consume_token(FINALLY); Block(); _ncss++; Util.debug( "_ncss++" ); break; default: jj_la1[159] = jj_gen; ; } } final public void Identifier() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: jj_consume_token(IDENTIFIER); break; case ASSERT: jj_consume_token(ASSERT); break; default: jj_la1[160] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } /* Annotation syntax follows. */ final public void Annotation() throws ParseException { if (jj_2_48(2147483647)) { NormalAnnotation(); } else if (jj_2_49(2147483647)) { SingleMemberAnnotation(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: MarkerAnnotation(); break; default: jj_la1[161] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } final public void NormalAnnotation() throws ParseException { jj_consume_token(AT); Name(); jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: MemberValuePairs(); break; default: jj_la1[162] = jj_gen; ; } jj_consume_token(RPAREN); } final public void MarkerAnnotation() throws ParseException { jj_consume_token(AT); Name(); } final public void SingleMemberAnnotation() throws ParseException { jj_consume_token(AT); Name(); jj_consume_token(LPAREN); MemberValue(); jj_consume_token(RPAREN); } final public void MemberValuePairs() throws ParseException { MemberValuePair(); label_62: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[163] = jj_gen; break label_62; } jj_consume_token(COMMA); MemberValuePair(); } } final public void MemberValuePair() throws ParseException { jj_consume_token(IDENTIFIER); jj_consume_token(ASSIGN); MemberValue(); } final public void MemberValue() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: Annotation(); break; case LBRACE: MemberValueArrayInitializer(); break; case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: ConditionalExpression(); break; default: jj_la1[164] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void MemberValueArrayInitializer() throws ParseException { jj_consume_token(LBRACE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case ENUM: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case AT: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: MemberValue(); break; default: jj_la1[165] = jj_gen; ; } label_63: while (true) { if (jj_2_50(2)) { ; } else { break label_63; } jj_consume_token(COMMA); MemberValue(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); break; default: jj_la1[166] = jj_gen; ; } jj_consume_token(RBRACE); } /* ================================================= Java 1.5 stuff starts here ================================================= */ /* Annotation Types. */ //Added by REYNAUD Sebastien (LOGICA) final public void CreationAnnotation() throws ParseException { jj_consume_token(AT); jj_consume_token(INTERFACE); jj_consume_token(IDENTIFIER); jj_consume_token(LBRACE); label_64: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case SEMICOLON: case AT: ; break; default: jj_la1[167] = jj_gen; break label_64; } AnnotationTypeMemberDeclaration(); } jj_consume_token(RBRACE); } // final public void AnnotationTypeDeclaration(int modifiers) throws ParseException { jj_consume_token(AT); jj_consume_token(INTERFACE); jj_consume_token(IDENTIFIER); AnnotationTypeBody(); } final public void AnnotationTypeBody() throws ParseException { jj_consume_token(LBRACE); _ncss++; Util.debug( "_ncss++" ); label_65: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case SEMICOLON: case AT: ; break; default: jj_la1[168] = jj_gen; break label_65; } AnnotationTypeMemberDeclaration(); } jj_consume_token(RBRACE); } final public void AnnotationTypeMemberDeclaration() throws ParseException { int modifiers; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: modifiers = Modifiers(); if (jj_2_51(2147483647)) { Type(); jj_consume_token(IDENTIFIER); jj_consume_token(LPAREN); jj_consume_token(RPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case _DEFAULT: DefaultValue(); break; default: jj_la1[169] = jj_gen; ; } jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: case INTERFACE: ClassOrInterfaceDeclaration(modifiers); break; case ENUM: EnumDeclaration(modifiers); break; case AT: AnnotationTypeDeclaration(modifiers); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: FieldDeclaration15(modifiers); break; default: jj_la1[170] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } break; case SEMICOLON: jj_consume_token(SEMICOLON); _ncss++; Util.debug( "_ncss++" ); break; default: jj_la1[171] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void DefaultValue() throws ParseException { jj_consume_token(_DEFAULT); MemberValue(); } /* * Modifiers. We match all modifiers in a single rule to reduce the chances of * syntax errors for simple modifier mistakes. It will also enable us to give * better error messages. */ final public int Modifiers() throws ParseException { int modifiers = 0; _tmpToken = null; label_66: while (true) { if (jj_2_52(2)) { ; } else { break label_66; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); modifiers |= ModifierSet.PUBLIC; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case STATIC: jj_consume_token(STATIC); modifiers |= ModifierSet.STATIC; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case PROTECTED: jj_consume_token(PROTECTED); modifiers |= ModifierSet.PROTECTED; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case PRIVATE: jj_consume_token(PRIVATE); modifiers |= ModifierSet.PRIVATE; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case FINAL: jj_consume_token(FINAL); modifiers |= ModifierSet.FINAL; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case ABSTRACT: jj_consume_token(ABSTRACT); modifiers |= ModifierSet.ABSTRACT; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); modifiers |= ModifierSet.SYNCHRONIZED; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case NATIVE: jj_consume_token(NATIVE); modifiers |= ModifierSet.NATIVE; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case TRANSIENT: jj_consume_token(TRANSIENT); modifiers |= ModifierSet.TRANSIENT; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case VOLATILE: jj_consume_token(VOLATILE); modifiers |= ModifierSet.VOLATILE; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case TESTAAAA: jj_consume_token(TESTAAAA); modifiers |= ModifierSet.STRICTFP; if ( _tmpToken == null ) { _tmpToken = getToken( 0 ); } break; case AT: Annotation(); break; default: jj_la1[172] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } {if (true) return modifiers;} throw new Error("Missing return statement in function"); } final public void ClassOrInterfaceDeclaration(int modifiers) throws ParseException { boolean isInterface = false; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: jj_consume_token(CLASS); break; case INTERFACE: jj_consume_token(INTERFACE); isInterface = true; break; default: jj_la1[173] = jj_gen; jj_consume_token(-1); throw new ParseException(); } jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: jj_la1[174] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: ExtendsList(isInterface); break; default: jj_la1[175] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPLEMENTS: ImplementsList(isInterface); break; default: jj_la1[176] = jj_gen; ; } ClassOrInterfaceBody(isInterface); } final public void EnumDeclaration(int modifiers) throws ParseException { String sOldClass = _sClass; int oldClasses = _classes; int oldNcss = _ncss; int oldFunctions = _functions; // Chris Povirk int oldSingle; int oldMulti; Util.debug( "EnumDeclaration().START" ); jj_consume_token(ENUM); jj_consume_token(IDENTIFIER); if (!_sClass.equals("")) { _sClass += "."; } _sClass += getToken(0).image; _classLevel ++; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPLEMENTS: ImplementsList(false); break; default: jj_la1[177] = jj_gen; ; } // Chris Povirk oldSingle = JavaParserTokenManager._iSingleComments; oldMulti = JavaParserTokenManager._iMultiComments; EnumBody(); _classLevel--; if (_classLevel == 0) { //_topLevelClasses++; ObjectMetric metric = new ObjectMetric(); metric.name = _sPackage + _sClass; metric.ncss = _ncss - oldNcss; metric.functions = _functions - oldFunctions; metric.classes = _classes - oldClasses; Token lastToken = getToken( 0 ); //metric.add( new Integer( lastToken.endLine ) ); //metric.add( new Integer( lastToken.endColumn ) ); metric.javadocs = _javadocs; // Chris Povirk metric.javadocsLn = _jvdcLines; metric.singleLn = JavaParserTokenManager._iSingleComments - oldSingle; metric.multiLn = JavaParserTokenManager._iMultiComments - oldMulti; _vClasses.add(metric); _pPackageMetric.functions += _functions - oldFunctions; _pPackageMetric.classes++; // added by SMS _pPackageMetric.javadocs += _javadocs; //_pPackageMetric.javadocsLn += JavaParserTokenManager._iFormalComments - oldFormal; //_pPackageMetric.singleLn += JavaParserTokenManager._iSingleComments - oldSingle; //_pPackageMetric.multiLn += Manager._iMultiComments - oldMulti; // } _functions = oldFunctions; _classes = oldClasses + 1; _sClass = sOldClass; } final public void TypeParameters() throws ParseException { jj_consume_token(LT); TypeParameter(); label_67: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[178] = jj_gen; break label_67; } jj_consume_token(COMMA); TypeParameter(); } jj_consume_token(GT); } final public void ExtendsList(boolean isInterface) throws ParseException { boolean extendsMoreThanOne = false; jj_consume_token(EXTENDS); ClassOrInterfaceType(); label_68: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[179] = jj_gen; break label_68; } jj_consume_token(COMMA); ClassOrInterfaceType(); extendsMoreThanOne = true; } if (extendsMoreThanOne && !isInterface) {if (true) throw new ParseException("A class cannot extend more than one other class");} } final public void ImplementsList(boolean isInterface) throws ParseException { jj_consume_token(IMPLEMENTS); ClassOrInterfaceType(); label_69: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[180] = jj_gen; break label_69; } jj_consume_token(COMMA); ClassOrInterfaceType(); } if (isInterface) {if (true) throw new ParseException("An interface cannot implement other interfaces");} } final public void ClassOrInterfaceBody(boolean isInterface) throws ParseException { jj_consume_token(LBRACE); _ncss++; Util.debug( "ClassOrInterfaceBody()._ncss++" ); label_70: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case LBRACE: case SEMICOLON: case AT: case LT: ; break; default: jj_la1[181] = jj_gen; break label_70; } ClassOrInterfaceBodyDeclaration(isInterface); } jj_consume_token(RBRACE); } final public void EnumBody() throws ParseException { jj_consume_token(LBRACE); _ncss++; Util.debug( "_ncss++" ); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: EnumConstant(); label_71: while (true) { if (jj_2_53(2)) { ; } else { break label_71; } jj_consume_token(COMMA); EnumConstant(); } break; default: jj_la1[182] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); break; default: jj_la1[183] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SEMICOLON: jj_consume_token(SEMICOLON); label_72: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case LBRACE: case SEMICOLON: case AT: case LT: ; break; default: jj_la1[184] = jj_gen; break label_72; } ClassOrInterfaceBodyDeclaration(false); } break; default: jj_la1[185] = jj_gen; ; } jj_consume_token(RBRACE); } final public void TypeParameter() throws ParseException { jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: TypeBound(); break; default: jj_la1[186] = jj_gen; ; } } final public void ClassOrInterfaceType() throws ParseException { jj_consume_token(IDENTIFIER); _sName = getToken(0).image; if ( _tmpResultToken == null ) { _tmpResultToken = getToken( 0 ); Util.debug( "ClassOrInterfaceType._tmpResultToken: " + _tmpResultToken ); } if (jj_2_54(4)) { TypeArguments(); } else { ; } label_73: while (true) { if (jj_2_55(2)) { ; } else { break label_73; } jj_consume_token(DOT); jj_consume_token(IDENTIFIER); _sName += "." + getToken(0).image; if (jj_2_56(2)) { TypeArguments(); } else { ; } } } final public void ClassOrInterfaceBodyDeclaration(boolean isInterface) throws ParseException { //boolean isNestedInterface = false; int modifiers; if (jj_2_59(2)) { Initializer(); if (isInterface) {if (true) throw new ParseException("An interface cannot have initializers");} } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case AT: case LT: modifiers = Modifiers(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: case INTERFACE: ClassOrInterfaceDeclaration(modifiers); break; case ENUM: EnumDeclaration(modifiers); break; default: jj_la1[187] = jj_gen; if (jj_2_57(2147483647)) { ConstructorDeclaration(); } else if (jj_2_58(2147483647)) { FieldDeclaration15(modifiers); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case VOID: case IDENTIFIER: case AT: case LT: MethodDeclaration15(modifiers); break; default: jj_la1[188] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } break; case SEMICOLON: jj_consume_token(SEMICOLON); break; default: jj_la1[189] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } final public void EnumConstant() throws ParseException { Modifiers(); jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: Arguments(); break; default: jj_la1[190] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: ClassOrInterfaceBody(false); break; default: jj_la1[191] = jj_gen; ; } } final public void TypeBound() throws ParseException { jj_consume_token(EXTENDS); ClassOrInterfaceType(); label_74: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_AND: ; break; default: jj_la1[192] = jj_gen; break label_74; } jj_consume_token(BIT_AND); ClassOrInterfaceType(); } } final public void TypeArguments() throws ParseException { jj_consume_token(LT); TypeArgument(); label_75: while (true) { if (jj_2_60(2)) { ; } else { break label_75; } jj_consume_token(COMMA); TypeArgument(); } jj_consume_token(GT); } final public void TypeArgument() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: ReferenceType(); break; case HOOK: jj_consume_token(HOOK); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: case SUPER: WildcardBounds(); break; default: jj_la1[193] = jj_gen; ; } break; default: jj_la1[194] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void ReferenceType() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: PrimitiveType(); label_76: while (true) { jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); _sName += "[]"; if (jj_2_61(2)) { ; } else { break label_76; } } break; case IDENTIFIER: ClassOrInterfaceType(); label_77: while (true) { if (jj_2_62(2)) { ; } else { break label_77; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); _sName += "[]"; } break; default: jj_la1[195] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void WildcardBounds() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: jj_consume_token(EXTENDS); ReferenceType(); break; case SUPER: jj_consume_token(SUPER); ReferenceType(); break; default: jj_la1[196] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void FieldDeclaration15(int modifiers) throws ParseException { Type(); VariableDeclarator(); label_78: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[197] = jj_gen; break label_78; } jj_consume_token(COMMA); VariableDeclarator(); } jj_consume_token(SEMICOLON); } final public void MethodDeclaration15(int modifiers) throws ParseException { MethodDeclaration(); } final public void MethodDeclarator15() throws ParseException { jj_consume_token(IDENTIFIER); FormalParameters(); label_79: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[198] = jj_gen; break label_79; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } } final public void FormalParameters15() throws ParseException { jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case TESTAAAA: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: FormalParameter15(); label_80: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[199] = jj_gen; break label_80; } jj_consume_token(COMMA); FormalParameter15(); } break; default: jj_la1[200] = jj_gen; ; } jj_consume_token(RPAREN); } final public void FormalParameter15() throws ParseException { Modifiers(); Type(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ELLIPSIS: jj_consume_token(ELLIPSIS); break; default: jj_la1[201] = jj_gen; ; } VariableDeclaratorId(); } final public void MemberSelector() throws ParseException { jj_consume_token(DOT); TypeArguments(); jj_consume_token(IDENTIFIER); } private boolean jj_2_1(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_1(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(0, xla); } } private boolean jj_2_2(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_2(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(1, xla); } } private boolean jj_2_3(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_3(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(2, xla); } } private boolean jj_2_4(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_4(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(3, xla); } } private boolean jj_2_5(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_5(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(4, xla); } } private boolean jj_2_6(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_6(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(5, xla); } } private boolean jj_2_7(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_7(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(6, xla); } } private boolean jj_2_8(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_8(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(7, xla); } } private boolean jj_2_9(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_9(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(8, xla); } } private boolean jj_2_10(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_10(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(9, xla); } } private boolean jj_2_11(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_11(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(10, xla); } } private boolean jj_2_12(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_12(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(11, xla); } } private boolean jj_2_13(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_13(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(12, xla); } } private boolean jj_2_14(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_14(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(13, xla); } } private boolean jj_2_15(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_15(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(14, xla); } } private boolean jj_2_16(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_16(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(15, xla); } } private boolean jj_2_17(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_17(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(16, xla); } } private boolean jj_2_18(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_18(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(17, xla); } } private boolean jj_2_19(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_19(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(18, xla); } } private boolean jj_2_20(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_20(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(19, xla); } } private boolean jj_2_21(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_21(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(20, xla); } } private boolean jj_2_22(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_22(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(21, xla); } } private boolean jj_2_23(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_23(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(22, xla); } } private boolean jj_2_24(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_24(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(23, xla); } } private boolean jj_2_25(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_25(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(24, xla); } } private boolean jj_2_26(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_26(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(25, xla); } } private boolean jj_2_27(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_27(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(26, xla); } } private boolean jj_2_28(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_28(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(27, xla); } } private boolean jj_2_29(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_29(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(28, xla); } } private boolean jj_2_30(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_30(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(29, xla); } } private boolean jj_2_31(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_31(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(30, xla); } } private boolean jj_2_32(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_32(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(31, xla); } } private boolean jj_2_33(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_33(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(32, xla); } } private boolean jj_2_34(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_34(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(33, xla); } } private boolean jj_2_35(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_35(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(34, xla); } } private boolean jj_2_36(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_36(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(35, xla); } } private boolean jj_2_37(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_37(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(36, xla); } } private boolean jj_2_38(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_38(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(37, xla); } } private boolean jj_2_39(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_39(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(38, xla); } } private boolean jj_2_40(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_40(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(39, xla); } } private boolean jj_2_41(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_41(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(40, xla); } } private boolean jj_2_42(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_42(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(41, xla); } } private boolean jj_2_43(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_43(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(42, xla); } } private boolean jj_2_44(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_44(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(43, xla); } } private boolean jj_2_45(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_45(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(44, xla); } } private boolean jj_2_46(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_46(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(45, xla); } } private boolean jj_2_47(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_47(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(46, xla); } } private boolean jj_2_48(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_48(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(47, xla); } } private boolean jj_2_49(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_49(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(48, xla); } } private boolean jj_2_50(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_50(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(49, xla); } } private boolean jj_2_51(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_51(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(50, xla); } } private boolean jj_2_52(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_52(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(51, xla); } } private boolean jj_2_53(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_53(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(52, xla); } } private boolean jj_2_54(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_54(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(53, xla); } } private boolean jj_2_55(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_55(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(54, xla); } } private boolean jj_2_56(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_56(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(55, xla); } } private boolean jj_2_57(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_57(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(56, xla); } } private boolean jj_2_58(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_58(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(57, xla); } } private boolean jj_2_59(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_59(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(58, xla); } } private boolean jj_2_60(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_60(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(59, xla); } } private boolean jj_2_61(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_61(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(60, xla); } } private boolean jj_2_62(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_62(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(61, xla); } } private boolean jj_3R_117() { Token xsp; xsp = jj_scanpos; if (jj_3R_164()) { jj_scanpos = xsp; if (jj_3R_165()) return true; } return false; } private boolean jj_3R_164() { if (jj_3R_190()) return true; return false; } private boolean jj_3R_314() { if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_344()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_388() { if (jj_3R_137()) return true; return false; } private boolean jj_3R_303() { if (jj_scan_token(AT)) return true; if (jj_scan_token(INTERFACE)) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_3R_314()) return true; return false; } private boolean jj_3_50() { if (jj_scan_token(COMMA)) return true; if (jj_3R_123()) return true; return false; } private boolean jj_3R_389() { if (jj_scan_token(COMMA)) return true; if (jj_3R_94()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_408()) jj_scanpos = xsp; return false; } private boolean jj_3R_104() { if (jj_3R_105()) return true; return false; } private boolean jj_3R_363() { if (jj_3R_94()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_388()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3R_389()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_304() { if (jj_scan_token(AT)) return true; if (jj_scan_token(INTERFACE)) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_315()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_352() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3R_351() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3R_321() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_3R_351()) { jj_scanpos = xsp; if (jj_3R_352()) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } return false; } private boolean jj_3_24() { if (jj_scan_token(DOT)) return true; if (jj_3R_105()) return true; return false; } private boolean jj_3R_320() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_261() { if (jj_3R_123()) return true; return false; } private boolean jj_3R_319() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_306() { Token xsp; xsp = jj_scanpos; if (jj_3R_319()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3R_320()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_321()) { jj_scanpos = xsp; break; } } if (jj_3R_225()) return true; return false; } private boolean jj_3R_192() { if (jj_scan_token(LBRACE)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_261()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3_50()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_scan_token(84)) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_240() { if (jj_scan_token(COMMA)) return true; if (jj_3R_239()) return true; return false; } private boolean jj_3R_144() { if (jj_3R_105()) return true; return false; } private boolean jj_3_23() { if (jj_scan_token(DOT)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(28)) { jj_scanpos = xsp; if (jj_3R_104()) return true; } return false; } private boolean jj_3R_168() { if (jj_3R_191()) return true; return false; } private boolean jj_3R_167() { if (jj_3R_192()) return true; return false; } private boolean jj_3R_123() { Token xsp; xsp = jj_scanpos; if (jj_3R_166()) { jj_scanpos = xsp; if (jj_3R_167()) { jj_scanpos = xsp; if (jj_3R_168()) return true; } } return false; } private boolean jj_3R_166() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_94() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(28)) { jj_scanpos = xsp; if (jj_3R_144()) return true; } while (true) { xsp = jj_scanpos; if (jj_3_23()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_239() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(ASSIGN)) return true; if (jj_3R_123()) return true; return false; } private boolean jj_3R_221() { if (jj_3R_239()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_240()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_207() { if (jj_3R_221()) return true; return false; } private boolean jj_3R_122() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(ASSIGN)) return true; return false; } private boolean jj_3R_162() { if (jj_3R_111()) return true; return false; } private boolean jj_3R_114() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(63)) { jj_scanpos = xsp; if (jj_3R_162()) return true; } return false; } private boolean jj_3R_194() { if (jj_scan_token(AT)) return true; if (jj_3R_94()) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_123()) return true; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_195() { if (jj_scan_token(AT)) return true; if (jj_3R_94()) return true; return false; } private boolean jj_3_49() { if (jj_scan_token(AT)) return true; if (jj_3R_94()) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_193() { if (jj_scan_token(AT)) return true; if (jj_3R_94()) return true; if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_207()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3_48() { if (jj_scan_token(AT)) return true; if (jj_3R_94()) return true; if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_122()) { jj_scanpos = xsp; if (jj_scan_token(78)) return true; } return false; } private boolean jj_3R_173() { if (jj_3R_195()) return true; return false; } private boolean jj_3R_110() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(15)) { jj_scanpos = xsp; if (jj_scan_token(20)) { jj_scanpos = xsp; if (jj_scan_token(17)) { jj_scanpos = xsp; if (jj_scan_token(51)) { jj_scanpos = xsp; if (jj_scan_token(40)) { jj_scanpos = xsp; if (jj_scan_token(42)) { jj_scanpos = xsp; if (jj_scan_token(33)) { jj_scanpos = xsp; if (jj_scan_token(26)) return true; } } } } } } } return false; } private boolean jj_3R_172() { if (jj_3R_194()) return true; return false; } private boolean jj_3R_141() { Token xsp; xsp = jj_scanpos; if (jj_3R_171()) { jj_scanpos = xsp; if (jj_3R_172()) { jj_scanpos = xsp; if (jj_3R_173()) return true; } } return false; } private boolean jj_3R_171() { if (jj_3R_193()) return true; return false; } private boolean jj_3R_105() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(74)) { jj_scanpos = xsp; if (jj_scan_token(14)) return true; } return false; } private boolean jj_3R_439() { if (jj_scan_token(FINALLY)) return true; if (jj_3R_142()) return true; return false; } private boolean jj_3R_438() { if (jj_scan_token(CATCH)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_386()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_142()) return true; return false; } private boolean jj_3R_274() { if (jj_scan_token(TRY)) return true; if (jj_3R_142()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_438()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3R_439()) jj_scanpos = xsp; return false; } private boolean jj_3R_93() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_158() { if (jj_3R_110()) return true; return false; } private boolean jj_3R_111() { Token xsp; xsp = jj_scanpos; if (jj_3_22()) { jj_scanpos = xsp; if (jj_3R_158()) return true; } return false; } private boolean jj_3_22() { if (jj_3R_103()) return true; return false; } private boolean jj_3R_273() { if (jj_scan_token(SYNCHRONIZED)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_142()) return true; return false; } private boolean jj_3R_85() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) jj_scanpos = xsp; if (jj_3R_142()) return true; return false; } private boolean jj_3R_272() { if (jj_scan_token(THROW)) return true; if (jj_3R_117()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_437() { if (jj_3R_117()) return true; return false; } private boolean jj_3_20() { if (jj_3R_102()) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_436() { if (jj_3R_105()) return true; return false; } private boolean jj_3_21() { if (jj_scan_token(THIS)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_121() { if (jj_3R_105()) return true; return false; } private boolean jj_3R_409() { if (jj_3R_102()) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_271() { if (jj_scan_token(RETURN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_437()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_391() { Token xsp; xsp = jj_scanpos; if (jj_3R_409()) jj_scanpos = xsp; if (jj_scan_token(SUPER)) return true; if (jj_3R_189()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_455() { if (jj_scan_token(COMMA)) return true; if (jj_3R_263()) return true; return false; } private boolean jj_3R_446() { if (jj_3R_451()) return true; return false; } private boolean jj_3R_435() { if (jj_3R_105()) return true; return false; } private boolean jj_3R_390() { if (jj_scan_token(THIS)) return true; if (jj_3R_189()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_364() { Token xsp; xsp = jj_scanpos; if (jj_3R_390()) { jj_scanpos = xsp; if (jj_3R_391()) return true; } return false; } private boolean jj_3R_270() { if (jj_scan_token(CONTINUE)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_436()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_92() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(48)) { jj_scanpos = xsp; if (jj_scan_token(47)) return true; } } return false; } private boolean jj_3R_269() { if (jj_scan_token(BREAK)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_435()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_451() { if (jj_3R_454()) return true; return false; } private boolean jj_3R_147() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_148() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_146() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(48)) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(43)) { jj_scanpos = xsp; if (jj_scan_token(56)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } } } return false; } private boolean jj_3R_145() { if (jj_3R_141()) return true; return false; } private boolean jj_3_47() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(31)) jj_scanpos = xsp; if (jj_3R_111()) return true; xsp = jj_scanpos; if (jj_scan_token(28)) { jj_scanpos = xsp; if (jj_3R_121()) return true; } return false; } private boolean jj_3R_445() { if (jj_3R_117()) return true; return false; } private boolean jj_3R_454() { if (jj_3R_263()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_455()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_95() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_145()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_146()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_147()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3R_148()) jj_scanpos = xsp; if (jj_3R_114()) return true; if (jj_3R_105()) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_91() { if (jj_3R_141()) return true; return false; } private boolean jj_3_11() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_91()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3R_92()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_93()) jj_scanpos = xsp; if (jj_3R_94()) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3_12() { if (jj_3R_95()) return true; return false; } private boolean jj_3R_432() { if (jj_scan_token(ELSE)) return true; if (jj_3R_223()) return true; return false; } private boolean jj_3R_453() { if (jj_3R_454()) return true; return false; } private boolean jj_3R_90() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(48)) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } return false; } private boolean jj_3_46() { if (jj_3R_84()) return true; if (jj_3R_111()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(COLON)) return true; return false; } private boolean jj_3R_310() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_452() { if (jj_3R_222()) return true; return false; } private boolean jj_3R_450() { Token xsp; xsp = jj_scanpos; if (jj_3R_452()) { jj_scanpos = xsp; if (jj_3R_453()) return true; } return false; } private boolean jj_3R_300() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_310()) { jj_scanpos = xsp; break; } } if (jj_3R_311()) return true; return false; } private boolean jj_3R_299() { if (jj_3R_309()) return true; return false; } private boolean jj_3R_298() { if (jj_3R_308()) return true; return false; } private boolean jj_3_10() { if (jj_3R_84()) return true; if (jj_scan_token(ENUM)) return true; return false; } private boolean jj_3R_444() { if (jj_3R_450()) return true; return false; } private boolean jj_3R_433() { if (jj_3R_84()) return true; if (jj_3R_111()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(COLON)) return true; if (jj_3R_117()) return true; return false; } private boolean jj_3R_87() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(48)) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } return false; } private boolean jj_3R_434() { Token xsp; xsp = jj_scanpos; if (jj_3R_444()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; xsp = jj_scanpos; if (jj_3R_445()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; xsp = jj_scanpos; if (jj_3R_446()) jj_scanpos = xsp; return false; } private boolean jj_3_9() { if (jj_3R_84()) return true; if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_268() { if (jj_scan_token(FOR)) return true; if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_433()) { jj_scanpos = xsp; if (jj_3R_434()) return true; } if (jj_scan_token(RPAREN)) return true; if (jj_3R_223()) return true; return false; } private boolean jj_3R_297() { if (jj_3R_84()) return true; if (jj_3R_307()) return true; return false; } private boolean jj_3R_89() { if (jj_3R_141()) return true; return false; } private boolean jj_3_8() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_89()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_90()) { jj_scanpos = xsp; break; } } if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3R_350() { if (jj_scan_token(IMPLEMENTS)) return true; if (jj_3R_363()) return true; return false; } private boolean jj_3R_296() { if (jj_3R_84()) return true; if (jj_3R_306()) return true; return false; } private boolean jj_3R_88() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_267() { if (jj_scan_token(DO)) return true; if (jj_3R_223()) return true; if (jj_scan_token(WHILE)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3_7() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_88()) { jj_scanpos = xsp; break; } } if (jj_scan_token(AT)) return true; if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_331() { if (jj_3R_196()) return true; return false; } private boolean jj_3R_86() { if (jj_3R_141()) return true; return false; } private boolean jj_3_6() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_86()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_87()) { jj_scanpos = xsp; break; } } if (jj_scan_token(AT)) return true; if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_295() { if (jj_3R_305()) return true; return false; } private boolean jj_3R_266() { if (jj_scan_token(WHILE)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_223()) return true; return false; } private boolean jj_3R_294() { if (jj_3R_304()) return true; return false; } private boolean jj_3R_265() { if (jj_scan_token(IF)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_223()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_432()) jj_scanpos = xsp; return false; } private boolean jj_3R_293() { if (jj_3R_84()) return true; if (jj_3R_303()) return true; return false; } private boolean jj_3_5() { if (jj_3R_85()) return true; return false; } private boolean jj_3R_290() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(83)) { jj_scanpos = xsp; if (jj_3_5()) { jj_scanpos = xsp; if (jj_3R_293()) { jj_scanpos = xsp; if (jj_3R_294()) { jj_scanpos = xsp; if (jj_3R_295()) { jj_scanpos = xsp; if (jj_3R_296()) { jj_scanpos = xsp; if (jj_3R_297()) { jj_scanpos = xsp; if (jj_3R_298()) { jj_scanpos = xsp; if (jj_3R_299()) { jj_scanpos = xsp; if (jj_3R_300()) return true; } } } } } } } } } return false; } private boolean jj_3R_443() { if (jj_3R_196()) return true; return false; } private boolean jj_3R_399() { if (jj_3R_137()) return true; return false; } private boolean jj_3R_101() { if (jj_3R_102()) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_449() { if (jj_scan_token(_DEFAULT)) return true; if (jj_scan_token(COLON)) return true; return false; } private boolean jj_3_19() { Token xsp; xsp = jj_scanpos; if (jj_3R_101()) jj_scanpos = xsp; if (jj_scan_token(SUPER)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3_18() { if (jj_scan_token(THIS)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_448() { if (jj_scan_token(CASE)) return true; if (jj_3R_117()) return true; if (jj_scan_token(COLON)) return true; return false; } private boolean jj_3R_442() { Token xsp; xsp = jj_scanpos; if (jj_3R_448()) { jj_scanpos = xsp; if (jj_3R_449()) return true; } return false; } private boolean jj_3R_382() { if (jj_scan_token(DOT)) return true; if (jj_3R_94()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_399()) jj_scanpos = xsp; return false; } private boolean jj_3R_330() { if (jj_3R_364()) return true; return false; } private boolean jj_3R_329() { if (jj_3R_364()) return true; return false; } private boolean jj_3R_431() { if (jj_3R_442()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_443()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_120() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_264() { if (jj_scan_token(SWITCH)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_431()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_415() { if (jj_scan_token(COMMA)) return true; if (jj_3R_341()) return true; return false; } private boolean jj_3R_328() { if (jj_scan_token(THROWS)) return true; if (jj_3R_363()) return true; return false; } private boolean jj_3R_447() { if (jj_3R_106()) return true; if (jj_3R_117()) return true; return false; } private boolean jj_3R_441() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(100)) { jj_scanpos = xsp; if (jj_scan_token(101)) { jj_scanpos = xsp; if (jj_3R_447()) return true; } } return false; } private boolean jj_3R_326() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_285() { if (jj_3R_102()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_441()) jj_scanpos = xsp; return false; } private boolean jj_3R_347() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3R_284() { if (jj_3R_215()) return true; return false; } private boolean jj_3R_346() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3R_318() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_3R_346()) { jj_scanpos = xsp; if (jj_3R_347()) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } return false; } private boolean jj_3R_263() { Token xsp; xsp = jj_scanpos; if (jj_3R_283()) { jj_scanpos = xsp; if (jj_3R_284()) { jj_scanpos = xsp; if (jj_3R_285()) return true; } } return false; } private boolean jj_3R_283() { if (jj_3R_214()) return true; return false; } private boolean jj_3R_361() { if (jj_scan_token(PRIVATE)) return true; return false; } private boolean jj_3R_317() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_360() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3R_316() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_305() { Token xsp; xsp = jj_scanpos; if (jj_3R_316()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3R_317()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_318()) { jj_scanpos = xsp; break; } } if (jj_3R_224()) return true; return false; } private boolean jj_3R_359() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3R_325() { Token xsp; xsp = jj_scanpos; if (jj_3R_359()) { jj_scanpos = xsp; if (jj_3R_360()) { jj_scanpos = xsp; if (jj_3R_361()) return true; } } return false; } private boolean jj_3R_222() { if (jj_3R_84()) return true; if (jj_3R_111()) return true; if (jj_3R_341()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_415()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_324() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_308() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_324()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3R_325()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_326()) jj_scanpos = xsp; if (jj_3R_105()) return true; if (jj_3R_327()) return true; xsp = jj_scanpos; if (jj_3R_328()) jj_scanpos = xsp; if (jj_scan_token(LBRACE)) return true; xsp = jj_scanpos; if (jj_3R_329()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_330()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3R_331()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_381() { if (jj_3R_137()) return true; return false; } private boolean jj_3_45() { if (jj_3R_84()) return true; if (jj_3R_111()) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(28)) { jj_scanpos = xsp; if (jj_scan_token(74)) return true; } xsp = jj_scanpos; if (jj_scan_token(83)) { jj_scanpos = xsp; if (jj_scan_token(87)) { jj_scanpos = xsp; if (jj_scan_token(84)) { jj_scanpos = xsp; if (jj_3R_120()) return true; } } } return false; } private boolean jj_3R_287() { if (jj_3R_290()) return true; return false; } private boolean jj_3R_211() { if (jj_3R_225()) return true; return false; } private boolean jj_3R_210() { if (jj_3R_224()) return true; return false; } private boolean jj_3R_209() { if (jj_3R_223()) return true; return false; } private boolean jj_3R_276() { if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_287()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_196() { Token xsp; xsp = jj_scanpos; if (jj_3R_208()) { jj_scanpos = xsp; if (jj_3R_209()) { jj_scanpos = xsp; if (jj_3R_210()) { jj_scanpos = xsp; if (jj_3R_211()) return true; } } } return false; } private boolean jj_3R_208() { if (jj_3R_222()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_174() { if (jj_3R_196()) return true; return false; } private boolean jj_3R_349() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_94()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_381()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3R_382()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_386() { if (jj_3R_84()) return true; if (jj_3R_111()) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(122)) jj_scanpos = xsp; if (jj_3R_377()) return true; return false; } private boolean jj_3R_142() { if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_174()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_430() { if (jj_scan_token(COLON)) return true; if (jj_3R_117()) return true; return false; } private boolean jj_3R_262() { if (jj_scan_token(ASSERT)) return true; if (jj_3R_117()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_430()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_362() { if (jj_3R_386()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_387()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_387() { if (jj_scan_token(COMMA)) return true; if (jj_3R_386()) return true; return false; } private boolean jj_3R_348() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_327() { if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_362()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_119() { if (jj_scan_token(ASSERT)) return true; if (jj_3R_117()) return true; return false; } private boolean jj_3R_374() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_118() { if (jj_3R_105()) return true; if (jj_scan_token(COLON)) return true; if (jj_3R_223()) return true; return false; } private boolean jj_3R_336() { if (jj_3R_105()) return true; if (jj_3R_327()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_374()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_254() { if (jj_3R_274()) return true; return false; } private boolean jj_3R_253() { if (jj_3R_273()) return true; return false; } private boolean jj_3R_252() { if (jj_3R_272()) return true; return false; } private boolean jj_3R_251() { if (jj_3R_271()) return true; return false; } private boolean jj_3R_224() { if (jj_3R_84()) return true; if (jj_scan_token(CLASS)) return true; if (jj_3R_105()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_348()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_349()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_350()) jj_scanpos = xsp; if (jj_3R_276()) return true; return false; } private boolean jj_3R_250() { if (jj_3R_270()) return true; return false; } private boolean jj_3R_249() { if (jj_3R_269()) return true; return false; } private boolean jj_3R_248() { if (jj_3R_268()) return true; return false; } private boolean jj_3_41() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_247() { if (jj_3R_267()) return true; return false; } private boolean jj_3R_246() { if (jj_3R_266()) return true; return false; } private boolean jj_3R_116() { if (jj_scan_token(DOT)) return true; if (jj_3R_137()) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3R_245() { if (jj_3R_265()) return true; return false; } private boolean jj_3R_244() { if (jj_3R_264()) return true; return false; } private boolean jj_3_44() { if (jj_3R_119()) return true; return false; } private boolean jj_3R_421() { if (jj_scan_token(COMMA)) return true; if (jj_3R_341()) return true; return false; } private boolean jj_3R_243() { if (jj_3R_263()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_242() { if (jj_3R_142()) return true; return false; } private boolean jj_3R_241() { if (jj_3R_262()) return true; return false; } private boolean jj_3_43() { if (jj_3R_118()) return true; return false; } private boolean jj_3R_223() { Token xsp; xsp = jj_scanpos; if (jj_3_43()) { jj_scanpos = xsp; if (jj_3R_241()) { jj_scanpos = xsp; if (jj_3R_242()) { jj_scanpos = xsp; if (jj_scan_token(83)) { jj_scanpos = xsp; if (jj_3R_243()) { jj_scanpos = xsp; if (jj_3R_244()) { jj_scanpos = xsp; if (jj_3R_245()) { jj_scanpos = xsp; if (jj_3R_246()) { jj_scanpos = xsp; if (jj_3R_247()) { jj_scanpos = xsp; if (jj_3R_248()) { jj_scanpos = xsp; if (jj_3R_249()) { jj_scanpos = xsp; if (jj_3R_250()) { jj_scanpos = xsp; if (jj_3R_251()) { jj_scanpos = xsp; if (jj_3R_252()) { jj_scanpos = xsp; if (jj_3R_253()) { jj_scanpos = xsp; if (jj_3R_254()) return true; } } } } } } } } } } } } } } } return false; } private boolean jj_3_62() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_429() { if (jj_3R_309()) return true; return false; } private boolean jj_3R_275() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3_40() { if (jj_scan_token(LBRACKET)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_255() { Token xsp; if (jj_3R_275()) return true; while (true) { xsp = jj_scanpos; if (jj_3R_275()) { jj_scanpos = xsp; break; } } if (jj_3R_177()) return true; return false; } private boolean jj_3_42() { Token xsp; if (jj_3_40()) return true; while (true) { xsp = jj_scanpos; if (jj_3_40()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3_41()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_228() { Token xsp; xsp = jj_scanpos; if (jj_3_42()) { jj_scanpos = xsp; if (jj_3R_255()) return true; } return false; } private boolean jj_3_61() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_412() { if (jj_3R_111()) return true; if (jj_3R_341()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_421()) { jj_scanpos = xsp; break; } } if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_238() { if (jj_scan_token(SUPER)) return true; if (jj_3R_103()) return true; return false; } private boolean jj_3R_220() { Token xsp; xsp = jj_scanpos; if (jj_3R_237()) { jj_scanpos = xsp; if (jj_3R_238()) return true; } return false; } private boolean jj_3R_237() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_103()) return true; return false; } private boolean jj_3R_406() { if (jj_3R_413()) return true; return false; } private boolean jj_3_60() { if (jj_scan_token(COMMA)) return true; if (jj_3R_140()) return true; return false; } private boolean jj_3R_226() { if (jj_scan_token(BIT_AND)) return true; if (jj_3R_184()) return true; return false; } private boolean jj_3R_153() { if (jj_3R_184()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_62()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_152() { if (jj_3R_110()) return true; Token xsp; if (jj_3_61()) return true; while (true) { xsp = jj_scanpos; if (jj_3_61()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_103() { Token xsp; xsp = jj_scanpos; if (jj_3R_152()) { jj_scanpos = xsp; if (jj_3R_153()) return true; } return false; } private boolean jj_3R_206() { if (jj_3R_220()) return true; return false; } private boolean jj_3R_170() { if (jj_scan_token(HOOK)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_206()) jj_scanpos = xsp; return false; } private boolean jj_3R_256() { if (jj_3R_276()) return true; return false; } private boolean jj_3R_140() { Token xsp; xsp = jj_scanpos; if (jj_3R_169()) { jj_scanpos = xsp; if (jj_3R_170()) return true; } return false; } private boolean jj_3R_169() { if (jj_3R_103()) return true; return false; } private boolean jj_3R_405() { if (jj_3R_189()) return true; return false; } private boolean jj_3R_139() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_337() { if (jj_scan_token(THROWS)) return true; if (jj_3R_363()) return true; return false; } private boolean jj_3R_137() { if (jj_scan_token(LT)) return true; if (jj_3R_140()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_60()) { jj_scanpos = xsp; break; } } if (jj_scan_token(GT)) return true; return false; } private boolean jj_3R_231() { if (jj_3R_189()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_256()) jj_scanpos = xsp; return false; } private boolean jj_3R_230() { if (jj_3R_228()) return true; return false; } private boolean jj_3R_163() { if (jj_scan_token(NEW)) return true; if (jj_3R_94()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_229()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_230()) { jj_scanpos = xsp; if (jj_3R_231()) return true; } return false; } private boolean jj_3R_229() { if (jj_3R_137()) return true; return false; } private boolean jj_3R_338() { if (jj_3R_142()) return true; return false; } private boolean jj_3R_212() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_184()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_226()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3_58() { if (jj_3R_111()) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_139()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_scan_token(84)) { jj_scanpos = xsp; if (jj_scan_token(87)) { jj_scanpos = xsp; if (jj_scan_token(83)) return true; } } return false; } private boolean jj_3R_138() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_115() { Token xsp; xsp = jj_scanpos; if (jj_3_39()) { jj_scanpos = xsp; if (jj_3R_163()) return true; } return false; } private boolean jj_3_39() { if (jj_scan_token(NEW)) return true; if (jj_3R_110()) return true; if (jj_3R_228()) return true; return false; } private boolean jj_3R_136() { if (jj_3R_84()) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_405()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_406()) jj_scanpos = xsp; return false; } private boolean jj_3_57() { Token xsp; xsp = jj_scanpos; if (jj_3R_138()) jj_scanpos = xsp; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_277() { if (jj_scan_token(COMMA)) return true; if (jj_3R_117()) return true; return false; } private boolean jj_3R_427() { if (jj_3R_429()) return true; return false; } private boolean jj_3R_426() { if (jj_3R_412()) return true; return false; } private boolean jj_3R_425() { if (jj_3R_308()) return true; return false; } private boolean jj_3R_424() { if (jj_3R_307()) return true; return false; } private boolean jj_3R_423() { if (jj_3R_411()) return true; return false; } private boolean jj_3R_335() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_217() { if (jj_3R_117()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_277()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_204() { if (jj_3R_217()) return true; return false; } private boolean jj_3R_414() { if (jj_3R_84()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_423()) { jj_scanpos = xsp; if (jj_3R_424()) { jj_scanpos = xsp; if (jj_3R_425()) { jj_scanpos = xsp; if (jj_3R_426()) { jj_scanpos = xsp; if (jj_3R_427()) return true; } } } } return false; } private boolean jj_3R_334() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_189() { if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_204()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_407() { Token xsp; xsp = jj_scanpos; if (jj_3_59()) { jj_scanpos = xsp; if (jj_3R_414()) { jj_scanpos = xsp; if (jj_scan_token(83)) return true; } } return false; } private boolean jj_3_59() { if (jj_3R_85()) return true; return false; } private boolean jj_3_4() { if (jj_3R_84()) return true; if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_373() { if (jj_scan_token(TESTAAAA)) return true; return false; } private boolean jj_3R_83() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(56)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } return false; } private boolean jj_3_56() { if (jj_3R_137()) return true; return false; } private boolean jj_3R_372() { if (jj_scan_token(SYNCHRONIZED)) return true; return false; } private boolean jj_3R_227() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(61)) { jj_scanpos = xsp; if (jj_scan_token(30)) return true; } return false; } private boolean jj_3_55() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3_56()) jj_scanpos = xsp; return false; } private boolean jj_3R_197() { if (jj_3R_212()) return true; return false; } private boolean jj_3_54() { if (jj_3R_137()) return true; return false; } private boolean jj_3R_371() { if (jj_scan_token(NATIVE)) return true; return false; } private boolean jj_3_3() { if (jj_3R_84()) return true; if (jj_scan_token(ENUM)) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3_53() { if (jj_scan_token(COMMA)) return true; if (jj_3R_136()) return true; return false; } private boolean jj_3R_213() { if (jj_3R_227()) return true; return false; } private boolean jj_3R_82() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_370() { if (jj_scan_token(FINAL)) return true; return false; } private boolean jj_3_2() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_82()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_83()) { jj_scanpos = xsp; break; } } if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3R_184() { if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3_54()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3_55()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_385() { if (jj_3R_407()) return true; return false; } private boolean jj_3R_198() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(66)) { jj_scanpos = xsp; if (jj_scan_token(70)) { jj_scanpos = xsp; if (jj_scan_token(72)) { jj_scanpos = xsp; if (jj_scan_token(73)) { jj_scanpos = xsp; if (jj_3R_213()) { jj_scanpos = xsp; if (jj_scan_token(45)) return true; } } } } } return false; } private boolean jj_3R_175() { if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_197()) jj_scanpos = xsp; return false; } private boolean jj_3R_369() { if (jj_scan_token(ABSTRACT)) return true; return false; } private boolean jj_3R_358() { if (jj_scan_token(SEMICOLON)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_385()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_161() { if (jj_3R_189()) return true; return false; } private boolean jj_3R_368() { if (jj_scan_token(STATIC)) return true; return false; } private boolean jj_3R_357() { if (jj_3R_136()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_53()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_160() { if (jj_scan_token(DOT)) return true; if (jj_3R_105()) return true; return false; } private boolean jj_3R_367() { if (jj_scan_token(PRIVATE)) return true; return false; } private boolean jj_3R_159() { if (jj_scan_token(LBRACKET)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_323() { if (jj_scan_token(LBRACE)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_357()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(84)) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_358()) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3_38() { if (jj_3R_116()) return true; return false; } private boolean jj_3R_366() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3_33() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(SUPER)) return true; if (jj_scan_token(DOT)) return true; if (jj_3R_105()) return true; return false; } private boolean jj_3_37() { if (jj_scan_token(DOT)) return true; if (jj_3R_115()) return true; return false; } private boolean jj_3R_112() { Token xsp; xsp = jj_scanpos; if (jj_3_36()) { jj_scanpos = xsp; if (jj_3_37()) { jj_scanpos = xsp; if (jj_3_38()) { jj_scanpos = xsp; if (jj_3R_159()) { jj_scanpos = xsp; if (jj_3R_160()) { jj_scanpos = xsp; if (jj_3R_161()) return true; } } } } } return false; } private boolean jj_3_36() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(THIS)) return true; return false; } private boolean jj_3R_422() { if (jj_3R_407()) return true; return false; } private boolean jj_3R_365() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3R_333() { Token xsp; xsp = jj_scanpos; if (jj_3R_365()) { jj_scanpos = xsp; if (jj_3R_366()) { jj_scanpos = xsp; if (jj_3R_367()) { jj_scanpos = xsp; if (jj_3R_368()) { jj_scanpos = xsp; if (jj_3R_369()) { jj_scanpos = xsp; if (jj_3R_370()) { jj_scanpos = xsp; if (jj_3R_371()) { jj_scanpos = xsp; if (jj_3R_372()) { jj_scanpos = xsp; if (jj_3R_373()) return true; } } } } } } } } return false; } private boolean jj_3R_413() { if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_422()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3_35() { if (jj_3R_114()) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3R_183() { if (jj_3R_94()) return true; Token xsp; xsp = jj_scanpos; if (jj_3_33()) jj_scanpos = xsp; return false; } private boolean jj_3R_188() { if (jj_3R_198()) return true; return false; } private boolean jj_3R_384() { if (jj_scan_token(COMMA)) return true; if (jj_3R_184()) return true; return false; } private boolean jj_3R_113() { if (jj_3R_105()) return true; return false; } private boolean jj_3R_356() { if (jj_scan_token(IMPLEMENTS)) return true; if (jj_3R_184()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_384()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_332() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_182() { if (jj_3R_114()) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3R_176() { if (jj_scan_token(COMMA)) return true; if (jj_3R_175()) return true; return false; } private boolean jj_3R_181() { if (jj_3R_115()) return true; return false; } private boolean jj_3R_180() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_117()) return true; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_440() { if (jj_scan_token(COMMA)) return true; if (jj_3R_184()) return true; return false; } private boolean jj_3R_428() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_184()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_440()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3_17() { if (jj_scan_token(COMMA)) return true; if (jj_3R_100()) return true; return false; } private boolean jj_3R_309() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_332()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_333()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_334()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3R_335()) jj_scanpos = xsp; if (jj_3R_114()) return true; if (jj_3R_336()) return true; xsp = jj_scanpos; if (jj_3R_337()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_338()) { jj_scanpos = xsp; if (jj_scan_token(83)) return true; } return false; } private boolean jj_3R_199() { if (jj_3R_105()) return true; return false; } private boolean jj_3_34() { if (jj_scan_token(SUPER)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(85)) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_113()) jj_scanpos = xsp; return false; } private boolean jj_3_32() { if (jj_3R_112()) return true; return false; } private boolean jj_3R_342() { if (jj_scan_token(COMMA)) return true; if (jj_3R_341()) return true; return false; } private boolean jj_3R_143() { if (jj_scan_token(LT)) return true; if (jj_3R_175()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_176()) { jj_scanpos = xsp; break; } } if (jj_scan_token(GT)) return true; return false; } private boolean jj_3R_393() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_179() { if (jj_scan_token(THIS)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(85)) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_199()) jj_scanpos = xsp; return false; } private boolean jj_3R_151() { Token xsp; xsp = jj_scanpos; if (jj_3R_178()) { jj_scanpos = xsp; if (jj_3R_179()) { jj_scanpos = xsp; if (jj_3_34()) { jj_scanpos = xsp; if (jj_3R_180()) { jj_scanpos = xsp; if (jj_3R_181()) { jj_scanpos = xsp; if (jj_3R_182()) { jj_scanpos = xsp; if (jj_3R_183()) return true; } } } } } } return false; } private boolean jj_3R_178() { if (jj_3R_198()) return true; return false; } private boolean jj_3R_280() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(100)) { jj_scanpos = xsp; if (jj_scan_token(101)) return true; } return false; } private boolean jj_3R_286() { if (jj_3R_100()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_17()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_378() { if (jj_scan_token(ASSIGN)) return true; if (jj_3R_100()) return true; return false; } private boolean jj_3R_187() { if (jj_3R_105()) return true; return false; } private boolean jj_3R_102() { if (jj_3R_151()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_32()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3_31() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_110()) return true; return false; } private boolean jj_3R_392() { if (jj_3R_105()) return true; return false; } private boolean jj_3R_177() { if (jj_scan_token(LBRACE)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_286()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(84)) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_150() { if (jj_3R_117()) return true; return false; } private boolean jj_3R_279() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_111()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_216()) return true; return false; } private boolean jj_3R_99() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(48)) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } return false; } private boolean jj_3R_377() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(28)) { jj_scanpos = xsp; if (jj_3R_392()) return true; } while (true) { xsp = jj_scanpos; if (jj_3R_393()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_149() { if (jj_3R_177()) return true; return false; } private boolean jj_3R_100() { Token xsp; xsp = jj_scanpos; if (jj_3R_149()) { jj_scanpos = xsp; if (jj_3R_150()) return true; } return false; } private boolean jj_3_30() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_257() { Token xsp; xsp = jj_scanpos; if (jj_3R_278()) { jj_scanpos = xsp; if (jj_3R_279()) return true; } return false; } private boolean jj_3R_278() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_111()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_185()) return true; return false; } private boolean jj_3R_97() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(13)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(49)) { jj_scanpos = xsp; if (jj_scan_token(48)) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } } } } } } return false; } private boolean jj_3R_258() { if (jj_3R_102()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_280()) jj_scanpos = xsp; return false; } private boolean jj_3R_341() { if (jj_3R_377()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_378()) jj_scanpos = xsp; return false; } private boolean jj_3_29() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_111()) return true; if (jj_scan_token(LBRACKET)) return true; return false; } private boolean jj_3R_340() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_322() { if (jj_3R_356()) return true; return false; } private boolean jj_3R_98() { if (jj_3R_141()) return true; return false; } private boolean jj_3_14() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_98()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_99()) { jj_scanpos = xsp; break; } } if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_157() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_111()) return true; if (jj_scan_token(RPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(91)) { jj_scanpos = xsp; if (jj_scan_token(90)) { jj_scanpos = xsp; if (jj_scan_token(77)) { jj_scanpos = xsp; if (jj_3R_187()) { jj_scanpos = xsp; if (jj_scan_token(57)) { jj_scanpos = xsp; if (jj_scan_token(54)) { jj_scanpos = xsp; if (jj_scan_token(44)) { jj_scanpos = xsp; if (jj_3R_188()) return true; } } } } } } } return false; } private boolean jj_3R_96() { if (jj_3R_141()) return true; return false; } private boolean jj_3_13() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_96()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_97()) { jj_scanpos = xsp; break; } } if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3R_156() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_111()) return true; if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_307() { if (jj_scan_token(ENUM)) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_322()) jj_scanpos = xsp; if (jj_3R_323()) return true; return false; } private boolean jj_3R_109() { Token xsp; xsp = jj_scanpos; if (jj_3_28()) { jj_scanpos = xsp; if (jj_3R_156()) { jj_scanpos = xsp; if (jj_3R_157()) return true; } } return false; } private boolean jj_3_28() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_110()) return true; return false; } private boolean jj_3_27() { if (jj_3R_109()) return true; return false; } private boolean jj_3R_417() { if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_234() { if (jj_3R_258()) return true; return false; } private boolean jj_3R_420() { if (jj_3R_356()) return true; return false; } private boolean jj_3R_419() { if (jj_3R_428()) return true; return false; } private boolean jj_3R_233() { if (jj_3R_257()) return true; return false; } private boolean jj_3R_418() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_81() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_376() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3R_375() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3R_339() { Token xsp; xsp = jj_scanpos; if (jj_3R_375()) { jj_scanpos = xsp; if (jj_3R_376()) { jj_scanpos = xsp; if (jj_scan_token(47)) { jj_scanpos = xsp; if (jj_scan_token(52)) { jj_scanpos = xsp; if (jj_scan_token(31)) { jj_scanpos = xsp; if (jj_scan_token(60)) { jj_scanpos = xsp; if (jj_scan_token(64)) return true; } } } } } } return false; } private boolean jj_3_1() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_81()) { jj_scanpos = xsp; break; } } if (jj_scan_token(PACKAGE)) return true; return false; } private boolean jj_3R_107() { if (jj_scan_token(GT)) return true; if (jj_scan_token(GT)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(88)) jj_scanpos = xsp; return false; } private boolean jj_3R_411() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(21)) { jj_scanpos = xsp; if (jj_3R_417()) return true; } if (jj_scan_token(IDENTIFIER)) return true; xsp = jj_scanpos; if (jj_3R_418()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_419()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_420()) jj_scanpos = xsp; if (jj_3R_413()) return true; return false; } private boolean jj_3R_311() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_339()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3R_340()) { jj_scanpos = xsp; break; } } if (jj_3R_111()) return true; if (jj_3R_341()) return true; while (true) { xsp = jj_scanpos; if (jj_3R_342()) { jj_scanpos = xsp; break; } } if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_216() { Token xsp; xsp = jj_scanpos; if (jj_3R_232()) { jj_scanpos = xsp; if (jj_3R_233()) { jj_scanpos = xsp; if (jj_3R_234()) return true; } } return false; } private boolean jj_3R_232() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(91)) { jj_scanpos = xsp; if (jj_scan_token(90)) return true; } if (jj_3R_185()) return true; return false; } private boolean jj_3_16() { if (jj_3R_95()) return true; return false; } private boolean jj_3R_215() { if (jj_scan_token(DECR)) return true; if (jj_3R_102()) return true; return false; } private boolean jj_3R_155() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(102)) { jj_scanpos = xsp; if (jj_scan_token(103)) return true; } if (jj_3R_154()) return true; return false; } private boolean jj_3_15() { if (jj_3R_84()) return true; if (jj_scan_token(ENUM)) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3R_186() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(104)) { jj_scanpos = xsp; if (jj_scan_token(105)) { jj_scanpos = xsp; if (jj_scan_token(109)) return true; } } if (jj_3R_185()) return true; return false; } private boolean jj_3R_404() { if (jj_3R_84()) return true; if (jj_3R_311()) return true; return false; } private boolean jj_3R_214() { if (jj_scan_token(INCR)) return true; if (jj_3R_102()) return true; return false; } private boolean jj_3R_135() { if (jj_3R_141()) return true; return false; } private boolean jj_3R_403() { if (jj_3R_309()) return true; return false; } private boolean jj_3R_203() { if (jj_3R_216()) return true; return false; } private boolean jj_3R_134() { if (jj_scan_token(TESTAAAA)) return true; return false; } private boolean jj_3R_202() { if (jj_3R_215()) return true; return false; } private boolean jj_3R_402() { if (jj_3R_84()) return true; if (jj_3R_307()) return true; return false; } private boolean jj_3_26() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(110)) { jj_scanpos = xsp; if (jj_3R_107()) return true; } if (jj_3R_108()) return true; return false; } private boolean jj_3R_201() { if (jj_3R_214()) return true; return false; } private boolean jj_3R_133() { if (jj_scan_token(VOLATILE)) return true; return false; } private boolean jj_3R_401() { if (jj_3R_306()) return true; return false; } private boolean jj_3R_185() { Token xsp; xsp = jj_scanpos; if (jj_3R_200()) { jj_scanpos = xsp; if (jj_3R_201()) { jj_scanpos = xsp; if (jj_3R_202()) { jj_scanpos = xsp; if (jj_3R_203()) return true; } } } return false; } private boolean jj_3R_200() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(102)) { jj_scanpos = xsp; if (jj_scan_token(103)) return true; } if (jj_3R_185()) return true; return false; } private boolean jj_3R_400() { if (jj_3R_305()) return true; return false; } private boolean jj_3R_132() { if (jj_scan_token(TRANSIENT)) return true; return false; } private boolean jj_3R_383() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(83)) { jj_scanpos = xsp; if (jj_3R_400()) { jj_scanpos = xsp; if (jj_3R_401()) { jj_scanpos = xsp; if (jj_3R_402()) { jj_scanpos = xsp; if (jj_3R_403()) { jj_scanpos = xsp; if (jj_3R_404()) return true; } } } } } return false; } private boolean jj_3R_154() { if (jj_3R_185()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_186()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_131() { if (jj_scan_token(NATIVE)) return true; return false; } private boolean jj_3R_343() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(89)) { jj_scanpos = xsp; if (jj_scan_token(88)) { jj_scanpos = xsp; if (jj_scan_token(95)) { jj_scanpos = xsp; if (jj_scan_token(96)) return true; } } } if (jj_3R_312()) return true; return false; } private boolean jj_3R_313() { if (jj_scan_token(INSTANCEOF)) return true; if (jj_3R_111()) return true; return false; } private boolean jj_3R_108() { if (jj_3R_154()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_155()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_354() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_363()) return true; return false; } private boolean jj_3R_130() { if (jj_scan_token(SYNCHRONIZED)) return true; return false; } private boolean jj_3R_302() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(94)) { jj_scanpos = xsp; if (jj_scan_token(97)) return true; } if (jj_3R_291()) return true; return false; } private boolean jj_3R_129() { if (jj_scan_token(ABSTRACT)) return true; return false; } private boolean jj_3R_312() { if (jj_3R_108()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_26()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_128() { if (jj_scan_token(FINAL)) return true; return false; } private boolean jj_3R_292() { if (jj_scan_token(BIT_AND)) return true; if (jj_3R_288()) return true; return false; } private boolean jj_3R_127() { if (jj_scan_token(PRIVATE)) return true; return false; } private boolean jj_3R_301() { if (jj_3R_312()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_343()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_353() { if (jj_3R_143()) return true; return false; } private boolean jj_3R_282() { if (jj_scan_token(BIT_OR)) return true; if (jj_3R_259()) return true; return false; } private boolean jj_3R_126() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3R_289() { if (jj_scan_token(XOR)) return true; if (jj_3R_281()) return true; return false; } private boolean jj_3R_291() { if (jj_3R_301()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_313()) jj_scanpos = xsp; return false; } private boolean jj_3R_125() { if (jj_scan_token(STATIC)) return true; return false; } private boolean jj_3R_260() { if (jj_scan_token(SC_AND)) return true; if (jj_3R_235()) return true; return false; } private boolean jj_3R_288() { if (jj_3R_291()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_302()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_236() { if (jj_scan_token(SC_OR)) return true; if (jj_3R_218()) return true; return false; } private boolean jj_3R_124() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3R_281() { if (jj_3R_288()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_292()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3_52() { Token xsp; xsp = jj_scanpos; if (jj_3R_124()) { jj_scanpos = xsp; if (jj_3R_125()) { jj_scanpos = xsp; if (jj_3R_126()) { jj_scanpos = xsp; if (jj_3R_127()) { jj_scanpos = xsp; if (jj_3R_128()) { jj_scanpos = xsp; if (jj_3R_129()) { jj_scanpos = xsp; if (jj_3R_130()) { jj_scanpos = xsp; if (jj_3R_131()) { jj_scanpos = xsp; if (jj_3R_132()) { jj_scanpos = xsp; if (jj_3R_133()) { jj_scanpos = xsp; if (jj_3R_134()) { jj_scanpos = xsp; if (jj_3R_135()) return true; } } } } } } } } } } } return false; } private boolean jj_3R_219() { if (jj_scan_token(HOOK)) return true; if (jj_3R_117()) return true; if (jj_scan_token(COLON)) return true; if (jj_3R_191()) return true; return false; } private boolean jj_3R_84() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_52()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_355() { if (jj_3R_383()) return true; return false; } private boolean jj_3R_344() { if (jj_3R_345()) return true; return false; } private boolean jj_3R_259() { if (jj_3R_281()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_289()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_410() { if (jj_3R_416()) return true; return false; } private boolean jj_3R_235() { if (jj_3R_259()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_282()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_225() { if (jj_scan_token(INTERFACE)) return true; if (jj_3R_105()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_353()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_354()) jj_scanpos = xsp; if (jj_scan_token(LBRACE)) return true; while (true) { xsp = jj_scanpos; if (jj_3R_355()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_416() { if (jj_scan_token(_DEFAULT)) return true; if (jj_3R_123()) return true; return false; } private boolean jj_3R_218() { if (jj_3R_235()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_260()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_380() { if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_205() { if (jj_3R_218()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_236()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_398() { if (jj_3R_412()) return true; return false; } private boolean jj_3R_191() { if (jj_3R_205()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_219()) jj_scanpos = xsp; return false; } private boolean jj_3R_397() { if (jj_3R_303()) return true; return false; } private boolean jj_3R_315() { if (jj_3R_345()) return true; return false; } private boolean jj_3R_396() { if (jj_3R_307()) return true; return false; } private boolean jj_3_51() { if (jj_3R_111()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_395() { if (jj_3R_411()) return true; return false; } private boolean jj_3R_106() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(87)) { jj_scanpos = xsp; if (jj_scan_token(113)) { jj_scanpos = xsp; if (jj_scan_token(114)) { jj_scanpos = xsp; if (jj_scan_token(118)) { jj_scanpos = xsp; if (jj_scan_token(111)) { jj_scanpos = xsp; if (jj_scan_token(112)) { jj_scanpos = xsp; if (jj_scan_token(119)) { jj_scanpos = xsp; if (jj_scan_token(120)) { jj_scanpos = xsp; if (jj_scan_token(121)) { jj_scanpos = xsp; if (jj_scan_token(115)) { jj_scanpos = xsp; if (jj_scan_token(117)) { jj_scanpos = xsp; if (jj_scan_token(116)) return true; } } } } } } } } } } } return false; } private boolean jj_3_25() { if (jj_3R_102()) return true; if (jj_3R_106()) return true; return false; } private boolean jj_3R_190() { if (jj_3R_102()) return true; if (jj_3R_106()) return true; if (jj_3R_117()) return true; return false; } private boolean jj_3R_394() { if (jj_3R_111()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_scan_token(RPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_410()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_379() { if (jj_3R_84()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_394()) { jj_scanpos = xsp; if (jj_3R_395()) { jj_scanpos = xsp; if (jj_3R_396()) { jj_scanpos = xsp; if (jj_3R_397()) { jj_scanpos = xsp; if (jj_3R_398()) return true; } } } } return false; } private boolean jj_3R_345() { Token xsp; xsp = jj_scanpos; if (jj_3R_379()) { jj_scanpos = xsp; if (jj_3R_380()) return true; } return false; } private boolean jj_3R_165() { if (jj_3R_191()) return true; return false; } private boolean jj_3R_408() { if (jj_3R_137()) return true; return false; } /** Generated Token Manager. */ public JavaParserTokenManager token_source; JavaCharStream jj_input_stream; /** Current token. */ public Token token; /** Next token. */ public Token jj_nt; private int jj_ntk; private Token jj_scanpos, jj_lastpos; private int jj_la; private int jj_gen; final private int[] jj_la1 = new int[202]; static private int[] jj_la1_0; static private int[] jj_la1_1; static private int[] jj_la1_2; static private int[] jj_la1_3; static { jj_la1_init_0(); jj_la1_init_1(); jj_la1_init_2(); jj_la1_init_3(); } private static void jj_la1_init_0() { jj_la1_0 = new int[] {0x0,0x90202000,0x0,0x0,0x0,0x90202000,0x0,0x0,0x80002000,0x80002000,0x200000,0x0,0x0,0x0,0x80002000,0x0,0x0,0x80002000,0x80002000,0x0,0x0,0x0,0x0,0x20000000,0x0,0x9432e000,0x0,0x0,0x80002000,0x80002000,0x0,0x0,0x84128000,0x0,0x80002000,0x80002000,0x0,0x0,0x0,0x0,0x2000,0x2000,0x0,0x0,0x80002000,0x80002000,0x0,0x20000000,0x9432a000,0x0,0x8412a000,0x80000000,0x80000000,0x0,0x0,0x0,0x10004000,0x0,0x5412c000,0x5412c000,0x0,0x0,0x80002000,0x80002000,0x0,0x0,0x0,0x0,0x0,0x0,0x8412a000,0x0,0x0,0x0,0x0,0x0,0x0,0xd6b3e000,0x5412c000,0x0,0x4128000,0x4128000,0x0,0x4128000,0x4128000,0x10004000,0x10004000,0x0,0x0,0x0,0x5412c000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x5412c000,0x0,0x0,0x5412c000,0x40004000,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x4000,0x40000000,0x0,0x10004000,0x0,0x40000000,0x40000000,0x5412c000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x5693c000,0x0,0xd6b3e000,0xd6b3e000,0x0,0x0,0x0,0x5412c000,0x1040000,0xd6b3e000,0x1040000,0x8000000,0xd412e000,0x5412c000,0x5412c000,0xd412e000,0x5412c000,0x0,0x4000,0x4000,0x5412c000,0x80000,0x0,0x4000,0x0,0x0,0x0,0x5412c000,0x5412c000,0x0,0x9432a000,0x9432a000,0x1000000,0x14328000,0x9432a000,0x80002000,0x200000,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x9432e000,0x80002000,0x0,0x9432e000,0x0,0x20000000,0x10200000,0x8412a000,0x9432e000,0x0,0x0,0x0,0x20000000,0x4128000,0x4128000,0x20000000,0x0,0x0,0x0,0x8412a000,0x0,}; } private static void jj_la1_init_1() { jj_la1_1 = new int[] {0x40,0x11338a00,0x4040,0x4040,0x40,0x11338a00,0x4000,0x40,0x1220000,0x1220000,0x200,0x0,0x100000,0x0,0x11338800,0x0,0x0,0x1220000,0x1220000,0x0,0x0,0x0,0x0,0x0,0x20,0x913b8f02,0x0,0x0,0x338000,0x338000,0x0,0x0,0x101b8502,0x0,0x1338800,0x1338800,0x0,0x0,0x0,0x0,0x220000,0x220000,0x0,0x0,0x338000,0x338000,0x0,0x0,0x913b8f02,0x0,0x113b8d02,0x10138000,0x10138000,0x0,0x0,0x0,0x0,0x0,0xa2483502,0xa2483502,0x0,0x0,0x1338800,0x1338800,0x0,0x0,0x8000000,0x0,0x0,0x0,0x113b8d02,0x0,0x0,0x38000,0x38000,0x0,0x8000000,0xf7ffbf16,0xa2483502,0x100000,0x80502,0x80502,0x0,0x80502,0x80080502,0x0,0x0,0x0,0x0,0x0,0xa2483502,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa2483502,0x0,0x0,0xa2483502,0x22403000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x22002000,0x1000,0x0,0x0,0x20002000,0x20000000,0xa2483502,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0xe7cc3516,0x0,0xf7ffbf16,0xf7ffbf16,0x0,0x0,0x0,0xa2483502,0x0,0xf7ffbf16,0x0,0x0,0xb37bbd02,0xa2483502,0xa2483502,0xb37bbd02,0xa2483502,0x0,0x0,0x0,0xa2483502,0x0,0x1,0x0,0x0,0x0,0x0,0xa2483502,0xa2483502,0x0,0x113b8f02,0x113b8f02,0x0,0x80702,0x113b8f02,0x11338800,0x200,0x0,0x0,0x20,0x20,0x0,0x0,0x0,0x913b8f02,0x11338800,0x0,0x913b8f02,0x0,0x0,0x200,0x813b8d02,0x913b8f02,0x0,0x0,0x0,0x400000,0x80502,0x80502,0x400000,0x0,0x0,0x0,0x113b8d02,0x0,}; } private static void jj_la1_init_2() { jj_la1_2 = new int[] {0x0,0x480001,0x400000,0x400000,0x0,0x480001,0x400000,0x0,0x0,0x0,0x0,0x400000,0x0,0x200000,0x480001,0x400000,0x400000,0x0,0x0,0x2000000,0x2000000,0x200000,0x2000000,0x0,0x0,0x2488401,0x400000,0x400000,0x0,0x0,0x400000,0x80000,0x400401,0x400000,0x0,0x0,0x400000,0x2000000,0x400000,0x400000,0x0,0x0,0x400000,0x400000,0x0,0x0,0x2000000,0x0,0x2480401,0x80000,0x400401,0x1,0x1,0x400000,0x100000,0x800000,0x400,0x20000,0xc00a744,0xc00a744,0x100000,0x400000,0x0,0x0,0x400000,0x2000000,0x0,0x88000,0x20000,0x100000,0x400401,0x0,0x400000,0x0,0x0,0x2000000,0x0,0x48a747,0x2744,0x0,0x0,0x400,0x20000,0x0,0x400,0x400,0x400,0x2000000,0x100000,0x2000000,0xc002744,0x800000,0x10000000,0x0,0x0,0x0,0x0,0x0,0x40000000,0x40000000,0x0,0x83000000,0x83000000,0x1000000,0x1000000,0x0,0x0,0x0,0x0,0x0,0xc002744,0xc000000,0xc000000,0x2744,0xc002744,0x2000,0x0,0x0,0x2000,0x200000,0x400,0x200000,0x400,0x344,0x2000,0x400,0x222000,0x344,0x0,0xc002744,0x100000,0x2000000,0x8000,0x22000,0x0,0x20000,0x20000,0x8a746,0x20000000,0x48a747,0x48a747,0x100000,0x800000,0x800000,0x2744,0x0,0x48a747,0x0,0x0,0x402745,0xc002744,0x2744,0x482745,0x2744,0x100000,0x400,0x400,0xc002744,0x0,0x0,0x400,0x400000,0x400,0x100000,0xc40a744,0xc40a744,0x100000,0x480401,0x480401,0x0,0x400400,0x480401,0x400001,0x0,0x2000000,0x0,0x0,0x0,0x100000,0x100000,0x100000,0x2488401,0x400401,0x100000,0x2488401,0x80000,0x0,0x0,0x2400400,0x2480401,0x2000,0x8000,0x0,0x0,0x10000400,0x400,0x0,0x100000,0x20000,0x100000,0x400401,0x0,}; } private static void jj_la1_init_3() { jj_la1_3 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0x0,0x0,0x30,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0x3ff8000,0x0,0x4,0x8,0x800,0x1000,0x400,0x2,0x2,0x0,0x1,0x1,0x0,0x4000,0xc0,0xc0,0x2300,0x2300,0xc0,0xf0,0x0,0x0,0x0,0x0,0x0,0x30,0x30,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30,0x0,0x30,0x30,0x0,0x3ff8030,0x3ff8030,0x30,0x0,0x30,0x0,0x0,0x30,0xf0,0x30,0x30,0x30,0x0,0x0,0x0,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,}; } final private JJCalls[] jj_2_rtns = new JJCalls[62]; private boolean jj_rescan = false; private int jj_gc = 0; /** Constructor with InputStream. */ public JavaParser(java.io.InputStream stream) { this(stream, null); } /** Constructor with InputStream and supplied encoding */ public JavaParser(java.io.InputStream stream, String encoding) { try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source = new JavaParserTokenManager(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 202; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Reinitialise. */ public void ReInit(java.io.InputStream stream) { ReInit(stream, null); } /** Reinitialise. */ public void ReInit(java.io.InputStream stream, String encoding) { try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source.ReInit(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 202; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Constructor. */ public JavaParser(java.io.Reader stream) { jj_input_stream = new JavaCharStream(stream, 1, 1); token_source = new JavaParserTokenManager(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 202; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Reinitialise. */ public void ReInit(java.io.Reader stream) { jj_input_stream.ReInit(stream, 1, 1); token_source.ReInit(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 202; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Constructor with generated Token Manager. */ public JavaParser(JavaParserTokenManager tm) { token_source = tm; token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 202; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Reinitialise. */ public void ReInit(JavaParserTokenManager tm) { token_source = tm; token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 202; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } private Token jj_consume_token(int kind) throws ParseException { Token oldToken; if ((oldToken = token).next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; if (token.kind == kind) { jj_gen++; if (++jj_gc > 100) { jj_gc = 0; for (int i = 0; i < jj_2_rtns.length; i++) { JJCalls c = jj_2_rtns[i]; while (c != null) { if (c.gen < jj_gen) c.first = null; c = c.next; } } } return token; } token = oldToken; jj_kind = kind; throw generateParseException(); } static private final class LookaheadSuccess extends java.lang.Error { } final private LookaheadSuccess jj_ls = new LookaheadSuccess(); private boolean jj_scan_token(int kind) { if (jj_scanpos == jj_lastpos) { jj_la--; if (jj_scanpos.next == null) { jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); } else { jj_lastpos = jj_scanpos = jj_scanpos.next; } } else { jj_scanpos = jj_scanpos.next; } if (jj_rescan) { int i = 0; Token tok = token; while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } if (tok != null) jj_add_error_token(kind, i); } if (jj_scanpos.kind != kind) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; return false; } /** Get the next Token. */ final public Token getNextToken() { if (token.next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; jj_gen++; return token; } /** Get the specific Token. */ final public Token getToken(int index) { Token t = token; for (int i = 0; i < index; i++) { if (t.next != null) t = t.next; else t = t.next = token_source.getNextToken(); } return t; } private int jj_ntk() { if ((jj_nt=token.next) == null) return (jj_ntk = (token.next=token_source.getNextToken()).kind); else return (jj_ntk = jj_nt.kind); } private java.util.List jj_expentries = new java.util.ArrayList(); private int[] jj_expentry; private int jj_kind = -1; private int[] jj_lasttokens = new int[100]; private int jj_endpos; private void jj_add_error_token(int kind, int pos) { if (pos >= 100) return; if (pos == jj_endpos + 1) { jj_lasttokens[jj_endpos++] = kind; } else if (jj_endpos != 0) { jj_expentry = new int[jj_endpos]; for (int i = 0; i < jj_endpos; i++) { jj_expentry[i] = jj_lasttokens[i]; } jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { int[] oldentry = (int[])(it.next()); if (oldentry.length == jj_expentry.length) { for (int i = 0; i < jj_expentry.length; i++) { if (oldentry[i] != jj_expentry[i]) { continue jj_entries_loop; } } jj_expentries.add(jj_expentry); break jj_entries_loop; } } if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; } } /** Generate ParseException. */ public ParseException generateParseException() { jj_expentries.clear(); boolean[] la1tokens = new boolean[123]; if (jj_kind >= 0) { la1tokens[jj_kind] = true; jj_kind = -1; } for (int i = 0; i < 202; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { if ((jj_la1_0[i] & (1< jj_gen) { jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; switch (i) { case 0: jj_3_1(); break; case 1: jj_3_2(); break; case 2: jj_3_3(); break; case 3: jj_3_4(); break; case 4: jj_3_5(); break; case 5: jj_3_6(); break; case 6: jj_3_7(); break; case 7: jj_3_8(); break; case 8: jj_3_9(); break; case 9: jj_3_10(); break; case 10: jj_3_11(); break; case 11: jj_3_12(); break; case 12: jj_3_13(); break; case 13: jj_3_14(); break; case 14: jj_3_15(); break; case 15: jj_3_16(); break; case 16: jj_3_17(); break; case 17: jj_3_18(); break; case 18: jj_3_19(); break; case 19: jj_3_20(); break; case 20: jj_3_21(); break; case 21: jj_3_22(); break; case 22: jj_3_23(); break; case 23: jj_3_24(); break; case 24: jj_3_25(); break; case 25: jj_3_26(); break; case 26: jj_3_27(); break; case 27: jj_3_28(); break; case 28: jj_3_29(); break; case 29: jj_3_30(); break; case 30: jj_3_31(); break; case 31: jj_3_32(); break; case 32: jj_3_33(); break; case 33: jj_3_34(); break; case 34: jj_3_35(); break; case 35: jj_3_36(); break; case 36: jj_3_37(); break; case 37: jj_3_38(); break; case 38: jj_3_39(); break; case 39: jj_3_40(); break; case 40: jj_3_41(); break; case 41: jj_3_42(); break; case 42: jj_3_43(); break; case 43: jj_3_44(); break; case 44: jj_3_45(); break; case 45: jj_3_46(); break; case 46: jj_3_47(); break; case 47: jj_3_48(); break; case 48: jj_3_49(); break; case 49: jj_3_50(); break; case 50: jj_3_51(); break; case 51: jj_3_52(); break; case 52: jj_3_53(); break; case 53: jj_3_54(); break; case 54: jj_3_55(); break; case 55: jj_3_56(); break; case 56: jj_3_57(); break; case 57: jj_3_58(); break; case 58: jj_3_59(); break; case 59: jj_3_60(); break; case 60: jj_3_61(); break; case 61: jj_3_62(); break; } } p = p.next; } while (p != null); } catch(LookaheadSuccess ls) { } } jj_rescan = false; } private void jj_save(int index, int xla) { JJCalls p = jj_2_rtns[index]; while (p.gen > jj_gen) { if (p.next == null) { p = p.next = new JJCalls(); break; } p = p.next; } p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; } static final class JJCalls { int gen; Token first; int arg; JJCalls next; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/0000755000175000017500000000000011345540725027555 5ustar twernertwerner././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/JavaCharStream.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/JavaCharStream.java0000644000175000017500000004150511343534515033256 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 4.1 */ /* JavaCCOptions:STATIC=false */ package net.sourceforge.cobertura.javancss.parser.java15; /** * An implementation of interface CharStream, where the stream is assumed to * contain only ASCII characters (with java-like unicode escape processing). */ public class JavaCharStream { /** Whether parser is static. */ public static final boolean staticFlag = false; static final int hexval(char c) throws java.io.IOException { switch(c) { case '0' : return 0; case '1' : return 1; case '2' : return 2; case '3' : return 3; case '4' : return 4; case '5' : return 5; case '6' : return 6; case '7' : return 7; case '8' : return 8; case '9' : return 9; case 'a' : case 'A' : return 10; case 'b' : case 'B' : return 11; case 'c' : case 'C' : return 12; case 'd' : case 'D' : return 13; case 'e' : case 'E' : return 14; case 'f' : case 'F' : return 15; } throw new java.io.IOException(); // Should never come here } /** Position in buffer. */ public int bufpos = -1; int bufsize; int available; int tokenBegin; protected int bufline[]; protected int bufcolumn[]; protected int column = 0; protected int line = 1; protected boolean prevCharIsCR = false; protected boolean prevCharIsLF = false; protected java.io.Reader inputStream; protected char[] nextCharBuf; protected char[] buffer; protected int maxNextCharInd = 0; protected int nextCharInd = -1; protected int inBuf = 0; protected int tabSize = 8; protected void setTabSize(int i) { tabSize = i; } protected int getTabSize(int i) { return tabSize; } protected void ExpandBuff(boolean wrapAround) { char[] newbuffer = new char[bufsize + 2048]; int newbufline[] = new int[bufsize + 2048]; int newbufcolumn[] = new int[bufsize + 2048]; try { if (wrapAround) { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); bufcolumn = newbufcolumn; bufpos += (bufsize - tokenBegin); } else { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); bufcolumn = newbufcolumn; bufpos -= tokenBegin; } } catch (Throwable t) { throw new Error(t.getMessage()); } available = (bufsize += 2048); tokenBegin = 0; } protected void FillBuff() throws java.io.IOException { int i; if (maxNextCharInd == 4096) maxNextCharInd = nextCharInd = 0; try { if ((i = inputStream.read(nextCharBuf, maxNextCharInd, 4096 - maxNextCharInd)) == -1) { inputStream.close(); throw new java.io.IOException(); } else maxNextCharInd += i; return; } catch(java.io.IOException e) { if (bufpos != 0) { --bufpos; backup(0); } else { bufline[bufpos] = line; bufcolumn[bufpos] = column; } throw e; } } protected char ReadByte() throws java.io.IOException { if (++nextCharInd >= maxNextCharInd) FillBuff(); return nextCharBuf[nextCharInd]; } /** @return starting character for token. */ public char BeginToken() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; tokenBegin = bufpos; return buffer[bufpos]; } tokenBegin = 0; bufpos = -1; return readChar(); } protected void AdjustBuffSize() { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = 0; available = tokenBegin; } else ExpandBuff(false); } else if (available > tokenBegin) available = bufsize; else if ((tokenBegin - available) < 2048) ExpandBuff(true); else available = tokenBegin; } protected void UpdateLineColumn(char c) { column++; if (prevCharIsLF) { prevCharIsLF = false; line += (column = 1); } else if (prevCharIsCR) { prevCharIsCR = false; if (c == '\n') { prevCharIsLF = true; } else line += (column = 1); } switch (c) { case '\r' : prevCharIsCR = true; break; case '\n' : prevCharIsLF = true; break; case '\t' : column--; column += (tabSize - (column % tabSize)); break; default : break; } bufline[bufpos] = line; bufcolumn[bufpos] = column; } /** Read a character. */ public char readChar() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; return buffer[bufpos]; } char c; if (++bufpos == available) AdjustBuffSize(); if ((buffer[bufpos] = c = ReadByte()) == '\\') { UpdateLineColumn(c); int backSlashCnt = 1; for (;;) // Read all the backslashes { if (++bufpos == available) AdjustBuffSize(); try { if ((buffer[bufpos] = c = ReadByte()) != '\\') { UpdateLineColumn(c); // found a non-backslash char. if ((c == 'u') && ((backSlashCnt & 1) == 1)) { if (--bufpos < 0) bufpos = bufsize - 1; break; } backup(backSlashCnt); return '\\'; } } catch(java.io.IOException e) { if (backSlashCnt > 1) backup(backSlashCnt-1); return '\\'; } UpdateLineColumn(c); backSlashCnt++; } // Here, we have seen an odd number of backslash's followed by a 'u' try { while ((c = ReadByte()) == 'u') ++column; buffer[bufpos] = c = (char)(hexval(c) << 12 | hexval(ReadByte()) << 8 | hexval(ReadByte()) << 4 | hexval(ReadByte())); column += 4; } catch(java.io.IOException e) { throw new Error("Invalid escape character at line " + line + " column " + column + "."); } if (backSlashCnt == 1) return c; else { backup(backSlashCnt - 1); return '\\'; } } else { UpdateLineColumn(c); return c; } } /** * @deprecated * @see #getEndColumn */ public int getColumn() { return bufcolumn[bufpos]; } /** * @deprecated * @see #getEndLine */ public int getLine() { return bufline[bufpos]; } /** Get end column. */ public int getEndColumn() { return bufcolumn[bufpos]; } /** Get end line. */ public int getEndLine() { return bufline[bufpos]; } /** @return column of token start */ public int getBeginColumn() { return bufcolumn[tokenBegin]; } /** @return line number of token start */ public int getBeginLine() { return bufline[tokenBegin]; } /** Retreat. */ public void backup(int amount) { inBuf += amount; if ((bufpos -= amount) < 0) bufpos += bufsize; } /** Constructor. */ public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { inputStream = dstream; line = startline; column = startcolumn - 1; available = bufsize = buffersize; buffer = new char[buffersize]; bufline = new int[buffersize]; bufcolumn = new int[buffersize]; nextCharBuf = new char[4096]; } /** Constructor. */ public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn) { this(dstream, startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.Reader dstream) { this(dstream, 1, 1, 4096); } /** Reinitialise. */ public void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { inputStream = dstream; line = startline; column = startcolumn - 1; if (buffer == null || buffersize != buffer.length) { available = bufsize = buffersize; buffer = new char[buffersize]; bufline = new int[buffersize]; bufcolumn = new int[buffersize]; nextCharBuf = new char[4096]; } prevCharIsLF = prevCharIsCR = false; tokenBegin = inBuf = maxNextCharInd = 0; nextCharInd = bufpos = -1; } /** Reinitialise. */ public void ReInit(java.io.Reader dstream, int startline, int startcolumn) { ReInit(dstream, startline, startcolumn, 4096); } /** Reinitialise. */ public void ReInit(java.io.Reader dstream) { ReInit(dstream, 1, 1, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException { this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) { this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException { this(dstream, encoding, startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, int startline, int startcolumn) { this(dstream, startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException { this(dstream, encoding, 1, 1, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream) { this(dstream, 1, 1, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException { ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) { ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException { ReInit(dstream, encoding, startline, startcolumn, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, int startline, int startcolumn) { ReInit(dstream, startline, startcolumn, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException { ReInit(dstream, encoding, 1, 1, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream) { ReInit(dstream, 1, 1, 4096); } /** @return token image as String */ public String GetImage() { if (bufpos >= tokenBegin) return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); else return new String(buffer, tokenBegin, bufsize - tokenBegin) + new String(buffer, 0, bufpos + 1); } /** @return suffix */ public char[] GetSuffix(int len) { char[] ret = new char[len]; if ((bufpos + 1) >= len) System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); else { System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, len - bufpos - 1); System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); } return ret; } /** Set buffers back to null when finished. */ public void Done() { nextCharBuf = null; buffer = null; bufline = null; bufcolumn = null; } /** * Method to adjust line and column numbers for the start of a token. */ public void adjustBeginLineColumn(int newLine, int newCol) { int start = tokenBegin; int len; if (bufpos >= tokenBegin) { len = bufpos - tokenBegin + inBuf + 1; } else { len = bufsize - tokenBegin + bufpos + 1 + inBuf; } int i = 0, j = 0, k = 0; int nextColDiff = 0, columnDiff = 0; while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) { bufline[j] = newLine; nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; bufcolumn[j] = newCol + columnDiff; columnDiff = nextColDiff; i++; } if (i < len) { bufline[j] = newLine++; bufcolumn[j] = newCol + columnDiff; while (i++ < len) { if (bufline[j = start % bufsize] != bufline[++start % bufsize]) bufline[j] = newLine++; else bufline[j] = newLine; } } line = bufline[j]; column = bufcolumn[j]; } } /* JavaCC - OriginalChecksum=ab048e2786fbd06222f7612d962d2e6e (do not edit this line) */ cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/Token.java0000644000175000017500000001054711343534514031504 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ /** * Describes the input token stream. */ package net.sourceforge.cobertura.javancss.parser.java15; public class Token { /** * An integer that describes the kind of this token. This numbering * system is determined by JavaCCParser, and a table of these numbers is * stored in the file ...Constants.java. */ public int kind; /** * beginLine and beginColumn describe the position of the first character * of this token; endLine and endColumn describe the position of the * last character of this token. */ public int beginLine, beginColumn, endLine, endColumn; /** * The string image of the token. */ public String image; /** * A reference to the next regular (non-special) token from the input * stream. If this is the last token from the input stream, or if the * token manager has not read tokens beyond this one, this field is * set to null. This is true only if this token is also a regular * token. Otherwise, see below for a description of the contents of * this field. */ public Token next; /** * This field is used to access special tokens that occur prior to this * token, but after the immediately preceding regular (non-special) token. * If there are no such special tokens, this field is set to null. * When there are more than one such special token, this field refers * to the last of these special tokens, which in turn refers to the next * previous special token through its specialToken field, and so on * until the first special token (whose specialToken field is null). * The next fields of special tokens refer to other special tokens that * immediately follow it (without an intervening regular token). If there * is no such token, this field is null. */ public Token specialToken; /** * Returns the image. */ public String toString() { return image; } /** * Returns a new Token object, by default. However, if you want, you * can create and return subclass objects based on the value of ofKind. * Simply add the cases to the switch for all those special cases. * For example, if you have a subclass of Token called IDToken that * you want to create if ofKind is ID, simlpy add something like : * * case MyParserConstants.ID : return new IDToken(); * * to the following switch statement. Then you can cast matchedToken * variable to the appropriate type and use it in your lexical actions. */ public static final Token newToken(int ofKind) { switch(ofKind) { default : return new Token(); case JavaParser15Constants.RUNSIGNEDSHIFT: case JavaParser15Constants.RSIGNEDSHIFT: case JavaParser15Constants.GT: return new GTToken(); } } public static class GTToken extends Token { int realKind = JavaParser15Constants.GT; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/0000755000175000017500000000000011345540725030643 5ustar twernertwerner././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/JavaCharStream.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/JavaCharStrea0000644000175000017500000004151311343534517033250 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 4.1 */ /* JavaCCOptions:STATIC=false */ package net.sourceforge.cobertura.javancss.parser.java15.debug; /** * An implementation of interface CharStream, where the stream is assumed to * contain only ASCII characters (with java-like unicode escape processing). */ public class JavaCharStream { /** Whether parser is static. */ public static final boolean staticFlag = false; static final int hexval(char c) throws java.io.IOException { switch(c) { case '0' : return 0; case '1' : return 1; case '2' : return 2; case '3' : return 3; case '4' : return 4; case '5' : return 5; case '6' : return 6; case '7' : return 7; case '8' : return 8; case '9' : return 9; case 'a' : case 'A' : return 10; case 'b' : case 'B' : return 11; case 'c' : case 'C' : return 12; case 'd' : case 'D' : return 13; case 'e' : case 'E' : return 14; case 'f' : case 'F' : return 15; } throw new java.io.IOException(); // Should never come here } /** Position in buffer. */ public int bufpos = -1; int bufsize; int available; int tokenBegin; protected int bufline[]; protected int bufcolumn[]; protected int column = 0; protected int line = 1; protected boolean prevCharIsCR = false; protected boolean prevCharIsLF = false; protected java.io.Reader inputStream; protected char[] nextCharBuf; protected char[] buffer; protected int maxNextCharInd = 0; protected int nextCharInd = -1; protected int inBuf = 0; protected int tabSize = 8; protected void setTabSize(int i) { tabSize = i; } protected int getTabSize(int i) { return tabSize; } protected void ExpandBuff(boolean wrapAround) { char[] newbuffer = new char[bufsize + 2048]; int newbufline[] = new int[bufsize + 2048]; int newbufcolumn[] = new int[bufsize + 2048]; try { if (wrapAround) { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); bufcolumn = newbufcolumn; bufpos += (bufsize - tokenBegin); } else { System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); buffer = newbuffer; System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); bufline = newbufline; System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); bufcolumn = newbufcolumn; bufpos -= tokenBegin; } } catch (Throwable t) { throw new Error(t.getMessage()); } available = (bufsize += 2048); tokenBegin = 0; } protected void FillBuff() throws java.io.IOException { int i; if (maxNextCharInd == 4096) maxNextCharInd = nextCharInd = 0; try { if ((i = inputStream.read(nextCharBuf, maxNextCharInd, 4096 - maxNextCharInd)) == -1) { inputStream.close(); throw new java.io.IOException(); } else maxNextCharInd += i; return; } catch(java.io.IOException e) { if (bufpos != 0) { --bufpos; backup(0); } else { bufline[bufpos] = line; bufcolumn[bufpos] = column; } throw e; } } protected char ReadByte() throws java.io.IOException { if (++nextCharInd >= maxNextCharInd) FillBuff(); return nextCharBuf[nextCharInd]; } /** @return starting character for token. */ public char BeginToken() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; tokenBegin = bufpos; return buffer[bufpos]; } tokenBegin = 0; bufpos = -1; return readChar(); } protected void AdjustBuffSize() { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = 0; available = tokenBegin; } else ExpandBuff(false); } else if (available > tokenBegin) available = bufsize; else if ((tokenBegin - available) < 2048) ExpandBuff(true); else available = tokenBegin; } protected void UpdateLineColumn(char c) { column++; if (prevCharIsLF) { prevCharIsLF = false; line += (column = 1); } else if (prevCharIsCR) { prevCharIsCR = false; if (c == '\n') { prevCharIsLF = true; } else line += (column = 1); } switch (c) { case '\r' : prevCharIsCR = true; break; case '\n' : prevCharIsLF = true; break; case '\t' : column--; column += (tabSize - (column % tabSize)); break; default : break; } bufline[bufpos] = line; bufcolumn[bufpos] = column; } /** Read a character. */ public char readChar() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; return buffer[bufpos]; } char c; if (++bufpos == available) AdjustBuffSize(); if ((buffer[bufpos] = c = ReadByte()) == '\\') { UpdateLineColumn(c); int backSlashCnt = 1; for (;;) // Read all the backslashes { if (++bufpos == available) AdjustBuffSize(); try { if ((buffer[bufpos] = c = ReadByte()) != '\\') { UpdateLineColumn(c); // found a non-backslash char. if ((c == 'u') && ((backSlashCnt & 1) == 1)) { if (--bufpos < 0) bufpos = bufsize - 1; break; } backup(backSlashCnt); return '\\'; } } catch(java.io.IOException e) { if (backSlashCnt > 1) backup(backSlashCnt-1); return '\\'; } UpdateLineColumn(c); backSlashCnt++; } // Here, we have seen an odd number of backslash's followed by a 'u' try { while ((c = ReadByte()) == 'u') ++column; buffer[bufpos] = c = (char)(hexval(c) << 12 | hexval(ReadByte()) << 8 | hexval(ReadByte()) << 4 | hexval(ReadByte())); column += 4; } catch(java.io.IOException e) { throw new Error("Invalid escape character at line " + line + " column " + column + "."); } if (backSlashCnt == 1) return c; else { backup(backSlashCnt - 1); return '\\'; } } else { UpdateLineColumn(c); return c; } } /** * @deprecated * @see #getEndColumn */ public int getColumn() { return bufcolumn[bufpos]; } /** * @deprecated * @see #getEndLine */ public int getLine() { return bufline[bufpos]; } /** Get end column. */ public int getEndColumn() { return bufcolumn[bufpos]; } /** Get end line. */ public int getEndLine() { return bufline[bufpos]; } /** @return column of token start */ public int getBeginColumn() { return bufcolumn[tokenBegin]; } /** @return line number of token start */ public int getBeginLine() { return bufline[tokenBegin]; } /** Retreat. */ public void backup(int amount) { inBuf += amount; if ((bufpos -= amount) < 0) bufpos += bufsize; } /** Constructor. */ public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { inputStream = dstream; line = startline; column = startcolumn - 1; available = bufsize = buffersize; buffer = new char[buffersize]; bufline = new int[buffersize]; bufcolumn = new int[buffersize]; nextCharBuf = new char[4096]; } /** Constructor. */ public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn) { this(dstream, startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.Reader dstream) { this(dstream, 1, 1, 4096); } /** Reinitialise. */ public void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { inputStream = dstream; line = startline; column = startcolumn - 1; if (buffer == null || buffersize != buffer.length) { available = bufsize = buffersize; buffer = new char[buffersize]; bufline = new int[buffersize]; bufcolumn = new int[buffersize]; nextCharBuf = new char[4096]; } prevCharIsLF = prevCharIsCR = false; tokenBegin = inBuf = maxNextCharInd = 0; nextCharInd = bufpos = -1; } /** Reinitialise. */ public void ReInit(java.io.Reader dstream, int startline, int startcolumn) { ReInit(dstream, startline, startcolumn, 4096); } /** Reinitialise. */ public void ReInit(java.io.Reader dstream) { ReInit(dstream, 1, 1, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException { this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) { this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException { this(dstream, encoding, startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, int startline, int startcolumn) { this(dstream, startline, startcolumn, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException { this(dstream, encoding, 1, 1, 4096); } /** Constructor. */ public JavaCharStream(java.io.InputStream dstream) { this(dstream, 1, 1, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException { ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) { ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException { ReInit(dstream, encoding, startline, startcolumn, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, int startline, int startcolumn) { ReInit(dstream, startline, startcolumn, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException { ReInit(dstream, encoding, 1, 1, 4096); } /** Reinitialise. */ public void ReInit(java.io.InputStream dstream) { ReInit(dstream, 1, 1, 4096); } /** @return token image as String */ public String GetImage() { if (bufpos >= tokenBegin) return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); else return new String(buffer, tokenBegin, bufsize - tokenBegin) + new String(buffer, 0, bufpos + 1); } /** @return suffix */ public char[] GetSuffix(int len) { char[] ret = new char[len]; if ((bufpos + 1) >= len) System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); else { System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, len - bufpos - 1); System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); } return ret; } /** Set buffers back to null when finished. */ public void Done() { nextCharBuf = null; buffer = null; bufline = null; bufcolumn = null; } /** * Method to adjust line and column numbers for the start of a token. */ public void adjustBeginLineColumn(int newLine, int newCol) { int start = tokenBegin; int len; if (bufpos >= tokenBegin) { len = bufpos - tokenBegin + inBuf + 1; } else { len = bufsize - tokenBegin + bufpos + 1 + inBuf; } int i = 0, j = 0, k = 0; int nextColDiff = 0, columnDiff = 0; while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) { bufline[j] = newLine; nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; bufcolumn[j] = newCol + columnDiff; columnDiff = nextColDiff; i++; } if (i < len) { bufline[j] = newLine++; bufcolumn[j] = newCol + columnDiff; while (i++ < len) { if (bufline[j = start % bufsize] != bufline[++start % bufsize]) bufline[j] = newLine++; else bufline[j] = newLine; } } line = bufline[j]; column = bufcolumn[j]; } } /* JavaCC - OriginalChecksum=3bced93e01c0a998378298081a0c2697 (do not edit this line) */ cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/Token.java0000644000175000017500000001060111343534521032557 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ /** * Describes the input token stream. */ package net.sourceforge.cobertura.javancss.parser.java15.debug; public class Token { /** * An integer that describes the kind of this token. This numbering * system is determined by JavaCCParser, and a table of these numbers is * stored in the file ...Constants.java. */ public int kind; /** * beginLine and beginColumn describe the position of the first character * of this token; endLine and endColumn describe the position of the * last character of this token. */ public int beginLine, beginColumn, endLine, endColumn; /** * The string image of the token. */ public String image; /** * A reference to the next regular (non-special) token from the input * stream. If this is the last token from the input stream, or if the * token manager has not read tokens beyond this one, this field is * set to null. This is true only if this token is also a regular * token. Otherwise, see below for a description of the contents of * this field. */ public Token next; /** * This field is used to access special tokens that occur prior to this * token, but after the immediately preceding regular (non-special) token. * If there are no such special tokens, this field is set to null. * When there are more than one such special token, this field refers * to the last of these special tokens, which in turn refers to the next * previous special token through its specialToken field, and so on * until the first special token (whose specialToken field is null). * The next fields of special tokens refer to other special tokens that * immediately follow it (without an intervening regular token). If there * is no such token, this field is null. */ public Token specialToken; /** * Returns the image. */ public String toString() { return image; } /** * Returns a new Token object, by default. However, if you want, you * can create and return subclass objects based on the value of ofKind. * Simply add the cases to the switch for all those special cases. * For example, if you have a subclass of Token called IDToken that * you want to create if ofKind is ID, simlpy add something like : * * case MyParserConstants.ID : return new IDToken(); * * to the following switch statement. Then you can cast matchedToken * variable to the appropriate type and use it in your lexical actions. */ public static final Token newToken(int ofKind) { switch(ofKind) { default : return new Token(); case JavaParser15DebugConstants.RUNSIGNEDSHIFT: case JavaParser15DebugConstants.RSIGNEDSHIFT: case JavaParser15DebugConstants.GT: return new GTToken(); } } public static class GTToken extends Token { int realKind = JavaParser15DebugConstants.GT; } } ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/JavaParser15DebugTokenManager.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/JavaParser15D0000644000175000017500000022101511343534514033074 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaParserTokenManager.java */ package net.sourceforge.cobertura.javancss.parser.java15.debug; import java.io.*; public class JavaParser15DebugTokenManager implements JavaParser15DebugConstants { public java.io.PrintStream debugStream = System.out; public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1, long active2) { switch (pos) { case 0: if ((active0 & 0xfffffffffffff000L) != 0L || (active1 & 0x1L) != 0L) { jjmatchedKind = 76; return 28; } if ((active1 & 0x800000000800000L) != 0L) return 4; if ((active0 & 0x80L) != 0L || (active1 & 0x8040000000000L) != 0L) return 47; return -1; case 1: if ((active0 & 0x803000000L) != 0L) return 28; if ((active0 & 0xfffffff7fcfff000L) != 0L || (active1 & 0x1L) != 0L) { if (jjmatchedPos != 1) { jjmatchedKind = 76; jjmatchedPos = 1; } return 28; } if ((active0 & 0x80L) != 0L) return 45; return -1; case 2: if ((active0 & 0x2000098200000000L) != 0L) return 28; if ((active0 & 0xdffff675fefff000L) != 0L || (active1 & 0x1L) != 0L) { if (jjmatchedPos != 2) { jjmatchedKind = 76; jjmatchedPos = 2; } return 28; } return -1; case 3: if ((active0 & 0x510012040c0b0000L) != 0L) return 28; if ((active0 & 0x8effe571f2f4f000L) != 0L || (active1 & 0x1L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 3; return 28; } return -1; case 4: if ((active0 & 0x6240001e0348000L) != 0L || (active1 & 0x1L) != 0L) return 28; if ((active0 & 0x88dbe57012c07000L) != 0L) { if (jjmatchedPos != 4) { jjmatchedKind = 76; jjmatchedPos = 4; } return 28; } return -1; case 5: if ((active0 & 0x44b042002002000L) != 0L) return 28; if ((active0 & 0x8890e15090c05000L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 5; return 28; } return -1; case 6: if ((active0 & 0x600090804000L) != 0L) return 28; if ((active0 & 0x8890815000401000L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 6; return 28; } return -1; case 7: if ((active0 & 0x880815000000000L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 7; return 28; } if ((active0 & 0x8010000000401000L) != 0L) return 28; return -1; case 8: if ((active0 & 0x800810000000000L) != 0L) return 28; if ((active0 & 0x80005000000000L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 8; return 28; } return -1; case 9: if ((active0 & 0x5000000000L) != 0L) return 28; if ((active0 & 0x80000000000000L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 9; return 28; } return -1; case 10: if ((active0 & 0x80000000000000L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 10; return 28; } return -1; default : return -1; } } private final int jjStartNfa_0(int pos, long active0, long active1, long active2) { return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1, active2), pos + 1); } private final int jjStopAtPos(int pos, int kind) { jjmatchedKind = kind; jjmatchedPos = pos; return pos + 1; } private final int jjStartNfaWithStates_0(int pos, int kind, int state) { jjmatchedKind = kind; jjmatchedPos = pos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return pos + 1; } return jjMoveNfa_0(state, pos + 1); } private final int jjMoveStringLiteralDfa0_0() { switch(curChar) { case 26: return jjStopAtPos(0, 127); case 33: jjmatchedKind = 91; return jjMoveStringLiteralDfa1_0(0x0L, 0x400000000L); case 37: jjmatchedKind = 110; return jjMoveStringLiteralDfa1_0(0x0L, 0x80000000000000L); case 38: jjmatchedKind = 107; return jjMoveStringLiteralDfa1_0(0x0L, 0x10001000000000L); case 40: return jjStopAtPos(0, 79); case 41: return jjStopAtPos(0, 80); case 42: jjmatchedKind = 105; return jjMoveStringLiteralDfa1_0(0x0L, 0x4000000000000L); case 43: jjmatchedKind = 103; return jjMoveStringLiteralDfa1_0(0x0L, 0x1002000000000L); case 44: return jjStopAtPos(0, 86); case 45: jjmatchedKind = 104; return jjMoveStringLiteralDfa1_0(0x0L, 0x2004000000000L); case 46: jjmatchedKind = 87; return jjMoveStringLiteralDfa1_0(0x0L, 0x800000000000000L); case 47: jjmatchedKind = 106; return jjMoveStringLiteralDfa1_0(0x80L, 0x8000000000000L); case 58: return jjStopAtPos(0, 94); case 59: return jjStopAtPos(0, 85); case 60: jjmatchedKind = 90; return jjMoveStringLiteralDfa1_0(0x0L, 0x100800100000000L); case 61: jjmatchedKind = 89; return jjMoveStringLiteralDfa1_0(0x0L, 0x80000000L); case 62: jjmatchedKind = 126; return jjMoveStringLiteralDfa1_0(0x0L, 0x3600000200000000L); case 63: return jjStopAtPos(0, 93); case 64: return jjStopAtPos(0, 88); case 91: return jjStopAtPos(0, 83); case 93: return jjStopAtPos(0, 84); case 94: jjmatchedKind = 109; return jjMoveStringLiteralDfa1_0(0x0L, 0x40000000000000L); case 97: return jjMoveStringLiteralDfa1_0(0x3000L, 0x0L); case 98: return jjMoveStringLiteralDfa1_0(0x1c000L, 0x0L); case 99: return jjMoveStringLiteralDfa1_0(0x7e0000L, 0x0L); case 100: return jjMoveStringLiteralDfa1_0(0x3800000L, 0x0L); case 101: return jjMoveStringLiteralDfa1_0(0x1c000000L, 0x0L); case 102: return jjMoveStringLiteralDfa1_0(0x3e0000000L, 0x0L); case 103: return jjMoveStringLiteralDfa1_0(0x400000000L, 0x0L); case 105: return jjMoveStringLiteralDfa1_0(0x1f800000000L, 0x0L); case 108: return jjMoveStringLiteralDfa1_0(0x20000000000L, 0x0L); case 110: return jjMoveStringLiteralDfa1_0(0x1c0000000000L, 0x0L); case 112: return jjMoveStringLiteralDfa1_0(0x1e00000000000L, 0x0L); case 114: return jjMoveStringLiteralDfa1_0(0x2000000000000L, 0x0L); case 115: return jjMoveStringLiteralDfa1_0(0xfc000000000000L, 0x0L); case 116: return jjMoveStringLiteralDfa1_0(0x3f00000000000000L, 0x0L); case 118: return jjMoveStringLiteralDfa1_0(0xc000000000000000L, 0x0L); case 119: return jjMoveStringLiteralDfa1_0(0x0L, 0x1L); case 123: return jjStopAtPos(0, 81); case 124: jjmatchedKind = 108; return jjMoveStringLiteralDfa1_0(0x0L, 0x20000800000000L); case 125: return jjStopAtPos(0, 82); case 126: return jjStopAtPos(0, 92); default : return jjMoveNfa_0(0, 0); } } private final int jjMoveStringLiteralDfa1_0(long active0, long active1) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(0, active0, active1, 0L); return 1; } switch(curChar) { case 38: if ((active1 & 0x1000000000L) != 0L) return jjStopAtPos(1, 100); break; case 42: if ((active0 & 0x80L) != 0L) return jjStartNfaWithStates_0(1, 7, 45); break; case 43: if ((active1 & 0x2000000000L) != 0L) return jjStopAtPos(1, 101); break; case 45: if ((active1 & 0x4000000000L) != 0L) return jjStopAtPos(1, 102); break; case 46: return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x800000000000000L); case 60: if ((active1 & 0x800000000000L) != 0L) { jjmatchedKind = 111; jjmatchedPos = 1; } return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x100000000000000L); case 61: if ((active1 & 0x80000000L) != 0L) return jjStopAtPos(1, 95); else if ((active1 & 0x100000000L) != 0L) return jjStopAtPos(1, 96); else if ((active1 & 0x200000000L) != 0L) return jjStopAtPos(1, 97); else if ((active1 & 0x400000000L) != 0L) return jjStopAtPos(1, 98); else if ((active1 & 0x1000000000000L) != 0L) return jjStopAtPos(1, 112); else if ((active1 & 0x2000000000000L) != 0L) return jjStopAtPos(1, 113); else if ((active1 & 0x4000000000000L) != 0L) return jjStopAtPos(1, 114); else if ((active1 & 0x8000000000000L) != 0L) return jjStopAtPos(1, 115); else if ((active1 & 0x10000000000000L) != 0L) return jjStopAtPos(1, 116); else if ((active1 & 0x20000000000000L) != 0L) return jjStopAtPos(1, 117); else if ((active1 & 0x40000000000000L) != 0L) return jjStopAtPos(1, 118); else if ((active1 & 0x80000000000000L) != 0L) return jjStopAtPos(1, 119); break; case 62: if ((active1 & 0x2000000000000000L) != 0L) { jjmatchedKind = 125; jjmatchedPos = 1; } return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x1600000000000000L); case 97: return jjMoveStringLiteralDfa2_0(active0, 0x240020060000L, active1, 0L); case 98: return jjMoveStringLiteralDfa2_0(active0, 0x1000L, active1, 0L); case 101: return jjMoveStringLiteralDfa2_0(active0, 0x2080000800000L, active1, 0L); case 102: if ((active0 & 0x800000000L) != 0L) return jjStartNfaWithStates_0(1, 35, 28); break; case 104: return jjMoveStringLiteralDfa2_0(active0, 0x704000000080000L, active1, 0x1L); case 105: return jjMoveStringLiteralDfa2_0(active0, 0xc0000000L, active1, 0L); case 108: return jjMoveStringLiteralDfa2_0(active0, 0x104100000L, active1, 0L); case 109: return jjMoveStringLiteralDfa2_0(active0, 0x3000000000L, active1, 0L); case 110: return jjMoveStringLiteralDfa2_0(active0, 0x1c008000000L, active1, 0L); case 111: if ((active0 & 0x1000000L) != 0L) { jjmatchedKind = 24; jjmatchedPos = 1; } return jjMoveStringLiteralDfa2_0(active0, 0xc000020602604000L, active1, 0L); case 114: return jjMoveStringLiteralDfa2_0(active0, 0x3800c00000008000L, active1, 0L); case 115: return jjMoveStringLiteralDfa2_0(active0, 0x2000L, active1, 0L); case 116: return jjMoveStringLiteralDfa2_0(active0, 0x18000000000000L, active1, 0L); case 117: return jjMoveStringLiteralDfa2_0(active0, 0x21100000000000L, active1, 0L); case 119: return jjMoveStringLiteralDfa2_0(active0, 0x40000000000000L, active1, 0L); case 120: return jjMoveStringLiteralDfa2_0(active0, 0x10000000L, active1, 0L); case 121: return jjMoveStringLiteralDfa2_0(active0, 0x80000000010000L, active1, 0L); case 124: if ((active1 & 0x800000000L) != 0L) return jjStopAtPos(1, 99); break; default : break; } return jjStartNfa_0(0, active0, active1, 0L); } private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(0, old0, old1, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(1, active0, active1, 0L); return 2; } switch(curChar) { case 46: if ((active1 & 0x800000000000000L) != 0L) return jjStopAtPos(2, 123); break; case 61: if ((active1 & 0x100000000000000L) != 0L) return jjStopAtPos(2, 120); else if ((active1 & 0x200000000000000L) != 0L) return jjStopAtPos(2, 121); break; case 62: if ((active1 & 0x1000000000000000L) != 0L) { jjmatchedKind = 124; jjmatchedPos = 2; } return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x400000000000000L); case 97: return jjMoveStringLiteralDfa3_0(active0, 0x808000000180000L, active1, 0L); case 98: return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa3_0(active0, 0x200000000000L, active1, 0L); case 101: return jjMoveStringLiteralDfa3_0(active0, 0x8000L, active1, 0L); case 102: return jjMoveStringLiteralDfa3_0(active0, 0x800000L, active1, 0L); case 105: return jjMoveStringLiteralDfa3_0(active0, 0x4140400000000000L, active1, 0x1L); case 108: return jjMoveStringLiteralDfa3_0(active0, 0x8000100020000000L, active1, 0L); case 110: return jjMoveStringLiteralDfa3_0(active0, 0x800200c0600000L, active1, 0L); case 111: return jjMoveStringLiteralDfa3_0(active0, 0x4800100004000L, active1, 0L); case 112: return jjMoveStringLiteralDfa3_0(active0, 0x20003000000000L, active1, 0L); case 114: if ((active0 & 0x200000000L) != 0L) return jjStartNfaWithStates_0(2, 33, 28); return jjMoveStringLiteralDfa3_0(active0, 0x610000000000000L, active1, 0L); case 115: return jjMoveStringLiteralDfa3_0(active0, 0x4004023000L, active1, 0L); case 116: if ((active0 & 0x8000000000L) != 0L) { jjmatchedKind = 39; jjmatchedPos = 2; } return jjMoveStringLiteralDfa3_0(active0, 0x2050410050000L, active1, 0L); case 117: return jjMoveStringLiteralDfa3_0(active0, 0x100000000a000000L, active1, 0L); case 119: if ((active0 & 0x80000000000L) != 0L) return jjStartNfaWithStates_0(2, 43, 28); break; case 121: if ((active0 & 0x2000000000000000L) != 0L) return jjStartNfaWithStates_0(2, 61, 28); break; default : break; } return jjStartNfa_0(1, active0, active1, 0L); } private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(1, old0, old1, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(2, active0, active1, 0L); return 3; } switch(curChar) { case 61: if ((active1 & 0x400000000000000L) != 0L) return jjStopAtPos(3, 122); break; case 97: return jjMoveStringLiteralDfa4_0(active0, 0x80000001c0808000L, active1, 0L); case 98: return jjMoveStringLiteralDfa4_0(active0, 0x2000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa4_0(active0, 0x80000000040000L, active1, 0L); case 100: if ((active0 & 0x4000000000000000L) != 0L) return jjStartNfaWithStates_0(3, 62, 28); break; case 101: if ((active0 & 0x10000L) != 0L) return jjStartNfaWithStates_0(3, 16, 28); else if ((active0 & 0x20000L) != 0L) return jjStartNfaWithStates_0(3, 17, 28); else if ((active0 & 0x4000000L) != 0L) return jjStartNfaWithStates_0(3, 26, 28); else if ((active0 & 0x1000000000000000L) != 0L) return jjStartNfaWithStates_0(3, 60, 28); return jjMoveStringLiteralDfa4_0(active0, 0x20010010002000L, active1, 0L); case 103: if ((active0 & 0x20000000000L) != 0L) return jjStartNfaWithStates_0(3, 41, 28); break; case 105: return jjMoveStringLiteralDfa4_0(active0, 0x10040000000000L, active1, 0L); case 107: return jjMoveStringLiteralDfa4_0(active0, 0x200000000000L, active1, 0L); case 108: if ((active0 & 0x100000000000L) != 0L) return jjStartNfaWithStates_0(3, 44, 28); return jjMoveStringLiteralDfa4_0(active0, 0x1001000004000L, active1, 0x1L); case 109: if ((active0 & 0x8000000L) != 0L) return jjStartNfaWithStates_0(3, 27, 28); break; case 110: return jjMoveStringLiteralDfa4_0(active0, 0x800000000000000L, active1, 0L); case 111: if ((active0 & 0x400000000L) != 0L) return jjStartNfaWithStates_0(3, 34, 28); return jjMoveStringLiteralDfa4_0(active0, 0x600002000000000L, active1, 0L); case 114: if ((active0 & 0x80000L) != 0L) return jjStartNfaWithStates_0(3, 19, 28); return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000L, active1, 0L); case 115: if ((active0 & 0x100000000000000L) != 0L) return jjStartNfaWithStates_0(3, 56, 28); return jjMoveStringLiteralDfa4_0(active0, 0x20300000L, active1, 0L); case 116: return jjMoveStringLiteralDfa4_0(active0, 0x48804000401000L, active1, 0L); case 117: return jjMoveStringLiteralDfa4_0(active0, 0x2000000000000L, active1, 0L); case 118: return jjMoveStringLiteralDfa4_0(active0, 0x400000000000L, active1, 0L); default : break; } return jjStartNfa_0(2, active0, active1, 0L); } private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(2, old0, old1, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(3, active0, active1, 0L); return 4; } switch(curChar) { case 97: return jjMoveStringLiteralDfa5_0(active0, 0x604000000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa5_0(active0, 0x50000000000000L, active1, 0L); case 101: if ((active0 & 0x20000000L) != 0L) return jjStartNfaWithStates_0(4, 29, 28); else if ((active1 & 0x1L) != 0L) return jjStartNfaWithStates_0(4, 64, 28); return jjMoveStringLiteralDfa5_0(active0, 0x801000004000L, active1, 0L); case 104: if ((active0 & 0x40000L) != 0L) return jjStartNfaWithStates_0(4, 18, 28); return jjMoveStringLiteralDfa5_0(active0, 0x80000000000000L, active1, 0L); case 105: return jjMoveStringLiteralDfa5_0(active0, 0x9000000400000L, active1, 0L); case 107: if ((active0 & 0x8000L) != 0L) return jjStartNfaWithStates_0(4, 15, 28); break; case 108: if ((active0 & 0x40000000L) != 0L) { jjmatchedKind = 30; jjmatchedPos = 4; } return jjMoveStringLiteralDfa5_0(active0, 0x82000000L, active1, 0L); case 110: return jjMoveStringLiteralDfa5_0(active0, 0x10000000L, active1, 0L); case 114: if ((active0 & 0x20000000000000L) != 0L) return jjStartNfaWithStates_0(4, 53, 28); return jjMoveStringLiteralDfa5_0(active0, 0x2012000003000L, active1, 0L); case 115: if ((active0 & 0x100000L) != 0L) return jjStartNfaWithStates_0(4, 20, 28); return jjMoveStringLiteralDfa5_0(active0, 0x800000000000000L, active1, 0L); case 116: if ((active0 & 0x200000L) != 0L) return jjStartNfaWithStates_0(4, 21, 28); else if ((active0 & 0x100000000L) != 0L) return jjStartNfaWithStates_0(4, 32, 28); else if ((active0 & 0x4000000000000L) != 0L) return jjStartNfaWithStates_0(4, 50, 28); return jjMoveStringLiteralDfa5_0(active0, 0x8000000000000000L, active1, 0L); case 117: return jjMoveStringLiteralDfa5_0(active0, 0x800000L, active1, 0L); case 118: return jjMoveStringLiteralDfa5_0(active0, 0x40000000000L, active1, 0L); case 119: if ((active0 & 0x200000000000000L) != 0L) { jjmatchedKind = 57; jjmatchedPos = 4; } return jjMoveStringLiteralDfa5_0(active0, 0x400000000000000L, active1, 0L); default : break; } return jjStartNfa_0(3, active0, active1, 0L); } private final int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(3, old0, old1, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(4, active0, 0L, 0L); return 5; } switch(curChar) { case 97: return jjMoveStringLiteralDfa6_0(active0, 0x5000L); case 99: if ((active0 & 0x1000000000000L) != 0L) return jjStartNfaWithStates_0(5, 48, 28); else if ((active0 & 0x8000000000000L) != 0L) return jjStartNfaWithStates_0(5, 51, 28); return jjMoveStringLiteralDfa6_0(active0, 0x800000000000L); case 100: return jjMoveStringLiteralDfa6_0(active0, 0x10000000L); case 101: if ((active0 & 0x2000000L) != 0L) return jjStartNfaWithStates_0(5, 25, 28); else if ((active0 & 0x40000000000L) != 0L) return jjStartNfaWithStates_0(5, 42, 28); break; case 102: return jjMoveStringLiteralDfa6_0(active0, 0x10000000000L); case 103: return jjMoveStringLiteralDfa6_0(active0, 0x200000000000L); case 104: if ((active0 & 0x40000000000000L) != 0L) return jjStartNfaWithStates_0(5, 54, 28); break; case 105: return jjMoveStringLiteralDfa6_0(active0, 0x8800000000000000L); case 108: return jjMoveStringLiteralDfa6_0(active0, 0x80800000L); case 109: return jjMoveStringLiteralDfa6_0(active0, 0x1000000000L); case 110: if ((active0 & 0x2000000000000L) != 0L) return jjStartNfaWithStates_0(5, 49, 28); return jjMoveStringLiteralDfa6_0(active0, 0x4000400000L); case 114: return jjMoveStringLiteralDfa6_0(active0, 0x80000000000000L); case 115: if ((active0 & 0x400000000000000L) != 0L) return jjStartNfaWithStates_0(5, 58, 28); break; case 116: if ((active0 & 0x2000L) != 0L) return jjStartNfaWithStates_0(5, 13, 28); else if ((active0 & 0x2000000000L) != 0L) return jjStartNfaWithStates_0(5, 37, 28); return jjMoveStringLiteralDfa6_0(active0, 0x10400000000000L); default : break; } return jjStartNfa_0(4, active0, 0L, 0L); } private final int jjMoveStringLiteralDfa6_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(4, old0, 0L, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(5, active0, 0L, 0L); return 6; } switch(curChar) { case 97: return jjMoveStringLiteralDfa7_0(active0, 0x10000000000L); case 99: return jjMoveStringLiteralDfa7_0(active0, 0x4000001000L); case 101: if ((active0 & 0x200000000000L) != 0L) return jjStartNfaWithStates_0(6, 45, 28); else if ((active0 & 0x400000000000L) != 0L) return jjStartNfaWithStates_0(6, 46, 28); return jjMoveStringLiteralDfa7_0(active0, 0x800001000000000L); case 102: return jjMoveStringLiteralDfa7_0(active0, 0x10000000000000L); case 108: return jjMoveStringLiteralDfa7_0(active0, 0x8000000000000000L); case 110: if ((active0 & 0x4000L) != 0L) return jjStartNfaWithStates_0(6, 14, 28); break; case 111: return jjMoveStringLiteralDfa7_0(active0, 0x80000000000000L); case 115: if ((active0 & 0x10000000L) != 0L) return jjStartNfaWithStates_0(6, 28, 28); break; case 116: if ((active0 & 0x800000L) != 0L) return jjStartNfaWithStates_0(6, 23, 28); return jjMoveStringLiteralDfa7_0(active0, 0x800000000000L); case 117: return jjMoveStringLiteralDfa7_0(active0, 0x400000L); case 121: if ((active0 & 0x80000000L) != 0L) return jjStartNfaWithStates_0(6, 31, 28); break; default : break; } return jjStartNfa_0(5, active0, 0L, 0L); } private final int jjMoveStringLiteralDfa7_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(5, old0, 0L, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(6, active0, 0L, 0L); return 7; } switch(curChar) { case 99: return jjMoveStringLiteralDfa8_0(active0, 0x10000000000L); case 101: if ((active0 & 0x400000L) != 0L) return jjStartNfaWithStates_0(7, 22, 28); else if ((active0 & 0x8000000000000000L) != 0L) return jjStartNfaWithStates_0(7, 63, 28); return jjMoveStringLiteralDfa8_0(active0, 0x804000000000L); case 110: return jjMoveStringLiteralDfa8_0(active0, 0x880001000000000L); case 112: if ((active0 & 0x10000000000000L) != 0L) return jjStartNfaWithStates_0(7, 52, 28); break; case 116: if ((active0 & 0x1000L) != 0L) return jjStartNfaWithStates_0(7, 12, 28); break; default : break; } return jjStartNfa_0(6, active0, 0L, 0L); } private final int jjMoveStringLiteralDfa8_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(6, old0, 0L, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(7, active0, 0L, 0L); return 8; } switch(curChar) { case 100: if ((active0 & 0x800000000000L) != 0L) return jjStartNfaWithStates_0(8, 47, 28); break; case 101: if ((active0 & 0x10000000000L) != 0L) return jjStartNfaWithStates_0(8, 40, 28); break; case 105: return jjMoveStringLiteralDfa9_0(active0, 0x80000000000000L); case 111: return jjMoveStringLiteralDfa9_0(active0, 0x4000000000L); case 116: if ((active0 & 0x800000000000000L) != 0L) return jjStartNfaWithStates_0(8, 59, 28); return jjMoveStringLiteralDfa9_0(active0, 0x1000000000L); default : break; } return jjStartNfa_0(7, active0, 0L, 0L); } private final int jjMoveStringLiteralDfa9_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(7, old0, 0L, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(8, active0, 0L, 0L); return 9; } switch(curChar) { case 102: if ((active0 & 0x4000000000L) != 0L) return jjStartNfaWithStates_0(9, 38, 28); break; case 115: if ((active0 & 0x1000000000L) != 0L) return jjStartNfaWithStates_0(9, 36, 28); break; case 122: return jjMoveStringLiteralDfa10_0(active0, 0x80000000000000L); default : break; } return jjStartNfa_0(8, active0, 0L, 0L); } private final int jjMoveStringLiteralDfa10_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(8, old0, 0L, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(9, active0, 0L, 0L); return 10; } switch(curChar) { case 101: return jjMoveStringLiteralDfa11_0(active0, 0x80000000000000L); default : break; } return jjStartNfa_0(9, active0, 0L, 0L); } private final int jjMoveStringLiteralDfa11_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(9, old0, 0L, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(10, active0, 0L, 0L); return 11; } switch(curChar) { case 100: if ((active0 & 0x80000000000000L) != 0L) return jjStartNfaWithStates_0(11, 55, 28); break; default : break; } return jjStartNfa_0(10, active0, 0L, 0L); } private final void jjCheckNAdd(int state) { if (jjrounds[state] != jjround) { jjstateSet[jjnewStateCnt++] = state; jjrounds[state] = jjround; } } private final void jjAddStates(int start, int end) { do { jjstateSet[jjnewStateCnt++] = jjnextStates[start]; } while (start++ != end); } private final void jjCheckNAddTwoStates(int state1, int state2) { jjCheckNAdd(state1); jjCheckNAdd(state2); } private final void jjCheckNAddStates(int start, int end) { do { jjCheckNAdd(jjnextStates[start]); } while (start++ != end); } private final void jjCheckNAddStates(int start) { jjCheckNAdd(jjnextStates[start]); jjCheckNAdd(jjnextStates[start + 1]); } static final long[] jjbitVec0 = { 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL }; static final long[] jjbitVec2 = { 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL }; static final long[] jjbitVec3 = { 0xfff0000000200002L, 0xffffffffffffdfffL, 0xfffff00f7fffffffL, 0x12000000007fffffL }; static final long[] jjbitVec4 = { 0x0L, 0x0L, 0x420043c00000000L, 0xff7fffffff7fffffL }; static final long[] jjbitVec5 = { 0xffffcffffffffL, 0xffffffffffff0000L, 0xf9ff3fffffffffffL, 0x401f00030003L }; static final long[] jjbitVec6 = { 0x0L, 0x400000000000000L, 0xfffffffbffffd740L, 0xffffffcff7fffL }; static final long[] jjbitVec7 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xfffffffffffff003L, 0x33fffffffff199fL }; static final long[] jjbitVec8 = { 0xfffe000000000000L, 0xfffffffe027fffffL, 0xffL, 0x707ffffff0000L }; static final long[] jjbitVec9 = { 0x7fffffe00000000L, 0xfffe0000000007ffL, 0xffffffffffffffffL, 0x1c000060002fffffL }; static final long[] jjbitVec10 = { 0x1ffffffd0000L, 0x0L, 0x3fffffffffL, 0x0L }; static final long[] jjbitVec11 = { 0x23ffffffffffffe0L, 0x3ff010000L, 0x3c5fdfffff99fe0L, 0xf0003b0000000L }; static final long[] jjbitVec12 = { 0x36dfdfffff987e0L, 0x1c00005e000000L, 0x23edfdfffffbafe0L, 0x100010000L }; static final long[] jjbitVec13 = { 0x23cdfdfffff99fe0L, 0x3b0000000L, 0x3bfc718d63dc7e0L, 0x0L }; static final long[] jjbitVec14 = { 0x3effdfffffddfe0L, 0x300000000L, 0x3effdfffffddfe0L, 0x340000000L }; static final long[] jjbitVec15 = { 0x3fffdfffffddfe0L, 0x300000000L, 0x2ffbfffffc7fffe0L, 0x7fL }; static final long[] jjbitVec16 = { 0x800dfffffffffffeL, 0x7fL, 0x200decaefef02596L, 0x3000005fL }; static final long[] jjbitVec17 = { 0x1L, 0x7fffffffeffL, 0xf00L, 0x0L }; static final long[] jjbitVec18 = { 0x6fbffffffffL, 0x3f0000L, 0xffffffff00000000L, 0x7fffffffff003fL }; static final long[] jjbitVec19 = { 0xffffffffffffffffL, 0xffffffff83ffffffL, 0xffffff07ffffffffL, 0x3ffffffffffffffL }; static final long[] jjbitVec20 = { 0xffffffffffffff7fL, 0xffffffff3d7f3d7fL, 0x7f3d7fffffff3d7fL, 0xffff7fffff7f7f3dL }; static final long[] jjbitVec21 = { 0xffffffff7f3d7fffL, 0x7ffff7fL, 0xffffffff00000000L, 0x1fffffffffffffL }; static final long[] jjbitVec22 = { 0xffffffffffffffffL, 0x7f9fffffffffffL, 0xffffffff07fffffeL, 0x7ffffffffffL }; static final long[] jjbitVec23 = { 0x0L, 0x0L, 0xfffffffffffffL, 0x8000000L }; static final long[] jjbitVec24 = { 0xffffffff00000000L, 0xffffffffffffffL, 0x1ffffffffffL, 0x0L }; static final long[] jjbitVec25 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffff0fffffffL, 0x3ffffffffffffffL }; static final long[] jjbitVec26 = { 0xffffffff3f3fffffL, 0x3fffffffaaff3f3fL, 0x5fdfffffffffffffL, 0x1fdc1fff0fcf1fdcL }; static final long[] jjbitVec27 = { 0x8000000000000000L, 0x8000000000000001L, 0xffff00000000L, 0x0L }; static final long[] jjbitVec28 = { 0x3fbbd503e2ffc84L, 0xffffffff00000000L, 0xfL, 0x0L }; static final long[] jjbitVec29 = { 0x73e03fe000000e0L, 0xfffffffffffffffeL, 0xfffffffe601fffffL, 0x7fffffffffffffffL }; static final long[] jjbitVec30 = { 0xfffe1fffffffffe0L, 0xffffffffffffffffL, 0xffffff00007fffL, 0x0L }; static final long[] jjbitVec31 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0x3fffffffffffffL, 0x0L }; static final long[] jjbitVec32 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0x3fffffffffL, 0x0L }; static final long[] jjbitVec33 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0x1fffL, 0x0L }; static final long[] jjbitVec34 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xfffffffffL, 0x0L }; static final long[] jjbitVec35 = { 0x3fffffffffffL, 0x0L, 0x0L, 0x0L }; static final long[] jjbitVec36 = { 0x5f7ffdffa0f8007fL, 0xffffffffffffffdbL, 0x3ffffffffffffL, 0xfffffffffff80000L }; static final long[] jjbitVec37 = { 0x3fffffffffffffffL, 0xffffffffffff0000L, 0xfffffffffffcffffL, 0xfff0000000000ffL }; static final long[] jjbitVec38 = { 0x18000000000000L, 0xffd702000000e000L, 0xffffffffffffffffL, 0x1fffffffffffffffL }; static final long[] jjbitVec39 = { 0x87fffffe00000010L, 0xffffffe007fffffeL, 0x7fffffffffffffffL, 0x631cfcfcfcL }; static final long[] jjbitVec40 = { 0x0L, 0x0L, 0x420043cffffffffL, 0xff7fffffff7fffffL }; static final long[] jjbitVec41 = { 0xffffffffffffffffL, 0x400000700007fffL, 0xfffffffbffffd740L, 0xffffffcff7fffL }; static final long[] jjbitVec42 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xfffffffffffff07bL, 0x33fffffffff199fL }; static final long[] jjbitVec43 = { 0xfffe000000000000L, 0xfffffffe027fffffL, 0xbbfffffbfffe00ffL, 0x707ffffff0016L }; static final long[] jjbitVec44 = { 0x7fffffe00000000L, 0xffff03ff003fffffL, 0xffffffffffffffffL, 0x1fff3dff9fefffffL }; static final long[] jjbitVec45 = { 0xffff1fffffff8000L, 0x7ffL, 0x1ffffffffffffL, 0x0L }; static final long[] jjbitVec46 = { 0xf3ffffffffffffeeL, 0xffcfff1f3fffL, 0xd3c5fdfffff99feeL, 0xfffcfb080399fL }; static final long[] jjbitVec47 = { 0xd36dfdfffff987e4L, 0x1fffc05e003987L, 0xf3edfdfffffbafeeL, 0xffc100013bbfL }; static final long[] jjbitVec48 = { 0xf3cdfdfffff99feeL, 0xffc3b0c0398fL, 0xc3bfc718d63dc7ecL, 0xff8000803dc7L }; static final long[] jjbitVec49 = { 0xc3effdfffffddfeeL, 0xffc300603ddfL, 0xc3effdfffffddfecL, 0xffc340603ddfL }; static final long[] jjbitVec50 = { 0xc3fffdfffffddfecL, 0xffc300803dcfL, 0x2ffbfffffc7fffecL, 0xc0000ff5f847fL }; static final long[] jjbitVec51 = { 0x87fffffffffffffeL, 0x3ff7fffL, 0x3bffecaefef02596L, 0x33ff3f5fL }; static final long[] jjbitVec52 = { 0xc2a003ff03000001L, 0xfffe07fffffffeffL, 0x1ffffffffeff0fdfL, 0x40L }; static final long[] jjbitVec53 = { 0x3c7f6fbffffffffL, 0x3ff03ffL, 0xffffffff00000000L, 0x7fffffffff003fL }; static final long[] jjbitVec54 = { 0xffffffff7f3d7fffL, 0x3fe0007ffff7fL, 0xffffffff00000000L, 0x1fffffffffffffL }; static final long[] jjbitVec55 = { 0x0L, 0x0L, 0xffffffffffffffffL, 0x3ff080fffffL }; static final long[] jjbitVec56 = { 0xffffffff03ff7800L, 0xffffffffffffffL, 0x3ffffffffffL, 0x0L }; static final long[] jjbitVec57 = { 0x80007c000000f000L, 0x8000fc0000000001L, 0xffff00000000L, 0x21fff0000L }; static final long[] jjbitVec58 = { 0x73efffe000000e0L, 0xfffffffffffffffeL, 0xfffffffe661fffffL, 0x7fffffffffffffffL }; static final long[] jjbitVec59 = { 0x5f7ffdffe0f8007fL, 0xffffffffffffffdbL, 0x3ffffffffffffL, 0xfffffffffff80000L }; static final long[] jjbitVec60 = { 0x18000f00000000L, 0xffd702000000e000L, 0xffffffffffffffffL, 0x9fffffffffffffffL }; static final long[] jjbitVec61 = { 0x87fffffe03ff0010L, 0xffffffe007fffffeL, 0x7fffffffffffffffL, 0xe0000631cfcfcfcL }; private final int jjMoveNfa_0(int startState, int curPos) { int[] nextStates; int startsAt = 0; jjnewStateCnt = 70; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 47: if (curChar == 47) { if (kind > 8) kind = 8; jjCheckNAddStates(0, 2); } else if (curChar == 42) jjstateSet[jjnewStateCnt++] = 45; break; case 0: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(3, 9); else if (curChar == 47) jjAddStates(10, 11); else if (curChar == 36) { if (kind > 76) kind = 76; jjCheckNAdd(28); } else if (curChar == 34) jjCheckNAddStates(12, 14); else if (curChar == 39) jjAddStates(15, 16); else if (curChar == 46) jjCheckNAdd(4); if ((0x3fe000000000000L & l) != 0L) { if (kind > 65) kind = 65; jjCheckNAddTwoStates(1, 2); } else if (curChar == 48) { if (kind > 65) kind = 65; jjCheckNAddStates(17, 21); } break; case 1: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 65) kind = 65; jjCheckNAddTwoStates(1, 2); break; case 3: if (curChar == 46) jjCheckNAdd(4); break; case 4: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddStates(22, 24); break; case 6: if ((0x280000000000L & l) != 0L) jjCheckNAdd(7); break; case 7: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddTwoStates(7, 8); break; case 9: if (curChar == 39) jjAddStates(15, 16); break; case 10: if ((0xffffff7fffffdbffL & l) != 0L) jjCheckNAdd(11); break; case 11: if (curChar == 39 && kind > 74) kind = 74; break; case 13: if ((0x8400000000L & l) != 0L) jjCheckNAdd(11); break; case 14: if ((0xff000000000000L & l) != 0L) jjCheckNAddTwoStates(15, 11); break; case 15: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(11); break; case 16: if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 17; break; case 17: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(15); break; case 18: if (curChar == 34) jjCheckNAddStates(12, 14); break; case 19: if ((0xfffffffbffffdbffL & l) != 0L) jjCheckNAddStates(12, 14); break; case 21: if ((0x8400000000L & l) != 0L) jjCheckNAddStates(12, 14); break; case 22: if (curChar == 34 && kind > 75) kind = 75; break; case 23: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(25, 28); break; case 24: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(12, 14); break; case 25: if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(24); break; case 27: if (curChar != 36) break; if (kind > 76) kind = 76; jjCheckNAdd(28); break; case 28: if ((0x3ff00100fffc1ffL & l) == 0L) break; if (kind > 76) kind = 76; jjCheckNAdd(28); break; case 29: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(3, 9); break; case 30: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(29, 31); break; case 32: if ((0x280000000000L & l) != 0L) jjCheckNAdd(33); break; case 33: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(33, 8); break; case 34: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 36: if ((0x280000000000L & l) != 0L) jjCheckNAdd(37); break; case 37: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddTwoStates(37, 8); break; case 38: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(38, 39); break; case 39: if (curChar != 46) break; if (kind > 69) kind = 69; jjCheckNAddStates(32, 34); break; case 40: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddStates(32, 34); break; case 42: if ((0x280000000000L & l) != 0L) jjCheckNAdd(43); break; case 43: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddTwoStates(43, 8); break; case 44: if (curChar == 47) jjAddStates(10, 11); break; case 45: if (curChar == 42) jjstateSet[jjnewStateCnt++] = 46; break; case 46: if ((0xffff7fffffffffffL & l) != 0L && kind > 6) kind = 6; break; case 48: if (curChar != 47) break; if (kind > 8) kind = 8; jjCheckNAddStates(0, 2); break; case 49: if ((0xffffffffffffdbffL & l) == 0L) break; if (kind > 8) kind = 8; jjCheckNAddStates(0, 2); break; case 50: if ((0x2400L & l) != 0L && kind > 8) kind = 8; break; case 51: if (curChar == 10 && kind > 8) kind = 8; break; case 52: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 51; break; case 53: if (curChar != 48) break; if (kind > 65) kind = 65; jjCheckNAddStates(17, 21); break; case 55: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 65) kind = 65; jjCheckNAddTwoStates(55, 2); break; case 56: if ((0xff000000000000L & l) == 0L) break; if (kind > 65) kind = 65; jjCheckNAddTwoStates(56, 2); break; case 58: if ((0x3ff000000000000L & l) != 0L) jjAddStates(35, 36); break; case 59: if (curChar == 46) jjCheckNAdd(60); break; case 60: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(60, 61); break; case 62: if ((0x280000000000L & l) != 0L) jjCheckNAdd(63); break; case 63: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddTwoStates(63, 8); break; case 65: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(37, 39); break; case 66: if (curChar == 46) jjCheckNAdd(67); break; case 68: if ((0x280000000000L & l) != 0L) jjCheckNAdd(69); break; case 69: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddTwoStates(69, 8); break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 0: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 76) kind = 76; jjCheckNAdd(28); break; case 2: if ((0x100000001000L & l) != 0L && kind > 65) kind = 65; break; case 5: if ((0x2000000020L & l) != 0L) jjAddStates(40, 41); break; case 8: if ((0x5000000050L & l) != 0L && kind > 69) kind = 69; break; case 10: if ((0xffffffffefffffffL & l) != 0L) jjCheckNAdd(11); break; case 12: if (curChar == 92) jjAddStates(42, 44); break; case 13: if ((0x14404410000000L & l) != 0L) jjCheckNAdd(11); break; case 19: if ((0xffffffffefffffffL & l) != 0L) jjCheckNAddStates(12, 14); break; case 20: if (curChar == 92) jjAddStates(45, 47); break; case 21: if ((0x14404410000000L & l) != 0L) jjCheckNAddStates(12, 14); break; case 28: if ((0x87fffffe87fffffeL & l) == 0L) break; if (kind > 76) kind = 76; jjCheckNAdd(28); break; case 31: if ((0x2000000020L & l) != 0L) jjAddStates(48, 49); break; case 35: if ((0x2000000020L & l) != 0L) jjAddStates(50, 51); break; case 41: if ((0x2000000020L & l) != 0L) jjAddStates(52, 53); break; case 46: if (kind > 6) kind = 6; break; case 49: if (kind > 8) kind = 8; jjAddStates(0, 2); break; case 54: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(55); break; case 55: if ((0x7e0000007eL & l) == 0L) break; if (kind > 65) kind = 65; jjCheckNAddTwoStates(55, 2); break; case 57: if ((0x100000001000000L & l) != 0L) jjCheckNAddTwoStates(58, 59); break; case 58: if ((0x7e0000007eL & l) != 0L) jjCheckNAddTwoStates(58, 59); break; case 60: if ((0x7e0000007eL & l) != 0L) jjAddStates(54, 55); break; case 61: if ((0x1000000010000L & l) != 0L) jjAddStates(56, 57); break; case 64: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(65); break; case 65: if ((0x7e0000007eL & l) != 0L) jjCheckNAddStates(37, 39); break; case 67: if ((0x1000000010000L & l) != 0L) jjAddStates(58, 59); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 0: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 76) kind = 76; jjCheckNAdd(28); break; case 10: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjstateSet[jjnewStateCnt++] = 11; break; case 19: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(12, 14); break; case 28: if (!jjCanMove_2(hiByte, i1, i2, l1, l2)) break; if (kind > 76) kind = 76; jjCheckNAdd(28); break; case 46: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 6) kind = 6; break; case 49: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 8) kind = 8; jjAddStates(0, 2); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 70 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } } } private final int jjMoveStringLiteralDfa0_2() { switch(curChar) { case 42: return jjMoveStringLiteralDfa1_2(0x400L); default : return 1; } } private final int jjMoveStringLiteralDfa1_2(long active0) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return 1; } switch(curChar) { case 47: if ((active0 & 0x400L) != 0L) return jjStopAtPos(1, 10); break; default : return 2; } return 2; } private final int jjMoveStringLiteralDfa0_1() { switch(curChar) { case 42: return jjMoveStringLiteralDfa1_1(0x200L); default : return 1; } } private final int jjMoveStringLiteralDfa1_1(long active0) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return 1; } switch(curChar) { case 47: if ((active0 & 0x200L) != 0L) return jjStopAtPos(1, 9); break; default : return 2; } return 2; } static final int[] jjnextStates = { 49, 50, 52, 30, 31, 8, 34, 35, 38, 39, 47, 48, 19, 20, 22, 10, 12, 54, 56, 2, 57, 64, 4, 5, 8, 19, 20, 24, 22, 30, 31, 8, 40, 41, 8, 58, 59, 65, 66, 67, 6, 7, 13, 14, 16, 21, 23, 25, 32, 33, 36, 37, 42, 43, 60, 61, 62, 63, 68, 69, }; private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) { switch(hiByte) { case 0: return ((jjbitVec2[i2] & l2) != 0L); default : if ((jjbitVec0[i1] & l1) != 0L) return true; return false; } } private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2) { switch(hiByte) { case 0: return ((jjbitVec4[i2] & l2) != 0L); case 2: return ((jjbitVec5[i2] & l2) != 0L); case 3: return ((jjbitVec6[i2] & l2) != 0L); case 4: return ((jjbitVec7[i2] & l2) != 0L); case 5: return ((jjbitVec8[i2] & l2) != 0L); case 6: return ((jjbitVec9[i2] & l2) != 0L); case 7: return ((jjbitVec10[i2] & l2) != 0L); case 9: return ((jjbitVec11[i2] & l2) != 0L); case 10: return ((jjbitVec12[i2] & l2) != 0L); case 11: return ((jjbitVec13[i2] & l2) != 0L); case 12: return ((jjbitVec14[i2] & l2) != 0L); case 13: return ((jjbitVec15[i2] & l2) != 0L); case 14: return ((jjbitVec16[i2] & l2) != 0L); case 15: return ((jjbitVec17[i2] & l2) != 0L); case 16: return ((jjbitVec18[i2] & l2) != 0L); case 17: return ((jjbitVec19[i2] & l2) != 0L); case 18: return ((jjbitVec20[i2] & l2) != 0L); case 19: return ((jjbitVec21[i2] & l2) != 0L); case 20: return ((jjbitVec0[i2] & l2) != 0L); case 22: return ((jjbitVec22[i2] & l2) != 0L); case 23: return ((jjbitVec23[i2] & l2) != 0L); case 24: return ((jjbitVec24[i2] & l2) != 0L); case 30: return ((jjbitVec25[i2] & l2) != 0L); case 31: return ((jjbitVec26[i2] & l2) != 0L); case 32: return ((jjbitVec27[i2] & l2) != 0L); case 33: return ((jjbitVec28[i2] & l2) != 0L); case 48: return ((jjbitVec29[i2] & l2) != 0L); case 49: return ((jjbitVec30[i2] & l2) != 0L); case 77: return ((jjbitVec31[i2] & l2) != 0L); case 159: return ((jjbitVec32[i2] & l2) != 0L); case 164: return ((jjbitVec33[i2] & l2) != 0L); case 215: return ((jjbitVec34[i2] & l2) != 0L); case 250: return ((jjbitVec35[i2] & l2) != 0L); case 251: return ((jjbitVec36[i2] & l2) != 0L); case 253: return ((jjbitVec37[i2] & l2) != 0L); case 254: return ((jjbitVec38[i2] & l2) != 0L); case 255: return ((jjbitVec39[i2] & l2) != 0L); default : if ((jjbitVec3[i1] & l1) != 0L) return true; return false; } } private static final boolean jjCanMove_2(int hiByte, int i1, int i2, long l1, long l2) { switch(hiByte) { case 0: return ((jjbitVec40[i2] & l2) != 0L); case 2: return ((jjbitVec5[i2] & l2) != 0L); case 3: return ((jjbitVec41[i2] & l2) != 0L); case 4: return ((jjbitVec42[i2] & l2) != 0L); case 5: return ((jjbitVec43[i2] & l2) != 0L); case 6: return ((jjbitVec44[i2] & l2) != 0L); case 7: return ((jjbitVec45[i2] & l2) != 0L); case 9: return ((jjbitVec46[i2] & l2) != 0L); case 10: return ((jjbitVec47[i2] & l2) != 0L); case 11: return ((jjbitVec48[i2] & l2) != 0L); case 12: return ((jjbitVec49[i2] & l2) != 0L); case 13: return ((jjbitVec50[i2] & l2) != 0L); case 14: return ((jjbitVec51[i2] & l2) != 0L); case 15: return ((jjbitVec52[i2] & l2) != 0L); case 16: return ((jjbitVec53[i2] & l2) != 0L); case 17: return ((jjbitVec19[i2] & l2) != 0L); case 18: return ((jjbitVec20[i2] & l2) != 0L); case 19: return ((jjbitVec54[i2] & l2) != 0L); case 20: return ((jjbitVec0[i2] & l2) != 0L); case 22: return ((jjbitVec22[i2] & l2) != 0L); case 23: return ((jjbitVec55[i2] & l2) != 0L); case 24: return ((jjbitVec56[i2] & l2) != 0L); case 30: return ((jjbitVec25[i2] & l2) != 0L); case 31: return ((jjbitVec26[i2] & l2) != 0L); case 32: return ((jjbitVec57[i2] & l2) != 0L); case 33: return ((jjbitVec28[i2] & l2) != 0L); case 48: return ((jjbitVec58[i2] & l2) != 0L); case 49: return ((jjbitVec30[i2] & l2) != 0L); case 77: return ((jjbitVec31[i2] & l2) != 0L); case 159: return ((jjbitVec32[i2] & l2) != 0L); case 164: return ((jjbitVec33[i2] & l2) != 0L); case 215: return ((jjbitVec34[i2] & l2) != 0L); case 250: return ((jjbitVec35[i2] & l2) != 0L); case 251: return ((jjbitVec59[i2] & l2) != 0L); case 253: return ((jjbitVec37[i2] & l2) != 0L); case 254: return ((jjbitVec60[i2] & l2) != 0L); case 255: return ((jjbitVec61[i2] & l2) != 0L); default : if ((jjbitVec3[i1] & l1) != 0L) return true; return false; } } public static final String[] jjstrLiteralImages = { "", null, null, null, null, null, null, null, null, null, null, null, "\141\142\163\164\162\141\143\164", "\141\163\163\145\162\164", "\142\157\157\154\145\141\156", "\142\162\145\141\153", "\142\171\164\145", "\143\141\163\145", "\143\141\164\143\150", "\143\150\141\162", "\143\154\141\163\163", "\143\157\156\163\164", "\143\157\156\164\151\156\165\145", "\144\145\146\141\165\154\164", "\144\157", "\144\157\165\142\154\145", "\145\154\163\145", "\145\156\165\155", "\145\170\164\145\156\144\163", "\146\141\154\163\145", "\146\151\156\141\154", "\146\151\156\141\154\154\171", "\146\154\157\141\164", "\146\157\162", "\147\157\164\157", "\151\146", "\151\155\160\154\145\155\145\156\164\163", "\151\155\160\157\162\164", "\151\156\163\164\141\156\143\145\157\146", "\151\156\164", "\151\156\164\145\162\146\141\143\145", "\154\157\156\147", "\156\141\164\151\166\145", "\156\145\167", "\156\165\154\154", "\160\141\143\153\141\147\145", "\160\162\151\166\141\164\145", "\160\162\157\164\145\143\164\145\144", "\160\165\142\154\151\143", "\162\145\164\165\162\156", "\163\150\157\162\164", "\163\164\141\164\151\143", "\163\164\162\151\143\164\146\160", "\163\165\160\145\162", "\163\167\151\164\143\150", "\163\171\156\143\150\162\157\156\151\172\145\144", "\164\150\151\163", "\164\150\162\157\167", "\164\150\162\157\167\163", "\164\162\141\156\163\151\145\156\164", "\164\162\165\145", "\164\162\171", "\166\157\151\144", "\166\157\154\141\164\151\154\145", "\167\150\151\154\145", null, null, null, null, null, null, null, null, null, null, null, null, null, null, "\50", "\51", "\173", "\175", "\133", "\135", "\73", "\54", "\56", "\100", "\75", "\74", "\41", "\176", "\77", "\72", "\75\75", "\74\75", "\76\75", "\41\75", "\174\174", "\46\46", "\53\53", "\55\55", "\53", "\55", "\52", "\57", "\46", "\174", "\136", "\45", "\74\74", "\53\75", "\55\75", "\52\75", "\57\75", "\46\75", "\174\75", "\136\75", "\45\75", "\74\74\75", "\76\76\75", "\76\76\76\75", "\56\56\56", "\76\76\76", "\76\76", "\76", "\32", null, }; public static final String[] lexStateNames = { "DEFAULT", "IN_FORMAL_COMMENT", "IN_MULTI_LINE_COMMENT", }; public static final int[] jjnewLexState = { -1, -1, -1, -1, -1, -1, 1, 2, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, }; static final long[] jjtoToken = { 0xfffffffffffff001L, 0xffffffffffff9c23L, 0x1L, }; static final long[] jjtoSkip = { 0x73eL, 0x0L, 0x0L, }; static final long[] jjtoSpecial = { 0x700L, 0x0L, 0x0L, }; static final long[] jjtoMore = { 0x8c0L, 0x0L, 0x0L, }; protected JavaCharStream input_stream; private final int[] jjrounds = new int[70]; private final int[] jjstateSet = new int[140]; StringBuffer image; int jjimageLen; int lengthOfMatch; protected char curChar; public JavaParser15DebugTokenManager(JavaCharStream stream){ if (JavaCharStream.staticFlag) throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); input_stream = stream; } public JavaParser15DebugTokenManager(JavaCharStream stream, int lexState){ this(stream); SwitchTo(lexState); } public void ReInit(JavaCharStream stream) { jjmatchedPos = jjnewStateCnt = 0; curLexState = defaultLexState; input_stream = stream; ReInitRounds(); } private final void ReInitRounds() { int i; jjround = 0x80000001; for (i = 70; i-- > 0;) jjrounds[i] = 0x80000000; } public void ReInit(JavaCharStream stream, int lexState) { ReInit(stream); SwitchTo(lexState); } public void SwitchTo(int lexState) { if (lexState >= 3 || lexState < 0) throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); else curLexState = lexState; } protected Token jjFillToken() { Token t = Token.newToken(jjmatchedKind); t.kind = jjmatchedKind; String im = jjstrLiteralImages[jjmatchedKind]; t.image = (im == null) ? input_stream.GetImage() : im; t.beginLine = input_stream.getBeginLine(); t.beginColumn = input_stream.getBeginColumn(); t.endLine = input_stream.getEndLine(); t.endColumn = input_stream.getEndColumn(); return t; } int curLexState = 0; int defaultLexState = 0; int jjnewStateCnt; int jjround; int jjmatchedPos; int jjmatchedKind; public Token getNextToken() { int kind; Token specialToken = null; Token matchedToken; int curPos = 0; EOFLoop : for (;;) { try { curChar = input_stream.BeginToken(); } catch(java.io.IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; return matchedToken; } image = null; jjimageLen = 0; for (;;) { switch(curLexState) { case 0: try { input_stream.backup(0); while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) curChar = input_stream.BeginToken(); } catch (java.io.IOException e1) { continue EOFLoop; } jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); if (jjmatchedPos == 0 && jjmatchedKind > 128) { jjmatchedKind = 128; } break; case 1: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_1(); if (jjmatchedPos == 0 && jjmatchedKind > 11) { jjmatchedKind = 11; } break; case 2: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_2(); if (jjmatchedPos == 0 && jjmatchedKind > 11) { jjmatchedKind = 11; } break; } if (jjmatchedKind != 0x7fffffff) { if (jjmatchedPos + 1 < curPos) input_stream.backup(curPos - jjmatchedPos - 1); if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; TokenLexicalActions(matchedToken); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; return matchedToken; } else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); if (specialToken == null) specialToken = matchedToken; else { matchedToken.specialToken = specialToken; specialToken = (specialToken.next = matchedToken); } SkipLexicalActions(matchedToken); } else SkipLexicalActions(null); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; continue EOFLoop; } MoreLexicalActions(); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; curPos = 0; jjmatchedKind = 0x7fffffff; try { curChar = input_stream.readChar(); continue; } catch (java.io.IOException e1) { } } int error_line = input_stream.getEndLine(); int error_column = input_stream.getEndColumn(); String error_after = null; boolean EOFSeen = false; try { input_stream.readChar(); input_stream.backup(1); } catch (java.io.IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; } if (!EOFSeen) { input_stream.backup(1); error_after = curPos <= 1 ? "" : input_stream.GetImage(); } throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); } } } void SkipLexicalActions(Token matchedToken) { switch(jjmatchedKind) { default : break; } } void MoreLexicalActions() { jjimageLen += (lengthOfMatch = jjmatchedPos + 1); switch(jjmatchedKind) { case 6 : if (image == null) image = new StringBuffer(); image.append(input_stream.GetSuffix(jjimageLen)); jjimageLen = 0; input_stream.backup(1); break; default : break; } } void TokenLexicalActions(Token matchedToken) { switch(jjmatchedKind) { case 124 : if (image == null) image = new StringBuffer(); image.append(jjstrLiteralImages[124]); matchedToken.kind = GT; ((Token.GTToken)matchedToken).realKind = RUNSIGNEDSHIFT; input_stream.backup(2); matchedToken.image = ">"; break; case 125 : if (image == null) image = new StringBuffer(); image.append(jjstrLiteralImages[125]); matchedToken.kind = GT; ((Token.GTToken)matchedToken).realKind = RSIGNEDSHIFT; input_stream.backup(1); matchedToken.image = ">"; break; default : break; } } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/ParseException.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/ParseExceptio0000644000175000017500000002017111343534513033336 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */ /* JavaCCOptions:KEEP_LINE_COL=null */ package net.sourceforge.cobertura.javancss.parser.java15.debug; /** * This exception is thrown when parse errors are encountered. * You can explicitly create objects of this exception type by * calling the method generateParseException in the generated * parser. * * You can modify this class to customize your error reporting * mechanisms so long as you retain the public fields. */ public class ParseException extends Exception { /** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", * "expectedTokenSequences", and "tokenImage" set. The boolean * flag "specialConstructor" is also set to true to indicate that * this constructor was used to create this object. * This constructor calls its super class with the empty string * to force the "toString" method of parent class "Throwable" to * print the error message in the form: * ParseException: */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal ) { super(""); specialConstructor = true; currentToken = currentTokenVal; expectedTokenSequences = expectedTokenSequencesVal; tokenImage = tokenImageVal; } /** * The following constructors are for use by you for whatever * purpose you can think of. Constructing the exception in this * manner makes the exception behave in the normal way - i.e., as * documented in the class "Throwable". The fields "errorToken", * "expectedTokenSequences", and "tokenImage" do not contain * relevant information. The JavaCC generated code does not use * these constructors. */ public ParseException() { super(); specialConstructor = false; } /** Constructor with message. */ public ParseException(String message) { super(message); specialConstructor = false; } /** * This variable determines which constructor was used to create * this object and thereby affects the semantics of the * "getMessage" method (see below). */ protected boolean specialConstructor; /** * This is the last token that has been consumed successfully. If * this object has been created due to a parse error, the token * followng this token will (therefore) be the first error token. */ public Token currentToken; /** * Each entry in this array is an array of integers. Each array * of integers represents a sequence of tokens (by their ordinal * values) that is expected at this point of the parse. */ public int[][] expectedTokenSequences; /** * This is a reference to the "tokenImage" array of the generated * parser within which the parse error occurred. This array is * defined in the generated ...Constants interface. */ public String[] tokenImage; /** * This method has the standard behavior when this object has been * created using the standard constructors. Otherwise, it uses * "currentToken" and "expectedTokenSequences" to generate a parse * error message and returns it. If this object has been created * due to a parse error, and you do not catch it (it gets thrown * from the parser), then this method is called during the printing * of the final stack trace, and hence the correct error message * gets displayed. */ public String getMessage() { if (!specialConstructor) { return super.getMessage(); } StringBuffer expected = new StringBuffer(); int maxSize = 0; for (int i = 0; i < expectedTokenSequences.length; i++) { if (maxSize < expectedTokenSequences[i].length) { maxSize = expectedTokenSequences[i].length; } for (int j = 0; j < expectedTokenSequences[i].length; j++) { expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' '); } if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { expected.append("..."); } expected.append(eol).append(" "); } String retval = "Encountered \""; Token tok = currentToken.next; for (int i = 0; i < maxSize; i++) { if (i != 0) retval += " "; if (tok.kind == 0) { retval += tokenImage[0]; break; } retval += " " + tokenImage[tok.kind]; retval += " \""; retval += add_escapes(tok.image); retval += " \""; tok = tok.next; } retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; retval += "." + eol; if (expectedTokenSequences.length == 1) { retval += "Was expecting:" + eol + " "; } else { retval += "Was expecting one of:" + eol + " "; } retval += expected.toString(); return retval; } /** * The end of line string for this machine. */ protected String eol = System.getProperty("line.separator", "\n"); /** * Used to convert raw characters to their escaped version * when these raw version cannot be used as part of an ASCII * string literal. */ protected String add_escapes(String str) { StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) { case 0 : continue; case '\b': retval.append("\\b"); continue; case '\t': retval.append("\\t"); continue; case '\n': retval.append("\\n"); continue; case '\f': retval.append("\\f"); continue; case '\r': retval.append("\\r"); continue; case '\"': retval.append("\\\""); continue; case '\'': retval.append("\\\'"); continue; case '\\': retval.append("\\\\"); continue; default: if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { String s = "0000" + Integer.toString(ch, 16); retval.append("\\u" + s.substring(s.length() - 4, s.length())); } else { retval.append(ch); } continue; } } return retval.toString(); } } /* JavaCC - OriginalChecksum=4c15f959e6d67e355e3b2e4945de83e6 (do not edit this line) */ ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/TokenMgrError.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/TokenMgrError0000644000175000017500000001362511343534514033332 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */ /* JavaCCOptions: */ package net.sourceforge.cobertura.javancss.parser.java15.debug; /** Token Manager Error. */ public class TokenMgrError extends Error { /* * Ordinals for various reasons why an Error of this type can be thrown. */ /** * Lexical error occurred. */ static final int LEXICAL_ERROR = 0; /** * An attempt was made to create a second instance of a static token manager. */ static final int STATIC_LEXER_ERROR = 1; /** * Tried to change to an invalid lexical state. */ static final int INVALID_LEXICAL_STATE = 2; /** * Detected (and bailed out of) an infinite loop in the token manager. */ static final int LOOP_DETECTED = 3; /** * Indicates the reason why the exception is thrown. It will have * one of the above 4 values. */ int errorCode; /** * Replaces unprintable characters by their escaped (or unicode escaped) * equivalents in the given string */ protected static final String addEscapes(String str) { StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) { case 0 : continue; case '\b': retval.append("\\b"); continue; case '\t': retval.append("\\t"); continue; case '\n': retval.append("\\n"); continue; case '\f': retval.append("\\f"); continue; case '\r': retval.append("\\r"); continue; case '\"': retval.append("\\\""); continue; case '\'': retval.append("\\\'"); continue; case '\\': retval.append("\\\\"); continue; default: if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { String s = "0000" + Integer.toString(ch, 16); retval.append("\\u" + s.substring(s.length() - 4, s.length())); } else { retval.append(ch); } continue; } } return retval.toString(); } /** * Returns a detailed message for the Error when it is thrown by the * token manager to indicate a lexical error. * Parameters : * EOFSeen : indicates if EOF caused the lexical error * curLexState : lexical state in which this error occurred * errorLine : line number when the error occurred * errorColumn : column number when the error occurred * errorAfter : prefix that was seen before this error occurred * curchar : the offending character * Note: You can customize the lexical error message by modifying this method. */ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { return("Lexical error at line " + errorLine + ", column " + errorColumn + ". Encountered: " + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + "after : \"" + addEscapes(errorAfter) + "\""); } /** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * * "Internal Error : Please file a bug report .... " * * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); } /* * Constructors of various flavors follow. */ /** No arg constructor. */ public TokenMgrError() { } /** Constructor with message and reason. */ public TokenMgrError(String message, int reason) { super(message); errorCode = reason; } /** Full Constructor. */ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); } } /* JavaCC - OriginalChecksum=e39bf4f5a2252deda5488e6c7380e0fd (do not edit this line) */ ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/JavaParser15Debug.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/JavaParser15D0000644000175000017500000051356111343534516033110 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaParser15Debug.java */ package net.sourceforge.cobertura.javancss.parser.java15.debug; import java.io.*; import net.sourceforge.cobertura.javancss.parser.JavaParserInterface; import java.util.*; import net.sourceforge.cobertura.javancss.FunctionMetric; import net.sourceforge.cobertura.javancss.ObjectMetric; import net.sourceforge.cobertura.javancss.PackageMetric; /** * Grammar to parse Java version 1.5 * @author Sreenivasa Viswanadha - Simplified and enhanced for 1.5 */ public class JavaParser15Debug implements JavaParserInterface, JavaParser15DebugConstants { private boolean _bReturn = false; private int _ncss = 0; // general counter private int _loc = 0; private int _cyc = 1; private int _localCases = 0; private String _sName = ""; // name of last token private String _sParameter = ""; private String _sPackage = ""; private String _sClass = ""; private String _sFunction = ""; private int _functions = 0; // number of functions in this class //private int _topLevelClasses = 0; private int _classes = 0; private int _classLevel = 0; private int _anonClassCount = 1; private int _jvdcLines = 0; // added by SMS private int _jvdc = 0; private boolean _bPrivate = true;//false; // added by SMS private boolean _bPublic = true; // added by SMS /** * For each class the number of formal * comments in toplevel methods, constructors, inner * classes, and for the class itself are counted. * The top level comment has to be directly before * the class definition, not before the package or * import statement as it is often seen in source code * examples (at the beginning of your source files you * should instead put your copyright notice). */ private int _javadocs = 0; // global javadocs private List/**/ _vFunctions = new ArrayList(); // holds the statistics for each method /** * Metrics for each class/interface are stored in this * vector. */ private List/**/ _vClasses = new ArrayList(); private List _vImports = new ArrayList(); private Object[] _aoPackage = null; private Map/**/ _htPackage = new HashMap(); private PackageMetric _pPackageMetric; private Token _tmpToken = null; /** Argh, too much of a state machine. */ private Token _tmpResultToken = null; private String _formatPackage(String sPackage_) { if (sPackage_.equals("")) { return "."; } return sPackage_.substring(0, sPackage_.length() - 1); } public void parse() throws Exception { CompilationUnit(); } public void parseImportUnit() throws Exception { ImportUnit(); } public int getNcss() { return _ncss; } public int getLOC() { return _loc; } // added by SMS public int getJvdc() { return _jvdc; } /*public int getTopLevelClasses() { return _topLevelClasses; }*/ public List/**/ getFunction() { return _vFunctions; } /** * @return Top level classes in sorted order */ public List/**/ getObject() { Collections.sort(_vClasses); return _vClasses; } /** * @return The empty package consists of the name ".". */ public Map/**/ getPackage() { return _htPackage; } public List getImports() { return _vImports; } /** * name, beginLine, ... */ public Object[] getPackageObjects() { return _aoPackage; } /** * if javancss is used with cat *.java a long * input stream might get generated, so line * number information in case of an parse exception * is not very useful. */ public String getLastFunction() { return _sPackage + _sClass + _sFunction; } /** * Class to hold modifiers. */ static public final class ModifierSet { /* Definitions of the bits in the modifiers field. */ public static final int PUBLIC = 0x0001; public static final int PROTECTED = 0x0002; public static final int PRIVATE = 0x0004; public static final int ABSTRACT = 0x0008; public static final int STATIC = 0x0010; public static final int FINAL = 0x0020; public static final int SYNCHRONIZED = 0x0040; public static final int NATIVE = 0x0080; public static final int TRANSIENT = 0x0100; public static final int VOLATILE = 0x0200; public static final int STRICTFP = 0x1000; /** A set of accessors that indicate whether the specified modifier is in the set. */ public boolean isPublic(int modifiers) { return (modifiers & PUBLIC) != 0; } public boolean isProtected(int modifiers) { return (modifiers & PROTECTED) != 0; } public boolean isPrivate(int modifiers) { return (modifiers & PRIVATE) != 0; } public boolean isStatic(int modifiers) { return (modifiers & STATIC) != 0; } public boolean isAbstract(int modifiers) { return (modifiers & ABSTRACT) != 0; } public boolean isFinal(int modifiers) { return (modifiers & FINAL) != 0; } public boolean isNative(int modifiers) { return (modifiers & NATIVE) != 0; } public boolean isStrictfp(int modifiers) { return (modifiers & STRICTFP) != 0; } public boolean isSynchronized(int modifiers) { return (modifiers & SYNCHRONIZED) != 0; } public boolean isTransient(int modifiers) { return (modifiers & TRANSIENT) != 0; } public boolean isVolatile(int modifiers) { return (modifiers & VOLATILE) != 0; } /** * Removes the given modifier. */ static int removeModifier(int modifiers, int mod) { return modifiers & ~mod; } } public JavaParser15Debug(String fileName) { this(System.in); try { ReInit(new FileInputStream(new File(fileName))); } catch(Exception e) { e.printStackTrace(); } } public static void main(String args[]) { JavaParser15Debug parser; if (args.length == 0) { System.out.println("Java Parser Version 1.5: Reading from standard input . . ."); parser = new JavaParser15Debug(System.in); } else if (args.length == 1) { System.out.println("Java Parser Version 1.5: Reading from file " + args[0] + " . . ."); try { parser = new JavaParser15Debug(new java.io.FileInputStream(args[0])); } catch (java.io.FileNotFoundException e) { System.out.println("Java Parser Version 1.5: File " + args[0] + " not found."); return; } } else { System.out.println("Java Parser Version 1.5: Usage is one of:"); System.out.println(" java javancss.parser.java15.debug.JavaParser15Debug < inputfile"); System.out.println("OR"); System.out.println(" java javancss.parser.java15.debug.JavaParser15Debug inputfile"); return; } try { parser.CompilationUnit(); System.out.println("Java Parser Version 1.1: Java program parsed successfully."); } catch (ParseException e) { System.out.println(e.getMessage()); System.out.println("Java Parser Version 1.1: Encountered errors during parse."); } } /***************************************** * THE JAVA LANGUAGE GRAMMAR STARTS HERE * *****************************************/ /* * Program structuring syntax follows. */ final public void CompilationUnit() throws ParseException { trace_call("CompilationUnit"); try { if (jj_2_1(2147483647)) { PackageDeclaration(); } else { ; } label_1: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPORT: ; break; default: break label_1; } ImportDeclaration(); } label_2: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case CLASS: case ENUM: case FINAL: case INTERFACE: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case SEMICOLON: case AT: ; break; default: break label_2; } TypeDeclaration(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 127: jj_consume_token(127); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF_TO_IGNORE: jj_consume_token(STUFF_TO_IGNORE); break; default: ; } jj_consume_token(0); } finally { trace_return("CompilationUnit"); } } final public void PackageDeclaration() throws ParseException { trace_call("PackageDeclaration"); try { Modifiers(); jj_consume_token(PACKAGE); Name(); jj_consume_token(SEMICOLON); } finally { trace_return("PackageDeclaration"); } } final public void ImportUnit() throws ParseException { trace_call("ImportUnit"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case NATIVE: case PACKAGE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case AT: PackageDeclaration(); break; default: ; } label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPORT: ; break; default: break label_3; } ImportDeclaration(); } label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case PUBLIC: case STRICTFP: case SYNCHRONIZED: ; break; default: break label_4; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: jj_consume_token(ABSTRACT); break; case FINAL: jj_consume_token(FINAL); break; case PUBLIC: jj_consume_token(PUBLIC); break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); break; case STRICTFP: jj_consume_token(STRICTFP); break; default: jj_consume_token(-1); throw new ParseException(); } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: jj_consume_token(CLASS); break; case INTERFACE: jj_consume_token(INTERFACE); break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("ImportUnit"); } } final public void ImportDeclaration() throws ParseException { trace_call("ImportDeclaration"); try { jj_consume_token(IMPORT); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); break; default: ; } Name(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: jj_consume_token(DOT); jj_consume_token(STAR); break; default: ; } jj_consume_token(SEMICOLON); } finally { trace_return("ImportDeclaration"); } } /* * Modifiers. We match all modifiers in a single rule to reduce the chances of * syntax errors for simple modifier mistakes. It will also enable us to give * better error messages. */ final public int Modifiers() throws ParseException { trace_call("Modifiers"); try { int modifiers = 0; label_5: while (true) { if (jj_2_2(2)) { ; } else { break label_5; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); modifiers |= ModifierSet.PUBLIC; break; case STATIC: jj_consume_token(STATIC); modifiers |= ModifierSet.STATIC; break; case PROTECTED: jj_consume_token(PROTECTED); modifiers |= ModifierSet.PROTECTED; break; case PRIVATE: jj_consume_token(PRIVATE); modifiers |= ModifierSet.PRIVATE; break; case FINAL: jj_consume_token(FINAL); modifiers |= ModifierSet.FINAL; break; case ABSTRACT: jj_consume_token(ABSTRACT); modifiers |= ModifierSet.ABSTRACT; break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); modifiers |= ModifierSet.SYNCHRONIZED; break; case NATIVE: jj_consume_token(NATIVE); modifiers |= ModifierSet.NATIVE; break; case TRANSIENT: jj_consume_token(TRANSIENT); modifiers |= ModifierSet.TRANSIENT; break; case VOLATILE: jj_consume_token(VOLATILE); modifiers |= ModifierSet.VOLATILE; break; case STRICTFP: jj_consume_token(STRICTFP); modifiers |= ModifierSet.STRICTFP; break; case AT: Annotation(); break; default: jj_consume_token(-1); throw new ParseException(); } } {if (true) return modifiers;} throw new Error("Missing return statement in function"); } finally { trace_return("Modifiers"); } } /* * Declaration syntax follows. */ final public void TypeDeclaration() throws ParseException { trace_call("TypeDeclaration"); try { int modifiers; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SEMICOLON: jj_consume_token(SEMICOLON); break; case ABSTRACT: case CLASS: case ENUM: case FINAL: case INTERFACE: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case AT: modifiers = Modifiers(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: case INTERFACE: ClassOrInterfaceDeclaration(modifiers); break; case ENUM: EnumDeclaration(modifiers); break; case AT: AnnotationTypeDeclaration(modifiers); break; default: jj_consume_token(-1); throw new ParseException(); } break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("TypeDeclaration"); } } final public void ClassOrInterfaceDeclaration(int modifiers) throws ParseException { trace_call("ClassOrInterfaceDeclaration"); try { boolean isInterface = false; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: jj_consume_token(CLASS); break; case INTERFACE: jj_consume_token(INTERFACE); isInterface = true; break; default: jj_consume_token(-1); throw new ParseException(); } jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: ExtendsList(isInterface); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPLEMENTS: ImplementsList(isInterface); break; default: ; } ClassOrInterfaceBody(isInterface); } finally { trace_return("ClassOrInterfaceDeclaration"); } } final public void ExtendsList(boolean isInterface) throws ParseException { trace_call("ExtendsList"); try { boolean extendsMoreThanOne = false; jj_consume_token(EXTENDS); ClassOrInterfaceType(); label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_6; } jj_consume_token(COMMA); ClassOrInterfaceType(); extendsMoreThanOne = true; } if (extendsMoreThanOne && !isInterface) {if (true) throw new ParseException("A class cannot extend more than one other class");} } finally { trace_return("ExtendsList"); } } final public void ImplementsList(boolean isInterface) throws ParseException { trace_call("ImplementsList"); try { jj_consume_token(IMPLEMENTS); ClassOrInterfaceType(); label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_7; } jj_consume_token(COMMA); ClassOrInterfaceType(); } if (isInterface) {if (true) throw new ParseException("An interface cannot implement other interfaces");} } finally { trace_return("ImplementsList"); } } final public void EnumDeclaration(int modifiers) throws ParseException { trace_call("EnumDeclaration"); try { jj_consume_token(ENUM); jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPLEMENTS: ImplementsList(false); break; default: ; } EnumBody(); } finally { trace_return("EnumDeclaration"); } } final public void EnumBody() throws ParseException { trace_call("EnumBody"); try { jj_consume_token(LBRACE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: EnumConstant(); label_8: while (true) { if (jj_2_3(2)) { ; } else { break label_8; } jj_consume_token(COMMA); EnumConstant(); } break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SEMICOLON: jj_consume_token(SEMICOLON); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case LBRACE: case SEMICOLON: case AT: case LT: ; break; default: break label_9; } ClassOrInterfaceBodyDeclaration(false); } break; default: ; } jj_consume_token(RBRACE); } finally { trace_return("EnumBody"); } } final public void EnumConstant() throws ParseException { trace_call("EnumConstant"); try { Modifiers(); jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: Arguments(); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: ClassOrInterfaceBody(false); break; default: ; } } finally { trace_return("EnumConstant"); } } final public void TypeParameters() throws ParseException { trace_call("TypeParameters"); try { jj_consume_token(LT); TypeParameter(); label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_10; } jj_consume_token(COMMA); TypeParameter(); } jj_consume_token(GT); } finally { trace_return("TypeParameters"); } } final public void TypeParameter() throws ParseException { trace_call("TypeParameter"); try { jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: TypeBound(); break; default: ; } } finally { trace_return("TypeParameter"); } } final public void TypeBound() throws ParseException { trace_call("TypeBound"); try { jj_consume_token(EXTENDS); ClassOrInterfaceType(); label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_AND: ; break; default: break label_11; } jj_consume_token(BIT_AND); ClassOrInterfaceType(); } } finally { trace_return("TypeBound"); } } final public void ClassOrInterfaceBody(boolean isInterface) throws ParseException { trace_call("ClassOrInterfaceBody"); try { jj_consume_token(LBRACE); label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case LBRACE: case SEMICOLON: case AT: case LT: ; break; default: break label_12; } ClassOrInterfaceBodyDeclaration(isInterface); } jj_consume_token(RBRACE); } finally { trace_return("ClassOrInterfaceBody"); } } final public void ClassOrInterfaceBodyDeclaration(boolean isInterface) throws ParseException { trace_call("ClassOrInterfaceBodyDeclaration"); try { boolean isNestedInterface = false; int modifiers; if (jj_2_6(2)) { Initializer(); if (isInterface) {if (true) throw new ParseException("An interface cannot have initializers");} } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case AT: case LT: modifiers = Modifiers(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: case INTERFACE: ClassOrInterfaceDeclaration(modifiers); break; case ENUM: EnumDeclaration(modifiers); break; default: if (jj_2_4(2147483647)) { ConstructorDeclaration(); } else if (jj_2_5(2147483647)) { FieldDeclaration(modifiers); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case VOID: case IDENTIFIER: case LT: MethodDeclaration(modifiers); break; default: jj_consume_token(-1); throw new ParseException(); } } } break; case SEMICOLON: jj_consume_token(SEMICOLON); break; default: jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("ClassOrInterfaceBodyDeclaration"); } } final public void FieldDeclaration(int modifiers) throws ParseException { trace_call("FieldDeclaration"); try { Type(); VariableDeclarator(); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_13; } jj_consume_token(COMMA); VariableDeclarator(); } jj_consume_token(SEMICOLON); } finally { trace_return("FieldDeclaration"); } } final public void VariableDeclarator() throws ParseException { trace_call("VariableDeclarator"); try { VariableDeclaratorId(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: jj_consume_token(ASSIGN); VariableInitializer(); break; default: ; } } finally { trace_return("VariableDeclarator"); } } final public void VariableDeclaratorId() throws ParseException { trace_call("VariableDeclaratorId"); try { jj_consume_token(IDENTIFIER); label_14: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: break label_14; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } } finally { trace_return("VariableDeclaratorId"); } } final public void VariableInitializer() throws ParseException { trace_call("VariableInitializer"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: ArrayInitializer(); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: Expression(); break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("VariableInitializer"); } } final public void ArrayInitializer() throws ParseException { trace_call("ArrayInitializer"); try { jj_consume_token(LBRACE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: VariableInitializer(); label_15: while (true) { if (jj_2_7(2)) { ; } else { break label_15; } jj_consume_token(COMMA); VariableInitializer(); } break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); break; default: ; } jj_consume_token(RBRACE); } finally { trace_return("ArrayInitializer"); } } final public void MethodDeclaration(int modifiers) throws ParseException { trace_call("MethodDeclaration"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: ; } ResultType(); MethodDeclarator(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THROWS: jj_consume_token(THROWS); NameList(); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: Block(); break; case SEMICOLON: jj_consume_token(SEMICOLON); break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("MethodDeclaration"); } } final public void MethodDeclarator() throws ParseException { trace_call("MethodDeclarator"); try { jj_consume_token(IDENTIFIER); FormalParameters(); label_16: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: break label_16; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } } finally { trace_return("MethodDeclarator"); } } final public void FormalParameters() throws ParseException { trace_call("FormalParameters"); try { jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: FormalParameter(); label_17: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_17; } jj_consume_token(COMMA); FormalParameter(); } break; default: ; } jj_consume_token(RPAREN); } finally { trace_return("FormalParameters"); } } final public void FormalParameter() throws ParseException { trace_call("FormalParameter"); try { Modifiers(); Type(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ELLIPSIS: jj_consume_token(ELLIPSIS); break; default: ; } VariableDeclaratorId(); } finally { trace_return("FormalParameter"); } } final public void ConstructorDeclaration() throws ParseException { trace_call("ConstructorDeclaration"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: ; } jj_consume_token(IDENTIFIER); FormalParameters(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THROWS: jj_consume_token(THROWS); NameList(); break; default: ; } jj_consume_token(LBRACE); if (jj_2_8(2147483647)) { ExplicitConstructorInvocation(); } else { ; } label_18: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CLASS: case CONTINUE: case DO: case DOUBLE: case FALSE: case FINAL: case FLOAT: case FOR: case IF: case INT: case INTERFACE: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case RETURN: case SHORT: case STATIC: case STRICTFP: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRANSIENT: case TRUE: case TRY: case VOID: case VOLATILE: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case AT: case INCR: case DECR: ; break; default: break label_18; } BlockStatement(); } jj_consume_token(RBRACE); } finally { trace_return("ConstructorDeclaration"); } } final public void ExplicitConstructorInvocation() throws ParseException { trace_call("ExplicitConstructorInvocation"); try { label_19: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: ; break; default: break label_19; } jj_consume_token(IDENTIFIER); jj_consume_token(DOT); } if (jj_2_9(2)) { jj_consume_token(THIS); jj_consume_token(DOT); } else { ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THIS: jj_consume_token(THIS); break; case SUPER: jj_consume_token(SUPER); break; default: jj_consume_token(-1); throw new ParseException(); } Arguments(); jj_consume_token(SEMICOLON); } finally { trace_return("ExplicitConstructorInvocation"); } } final public void Initializer() throws ParseException { trace_call("Initializer"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); break; default: ; } Block(); } finally { trace_return("Initializer"); } } /* * Type, name and expression syntax follows. */ final public void Type() throws ParseException { trace_call("Type"); try { if (jj_2_10(2)) { ReferenceType(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: PrimitiveType(); break; default: jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("Type"); } } final public void ReferenceType() throws ParseException { trace_call("ReferenceType"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: PrimitiveType(); label_20: while (true) { jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); if (jj_2_11(2)) { ; } else { break label_20; } } break; case IDENTIFIER: ClassOrInterfaceType(); label_21: while (true) { if (jj_2_12(2)) { ; } else { break label_21; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("ReferenceType"); } } final public void ClassOrInterfaceType() throws ParseException { trace_call("ClassOrInterfaceType"); try { jj_consume_token(IDENTIFIER); if (jj_2_13(2)) { TypeArguments(); } else { ; } label_22: while (true) { if (jj_2_14(2)) { ; } else { break label_22; } jj_consume_token(DOT); jj_consume_token(IDENTIFIER); if (jj_2_15(2)) { TypeArguments(); } else { ; } } } finally { trace_return("ClassOrInterfaceType"); } } final public void TypeArguments() throws ParseException { trace_call("TypeArguments"); try { jj_consume_token(LT); TypeArgument(); label_23: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_23; } jj_consume_token(COMMA); TypeArgument(); } jj_consume_token(GT); } finally { trace_return("TypeArguments"); } } final public void TypeArgument() throws ParseException { trace_call("TypeArgument"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: ReferenceType(); break; case HOOK: jj_consume_token(HOOK); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: case SUPER: WildcardBounds(); break; default: ; } break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("TypeArgument"); } } final public void WildcardBounds() throws ParseException { trace_call("WildcardBounds"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: jj_consume_token(EXTENDS); ReferenceType(); break; case SUPER: jj_consume_token(SUPER); ReferenceType(); break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("WildcardBounds"); } } final public void PrimitiveType() throws ParseException { trace_call("PrimitiveType"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: jj_consume_token(BOOLEAN); break; case CHAR: jj_consume_token(CHAR); break; case BYTE: jj_consume_token(BYTE); break; case SHORT: jj_consume_token(SHORT); break; case INT: jj_consume_token(INT); break; case LONG: jj_consume_token(LONG); break; case FLOAT: jj_consume_token(FLOAT); break; case DOUBLE: jj_consume_token(DOUBLE); break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("PrimitiveType"); } } final public void ResultType() throws ParseException { trace_call("ResultType"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VOID: jj_consume_token(VOID); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: Type(); break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("ResultType"); } } final public void Name() throws ParseException { trace_call("Name"); try { jj_consume_token(IDENTIFIER); label_24: while (true) { if (jj_2_16(2)) { ; } else { break label_24; } jj_consume_token(DOT); jj_consume_token(IDENTIFIER); } } finally { trace_return("Name"); } } final public void NameList() throws ParseException { trace_call("NameList"); try { Name(); label_25: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_25; } jj_consume_token(COMMA); Name(); } } finally { trace_return("NameList"); } } /* * Expression syntax follows. */ final public void Expression() throws ParseException { trace_call("Expression"); try { ConditionalExpression(); if (jj_2_17(2)) { AssignmentOperator(); Expression(); } else { ; } } finally { trace_return("Expression"); } } final public void AssignmentOperator() throws ParseException { trace_call("AssignmentOperator"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: jj_consume_token(ASSIGN); break; case STARASSIGN: jj_consume_token(STARASSIGN); break; case SLASHASSIGN: jj_consume_token(SLASHASSIGN); break; case REMASSIGN: jj_consume_token(REMASSIGN); break; case PLUSASSIGN: jj_consume_token(PLUSASSIGN); break; case MINUSASSIGN: jj_consume_token(MINUSASSIGN); break; case LSHIFTASSIGN: jj_consume_token(LSHIFTASSIGN); break; case RSIGNEDSHIFTASSIGN: jj_consume_token(RSIGNEDSHIFTASSIGN); break; case RUNSIGNEDSHIFTASSIGN: jj_consume_token(RUNSIGNEDSHIFTASSIGN); break; case ANDASSIGN: jj_consume_token(ANDASSIGN); break; case XORASSIGN: jj_consume_token(XORASSIGN); break; case ORASSIGN: jj_consume_token(ORASSIGN); break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("AssignmentOperator"); } } final public void ConditionalExpression() throws ParseException { trace_call("ConditionalExpression"); try { ConditionalOrExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case HOOK: jj_consume_token(HOOK); Expression(); jj_consume_token(COLON); Expression(); break; default: ; } } finally { trace_return("ConditionalExpression"); } } final public void ConditionalOrExpression() throws ParseException { trace_call("ConditionalOrExpression"); try { ConditionalAndExpression(); label_26: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SC_OR: ; break; default: break label_26; } jj_consume_token(SC_OR); ConditionalAndExpression(); } } finally { trace_return("ConditionalOrExpression"); } } final public void ConditionalAndExpression() throws ParseException { trace_call("ConditionalAndExpression"); try { InclusiveOrExpression(); label_27: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SC_AND: ; break; default: break label_27; } jj_consume_token(SC_AND); InclusiveOrExpression(); } } finally { trace_return("ConditionalAndExpression"); } } final public void InclusiveOrExpression() throws ParseException { trace_call("InclusiveOrExpression"); try { ExclusiveOrExpression(); label_28: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_OR: ; break; default: break label_28; } jj_consume_token(BIT_OR); ExclusiveOrExpression(); } } finally { trace_return("InclusiveOrExpression"); } } final public void ExclusiveOrExpression() throws ParseException { trace_call("ExclusiveOrExpression"); try { AndExpression(); label_29: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case XOR: ; break; default: break label_29; } jj_consume_token(XOR); AndExpression(); } } finally { trace_return("ExclusiveOrExpression"); } } final public void AndExpression() throws ParseException { trace_call("AndExpression"); try { EqualityExpression(); label_30: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_AND: ; break; default: break label_30; } jj_consume_token(BIT_AND); EqualityExpression(); } } finally { trace_return("AndExpression"); } } final public void EqualityExpression() throws ParseException { trace_call("EqualityExpression"); try { InstanceOfExpression(); label_31: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ: case NE: ; break; default: break label_31; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ: jj_consume_token(EQ); break; case NE: jj_consume_token(NE); break; default: jj_consume_token(-1); throw new ParseException(); } InstanceOfExpression(); } } finally { trace_return("EqualityExpression"); } } final public void InstanceOfExpression() throws ParseException { trace_call("InstanceOfExpression"); try { RelationalExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INSTANCEOF: jj_consume_token(INSTANCEOF); Type(); break; default: ; } } finally { trace_return("InstanceOfExpression"); } } final public void RelationalExpression() throws ParseException { trace_call("RelationalExpression"); try { ShiftExpression(); label_32: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: case LE: case GE: case GT: ; break; default: break label_32; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: jj_consume_token(LT); break; case GT: jj_consume_token(GT); break; case LE: jj_consume_token(LE); break; case GE: jj_consume_token(GE); break; default: jj_consume_token(-1); throw new ParseException(); } ShiftExpression(); } } finally { trace_return("RelationalExpression"); } } final public void ShiftExpression() throws ParseException { trace_call("ShiftExpression"); try { AdditiveExpression(); label_33: while (true) { if (jj_2_18(1)) { ; } else { break label_33; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LSHIFT: jj_consume_token(LSHIFT); break; default: if (jj_2_19(1)) { RSIGNEDSHIFT(); } else if (jj_2_20(1)) { RUNSIGNEDSHIFT(); } else { jj_consume_token(-1); throw new ParseException(); } } AdditiveExpression(); } } finally { trace_return("ShiftExpression"); } } final public void AdditiveExpression() throws ParseException { trace_call("AdditiveExpression"); try { MultiplicativeExpression(); label_34: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: ; break; default: break label_34; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: jj_consume_token(PLUS); break; case MINUS: jj_consume_token(MINUS); break; default: jj_consume_token(-1); throw new ParseException(); } MultiplicativeExpression(); } } finally { trace_return("AdditiveExpression"); } } final public void MultiplicativeExpression() throws ParseException { trace_call("MultiplicativeExpression"); try { UnaryExpression(); label_35: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: case SLASH: case REM: ; break; default: break label_35; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: jj_consume_token(STAR); break; case SLASH: jj_consume_token(SLASH); break; case REM: jj_consume_token(REM); break; default: jj_consume_token(-1); throw new ParseException(); } UnaryExpression(); } } finally { trace_return("MultiplicativeExpression"); } } final public void UnaryExpression() throws ParseException { trace_call("UnaryExpression"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: jj_consume_token(PLUS); break; case MINUS: jj_consume_token(MINUS); break; default: jj_consume_token(-1); throw new ParseException(); } UnaryExpression(); break; case INCR: PreIncrementExpression(); break; case DECR: PreDecrementExpression(); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: UnaryExpressionNotPlusMinus(); break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("UnaryExpression"); } } final public void PreIncrementExpression() throws ParseException { trace_call("PreIncrementExpression"); try { jj_consume_token(INCR); PrimaryExpression(); } finally { trace_return("PreIncrementExpression"); } } final public void PreDecrementExpression() throws ParseException { trace_call("PreDecrementExpression"); try { jj_consume_token(DECR); PrimaryExpression(); } finally { trace_return("PreDecrementExpression"); } } final public void UnaryExpressionNotPlusMinus() throws ParseException { trace_call("UnaryExpressionNotPlusMinus"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BANG: case TILDE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TILDE: jj_consume_token(TILDE); break; case BANG: jj_consume_token(BANG); break; default: jj_consume_token(-1); throw new ParseException(); } UnaryExpression(); break; default: if (jj_2_21(2147483647)) { CastExpression(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: PostfixExpression(); break; default: jj_consume_token(-1); throw new ParseException(); } } } } finally { trace_return("UnaryExpressionNotPlusMinus"); } } // This production is to determine lookahead only. The LOOKAHEAD specifications // below are not used, but they are there just to indicate that we know about // this. final public void CastLookahead() throws ParseException { trace_call("CastLookahead"); try { if (jj_2_22(2)) { jj_consume_token(LPAREN); PrimitiveType(); } else if (jj_2_23(2147483647)) { jj_consume_token(LPAREN); Type(); jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: jj_consume_token(LPAREN); Type(); jj_consume_token(RPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TILDE: jj_consume_token(TILDE); break; case BANG: jj_consume_token(BANG); break; case LPAREN: jj_consume_token(LPAREN); break; case IDENTIFIER: jj_consume_token(IDENTIFIER); break; case THIS: jj_consume_token(THIS); break; case SUPER: jj_consume_token(SUPER); break; case NEW: jj_consume_token(NEW); break; case FALSE: case NULL: case TRUE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: Literal(); break; default: jj_consume_token(-1); throw new ParseException(); } break; default: jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("CastLookahead"); } } final public void PostfixExpression() throws ParseException { trace_call("PostfixExpression"); try { PrimaryExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: case DECR: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: jj_consume_token(INCR); break; case DECR: jj_consume_token(DECR); break; default: jj_consume_token(-1); throw new ParseException(); } break; default: ; } } finally { trace_return("PostfixExpression"); } } final public void CastExpression() throws ParseException { trace_call("CastExpression"); try { if (jj_2_24(2147483647)) { jj_consume_token(LPAREN); Type(); jj_consume_token(RPAREN); UnaryExpression(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: jj_consume_token(LPAREN); Type(); jj_consume_token(RPAREN); UnaryExpressionNotPlusMinus(); break; default: jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("CastExpression"); } } final public void PrimaryExpression() throws ParseException { trace_call("PrimaryExpression"); try { PrimaryPrefix(); label_36: while (true) { if (jj_2_25(2)) { ; } else { break label_36; } PrimarySuffix(); } } finally { trace_return("PrimaryExpression"); } } final public void MemberSelector() throws ParseException { trace_call("MemberSelector"); try { jj_consume_token(DOT); TypeArguments(); jj_consume_token(IDENTIFIER); } finally { trace_return("MemberSelector"); } } final public void PrimaryPrefix() throws ParseException { trace_call("PrimaryPrefix"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FALSE: case NULL: case TRUE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: Literal(); break; default: if (jj_2_26(2147483647)) { label_37: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: ; break; default: break label_37; } jj_consume_token(IDENTIFIER); jj_consume_token(DOT); } jj_consume_token(THIS); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SUPER: jj_consume_token(SUPER); jj_consume_token(DOT); jj_consume_token(IDENTIFIER); break; case LPAREN: jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); break; case NEW: AllocationExpression(); break; default: if (jj_2_27(2147483647)) { ResultType(); jj_consume_token(DOT); jj_consume_token(CLASS); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: Name(); break; default: jj_consume_token(-1); throw new ParseException(); } } } } } } finally { trace_return("PrimaryPrefix"); } } final public void PrimarySuffix() throws ParseException { trace_call("PrimarySuffix"); try { if (jj_2_28(2147483647)) { jj_consume_token(DOT); jj_consume_token(SUPER); } else if (jj_2_29(2147483647)) { jj_consume_token(DOT); jj_consume_token(THIS); } else if (jj_2_30(2)) { jj_consume_token(DOT); AllocationExpression(); } else if (jj_2_31(3)) { MemberSelector(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: jj_consume_token(LBRACKET); Expression(); jj_consume_token(RBRACKET); break; case DOT: jj_consume_token(DOT); jj_consume_token(IDENTIFIER); break; case LPAREN: Arguments(); break; default: jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("PrimarySuffix"); } } final public void Literal() throws ParseException { trace_call("Literal"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_LITERAL: jj_consume_token(INTEGER_LITERAL); break; case FLOATING_POINT_LITERAL: jj_consume_token(FLOATING_POINT_LITERAL); break; case CHARACTER_LITERAL: jj_consume_token(CHARACTER_LITERAL); break; case STRING_LITERAL: jj_consume_token(STRING_LITERAL); break; case FALSE: case TRUE: BooleanLiteral(); break; case NULL: NullLiteral(); break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("Literal"); } } final public void BooleanLiteral() throws ParseException { trace_call("BooleanLiteral"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TRUE: jj_consume_token(TRUE); break; case FALSE: jj_consume_token(FALSE); break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("BooleanLiteral"); } } final public void NullLiteral() throws ParseException { trace_call("NullLiteral"); try { jj_consume_token(NULL); } finally { trace_return("NullLiteral"); } } final public void Arguments() throws ParseException { trace_call("Arguments"); try { jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: ArgumentList(); break; default: ; } jj_consume_token(RPAREN); } finally { trace_return("Arguments"); } } final public void ArgumentList() throws ParseException { trace_call("ArgumentList"); try { Expression(); label_38: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_38; } jj_consume_token(COMMA); Expression(); } } finally { trace_return("ArgumentList"); } } final public void AllocationExpression() throws ParseException { trace_call("AllocationExpression"); try { if (jj_2_32(2)) { jj_consume_token(NEW); PrimitiveType(); ArrayDimsAndInits(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NEW: jj_consume_token(NEW); ClassOrInterfaceType(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ArrayDimsAndInits(); break; case LPAREN: Arguments(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: ClassOrInterfaceBody(false); break; default: ; } break; default: jj_consume_token(-1); throw new ParseException(); } break; default: jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("AllocationExpression"); } } /* * The third LOOKAHEAD specification below is to parse to PrimarySuffix * if there is an expression between the "[...]". */ final public void ArrayDimsAndInits() throws ParseException { trace_call("ArrayDimsAndInits"); try { if (jj_2_35(2)) { label_39: while (true) { jj_consume_token(LBRACKET); Expression(); jj_consume_token(RBRACKET); if (jj_2_33(2)) { ; } else { break label_39; } } label_40: while (true) { if (jj_2_34(2)) { ; } else { break label_40; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: label_41: while (true) { jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: break label_41; } } ArrayInitializer(); break; default: jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("ArrayDimsAndInits"); } } /* * Statement syntax follows. */ final public void Statement() throws ParseException { trace_call("Statement"); try { if (jj_2_36(2)) { LabeledStatement(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: AssertStatement(); break; case LBRACE: Block(); break; case SEMICOLON: EmptyStatement(); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case INCR: case DECR: StatementExpression(); jj_consume_token(SEMICOLON); break; case SWITCH: SwitchStatement(); break; case IF: IfStatement(); break; case WHILE: WhileStatement(); break; case DO: DoStatement(); break; case FOR: ForStatement(); break; case BREAK: BreakStatement(); break; case CONTINUE: ContinueStatement(); break; case RETURN: ReturnStatement(); break; case THROW: ThrowStatement(); break; case SYNCHRONIZED: SynchronizedStatement(); break; case TRY: TryStatement(); break; default: jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("Statement"); } } final public void AssertStatement() throws ParseException { trace_call("AssertStatement"); try { jj_consume_token(ASSERT); Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COLON: jj_consume_token(COLON); Expression(); break; default: ; } jj_consume_token(SEMICOLON); } finally { trace_return("AssertStatement"); } } final public void LabeledStatement() throws ParseException { trace_call("LabeledStatement"); try { jj_consume_token(IDENTIFIER); jj_consume_token(COLON); Statement(); } finally { trace_return("LabeledStatement"); } } final public void Block() throws ParseException { trace_call("Block"); try { jj_consume_token(LBRACE); label_42: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CLASS: case CONTINUE: case DO: case DOUBLE: case FALSE: case FINAL: case FLOAT: case FOR: case IF: case INT: case INTERFACE: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case RETURN: case SHORT: case STATIC: case STRICTFP: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRANSIENT: case TRUE: case TRY: case VOID: case VOLATILE: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case AT: case INCR: case DECR: ; break; default: break label_42; } BlockStatement(); } jj_consume_token(RBRACE); } finally { trace_return("Block"); } } final public void BlockStatement() throws ParseException { trace_call("BlockStatement"); try { if (jj_2_37(2147483647)) { LocalVariableDeclaration(); jj_consume_token(SEMICOLON); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CONTINUE: case DO: case DOUBLE: case FALSE: case FLOAT: case FOR: case IF: case INT: case LONG: case NEW: case NULL: case RETURN: case SHORT: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRUE: case TRY: case VOID: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case INCR: case DECR: Statement(); break; case CLASS: case INTERFACE: ClassOrInterfaceDeclaration(0); break; default: jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("BlockStatement"); } } final public void LocalVariableDeclaration() throws ParseException { trace_call("LocalVariableDeclaration"); try { Modifiers(); Type(); VariableDeclarator(); label_43: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_43; } jj_consume_token(COMMA); VariableDeclarator(); } } finally { trace_return("LocalVariableDeclaration"); } } final public void EmptyStatement() throws ParseException { trace_call("EmptyStatement"); try { jj_consume_token(SEMICOLON); } finally { trace_return("EmptyStatement"); } } final public void StatementExpression() throws ParseException { trace_call("StatementExpression"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: PreIncrementExpression(); break; case DECR: PreDecrementExpression(); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: PrimaryExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: case INCR: case DECR: case PLUSASSIGN: case MINUSASSIGN: case STARASSIGN: case SLASHASSIGN: case ANDASSIGN: case ORASSIGN: case XORASSIGN: case REMASSIGN: case LSHIFTASSIGN: case RSIGNEDSHIFTASSIGN: case RUNSIGNEDSHIFTASSIGN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: jj_consume_token(INCR); break; case DECR: jj_consume_token(DECR); break; case ASSIGN: case PLUSASSIGN: case MINUSASSIGN: case STARASSIGN: case SLASHASSIGN: case ANDASSIGN: case ORASSIGN: case XORASSIGN: case REMASSIGN: case LSHIFTASSIGN: case RSIGNEDSHIFTASSIGN: case RUNSIGNEDSHIFTASSIGN: AssignmentOperator(); Expression(); break; default: jj_consume_token(-1); throw new ParseException(); } break; default: ; } break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("StatementExpression"); } } final public void SwitchStatement() throws ParseException { trace_call("SwitchStatement"); try { jj_consume_token(SWITCH); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); jj_consume_token(LBRACE); label_44: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CASE: case _DEFAULT: ; break; default: break label_44; } SwitchLabel(); label_45: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CLASS: case CONTINUE: case DO: case DOUBLE: case FALSE: case FINAL: case FLOAT: case FOR: case IF: case INT: case INTERFACE: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case RETURN: case SHORT: case STATIC: case STRICTFP: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRANSIENT: case TRUE: case TRY: case VOID: case VOLATILE: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case AT: case INCR: case DECR: ; break; default: break label_45; } BlockStatement(); } } jj_consume_token(RBRACE); } finally { trace_return("SwitchStatement"); } } final public void SwitchLabel() throws ParseException { trace_call("SwitchLabel"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CASE: jj_consume_token(CASE); Expression(); jj_consume_token(COLON); break; case _DEFAULT: jj_consume_token(_DEFAULT); jj_consume_token(COLON); break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("SwitchLabel"); } } final public void IfStatement() throws ParseException { trace_call("IfStatement"); try { jj_consume_token(IF); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); Statement(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ELSE: jj_consume_token(ELSE); Statement(); break; default: ; } } finally { trace_return("IfStatement"); } } final public void WhileStatement() throws ParseException { trace_call("WhileStatement"); try { jj_consume_token(WHILE); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); Statement(); } finally { trace_return("WhileStatement"); } } final public void DoStatement() throws ParseException { trace_call("DoStatement"); try { jj_consume_token(DO); Statement(); jj_consume_token(WHILE); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); jj_consume_token(SEMICOLON); } finally { trace_return("DoStatement"); } } final public void ForStatement() throws ParseException { trace_call("ForStatement"); try { jj_consume_token(FOR); jj_consume_token(LPAREN); if (jj_2_38(2147483647)) { Modifiers(); Type(); jj_consume_token(IDENTIFIER); jj_consume_token(COLON); Expression(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SUPER: case SYNCHRONIZED: case THIS: case TRANSIENT: case TRUE: case VOID: case VOLATILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case SEMICOLON: case AT: case INCR: case DECR: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SUPER: case SYNCHRONIZED: case THIS: case TRANSIENT: case TRUE: case VOID: case VOLATILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case AT: case INCR: case DECR: ForInit(); break; default: ; } jj_consume_token(SEMICOLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: Expression(); break; default: ; } jj_consume_token(SEMICOLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case INCR: case DECR: ForUpdate(); break; default: ; } break; default: jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RPAREN); Statement(); } finally { trace_return("ForStatement"); } } final public void ForInit() throws ParseException { trace_call("ForInit"); try { if (jj_2_39(2147483647)) { LocalVariableDeclaration(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case INCR: case DECR: StatementExpressionList(); break; default: jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("ForInit"); } } final public void StatementExpressionList() throws ParseException { trace_call("StatementExpressionList"); try { StatementExpression(); label_46: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_46; } jj_consume_token(COMMA); StatementExpression(); } } finally { trace_return("StatementExpressionList"); } } final public void ForUpdate() throws ParseException { trace_call("ForUpdate"); try { StatementExpressionList(); } finally { trace_return("ForUpdate"); } } final public void BreakStatement() throws ParseException { trace_call("BreakStatement"); try { jj_consume_token(BREAK); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: jj_consume_token(IDENTIFIER); break; default: ; } jj_consume_token(SEMICOLON); } finally { trace_return("BreakStatement"); } } final public void ContinueStatement() throws ParseException { trace_call("ContinueStatement"); try { jj_consume_token(CONTINUE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: jj_consume_token(IDENTIFIER); break; default: ; } jj_consume_token(SEMICOLON); } finally { trace_return("ContinueStatement"); } } final public void ReturnStatement() throws ParseException { trace_call("ReturnStatement"); try { jj_consume_token(RETURN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: Expression(); break; default: ; } jj_consume_token(SEMICOLON); } finally { trace_return("ReturnStatement"); } } final public void ThrowStatement() throws ParseException { trace_call("ThrowStatement"); try { jj_consume_token(THROW); Expression(); jj_consume_token(SEMICOLON); } finally { trace_return("ThrowStatement"); } } final public void SynchronizedStatement() throws ParseException { trace_call("SynchronizedStatement"); try { jj_consume_token(SYNCHRONIZED); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); Block(); } finally { trace_return("SynchronizedStatement"); } } final public void TryStatement() throws ParseException { trace_call("TryStatement"); try { jj_consume_token(TRY); Block(); label_47: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CATCH: ; break; default: break label_47; } jj_consume_token(CATCH); jj_consume_token(LPAREN); FormalParameter(); jj_consume_token(RPAREN); Block(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FINALLY: jj_consume_token(FINALLY); Block(); break; default: ; } } finally { trace_return("TryStatement"); } } /* We use productions to match >>>, >> and > so that we can keep the * type declaration syntax with generics clean */ final public void RUNSIGNEDSHIFT() throws ParseException { trace_call("RUNSIGNEDSHIFT"); try { if (getToken(1).kind == GT && ((Token.GTToken)getToken(1)).realKind == RUNSIGNEDSHIFT) { } else { jj_consume_token(-1); throw new ParseException(); } jj_consume_token(GT); jj_consume_token(GT); jj_consume_token(GT); } finally { trace_return("RUNSIGNEDSHIFT"); } } final public void RSIGNEDSHIFT() throws ParseException { trace_call("RSIGNEDSHIFT"); try { if (getToken(1).kind == GT && ((Token.GTToken)getToken(1)).realKind == RSIGNEDSHIFT) { } else { jj_consume_token(-1); throw new ParseException(); } jj_consume_token(GT); jj_consume_token(GT); } finally { trace_return("RSIGNEDSHIFT"); } } /* Annotation syntax follows. */ final public void Annotation() throws ParseException { trace_call("Annotation"); try { if (jj_2_40(2147483647)) { NormalAnnotation(); } else if (jj_2_41(2147483647)) { SingleMemberAnnotation(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: MarkerAnnotation(); break; default: jj_consume_token(-1); throw new ParseException(); } } } finally { trace_return("Annotation"); } } final public void NormalAnnotation() throws ParseException { trace_call("NormalAnnotation"); try { jj_consume_token(AT); Name(); jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: MemberValuePairs(); break; default: ; } jj_consume_token(RPAREN); } finally { trace_return("NormalAnnotation"); } } final public void MarkerAnnotation() throws ParseException { trace_call("MarkerAnnotation"); try { jj_consume_token(AT); Name(); } finally { trace_return("MarkerAnnotation"); } } final public void SingleMemberAnnotation() throws ParseException { trace_call("SingleMemberAnnotation"); try { jj_consume_token(AT); Name(); jj_consume_token(LPAREN); MemberValue(); jj_consume_token(RPAREN); } finally { trace_return("SingleMemberAnnotation"); } } final public void MemberValuePairs() throws ParseException { trace_call("MemberValuePairs"); try { MemberValuePair(); label_48: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_48; } jj_consume_token(COMMA); MemberValuePair(); } } finally { trace_return("MemberValuePairs"); } } final public void MemberValuePair() throws ParseException { trace_call("MemberValuePair"); try { jj_consume_token(IDENTIFIER); jj_consume_token(ASSIGN); MemberValue(); } finally { trace_return("MemberValuePair"); } } final public void MemberValue() throws ParseException { trace_call("MemberValue"); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: Annotation(); break; case LBRACE: MemberValueArrayInitializer(); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: ConditionalExpression(); break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("MemberValue"); } } final public void MemberValueArrayInitializer() throws ParseException { trace_call("MemberValueArrayInitializer"); try { jj_consume_token(LBRACE); MemberValue(); label_49: while (true) { if (jj_2_42(2)) { ; } else { break label_49; } jj_consume_token(COMMA); MemberValue(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); break; default: ; } jj_consume_token(RBRACE); } finally { trace_return("MemberValueArrayInitializer"); } } /* Annotation Types. */ final public void AnnotationTypeDeclaration(int modifiers) throws ParseException { trace_call("AnnotationTypeDeclaration"); try { jj_consume_token(AT); jj_consume_token(INTERFACE); jj_consume_token(IDENTIFIER); AnnotationTypeBody(); } finally { trace_return("AnnotationTypeDeclaration"); } } final public void AnnotationTypeBody() throws ParseException { trace_call("AnnotationTypeBody"); try { jj_consume_token(LBRACE); label_50: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case SEMICOLON: case AT: ; break; default: break label_50; } AnnotationTypeMemberDeclaration(); } jj_consume_token(RBRACE); } finally { trace_return("AnnotationTypeBody"); } } final public void AnnotationTypeMemberDeclaration() throws ParseException { trace_call("AnnotationTypeMemberDeclaration"); try { int modifiers; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: modifiers = Modifiers(); if (jj_2_43(2147483647)) { Type(); jj_consume_token(IDENTIFIER); jj_consume_token(LPAREN); jj_consume_token(RPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case _DEFAULT: DefaultValue(); break; default: ; } jj_consume_token(SEMICOLON); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: case INTERFACE: ClassOrInterfaceDeclaration(modifiers); break; case ENUM: EnumDeclaration(modifiers); break; case AT: AnnotationTypeDeclaration(modifiers); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: FieldDeclaration(modifiers); break; default: jj_consume_token(-1); throw new ParseException(); } } break; case SEMICOLON: jj_consume_token(SEMICOLON); break; default: jj_consume_token(-1); throw new ParseException(); } } finally { trace_return("AnnotationTypeMemberDeclaration"); } } final public void DefaultValue() throws ParseException { trace_call("DefaultValue"); try { jj_consume_token(_DEFAULT); MemberValue(); } finally { trace_return("DefaultValue"); } } private boolean jj_2_1(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_1(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_2(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_2(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_3(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_3(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_4(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_4(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_5(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_5(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_6(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_6(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_7(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_7(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_8(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_8(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_9(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_9(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_10(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_10(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_11(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_11(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_12(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_12(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_13(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_13(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_14(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_14(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_15(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_15(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_16(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_16(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_17(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_17(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_18(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_18(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_19(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_19(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_20(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_20(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_21(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_21(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_22(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_22(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_23(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_23(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_24(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_24(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_25(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_25(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_26(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_26(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_27(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_27(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_28(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_28(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_29(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_29(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_30(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_30(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_31(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_31(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_32(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_32(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_33(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_33(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_34(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_34(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_35(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_35(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_36(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_36(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_37(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_37(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_38(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_38(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_39(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_39(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_40(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_40(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_41(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_41(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_42(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_42(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_43(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_43(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_3R_124() { if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3_13()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3_14()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_99() { if (jj_3R_124()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_12()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_98() { if (jj_3R_78()) return true; Token xsp; if (jj_3_11()) return true; while (true) { xsp = jj_scanpos; if (jj_3_11()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_71() { Token xsp; xsp = jj_scanpos; if (jj_3R_98()) { jj_scanpos = xsp; if (jj_3R_99()) return true; } return false; } private boolean jj_3_9() { if (jj_scan_token(THIS)) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_263() { if (jj_scan_token(THROWS)) return true; if (jj_3R_277()) return true; return false; } private boolean jj_3R_91() { if (jj_3R_78()) return true; return false; } private boolean jj_3_10() { if (jj_3R_71()) return true; return false; } private boolean jj_3R_66() { Token xsp; xsp = jj_scanpos; if (jj_3_10()) { jj_scanpos = xsp; if (jj_3R_91()) return true; } return false; } private boolean jj_3R_68() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(51)) jj_scanpos = xsp; if (jj_3R_92()) return true; return false; } private boolean jj_3_8() { if (jj_3R_70()) return true; return false; } private boolean jj_3R_96() { if (jj_3R_72()) return true; return false; } private boolean jj_3R_280() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_95() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_285() { if (jj_scan_token(COMMA)) return true; if (jj_3R_284()) return true; return false; } private boolean jj_3R_70() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_95()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3_9()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_96()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(56)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } if (jj_3R_97()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_265() { if (jj_3R_134()) return true; return false; } private boolean jj_3R_264() { if (jj_3R_70()) return true; return false; } private boolean jj_3R_261() { if (jj_3R_90()) return true; return false; } private boolean jj_3R_253() { Token xsp; xsp = jj_scanpos; if (jj_3R_261()) jj_scanpos = xsp; if (jj_scan_token(IDENTIFIER)) return true; if (jj_3R_262()) return true; xsp = jj_scanpos; if (jj_3R_263()) jj_scanpos = xsp; if (jj_scan_token(LBRACE)) return true; xsp = jj_scanpos; if (jj_3R_264()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3R_265()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_270() { if (jj_scan_token(THROWS)) return true; if (jj_3R_277()) return true; return false; } private boolean jj_3_7() { if (jj_scan_token(COMMA)) return true; if (jj_3R_69()) return true; return false; } private boolean jj_3R_284() { if (jj_3R_85()) return true; if (jj_3R_66()) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(123)) jj_scanpos = xsp; if (jj_3R_278()) return true; return false; } private boolean jj_3R_276() { if (jj_3R_284()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_285()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_262() { if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_276()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_269() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_3R_262()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_280()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3_43() { if (jj_3R_66()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_271() { if (jj_3R_92()) return true; return false; } private boolean jj_3R_268() { if (jj_3R_90()) return true; return false; } private boolean jj_3R_255() { Token xsp; xsp = jj_scanpos; if (jj_3R_268()) jj_scanpos = xsp; if (jj_3R_81()) return true; if (jj_3R_269()) return true; xsp = jj_scanpos; if (jj_3R_270()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_271()) { jj_scanpos = xsp; if (jj_scan_token(85)) return true; } return false; } private boolean jj_3R_243() { if (jj_3R_69()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_7()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_279() { if (jj_scan_token(ASSIGN)) return true; if (jj_3R_69()) return true; return false; } private boolean jj_3R_267() { if (jj_scan_token(COMMA)) return true; if (jj_3R_266()) return true; return false; } private boolean jj_3R_287() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_122() { if (jj_scan_token(LBRACE)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_243()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(86)) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3_42() { if (jj_scan_token(COMMA)) return true; if (jj_3R_88()) return true; return false; } private boolean jj_3R_67() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_94() { if (jj_3R_74()) return true; return false; } private boolean jj_3R_93() { if (jj_3R_122()) return true; return false; } private boolean jj_3R_69() { Token xsp; xsp = jj_scanpos; if (jj_3R_93()) { jj_scanpos = xsp; if (jj_3R_94()) return true; } return false; } private boolean jj_3R_278() { if (jj_scan_token(IDENTIFIER)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_287()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_266() { if (jj_3R_278()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_279()) jj_scanpos = xsp; return false; } private boolean jj_3R_129() { if (jj_scan_token(LBRACE)) return true; if (jj_3R_88()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_42()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_scan_token(86)) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_156() { if (jj_scan_token(COMMA)) return true; if (jj_3R_155()) return true; return false; } private boolean jj_3_5() { if (jj_3R_66()) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_67()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_scan_token(86)) { jj_scanpos = xsp; if (jj_scan_token(89)) { jj_scanpos = xsp; if (jj_scan_token(85)) return true; } } return false; } private boolean jj_3R_65() { if (jj_3R_90()) return true; return false; } private boolean jj_3R_115() { if (jj_3R_101()) return true; return false; } private boolean jj_3R_254() { if (jj_3R_66()) return true; if (jj_3R_266()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_267()) { jj_scanpos = xsp; break; } } if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3_4() { Token xsp; xsp = jj_scanpos; if (jj_3R_65()) jj_scanpos = xsp; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_114() { if (jj_3R_129()) return true; return false; } private boolean jj_3R_113() { if (jj_3R_89()) return true; return false; } private boolean jj_3R_88() { Token xsp; xsp = jj_scanpos; if (jj_3R_113()) { jj_scanpos = xsp; if (jj_3R_114()) { jj_scanpos = xsp; if (jj_3R_115()) return true; } } return false; } private boolean jj_3R_251() { if (jj_3R_255()) return true; return false; } private boolean jj_3R_155() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(ASSIGN)) return true; if (jj_3R_88()) return true; return false; } private boolean jj_3R_148() { if (jj_scan_token(BIT_AND)) return true; if (jj_3R_124()) return true; return false; } private boolean jj_3R_250() { if (jj_3R_254()) return true; return false; } private boolean jj_3R_249() { if (jj_3R_253()) return true; return false; } private boolean jj_3R_248() { if (jj_3R_252()) return true; return false; } private boolean jj_3R_147() { if (jj_3R_155()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_156()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_247() { if (jj_3R_151()) return true; return false; } private boolean jj_3R_139() { if (jj_3R_147()) return true; return false; } private boolean jj_3R_87() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(ASSIGN)) return true; return false; } private boolean jj_3R_289() { if (jj_3R_242()) return true; return false; } private boolean jj_3R_131() { if (jj_scan_token(AT)) return true; if (jj_3R_86()) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_88()) return true; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_246() { if (jj_3R_85()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_247()) { jj_scanpos = xsp; if (jj_3R_248()) { jj_scanpos = xsp; if (jj_3R_249()) { jj_scanpos = xsp; if (jj_3R_250()) { jj_scanpos = xsp; if (jj_3R_251()) return true; } } } } return false; } private boolean jj_3R_132() { if (jj_scan_token(AT)) return true; if (jj_3R_86()) return true; return false; } private boolean jj_3_6() { if (jj_3R_68()) return true; return false; } private boolean jj_3R_245() { Token xsp; xsp = jj_scanpos; if (jj_3_6()) { jj_scanpos = xsp; if (jj_3R_246()) { jj_scanpos = xsp; if (jj_scan_token(85)) return true; } } return false; } private boolean jj_3_41() { if (jj_scan_token(AT)) return true; if (jj_3R_86()) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_244() { if (jj_3R_245()) return true; return false; } private boolean jj_3R_130() { if (jj_scan_token(AT)) return true; if (jj_3R_86()) return true; if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_139()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_120() { if (jj_scan_token(COMMA)) return true; if (jj_3R_119()) return true; return false; } private boolean jj_3_40() { if (jj_scan_token(AT)) return true; if (jj_3R_86()) return true; if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_87()) { jj_scanpos = xsp; if (jj_scan_token(80)) return true; } return false; } private boolean jj_3R_133() { if (jj_3R_140()) return true; return false; } private boolean jj_3R_288() { if (jj_3R_97()) return true; return false; } private boolean jj_3R_242() { if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_244()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_118() { if (jj_3R_132()) return true; return false; } private boolean jj_3R_117() { if (jj_3R_131()) return true; return false; } private boolean jj_3R_140() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_124()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_148()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_116() { if (jj_3R_130()) return true; return false; } private boolean jj_3R_102() { return false; } private boolean jj_3R_89() { Token xsp; xsp = jj_scanpos; if (jj_3R_116()) { jj_scanpos = xsp; if (jj_3R_117()) { jj_scanpos = xsp; if (jj_3R_118()) return true; } } return false; } private boolean jj_3R_119() { if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_133()) jj_scanpos = xsp; return false; } private boolean jj_3_3() { if (jj_scan_token(COMMA)) return true; if (jj_3R_64()) return true; return false; } private boolean jj_3R_103() { return false; } private boolean jj_3R_90() { if (jj_scan_token(LT)) return true; if (jj_3R_119()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_120()) { jj_scanpos = xsp; break; } } if (jj_scan_token(GT)) return true; return false; } private boolean jj_3R_75() { jj_lookingAhead = true; jj_semLA = getToken(1).kind == GT && ((Token.GTToken)getToken(1)).realKind == RSIGNEDSHIFT; jj_lookingAhead = false; if (!jj_semLA || jj_3R_102()) return true; if (jj_scan_token(GT)) return true; if (jj_scan_token(GT)) return true; return false; } private boolean jj_3R_283() { if (jj_3R_245()) return true; return false; } private boolean jj_3R_64() { if (jj_3R_85()) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_288()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_289()) jj_scanpos = xsp; return false; } private boolean jj_3R_76() { jj_lookingAhead = true; jj_semLA = getToken(1).kind == GT && ((Token.GTToken)getToken(1)).realKind == RUNSIGNEDSHIFT; jj_lookingAhead = false; if (!jj_semLA || jj_3R_103()) return true; if (jj_scan_token(GT)) return true; if (jj_scan_token(GT)) return true; if (jj_scan_token(GT)) return true; return false; } private boolean jj_3R_275() { if (jj_scan_token(SEMICOLON)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_283()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_274() { if (jj_3R_64()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_3()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_260() { if (jj_scan_token(LBRACE)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_274()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(86)) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_275()) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_298() { if (jj_scan_token(FINALLY)) return true; if (jj_3R_92()) return true; return false; } private boolean jj_3R_297() { if (jj_scan_token(CATCH)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_284()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_92()) return true; return false; } private boolean jj_3R_259() { if (jj_3R_273()) return true; return false; } private boolean jj_3R_187() { if (jj_scan_token(TRY)) return true; if (jj_3R_92()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_297()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3R_298()) jj_scanpos = xsp; return false; } private boolean jj_3R_252() { if (jj_scan_token(ENUM)) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_259()) jj_scanpos = xsp; if (jj_3R_260()) return true; return false; } private boolean jj_3R_282() { if (jj_scan_token(COMMA)) return true; if (jj_3R_124()) return true; return false; } private boolean jj_3R_186() { if (jj_scan_token(SYNCHRONIZED)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_92()) return true; return false; } private boolean jj_3R_296() { if (jj_3R_74()) return true; return false; } private boolean jj_3R_273() { if (jj_scan_token(IMPLEMENTS)) return true; if (jj_3R_124()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_282()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_185() { if (jj_scan_token(THROW)) return true; if (jj_3R_74()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_304() { if (jj_3R_309()) return true; return false; } private boolean jj_3R_281() { if (jj_scan_token(COMMA)) return true; if (jj_3R_124()) return true; return false; } private boolean jj_3R_313() { if (jj_scan_token(COMMA)) return true; if (jj_3R_176()) return true; return false; } private boolean jj_3R_184() { if (jj_scan_token(RETURN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_296()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_272() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_124()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_281()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_171() { if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_183() { if (jj_scan_token(CONTINUE)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(76)) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_258() { if (jj_3R_273()) return true; return false; } private boolean jj_3R_257() { if (jj_3R_272()) return true; return false; } private boolean jj_3R_256() { if (jj_3R_90()) return true; return false; } private boolean jj_3R_182() { if (jj_scan_token(BREAK)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(76)) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_151() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(20)) { jj_scanpos = xsp; if (jj_3R_171()) return true; } if (jj_scan_token(IDENTIFIER)) return true; xsp = jj_scanpos; if (jj_3R_256()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_257()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_258()) jj_scanpos = xsp; if (jj_3R_242()) return true; return false; } private boolean jj_3R_309() { if (jj_3R_312()) return true; return false; } private boolean jj_3R_303() { if (jj_3R_74()) return true; return false; } private boolean jj_3_39() { if (jj_3R_85()) return true; if (jj_3R_66()) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3R_312() { if (jj_3R_176()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_313()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_293() { if (jj_scan_token(ELSE)) return true; if (jj_3R_150()) return true; return false; } private boolean jj_3R_311() { if (jj_3R_312()) return true; return false; } private boolean jj_3_38() { if (jj_3R_85()) return true; if (jj_3R_66()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(COLON)) return true; return false; } private boolean jj_3R_310() { if (jj_3R_149()) return true; return false; } private boolean jj_3R_308() { Token xsp; xsp = jj_scanpos; if (jj_3R_310()) { jj_scanpos = xsp; if (jj_3R_311()) return true; } return false; } private boolean jj_3R_302() { if (jj_3R_308()) return true; return false; } private boolean jj_3R_295() { Token xsp; xsp = jj_scanpos; if (jj_3R_302()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; xsp = jj_scanpos; if (jj_3R_303()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; xsp = jj_scanpos; if (jj_3R_304()) jj_scanpos = xsp; return false; } private boolean jj_3R_294() { if (jj_3R_85()) return true; if (jj_3R_66()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(COLON)) return true; if (jj_3R_74()) return true; return false; } private boolean jj_3R_181() { if (jj_scan_token(FOR)) return true; if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_294()) { jj_scanpos = xsp; if (jj_3R_295()) return true; } if (jj_scan_token(RPAREN)) return true; if (jj_3R_150()) return true; return false; } private boolean jj_3R_63() { if (jj_3R_89()) return true; return false; } private boolean jj_3R_62() { if (jj_scan_token(STRICTFP)) return true; return false; } private boolean jj_3R_61() { if (jj_scan_token(VOLATILE)) return true; return false; } private boolean jj_3R_180() { if (jj_scan_token(DO)) return true; if (jj_3R_150()) return true; if (jj_scan_token(WHILE)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_60() { if (jj_scan_token(TRANSIENT)) return true; return false; } private boolean jj_3R_59() { if (jj_scan_token(NATIVE)) return true; return false; } private boolean jj_3R_58() { if (jj_scan_token(SYNCHRONIZED)) return true; return false; } private boolean jj_3R_179() { if (jj_scan_token(WHILE)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_150()) return true; return false; } private boolean jj_3R_57() { if (jj_scan_token(ABSTRACT)) return true; return false; } private boolean jj_3R_56() { if (jj_scan_token(FINAL)) return true; return false; } private boolean jj_3R_301() { if (jj_3R_134()) return true; return false; } private boolean jj_3R_55() { if (jj_scan_token(PRIVATE)) return true; return false; } private boolean jj_3R_178() { if (jj_scan_token(IF)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_150()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_293()) jj_scanpos = xsp; return false; } private boolean jj_3R_54() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3R_53() { if (jj_scan_token(STATIC)) return true; return false; } private boolean jj_3R_52() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3_2() { Token xsp; xsp = jj_scanpos; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) { jj_scanpos = xsp; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) { jj_scanpos = xsp; if (jj_3R_59()) { jj_scanpos = xsp; if (jj_3R_60()) { jj_scanpos = xsp; if (jj_3R_61()) { jj_scanpos = xsp; if (jj_3R_62()) { jj_scanpos = xsp; if (jj_3R_63()) return true; } } } } } } } } } } } return false; } private boolean jj_3R_307() { if (jj_scan_token(_DEFAULT)) return true; if (jj_scan_token(COLON)) return true; return false; } private boolean jj_3R_85() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_2()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_306() { if (jj_scan_token(CASE)) return true; if (jj_3R_74()) return true; if (jj_scan_token(COLON)) return true; return false; } private boolean jj_3R_300() { Token xsp; xsp = jj_scanpos; if (jj_3R_306()) { jj_scanpos = xsp; if (jj_3R_307()) return true; } return false; } private boolean jj_3R_290() { if (jj_scan_token(COMMA)) return true; if (jj_3R_266()) return true; return false; } private boolean jj_3R_292() { if (jj_3R_300()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_301()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_177() { if (jj_scan_token(SWITCH)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_292()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_305() { if (jj_3R_73()) return true; if (jj_3R_74()) return true; return false; } private boolean jj_3R_299() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(101)) { jj_scanpos = xsp; if (jj_scan_token(102)) { jj_scanpos = xsp; if (jj_3R_305()) return true; } } return false; } private boolean jj_3R_194() { if (jj_3R_199()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_299()) jj_scanpos = xsp; return false; } private boolean jj_3R_51() { if (jj_3R_89()) return true; return false; } private boolean jj_3R_193() { if (jj_3R_198()) return true; return false; } private boolean jj_3_1() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_51()) { jj_scanpos = xsp; break; } } if (jj_scan_token(PACKAGE)) return true; return false; } private boolean jj_3R_176() { Token xsp; xsp = jj_scanpos; if (jj_3R_192()) { jj_scanpos = xsp; if (jj_3R_193()) { jj_scanpos = xsp; if (jj_3R_194()) return true; } } return false; } private boolean jj_3R_192() { if (jj_3R_197()) return true; return false; } private boolean jj_3_37() { if (jj_3R_85()) return true; if (jj_3R_66()) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3R_149() { if (jj_3R_85()) return true; if (jj_3R_66()) return true; if (jj_3R_266()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_290()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_291() { if (jj_scan_token(COLON)) return true; if (jj_3R_74()) return true; return false; } private boolean jj_3R_143() { if (jj_3R_151()) return true; return false; } private boolean jj_3R_142() { if (jj_3R_150()) return true; return false; } private boolean jj_3R_141() { if (jj_3R_149()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_134() { Token xsp; xsp = jj_scanpos; if (jj_3R_141()) { jj_scanpos = xsp; if (jj_3R_142()) { jj_scanpos = xsp; if (jj_3R_143()) return true; } } return false; } private boolean jj_3R_121() { if (jj_3R_134()) return true; return false; } private boolean jj_3R_92() { if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_121()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_84() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(COLON)) return true; if (jj_3R_150()) return true; return false; } private boolean jj_3R_175() { if (jj_scan_token(ASSERT)) return true; if (jj_3R_74()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_291()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_170() { if (jj_3R_187()) return true; return false; } private boolean jj_3R_169() { if (jj_3R_186()) return true; return false; } private boolean jj_3_34() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_168() { if (jj_3R_185()) return true; return false; } private boolean jj_3R_167() { if (jj_3R_184()) return true; return false; } private boolean jj_3R_166() { if (jj_3R_183()) return true; return false; } private boolean jj_3R_165() { if (jj_3R_182()) return true; return false; } private boolean jj_3R_164() { if (jj_3R_181()) return true; return false; } private boolean jj_3R_163() { if (jj_3R_180()) return true; return false; } private boolean jj_3R_162() { if (jj_3R_179()) return true; return false; } private boolean jj_3R_161() { if (jj_3R_178()) return true; return false; } private boolean jj_3R_160() { if (jj_3R_177()) return true; return false; } private boolean jj_3R_159() { if (jj_3R_176()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_158() { if (jj_3R_92()) return true; return false; } private boolean jj_3R_157() { if (jj_3R_175()) return true; return false; } private boolean jj_3R_236() { if (jj_3R_72()) return true; return false; } private boolean jj_3_36() { if (jj_3R_84()) return true; return false; } private boolean jj_3R_150() { Token xsp; xsp = jj_scanpos; if (jj_3_36()) { jj_scanpos = xsp; if (jj_3R_157()) { jj_scanpos = xsp; if (jj_3R_158()) { jj_scanpos = xsp; if (jj_scan_token(85)) { jj_scanpos = xsp; if (jj_3R_159()) { jj_scanpos = xsp; if (jj_3R_160()) { jj_scanpos = xsp; if (jj_3R_161()) { jj_scanpos = xsp; if (jj_3R_162()) { jj_scanpos = xsp; if (jj_3R_163()) { jj_scanpos = xsp; if (jj_3R_164()) { jj_scanpos = xsp; if (jj_3R_165()) { jj_scanpos = xsp; if (jj_3R_166()) { jj_scanpos = xsp; if (jj_3R_167()) { jj_scanpos = xsp; if (jj_3R_168()) { jj_scanpos = xsp; if (jj_3R_169()) { jj_scanpos = xsp; if (jj_3R_170()) return true; } } } } } } } } } } } } } } } return false; } private boolean jj_3R_240() { if (jj_3R_242()) return true; return false; } private boolean jj_3R_241() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3_33() { if (jj_scan_token(LBRACKET)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_239() { Token xsp; if (jj_3R_241()) return true; while (true) { xsp = jj_scanpos; if (jj_3R_241()) { jj_scanpos = xsp; break; } } if (jj_3R_122()) return true; return false; } private boolean jj_3_35() { Token xsp; if (jj_3_33()) return true; while (true) { xsp = jj_scanpos; if (jj_3_33()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3_34()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_235() { Token xsp; xsp = jj_scanpos; if (jj_3_35()) { jj_scanpos = xsp; if (jj_3R_239()) return true; } return false; } private boolean jj_3R_238() { if (jj_3R_97()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_240()) jj_scanpos = xsp; return false; } private boolean jj_3R_144() { if (jj_scan_token(COMMA)) return true; if (jj_3R_74()) return true; return false; } private boolean jj_3R_237() { if (jj_3R_235()) return true; return false; } private boolean jj_3R_112() { if (jj_scan_token(NEW)) return true; if (jj_3R_124()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_236()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_237()) { jj_scanpos = xsp; if (jj_3R_238()) return true; } return false; } private boolean jj_3R_82() { Token xsp; xsp = jj_scanpos; if (jj_3_32()) { jj_scanpos = xsp; if (jj_3R_112()) return true; } return false; } private boolean jj_3_32() { if (jj_scan_token(NEW)) return true; if (jj_3R_78()) return true; if (jj_3R_235()) return true; return false; } private boolean jj_3R_136() { if (jj_3R_74()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_144()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_123() { if (jj_3R_136()) return true; return false; } private boolean jj_3R_97() { if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_123()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_154() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(60)) { jj_scanpos = xsp; if (jj_scan_token(29)) return true; } return false; } private boolean jj_3R_146() { if (jj_3R_154()) return true; return false; } private boolean jj_3R_128() { if (jj_3R_138()) return true; return false; } private boolean jj_3R_138() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(65)) { jj_scanpos = xsp; if (jj_scan_token(69)) { jj_scanpos = xsp; if (jj_scan_token(74)) { jj_scanpos = xsp; if (jj_scan_token(75)) { jj_scanpos = xsp; if (jj_3R_146()) { jj_scanpos = xsp; if (jj_scan_token(44)) return true; } } } } } return false; } private boolean jj_3R_110() { if (jj_3R_97()) return true; return false; } private boolean jj_3R_109() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3_29() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(THIS)) return true; return false; } private boolean jj_3R_108() { if (jj_scan_token(LBRACKET)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3_28() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(SUPER)) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3_31() { if (jj_3R_83()) return true; return false; } private boolean jj_3_30() { if (jj_scan_token(DOT)) return true; if (jj_3R_82()) return true; return false; } private boolean jj_3R_107() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(THIS)) return true; return false; } private boolean jj_3_27() { if (jj_3R_81()) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3R_106() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(SUPER)) return true; return false; } private boolean jj_3R_79() { Token xsp; xsp = jj_scanpos; if (jj_3R_106()) { jj_scanpos = xsp; if (jj_3R_107()) { jj_scanpos = xsp; if (jj_3_30()) { jj_scanpos = xsp; if (jj_3_31()) { jj_scanpos = xsp; if (jj_3R_108()) { jj_scanpos = xsp; if (jj_3R_109()) { jj_scanpos = xsp; if (jj_3R_110()) return true; } } } } } } return false; } private boolean jj_3R_80() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_211() { if (jj_3R_86()) return true; return false; } private boolean jj_3_26() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_80()) { jj_scanpos = xsp; break; } } if (jj_scan_token(THIS)) return true; return false; } private boolean jj_3R_210() { if (jj_3R_81()) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3R_209() { if (jj_3R_82()) return true; return false; } private boolean jj_3R_208() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3_25() { if (jj_3R_79()) return true; return false; } private boolean jj_3R_207() { if (jj_scan_token(SUPER)) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3R_214() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_206() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_214()) { jj_scanpos = xsp; break; } } if (jj_scan_token(THIS)) return true; return false; } private boolean jj_3R_202() { Token xsp; xsp = jj_scanpos; if (jj_3R_205()) { jj_scanpos = xsp; if (jj_3R_206()) { jj_scanpos = xsp; if (jj_3R_207()) { jj_scanpos = xsp; if (jj_3R_208()) { jj_scanpos = xsp; if (jj_3R_209()) { jj_scanpos = xsp; if (jj_3R_210()) { jj_scanpos = xsp; if (jj_3R_211()) return true; } } } } } } return false; } private boolean jj_3R_205() { if (jj_3R_138()) return true; return false; } private boolean jj_3R_234() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(101)) { jj_scanpos = xsp; if (jj_scan_token(102)) return true; } return false; } private boolean jj_3R_83() { if (jj_scan_token(DOT)) return true; if (jj_3R_72()) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3_24() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_78()) return true; return false; } private boolean jj_3R_199() { if (jj_3R_202()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_25()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_233() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_66()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_224()) return true; return false; } private boolean jj_3R_230() { Token xsp; xsp = jj_scanpos; if (jj_3R_232()) { jj_scanpos = xsp; if (jj_3R_233()) return true; } return false; } private boolean jj_3R_232() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_66()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_218()) return true; return false; } private boolean jj_3_23() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_66()) return true; if (jj_scan_token(LBRACKET)) return true; return false; } private boolean jj_3R_231() { if (jj_3R_199()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_234()) jj_scanpos = xsp; return false; } private boolean jj_3R_105() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_66()) return true; if (jj_scan_token(RPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(92)) { jj_scanpos = xsp; if (jj_scan_token(91)) { jj_scanpos = xsp; if (jj_scan_token(79)) { jj_scanpos = xsp; if (jj_scan_token(76)) { jj_scanpos = xsp; if (jj_scan_token(56)) { jj_scanpos = xsp; if (jj_scan_token(53)) { jj_scanpos = xsp; if (jj_scan_token(43)) { jj_scanpos = xsp; if (jj_3R_128()) return true; } } } } } } } return false; } private boolean jj_3R_104() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_66()) return true; if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3_22() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_78()) return true; return false; } private boolean jj_3R_77() { Token xsp; xsp = jj_scanpos; if (jj_3_22()) { jj_scanpos = xsp; if (jj_3R_104()) { jj_scanpos = xsp; if (jj_3R_105()) return true; } } return false; } private boolean jj_3_21() { if (jj_3R_77()) return true; return false; } private boolean jj_3_20() { if (jj_3R_76()) return true; return false; } private boolean jj_3R_228() { if (jj_3R_231()) return true; return false; } private boolean jj_3R_227() { if (jj_3R_230()) return true; return false; } private boolean jj_3R_224() { Token xsp; xsp = jj_scanpos; if (jj_3R_226()) { jj_scanpos = xsp; if (jj_3R_227()) { jj_scanpos = xsp; if (jj_3R_228()) return true; } } return false; } private boolean jj_3R_226() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(92)) { jj_scanpos = xsp; if (jj_scan_token(91)) return true; } if (jj_3R_218()) return true; return false; } private boolean jj_3R_198() { if (jj_scan_token(DECR)) return true; if (jj_3R_199()) return true; return false; } private boolean jj_3R_225() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(103)) { jj_scanpos = xsp; if (jj_scan_token(104)) return true; } if (jj_3R_216()) return true; return false; } private boolean jj_3_19() { if (jj_3R_75()) return true; return false; } private boolean jj_3R_229() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(105)) { jj_scanpos = xsp; if (jj_scan_token(106)) { jj_scanpos = xsp; if (jj_scan_token(110)) return true; } } if (jj_3R_218()) return true; return false; } private boolean jj_3R_197() { if (jj_scan_token(INCR)) return true; if (jj_3R_199()) return true; return false; } private boolean jj_3R_223() { if (jj_3R_224()) return true; return false; } private boolean jj_3_18() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(111)) { jj_scanpos = xsp; if (jj_3_19()) { jj_scanpos = xsp; if (jj_3_20()) return true; } } if (jj_3R_213()) return true; return false; } private boolean jj_3R_222() { if (jj_3R_198()) return true; return false; } private boolean jj_3R_221() { if (jj_3R_197()) return true; return false; } private boolean jj_3R_218() { Token xsp; xsp = jj_scanpos; if (jj_3R_220()) { jj_scanpos = xsp; if (jj_3R_221()) { jj_scanpos = xsp; if (jj_3R_222()) { jj_scanpos = xsp; if (jj_3R_223()) return true; } } } return false; } private boolean jj_3R_220() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(103)) { jj_scanpos = xsp; if (jj_scan_token(104)) return true; } if (jj_3R_218()) return true; return false; } private boolean jj_3R_219() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(90)) { jj_scanpos = xsp; if (jj_scan_token(126)) { jj_scanpos = xsp; if (jj_scan_token(96)) { jj_scanpos = xsp; if (jj_scan_token(97)) return true; } } } if (jj_3R_204()) return true; return false; } private boolean jj_3R_217() { if (jj_scan_token(INSTANCEOF)) return true; if (jj_3R_66()) return true; return false; } private boolean jj_3R_216() { if (jj_3R_218()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_229()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_215() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(95)) { jj_scanpos = xsp; if (jj_scan_token(98)) return true; } if (jj_3R_196()) return true; return false; } private boolean jj_3R_213() { if (jj_3R_216()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_225()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_204() { if (jj_3R_213()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_18()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_212() { if (jj_scan_token(BIT_AND)) return true; if (jj_3R_191()) return true; return false; } private boolean jj_3R_201() { if (jj_3R_204()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_219()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_200() { if (jj_scan_token(BIT_OR)) return true; if (jj_3R_153()) return true; return false; } private boolean jj_3R_196() { if (jj_3R_201()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_217()) jj_scanpos = xsp; return false; } private boolean jj_3R_203() { if (jj_scan_token(XOR)) return true; if (jj_3R_174()) return true; return false; } private boolean jj_3R_195() { if (jj_scan_token(SC_AND)) return true; if (jj_3R_145()) return true; return false; } private boolean jj_3R_191() { if (jj_3R_196()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_215()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_190() { if (jj_scan_token(SC_OR)) return true; if (jj_3R_137()) return true; return false; } private boolean jj_3R_174() { if (jj_3R_191()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_212()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_173() { if (jj_scan_token(HOOK)) return true; if (jj_3R_74()) return true; if (jj_scan_token(COLON)) return true; if (jj_3R_74()) return true; return false; } private boolean jj_3R_153() { if (jj_3R_174()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_203()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_145() { if (jj_3R_153()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_200()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_137() { if (jj_3R_145()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_195()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_127() { if (jj_3R_137()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_190()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_101() { if (jj_3R_127()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_173()) jj_scanpos = xsp; return false; } private boolean jj_3R_73() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(89)) { jj_scanpos = xsp; if (jj_scan_token(114)) { jj_scanpos = xsp; if (jj_scan_token(115)) { jj_scanpos = xsp; if (jj_scan_token(119)) { jj_scanpos = xsp; if (jj_scan_token(112)) { jj_scanpos = xsp; if (jj_scan_token(113)) { jj_scanpos = xsp; if (jj_scan_token(120)) { jj_scanpos = xsp; if (jj_scan_token(121)) { jj_scanpos = xsp; if (jj_scan_token(122)) { jj_scanpos = xsp; if (jj_scan_token(116)) { jj_scanpos = xsp; if (jj_scan_token(118)) { jj_scanpos = xsp; if (jj_scan_token(117)) return true; } } } } } } } } } } } return false; } private boolean jj_3_17() { if (jj_3R_73()) return true; if (jj_3R_74()) return true; return false; } private boolean jj_3R_74() { if (jj_3R_101()) return true; Token xsp; xsp = jj_scanpos; if (jj_3_17()) jj_scanpos = xsp; return false; } private boolean jj_3R_286() { if (jj_scan_token(COMMA)) return true; if (jj_3R_86()) return true; return false; } private boolean jj_3R_277() { if (jj_3R_86()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_286()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3_16() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3R_86() { if (jj_scan_token(IDENTIFIER)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_16()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_111() { if (jj_3R_66()) return true; return false; } private boolean jj_3R_81() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(62)) { jj_scanpos = xsp; if (jj_3R_111()) return true; } return false; } private boolean jj_3_15() { if (jj_3R_72()) return true; return false; } private boolean jj_3R_78() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(14)) { jj_scanpos = xsp; if (jj_scan_token(19)) { jj_scanpos = xsp; if (jj_scan_token(16)) { jj_scanpos = xsp; if (jj_scan_token(50)) { jj_scanpos = xsp; if (jj_scan_token(39)) { jj_scanpos = xsp; if (jj_scan_token(41)) { jj_scanpos = xsp; if (jj_scan_token(32)) { jj_scanpos = xsp; if (jj_scan_token(25)) return true; } } } } } } } return false; } private boolean jj_3R_135() { if (jj_scan_token(COMMA)) return true; if (jj_3R_100()) return true; return false; } private boolean jj_3_12() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_189() { if (jj_scan_token(SUPER)) return true; if (jj_3R_71()) return true; return false; } private boolean jj_3R_152() { if (jj_3R_172()) return true; return false; } private boolean jj_3R_172() { Token xsp; xsp = jj_scanpos; if (jj_3R_188()) { jj_scanpos = xsp; if (jj_3R_189()) return true; } return false; } private boolean jj_3R_188() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_71()) return true; return false; } private boolean jj_3R_126() { if (jj_scan_token(HOOK)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_152()) jj_scanpos = xsp; return false; } private boolean jj_3_13() { if (jj_3R_72()) return true; return false; } private boolean jj_3R_125() { if (jj_3R_71()) return true; return false; } private boolean jj_3R_100() { Token xsp; xsp = jj_scanpos; if (jj_3R_125()) { jj_scanpos = xsp; if (jj_3R_126()) return true; } return false; } private boolean jj_3_11() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_72() { if (jj_scan_token(LT)) return true; if (jj_3R_100()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_135()) { jj_scanpos = xsp; break; } } if (jj_scan_token(GT)) return true; return false; } private boolean jj_3_14() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3_15()) jj_scanpos = xsp; return false; } /** Generated Token Manager. */ public JavaParser15DebugTokenManager token_source; JavaCharStream jj_input_stream; /** Current token. */ public Token token; /** Next token. */ public Token jj_nt; private int jj_ntk; private Token jj_scanpos, jj_lastpos; private int jj_la; /** Whether we are looking ahead. */ private boolean jj_lookingAhead = false; private boolean jj_semLA; /** Constructor with InputStream. */ public JavaParser15Debug(java.io.InputStream stream) { this(stream, null); } /** Constructor with InputStream and supplied encoding */ public JavaParser15Debug(java.io.InputStream stream, String encoding) { try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source = new JavaParser15DebugTokenManager(jj_input_stream); token = new Token(); jj_ntk = -1; } /** Reinitialise. */ public void ReInit(java.io.InputStream stream) { ReInit(stream, null); } /** Reinitialise. */ public void ReInit(java.io.InputStream stream, String encoding) { try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source.ReInit(jj_input_stream); token = new Token(); jj_ntk = -1; } /** Constructor. */ public JavaParser15Debug(java.io.Reader stream) { jj_input_stream = new JavaCharStream(stream, 1, 1); token_source = new JavaParser15DebugTokenManager(jj_input_stream); token = new Token(); jj_ntk = -1; } /** Reinitialise. */ public void ReInit(java.io.Reader stream) { jj_input_stream.ReInit(stream, 1, 1); token_source.ReInit(jj_input_stream); token = new Token(); jj_ntk = -1; } /** Constructor with generated Token Manager. */ public JavaParser15Debug(JavaParser15DebugTokenManager tm) { token_source = tm; token = new Token(); jj_ntk = -1; } /** Reinitialise. */ public void ReInit(JavaParser15DebugTokenManager tm) { token_source = tm; token = new Token(); jj_ntk = -1; } private Token jj_consume_token(int kind) throws ParseException { Token oldToken; if ((oldToken = token).next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; if (token.kind == kind) { trace_token(token, ""); return token; } token = oldToken; throw generateParseException(); } static private final class LookaheadSuccess extends java.lang.Error { } final private LookaheadSuccess jj_ls = new LookaheadSuccess(); private boolean jj_scan_token(int kind) { if (jj_scanpos == jj_lastpos) { jj_la--; if (jj_scanpos.next == null) { jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); } else { jj_lastpos = jj_scanpos = jj_scanpos.next; } } else { jj_scanpos = jj_scanpos.next; } if (jj_scanpos.kind != kind) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; return false; } /** Get the next Token. */ final public Token getNextToken() { if (token.next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; trace_token(token, " (in getNextToken)"); return token; } /** Get the specific Token. */ final public Token getToken(int index) { Token t = jj_lookingAhead ? jj_scanpos : token; for (int i = 0; i < index; i++) { if (t.next != null) t = t.next; else t = t.next = token_source.getNextToken(); } return t; } private int jj_ntk() { if ((jj_nt=token.next) == null) return (jj_ntk = (token.next=token_source.getNextToken()).kind); else return (jj_ntk = jj_nt.kind); } /** Generate ParseException. */ public ParseException generateParseException() { Token errortok = token.next; int line = errortok.beginLine, column = errortok.beginColumn; String mess = (errortok.kind == 0) ? tokenImage[0] : errortok.image; return new ParseException("Parse error at line " + line + ", column " + column + ". Encountered: " + mess); } private int trace_indent = 0; private boolean trace_enabled = true; /** Enable tracing. */ final public void enable_tracing() { trace_enabled = true; } /** Disable tracing. */ final public void disable_tracing() { trace_enabled = false; } private void trace_call(String s) { if (trace_enabled) { for (int i = 0; i < trace_indent; i++) { System.out.print(" "); } System.out.println("Call: " + s); } trace_indent = trace_indent + 2; } private void trace_return(String s) { trace_indent = trace_indent - 2; if (trace_enabled) { for (int i = 0; i < trace_indent; i++) { System.out.print(" "); } System.out.println("Return: " + s); } } private void trace_token(Token t, String where) { if (trace_enabled) { for (int i = 0; i < trace_indent; i++) { System.out.print(" "); } System.out.print("Consumed token: <" + tokenImage[t.kind]); if (t.kind != 0 && !tokenImage[t.kind].equals("\"" + t.image + "\"")) { System.out.print(": \"" + t.image + "\""); } System.out.println(" at line " + t.beginLine + " column " + t.beginColumn + ">" + where); } } private void trace_scan(Token t1, int t2) { if (trace_enabled) { for (int i = 0; i < trace_indent; i++) { System.out.print(" "); } System.out.print("Visited token: <" + tokenImage[t1.kind]); if (t1.kind != 0 && !tokenImage[t1.kind].equals("\"" + t1.image + "\"")) { System.out.print(": \"" + t1.image + "\""); } System.out.println(" at line " + t1.beginLine + " column " + t1.beginColumn + ">; Expected token: <" + tokenImage[t2] + ">"); } } } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/JavaParser15DebugConstants.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/debug/JavaParser15D0000644000175000017500000002500011343534521033066 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaParser15DebugConstants.java */ package net.sourceforge.cobertura.javancss.parser.java15.debug; /** * Token literal values and constants. * Generated by org.javacc.parser.OtherFilesGen#start() */ public interface JavaParser15DebugConstants { /** End of File. */ int EOF = 0; /** RegularExpression Id. */ int SINGLE_LINE_COMMENT = 8; /** RegularExpression Id. */ int FORMAL_COMMENT = 9; /** RegularExpression Id. */ int MULTI_LINE_COMMENT = 10; /** RegularExpression Id. */ int ABSTRACT = 12; /** RegularExpression Id. */ int ASSERT = 13; /** RegularExpression Id. */ int BOOLEAN = 14; /** RegularExpression Id. */ int BREAK = 15; /** RegularExpression Id. */ int BYTE = 16; /** RegularExpression Id. */ int CASE = 17; /** RegularExpression Id. */ int CATCH = 18; /** RegularExpression Id. */ int CHAR = 19; /** RegularExpression Id. */ int CLASS = 20; /** RegularExpression Id. */ int CONST = 21; /** RegularExpression Id. */ int CONTINUE = 22; /** RegularExpression Id. */ int _DEFAULT = 23; /** RegularExpression Id. */ int DO = 24; /** RegularExpression Id. */ int DOUBLE = 25; /** RegularExpression Id. */ int ELSE = 26; /** RegularExpression Id. */ int ENUM = 27; /** RegularExpression Id. */ int EXTENDS = 28; /** RegularExpression Id. */ int FALSE = 29; /** RegularExpression Id. */ int FINAL = 30; /** RegularExpression Id. */ int FINALLY = 31; /** RegularExpression Id. */ int FLOAT = 32; /** RegularExpression Id. */ int FOR = 33; /** RegularExpression Id. */ int GOTO = 34; /** RegularExpression Id. */ int IF = 35; /** RegularExpression Id. */ int IMPLEMENTS = 36; /** RegularExpression Id. */ int IMPORT = 37; /** RegularExpression Id. */ int INSTANCEOF = 38; /** RegularExpression Id. */ int INT = 39; /** RegularExpression Id. */ int INTERFACE = 40; /** RegularExpression Id. */ int LONG = 41; /** RegularExpression Id. */ int NATIVE = 42; /** RegularExpression Id. */ int NEW = 43; /** RegularExpression Id. */ int NULL = 44; /** RegularExpression Id. */ int PACKAGE = 45; /** RegularExpression Id. */ int PRIVATE = 46; /** RegularExpression Id. */ int PROTECTED = 47; /** RegularExpression Id. */ int PUBLIC = 48; /** RegularExpression Id. */ int RETURN = 49; /** RegularExpression Id. */ int SHORT = 50; /** RegularExpression Id. */ int STATIC = 51; /** RegularExpression Id. */ int STRICTFP = 52; /** RegularExpression Id. */ int SUPER = 53; /** RegularExpression Id. */ int SWITCH = 54; /** RegularExpression Id. */ int SYNCHRONIZED = 55; /** RegularExpression Id. */ int THIS = 56; /** RegularExpression Id. */ int THROW = 57; /** RegularExpression Id. */ int THROWS = 58; /** RegularExpression Id. */ int TRANSIENT = 59; /** RegularExpression Id. */ int TRUE = 60; /** RegularExpression Id. */ int TRY = 61; /** RegularExpression Id. */ int VOID = 62; /** RegularExpression Id. */ int VOLATILE = 63; /** RegularExpression Id. */ int WHILE = 64; /** RegularExpression Id. */ int INTEGER_LITERAL = 65; /** RegularExpression Id. */ int DECIMAL_LITERAL = 66; /** RegularExpression Id. */ int HEX_LITERAL = 67; /** RegularExpression Id. */ int OCTAL_LITERAL = 68; /** RegularExpression Id. */ int FLOATING_POINT_LITERAL = 69; /** RegularExpression Id. */ int DECIMAL_FLOATING_POINT_LITERAL = 70; /** RegularExpression Id. */ int DECIMAL_EXPONENT = 71; /** RegularExpression Id. */ int HEXADECIMAL_FLOATING_POINT_LITERAL = 72; /** RegularExpression Id. */ int HEXADECIMAL_EXPONENT = 73; /** RegularExpression Id. */ int CHARACTER_LITERAL = 74; /** RegularExpression Id. */ int STRING_LITERAL = 75; /** RegularExpression Id. */ int IDENTIFIER = 76; /** RegularExpression Id. */ int LETTER = 77; /** RegularExpression Id. */ int PART_LETTER = 78; /** RegularExpression Id. */ int LPAREN = 79; /** RegularExpression Id. */ int RPAREN = 80; /** RegularExpression Id. */ int LBRACE = 81; /** RegularExpression Id. */ int RBRACE = 82; /** RegularExpression Id. */ int LBRACKET = 83; /** RegularExpression Id. */ int RBRACKET = 84; /** RegularExpression Id. */ int SEMICOLON = 85; /** RegularExpression Id. */ int COMMA = 86; /** RegularExpression Id. */ int DOT = 87; /** RegularExpression Id. */ int AT = 88; /** RegularExpression Id. */ int ASSIGN = 89; /** RegularExpression Id. */ int LT = 90; /** RegularExpression Id. */ int BANG = 91; /** RegularExpression Id. */ int TILDE = 92; /** RegularExpression Id. */ int HOOK = 93; /** RegularExpression Id. */ int COLON = 94; /** RegularExpression Id. */ int EQ = 95; /** RegularExpression Id. */ int LE = 96; /** RegularExpression Id. */ int GE = 97; /** RegularExpression Id. */ int NE = 98; /** RegularExpression Id. */ int SC_OR = 99; /** RegularExpression Id. */ int SC_AND = 100; /** RegularExpression Id. */ int INCR = 101; /** RegularExpression Id. */ int DECR = 102; /** RegularExpression Id. */ int PLUS = 103; /** RegularExpression Id. */ int MINUS = 104; /** RegularExpression Id. */ int STAR = 105; /** RegularExpression Id. */ int SLASH = 106; /** RegularExpression Id. */ int BIT_AND = 107; /** RegularExpression Id. */ int BIT_OR = 108; /** RegularExpression Id. */ int XOR = 109; /** RegularExpression Id. */ int REM = 110; /** RegularExpression Id. */ int LSHIFT = 111; /** RegularExpression Id. */ int PLUSASSIGN = 112; /** RegularExpression Id. */ int MINUSASSIGN = 113; /** RegularExpression Id. */ int STARASSIGN = 114; /** RegularExpression Id. */ int SLASHASSIGN = 115; /** RegularExpression Id. */ int ANDASSIGN = 116; /** RegularExpression Id. */ int ORASSIGN = 117; /** RegularExpression Id. */ int XORASSIGN = 118; /** RegularExpression Id. */ int REMASSIGN = 119; /** RegularExpression Id. */ int LSHIFTASSIGN = 120; /** RegularExpression Id. */ int RSIGNEDSHIFTASSIGN = 121; /** RegularExpression Id. */ int RUNSIGNEDSHIFTASSIGN = 122; /** RegularExpression Id. */ int ELLIPSIS = 123; /** RegularExpression Id. */ int RUNSIGNEDSHIFT = 124; /** RegularExpression Id. */ int RSIGNEDSHIFT = 125; /** RegularExpression Id. */ int GT = 126; /** RegularExpression Id. */ int STUFF_TO_IGNORE = 128; /** Lexical state. */ int DEFAULT = 0; /** Lexical state. */ int IN_FORMAL_COMMENT = 1; /** Lexical state. */ int IN_MULTI_LINE_COMMENT = 2; /** Literal token values. */ String[] tokenImage = { "", "\" \"", "\"\\t\"", "\"\\n\"", "\"\\r\"", "\"\\f\"", "", "\"/*\"", "", "\"*/\"", "\"*/\"", "", "\"abstract\"", "\"assert\"", "\"boolean\"", "\"break\"", "\"byte\"", "\"case\"", "\"catch\"", "\"char\"", "\"class\"", "\"const\"", "\"continue\"", "\"default\"", "\"do\"", "\"double\"", "\"else\"", "\"enum\"", "\"extends\"", "\"false\"", "\"final\"", "\"finally\"", "\"float\"", "\"for\"", "\"goto\"", "\"if\"", "\"implements\"", "\"import\"", "\"instanceof\"", "\"int\"", "\"interface\"", "\"long\"", "\"native\"", "\"new\"", "\"null\"", "\"package\"", "\"private\"", "\"protected\"", "\"public\"", "\"return\"", "\"short\"", "\"static\"", "\"strictfp\"", "\"super\"", "\"switch\"", "\"synchronized\"", "\"this\"", "\"throw\"", "\"throws\"", "\"transient\"", "\"true\"", "\"try\"", "\"void\"", "\"volatile\"", "\"while\"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "\"(\"", "\")\"", "\"{\"", "\"}\"", "\"[\"", "\"]\"", "\";\"", "\",\"", "\".\"", "\"@\"", "\"=\"", "\"<\"", "\"!\"", "\"~\"", "\"?\"", "\":\"", "\"==\"", "\"<=\"", "\">=\"", "\"!=\"", "\"||\"", "\"&&\"", "\"++\"", "\"--\"", "\"+\"", "\"-\"", "\"*\"", "\"/\"", "\"&\"", "\"|\"", "\"^\"", "\"%\"", "\"<<\"", "\"+=\"", "\"-=\"", "\"*=\"", "\"/=\"", "\"&=\"", "\"|=\"", "\"^=\"", "\"%=\"", "\"<<=\"", "\">>=\"", "\">>>=\"", "\"...\"", "\">>>\"", "\">>\"", "\">\"", "\"\\u001a\"", "", }; } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/JavaParser15TokenManager.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/JavaParser15TokenMa0000644000175000017500000022076311343534517033175 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaParserTokenManager.java */ package net.sourceforge.cobertura.javancss.parser.java15; import java.io.*; public class JavaParser15TokenManager implements JavaParser15Constants { public java.io.PrintStream debugStream = System.out; public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1, long active2) { switch (pos) { case 0: if ((active0 & 0xfffffffffffff000L) != 0L || (active1 & 0x1L) != 0L) { jjmatchedKind = 76; return 28; } if ((active1 & 0x800000000800000L) != 0L) return 4; if ((active0 & 0x80L) != 0L || (active1 & 0x8040000000000L) != 0L) return 47; return -1; case 1: if ((active0 & 0x803000000L) != 0L) return 28; if ((active0 & 0xfffffff7fcfff000L) != 0L || (active1 & 0x1L) != 0L) { if (jjmatchedPos != 1) { jjmatchedKind = 76; jjmatchedPos = 1; } return 28; } if ((active0 & 0x80L) != 0L) return 45; return -1; case 2: if ((active0 & 0x2000098200000000L) != 0L) return 28; if ((active0 & 0xdffff675fefff000L) != 0L || (active1 & 0x1L) != 0L) { if (jjmatchedPos != 2) { jjmatchedKind = 76; jjmatchedPos = 2; } return 28; } return -1; case 3: if ((active0 & 0x510012040c0b0000L) != 0L) return 28; if ((active0 & 0x8effe571f2f4f000L) != 0L || (active1 & 0x1L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 3; return 28; } return -1; case 4: if ((active0 & 0x6240001e0348000L) != 0L || (active1 & 0x1L) != 0L) return 28; if ((active0 & 0x88dbe57012c07000L) != 0L) { if (jjmatchedPos != 4) { jjmatchedKind = 76; jjmatchedPos = 4; } return 28; } return -1; case 5: if ((active0 & 0x44b042002002000L) != 0L) return 28; if ((active0 & 0x8890e15090c05000L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 5; return 28; } return -1; case 6: if ((active0 & 0x600090804000L) != 0L) return 28; if ((active0 & 0x8890815000401000L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 6; return 28; } return -1; case 7: if ((active0 & 0x880815000000000L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 7; return 28; } if ((active0 & 0x8010000000401000L) != 0L) return 28; return -1; case 8: if ((active0 & 0x800810000000000L) != 0L) return 28; if ((active0 & 0x80005000000000L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 8; return 28; } return -1; case 9: if ((active0 & 0x5000000000L) != 0L) return 28; if ((active0 & 0x80000000000000L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 9; return 28; } return -1; case 10: if ((active0 & 0x80000000000000L) != 0L) { jjmatchedKind = 76; jjmatchedPos = 10; return 28; } return -1; default : return -1; } } private final int jjStartNfa_0(int pos, long active0, long active1, long active2) { return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1, active2), pos + 1); } private final int jjStopAtPos(int pos, int kind) { jjmatchedKind = kind; jjmatchedPos = pos; return pos + 1; } private final int jjStartNfaWithStates_0(int pos, int kind, int state) { jjmatchedKind = kind; jjmatchedPos = pos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return pos + 1; } return jjMoveNfa_0(state, pos + 1); } private final int jjMoveStringLiteralDfa0_0() { switch(curChar) { case 26: return jjStopAtPos(0, 127); case 33: jjmatchedKind = 91; return jjMoveStringLiteralDfa1_0(0x0L, 0x400000000L); case 37: jjmatchedKind = 110; return jjMoveStringLiteralDfa1_0(0x0L, 0x80000000000000L); case 38: jjmatchedKind = 107; return jjMoveStringLiteralDfa1_0(0x0L, 0x10001000000000L); case 40: return jjStopAtPos(0, 79); case 41: return jjStopAtPos(0, 80); case 42: jjmatchedKind = 105; return jjMoveStringLiteralDfa1_0(0x0L, 0x4000000000000L); case 43: jjmatchedKind = 103; return jjMoveStringLiteralDfa1_0(0x0L, 0x1002000000000L); case 44: return jjStopAtPos(0, 86); case 45: jjmatchedKind = 104; return jjMoveStringLiteralDfa1_0(0x0L, 0x2004000000000L); case 46: jjmatchedKind = 87; return jjMoveStringLiteralDfa1_0(0x0L, 0x800000000000000L); case 47: jjmatchedKind = 106; return jjMoveStringLiteralDfa1_0(0x80L, 0x8000000000000L); case 58: return jjStopAtPos(0, 94); case 59: return jjStopAtPos(0, 85); case 60: jjmatchedKind = 90; return jjMoveStringLiteralDfa1_0(0x0L, 0x100800100000000L); case 61: jjmatchedKind = 89; return jjMoveStringLiteralDfa1_0(0x0L, 0x80000000L); case 62: jjmatchedKind = 126; return jjMoveStringLiteralDfa1_0(0x0L, 0x3600000200000000L); case 63: return jjStopAtPos(0, 93); case 64: return jjStopAtPos(0, 88); case 91: return jjStopAtPos(0, 83); case 93: return jjStopAtPos(0, 84); case 94: jjmatchedKind = 109; return jjMoveStringLiteralDfa1_0(0x0L, 0x40000000000000L); case 97: return jjMoveStringLiteralDfa1_0(0x3000L, 0x0L); case 98: return jjMoveStringLiteralDfa1_0(0x1c000L, 0x0L); case 99: return jjMoveStringLiteralDfa1_0(0x7e0000L, 0x0L); case 100: return jjMoveStringLiteralDfa1_0(0x3800000L, 0x0L); case 101: return jjMoveStringLiteralDfa1_0(0x1c000000L, 0x0L); case 102: return jjMoveStringLiteralDfa1_0(0x3e0000000L, 0x0L); case 103: return jjMoveStringLiteralDfa1_0(0x400000000L, 0x0L); case 105: return jjMoveStringLiteralDfa1_0(0x1f800000000L, 0x0L); case 108: return jjMoveStringLiteralDfa1_0(0x20000000000L, 0x0L); case 110: return jjMoveStringLiteralDfa1_0(0x1c0000000000L, 0x0L); case 112: return jjMoveStringLiteralDfa1_0(0x1e00000000000L, 0x0L); case 114: return jjMoveStringLiteralDfa1_0(0x2000000000000L, 0x0L); case 115: return jjMoveStringLiteralDfa1_0(0xfc000000000000L, 0x0L); case 116: return jjMoveStringLiteralDfa1_0(0x3f00000000000000L, 0x0L); case 118: return jjMoveStringLiteralDfa1_0(0xc000000000000000L, 0x0L); case 119: return jjMoveStringLiteralDfa1_0(0x0L, 0x1L); case 123: return jjStopAtPos(0, 81); case 124: jjmatchedKind = 108; return jjMoveStringLiteralDfa1_0(0x0L, 0x20000800000000L); case 125: return jjStopAtPos(0, 82); case 126: return jjStopAtPos(0, 92); default : return jjMoveNfa_0(0, 0); } } private final int jjMoveStringLiteralDfa1_0(long active0, long active1) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(0, active0, active1, 0L); return 1; } switch(curChar) { case 38: if ((active1 & 0x1000000000L) != 0L) return jjStopAtPos(1, 100); break; case 42: if ((active0 & 0x80L) != 0L) return jjStartNfaWithStates_0(1, 7, 45); break; case 43: if ((active1 & 0x2000000000L) != 0L) return jjStopAtPos(1, 101); break; case 45: if ((active1 & 0x4000000000L) != 0L) return jjStopAtPos(1, 102); break; case 46: return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x800000000000000L); case 60: if ((active1 & 0x800000000000L) != 0L) { jjmatchedKind = 111; jjmatchedPos = 1; } return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x100000000000000L); case 61: if ((active1 & 0x80000000L) != 0L) return jjStopAtPos(1, 95); else if ((active1 & 0x100000000L) != 0L) return jjStopAtPos(1, 96); else if ((active1 & 0x200000000L) != 0L) return jjStopAtPos(1, 97); else if ((active1 & 0x400000000L) != 0L) return jjStopAtPos(1, 98); else if ((active1 & 0x1000000000000L) != 0L) return jjStopAtPos(1, 112); else if ((active1 & 0x2000000000000L) != 0L) return jjStopAtPos(1, 113); else if ((active1 & 0x4000000000000L) != 0L) return jjStopAtPos(1, 114); else if ((active1 & 0x8000000000000L) != 0L) return jjStopAtPos(1, 115); else if ((active1 & 0x10000000000000L) != 0L) return jjStopAtPos(1, 116); else if ((active1 & 0x20000000000000L) != 0L) return jjStopAtPos(1, 117); else if ((active1 & 0x40000000000000L) != 0L) return jjStopAtPos(1, 118); else if ((active1 & 0x80000000000000L) != 0L) return jjStopAtPos(1, 119); break; case 62: if ((active1 & 0x2000000000000000L) != 0L) { jjmatchedKind = 125; jjmatchedPos = 1; } return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x1600000000000000L); case 97: return jjMoveStringLiteralDfa2_0(active0, 0x240020060000L, active1, 0L); case 98: return jjMoveStringLiteralDfa2_0(active0, 0x1000L, active1, 0L); case 101: return jjMoveStringLiteralDfa2_0(active0, 0x2080000800000L, active1, 0L); case 102: if ((active0 & 0x800000000L) != 0L) return jjStartNfaWithStates_0(1, 35, 28); break; case 104: return jjMoveStringLiteralDfa2_0(active0, 0x704000000080000L, active1, 0x1L); case 105: return jjMoveStringLiteralDfa2_0(active0, 0xc0000000L, active1, 0L); case 108: return jjMoveStringLiteralDfa2_0(active0, 0x104100000L, active1, 0L); case 109: return jjMoveStringLiteralDfa2_0(active0, 0x3000000000L, active1, 0L); case 110: return jjMoveStringLiteralDfa2_0(active0, 0x1c008000000L, active1, 0L); case 111: if ((active0 & 0x1000000L) != 0L) { jjmatchedKind = 24; jjmatchedPos = 1; } return jjMoveStringLiteralDfa2_0(active0, 0xc000020602604000L, active1, 0L); case 114: return jjMoveStringLiteralDfa2_0(active0, 0x3800c00000008000L, active1, 0L); case 115: return jjMoveStringLiteralDfa2_0(active0, 0x2000L, active1, 0L); case 116: return jjMoveStringLiteralDfa2_0(active0, 0x18000000000000L, active1, 0L); case 117: return jjMoveStringLiteralDfa2_0(active0, 0x21100000000000L, active1, 0L); case 119: return jjMoveStringLiteralDfa2_0(active0, 0x40000000000000L, active1, 0L); case 120: return jjMoveStringLiteralDfa2_0(active0, 0x10000000L, active1, 0L); case 121: return jjMoveStringLiteralDfa2_0(active0, 0x80000000010000L, active1, 0L); case 124: if ((active1 & 0x800000000L) != 0L) return jjStopAtPos(1, 99); break; default : break; } return jjStartNfa_0(0, active0, active1, 0L); } private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(0, old0, old1, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(1, active0, active1, 0L); return 2; } switch(curChar) { case 46: if ((active1 & 0x800000000000000L) != 0L) return jjStopAtPos(2, 123); break; case 61: if ((active1 & 0x100000000000000L) != 0L) return jjStopAtPos(2, 120); else if ((active1 & 0x200000000000000L) != 0L) return jjStopAtPos(2, 121); break; case 62: if ((active1 & 0x1000000000000000L) != 0L) { jjmatchedKind = 124; jjmatchedPos = 2; } return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x400000000000000L); case 97: return jjMoveStringLiteralDfa3_0(active0, 0x808000000180000L, active1, 0L); case 98: return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa3_0(active0, 0x200000000000L, active1, 0L); case 101: return jjMoveStringLiteralDfa3_0(active0, 0x8000L, active1, 0L); case 102: return jjMoveStringLiteralDfa3_0(active0, 0x800000L, active1, 0L); case 105: return jjMoveStringLiteralDfa3_0(active0, 0x4140400000000000L, active1, 0x1L); case 108: return jjMoveStringLiteralDfa3_0(active0, 0x8000100020000000L, active1, 0L); case 110: return jjMoveStringLiteralDfa3_0(active0, 0x800200c0600000L, active1, 0L); case 111: return jjMoveStringLiteralDfa3_0(active0, 0x4800100004000L, active1, 0L); case 112: return jjMoveStringLiteralDfa3_0(active0, 0x20003000000000L, active1, 0L); case 114: if ((active0 & 0x200000000L) != 0L) return jjStartNfaWithStates_0(2, 33, 28); return jjMoveStringLiteralDfa3_0(active0, 0x610000000000000L, active1, 0L); case 115: return jjMoveStringLiteralDfa3_0(active0, 0x4004023000L, active1, 0L); case 116: if ((active0 & 0x8000000000L) != 0L) { jjmatchedKind = 39; jjmatchedPos = 2; } return jjMoveStringLiteralDfa3_0(active0, 0x2050410050000L, active1, 0L); case 117: return jjMoveStringLiteralDfa3_0(active0, 0x100000000a000000L, active1, 0L); case 119: if ((active0 & 0x80000000000L) != 0L) return jjStartNfaWithStates_0(2, 43, 28); break; case 121: if ((active0 & 0x2000000000000000L) != 0L) return jjStartNfaWithStates_0(2, 61, 28); break; default : break; } return jjStartNfa_0(1, active0, active1, 0L); } private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(1, old0, old1, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(2, active0, active1, 0L); return 3; } switch(curChar) { case 61: if ((active1 & 0x400000000000000L) != 0L) return jjStopAtPos(3, 122); break; case 97: return jjMoveStringLiteralDfa4_0(active0, 0x80000001c0808000L, active1, 0L); case 98: return jjMoveStringLiteralDfa4_0(active0, 0x2000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa4_0(active0, 0x80000000040000L, active1, 0L); case 100: if ((active0 & 0x4000000000000000L) != 0L) return jjStartNfaWithStates_0(3, 62, 28); break; case 101: if ((active0 & 0x10000L) != 0L) return jjStartNfaWithStates_0(3, 16, 28); else if ((active0 & 0x20000L) != 0L) return jjStartNfaWithStates_0(3, 17, 28); else if ((active0 & 0x4000000L) != 0L) return jjStartNfaWithStates_0(3, 26, 28); else if ((active0 & 0x1000000000000000L) != 0L) return jjStartNfaWithStates_0(3, 60, 28); return jjMoveStringLiteralDfa4_0(active0, 0x20010010002000L, active1, 0L); case 103: if ((active0 & 0x20000000000L) != 0L) return jjStartNfaWithStates_0(3, 41, 28); break; case 105: return jjMoveStringLiteralDfa4_0(active0, 0x10040000000000L, active1, 0L); case 107: return jjMoveStringLiteralDfa4_0(active0, 0x200000000000L, active1, 0L); case 108: if ((active0 & 0x100000000000L) != 0L) return jjStartNfaWithStates_0(3, 44, 28); return jjMoveStringLiteralDfa4_0(active0, 0x1001000004000L, active1, 0x1L); case 109: if ((active0 & 0x8000000L) != 0L) return jjStartNfaWithStates_0(3, 27, 28); break; case 110: return jjMoveStringLiteralDfa4_0(active0, 0x800000000000000L, active1, 0L); case 111: if ((active0 & 0x400000000L) != 0L) return jjStartNfaWithStates_0(3, 34, 28); return jjMoveStringLiteralDfa4_0(active0, 0x600002000000000L, active1, 0L); case 114: if ((active0 & 0x80000L) != 0L) return jjStartNfaWithStates_0(3, 19, 28); return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000L, active1, 0L); case 115: if ((active0 & 0x100000000000000L) != 0L) return jjStartNfaWithStates_0(3, 56, 28); return jjMoveStringLiteralDfa4_0(active0, 0x20300000L, active1, 0L); case 116: return jjMoveStringLiteralDfa4_0(active0, 0x48804000401000L, active1, 0L); case 117: return jjMoveStringLiteralDfa4_0(active0, 0x2000000000000L, active1, 0L); case 118: return jjMoveStringLiteralDfa4_0(active0, 0x400000000000L, active1, 0L); default : break; } return jjStartNfa_0(2, active0, active1, 0L); } private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(2, old0, old1, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(3, active0, active1, 0L); return 4; } switch(curChar) { case 97: return jjMoveStringLiteralDfa5_0(active0, 0x604000000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa5_0(active0, 0x50000000000000L, active1, 0L); case 101: if ((active0 & 0x20000000L) != 0L) return jjStartNfaWithStates_0(4, 29, 28); else if ((active1 & 0x1L) != 0L) return jjStartNfaWithStates_0(4, 64, 28); return jjMoveStringLiteralDfa5_0(active0, 0x801000004000L, active1, 0L); case 104: if ((active0 & 0x40000L) != 0L) return jjStartNfaWithStates_0(4, 18, 28); return jjMoveStringLiteralDfa5_0(active0, 0x80000000000000L, active1, 0L); case 105: return jjMoveStringLiteralDfa5_0(active0, 0x9000000400000L, active1, 0L); case 107: if ((active0 & 0x8000L) != 0L) return jjStartNfaWithStates_0(4, 15, 28); break; case 108: if ((active0 & 0x40000000L) != 0L) { jjmatchedKind = 30; jjmatchedPos = 4; } return jjMoveStringLiteralDfa5_0(active0, 0x82000000L, active1, 0L); case 110: return jjMoveStringLiteralDfa5_0(active0, 0x10000000L, active1, 0L); case 114: if ((active0 & 0x20000000000000L) != 0L) return jjStartNfaWithStates_0(4, 53, 28); return jjMoveStringLiteralDfa5_0(active0, 0x2012000003000L, active1, 0L); case 115: if ((active0 & 0x100000L) != 0L) return jjStartNfaWithStates_0(4, 20, 28); return jjMoveStringLiteralDfa5_0(active0, 0x800000000000000L, active1, 0L); case 116: if ((active0 & 0x200000L) != 0L) return jjStartNfaWithStates_0(4, 21, 28); else if ((active0 & 0x100000000L) != 0L) return jjStartNfaWithStates_0(4, 32, 28); else if ((active0 & 0x4000000000000L) != 0L) return jjStartNfaWithStates_0(4, 50, 28); return jjMoveStringLiteralDfa5_0(active0, 0x8000000000000000L, active1, 0L); case 117: return jjMoveStringLiteralDfa5_0(active0, 0x800000L, active1, 0L); case 118: return jjMoveStringLiteralDfa5_0(active0, 0x40000000000L, active1, 0L); case 119: if ((active0 & 0x200000000000000L) != 0L) { jjmatchedKind = 57; jjmatchedPos = 4; } return jjMoveStringLiteralDfa5_0(active0, 0x400000000000000L, active1, 0L); default : break; } return jjStartNfa_0(3, active0, active1, 0L); } private final int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(3, old0, old1, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(4, active0, 0L, 0L); return 5; } switch(curChar) { case 97: return jjMoveStringLiteralDfa6_0(active0, 0x5000L); case 99: if ((active0 & 0x1000000000000L) != 0L) return jjStartNfaWithStates_0(5, 48, 28); else if ((active0 & 0x8000000000000L) != 0L) return jjStartNfaWithStates_0(5, 51, 28); return jjMoveStringLiteralDfa6_0(active0, 0x800000000000L); case 100: return jjMoveStringLiteralDfa6_0(active0, 0x10000000L); case 101: if ((active0 & 0x2000000L) != 0L) return jjStartNfaWithStates_0(5, 25, 28); else if ((active0 & 0x40000000000L) != 0L) return jjStartNfaWithStates_0(5, 42, 28); break; case 102: return jjMoveStringLiteralDfa6_0(active0, 0x10000000000L); case 103: return jjMoveStringLiteralDfa6_0(active0, 0x200000000000L); case 104: if ((active0 & 0x40000000000000L) != 0L) return jjStartNfaWithStates_0(5, 54, 28); break; case 105: return jjMoveStringLiteralDfa6_0(active0, 0x8800000000000000L); case 108: return jjMoveStringLiteralDfa6_0(active0, 0x80800000L); case 109: return jjMoveStringLiteralDfa6_0(active0, 0x1000000000L); case 110: if ((active0 & 0x2000000000000L) != 0L) return jjStartNfaWithStates_0(5, 49, 28); return jjMoveStringLiteralDfa6_0(active0, 0x4000400000L); case 114: return jjMoveStringLiteralDfa6_0(active0, 0x80000000000000L); case 115: if ((active0 & 0x400000000000000L) != 0L) return jjStartNfaWithStates_0(5, 58, 28); break; case 116: if ((active0 & 0x2000L) != 0L) return jjStartNfaWithStates_0(5, 13, 28); else if ((active0 & 0x2000000000L) != 0L) return jjStartNfaWithStates_0(5, 37, 28); return jjMoveStringLiteralDfa6_0(active0, 0x10400000000000L); default : break; } return jjStartNfa_0(4, active0, 0L, 0L); } private final int jjMoveStringLiteralDfa6_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(4, old0, 0L, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(5, active0, 0L, 0L); return 6; } switch(curChar) { case 97: return jjMoveStringLiteralDfa7_0(active0, 0x10000000000L); case 99: return jjMoveStringLiteralDfa7_0(active0, 0x4000001000L); case 101: if ((active0 & 0x200000000000L) != 0L) return jjStartNfaWithStates_0(6, 45, 28); else if ((active0 & 0x400000000000L) != 0L) return jjStartNfaWithStates_0(6, 46, 28); return jjMoveStringLiteralDfa7_0(active0, 0x800001000000000L); case 102: return jjMoveStringLiteralDfa7_0(active0, 0x10000000000000L); case 108: return jjMoveStringLiteralDfa7_0(active0, 0x8000000000000000L); case 110: if ((active0 & 0x4000L) != 0L) return jjStartNfaWithStates_0(6, 14, 28); break; case 111: return jjMoveStringLiteralDfa7_0(active0, 0x80000000000000L); case 115: if ((active0 & 0x10000000L) != 0L) return jjStartNfaWithStates_0(6, 28, 28); break; case 116: if ((active0 & 0x800000L) != 0L) return jjStartNfaWithStates_0(6, 23, 28); return jjMoveStringLiteralDfa7_0(active0, 0x800000000000L); case 117: return jjMoveStringLiteralDfa7_0(active0, 0x400000L); case 121: if ((active0 & 0x80000000L) != 0L) return jjStartNfaWithStates_0(6, 31, 28); break; default : break; } return jjStartNfa_0(5, active0, 0L, 0L); } private final int jjMoveStringLiteralDfa7_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(5, old0, 0L, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(6, active0, 0L, 0L); return 7; } switch(curChar) { case 99: return jjMoveStringLiteralDfa8_0(active0, 0x10000000000L); case 101: if ((active0 & 0x400000L) != 0L) return jjStartNfaWithStates_0(7, 22, 28); else if ((active0 & 0x8000000000000000L) != 0L) return jjStartNfaWithStates_0(7, 63, 28); return jjMoveStringLiteralDfa8_0(active0, 0x804000000000L); case 110: return jjMoveStringLiteralDfa8_0(active0, 0x880001000000000L); case 112: if ((active0 & 0x10000000000000L) != 0L) return jjStartNfaWithStates_0(7, 52, 28); break; case 116: if ((active0 & 0x1000L) != 0L) return jjStartNfaWithStates_0(7, 12, 28); break; default : break; } return jjStartNfa_0(6, active0, 0L, 0L); } private final int jjMoveStringLiteralDfa8_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(6, old0, 0L, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(7, active0, 0L, 0L); return 8; } switch(curChar) { case 100: if ((active0 & 0x800000000000L) != 0L) return jjStartNfaWithStates_0(8, 47, 28); break; case 101: if ((active0 & 0x10000000000L) != 0L) return jjStartNfaWithStates_0(8, 40, 28); break; case 105: return jjMoveStringLiteralDfa9_0(active0, 0x80000000000000L); case 111: return jjMoveStringLiteralDfa9_0(active0, 0x4000000000L); case 116: if ((active0 & 0x800000000000000L) != 0L) return jjStartNfaWithStates_0(8, 59, 28); return jjMoveStringLiteralDfa9_0(active0, 0x1000000000L); default : break; } return jjStartNfa_0(7, active0, 0L, 0L); } private final int jjMoveStringLiteralDfa9_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(7, old0, 0L, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(8, active0, 0L, 0L); return 9; } switch(curChar) { case 102: if ((active0 & 0x4000000000L) != 0L) return jjStartNfaWithStates_0(9, 38, 28); break; case 115: if ((active0 & 0x1000000000L) != 0L) return jjStartNfaWithStates_0(9, 36, 28); break; case 122: return jjMoveStringLiteralDfa10_0(active0, 0x80000000000000L); default : break; } return jjStartNfa_0(8, active0, 0L, 0L); } private final int jjMoveStringLiteralDfa10_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(8, old0, 0L, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(9, active0, 0L, 0L); return 10; } switch(curChar) { case 101: return jjMoveStringLiteralDfa11_0(active0, 0x80000000000000L); default : break; } return jjStartNfa_0(9, active0, 0L, 0L); } private final int jjMoveStringLiteralDfa11_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(9, old0, 0L, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(10, active0, 0L, 0L); return 11; } switch(curChar) { case 100: if ((active0 & 0x80000000000000L) != 0L) return jjStartNfaWithStates_0(11, 55, 28); break; default : break; } return jjStartNfa_0(10, active0, 0L, 0L); } private final void jjCheckNAdd(int state) { if (jjrounds[state] != jjround) { jjstateSet[jjnewStateCnt++] = state; jjrounds[state] = jjround; } } private final void jjAddStates(int start, int end) { do { jjstateSet[jjnewStateCnt++] = jjnextStates[start]; } while (start++ != end); } private final void jjCheckNAddTwoStates(int state1, int state2) { jjCheckNAdd(state1); jjCheckNAdd(state2); } private final void jjCheckNAddStates(int start, int end) { do { jjCheckNAdd(jjnextStates[start]); } while (start++ != end); } private final void jjCheckNAddStates(int start) { jjCheckNAdd(jjnextStates[start]); jjCheckNAdd(jjnextStates[start + 1]); } static final long[] jjbitVec0 = { 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL }; static final long[] jjbitVec2 = { 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL }; static final long[] jjbitVec3 = { 0xfff0000000200002L, 0xffffffffffffdfffL, 0xfffff00f7fffffffL, 0x12000000007fffffL }; static final long[] jjbitVec4 = { 0x0L, 0x0L, 0x420043c00000000L, 0xff7fffffff7fffffL }; static final long[] jjbitVec5 = { 0xffffcffffffffL, 0xffffffffffff0000L, 0xf9ff3fffffffffffL, 0x401f00030003L }; static final long[] jjbitVec6 = { 0x0L, 0x400000000000000L, 0xfffffffbffffd740L, 0xffffffcff7fffL }; static final long[] jjbitVec7 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xfffffffffffff003L, 0x33fffffffff199fL }; static final long[] jjbitVec8 = { 0xfffe000000000000L, 0xfffffffe027fffffL, 0xffL, 0x707ffffff0000L }; static final long[] jjbitVec9 = { 0x7fffffe00000000L, 0xfffe0000000007ffL, 0xffffffffffffffffL, 0x1c000060002fffffL }; static final long[] jjbitVec10 = { 0x1ffffffd0000L, 0x0L, 0x3fffffffffL, 0x0L }; static final long[] jjbitVec11 = { 0x23ffffffffffffe0L, 0x3ff010000L, 0x3c5fdfffff99fe0L, 0xf0003b0000000L }; static final long[] jjbitVec12 = { 0x36dfdfffff987e0L, 0x1c00005e000000L, 0x23edfdfffffbafe0L, 0x100010000L }; static final long[] jjbitVec13 = { 0x23cdfdfffff99fe0L, 0x3b0000000L, 0x3bfc718d63dc7e0L, 0x0L }; static final long[] jjbitVec14 = { 0x3effdfffffddfe0L, 0x300000000L, 0x3effdfffffddfe0L, 0x340000000L }; static final long[] jjbitVec15 = { 0x3fffdfffffddfe0L, 0x300000000L, 0x2ffbfffffc7fffe0L, 0x7fL }; static final long[] jjbitVec16 = { 0x800dfffffffffffeL, 0x7fL, 0x200decaefef02596L, 0x3000005fL }; static final long[] jjbitVec17 = { 0x1L, 0x7fffffffeffL, 0xf00L, 0x0L }; static final long[] jjbitVec18 = { 0x6fbffffffffL, 0x3f0000L, 0xffffffff00000000L, 0x7fffffffff003fL }; static final long[] jjbitVec19 = { 0xffffffffffffffffL, 0xffffffff83ffffffL, 0xffffff07ffffffffL, 0x3ffffffffffffffL }; static final long[] jjbitVec20 = { 0xffffffffffffff7fL, 0xffffffff3d7f3d7fL, 0x7f3d7fffffff3d7fL, 0xffff7fffff7f7f3dL }; static final long[] jjbitVec21 = { 0xffffffff7f3d7fffL, 0x7ffff7fL, 0xffffffff00000000L, 0x1fffffffffffffL }; static final long[] jjbitVec22 = { 0xffffffffffffffffL, 0x7f9fffffffffffL, 0xffffffff07fffffeL, 0x7ffffffffffL }; static final long[] jjbitVec23 = { 0x0L, 0x0L, 0xfffffffffffffL, 0x8000000L }; static final long[] jjbitVec24 = { 0xffffffff00000000L, 0xffffffffffffffL, 0x1ffffffffffL, 0x0L }; static final long[] jjbitVec25 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffff0fffffffL, 0x3ffffffffffffffL }; static final long[] jjbitVec26 = { 0xffffffff3f3fffffL, 0x3fffffffaaff3f3fL, 0x5fdfffffffffffffL, 0x1fdc1fff0fcf1fdcL }; static final long[] jjbitVec27 = { 0x8000000000000000L, 0x8000000000000001L, 0xffff00000000L, 0x0L }; static final long[] jjbitVec28 = { 0x3fbbd503e2ffc84L, 0xffffffff00000000L, 0xfL, 0x0L }; static final long[] jjbitVec29 = { 0x73e03fe000000e0L, 0xfffffffffffffffeL, 0xfffffffe601fffffL, 0x7fffffffffffffffL }; static final long[] jjbitVec30 = { 0xfffe1fffffffffe0L, 0xffffffffffffffffL, 0xffffff00007fffL, 0x0L }; static final long[] jjbitVec31 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0x3fffffffffffffL, 0x0L }; static final long[] jjbitVec32 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0x3fffffffffL, 0x0L }; static final long[] jjbitVec33 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0x1fffL, 0x0L }; static final long[] jjbitVec34 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xfffffffffL, 0x0L }; static final long[] jjbitVec35 = { 0x3fffffffffffL, 0x0L, 0x0L, 0x0L }; static final long[] jjbitVec36 = { 0x5f7ffdffa0f8007fL, 0xffffffffffffffdbL, 0x3ffffffffffffL, 0xfffffffffff80000L }; static final long[] jjbitVec37 = { 0x3fffffffffffffffL, 0xffffffffffff0000L, 0xfffffffffffcffffL, 0xfff0000000000ffL }; static final long[] jjbitVec38 = { 0x18000000000000L, 0xffd702000000e000L, 0xffffffffffffffffL, 0x1fffffffffffffffL }; static final long[] jjbitVec39 = { 0x87fffffe00000010L, 0xffffffe007fffffeL, 0x7fffffffffffffffL, 0x631cfcfcfcL }; static final long[] jjbitVec40 = { 0x0L, 0x0L, 0x420043cffffffffL, 0xff7fffffff7fffffL }; static final long[] jjbitVec41 = { 0xffffffffffffffffL, 0x400000700007fffL, 0xfffffffbffffd740L, 0xffffffcff7fffL }; static final long[] jjbitVec42 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xfffffffffffff07bL, 0x33fffffffff199fL }; static final long[] jjbitVec43 = { 0xfffe000000000000L, 0xfffffffe027fffffL, 0xbbfffffbfffe00ffL, 0x707ffffff0016L }; static final long[] jjbitVec44 = { 0x7fffffe00000000L, 0xffff03ff003fffffL, 0xffffffffffffffffL, 0x1fff3dff9fefffffL }; static final long[] jjbitVec45 = { 0xffff1fffffff8000L, 0x7ffL, 0x1ffffffffffffL, 0x0L }; static final long[] jjbitVec46 = { 0xf3ffffffffffffeeL, 0xffcfff1f3fffL, 0xd3c5fdfffff99feeL, 0xfffcfb080399fL }; static final long[] jjbitVec47 = { 0xd36dfdfffff987e4L, 0x1fffc05e003987L, 0xf3edfdfffffbafeeL, 0xffc100013bbfL }; static final long[] jjbitVec48 = { 0xf3cdfdfffff99feeL, 0xffc3b0c0398fL, 0xc3bfc718d63dc7ecL, 0xff8000803dc7L }; static final long[] jjbitVec49 = { 0xc3effdfffffddfeeL, 0xffc300603ddfL, 0xc3effdfffffddfecL, 0xffc340603ddfL }; static final long[] jjbitVec50 = { 0xc3fffdfffffddfecL, 0xffc300803dcfL, 0x2ffbfffffc7fffecL, 0xc0000ff5f847fL }; static final long[] jjbitVec51 = { 0x87fffffffffffffeL, 0x3ff7fffL, 0x3bffecaefef02596L, 0x33ff3f5fL }; static final long[] jjbitVec52 = { 0xc2a003ff03000001L, 0xfffe07fffffffeffL, 0x1ffffffffeff0fdfL, 0x40L }; static final long[] jjbitVec53 = { 0x3c7f6fbffffffffL, 0x3ff03ffL, 0xffffffff00000000L, 0x7fffffffff003fL }; static final long[] jjbitVec54 = { 0xffffffff7f3d7fffL, 0x3fe0007ffff7fL, 0xffffffff00000000L, 0x1fffffffffffffL }; static final long[] jjbitVec55 = { 0x0L, 0x0L, 0xffffffffffffffffL, 0x3ff080fffffL }; static final long[] jjbitVec56 = { 0xffffffff03ff7800L, 0xffffffffffffffL, 0x3ffffffffffL, 0x0L }; static final long[] jjbitVec57 = { 0x80007c000000f000L, 0x8000fc0000000001L, 0xffff00000000L, 0x21fff0000L }; static final long[] jjbitVec58 = { 0x73efffe000000e0L, 0xfffffffffffffffeL, 0xfffffffe661fffffL, 0x7fffffffffffffffL }; static final long[] jjbitVec59 = { 0x5f7ffdffe0f8007fL, 0xffffffffffffffdbL, 0x3ffffffffffffL, 0xfffffffffff80000L }; static final long[] jjbitVec60 = { 0x18000f00000000L, 0xffd702000000e000L, 0xffffffffffffffffL, 0x9fffffffffffffffL }; static final long[] jjbitVec61 = { 0x87fffffe03ff0010L, 0xffffffe007fffffeL, 0x7fffffffffffffffL, 0xe0000631cfcfcfcL }; private final int jjMoveNfa_0(int startState, int curPos) { int[] nextStates; int startsAt = 0; jjnewStateCnt = 70; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 47: if (curChar == 47) { if (kind > 8) kind = 8; jjCheckNAddStates(0, 2); } else if (curChar == 42) jjstateSet[jjnewStateCnt++] = 45; break; case 0: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(3, 9); else if (curChar == 47) jjAddStates(10, 11); else if (curChar == 36) { if (kind > 76) kind = 76; jjCheckNAdd(28); } else if (curChar == 34) jjCheckNAddStates(12, 14); else if (curChar == 39) jjAddStates(15, 16); else if (curChar == 46) jjCheckNAdd(4); if ((0x3fe000000000000L & l) != 0L) { if (kind > 65) kind = 65; jjCheckNAddTwoStates(1, 2); } else if (curChar == 48) { if (kind > 65) kind = 65; jjCheckNAddStates(17, 21); } break; case 1: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 65) kind = 65; jjCheckNAddTwoStates(1, 2); break; case 3: if (curChar == 46) jjCheckNAdd(4); break; case 4: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddStates(22, 24); break; case 6: if ((0x280000000000L & l) != 0L) jjCheckNAdd(7); break; case 7: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddTwoStates(7, 8); break; case 9: if (curChar == 39) jjAddStates(15, 16); break; case 10: if ((0xffffff7fffffdbffL & l) != 0L) jjCheckNAdd(11); break; case 11: if (curChar == 39 && kind > 74) kind = 74; break; case 13: if ((0x8400000000L & l) != 0L) jjCheckNAdd(11); break; case 14: if ((0xff000000000000L & l) != 0L) jjCheckNAddTwoStates(15, 11); break; case 15: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(11); break; case 16: if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 17; break; case 17: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(15); break; case 18: if (curChar == 34) jjCheckNAddStates(12, 14); break; case 19: if ((0xfffffffbffffdbffL & l) != 0L) jjCheckNAddStates(12, 14); break; case 21: if ((0x8400000000L & l) != 0L) jjCheckNAddStates(12, 14); break; case 22: if (curChar == 34 && kind > 75) kind = 75; break; case 23: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(25, 28); break; case 24: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(12, 14); break; case 25: if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(24); break; case 27: if (curChar != 36) break; if (kind > 76) kind = 76; jjCheckNAdd(28); break; case 28: if ((0x3ff00100fffc1ffL & l) == 0L) break; if (kind > 76) kind = 76; jjCheckNAdd(28); break; case 29: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(3, 9); break; case 30: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(29, 31); break; case 32: if ((0x280000000000L & l) != 0L) jjCheckNAdd(33); break; case 33: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(33, 8); break; case 34: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 36: if ((0x280000000000L & l) != 0L) jjCheckNAdd(37); break; case 37: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddTwoStates(37, 8); break; case 38: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(38, 39); break; case 39: if (curChar != 46) break; if (kind > 69) kind = 69; jjCheckNAddStates(32, 34); break; case 40: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddStates(32, 34); break; case 42: if ((0x280000000000L & l) != 0L) jjCheckNAdd(43); break; case 43: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddTwoStates(43, 8); break; case 44: if (curChar == 47) jjAddStates(10, 11); break; case 45: if (curChar == 42) jjstateSet[jjnewStateCnt++] = 46; break; case 46: if ((0xffff7fffffffffffL & l) != 0L && kind > 6) kind = 6; break; case 48: if (curChar != 47) break; if (kind > 8) kind = 8; jjCheckNAddStates(0, 2); break; case 49: if ((0xffffffffffffdbffL & l) == 0L) break; if (kind > 8) kind = 8; jjCheckNAddStates(0, 2); break; case 50: if ((0x2400L & l) != 0L && kind > 8) kind = 8; break; case 51: if (curChar == 10 && kind > 8) kind = 8; break; case 52: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 51; break; case 53: if (curChar != 48) break; if (kind > 65) kind = 65; jjCheckNAddStates(17, 21); break; case 55: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 65) kind = 65; jjCheckNAddTwoStates(55, 2); break; case 56: if ((0xff000000000000L & l) == 0L) break; if (kind > 65) kind = 65; jjCheckNAddTwoStates(56, 2); break; case 58: if ((0x3ff000000000000L & l) != 0L) jjAddStates(35, 36); break; case 59: if (curChar == 46) jjCheckNAdd(60); break; case 60: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(60, 61); break; case 62: if ((0x280000000000L & l) != 0L) jjCheckNAdd(63); break; case 63: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddTwoStates(63, 8); break; case 65: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(37, 39); break; case 66: if (curChar == 46) jjCheckNAdd(67); break; case 68: if ((0x280000000000L & l) != 0L) jjCheckNAdd(69); break; case 69: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 69) kind = 69; jjCheckNAddTwoStates(69, 8); break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 0: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 76) kind = 76; jjCheckNAdd(28); break; case 2: if ((0x100000001000L & l) != 0L && kind > 65) kind = 65; break; case 5: if ((0x2000000020L & l) != 0L) jjAddStates(40, 41); break; case 8: if ((0x5000000050L & l) != 0L && kind > 69) kind = 69; break; case 10: if ((0xffffffffefffffffL & l) != 0L) jjCheckNAdd(11); break; case 12: if (curChar == 92) jjAddStates(42, 44); break; case 13: if ((0x14404410000000L & l) != 0L) jjCheckNAdd(11); break; case 19: if ((0xffffffffefffffffL & l) != 0L) jjCheckNAddStates(12, 14); break; case 20: if (curChar == 92) jjAddStates(45, 47); break; case 21: if ((0x14404410000000L & l) != 0L) jjCheckNAddStates(12, 14); break; case 28: if ((0x87fffffe87fffffeL & l) == 0L) break; if (kind > 76) kind = 76; jjCheckNAdd(28); break; case 31: if ((0x2000000020L & l) != 0L) jjAddStates(48, 49); break; case 35: if ((0x2000000020L & l) != 0L) jjAddStates(50, 51); break; case 41: if ((0x2000000020L & l) != 0L) jjAddStates(52, 53); break; case 46: if (kind > 6) kind = 6; break; case 49: if (kind > 8) kind = 8; jjAddStates(0, 2); break; case 54: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(55); break; case 55: if ((0x7e0000007eL & l) == 0L) break; if (kind > 65) kind = 65; jjCheckNAddTwoStates(55, 2); break; case 57: if ((0x100000001000000L & l) != 0L) jjCheckNAddTwoStates(58, 59); break; case 58: if ((0x7e0000007eL & l) != 0L) jjCheckNAddTwoStates(58, 59); break; case 60: if ((0x7e0000007eL & l) != 0L) jjAddStates(54, 55); break; case 61: if ((0x1000000010000L & l) != 0L) jjAddStates(56, 57); break; case 64: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(65); break; case 65: if ((0x7e0000007eL & l) != 0L) jjCheckNAddStates(37, 39); break; case 67: if ((0x1000000010000L & l) != 0L) jjAddStates(58, 59); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 0: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 76) kind = 76; jjCheckNAdd(28); break; case 10: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjstateSet[jjnewStateCnt++] = 11; break; case 19: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(12, 14); break; case 28: if (!jjCanMove_2(hiByte, i1, i2, l1, l2)) break; if (kind > 76) kind = 76; jjCheckNAdd(28); break; case 46: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 6) kind = 6; break; case 49: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 8) kind = 8; jjAddStates(0, 2); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 70 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } } } private final int jjMoveStringLiteralDfa0_2() { switch(curChar) { case 42: return jjMoveStringLiteralDfa1_2(0x400L); default : return 1; } } private final int jjMoveStringLiteralDfa1_2(long active0) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return 1; } switch(curChar) { case 47: if ((active0 & 0x400L) != 0L) return jjStopAtPos(1, 10); break; default : return 2; } return 2; } private final int jjMoveStringLiteralDfa0_1() { switch(curChar) { case 42: return jjMoveStringLiteralDfa1_1(0x200L); default : return 1; } } private final int jjMoveStringLiteralDfa1_1(long active0) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return 1; } switch(curChar) { case 47: if ((active0 & 0x200L) != 0L) return jjStopAtPos(1, 9); break; default : return 2; } return 2; } static final int[] jjnextStates = { 49, 50, 52, 30, 31, 8, 34, 35, 38, 39, 47, 48, 19, 20, 22, 10, 12, 54, 56, 2, 57, 64, 4, 5, 8, 19, 20, 24, 22, 30, 31, 8, 40, 41, 8, 58, 59, 65, 66, 67, 6, 7, 13, 14, 16, 21, 23, 25, 32, 33, 36, 37, 42, 43, 60, 61, 62, 63, 68, 69, }; private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) { switch(hiByte) { case 0: return ((jjbitVec2[i2] & l2) != 0L); default : if ((jjbitVec0[i1] & l1) != 0L) return true; return false; } } private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2) { switch(hiByte) { case 0: return ((jjbitVec4[i2] & l2) != 0L); case 2: return ((jjbitVec5[i2] & l2) != 0L); case 3: return ((jjbitVec6[i2] & l2) != 0L); case 4: return ((jjbitVec7[i2] & l2) != 0L); case 5: return ((jjbitVec8[i2] & l2) != 0L); case 6: return ((jjbitVec9[i2] & l2) != 0L); case 7: return ((jjbitVec10[i2] & l2) != 0L); case 9: return ((jjbitVec11[i2] & l2) != 0L); case 10: return ((jjbitVec12[i2] & l2) != 0L); case 11: return ((jjbitVec13[i2] & l2) != 0L); case 12: return ((jjbitVec14[i2] & l2) != 0L); case 13: return ((jjbitVec15[i2] & l2) != 0L); case 14: return ((jjbitVec16[i2] & l2) != 0L); case 15: return ((jjbitVec17[i2] & l2) != 0L); case 16: return ((jjbitVec18[i2] & l2) != 0L); case 17: return ((jjbitVec19[i2] & l2) != 0L); case 18: return ((jjbitVec20[i2] & l2) != 0L); case 19: return ((jjbitVec21[i2] & l2) != 0L); case 20: return ((jjbitVec0[i2] & l2) != 0L); case 22: return ((jjbitVec22[i2] & l2) != 0L); case 23: return ((jjbitVec23[i2] & l2) != 0L); case 24: return ((jjbitVec24[i2] & l2) != 0L); case 30: return ((jjbitVec25[i2] & l2) != 0L); case 31: return ((jjbitVec26[i2] & l2) != 0L); case 32: return ((jjbitVec27[i2] & l2) != 0L); case 33: return ((jjbitVec28[i2] & l2) != 0L); case 48: return ((jjbitVec29[i2] & l2) != 0L); case 49: return ((jjbitVec30[i2] & l2) != 0L); case 77: return ((jjbitVec31[i2] & l2) != 0L); case 159: return ((jjbitVec32[i2] & l2) != 0L); case 164: return ((jjbitVec33[i2] & l2) != 0L); case 215: return ((jjbitVec34[i2] & l2) != 0L); case 250: return ((jjbitVec35[i2] & l2) != 0L); case 251: return ((jjbitVec36[i2] & l2) != 0L); case 253: return ((jjbitVec37[i2] & l2) != 0L); case 254: return ((jjbitVec38[i2] & l2) != 0L); case 255: return ((jjbitVec39[i2] & l2) != 0L); default : if ((jjbitVec3[i1] & l1) != 0L) return true; return false; } } private static final boolean jjCanMove_2(int hiByte, int i1, int i2, long l1, long l2) { switch(hiByte) { case 0: return ((jjbitVec40[i2] & l2) != 0L); case 2: return ((jjbitVec5[i2] & l2) != 0L); case 3: return ((jjbitVec41[i2] & l2) != 0L); case 4: return ((jjbitVec42[i2] & l2) != 0L); case 5: return ((jjbitVec43[i2] & l2) != 0L); case 6: return ((jjbitVec44[i2] & l2) != 0L); case 7: return ((jjbitVec45[i2] & l2) != 0L); case 9: return ((jjbitVec46[i2] & l2) != 0L); case 10: return ((jjbitVec47[i2] & l2) != 0L); case 11: return ((jjbitVec48[i2] & l2) != 0L); case 12: return ((jjbitVec49[i2] & l2) != 0L); case 13: return ((jjbitVec50[i2] & l2) != 0L); case 14: return ((jjbitVec51[i2] & l2) != 0L); case 15: return ((jjbitVec52[i2] & l2) != 0L); case 16: return ((jjbitVec53[i2] & l2) != 0L); case 17: return ((jjbitVec19[i2] & l2) != 0L); case 18: return ((jjbitVec20[i2] & l2) != 0L); case 19: return ((jjbitVec54[i2] & l2) != 0L); case 20: return ((jjbitVec0[i2] & l2) != 0L); case 22: return ((jjbitVec22[i2] & l2) != 0L); case 23: return ((jjbitVec55[i2] & l2) != 0L); case 24: return ((jjbitVec56[i2] & l2) != 0L); case 30: return ((jjbitVec25[i2] & l2) != 0L); case 31: return ((jjbitVec26[i2] & l2) != 0L); case 32: return ((jjbitVec57[i2] & l2) != 0L); case 33: return ((jjbitVec28[i2] & l2) != 0L); case 48: return ((jjbitVec58[i2] & l2) != 0L); case 49: return ((jjbitVec30[i2] & l2) != 0L); case 77: return ((jjbitVec31[i2] & l2) != 0L); case 159: return ((jjbitVec32[i2] & l2) != 0L); case 164: return ((jjbitVec33[i2] & l2) != 0L); case 215: return ((jjbitVec34[i2] & l2) != 0L); case 250: return ((jjbitVec35[i2] & l2) != 0L); case 251: return ((jjbitVec59[i2] & l2) != 0L); case 253: return ((jjbitVec37[i2] & l2) != 0L); case 254: return ((jjbitVec60[i2] & l2) != 0L); case 255: return ((jjbitVec61[i2] & l2) != 0L); default : if ((jjbitVec3[i1] & l1) != 0L) return true; return false; } } public static final String[] jjstrLiteralImages = { "", null, null, null, null, null, null, null, null, null, null, null, "\141\142\163\164\162\141\143\164", "\141\163\163\145\162\164", "\142\157\157\154\145\141\156", "\142\162\145\141\153", "\142\171\164\145", "\143\141\163\145", "\143\141\164\143\150", "\143\150\141\162", "\143\154\141\163\163", "\143\157\156\163\164", "\143\157\156\164\151\156\165\145", "\144\145\146\141\165\154\164", "\144\157", "\144\157\165\142\154\145", "\145\154\163\145", "\145\156\165\155", "\145\170\164\145\156\144\163", "\146\141\154\163\145", "\146\151\156\141\154", "\146\151\156\141\154\154\171", "\146\154\157\141\164", "\146\157\162", "\147\157\164\157", "\151\146", "\151\155\160\154\145\155\145\156\164\163", "\151\155\160\157\162\164", "\151\156\163\164\141\156\143\145\157\146", "\151\156\164", "\151\156\164\145\162\146\141\143\145", "\154\157\156\147", "\156\141\164\151\166\145", "\156\145\167", "\156\165\154\154", "\160\141\143\153\141\147\145", "\160\162\151\166\141\164\145", "\160\162\157\164\145\143\164\145\144", "\160\165\142\154\151\143", "\162\145\164\165\162\156", "\163\150\157\162\164", "\163\164\141\164\151\143", "\163\164\162\151\143\164\146\160", "\163\165\160\145\162", "\163\167\151\164\143\150", "\163\171\156\143\150\162\157\156\151\172\145\144", "\164\150\151\163", "\164\150\162\157\167", "\164\150\162\157\167\163", "\164\162\141\156\163\151\145\156\164", "\164\162\165\145", "\164\162\171", "\166\157\151\144", "\166\157\154\141\164\151\154\145", "\167\150\151\154\145", null, null, null, null, null, null, null, null, null, null, null, null, null, null, "\50", "\51", "\173", "\175", "\133", "\135", "\73", "\54", "\56", "\100", "\75", "\74", "\41", "\176", "\77", "\72", "\75\75", "\74\75", "\76\75", "\41\75", "\174\174", "\46\46", "\53\53", "\55\55", "\53", "\55", "\52", "\57", "\46", "\174", "\136", "\45", "\74\74", "\53\75", "\55\75", "\52\75", "\57\75", "\46\75", "\174\75", "\136\75", "\45\75", "\74\74\75", "\76\76\75", "\76\76\76\75", "\56\56\56", "\76\76\76", "\76\76", "\76", "\32", null, }; public static final String[] lexStateNames = { "DEFAULT", "IN_FORMAL_COMMENT", "IN_MULTI_LINE_COMMENT", }; public static final int[] jjnewLexState = { -1, -1, -1, -1, -1, -1, 1, 2, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, }; static final long[] jjtoToken = { 0xfffffffffffff001L, 0xffffffffffff9c23L, 0x1L, }; static final long[] jjtoSkip = { 0x73eL, 0x0L, 0x0L, }; static final long[] jjtoSpecial = { 0x700L, 0x0L, 0x0L, }; static final long[] jjtoMore = { 0x8c0L, 0x0L, 0x0L, }; protected JavaCharStream input_stream; private final int[] jjrounds = new int[70]; private final int[] jjstateSet = new int[140]; StringBuffer image; int jjimageLen; int lengthOfMatch; protected char curChar; public JavaParser15TokenManager(JavaCharStream stream){ if (JavaCharStream.staticFlag) throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); input_stream = stream; } public JavaParser15TokenManager(JavaCharStream stream, int lexState){ this(stream); SwitchTo(lexState); } public void ReInit(JavaCharStream stream) { jjmatchedPos = jjnewStateCnt = 0; curLexState = defaultLexState; input_stream = stream; ReInitRounds(); } private final void ReInitRounds() { int i; jjround = 0x80000001; for (i = 70; i-- > 0;) jjrounds[i] = 0x80000000; } public void ReInit(JavaCharStream stream, int lexState) { ReInit(stream); SwitchTo(lexState); } public void SwitchTo(int lexState) { if (lexState >= 3 || lexState < 0) throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); else curLexState = lexState; } protected Token jjFillToken() { Token t = Token.newToken(jjmatchedKind); t.kind = jjmatchedKind; String im = jjstrLiteralImages[jjmatchedKind]; t.image = (im == null) ? input_stream.GetImage() : im; t.beginLine = input_stream.getBeginLine(); t.beginColumn = input_stream.getBeginColumn(); t.endLine = input_stream.getEndLine(); t.endColumn = input_stream.getEndColumn(); return t; } int curLexState = 0; int defaultLexState = 0; int jjnewStateCnt; int jjround; int jjmatchedPos; int jjmatchedKind; public Token getNextToken() { int kind; Token specialToken = null; Token matchedToken; int curPos = 0; EOFLoop : for (;;) { try { curChar = input_stream.BeginToken(); } catch(java.io.IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; return matchedToken; } image = null; jjimageLen = 0; for (;;) { switch(curLexState) { case 0: try { input_stream.backup(0); while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) curChar = input_stream.BeginToken(); } catch (java.io.IOException e1) { continue EOFLoop; } jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); if (jjmatchedPos == 0 && jjmatchedKind > 128) { jjmatchedKind = 128; } break; case 1: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_1(); if (jjmatchedPos == 0 && jjmatchedKind > 11) { jjmatchedKind = 11; } break; case 2: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_2(); if (jjmatchedPos == 0 && jjmatchedKind > 11) { jjmatchedKind = 11; } break; } if (jjmatchedKind != 0x7fffffff) { if (jjmatchedPos + 1 < curPos) input_stream.backup(curPos - jjmatchedPos - 1); if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; TokenLexicalActions(matchedToken); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; return matchedToken; } else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); if (specialToken == null) specialToken = matchedToken; else { matchedToken.specialToken = specialToken; specialToken = (specialToken.next = matchedToken); } SkipLexicalActions(matchedToken); } else SkipLexicalActions(null); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; continue EOFLoop; } MoreLexicalActions(); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; curPos = 0; jjmatchedKind = 0x7fffffff; try { curChar = input_stream.readChar(); continue; } catch (java.io.IOException e1) { } } int error_line = input_stream.getEndLine(); int error_column = input_stream.getEndColumn(); String error_after = null; boolean EOFSeen = false; try { input_stream.readChar(); input_stream.backup(1); } catch (java.io.IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; } if (!EOFSeen) { input_stream.backup(1); error_after = curPos <= 1 ? "" : input_stream.GetImage(); } throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); } } } void SkipLexicalActions(Token matchedToken) { switch(jjmatchedKind) { default : break; } } void MoreLexicalActions() { jjimageLen += (lengthOfMatch = jjmatchedPos + 1); switch(jjmatchedKind) { case 6 : if (image == null) image = new StringBuffer(); image.append(input_stream.GetSuffix(jjimageLen)); jjimageLen = 0; input_stream.backup(1); break; default : break; } } void TokenLexicalActions(Token matchedToken) { switch(jjmatchedKind) { case 124 : if (image == null) image = new StringBuffer(); image.append(jjstrLiteralImages[124]); matchedToken.kind = GT; ((Token.GTToken)matchedToken).realKind = RUNSIGNEDSHIFT; input_stream.backup(2); matchedToken.image = ">"; break; case 125 : if (image == null) image = new StringBuffer(); image.append(jjstrLiteralImages[125]); matchedToken.kind = GT; ((Token.GTToken)matchedToken).realKind = RSIGNEDSHIFT; input_stream.backup(1); matchedToken.image = ">"; break; default : break; } } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/ParseException.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/ParseException.java0000644000175000017500000002016311343534521033346 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */ /* JavaCCOptions:KEEP_LINE_COL=null */ package net.sourceforge.cobertura.javancss.parser.java15; /** * This exception is thrown when parse errors are encountered. * You can explicitly create objects of this exception type by * calling the method generateParseException in the generated * parser. * * You can modify this class to customize your error reporting * mechanisms so long as you retain the public fields. */ public class ParseException extends Exception { /** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", * "expectedTokenSequences", and "tokenImage" set. The boolean * flag "specialConstructor" is also set to true to indicate that * this constructor was used to create this object. * This constructor calls its super class with the empty string * to force the "toString" method of parent class "Throwable" to * print the error message in the form: * ParseException: */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal ) { super(""); specialConstructor = true; currentToken = currentTokenVal; expectedTokenSequences = expectedTokenSequencesVal; tokenImage = tokenImageVal; } /** * The following constructors are for use by you for whatever * purpose you can think of. Constructing the exception in this * manner makes the exception behave in the normal way - i.e., as * documented in the class "Throwable". The fields "errorToken", * "expectedTokenSequences", and "tokenImage" do not contain * relevant information. The JavaCC generated code does not use * these constructors. */ public ParseException() { super(); specialConstructor = false; } /** Constructor with message. */ public ParseException(String message) { super(message); specialConstructor = false; } /** * This variable determines which constructor was used to create * this object and thereby affects the semantics of the * "getMessage" method (see below). */ protected boolean specialConstructor; /** * This is the last token that has been consumed successfully. If * this object has been created due to a parse error, the token * followng this token will (therefore) be the first error token. */ public Token currentToken; /** * Each entry in this array is an array of integers. Each array * of integers represents a sequence of tokens (by their ordinal * values) that is expected at this point of the parse. */ public int[][] expectedTokenSequences; /** * This is a reference to the "tokenImage" array of the generated * parser within which the parse error occurred. This array is * defined in the generated ...Constants interface. */ public String[] tokenImage; /** * This method has the standard behavior when this object has been * created using the standard constructors. Otherwise, it uses * "currentToken" and "expectedTokenSequences" to generate a parse * error message and returns it. If this object has been created * due to a parse error, and you do not catch it (it gets thrown * from the parser), then this method is called during the printing * of the final stack trace, and hence the correct error message * gets displayed. */ public String getMessage() { if (!specialConstructor) { return super.getMessage(); } StringBuffer expected = new StringBuffer(); int maxSize = 0; for (int i = 0; i < expectedTokenSequences.length; i++) { if (maxSize < expectedTokenSequences[i].length) { maxSize = expectedTokenSequences[i].length; } for (int j = 0; j < expectedTokenSequences[i].length; j++) { expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' '); } if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { expected.append("..."); } expected.append(eol).append(" "); } String retval = "Encountered \""; Token tok = currentToken.next; for (int i = 0; i < maxSize; i++) { if (i != 0) retval += " "; if (tok.kind == 0) { retval += tokenImage[0]; break; } retval += " " + tokenImage[tok.kind]; retval += " \""; retval += add_escapes(tok.image); retval += " \""; tok = tok.next; } retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; retval += "." + eol; if (expectedTokenSequences.length == 1) { retval += "Was expecting:" + eol + " "; } else { retval += "Was expecting one of:" + eol + " "; } retval += expected.toString(); return retval; } /** * The end of line string for this machine. */ protected String eol = System.getProperty("line.separator", "\n"); /** * Used to convert raw characters to their escaped version * when these raw version cannot be used as part of an ASCII * string literal. */ protected String add_escapes(String str) { StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) { case 0 : continue; case '\b': retval.append("\\b"); continue; case '\t': retval.append("\\t"); continue; case '\n': retval.append("\\n"); continue; case '\f': retval.append("\\f"); continue; case '\r': retval.append("\\r"); continue; case '\"': retval.append("\\\""); continue; case '\'': retval.append("\\\'"); continue; case '\\': retval.append("\\\\"); continue; default: if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { String s = "0000" + Integer.toString(ch, 16); retval.append("\\u" + s.substring(s.length() - 4, s.length())); } else { retval.append(ch); } continue; } } return retval.toString(); } } /* JavaCC - OriginalChecksum=e07eeb809ef62869a5836bb515bc01e5 (do not edit this line) */ ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/JavaParser15Constants.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/JavaParser15Constan0000644000175000017500000002476011343534521033236 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaParser15Constants.java */ package net.sourceforge.cobertura.javancss.parser.java15; /** * Token literal values and constants. * Generated by org.javacc.parser.OtherFilesGen#start() */ public interface JavaParser15Constants { /** End of File. */ int EOF = 0; /** RegularExpression Id. */ int SINGLE_LINE_COMMENT = 8; /** RegularExpression Id. */ int FORMAL_COMMENT = 9; /** RegularExpression Id. */ int MULTI_LINE_COMMENT = 10; /** RegularExpression Id. */ int ABSTRACT = 12; /** RegularExpression Id. */ int ASSERT = 13; /** RegularExpression Id. */ int BOOLEAN = 14; /** RegularExpression Id. */ int BREAK = 15; /** RegularExpression Id. */ int BYTE = 16; /** RegularExpression Id. */ int CASE = 17; /** RegularExpression Id. */ int CATCH = 18; /** RegularExpression Id. */ int CHAR = 19; /** RegularExpression Id. */ int CLASS = 20; /** RegularExpression Id. */ int CONST = 21; /** RegularExpression Id. */ int CONTINUE = 22; /** RegularExpression Id. */ int _DEFAULT = 23; /** RegularExpression Id. */ int DO = 24; /** RegularExpression Id. */ int DOUBLE = 25; /** RegularExpression Id. */ int ELSE = 26; /** RegularExpression Id. */ int ENUM = 27; /** RegularExpression Id. */ int EXTENDS = 28; /** RegularExpression Id. */ int FALSE = 29; /** RegularExpression Id. */ int FINAL = 30; /** RegularExpression Id. */ int FINALLY = 31; /** RegularExpression Id. */ int FLOAT = 32; /** RegularExpression Id. */ int FOR = 33; /** RegularExpression Id. */ int GOTO = 34; /** RegularExpression Id. */ int IF = 35; /** RegularExpression Id. */ int IMPLEMENTS = 36; /** RegularExpression Id. */ int IMPORT = 37; /** RegularExpression Id. */ int INSTANCEOF = 38; /** RegularExpression Id. */ int INT = 39; /** RegularExpression Id. */ int INTERFACE = 40; /** RegularExpression Id. */ int LONG = 41; /** RegularExpression Id. */ int NATIVE = 42; /** RegularExpression Id. */ int NEW = 43; /** RegularExpression Id. */ int NULL = 44; /** RegularExpression Id. */ int PACKAGE = 45; /** RegularExpression Id. */ int PRIVATE = 46; /** RegularExpression Id. */ int PROTECTED = 47; /** RegularExpression Id. */ int PUBLIC = 48; /** RegularExpression Id. */ int RETURN = 49; /** RegularExpression Id. */ int SHORT = 50; /** RegularExpression Id. */ int STATIC = 51; /** RegularExpression Id. */ int STRICTFP = 52; /** RegularExpression Id. */ int SUPER = 53; /** RegularExpression Id. */ int SWITCH = 54; /** RegularExpression Id. */ int SYNCHRONIZED = 55; /** RegularExpression Id. */ int THIS = 56; /** RegularExpression Id. */ int THROW = 57; /** RegularExpression Id. */ int THROWS = 58; /** RegularExpression Id. */ int TRANSIENT = 59; /** RegularExpression Id. */ int TRUE = 60; /** RegularExpression Id. */ int TRY = 61; /** RegularExpression Id. */ int VOID = 62; /** RegularExpression Id. */ int VOLATILE = 63; /** RegularExpression Id. */ int WHILE = 64; /** RegularExpression Id. */ int INTEGER_LITERAL = 65; /** RegularExpression Id. */ int DECIMAL_LITERAL = 66; /** RegularExpression Id. */ int HEX_LITERAL = 67; /** RegularExpression Id. */ int OCTAL_LITERAL = 68; /** RegularExpression Id. */ int FLOATING_POINT_LITERAL = 69; /** RegularExpression Id. */ int DECIMAL_FLOATING_POINT_LITERAL = 70; /** RegularExpression Id. */ int DECIMAL_EXPONENT = 71; /** RegularExpression Id. */ int HEXADECIMAL_FLOATING_POINT_LITERAL = 72; /** RegularExpression Id. */ int HEXADECIMAL_EXPONENT = 73; /** RegularExpression Id. */ int CHARACTER_LITERAL = 74; /** RegularExpression Id. */ int STRING_LITERAL = 75; /** RegularExpression Id. */ int IDENTIFIER = 76; /** RegularExpression Id. */ int LETTER = 77; /** RegularExpression Id. */ int PART_LETTER = 78; /** RegularExpression Id. */ int LPAREN = 79; /** RegularExpression Id. */ int RPAREN = 80; /** RegularExpression Id. */ int LBRACE = 81; /** RegularExpression Id. */ int RBRACE = 82; /** RegularExpression Id. */ int LBRACKET = 83; /** RegularExpression Id. */ int RBRACKET = 84; /** RegularExpression Id. */ int SEMICOLON = 85; /** RegularExpression Id. */ int COMMA = 86; /** RegularExpression Id. */ int DOT = 87; /** RegularExpression Id. */ int AT = 88; /** RegularExpression Id. */ int ASSIGN = 89; /** RegularExpression Id. */ int LT = 90; /** RegularExpression Id. */ int BANG = 91; /** RegularExpression Id. */ int TILDE = 92; /** RegularExpression Id. */ int HOOK = 93; /** RegularExpression Id. */ int COLON = 94; /** RegularExpression Id. */ int EQ = 95; /** RegularExpression Id. */ int LE = 96; /** RegularExpression Id. */ int GE = 97; /** RegularExpression Id. */ int NE = 98; /** RegularExpression Id. */ int SC_OR = 99; /** RegularExpression Id. */ int SC_AND = 100; /** RegularExpression Id. */ int INCR = 101; /** RegularExpression Id. */ int DECR = 102; /** RegularExpression Id. */ int PLUS = 103; /** RegularExpression Id. */ int MINUS = 104; /** RegularExpression Id. */ int STAR = 105; /** RegularExpression Id. */ int SLASH = 106; /** RegularExpression Id. */ int BIT_AND = 107; /** RegularExpression Id. */ int BIT_OR = 108; /** RegularExpression Id. */ int XOR = 109; /** RegularExpression Id. */ int REM = 110; /** RegularExpression Id. */ int LSHIFT = 111; /** RegularExpression Id. */ int PLUSASSIGN = 112; /** RegularExpression Id. */ int MINUSASSIGN = 113; /** RegularExpression Id. */ int STARASSIGN = 114; /** RegularExpression Id. */ int SLASHASSIGN = 115; /** RegularExpression Id. */ int ANDASSIGN = 116; /** RegularExpression Id. */ int ORASSIGN = 117; /** RegularExpression Id. */ int XORASSIGN = 118; /** RegularExpression Id. */ int REMASSIGN = 119; /** RegularExpression Id. */ int LSHIFTASSIGN = 120; /** RegularExpression Id. */ int RSIGNEDSHIFTASSIGN = 121; /** RegularExpression Id. */ int RUNSIGNEDSHIFTASSIGN = 122; /** RegularExpression Id. */ int ELLIPSIS = 123; /** RegularExpression Id. */ int RUNSIGNEDSHIFT = 124; /** RegularExpression Id. */ int RSIGNEDSHIFT = 125; /** RegularExpression Id. */ int GT = 126; /** RegularExpression Id. */ int STUFF_TO_IGNORE = 128; /** Lexical state. */ int DEFAULT = 0; /** Lexical state. */ int IN_FORMAL_COMMENT = 1; /** Lexical state. */ int IN_MULTI_LINE_COMMENT = 2; /** Literal token values. */ String[] tokenImage = { "", "\" \"", "\"\\t\"", "\"\\n\"", "\"\\r\"", "\"\\f\"", "", "\"/*\"", "", "\"*/\"", "\"*/\"", "", "\"abstract\"", "\"assert\"", "\"boolean\"", "\"break\"", "\"byte\"", "\"case\"", "\"catch\"", "\"char\"", "\"class\"", "\"const\"", "\"continue\"", "\"default\"", "\"do\"", "\"double\"", "\"else\"", "\"enum\"", "\"extends\"", "\"false\"", "\"final\"", "\"finally\"", "\"float\"", "\"for\"", "\"goto\"", "\"if\"", "\"implements\"", "\"import\"", "\"instanceof\"", "\"int\"", "\"interface\"", "\"long\"", "\"native\"", "\"new\"", "\"null\"", "\"package\"", "\"private\"", "\"protected\"", "\"public\"", "\"return\"", "\"short\"", "\"static\"", "\"strictfp\"", "\"super\"", "\"switch\"", "\"synchronized\"", "\"this\"", "\"throw\"", "\"throws\"", "\"transient\"", "\"true\"", "\"try\"", "\"void\"", "\"volatile\"", "\"while\"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "\"(\"", "\")\"", "\"{\"", "\"}\"", "\"[\"", "\"]\"", "\";\"", "\",\"", "\".\"", "\"@\"", "\"=\"", "\"<\"", "\"!\"", "\"~\"", "\"?\"", "\":\"", "\"==\"", "\"<=\"", "\">=\"", "\"!=\"", "\"||\"", "\"&&\"", "\"++\"", "\"--\"", "\"+\"", "\"-\"", "\"*\"", "\"/\"", "\"&\"", "\"|\"", "\"^\"", "\"%\"", "\"<<\"", "\"+=\"", "\"-=\"", "\"*=\"", "\"/=\"", "\"&=\"", "\"|=\"", "\"^=\"", "\"%=\"", "\"<<=\"", "\">>=\"", "\">>>=\"", "\"...\"", "\">>>\"", "\">>\"", "\">\"", "\"\\u001a\"", "", }; } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/TokenMgrError.java0000644000175000017500000001361711343534517033170 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */ /* JavaCCOptions: */ package net.sourceforge.cobertura.javancss.parser.java15; /** Token Manager Error. */ public class TokenMgrError extends Error { /* * Ordinals for various reasons why an Error of this type can be thrown. */ /** * Lexical error occurred. */ static final int LEXICAL_ERROR = 0; /** * An attempt was made to create a second instance of a static token manager. */ static final int STATIC_LEXER_ERROR = 1; /** * Tried to change to an invalid lexical state. */ static final int INVALID_LEXICAL_STATE = 2; /** * Detected (and bailed out of) an infinite loop in the token manager. */ static final int LOOP_DETECTED = 3; /** * Indicates the reason why the exception is thrown. It will have * one of the above 4 values. */ int errorCode; /** * Replaces unprintable characters by their escaped (or unicode escaped) * equivalents in the given string */ protected static final String addEscapes(String str) { StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) { case 0 : continue; case '\b': retval.append("\\b"); continue; case '\t': retval.append("\\t"); continue; case '\n': retval.append("\\n"); continue; case '\f': retval.append("\\f"); continue; case '\r': retval.append("\\r"); continue; case '\"': retval.append("\\\""); continue; case '\'': retval.append("\\\'"); continue; case '\\': retval.append("\\\\"); continue; default: if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { String s = "0000" + Integer.toString(ch, 16); retval.append("\\u" + s.substring(s.length() - 4, s.length())); } else { retval.append(ch); } continue; } } return retval.toString(); } /** * Returns a detailed message for the Error when it is thrown by the * token manager to indicate a lexical error. * Parameters : * EOFSeen : indicates if EOF caused the lexical error * curLexState : lexical state in which this error occurred * errorLine : line number when the error occurred * errorColumn : column number when the error occurred * errorAfter : prefix that was seen before this error occurred * curchar : the offending character * Note: You can customize the lexical error message by modifying this method. */ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { return("Lexical error at line " + errorLine + ", column " + errorColumn + ". Encountered: " + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + "after : \"" + addEscapes(errorAfter) + "\""); } /** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * * "Internal Error : Please file a bug report .... " * * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); } /* * Constructors of various flavors follow. */ /** No arg constructor. */ public TokenMgrError() { } /** Constructor with message and reason. */ public TokenMgrError(String message, int reason) { super(message); errorCode = reason; } /** Full Constructor. */ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); } } /* JavaCC - OriginalChecksum=a8b95413d91ef43eb316f9594e077ab0 (do not edit this line) */ cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/java15/JavaParser15.java0000644000175000017500000044550211343534514032633 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaParser15.java */ package net.sourceforge.cobertura.javancss.parser.java15; import java.io.*; import net.sourceforge.cobertura.javancss.parser.JavaParserInterface; import java.util.*; import net.sourceforge.cobertura.javancss.FunctionMetric; import net.sourceforge.cobertura.javancss.ObjectMetric; import net.sourceforge.cobertura.javancss.PackageMetric; /** * Grammar to parse Java version 1.5 * @author Sreenivasa Viswanadha - Simplified and enhanced for 1.5 */ public class JavaParser15 implements JavaParserInterface, JavaParser15Constants { private boolean _bReturn = false; private int _ncss = 0; // general counter private int _loc = 0; private int _cyc = 1; private int _localCases = 0; private String _sName = ""; // name of last token private String _sParameter = ""; private String _sPackage = ""; private String _sClass = ""; private String _sFunction = ""; private int _functions = 0; // number of functions in this class //private int _topLevelClasses = 0; private int _classes = 0; private int _classLevel = 0; private int _anonClassCount = 1; private int _jvdcLines = 0; // added by SMS private int _jvdc = 0; private boolean _bPrivate = true;//false; // added by SMS private boolean _bPublic = true; // added by SMS /** * For each class the number of formal * comments in toplevel methods, constructors, inner * classes, and for the class itself are counted. * The top level comment has to be directly before * the class definition, not before the package or * import statement as it is often seen in source code * examples (at the beginning of your source files you * should instead put your copyright notice). */ private int _javadocs = 0; // global javadocs private List/**/ _vFunctions = new ArrayList(); // holds the statistics for each method /** * Metrics for each class/interface are stored in this * vector. */ private List/**/ _vClasses = new ArrayList(); private List _vImports = new ArrayList(); private Object[] _aoPackage = null; private Map/**/ _htPackage = new HashMap(); private PackageMetric _pPackageMetric; private Token _tmpToken = null; /** Argh, too much of a state machine. */ private Token _tmpResultToken = null; private String _formatPackage(String sPackage_) { if (sPackage_.equals("")) { return "."; } return sPackage_.substring(0, sPackage_.length() - 1); } public void parse() throws Exception { CompilationUnit(); } public void parseImportUnit() throws Exception { ImportUnit(); } public int getNcss() { return _ncss; } public int getLOC() { return _loc; } // added by SMS public int getJvdc() { return _jvdc; } /*public int getTopLevelClasses() { return _topLevelClasses; }*/ public List/**/ getFunction() { return _vFunctions; } /** * @return Top level classes in sorted order */ public List/**/ getObject() { Collections.sort(_vClasses); return _vClasses; } /** * @return The empty package consists of the name ".". */ public Map/**/ getPackage() { return _htPackage; } public List getImports() { return _vImports; } /** * name, beginLine, ... */ public Object[] getPackageObjects() { return _aoPackage; } /** * if javancss is used with cat *.java a long * input stream might get generated, so line * number information in case of an parse exception * is not very useful. */ public String getLastFunction() { return _sPackage + _sClass + _sFunction; } /** * Class to hold modifiers. */ static public final class ModifierSet { /* Definitions of the bits in the modifiers field. */ public static final int PUBLIC = 0x0001; public static final int PROTECTED = 0x0002; public static final int PRIVATE = 0x0004; public static final int ABSTRACT = 0x0008; public static final int STATIC = 0x0010; public static final int FINAL = 0x0020; public static final int SYNCHRONIZED = 0x0040; public static final int NATIVE = 0x0080; public static final int TRANSIENT = 0x0100; public static final int VOLATILE = 0x0200; public static final int STRICTFP = 0x1000; /** A set of accessors that indicate whether the specified modifier is in the set. */ public boolean isPublic(int modifiers) { return (modifiers & PUBLIC) != 0; } public boolean isProtected(int modifiers) { return (modifiers & PROTECTED) != 0; } public boolean isPrivate(int modifiers) { return (modifiers & PRIVATE) != 0; } public boolean isStatic(int modifiers) { return (modifiers & STATIC) != 0; } public boolean isAbstract(int modifiers) { return (modifiers & ABSTRACT) != 0; } public boolean isFinal(int modifiers) { return (modifiers & FINAL) != 0; } public boolean isNative(int modifiers) { return (modifiers & NATIVE) != 0; } public boolean isStrictfp(int modifiers) { return (modifiers & STRICTFP) != 0; } public boolean isSynchronized(int modifiers) { return (modifiers & SYNCHRONIZED) != 0; } public boolean isTransient(int modifiers) { return (modifiers & TRANSIENT) != 0; } public boolean isVolatile(int modifiers) { return (modifiers & VOLATILE) != 0; } /** * Removes the given modifier. */ static int removeModifier(int modifiers, int mod) { return modifiers & ~mod; } } public JavaParser15(String fileName) { this(System.in); try { ReInit(new FileInputStream(new File(fileName))); } catch(Exception e) { e.printStackTrace(); } } public static void main(String args[]) { JavaParser15 parser; if (args.length == 0) { System.out.println("Java Parser Version 1.5: Reading from standard input . . ."); parser = new JavaParser15(System.in); } else if (args.length == 1) { System.out.println("Java Parser Version 1.5: Reading from file " + args[0] + " . . ."); try { parser = new JavaParser15(new java.io.FileInputStream(args[0])); } catch (java.io.FileNotFoundException e) { System.out.println("Java Parser Version 1.5: File " + args[0] + " not found."); return; } } else { System.out.println("Java Parser Version 1.5: Usage is one of:"); System.out.println(" java javancss.parser.java15.JavaParser15 < inputfile"); System.out.println("OR"); System.out.println(" java javancss.parser.java15.JavaParser15 inputfile"); return; } try { parser.CompilationUnit(); System.out.println("Java Parser Version 1.1: Java program parsed successfully."); } catch (ParseException e) { System.out.println(e.getMessage()); System.out.println("Java Parser Version 1.1: Encountered errors during parse."); } } /***************************************** * THE JAVA LANGUAGE GRAMMAR STARTS HERE * *****************************************/ /* * Program structuring syntax follows. */ final public void CompilationUnit() throws ParseException { if (jj_2_1(2147483647)) { PackageDeclaration(); } else { ; } label_1: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPORT: ; break; default: break label_1; } ImportDeclaration(); } label_2: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case CLASS: case ENUM: case FINAL: case INTERFACE: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case SEMICOLON: case AT: ; break; default: break label_2; } TypeDeclaration(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 127: jj_consume_token(127); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF_TO_IGNORE: jj_consume_token(STUFF_TO_IGNORE); break; default: ; } jj_consume_token(0); } final public void PackageDeclaration() throws ParseException { Modifiers(); jj_consume_token(PACKAGE); Name(); jj_consume_token(SEMICOLON); } final public void ImportUnit() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case NATIVE: case PACKAGE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case AT: PackageDeclaration(); break; default: ; } label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPORT: ; break; default: break label_3; } ImportDeclaration(); } label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case PUBLIC: case STRICTFP: case SYNCHRONIZED: ; break; default: break label_4; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: jj_consume_token(ABSTRACT); break; case FINAL: jj_consume_token(FINAL); break; case PUBLIC: jj_consume_token(PUBLIC); break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); break; case STRICTFP: jj_consume_token(STRICTFP); break; default: jj_consume_token(-1); throw new ParseException(); } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: jj_consume_token(CLASS); break; case INTERFACE: jj_consume_token(INTERFACE); break; default: jj_consume_token(-1); throw new ParseException(); } } final public void ImportDeclaration() throws ParseException { jj_consume_token(IMPORT); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); break; default: ; } Name(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: jj_consume_token(DOT); jj_consume_token(STAR); break; default: ; } jj_consume_token(SEMICOLON); } /* * Modifiers. We match all modifiers in a single rule to reduce the chances of * syntax errors for simple modifier mistakes. It will also enable us to give * better error messages. */ final public int Modifiers() throws ParseException { int modifiers = 0; label_5: while (true) { if (jj_2_2(2)) { ; } else { break label_5; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PUBLIC: jj_consume_token(PUBLIC); modifiers |= ModifierSet.PUBLIC; break; case STATIC: jj_consume_token(STATIC); modifiers |= ModifierSet.STATIC; break; case PROTECTED: jj_consume_token(PROTECTED); modifiers |= ModifierSet.PROTECTED; break; case PRIVATE: jj_consume_token(PRIVATE); modifiers |= ModifierSet.PRIVATE; break; case FINAL: jj_consume_token(FINAL); modifiers |= ModifierSet.FINAL; break; case ABSTRACT: jj_consume_token(ABSTRACT); modifiers |= ModifierSet.ABSTRACT; break; case SYNCHRONIZED: jj_consume_token(SYNCHRONIZED); modifiers |= ModifierSet.SYNCHRONIZED; break; case NATIVE: jj_consume_token(NATIVE); modifiers |= ModifierSet.NATIVE; break; case TRANSIENT: jj_consume_token(TRANSIENT); modifiers |= ModifierSet.TRANSIENT; break; case VOLATILE: jj_consume_token(VOLATILE); modifiers |= ModifierSet.VOLATILE; break; case STRICTFP: jj_consume_token(STRICTFP); modifiers |= ModifierSet.STRICTFP; break; case AT: Annotation(); break; default: jj_consume_token(-1); throw new ParseException(); } } {if (true) return modifiers;} throw new Error("Missing return statement in function"); } /* * Declaration syntax follows. */ final public void TypeDeclaration() throws ParseException { int modifiers; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SEMICOLON: jj_consume_token(SEMICOLON); break; case ABSTRACT: case CLASS: case ENUM: case FINAL: case INTERFACE: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case AT: modifiers = Modifiers(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: case INTERFACE: ClassOrInterfaceDeclaration(modifiers); break; case ENUM: EnumDeclaration(modifiers); break; case AT: AnnotationTypeDeclaration(modifiers); break; default: jj_consume_token(-1); throw new ParseException(); } break; default: jj_consume_token(-1); throw new ParseException(); } } final public void ClassOrInterfaceDeclaration(int modifiers) throws ParseException { boolean isInterface = false; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: jj_consume_token(CLASS); break; case INTERFACE: jj_consume_token(INTERFACE); isInterface = true; break; default: jj_consume_token(-1); throw new ParseException(); } jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: ExtendsList(isInterface); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPLEMENTS: ImplementsList(isInterface); break; default: ; } ClassOrInterfaceBody(isInterface); } final public void ExtendsList(boolean isInterface) throws ParseException { boolean extendsMoreThanOne = false; jj_consume_token(EXTENDS); ClassOrInterfaceType(); label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_6; } jj_consume_token(COMMA); ClassOrInterfaceType(); extendsMoreThanOne = true; } if (extendsMoreThanOne && !isInterface) {if (true) throw new ParseException("A class cannot extend more than one other class");} } final public void ImplementsList(boolean isInterface) throws ParseException { jj_consume_token(IMPLEMENTS); ClassOrInterfaceType(); label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_7; } jj_consume_token(COMMA); ClassOrInterfaceType(); } if (isInterface) {if (true) throw new ParseException("An interface cannot implement other interfaces");} } final public void EnumDeclaration(int modifiers) throws ParseException { jj_consume_token(ENUM); jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IMPLEMENTS: ImplementsList(false); break; default: ; } EnumBody(); } final public void EnumBody() throws ParseException { jj_consume_token(LBRACE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: EnumConstant(); label_8: while (true) { if (jj_2_3(2)) { ; } else { break label_8; } jj_consume_token(COMMA); EnumConstant(); } break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SEMICOLON: jj_consume_token(SEMICOLON); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case LBRACE: case SEMICOLON: case AT: case LT: ; break; default: break label_9; } ClassOrInterfaceBodyDeclaration(false); } break; default: ; } jj_consume_token(RBRACE); } final public void EnumConstant() throws ParseException { Modifiers(); jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: Arguments(); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: ClassOrInterfaceBody(false); break; default: ; } } final public void TypeParameters() throws ParseException { jj_consume_token(LT); TypeParameter(); label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_10; } jj_consume_token(COMMA); TypeParameter(); } jj_consume_token(GT); } final public void TypeParameter() throws ParseException { jj_consume_token(IDENTIFIER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: TypeBound(); break; default: ; } } final public void TypeBound() throws ParseException { jj_consume_token(EXTENDS); ClassOrInterfaceType(); label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_AND: ; break; default: break label_11; } jj_consume_token(BIT_AND); ClassOrInterfaceType(); } } final public void ClassOrInterfaceBody(boolean isInterface) throws ParseException { jj_consume_token(LBRACE); label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case LBRACE: case SEMICOLON: case AT: case LT: ; break; default: break label_12; } ClassOrInterfaceBodyDeclaration(isInterface); } jj_consume_token(RBRACE); } final public void ClassOrInterfaceBodyDeclaration(boolean isInterface) throws ParseException { boolean isNestedInterface = false; int modifiers; if (jj_2_6(2)) { Initializer(); if (isInterface) {if (true) throw new ParseException("An interface cannot have initializers");} } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOID: case VOLATILE: case IDENTIFIER: case AT: case LT: modifiers = Modifiers(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: case INTERFACE: ClassOrInterfaceDeclaration(modifiers); break; case ENUM: EnumDeclaration(modifiers); break; default: if (jj_2_4(2147483647)) { ConstructorDeclaration(); } else if (jj_2_5(2147483647)) { FieldDeclaration(modifiers); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case VOID: case IDENTIFIER: case LT: MethodDeclaration(modifiers); break; default: jj_consume_token(-1); throw new ParseException(); } } } break; case SEMICOLON: jj_consume_token(SEMICOLON); break; default: jj_consume_token(-1); throw new ParseException(); } } } final public void FieldDeclaration(int modifiers) throws ParseException { Type(); VariableDeclarator(); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_13; } jj_consume_token(COMMA); VariableDeclarator(); } jj_consume_token(SEMICOLON); } final public void VariableDeclarator() throws ParseException { VariableDeclaratorId(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: jj_consume_token(ASSIGN); VariableInitializer(); break; default: ; } } final public void VariableDeclaratorId() throws ParseException { jj_consume_token(IDENTIFIER); label_14: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: break label_14; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } } final public void VariableInitializer() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: ArrayInitializer(); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: Expression(); break; default: jj_consume_token(-1); throw new ParseException(); } } final public void ArrayInitializer() throws ParseException { jj_consume_token(LBRACE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: VariableInitializer(); label_15: while (true) { if (jj_2_7(2)) { ; } else { break label_15; } jj_consume_token(COMMA); VariableInitializer(); } break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); break; default: ; } jj_consume_token(RBRACE); } final public void MethodDeclaration(int modifiers) throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: ; } ResultType(); MethodDeclarator(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THROWS: jj_consume_token(THROWS); NameList(); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: Block(); break; case SEMICOLON: jj_consume_token(SEMICOLON); break; default: jj_consume_token(-1); throw new ParseException(); } } final public void MethodDeclarator() throws ParseException { jj_consume_token(IDENTIFIER); FormalParameters(); label_16: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: break label_16; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } } final public void FormalParameters() throws ParseException { jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: FormalParameter(); label_17: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_17; } jj_consume_token(COMMA); FormalParameter(); } break; default: ; } jj_consume_token(RPAREN); } final public void FormalParameter() throws ParseException { Modifiers(); Type(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ELLIPSIS: jj_consume_token(ELLIPSIS); break; default: ; } VariableDeclaratorId(); } final public void ConstructorDeclaration() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeParameters(); break; default: ; } jj_consume_token(IDENTIFIER); FormalParameters(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THROWS: jj_consume_token(THROWS); NameList(); break; default: ; } jj_consume_token(LBRACE); if (jj_2_8(2147483647)) { ExplicitConstructorInvocation(); } else { ; } label_18: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CLASS: case CONTINUE: case DO: case DOUBLE: case FALSE: case FINAL: case FLOAT: case FOR: case IF: case INT: case INTERFACE: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case RETURN: case SHORT: case STATIC: case STRICTFP: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRANSIENT: case TRUE: case TRY: case VOID: case VOLATILE: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case AT: case INCR: case DECR: ; break; default: break label_18; } BlockStatement(); } jj_consume_token(RBRACE); } final public void ExplicitConstructorInvocation() throws ParseException { label_19: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: ; break; default: break label_19; } jj_consume_token(IDENTIFIER); jj_consume_token(DOT); } if (jj_2_9(2)) { jj_consume_token(THIS); jj_consume_token(DOT); } else { ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case THIS: jj_consume_token(THIS); break; case SUPER: jj_consume_token(SUPER); break; default: jj_consume_token(-1); throw new ParseException(); } Arguments(); jj_consume_token(SEMICOLON); } final public void Initializer() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); break; default: ; } Block(); } /* * Type, name and expression syntax follows. */ final public void Type() throws ParseException { if (jj_2_10(2)) { ReferenceType(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: PrimitiveType(); break; default: jj_consume_token(-1); throw new ParseException(); } } } final public void ReferenceType() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: PrimitiveType(); label_20: while (true) { jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); if (jj_2_11(2)) { ; } else { break label_20; } } break; case IDENTIFIER: ClassOrInterfaceType(); label_21: while (true) { if (jj_2_12(2)) { ; } else { break label_21; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } break; default: jj_consume_token(-1); throw new ParseException(); } } final public void ClassOrInterfaceType() throws ParseException { jj_consume_token(IDENTIFIER); if (jj_2_13(2)) { TypeArguments(); } else { ; } label_22: while (true) { if (jj_2_14(2)) { ; } else { break label_22; } jj_consume_token(DOT); jj_consume_token(IDENTIFIER); if (jj_2_15(2)) { TypeArguments(); } else { ; } } } final public void TypeArguments() throws ParseException { jj_consume_token(LT); TypeArgument(); label_23: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_23; } jj_consume_token(COMMA); TypeArgument(); } jj_consume_token(GT); } final public void TypeArgument() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: ReferenceType(); break; case HOOK: jj_consume_token(HOOK); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: case SUPER: WildcardBounds(); break; default: ; } break; default: jj_consume_token(-1); throw new ParseException(); } } final public void WildcardBounds() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXTENDS: jj_consume_token(EXTENDS); ReferenceType(); break; case SUPER: jj_consume_token(SUPER); ReferenceType(); break; default: jj_consume_token(-1); throw new ParseException(); } } final public void PrimitiveType() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: jj_consume_token(BOOLEAN); break; case CHAR: jj_consume_token(CHAR); break; case BYTE: jj_consume_token(BYTE); break; case SHORT: jj_consume_token(SHORT); break; case INT: jj_consume_token(INT); break; case LONG: jj_consume_token(LONG); break; case FLOAT: jj_consume_token(FLOAT); break; case DOUBLE: jj_consume_token(DOUBLE); break; default: jj_consume_token(-1); throw new ParseException(); } } final public void ResultType() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VOID: jj_consume_token(VOID); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: Type(); break; default: jj_consume_token(-1); throw new ParseException(); } } final public void Name() throws ParseException { jj_consume_token(IDENTIFIER); label_24: while (true) { if (jj_2_16(2)) { ; } else { break label_24; } jj_consume_token(DOT); jj_consume_token(IDENTIFIER); } } final public void NameList() throws ParseException { Name(); label_25: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_25; } jj_consume_token(COMMA); Name(); } } /* * Expression syntax follows. */ final public void Expression() throws ParseException { ConditionalExpression(); if (jj_2_17(2)) { AssignmentOperator(); Expression(); } else { ; } } final public void AssignmentOperator() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: jj_consume_token(ASSIGN); break; case STARASSIGN: jj_consume_token(STARASSIGN); break; case SLASHASSIGN: jj_consume_token(SLASHASSIGN); break; case REMASSIGN: jj_consume_token(REMASSIGN); break; case PLUSASSIGN: jj_consume_token(PLUSASSIGN); break; case MINUSASSIGN: jj_consume_token(MINUSASSIGN); break; case LSHIFTASSIGN: jj_consume_token(LSHIFTASSIGN); break; case RSIGNEDSHIFTASSIGN: jj_consume_token(RSIGNEDSHIFTASSIGN); break; case RUNSIGNEDSHIFTASSIGN: jj_consume_token(RUNSIGNEDSHIFTASSIGN); break; case ANDASSIGN: jj_consume_token(ANDASSIGN); break; case XORASSIGN: jj_consume_token(XORASSIGN); break; case ORASSIGN: jj_consume_token(ORASSIGN); break; default: jj_consume_token(-1); throw new ParseException(); } } final public void ConditionalExpression() throws ParseException { ConditionalOrExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case HOOK: jj_consume_token(HOOK); Expression(); jj_consume_token(COLON); Expression(); break; default: ; } } final public void ConditionalOrExpression() throws ParseException { ConditionalAndExpression(); label_26: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SC_OR: ; break; default: break label_26; } jj_consume_token(SC_OR); ConditionalAndExpression(); } } final public void ConditionalAndExpression() throws ParseException { InclusiveOrExpression(); label_27: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SC_AND: ; break; default: break label_27; } jj_consume_token(SC_AND); InclusiveOrExpression(); } } final public void InclusiveOrExpression() throws ParseException { ExclusiveOrExpression(); label_28: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_OR: ; break; default: break label_28; } jj_consume_token(BIT_OR); ExclusiveOrExpression(); } } final public void ExclusiveOrExpression() throws ParseException { AndExpression(); label_29: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case XOR: ; break; default: break label_29; } jj_consume_token(XOR); AndExpression(); } } final public void AndExpression() throws ParseException { EqualityExpression(); label_30: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_AND: ; break; default: break label_30; } jj_consume_token(BIT_AND); EqualityExpression(); } } final public void EqualityExpression() throws ParseException { InstanceOfExpression(); label_31: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ: case NE: ; break; default: break label_31; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ: jj_consume_token(EQ); break; case NE: jj_consume_token(NE); break; default: jj_consume_token(-1); throw new ParseException(); } InstanceOfExpression(); } } final public void InstanceOfExpression() throws ParseException { RelationalExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INSTANCEOF: jj_consume_token(INSTANCEOF); Type(); break; default: ; } } final public void RelationalExpression() throws ParseException { ShiftExpression(); label_32: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: case LE: case GE: case GT: ; break; default: break label_32; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: jj_consume_token(LT); break; case GT: jj_consume_token(GT); break; case LE: jj_consume_token(LE); break; case GE: jj_consume_token(GE); break; default: jj_consume_token(-1); throw new ParseException(); } ShiftExpression(); } } final public void ShiftExpression() throws ParseException { AdditiveExpression(); label_33: while (true) { if (jj_2_18(1)) { ; } else { break label_33; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LSHIFT: jj_consume_token(LSHIFT); break; default: if (jj_2_19(1)) { RSIGNEDSHIFT(); } else if (jj_2_20(1)) { RUNSIGNEDSHIFT(); } else { jj_consume_token(-1); throw new ParseException(); } } AdditiveExpression(); } } final public void AdditiveExpression() throws ParseException { MultiplicativeExpression(); label_34: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: ; break; default: break label_34; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: jj_consume_token(PLUS); break; case MINUS: jj_consume_token(MINUS); break; default: jj_consume_token(-1); throw new ParseException(); } MultiplicativeExpression(); } } final public void MultiplicativeExpression() throws ParseException { UnaryExpression(); label_35: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: case SLASH: case REM: ; break; default: break label_35; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: jj_consume_token(STAR); break; case SLASH: jj_consume_token(SLASH); break; case REM: jj_consume_token(REM); break; default: jj_consume_token(-1); throw new ParseException(); } UnaryExpression(); } } final public void UnaryExpression() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: jj_consume_token(PLUS); break; case MINUS: jj_consume_token(MINUS); break; default: jj_consume_token(-1); throw new ParseException(); } UnaryExpression(); break; case INCR: PreIncrementExpression(); break; case DECR: PreDecrementExpression(); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: UnaryExpressionNotPlusMinus(); break; default: jj_consume_token(-1); throw new ParseException(); } } final public void PreIncrementExpression() throws ParseException { jj_consume_token(INCR); PrimaryExpression(); } final public void PreDecrementExpression() throws ParseException { jj_consume_token(DECR); PrimaryExpression(); } final public void UnaryExpressionNotPlusMinus() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BANG: case TILDE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TILDE: jj_consume_token(TILDE); break; case BANG: jj_consume_token(BANG); break; default: jj_consume_token(-1); throw new ParseException(); } UnaryExpression(); break; default: if (jj_2_21(2147483647)) { CastExpression(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: PostfixExpression(); break; default: jj_consume_token(-1); throw new ParseException(); } } } } // This production is to determine lookahead only. The LOOKAHEAD specifications // below are not used, but they are there just to indicate that we know about // this. final public void CastLookahead() throws ParseException { if (jj_2_22(2)) { jj_consume_token(LPAREN); PrimitiveType(); } else if (jj_2_23(2147483647)) { jj_consume_token(LPAREN); Type(); jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: jj_consume_token(LPAREN); Type(); jj_consume_token(RPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TILDE: jj_consume_token(TILDE); break; case BANG: jj_consume_token(BANG); break; case LPAREN: jj_consume_token(LPAREN); break; case IDENTIFIER: jj_consume_token(IDENTIFIER); break; case THIS: jj_consume_token(THIS); break; case SUPER: jj_consume_token(SUPER); break; case NEW: jj_consume_token(NEW); break; case FALSE: case NULL: case TRUE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: Literal(); break; default: jj_consume_token(-1); throw new ParseException(); } break; default: jj_consume_token(-1); throw new ParseException(); } } } final public void PostfixExpression() throws ParseException { PrimaryExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: case DECR: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: jj_consume_token(INCR); break; case DECR: jj_consume_token(DECR); break; default: jj_consume_token(-1); throw new ParseException(); } break; default: ; } } final public void CastExpression() throws ParseException { if (jj_2_24(2147483647)) { jj_consume_token(LPAREN); Type(); jj_consume_token(RPAREN); UnaryExpression(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: jj_consume_token(LPAREN); Type(); jj_consume_token(RPAREN); UnaryExpressionNotPlusMinus(); break; default: jj_consume_token(-1); throw new ParseException(); } } } final public void PrimaryExpression() throws ParseException { PrimaryPrefix(); label_36: while (true) { if (jj_2_25(2)) { ; } else { break label_36; } PrimarySuffix(); } } final public void MemberSelector() throws ParseException { jj_consume_token(DOT); TypeArguments(); jj_consume_token(IDENTIFIER); } final public void PrimaryPrefix() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FALSE: case NULL: case TRUE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: Literal(); break; default: if (jj_2_26(2147483647)) { label_37: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: ; break; default: break label_37; } jj_consume_token(IDENTIFIER); jj_consume_token(DOT); } jj_consume_token(THIS); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SUPER: jj_consume_token(SUPER); jj_consume_token(DOT); jj_consume_token(IDENTIFIER); break; case LPAREN: jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); break; case NEW: AllocationExpression(); break; default: if (jj_2_27(2147483647)) { ResultType(); jj_consume_token(DOT); jj_consume_token(CLASS); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: Name(); break; default: jj_consume_token(-1); throw new ParseException(); } } } } } } final public void PrimarySuffix() throws ParseException { if (jj_2_28(2147483647)) { jj_consume_token(DOT); jj_consume_token(SUPER); } else if (jj_2_29(2147483647)) { jj_consume_token(DOT); jj_consume_token(THIS); } else if (jj_2_30(2)) { jj_consume_token(DOT); AllocationExpression(); } else if (jj_2_31(3)) { MemberSelector(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: jj_consume_token(LBRACKET); Expression(); jj_consume_token(RBRACKET); break; case DOT: jj_consume_token(DOT); jj_consume_token(IDENTIFIER); break; case LPAREN: Arguments(); break; default: jj_consume_token(-1); throw new ParseException(); } } } final public void Literal() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_LITERAL: jj_consume_token(INTEGER_LITERAL); break; case FLOATING_POINT_LITERAL: jj_consume_token(FLOATING_POINT_LITERAL); break; case CHARACTER_LITERAL: jj_consume_token(CHARACTER_LITERAL); break; case STRING_LITERAL: jj_consume_token(STRING_LITERAL); break; case FALSE: case TRUE: BooleanLiteral(); break; case NULL: NullLiteral(); break; default: jj_consume_token(-1); throw new ParseException(); } } final public void BooleanLiteral() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TRUE: jj_consume_token(TRUE); break; case FALSE: jj_consume_token(FALSE); break; default: jj_consume_token(-1); throw new ParseException(); } } final public void NullLiteral() throws ParseException { jj_consume_token(NULL); } final public void Arguments() throws ParseException { jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: ArgumentList(); break; default: ; } jj_consume_token(RPAREN); } final public void ArgumentList() throws ParseException { Expression(); label_38: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_38; } jj_consume_token(COMMA); Expression(); } } final public void AllocationExpression() throws ParseException { if (jj_2_32(2)) { jj_consume_token(NEW); PrimitiveType(); ArrayDimsAndInits(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NEW: jj_consume_token(NEW); ClassOrInterfaceType(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LT: TypeArguments(); break; default: ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ArrayDimsAndInits(); break; case LPAREN: Arguments(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: ClassOrInterfaceBody(false); break; default: ; } break; default: jj_consume_token(-1); throw new ParseException(); } break; default: jj_consume_token(-1); throw new ParseException(); } } } /* * The third LOOKAHEAD specification below is to parse to PrimarySuffix * if there is an expression between the "[...]". */ final public void ArrayDimsAndInits() throws ParseException { if (jj_2_35(2)) { label_39: while (true) { jj_consume_token(LBRACKET); Expression(); jj_consume_token(RBRACKET); if (jj_2_33(2)) { ; } else { break label_39; } } label_40: while (true) { if (jj_2_34(2)) { ; } else { break label_40; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: label_41: while (true) { jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: break label_41; } } ArrayInitializer(); break; default: jj_consume_token(-1); throw new ParseException(); } } } /* * Statement syntax follows. */ final public void Statement() throws ParseException { if (jj_2_36(2)) { LabeledStatement(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: AssertStatement(); break; case LBRACE: Block(); break; case SEMICOLON: EmptyStatement(); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case INCR: case DECR: StatementExpression(); jj_consume_token(SEMICOLON); break; case SWITCH: SwitchStatement(); break; case IF: IfStatement(); break; case WHILE: WhileStatement(); break; case DO: DoStatement(); break; case FOR: ForStatement(); break; case BREAK: BreakStatement(); break; case CONTINUE: ContinueStatement(); break; case RETURN: ReturnStatement(); break; case THROW: ThrowStatement(); break; case SYNCHRONIZED: SynchronizedStatement(); break; case TRY: TryStatement(); break; default: jj_consume_token(-1); throw new ParseException(); } } } final public void AssertStatement() throws ParseException { jj_consume_token(ASSERT); Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COLON: jj_consume_token(COLON); Expression(); break; default: ; } jj_consume_token(SEMICOLON); } final public void LabeledStatement() throws ParseException { jj_consume_token(IDENTIFIER); jj_consume_token(COLON); Statement(); } final public void Block() throws ParseException { jj_consume_token(LBRACE); label_42: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CLASS: case CONTINUE: case DO: case DOUBLE: case FALSE: case FINAL: case FLOAT: case FOR: case IF: case INT: case INTERFACE: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case RETURN: case SHORT: case STATIC: case STRICTFP: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRANSIENT: case TRUE: case TRY: case VOID: case VOLATILE: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case AT: case INCR: case DECR: ; break; default: break label_42; } BlockStatement(); } jj_consume_token(RBRACE); } final public void BlockStatement() throws ParseException { if (jj_2_37(2147483647)) { LocalVariableDeclaration(); jj_consume_token(SEMICOLON); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CONTINUE: case DO: case DOUBLE: case FALSE: case FLOAT: case FOR: case IF: case INT: case LONG: case NEW: case NULL: case RETURN: case SHORT: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRUE: case TRY: case VOID: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case INCR: case DECR: Statement(); break; case CLASS: case INTERFACE: ClassOrInterfaceDeclaration(0); break; default: jj_consume_token(-1); throw new ParseException(); } } } final public void LocalVariableDeclaration() throws ParseException { Modifiers(); Type(); VariableDeclarator(); label_43: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_43; } jj_consume_token(COMMA); VariableDeclarator(); } } final public void EmptyStatement() throws ParseException { jj_consume_token(SEMICOLON); } final public void StatementExpression() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: PreIncrementExpression(); break; case DECR: PreDecrementExpression(); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: PrimaryExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASSIGN: case INCR: case DECR: case PLUSASSIGN: case MINUSASSIGN: case STARASSIGN: case SLASHASSIGN: case ANDASSIGN: case ORASSIGN: case XORASSIGN: case REMASSIGN: case LSHIFTASSIGN: case RSIGNEDSHIFTASSIGN: case RUNSIGNEDSHIFTASSIGN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INCR: jj_consume_token(INCR); break; case DECR: jj_consume_token(DECR); break; case ASSIGN: case PLUSASSIGN: case MINUSASSIGN: case STARASSIGN: case SLASHASSIGN: case ANDASSIGN: case ORASSIGN: case XORASSIGN: case REMASSIGN: case LSHIFTASSIGN: case RSIGNEDSHIFTASSIGN: case RUNSIGNEDSHIFTASSIGN: AssignmentOperator(); Expression(); break; default: jj_consume_token(-1); throw new ParseException(); } break; default: ; } break; default: jj_consume_token(-1); throw new ParseException(); } } final public void SwitchStatement() throws ParseException { jj_consume_token(SWITCH); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); jj_consume_token(LBRACE); label_44: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CASE: case _DEFAULT: ; break; default: break label_44; } SwitchLabel(); label_45: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case ASSERT: case BOOLEAN: case BREAK: case BYTE: case CHAR: case CLASS: case CONTINUE: case DO: case DOUBLE: case FALSE: case FINAL: case FLOAT: case FOR: case IF: case INT: case INTERFACE: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case RETURN: case SHORT: case STATIC: case STRICTFP: case SUPER: case SWITCH: case SYNCHRONIZED: case THIS: case THROW: case TRANSIENT: case TRUE: case TRY: case VOID: case VOLATILE: case WHILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case LBRACE: case SEMICOLON: case AT: case INCR: case DECR: ; break; default: break label_45; } BlockStatement(); } } jj_consume_token(RBRACE); } final public void SwitchLabel() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CASE: jj_consume_token(CASE); Expression(); jj_consume_token(COLON); break; case _DEFAULT: jj_consume_token(_DEFAULT); jj_consume_token(COLON); break; default: jj_consume_token(-1); throw new ParseException(); } } final public void IfStatement() throws ParseException { jj_consume_token(IF); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); Statement(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ELSE: jj_consume_token(ELSE); Statement(); break; default: ; } } final public void WhileStatement() throws ParseException { jj_consume_token(WHILE); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); Statement(); } final public void DoStatement() throws ParseException { jj_consume_token(DO); Statement(); jj_consume_token(WHILE); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); jj_consume_token(SEMICOLON); } final public void ForStatement() throws ParseException { jj_consume_token(FOR); jj_consume_token(LPAREN); if (jj_2_38(2147483647)) { Modifiers(); Type(); jj_consume_token(IDENTIFIER); jj_consume_token(COLON); Expression(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SUPER: case SYNCHRONIZED: case THIS: case TRANSIENT: case TRUE: case VOID: case VOLATILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case SEMICOLON: case AT: case INCR: case DECR: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FINAL: case FLOAT: case INT: case LONG: case NATIVE: case NEW: case NULL: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SUPER: case SYNCHRONIZED: case THIS: case TRANSIENT: case TRUE: case VOID: case VOLATILE: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case AT: case INCR: case DECR: ForInit(); break; default: ; } jj_consume_token(SEMICOLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: Expression(); break; default: ; } jj_consume_token(SEMICOLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case INCR: case DECR: ForUpdate(); break; default: ; } break; default: jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RPAREN); Statement(); } final public void ForInit() throws ParseException { if (jj_2_39(2147483647)) { LocalVariableDeclaration(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case INCR: case DECR: StatementExpressionList(); break; default: jj_consume_token(-1); throw new ParseException(); } } } final public void StatementExpressionList() throws ParseException { StatementExpression(); label_46: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_46; } jj_consume_token(COMMA); StatementExpression(); } } final public void ForUpdate() throws ParseException { StatementExpressionList(); } final public void BreakStatement() throws ParseException { jj_consume_token(BREAK); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: jj_consume_token(IDENTIFIER); break; default: ; } jj_consume_token(SEMICOLON); } final public void ContinueStatement() throws ParseException { jj_consume_token(CONTINUE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: jj_consume_token(IDENTIFIER); break; default: ; } jj_consume_token(SEMICOLON); } final public void ReturnStatement() throws ParseException { jj_consume_token(RETURN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: Expression(); break; default: ; } jj_consume_token(SEMICOLON); } final public void ThrowStatement() throws ParseException { jj_consume_token(THROW); Expression(); jj_consume_token(SEMICOLON); } final public void SynchronizedStatement() throws ParseException { jj_consume_token(SYNCHRONIZED); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); Block(); } final public void TryStatement() throws ParseException { jj_consume_token(TRY); Block(); label_47: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CATCH: ; break; default: break label_47; } jj_consume_token(CATCH); jj_consume_token(LPAREN); FormalParameter(); jj_consume_token(RPAREN); Block(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FINALLY: jj_consume_token(FINALLY); Block(); break; default: ; } } /* We use productions to match >>>, >> and > so that we can keep the * type declaration syntax with generics clean */ final public void RUNSIGNEDSHIFT() throws ParseException { if (getToken(1).kind == GT && ((Token.GTToken)getToken(1)).realKind == RUNSIGNEDSHIFT) { } else { jj_consume_token(-1); throw new ParseException(); } jj_consume_token(GT); jj_consume_token(GT); jj_consume_token(GT); } final public void RSIGNEDSHIFT() throws ParseException { if (getToken(1).kind == GT && ((Token.GTToken)getToken(1)).realKind == RSIGNEDSHIFT) { } else { jj_consume_token(-1); throw new ParseException(); } jj_consume_token(GT); jj_consume_token(GT); } /* Annotation syntax follows. */ final public void Annotation() throws ParseException { if (jj_2_40(2147483647)) { NormalAnnotation(); } else if (jj_2_41(2147483647)) { SingleMemberAnnotation(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: MarkerAnnotation(); break; default: jj_consume_token(-1); throw new ParseException(); } } } final public void NormalAnnotation() throws ParseException { jj_consume_token(AT); Name(); jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: MemberValuePairs(); break; default: ; } jj_consume_token(RPAREN); } final public void MarkerAnnotation() throws ParseException { jj_consume_token(AT); Name(); } final public void SingleMemberAnnotation() throws ParseException { jj_consume_token(AT); Name(); jj_consume_token(LPAREN); MemberValue(); jj_consume_token(RPAREN); } final public void MemberValuePairs() throws ParseException { MemberValuePair(); label_48: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: break label_48; } jj_consume_token(COMMA); MemberValuePair(); } } final public void MemberValuePair() throws ParseException { jj_consume_token(IDENTIFIER); jj_consume_token(ASSIGN); MemberValue(); } final public void MemberValue() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AT: Annotation(); break; case LBRACE: MemberValueArrayInitializer(); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FALSE: case FLOAT: case INT: case LONG: case NEW: case NULL: case SHORT: case SUPER: case THIS: case TRUE: case VOID: case INTEGER_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: case IDENTIFIER: case LPAREN: case BANG: case TILDE: case INCR: case DECR: case PLUS: case MINUS: ConditionalExpression(); break; default: jj_consume_token(-1); throw new ParseException(); } } final public void MemberValueArrayInitializer() throws ParseException { jj_consume_token(LBRACE); MemberValue(); label_49: while (true) { if (jj_2_42(2)) { ; } else { break label_49; } jj_consume_token(COMMA); MemberValue(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); break; default: ; } jj_consume_token(RBRACE); } /* Annotation Types. */ final public void AnnotationTypeDeclaration(int modifiers) throws ParseException { jj_consume_token(AT); jj_consume_token(INTERFACE); jj_consume_token(IDENTIFIER); AnnotationTypeBody(); } final public void AnnotationTypeBody() throws ParseException { jj_consume_token(LBRACE); label_50: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case SEMICOLON: case AT: ; break; default: break label_50; } AnnotationTypeMemberDeclaration(); } jj_consume_token(RBRACE); } final public void AnnotationTypeMemberDeclaration() throws ParseException { int modifiers; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case BOOLEAN: case BYTE: case CHAR: case CLASS: case DOUBLE: case ENUM: case FINAL: case FLOAT: case INT: case INTERFACE: case LONG: case NATIVE: case PRIVATE: case PROTECTED: case PUBLIC: case SHORT: case STATIC: case STRICTFP: case SYNCHRONIZED: case TRANSIENT: case VOLATILE: case IDENTIFIER: case AT: modifiers = Modifiers(); if (jj_2_43(2147483647)) { Type(); jj_consume_token(IDENTIFIER); jj_consume_token(LPAREN); jj_consume_token(RPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case _DEFAULT: DefaultValue(); break; default: ; } jj_consume_token(SEMICOLON); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: case INTERFACE: ClassOrInterfaceDeclaration(modifiers); break; case ENUM: EnumDeclaration(modifiers); break; case AT: AnnotationTypeDeclaration(modifiers); break; case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: case IDENTIFIER: FieldDeclaration(modifiers); break; default: jj_consume_token(-1); throw new ParseException(); } } break; case SEMICOLON: jj_consume_token(SEMICOLON); break; default: jj_consume_token(-1); throw new ParseException(); } } final public void DefaultValue() throws ParseException { jj_consume_token(_DEFAULT); MemberValue(); } private boolean jj_2_1(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_1(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_2(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_2(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_3(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_3(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_4(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_4(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_5(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_5(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_6(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_6(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_7(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_7(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_8(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_8(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_9(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_9(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_10(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_10(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_11(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_11(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_12(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_12(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_13(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_13(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_14(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_14(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_15(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_15(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_16(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_16(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_17(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_17(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_18(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_18(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_19(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_19(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_20(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_20(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_21(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_21(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_22(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_22(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_23(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_23(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_24(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_24(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_25(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_25(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_26(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_26(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_27(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_27(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_28(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_28(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_29(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_29(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_30(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_30(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_31(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_31(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_32(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_32(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_33(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_33(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_34(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_34(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_35(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_35(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_36(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_36(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_37(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_37(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_38(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_38(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_39(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_39(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_40(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_40(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_41(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_41(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_42(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_42(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_2_43(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_43(); } catch(LookaheadSuccess ls) { return true; } } private boolean jj_3R_124() { if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3_13()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3_14()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_99() { if (jj_3R_124()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_12()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_98() { if (jj_3R_78()) return true; Token xsp; if (jj_3_11()) return true; while (true) { xsp = jj_scanpos; if (jj_3_11()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_71() { Token xsp; xsp = jj_scanpos; if (jj_3R_98()) { jj_scanpos = xsp; if (jj_3R_99()) return true; } return false; } private boolean jj_3_9() { if (jj_scan_token(THIS)) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_263() { if (jj_scan_token(THROWS)) return true; if (jj_3R_277()) return true; return false; } private boolean jj_3R_91() { if (jj_3R_78()) return true; return false; } private boolean jj_3_10() { if (jj_3R_71()) return true; return false; } private boolean jj_3R_66() { Token xsp; xsp = jj_scanpos; if (jj_3_10()) { jj_scanpos = xsp; if (jj_3R_91()) return true; } return false; } private boolean jj_3R_68() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(51)) jj_scanpos = xsp; if (jj_3R_92()) return true; return false; } private boolean jj_3_8() { if (jj_3R_70()) return true; return false; } private boolean jj_3R_96() { if (jj_3R_72()) return true; return false; } private boolean jj_3R_280() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_95() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_285() { if (jj_scan_token(COMMA)) return true; if (jj_3R_284()) return true; return false; } private boolean jj_3R_70() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_95()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3_9()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_96()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(56)) { jj_scanpos = xsp; if (jj_scan_token(53)) return true; } if (jj_3R_97()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_265() { if (jj_3R_134()) return true; return false; } private boolean jj_3R_264() { if (jj_3R_70()) return true; return false; } private boolean jj_3R_261() { if (jj_3R_90()) return true; return false; } private boolean jj_3R_253() { Token xsp; xsp = jj_scanpos; if (jj_3R_261()) jj_scanpos = xsp; if (jj_scan_token(IDENTIFIER)) return true; if (jj_3R_262()) return true; xsp = jj_scanpos; if (jj_3R_263()) jj_scanpos = xsp; if (jj_scan_token(LBRACE)) return true; xsp = jj_scanpos; if (jj_3R_264()) jj_scanpos = xsp; while (true) { xsp = jj_scanpos; if (jj_3R_265()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_270() { if (jj_scan_token(THROWS)) return true; if (jj_3R_277()) return true; return false; } private boolean jj_3_7() { if (jj_scan_token(COMMA)) return true; if (jj_3R_69()) return true; return false; } private boolean jj_3R_284() { if (jj_3R_85()) return true; if (jj_3R_66()) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(123)) jj_scanpos = xsp; if (jj_3R_278()) return true; return false; } private boolean jj_3R_276() { if (jj_3R_284()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_285()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_262() { if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_276()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_269() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_3R_262()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_280()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3_43() { if (jj_3R_66()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_271() { if (jj_3R_92()) return true; return false; } private boolean jj_3R_268() { if (jj_3R_90()) return true; return false; } private boolean jj_3R_255() { Token xsp; xsp = jj_scanpos; if (jj_3R_268()) jj_scanpos = xsp; if (jj_3R_81()) return true; if (jj_3R_269()) return true; xsp = jj_scanpos; if (jj_3R_270()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_271()) { jj_scanpos = xsp; if (jj_scan_token(85)) return true; } return false; } private boolean jj_3R_243() { if (jj_3R_69()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_7()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_279() { if (jj_scan_token(ASSIGN)) return true; if (jj_3R_69()) return true; return false; } private boolean jj_3R_267() { if (jj_scan_token(COMMA)) return true; if (jj_3R_266()) return true; return false; } private boolean jj_3R_287() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_122() { if (jj_scan_token(LBRACE)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_243()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(86)) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3_42() { if (jj_scan_token(COMMA)) return true; if (jj_3R_88()) return true; return false; } private boolean jj_3R_67() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_94() { if (jj_3R_74()) return true; return false; } private boolean jj_3R_93() { if (jj_3R_122()) return true; return false; } private boolean jj_3R_69() { Token xsp; xsp = jj_scanpos; if (jj_3R_93()) { jj_scanpos = xsp; if (jj_3R_94()) return true; } return false; } private boolean jj_3R_278() { if (jj_scan_token(IDENTIFIER)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_287()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_266() { if (jj_3R_278()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_279()) jj_scanpos = xsp; return false; } private boolean jj_3R_129() { if (jj_scan_token(LBRACE)) return true; if (jj_3R_88()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_42()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_scan_token(86)) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_156() { if (jj_scan_token(COMMA)) return true; if (jj_3R_155()) return true; return false; } private boolean jj_3_5() { if (jj_3R_66()) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_67()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_scan_token(86)) { jj_scanpos = xsp; if (jj_scan_token(89)) { jj_scanpos = xsp; if (jj_scan_token(85)) return true; } } return false; } private boolean jj_3R_65() { if (jj_3R_90()) return true; return false; } private boolean jj_3R_115() { if (jj_3R_101()) return true; return false; } private boolean jj_3R_254() { if (jj_3R_66()) return true; if (jj_3R_266()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_267()) { jj_scanpos = xsp; break; } } if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3_4() { Token xsp; xsp = jj_scanpos; if (jj_3R_65()) jj_scanpos = xsp; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_114() { if (jj_3R_129()) return true; return false; } private boolean jj_3R_113() { if (jj_3R_89()) return true; return false; } private boolean jj_3R_88() { Token xsp; xsp = jj_scanpos; if (jj_3R_113()) { jj_scanpos = xsp; if (jj_3R_114()) { jj_scanpos = xsp; if (jj_3R_115()) return true; } } return false; } private boolean jj_3R_251() { if (jj_3R_255()) return true; return false; } private boolean jj_3R_155() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(ASSIGN)) return true; if (jj_3R_88()) return true; return false; } private boolean jj_3R_148() { if (jj_scan_token(BIT_AND)) return true; if (jj_3R_124()) return true; return false; } private boolean jj_3R_250() { if (jj_3R_254()) return true; return false; } private boolean jj_3R_249() { if (jj_3R_253()) return true; return false; } private boolean jj_3R_248() { if (jj_3R_252()) return true; return false; } private boolean jj_3R_147() { if (jj_3R_155()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_156()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_247() { if (jj_3R_151()) return true; return false; } private boolean jj_3R_139() { if (jj_3R_147()) return true; return false; } private boolean jj_3R_87() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(ASSIGN)) return true; return false; } private boolean jj_3R_289() { if (jj_3R_242()) return true; return false; } private boolean jj_3R_131() { if (jj_scan_token(AT)) return true; if (jj_3R_86()) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_88()) return true; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_246() { if (jj_3R_85()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_247()) { jj_scanpos = xsp; if (jj_3R_248()) { jj_scanpos = xsp; if (jj_3R_249()) { jj_scanpos = xsp; if (jj_3R_250()) { jj_scanpos = xsp; if (jj_3R_251()) return true; } } } } return false; } private boolean jj_3R_132() { if (jj_scan_token(AT)) return true; if (jj_3R_86()) return true; return false; } private boolean jj_3_6() { if (jj_3R_68()) return true; return false; } private boolean jj_3R_245() { Token xsp; xsp = jj_scanpos; if (jj_3_6()) { jj_scanpos = xsp; if (jj_3R_246()) { jj_scanpos = xsp; if (jj_scan_token(85)) return true; } } return false; } private boolean jj_3_41() { if (jj_scan_token(AT)) return true; if (jj_3R_86()) return true; if (jj_scan_token(LPAREN)) return true; return false; } private boolean jj_3R_244() { if (jj_3R_245()) return true; return false; } private boolean jj_3R_130() { if (jj_scan_token(AT)) return true; if (jj_3R_86()) return true; if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_139()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_120() { if (jj_scan_token(COMMA)) return true; if (jj_3R_119()) return true; return false; } private boolean jj_3_40() { if (jj_scan_token(AT)) return true; if (jj_3R_86()) return true; if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_87()) { jj_scanpos = xsp; if (jj_scan_token(80)) return true; } return false; } private boolean jj_3R_133() { if (jj_3R_140()) return true; return false; } private boolean jj_3R_288() { if (jj_3R_97()) return true; return false; } private boolean jj_3R_242() { if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_244()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_118() { if (jj_3R_132()) return true; return false; } private boolean jj_3R_117() { if (jj_3R_131()) return true; return false; } private boolean jj_3R_140() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_124()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_148()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_116() { if (jj_3R_130()) return true; return false; } private boolean jj_3R_102() { return false; } private boolean jj_3R_89() { Token xsp; xsp = jj_scanpos; if (jj_3R_116()) { jj_scanpos = xsp; if (jj_3R_117()) { jj_scanpos = xsp; if (jj_3R_118()) return true; } } return false; } private boolean jj_3R_119() { if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_133()) jj_scanpos = xsp; return false; } private boolean jj_3_3() { if (jj_scan_token(COMMA)) return true; if (jj_3R_64()) return true; return false; } private boolean jj_3R_103() { return false; } private boolean jj_3R_90() { if (jj_scan_token(LT)) return true; if (jj_3R_119()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_120()) { jj_scanpos = xsp; break; } } if (jj_scan_token(GT)) return true; return false; } private boolean jj_3R_75() { jj_lookingAhead = true; jj_semLA = getToken(1).kind == GT && ((Token.GTToken)getToken(1)).realKind == RSIGNEDSHIFT; jj_lookingAhead = false; if (!jj_semLA || jj_3R_102()) return true; if (jj_scan_token(GT)) return true; if (jj_scan_token(GT)) return true; return false; } private boolean jj_3R_283() { if (jj_3R_245()) return true; return false; } private boolean jj_3R_64() { if (jj_3R_85()) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_288()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_289()) jj_scanpos = xsp; return false; } private boolean jj_3R_76() { jj_lookingAhead = true; jj_semLA = getToken(1).kind == GT && ((Token.GTToken)getToken(1)).realKind == RUNSIGNEDSHIFT; jj_lookingAhead = false; if (!jj_semLA || jj_3R_103()) return true; if (jj_scan_token(GT)) return true; if (jj_scan_token(GT)) return true; if (jj_scan_token(GT)) return true; return false; } private boolean jj_3R_275() { if (jj_scan_token(SEMICOLON)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_283()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_274() { if (jj_3R_64()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_3()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_260() { if (jj_scan_token(LBRACE)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_274()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(86)) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_275()) jj_scanpos = xsp; if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_298() { if (jj_scan_token(FINALLY)) return true; if (jj_3R_92()) return true; return false; } private boolean jj_3R_297() { if (jj_scan_token(CATCH)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_284()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_92()) return true; return false; } private boolean jj_3R_259() { if (jj_3R_273()) return true; return false; } private boolean jj_3R_187() { if (jj_scan_token(TRY)) return true; if (jj_3R_92()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_297()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; if (jj_3R_298()) jj_scanpos = xsp; return false; } private boolean jj_3R_252() { if (jj_scan_token(ENUM)) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_259()) jj_scanpos = xsp; if (jj_3R_260()) return true; return false; } private boolean jj_3R_282() { if (jj_scan_token(COMMA)) return true; if (jj_3R_124()) return true; return false; } private boolean jj_3R_186() { if (jj_scan_token(SYNCHRONIZED)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_92()) return true; return false; } private boolean jj_3R_296() { if (jj_3R_74()) return true; return false; } private boolean jj_3R_273() { if (jj_scan_token(IMPLEMENTS)) return true; if (jj_3R_124()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_282()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_185() { if (jj_scan_token(THROW)) return true; if (jj_3R_74()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_304() { if (jj_3R_309()) return true; return false; } private boolean jj_3R_281() { if (jj_scan_token(COMMA)) return true; if (jj_3R_124()) return true; return false; } private boolean jj_3R_313() { if (jj_scan_token(COMMA)) return true; if (jj_3R_176()) return true; return false; } private boolean jj_3R_184() { if (jj_scan_token(RETURN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_296()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_272() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_124()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_281()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_171() { if (jj_scan_token(INTERFACE)) return true; return false; } private boolean jj_3R_183() { if (jj_scan_token(CONTINUE)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(76)) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_258() { if (jj_3R_273()) return true; return false; } private boolean jj_3R_257() { if (jj_3R_272()) return true; return false; } private boolean jj_3R_256() { if (jj_3R_90()) return true; return false; } private boolean jj_3R_182() { if (jj_scan_token(BREAK)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(76)) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_151() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(20)) { jj_scanpos = xsp; if (jj_3R_171()) return true; } if (jj_scan_token(IDENTIFIER)) return true; xsp = jj_scanpos; if (jj_3R_256()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_257()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_258()) jj_scanpos = xsp; if (jj_3R_242()) return true; return false; } private boolean jj_3R_309() { if (jj_3R_312()) return true; return false; } private boolean jj_3R_303() { if (jj_3R_74()) return true; return false; } private boolean jj_3_39() { if (jj_3R_85()) return true; if (jj_3R_66()) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3R_312() { if (jj_3R_176()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_313()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_293() { if (jj_scan_token(ELSE)) return true; if (jj_3R_150()) return true; return false; } private boolean jj_3R_311() { if (jj_3R_312()) return true; return false; } private boolean jj_3_38() { if (jj_3R_85()) return true; if (jj_3R_66()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(COLON)) return true; return false; } private boolean jj_3R_310() { if (jj_3R_149()) return true; return false; } private boolean jj_3R_308() { Token xsp; xsp = jj_scanpos; if (jj_3R_310()) { jj_scanpos = xsp; if (jj_3R_311()) return true; } return false; } private boolean jj_3R_302() { if (jj_3R_308()) return true; return false; } private boolean jj_3R_295() { Token xsp; xsp = jj_scanpos; if (jj_3R_302()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; xsp = jj_scanpos; if (jj_3R_303()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; xsp = jj_scanpos; if (jj_3R_304()) jj_scanpos = xsp; return false; } private boolean jj_3R_294() { if (jj_3R_85()) return true; if (jj_3R_66()) return true; if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(COLON)) return true; if (jj_3R_74()) return true; return false; } private boolean jj_3R_181() { if (jj_scan_token(FOR)) return true; if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_294()) { jj_scanpos = xsp; if (jj_3R_295()) return true; } if (jj_scan_token(RPAREN)) return true; if (jj_3R_150()) return true; return false; } private boolean jj_3R_63() { if (jj_3R_89()) return true; return false; } private boolean jj_3R_62() { if (jj_scan_token(STRICTFP)) return true; return false; } private boolean jj_3R_61() { if (jj_scan_token(VOLATILE)) return true; return false; } private boolean jj_3R_180() { if (jj_scan_token(DO)) return true; if (jj_3R_150()) return true; if (jj_scan_token(WHILE)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_60() { if (jj_scan_token(TRANSIENT)) return true; return false; } private boolean jj_3R_59() { if (jj_scan_token(NATIVE)) return true; return false; } private boolean jj_3R_58() { if (jj_scan_token(SYNCHRONIZED)) return true; return false; } private boolean jj_3R_179() { if (jj_scan_token(WHILE)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_150()) return true; return false; } private boolean jj_3R_57() { if (jj_scan_token(ABSTRACT)) return true; return false; } private boolean jj_3R_56() { if (jj_scan_token(FINAL)) return true; return false; } private boolean jj_3R_301() { if (jj_3R_134()) return true; return false; } private boolean jj_3R_55() { if (jj_scan_token(PRIVATE)) return true; return false; } private boolean jj_3R_178() { if (jj_scan_token(IF)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_150()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_293()) jj_scanpos = xsp; return false; } private boolean jj_3R_54() { if (jj_scan_token(PROTECTED)) return true; return false; } private boolean jj_3R_53() { if (jj_scan_token(STATIC)) return true; return false; } private boolean jj_3R_52() { if (jj_scan_token(PUBLIC)) return true; return false; } private boolean jj_3_2() { Token xsp; xsp = jj_scanpos; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) { jj_scanpos = xsp; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) { jj_scanpos = xsp; if (jj_3R_59()) { jj_scanpos = xsp; if (jj_3R_60()) { jj_scanpos = xsp; if (jj_3R_61()) { jj_scanpos = xsp; if (jj_3R_62()) { jj_scanpos = xsp; if (jj_3R_63()) return true; } } } } } } } } } } } return false; } private boolean jj_3R_307() { if (jj_scan_token(_DEFAULT)) return true; if (jj_scan_token(COLON)) return true; return false; } private boolean jj_3R_85() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_2()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_306() { if (jj_scan_token(CASE)) return true; if (jj_3R_74()) return true; if (jj_scan_token(COLON)) return true; return false; } private boolean jj_3R_300() { Token xsp; xsp = jj_scanpos; if (jj_3R_306()) { jj_scanpos = xsp; if (jj_3R_307()) return true; } return false; } private boolean jj_3R_290() { if (jj_scan_token(COMMA)) return true; if (jj_3R_266()) return true; return false; } private boolean jj_3R_292() { if (jj_3R_300()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_301()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_177() { if (jj_scan_token(SWITCH)) return true; if (jj_scan_token(LPAREN)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_292()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_305() { if (jj_3R_73()) return true; if (jj_3R_74()) return true; return false; } private boolean jj_3R_299() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(101)) { jj_scanpos = xsp; if (jj_scan_token(102)) { jj_scanpos = xsp; if (jj_3R_305()) return true; } } return false; } private boolean jj_3R_194() { if (jj_3R_199()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_299()) jj_scanpos = xsp; return false; } private boolean jj_3R_51() { if (jj_3R_89()) return true; return false; } private boolean jj_3R_193() { if (jj_3R_198()) return true; return false; } private boolean jj_3_1() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_51()) { jj_scanpos = xsp; break; } } if (jj_scan_token(PACKAGE)) return true; return false; } private boolean jj_3R_176() { Token xsp; xsp = jj_scanpos; if (jj_3R_192()) { jj_scanpos = xsp; if (jj_3R_193()) { jj_scanpos = xsp; if (jj_3R_194()) return true; } } return false; } private boolean jj_3R_192() { if (jj_3R_197()) return true; return false; } private boolean jj_3_37() { if (jj_3R_85()) return true; if (jj_3R_66()) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3R_149() { if (jj_3R_85()) return true; if (jj_3R_66()) return true; if (jj_3R_266()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_290()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_291() { if (jj_scan_token(COLON)) return true; if (jj_3R_74()) return true; return false; } private boolean jj_3R_143() { if (jj_3R_151()) return true; return false; } private boolean jj_3R_142() { if (jj_3R_150()) return true; return false; } private boolean jj_3R_141() { if (jj_3R_149()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_134() { Token xsp; xsp = jj_scanpos; if (jj_3R_141()) { jj_scanpos = xsp; if (jj_3R_142()) { jj_scanpos = xsp; if (jj_3R_143()) return true; } } return false; } private boolean jj_3R_121() { if (jj_3R_134()) return true; return false; } private boolean jj_3R_92() { if (jj_scan_token(LBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_121()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } private boolean jj_3R_84() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(COLON)) return true; if (jj_3R_150()) return true; return false; } private boolean jj_3R_175() { if (jj_scan_token(ASSERT)) return true; if (jj_3R_74()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_291()) jj_scanpos = xsp; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_170() { if (jj_3R_187()) return true; return false; } private boolean jj_3R_169() { if (jj_3R_186()) return true; return false; } private boolean jj_3_34() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_168() { if (jj_3R_185()) return true; return false; } private boolean jj_3R_167() { if (jj_3R_184()) return true; return false; } private boolean jj_3R_166() { if (jj_3R_183()) return true; return false; } private boolean jj_3R_165() { if (jj_3R_182()) return true; return false; } private boolean jj_3R_164() { if (jj_3R_181()) return true; return false; } private boolean jj_3R_163() { if (jj_3R_180()) return true; return false; } private boolean jj_3R_162() { if (jj_3R_179()) return true; return false; } private boolean jj_3R_161() { if (jj_3R_178()) return true; return false; } private boolean jj_3R_160() { if (jj_3R_177()) return true; return false; } private boolean jj_3R_159() { if (jj_3R_176()) return true; if (jj_scan_token(SEMICOLON)) return true; return false; } private boolean jj_3R_158() { if (jj_3R_92()) return true; return false; } private boolean jj_3R_157() { if (jj_3R_175()) return true; return false; } private boolean jj_3R_236() { if (jj_3R_72()) return true; return false; } private boolean jj_3_36() { if (jj_3R_84()) return true; return false; } private boolean jj_3R_150() { Token xsp; xsp = jj_scanpos; if (jj_3_36()) { jj_scanpos = xsp; if (jj_3R_157()) { jj_scanpos = xsp; if (jj_3R_158()) { jj_scanpos = xsp; if (jj_scan_token(85)) { jj_scanpos = xsp; if (jj_3R_159()) { jj_scanpos = xsp; if (jj_3R_160()) { jj_scanpos = xsp; if (jj_3R_161()) { jj_scanpos = xsp; if (jj_3R_162()) { jj_scanpos = xsp; if (jj_3R_163()) { jj_scanpos = xsp; if (jj_3R_164()) { jj_scanpos = xsp; if (jj_3R_165()) { jj_scanpos = xsp; if (jj_3R_166()) { jj_scanpos = xsp; if (jj_3R_167()) { jj_scanpos = xsp; if (jj_3R_168()) { jj_scanpos = xsp; if (jj_3R_169()) { jj_scanpos = xsp; if (jj_3R_170()) return true; } } } } } } } } } } } } } } } return false; } private boolean jj_3R_240() { if (jj_3R_242()) return true; return false; } private boolean jj_3R_241() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3_33() { if (jj_scan_token(LBRACKET)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_239() { Token xsp; if (jj_3R_241()) return true; while (true) { xsp = jj_scanpos; if (jj_3R_241()) { jj_scanpos = xsp; break; } } if (jj_3R_122()) return true; return false; } private boolean jj_3_35() { Token xsp; if (jj_3_33()) return true; while (true) { xsp = jj_scanpos; if (jj_3_33()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; if (jj_3_34()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_235() { Token xsp; xsp = jj_scanpos; if (jj_3_35()) { jj_scanpos = xsp; if (jj_3R_239()) return true; } return false; } private boolean jj_3R_238() { if (jj_3R_97()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_240()) jj_scanpos = xsp; return false; } private boolean jj_3R_144() { if (jj_scan_token(COMMA)) return true; if (jj_3R_74()) return true; return false; } private boolean jj_3R_237() { if (jj_3R_235()) return true; return false; } private boolean jj_3R_112() { if (jj_scan_token(NEW)) return true; if (jj_3R_124()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_236()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3R_237()) { jj_scanpos = xsp; if (jj_3R_238()) return true; } return false; } private boolean jj_3R_82() { Token xsp; xsp = jj_scanpos; if (jj_3_32()) { jj_scanpos = xsp; if (jj_3R_112()) return true; } return false; } private boolean jj_3_32() { if (jj_scan_token(NEW)) return true; if (jj_3R_78()) return true; if (jj_3R_235()) return true; return false; } private boolean jj_3R_136() { if (jj_3R_74()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_144()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_123() { if (jj_3R_136()) return true; return false; } private boolean jj_3R_97() { if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_123()) jj_scanpos = xsp; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3R_154() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(60)) { jj_scanpos = xsp; if (jj_scan_token(29)) return true; } return false; } private boolean jj_3R_146() { if (jj_3R_154()) return true; return false; } private boolean jj_3R_128() { if (jj_3R_138()) return true; return false; } private boolean jj_3R_138() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(65)) { jj_scanpos = xsp; if (jj_scan_token(69)) { jj_scanpos = xsp; if (jj_scan_token(74)) { jj_scanpos = xsp; if (jj_scan_token(75)) { jj_scanpos = xsp; if (jj_3R_146()) { jj_scanpos = xsp; if (jj_scan_token(44)) return true; } } } } } return false; } private boolean jj_3R_110() { if (jj_3R_97()) return true; return false; } private boolean jj_3R_109() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3_29() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(THIS)) return true; return false; } private boolean jj_3R_108() { if (jj_scan_token(LBRACKET)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3_28() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(SUPER)) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3_31() { if (jj_3R_83()) return true; return false; } private boolean jj_3_30() { if (jj_scan_token(DOT)) return true; if (jj_3R_82()) return true; return false; } private boolean jj_3R_107() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(THIS)) return true; return false; } private boolean jj_3_27() { if (jj_3R_81()) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3R_106() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(SUPER)) return true; return false; } private boolean jj_3R_79() { Token xsp; xsp = jj_scanpos; if (jj_3R_106()) { jj_scanpos = xsp; if (jj_3R_107()) { jj_scanpos = xsp; if (jj_3_30()) { jj_scanpos = xsp; if (jj_3_31()) { jj_scanpos = xsp; if (jj_3R_108()) { jj_scanpos = xsp; if (jj_3R_109()) { jj_scanpos = xsp; if (jj_3R_110()) return true; } } } } } } return false; } private boolean jj_3R_80() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_211() { if (jj_3R_86()) return true; return false; } private boolean jj_3_26() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_80()) { jj_scanpos = xsp; break; } } if (jj_scan_token(THIS)) return true; return false; } private boolean jj_3R_210() { if (jj_3R_81()) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(CLASS)) return true; return false; } private boolean jj_3R_209() { if (jj_3R_82()) return true; return false; } private boolean jj_3R_208() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_74()) return true; if (jj_scan_token(RPAREN)) return true; return false; } private boolean jj_3_25() { if (jj_3R_79()) return true; return false; } private boolean jj_3R_207() { if (jj_scan_token(SUPER)) return true; if (jj_scan_token(DOT)) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3R_214() { if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(DOT)) return true; return false; } private boolean jj_3R_206() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_214()) { jj_scanpos = xsp; break; } } if (jj_scan_token(THIS)) return true; return false; } private boolean jj_3R_202() { Token xsp; xsp = jj_scanpos; if (jj_3R_205()) { jj_scanpos = xsp; if (jj_3R_206()) { jj_scanpos = xsp; if (jj_3R_207()) { jj_scanpos = xsp; if (jj_3R_208()) { jj_scanpos = xsp; if (jj_3R_209()) { jj_scanpos = xsp; if (jj_3R_210()) { jj_scanpos = xsp; if (jj_3R_211()) return true; } } } } } } return false; } private boolean jj_3R_205() { if (jj_3R_138()) return true; return false; } private boolean jj_3R_234() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(101)) { jj_scanpos = xsp; if (jj_scan_token(102)) return true; } return false; } private boolean jj_3R_83() { if (jj_scan_token(DOT)) return true; if (jj_3R_72()) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3_24() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_78()) return true; return false; } private boolean jj_3R_199() { if (jj_3R_202()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_25()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_233() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_66()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_224()) return true; return false; } private boolean jj_3R_230() { Token xsp; xsp = jj_scanpos; if (jj_3R_232()) { jj_scanpos = xsp; if (jj_3R_233()) return true; } return false; } private boolean jj_3R_232() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_66()) return true; if (jj_scan_token(RPAREN)) return true; if (jj_3R_218()) return true; return false; } private boolean jj_3_23() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_66()) return true; if (jj_scan_token(LBRACKET)) return true; return false; } private boolean jj_3R_231() { if (jj_3R_199()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_234()) jj_scanpos = xsp; return false; } private boolean jj_3R_105() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_66()) return true; if (jj_scan_token(RPAREN)) return true; Token xsp; xsp = jj_scanpos; if (jj_scan_token(92)) { jj_scanpos = xsp; if (jj_scan_token(91)) { jj_scanpos = xsp; if (jj_scan_token(79)) { jj_scanpos = xsp; if (jj_scan_token(76)) { jj_scanpos = xsp; if (jj_scan_token(56)) { jj_scanpos = xsp; if (jj_scan_token(53)) { jj_scanpos = xsp; if (jj_scan_token(43)) { jj_scanpos = xsp; if (jj_3R_128()) return true; } } } } } } } return false; } private boolean jj_3R_104() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_66()) return true; if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3_22() { if (jj_scan_token(LPAREN)) return true; if (jj_3R_78()) return true; return false; } private boolean jj_3R_77() { Token xsp; xsp = jj_scanpos; if (jj_3_22()) { jj_scanpos = xsp; if (jj_3R_104()) { jj_scanpos = xsp; if (jj_3R_105()) return true; } } return false; } private boolean jj_3_21() { if (jj_3R_77()) return true; return false; } private boolean jj_3_20() { if (jj_3R_76()) return true; return false; } private boolean jj_3R_228() { if (jj_3R_231()) return true; return false; } private boolean jj_3R_227() { if (jj_3R_230()) return true; return false; } private boolean jj_3R_224() { Token xsp; xsp = jj_scanpos; if (jj_3R_226()) { jj_scanpos = xsp; if (jj_3R_227()) { jj_scanpos = xsp; if (jj_3R_228()) return true; } } return false; } private boolean jj_3R_226() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(92)) { jj_scanpos = xsp; if (jj_scan_token(91)) return true; } if (jj_3R_218()) return true; return false; } private boolean jj_3R_198() { if (jj_scan_token(DECR)) return true; if (jj_3R_199()) return true; return false; } private boolean jj_3R_225() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(103)) { jj_scanpos = xsp; if (jj_scan_token(104)) return true; } if (jj_3R_216()) return true; return false; } private boolean jj_3_19() { if (jj_3R_75()) return true; return false; } private boolean jj_3R_229() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(105)) { jj_scanpos = xsp; if (jj_scan_token(106)) { jj_scanpos = xsp; if (jj_scan_token(110)) return true; } } if (jj_3R_218()) return true; return false; } private boolean jj_3R_197() { if (jj_scan_token(INCR)) return true; if (jj_3R_199()) return true; return false; } private boolean jj_3R_223() { if (jj_3R_224()) return true; return false; } private boolean jj_3_18() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(111)) { jj_scanpos = xsp; if (jj_3_19()) { jj_scanpos = xsp; if (jj_3_20()) return true; } } if (jj_3R_213()) return true; return false; } private boolean jj_3R_222() { if (jj_3R_198()) return true; return false; } private boolean jj_3R_221() { if (jj_3R_197()) return true; return false; } private boolean jj_3R_218() { Token xsp; xsp = jj_scanpos; if (jj_3R_220()) { jj_scanpos = xsp; if (jj_3R_221()) { jj_scanpos = xsp; if (jj_3R_222()) { jj_scanpos = xsp; if (jj_3R_223()) return true; } } } return false; } private boolean jj_3R_220() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(103)) { jj_scanpos = xsp; if (jj_scan_token(104)) return true; } if (jj_3R_218()) return true; return false; } private boolean jj_3R_219() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(90)) { jj_scanpos = xsp; if (jj_scan_token(126)) { jj_scanpos = xsp; if (jj_scan_token(96)) { jj_scanpos = xsp; if (jj_scan_token(97)) return true; } } } if (jj_3R_204()) return true; return false; } private boolean jj_3R_217() { if (jj_scan_token(INSTANCEOF)) return true; if (jj_3R_66()) return true; return false; } private boolean jj_3R_216() { if (jj_3R_218()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_229()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_215() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(95)) { jj_scanpos = xsp; if (jj_scan_token(98)) return true; } if (jj_3R_196()) return true; return false; } private boolean jj_3R_213() { if (jj_3R_216()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_225()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_204() { if (jj_3R_213()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_18()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_212() { if (jj_scan_token(BIT_AND)) return true; if (jj_3R_191()) return true; return false; } private boolean jj_3R_201() { if (jj_3R_204()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_219()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_200() { if (jj_scan_token(BIT_OR)) return true; if (jj_3R_153()) return true; return false; } private boolean jj_3R_196() { if (jj_3R_201()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_217()) jj_scanpos = xsp; return false; } private boolean jj_3R_203() { if (jj_scan_token(XOR)) return true; if (jj_3R_174()) return true; return false; } private boolean jj_3R_195() { if (jj_scan_token(SC_AND)) return true; if (jj_3R_145()) return true; return false; } private boolean jj_3R_191() { if (jj_3R_196()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_215()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_190() { if (jj_scan_token(SC_OR)) return true; if (jj_3R_137()) return true; return false; } private boolean jj_3R_174() { if (jj_3R_191()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_212()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_173() { if (jj_scan_token(HOOK)) return true; if (jj_3R_74()) return true; if (jj_scan_token(COLON)) return true; if (jj_3R_74()) return true; return false; } private boolean jj_3R_153() { if (jj_3R_174()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_203()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_145() { if (jj_3R_153()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_200()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_137() { if (jj_3R_145()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_195()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_127() { if (jj_3R_137()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_190()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_101() { if (jj_3R_127()) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_173()) jj_scanpos = xsp; return false; } private boolean jj_3R_73() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(89)) { jj_scanpos = xsp; if (jj_scan_token(114)) { jj_scanpos = xsp; if (jj_scan_token(115)) { jj_scanpos = xsp; if (jj_scan_token(119)) { jj_scanpos = xsp; if (jj_scan_token(112)) { jj_scanpos = xsp; if (jj_scan_token(113)) { jj_scanpos = xsp; if (jj_scan_token(120)) { jj_scanpos = xsp; if (jj_scan_token(121)) { jj_scanpos = xsp; if (jj_scan_token(122)) { jj_scanpos = xsp; if (jj_scan_token(116)) { jj_scanpos = xsp; if (jj_scan_token(118)) { jj_scanpos = xsp; if (jj_scan_token(117)) return true; } } } } } } } } } } } return false; } private boolean jj_3_17() { if (jj_3R_73()) return true; if (jj_3R_74()) return true; return false; } private boolean jj_3R_74() { if (jj_3R_101()) return true; Token xsp; xsp = jj_scanpos; if (jj_3_17()) jj_scanpos = xsp; return false; } private boolean jj_3R_286() { if (jj_scan_token(COMMA)) return true; if (jj_3R_86()) return true; return false; } private boolean jj_3R_277() { if (jj_3R_86()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_286()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3_16() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(IDENTIFIER)) return true; return false; } private boolean jj_3R_86() { if (jj_scan_token(IDENTIFIER)) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_16()) { jj_scanpos = xsp; break; } } return false; } private boolean jj_3R_111() { if (jj_3R_66()) return true; return false; } private boolean jj_3R_81() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(62)) { jj_scanpos = xsp; if (jj_3R_111()) return true; } return false; } private boolean jj_3_15() { if (jj_3R_72()) return true; return false; } private boolean jj_3R_78() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(14)) { jj_scanpos = xsp; if (jj_scan_token(19)) { jj_scanpos = xsp; if (jj_scan_token(16)) { jj_scanpos = xsp; if (jj_scan_token(50)) { jj_scanpos = xsp; if (jj_scan_token(39)) { jj_scanpos = xsp; if (jj_scan_token(41)) { jj_scanpos = xsp; if (jj_scan_token(32)) { jj_scanpos = xsp; if (jj_scan_token(25)) return true; } } } } } } } return false; } private boolean jj_3R_135() { if (jj_scan_token(COMMA)) return true; if (jj_3R_100()) return true; return false; } private boolean jj_3_12() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_189() { if (jj_scan_token(SUPER)) return true; if (jj_3R_71()) return true; return false; } private boolean jj_3R_152() { if (jj_3R_172()) return true; return false; } private boolean jj_3R_172() { Token xsp; xsp = jj_scanpos; if (jj_3R_188()) { jj_scanpos = xsp; if (jj_3R_189()) return true; } return false; } private boolean jj_3R_188() { if (jj_scan_token(EXTENDS)) return true; if (jj_3R_71()) return true; return false; } private boolean jj_3R_126() { if (jj_scan_token(HOOK)) return true; Token xsp; xsp = jj_scanpos; if (jj_3R_152()) jj_scanpos = xsp; return false; } private boolean jj_3_13() { if (jj_3R_72()) return true; return false; } private boolean jj_3R_125() { if (jj_3R_71()) return true; return false; } private boolean jj_3R_100() { Token xsp; xsp = jj_scanpos; if (jj_3R_125()) { jj_scanpos = xsp; if (jj_3R_126()) return true; } return false; } private boolean jj_3_11() { if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; return false; } private boolean jj_3R_72() { if (jj_scan_token(LT)) return true; if (jj_3R_100()) return true; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_135()) { jj_scanpos = xsp; break; } } if (jj_scan_token(GT)) return true; return false; } private boolean jj_3_14() { if (jj_scan_token(DOT)) return true; if (jj_scan_token(IDENTIFIER)) return true; Token xsp; xsp = jj_scanpos; if (jj_3_15()) jj_scanpos = xsp; return false; } /** Generated Token Manager. */ public JavaParser15TokenManager token_source; JavaCharStream jj_input_stream; /** Current token. */ public Token token; /** Next token. */ public Token jj_nt; private int jj_ntk; private Token jj_scanpos, jj_lastpos; private int jj_la; /** Whether we are looking ahead. */ private boolean jj_lookingAhead = false; private boolean jj_semLA; /** Constructor with InputStream. */ public JavaParser15(java.io.InputStream stream) { this(stream, null); } /** Constructor with InputStream and supplied encoding */ public JavaParser15(java.io.InputStream stream, String encoding) { try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source = new JavaParser15TokenManager(jj_input_stream); token = new Token(); jj_ntk = -1; } /** Reinitialise. */ public void ReInit(java.io.InputStream stream) { ReInit(stream, null); } /** Reinitialise. */ public void ReInit(java.io.InputStream stream, String encoding) { try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source.ReInit(jj_input_stream); token = new Token(); jj_ntk = -1; } /** Constructor. */ public JavaParser15(java.io.Reader stream) { jj_input_stream = new JavaCharStream(stream, 1, 1); token_source = new JavaParser15TokenManager(jj_input_stream); token = new Token(); jj_ntk = -1; } /** Reinitialise. */ public void ReInit(java.io.Reader stream) { jj_input_stream.ReInit(stream, 1, 1); token_source.ReInit(jj_input_stream); token = new Token(); jj_ntk = -1; } /** Constructor with generated Token Manager. */ public JavaParser15(JavaParser15TokenManager tm) { token_source = tm; token = new Token(); jj_ntk = -1; } /** Reinitialise. */ public void ReInit(JavaParser15TokenManager tm) { token_source = tm; token = new Token(); jj_ntk = -1; } private Token jj_consume_token(int kind) throws ParseException { Token oldToken; if ((oldToken = token).next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; if (token.kind == kind) { return token; } token = oldToken; throw generateParseException(); } static private final class LookaheadSuccess extends java.lang.Error { } final private LookaheadSuccess jj_ls = new LookaheadSuccess(); private boolean jj_scan_token(int kind) { if (jj_scanpos == jj_lastpos) { jj_la--; if (jj_scanpos.next == null) { jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); } else { jj_lastpos = jj_scanpos = jj_scanpos.next; } } else { jj_scanpos = jj_scanpos.next; } if (jj_scanpos.kind != kind) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; return false; } /** Get the next Token. */ final public Token getNextToken() { if (token.next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; return token; } /** Get the specific Token. */ final public Token getToken(int index) { Token t = jj_lookingAhead ? jj_scanpos : token; for (int i = 0; i < index; i++) { if (t.next != null) t = t.next; else t = t.next = token_source.getNextToken(); } return t; } private int jj_ntk() { if ((jj_nt=token.next) == null) return (jj_ntk = (token.next=token_source.getNextToken()).kind); else return (jj_ntk = jj_nt.kind); } /** Generate ParseException. */ public ParseException generateParseException() { Token errortok = token.next; int line = errortok.beginLine, column = errortok.beginColumn; String mess = (errortok.kind == 0) ? tokenImage[0] : errortok.image; return new ParseException("Parse error at line " + line + ", column " + column + ". Encountered: " + mess); } /** Enable tracing. */ final public void enable_tracing() { } /** Disable tracing. */ final public void disable_tracing() { } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/JavaParserTokenManager.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/JavaParserTokenManager.jav0000644000175000017500000021647511343534515033537 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaParserTokenManager.java */ package net.sourceforge.cobertura.javancss.parser; import java.util.*; import net.sourceforge.cobertura.javancss.ccl.Util; import net.sourceforge.cobertura.javancss.FunctionMetric; import net.sourceforge.cobertura.javancss.ObjectMetric; import net.sourceforge.cobertura.javancss.PackageMetric; /** Token Manager. */ public class JavaParserTokenManager implements JavaParserConstants { // added by SMS public static int _iSingleComments = 0; public static int _iMultiComments = 0; public static int _iFormalComments = 0; public static int _iMultiCommentsLast = 0; /** Debug output. */ public java.io.PrintStream debugStream = System.out; /** Set debug output. */ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) { switch (pos) { case 0: if ((active0 & 0xffffffffffffe000L) != 0L || (active1 & 0x3L) != 0L) { jjmatchedKind = 74; return 28; } if ((active1 & 0x400000000200000L) != 0L) return 4; return -1; case 1: if ((active0 & 0x1006000000L) != 0L) return 28; if ((active0 & 0xffffffeff9ffe000L) != 0L || (active1 & 0x3L) != 0L) { if (jjmatchedPos != 1) { jjmatchedKind = 74; jjmatchedPos = 1; } return 28; } return -1; case 2: if ((active0 & 0x4000130400000000L) != 0L) return 28; if ((active0 & 0xbfffecebfdffe000L) != 0L || (active1 & 0x3L) != 0L) { if (jjmatchedPos != 2) { jjmatchedKind = 74; jjmatchedPos = 2; } return 28; } return -1; case 3: if ((active0 & 0x1dffcae3e5e9e000L) != 0L || (active1 & 0x3L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 3; return 28; } if ((active0 & 0xa200240818160000L) != 0L) return 28; return -1; case 4: if ((active0 & 0xc480003c0690000L) != 0L || (active1 & 0x2L) != 0L) return 28; if ((active0 & 0x11b7cae02580e000L) != 0L || (active1 & 0x1L) != 0L) { if (jjmatchedPos != 4) { jjmatchedKind = 74; jjmatchedPos = 4; } return 28; } return -1; case 5: if ((active0 & 0x896084004004000L) != 0L) return 28; if ((active0 & 0x1121c2a12180a000L) != 0L || (active1 & 0x1L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 5; return 28; } return -1; case 6: if ((active0 & 0xc00121008000L) != 0L) return 28; if ((active0 & 0x112102a000802000L) != 0L || (active1 & 0x1L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 6; return 28; } return -1; case 7: if ((active0 & 0x20000000802000L) != 0L || (active1 & 0x1L) != 0L) return 28; if ((active0 & 0x110102a000000000L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 7; return 28; } return -1; case 8: if ((active0 & 0x1001020000000000L) != 0L) return 28; if ((active0 & 0x10000a000000000L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 8; return 28; } return -1; case 9: if ((active0 & 0xa000000000L) != 0L) return 28; if ((active0 & 0x100000000000000L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 9; return 28; } return -1; case 10: if ((active0 & 0x100000000000000L) != 0L) { jjmatchedKind = 74; jjmatchedPos = 10; return 28; } return -1; default : return -1; } } private final int jjStartNfa_0(int pos, long active0, long active1) { return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1); } private int jjStopAtPos(int pos, int kind) { jjmatchedKind = kind; jjmatchedPos = pos; return pos + 1; } private int jjMoveStringLiteralDfa0_0() { switch(curChar) { case 33: jjmatchedKind = 90; return jjMoveStringLiteralDfa1_0(0x0L, 0x200000000L); case 37: jjmatchedKind = 109; return jjMoveStringLiteralDfa1_0(0x0L, 0x40000000000000L); case 38: jjmatchedKind = 106; return jjMoveStringLiteralDfa1_0(0x0L, 0x8000800000000L); case 40: return jjStopAtPos(0, 77); case 41: return jjStopAtPos(0, 78); case 42: jjmatchedKind = 104; return jjMoveStringLiteralDfa1_0(0x0L, 0x2000000000000L); case 43: jjmatchedKind = 102; return jjMoveStringLiteralDfa1_0(0x0L, 0x801000000000L); case 44: return jjStopAtPos(0, 84); case 45: jjmatchedKind = 103; return jjMoveStringLiteralDfa1_0(0x0L, 0x1002000000000L); case 46: jjmatchedKind = 85; return jjMoveStringLiteralDfa1_0(0x0L, 0x400000000000000L); case 47: jjmatchedKind = 105; return jjMoveStringLiteralDfa1_0(0x180L, 0x4000000000000L); case 58: return jjStopAtPos(0, 93); case 59: return jjStopAtPos(0, 83); case 60: jjmatchedKind = 89; return jjMoveStringLiteralDfa1_0(0x0L, 0x80400080000000L); case 61: jjmatchedKind = 87; return jjMoveStringLiteralDfa1_0(0x0L, 0x40000000L); case 62: jjmatchedKind = 88; return jjMoveStringLiteralDfa1_0(0x0L, 0x300000100000000L); case 63: return jjStopAtPos(0, 92); case 64: return jjStopAtPos(0, 86); case 91: return jjStopAtPos(0, 81); case 93: return jjStopAtPos(0, 82); case 94: jjmatchedKind = 108; return jjMoveStringLiteralDfa1_0(0x0L, 0x20000000000000L); case 97: return jjMoveStringLiteralDfa1_0(0x6000L, 0x0L); case 98: return jjMoveStringLiteralDfa1_0(0x38000L, 0x0L); case 99: return jjMoveStringLiteralDfa1_0(0xfc0000L, 0x0L); case 100: return jjMoveStringLiteralDfa1_0(0x7000000L, 0x0L); case 101: return jjMoveStringLiteralDfa1_0(0x38000000L, 0x0L); case 102: return jjMoveStringLiteralDfa1_0(0x7c0000000L, 0x0L); case 103: return jjMoveStringLiteralDfa1_0(0x800000000L, 0x0L); case 105: return jjMoveStringLiteralDfa1_0(0x3f000000000L, 0x0L); case 108: return jjMoveStringLiteralDfa1_0(0x40000000000L, 0x0L); case 110: return jjMoveStringLiteralDfa1_0(0x380000000000L, 0x0L); case 112: return jjMoveStringLiteralDfa1_0(0x3c00000000000L, 0x0L); case 114: return jjMoveStringLiteralDfa1_0(0x4000000000000L, 0x0L); case 115: return jjMoveStringLiteralDfa1_0(0x1f8000000000000L, 0x0L); case 116: return jjMoveStringLiteralDfa1_0(0x7e00000000000000L, 0x0L); case 118: return jjMoveStringLiteralDfa1_0(0x8000000000000000L, 0x1L); case 119: return jjMoveStringLiteralDfa1_0(0x0L, 0x2L); case 123: return jjStopAtPos(0, 79); case 124: jjmatchedKind = 107; return jjMoveStringLiteralDfa1_0(0x0L, 0x10000400000000L); case 125: return jjStopAtPos(0, 80); case 126: return jjStopAtPos(0, 91); default : return jjMoveNfa_0(0, 0); } } private int jjMoveStringLiteralDfa1_0(long active0, long active1) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(0, active0, active1); return 1; } switch(curChar) { case 38: if ((active1 & 0x800000000L) != 0L) return jjStopAtPos(1, 99); break; case 42: if ((active0 & 0x80L) != 0L) return jjStopAtPos(1, 7); break; case 43: if ((active1 & 0x1000000000L) != 0L) return jjStopAtPos(1, 100); break; case 45: if ((active1 & 0x2000000000L) != 0L) return jjStopAtPos(1, 101); break; case 46: return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x400000000000000L); case 47: if ((active0 & 0x100L) != 0L) return jjStopAtPos(1, 8); break; case 60: if ((active1 & 0x400000000000L) != 0L) { jjmatchedKind = 110; jjmatchedPos = 1; } return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x80000000000000L); case 61: if ((active1 & 0x40000000L) != 0L) return jjStopAtPos(1, 94); else if ((active1 & 0x80000000L) != 0L) return jjStopAtPos(1, 95); else if ((active1 & 0x100000000L) != 0L) return jjStopAtPos(1, 96); else if ((active1 & 0x200000000L) != 0L) return jjStopAtPos(1, 97); else if ((active1 & 0x800000000000L) != 0L) return jjStopAtPos(1, 111); else if ((active1 & 0x1000000000000L) != 0L) return jjStopAtPos(1, 112); else if ((active1 & 0x2000000000000L) != 0L) return jjStopAtPos(1, 113); else if ((active1 & 0x4000000000000L) != 0L) return jjStopAtPos(1, 114); else if ((active1 & 0x8000000000000L) != 0L) return jjStopAtPos(1, 115); else if ((active1 & 0x10000000000000L) != 0L) return jjStopAtPos(1, 116); else if ((active1 & 0x20000000000000L) != 0L) return jjStopAtPos(1, 117); else if ((active1 & 0x40000000000000L) != 0L) return jjStopAtPos(1, 118); break; case 62: return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x300000000000000L); case 97: return jjMoveStringLiteralDfa2_0(active0, 0x4800400c0000L, active1, 0L); case 98: return jjMoveStringLiteralDfa2_0(active0, 0x2000L, active1, 0L); case 101: return jjMoveStringLiteralDfa2_0(active0, 0x4100001000000L, active1, 0L); case 102: if ((active0 & 0x1000000000L) != 0L) return jjStartNfaWithStates_0(1, 36, 28); break; case 104: return jjMoveStringLiteralDfa2_0(active0, 0xe08000000100000L, active1, 0x2L); case 105: return jjMoveStringLiteralDfa2_0(active0, 0x180000000L, active1, 0L); case 108: return jjMoveStringLiteralDfa2_0(active0, 0x208200000L, active1, 0L); case 109: return jjMoveStringLiteralDfa2_0(active0, 0x6000000000L, active1, 0L); case 110: return jjMoveStringLiteralDfa2_0(active0, 0x38010000000L, active1, 0L); case 111: if ((active0 & 0x2000000L) != 0L) { jjmatchedKind = 25; jjmatchedPos = 1; } return jjMoveStringLiteralDfa2_0(active0, 0x8000040c04c08000L, active1, 0x1L); case 114: return jjMoveStringLiteralDfa2_0(active0, 0x7001800000010000L, active1, 0L); case 115: return jjMoveStringLiteralDfa2_0(active0, 0x4000L, active1, 0L); case 116: return jjMoveStringLiteralDfa2_0(active0, 0x30000000000000L, active1, 0L); case 117: return jjMoveStringLiteralDfa2_0(active0, 0x42200000000000L, active1, 0L); case 119: return jjMoveStringLiteralDfa2_0(active0, 0x80000000000000L, active1, 0L); case 120: return jjMoveStringLiteralDfa2_0(active0, 0x20000000L, active1, 0L); case 121: return jjMoveStringLiteralDfa2_0(active0, 0x100000000020000L, active1, 0L); case 124: if ((active1 & 0x400000000L) != 0L) return jjStopAtPos(1, 98); break; default : break; } return jjStartNfa_0(0, active0, active1); } private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(0, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(1, active0, active1); return 2; } switch(curChar) { case 46: if ((active1 & 0x400000000000000L) != 0L) return jjStopAtPos(2, 122); break; case 61: if ((active1 & 0x80000000000000L) != 0L) return jjStopAtPos(2, 119); else if ((active1 & 0x100000000000000L) != 0L) return jjStopAtPos(2, 120); break; case 62: return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x200000000000000L); case 97: return jjMoveStringLiteralDfa3_0(active0, 0x1010000000300000L, active1, 0L); case 98: return jjMoveStringLiteralDfa3_0(active0, 0x2000000000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L, active1, 0L); case 101: return jjMoveStringLiteralDfa3_0(active0, 0x10000L, active1, 0L); case 102: return jjMoveStringLiteralDfa3_0(active0, 0x1000000L, active1, 0L); case 105: return jjMoveStringLiteralDfa3_0(active0, 0x8280800000000000L, active1, 0x2L); case 108: return jjMoveStringLiteralDfa3_0(active0, 0x200040000000L, active1, 0x1L); case 110: return jjMoveStringLiteralDfa3_0(active0, 0x100040180c00000L, active1, 0L); case 111: return jjMoveStringLiteralDfa3_0(active0, 0x9000200008000L, active1, 0L); case 112: return jjMoveStringLiteralDfa3_0(active0, 0x40006000000000L, active1, 0L); case 114: if ((active0 & 0x400000000L) != 0L) return jjStartNfaWithStates_0(2, 34, 28); return jjMoveStringLiteralDfa3_0(active0, 0xc20000000000000L, active1, 0L); case 115: return jjMoveStringLiteralDfa3_0(active0, 0x8008046000L, active1, 0L); case 116: if ((active0 & 0x10000000000L) != 0L) { jjmatchedKind = 40; jjmatchedPos = 2; } return jjMoveStringLiteralDfa3_0(active0, 0x40a08200a0000L, active1, 0L); case 117: return jjMoveStringLiteralDfa3_0(active0, 0x2000000014000000L, active1, 0L); case 119: if ((active0 & 0x100000000000L) != 0L) return jjStartNfaWithStates_0(2, 44, 28); break; case 121: if ((active0 & 0x4000000000000000L) != 0L) return jjStartNfaWithStates_0(2, 62, 28); break; default : break; } return jjStartNfa_0(1, active0, active1); } private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(1, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(2, active0, active1); return 3; } switch(curChar) { case 61: if ((active1 & 0x200000000000000L) != 0L) return jjStopAtPos(3, 121); break; case 97: return jjMoveStringLiteralDfa4_0(active0, 0x381010000L, active1, 0x1L); case 98: return jjMoveStringLiteralDfa4_0(active0, 0x4000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa4_0(active0, 0x100000000080000L, active1, 0L); case 100: if ((active0 & 0x8000000000000000L) != 0L) return jjStartNfaWithStates_0(3, 63, 28); break; case 101: if ((active0 & 0x20000L) != 0L) return jjStartNfaWithStates_0(3, 17, 28); else if ((active0 & 0x40000L) != 0L) return jjStartNfaWithStates_0(3, 18, 28); else if ((active0 & 0x8000000L) != 0L) return jjStartNfaWithStates_0(3, 27, 28); else if ((active0 & 0x2000000000000000L) != 0L) return jjStartNfaWithStates_0(3, 61, 28); return jjMoveStringLiteralDfa4_0(active0, 0x40020020004000L, active1, 0L); case 103: if ((active0 & 0x40000000000L) != 0L) return jjStartNfaWithStates_0(3, 42, 28); break; case 105: return jjMoveStringLiteralDfa4_0(active0, 0x20080000000000L, active1, 0L); case 107: return jjMoveStringLiteralDfa4_0(active0, 0x400000000000L, active1, 0L); case 108: if ((active0 & 0x200000000000L) != 0L) return jjStartNfaWithStates_0(3, 45, 28); return jjMoveStringLiteralDfa4_0(active0, 0x2002000008000L, active1, 0x2L); case 109: if ((active0 & 0x10000000L) != 0L) return jjStartNfaWithStates_0(3, 28, 28); break; case 110: return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000000L, active1, 0L); case 111: if ((active0 & 0x800000000L) != 0L) return jjStartNfaWithStates_0(3, 35, 28); return jjMoveStringLiteralDfa4_0(active0, 0xc00004000000000L, active1, 0L); case 114: if ((active0 & 0x100000L) != 0L) return jjStartNfaWithStates_0(3, 20, 28); return jjMoveStringLiteralDfa4_0(active0, 0x8000000000000L, active1, 0L); case 115: if ((active0 & 0x200000000000000L) != 0L) return jjStartNfaWithStates_0(3, 57, 28); return jjMoveStringLiteralDfa4_0(active0, 0x40600000L, active1, 0L); case 116: return jjMoveStringLiteralDfa4_0(active0, 0x91008000802000L, active1, 0L); case 117: return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000L, active1, 0L); case 118: return jjMoveStringLiteralDfa4_0(active0, 0x800000000000L, active1, 0L); default : break; } return jjStartNfa_0(2, active0, active1); } private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(2, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(3, active0, active1); return 4; } switch(curChar) { case 97: return jjMoveStringLiteralDfa5_0(active0, 0xc08000000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa5_0(active0, 0xa0000000000000L, active1, 0L); case 101: if ((active0 & 0x40000000L) != 0L) return jjStartNfaWithStates_0(4, 30, 28); else if ((active1 & 0x2L) != 0L) return jjStartNfaWithStates_0(4, 65, 28); return jjMoveStringLiteralDfa5_0(active0, 0x1002000008000L, active1, 0L); case 104: if ((active0 & 0x80000L) != 0L) return jjStartNfaWithStates_0(4, 19, 28); return jjMoveStringLiteralDfa5_0(active0, 0x100000000000000L, active1, 0L); case 105: return jjMoveStringLiteralDfa5_0(active0, 0x12000000800000L, active1, 0L); case 107: if ((active0 & 0x10000L) != 0L) return jjStartNfaWithStates_0(4, 16, 28); break; case 108: if ((active0 & 0x80000000L) != 0L) { jjmatchedKind = 31; jjmatchedPos = 4; } return jjMoveStringLiteralDfa5_0(active0, 0x104000000L, active1, 0L); case 110: return jjMoveStringLiteralDfa5_0(active0, 0x20000000L, active1, 0L); case 114: if ((active0 & 0x40000000000000L) != 0L) return jjStartNfaWithStates_0(4, 54, 28); return jjMoveStringLiteralDfa5_0(active0, 0x4024000006000L, active1, 0L); case 115: if ((active0 & 0x200000L) != 0L) return jjStartNfaWithStates_0(4, 21, 28); return jjMoveStringLiteralDfa5_0(active0, 0x1000000000000000L, active1, 0L); case 116: if ((active0 & 0x400000L) != 0L) return jjStartNfaWithStates_0(4, 22, 28); else if ((active0 & 0x200000000L) != 0L) return jjStartNfaWithStates_0(4, 33, 28); else if ((active0 & 0x8000000000000L) != 0L) return jjStartNfaWithStates_0(4, 51, 28); return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x1L); case 117: return jjMoveStringLiteralDfa5_0(active0, 0x1000000L, active1, 0L); case 118: return jjMoveStringLiteralDfa5_0(active0, 0x80000000000L, active1, 0L); case 119: if ((active0 & 0x400000000000000L) != 0L) { jjmatchedKind = 58; jjmatchedPos = 4; } return jjMoveStringLiteralDfa5_0(active0, 0x800000000000000L, active1, 0L); default : break; } return jjStartNfa_0(3, active0, active1); } private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(3, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(4, active0, active1); return 5; } switch(curChar) { case 97: return jjMoveStringLiteralDfa6_0(active0, 0xa000L, active1, 0L); case 99: if ((active0 & 0x2000000000000L) != 0L) return jjStartNfaWithStates_0(5, 49, 28); else if ((active0 & 0x10000000000000L) != 0L) return jjStartNfaWithStates_0(5, 52, 28); return jjMoveStringLiteralDfa6_0(active0, 0x1000000000000L, active1, 0L); case 100: return jjMoveStringLiteralDfa6_0(active0, 0x20000000L, active1, 0L); case 101: if ((active0 & 0x4000000L) != 0L) return jjStartNfaWithStates_0(5, 26, 28); else if ((active0 & 0x80000000000L) != 0L) return jjStartNfaWithStates_0(5, 43, 28); break; case 102: return jjMoveStringLiteralDfa6_0(active0, 0x20000000000L, active1, 0L); case 103: return jjMoveStringLiteralDfa6_0(active0, 0x400000000000L, active1, 0L); case 104: if ((active0 & 0x80000000000000L) != 0L) return jjStartNfaWithStates_0(5, 55, 28); break; case 105: return jjMoveStringLiteralDfa6_0(active0, 0x1000000000000000L, active1, 0x1L); case 108: return jjMoveStringLiteralDfa6_0(active0, 0x101000000L, active1, 0L); case 109: return jjMoveStringLiteralDfa6_0(active0, 0x2000000000L, active1, 0L); case 110: if ((active0 & 0x4000000000000L) != 0L) return jjStartNfaWithStates_0(5, 50, 28); return jjMoveStringLiteralDfa6_0(active0, 0x8000800000L, active1, 0L); case 114: return jjMoveStringLiteralDfa6_0(active0, 0x100000000000000L, active1, 0L); case 115: if ((active0 & 0x800000000000000L) != 0L) return jjStartNfaWithStates_0(5, 59, 28); break; case 116: if ((active0 & 0x4000L) != 0L) return jjStartNfaWithStates_0(5, 14, 28); else if ((active0 & 0x4000000000L) != 0L) return jjStartNfaWithStates_0(5, 38, 28); return jjMoveStringLiteralDfa6_0(active0, 0x20800000000000L, active1, 0L); default : break; } return jjStartNfa_0(4, active0, active1); } private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(4, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(5, active0, active1); return 6; } switch(curChar) { case 97: return jjMoveStringLiteralDfa7_0(active0, 0x20000000000L, active1, 0L); case 99: return jjMoveStringLiteralDfa7_0(active0, 0x8000002000L, active1, 0L); case 101: if ((active0 & 0x400000000000L) != 0L) return jjStartNfaWithStates_0(6, 46, 28); else if ((active0 & 0x800000000000L) != 0L) return jjStartNfaWithStates_0(6, 47, 28); return jjMoveStringLiteralDfa7_0(active0, 0x1000002000000000L, active1, 0L); case 102: return jjMoveStringLiteralDfa7_0(active0, 0x20000000000000L, active1, 0L); case 108: return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x1L); case 110: if ((active0 & 0x8000L) != 0L) return jjStartNfaWithStates_0(6, 15, 28); break; case 111: return jjMoveStringLiteralDfa7_0(active0, 0x100000000000000L, active1, 0L); case 115: if ((active0 & 0x20000000L) != 0L) return jjStartNfaWithStates_0(6, 29, 28); break; case 116: if ((active0 & 0x1000000L) != 0L) return jjStartNfaWithStates_0(6, 24, 28); return jjMoveStringLiteralDfa7_0(active0, 0x1000000000000L, active1, 0L); case 117: return jjMoveStringLiteralDfa7_0(active0, 0x800000L, active1, 0L); case 121: if ((active0 & 0x100000000L) != 0L) return jjStartNfaWithStates_0(6, 32, 28); break; default : break; } return jjStartNfa_0(5, active0, active1); } private int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(5, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(6, active0, active1); return 7; } switch(curChar) { case 99: return jjMoveStringLiteralDfa8_0(active0, 0x20000000000L, active1, 0L); case 101: if ((active0 & 0x800000L) != 0L) return jjStartNfaWithStates_0(7, 23, 28); else if ((active1 & 0x1L) != 0L) return jjStartNfaWithStates_0(7, 64, 28); return jjMoveStringLiteralDfa8_0(active0, 0x1008000000000L, active1, 0L); case 110: return jjMoveStringLiteralDfa8_0(active0, 0x1100002000000000L, active1, 0L); case 112: if ((active0 & 0x20000000000000L) != 0L) return jjStartNfaWithStates_0(7, 53, 28); break; case 116: if ((active0 & 0x2000L) != 0L) return jjStartNfaWithStates_0(7, 13, 28); break; default : break; } return jjStartNfa_0(6, active0, active1); } private int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long active1) { if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(6, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(7, active0, 0L); return 8; } switch(curChar) { case 100: if ((active0 & 0x1000000000000L) != 0L) return jjStartNfaWithStates_0(8, 48, 28); break; case 101: if ((active0 & 0x20000000000L) != 0L) return jjStartNfaWithStates_0(8, 41, 28); break; case 105: return jjMoveStringLiteralDfa9_0(active0, 0x100000000000000L); case 111: return jjMoveStringLiteralDfa9_0(active0, 0x8000000000L); case 116: if ((active0 & 0x1000000000000000L) != 0L) return jjStartNfaWithStates_0(8, 60, 28); return jjMoveStringLiteralDfa9_0(active0, 0x2000000000L); default : break; } return jjStartNfa_0(7, active0, 0L); } private int jjMoveStringLiteralDfa9_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(7, old0, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(8, active0, 0L); return 9; } switch(curChar) { case 102: if ((active0 & 0x8000000000L) != 0L) return jjStartNfaWithStates_0(9, 39, 28); break; case 115: if ((active0 & 0x2000000000L) != 0L) return jjStartNfaWithStates_0(9, 37, 28); break; case 122: return jjMoveStringLiteralDfa10_0(active0, 0x100000000000000L); default : break; } return jjStartNfa_0(8, active0, 0L); } private int jjMoveStringLiteralDfa10_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(8, old0, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(9, active0, 0L); return 10; } switch(curChar) { case 101: return jjMoveStringLiteralDfa11_0(active0, 0x100000000000000L); default : break; } return jjStartNfa_0(9, active0, 0L); } private int jjMoveStringLiteralDfa11_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_0(9, old0, 0L); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(10, active0, 0L); return 11; } switch(curChar) { case 100: if ((active0 & 0x100000000000000L) != 0L) return jjStartNfaWithStates_0(11, 56, 28); break; default : break; } return jjStartNfa_0(10, active0, 0L); } private int jjStartNfaWithStates_0(int pos, int kind, int state) { jjmatchedKind = kind; jjmatchedPos = pos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return pos + 1; } return jjMoveNfa_0(state, pos + 1); } static final long[] jjbitVec0 = { 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL }; static final long[] jjbitVec2 = { 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL }; static final long[] jjbitVec3 = { 0xfff0000000200002L, 0xffffffffffffdfffL, 0xfffff00f7fffffffL, 0x12000000007fffffL }; static final long[] jjbitVec4 = { 0x0L, 0x0L, 0x420043c00000000L, 0xff7fffffff7fffffL }; static final long[] jjbitVec5 = { 0xffffcffffffffL, 0xffffffffffff0000L, 0xf9ff3fffffffffffL, 0x401f00030003L }; static final long[] jjbitVec6 = { 0x0L, 0x400000000000000L, 0xfffffffbffffd740L, 0xffffffcff7fffL }; static final long[] jjbitVec7 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xfffffffffffff003L, 0x33fffffffff199fL }; static final long[] jjbitVec8 = { 0xfffe000000000000L, 0xfffffffe027fffffL, 0xffL, 0x707ffffff0000L }; static final long[] jjbitVec9 = { 0x7fffffe00000000L, 0xfffe0000000007ffL, 0xffffffffffffffffL, 0x1c000060002fffffL }; static final long[] jjbitVec10 = { 0x1ffffffd0000L, 0x0L, 0x3fffffffffL, 0x0L }; static final long[] jjbitVec11 = { 0x23ffffffffffffe0L, 0x3ff010000L, 0x3c5fdfffff99fe0L, 0xf0003b0000000L }; static final long[] jjbitVec12 = { 0x36dfdfffff987e0L, 0x1c00005e000000L, 0x23edfdfffffbafe0L, 0x100010000L }; static final long[] jjbitVec13 = { 0x23cdfdfffff99fe0L, 0x3b0000000L, 0x3bfc718d63dc7e0L, 0x0L }; static final long[] jjbitVec14 = { 0x3effdfffffddfe0L, 0x300000000L, 0x3effdfffffddfe0L, 0x340000000L }; static final long[] jjbitVec15 = { 0x3fffdfffffddfe0L, 0x300000000L, 0x2ffbfffffc7fffe0L, 0x7fL }; static final long[] jjbitVec16 = { 0x800dfffffffffffeL, 0x7fL, 0x200decaefef02596L, 0x3000005fL }; static final long[] jjbitVec17 = { 0x1L, 0x7fffffffeffL, 0xf00L, 0x0L }; static final long[] jjbitVec18 = { 0x6fbffffffffL, 0x3f0000L, 0xffffffff00000000L, 0x7fffffffff003fL }; static final long[] jjbitVec19 = { 0xffffffffffffffffL, 0xffffffff83ffffffL, 0xffffff07ffffffffL, 0x3ffffffffffffffL }; static final long[] jjbitVec20 = { 0xffffffffffffff7fL, 0xffffffff3d7f3d7fL, 0x7f3d7fffffff3d7fL, 0xffff7fffff7f7f3dL }; static final long[] jjbitVec21 = { 0xffffffff7f3d7fffL, 0x7ffff7fL, 0xffffffff00000000L, 0x1fffffffffffffL }; static final long[] jjbitVec22 = { 0xffffffffffffffffL, 0x7f9fffffffffffL, 0xffffffff07fffffeL, 0x7ffffffffffL }; static final long[] jjbitVec23 = { 0x0L, 0x0L, 0xfffffffffffffL, 0x8000000L }; static final long[] jjbitVec24 = { 0xffffffff00000000L, 0xffffffffffffffL, 0x1ffffffffffL, 0x0L }; static final long[] jjbitVec25 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffff0fffffffL, 0x3ffffffffffffffL }; static final long[] jjbitVec26 = { 0xffffffff3f3fffffL, 0x3fffffffaaff3f3fL, 0x5fdfffffffffffffL, 0x1fdc1fff0fcf1fdcL }; static final long[] jjbitVec27 = { 0x8000000000000000L, 0x8000000000000001L, 0xffff00000000L, 0x0L }; static final long[] jjbitVec28 = { 0x3fbbd503e2ffc84L, 0xffffffff00000000L, 0xfL, 0x0L }; static final long[] jjbitVec29 = { 0x73e03fe000000e0L, 0xfffffffffffffffeL, 0xfffffffe601fffffL, 0x7fffffffffffffffL }; static final long[] jjbitVec30 = { 0xfffe1fffffffffe0L, 0xffffffffffffffffL, 0xffffff00007fffL, 0x0L }; static final long[] jjbitVec31 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0x3fffffffffffffL, 0x0L }; static final long[] jjbitVec32 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0x3fffffffffL, 0x0L }; static final long[] jjbitVec33 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0x1fffL, 0x0L }; static final long[] jjbitVec34 = { 0xffffffffffffffffL, 0xffffffffffffffffL, 0xfffffffffL, 0x0L }; static final long[] jjbitVec35 = { 0x3fffffffffffL, 0x0L, 0x0L, 0x0L }; static final long[] jjbitVec36 = { 0x5f7ffdffa0f8007fL, 0xffffffffffffffdbL, 0x3ffffffffffffL, 0xfffffffffff80000L }; static final long[] jjbitVec37 = { 0x3fffffffffffffffL, 0xffffffffffff0000L, 0xfffffffffffcffffL, 0xfff0000000000ffL }; static final long[] jjbitVec38 = { 0x18000000000000L, 0xffd702000000e000L, 0xffffffffffffffffL, 0x1fffffffffffffffL }; static final long[] jjbitVec39 = { 0x87fffffe00000010L, 0xffffffe007fffffeL, 0x7fffffffffffffffL, 0x631cfcfcfcL }; static final long[] jjbitVec40 = { 0x7fffffe00000000L, 0xfffe03ff000007ffL, 0xffffffffffffffffL, 0x1fff0060002fffffL }; static final long[] jjbitVec41 = { 0x23ffffffffffffe0L, 0xffc3ff010000L, 0x3c5fdfffff99fe0L, 0xfffc3b0000000L }; static final long[] jjbitVec42 = { 0x36dfdfffff987e0L, 0x1cffc05e000000L, 0x23edfdfffffbafe0L, 0xffc100010000L }; static final long[] jjbitVec43 = { 0x23cdfdfffff99fe0L, 0xffc3b0000000L, 0x3bfc718d63dc7e0L, 0xff8000000000L }; static final long[] jjbitVec44 = { 0x3effdfffffddfe0L, 0xffc300000000L, 0x3effdfffffddfe0L, 0xffc340000000L }; static final long[] jjbitVec45 = { 0x3fffdfffffddfe0L, 0xffc300000000L, 0x2ffbfffffc7fffe0L, 0x7fL }; static final long[] jjbitVec46 = { 0x800dfffffffffffeL, 0x3ff007fL, 0x200decaefef02596L, 0x33ff005fL }; static final long[] jjbitVec47 = { 0x6fbffffffffL, 0x3f03ffL, 0xffffffff00000000L, 0x7fffffffff003fL }; private int jjMoveNfa_0(int startState, int curPos) { int startsAt = 0; jjnewStateCnt = 48; int i = 1; jjstateSet[0] = startState; int kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; do { switch(jjstateSet[--i]) { case 0: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 6); else if (curChar == 36) { if (kind > 74) kind = 74; jjCheckNAdd(28); } else if (curChar == 34) jjCheckNAddStates(7, 9); else if (curChar == 39) jjAddStates(10, 11); else if (curChar == 46) jjCheckNAdd(4); if ((0x3fe000000000000L & l) != 0L) { if (kind > 66) kind = 66; jjCheckNAddTwoStates(1, 2); } else if (curChar == 48) { if (kind > 66) kind = 66; jjCheckNAddStates(12, 14); } break; case 1: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 66) kind = 66; jjCheckNAddTwoStates(1, 2); break; case 3: if (curChar == 46) jjCheckNAdd(4); break; case 4: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 70) kind = 70; jjCheckNAddStates(15, 17); break; case 6: if ((0x280000000000L & l) != 0L) jjCheckNAdd(7); break; case 7: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 70) kind = 70; jjCheckNAddTwoStates(7, 8); break; case 9: if (curChar == 39) jjAddStates(10, 11); break; case 10: if ((0xfffffffffffffbffL & l) != 0L) jjCheckNAdd(11); break; case 11: if (curChar == 39 && kind > 72) kind = 72; break; case 13: if ((0x8400000000L & l) != 0L) jjCheckNAdd(11); break; case 14: if ((0xff000000000000L & l) != 0L) jjCheckNAddTwoStates(15, 11); break; case 15: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(11); break; case 16: if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 17; break; case 17: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(15); break; case 18: if (curChar == 34) jjCheckNAddStates(7, 9); break; case 19: if ((0xfffffffbffffdbffL & l) != 0L) jjCheckNAddStates(7, 9); break; case 21: if ((0x8400000000L & l) != 0L) jjCheckNAddStates(7, 9); break; case 22: if (curChar == 34 && kind > 73) kind = 73; break; case 23: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(18, 21); break; case 24: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(7, 9); break; case 25: if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(24); break; case 27: if (curChar != 36) break; if (kind > 74) kind = 74; jjCheckNAdd(28); break; case 28: if ((0x3ff001000000000L & l) == 0L) break; if (kind > 74) kind = 74; jjCheckNAdd(28); break; case 29: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 6); break; case 30: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if (curChar != 46) break; if (kind > 70) kind = 70; jjCheckNAddStates(22, 24); break; case 32: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 70) kind = 70; jjCheckNAddStates(22, 24); break; case 34: if ((0x280000000000L & l) != 0L) jjCheckNAdd(35); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 70) kind = 70; jjCheckNAddTwoStates(35, 8); break; case 36: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(36, 37); break; case 38: if ((0x280000000000L & l) != 0L) jjCheckNAdd(39); break; case 39: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 70) kind = 70; jjCheckNAddTwoStates(39, 8); break; case 40: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(25, 27); break; case 42: if ((0x280000000000L & l) != 0L) jjCheckNAdd(43); break; case 43: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(43, 8); break; case 44: if (curChar != 48) break; if (kind > 66) kind = 66; jjCheckNAddStates(12, 14); break; case 46: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 66) kind = 66; jjCheckNAddTwoStates(46, 2); break; case 47: if ((0xff000000000000L & l) == 0L) break; if (kind > 66) kind = 66; jjCheckNAddTwoStates(47, 2); break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); do { switch(jjstateSet[--i]) { case 0: case 28: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 74) kind = 74; jjCheckNAdd(28); break; case 2: if ((0x100000001000L & l) != 0L && kind > 66) kind = 66; break; case 5: if ((0x2000000020L & l) != 0L) jjAddStates(28, 29); break; case 8: if ((0x5000000050L & l) != 0L && kind > 70) kind = 70; break; case 10: if ((0xffffffffefffffffL & l) != 0L) jjCheckNAdd(11); break; case 12: if (curChar == 92) jjAddStates(30, 32); break; case 13: if ((0x14404410000000L & l) != 0L) jjCheckNAdd(11); break; case 19: if ((0xffffffffefffffffL & l) != 0L) jjCheckNAddStates(7, 9); break; case 20: if (curChar == 92) jjAddStates(33, 35); break; case 21: if ((0x14404410000000L & l) != 0L) jjCheckNAddStates(7, 9); break; case 33: if ((0x2000000020L & l) != 0L) jjAddStates(36, 37); break; case 37: if ((0x2000000020L & l) != 0L) jjAddStates(38, 39); break; case 41: if ((0x2000000020L & l) != 0L) jjAddStates(40, 41); break; case 45: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(46); break; case 46: if ((0x7e0000007eL & l) == 0L) break; if (kind > 66) kind = 66; jjCheckNAddTwoStates(46, 2); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); do { switch(jjstateSet[--i]) { case 0: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 74) kind = 74; jjCheckNAdd(28); break; case 10: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjstateSet[jjnewStateCnt++] = 11; break; case 19: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(7, 9); break; case 28: if (!jjCanMove_2(hiByte, i1, i2, l1, l2)) break; if (kind > 74) kind = 74; jjCheckNAdd(28); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 48 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } } } private final int jjStopStringLiteralDfa_2(int pos, long active0) { switch (pos) { default : return -1; } } private final int jjStartNfa_2(int pos, long active0) { return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1); } private int jjMoveStringLiteralDfa0_2() { switch(curChar) { case 42: return jjMoveStringLiteralDfa1_2(0x800L); default : return jjMoveNfa_2(0, 0); } } private int jjMoveStringLiteralDfa1_2(long active0) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_2(0, active0); return 1; } switch(curChar) { case 47: if ((active0 & 0x800L) != 0L) return jjStopAtPos(1, 11); break; default : break; } return jjStartNfa_2(0, active0); } private int jjMoveNfa_2(int startState, int curPos) { int startsAt = 0; jjnewStateCnt = 3; int i = 1; jjstateSet[0] = startState; int kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; do { switch(jjstateSet[--i]) { case 0: if ((0x2400L & l) != 0L) { if (kind > 10) kind = 10; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 1; break; case 1: if (curChar == 10 && kind > 10) kind = 10; break; case 2: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 1; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); do { switch(jjstateSet[--i]) { default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); do { switch(jjstateSet[--i]) { default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } } } private int jjMoveStringLiteralDfa0_1() { return jjMoveNfa_1(4, 0); } private int jjMoveNfa_1(int startState, int curPos) { int startsAt = 0; jjnewStateCnt = 4; int i = 1; jjstateSet[0] = startState; int kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; do { switch(jjstateSet[--i]) { case 4: if ((0xffffffffffffdbffL & l) != 0L) { if (kind > 9) kind = 9; jjCheckNAddStates(42, 44); } else if ((0x2400L & l) != 0L) { if (kind > 9) kind = 9; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: if ((0xffffffffffffdbffL & l) == 0L) break; kind = 9; jjCheckNAddStates(42, 44); break; case 1: if ((0x2400L & l) != 0L && kind > 9) kind = 9; break; case 2: if (curChar == 10 && kind > 9) kind = 9; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); do { switch(jjstateSet[--i]) { case 4: case 0: kind = 9; jjCheckNAddStates(42, 44); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); do { switch(jjstateSet[--i]) { case 4: case 0: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 9) kind = 9; jjCheckNAddStates(42, 44); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 4 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } } } static final int[] jjnextStates = { 30, 31, 36, 37, 40, 41, 8, 19, 20, 22, 10, 12, 45, 47, 2, 4, 5, 8, 19, 20, 24, 22, 32, 33, 8, 40, 41, 8, 6, 7, 13, 14, 16, 21, 23, 25, 34, 35, 38, 39, 42, 43, 0, 1, 3, }; private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) { switch(hiByte) { case 0: return ((jjbitVec2[i2] & l2) != 0L); default : if ((jjbitVec0[i1] & l1) != 0L) return true; return false; } } private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2) { switch(hiByte) { case 0: return ((jjbitVec4[i2] & l2) != 0L); case 2: return ((jjbitVec5[i2] & l2) != 0L); case 3: return ((jjbitVec6[i2] & l2) != 0L); case 4: return ((jjbitVec7[i2] & l2) != 0L); case 5: return ((jjbitVec8[i2] & l2) != 0L); case 6: return ((jjbitVec9[i2] & l2) != 0L); case 7: return ((jjbitVec10[i2] & l2) != 0L); case 9: return ((jjbitVec11[i2] & l2) != 0L); case 10: return ((jjbitVec12[i2] & l2) != 0L); case 11: return ((jjbitVec13[i2] & l2) != 0L); case 12: return ((jjbitVec14[i2] & l2) != 0L); case 13: return ((jjbitVec15[i2] & l2) != 0L); case 14: return ((jjbitVec16[i2] & l2) != 0L); case 15: return ((jjbitVec17[i2] & l2) != 0L); case 16: return ((jjbitVec18[i2] & l2) != 0L); case 17: return ((jjbitVec19[i2] & l2) != 0L); case 18: return ((jjbitVec20[i2] & l2) != 0L); case 19: return ((jjbitVec21[i2] & l2) != 0L); case 20: return ((jjbitVec0[i2] & l2) != 0L); case 22: return ((jjbitVec22[i2] & l2) != 0L); case 23: return ((jjbitVec23[i2] & l2) != 0L); case 24: return ((jjbitVec24[i2] & l2) != 0L); case 30: return ((jjbitVec25[i2] & l2) != 0L); case 31: return ((jjbitVec26[i2] & l2) != 0L); case 32: return ((jjbitVec27[i2] & l2) != 0L); case 33: return ((jjbitVec28[i2] & l2) != 0L); case 48: return ((jjbitVec29[i2] & l2) != 0L); case 49: return ((jjbitVec30[i2] & l2) != 0L); case 77: return ((jjbitVec31[i2] & l2) != 0L); case 159: return ((jjbitVec32[i2] & l2) != 0L); case 164: return ((jjbitVec33[i2] & l2) != 0L); case 215: return ((jjbitVec34[i2] & l2) != 0L); case 250: return ((jjbitVec35[i2] & l2) != 0L); case 251: return ((jjbitVec36[i2] & l2) != 0L); case 253: return ((jjbitVec37[i2] & l2) != 0L); case 254: return ((jjbitVec38[i2] & l2) != 0L); case 255: return ((jjbitVec39[i2] & l2) != 0L); default : if ((jjbitVec3[i1] & l1) != 0L) return true; return false; } } private static final boolean jjCanMove_2(int hiByte, int i1, int i2, long l1, long l2) { switch(hiByte) { case 0: return ((jjbitVec4[i2] & l2) != 0L); case 2: return ((jjbitVec5[i2] & l2) != 0L); case 3: return ((jjbitVec6[i2] & l2) != 0L); case 4: return ((jjbitVec7[i2] & l2) != 0L); case 5: return ((jjbitVec8[i2] & l2) != 0L); case 6: return ((jjbitVec40[i2] & l2) != 0L); case 7: return ((jjbitVec10[i2] & l2) != 0L); case 9: return ((jjbitVec41[i2] & l2) != 0L); case 10: return ((jjbitVec42[i2] & l2) != 0L); case 11: return ((jjbitVec43[i2] & l2) != 0L); case 12: return ((jjbitVec44[i2] & l2) != 0L); case 13: return ((jjbitVec45[i2] & l2) != 0L); case 14: return ((jjbitVec46[i2] & l2) != 0L); case 15: return ((jjbitVec17[i2] & l2) != 0L); case 16: return ((jjbitVec47[i2] & l2) != 0L); case 17: return ((jjbitVec19[i2] & l2) != 0L); case 18: return ((jjbitVec20[i2] & l2) != 0L); case 19: return ((jjbitVec21[i2] & l2) != 0L); case 20: return ((jjbitVec0[i2] & l2) != 0L); case 22: return ((jjbitVec22[i2] & l2) != 0L); case 23: return ((jjbitVec23[i2] & l2) != 0L); case 24: return ((jjbitVec24[i2] & l2) != 0L); case 30: return ((jjbitVec25[i2] & l2) != 0L); case 31: return ((jjbitVec26[i2] & l2) != 0L); case 32: return ((jjbitVec27[i2] & l2) != 0L); case 33: return ((jjbitVec28[i2] & l2) != 0L); case 48: return ((jjbitVec29[i2] & l2) != 0L); case 49: return ((jjbitVec30[i2] & l2) != 0L); case 77: return ((jjbitVec31[i2] & l2) != 0L); case 159: return ((jjbitVec32[i2] & l2) != 0L); case 164: return ((jjbitVec33[i2] & l2) != 0L); case 215: return ((jjbitVec34[i2] & l2) != 0L); case 250: return ((jjbitVec35[i2] & l2) != 0L); case 251: return ((jjbitVec36[i2] & l2) != 0L); case 253: return ((jjbitVec37[i2] & l2) != 0L); case 254: return ((jjbitVec38[i2] & l2) != 0L); case 255: return ((jjbitVec39[i2] & l2) != 0L); default : if ((jjbitVec3[i1] & l1) != 0L) return true; return false; } } /** Token literal values. */ public static final String[] jjstrLiteralImages = { "", null, null, null, null, null, null, null, null, null, null, null, null, "\141\142\163\164\162\141\143\164", "\141\163\163\145\162\164", "\142\157\157\154\145\141\156", "\142\162\145\141\153", "\142\171\164\145", "\143\141\163\145", "\143\141\164\143\150", "\143\150\141\162", "\143\154\141\163\163", "\143\157\156\163\164", "\143\157\156\164\151\156\165\145", "\144\145\146\141\165\154\164", "\144\157", "\144\157\165\142\154\145", "\145\154\163\145", "\145\156\165\155", "\145\170\164\145\156\144\163", "\146\141\154\163\145", "\146\151\156\141\154", "\146\151\156\141\154\154\171", "\146\154\157\141\164", "\146\157\162", "\147\157\164\157", "\151\146", "\151\155\160\154\145\155\145\156\164\163", "\151\155\160\157\162\164", "\151\156\163\164\141\156\143\145\157\146", "\151\156\164", "\151\156\164\145\162\146\141\143\145", "\154\157\156\147", "\156\141\164\151\166\145", "\156\145\167", "\156\165\154\154", "\160\141\143\153\141\147\145", "\160\162\151\166\141\164\145", "\160\162\157\164\145\143\164\145\144", "\160\165\142\154\151\143", "\162\145\164\165\162\156", "\163\150\157\162\164", "\163\164\141\164\151\143", "\163\164\162\151\143\164\146\160", "\163\165\160\145\162", "\163\167\151\164\143\150", "\163\171\156\143\150\162\157\156\151\172\145\144", "\164\150\151\163", "\164\150\162\157\167", "\164\150\162\157\167\163", "\164\162\141\156\163\151\145\156\164", "\164\162\165\145", "\164\162\171", "\166\157\151\144", "\166\157\154\141\164\151\154\145", "\167\150\151\154\145", null, null, null, null, null, null, null, null, null, null, null, "\50", "\51", "\173", "\175", "\133", "\135", "\73", "\54", "\56", "\100", "\75", "\76", "\74", "\41", "\176", "\77", "\72", "\75\75", "\74\75", "\76\75", "\41\75", "\174\174", "\46\46", "\53\53", "\55\55", "\53", "\55", "\52", "\57", "\46", "\174", "\136", "\45", "\74\74", "\53\75", "\55\75", "\52\75", "\57\75", "\46\75", "\174\75", "\136\75", "\45\75", "\74\74\75", "\76\76\75", "\76\76\76\75", "\56\56\56", }; /** Lexer state names. */ public static final String[] lexStateNames = { "DEFAULT", "IN_SINGLE_LINE_COMMENT", "IN_MULTI_LINE_COMMENT", }; /** Lex State array. */ public static final int[] jjnewLexState = { -1, -1, -1, -1, -1, -1, -1, 2, 1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, }; static final long[] jjtoToken = { 0xffffffffffffe001L, 0x7ffffffffffe747L, }; static final long[] jjtoSkip = { 0xf7eL, 0x0L, }; static final long[] jjtoSpecial = { 0xf00L, 0x0L, }; static final long[] jjtoMore = { 0x1080L, 0x0L, }; protected JavaCharStream input_stream; private final int[] jjrounds = new int[48]; private final int[] jjstateSet = new int[96]; private final StringBuffer jjimage = new StringBuffer(); private StringBuffer image = jjimage; private int jjimageLen; private int lengthOfMatch; protected char curChar; /** Constructor. */ public JavaParserTokenManager(JavaCharStream stream){ if (JavaCharStream.staticFlag) throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); input_stream = stream; } /** Constructor. */ public JavaParserTokenManager(JavaCharStream stream, int lexState){ this(stream); SwitchTo(lexState); } /** Reinitialise parser. */ public void ReInit(JavaCharStream stream) { jjmatchedPos = jjnewStateCnt = 0; curLexState = defaultLexState; input_stream = stream; ReInitRounds(); } private void ReInitRounds() { int i; jjround = 0x80000001; for (i = 48; i-- > 0;) jjrounds[i] = 0x80000000; } /** Reinitialise parser. */ public void ReInit(JavaCharStream stream, int lexState) { ReInit(stream); SwitchTo(lexState); } /** Switch to specified lex state. */ public void SwitchTo(int lexState) { if (lexState >= 3 || lexState < 0) throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); else curLexState = lexState; } protected Token jjFillToken() { final Token t; final String curTokenImage; final int beginLine; final int endLine; final int beginColumn; final int endColumn; if (jjmatchedPos < 0) { if (image == null) curTokenImage = ""; else curTokenImage = image.toString(); beginLine = endLine = input_stream.getBeginLine(); beginColumn = endColumn = input_stream.getBeginColumn(); } else { String im = jjstrLiteralImages[jjmatchedKind]; curTokenImage = (im == null) ? input_stream.GetImage() : im; beginLine = input_stream.getBeginLine(); beginColumn = input_stream.getBeginColumn(); endLine = input_stream.getEndLine(); endColumn = input_stream.getEndColumn(); } t = Token.newToken(jjmatchedKind, curTokenImage); t.beginLine = beginLine; t.endLine = endLine; t.beginColumn = beginColumn; t.endColumn = endColumn; return t; } int curLexState = 0; int defaultLexState = 0; int jjnewStateCnt; int jjround; int jjmatchedPos; int jjmatchedKind; /** Get the next Token. */ public Token getNextToken() { Token specialToken = null; Token matchedToken; int curPos = 0; EOFLoop : for (;;) { try { curChar = input_stream.BeginToken(); } catch(java.io.IOException e) { jjmatchedKind = 0; matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; return matchedToken; } image = jjimage; image.setLength(0); jjimageLen = 0; for (;;) { switch(curLexState) { case 0: try { input_stream.backup(0); while (curChar <= 32 && (0x104003600L & (1L << curChar)) != 0L) curChar = input_stream.BeginToken(); } catch (java.io.IOException e1) { continue EOFLoop; } jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); break; case 1: jjmatchedKind = 9; jjmatchedPos = -1; curPos = 0; curPos = jjMoveStringLiteralDfa0_1(); if (jjmatchedPos < 0 || (jjmatchedPos == 0 && jjmatchedKind > 12)) { jjmatchedKind = 12; jjmatchedPos = 0; } break; case 2: jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_2(); if (jjmatchedPos == 0 && jjmatchedKind > 12) { jjmatchedKind = 12; } break; } if (jjmatchedKind != 0x7fffffff) { if (jjmatchedPos + 1 < curPos) input_stream.backup(curPos - jjmatchedPos - 1); if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; return matchedToken; } else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); if (specialToken == null) specialToken = matchedToken; else { matchedToken.specialToken = specialToken; specialToken = (specialToken.next = matchedToken); } SkipLexicalActions(matchedToken); } else SkipLexicalActions(null); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; continue EOFLoop; } MoreLexicalActions(); if (jjnewLexState[jjmatchedKind] != -1) curLexState = jjnewLexState[jjmatchedKind]; curPos = 0; jjmatchedKind = 0x7fffffff; try { curChar = input_stream.readChar(); continue; } catch (java.io.IOException e1) { } } int error_line = input_stream.getEndLine(); int error_column = input_stream.getEndColumn(); String error_after = null; boolean EOFSeen = false; try { input_stream.readChar(); input_stream.backup(1); } catch (java.io.IOException e1) { EOFSeen = true; error_after = curPos <= 1 ? "" : input_stream.GetImage(); if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; } else error_column++; } if (!EOFSeen) { input_stream.backup(1); error_after = curPos <= 1 ? "" : input_stream.GetImage(); } throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); } } } void SkipLexicalActions(Token matchedToken) { switch(jjmatchedKind) { case 8 : image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); _iSingleComments++; break; case 10 : image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); _iMultiComments++; _iMultiCommentsLast++; break; case 11 : image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); _iMultiComments++; _iMultiCommentsLast++; break; default : break; } } void MoreLexicalActions() { jjimageLen += (lengthOfMatch = jjmatchedPos + 1); switch(jjmatchedKind) { case 7 : image.append(input_stream.GetSuffix(jjimageLen)); jjimageLen = 0; _iMultiCommentsLast = 0; break; default : break; } } private void jjCheckNAdd(int state) { if (jjrounds[state] != jjround) { jjstateSet[jjnewStateCnt++] = state; jjrounds[state] = jjround; } } private void jjAddStates(int start, int end) { do { jjstateSet[jjnewStateCnt++] = jjnextStates[start]; } while (start++ != end); } private void jjCheckNAddTwoStates(int state1, int state2) { jjCheckNAdd(state1); jjCheckNAdd(state2); } private void jjCheckNAddStates(int start, int end) { do { jjCheckNAdd(jjnextStates[start]); } while (start++ != end); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/ParseException.java0000644000175000017500000002015411343534515032262 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */ /* JavaCCOptions:KEEP_LINE_COL=null */ package net.sourceforge.cobertura.javancss.parser; /** * This exception is thrown when parse errors are encountered. * You can explicitly create objects of this exception type by * calling the method generateParseException in the generated * parser. * * You can modify this class to customize your error reporting * mechanisms so long as you retain the public fields. */ public class ParseException extends Exception { /** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", * "expectedTokenSequences", and "tokenImage" set. The boolean * flag "specialConstructor" is also set to true to indicate that * this constructor was used to create this object. * This constructor calls its super class with the empty string * to force the "toString" method of parent class "Throwable" to * print the error message in the form: * ParseException: */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal ) { super(""); specialConstructor = true; currentToken = currentTokenVal; expectedTokenSequences = expectedTokenSequencesVal; tokenImage = tokenImageVal; } /** * The following constructors are for use by you for whatever * purpose you can think of. Constructing the exception in this * manner makes the exception behave in the normal way - i.e., as * documented in the class "Throwable". The fields "errorToken", * "expectedTokenSequences", and "tokenImage" do not contain * relevant information. The JavaCC generated code does not use * these constructors. */ public ParseException() { super(); specialConstructor = false; } /** Constructor with message. */ public ParseException(String message) { super(message); specialConstructor = false; } /** * This variable determines which constructor was used to create * this object and thereby affects the semantics of the * "getMessage" method (see below). */ protected boolean specialConstructor; /** * This is the last token that has been consumed successfully. If * this object has been created due to a parse error, the token * followng this token will (therefore) be the first error token. */ public Token currentToken; /** * Each entry in this array is an array of integers. Each array * of integers represents a sequence of tokens (by their ordinal * values) that is expected at this point of the parse. */ public int[][] expectedTokenSequences; /** * This is a reference to the "tokenImage" array of the generated * parser within which the parse error occurred. This array is * defined in the generated ...Constants interface. */ public String[] tokenImage; /** * This method has the standard behavior when this object has been * created using the standard constructors. Otherwise, it uses * "currentToken" and "expectedTokenSequences" to generate a parse * error message and returns it. If this object has been created * due to a parse error, and you do not catch it (it gets thrown * from the parser), then this method is called during the printing * of the final stack trace, and hence the correct error message * gets displayed. */ public String getMessage() { if (!specialConstructor) { return super.getMessage(); } StringBuffer expected = new StringBuffer(); int maxSize = 0; for (int i = 0; i < expectedTokenSequences.length; i++) { if (maxSize < expectedTokenSequences[i].length) { maxSize = expectedTokenSequences[i].length; } for (int j = 0; j < expectedTokenSequences[i].length; j++) { expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' '); } if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { expected.append("..."); } expected.append(eol).append(" "); } String retval = "Encountered \""; Token tok = currentToken.next; for (int i = 0; i < maxSize; i++) { if (i != 0) retval += " "; if (tok.kind == 0) { retval += tokenImage[0]; break; } retval += " " + tokenImage[tok.kind]; retval += " \""; retval += add_escapes(tok.image); retval += " \""; tok = tok.next; } retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; retval += "." + eol; if (expectedTokenSequences.length == 1) { retval += "Was expecting:" + eol + " "; } else { retval += "Was expecting one of:" + eol + " "; } retval += expected.toString(); return retval; } /** * The end of line string for this machine. */ protected String eol = System.getProperty("line.separator", "\n"); /** * Used to convert raw characters to their escaped version * when these raw version cannot be used as part of an ASCII * string literal. */ protected String add_escapes(String str) { StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) { case 0 : continue; case '\b': retval.append("\\b"); continue; case '\t': retval.append("\\t"); continue; case '\n': retval.append("\\n"); continue; case '\f': retval.append("\\f"); continue; case '\r': retval.append("\\r"); continue; case '\"': retval.append("\\\""); continue; case '\'': retval.append("\\\'"); continue; case '\\': retval.append("\\\\"); continue; default: if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { String s = "0000" + Integer.toString(ch, 16); retval.append("\\u" + s.substring(s.length() - 4, s.length())); } else { retval.append(ch); } continue; } } return retval.toString(); } } /* JavaCC - OriginalChecksum=849b618d99607c5b3309cfe8560c9c1d (do not edit this line) */ cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/JavaParserInterface.java0000644000175000017500000000471711343534515033217 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ package net.sourceforge.cobertura.javancss.parser; import java.util.*; public interface JavaParserInterface { public void parse() throws Exception; public void parseImportUnit() throws Exception; public int getNcss(); public int getLOC(); // added by SMS public int getJvdc(); /*public int getTopLevelClasses() { return _topLevelClasses; }*/ public List/**/ getFunction(); /** * @return Top level classes in sorted order */ public List/**/ getObject(); /** * @return The empty package consists of the name ".". */ public Map/**/ getPackage(); public List getImports(); /** * name, beginLine, ... */ public Object[] getPackageObjects(); /** * if javancss is used with cat *.java a long * input stream might get generated, so line * number information in case of an parse exception * is not very useful. */ public String getLastFunction(); } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/TokenMgrError.java0000644000175000017500000001361011343534514032067 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */ /* JavaCCOptions: */ package net.sourceforge.cobertura.javancss.parser; /** Token Manager Error. */ public class TokenMgrError extends Error { /* * Ordinals for various reasons why an Error of this type can be thrown. */ /** * Lexical error occurred. */ static final int LEXICAL_ERROR = 0; /** * An attempt was made to create a second instance of a static token manager. */ static final int STATIC_LEXER_ERROR = 1; /** * Tried to change to an invalid lexical state. */ static final int INVALID_LEXICAL_STATE = 2; /** * Detected (and bailed out of) an infinite loop in the token manager. */ static final int LOOP_DETECTED = 3; /** * Indicates the reason why the exception is thrown. It will have * one of the above 4 values. */ int errorCode; /** * Replaces unprintable characters by their escaped (or unicode escaped) * equivalents in the given string */ protected static final String addEscapes(String str) { StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) { case 0 : continue; case '\b': retval.append("\\b"); continue; case '\t': retval.append("\\t"); continue; case '\n': retval.append("\\n"); continue; case '\f': retval.append("\\f"); continue; case '\r': retval.append("\\r"); continue; case '\"': retval.append("\\\""); continue; case '\'': retval.append("\\\'"); continue; case '\\': retval.append("\\\\"); continue; default: if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { String s = "0000" + Integer.toString(ch, 16); retval.append("\\u" + s.substring(s.length() - 4, s.length())); } else { retval.append(ch); } continue; } } return retval.toString(); } /** * Returns a detailed message for the Error when it is thrown by the * token manager to indicate a lexical error. * Parameters : * EOFSeen : indicates if EOF caused the lexical error * curLexState : lexical state in which this error occurred * errorLine : line number when the error occurred * errorColumn : column number when the error occurred * errorAfter : prefix that was seen before this error occurred * curchar : the offending character * Note: You can customize the lexical error message by modifying this method. */ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { return("Lexical error at line " + errorLine + ", column " + errorColumn + ". Encountered: " + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + "after : \"" + addEscapes(errorAfter) + "\""); } /** * You can also modify the body of this method to customize your error messages. * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not * of end-users concern, so you can return something like : * * "Internal Error : Please file a bug report .... " * * from this method for such cases in the release version of your parser. */ public String getMessage() { return super.getMessage(); } /* * Constructors of various flavors follow. */ /** No arg constructor. */ public TokenMgrError() { } /** Constructor with message and reason. */ public TokenMgrError(String message, int reason) { super(message); errorCode = reason; } /** Full Constructor. */ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); } } /* JavaCC - OriginalChecksum=941a67c25d5172a42378412878e36619 (do not edit this line) */ cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/parser/JavaParserConstants.java0000644000175000017500000002372211343534517033272 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Generated By:JavaCC: Do not edit this line. JavaParserConstants.java */ package net.sourceforge.cobertura.javancss.parser; /** * Token literal values and constants. * Generated by org.javacc.parser.OtherFilesGen#start() */ public interface JavaParserConstants { /** End of File. */ int EOF = 0; /** RegularExpression Id. */ int SINGLE_LINE_COMMENT = 8; /** RegularExpression Id. */ int SINGLE_LINE_COMMENT2 = 9; /** RegularExpression Id. */ int END_OF_LINE_MULTI = 10; /** RegularExpression Id. */ int MULTI_LINE_COMMENT = 11; /** RegularExpression Id. */ int ABSTRACT = 13; /** RegularExpression Id. */ int ASSERT = 14; /** RegularExpression Id. */ int BOOLEAN = 15; /** RegularExpression Id. */ int BREAK = 16; /** RegularExpression Id. */ int BYTE = 17; /** RegularExpression Id. */ int CASE = 18; /** RegularExpression Id. */ int CATCH = 19; /** RegularExpression Id. */ int CHAR = 20; /** RegularExpression Id. */ int CLASS = 21; /** RegularExpression Id. */ int CONST = 22; /** RegularExpression Id. */ int CONTINUE = 23; /** RegularExpression Id. */ int _DEFAULT = 24; /** RegularExpression Id. */ int DO = 25; /** RegularExpression Id. */ int DOUBLE = 26; /** RegularExpression Id. */ int ELSE = 27; /** RegularExpression Id. */ int ENUM = 28; /** RegularExpression Id. */ int EXTENDS = 29; /** RegularExpression Id. */ int FALSE = 30; /** RegularExpression Id. */ int FINAL = 31; /** RegularExpression Id. */ int FINALLY = 32; /** RegularExpression Id. */ int FLOAT = 33; /** RegularExpression Id. */ int FOR = 34; /** RegularExpression Id. */ int GOTO = 35; /** RegularExpression Id. */ int IF = 36; /** RegularExpression Id. */ int IMPLEMENTS = 37; /** RegularExpression Id. */ int IMPORT = 38; /** RegularExpression Id. */ int INSTANCEOF = 39; /** RegularExpression Id. */ int INT = 40; /** RegularExpression Id. */ int INTERFACE = 41; /** RegularExpression Id. */ int LONG = 42; /** RegularExpression Id. */ int NATIVE = 43; /** RegularExpression Id. */ int NEW = 44; /** RegularExpression Id. */ int NULL = 45; /** RegularExpression Id. */ int PACKAGE = 46; /** RegularExpression Id. */ int PRIVATE = 47; /** RegularExpression Id. */ int PROTECTED = 48; /** RegularExpression Id. */ int PUBLIC = 49; /** RegularExpression Id. */ int RETURN = 50; /** RegularExpression Id. */ int SHORT = 51; /** RegularExpression Id. */ int STATIC = 52; /** RegularExpression Id. */ int TESTAAAA = 53; /** RegularExpression Id. */ int SUPER = 54; /** RegularExpression Id. */ int SWITCH = 55; /** RegularExpression Id. */ int SYNCHRONIZED = 56; /** RegularExpression Id. */ int THIS = 57; /** RegularExpression Id. */ int THROW = 58; /** RegularExpression Id. */ int THROWS = 59; /** RegularExpression Id. */ int TRANSIENT = 60; /** RegularExpression Id. */ int TRUE = 61; /** RegularExpression Id. */ int TRY = 62; /** RegularExpression Id. */ int VOID = 63; /** RegularExpression Id. */ int VOLATILE = 64; /** RegularExpression Id. */ int WHILE = 65; /** RegularExpression Id. */ int INTEGER_LITERAL = 66; /** RegularExpression Id. */ int DECIMAL_LITERAL = 67; /** RegularExpression Id. */ int HEX_LITERAL = 68; /** RegularExpression Id. */ int OCTAL_LITERAL = 69; /** RegularExpression Id. */ int FLOATING_POINT_LITERAL = 70; /** RegularExpression Id. */ int EXPONENT = 71; /** RegularExpression Id. */ int CHARACTER_LITERAL = 72; /** RegularExpression Id. */ int STRING_LITERAL = 73; /** RegularExpression Id. */ int IDENTIFIER = 74; /** RegularExpression Id. */ int LETTER = 75; /** RegularExpression Id. */ int DIGIT = 76; /** RegularExpression Id. */ int LPAREN = 77; /** RegularExpression Id. */ int RPAREN = 78; /** RegularExpression Id. */ int LBRACE = 79; /** RegularExpression Id. */ int RBRACE = 80; /** RegularExpression Id. */ int LBRACKET = 81; /** RegularExpression Id. */ int RBRACKET = 82; /** RegularExpression Id. */ int SEMICOLON = 83; /** RegularExpression Id. */ int COMMA = 84; /** RegularExpression Id. */ int DOT = 85; /** RegularExpression Id. */ int AT = 86; /** RegularExpression Id. */ int ASSIGN = 87; /** RegularExpression Id. */ int GT = 88; /** RegularExpression Id. */ int LT = 89; /** RegularExpression Id. */ int BANG = 90; /** RegularExpression Id. */ int TILDE = 91; /** RegularExpression Id. */ int HOOK = 92; /** RegularExpression Id. */ int COLON = 93; /** RegularExpression Id. */ int EQ = 94; /** RegularExpression Id. */ int LE = 95; /** RegularExpression Id. */ int GE = 96; /** RegularExpression Id. */ int NE = 97; /** RegularExpression Id. */ int SC_OR = 98; /** RegularExpression Id. */ int SC_AND = 99; /** RegularExpression Id. */ int INCR = 100; /** RegularExpression Id. */ int DECR = 101; /** RegularExpression Id. */ int PLUS = 102; /** RegularExpression Id. */ int MINUS = 103; /** RegularExpression Id. */ int STAR = 104; /** RegularExpression Id. */ int SLASH = 105; /** RegularExpression Id. */ int BIT_AND = 106; /** RegularExpression Id. */ int BIT_OR = 107; /** RegularExpression Id. */ int XOR = 108; /** RegularExpression Id. */ int REM = 109; /** RegularExpression Id. */ int LSHIFT = 110; /** RegularExpression Id. */ int PLUSASSIGN = 111; /** RegularExpression Id. */ int MINUSASSIGN = 112; /** RegularExpression Id. */ int STARASSIGN = 113; /** RegularExpression Id. */ int SLASHASSIGN = 114; /** RegularExpression Id. */ int ANDASSIGN = 115; /** RegularExpression Id. */ int ORASSIGN = 116; /** RegularExpression Id. */ int XORASSIGN = 117; /** RegularExpression Id. */ int REMASSIGN = 118; /** RegularExpression Id. */ int LSHIFTASSIGN = 119; /** RegularExpression Id. */ int RSIGNEDSHIFTASSIGN = 120; /** RegularExpression Id. */ int RUNSIGNEDSHIFTASSIGN = 121; /** RegularExpression Id. */ int ELLIPSIS = 122; /** Lexical state. */ int DEFAULT = 0; /** Lexical state. */ int IN_SINGLE_LINE_COMMENT = 1; /** Lexical state. */ int IN_MULTI_LINE_COMMENT = 2; /** Literal token values. */ String[] tokenImage = { "", "\" \"", "\"\\t\"", "\"\\n\"", "\"\\r\"", "\"\\f\"", "\"\\u001a\"", "\"/*\"", "\"//\"", "", "", "\"*/\"", "", "\"abstract\"", "\"assert\"", "\"boolean\"", "\"break\"", "\"byte\"", "\"case\"", "\"catch\"", "\"char\"", "\"class\"", "\"const\"", "\"continue\"", "\"default\"", "\"do\"", "\"double\"", "\"else\"", "\"enum\"", "\"extends\"", "\"false\"", "\"final\"", "\"finally\"", "\"float\"", "\"for\"", "\"goto\"", "\"if\"", "\"implements\"", "\"import\"", "\"instanceof\"", "\"int\"", "\"interface\"", "\"long\"", "\"native\"", "\"new\"", "\"null\"", "\"package\"", "\"private\"", "\"protected\"", "\"public\"", "\"return\"", "\"short\"", "\"static\"", "\"strictfp\"", "\"super\"", "\"switch\"", "\"synchronized\"", "\"this\"", "\"throw\"", "\"throws\"", "\"transient\"", "\"true\"", "\"try\"", "\"void\"", "\"volatile\"", "\"while\"", "", "", "", "", "", "", "", "", "", "", "", "\"(\"", "\")\"", "\"{\"", "\"}\"", "\"[\"", "\"]\"", "\";\"", "\",\"", "\".\"", "\"@\"", "\"=\"", "\">\"", "\"<\"", "\"!\"", "\"~\"", "\"?\"", "\":\"", "\"==\"", "\"<=\"", "\">=\"", "\"!=\"", "\"||\"", "\"&&\"", "\"++\"", "\"--\"", "\"+\"", "\"-\"", "\"*\"", "\"/\"", "\"&\"", "\"|\"", "\"^\"", "\"%\"", "\"<<\"", "\"+=\"", "\"-=\"", "\"*=\"", "\"/=\"", "\"&=\"", "\"|=\"", "\"^=\"", "\"%=\"", "\"<<=\"", "\">>=\"", "\">>>=\"", "\"...\"", }; } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/Metric.java0000644000175000017500000000641011343534521027254 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Copyright (C) 2000 Chr. Clemens Lee . This file is part of JavaNCSS (http://www.kclee.com/clemens/java/javancss/). JavaNCSS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. JavaNCSS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with JavaNCSS; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package net.sourceforge.cobertura.javancss; /** * Base data class to store all metrics common to packages, objects and functions. * * @author Herv Boutemy * @version $Id: Metric.java 121 2009-01-17 22:19:45Z hboutemy $ */ public abstract class Metric implements Comparable { public String name = "."; /** Non Commenting Source Statements (NCSS). */ public int ncss = 0; public int javadocs = 0; public int javadocsLn = 0; public int singleLn = 0; public int multiLn = 0; public Metric() { super(); } public void clear() { name = "."; ncss = 0; javadocs = 0; javadocsLn = 0; singleLn = 0; multiLn = 0; } public String toString() { return name; } public int compareTo( Object o ) { return name.compareTo( ((Metric)o).name ); } public boolean equals( Object o ) { return compareTo( o ) == 0; } public int hashCode() { return name.hashCode(); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/javancss/FunctionMetric.java0000644000175000017500000000520511343534513030764 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * This file was taken from JavaNCSS * http://www.kclee.com/clemens/java/javancss/ * Copyright (C) 2000 Chr. Clemens Lee * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING * * WARNING TO COBERTURA DEVELOPERS * * DO NOT MODIFY THIS FILE! * * MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT. * * FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT * javancss/coberturaREADME.txt * * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ /* Copyright (C) 2000 Chr. Clemens Lee . This file is part of JavaNCSS (http://www.kclee.com/clemens/java/javancss/). JavaNCSS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. JavaNCSS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with JavaNCSS; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package net.sourceforge.cobertura.javancss; /** * Basic data class to store all metrics attached to a function. * * @author Herv Boutemy * @version $Id: FunctionMetric.java 121 2009-01-17 22:19:45Z hboutemy $ */ public class FunctionMetric extends Metric { public int ccn = 0; public FunctionMetric() { super(); } public void clear() { super.clear(); ccn = 0; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/0000755000175000017500000000000011345540725026007 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/LineData.java0000644000175000017500000002700111343534521030326 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Mark Sinke * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.io.IOException; import java.io.ObjectInputStream; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import net.sourceforge.cobertura.util.StringUtil; /** *

* This class implements HasBeenInstrumented so that when cobertura * instruments itself, it will omit this class. It does this to * avoid an infinite recursion problem because instrumented classes * make use of this class. *

*/ public class LineData implements Comparable, CoverageData, HasBeenInstrumented, Serializable { private static final long serialVersionUID = 4; private transient Lock lock; private long hits; private List jumps; private List switches; private final int lineNumber; private String methodDescriptor; private String methodName; LineData(int lineNumber) { this(lineNumber, null, null); } LineData(int lineNumber, String methodName, String methodDescriptor) { this.hits = 0; this.jumps = null; this.lineNumber = lineNumber; this.methodName = methodName; this.methodDescriptor = methodDescriptor; initLock(); } private void initLock() { lock = new ReentrantLock(); } /** * This is required because we implement Comparable. */ public int compareTo(Object o) { if (!o.getClass().equals(LineData.class)) return Integer.MAX_VALUE; return this.lineNumber - ((LineData)o).lineNumber; } public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || !(obj.getClass().equals(this.getClass()))) return false; LineData lineData = (LineData)obj; getBothLocks(lineData); try { return (this.hits == lineData.hits) && ((this.jumps == lineData.jumps) || ((this.jumps != null) && (this.jumps.equals(lineData.jumps)))) && ((this.switches == lineData.switches) || ((this.switches != null) && (this.switches.equals(lineData.switches)))) && (this.lineNumber == lineData.lineNumber) && (this.methodDescriptor.equals(lineData.methodDescriptor)) && (this.methodName.equals(lineData.methodName)); } finally { lock.unlock(); lineData.lock.unlock(); } } public double getBranchCoverageRate() { if (getNumberOfValidBranches() == 0) return 1d; lock.lock(); try { return ((double) getNumberOfCoveredBranches()) / getNumberOfValidBranches(); } finally { lock.unlock(); } } public String getConditionCoverage() { StringBuffer ret = new StringBuffer(); if (getNumberOfValidBranches() == 0) { ret.append(StringUtil.getPercentValue(1.0)); } else { lock.lock(); try { ret.append(StringUtil.getPercentValue(getBranchCoverageRate())); ret.append(" (").append(getNumberOfCoveredBranches()).append("/").append(getNumberOfValidBranches()).append(")"); } finally { lock.unlock(); } } return ret.toString(); } public long getHits() { lock.lock(); try { return hits; } finally { lock.unlock(); } } public boolean isCovered() { lock.lock(); try { return (getHits() > 0) && ((getNumberOfValidBranches() == 0) || ((1.0 - getBranchCoverageRate()) < 0.0001)); } finally { lock.unlock(); } } public double getLineCoverageRate() { return (getHits() > 0) ? 1 : 0; } public int getLineNumber() { return lineNumber; } public String getMethodDescriptor() { lock.lock(); try { return methodDescriptor; } finally { lock.unlock(); } } public String getMethodName() { lock.lock(); try { return methodName; } finally { lock.unlock(); } } /** * @see net.sourceforge.cobertura.coveragedata.CoverageData#getNumberOfCoveredBranches() */ /*public int getNumberOfCoveredBranches() { if (this.branches == null) return 0; int covered = 0; for (Iterator i = this.branches.iterator(); i.hasNext(); covered += ((BranchData) i.next()).getNumberOfCoveredBranches()); return covered; }*/ public int getNumberOfCoveredLines() { return (getHits() > 0) ? 1 : 0; } public int getNumberOfValidBranches() { int ret = 0; lock.lock(); try { if (jumps != null) for (int i = jumps.size() - 1; i >= 0; i--) ret += ((JumpData) jumps.get(i)).getNumberOfValidBranches(); if (switches != null) for (int i = switches.size() - 1; i >= 0; i--) ret += ((SwitchData) switches.get(i)).getNumberOfValidBranches(); return ret; } finally { lock.unlock(); } } public int getNumberOfCoveredBranches() { int ret = 0; lock.lock(); try { if (jumps != null) for (int i = jumps.size() - 1; i >= 0; i--) ret += ((JumpData) jumps.get(i)).getNumberOfCoveredBranches(); if (switches != null) for (int i = switches.size() - 1; i >= 0; i--) ret += ((SwitchData) switches.get(i)).getNumberOfCoveredBranches(); return ret; } finally { lock.unlock(); } } public int getNumberOfValidLines() { return 1; } public int hashCode() { return this.lineNumber; } public boolean hasBranch() { lock.lock(); try { return (jumps != null) || (switches != null); } finally { lock.unlock(); } } public void merge(CoverageData coverageData) { LineData lineData = (LineData)coverageData; getBothLocks(lineData); try { this.hits += lineData.hits; if (lineData.jumps != null) if (this.jumps == null) this.jumps = lineData.jumps; else { for (int i = Math.min(this.jumps.size(), lineData.jumps.size()) - 1; i >= 0; i--) ((JumpData) this.jumps.get(i)).merge((JumpData) lineData.jumps.get(i)); for (int i = Math.min(this.jumps.size(), lineData.jumps.size()); i < lineData.jumps.size(); i++) this.jumps.add(lineData.jumps.get(i)); } if (lineData.switches != null) if (this.switches == null) this.switches = lineData.switches; else { for (int i = Math.min(this.switches.size(), lineData.switches.size()) - 1; i >= 0; i--) ((SwitchData) this.switches.get(i)).merge((SwitchData) lineData.switches.get(i)); for (int i = Math.min(this.switches.size(), lineData.switches.size()); i < lineData.switches.size(); i++) this.switches.add(lineData.switches.get(i)); } if (lineData.methodName != null) this.methodName = lineData.methodName; if (lineData.methodDescriptor != null) this.methodDescriptor = lineData.methodDescriptor; } finally { lock.unlock(); lineData.lock.unlock(); } } void addJump(int jumpNumber) { getJumpData(jumpNumber); } void addSwitch(int switchNumber, int[] keys) { getSwitchData(switchNumber, new SwitchData(switchNumber, keys)); } void addSwitch(int switchNumber, int min, int max) { getSwitchData(switchNumber, new SwitchData(switchNumber, min, max)); } void setMethodNameAndDescriptor(String name, String descriptor) { lock.lock(); try { this.methodName = name; this.methodDescriptor = descriptor; } finally { lock.unlock(); } } void touch(int new_hits) { lock.lock(); try { this.hits+=new_hits; } finally { lock.unlock(); } } void touchJump(int jumpNumber, boolean branch,int hits) { getJumpData(jumpNumber).touchBranch(branch,hits); } void touchSwitch(int switchNumber, int branch,int hits) { getSwitchData(switchNumber, null).touchBranch(branch,hits); } public int getConditionSize() { lock.lock(); try { return ((jumps == null) ? 0 : jumps.size()) + ((switches == null) ? 0 :switches.size()); } finally { lock.unlock(); } } public Object getConditionData(int index) { Object branchData = null; lock.lock(); try { int jumpsSize = (jumps == null) ? 0 : jumps.size(); int switchesSize = (switches == null) ? 0 :switches.size(); if (index < jumpsSize) { branchData = jumps.get(index); } else if (index < jumpsSize + switchesSize) { branchData = switches.get(index - jumpsSize); } return branchData; } finally { lock.unlock(); } } public String getConditionCoverage(int index) { Object branchData = getConditionData(index); if (branchData == null) { return StringUtil.getPercentValue(1.0); } else if (branchData instanceof JumpData) { JumpData jumpData = (JumpData) branchData; return StringUtil.getPercentValue(jumpData.getBranchCoverageRate()); } else { SwitchData switchData = (SwitchData) branchData; return StringUtil.getPercentValue(switchData.getBranchCoverageRate()); } } JumpData getJumpData(int jumpNumber) { lock.lock(); try { if (jumps == null) { jumps = new ArrayList(); } if (jumps.size() <= jumpNumber) { for (int i = jumps.size(); i <= jumpNumber; jumps.add(new JumpData(i++))); } return (JumpData) jumps.get(jumpNumber); } finally { lock.unlock(); } } SwitchData getSwitchData(int switchNumber, SwitchData data) { lock.lock(); try { if (switches == null) { switches = new ArrayList(); } if (switches.size() < switchNumber) { for (int i = switches.size(); i < switchNumber; switches.add(new SwitchData(i++))); } if (switches.size() == switchNumber) if (data != null) switches.add(data); else switches.add(new SwitchData(switchNumber)); return (SwitchData) switches.get(switchNumber); } finally { lock.unlock(); } } private void getBothLocks(LineData other) { /* * To prevent deadlock, we need to get both locks or none at all. * * When this method returns, the thread will have both locks. * Make sure you unlock them! */ boolean myLock = false; boolean otherLock = false; while ((!myLock) || (!otherLock)) { try { myLock = lock.tryLock(); otherLock = other.lock.tryLock(); } finally { if ((!myLock) || (!otherLock)) { //could not obtain both locks - so unlock the one we got. if (myLock) { lock.unlock(); } if (otherLock) { other.lock.unlock(); } //do a yield so the other threads will get to work. Thread.yield(); } } } } private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); initLock(); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/CoverageData.java0000644000175000017500000000264511343534515031204 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; public interface CoverageData { double getBranchCoverageRate(); double getLineCoverageRate(); int getNumberOfCoveredBranches(); int getNumberOfCoveredLines(); int getNumberOfValidBranches(); int getNumberOfValidLines(); /** * Warning: This is generally implemented as a * "shallow" merge. For our current use, this * should be fine, but in the future it may make * sense to modify the merge methods of the * various classes to do a deep copy of the * appropriate objects. */ void merge(CoverageData coverageData); } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/TouchCollector.java0000644000175000017500000001642511343534521031606 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2010 Piotr Tabor * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; import net.sourceforge.cobertura.coveragedata.countermaps.AtomicCounterMap; import net.sourceforge.cobertura.coveragedata.countermaps.CounterMap; public class TouchCollector implements HasBeenInstrumented{ private static final CounterMap touchedLines=new AtomicCounterMap(); private static final CounterMap switchTouchData=new AtomicCounterMap(); private static final CounterMap jumpTouchData=new AtomicCounterMap(); private static AtomicInteger lastClassId=new AtomicInteger(1); private static final Map class2classId=new ConcurrentHashMap(); private static final Map classId2class=new ConcurrentHashMap(); static{ ProjectData.initialize(); } private static final int registerClassData(String name){ Integer res=class2classId.get(name); if (res==null){ int new_id=lastClassId.incrementAndGet(); class2classId.put(name, new_id); classId2class.put(new_id, name); return new_id; } return res; } /** * This method is only called by code that has been instrumented. It * is not called by any of the Cobertura code or ant tasks. */ public static final void touchSwitch(String classId,int lineNumber, int switchNumber, int branch) { switchTouchData.incrementValue(new SwitchTouchData(registerClassData(classId),lineNumber, switchNumber, branch)); } /** * This method is only called by code that has been instrumented. It * is not called by any of the Cobertura code or ant tasks. */ public static final void touch(String classId,int lineNumber) { touchedLines.incrementValue(new LineTouchData(registerClassData(classId), lineNumber)); } /** * This method is only called by code that has been instrumented. It * is not called by any of the Cobertura code or ant tasks. */ public static final void touchJump(String classId,int lineNumber, int branchNumber, boolean branch) { jumpTouchData.incrementValue(new JumpTouchData(registerClassData(classId),lineNumber, branchNumber, branch)); } private static class LineTouchData implements HasBeenInstrumented{ int classId,lineNumber; public LineTouchData(int classId,int lineNumber) { this.classId=classId; this.lineNumber=lineNumber; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + classId; result = prime * result + lineNumber; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; LineTouchData other = (LineTouchData) obj; if (classId != other.classId) return false; if (lineNumber != other.lineNumber) return false; return true; } } private static class SwitchTouchData extends LineTouchData implements HasBeenInstrumented{ int switchNumber, branch; public SwitchTouchData(int classId,int lineNumber, int switchNumber, int branch) { super(classId,lineNumber); this.switchNumber=switchNumber; this.branch=branch; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + branch; result = prime * result + switchNumber; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; SwitchTouchData other = (SwitchTouchData) obj; if (branch != other.branch) return false; if (switchNumber != other.switchNumber) return false; return true; } } private static class JumpTouchData extends LineTouchData implements HasBeenInstrumented{ int branchNumber; boolean branch; public JumpTouchData(int classId,int lineNumber, int branchNumber, boolean branch) { super(classId, lineNumber); this.branchNumber=branchNumber; this.branch=branch; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + (branch ? 1231 : 1237); result = prime * result + branchNumber; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; JumpTouchData other = (JumpTouchData) obj; if (branch != other.branch) return false; if (branchNumber != other.branchNumber) return false; return true; } } public static synchronized void applyTouchesOnProjectData(ProjectData projectData){ System.out.println("Flushing results..."); Map touches=touchedLines.getFinalStateAndCleanIt(); for(Entry touch:touches.entrySet()){ if(touch.getValue()>0){ getClassFor(touch.getKey(),projectData).touch(touch.getKey().lineNumber,touch.getValue()); } } Map switchTouches=switchTouchData.getFinalStateAndCleanIt(); for(Entry touch:switchTouches.entrySet()){ if(touch.getValue()>0){ getClassFor(touch.getKey(),projectData).touchSwitch( touch.getKey().lineNumber, touch.getKey().switchNumber, touch.getKey().branch,touch.getValue()); } } Map jumpTouches=jumpTouchData.getFinalStateAndCleanIt(); for(Entry touch:jumpTouches.entrySet()){ if(touch.getValue()>0){ getClassFor(touch.getKey(),projectData).touchJump( touch.getKey().lineNumber, touch.getKey().branchNumber, touch.getKey().branch,touch.getValue()); } } System.out.println("Flushing results done"); } private static ClassData getClassFor(LineTouchData key,ProjectData projectData) { // System.out.println("\nLooking for:"+key.classId+"\n"); return projectData.getOrCreateClassData(classId2class.get(key.classId)); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/CoverageDataFileHandler.java0000644000175000017500000001174511343534521033300 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2007 Joakim Erdfelt * Copyright (C) 2007 Ignat Zapolsky * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import net.sourceforge.cobertura.util.ConfigurationUtil; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.OutputStream; /** * This contains methods used for reading and writing the * "cobertura.ser" file. */ public abstract class CoverageDataFileHandler implements HasBeenInstrumented { private static File defaultFile = null; public static File getDefaultDataFile() { // return cached defaultFile if (defaultFile != null) { return defaultFile; } // load and cache datafile configuration ConfigurationUtil config = new ConfigurationUtil(); defaultFile = new File(config.getDatafile()); return defaultFile; } public static ProjectData loadCoverageData(File dataFile) { InputStream is = null; //System.out.println("Cobertura: Loading coverage data from " + dataFile.getAbsolutePath()); try { is = new BufferedInputStream(new FileInputStream(dataFile), 16384); return loadCoverageData(is); } catch (IOException e) { System.err.println("Cobertura: Error reading file " + dataFile.getAbsolutePath() + ": " + e.getLocalizedMessage()); return null; } finally { if (is != null) try { is.close(); } catch (IOException e) { System.err.println("Cobertura: Error closing file " + dataFile.getAbsolutePath() + ": " + e.getLocalizedMessage()); } } } private static ProjectData loadCoverageData(InputStream dataFile) throws IOException { ObjectInputStream objects = null; try { objects = new ObjectInputStream(dataFile); ProjectData projectData = (ProjectData)objects.readObject(); System.out.println("Cobertura: Loaded information on " + projectData.getNumberOfClasses() + " classes."); return projectData; } catch (IOException e) { throw e; } catch (Exception e) { System.err.println("Cobertura: Error reading from object stream."); e.printStackTrace(); return null; } finally { if (objects != null) { try { objects.close(); } catch (IOException e) { System.err .println("Cobertura: Error closing object stream."); e.printStackTrace(); } } } } public static void saveCoverageData(ProjectData projectData, File dataFile) { FileOutputStream os = null; //System.out.println("Cobertura: Saving coverage data to " + dataFile.getAbsolutePath()); try { File dataDir = dataFile.getParentFile(); if( (dataDir != null) && !dataDir.exists() ) { dataDir.mkdirs(); } os = new FileOutputStream(dataFile); saveCoverageData(projectData, os); } catch (IOException e) { System.err.println("Cobertura: Error writing file " + dataFile.getAbsolutePath()); e.printStackTrace(); } finally { if (os != null) { try { os.close(); } catch (IOException e) { System.err.println("Cobertura: Error closing file " + dataFile.getAbsolutePath()); e.printStackTrace(); } } } } private static void saveCoverageData(ProjectData projectData, OutputStream dataFile) { ObjectOutputStream objects = null; try { objects = new ObjectOutputStream(dataFile); objects.writeObject(projectData); System.out.println("Cobertura: Saved information on " + projectData.getNumberOfClasses() + " classes."); } catch (IOException e) { System.err.println("Cobertura: Error writing to object stream."); e.printStackTrace(); } finally { if (objects != null) { try { objects.close(); } catch (IOException e) { System.err .println("Cobertura: Error closing object stream."); e.printStackTrace(); } } } } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/CoverageDataContainer.java0000644000175000017500000002075511343534515033051 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Jeremy Thomerson * Copyright (C) 2005 Mark Sinke * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.io.IOException; import java.io.ObjectInputStream; import java.io.Serializable; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** *

* Coverage data information is typically serialized to a file. *

* *

* This class implements HasBeenInstrumented so that when cobertura * instruments itself, it will omit this class. It does this to * avoid an infinite recursion problem because instrumented classes * make use of this class. *

*/ public abstract class CoverageDataContainer implements CoverageData, HasBeenInstrumented, Serializable { private static final long serialVersionUID = 2; protected transient Lock lock; /** * Each key is the name of a child, usually stored as a String or * an Integer object. Each value is information about the child, * stored as an object that implements the CoverageData interface. */ Map children = new HashMap(); public CoverageDataContainer() { initLock(); } private void initLock() { lock = new ReentrantLock(); } /** * Determine if this CoverageDataContainer is equal to * another one. Subclasses should override this and * make sure they implement the hashCode method. * * @param obj An object to test for equality. * @return True if the objects are equal. */ public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || !(obj.getClass().equals(this.getClass()))) return false; CoverageDataContainer coverageDataContainer = (CoverageDataContainer)obj; lock.lock(); try { return this.children.equals(coverageDataContainer.children); } finally { lock.unlock(); } } /** * @return The average branch coverage rate for all children * in this container. */ public double getBranchCoverageRate() { int number = 0; int numberCovered = 0; lock.lock(); try { Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { CoverageData coverageContainer = iter.next(); number += coverageContainer.getNumberOfValidBranches(); numberCovered += coverageContainer.getNumberOfCoveredBranches(); } } finally { lock.unlock(); } if (number == 0) { // no branches, therefore 100% branch coverage. return 1d; } return (double)numberCovered / number; } /** * Get a child from this container with the specified * key. * @param name The key used to lookup the child in the * map. * @return The child object, if found, or null if not found. */ public CoverageData getChild(String name) { lock.lock(); try { return (CoverageData)this.children.get(name); } finally { lock.unlock(); } } /** * @return The average line coverage rate for all children * in this container. This number will be a decimal * between 0 and 1, inclusive. */ public double getLineCoverageRate() { int number = 0; int numberCovered = 0; lock.lock(); try { Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { CoverageData coverageContainer = iter.next(); number += coverageContainer.getNumberOfValidLines(); numberCovered += coverageContainer.getNumberOfCoveredLines(); } } finally { lock.unlock(); } if (number == 0) { // no lines, therefore 100% line coverage. return 1d; } return (double)numberCovered / number; } /** * @return The number of children in this container. */ public int getNumberOfChildren() { lock.lock(); try { return this.children.size(); } finally { lock.unlock(); } } public int getNumberOfCoveredBranches() { int number = 0; lock.lock(); try { Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { CoverageData coverageContainer = iter.next(); number += coverageContainer.getNumberOfCoveredBranches(); } } finally { lock.unlock(); } return number; } public int getNumberOfCoveredLines() { int number = 0; lock.lock(); try { Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { CoverageData coverageContainer = iter.next(); number += coverageContainer.getNumberOfCoveredLines(); } } finally { lock.unlock(); } return number; } public int getNumberOfValidBranches() { int number = 0; lock.lock(); try { Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { CoverageData coverageContainer = iter.next(); number += coverageContainer.getNumberOfValidBranches(); } } finally { lock.unlock(); } return number; } public int getNumberOfValidLines() { int number = 0; lock.lock(); try { Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { CoverageData coverageContainer = iter.next(); number += coverageContainer.getNumberOfValidLines(); } } finally { lock.unlock(); } return number; } /** * It is highly recommended that classes extending this * class override this hashCode method and generate a more * effective hash code. */ public int hashCode() { lock.lock(); try { return this.children.size(); } finally { lock.unlock(); } } /** * Merge two CoverageDataContainers. * * @param coverageData The container to merge into this one. */ public void merge(CoverageData coverageData) { CoverageDataContainer container = (CoverageDataContainer)coverageData; getBothLocks(container); try { Iterator iter = container.children.keySet().iterator(); while (iter.hasNext()) { Object key = iter.next(); CoverageData newChild = (CoverageData)container.children.get(key); CoverageData existingChild = (CoverageData)this.children.get(key); if (existingChild != null) { existingChild.merge(newChild); } else { // TODO: Shouldn't we be cloning newChild here? I think so that // would be better... but we would need to override the // clone() method all over the place? this.children.put(key, newChild); } } } finally { lock.unlock(); container.lock.unlock(); } } protected void getBothLocks(CoverageDataContainer other) { /* * To prevent deadlock, we need to get both locks or none at all. * * When this method returns, the thread will have both locks. * Make sure you unlock them! */ boolean myLock = false; boolean otherLock = false; while ((!myLock) || (!otherLock)) { try { myLock = lock.tryLock(); otherLock = other.lock.tryLock(); } finally { if ((!myLock) || (!otherLock)) { //could not obtain both locks - so unlock the one we got. if (myLock) { lock.unlock(); } if (otherLock) { other.lock.unlock(); } //do a yield so the other threads will get to work. Thread.yield(); } } } } private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); initLock(); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/SwitchData.java0000644000175000017500000001436511343534514030713 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.io.IOException; import java.io.ObjectInputStream; import java.io.Serializable; import java.util.Arrays; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** *

* This class implements HasBeenInstrumented so that when cobertura instruments * itself, it will omit this class. It does this to avoid an infinite recursion * problem because instrumented classes make use of this class. *

*/ public class SwitchData implements BranchCoverageData, Comparable, Serializable, HasBeenInstrumented { private static final long serialVersionUID = 9; private transient Lock lock; private int switchNumber; private long defaultHits; private long[] hits; private int[] keys; public SwitchData(int switchNumber, int[] keys) { super(); this.switchNumber = switchNumber; defaultHits = 0; hits = new long[keys.length]; Arrays.fill(hits, 0); this.keys = new int[keys.length]; System.arraycopy(keys, 0, this.keys, 0, keys.length); initLock(); } public SwitchData(int switchNumber, int min, int max) { super(); this.switchNumber = switchNumber; defaultHits = 0; hits = new long[max - min + 1]; Arrays.fill(hits, 0); this.keys = new int[max - min + 1]; for (int i = 0; min <= max; keys[i++] = min++); initLock(); } public SwitchData(int switchNumber) { this(switchNumber, new int[0]); } private void initLock() { lock = new ReentrantLock(); } public int compareTo(Object o) { if (!o.getClass().equals(SwitchData.class)) return Integer.MAX_VALUE; return this.switchNumber - ((SwitchData) o).switchNumber; } void touchBranch(int branch,int new_hits) { lock.lock(); try { if (branch == -1) defaultHits++; else { if (hits.length <= branch) { long[] old = hits; hits = new long[branch + 1]; System.arraycopy(old, 0, hits, 0, old.length); Arrays.fill(hits, old.length, hits.length - 1, 0); } hits[branch]+=new_hits; } } finally { lock.unlock(); } } public int getSwitchNumber() { return this.switchNumber; } public long getHits(int branch) { lock.lock(); try { if (hits.length > branch) return hits[branch]; return -1; } finally { lock.unlock(); } } public long getDefaultHits() { lock.lock(); try { return defaultHits; } finally { lock.unlock(); } } public double getBranchCoverageRate() { lock.lock(); try { int branches = hits.length + 1; int hit = (defaultHits > 0) ? 1 : 0; for (int i = hits.length - 1; i >= 0; hit += ((hits[i--] > 0) ? 1 : 0)); return ((double) hit) / branches; } finally { lock.unlock(); } } public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || !(obj.getClass().equals(this.getClass()))) return false; SwitchData switchData = (SwitchData) obj; getBothLocks(switchData); try { return (this.defaultHits == switchData.defaultHits) && (Arrays.equals(this.hits, switchData.hits)) && (this.switchNumber == switchData.switchNumber); } finally { lock.unlock(); switchData.lock.unlock(); } } public int hashCode() { return this.switchNumber; } public int getNumberOfCoveredBranches() { lock.lock(); try { int ret = (defaultHits > 0) ? 1 : 0; for (int i = hits.length -1; i >= 0;i--) { if (hits[i] > 0) ret++; } return ret; } finally { lock.unlock(); } } public int getNumberOfValidBranches() { lock.lock(); try { return hits.length + 1; } finally { lock.unlock(); } } public void merge(BranchCoverageData coverageData) { SwitchData switchData = (SwitchData) coverageData; getBothLocks(switchData); try { defaultHits += switchData.defaultHits; for (int i = Math.min(hits.length, switchData.hits.length) - 1; i >= 0; i--) hits[i] += switchData.hits[i]; if (switchData.hits.length > hits.length) { long[] old = hits; hits = new long[switchData.hits.length]; System.arraycopy(old, 0, hits, 0, old.length); System.arraycopy(switchData.hits, old.length, hits, old.length, hits.length - old.length); } if ((this.keys.length == 0) && (switchData.keys.length > 0)) this.keys = switchData.keys; } finally { lock.unlock(); switchData.lock.unlock(); } } private void getBothLocks(SwitchData other) { /* * To prevent deadlock, we need to get both locks or none at all. * * When this method returns, the thread will have both locks. * Make sure you unlock them! */ boolean myLock = false; boolean otherLock = false; while ((!myLock) || (!otherLock)) { try { myLock = lock.tryLock(); otherLock = other.lock.tryLock(); } finally { if ((!myLock) || (!otherLock)) { //could not obtain both locks - so unlock the one we got. if (myLock) { lock.unlock(); } if (otherLock) { other.lock.unlock(); } //do a yield so the other threads will get to work. Thread.yield(); } } } } private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); initLock(); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/package.html0000644000175000017500000000125511343534521030266 0ustar twernertwerner

A hierarchy of classes used for storing metadata about each of your classes. A ProjectData object contains PackageData objects which contain ClassData objects which contain LineData objects. Or, in bad ASCII art:

ProjectData <--> PackageData <--> ClassData <--> LineData

The SourceFileData class is not used during instrumention or testing. It is a only used when generating the reports. Basically it's used to lump a set of classes together when those classes come from the same file. This is needed because the HTML reporting displays an entire file at a time, instead of displaying a single class at a time.

cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/ClassData.java0000644000175000017500000003643211343534517030521 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; /** *

* ProjectData information is typically serialized to a file. An * instance of this class records coverage information for a single * class that has been instrumented. *

* *

* This class implements HasBeenInstrumented so that when cobertura * instruments itself, it will omit this class. It does this to * avoid an infinite recursion problem because instrumented classes * make use of this class. *

*/ public class ClassData extends CoverageDataContainer implements Comparable, HasBeenInstrumented { private static final long serialVersionUID = 5; /** * Each key is a line number in this class, stored as an Integer object. * Each value is information about the line, stored as a LineData object. */ private Map branches = new HashMap(); private boolean containsInstrumentationInfo = false; private Set methodNamesAndDescriptors = new HashSet(); private String name = null; private String sourceFileName = null; /** * @param name In the format "net.sourceforge.cobertura.coveragedata.ClassData" */ public ClassData(String name) { if (name == null) throw new IllegalArgumentException( "Class name must be specified."); this.name = name; } public LineData addLine(int lineNumber, String methodName, String methodDescriptor) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) { lineData = new LineData(lineNumber); // Each key is a line number in this class, stored as an Integer object. // Each value is information about the line, stored as a LineData object. children.put(new Integer(lineNumber), lineData); } lineData.setMethodNameAndDescriptor(methodName, methodDescriptor); // methodName and methodDescriptor can be null when cobertura.ser with // no line information was loaded (or was not loaded at all). if( methodName!=null && methodDescriptor!=null) methodNamesAndDescriptors.add(methodName + methodDescriptor); return lineData; } finally { lock.unlock(); } } /** * This is required because we implement Comparable. */ public int compareTo(ClassData o) { return this.name.compareTo(o.name); } public boolean containsInstrumentationInfo() { lock.lock(); try { return this.containsInstrumentationInfo; } finally { lock.unlock(); } } /** * Returns true if the given object is an instance of the * ClassData class, and it contains the same data as this * class. */ public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || !(obj.getClass().equals(this.getClass()))) return false; ClassData classData = (ClassData)obj; getBothLocks(classData); try { return super.equals(obj) && this.branches.equals(classData.branches) && this.methodNamesAndDescriptors .equals(classData.methodNamesAndDescriptors) && this.name.equals(classData.name) && this.sourceFileName.equals(classData.sourceFileName); } finally { lock.unlock(); classData.lock.unlock(); } } public String getBaseName() { int lastDot = this.name.lastIndexOf('.'); if (lastDot == -1) { return this.name; } return this.name.substring(lastDot + 1); } /** * @return The branch coverage rate for a particular method. */ public double getBranchCoverageRate(String methodNameAndDescriptor) { int total = 0; int covered = 0; lock.lock(); try { for (Iterator iter = branches.values().iterator(); iter.hasNext();) { LineData next = (LineData) iter.next(); if (methodNameAndDescriptor.equals(next.getMethodName() + next.getMethodDescriptor())) { total += next.getNumberOfValidBranches(); covered += next.getNumberOfCoveredBranches(); } } if (total == 0) return 1.0; return (double) covered / total; } finally { lock.unlock(); } } public Collection getBranches() { lock.lock(); try { return Collections.unmodifiableCollection(branches.keySet()); } finally { lock.unlock(); } } /** * @param lineNumber The source code line number. * @return The coverage of the line */ public LineData getLineCoverage(int lineNumber) { Integer lineObject = new Integer(lineNumber); lock.lock(); try { if (!children.containsKey(lineObject)) { return null; } return (LineData) children.get(lineObject); } finally { lock.unlock(); } } /** * @return The line coverage rate for particular method */ public double getLineCoverageRate(String methodNameAndDescriptor) { int total = 0; int hits = 0; lock.lock(); try { Iterator iter = children.values().iterator(); while (iter.hasNext()) { LineData next = (LineData) iter.next(); if (methodNameAndDescriptor.equals(next.getMethodName() + next.getMethodDescriptor())) { total++; if (next.getHits() > 0) { hits++; } } } if (total == 0) return 1d; return (double) hits / total; } finally { lock.unlock(); } } private LineData getLineData(int lineNumber) { lock.lock(); try { return (LineData)children.get(Integer.valueOf(lineNumber)); } finally { lock.unlock(); } } public SortedSet getLines() { lock.lock(); try { return new TreeSet(this.children.values()); } finally { lock.unlock(); } } public Collection getLines(String methodNameAndDescriptor) { Collection lines = new HashSet(); lock.lock(); try { Iterator iter = children.values().iterator(); while (iter.hasNext()) { LineData next = (LineData)iter.next(); if (methodNameAndDescriptor.equals(next.getMethodName() + next.getMethodDescriptor())) { lines.add(next); } } return lines; } finally { lock.unlock(); } } /** * @return The method name and descriptor of each method found in the * class represented by this instrumentation. */ public Set getMethodNamesAndDescriptors() { lock.lock(); try { return methodNamesAndDescriptors; } finally { lock.unlock(); } } public String getName() { return name; } /** * @return The number of branches in this class. */ public int getNumberOfValidBranches() { int number = 0; lock.lock(); try { for (Iterator i = branches.values().iterator(); i.hasNext(); number += (i.next()).getNumberOfValidBranches()) ; return number; } finally { lock.unlock(); } } /** * @see net.sourceforge.cobertura.coveragedata.CoverageData#getNumberOfCoveredBranches() */ public int getNumberOfCoveredBranches() { int number = 0; lock.lock(); try { for (Iterator i = branches.values().iterator(); i.hasNext(); number += (i.next()).getNumberOfCoveredBranches()) ; return number; } finally { lock.unlock(); } } public String getPackageName() { int lastDot = this.name.lastIndexOf('.'); if (lastDot == -1) { return ""; } return this.name.substring(0, lastDot); } /** * Return the name of the file containing this class. If this * class' sourceFileName has not been set (for whatever reason) * then this method will attempt to infer the name of the source * file using the class name. * * @return The name of the source file, for example * net/sourceforge/cobertura/coveragedata/ClassData.java */ public String getSourceFileName() { String baseName; lock.lock(); try { if (sourceFileName != null) baseName = sourceFileName; else { baseName = getBaseName(); int firstDollarSign = baseName.indexOf('$'); if (firstDollarSign == -1 || firstDollarSign == 0) baseName += ".java"; else baseName = baseName.substring(0, firstDollarSign) + ".java"; } String packageName = getPackageName(); if (packageName.equals("")) return baseName; return packageName.replace('.', '/') + '/' + baseName; } finally { lock.unlock(); } } public int hashCode() { return this.name.hashCode(); } /** * @return True if the line contains at least one condition jump (branch) */ public boolean hasBranch(int lineNumber) { lock.lock(); try { return branches.containsKey(Integer.valueOf(lineNumber)); } finally { lock.unlock(); } } /** * Determine if a given line number is a valid line of code. * * @return True if the line contains executable code. False * if the line is empty, or a comment, etc. */ public boolean isValidSourceLineNumber(int lineNumber) { lock.lock(); try { return children.containsKey(Integer.valueOf(lineNumber)); } finally { lock.unlock(); } } public void addLineJump(int lineNumber, int branchNumber) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData != null) { lineData.addJump(branchNumber); this.branches.put(Integer.valueOf(lineNumber), lineData); } } finally { lock.unlock(); } } public void addLineSwitch(int lineNumber, int switchNumber, int[] keys) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData != null) { lineData.addSwitch(switchNumber, keys); this.branches.put(Integer.valueOf(lineNumber), lineData); } } finally { lock.unlock(); } } public void addLineSwitch(int lineNumber, int switchNumber, int min, int max) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData != null) { lineData.addSwitch(switchNumber, min, max); this.branches.put(Integer.valueOf(lineNumber), lineData); } } finally { lock.unlock(); } } /** * Merge some existing instrumentation with this instrumentation. * * @param coverageData Some existing coverage data. */ public void merge(CoverageData coverageData) { ClassData classData = (ClassData)coverageData; // If objects contain data for different classes then don't merge if (!this.getName().equals(classData.getName())) return; getBothLocks(classData); try { super.merge(coverageData); // We can't just call this.branches.putAll(classData.branches); // Why not? If we did a putAll, then the LineData objects from // the coverageData class would overwrite the LineData objects // that are already in "this.branches" And we don't need to // update the LineData objects that are already in this.branches // because they are shared between this.branches and this.children, // so the object hit counts will be moved when we called // super.merge() above. for (Iterator iter = classData.branches.keySet().iterator(); iter.hasNext();) { Integer key = iter.next(); if (!this.branches.containsKey(key)) { this.branches.put(key, classData.branches.get(key)); } } this.containsInstrumentationInfo |= classData.containsInstrumentationInfo; this.methodNamesAndDescriptors.addAll(classData .getMethodNamesAndDescriptors()); if (classData.sourceFileName != null) this.sourceFileName = classData.sourceFileName; } finally { lock.unlock(); classData.lock.unlock(); } } public void removeLine(int lineNumber) { Integer lineObject = Integer.valueOf(lineNumber); lock.lock(); try { children.remove(lineObject); branches.remove(lineObject); } finally { lock.unlock(); } } public void setContainsInstrumentationInfo() { lock.lock(); try { this.containsInstrumentationInfo = true; } finally { lock.unlock(); } } public void setSourceFileName(String sourceFileName) { lock.lock(); try { this.sourceFileName = sourceFileName; } finally { lock.unlock(); } } /** * Increment the number of hits for a particular line of code. * * @param lineNumber the line of code to increment the number of hits. * @param hits how many times the piece was called */ public void touch(int lineNumber,int hits) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touch(hits); } finally { lock.unlock(); } } /** * Increments the number of hits for particular hit counter of particular branch on particular line number. * * @param lineNumber The line of code where the branch is * @param branchNumber The branch on the line to change the hit counter * @param branch The hit counter (true or false) * @param hits how many times the piece was called */ public void touchJump(int lineNumber, int branchNumber, boolean branch,int hits) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touchJump(branchNumber, branch,hits); } finally { lock.unlock(); } } /** * Increments the number of hits for particular hit counter of particular switch branch on particular line number. * * @param lineNumber The line of code where the branch is * @param switchNumber The switch on the line to change the hit counter * @param branch The hit counter * @param hits how many times the piece was called */ public void touchSwitch(int lineNumber, int switchNumber, int branch,int hits) { lock.lock(); try { LineData lineData = getLineData(lineNumber); if (lineData == null) lineData = addLine(lineNumber, null, null); lineData.touchSwitch(switchNumber, branch,hits); } finally { lock.unlock(); } } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/ProjectData.java0000644000175000017500000002166611343534521031060 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Grzegorz Lukasik * Copyright (C) 2005 Björn Beskow * Copyright (C) 2006 John Lewis * Copyright (C) 2009 Chris van Es * Copyright (C) 2009 Ed Randall * Copyright (C) 2010 Charlie Squires * Copyright (C) 2010 Piotr Tabor * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.io.File; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.SortedSet; import java.util.TreeSet; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import net.sourceforge.cobertura.util.FileLocker; public class ProjectData extends CoverageDataContainer implements HasBeenInstrumented { private static final long serialVersionUID = 6; /** This collection is used for quicker access to the list of classes. */ private Map classes = new HashMap(); public void addClassData(ClassData classData) { lock.lock(); try { String packageName = classData.getPackageName(); PackageData packageData = (PackageData)children.get(packageName); if (packageData == null) { packageData = new PackageData(packageName); // Each key is a package name, stored as an String object. // Each value is information about the package, stored as a PackageData object. this.children.put(packageName, packageData); } packageData.addClassData(classData); this.classes.put(classData.getName(), classData); } finally { lock.unlock(); } } public ClassData getClassData(String name) { lock.lock(); try { return (ClassData)this.classes.get(name); } finally { lock.unlock(); } } /** * This is called by instrumented bytecode. */ public ClassData getOrCreateClassData(String name) { lock.lock(); try { ClassData classData = (ClassData)this.classes.get(name); if (classData == null) { classData = new ClassData(name); addClassData(classData); } return classData; } finally { lock.unlock(); } } public Collection getClasses() { lock.lock(); try { return this.classes.values(); } finally { lock.unlock(); } } public int getNumberOfClasses() { lock.lock(); try { return this.classes.size(); } finally { lock.unlock(); } } public int getNumberOfSourceFiles() { return getSourceFiles().size(); } public SortedSet getPackages() { lock.lock(); try { return new TreeSet(this.children.values()); } finally { lock.unlock(); } } public Collection getSourceFiles() { SortedSet sourceFileDatas = new TreeSet(); lock.lock(); try { Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { PackageData packageData = (PackageData)iter.next(); sourceFileDatas.addAll(packageData.getSourceFiles()); } } finally { lock.unlock(); } return sourceFileDatas; } /** * Get all subpackages of the given package. Includes also specified package if * it exists. * * @param packageName The package name to find subpackages for. * For example, "com.example" * @return A collection containing PackageData objects. Each one * has a name beginning with the given packageName. For * example: "com.example.io", "com.example.io.internal" */ public SortedSet getSubPackages(String packageName) { SortedSet subPackages = new TreeSet(); lock.lock(); try { Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { PackageData packageData = (PackageData)iter.next(); if (packageData.getName().startsWith(packageName + ".") || packageData.getName().equals(packageName) || packageName.equals("")) subPackages.add(packageData); } } finally { lock.unlock(); } return subPackages; } public void merge(CoverageData coverageData) { if (coverageData == null) { return; } ProjectData projectData = (ProjectData)coverageData; getBothLocks(projectData); try { super.merge(coverageData); for (Iterator iter = projectData.classes.keySet().iterator(); iter.hasNext();) { Object key = iter.next(); if (!this.classes.containsKey(key)) { this.classes.put(key, projectData.classes.get(key)); } } } finally { lock.unlock(); projectData.lock.unlock(); } } // TODO: Is it possible to do this as a static initializer? public static void initialize() { // Hack for Tomcat - by saving project data right now we force loading // of classes involved in this process (like ObjectOutputStream) // so that it won't be necessary to load them on JVM shutdown if (System.getProperty("catalina.home") != null) { saveGlobalProjectData(); // Force the class loader to load some classes that are // required by our JVM shutdown hook. // TODO: Use ClassLoader.loadClass("whatever"); instead ClassData.class.toString(); CoverageData.class.toString(); CoverageDataContainer.class.toString(); FileLocker.class.toString(); HasBeenInstrumented.class.toString(); LineData.class.toString(); PackageData.class.toString(); SourceFileData.class.toString(); } // Add a hook to save the data when the JVM exits Runtime.getRuntime().addShutdownHook(new Thread(new SaveTimer())); // Possibly also save the coverage data every x seconds? //Timer timer = new Timer(true); //timer.schedule(saveTimer, 100); } public static void saveGlobalProjectData() { ProjectData projectDataToSave = new ProjectData(); TouchCollector.applyTouchesOnProjectData(projectDataToSave); // Get a file lock File dataFile = CoverageDataFileHandler.getDefaultDataFile(); /* * A note about the next synchronized block: Cobertura uses static fields to * hold the data. When there are multiple classloaders, each classloader * will keep track of the line counts for the classes that it loads. * * The static initializers for the Cobertura classes are also called for * each classloader. So, there is one shutdown hook for each classloader. * So, when the JVM exits, each shutdown hook will try to write the * data it has kept to the datafile. They will do this at the same * time. Before Java 6, this seemed to work fine, but with Java 6, there * seems to have been a change with how file locks are implemented. So, * care has to be taken to make sure only one thread locks a file at a time. * * So, we will synchronize on the string that represents the path to the * dataFile. Apparently, there will be only one of these in the JVM * even if there are multiple classloaders. I assume that is because * the String class is loaded by the JVM's root classloader. */ synchronized (dataFile.getPath().intern() ) { FileLocker fileLocker = new FileLocker(dataFile); try { // Read the old data, merge our current data into it, then // write a new ser file. if (fileLocker.lock()) { ProjectData datafileProjectData = loadCoverageDataFromDatafile(dataFile); if (datafileProjectData == null) { datafileProjectData = projectDataToSave; } else { datafileProjectData.merge(projectDataToSave); } CoverageDataFileHandler.saveCoverageData(datafileProjectData, dataFile); } } finally { // Release the file lock fileLocker.release(); } } } private static ProjectData loadCoverageDataFromDatafile(File dataFile) { ProjectData projectData = null; // Read projectData from the serialized file. if (dataFile.isFile()) { projectData = CoverageDataFileHandler.loadCoverageData(dataFile); } if (projectData == null) { // We could not read from the serialized file, so use a new object. System.out.println("Cobertura: Coverage data file " + dataFile.getAbsolutePath() + " either does not exist or is not readable. Creating a new data file."); } return projectData; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/BranchCoverageData.java0000644000175000017500000000251111343534517032314 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; public interface BranchCoverageData { double getBranchCoverageRate(); int getNumberOfCoveredBranches(); int getNumberOfValidBranches(); /** * Warning: This is generally implemented as a * "shallow" merge. For our current use, this * should be fine, but in the future it may make * sense to modify the merge methods of the * various classes to do a deep copy of the * appropriate objects. */ void merge(BranchCoverageData coverageData); } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/JumpData.java0000644000175000017500000001134011343534521030351 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.io.IOException; import java.io.ObjectInputStream; import java.io.Serializable; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** *

* This class implements HasBeenInstrumented so that when cobertura instruments * itself, it will omit this class. It does this to avoid an infinite recursion * problem because instrumented classes make use of this class. *

*/ public class JumpData implements BranchCoverageData, Comparable, Serializable, HasBeenInstrumented { private static final long serialVersionUID = 8; protected transient Lock lock; private int conditionNumber; private long trueHits; private long falseHits; JumpData(int conditionNumber) { super(); this.conditionNumber = conditionNumber; this.trueHits = 0L; this.falseHits = 0L; initLock(); } private void initLock() { lock = new ReentrantLock(); } public int compareTo(Object o) { if (!o.getClass().equals(JumpData.class)) return Integer.MAX_VALUE; return this.conditionNumber - ((JumpData) o).conditionNumber; } void touchBranch(boolean branch,int new_hits) { lock.lock(); try { if (branch) { this.trueHits+=new_hits; } else { this.falseHits+=new_hits; } } finally { lock.unlock(); } } public int getConditionNumber() { return this.conditionNumber; } public long getTrueHits() { lock.lock(); try { return this.trueHits; } finally { lock.unlock(); } } public long getFalseHits() { lock.lock(); try { return this.falseHits; } finally { lock.unlock(); } } public double getBranchCoverageRate() { lock.lock(); try { return ((double) getNumberOfCoveredBranches()) / getNumberOfValidBranches(); } finally { lock.unlock(); } } public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || !(obj.getClass().equals(this.getClass()))) return false; JumpData branchData = (JumpData) obj; getBothLocks(branchData); try { return (this.trueHits == branchData.trueHits) && (this.falseHits == branchData.falseHits) && (this.conditionNumber == branchData.conditionNumber); } finally { lock.unlock(); branchData.lock.unlock(); } } public int hashCode() { return this.conditionNumber; } public int getNumberOfCoveredBranches() { lock.lock(); try { return ((trueHits > 0) ? 1 : 0) + ((falseHits > 0) ? 1: 0); } finally { lock.unlock(); } } public int getNumberOfValidBranches() { return 2; } public void merge(BranchCoverageData coverageData) { JumpData jumpData = (JumpData) coverageData; getBothLocks(jumpData); try { this.trueHits += jumpData.trueHits; this.falseHits += jumpData.falseHits; } finally { lock.unlock(); jumpData.lock.unlock(); } } private void getBothLocks(JumpData other) { /* * To prevent deadlock, we need to get both locks or none at all. * * When this method returns, the thread will have both locks. * Make sure you unlock them! */ boolean myLock = false; boolean otherLock = false; while ((!myLock) || (!otherLock)) { try { myLock = lock.tryLock(); otherLock = other.lock.tryLock(); } finally { if ((!myLock) || (!otherLock)) { //could not obtain both locks - so unlock the one we got. if (myLock) { lock.unlock(); } if (otherLock) { other.lock.unlock(); } //do a yield so the other threads will get to work. Thread.yield(); } } } } private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); initLock(); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/SourceFileData.java0000644000175000017500000001361611343534521031506 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Jeremy Thomerson * Copyright (C) 2006 Jiri Mares * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.util.Iterator; import java.util.SortedSet; import java.util.TreeSet; import net.sourceforge.cobertura.util.StringUtil; public class SourceFileData extends CoverageDataContainer implements Comparable, HasBeenInstrumented { private static final long serialVersionUID = 3; private String name; /** * @param name In the format, "net/sourceforge/cobertura/coveragedata/SourceFileData.java" */ public SourceFileData(String name) { if (name == null) throw new IllegalArgumentException( "Source file name must be specified."); this.name = name; } public void addClassData(ClassData classData) { lock.lock(); try { if (children.containsKey(classData.getBaseName())) throw new IllegalArgumentException("Source file " + this.name + " already contains a class with the name " + classData.getBaseName()); // Each key is a class basename, stored as an String object. // Each value is information about the class, stored as a ClassData object. children.put(classData.getBaseName(), classData); } finally { lock.unlock(); } } /** * This is required because we implement Comparable. */ public int compareTo(Object o) { if (!o.getClass().equals(SourceFileData.class)) return Integer.MAX_VALUE; return this.name.compareTo(((SourceFileData)o).name); } public boolean contains(String name) { lock.lock(); try { return this.children.containsKey(name); } finally { lock.unlock(); } } public boolean containsInstrumentationInfo() { lock.lock(); try { // Return false if any of our child ClassData's does not // contain instrumentation info Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { ClassData classData = (ClassData)iter.next(); if (!classData.containsInstrumentationInfo()) return false; } } finally { lock.unlock(); } return true; } /** * Returns true if the given object is an instance of the * SourceFileData class, and it contains the same data as this * class. */ public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || !(obj.getClass().equals(this.getClass()))) return false; SourceFileData sourceFileData = (SourceFileData)obj; getBothLocks(sourceFileData); try { return super.equals(obj) && this.name.equals(sourceFileData.name); } finally { lock.unlock(); sourceFileData.lock.unlock(); } } public String getBaseName() { String fullNameWithoutExtension; int lastDot = this.name.lastIndexOf('.'); if (lastDot == -1) { fullNameWithoutExtension = this.name; } else { fullNameWithoutExtension = this.name.substring(0, lastDot); } int lastSlash = fullNameWithoutExtension.lastIndexOf('/'); if (lastSlash == -1) { return fullNameWithoutExtension; } return fullNameWithoutExtension.substring(lastSlash + 1); } public SortedSet getClasses() { lock.lock(); try { return new TreeSet(this.children.values()); } finally { lock.unlock(); } } public LineData getLineCoverage(int lineNumber) { lock.lock(); try { Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { ClassData classData = (ClassData)iter.next(); if (classData.isValidSourceLineNumber(lineNumber)) return classData.getLineCoverage(lineNumber); } } finally { lock.unlock(); } return null; } public String getName() { return this.name; } /** * @return The name of this source file without the file extension * in the format * "net.sourceforge.cobertura.coveragedata.SourceFileData" */ public String getNormalizedName() { String fullNameWithoutExtension; int lastDot = this.name.lastIndexOf('.'); if (lastDot == -1) { fullNameWithoutExtension = this.name; } else { fullNameWithoutExtension = this.name.substring(0, lastDot); } return StringUtil.replaceAll(fullNameWithoutExtension, "/", "."); } /** * @return The name of the package that this source file is in. * In the format "net.sourceforge.cobertura.coveragedata" */ public String getPackageName() { int lastSlash = this.name.lastIndexOf('/'); if (lastSlash == -1) { return null; } return StringUtil.replaceAll(this.name.substring(0, lastSlash), "/", "."); } public int hashCode() { return this.name.hashCode(); } public boolean isValidSourceLineNumber(int lineNumber) { lock.lock(); try { Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { ClassData classData = (ClassData)iter.next(); if (classData.isValidSourceLineNumber(lineNumber)) return true; } } finally { lock.unlock(); } return false; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/SaveTimer.java0000644000175000017500000000204011343534517030545 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.util.TimerTask; public class SaveTimer extends TimerTask implements HasBeenInstrumented { public void run() { ProjectData.saveGlobalProjectData(); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/PackageData.java0000644000175000017500000000773011343534516031005 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Jeremy Thomerson * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; import java.util.Collection; import java.util.Iterator; import java.util.SortedMap; import java.util.SortedSet; import java.util.TreeMap; import java.util.TreeSet; public class PackageData extends CoverageDataContainer implements Comparable, HasBeenInstrumented { private static final long serialVersionUID = 7; private String name; public PackageData(String name) { if (name == null) throw new IllegalArgumentException( "Package name must be specified."); this.name = name; } public void addClassData(ClassData classData) { lock.lock(); try { if (children.containsKey(classData.getBaseName())) throw new IllegalArgumentException("Package " + this.name + " already contains a class with the name " + classData.getBaseName()); // Each key is a class basename, stored as an String object. // Each value is information about the class, stored as a ClassData object. children.put(classData.getBaseName(), classData); } finally { lock.unlock(); } } /** * This is required because we implement Comparable. */ public int compareTo(Object o) { if (!o.getClass().equals(PackageData.class)) return Integer.MAX_VALUE; return this.name.compareTo(((PackageData)o).name); } public boolean contains(String name) { lock.lock(); try { return this.children.containsKey(name); } finally { lock.unlock(); } } /** * Returns true if the given object is an instance of the * PackageData class, and it contains the same data as this * class. */ public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || !(obj.getClass().equals(this.getClass()))) return false; PackageData packageData = (PackageData)obj; getBothLocks(packageData); try { return super.equals(obj) && this.name.equals(packageData.name); } finally { lock.unlock(); packageData.lock.unlock(); } } public SortedSet getClasses() { lock.lock(); try { return new TreeSet(this.children.values()); } finally { lock.unlock(); } } public String getName() { return this.name; } public String getSourceFileName() { return this.name.replace('.', '/'); } public Collection getSourceFiles() { SortedMap sourceFileDatas = new TreeMap(); lock.lock(); try { Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { ClassData classData = (ClassData)iter.next(); String sourceFileName = classData.getSourceFileName(); SourceFileData sourceFileData = (SourceFileData)sourceFileDatas.get(sourceFileName); if (sourceFileData == null) { sourceFileData = new SourceFileData(sourceFileName); sourceFileDatas.put(sourceFileName, sourceFileData); } sourceFileData.addClassData(classData); } } finally { lock.unlock(); } return sourceFileDatas.values(); } public int hashCode() { return this.name.hashCode(); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/countermaps/0000755000175000017500000000000011345540725030347 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/countermaps/CounterMap.java0000644000175000017500000000241011343534517033264 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2010 Piotr Tabor * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata.countermaps; import java.util.Map; public interface CounterMap { public void incrementValue(T key); public void incrementValue(T key, int value); public int getValue(T key); public Map getFinalStateAndCleanIt(); } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootcobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/countermaps/AtomicCounterMap.javacobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/countermaps/AtomicCounterMap.0000644000175000017500000000551111343534513033560 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2010 Piotr Tabor * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata.countermaps; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicInteger; import net.sourceforge.cobertura.coveragedata.HasBeenInstrumented; /** * Thread-safe implementation of map that counts number of keys (like multi-set) * @author ptab * * @param */ public class AtomicCounterMap implements CounterMap,HasBeenInstrumented{ private final ConcurrentMap counters=new ConcurrentHashMap(); public final void incrementValue(T key, int inc){ AtomicInteger v=counters.get(key); if(v!=null){ v.addAndGet(inc); }else{ v=counters.putIfAbsent(key, new AtomicInteger(inc)); if(v!=null)v.addAndGet(inc); } } public final void incrementValue(T key){ //AtomicInteger v=counters.putIfAbsent(key, new AtomicInteger(1)); //return (v!=null)?v.incrementAndGet():1; AtomicInteger v=counters.get(key); if(v!=null){ v.incrementAndGet(); }else{ v=counters.putIfAbsent(key, new AtomicInteger(1)); if(v!=null)v.incrementAndGet(); } } public final int getValue(T key){ AtomicInteger v=counters.get(key); return v==null?0:v.get(); } public synchronized Map getFinalStateAndCleanIt(){ Map res=new LinkedHashMap(); Iterator> iterator=counters.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry entry=iterator.next(); T key=entry.getKey(); int old=entry.getValue().get(); iterator.remove(); if(old>0){ res.put(key, old); } } return res; } public int getSize(){ return counters.size(); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/coveragedata/HasBeenInstrumented.java0000644000175000017500000000246111343534514032561 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.coveragedata; /** * Tag interface indicating that a particular class has already been * instrumented. This interface should also be implemented by those * classes that do not wish to be instrumented. */ public interface HasBeenInstrumented { /* * This class does not need any members. If a given class implements * this class, it means the given class does not want to be instrumented * by Cobertura. */ }cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/util/0000755000175000017500000000000011345540725024337 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/util/Source.java0000644000175000017500000000447111343534514026445 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2009 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; import java.io.File; import java.io.InputStream; import java.util.zip.ZipFile; import org.apache.log4j.Logger; public class Source { private InputStream is; //streamOrigin is either a File or a ZipFile private Object streamOrigin; private static Logger LOGGER = Logger.getLogger(Source.class); public Source(InputStream is, Object streamOrigin) { this.is = is; this.streamOrigin = streamOrigin; } public InputStream getInputStream() { return is; } /** * Close the source input stream and the archive if it came from one. * * This will not throw anything. Any throwable is caught and a warning is logged. */ public void close() { try { is.close(); } catch (Throwable t) { LOGGER.warn("Failure closing input stream for " + getOriginDesc(), t); } if (streamOrigin instanceof ZipFile) { try { ((ZipFile) streamOrigin).close(); } catch (Throwable t) { LOGGER.warn("Failure closing " + getOriginDesc(), t); } } } public String getOriginDesc() { String ret = ""; if (streamOrigin instanceof File) { ret = "file " + ((File) streamOrigin).getAbsolutePath(); } else { ret = "archive " + ((ZipFile) streamOrigin).getName(); } return ret; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/util/FileFinder.java0000644000175000017500000002244711343534521027215 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Jeremy Thomerson * Copyright (C) 2005 Grzegorz Lukasik * Copyright (C) 2009 Charlie Squires * Copyright (C) 2009 John Lewis * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; import java.io.File; import java.io.FileInputStream; import java.io.FilenameFilter; import java.io.IOException; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.jar.JarEntry; import java.util.jar.JarFile; import org.apache.log4j.Logger; /** * Maps source file names to existing files. After adding description * of places files can be found in, it can be used to localize * the files. * *

* FileFinder supports two types of source files locations: *

    *
  • source root directory, defines the directory under * which source files are located,
  • *
  • pair (base directory, file path relative to base directory).
  • *
* The difference between these two is that in case of the first you add all * source files under the specified root directory, and in the second you add * exactly one file. In both cases file to be found has to be located under * subdirectory that maps to package definition provided with the source file name. * * @author Jeremy Thomerson */ public class FileFinder { private static Logger LOGGER = Logger.getLogger(FileFinder.class); // Contains Strings with directory paths private Set sourceDirectories = new HashSet(); // Contains pairs (String directoryRoot, Set fileNamesRelativeToRoot) private Map sourceFilesMap = new HashMap(); /** * Adds directory that is a root of sources. A source file * that is under this directory will be found if relative * path to the file from root matches package name. *

* Example: *

	 * fileFinder.addSourceDirectory( "C:/MyProject/src/main");
	 * fileFinder.addSourceDirectory( "C:/MyProject/src/test");
	 * 
* In path both / and \ can be used. *

* * @param directory The root of source files * @throws NullPointerException if directory is null */ public void addSourceDirectory( String directory) { if( LOGGER.isDebugEnabled()) LOGGER.debug( "Adding sourceDirectory=[" + directory + "]"); // Change \ to / in case of Windows users directory = getCorrectedPath(directory); sourceDirectories.add(directory); } /** * Adds file by specifying root directory and relative path to the * file in it. Adds exactly one file, relative path should match * package that the source file is in, otherwise it will be not * found later. *

* Example: *

	 * fileFinder.addSourceFile( "C:/MyProject/src/main", "com/app/MyClass.java");
	 * fileFinder.addSourceFile( "C:/MyProject/src/test", "com/app/MyClassTest.java");
	 * 
* In paths both / and \ can be used. *

* * @param baseDir sources root directory * @param file path to source file relative to baseDir * @throws NullPointerException if either baseDir or file is null */ public void addSourceFile( String baseDir, String file) { if( LOGGER.isDebugEnabled()) LOGGER.debug( "Adding sourceFile baseDir=[" + baseDir + "] file=[" + file + "]"); if( baseDir==null || file==null) throw new NullPointerException(); // Change \ to / in case of Windows users file = getCorrectedPath( file); baseDir = getCorrectedPath( baseDir); // Add file to sourceFilesMap Set container = (Set) sourceFilesMap.get(baseDir); if( container==null) { container = new HashSet(); sourceFilesMap.put( baseDir, container); } container.add( file); } /** * Maps source file name to existing file. * When mapping file name first values that were added with * {@link #addSourceDirectory} and later added with {@link #addSourceFile} are checked. * * @param fileName source file to be mapped * @return existing file that maps to passed sourceFile * @throws IOException if cannot map source file to existing file * @throws NullPointerException if fileName is null */ public File getFileForSource(String fileName) throws IOException { // Correct file name if( LOGGER.isDebugEnabled()) LOGGER.debug( "Searching for file, name=[" + fileName + "]"); fileName = getCorrectedPath( fileName); // Check inside sourceDirectories for( Iterator it=sourceDirectories.iterator(); it.hasNext();) { String directory = (String)it.next(); File file = new File( directory, fileName); if( file.isFile()) { LOGGER.debug( "Found inside sourceDirectories"); return file; } } // Check inside sourceFilesMap for( Iterator it=sourceFilesMap.keySet().iterator(); it.hasNext();) { String directory = (String)it.next(); Set container = (Set) sourceFilesMap.get(directory); if( !container.contains( fileName)) continue; File file = new File( directory, fileName); if( file.isFile()) { LOGGER.debug( "Found inside sourceFilesMap"); return file; } } // Have not found? Throw an error. LOGGER.debug( "File not found"); throw new IOException( "Cannot find source file, name=["+fileName+"]"); } /** * Maps source file name to existing file or source archive. * When mapping file name first values that were added with * {@link #addSourceDirectory} and later added with {@link #addSourceFile} are checked. * * @param fileName source file to be mapped * @return Source that maps to passed sourceFile or null if it can't be found * @throws NullPointerException if fileName is null */ public Source getSource(String fileName) { File file = null; try { file = getFileForSource(fileName); return new Source(new FileInputStream(file), file); } catch (IOException e) { //Source file wasn't found. Try searching archives. return searchJarsForSource(fileName); } } /** * Gets a BufferedReader for a file within a jar. * * @param fileName source file to get an input stream for * @return Source for existing file inside a jar that maps to passed sourceFile * or null if cannot map source file to existing file */ private Source searchJarsForSource(String fileName) { //Check inside jars in sourceDirectories for( Iterator it=sourceDirectories.iterator(); it.hasNext();) { String directory = (String)it.next(); File file = new File(directory); //Get a list of jars and zips in the directory String[] jars = file.list(new JarZipFilter()); if(jars != null) { for(String jar : jars) { try { LOGGER.debug("Looking for: " + fileName + " in "+ jar); JarFile jf = new JarFile(directory + "/" + jar); //Get a list of files in the jar Enumeration files = jf.entries(); //See if the jar has the class we need while(files.hasMoreElements()) { JarEntry entry = files.nextElement(); if(entry.getName().equals(fileName)) { return new Source(jf.getInputStream(entry), jf); } } } catch (Throwable t) { LOGGER.warn("Error while reading " + jar, t); } } } } return null; } /** * Returns a list with string for all source directories. * Example: [C:/MyProject/src/main,C:/MyProject/src/test] * * @return list with Strings for all source roots, or empty list if no source roots were specified */ public List getSourceDirectoryList() { // Get names from sourceDirectories List result = new ArrayList(); for( Iterator it=sourceDirectories.iterator(); it.hasNext();) { result.add( it.next()); } // Get names from sourceFilesMap for( Iterator it=sourceFilesMap.keySet().iterator(); it.hasNext();) { result.add(it.next()); } // Return combined names return result; } private String getCorrectedPath(String path) { return path.replace('\\', '/'); } /** * Returns string representation of FileFinder. */ public String toString() { return "FileFinder, source directories: " + getSourceDirectoryList().toString(); } /** * A filter that accepts files that end in .jar or .zip */ private class JarZipFilter implements FilenameFilter { public boolean accept(File dir, String name) { return(name.endsWith(".jar") || name.endsWith(".zip")); } } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/util/Header.java0000644000175000017500000000247511343534513026376 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Erik Dick * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; import java.io.PrintStream; public abstract class Header { public static String version() { Package thisPackage = Header.class.getPackage(); return (thisPackage != null ? thisPackage .getImplementationVersion() : "cvs"); } public static void print(PrintStream out) { out.println("Cobertura " + version() + " - GNU GPL License (NO WARRANTY) - See COPYRIGHT file"); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/util/StringUtil.java0000644000175000017500000000525011343534515027306 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Jeremy Thomerson * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; import java.text.NumberFormat; /** * Abstract, not to be instantiated utility class for String functions. * * @author Jeremy Thomerson */ public abstract class StringUtil { /** *

* Replaces all instances of "replace" with "with" from the "original" * string. *

* *

* NOTE: it is known that a similar function is included in jdk 1.4 as replaceAll(), * but is written here so as to allow backward compatibility to users using SDK's * prior to 1.4 *

* * @param original The original string to do replacement on. * @param replace The string to replace. * @param with The string to replace "replace" with. * @return The replaced string. */ public static String replaceAll(String original, String replace, String with) { if (original == null) { return original; } final int len = replace.length(); StringBuffer sb = new StringBuffer(original.length()); int start = 0; int found = -1; while ((found = original.indexOf(replace, start)) != -1) { sb.append(original.substring(start, found)); sb.append(with); start = found + len; } sb.append(original.substring(start)); return sb.toString(); } /** * Takes a double and turns it into a percent string. * Ex. 0.5 turns into 50% * * @param value * @return corresponding percent string */ public static String getPercentValue(double value) { //moved from HTMLReport.getPercentValue() value = Math.floor(value * 100) / 100; //to represent 199 covered lines from 200 as 99% covered, not 100 % return NumberFormat.getPercentInstance().format(value); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/util/IOUtil.java0000644000175000017500000001145711343534514026354 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Grzegorz Lukasik * Copyright (C) 2006 John Lewis * Copyright (C) 2007 Ignat Zapolsky * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; import java.io.BufferedWriter; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.io.Writer; /** * Helper class with useful I/O operations. * * @author Grzegorz Lukasik */ public abstract class IOUtil { /** * Copies bytes from input stream into the output stream. Stops * when the input stream read method returns -1. Does not close * the streams. * * @throws IOException If either passed stream will throw IOException. * @throws NullPointerException If either passed stream is null. */ public static void copyStream(InputStream in, OutputStream out) throws IOException { // NullPointerException is explicity thrown to guarantee expected behaviour if (in == null || out == null) throw new NullPointerException(); int el; byte[] buffer = new byte[1 << 15]; while ((el = in.read(buffer)) != -1) { out.write(buffer, 0, el); } } /** * Returns an array that contains values read from the * given input stream. * * @throws NullPointerException If null stream is passed. */ public static byte[] createByteArrayFromInputStream(InputStream in) throws IOException { ByteArrayOutputStream byteArray = new ByteArrayOutputStream(); copyStream(in, byteArray); return byteArray.toByteArray(); } /** * Moves a file from one location to other. * * @throws IOException If IO exception occur during moving. * @throws NullPointerException If either passed file is null. */ public static void moveFile(File sourceFile, File destinationFile) throws IOException { if (destinationFile.exists()) { destinationFile.delete(); } // Move file using File method if possible boolean succesfulMove = sourceFile.renameTo(destinationFile); if (succesfulMove) return; // Copy file from source to destination InputStream in = null; OutputStream out = null; try { in = new FileInputStream(sourceFile); out = new FileOutputStream(destinationFile); copyStream(in, out); } finally { in = closeInputStream(in); out = closeOutputStream(out); } // Remove source file sourceFile.delete(); } /** * Closes an input stream. * * @param in The stream to close. * @return null unless an exception was thrown while closing, else * returns the stream */ public static InputStream closeInputStream(InputStream in) { if (in != null) { try { in.close(); in = null; } catch (IOException e) { System.err.println("Cobertura: Error closing input stream."); e.printStackTrace(); } } return in; } /** * Closes an output stream. * * @param out The stream to close. * @return null unless an exception was thrown while closing, else * returns the stream. */ public static OutputStream closeOutputStream(OutputStream out) { if (out != null) { try { out.close(); out = null; } catch (IOException e) { System.err.println("Cobertura: Error closing output stream."); e.printStackTrace(); } } return out; } public static PrintWriter getPrintWriter(File file) throws UnsupportedEncodingException, FileNotFoundException { Writer osWriter = new BufferedWriter (new OutputStreamWriter(new FileOutputStream(file), "UTF-8"), 16384); PrintWriter pw = new PrintWriter(osWriter, false); return pw; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/util/ArchiveUtil.java0000644000175000017500000000403711343534515027423 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Grzegorz Lukasik * Copyright (C) 2006 John Lewis * Copyright (C) 2006 Mark Doliner * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; /** * Utility methods for working with archives. * * @author John Lewis */ public abstract class ArchiveUtil { /** * Return true if the given name ends with .jar, .zip, * .war, .ear, or .sar (case insensitive). * * @param name The file name. * @return true if the name is an archive. */ public static boolean isArchive(String name) { name = name.toLowerCase(); return name.endsWith(".jar") || name.endsWith(".zip") || name.endsWith(".war") || name.endsWith(".ear") || name.endsWith(".sar"); } /** * Check to see if the given file name is a signature file * (meta-inf/*.rsa or meta-inf/*.sf). * * @param name The file name. Commonly a ZipEntry name. * @return true if the name is a signature file. */ public static boolean isSignatureFile(String name) { name = name.toLowerCase(); return (name.startsWith("meta-inf/") && (name.endsWith(".rsa") || name.endsWith(".sf"))); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/util/FileLocker.java0000644000175000017500000001460211343534515027222 0ustar twernertwerner/* Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 John Lewis * Copyright (C) 2006 Mark Doliner * Copyright (C) 2009 Chris van Es * * Note: This file is dual licensed under the GPL and the Apache * Source License 1.1 (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; import java.io.File; import java.io.FileNotFoundException; import java.io.RandomAccessFile; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; /** * This class controls access to any file so that multiple JVMs will * not be able to write to the file at the same time. * * A file called "filename.lock" is created and Java's FileLock class * is used to lock the file. * * The java.nio classes were introduced in Java 1.4, so this class * does a no-op when used with Java 1.3. The class maintains * compatability with Java 1.3 by accessing the java.nio classes * using reflection. * * @author John Lewis * @author Mark Doliner */ public class FileLocker { /** * An object of type FileLock, created using reflection. */ private Object lock = null; /** * An object of type FileChannel, created using reflection. */ private Object lockChannel = null; /** * A file called "filename.lock" that resides in the same directory * as "filename" */ private File lockFile; public FileLocker(File file) { String lockFileName = file.getName() + ".lock"; File parent = file.getParentFile(); if (parent == null) { lockFile = new File(lockFileName); } else { lockFile = new File(parent, lockFileName); } } /** * Obtains a lock on the file. This blocks until the lock is obtained. */ public boolean lock() { String useNioProperty = System.getProperty("cobertura.use.java.nio"); if (System.getProperty("java.version").startsWith("1.3") || ((useNioProperty != null) && useNioProperty.equalsIgnoreCase("false"))) { return true; } try { Class aClass = Class.forName("java.io.RandomAccessFile"); Method method = aClass.getDeclaredMethod("getChannel", (Class[])null); lockChannel = method.invoke(new RandomAccessFile(lockFile, "rw"), (Object[])null); } catch (FileNotFoundException e) { System.err.println("Unable to get lock channel for " + lockFile.getAbsolutePath() + ": " + e.getLocalizedMessage()); return false; } catch (InvocationTargetException e) { System.err.println("Unable to get lock channel for " + lockFile.getAbsolutePath() + ": " + e.getLocalizedMessage()); return false; } catch (Throwable t) { System.err.println("Unable to execute RandomAccessFile.getChannel() using reflection: " + t.getLocalizedMessage()); t.printStackTrace(); } try { Class aClass = Class.forName("java.nio.channels.FileChannel"); Method method = aClass.getDeclaredMethod("lock", (Class[])null); lock = method.invoke(lockChannel, (Object[])null); } catch (InvocationTargetException e) { System.err.println("---------------------------------------"); e.printStackTrace(System.err); System.err.println("---------------------------------------"); System.err.println("Unable to get lock on " + lockFile.getAbsolutePath() + ": " + e.getLocalizedMessage()); System.err.println("This is known to happen on Linux kernel 2.6.20."); System.err.println("Make sure cobertura.jar is in the root classpath of the jvm "); System.err.println("process running the instrumented code. If the instrumented code "); System.err.println("is running in a web server, this means cobertura.jar should be in "); System.err.println("the web server's lib directory."); System.err.println("Don't put multiple copies of cobertura.jar in different WEB-INF/lib directories."); System.err.println("Only one classloader should load cobertura. It should be the root classloader."); System.err.println("---------------------------------------"); return false; } catch (Throwable t) { System.err.println("Unable to execute FileChannel.lock() using reflection: " + t.getLocalizedMessage()); t.printStackTrace(); } return true; } /** * Releases the lock on the file. */ public void release() { if (lock != null) lock = releaseFileLock(lock); if (lockChannel != null) lockChannel = closeChannel(lockChannel); if (!lockFile.delete()) { System.err.println("lock file could not be deleted"); } } private static Object releaseFileLock(Object lock) { try { Class aClass = Class.forName("java.nio.channels.FileLock"); Method method = aClass.getDeclaredMethod("isValid", (Class[])null); if (((Boolean)method.invoke(lock, (Object[])null)).booleanValue()) { method = aClass.getDeclaredMethod("release", (Class[])null); method.invoke(lock, (Object[])null); lock = null; } } catch (Throwable t) { System.err.println("Unable to release locked file: " + t.getLocalizedMessage()); } return lock; } private static Object closeChannel(Object channel) { try { Class aClass = Class.forName("java.nio.channels.spi.AbstractInterruptibleChannel"); Method method = aClass.getDeclaredMethod("isOpen", (Class[])null); if (((Boolean)method.invoke(channel, (Object[])null)).booleanValue()) { method = aClass.getDeclaredMethod("close", (Class[])null); method.invoke(channel, (Object[])null); channel = null; } } catch (Throwable t) { System.err.println("Unable to close file channel: " + t.getLocalizedMessage()); } return channel; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/util/CommandLineBuilder.java0000644000175000017500000001627411343534517030711 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Grzegorz Lukasik * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; /** * Helper class for storing long command lines inside temporary file. *

* Typical usage: * *

 *  builder = new CommandLineBuilder();
 *  builder.addArg("--someoption");
 *  builder.addArg("optionValue");
 *  ...
 *  builder.saveArgs();
 *  doSomething(builder.getCommandLineFile());
 *  builder.dispose();
 * 
* * It will save options in builder.getCommandLineFile(). Options * will be stored one in a line. To retrieve options from file helper method can * be used (see documentation): * *
 * String[] args = CommandLineBuilder.preprocessCommandLineArguments(args);
 * 
* *

* *

* NOTICE: No protection against line separators in arguments, should be OK for * Cobertura needs. *

*

* NOTICE: This class depends on local machine settings (line separator, default * encoding). If arguments are saved on different machine than they are loaded, * results are unspecified. No problem in Cobertura. *

* * @author Grzegorz Lukasik */ public class CommandLineBuilder { private static final Logger logger = Logger .getLogger(CommandLineBuilder.class); private static final String LINESEP = System.getProperty("line.separator"); // File that will be used to store arguments private File commandLineFile = null; // Writer that will be used to write arguments to the file private FileWriter commandLineWriter = null; /** * Creates a new instance of the builder. Instances of this class should not * be reused to create many command lines. * * @throws IOException * if problems with creating temporary file for storing command * line occur */ public CommandLineBuilder() throws IOException { commandLineFile = File.createTempFile("cobertura.", ".cmdline"); commandLineFile.deleteOnExit(); commandLineWriter = new FileWriter(commandLineFile); } /** * Adds command line argument. Each argument can be thought as a single cell * in array passed to main method. This method should not be used after * arguments were saved. * * @param arg command line argument to save * @throws IOException * if problems with temporary file occur * @throws NullPointerException * if arg is null */ public void addArg(String arg) throws IOException { if( arg==null) throw new NullPointerException(); commandLineWriter.write(arg + LINESEP); } /** * Adds two command line arguments. Convienience function, calls * {@link #addArg(String)} two times. * * @param arg1 first command line argument to save * @param arg2 second command line argument to save * @throws IOException * if problems with temporary file occur * @throws NullPointerException * if any arg is null */ public void addArg(String arg1, String arg2) throws IOException { addArg(arg1); addArg(arg2); } /** * Saves options and made file available to use. Use method * {@link #getCommandLineFile} to get the file the arguments are saved in. * * @throws IOException * if problems with temporary file occur */ public void saveArgs() throws IOException { commandLineWriter.flush(); commandLineWriter.close(); } /** * Gets absolute path to the file with saved arguments. Notice, that however * this method can be used as soon as an instance of this class is created, * arguments should be read from the file after a call to * {@link #saveArgs} method. * * @return absolute path to the file with arguments */ public String getCommandLineFile() { return commandLineFile.getAbsolutePath(); } /** * Explicity frees all resources associated with this instance. Result of * any other method call after disposing an instance of this class is * unspecified. */ public void dispose() { commandLineFile.delete(); } /** * Loads arguments from file if --commandsfile option is used. Checks * if passed array contains --commandsfile String, and if * so arguments from file specified in the very next array cell are read. If * there are more then one --commandsfile the result is unspecified. * * @return The list of arguments read from commandsfile, or * args if commandsfile option was not specified * or the file cannot be read. * @throws NullPointerException if args is null, or any argument is null * @throws IllegalArgumentException if --commandsfile is specified as last option * @throws IOException if I/O related error with temporary command line file occur */ public static String[] preprocessCommandLineArguments(String[] args) throws IOException { boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if ( args[i].equals( "--commandsfile")) { if( i==args.length-1) { throw new IllegalArgumentException("'--commandsfile' specified as last option."); } hasCommandsFile = true; commandsFileName = args[++i]; } } if (hasCommandsFile) { List arglist = new ArrayList(); BufferedReader bufferedReader = null; try { bufferedReader = new BufferedReader(new FileReader( commandsFileName)); String line; while ((line = bufferedReader.readLine()) != null) arglist.add(line); } catch (IOException e) { logger.info( "I/O error when reading temporary commands file", e); throw new IOException( "Unable to read temporary commands file " + commandsFileName + "."); } finally { if (bufferedReader != null) { try { bufferedReader.close(); } catch (IOException e) { } } } args = (String[]) arglist.toArray(new String[arglist.size()]); } return args; } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/util/ConfigurationUtil.java0000644000175000017500000000631111343534522030644 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2007 Joakim Erdfelt * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.Properties; /** * A Utility Class to load the configuration. * * Checks for values using the following hierarchy. * 1) System Property matching key. * 2) cobertura.properties Resource Property matching key. * 3) hardcoded default value * * @author Joakim Erdfelt */ public class ConfigurationUtil { public static final String RESOURCE = "/cobertura.properties"; private Properties props; public ConfigurationUtil() { init(); } public void init() { props = new Properties(); URL url = this.getClass().getResource( RESOURCE ); if ( url == null ) { DEBUG( "Unable to find configuration resource in classpath of name " + RESOURCE + ", using empty configuration." ); return; } InputStream is = null; try { is = url.openStream(); props.load( is ); } catch ( IOException e ) { System.err.println( "ERROR: Unable to load configuration resource " + RESOURCE + " - " + e.getMessage() ); } finally { IOUtil.closeInputStream( is ); } } public String getProperty( String key, String defvalue ) { String value = System.getProperty( key ); if ( value != null ) { DEBUG("Using system property value [" + value + "] for key [" + key + "]"); return value; } value = props.getProperty( key ); if ( value != null ) { DEBUG("Using cobertura.properties value [" + value + "] for key [" + key + "]"); return value; } DEBUG("Using default value [" + defvalue + "] for key [" + key + "]"); return defvalue; } public String getDatafile() { return getProperty( "net.sourceforge.cobertura.datafile", "cobertura.ser" ); } /** * Poor mans debugging. * Intentionally didn't use log4j, as we dont want to introduce that dependency on instrumented files. */ private void DEBUG(String msg) { if(false) { System.out.println("[Cobertura:ConfigurationUtil] " + msg); } } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/util/RegexUtil.java0000644000175000017500000000504211343534515027111 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2005 Mark Doliner * Copyright (C) 2006 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.util; import java.util.Collection; import java.util.Iterator; import org.apache.log4j.Logger; import org.apache.oro.text.regex.MalformedPatternException; import org.apache.oro.text.regex.Pattern; import org.apache.oro.text.regex.Perl5Compiler; import org.apache.oro.text.regex.Perl5Matcher; /** * Abstract, not to be instantiated utility class for Regex functions. * * @author John Lewis (logic copied from MethodInstrumenter) */ public abstract class RegexUtil { private static final Logger logger = Logger.getLogger(RegexUtil.class); private final static Perl5Matcher pm = new Perl5Matcher(); /** *

* Check to see if one of the regular expressions in a collection match * an input string. *

* * @param regexs The collection of regular expressions. * @param str The string to check for a match. * @return True if a match is found. */ public static boolean matches(Collection regexs, String str) { Iterator iter = regexs.iterator(); while (iter.hasNext()) { Pattern regex = (Pattern)iter.next(); if (pm.matches(str, regex)) { return true; } } return false; } public static void addRegex(Collection list, String regex) { try { Perl5Compiler pc = new Perl5Compiler(); Pattern pattern = pc.compile(regex); list.add(pattern); } catch (MalformedPatternException e) { logger.warn("The regular expression " + regex + " is invalid: " + e.getLocalizedMessage()); } } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/merge/0000755000175000017500000000000011345540725024461 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/merge/Main.java0000644000175000017500000000560111343534522026206 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2003 jcoverage ltd. * Copyright (C) 2005 Mark Doliner * Copyright (C) 2005 Joakim Erdfelt * Copyright (C) 2005 Mark Sinke * Copyright (C) 2005 Grzegorz Lukasik * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.merge; import java.io.File; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler; import net.sourceforge.cobertura.coveragedata.ProjectData; import net.sourceforge.cobertura.util.CommandLineBuilder; import net.sourceforge.cobertura.util.Header; public class Main { public Main(String[] args) { File dataFile = CoverageDataFileHandler.getDefaultDataFile(); File baseDir = null; List filesToMerge = new ArrayList(); // Go through all the parameters for (int i = 0; i < args.length; i++) { if (args[i].equals("--datafile")) dataFile = new File(args[++i]); else if (args[i].equals("--basedir")) baseDir = new File(args[++i]); else filesToMerge.add( new File(baseDir, args[i])); } // Load coverage data ProjectData projectData = null; if (dataFile.isFile()) projectData = CoverageDataFileHandler.loadCoverageData(dataFile); if (projectData == null) projectData = new ProjectData(); if (filesToMerge.isEmpty()) { System.err.println("Error: No files were specified for merging."); System.exit(1); } // Merge everything Iterator iter = filesToMerge.iterator(); while (iter.hasNext()) { File newDataFile = (File)iter.next(); ProjectData projectDataNew = CoverageDataFileHandler .loadCoverageData(newDataFile); if (projectDataNew != null) projectData.merge(projectDataNew); } // Save the combined data file CoverageDataFileHandler.saveCoverageData(projectData, dataFile); } public static void main(String[] args) { Header.print(System.out); try { args = CommandLineBuilder.preprocessCommandLineArguments( args); } catch( Exception ex) { System.err.println( "Error: Cannot process arguments: " + ex.getMessage()); System.exit(1); } new Main(args); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/webapp/0000755000175000017500000000000011345540725024640 5ustar twernertwernercobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/webapp/FlushCoberturaServlet.java0000644000175000017500000000466611343534515032012 0ustar twernertwerner/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2009 Amit Nithianandan * Copyright (C) 2009 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License. * * Cobertura is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Cobertura is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Cobertura; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ package net.sourceforge.cobertura.webapp; import java.io.IOException; import java.io.PrintStream; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class FlushCoberturaServlet extends HttpServlet { /** * */ private static final long serialVersionUID = 1L; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { try { String className = "net.sourceforge.cobertura.coveragedata.ProjectData"; String methodName = "saveGlobalProjectData"; Class saveClass = Class.forName(className); java.lang.reflect.Method saveMethod = saveClass.getDeclaredMethod(methodName, new Class[0]); saveMethod.invoke(null,new Object[0]); } catch (Throwable t) { PrintStream ps = new PrintStream(resp.getOutputStream()); ps.println("

Could not save Cobertura data. Make sure cobertura.jar is in the web server's lib directory: " + t.getLocalizedMessage()); ps.print("

"); t.printStackTrace(ps); ps.println(""); resp.flushBuffer(); } } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } } cobertura-1.9.4.1+dfsg.orig/src/net/sourceforge/cobertura/webapp/web.xml0000644000175000017500000000330611343534515026137 0ustar twernertwerner CoberturaFlushServlet CoberturaFlushServlet CoberturaFlushServlet net.sourceforge.cobertura.webapp.FlushCoberturaServlet 1 CoberturaFlushServlet /flushCobertura cobertura-1.9.4.1+dfsg.orig/cobertura-report.bat0000644000175000017500000000114711343534522021462 0ustar twernertwerner@echo off REM REM Grab the directory where this script resides, for use later REM set COBERTURA_HOME=%~dp0 REM REM Read all parameters into a single variable using an ugly loop REM set CMD_LINE_ARGS=%1 if ""%1""=="""" goto doneStart shift :getArgs if ""%1""=="""" goto doneStart set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto getArgs :doneStart java -cp "%COBERTURA_HOME%cobertura.jar;%COBERTURA_HOME%lib\asm-3.0.jar;%COBERTURA_HOME%lib\asm-tree-3.0.jar;%COBERTURA_HOME%lib\log4j-1.2.9.jar;%COBERTURA_HOME%lib\jakarta-oro-2.0.8.jar" net.sourceforge.cobertura.reporting.Main %CMD_LINE_ARGS% cobertura-1.9.4.1+dfsg.orig/build.xml0000644000175000017500000005546111343534514017325 0ustar twernertwerner Cobertura - http://cobertura.sourceforge.net/ The copyright for this program is retained by its contributors See the included COPYRIGHT file for a complete list of contributors Cobertura is licensed under the GNU General Public License Cobertura comes with ABSOLUTELY NO WARRANTY //load buildUtil definitions evaluate(new File("buildUtil.groovy")) buildWar(new File("coberturaFlush.war")) //load buildUtil definitions evaluate(new File("buildUtil.groovy")) deployToLocalMavenRepo() //load buildUtil definitions evaluate(new File("buildUtil.groovy")) mergeJavancss() cobertura-1.9.4.1+dfsg.orig/README0000644000175000017500000000167411343534521016357 0ustar twernertwernerABOUT Cobertura is a free Java code coverage reporting tool. It is based on jcoverage 1.0.5. See the Cobertura web page for more details. http://cobertura.sourceforge.net/ COPYRIGHT See the included file "COPYRIGHT" LICENSE Cobertura is free software. Most of it is licensed under the GNU GPL, and you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Please review the file COPYING included in this distribution for further details. Parts of Cobertura are licensed under the Apache Software License, Version 1.1. WARRANTY Cobertura is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. cobertura-1.9.4.1+dfsg.orig/ChangeLog0000644000175000017500000003213211343534513017243 0ustar twernertwernerversion 1.9.4.1: * Fix a problem that occurs in Tomcat. When TouchCollector initializes, it calls ProjectData.initialize() which (with Tomcat only) eventually calls TouchCollector. However, TouchCollector's static members have not been initialized. Added a test that highlights this problem. (Thanks to Jack Cobb for suggesting the fix). * Runs on Java 5. (Fix for Bug 2962599). version 1.9.4: * Cobertura is now up to 10x faster. Aggregates changes in temporary TouchCollector class (thread-safe, but lock-free) and after that applies it on real model (ProjectData) as a batch operation. (Piotr Tabor) * Fixed "Some packages are included more then once" bug (#2875576) that caused some counts on the HTML report to be incorrect. (Charlie Squires) * Fixed "Inner classes not counted in coverage report total" bug (#2943320) (Charlie Squires) version 1.9.3: * Update to the latest Javancss (32.53) to fix some complexity calculation problems. Bug #2824425. (John Lewis) * Non-Java source files (like Groovy) no longer show the JavaNCSS warnings during cobertura-report. Fix of bug #2819844. * Support the case where multiple classloaders each load the Cobertura classes. (Ed Randall) * Fixed bug added with 1.9.2 where a NullPointerException is thrown if ProjectData.saveGlobalProjectData() is called before any instrumented code is executed. version 1.9.2: * Cobertura is now thread safe. * Fix for FileLocker exception when writing coverage data (java.lang.IllegalStateException: Shutdown in progress) that started to appear with Java 6 update 14. (Chris van Es) * Fix for bug "Unix scripts behave oddly due to DOS format - ID: 2788621" version 1.9.1.1: * Just a copy of 1.9.1 with a corrected Maven POM file (cobertura-runtime.pom). A new version has to be created to get it uploaded to the central Maven repo. version 1.9.1: * Complexity calculation now works with Java 5 language features such as Annotations. (Tri Bao Ho) * Removed the bold font from the source-view for uncovered lines to improve the alignment. (Jiri Mares) * Support Ant s. (Matt Cordes, John Lewis) * Support the antlib mechanism for defining and importing ant tasks. (Richard Atkins) * Reports now support source encoded in something than UTF-8. (Jiri Mares) * Report generation performance improvement. (Ignat Zapolsky) * Report generation will look in zip and jar files if the source java file is not found. (Charlie Squires, John Lewis) * cobertura-check with linerate=0, branchrate=0, packagebranchrate=0, packagelinerate=0, totalbranchrate=0, totallinerate=0 will no longer default all the values to 50 as before. Therefore, cobertura-check will always pass. Note that this still means that (with no attributes) will still default to 50 for all rates. (Charlie Squires) (Bug 2152919) * New coberturaFlush.war is created. Deploy it to a web server and invoke http://:/coberturaFlush/flushCobertura for a convenient way of flushing the cobertura data to the datafile without stopping the web server. (Amit Nithianandan) * XML report now shows total lines-covered, lines-valid, branches-covered, branches-valid, and complexity. (Julian Gamble) * New report option called "summaryXml" will create a small summary XML report that does not have all the details on the classes - just the overall totals. This is for large projects where the full XML report gets so big it impairs continuous build processes. (Julian Gamble and Dan Godfrey) * Migrated from asm-2.2.1 to asm-3.0. (Jiri Mares) * The percentage coverage of 199 out of 200 lines has been 100%. No more! Now it is 99%. (Jiri Mares) * Spelling error corrected in main.css file - changed magin to margin. (Dennis Lundberg) version 1.9: * Much improved branch coverage. Information on whether the true as well as the false of an if statement is collected. Also, information on the branches of a switch statement (including the default) is collected. (Jiri Mares) * Assume Java source files are saved as UTF-8 instead of the computer's default encoding. * Write all HTML and XML reports in UTF-8 instead of the computer's default encoding (Naoki Iwami). * Fix a bug where the Cobertura ant tasks would not work correctly in Microsoft Windows when Cobertura was installed on a different drive than the drive from which you're running ant (Srivathsan Varadarajan). * Added a "maxmemory" attribute to the instrument, merge and report ant tasks (Matt Cordes). * Improve support for Maven and similar environments where control over system properties is difficult such as app servers, IoC containers, IDEs, etc. Setting the datafile location is difficult in these environments. To correct this, a cobertura.properties file located in the classpath is used to properly set the net.sourceforge.cobertura.datafile property. (Joakim Erdfelt) version 1.8 (2006-04-10) * Ability to have multiple regular expressions in the instrument task (Alexei Yudichev). * Ability to specify a minimum branch coverage rate and line coverage rate for each package when using cobertura-check. * Show the number of lines and branches covered and the total number of lines and branches in the HTML report. * Support for instrumenting classes written in Groovy. * Lock the data file before trying to write to it. This allows multiple JVMs (or multiple class loaders within a single JVM) to write to the same coverage data file with no problems (John Lewis). * Ability to instrument classes on a given classpath instead of specifying filesets (John Lewis). * Ability to specify which classes will be instrumented using regular expressions (John Lewis). * Archives within archives will be instrumented if you specify an includeClassname regular expression (John Lewis). * If instrumenting an archive, remove any signatures and checksums, since they will no longer be valid (John Lewis). * Removed the Class-Path line from cobertura.jar. You may need to modify your Cobertura taskdef to include the jars in Cobertura's 'lib' directory. See our Ant task web page for an example. * Reorganized libs into a flatter directory structure--you may need to update your ant scripts. * Upgraded from asm 2.1 to asm 2.2.1. No code changes were needed. * Copied portions of classes from JavaNCSS into Cobertura so that we don't need to include the entire JavaNCSS and CCL jars. version 1.7 (2005-12-06) * log4j is no longer used by the Cobertura classes that are accessed by instrumented Java code. This means you will not need to add log4j to your project's classpath in order to use Cobertura (but log4j is still required when instrumenting and reporting). * Upgraded from asm 2.0 to asm 2.1. No code changes were needed. * Improved the merge task. It should work correctly now (with help from Björn Beskow). * Fixed the ability to specify a data file in the merge task. * Changed the command-line interface to the merge task and added a helper batch/shell script. * Added better error checking to the merge task. * Fixed a bug where an empty or incomplete coverage data file would be written when you test classes inside Tomcat, and you stop Tomcat using the shutdown.bat or shutdown.sh scripts. This would result in an EOFException when running cobertura-report. * Added support for classes compiled with AspectJ. * Cobertura now produces valid XHTML 1.0 reports. version 1.6 (2005-08-22) * Can now use multiple filesets in the cobertura-instrument task (Thanks to Grzegorz Lukasik). * Can now use multiple filesets in the cobertura-report task (Thanks to Jeremy Thomerson, Grzegorz Lukasik and James Seigel). * No longer using the Java version of GNU GetOpt * Fixed a bug where the total number of classes displayed in the HTML report included anonymous classes when it should not have. version 1.5 (2005-08-05) * Shortened the header shown when running Cobertura (Thanks to Jarkko Viinamäki). * Don't save the data file twice after instrumenting. * Print a warning when running cobertura-report with a data file that does not contain information from the instrument step. * When instrumenting, you can now specify a zip, jar, war, ear or sar file and Cobertura will instrument any classes inside of the archive. You must explicity give the name of the archive when instrumenting--giving the name of the directory containing the archive will not work (Thanks to Grzegorz Lukasik). * Fixed a bug where the class list in the HTML reports did not show multiple classes with the same name, but in different packages. * Add a timestamp and version number to all HTML reports. * Add a timestamp and version number to all XML reports. * Add the combined line-rate and branch-rate for all packages to all XML reports. * Fixed the merge task (Thanks to Mark Sinke). * The check task now supports checking against a project's total branch and line coverage rates (Thanks to Nathan Wilson). * The check ant task now allows you to fail the ant build, if desired (Thanks to Nathan Wilson). * The check task can set an ant property to "true" on failure (Thanks to Alex Ruiz). * Changed some of the parameters for the check task. See the online documentation for usage information. * The command line Windows batch scripts work better. version 1.4 (2005-05-30) * Fixed a bug that sometimes resulted in a StringIndexOutOfBoundsException when running cobertura-report (Thanks to Grzegorz Lukasik). * Fixed a bug where classes without coverage data ("N/A") were not always sorted correctly in the HTML report (Thanks to Olivier Parent). * Fixed a bug where the code complexity column would not always sort correctly in locales that use a comma to split the decimal part of the number (Thanks to Olivier Parent). * Show "N/A" in the branch column of the HTML report for classes and packages that do not have any branches. version 1.3 (2005-05-20) * Increased speed of HTML reports by filtering the files read in to determine cyclomatic complexity numbers on. * In the lower left pane of the HTML reports, classes are now sorted only by their class name (instead of by their package name plus class name). * Changed the format of the XML reports to something that is hopefully easier to use and more natural. This unfortunately breaks backward compatability. * We're using a DTD for the XML reports now. See http://cobertura.sourceforge.net/xml/coverage-01.dtd * Added the ability to specify the location of the coverage data files from the ant tasks and the command line. * More user-friendly error checking and reporting. version 1.2 (2005-03-16) * Fix a bug that caused the XML reports to be invalid XML (they were missing the tag). * Use Java 1.4 pattern matching and remove Jakarta ORO. version 1.1 (2005-03-08) * Fix a bug in the syntax highlighting code of the HTML report generation. Previously, the highlighting for single quotes containing "\\" would not end correctly. * Check the third party jars into CVS using the correct CVS substition flag (binary, not ASCII). * Temporary files created by the instrument ant task and merge ant task are now deleted after the ant task finishes. * Switch the instrumentation classes to use ASM instead of Apache BCEL. There are three benefits to this: 1. BCEL was throwing exceptions with some source code compiled with JDK 1.5--ASM works fine. 2. ASM is licensed under the revised BSD license, which is compatable with the GPL, which allows us to remove the questionable exception for BCEL. 3. Instrumentation is about 5 times faster with ASM than BCEL. * Modify the HTML reports so that classes without line number information will appear as "Not Applicable." This includes skeleton classes, stub classes, interfaces, or anything not compiled with debug=true. * Fix bug #1151777 with a patch from Jeremy Thomerson. Previously we were not escaping some characters correctly in the generated XML coverage report (specificially < and >). * Set the class-path in the cobertura.jar manifest file correctly. * Fill feature request #1151779 with a patch from Jeremy Thomerson. This changes the structure of the XML report so that are enclosed inside . version 1.0 (2005-02-12) * Forked jcoverage 1.0.5 (although the version in the source says 1.0.4). All original code is copyright 2003 jcoverage ltd. Kurt Guenther highlighted a bug in the branch coverage, was was fixed. * Applied a patch from Joakim Erdfelt to fix a bug where jcoverage would fail to instrument classes if you attempted to instrument a very large number of classes (in the hundreds). * Rewrote the HTML reporting and included code complexity in the output. cobertura-1.9.4.1+dfsg.orig/cobertura-instrument.sh0000644000175000017500000000033011343534512022213 0ustar twernertwernerjava -cp `dirname $0`/cobertura.jar:`dirname $0`/lib/asm-3.0.jar:`dirname $0`/lib/asm-tree-3.0.jar:`dirname $0`/lib/log4j-1.2.9.jar:`dirname $0`/lib/jakarta-oro-2.0.8.jar net.sourceforge.cobertura.instrument.Main $* cobertura-1.9.4.1+dfsg.orig/cobertura-check.sh0000644000175000017500000000032311343534512021062 0ustar twernertwernerjava -cp `dirname $0`/cobertura.jar:`dirname $0`/lib/asm-3.0.jar:`dirname $0`/lib/asm-tree-3.0.jar:`dirname $0`/lib/log4j-1.2.9.jar:`dirname $0`/lib/jakarta-oro-2.0.8.jar net.sourceforge.cobertura.check.Main $* cobertura-1.9.4.1+dfsg.orig/COPYING0000644000175000017500000004363411343534521016534 0ustar twernertwerner GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. cobertura-1.9.4.1+dfsg.orig/COPYRIGHT0000644000175000017500000000455511343534514016775 0ustar twernertwernerCobertura - http://cobertura.sourceforge.net/ List of all contributors to Cobertura Listed alphabetically by last name Copyright (C) 2005 Björn Beskow Copyright (C) 2008 Matt Cordes Copyright (C) 2005 Erik Dick Copyright (C) 2005 Mark Doliner Copyright (C) 2005 Joakim Erdfelt Copyright (C) 2008 Julian Gamble Copyright (C) 2006 Dan Godfrey Copyright (C) 2008 Tri Bao Ho Copyright (C) 2006 Naoki Iwami Copyright (C) 2003 jcoverage ltd. Copyright (C) 2009 John Lewis Copyright (C) 2005 Grzegorz Lukasik Copyright (C) 2006 Jiri Mares Copyright (C) 2009 Amit Nithianandan Copyright (C) 2005 Olivier Parent Copyright (C) 2009 Ed Randall Copyright (C) 2005 Alex Ruiz Copyright (C) 2005 James Seigel Copyright (C) 2005 Mark Sinke Copyright (C) 2009 Charlie Squires Copyright (C) 2010 Piotr Tabor Copyright (C) 2005 Jeremy Thomerson Copyright (C) 2009 Chris van Es Copyright (C) 2006 Srivathsan Varadarajan Copyright (C) 2005 Nathan Wilson Copyright (C) 2005 Alexei Yudichev Code in the net.sourceforge.cobertura.javancss package is Copyright (C) 2000 Chr. Clemens Lee cobertura-1.9.4.1+dfsg.orig/cobertura-report.sh0000644000175000017500000000032711343534512021324 0ustar twernertwernerjava -cp `dirname $0`/cobertura.jar:`dirname $0`/lib/asm-3.0.jar:`dirname $0`/lib/asm-tree-3.0.jar:`dirname $0`/lib/log4j-1.2.9.jar:`dirname $0`/lib/jakarta-oro-2.0.8.jar net.sourceforge.cobertura.reporting.Main $*