001 //XRadar
002 //Copyright (c) 2004, 2005, Kristoffer Kvam
003 //All rights reserved.
004 //
005 //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
006 //
007 //Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
008 //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.
009 //Neither the name of Kristoffer Kvam nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
010 //
011 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 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 COPYRIGHT OWNER OR 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.
012 //
013 //See licence.txt for dependancies to other open projects.
014
015 package org.xradar.test.a;
016
017 import org.xradar.test.f.F1;
018 import org.xradar.test.a.suba.SubA;
019 import org.xradar.test.b.B1;
020 import org.xradar.test.c.C1;
021 import org.xradar.test.d.D1;
022 import org.xradar.test.d.D2;
023 import org.xradar.test.e.E1;
024 import org.xradar.test.f.F1;
025 import java.util.Vector;
026
027 /**
028 * Input class for the XRadar test application
029 *
030 * @author Kristoffer Kvam
031 */
032 public class A1 {
033 private static B1 var = new B1("test");
034
035 public static void main(String[] args) {
036 System.out.println("This XRadar kicks ass!!!");
037 new A1();
038 new SubA();
039 new C1();
040 new D1();
041 new D2();
042 new E1();
043 }
044
045 //Don't alter this piece. It is a perfect copy of a method 29 in C1.
046 public void testMethod29() {
047 new F1();
048 for (int i = 0; i < 100; i++) {
049 System.out.println("We");
050 for (int j = 0; j < 3; j++) {
051 switch (j) {
052 case 0:
053 if (i == 1) {
054 System.out.println("Love");
055 } else {
056 System.out.println("Hate");
057 }
058 break;
059 case 1:
060 System.out.println("Cyclomatic");
061 break;
062 case 2:
063 System.out.println("Complexity!");
064 break;
065 }
066 }
067 for (int j = 0; j < 3; j++) {
068 switch (j) {
069 case 0:
070 if (i == 1) {
071 System.out.println("Interpret ");
072 } else {
073 System.out.println("Misunderstand ");
074 }
075 break;
076 case 1:
077 System.out.println("Complex ");
078 break;
079 case 2:
080 System.out.println("Code ");
081 new B1("Turbo");
082 break;
083 }
084 }
085
086 }
087
088 }
089
090 public void methodWithParameters(boolean runPart1, boolean runPart2){
091 if (runPart1){
092 System.out.println("bla, bla, bla");
093 System.out.println("bla, bla, bla");
094 System.out.println("bla, bla, bla");
095 System.out.println("bla, bla, bla");
096 System.out.println("bla, bla, bla");
097 }
098 if (runPart2){
099 System.out.println("jada, jada, jada");
100 }
101 }
102
103 public String methodWithParameters2(Boolean bool, String string, Vector vector, int i){
104 return "bogus";
105 }
106 }
|