diff options
| -rw-r--r-- | TODO | 6 | ||||
| -rw-r--r-- | data/test/evg-test1.evg (renamed from data/test/evg-test1.rp) | 0 | ||||
| -rw-r--r-- | data/test/test1-empty.evg (renamed from data/test/test1-empty.rp) | 0 | ||||
| -rw-r--r-- | data/test/test10-guard.evg (renamed from data/test/test10-guard.rp) | 0 | ||||
| -rw-r--r-- | data/test/test11-bodyinlinemulti.evg (renamed from data/test/test11-bodyinlinemulti.rp) | 0 | ||||
| -rw-r--r-- | data/test/test2-singlereplace.evg (renamed from data/test/test2-singlereplace.rp) | 0 | ||||
| -rw-r--r-- | data/test/test3-multireplace.evg (renamed from data/test/test3-multireplace.rp) | 0 | ||||
| -rw-r--r-- | data/test/test4-implicitorder.evg (renamed from data/test/test4-implicitorder.rp) | 0 | ||||
| -rw-r--r-- | data/test/test5-explicitorder.evg (renamed from data/test/test5-explicitorder.rp) | 0 | ||||
| -rw-r--r-- | data/test/test6-staging.evg (renamed from data/test/test6-staging.rp) | 0 | ||||
| -rw-r--r-- | data/test/test7-error.evg (renamed from data/test/test7-error.rp) | 0 | ||||
| -rw-r--r-- | data/test/test8-globals.evg (renamed from data/test/test8-globals.rp) | 0 | ||||
| -rw-r--r-- | data/test/test9.evg (renamed from data/test/test9.rp) | 0 | ||||
| -rw-r--r-- | docs/jacoco-ut/jacoco.csv | 16 | ||||
| -rw-r--r-- | docs/jacoco-ut/jacoco.xml | 1 | ||||
| -rw-r--r-- | pom.xml | 10 | ||||
| -rw-r--r-- | src/main/java/bjc/everge/BadReplParse.java | 6 | ||||
| -rw-r--r-- | src/main/java/bjc/everge/ControlledString.java | 136 | ||||
| -rw-r--r-- | src/main/java/bjc/everge/Everge.java | 312 | ||||
| -rw-r--r-- | src/main/java/bjc/everge/IntHolder.java | 72 | ||||
| -rw-r--r-- | src/main/java/bjc/everge/LogStream.java | 341 | ||||
| -rw-r--r-- | src/main/java/bjc/everge/MirrorOutputStream.java | 63 | ||||
| -rw-r--r-- | src/main/java/bjc/everge/ReplPair.java | 700 | ||||
| -rw-r--r-- | src/main/java/bjc/everge/ReplPairError.java (renamed from src/main/java/bjc/everge/ReplError.java) | 70 | ||||
| -rw-r--r-- | src/main/java/bjc/everge/ReplPairOptions.java (renamed from src/main/java/bjc/everge/ReplOpts.java) | 37 | ||||
| -rw-r--r-- | src/main/java/bjc/everge/ReplPairParser.java | 709 | ||||
| -rw-r--r-- | src/main/java/bjc/everge/ReplPairSet.java (renamed from src/main/java/bjc/everge/ReplSet.java) | 50 | ||||
| -rw-r--r-- | src/test/java/bjc/everge/EvergeTest.java | 8 | ||||
| -rw-r--r-- | src/test/java/bjc/everge/ReplPairTest.java | 26 | ||||
| -rw-r--r-- | src/test/java/bjc/everge/TestUtils.java | 12 |
30 files changed, 1078 insertions, 1497 deletions
@@ -0,0 +1,6 @@ +@TODO Ben Culkin Oct 31st, 2020 - :MoreArgs + Add more CLI arguments to allow specifying more of the options for pairs. + + Also, add flags for controlling where input/output is going to at the moment, + since if you are specifying multiple files, at the moment, there isn't much + of a way to tell the difference between them.
\ No newline at end of file diff --git a/data/test/evg-test1.rp b/data/test/evg-test1.evg index b6da7c5..b6da7c5 100644 --- a/data/test/evg-test1.rp +++ b/data/test/evg-test1.evg diff --git a/data/test/test1-empty.rp b/data/test/test1-empty.evg index f736b8e..f736b8e 100644 --- a/data/test/test1-empty.rp +++ b/data/test/test1-empty.evg diff --git a/data/test/test10-guard.rp b/data/test/test10-guard.evg index a647a3a..a647a3a 100644 --- a/data/test/test10-guard.rp +++ b/data/test/test10-guard.evg diff --git a/data/test/test11-bodyinlinemulti.rp b/data/test/test11-bodyinlinemulti.evg index 35eb329..35eb329 100644 --- a/data/test/test11-bodyinlinemulti.rp +++ b/data/test/test11-bodyinlinemulti.evg diff --git a/data/test/test2-singlereplace.rp b/data/test/test2-singlereplace.evg index ea05d12..ea05d12 100644 --- a/data/test/test2-singlereplace.rp +++ b/data/test/test2-singlereplace.evg diff --git a/data/test/test3-multireplace.rp b/data/test/test3-multireplace.evg index 8121c8c..8121c8c 100644 --- a/data/test/test3-multireplace.rp +++ b/data/test/test3-multireplace.evg diff --git a/data/test/test4-implicitorder.rp b/data/test/test4-implicitorder.evg index 28b14d5..28b14d5 100644 --- a/data/test/test4-implicitorder.rp +++ b/data/test/test4-implicitorder.evg diff --git a/data/test/test5-explicitorder.rp b/data/test/test5-explicitorder.evg index 2ee18ce..2ee18ce 100644 --- a/data/test/test5-explicitorder.rp +++ b/data/test/test5-explicitorder.evg diff --git a/data/test/test6-staging.rp b/data/test/test6-staging.evg index 34fd9dd..34fd9dd 100644 --- a/data/test/test6-staging.rp +++ b/data/test/test6-staging.evg diff --git a/data/test/test7-error.rp b/data/test/test7-error.evg index 3a8f995..3a8f995 100644 --- a/data/test/test7-error.rp +++ b/data/test/test7-error.evg diff --git a/data/test/test8-globals.rp b/data/test/test8-globals.evg index 8fd2165..8fd2165 100644 --- a/data/test/test8-globals.rp +++ b/data/test/test8-globals.evg diff --git a/data/test/test9.rp b/data/test/test9.evg index 17c7c02..17c7c02 100644 --- a/data/test/test9.rp +++ b/data/test/test9.evg diff --git a/docs/jacoco-ut/jacoco.csv b/docs/jacoco-ut/jacoco.csv deleted file mode 100644 index f72d312..0000000 --- a/docs/jacoco-ut/jacoco.csv +++ /dev/null @@ -1,16 +0,0 @@ -GROUP,PACKAGE,CLASS,INSTRUCTION_MISSED,INSTRUCTION_COVERED,BRANCH_MISSED,BRANCH_COVERED,LINE_MISSED,LINE_COVERED,COMPLEXITY_MISSED,COMPLEXITY_COVERED,METHOD_MISSED,METHOD_COVERED -everge,bjc.everge,StringUtils,114,253,13,35,18,57,13,16,1,4 -everge,bjc.everge,ReplOpts,147,30,30,0,32,10,17,1,2,1 -everge,bjc.everge,ReplPair,938,912,92,119,180,223,79,58,2,16 -everge,bjc.everge,LogStream,91,54,2,2,34,19,17,9,16,8 -everge,bjc.everge,ReplError,72,60,7,1,10,12,6,3,2,3 -everge,bjc.everge,ControlledString.ParseStrings,8,15,0,0,1,6,1,1,1,1 -everge,bjc.everge,Everge,568,513,57,40,137,111,48,20,3,10 -everge,bjc.everge,IntHolder,10,22,0,0,5,7,2,4,2,4 -everge,bjc.everge,MirrorOutputStream,62,47,8,4,16,9,8,4,4,2 -everge,bjc.everge,ControlledString.Control,134,104,23,23,29,26,21,11,3,6 -everge,bjc.everge,Everge.InputStatus,0,34,0,0,0,4,0,1,0,1 -everge,bjc.everge,StageStatus,0,34,0,0,0,4,0,1,0,1 -everge,bjc.everge,ControlledString,74,144,3,15,17,28,5,11,3,4 -everge,bjc.everge,ReplSet,56,69,2,4,12,15,4,5,3,3 -everge,bjc.everge,BadReplParse,59,69,6,6,12,16,7,3,2,2 diff --git a/docs/jacoco-ut/jacoco.xml b/docs/jacoco-ut/jacoco.xml deleted file mode 100644 index f3632a8..0000000 --- a/docs/jacoco-ut/jacoco.xml +++ /dev/null @@ -1 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.1//EN" "report.dtd"><report name="everge"><sessioninfo id="naberius-34ffc173" start="1590017964980" dump="1590017965935"/><package name="bjc/everge"><class name="bjc/everge/StringUtils" sourcefilename="StringUtils.java"><method name="<init>" desc="()V" line="12"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="escapeSplit" desc="(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;" line="36"><counter type="INSTRUCTION" missed="111" covered="212"/><counter type="BRANCH" missed="13" covered="35"/><counter type="LINE" missed="17" covered="50"/><counter type="COMPLEXITY" missed="12" covered="13"/><counter type="METHOD" missed="0" covered="1"/></method><method name="sliceString" desc="(Ljava/lang/String;II)Ljava/lang/String;" line="199"><counter type="INSTRUCTION" missed="0" covered="18"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="sliceStringL" desc="(Ljava/lang/String;II)Ljava/lang/String;" line="218"><counter type="INSTRUCTION" missed="0" covered="20"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="<clinit>" desc="()V" line="16"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="114" covered="253"/><counter type="BRANCH" missed="13" covered="35"/><counter type="LINE" missed="18" covered="57"/><counter type="COMPLEXITY" missed="13" covered="16"/><counter type="METHOD" missed="1" covered="4"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/ReplOpts" sourcefilename="ReplOpts.java"><method name="<init>" desc="()V" line="10"><counter type="INSTRUCTION" missed="0" covered="30"/><counter type="LINE" missed="0" covered="10"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="hashCode" desc="()I" line="57"><counter type="INSTRUCTION" missed="77" covered="0"/><counter type="BRANCH" missed="10" covered="0"/><counter type="LINE" missed="10" covered="0"/><counter type="COMPLEXITY" missed="6" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="equals" desc="(Ljava/lang/Object;)Z" line="71"><counter type="INSTRUCTION" missed="70" covered="0"/><counter type="BRANCH" missed="20" covered="0"/><counter type="LINE" missed="22" covered="0"/><counter type="COMPLEXITY" missed="11" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="147" covered="30"/><counter type="BRANCH" missed="30" covered="0"/><counter type="LINE" missed="32" covered="10"/><counter type="COMPLEXITY" missed="17" covered="1"/><counter type="METHOD" missed="2" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/ReplPair" sourcefilename="ReplPair.java"><method name="<init>" desc="()V" line="58"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="<init>" desc="(Ljava/lang/String;Ljava/lang/String;)V" line="70"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="<init>" desc="(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V" line="84"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="<init>" desc="(Ljava/lang/String;Ljava/lang/String;I)V" line="98"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="<init>" desc="(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V" line="22"><counter type="INSTRUCTION" missed="0" covered="18"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="readList" desc="(Ljava/util/Scanner;)Ljava/util/List;" line="130"><counter type="INSTRUCTION" missed="0" covered="8"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="readList" desc="(Ljava/util/List;Ljava/util/Scanner;)Ljava/util/List;" line="146"><counter type="INSTRUCTION" missed="0" covered="20"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="readList" desc="(Ljava/util/List;Ljava/util/Scanner;Ljava/util/List;)Ljava/util/List;" line="171"><counter type="INSTRUCTION" missed="0" covered="8"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="readList" desc="(Ljava/util/List;Ljava/util/Scanner;Ljava/util/List;Lbjc/everge/ReplOpts;)Ljava/util/List;" line="190"><counter type="INSTRUCTION" missed="209" covered="419"/><counter type="BRANCH" missed="22" covered="58"/><counter type="LINE" missed="25" covered="104"/><counter type="COMPLEXITY" missed="20" covered="22"/><counter type="METHOD" missed="0" covered="1"/></method><method name="readMultiLine" desc="(Ljava/lang/String;Ljava/util/Scanner;Lbjc/everge/ReplOpts;Ljava/lang/String;Lbjc/everge/IntHolder;)Ljava/lang/String;" line="428"><counter type="INSTRUCTION" missed="37" covered="84"/><counter type="BRANCH" missed="8" covered="12"/><counter type="LINE" missed="3" covered="19"/><counter type="COMPLEXITY" missed="6" covered="5"/><counter type="METHOD" missed="0" covered="1"/></method><method name="apply" desc="(Ljava/lang/String;)Ljava/lang/String;" line="469"><counter type="INSTRUCTION" missed="0" covered="19"/><counter type="BRANCH" missed="0" covered="4"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="1"/></method><method name="toString" desc="()Ljava/lang/String;" line="483"><counter type="INSTRUCTION" missed="10" covered="33"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="3"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="compareTo" desc="(Lbjc/everge/ReplPair;)I" line="493"><counter type="INSTRUCTION" missed="0" covered="17"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="hashCode" desc="()I" line="501"><counter type="INSTRUCTION" missed="59" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="equals" desc="(Ljava/lang/Object;)Z" line="513"><counter type="INSTRUCTION" missed="31" covered="52"/><counter type="BRANCH" missed="17" covered="11"/><counter type="LINE" missed="14" covered="13"/><counter type="COMPLEXITY" missed="14" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="readName" desc="(Ljava/lang/String;Ljava/util/Scanner;Ljava/util/List;Lbjc/everge/ReplPair;Lbjc/everge/ReplOpts;Lbjc/everge/IntHolder;Lbjc/everge/IntHolder;)Ljava/lang/String;" line="544"><counter type="INSTRUCTION" missed="261" covered="113"/><counter type="BRANCH" missed="15" covered="16"/><counter type="LINE" missed="54" covered="30"/><counter type="COMPLEXITY" missed="13" covered="8"/><counter type="METHOD" missed="0" covered="1"/></method><method name="readGlobal" desc="(Ljava/lang/String;Ljava/util/Scanner;Ljava/util/List;Lbjc/everge/ReplOpts;Lbjc/everge/IntHolder;Lbjc/everge/IntHolder;)V" line="701"><counter type="INSTRUCTION" missed="298" covered="91"/><counter type="BRANCH" missed="23" covered="13"/><counter type="LINE" missed="67" covered="24"/><counter type="COMPLEXITY" missed="20" covered="7"/><counter type="METHOD" missed="0" covered="1"/></method><method name="getControls" desc="(Ljava/lang/String;Ljava/util/List;Lbjc/everge/ReplOpts;Lbjc/everge/IntHolder;Lbjc/everge/IntHolder;Ljava/lang/String;)Lbjc/everge/ControlledString;" line="873"><counter type="INSTRUCTION" missed="26" covered="10"/><counter type="LINE" missed="6" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="938" covered="912"/><counter type="BRANCH" missed="92" covered="119"/><counter type="LINE" missed="180" covered="223"/><counter type="COMPLEXITY" missed="79" covered="58"/><counter type="METHOD" missed="2" covered="16"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/LogStream" sourcefilename="LogStream.java"><method name="<init>" desc="(Ljava/io/PrintStream;)V" line="58"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="<init>" desc="(Ljava/io/PrintStream;I)V" line="72"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="verbosity" desc="()I" line="83"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="verbosity" desc="(I)V" line="93"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="louder" desc="()V" line="100"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="louder" desc="(I)V" line="110"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="quieter" desc="()V" line="117"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="quieter" desc="(I)V" line="127"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="print" desc="(Ljava/lang/String;)V" line="137"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="printf" desc="(Ljava/lang/String;[Ljava/lang/Object;)V" line="150"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="message" desc="(ILjava/lang/String;)V" line="162"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="messagef" desc="(ILjava/lang/String;[Ljava/lang/Object;)V" line="178"><counter type="INSTRUCTION" missed="0" covered="11"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="fatal" desc="(Ljava/lang/String;)V" line="190"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="fatalf" desc="(Ljava/lang/String;[Ljava/lang/Object;)V" line="202"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="error" desc="(Ljava/lang/String;)V" line="212"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="errorf" desc="(Ljava/lang/String;[Ljava/lang/Object;)V" line="224"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="warn" desc="(Ljava/lang/String;)V" line="234"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="warnf" desc="(Ljava/lang/String;[Ljava/lang/Object;)V" line="246"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="info" desc="(Ljava/lang/String;)V" line="256"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="infof" desc="(Ljava/lang/String;[Ljava/lang/Object;)V" line="268"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="debug" desc="(Ljava/lang/String;)V" line="278"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="debugf" desc="(Ljava/lang/String;[Ljava/lang/Object;)V" line="290"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="trace" desc="(Ljava/lang/String;)V" line="300"><counter type="INSTRUCTION" missed="5" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="tracef" desc="(Ljava/lang/String;[Ljava/lang/Object;)V" line="312"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="91" covered="54"/><counter type="BRANCH" missed="2" covered="2"/><counter type="LINE" missed="34" covered="19"/><counter type="COMPLEXITY" missed="17" covered="9"/><counter type="METHOD" missed="16" covered="8"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/ReplError" sourcefilename="ReplError.java"><method name="<init>" desc="(Lbjc/everge/IntHolder;Lbjc/everge/IntHolder;Ljava/lang/String;Ljava/lang/String;)V" line="40"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="<init>" desc="(IILjava/lang/String;Ljava/lang/String;)V" line="55"><counter type="INSTRUCTION" missed="0" covered="15"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="toString" desc="()Ljava/lang/String;" line="66"><counter type="INSTRUCTION" missed="50" covered="0"/><counter type="BRANCH" missed="4" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="toPrintString" desc="()Ljava/lang/String;" line="82"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="toPrintString" desc="(Ljava/lang/String;)Ljava/lang/String;" line="95"><counter type="INSTRUCTION" missed="18" covered="36"/><counter type="BRANCH" missed="3" covered="1"/><counter type="LINE" missed="3" covered="4"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="72" covered="60"/><counter type="BRANCH" missed="7" covered="1"/><counter type="LINE" missed="10" covered="12"/><counter type="COMPLEXITY" missed="6" covered="3"/><counter type="METHOD" missed="2" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/ControlledString$ParseStrings" sourcefilename="ControlledString.java"><method name="<init>" desc="(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V" line="212"><counter type="INSTRUCTION" missed="0" covered="15"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="PS" desc="(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lbjc/everge/ControlledString$ParseStrings;" line="234"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="8" covered="15"/><counter type="LINE" missed="1" covered="6"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="1" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/Everge" sourcefilename="Everge.java"><method name="<init>" desc="()V" line="15"><counter type="INSTRUCTION" missed="0" covered="41"/><counter type="LINE" missed="0" covered="10"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="setOutput" desc="(Ljava/io/PrintStream;)V" line="78"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setOutput" desc="(Ljava/io/OutputStream;)V" line="88"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="setError" desc="(Ljava/io/PrintStream;)V" line="98"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="setError" desc="(Ljava/io/OutputStream;)V" line="108"><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="main" desc="([Ljava/lang/String;)V" line="118"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="processArgs" desc="([Ljava/lang/String;)Z" line="131"><counter type="INSTRUCTION" missed="22" covered="65"/><counter type="BRANCH" missed="6" covered="4"/><counter type="LINE" missed="3" covered="11"/><counter type="COMPLEXITY" missed="5" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="processArgs" desc="(Ljava/util/List;[Ljava/lang/String;)Z" line="164"><counter type="INSTRUCTION" missed="0" covered="31"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="9"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="processArg" desc="(Ljava/util/List;ZLjava/lang/String;)Z" line="185"><counter type="INSTRUCTION" missed="366" covered="156"/><counter type="BRANCH" missed="33" covered="14"/><counter type="LINE" missed="96" covered="37"/><counter type="COMPLEXITY" missed="26" covered="5"/><counter type="METHOD" missed="0" covered="1"/></method><method name="processInputFile" desc="(Ljava/lang/String;)Z" line="393"><counter type="INSTRUCTION" missed="21" covered="13"/><counter type="BRANCH" missed="3" covered="1"/><counter type="LINE" missed="3" covered="4"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="processInputFile" desc="(Ljava/util/List;Ljava/lang/String;)Z" line="415"><counter type="INSTRUCTION" missed="112" covered="60"/><counter type="BRANCH" missed="9" covered="5"/><counter type="LINE" missed="24" covered="12"/><counter type="COMPLEXITY" missed="6" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="processString" desc="(Ljava/lang/String;)V" line="482"><counter type="INSTRUCTION" missed="10" covered="50"/><counter type="BRANCH" missed="3" covered="3"/><counter type="LINE" missed="1" covered="11"/><counter type="COMPLEXITY" missed="3" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="loadQueue" desc="([Ljava/lang/String;)V" line="509"><counter type="INSTRUCTION" missed="17" covered="80"/><counter type="BRANCH" missed="3" covered="11"/><counter type="LINE" missed="3" covered="13"/><counter type="COMPLEXITY" missed="3" covered="5"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="568" covered="513"/><counter type="BRANCH" missed="57" covered="40"/><counter type="LINE" missed="137" covered="111"/><counter type="COMPLEXITY" missed="48" covered="20"/><counter type="METHOD" missed="3" covered="10"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/IntHolder" sourcefilename="IntHolder.java"><method name="<init>" desc="()V" line="17"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="<init>" desc="(I)V" line="27"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="incr" desc="()I" line="37"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="incr" desc="(I)I" line="49"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="get" desc="()I" line="60"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="set" desc="(I)V" line="70"><counter type="INSTRUCTION" missed="4" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="10" covered="22"/><counter type="LINE" missed="5" covered="7"/><counter type="COMPLEXITY" missed="2" covered="4"/><counter type="METHOD" missed="2" covered="4"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/MirrorOutputStream" sourcefilename="MirrorOutputStream.java"><method name="<init>" desc="([Ljava/io/OutputStream;)V" line="21"><counter type="INSTRUCTION" missed="0" covered="29"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="close" desc="()V" line="31"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="flush" desc="()V" line="38"><counter type="INSTRUCTION" missed="15" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="write" desc="([B)V" line="45"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="write" desc="([BII)V" line="52"><counter type="INSTRUCTION" missed="0" covered="18"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="write" desc="(I)V" line="59"><counter type="INSTRUCTION" missed="16" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="62" covered="47"/><counter type="BRANCH" missed="8" covered="4"/><counter type="LINE" missed="16" covered="9"/><counter type="COMPLEXITY" missed="8" covered="4"/><counter type="METHOD" missed="4" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/ControlledString$Control" sourcefilename="ControlledString.java"><method name="<init>" desc="()V" line="30"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="<init>" desc="(Ljava/lang/String;)V" line="40"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="<init>" desc="(Ljava/lang/String;[Ljava/lang/String;)V" line="52"><counter type="INSTRUCTION" missed="0" covered="9"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="count" desc="()I" line="63"><counter type="INSTRUCTION" missed="2" covered="7"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="get" desc="(I)Ljava/lang/String;" line="76"><counter type="INSTRUCTION" missed="37" covered="12"/><counter type="BRANCH" missed="2" covered="2"/><counter type="LINE" missed="6" covered="3"/><counter type="COMPLEXITY" missed="2" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="toString" desc="()Ljava/lang/String;" line="96"><counter type="INSTRUCTION" missed="48" covered="0"/><counter type="BRANCH" missed="6" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="4" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="hashCode" desc="()I" line="113"><counter type="INSTRUCTION" missed="27" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="equals" desc="(Ljava/lang/Object;)Z" line="122"><counter type="INSTRUCTION" missed="17" covered="64"/><counter type="BRANCH" missed="12" covered="20"/><counter type="LINE" missed="8" covered="13"/><counter type="COMPLEXITY" missed="11" covered="6"/><counter type="METHOD" missed="0" covered="1"/></method><method name="C" desc="(Ljava/lang/String;[Ljava/lang/String;)Lbjc/everge/ControlledString$Control;" line="169"><counter type="INSTRUCTION" missed="0" covered="6"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="134" covered="104"/><counter type="BRANCH" missed="23" covered="23"/><counter type="LINE" missed="29" covered="26"/><counter type="COMPLEXITY" missed="21" covered="11"/><counter type="METHOD" missed="3" covered="6"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/Everge$InputStatus" sourcefilename="Everge.java"><method name="<clinit>" desc="()V" line="19"><counter type="INSTRUCTION" missed="0" covered="34"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="34"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/StageStatus" sourcefilename="StageStatus.java"><method name="<clinit>" desc="()V" line="8"><counter type="INSTRUCTION" missed="0" covered="34"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="34"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/ControlledString" sourcefilename="ControlledString.java"><method name="<init>" desc="()V" line="251"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="<init>" desc="(Ljava/lang/String;)V" line="261"><counter type="INSTRUCTION" missed="0" covered="10"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="<init>" desc="(Ljava/lang/String;[Lbjc/everge/ControlledString$Control;)V" line="275"><counter type="INSTRUCTION" missed="9" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="hasControls" desc="()Z" line="287"><counter type="INSTRUCTION" missed="0" covered="8"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="count" desc="()I" line="296"><counter type="INSTRUCTION" missed="0" covered="4"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="parse" desc="(Ljava/lang/String;Lbjc/everge/ControlledString$ParseStrings;)Lbjc/everge/ControlledString;" line="311"><counter type="INSTRUCTION" missed="17" covered="122"/><counter type="BRANCH" missed="1" covered="13"/><counter type="LINE" missed="3" covered="22"/><counter type="COMPLEXITY" missed="1" covered="7"/><counter type="METHOD" missed="0" covered="1"/></method><method name="toString" desc="()Ljava/lang/String;" line="359"><counter type="INSTRUCTION" missed="41" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="74" covered="144"/><counter type="BRANCH" missed="3" covered="15"/><counter type="LINE" missed="17" covered="28"/><counter type="COMPLEXITY" missed="5" covered="11"/><counter type="METHOD" missed="3" covered="4"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/ReplSet" sourcefilename="ReplSet.java"><method name="<init>" desc="()V" line="19"><counter type="INSTRUCTION" missed="0" covered="8"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="<init>" desc="(Ljava/util/List;)V" line="32"><counter type="INSTRUCTION" missed="6" covered="0"/><counter type="LINE" missed="3" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="fromFile" desc="(Ljava/lang/String;)Lbjc/everge/ReplSet;" line="46"><counter type="INSTRUCTION" missed="24" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="addPairs" desc="(Ljava/util/List;)V" line="63"><counter type="INSTRUCTION" missed="0" covered="21"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="addPairs" desc="([Lbjc/everge/ReplPair;)V" line="78"><counter type="INSTRUCTION" missed="26" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="4" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="apply" desc="(Ljava/lang/String;)Ljava/lang/String;" line="95"><counter type="INSTRUCTION" missed="0" covered="40"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="7"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="56" covered="69"/><counter type="BRANCH" missed="2" covered="4"/><counter type="LINE" missed="12" covered="15"/><counter type="COMPLEXITY" missed="4" covered="5"/><counter type="METHOD" missed="3" covered="3"/><counter type="CLASS" missed="0" covered="1"/></class><class name="bjc/everge/BadReplParse" sourcefilename="BadReplParse.java"><method name="<init>" desc="(Ljava/lang/String;)V" line="29"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="<init>" desc="(Ljava/lang/String;Ljava/util/List;)V" line="41"><counter type="INSTRUCTION" missed="0" covered="7"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="toString" desc="()Ljava/lang/String;" line="49"><counter type="INSTRUCTION" missed="28" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="5" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="toPrintString" desc="()Ljava/lang/String;" line="64"><counter type="INSTRUCTION" missed="24" covered="62"/><counter type="BRANCH" missed="4" covered="6"/><counter type="LINE" missed="5" covered="13"/><counter type="COMPLEXITY" missed="4" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="59" covered="69"/><counter type="BRANCH" missed="6" covered="6"/><counter type="LINE" missed="12" covered="16"/><counter type="COMPLEXITY" missed="7" covered="3"/><counter type="METHOD" missed="2" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><sourcefile name="Everge.java"><line nr="15" mi="0" ci="2" mb="0" cb="0"/><line nr="19" mi="0" ci="16" mb="0" cb="0"/><line nr="23" mi="0" ci="6" mb="0" cb="0"/><line nr="27" mi="0" ci="6" mb="0" cb="0"/><line nr="31" mi="0" ci="6" mb="0" cb="0"/><line nr="35" mi="0" ci="5" mb="0" cb="0"/><line nr="38" mi="0" ci="5" mb="0" cb="0"/><line nr="41" mi="0" ci="3" mb="0" cb="0"/><line nr="44" mi="0" ci="3" mb="0" cb="0"/><line nr="47" mi="0" ci="3" mb="0" cb="0"/><line nr="56" mi="0" ci="5" mb="0" cb="0"/><line nr="59" mi="0" ci="5" mb="0" cb="0"/><line nr="65" mi="0" ci="3" mb="0" cb="0"/><line nr="69" mi="0" ci="7" mb="0" cb="0"/><line nr="78" mi="3" ci="0" mb="0" cb="0"/><line nr="79" mi="1" ci="0" mb="0" cb="0"/><line nr="88" mi="0" ci="6" mb="0" cb="0"/><line nr="89" mi="0" ci="1" mb="0" cb="0"/><line nr="98" mi="6" ci="0" mb="0" cb="0"/><line nr="99" mi="1" ci="0" mb="0" cb="0"/><line nr="108" mi="0" ci="9" mb="0" cb="0"/><line nr="109" mi="0" ci="1" mb="0" cb="0"/><line nr="118" mi="4" ci="0" mb="0" cb="0"/><line nr="120" mi="4" ci="0" mb="0" cb="0"/><line nr="121" mi="1" ci="0" mb="0" cb="0"/><line nr="131" mi="0" ci="4" mb="0" cb="0"/><line nr="133" mi="0" ci="5" mb="0" cb="0"/><line nr="134" mi="0" ci="4" mb="1" cb="1"/><line nr="135" mi="1" ci="6" mb="1" cb="1"/><line nr="137" mi="0" ci="16" mb="0" cb="0"/><line nr="138" mi="0" ci="2" mb="0" cb="0"/><line nr="139" mi="0" ci="4" mb="1" cb="1"/><line nr="140" mi="0" ci="5" mb="0" cb="0"/><line nr="141" mi="0" ci="15" mb="0" cb="0"/><line nr="145" mi="0" ci="2" mb="1" cb="1"/><line nr="146" mi="10" ci="0" mb="2" cb="0"/><line nr="147" mi="10" ci="0" mb="0" cb="0"/><line nr="148" mi="1" ci="0" mb="0" cb="0"/><line nr="151" mi="0" ci="2" mb="0" cb="0"/><line nr="164" mi="0" ci="4" mb="0" cb="0"/><line nr="166" mi="0" ci="2" mb="0" cb="0"/><line nr="169" mi="0" ci="3" mb="0" cb="0"/><line nr="172" mi="0" ci="4" mb="0" cb="2"/><line nr="173" mi="0" ci="5" mb="0" cb="0"/><line nr="175" mi="0" ci="6" mb="0" cb="0"/><line nr="176" mi="0" ci="1" mb="0" cb="0"/><line nr="178" mi="0" ci="4" mb="0" cb="0"/><line nr="181" mi="0" ci="2" mb="0" cb="0"/><line nr="185" mi="0" ci="2" mb="0" cb="0"/><line nr="187" mi="0" ci="4" mb="1" cb="1"/><line nr="188" mi="3" ci="0" mb="0" cb="0"/><line nr="189" mi="2" ci="0" mb="0" cb="0"/><line nr="193" mi="0" ci="7" mb="1" cb="3"/><line nr="194" mi="0" ci="2" mb="0" cb="0"/><line nr="195" mi="0" ci="2" mb="0" cb="0"/><line nr="198" mi="0" ci="4" mb="0" cb="0"/><line nr="199" mi="0" ci="3" mb="1" cb="1"/><line nr="200" mi="5" ci="0" mb="0" cb="0"/><line nr="201" mi="6" ci="0" mb="0" cb="0"/><line nr="204" mi="0" ci="8" mb="11" cb="4"/><line nr="207" mi="3" ci="0" mb="0" cb="0"/><line nr="208" mi="1" ci="0" mb="0" cb="0"/><line nr="211" mi="3" ci="0" mb="0" cb="0"/><line nr="212" mi="1" ci="0" mb="0" cb="0"/><line nr="215" mi="0" ci="6" mb="0" cb="0"/><line nr="216" mi="0" ci="3" mb="0" cb="0"/><line nr="217" mi="0" ci="6" mb="0" cb="0"/><line nr="218" mi="0" ci="1" mb="0" cb="0"/><line nr="221" mi="6" ci="0" mb="0" cb="0"/><line nr="222" mi="3" ci="0" mb="0" cb="0"/><line nr="223" mi="6" ci="0" mb="0" cb="0"/><line nr="224" mi="1" ci="0" mb="0" cb="0"/><line nr="226" mi="0" ci="5" mb="1" cb="1"/><line nr="227" mi="4" ci="0" mb="0" cb="0"/><line nr="228" mi="2" ci="0" mb="0" cb="0"/><line nr="229" mi="1" ci="0" mb="0" cb="0"/><line nr="231" mi="0" ci="5" mb="0" cb="0"/><line nr="234" mi="0" ci="4" mb="0" cb="0"/><line nr="235" mi="0" ci="5" mb="0" cb="0"/><line nr="236" mi="0" ci="12" mb="0" cb="0"/><line nr="237" mi="1" ci="0" mb="0" cb="0"/><line nr="238" mi="9" ci="0" mb="0" cb="0"/><line nr="240" mi="4" ci="0" mb="0" cb="0"/><line nr="241" mi="2" ci="0" mb="0" cb="0"/><line nr="242" mi="0" ci="1" mb="0" cb="0"/><line nr="243" mi="1" ci="0" mb="0" cb="0"/><line nr="245" mi="5" ci="0" mb="2" cb="0"/><line nr="246" mi="4" ci="0" mb="0" cb="0"/><line nr="247" mi="2" ci="0" mb="0" cb="0"/><line nr="248" mi="1" ci="0" mb="0" cb="0"/><line nr="250" mi="5" ci="0" mb="0" cb="0"/><line nr="253" mi="3" ci="0" mb="0" cb="0"/><line nr="255" mi="3" ci="0" mb="0" cb="0"/><line nr="256" mi="1" ci="0" mb="0" cb="0"/><line nr="257" mi="13" ci="0" mb="0" cb="0"/><line nr="258" mi="2" ci="0" mb="0" cb="0"/><line nr="259" mi="4" ci="0" mb="0" cb="0"/><line nr="260" mi="2" ci="0" mb="0" cb="0"/><line nr="261" mi="1" ci="0" mb="0" cb="0"/><line nr="262" mi="1" ci="0" mb="0" cb="0"/><line nr="264" mi="0" ci="5" mb="1" cb="1"/><line nr="265" mi="4" ci="0" mb="0" cb="0"/><line nr="266" mi="2" ci="0" mb="0" cb="0"/><line nr="267" mi="1" ci="0" mb="0" cb="0"/><line nr="269" mi="0" ci="5" mb="0" cb="0"/><line nr="271" mi="0" ci="9" mb="0" cb="0"/><line nr="272" mi="0" ci="5" mb="0" cb="0"/><line nr="273" mi="0" ci="4" mb="0" cb="0"/><line nr="275" mi="0" ci="4" mb="0" cb="0"/><line nr="276" mi="0" ci="7" mb="0" cb="0"/><line nr="278" mi="0" ci="3" mb="1" cb="1"/><line nr="279" mi="4" ci="0" mb="0" cb="0"/><line nr="281" mi="2" ci="0" mb="0" cb="0"/><line nr="282" mi="4" ci="0" mb="2" cb="0"/><line nr="283" mi="11" ci="0" mb="0" cb="0"/><line nr="286" mi="13" ci="0" mb="0" cb="0"/><line nr="289" mi="4" ci="0" mb="0" cb="0"/><line nr="292" mi="10" ci="0" mb="2" cb="0"/><line nr="293" mi="11" ci="0" mb="0" cb="0"/><line nr="294" mi="1" ci="0" mb="0" cb="0"/><line nr="296" mi="5" ci="0" mb="0" cb="0"/><line nr="297" mi="2" ci="0" mb="0" cb="0"/><line nr="300" mi="0" ci="4" mb="0" cb="0"/><line nr="301" mi="1" ci="0" mb="0" cb="0"/><line nr="302" mi="9" ci="0" mb="0" cb="0"/><line nr="304" mi="4" ci="0" mb="0" cb="0"/><line nr="305" mi="2" ci="0" mb="0" cb="0"/><line nr="306" mi="1" ci="0" mb="0" cb="0"/><line nr="307" mi="12" ci="0" mb="0" cb="0"/><line nr="309" mi="2" ci="0" mb="0" cb="0"/><line nr="310" mi="4" ci="0" mb="0" cb="0"/><line nr="311" mi="2" ci="0" mb="0" cb="0"/><line nr="312" mi="1" ci="1" mb="0" cb="0"/><line nr="313" mi="1" ci="0" mb="0" cb="0"/><line nr="315" mi="5" ci="0" mb="2" cb="0"/><line nr="316" mi="4" ci="0" mb="0" cb="0"/><line nr="317" mi="1" ci="0" mb="0" cb="0"/><line nr="319" mi="5" ci="0" mb="0" cb="0"/><line nr="321" mi="9" ci="0" mb="0" cb="0"/><line nr="322" mi="5" ci="0" mb="0" cb="0"/><line nr="323" mi="4" ci="0" mb="0" cb="0"/><line nr="325" mi="3" ci="0" mb="2" cb="0"/><line nr="326" mi="4" ci="0" mb="0" cb="0"/><line nr="328" mi="4" ci="0" mb="2" cb="0"/><line nr="329" mi="1" ci="0" mb="0" cb="0"/><line nr="330" mi="4" ci="0" mb="2" cb="0"/><line nr="331" mi="1" ci="0" mb="0" cb="0"/><line nr="333" mi="4" ci="0" mb="0" cb="0"/><line nr="334" mi="1" ci="0" mb="0" cb="0"/><line nr="336" mi="8" ci="0" mb="0" cb="0"/><line nr="337" mi="1" ci="0" mb="0" cb="0"/><line nr="338" mi="9" ci="0" mb="0" cb="0"/><line nr="341" mi="4" ci="0" mb="0" cb="0"/><line nr="342" mi="2" ci="0" mb="0" cb="0"/><line nr="343" mi="1" ci="0" mb="0" cb="0"/><line nr="344" mi="12" ci="0" mb="0" cb="0"/><line nr="346" mi="2" ci="0" mb="0" cb="0"/><line nr="347" mi="4" ci="0" mb="0" cb="0"/><line nr="348" mi="2" ci="0" mb="0" cb="0"/><line nr="349" mi="2" ci="0" mb="0" cb="0"/><line nr="350" mi="1" ci="0" mb="0" cb="0"/><line nr="352" mi="0" ci="5" mb="1" cb="1"/><line nr="353" mi="4" ci="0" mb="0" cb="0"/><line nr="354" mi="1" ci="0" mb="0" cb="0"/><line nr="356" mi="0" ci="5" mb="0" cb="0"/><line nr="359" mi="0" ci="5" mb="0" cb="0"/><line nr="360" mi="1" ci="0" mb="0" cb="0"/><line nr="361" mi="9" ci="0" mb="0" cb="0"/><line nr="363" mi="4" ci="0" mb="0" cb="0"/><line nr="364" mi="0" ci="1" mb="0" cb="0"/><line nr="365" mi="1" ci="0" mb="0" cb="0"/><line nr="367" mi="7" ci="0" mb="0" cb="0"/><line nr="368" mi="2" ci="0" mb="0" cb="0"/><line nr="369" mi="4" ci="0" mb="0" cb="0"/><line nr="370" mi="2" ci="0" mb="0" cb="0"/><line nr="373" mi="0" ci="1" mb="0" cb="0"/><line nr="374" mi="0" ci="2" mb="0" cb="0"/><line nr="376" mi="0" ci="4" mb="1" cb="1"/><line nr="377" mi="4" ci="0" mb="0" cb="0"/><line nr="379" mi="0" ci="4" mb="0" cb="0"/><line nr="382" mi="0" ci="2" mb="0" cb="0"/><line nr="393" mi="0" ci="4" mb="0" cb="0"/><line nr="395" mi="0" ci="5" mb="0" cb="0"/><line nr="396" mi="0" ci="2" mb="1" cb="1"/><line nr="397" mi="10" ci="0" mb="2" cb="0"/><line nr="398" mi="10" ci="0" mb="0" cb="0"/><line nr="399" mi="1" ci="0" mb="0" cb="0"/><line nr="402" mi="0" ci="2" mb="0" cb="0"/><line nr="415" mi="0" ci="4" mb="0" cb="0"/><line nr="419" mi="0" ci="4" mb="1" cb="1"/><line nr="420" mi="0" ci="15" mb="0" cb="0"/><line nr="424" mi="0" ci="4" mb="1" cb="1"/><line nr="425" mi="5" ci="0" mb="0" cb="0"/><line nr="427" mi="3" ci="0" mb="2" cb="0"/><line nr="428" mi="7" ci="0" mb="0" cb="0"/><line nr="429" mi="2" ci="0" mb="0" cb="0"/><line nr="430" mi="4" ci="0" mb="0" cb="0"/><line nr="431" mi="4" ci="0" mb="0" cb="0"/><line nr="434" mi="3" ci="0" mb="0" cb="0"/><line nr="436" mi="7" ci="0" mb="0" cb="0"/><line nr="438" mi="3" ci="0" mb="0" cb="0"/><line nr="439" mi="1" ci="4" mb="1" cb="1"/><line nr="440" mi="0" ci="9" mb="0" cb="0"/><line nr="441" mi="0" ci="5" mb="0" cb="0"/><line nr="442" mi="0" ci="3" mb="0" cb="2"/><line nr="443" mi="0" ci="5" mb="0" cb="0"/><line nr="445" mi="0" ci="1" mb="0" cb="0"/><line nr="446" mi="4" ci="0" mb="2" cb="0"/><line nr="447" mi="9" ci="0" mb="0" cb="0"/><line nr="448" mi="5" ci="0" mb="0" cb="0"/><line nr="449" mi="5" ci="0" mb="0" cb="0"/><line nr="451" mi="3" ci="0" mb="2" cb="0"/><line nr="452" mi="5" ci="0" mb="0" cb="0"/><line nr="454" mi="1" ci="0" mb="0" cb="0"/><line nr="456" mi="10" ci="0" mb="0" cb="0"/><line nr="459" mi="4" ci="0" mb="0" cb="0"/><line nr="460" mi="4" ci="0" mb="0" cb="0"/><line nr="462" mi="1" ci="0" mb="0" cb="0"/><line nr="463" mi="12" ci="0" mb="0" cb="0"/><line nr="465" mi="2" ci="0" mb="0" cb="0"/><line nr="466" mi="4" ci="0" mb="0" cb="0"/><line nr="467" mi="4" ci="0" mb="0" cb="0"/><line nr="469" mi="0" ci="4" mb="0" cb="0"/><line nr="472" mi="0" ci="2" mb="0" cb="0"/><line nr="482" mi="0" ci="4" mb="0" cb="0"/><line nr="485" mi="0" ci="2" mb="0" cb="0"/><line nr="487" mi="0" ci="4" mb="1" cb="1"/><line nr="488" mi="0" ci="15" mb="0" cb="0"/><line nr="492" mi="0" ci="5" mb="1" cb="1"/><line nr="493" mi="10" ci="0" mb="0" cb="0"/><line nr="497" mi="0" ci="5" mb="0" cb="0"/><line nr="499" mi="0" ci="4" mb="0" cb="0"/><line nr="500" mi="0" ci="3" mb="1" cb="1"/><line nr="501" mi="0" ci="3" mb="0" cb="0"/><line nr="503" mi="0" ci="4" mb="0" cb="0"/><line nr="505" mi="0" ci="1" mb="0" cb="0"/><line nr="509" mi="0" ci="2" mb="0" cb="0"/><line nr="510" mi="0" ci="16" mb="0" cb="2"/><line nr="511" mi="0" ci="4" mb="1" cb="1"/><line nr="512" mi="2" ci="0" mb="0" cb="0"/><line nr="516" mi="0" ci="2" mb="1" cb="1"/><line nr="517" mi="0" ci="8" mb="0" cb="4"/><line nr="518" mi="0" ci="5" mb="0" cb="0"/><line nr="520" mi="0" ci="4" mb="1" cb="1"/><line nr="521" mi="10" ci="0" mb="0" cb="0"/><line nr="524" mi="0" ci="16" mb="0" cb="2"/><line nr="525" mi="0" ci="10" mb="0" cb="0"/><line nr="526" mi="0" ci="5" mb="0" cb="0"/><line nr="528" mi="0" ci="1" mb="0" cb="0"/><line nr="529" mi="0" ci="6" mb="0" cb="0"/><line nr="532" mi="5" ci="0" mb="0" cb="0"/><line nr="535" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="568" covered="547"/><counter type="BRANCH" missed="57" covered="40"/><counter type="LINE" missed="137" covered="115"/><counter type="COMPLEXITY" missed="48" covered="21"/><counter type="METHOD" missed="3" covered="11"/><counter type="CLASS" missed="0" covered="2"/></sourcefile><sourcefile name="ReplPair.java"><line nr="22" mi="0" ci="3" mb="0" cb="0"/><line nr="58" mi="0" ci="6" mb="0" cb="0"/><line nr="59" mi="0" ci="1" mb="0" cb="0"/><line nr="70" mi="0" ci="5" mb="0" cb="0"/><line nr="71" mi="0" ci="1" mb="0" cb="0"/><line nr="84" mi="6" ci="0" mb="0" cb="0"/><line nr="85" mi="1" ci="0" mb="0" cb="0"/><line nr="98" mi="0" ci="6" mb="0" cb="0"/><line nr="99" mi="0" ci="1" mb="0" cb="0"/><line nr="113" mi="0" ci="2" mb="0" cb="0"/><line nr="114" mi="0" ci="3" mb="0" cb="0"/><line nr="115" mi="0" ci="3" mb="0" cb="0"/><line nr="117" mi="0" ci="3" mb="0" cb="0"/><line nr="119" mi="0" ci="3" mb="0" cb="0"/><line nr="120" mi="0" ci="1" mb="0" cb="0"/><line nr="130" mi="0" ci="4" mb="0" cb="0"/><line nr="132" mi="0" ci="4" mb="0" cb="0"/><line nr="146" mi="0" ci="4" mb="0" cb="0"/><line nr="148" mi="0" ci="5" mb="0" cb="0"/><line nr="150" mi="0" ci="3" mb="0" cb="2"/><line nr="151" mi="0" ci="6" mb="0" cb="0"/><line nr="154" mi="0" ci="2" mb="0" cb="0"/><line nr="171" mi="0" ci="8" mb="0" cb="0"/><line nr="190" mi="0" ci="4" mb="0" cb="0"/><line nr="191" mi="0" ci="4" mb="0" cb="0"/><line nr="193" mi="0" ci="4" mb="0" cb="0"/><line nr="194" mi="0" ci="6" mb="0" cb="0"/><line nr="197" mi="0" ci="3" mb="0" cb="2"/><line nr="198" mi="0" ci="4" mb="0" cb="0"/><line nr="199" mi="0" ci="3" mb="0" cb="0"/><line nr="202" mi="0" ci="4" mb="0" cb="2"/><line nr="203" mi="0" ci="1" mb="0" cb="0"/><line nr="204" mi="0" ci="4" mb="0" cb="2"/><line nr="205" mi="0" ci="1" mb="0" cb="0"/><line nr="208" mi="0" ci="4" mb="0" cb="2"/><line nr="209" mi="0" ci="7" mb="0" cb="0"/><line nr="211" mi="0" ci="1" mb="0" cb="0"/><line nr="214" mi="0" ci="4" mb="0" cb="0"/><line nr="216" mi="0" ci="4" mb="0" cb="0"/><line nr="217" mi="0" ci="4" mb="0" cb="0"/><line nr="218" mi="0" ci="4" mb="0" cb="0"/><line nr="219" mi="0" ci="4" mb="0" cb="0"/><line nr="221" mi="0" ci="3" mb="0" cb="0"/><line nr="224" mi="0" ci="9" mb="0" cb="0"/><line nr="225" mi="0" ci="2" mb="1" cb="1"/><line nr="226" mi="1" ci="0" mb="0" cb="0"/><line nr="227" mi="0" ci="2" mb="0" cb="0"/><line nr="230" mi="0" ci="3" mb="0" cb="0"/><line nr="231" mi="0" ci="3" mb="1" cb="1"/><line nr="232" mi="0" ci="3" mb="0" cb="0"/><line nr="236" mi="0" ci="3" mb="0" cb="0"/><line nr="237" mi="0" ci="2" mb="0" cb="0"/><line nr="241" mi="0" ci="3" mb="0" cb="2"/><line nr="242" mi="0" ci="1" mb="0" cb="0"/><line nr="244" mi="0" ci="4" mb="0" cb="0"/><line nr="245" mi="0" ci="3" mb="0" cb="0"/><line nr="246" mi="0" ci="4" mb="1" cb="1"/><line nr="248" mi="0" ci="2" mb="0" cb="2"/><line nr="249" mi="0" ci="9" mb="0" cb="0"/><line nr="253" mi="0" ci="10" mb="0" cb="0"/><line nr="254" mi="0" ci="1" mb="0" cb="0"/><line nr="257" mi="0" ci="3" mb="0" cb="0"/><line nr="259" mi="0" ci="8" mb="0" cb="0"/><line nr="261" mi="0" ci="3" mb="0" cb="2"/><line nr="262" mi="0" ci="17" mb="0" cb="2"/><line nr="263" mi="0" ci="9" mb="1" cb="3"/><line nr="267" mi="0" ci="2" mb="0" cb="0"/><line nr="268" mi="0" ci="1" mb="0" cb="0"/><line nr="272" mi="0" ci="2" mb="0" cb="0"/><line nr="273" mi="0" ci="1" mb="0" cb="0"/><line nr="276" mi="0" ci="4" mb="1" cb="1"/><line nr="277" mi="8" ci="0" mb="0" cb="0"/><line nr="278" mi="3" ci="0" mb="0" cb="0"/><line nr="279" mi="10" ci="0" mb="0" cb="0"/><line nr="280" mi="1" ci="0" mb="0" cb="0"/><line nr="281" mi="0" ci="5" mb="0" cb="0"/><line nr="283" mi="0" ci="1" mb="0" cb="0"/><line nr="285" mi="8" ci="0" mb="0" cb="0"/><line nr="286" mi="2" ci="0" mb="0" cb="0"/><line nr="287" mi="10" ci="0" mb="0" cb="0"/><line nr="293" mi="0" ci="3" mb="0" cb="0"/><line nr="296" mi="0" ci="2" mb="0" cb="2"/><line nr="297" mi="0" ci="7" mb="0" cb="0"/><line nr="298" mi="0" ci="2" mb="1" cb="1"/><line nr="299" mi="1" ci="0" mb="0" cb="0"/><line nr="300" mi="0" ci="2" mb="0" cb="0"/><line nr="303" mi="0" ci="3" mb="0" cb="0"/><line nr="305" mi="0" ci="2" mb="0" cb="0"/><line nr="306" mi="0" ci="10" mb="1" cb="3"/><line nr="307" mi="0" ci="6" mb="0" cb="0"/><line nr="309" mi="0" ci="2" mb="1" cb="1"/><line nr="310" mi="4" ci="0" mb="0" cb="0"/><line nr="312" mi="6" ci="0" mb="0" cb="0"/><line nr="315" mi="0" ci="9" mb="0" cb="2"/><line nr="316" mi="0" ci="6" mb="0" cb="0"/><line nr="319" mi="0" ci="6" mb="0" cb="0"/><line nr="322" mi="0" ci="3" mb="1" cb="1"/><line nr="323" mi="11" ci="0" mb="0" cb="0"/><line nr="324" mi="10" ci="0" mb="0" cb="0"/><line nr="327" mi="0" ci="4" mb="0" cb="0"/><line nr="328" mi="0" ci="1" mb="0" cb="0"/><line nr="331" mi="0" ci="4" mb="0" cb="2"/><line nr="332" mi="0" ci="3" mb="1" cb="1"/><line nr="333" mi="7" ci="0" mb="0" cb="0"/><line nr="335" mi="0" ci="13" mb="0" cb="2"/><line nr="336" mi="0" ci="4" mb="1" cb="1"/><line nr="337" mi="3" ci="0" mb="2" cb="0"/><line nr="338" mi="12" ci="0" mb="0" cb="0"/><line nr="344" mi="0" ci="4" mb="0" cb="0"/><line nr="345" mi="0" ci="1" mb="0" cb="0"/><line nr="347" mi="0" ci="3" mb="0" cb="0"/><line nr="349" mi="0" ci="2" mb="0" cb="0"/><line nr="353" mi="0" ci="4" mb="0" cb="0"/><line nr="354" mi="0" ci="4" mb="0" cb="0"/><line nr="356" mi="0" ci="3" mb="1" cb="1"/><line nr="357" mi="11" ci="0" mb="0" cb="0"/><line nr="359" mi="0" ci="2" mb="0" cb="0"/><line nr="360" mi="0" ci="10" mb="0" cb="2"/><line nr="361" mi="0" ci="1" mb="0" cb="0"/><line nr="362" mi="0" ci="4" mb="0" cb="0"/><line nr="364" mi="0" ci="3" mb="1" cb="1"/><line nr="365" mi="15" ci="0" mb="0" cb="0"/><line nr="366" mi="7" ci="0" mb="0" cb="0"/><line nr="368" mi="0" ci="10" mb="0" cb="2"/><line nr="371" mi="0" ci="10" mb="0" cb="2"/><line nr="372" mi="0" ci="8" mb="0" cb="0"/><line nr="374" mi="5" ci="3" mb="3" cb="1"/><line nr="375" mi="20" ci="0" mb="0" cb="0"/><line nr="379" mi="0" ci="3" mb="0" cb="0"/><line nr="380" mi="0" ci="1" mb="0" cb="0"/><line nr="383" mi="0" ci="4" mb="0" cb="2"/><line nr="384" mi="0" ci="3" mb="1" cb="1"/><line nr="385" mi="11" ci="0" mb="0" cb="0"/><line nr="389" mi="0" ci="5" mb="0" cb="0"/><line nr="391" mi="0" ci="3" mb="1" cb="1"/><line nr="392" mi="10" ci="0" mb="0" cb="0"/><line nr="394" mi="10" ci="0" mb="0" cb="0"/><line nr="397" mi="0" ci="4" mb="0" cb="0"/><line nr="399" mi="0" ci="1" mb="0" cb="0"/><line nr="401" mi="0" ci="4" mb="0" cb="0"/><line nr="402" mi="0" ci="3" mb="0" cb="0"/><line nr="403" mi="0" ci="1" mb="0" cb="0"/><line nr="406" mi="0" ci="10" mb="0" cb="2"/><line nr="407" mi="0" ci="4" mb="0" cb="2"/><line nr="408" mi="0" ci="3" mb="1" cb="1"/><line nr="409" mi="12" ci="0" mb="0" cb="0"/><line nr="414" mi="0" ci="4" mb="0" cb="0"/><line nr="415" mi="0" ci="1" mb="0" cb="0"/><line nr="417" mi="0" ci="3" mb="0" cb="0"/><line nr="419" mi="0" ci="3" mb="1" cb="1"/><line nr="420" mi="11" ci="0" mb="0" cb="0"/><line nr="423" mi="0" ci="2" mb="0" cb="0"/><line nr="428" mi="0" ci="2" mb="0" cb="0"/><line nr="430" mi="4" ci="3" mb="3" cb="1"/><line nr="431" mi="15" ci="0" mb="0" cb="0"/><line nr="434" mi="0" ci="4" mb="0" cb="0"/><line nr="435" mi="0" ci="4" mb="0" cb="2"/><line nr="436" mi="0" ci="4" mb="0" cb="0"/><line nr="438" mi="0" ci="3" mb="1" cb="1"/><line nr="439" mi="1" ci="0" mb="0" cb="0"/><line nr="441" mi="0" ci="4" mb="0" cb="0"/><line nr="442" mi="0" ci="3" mb="0" cb="0"/><line nr="444" mi="0" ci="4" mb="0" cb="2"/><line nr="445" mi="0" ci="1" mb="0" cb="0"/><line nr="447" mi="0" ci="6" mb="0" cb="2"/><line nr="449" mi="0" ci="4" mb="1" cb="1"/><line nr="450" mi="0" ci="2" mb="0" cb="2"/><line nr="451" mi="0" ci="9" mb="0" cb="0"/><line nr="453" mi="0" ci="8" mb="0" cb="0"/><line nr="457" mi="0" ci="17" mb="0" cb="0"/><line nr="458" mi="0" ci="1" mb="0" cb="0"/><line nr="460" mi="2" ci="3" mb="3" cb="1"/><line nr="461" mi="15" ci="0" mb="0" cb="0"/><line nr="464" mi="0" ci="2" mb="0" cb="0"/><line nr="469" mi="0" ci="3" mb="0" cb="2"/><line nr="470" mi="0" ci="5" mb="0" cb="2"/><line nr="471" mi="0" ci="2" mb="0" cb="0"/><line nr="476" mi="0" ci="7" mb="0" cb="0"/><line nr="478" mi="0" ci="2" mb="0" cb="0"/><line nr="483" mi="0" ci="2" mb="0" cb="0"/><line nr="485" mi="0" ci="6" mb="1" cb="1"/><line nr="486" mi="10" ci="0" mb="0" cb="0"/><line nr="488" mi="0" ci="25" mb="0" cb="0"/><line nr="493" mi="0" ci="5" mb="0" cb="2"/><line nr="494" mi="0" ci="6" mb="0" cb="0"/><line nr="496" mi="0" ci="6" mb="0" cb="0"/><line nr="501" mi="2" ci="0" mb="0" cb="0"/><line nr="502" mi="2" ci="0" mb="0" cb="0"/><line nr="503" mi="13" ci="0" mb="2" cb="0"/><line nr="504" mi="13" ci="0" mb="2" cb="0"/><line nr="505" mi="7" ci="0" mb="0" cb="0"/><line nr="506" mi="13" ci="0" mb="2" cb="0"/><line nr="507" mi="7" ci="0" mb="0" cb="0"/><line nr="508" mi="2" ci="0" mb="0" cb="0"/><line nr="513" mi="0" ci="3" mb="1" cb="1"/><line nr="514" mi="2" ci="0" mb="0" cb="0"/><line nr="515" mi="0" ci="2" mb="1" cb="1"/><line nr="516" mi="2" ci="0" mb="0" cb="0"/><line nr="517" mi="0" ci="5" mb="1" cb="1"/><line nr="518" mi="2" ci="0" mb="0" cb="0"/><line nr="519" mi="0" ci="3" mb="0" cb="0"/><line nr="520" mi="0" ci="3" mb="1" cb="1"/><line nr="521" mi="3" ci="0" mb="2" cb="0"/><line nr="522" mi="2" ci="0" mb="0" cb="0"/><line nr="523" mi="0" ci="6" mb="1" cb="1"/><line nr="524" mi="2" ci="0" mb="0" cb="0"/><line nr="525" mi="0" ci="3" mb="1" cb="1"/><line nr="526" mi="3" ci="0" mb="2" cb="0"/><line nr="527" mi="2" ci="0" mb="0" cb="0"/><line nr="528" mi="0" ci="6" mb="1" cb="1"/><line nr="529" mi="2" ci="0" mb="0" cb="0"/><line nr="530" mi="0" ci="5" mb="1" cb="1"/><line nr="531" mi="2" ci="0" mb="0" cb="0"/><line nr="532" mi="0" ci="3" mb="1" cb="1"/><line nr="533" mi="3" ci="0" mb="2" cb="0"/><line nr="534" mi="2" ci="0" mb="0" cb="0"/><line nr="535" mi="0" ci="6" mb="1" cb="1"/><line nr="536" mi="2" ci="0" mb="0" cb="0"/><line nr="537" mi="0" ci="5" mb="1" cb="1"/><line nr="538" mi="2" ci="0" mb="0" cb="0"/><line nr="539" mi="0" ci="2" mb="0" cb="0"/><line nr="544" mi="0" ci="8" mb="0" cb="0"/><line nr="546" mi="0" ci="3" mb="0" cb="0"/><line nr="548" mi="0" ci="3" mb="0" cb="0"/><line nr="550" mi="0" ci="3" mb="0" cb="2"/><line nr="551" mi="0" ci="17" mb="0" cb="2"/><line nr="552" mi="0" ci="9" mb="6" cb="5"/><line nr="555" mi="4" ci="0" mb="2" cb="0"/><line nr="556" mi="8" ci="0" mb="0" cb="0"/><line nr="557" mi="3" ci="0" mb="0" cb="0"/><line nr="559" mi="10" ci="0" mb="0" cb="0"/><line nr="560" mi="1" ci="0" mb="0" cb="0"/><line nr="561" mi="5" ci="0" mb="0" cb="0"/><line nr="563" mi="1" ci="0" mb="0" cb="0"/><line nr="566" mi="0" ci="4" mb="1" cb="1"/><line nr="567" mi="8" ci="0" mb="0" cb="0"/><line nr="568" mi="3" ci="0" mb="0" cb="0"/><line nr="570" mi="10" ci="0" mb="0" cb="0"/><line nr="571" mi="1" ci="0" mb="0" cb="0"/><line nr="572" mi="0" ci="4" mb="0" cb="0"/><line nr="575" mi="0" ci="3" mb="0" cb="0"/><line nr="576" mi="1" ci="0" mb="0" cb="0"/><line nr="577" mi="12" ci="0" mb="0" cb="0"/><line nr="579" mi="2" ci="0" mb="0" cb="0"/><line nr="581" mi="10" ci="0" mb="0" cb="0"/><line nr="582" mi="0" ci="1" mb="0" cb="0"/><line nr="584" mi="0" ci="5" mb="0" cb="0"/><line nr="586" mi="0" ci="1" mb="0" cb="0"/><line nr="591" mi="0" ci="4" mb="1" cb="1"/><line nr="592" mi="8" ci="0" mb="0" cb="0"/><line nr="594" mi="3" ci="0" mb="0" cb="0"/><line nr="596" mi="10" ci="0" mb="0" cb="0"/><line nr="597" mi="1" ci="0" mb="0" cb="0"/><line nr="598" mi="0" ci="6" mb="0" cb="0"/><line nr="600" mi="1" ci="0" mb="0" cb="0"/><line nr="601" mi="9" ci="0" mb="0" cb="0"/><line nr="603" mi="2" ci="0" mb="0" cb="0"/><line nr="605" mi="10" ci="0" mb="0" cb="0"/><line nr="606" mi="0" ci="1" mb="0" cb="0"/><line nr="607" mi="1" ci="0" mb="0" cb="0"/><line nr="611" mi="0" ci="4" mb="1" cb="1"/><line nr="612" mi="8" ci="0" mb="0" cb="0"/><line nr="614" mi="3" ci="0" mb="0" cb="0"/><line nr="616" mi="10" ci="0" mb="0" cb="0"/><line nr="617" mi="1" ci="0" mb="0" cb="0"/><line nr="618" mi="0" ci="5" mb="0" cb="0"/><line nr="619" mi="0" ci="2" mb="1" cb="1"/><line nr="620" mi="9" ci="0" mb="0" cb="0"/><line nr="622" mi="2" ci="0" mb="0" cb="0"/><line nr="623" mi="10" ci="0" mb="0" cb="0"/><line nr="625" mi="1" ci="0" mb="0" cb="0"/><line nr="627" mi="0" ci="3" mb="0" cb="0"/><line nr="629" mi="1" ci="0" mb="0" cb="0"/><line nr="630" mi="9" ci="0" mb="0" cb="0"/><line nr="632" mi="2" ci="0" mb="0" cb="0"/><line nr="634" mi="10" ci="0" mb="0" cb="0"/><line nr="635" mi="0" ci="1" mb="0" cb="0"/><line nr="636" mi="1" ci="0" mb="0" cb="0"/><line nr="640" mi="2" ci="0" mb="0" cb="0"/><line nr="641" mi="1" ci="0" mb="0" cb="0"/><line nr="645" mi="2" ci="0" mb="0" cb="0"/><line nr="646" mi="1" ci="0" mb="0" cb="0"/><line nr="649" mi="4" ci="0" mb="2" cb="0"/><line nr="650" mi="8" ci="0" mb="0" cb="0"/><line nr="652" mi="3" ci="0" mb="0" cb="0"/><line nr="654" mi="10" ci="0" mb="0" cb="0"/><line nr="655" mi="1" ci="0" mb="0" cb="0"/><line nr="656" mi="5" ci="0" mb="0" cb="0"/><line nr="658" mi="1" ci="0" mb="0" cb="0"/><line nr="662" mi="0" ci="3" mb="0" cb="0"/><line nr="663" mi="0" ci="1" mb="0" cb="0"/><line nr="667" mi="0" ci="3" mb="0" cb="0"/><line nr="668" mi="0" ci="1" mb="0" cb="0"/><line nr="671" mi="3" ci="0" mb="0" cb="0"/><line nr="672" mi="1" ci="0" mb="0" cb="0"/><line nr="674" mi="14" ci="0" mb="0" cb="0"/><line nr="677" mi="8" ci="0" mb="0" cb="0"/><line nr="679" mi="4" ci="0" mb="0" cb="0"/><line nr="685" mi="0" ci="3" mb="0" cb="0"/><line nr="689" mi="0" ci="2" mb="0" cb="2"/><line nr="690" mi="0" ci="7" mb="0" cb="0"/><line nr="691" mi="0" ci="2" mb="1" cb="1"/><line nr="692" mi="2" ci="0" mb="0" cb="0"/><line nr="693" mi="0" ci="2" mb="0" cb="0"/><line nr="696" mi="0" ci="2" mb="0" cb="0"/><line nr="701" mi="0" ci="2" mb="0" cb="0"/><line nr="702" mi="0" ci="8" mb="0" cb="0"/><line nr="704" mi="0" ci="17" mb="0" cb="2"/><line nr="705" mi="0" ci="9" mb="12" cb="6"/><line nr="710" mi="0" ci="4" mb="1" cb="1"/><line nr="711" mi="8" ci="0" mb="0" cb="0"/><line nr="712" mi="3" ci="0" mb="0" cb="0"/><line nr="714" mi="10" ci="0" mb="0" cb="0"/><line nr="715" mi="1" ci="0" mb="0" cb="0"/><line nr="716" mi="0" ci="5" mb="0" cb="0"/><line nr="717" mi="0" ci="3" mb="0" cb="0"/><line nr="719" mi="1" ci="0" mb="0" cb="0"/><line nr="720" mi="9" ci="0" mb="0" cb="0"/><line nr="722" mi="2" ci="0" mb="0" cb="0"/><line nr="724" mi="10" ci="0" mb="0" cb="0"/><line nr="725" mi="0" ci="1" mb="0" cb="0"/><line nr="726" mi="1" ci="0" mb="0" cb="0"/><line nr="730" mi="0" ci="4" mb="1" cb="1"/><line nr="731" mi="8" ci="0" mb="0" cb="0"/><line nr="732" mi="3" ci="0" mb="0" cb="0"/><line nr="734" mi="10" ci="0" mb="0" cb="0"/><line nr="735" mi="1" ci="0" mb="0" cb="0"/><line nr="736" mi="0" ci="5" mb="0" cb="0"/><line nr="738" mi="0" ci="2" mb="1" cb="1"/><line nr="739" mi="9" ci="0" mb="0" cb="0"/><line nr="741" mi="2" ci="0" mb="0" cb="0"/><line nr="743" mi="10" ci="0" mb="0" cb="0"/><line nr="744" mi="1" ci="0" mb="0" cb="0"/><line nr="747" mi="0" ci="3" mb="0" cb="0"/><line nr="749" mi="1" ci="0" mb="0" cb="0"/><line nr="750" mi="9" ci="0" mb="0" cb="0"/><line nr="752" mi="2" ci="0" mb="0" cb="0"/><line nr="754" mi="10" ci="0" mb="0" cb="0"/><line nr="755" mi="0" ci="1" mb="0" cb="0"/><line nr="756" mi="1" ci="0" mb="0" cb="0"/><line nr="760" mi="0" ci="3" mb="0" cb="0"/><line nr="761" mi="0" ci="1" mb="0" cb="0"/><line nr="765" mi="3" ci="0" mb="0" cb="0"/><line nr="766" mi="1" ci="0" mb="0" cb="0"/><line nr="769" mi="0" ci="4" mb="1" cb="1"/><line nr="770" mi="8" ci="0" mb="0" cb="0"/><line nr="771" mi="3" ci="0" mb="0" cb="0"/><line nr="773" mi="10" ci="0" mb="0" cb="0"/><line nr="774" mi="1" ci="0" mb="0" cb="0"/><line nr="775" mi="0" ci="6" mb="0" cb="0"/><line nr="777" mi="0" ci="1" mb="0" cb="0"/><line nr="781" mi="3" ci="0" mb="0" cb="0"/><line nr="782" mi="1" ci="0" mb="0" cb="0"/><line nr="786" mi="3" ci="0" mb="0" cb="0"/><line nr="787" mi="1" ci="0" mb="0" cb="0"/><line nr="790" mi="3" ci="0" mb="0" cb="0"/><line nr="791" mi="1" ci="0" mb="0" cb="0"/><line nr="795" mi="3" ci="0" mb="0" cb="0"/><line nr="796" mi="1" ci="0" mb="0" cb="0"/><line nr="800" mi="0" ci="3" mb="0" cb="0"/><line nr="801" mi="0" ci="1" mb="0" cb="0"/><line nr="804" mi="4" ci="0" mb="2" cb="0"/><line nr="805" mi="8" ci="0" mb="0" cb="0"/><line nr="806" mi="3" ci="0" mb="0" cb="0"/><line nr="808" mi="10" ci="0" mb="0" cb="0"/><line nr="809" mi="1" ci="0" mb="0" cb="0"/><line nr="810" mi="6" ci="0" mb="0" cb="0"/><line nr="812" mi="1" ci="0" mb="0" cb="0"/><line nr="816" mi="3" ci="0" mb="0" cb="0"/><line nr="817" mi="1" ci="0" mb="0" cb="0"/><line nr="821" mi="0" ci="3" mb="0" cb="0"/><line nr="822" mi="0" ci="1" mb="0" cb="0"/><line nr="825" mi="4" ci="0" mb="2" cb="0"/><line nr="826" mi="8" ci="0" mb="0" cb="0"/><line nr="827" mi="3" ci="0" mb="0" cb="0"/><line nr="829" mi="10" ci="0" mb="0" cb="0"/><line nr="830" mi="1" ci="0" mb="0" cb="0"/><line nr="831" mi="6" ci="0" mb="0" cb="0"/><line nr="833" mi="1" ci="0" mb="0" cb="0"/><line nr="837" mi="3" ci="0" mb="0" cb="0"/><line nr="838" mi="1" ci="0" mb="0" cb="0"/><line nr="842" mi="3" ci="0" mb="0" cb="0"/><line nr="843" mi="1" ci="0" mb="0" cb="0"/><line nr="846" mi="4" ci="0" mb="2" cb="0"/><line nr="847" mi="8" ci="0" mb="0" cb="0"/><line nr="848" mi="3" ci="0" mb="0" cb="0"/><line nr="850" mi="10" ci="0" mb="0" cb="0"/><line nr="851" mi="1" ci="0" mb="0" cb="0"/><line nr="852" mi="6" ci="0" mb="0" cb="0"/><line nr="854" mi="1" ci="0" mb="0" cb="0"/><line nr="856" mi="10" ci="0" mb="0" cb="0"/><line nr="857" mi="8" ci="0" mb="0" cb="0"/><line nr="858" mi="4" ci="0" mb="0" cb="0"/><line nr="863" mi="0" ci="3" mb="1" cb="1"/><line nr="864" mi="11" ci="0" mb="0" cb="0"/><line nr="867" mi="0" ci="1" mb="0" cb="0"/><line nr="873" mi="0" ci="10" mb="0" cb="0"/><line nr="874" mi="1" ci="0" mb="0" cb="0"/><line nr="875" mi="2" ci="0" mb="0" cb="0"/><line nr="876" mi="9" ci="0" mb="0" cb="0"/><line nr="878" mi="8" ci="0" mb="0" cb="0"/><line nr="879" mi="4" ci="0" mb="0" cb="0"/><line nr="881" mi="2" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="938" covered="912"/><counter type="BRANCH" missed="92" covered="119"/><counter type="LINE" missed="180" covered="223"/><counter type="COMPLEXITY" missed="79" covered="58"/><counter type="METHOD" missed="2" covered="16"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="ReplOpts.java"><line nr="10" mi="0" ci="2" mb="0" cb="0"/><line nr="14" mi="0" ci="3" mb="0" cb="0"/><line nr="19" mi="0" ci="3" mb="0" cb="0"/><line nr="24" mi="0" ci="3" mb="0" cb="0"/><line nr="29" mi="0" ci="3" mb="0" cb="0"/><line nr="34" mi="0" ci="3" mb="0" cb="0"/><line nr="39" mi="0" ci="3" mb="0" cb="0"/><line nr="44" mi="0" ci="3" mb="0" cb="0"/><line nr="49" mi="0" ci="3" mb="0" cb="0"/><line nr="53" mi="0" ci="4" mb="0" cb="0"/><line nr="57" mi="2" ci="0" mb="0" cb="0"/><line nr="58" mi="2" ci="0" mb="0" cb="0"/><line nr="59" mi="11" ci="0" mb="2" cb="0"/><line nr="60" mi="7" ci="0" mb="0" cb="0"/><line nr="61" mi="7" ci="0" mb="0" cb="0"/><line nr="62" mi="13" ci="0" mb="2" cb="0"/><line nr="63" mi="11" ci="0" mb="2" cb="0"/><line nr="64" mi="11" ci="0" mb="2" cb="0"/><line nr="65" mi="11" ci="0" mb="2" cb="0"/><line nr="66" mi="2" ci="0" mb="0" cb="0"/><line nr="71" mi="3" ci="0" mb="2" cb="0"/><line nr="72" mi="2" ci="0" mb="0" cb="0"/><line nr="73" mi="2" ci="0" mb="2" cb="0"/><line nr="74" mi="2" ci="0" mb="0" cb="0"/><line nr="75" mi="5" ci="0" mb="2" cb="0"/><line nr="76" mi="2" ci="0" mb="0" cb="0"/><line nr="77" mi="3" ci="0" mb="0" cb="0"/><line nr="78" mi="5" ci="0" mb="2" cb="0"/><line nr="79" mi="2" ci="0" mb="0" cb="0"/><line nr="80" mi="5" ci="0" mb="2" cb="0"/><line nr="81" mi="2" ci="0" mb="0" cb="0"/><line nr="82" mi="5" ci="0" mb="2" cb="0"/><line nr="83" mi="2" ci="0" mb="0" cb="0"/><line nr="84" mi="5" ci="0" mb="2" cb="0"/><line nr="85" mi="2" ci="0" mb="0" cb="0"/><line nr="86" mi="5" ci="0" mb="2" cb="0"/><line nr="87" mi="2" ci="0" mb="0" cb="0"/><line nr="88" mi="5" ci="0" mb="2" cb="0"/><line nr="89" mi="2" ci="0" mb="0" cb="0"/><line nr="90" mi="5" ci="0" mb="2" cb="0"/><line nr="91" mi="2" ci="0" mb="0" cb="0"/><line nr="92" mi="2" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="147" covered="30"/><counter type="BRANCH" missed="30" covered="0"/><counter type="LINE" missed="32" covered="10"/><counter type="COMPLEXITY" missed="17" covered="1"/><counter type="METHOD" missed="2" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="StageStatus.java"><line nr="8" mi="0" ci="16" mb="0" cb="0"/><line nr="12" mi="0" ci="6" mb="0" cb="0"/><line nr="16" mi="0" ci="6" mb="0" cb="0"/><line nr="20" mi="0" ci="6" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="34"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="BadReplParse.java"><line nr="29" mi="6" ci="0" mb="0" cb="0"/><line nr="30" mi="1" ci="0" mb="0" cb="0"/><line nr="41" mi="0" ci="3" mb="0" cb="0"/><line nr="43" mi="0" ci="3" mb="0" cb="0"/><line nr="44" mi="0" ci="1" mb="0" cb="0"/><line nr="49" mi="4" ci="0" mb="2" cb="0"/><line nr="50" mi="3" ci="0" mb="0" cb="0"/><line nr="52" mi="2" ci="0" mb="0" cb="0"/><line nr="54" mi="12" ci="0" mb="0" cb="0"/><line nr="55" mi="7" ci="0" mb="0" cb="0"/><line nr="64" mi="0" ci="5" mb="0" cb="0"/><line nr="66" mi="0" ci="4" mb="1" cb="1"/><line nr="67" mi="5" ci="0" mb="0" cb="0"/><line nr="68" mi="0" ci="5" mb="1" cb="1"/><line nr="69" mi="0" ci="5" mb="0" cb="0"/><line nr="71" mi="6" ci="0" mb="0" cb="0"/><line nr="72" mi="4" ci="0" mb="0" cb="0"/><line nr="75" mi="0" ci="4" mb="0" cb="0"/><line nr="76" mi="0" ci="5" mb="1" cb="1"/><line nr="77" mi="4" ci="0" mb="0" cb="0"/><line nr="78" mi="5" ci="0" mb="0" cb="0"/><line nr="81" mi="0" ci="4" mb="1" cb="1"/><line nr="82" mi="0" ci="4" mb="0" cb="0"/><line nr="84" mi="0" ci="11" mb="0" cb="2"/><line nr="85" mi="0" ci="6" mb="0" cb="0"/><line nr="86" mi="0" ci="4" mb="0" cb="0"/><line nr="87" mi="0" ci="1" mb="0" cb="0"/><line nr="90" mi="0" ci="4" mb="0" cb="0"/><counter type="INSTRUCTION" missed="59" covered="69"/><counter type="BRANCH" missed="6" covered="6"/><counter type="LINE" missed="12" covered="16"/><counter type="COMPLEXITY" missed="7" covered="3"/><counter type="METHOD" missed="2" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="ReplSet.java"><line nr="19" mi="0" ci="2" mb="0" cb="0"/><line nr="20" mi="0" ci="5" mb="0" cb="0"/><line nr="21" mi="0" ci="1" mb="0" cb="0"/><line nr="32" mi="2" ci="0" mb="0" cb="0"/><line nr="33" mi="3" ci="0" mb="0" cb="0"/><line nr="34" mi="1" ci="0" mb="0" cb="0"/><line nr="46" mi="4" ci="0" mb="0" cb="0"/><line nr="48" mi="9" ci="0" mb="0" cb="0"/><line nr="49" mi="5" ci="0" mb="0" cb="0"/><line nr="50" mi="4" ci="0" mb="0" cb="0"/><line nr="53" mi="2" ci="0" mb="0" cb="0"/><line nr="63" mi="0" ci="10" mb="0" cb="2"/><line nr="64" mi="0" ci="5" mb="0" cb="0"/><line nr="65" mi="0" ci="1" mb="0" cb="0"/><line nr="68" mi="0" ci="4" mb="0" cb="0"/><line nr="69" mi="0" ci="1" mb="0" cb="0"/><line nr="78" mi="16" ci="0" mb="2" cb="0"/><line nr="79" mi="5" ci="0" mb="0" cb="0"/><line nr="83" mi="4" ci="0" mb="0" cb="0"/><line nr="84" mi="1" ci="0" mb="0" cb="0"/><line nr="95" mi="0" ci="2" mb="0" cb="0"/><line nr="97" mi="0" ci="11" mb="0" cb="2"/><line nr="98" mi="0" ci="18" mb="0" cb="0"/><line nr="99" mi="0" ci="4" mb="0" cb="0"/><line nr="101" mi="0" ci="2" mb="0" cb="0"/><line nr="102" mi="0" ci="1" mb="0" cb="0"/><line nr="104" mi="0" ci="2" mb="0" cb="0"/><counter type="INSTRUCTION" missed="56" covered="69"/><counter type="BRANCH" missed="2" covered="4"/><counter type="LINE" missed="12" covered="15"/><counter type="COMPLEXITY" missed="4" covered="5"/><counter type="METHOD" missed="3" covered="3"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="IntHolder.java"><line nr="17" mi="0" ci="2" mb="0" cb="0"/><line nr="18" mi="0" ci="3" mb="0" cb="0"/><line nr="19" mi="0" ci="1" mb="0" cb="0"/><line nr="27" mi="2" ci="0" mb="0" cb="0"/><line nr="28" mi="3" ci="0" mb="0" cb="0"/><line nr="29" mi="1" ci="0" mb="0" cb="0"/><line nr="37" mi="0" ci="4" mb="0" cb="0"/><line nr="49" mi="0" ci="6" mb="0" cb="0"/><line nr="51" mi="0" ci="3" mb="0" cb="0"/><line nr="60" mi="0" ci="3" mb="0" cb="0"/><line nr="70" mi="3" ci="0" mb="0" cb="0"/><line nr="71" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="10" covered="22"/><counter type="LINE" missed="5" covered="7"/><counter type="COMPLEXITY" missed="2" covered="4"/><counter type="METHOD" missed="2" covered="4"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="MirrorOutputStream.java"><line nr="21" mi="0" ci="2" mb="0" cb="0"/><line nr="22" mi="0" ci="5" mb="0" cb="0"/><line nr="24" mi="0" ci="16" mb="0" cb="2"/><line nr="25" mi="0" ci="5" mb="0" cb="0"/><line nr="27" mi="0" ci="1" mb="0" cb="0"/><line nr="31" mi="11" ci="0" mb="2" cb="0"/><line nr="32" mi="2" ci="0" mb="0" cb="0"/><line nr="33" mi="1" ci="0" mb="0" cb="0"/><line nr="34" mi="1" ci="0" mb="0" cb="0"/><line nr="38" mi="11" ci="0" mb="2" cb="0"/><line nr="39" mi="2" ci="0" mb="0" cb="0"/><line nr="40" mi="1" ci="0" mb="0" cb="0"/><line nr="41" mi="1" ci="0" mb="0" cb="0"/><line nr="45" mi="11" ci="0" mb="2" cb="0"/><line nr="46" mi="3" ci="0" mb="0" cb="0"/><line nr="47" mi="1" ci="0" mb="0" cb="0"/><line nr="48" mi="1" ci="0" mb="0" cb="0"/><line nr="52" mi="0" ci="11" mb="0" cb="2"/><line nr="53" mi="0" ci="5" mb="0" cb="0"/><line nr="54" mi="0" ci="1" mb="0" cb="0"/><line nr="55" mi="0" ci="1" mb="0" cb="0"/><line nr="59" mi="11" ci="0" mb="2" cb="0"/><line nr="60" mi="3" ci="0" mb="0" cb="0"/><line nr="61" mi="1" ci="0" mb="0" cb="0"/><line nr="62" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="62" covered="47"/><counter type="BRANCH" missed="8" covered="4"/><counter type="LINE" missed="16" covered="9"/><counter type="COMPLEXITY" missed="8" covered="4"/><counter type="METHOD" missed="4" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="LogStream.java"><line nr="58" mi="0" ci="2" mb="0" cb="0"/><line nr="59" mi="0" ci="3" mb="0" cb="0"/><line nr="60" mi="0" ci="3" mb="0" cb="0"/><line nr="61" mi="0" ci="1" mb="0" cb="0"/><line nr="72" mi="2" ci="0" mb="0" cb="0"/><line nr="73" mi="3" ci="0" mb="0" cb="0"/><line nr="74" mi="3" ci="0" mb="0" cb="0"/><line nr="75" mi="1" ci="0" mb="0" cb="0"/><line nr="83" mi="3" ci="0" mb="0" cb="0"/><line nr="93" mi="0" ci="3" mb="0" cb="0"/><line nr="94" mi="0" ci="1" mb="0" cb="0"/><line nr="100" mi="0" ci="3" mb="0" cb="0"/><line nr="101" mi="0" ci="1" mb="0" cb="0"/><line nr="110" mi="0" ci="6" mb="0" cb="0"/><line nr="111" mi="0" ci="1" mb="0" cb="0"/><line nr="117" mi="3" ci="0" mb="0" cb="0"/><line nr="118" mi="1" ci="0" mb="0" cb="0"/><line nr="127" mi="6" ci="0" mb="0" cb="0"/><line nr="128" mi="1" ci="0" mb="0" cb="0"/><line nr="137" mi="4" ci="0" mb="0" cb="0"/><line nr="138" mi="1" ci="0" mb="0" cb="0"/><line nr="150" mi="0" ci="6" mb="0" cb="0"/><line nr="151" mi="0" ci="1" mb="0" cb="0"/><line nr="162" mi="4" ci="0" mb="2" cb="0"/><line nr="163" mi="4" ci="0" mb="0" cb="0"/><line nr="165" mi="1" ci="0" mb="0" cb="0"/><line nr="178" mi="0" ci="4" mb="0" cb="2"/><line nr="179" mi="0" ci="6" mb="0" cb="0"/><line nr="181" mi="0" ci="1" mb="0" cb="0"/><line nr="190" mi="4" ci="0" mb="0" cb="0"/><line nr="191" mi="1" ci="0" mb="0" cb="0"/><line nr="202" mi="5" ci="0" mb="0" cb="0"/><line nr="203" mi="1" ci="0" mb="0" cb="0"/><line nr="212" mi="4" ci="0" mb="0" cb="0"/><line nr="213" mi="1" ci="0" mb="0" cb="0"/><line nr="224" mi="5" ci="0" mb="0" cb="0"/><line nr="225" mi="1" ci="0" mb="0" cb="0"/><line nr="234" mi="4" ci="0" mb="0" cb="0"/><line nr="235" mi="1" ci="0" mb="0" cb="0"/><line nr="246" mi="5" ci="0" mb="0" cb="0"/><line nr="247" mi="1" ci="0" mb="0" cb="0"/><line nr="256" mi="4" ci="0" mb="0" cb="0"/><line nr="257" mi="1" ci="0" mb="0" cb="0"/><line nr="268" mi="0" ci="5" mb="0" cb="0"/><line nr="269" mi="0" ci="1" mb="0" cb="0"/><line nr="278" mi="4" ci="0" mb="0" cb="0"/><line nr="279" mi="1" ci="0" mb="0" cb="0"/><line nr="290" mi="5" ci="0" mb="0" cb="0"/><line nr="291" mi="1" ci="0" mb="0" cb="0"/><line nr="300" mi="4" ci="0" mb="0" cb="0"/><line nr="301" mi="1" ci="0" mb="0" cb="0"/><line nr="312" mi="0" ci="5" mb="0" cb="0"/><line nr="313" mi="0" ci="1" mb="0" cb="0"/><counter type="INSTRUCTION" missed="91" covered="54"/><counter type="BRANCH" missed="2" covered="2"/><counter type="LINE" missed="34" covered="19"/><counter type="COMPLEXITY" missed="17" covered="9"/><counter type="METHOD" missed="16" covered="8"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="ReplError.java"><line nr="40" mi="0" ci="8" mb="0" cb="0"/><line nr="41" mi="0" ci="1" mb="0" cb="0"/><line nr="55" mi="0" ci="2" mb="0" cb="0"/><line nr="56" mi="0" ci="3" mb="0" cb="0"/><line nr="57" mi="0" ci="3" mb="0" cb="0"/><line nr="59" mi="0" ci="3" mb="0" cb="0"/><line nr="60" mi="0" ci="3" mb="0" cb="0"/><line nr="61" mi="0" ci="1" mb="0" cb="0"/><line nr="66" mi="3" ci="0" mb="2" cb="0"/><line nr="67" mi="3" ci="0" mb="0" cb="0"/><line nr="68" mi="5" ci="0" mb="2" cb="0"/><line nr="69" mi="3" ci="0" mb="0" cb="0"/><line nr="71" mi="10" ci="0" mb="0" cb="0"/><line nr="73" mi="26" ci="0" mb="0" cb="0"/><line nr="82" mi="4" ci="0" mb="0" cb="0"/><line nr="95" mi="0" ci="3" mb="1" cb="1"/><line nr="96" mi="0" ci="3" mb="0" cb="0"/><line nr="97" mi="5" ci="0" mb="2" cb="0"/><line nr="98" mi="3" ci="0" mb="0" cb="0"/><line nr="100" mi="10" ci="0" mb="0" cb="0"/><line nr="102" mi="0" ci="15" mb="0" cb="0"/><line nr="103" mi="0" ci="15" mb="0" cb="0"/><counter type="INSTRUCTION" missed="72" covered="60"/><counter type="BRANCH" missed="7" covered="1"/><counter type="LINE" missed="10" covered="12"/><counter type="COMPLEXITY" missed="6" covered="3"/><counter type="METHOD" missed="2" covered="3"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><sourcefile name="ControlledString.java"><line nr="30" mi="2" ci="0" mb="0" cb="0"/><line nr="32" mi="1" ci="0" mb="0" cb="0"/><line nr="40" mi="0" ci="2" mb="0" cb="0"/><line nr="41" mi="0" ci="3" mb="0" cb="0"/><line nr="42" mi="0" ci="1" mb="0" cb="0"/><line nr="52" mi="0" ci="2" mb="0" cb="0"/><line nr="53" mi="0" ci="3" mb="0" cb="0"/><line nr="54" mi="0" ci="3" mb="0" cb="0"/><line nr="55" mi="0" ci="1" mb="0" cb="0"/><line nr="63" mi="2" ci="3" mb="1" cb="1"/><line nr="65" mi="0" ci="4" mb="0" cb="0"/><line nr="76" mi="0" ci="2" mb="1" cb="1"/><line nr="77" mi="8" ci="0" mb="0" cb="0"/><line nr="78" mi="2" ci="0" mb="0" cb="0"/><line nr="80" mi="5" ci="0" mb="0" cb="0"/><line nr="83" mi="0" ci="5" mb="1" cb="1"/><line nr="84" mi="10" ci="0" mb="0" cb="0"/><line nr="86" mi="7" ci="0" mb="0" cb="0"/><line nr="88" mi="5" ci="0" mb="0" cb="0"/><line nr="91" mi="0" ci="5" mb="0" cb="0"/><line nr="96" mi="4" ci="0" mb="0" cb="0"/><line nr="97" mi="5" ci="0" mb="0" cb="0"/><line nr="99" mi="7" ci="0" mb="4" cb="0"/><line nr="100" mi="4" ci="0" mb="0" cb="0"/><line nr="102" mi="17" ci="0" mb="2" cb="0"/><line nr="103" mi="4" ci="0" mb="0" cb="0"/><line nr="104" mi="4" ci="0" mb="0" cb="0"/><line nr="108" mi="3" ci="0" mb="0" cb="0"/><line nr="113" mi="2" ci="0" mb="0" cb="0"/><line nr="114" mi="2" ci="0" mb="0" cb="0"/><line nr="115" mi="8" ci="0" mb="0" cb="0"/><line nr="116" mi="13" ci="0" mb="2" cb="0"/><line nr="117" mi="2" ci="0" mb="0" cb="0"/><line nr="122" mi="0" ci="3" mb="1" cb="1"/><line nr="123" mi="2" ci="0" mb="0" cb="0"/><line nr="125" mi="0" ci="2" mb="1" cb="1"/><line nr="126" mi="2" ci="0" mb="0" cb="0"/><line nr="128" mi="0" ci="5" mb="1" cb="1"/><line nr="129" mi="2" ci="0" mb="0" cb="0"/><line nr="132" mi="0" ci="3" mb="0" cb="0"/><line nr="134" mi="0" ci="3" mb="1" cb="1"/><line nr="135" mi="3" ci="0" mb="2" cb="0"/><line nr="136" mi="2" ci="0" mb="0" cb="0"/><line nr="138" mi="0" ci="6" mb="1" cb="1"/><line nr="139" mi="2" ci="0" mb="0" cb="0"/><line nr="142" mi="0" ci="11" mb="1" cb="3"/><line nr="143" mi="0" ci="11" mb="1" cb="3"/><line nr="145" mi="0" ci="4" mb="1" cb="3"/><line nr="146" mi="2" ci="0" mb="0" cb="0"/><line nr="148" mi="0" ci="4" mb="1" cb="3"/><line nr="149" mi="2" ci="0" mb="0" cb="0"/><line nr="152" mi="0" ci="4" mb="1" cb="3"/><line nr="153" mi="0" ci="6" mb="0" cb="0"/><line nr="156" mi="0" ci="2" mb="0" cb="0"/><line nr="169" mi="0" ci="6" mb="0" cb="0"/><line nr="212" mi="0" ci="2" mb="0" cb="0"/><line nr="213" mi="0" ci="3" mb="0" cb="0"/><line nr="214" mi="0" ci="3" mb="0" cb="0"/><line nr="215" mi="0" ci="3" mb="0" cb="0"/><line nr="216" mi="0" ci="3" mb="0" cb="0"/><line nr="217" mi="0" ci="1" mb="0" cb="0"/><line nr="234" mi="8" ci="0" mb="0" cb="0"/><line nr="251" mi="2" ci="0" mb="0" cb="0"/><line nr="252" mi="4" ci="0" mb="0" cb="0"/><line nr="253" mi="1" ci="0" mb="0" cb="0"/><line nr="261" mi="0" ci="2" mb="0" cb="0"/><line nr="262" mi="0" ci="3" mb="0" cb="0"/><line nr="264" mi="0" ci="4" mb="0" cb="0"/><line nr="265" mi="0" ci="1" mb="0" cb="0"/><line nr="275" mi="2" ci="0" mb="0" cb="0"/><line nr="276" mi="3" ci="0" mb="0" cb="0"/><line nr="278" mi="3" ci="0" mb="0" cb="0"/><line nr="279" mi="1" ci="0" mb="0" cb="0"/><line nr="287" mi="0" ci="8" mb="0" cb="2"/><line nr="296" mi="0" ci="4" mb="0" cb="0"/><line nr="311" mi="0" ci="5" mb="0" cb="2"/><line nr="312" mi="0" ci="5" mb="0" cb="0"/><line nr="315" mi="0" ci="7" mb="0" cb="0"/><line nr="317" mi="0" ci="4" mb="1" cb="1"/><line nr="318" mi="2" ci="0" mb="0" cb="0"/><line nr="319" mi="10" ci="0" mb="0" cb="0"/><line nr="321" mi="5" ci="0" mb="0" cb="0"/><line nr="324" mi="0" ci="7" mb="0" cb="0"/><line nr="325" mi="0" ci="4" mb="0" cb="2"/><line nr="326" mi="0" ci="5" mb="0" cb="0"/><line nr="328" mi="0" ci="9" mb="0" cb="0"/><line nr="330" mi="0" ci="5" mb="0" cb="0"/><line nr="332" mi="0" ci="8" mb="0" cb="2"/><line nr="333" mi="0" ci="4" mb="0" cb="0"/><line nr="335" mi="0" ci="5" mb="0" cb="0"/><line nr="336" mi="0" ci="2" mb="0" cb="0"/><line nr="338" mi="0" ci="7" mb="0" cb="0"/><line nr="340" mi="0" ci="5" mb="0" cb="2"/><line nr="341" mi="0" ci="5" mb="0" cb="0"/><line nr="344" mi="0" ci="4" mb="0" cb="2"/><line nr="345" mi="0" ci="7" mb="0" cb="0"/><line nr="346" mi="0" ci="8" mb="0" cb="2"/><line nr="347" mi="0" ci="9" mb="0" cb="0"/><line nr="351" mi="0" ci="5" mb="0" cb="0"/><line nr="354" mi="0" ci="2" mb="0" cb="0"/><line nr="359" mi="4" ci="0" mb="0" cb="0"/><line nr="361" mi="4" ci="0" mb="0" cb="0"/><line nr="363" mi="17" ci="0" mb="2" cb="0"/><line nr="364" mi="4" ci="0" mb="0" cb="0"/><line nr="367" mi="4" ci="0" mb="0" cb="0"/><line nr="368" mi="5" ci="0" mb="0" cb="0"/><line nr="370" mi="3" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="216" covered="263"/><counter type="BRANCH" missed="26" covered="38"/><counter type="LINE" missed="47" covered="60"/><counter type="COMPLEXITY" missed="27" covered="23"/><counter type="METHOD" missed="7" covered="11"/><counter type="CLASS" missed="0" covered="3"/></sourcefile><sourcefile name="StringUtils.java"><line nr="12" mi="3" ci="0" mb="0" cb="0"/><line nr="16" mi="0" ci="3" mb="0" cb="0"/><line nr="36" mi="0" ci="6" mb="2" cb="2"/><line nr="37" mi="7" ci="0" mb="0" cb="0"/><line nr="43" mi="0" ci="4" mb="0" cb="2"/><line nr="44" mi="0" ci="7" mb="0" cb="0"/><line nr="50" mi="0" ci="6" mb="1" cb="3"/><line nr="51" mi="0" ci="5" mb="0" cb="0"/><line nr="54" mi="0" ci="4" mb="0" cb="0"/><line nr="61" mi="0" ci="2" mb="0" cb="0"/><line nr="64" mi="0" ci="4" mb="0" cb="0"/><line nr="66" mi="0" ci="4" mb="0" cb="0"/><line nr="70" mi="0" ci="2" mb="0" cb="0"/><line nr="73" mi="0" ci="6" mb="0" cb="4"/><line nr="75" mi="0" ci="5" mb="0" cb="4"/><line nr="76" mi="0" ci="2" mb="1" cb="1"/><line nr="77" mi="6" ci="0" mb="0" cb="0"/><line nr="85" mi="0" ci="8" mb="0" cb="0"/><line nr="86" mi="0" ci="2" mb="0" cb="2"/><line nr="88" mi="0" ci="5" mb="0" cb="0"/><line nr="90" mi="0" ci="6" mb="0" cb="0"/><line nr="93" mi="0" ci="5" mb="0" cb="0"/><line nr="94" mi="0" ci="5" mb="0" cb="0"/><line nr="96" mi="0" ci="2" mb="1" cb="1"/><line nr="97" mi="13" ci="0" mb="0" cb="0"/><line nr="98" mi="7" ci="0" mb="0" cb="0"/><line nr="102" mi="0" ci="2" mb="0" cb="0"/><line nr="103" mi="0" ci="1" mb="0" cb="0"/><line nr="107" mi="0" ci="8" mb="0" cb="0"/><line nr="108" mi="0" ci="2" mb="1" cb="1"/><line nr="110" mi="0" ci="5" mb="0" cb="0"/><line nr="112" mi="0" ci="6" mb="0" cb="0"/><line nr="115" mi="0" ci="5" mb="0" cb="0"/><line nr="116" mi="0" ci="5" mb="0" cb="0"/><line nr="118" mi="0" ci="2" mb="1" cb="1"/><line nr="119" mi="14" ci="0" mb="0" cb="0"/><line nr="120" mi="12" ci="0" mb="0" cb="0"/><line nr="124" mi="0" ci="2" mb="0" cb="0"/><line nr="125" mi="0" ci="1" mb="0" cb="0"/><line nr="130" mi="0" ci="2" mb="0" cb="0"/><line nr="132" mi="0" ci="8" mb="0" cb="0"/><line nr="135" mi="0" ci="6" mb="0" cb="2"/><line nr="139" mi="0" ci="5" mb="1" cb="3"/><line nr="140" mi="8" ci="0" mb="0" cb="0"/><line nr="142" mi="3" ci="0" mb="2" cb="0"/><line nr="143" mi="1" ci="0" mb="0" cb="0"/><line nr="145" mi="6" ci="0" mb="0" cb="0"/><line nr="147" mi="2" ci="0" mb="0" cb="0"/><line nr="149" mi="8" ci="0" mb="0" cb="0"/><line nr="150" mi="1" ci="0" mb="0" cb="0"/><line nr="152" mi="0" ci="3" mb="0" cb="2"/><line nr="153" mi="0" ci="1" mb="0" cb="0"/><line nr="156" mi="0" ci="5" mb="0" cb="0"/><line nr="158" mi="0" ci="2" mb="1" cb="1"/><line nr="159" mi="14" ci="0" mb="0" cb="0"/><line nr="160" mi="2" ci="0" mb="0" cb="0"/><line nr="163" mi="0" ci="4" mb="0" cb="0"/><line nr="164" mi="0" ci="8" mb="1" cb="3"/><line nr="165" mi="3" ci="0" mb="0" cb="0"/><line nr="167" mi="0" ci="6" mb="1" cb="1"/><line nr="168" mi="0" ci="8" mb="0" cb="0"/><line nr="170" mi="4" ci="0" mb="0" cb="0"/><line nr="174" mi="0" ci="4" mb="0" cb="0"/><line nr="175" mi="0" ci="4" mb="0" cb="0"/><line nr="177" mi="0" ci="2" mb="0" cb="0"/><line nr="178" mi="0" ci="1" mb="0" cb="0"/><line nr="180" mi="0" ci="4" mb="0" cb="2"/><line nr="181" mi="0" ci="4" mb="0" cb="0"/><line nr="183" mi="0" ci="6" mb="0" cb="0"/><line nr="199" mi="0" ci="5" mb="0" cb="0"/><line nr="200" mi="0" ci="4" mb="0" cb="0"/><line nr="202" mi="0" ci="9" mb="0" cb="0"/><line nr="218" mi="0" ci="5" mb="0" cb="0"/><line nr="219" mi="0" ci="6" mb="0" cb="0"/><line nr="221" mi="0" ci="9" mb="0" cb="0"/><counter type="INSTRUCTION" missed="114" covered="253"/><counter type="BRANCH" missed="13" covered="35"/><counter type="LINE" missed="18" covered="57"/><counter type="COMPLEXITY" missed="13" covered="16"/><counter type="METHOD" missed="1" covered="4"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><counter type="INSTRUCTION" missed="2333" covered="2360"/><counter type="BRANCH" missed="243" covered="249"/><counter type="LINE" missed="503" covered="547"/><counter type="COMPLEXITY" missed="228" covered="148"/><counter type="METHOD" missed="44" covered="66"/><counter type="CLASS" missed="0" covered="15"/></package><counter type="INSTRUCTION" missed="2333" covered="2360"/><counter type="BRANCH" missed="243" covered="249"/><counter type="LINE" missed="503" covered="547"/><counter type="COMPLEXITY" missed="228" covered="148"/><counter type="METHOD" missed="44" covered="66"/><counter type="CLASS" missed="0" covered="15"/></report>
\ No newline at end of file @@ -46,6 +46,16 @@ <version>4.13.1</version> <scope>test</scope> </dependency> + <dependency> + <groupId>bjc</groupId> + <artifactId>BJC-Utils2</artifactId> + <version>1.0.0</version> + </dependency> + <dependency> + <groupId>io.github.bculkin2442</groupId> + <artifactId>esodata</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> </dependencies> <build> <plugins> diff --git a/src/main/java/bjc/everge/BadReplParse.java b/src/main/java/bjc/everge/BadReplParse.java index 0278e76..c22e3ba 100644 --- a/src/main/java/bjc/everge/BadReplParse.java +++ b/src/main/java/bjc/everge/BadReplParse.java @@ -17,7 +17,7 @@ public class BadReplParse extends RuntimeException { /** * The errors that were encountered during parsing. */ - public List<ReplError> errs; + public List<ReplPairError> errs; /** * Create a new exception for ReplPair parsing failing. @@ -37,7 +37,7 @@ public class BadReplParse extends RuntimeException { * @param errs * The list of errors encountered while parsing. */ - public BadReplParse(String msg, List<ReplError> errs) { + public BadReplParse(String msg, List<ReplPairError> errs) { super(msg); this.errs = errs; @@ -81,7 +81,7 @@ public class BadReplParse extends RuntimeException { if (errs.size() > 0) { errString.append("\n\t"); - for (ReplError err : errs) { + for (ReplPairError err : errs) { errString.append(err.toPrintString("\t")); errString.append("\n\t"); } diff --git a/src/main/java/bjc/everge/ControlledString.java b/src/main/java/bjc/everge/ControlledString.java index 75e1fdc..f27b3d2 100644 --- a/src/main/java/bjc/everge/ControlledString.java +++ b/src/main/java/bjc/everge/ControlledString.java @@ -2,6 +2,11 @@ package bjc.everge; import java.util.Arrays; +/* @FixMe Ben Culkin Oct. 31, 2020 - :LeadingControl + * + * At the moment, this only parses a single control that is at the start of the + * string. Should this be improved? + */ /** * Represents a string with a set of control flags attached to it. * @@ -38,6 +43,8 @@ public class ControlledString { * The name of the control. */ public Control(String nam) { + this(); + name = nam; } @@ -50,7 +57,8 @@ public class ControlledString { * The arguments of the control. */ public Control(String nam, String... ars) { - name = nam; + this(nam); + args = ars; } @@ -73,6 +81,8 @@ public class ControlledString { * @return The argument at that position. */ public String get(int i) { + // @Cleanup: I'm pretty sure Java will auto-throw these, so we should + // remove this stuff. --bculkin, Oct. 31, 2020 if (i < 0) { String msg = String.format( "Control argument index must be greater than 0 (was %d)", i); @@ -175,74 +185,78 @@ public class ControlledString { * * @author Ben Culkin */ - public static class ParseStrings { + public static class ControlledStringParseOptions { /** * The indicator for separating controls from the regular string. */ - public String contInd; + public String controlIndicator; /** * The indicator for separating individual controls. */ - public String contSep; + public String controlSeparator; /** * The indicator for separating arguments to a control. */ - public String contArg; + public String controlArgumentSeparator; /** * The indicator for escaping any of the indicators (including itself) */ - public String contEsc; + public String controlEscape; /** * Create a new set of parse strings. * - * @param contInd + * @param controlIndicator * The control indicator. - * @param contSep + * @param controlSeparator * The control separator. - * @param contArg + * @param controlArgumentSeparator * The argument separator. - * @param contEsc + * @param controlEscape * The control escape. */ - public ParseStrings(String contInd, String contSep, String contArg, - String contEsc) { - this.contInd = contInd; - this.contSep = contSep; - this.contArg = contArg; - this.contEsc = contEsc; + public ControlledStringParseOptions(String controlIndicator, + String controlSeparator, String controlArgumentSeparator, + String controlEscape) { + this.controlIndicator = controlIndicator; + this.controlSeparator = controlSeparator; + this.controlArgumentSeparator = controlArgumentSeparator; + this.controlEscape = controlEscape; } /** * Convenient static constructor. * - * @param contInd + * @param controlIndicator * The control indicator. - * @param contSep + * @param controlSeparator * The control separator. - * @param contArg + * @param controlArgumentSeparator * The argument separator. - * @param contEsc + * @param controlEscape * The control escape. * @return A new set of control strings. */ - public static ParseStrings PS(String contInd, String contSep, String contArg, - String contEsc) { - return new ParseStrings(contInd, contSep, contArg, contEsc); + public static ControlledStringParseOptions CSPS(String controlIndicator, + String controlSeparator, String controlArgumentSeparator, + String controlEscape) { + return new ControlledStringParseOptions(controlIndicator, controlSeparator, controlArgumentSeparator, controlEscape); } } /** * The string the controls apply to. */ - public String strang; + public String body; /** * The controls that apply to the string. */ + // @NOTE Why is this an array? Would it make more sense for it to be a List + // of some sort? --bculkin, Oct 31, 2020 public Control[] controls; /** @@ -259,9 +273,9 @@ public class ControlledString { * The string to use. */ public ControlledString(String strung) { - strang = strung; - - controls = new Control[0]; + this(); + + body = strung; } /** @@ -273,7 +287,7 @@ public class ControlledString { * The controls that apply to the string. */ public ControlledString(String strung, Control... controls) { - strang = strung; + this(strung); this.controls = controls; } @@ -307,51 +321,59 @@ public class ControlledString { * The object to read the strings from * @return A parsed control string. */ - public static ControlledString parse(String lne, ParseStrings strangs) { - if (!lne.startsWith(strangs.contInd)) { - return new ControlledString(lne); - } + public static ControlledString parse(String lne, ControlledStringParseOptions strangs) { + if (!lne.startsWith(strangs.controlIndicator)) return new ControlledString(lne); - String[] bits = StringUtils.escapeSplit(strangs.contEsc, strangs.contInd, lne); + // Split off initial control + String[] controlIntervals = StringUtils.escapeSplit(strangs.controlEscape, strangs.controlIndicator, lne); - if (bits.length < 2) { + if (controlIntervals.length < 2) { String msg = "Did not find control terminator (%s) where it should be"; - msg = String.format(msg, strangs.contInd); + msg = String.format(msg, strangs.controlIndicator); throw new IllegalArgumentException(msg); } - ControlledString cs = new ControlledString(bits[0]); - if (bits.length > 2) - cs.strang = bits[2]; - - bits = StringUtils.escapeSplit(strangs.contEsc, strangs.contSep, bits[1]); + ControlledString controlString = new ControlledString(controlIntervals[0]); + /* :LeadingControl + * ... Is this even correct? It would seem that we are discarding any + * text that came before the control. + * + * Ideally, what we would want to do is concatenate any non-control text, + * and then process each control interval by itself. + */ + if (controlIntervals.length > 2) controlString.body = controlIntervals[2]; - cs.controls = new Control[bits.length]; + // Split the individual controls from the string + String[] unparsedControls = StringUtils.escapeSplit(strangs.controlEscape, + strangs.controlSeparator, controlIntervals[1]); + controlString.controls = new Control[unparsedControls.length]; - for (int i = 0; i < bits.length; i++) { - String bit = bits[i]; + for (int i = 0; i < unparsedControls.length; i++) { + String controlText = unparsedControls[i]; - String[] bots - = StringUtils.escapeSplit(strangs.contEsc, strangs.contArg, bit); + // Get the control arguments + String[] controlArguments + = StringUtils.escapeSplit(strangs.controlEscape, strangs.controlArgumentSeparator, controlText); - Control cont = new Control(bots[0]); + Control control = new Control(controlArguments[0]); - if (cont.name.length() > 1) { - cont.name = cont.name.toUpperCase(); + if (control.name.length() > 1) { + // Only single-character controls can be lower-case + control.name = control.name.toUpperCase(); } - if (bots.length > 1) { - cont.args = new String[bots.length - 1]; - for (int j = 1; j < bots.length; j++) { - cont.args[j - 1] = bots[j]; + if (controlArguments.length > 1) { + control.args = new String[controlArguments.length - 1]; + for (int j = 1; j < controlArguments.length; j++) { + control.args[j - 1] = controlArguments[j]; } } - cs.controls[i] = cont; + controlString.controls[i] = control; } - return cs; + return controlString; } @Override @@ -360,12 +382,10 @@ public class ControlledString { sb.append("//"); - for (Control cont : controls) { - sb.append(cont); - } + for (Control control : controls) sb.append(control); sb.append("//"); - sb.append(strang); + sb.append(body); return sb.toString(); } diff --git a/src/main/java/bjc/everge/Everge.java b/src/main/java/bjc/everge/Everge.java index c2e361f..96b20ff 100644 --- a/src/main/java/bjc/everge/Everge.java +++ b/src/main/java/bjc/everge/Everge.java @@ -7,6 +7,8 @@ import java.util.*; import java.util.concurrent.locks.*; import java.util.regex.*; +import bjc.utils.ioutils.*; + /** * Everge front-end application. * @@ -26,47 +28,62 @@ public class Everge { */ LINE, /** - * Process the input, splitting it around occurances of a regex. + * Process the input, splitting it around occurrences of a regular expression. */ REGEX; } - // Options for doing repl-pairs - private ReplOpts ropts = new ReplOpts(); + /** + * Options for doing repl-pairs + */ + private ReplPairOptions replOptions = new ReplPairOptions(); - // Pair repository - private ReplSet replSet = new ReplSet(); + /** + * Repository for ReplPairs + */ + private ReplPairSet replSet = new ReplPairSet(); - // Input status - private InputStatus inputStat = InputStatus.ALL; + /** + * Input status. + * + * How the input to run replacements on should be processed. + */ + private InputStatus inputStatus = InputStatus.ALL; - // Are we processing CLI args? (haven't seen a -- yet) + /** + * Are we processing CLI args? (haven't seen a -- yet) + */ private boolean doingArgs = true; - // Should an NL be printed after each replace? - private boolean printNL = true; + /** + * Should an NL be printed after each replace? + */ + private boolean printNLAfterReplace = true; - // Verbosity level + /** + * Verbosity level + */ private int verbosity; - // The pattern to use for REGEX input mode - private String pattern; - - // The queue of arguments to process - private Deque<String> argQue = new LinkedList<>(); + /** + * The pattern to use for REGEX input mode + */ + private String regexPattern; - // Used to prevent inter-mixing argument alterations with input processing. + /** + * Used to prevent inter-mixing argument alterations with input processing. + */ private ReadWriteLock argLock = new ReentrantReadWriteLock(); // Input/output streams /** * Stream to use for normal output. */ - private PrintStream outStream = System.out; + private PrintStream outputStream = System.out; /** * Stream to use for error output. */ - private LogStream errStream = new LogStream(System.err); + private LogStream errorStream = new LogStream(System.err); /** * Set the output stream. @@ -75,7 +92,7 @@ public class Everge { * The output stream.. */ public void setOutput(PrintStream out) { - outStream = out; + outputStream = out; } /** @@ -85,7 +102,7 @@ public class Everge { * The output stream.. */ public void setOutput(OutputStream out) { - outStream = new PrintStream(out); + setOutput(new PrintStream(out)); } /** @@ -95,7 +112,7 @@ public class Everge { * The error stream. */ public void setError(PrintStream err) { - errStream = new LogStream(err); + errorStream = new LogStream(err); } /** @@ -105,7 +122,7 @@ public class Everge { * The error stream. */ public void setError(OutputStream err) { - errStream = new LogStream(new PrintStream(err)); + setError(new PrintStream(err)); } /** @@ -125,7 +142,7 @@ public class Everge { * * @param args * The arguments to process. - * @return Whether we processed succesfully or not. + * @return Whether we processed successfully or not. */ public boolean processArgs(String... args) { List<String> errs = new ArrayList<>(); @@ -134,19 +151,16 @@ public class Everge { if (verbosity >= 2) { String argString = args.length > 0 ? "arguments" : "argument"; - errStream.infof("[INFO] Processed %d %s\n", args.length, argString); - int argc = 0; + errorStream.infof("[INFO] Processed %d %s\n", args.length, argString); + int argCount = 0; if (verbosity >= 3) { - String arg = args[argc++]; - errStream.tracef("[TRACE]\tArg %d: '%s\n", argc, arg); + String arg = args[argCount++]; + errorStream.tracef("[TRACE]\tArg %d: '%s\n", argCount, arg); } } - if (!stat) { - for (String err : errs) { - errStream.errorf("%s\n", err); - } - } + if (!stat) + for (String err : errs) errorStream.errorf("%s\n", err); return stat; } @@ -158,35 +172,36 @@ public class Everge { * The arguments to process. * @param errs * The list to stash errors in. - * @return Whether we processed succesfully or not. + * @return Whether we processed successfully or not. */ public boolean processArgs(List<String> errs, String... args) { argLock.writeLock().lock(); - boolean retStat = true; + boolean returnStatus = true; try { - loadQueue(args); + Deque<String> argQueue = loadQueue(args); - // Process CLI args - while (argQue.size() > 0) { - String arg = argQue.pop(); + // Process CLI arguments + while (argQueue.size() > 0) { + String arg = argQueue.pop(); - retStat = processArg(errs, retStat, arg); + returnStatus = processArg(errs, returnStatus, arg, argQueue); } } finally { argLock.writeLock().unlock(); } - return retStat; + return returnStatus; } - private boolean processArg(List<String> errs, boolean retStat, String arg) { - boolean newRet = retStat; + private boolean processArg(List<String> errors, boolean retStat, String arg, Deque<String> argQueue) { + boolean newReturnStatus = retStat; if (arg.equals("--")) { doingArgs = false; - return newRet; + + return newReturnStatus; } // Process an argument @@ -194,7 +209,7 @@ public class Everge { String argName = arg; String argBody = ""; - // Process arguments to arguments + // Process 'joined' arguments (a=b) int idx = arg.indexOf("="); if (idx != -1) { argName = arg.substring(0, idx); @@ -204,76 +219,84 @@ public class Everge { switch (argName) { case "-n": case "--newline": - printNL = true; + printNLAfterReplace = true; break; case "-N": case "--no-newline": - printNL = false; + case "--nonewline": + printNLAfterReplace = false; break; + case "-v": case "--verbose": verbosity += 1; - errStream.louder(); - System.err.printf("[TRACE] Incremented verbosity\n"); + errorStream.louder(); + //System.err.printf("[TRACE] Incremented verbosity\n"); break; case "-q": case "--quiet": verbosity -= 1; - errStream.quieter(); - System.err.printf("[TRACE] Decremented verbosity\n"); + errorStream.quieter(); + //System.err.printf("[TRACE] Decremented verbosity\n"); break; case "--verbosity": - if (argQue.size() < 1) { - errs.add("[ERROR] No parameter to --verbosity"); - newRet = false; + if (argQueue.size() < 1) { + errors.add("[ERROR] No parameter to --verbosity"); + newReturnStatus = false; break; } - argBody = argQue.pop(); + argBody = argQueue.pop(); case "-V": try { verbosity = Integer.parseInt(argBody); - errStream.verbosity(verbosity); - System.err.printf("[TRACE] Set verbosity to %d\n", verbosity); + errorStream.verbosity(verbosity); + //System.err.printf("[TRACE] Set verbosity to %d\n", verbosity); } catch (NumberFormatException nfex) { String msg = String.format( "[ERROR] Invalid verbosity: '%s' is not an integer", argBody); - errs.add(msg); - newRet = false; + errors.add(msg); + newReturnStatus = false; } break; + case "--pattern": - if (argQue.size() < 1) { - errs.add("[ERROR] No parameter to --pattern"); - newRet = false; + if (argQueue.size() < 1) { + errors.add("[ERROR] No parameter to --pattern"); + newReturnStatus = false; break; } - argBody = argQue.pop(); + argBody = argQueue.pop(); case "-p": + if (inputStatus != InputStatus.REGEX) + errorStream.warn("[WARN] Specified pattern will be ignored unless input mode is switched to REGEX"); + try { - pattern = argBody; + regexPattern = argBody; Pattern.compile(argBody); } catch (PatternSyntaxException psex) { String msg = String.format("[ERROR] Pattern '%s' is invalid: %s", - pattern, psex.getMessage()); - errs.add(msg); - newRet = false; + regexPattern, psex.getMessage()); + errors.add(msg); + newReturnStatus = false; } break; + case "--file": - if (argQue.size() < 1) { - errs.add("[ERROR] No argument to --file"); - newRet = false; + if (argQueue.size() < 1) { + errors.add("[ERROR] No argument to --file"); + newReturnStatus = false; break; } - argBody = argQue.pop(); + argBody = argQueue.pop(); case "-f": try (FileInputStream fis = new FileInputStream(argBody); Scanner scn = new Scanner(fis)) { - List<ReplError> ferrs = new ArrayList<>(); + List<ReplPairError> ferrs = new ArrayList<>(); - List<ReplPair> lrp = new ArrayList<>(); - lrp = ReplPair.readList(lrp, scn, ferrs, ropts); + List<ReplPair> pairList = new ArrayList<>(); + ReplPairParser parser = new ReplPairParser(); + pairList = parser.readList(pairList, scn, ferrs, replOptions); if (ferrs.size() > 0) { StringBuilder sb = new StringBuilder(); @@ -282,41 +305,40 @@ public class Everge { if (ferrs.size() > 1) errString = String.format("%d errors", ferrs.size()); - { - String msg = String.format( - "[ERROR] Encountered %s parsing data file'%s'\n", - errString, argBody); - sb.append(msg); - } - - for (ReplError err : ferrs) { + + String msg = String.format( + "[ERROR] Encountered %s parsing data file'%s'\n", + errString, argBody); + sb.append(msg); + + for (ReplPairError err : ferrs) sb.append(String.format("\t%s\n", err)); - } - errs.add(sb.toString()); - newRet = false; + errors.add(sb.toString()); + newReturnStatus = false; } - replSet.addPairs(lrp); + replSet.addPairs(pairList); } catch (FileNotFoundException fnfex) { String msg = String.format( "[ERROR] Could not open data file '%s' for input", argBody); - errs.add(msg); - newRet = false; + errors.add(msg); + newReturnStatus = false; } catch (IOException ioex) { String msg = String.format( "[ERROR] Unknown I/O error reading data file '%s': %s", argBody, ioex.getMessage()); - errs.add(msg); - newRet = false; + errors.add(msg); + newReturnStatus = false; } break; + case "--arg-file": - if (argQue.size() < 1) { - errs.add("[ERROR] No argument to --arg-file"); + if (argQueue.size() < 1) { + errors.add("[ERROR] No argument to --arg-file"); break; } - argBody = argQue.pop(); + argBody = argQueue.pop(); case "-F": try (FileInputStream fis = new FileInputStream(argBody); Scanner scn = new Scanner(fis)) { @@ -325,61 +347,63 @@ public class Everge { while (scn.hasNextLine()) { String ln = scn.nextLine().trim(); - if (ln.equals("")) - continue; - if (ln.startsWith("#")) - continue; + if (ln.equals("")) continue; + if (ln.startsWith("#")) continue; sl.add(ln); } + // @FixMe :ArgFile + // This won't work properly when using the 'non-inline' arguments + // oops. It should. -- bculkin, Oct 31 processArgs(sl.toArray(new String[0])); } catch (FileNotFoundException fnfex) { String msg = String.format( "[ERROR] Could not open argument file '%s' for input", argBody); - errs.add(msg); - newRet = false; + errors.add(msg); + newReturnStatus = false; } catch (IOException ioex) { String msg = String.format( "[ERROR] Unknown I/O error reading input file '%s': %s", argBody, ioex.getMessage()); - errs.add(msg); - newRet = false; + errors.add(msg); + newReturnStatus = false; } break; + case "--input-status": - if (argQue.size() < 1) { - errs.add("[ERROR] No argument to --input-status"); + if (argQueue.size() < 1) { + errors.add("[ERROR] No argument to --input-status"); break; } - argBody = argQue.pop(); + argBody = argQueue.pop(); case "-I": try { - inputStat = InputStatus.valueOf(argBody.toUpperCase()); + inputStatus = InputStatus.valueOf(argBody.toUpperCase()); } catch (IllegalArgumentException iaex) { String msg = String.format("[ERROR] '%s' is not a valid input status", argBody); - errs.add(msg); + errors.add(msg); } break; + default: { - String msg = String - .format("[ERROR] Unrecognised CLI argument name '%s'\n", argName); - errs.add(msg); - newRet = false; + String msg = String.format( + "[ERROR] Unrecognised CLI argument name '%s'\n", argName); + errors.add(msg); + newReturnStatus = false; } } } else { String tmp = arg; // Strip off an escaped initial dash - if (tmp.startsWith("\\-")) - tmp = tmp.substring(1); + if (tmp.startsWith("\\-")) tmp = tmp.substring(1); processInputFile(tmp); } - return newRet; + return newReturnStatus; } /** @@ -393,11 +417,7 @@ public class Everge { List<String> errs = new ArrayList<>(); boolean stat = processInputFile(errs, fle); - if (!stat) { - for (String err : errs) { - errStream.errorf("%s\n", err); - } - } + if (!stat) for (String err : errs) errorStream.errorf("%s\n", err); return stat; } @@ -417,16 +437,15 @@ public class Everge { // Read in and do replacements on a file try { if (verbosity > 2) { - errStream.printf("[TRACE] Reading file (%s) in mode (%s)\n", fle, - inputStat); + errorStream.printf("[TRACE] Reading file (%s) in mode (%s)\n", fle, + inputStatus); } - if (inputStat == InputStatus.ALL) { + if (inputStatus == InputStatus.ALL) { Path pth = Paths.get(fle); if (!Files.isReadable(pth)) { - String msg - = String.format("[ERROR] File '%s' is not readable\n", fle); + String msg = String.format("[ERROR] File '%s' is not readable\n", fle); errs.add(msg); return false; } @@ -436,26 +455,23 @@ public class Everge { String strang = new String(inp, Charset.forName("UTF-8")); processString(strang); - } else if (inputStat == InputStatus.LINE) { - try (FileInputStream fis = new FileInputStream(fle); + } else if (inputStatus == InputStatus.LINE) { + try ( + FileInputStream fis = new FileInputStream(fle); Scanner scn = new Scanner(fis)) { - while (scn.hasNextLine()) { - processString(scn.nextLine()); - } + while (scn.hasNextLine()) processString(scn.nextLine()); } - } else if (inputStat == InputStatus.REGEX) { + } else if (inputStatus == InputStatus.REGEX) { try (FileInputStream fis = new FileInputStream(fle); Scanner scn = new Scanner(fis)) { - scn.useDelimiter(pattern); + scn.useDelimiter(regexPattern); - while (scn.hasNext()) { - processString(scn.next()); - } + while (scn.hasNext()) processString(scn.next()); } } else { String msg = String.format( "[INTERNAL-ERROR] Input status '%s' is not yet implemented\n", - inputStat); + inputStatus); errs.add(msg); return false; } @@ -485,52 +501,56 @@ public class Everge { String strang = inp; if (verbosity >= 3) { - errStream.infof( + errorStream.infof( "[INFO] Processing replacements for string '%s' in mode %s\n", - strang, inputStat); + strang, inputStatus); if (!inp.equals(inp.trim())) { - errStream.infof("[INFO] String '%s' has trailing spaces on it\n", inp); + errorStream.infof("[INFO] String '%s' has trailing spaces on it\n", inp); } } strang = replSet.apply(inp); - outStream.print(strang); - if (printNL) - outStream.println(); + outputStream.print(strang); + if (printNLAfterReplace) outputStream.println(); } finally { argLock.readLock().unlock(); } } // Load arguments into the argument queue. - private void loadQueue(String... args) { + private Deque<String> loadQueue(String... args) { + Deque<String> argQueue = new ArrayDeque<>(args.length); + boolean doArgs = true; for (String arg : args) { if (arg.equals("--")) { doArgs = false; + continue; } - // Handle things like -nNv correctly if (doArgs) { if (arg.startsWith("-") && !arg.startsWith("--")) { + // Handle things like -nNv correctly char[] car = arg.substring(1).toCharArray(); if (verbosity >= 3) { - errStream.infof("[INFO] Adding stream of args: %s", car); + errorStream.infof("[INFO] Adding collection of single-char arguments: %s", car); } for (char c : car) { String argstr = String.format("-%c", c); - argQue.add(argstr); + argQueue.add(argstr); } } else { - argQue.add(arg); + argQueue.add(arg); } } else { - argQue.add(arg); + argQueue.add(arg); } } + + return argQueue; } } diff --git a/src/main/java/bjc/everge/IntHolder.java b/src/main/java/bjc/everge/IntHolder.java deleted file mode 100644 index 31c2578..0000000 --- a/src/main/java/bjc/everge/IntHolder.java +++ /dev/null @@ -1,72 +0,0 @@ -package bjc.everge; - -/** - * Utility class for ints by ref. - * - * @author Ben Culkin - */ -public class IntHolder { - /** - * The int value. - */ - public int val; - - /** - * Create a new int-holder set to 0. - */ - public IntHolder() { - val = 0; - } - - /** - * Create a new int-holder set to a value. - * - * @param i - * The value to set the int to. - */ - public IntHolder(int i) { - val = i; - } - - /** - * Increment the value by one, and return it. - * - * @return The value of the holder. - */ - public int incr() { - return incr(1); - } - - /** - * Increment the value by an amount and return it. - * - * @param i - * The amount to increment by. - * - * @return The value of the holder. - */ - public int incr(int i) { - val += 1; - - return val; - } - - /** - * Get the value. - * - * @return The value. - */ - public int get() { - return val; - } - - /** - * Set the value. - * - * @param i - * The value to set it to. - */ - public void set(int i) { - val = i; - } -} diff --git a/src/main/java/bjc/everge/LogStream.java b/src/main/java/bjc/everge/LogStream.java deleted file mode 100644 index fe37d21..0000000 --- a/src/main/java/bjc/everge/LogStream.java +++ /dev/null @@ -1,341 +0,0 @@ -package bjc.everge; - -import java.io.*; - -/** - * Simple class used for logging with various levels. - * - * @author Ben Culkin - */ -public class LogStream { - /** - * Log level for printing nothing. - */ - public static final int NOTHING = -1; - - /** - * Log level for printing only fatal errors. - */ - public static final int FATAL = 0; - - /** - * Log level for printing all errors. - */ - public static final int ERROR = 1; - - /** - * Log level for printing warnings. - */ - public static final int WARN = 2; - - /** - * Log level for printing info messages. - */ - public static final int INFO = 3; - - /** - * Log level for printing debug messages. - */ - public static final int DEBUG = 4; - - /** - * Log level for printing trace messages. - */ - public static final int TRACE = 5; - - private int verbosity; - - private PrintStream output; - - /** - * Create a new log stream. - * - * Defaults to printing only fatal errors. - * - * @param out - * The output stream to place things into. - */ - public LogStream(PrintStream out) { - output = out; - verbosity = FATAL; - } - - /** - * Create a new log stream. - * - * @param out - * The output stream to place things into. - * @param level - * The verbosity level. Use the constants in this class for the - * values. - */ - public LogStream(PrintStream out, int level) { - output = out; - verbosity = level; - } - - /** - * Create a new log stream. - * - * Defaults to printing only fatal errors. - * - * @param out - * The output stream to place things into. - */ - public LogStream(OutputStream out) { - output = new PrintStream(out); - verbosity = FATAL; - } - - /** - * Create a new log stream. - * - * @param out - * The output stream to place things into. - * @param level - * The verbosity level. Use the constants in this class for the - * values. - */ - public LogStream(OutputStream out, int level) { - output = new PrintStream(out); - verbosity = level; - } - - /** - * Get the verbosity of the stream. - * - * @return The verbosity of the stream. - */ - public int verbosity() { - return verbosity; - } - - /** - * Set the verbosity of the stream. - * - * @param verb - * The verbosity of the stream. - */ - public void verbosity(int verb) { - verbosity = verb; - } - - /** - * Increment the verbosity of the stream. - */ - public void louder() { - louder(1); - } - - /** - * Increase the verbosity of the stream by an amount. - * - * @param amt - * The amount to increase the verbosity by. - */ - public void louder(int amt) { - verbosity += amt; - } - - /** - * Decrement the verbosity of the stream. - */ - public void quieter() { - quieter(1); - } - - /** - * Decrease the verbosity of the stream by an amount. - * - * @param amt - * The amount to decrease the verbosity by. - */ - public void quieter(int amt) { - verbosity -= amt; - } - - /** - * Print a message that will always be visible. - * - * @param msg - * The message to print. - */ - public void print(String msg) { - output.print(msg); - } - - /** - * Print a formatted message that will always be visible. - * - * @param msg - * The format string for the message to print. - * - * @param args - * The arguments to the format string. - */ - public void printf(String msg, Object... args) { - output.printf(msg, args); - } - - /** - * Print a message at a given verbosity level. - * - * @param lvl - * The verbosity level. - * @param msg - * The message to print. - */ - public void message(int lvl, String msg) { - if (verbosity >= lvl) { - output.print(msg); - } - } - - /** - * Print a formatted message at a given verbosity level. - * - * @param lvl - * The verbosity level. - * @param msg - * The message to print. - * @param args - * The arguments to the message. - */ - public void messagef(int lvl, String msg, Object... args) { - if (verbosity >= lvl) { - output.printf(msg, args); - } - } - - /** - * Emit a fatal error message. - * - * @param msg - * The message to emit. - */ - public void fatal(String msg) { - message(FATAL, msg); - } - - /** - * Emit a formatted fatal error message. - * - * @param msg - * The message to emit. - * @param args - * The arguments to the message. - */ - public void fatalf(String msg, Object... args) { - messagef(FATAL, msg, args); - } - - /** - * Emit a normal error message. - * - * @param msg - * The message to emit. - */ - public void error(String msg) { - message(ERROR, msg); - } - - /** - * Emit a formatted normal error message. - * - * @param msg - * The message to emit. - * @param args - * The arguments to the message. - */ - public void errorf(String msg, Object... args) { - messagef(ERROR, msg, args); - } - - /** - * Emit a warning message. - * - * @param msg - * The message to emit. - */ - public void warn(String msg) { - message(WARN, msg); - } - - /** - * Emit a formatted warning message. - * - * @param msg - * The message to emit. - * @param args - * The arguments to the message. - */ - public void warnf(String msg, Object... args) { - messagef(WARN, msg, args); - } - - /** - * Emit an info message. - * - * @param msg - * The message to emit. - */ - public void info(String msg) { - message(INFO, msg); - } - - /** - * Emit a formatted info message. - * - * @param msg - * The message to emit. - * @param args - * The arguments to the message. - */ - public void infof(String msg, Object... args) { - messagef(INFO, msg, args); - } - - /** - * Emit a debug message. - * - * @param msg - * The message to emit. - */ - public void debug(String msg) { - message(DEBUG, msg); - } - - /** - * Emit a formatted debug message. - * - * @param msg - * The message to emit. - * @param args - * The arguments to the message. - */ - public void debugf(String msg, Object... args) { - messagef(DEBUG, msg, args); - } - - /** - * Emit a tracing message. - * - * @param msg - * The message to emit. - */ - public void trace(String msg) { - message(TRACE, msg); - } - - /** - * Emit a formatted tracing message. - * - * @param msg - * The message to emit. - * @param args - * The arguments to the message. - */ - public void tracef(String msg, Object... args) { - messagef(TRACE, msg, args); - } -} diff --git a/src/main/java/bjc/everge/MirrorOutputStream.java b/src/main/java/bjc/everge/MirrorOutputStream.java deleted file mode 100644 index bce4f0f..0000000 --- a/src/main/java/bjc/everge/MirrorOutputStream.java +++ /dev/null @@ -1,63 +0,0 @@ -package bjc.everge; - -import java.io.*; -import java.util.*; - -/** - * An output stream that mirrors its contents to other streams. - * - * @author Ben Culkin - * - */ -public class MirrorOutputStream extends OutputStream { - private List<OutputStream> streams; - - /** - * Create a new mirroring output stream. - * - * @param strams - * The output streams to mirror to. - */ - public MirrorOutputStream(OutputStream... strams) { - streams = new ArrayList<>(); - - for (OutputStream stram : strams) { - streams.add(stram); - } - } - - @Override - public void close() throws IOException { - for (OutputStream stream : streams) { - stream.close(); - } - } - - @Override - public void flush() throws IOException { - for (OutputStream stream : streams) { - stream.flush(); - } - } - - @Override - public void write(byte[] ba) throws IOException { - for (OutputStream stream : streams) { - stream.write(ba); - } - } - - @Override - public void write(byte[] ba, int off, int len) throws IOException { - for (OutputStream stream : streams) { - stream.write(ba, off, len); - } - } - - @Override - public void write(int b) throws IOException { - for (OutputStream stream : streams) { - stream.write(b); - } - } -} diff --git a/src/main/java/bjc/everge/ReplPair.java b/src/main/java/bjc/everge/ReplPair.java index 74addc7..6b21016 100644 --- a/src/main/java/bjc/everge/ReplPair.java +++ b/src/main/java/bjc/everge/ReplPair.java @@ -1,10 +1,6 @@ package bjc.everge; -import java.util.*; import java.util.function.*; -import java.util.regex.*; - -import bjc.everge.ControlledString.*; /** * String pairs for replacements. @@ -13,13 +9,13 @@ import bjc.everge.ControlledString.*; */ public class ReplPair implements Comparable<ReplPair>, UnaryOperator<String> { // Line number we read this pair from - private int lno; + int lineNumber; // Stage this pair is in - private int stage; + int stage; // Status of this pair with regards to doing staging stuff - private StageStatus stat = StageStatus.BOTH; + StageStatus status = StageStatus.BOTH; /** * The priority for this replacement. @@ -119,351 +115,6 @@ public class ReplPair implements Comparable<ReplPair>, UnaryOperator<String> { priority = p; } - /** - * Read a list of replacement pairs from an input source. - * - * @param scn - * The source to read the replacements from. - * @return The list of replacements. - */ - public static List<ReplPair> readList(Scanner scn) { - List<ReplPair> lst = new ArrayList<>(); - - return readList(lst, scn); - } - - /** - * Read a list of replacement pairs from an input source, adding them to an - * existing list. - * - * @param detals - * The list to add the replacements to. - * @param scn - * The source to read the replacements from. - * @return The list of replacements. - */ - public static List<ReplPair> readList(List<ReplPair> detals, Scanner scn) { - List<ReplError> errList = new ArrayList<>(); - - List<ReplPair> rplPar = readList(detals, scn, errList); - - if (errList.size() != 0) { - throw new BadReplParse("", errList); - } - - return rplPar; - } - - /** - * Read a list of replacement pairs from an input source, adding them to an - * existing list. - * - * @param detals - * The list to add the replacements to. - * @param scn - * The source to read the replacements from. - * @param errs - * The list to stick errors in. - * @return The list of replacements. - */ - public static List<ReplPair> readList(List<ReplPair> detals, Scanner scn, - List<ReplError> errs) { - return readList(detals, scn, errs, new ReplOpts()); - } - - /** - * Read a list of replacement pairs from an input source, adding them to an - * existing list. - * - * @param detals - * The list to add the replacements to. - * @param scn - * The source to read the replacements from. - * @param errs - * The list to stick errors in. - * @param ropts - * The options to use when reading the pairs. - * @return The list of replacements. - */ - public static List<ReplPair> readList(List<ReplPair> detals, Scanner scn, - List<ReplError> errs, ReplOpts ropts) { - IntHolder lno = new IntHolder(); - IntHolder pno = new IntHolder(); - - List<List<ReplPair>> stages = new ArrayList<>(); - stages.add(new ArrayList<ReplPair>()); - - // For every line in the source... - while (scn.hasNextLine()) { - String name = scn.nextLine().trim(); - lno.incr(); - - // If its commented or blank, skip it - if (name.equals("")) - continue; - if (name.startsWith("#")) - continue; - - // Global control. Process it. - if (name.startsWith("|//")) { - readGlobal(name, errs, ropts, lno, pno); - - continue; - } - - ReplPair rp = new ReplPair(); - - rp.priority = ropts.defPrior; - rp.stat = ropts.defStatus; - rp.lno = lno.get(); - rp.stage = ropts.defStage; - - boolean isMulti = ropts.defMulti; - - { - String tmpName = readName(name, scn, errs, rp, ropts, lno, pno); - if (tmpName == null) - continue; - name = tmpName; - } - - rp.find = name; - if (rp.name == null) - rp.name = name; - - // We started to process the pair, mark it as being - // started - pno.incr(); - String body = null; - - // Read in the next uncommented line - do { - if (!scn.hasNextLine()) - break; - - body = scn.nextLine().trim(); - lno.incr(); - } while (body.startsWith("#")); - - if (body == null) { - String msg = String.format( - "Ran out of input looking for replacement body for raw name '%s'", - name); - - errs.add(new ReplError(lno, pno, msg, null)); - break; - } - - isMulti = ropts.defMulti; - - ControlledString cs = getControls(body, errs, lno, pno, "body"); - // Body has attached controls, process them. - if (cs.hasControls()) { - for (Control cont : cs.controls) { - switch (cont.name) { - case "MULTITRUE": - case "MULTIT": - case "MT": - isMulti = true; - break; - case "MULTIFALSE": - case "MULTIF": - case "MF": - isMulti = false; - break; - case "MULTI": - case "M": - if (cont.count() != 1) { - String errMsg = String.format( - "Expected one multi flag (got %d)", cont.count()); - errs.add(new ReplError(lno, pno, errMsg, body)); - } else { - isMulti = Boolean.parseBoolean(cont.get(0)); - } - break; - default: { - String errMsg - = String.format("Invalid control name '%s'", cont.name); - errs.add(new ReplError(lno, pno, errMsg, body)); - } - break; - } - } - - body = cs.strang; - } - - if (isMulti) { - String tmp = readMultiLine(body, scn, ropts, "body", lno); - if (tmp == null) - continue; - body = tmp; - } - - rp.replace = body; - - List<ReplPair> stageList = null; - if (rp.stage == 0 || stages.size() < (rp.stage - 1)) { - stageList = stages.get(rp.stage); - - if (stageList == null) { - stageList = new ArrayList<>(); - - stages.add(rp.stage, stageList); - } - } else { - for (int i = stages.size(); i <= rp.stage; i++) { - stages.add(new ArrayList<>()); - } - - stageList = stages.get(rp.stage); - } - - if (ropts.isTrace) { - ropts.errStream.printf("\t[DEBUG] Stage %d: Added %s\n\t\tContents: %s\n", - rp.stage, rp, stageList); - } - - stageList.add(rp); - } - - // Special-case one-stage processing. - if (stages.size() == 1) { - if (ropts.isTrace) - ropts.errStream.printf("\t[DEBUG] Executing single-stage bypass\n"); - - for (ReplPair rp : stages.iterator().next()) { - if (rp.stat == StageStatus.INTERNAL) { - if (ropts.isTrace) - ropts.errStream.printf("\t[DEBUG] Excluding internal RP %s\n", - rp); - - continue; - } - - detals.add(rp); - } - - detals.sort(null); - - return detals; - } - - // Handle stages - List<ReplPair> tmpList = new ArrayList<>(); - tmpList.addAll(detals); - - if (ropts.isTrace) - ropts.errStream.printf("\t[DEBUG] Stages: %s\n", stages); - - int procStg = 0; - for (List<ReplPair> stageList : stages) { - procStg += 1; - List<ReplPair> curStage = new ArrayList<>(); - - if (ropts.isTrace) - ropts.errStream.printf("\t[DEBUG] Staging stage %d of %d: %s\n", procStg, - stageList.size(), stageList); - - for (ReplPair rp : stageList) { - // Process through every pair in the previous - // stages - for (ReplPair curPar : tmpList) { - String tmp = rp.replace.replaceAll(curPar.find, curPar.replace); - - if (ropts.isTrace && !rp.replace.equals(tmp)) { - ropts.errStream.printf("\t[DEBUG] Staged '%s' -> '%s'\t%s\n", - rp.replace, tmp, curPar); - } - - rp.replace = tmp; - } - - // If we're external; add straight to the output - if (rp.stat == StageStatus.EXTERNAL) { - if (ropts.isTrace) { - ropts.errStream.printf( - "\t[DEBUG] Skipped external for staging: %s\n", rp); - } - - detals.add(rp); - } else { - if (ropts.isTrace) { - ropts.errStream.printf( - "\t[DEBUG] Added to stage %d: %s\n\t\tContents: %s\n", - procStg, rp, curStage); - } - - curStage.add(rp); - } - } - - tmpList.addAll(curStage); - tmpList.sort(null); - } - - // Copy over to output, excluding internals - for (ReplPair rp : tmpList) { - if (rp.stat == StageStatus.INTERNAL) { - if (ropts.isTrace) - ropts.errStream.printf("\t[DEBUG] Excluded internal: %s\n", rp); - - continue; - } - - detals.add(rp); - } - - detals.sort(null); - - if (ropts.isTrace) { - ropts.errStream.printf("\t[DEBUG] Final output: %s\n", detals); - } - - return detals; - } - - private static String readMultiLine(String lead, Scanner src, ReplOpts ropts, - String typ, IntHolder lno) { - String tmp = lead; - - if (ropts.isTrace && tmp.endsWith("\\")) - ropts.errStream.printf("\t[TRACE] Starting multi-line parse for %s '%s'\n", - typ, tmp); - - boolean didMulti = tmp.endsWith("\\"); - while (tmp.endsWith("\\")) { - boolean incNL = tmp.endsWith("|\\"); - - if (!src.hasNextLine()) - break; - - String nxt = src.nextLine().trim(); - lno.incr(); - - if (nxt.startsWith("#")) - continue; - - String nlStr = incNL ? "\n" : ""; - - if (tmp.endsWith("\\")) { - if (incNL) { - tmp = tmp.substring(0, tmp.length() - 2); - } else { - tmp = tmp.substring(0, tmp.length() - 1); - } - } - - tmp = String.format("%s%s%s", tmp, nlStr, nxt); - } - - if (ropts.isTrace && didMulti) - ropts.errStream.printf("\t[TRACE] Finished multi-line parse for %s:\n%s\n.\n", - typ, tmp); - - return tmp; - } - @Override public String apply(String inp) { if (guard != null) { @@ -491,7 +142,7 @@ public class ReplPair implements Comparable<ReplPair>, UnaryOperator<String> { @Override public int compareTo(ReplPair rp) { if (this.priority == rp.priority) - return this.lno - rp.lno; + return this.lineNumber - rp.lineNumber; return rp.priority - this.priority; } @@ -538,347 +189,4 @@ public class ReplPair implements Comparable<ReplPair>, UnaryOperator<String> { return false; return true; } - - private static String readName(String nam, Scanner scn, List<ReplError> errs, - ReplPair rp, ReplOpts ropts, IntHolder lno, IntHolder pno) { - ControlledString cs = getControls(nam, errs, lno, pno, "name"); - - boolean isMulti = ropts.defMulti; - - String name = cs.strang; - - if (cs.hasControls()) { - for (Control cont : cs.controls) { - switch (cont.name) { - case "NAME": - case "N": - if (cont.count() != 1) { - String errMsg = String.format( - "One name argument was expected (got %d)", cont.count()); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } else { - rp.name = cont.get(0); - } - break; - case "GUARD": - case "G": - if (cont.count() != 1) { - String errMsg = String.format( - "One guard argument was expected (got %d)", cont.count()); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } else { - String pat = cont.get(0); - - try { - Pattern.compile(pat); - } catch (PatternSyntaxException psex) { - String errMsg = String.format( - "Guard argument '%s' is not a valid regex (%s)", pat, - psex.getMessage()); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } - - rp.guard = cont.get(0); - } - break; - case "PRIORITY": - case "PRIOR": - case "P": - try { - if (cont.count() != 1) { - String errMsg = String.format( - "One priority argument was expected (got %d", - cont.count()); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } else { - rp.priority = Integer.parseInt(cont.get(0)); - } - } catch (NumberFormatException nfex) { - String errMsg = String.format( - "'%s' is not a valid priority (must be an integer)", - cont.get(0)); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } - break; - case "STAGE": - case "S": - try { - if (cont.count() != 1) { - String errMsg = String.format( - "One stage argument was expected (got %d", - cont.count()); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } else { - int tmpStage = Integer.parseInt(cont.get(0)); - if (tmpStage < 0) { - String errMsg = String.format( - "'%s' is not a valid stage (must be a positive integer)", - cont.get(0)); - errs.add(new ReplError(lno, pno, errMsg, nam)); - - break; - } - rp.stage = tmpStage; - } - } catch (NumberFormatException nfex) { - String errMsg = String.format( - "'%s' is not a valid stage (must be a positive integer)", - cont.get(0)); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } - break; - case "MULTITRUE": - case "MULTIT": - case "MT": - isMulti = true; - break; - case "MULTIFALSE": - case "MULTIF": - case "MF": - isMulti = false; - break; - case "MULTI": - case "M": - if (cont.count() != 1) { - String errMsg = String.format( - "One multi-flag argument was expected (got %d", - cont.count()); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } else { - isMulti = Boolean.parseBoolean(cont.get(0)); - } - break; - case "INTERNAL": - case "INT": - case "I": - rp.stat = StageStatus.INTERNAL; - break; - case "EXTERNAL": - case "EXT": - case "E": - rp.stat = StageStatus.EXTERNAL; - break; - case "BOTH": - case "B": - rp.stat = StageStatus.BOTH; - break; - default: { - String errMsg = String.format( - "Unknown control name '%s' for name '%s'", cont.name, nam); - - ReplError erd = new ReplError(lno, pno, errMsg, nam); - - errs.add(erd); - } - break; - } - } - - name = cs.strang; - } - - // Multi-line name with a trailer - if (isMulti) { - String tmp = readMultiLine(name, scn, ropts, "name", lno); - if (tmp == null) - return null; - name = tmp; - } - - return name; - } - - private static void readGlobal(String nam, List<ReplError> errs, - ReplOpts ropts, IntHolder lno, IntHolder pno) { - ControlledString cs - = getControls(nam.substring(1), errs, lno, pno, "global"); - - for (Control cont : cs.controls) { - switch (cont.name) { - case "PRIORITY": - case "PRIOR": - case "P": - try { - if (cont.count() != 1) { - String errMsg = String.format( - "Must specify 1 priority (%d specified)", cont.count()); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } else { - int tmp = Integer.parseInt(cont.get(0)); - ropts.defPrior = tmp; - } - } catch (NumberFormatException nfex) { - String errMsg = String.format( - "'%s' is not a valid priority (must be an integer)", - cont.get(0)); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } - break; - case "STAGE": - case "S": - try { - if (cont.count() != 1) { - String errMsg = String.format( - "Must specify 1 stage (%d specified)", cont.count()); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } else { - int tmpStage = Integer.parseInt(cont.get(0)); - - if (tmpStage < 0) { - String errMsg = String.format( - "'%s' is not a valid stage (must be a positive integer)", - cont.get(0)); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - break; - } - - ropts.defStage = tmpStage; - } - } catch (NumberFormatException nfex) { - String errMsg = String.format( - "'%s' is not a valid stage (must be a positive integer)", - cont.get(0)); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } - break; - case "MULTITRUE": - case "MULTIT": - case "MT": - ropts.defMulti = true; - break; - case "MULTIFALSE": - case "MULTIF": - case "MF": - ropts.defMulti = false; - break; - case "MULTI": - case "M": - if (cont.count() != 1) { - String errMsg = String.format( - "Must specify 1 multi-flag (%d specified)", cont.count()); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } else { - ropts.defMulti = Boolean.parseBoolean(cont.get(0)); - } - break; - case "INTERNAL": - case "INT": - case "I": - ropts.defStatus = StageStatus.INTERNAL; - break; - case "EXTERNAL": - case "EXT": - case "E": - ropts.defStatus = StageStatus.EXTERNAL; - break; - case "BOTH": - case "B": - ropts.defStatus = StageStatus.BOTH; - break; - case "DEBUGTRUE": - case "DEBUGT": - case "DT": - ropts.isDebug = true; - break; - case "DEBUGFALSE": - case "DEBUGF": - case "DF": - ropts.isDebug = false; - break; - case "DEBUG": - case "D": - if (cont.count() != 1) { - String errMsg = String.format( - "Must specify 1 debug flag (%d specified)", cont.count()); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } else { - ropts.isDebug = Boolean.parseBoolean(cont.get(0)); - } - break; - case "TRACETRUE": - case "TRACET": - case "TT": - ropts.isTrace = true; - break; - case "TRACEFALSE": - case "TRACEF": - case "TF": - ropts.isTrace = false; - break; - case "TRACE": - case "T": - if (cont.count() != 1) { - String errMsg = String.format( - "Must specify 1 trace flag (%d specified)", cont.count()); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } else { - ropts.isTrace = Boolean.parseBoolean(cont.get(0)); - } - break; - case "PERFTRUE": - case "PERFT": - case "PRFT": - ropts.isPerf = true; - break; - case "PERFFALSE": - case "PERFF": - case "PRFF": - ropts.isPerf = false; - break; - case "PERF": - case "PRF": - if (cont.count() != 1) { - String errMsg = String.format( - "Must specify 1 perf. flag (%d specified)", cont.count()); - - errs.add(new ReplError(lno, pno, errMsg, nam)); - } else { - ropts.isPerf = Boolean.parseBoolean(cont.get(0)); - } - break; - default: { - String msg = String.format("Invalid global control name '%s'", cont.name); - ReplError err = new ReplError(lno, pno, msg, nam); - errs.add(err); - } - break; - } - - if (ropts.isTrace) - ropts.errStream.printf("\t[TRACE] Processed global control '%s'\n", cont); - } - - return; - } - - private static ControlledString getControls(String lne, List<ReplError> errs, - IntHolder lno, IntHolder pno, String type) { - try { - return ControlledString.parse(lne, new ParseStrings("//", ";", "/", "|")); - } catch (IllegalArgumentException iaex) { - String msg = "Did not find control terminator (//) in %s where it should be"; - msg = String.format(msg, type); - - ReplError re = new ReplError(lno, pno, msg, lne); - errs.add(re); - - return null; - } - } } diff --git a/src/main/java/bjc/everge/ReplError.java b/src/main/java/bjc/everge/ReplPairError.java index 27324ca..64edbd6 100644 --- a/src/main/java/bjc/everge/ReplError.java +++ b/src/main/java/bjc/everge/ReplPairError.java @@ -1,76 +1,78 @@ package bjc.everge; +import bjc.data.IntHolder; + /** * Represents an error encountered parsing ReplPairs * * @author Ben Culkin */ -public class ReplError { +public class ReplPairError { /** * The line the error occurred on. */ - public int line; + public int lineNumber; /** * The number of pairs we have processed so far. */ - public int numPairs; + public int numPairsSoFar; /** * The text of the line we errored on. */ - public String txt; + public String lineText; /** * The message of the error. */ - public String msg; + public String errorMessage; /** * Create a new ReplPair parse error. * - * @param lne + * @param lineNo * The line the error occured on. - * @param nPairs + * @param numPairsSoFar * The number of pairs processed up to this point. - * @param msg + * @param errorMessage * The message detailing the error. - * @param txt + * @param lineText * The text that caused the error. */ - public ReplError(IntHolder lne, IntHolder nPairs, String msg, String txt) { - this(lne.get(), nPairs.get(), msg, txt); + public ReplPairError(IntHolder lineNo, IntHolder numPairsSoFar, + String errorMessage, String lineText) { + this(lineNo.get(), numPairsSoFar.get(), errorMessage, lineText); } /** * Create a new ReplPair parse error. * - * @param lne + * @param lineNo * The line the error occured on. - * @param nPairs + * @param numPairsSoFar * The number of pairs processed up to this point. - * @param msg + * @param errorMessage * The message detailing the error. - * @param txt + * @param lineText * The text that caused the error. */ - public ReplError(int lne, int nPairs, String msg, String txt) { - line = lne; - numPairs = nPairs; + public ReplPairError(int lineNo, int numPairsSoFar, String errorMessage, + String lineText) { + this.lineNumber = lineNo; + this.numPairsSoFar = numPairsSoFar; - this.txt = txt; - this.msg = msg; + this.lineText = lineText; + this.errorMessage = errorMessage; } @Override public String toString() { String errString; - if (txt == null) - errString = "No associated line"; - else if (txt.equals("")) - errString = "Text of line was empty"; - else - errString = "Text of line was: " + txt; + if (lineText == null) errString = "No associated line"; + else if (lineText.equals("")) errString = "Text of line was empty"; + else errString = "Text of line was: " + lineText; - return String.format("line %d, pair %d:%s\n\t%s", line, numPairs, msg, errString); + return String.format("line %d, pair %d:%s\n\t%s", + lineNumber, numPairsSoFar, errorMessage, errString); } /** @@ -92,14 +94,12 @@ public class ReplError { */ public String toPrintString(String hdr) { String errString; - if (txt == null) - errString = "No associated line"; - else if (txt.equals("")) - errString = "Text of line was empty"; - else - errString = "Text of line was: " + txt; + + if (lineText == null) errString = "No associated line"; + else if (lineText.equals("")) errString = "Text of line was empty"; + else errString = "Text of line was: " + lineText; - return String.format("[ERROR] line %d, pair %d: %s\n%s\tContext: %s", line, - numPairs, msg, hdr, errString); + return String.format("[ERROR] line %d, pair %d: %s\n%s\tContext: %s", + lineNumber, numPairsSoFar, errorMessage, hdr, errString); } } diff --git a/src/main/java/bjc/everge/ReplOpts.java b/src/main/java/bjc/everge/ReplPairOptions.java index debb26e..2c4062f 100644 --- a/src/main/java/bjc/everge/ReplOpts.java +++ b/src/main/java/bjc/everge/ReplPairOptions.java @@ -7,26 +7,22 @@ import java.io.PrintStream; * * @author Ben Culkin. */ -public class ReplOpts { - /** - * The default priority. - */ - public int defPrior = 0; +public class ReplPairOptions { + /** The default priority. */ + public int defaultPriority = 0; - /** - * The default stage. - */ - public int defStage = 0; + /** The default stage. */ + public int defaultStage = 0; /** * Whether to process multi-line defns. */ - public boolean defMulti = false; + public boolean defaultMulti = false; /** * Default status. */ - public StageStatus defStatus = StageStatus.BOTH; + public StageStatus defaultStatus = StageStatus.BOTH; /** * Enable debug info. @@ -47,6 +43,7 @@ public class ReplOpts { * The stream to print normal output on. */ public PrintStream outStream = System.out; + /** * The stream to print error output on. */ @@ -56,10 +53,10 @@ public class ReplOpts { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + (defMulti ? 1231 : 1237); - result = prime * result + defPrior; - result = prime * result + defStage; - result = prime * result + ((defStatus == null) ? 0 : defStatus.hashCode()); + result = prime * result + (defaultMulti ? 1231 : 1237); + result = prime * result + defaultPriority; + result = prime * result + defaultStage; + result = prime * result + ((defaultStatus == null) ? 0 : defaultStatus.hashCode()); result = prime * result + (isDebug ? 1231 : 1237); result = prime * result + (isPerf ? 1231 : 1237); result = prime * result + (isTrace ? 1231 : 1237); @@ -74,14 +71,14 @@ public class ReplOpts { return false; if (getClass() != obj.getClass()) return false; - ReplOpts other = (ReplOpts) obj; - if (defMulti != other.defMulti) + ReplPairOptions other = (ReplPairOptions) obj; + if (defaultMulti != other.defaultMulti) return false; - if (defPrior != other.defPrior) + if (defaultPriority != other.defaultPriority) return false; - if (defStage != other.defStage) + if (defaultStage != other.defaultStage) return false; - if (defStatus != other.defStatus) + if (defaultStatus != other.defaultStatus) return false; if (isDebug != other.isDebug) return false; diff --git a/src/main/java/bjc/everge/ReplPairParser.java b/src/main/java/bjc/everge/ReplPairParser.java new file mode 100644 index 0000000..eb9971d --- /dev/null +++ b/src/main/java/bjc/everge/ReplPairParser.java @@ -0,0 +1,709 @@ +package bjc.everge; + +import java.util.*; +import java.util.regex.*; + +import bjc.data.*; +import bjc.everge.ControlledString.*; + +/** + * Parses instances of ReplPair. + * + * @author Ben Culkin + * + */ +public class ReplPairParser { + private static final ControlledStringParseOptions STANDARD_OPTIONS = + new ControlledStringParseOptions("//", ";", "/", "|"); + + /** + * Read a list of replacement pairs from an input source. + * + * @param scn + * The source to read the replacements from. + * @return The list of replacements. + */ + public List<ReplPair> readList(Scanner scn) { + List<ReplPair> lst = new ArrayList<>(); + + return readList(lst, scn); + } + + /** + * Read a list of replacement pairs from an input source, adding them to an + * existing list. + * + * @param detals + * The list to add the replacements to. + * @param scn + * The source to read the replacements from. + * @return The list of replacements. + */ + public List<ReplPair> readList(List<ReplPair> detals, Scanner scn) { + List<ReplPairError> errList = new ArrayList<>(); + + List<ReplPair> rplPar = readList(detals, scn, errList); + + if (errList.size() != 0) { + throw new BadReplParse("", errList); + } + + return rplPar; + } + + /** + * Read a list of replacement pairs from an input source, adding them to an + * existing list. + * + * @param detals + * The list to add the replacements to. + * @param scn + * The source to read the replacements from. + * @param errs + * The list to stick errors in. + * @return The list of replacements. + */ + public List<ReplPair> readList(List<ReplPair> detals, Scanner scn, + List<ReplPairError> errs) { + return readList(detals, scn, errs, new ReplPairOptions()); + } + + /** + * Read a list of replacement pairs from an input source, adding them to an + * existing list. + * + * @param detals + * The list to add the replacements to. + * @param scn + * The source to read the replacements from. + * @param errs + * The list to stick errors in. + * @param ropts + * The options to use when reading the pairs. + * @return The list of replacements. + */ + public List<ReplPair> readList(List<ReplPair> detals, Scanner scn, + List<ReplPairError> errs, ReplPairOptions ropts) { + IntHolder lineNumber = new IntHolder(); + IntHolder pairNumber = new IntHolder(); + + List<List<ReplPair>> stages = new ArrayList<>(); + stages.add(new ArrayList<ReplPair>()); + + // For every line in the source... + while (scn.hasNextLine()) { + String name = scn.nextLine().trim(); + lineNumber.incr(); + + // If its commented or blank, skip it + if (name.equals("")) continue; + if (name.startsWith("#")) continue; + + // Global control. Process it. + if (name.startsWith("|//")) { + readGlobal(name, errs, ropts, lineNumber, pairNumber); + + continue; + } + + // Process a ReplPair + ReplPair pair = new ReplPair(); + + pair.priority = ropts.defaultPriority; + pair.status = ropts.defaultStatus; + pair.lineNumber = lineNumber.get(); + pair.stage = ropts.defaultStage; + + boolean isMulti = ropts.defaultMulti; + + { + String tmpName = readName(name, scn, errs, pair, ropts, + lineNumber, pairNumber); + // Name was blank, move onto the next line + if (tmpName == null) continue; + name = tmpName; + } + + pair.find = name; + if (pair.name == null) pair.name = name; + + // We started to process the pair, mark it as being + // started + pairNumber.incr(); + String body = null; + + // Read in the next uncommented line + do { + if (!scn.hasNextLine()) break; + + body = scn.nextLine().trim(); + lineNumber.incr(); + } while (body.startsWith("#")); + + if (body == null) { + String msg = String.format( + "Ran out of input looking for replacement body for raw name '%s'", + name); + + errs.add(new ReplPairError(lineNumber, pairNumber, msg, null)); + break; + } + + isMulti = ropts.defaultMulti; + + ControlledString cs = getControls(body, errs, lineNumber, pairNumber, "body"); + if (cs.hasControls()) { + // Body has attached controls, process them. + for (Control cont : cs.controls) { + switch (cont.name) { + case "MULTITRUE": + case "MULTIT": + case "MT": + isMulti = true; + break; + case "MULTIFALSE": + case "MULTIF": + case "MF": + isMulti = false; + break; + case "MULTI": + case "M": + if (cont.count() != 1) { + String errMsg = String.format( + "Expected one multi flag (got %d)", + cont.count()); + + errs.add(new ReplPairError(lineNumber, pairNumber, errMsg, body)); + } else { + isMulti = Boolean.parseBoolean(cont.get(0)); + } + break; + default: { + String errMsg = String.format( + "Invalid control name '%s'", cont.name); + + errs.add(new ReplPairError(lineNumber, pairNumber, errMsg, body)); + } + break; + } + } + + body = cs.body; + } + + if (isMulti) { + String tmp = readMultiLine(body, scn, ropts, "body", lineNumber); + if (tmp == null) continue; + body = tmp; + } + + pair.replace = body; + + List<ReplPair> stageList = null; + if (pair.stage == 0 || stages.size() < (pair.stage - 1)) { + stageList = stages.get(pair.stage); + + if (stageList == null) { + stageList = new ArrayList<>(); + + stages.add(pair.stage, stageList); + } + } else { + for (int i = stages.size(); i <= pair.stage; i++) { + stages.add(new ArrayList<>()); + } + + stageList = stages.get(pair.stage); + } + + if (ropts.isTrace) { + ropts.errStream.printf( + "\t[DEBUG] Stage %d: Added %s\n\t\tContents: %s\n", + pair.stage, pair, stageList); + } + + stageList.add(pair); + } + + // Special-case one-stage processing. + if (stages.size() == 1) { + if (ropts.isTrace) ropts.errStream.printf( + "\t[DEBUG] Executing single-stage bypass\n"); + + for (ReplPair rp : stages.iterator().next()) { + if (rp.status == StageStatus.INTERNAL) { + if (ropts.isTrace) ropts.errStream.printf( + "\t[DEBUG] Excluding internal RP %s\n", rp); + + continue; + } + + detals.add(rp); + } + + detals.sort(null); + + return detals; + } + + // Handle stages + List<ReplPair> tmpList = new ArrayList<>(); + tmpList.addAll(detals); + + if (ropts.isTrace) ropts.errStream.printf("\t[DEBUG] Stages: %s\n", + stages); + + int procStg = 0; + for (List<ReplPair> stageList : stages) { + procStg += 1; + List<ReplPair> curStage = new ArrayList<>(); + + if (ropts.isTrace) ropts.errStream.printf( + "\t[DEBUG] Staging stage %d of %d: %s\n", procStg, + stageList.size(), stageList); + + for (ReplPair rp : stageList) { + // Process through every pair in the previous + // stages + for (ReplPair curPar : tmpList) { + String tmp = rp.replace.replaceAll(curPar.find, curPar.replace); + + if (ropts.isTrace && !rp.replace.equals(tmp)) { + ropts.errStream.printf( + "\t[DEBUG] Staged '%s' -> '%s'\t%s\n", + rp.replace, tmp, curPar); + } + + rp.replace = tmp; + } + + // If we're external; add straight to the output + if (rp.status == StageStatus.EXTERNAL) { + if (ropts.isTrace) { + ropts.errStream.printf( + "\t[DEBUG] Skipped external for staging: %s\n", rp); + } + + detals.add(rp); + } else { + if (ropts.isTrace) { + ropts.errStream.printf( + "\t[DEBUG] Added to stage %d: %s\n\t\tContents: %s\n", + procStg, rp, curStage); + } + + curStage.add(rp); + } + } + + tmpList.addAll(curStage); + tmpList.sort(null); + } + + // Copy over to output, excluding internals + for (ReplPair rp : tmpList) { + if (rp.status == StageStatus.INTERNAL) { + if (ropts.isTrace) + ropts.errStream.printf("\t[DEBUG] Excluded internal: %s\n", rp); + + continue; + } + + detals.add(rp); + } + + detals.sort(null); + + if (ropts.isTrace) { + ropts.errStream.printf("\t[DEBUG] Final output: %s\n", detals); + } + + return detals; + } + + private String readMultiLine(String lead, Scanner src, ReplPairOptions ropts, + String typ, IntHolder lno) { + String tmp = lead; + + if (ropts.isTrace && tmp.endsWith("\\")) + ropts.errStream.printf("\t[TRACE] Starting multi-line parse for %s '%s'\n", + typ, tmp); + + boolean didMulti = tmp.endsWith("\\"); + while (tmp.endsWith("\\")) { + boolean incNL = tmp.endsWith("|\\"); + + if (!src.hasNextLine()) + break; + + String nxt = src.nextLine().trim(); + lno.incr(); + + if (nxt.startsWith("#")) + continue; + + String nlStr = incNL ? "\n" : ""; + + if (tmp.endsWith("\\")) { + if (incNL) { + tmp = tmp.substring(0, tmp.length() - 2); + } else { + tmp = tmp.substring(0, tmp.length() - 1); + } + } + + tmp = String.format("%s%s%s", tmp, nlStr, nxt); + } + + if (ropts.isTrace && didMulti) + ropts.errStream.printf("\t[TRACE] Finished multi-line parse for %s:\n%s\n.\n", + typ, tmp); + + return tmp; + } + + private String readName(String nam, Scanner scn, List<ReplPairError> errs, + ReplPair rp, ReplPairOptions ropts, IntHolder lno, IntHolder pno) { + ControlledString cs = getControls(nam, errs, lno, pno, "name"); + + boolean isMulti = ropts.defaultMulti; + + String name = cs.body; + + if (cs.hasControls()) { + for (Control cont : cs.controls) { + switch (cont.name) { + case "NAME": + case "N": + if (cont.count() != 1) { + String errMsg = String.format( + "One name argument was expected (got %d)", cont.count()); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } else { + rp.name = cont.get(0); + } + break; + case "GUARD": + case "G": + if (cont.count() != 1) { + String errMsg = String.format( + "One guard argument was expected (got %d)", cont.count()); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } else { + String pat = cont.get(0); + + try { + Pattern.compile(pat); + } catch (PatternSyntaxException psex) { + String errMsg = String.format( + "Guard argument '%s' is not a valid regex (%s)", pat, + psex.getMessage()); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } + + rp.guard = cont.get(0); + } + break; + case "PRIORITY": + case "PRIOR": + case "P": + try { + if (cont.count() != 1) { + String errMsg = String.format( + "One priority argument was expected (got %d", + cont.count()); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } else { + rp.priority = Integer.parseInt(cont.get(0)); + } + } catch (NumberFormatException nfex) { + String errMsg = String.format( + "'%s' is not a valid priority (must be an integer)", + cont.get(0)); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } + break; + case "STAGE": + case "S": + try { + if (cont.count() != 1) { + String errMsg = String.format( + "One stage argument was expected (got %d", + cont.count()); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } else { + int tmpStage = Integer.parseInt(cont.get(0)); + if (tmpStage < 0) { + String errMsg = String.format( + "'%s' is not a valid stage (must be a positive integer)", + cont.get(0)); + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + + break; + } + rp.stage = tmpStage; + } + } catch (NumberFormatException nfex) { + String errMsg = String.format( + "'%s' is not a valid stage (must be a positive integer)", + cont.get(0)); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } + break; + case "MULTITRUE": + case "MULTIT": + case "MT": + isMulti = true; + break; + case "MULTIFALSE": + case "MULTIF": + case "MF": + isMulti = false; + break; + case "MULTI": + case "M": + if (cont.count() != 1) { + String errMsg = String.format( + "One multi-flag argument was expected (got %d", + cont.count()); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } else { + isMulti = Boolean.parseBoolean(cont.get(0)); + } + break; + case "INTERNAL": + case "INT": + case "I": + rp.status = StageStatus.INTERNAL; + break; + case "EXTERNAL": + case "EXT": + case "E": + rp.status = StageStatus.EXTERNAL; + break; + case "BOTH": + case "B": + rp.status = StageStatus.BOTH; + break; + default: { + String errMsg = String.format( + "Unknown control name '%s' for name '%s'", cont.name, nam); + + ReplPairError erd = new ReplPairError(lno, pno, errMsg, nam); + + errs.add(erd); + } + break; + } + } + + name = cs.body; + } + + // Multi-line name with a trailer + if (isMulti) { + String tmp = readMultiLine(name, scn, ropts, "name", lno); + + if (tmp == null) return null; + + name = tmp; + } + + return name; + } + + private void readGlobal(String nam, List<ReplPairError> errs, + ReplPairOptions ropts, IntHolder lno, IntHolder pno) { + ControlledString cs + = getControls(nam.substring(1), errs, lno, pno, "global"); + + for (Control cont : cs.controls) { + switch (cont.name) { + case "PRIORITY": + case "PRIOR": + case "P": + try { + if (cont.count() != 1) { + String errMsg = String.format( + "Must specify 1 priority (%d specified)", cont.count()); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } else { + int tmp = Integer.parseInt(cont.get(0)); + ropts.defaultPriority = tmp; + } + } catch (NumberFormatException nfex) { + String errMsg = String.format( + "'%s' is not a valid priority (must be an integer)", + cont.get(0)); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } + break; + case "STAGE": + case "S": + try { + if (cont.count() != 1) { + String errMsg = String.format( + "Must specify 1 stage (%d specified)", cont.count()); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } else { + int tmpStage = Integer.parseInt(cont.get(0)); + + if (tmpStage < 0) { + String errMsg = String.format( + "'%s' is not a valid stage (must be a positive integer)", + cont.get(0)); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + break; + } + + ropts.defaultStage = tmpStage; + } + } catch (NumberFormatException nfex) { + String errMsg = String.format( + "'%s' is not a valid stage (must be a positive integer)", + cont.get(0)); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } + break; + case "MULTITRUE": + case "MULTIT": + case "MT": + ropts.defaultMulti = true; + break; + case "MULTIFALSE": + case "MULTIF": + case "MF": + ropts.defaultMulti = false; + break; + case "MULTI": + case "M": + if (cont.count() != 1) { + String errMsg = String.format( + "Must specify 1 multi-flag (%d specified)", cont.count()); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } else { + ropts.defaultMulti = Boolean.parseBoolean(cont.get(0)); + } + break; + case "INTERNAL": + case "INT": + case "I": + ropts.defaultStatus = StageStatus.INTERNAL; + break; + case "EXTERNAL": + case "EXT": + case "E": + ropts.defaultStatus = StageStatus.EXTERNAL; + break; + case "BOTH": + case "B": + ropts.defaultStatus = StageStatus.BOTH; + break; + case "DEBUGTRUE": + case "DEBUGT": + case "DT": + ropts.isDebug = true; + break; + case "DEBUGFALSE": + case "DEBUGF": + case "DF": + ropts.isDebug = false; + break; + case "DEBUG": + case "D": + if (cont.count() != 1) { + String errMsg = String.format( + "Must specify 1 debug flag (%d specified)", cont.count()); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } else { + ropts.isDebug = Boolean.parseBoolean(cont.get(0)); + } + break; + case "TRACETRUE": + case "TRACET": + case "TT": + ropts.isTrace = true; + break; + case "TRACEFALSE": + case "TRACEF": + case "TF": + ropts.isTrace = false; + break; + case "TRACE": + case "T": + if (cont.count() != 1) { + String errMsg = String.format( + "Must specify 1 trace flag (%d specified)", cont.count()); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } else { + ropts.isTrace = Boolean.parseBoolean(cont.get(0)); + } + break; + case "PERFTRUE": + case "PERFT": + case "PRFT": + ropts.isPerf = true; + break; + case "PERFFALSE": + case "PERFF": + case "PRFF": + ropts.isPerf = false; + break; + case "PERF": + case "PRF": + if (cont.count() != 1) { + String errMsg = String.format( + "Must specify 1 perf. flag (%d specified)", cont.count()); + + errs.add(new ReplPairError(lno, pno, errMsg, nam)); + } else { + ropts.isPerf = Boolean.parseBoolean(cont.get(0)); + } + break; + default: { + String msg = String.format("Invalid global control name '%s'", cont.name); + ReplPairError err = new ReplPairError(lno, pno, msg, nam); + errs.add(err); + } + break; + } + + if (ropts.isTrace) + ropts.errStream.printf("\t[TRACE] Processed global control '%s'\n", cont); + } + + return; + } + + private ControlledString getControls(String lne, List<ReplPairError> errs, + IntHolder lno, IntHolder pno, String type) { + try { + return ControlledString.parse(lne, STANDARD_OPTIONS); + } catch (IllegalArgumentException iaex) { + String msg = "Did not find control terminator (//) in %s where it should be"; + msg = String.format(msg, type); + + ReplPairError re = new ReplPairError(lno, pno, msg, lne); + errs.add(re); + + return null; + } + } + +} diff --git a/src/main/java/bjc/everge/ReplSet.java b/src/main/java/bjc/everge/ReplPairSet.java index 0daa725..f10fe60 100644 --- a/src/main/java/bjc/everge/ReplSet.java +++ b/src/main/java/bjc/everge/ReplPairSet.java @@ -9,15 +9,15 @@ import java.util.*; * * @author Ben Culkin */ -public class ReplSet { +public class ReplPairSet { // The list of pairs - private List<ReplPair> parList; + private List<ReplPair> pairList; /** * Create a new blank set of pairs. */ - public ReplSet() { - parList = new ArrayList<>(); + public ReplPairSet() { + pairList = new ArrayList<>(); } /** @@ -26,28 +26,30 @@ public class ReplSet { * Changes to the list of pairs will carry across to the ReplSet, so be careful * about that. * - * @param lst + * @param list * The list of pairs to use. */ - public ReplSet(List<ReplPair> lst) { - parList = lst; + public ReplPairSet(List<ReplPair> list) { + pairList = list; } /** * Load a ReplSet from a file. * - * @param fName + * @param fileName * The file to load the ReplSet from. * @return A ReplSet, loaded from the file. * @throws IOException * if something goes badly reading it. */ - public static ReplSet fromFile(String fName) throws IOException { - ReplSet rs = new ReplSet(); + public static ReplPairSet fromFile(String fileName) throws IOException { + ReplPairSet rs = new ReplPairSet(); - try (FileInputStream fis = new FileInputStream(fName); + try (FileInputStream fis = new FileInputStream(fileName); Scanner scn = new Scanner(fis)) { - rs.parList = ReplPair.readList(scn); + ReplPairParser parser = new ReplPairParser(); + + rs.pairList = parser.readList(scn); } return rs; @@ -56,16 +58,14 @@ public class ReplSet { /** * Adds more pairs to the ReplSet. * - * @param pars + * @param pairs * The pairs to add to the ReplSet. */ - public void addPairs(List<ReplPair> pars) { - for (ReplPair par : pars) { - parList.add(par); - } + public void addPairs(List<ReplPair> pairs) { + for (ReplPair par : pairs) pairList.add(par); // Resort the pairs into priority order - parList.sort(null); + pairList.sort(null); } /** @@ -75,12 +75,10 @@ public class ReplSet { * The pairs to add to the ReplSet. */ public void addPairs(ReplPair... pars) { - for (ReplPair par : pars) { - parList.add(par); - } + for (ReplPair par : pars) pairList.add(par); // Resort the pairs into priority order - parList.sort(null); + pairList.sort(null); } /** @@ -94,11 +92,11 @@ public class ReplSet { public String apply(String val) { String ret = val; - for (ReplPair par : parList) { - System.err.printf("Applying pair '%s' to string '%s' (original was '%s')\n", par, ret, val); - String tmp = par.apply(ret); + for (ReplPair par : pairList) { + //System.err.printf("Applying pair '%s' to string '%s' (original was '%s')\n", par, ret, val); + String msg = par.apply(ret); - ret = tmp; + ret = msg; } return ret; diff --git a/src/test/java/bjc/everge/EvergeTest.java b/src/test/java/bjc/everge/EvergeTest.java index c99b15e..3f4e113 100644 --- a/src/test/java/bjc/everge/EvergeTest.java +++ b/src/test/java/bjc/everge/EvergeTest.java @@ -9,6 +9,8 @@ import static bjc.everge.TestUtils.*; import org.junit.Test; +import bjc.utils.ioutils.*; + /** * Unit tests for Everge front-end. * @@ -45,8 +47,8 @@ public class EvergeTest { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream errBaos = new ByteArrayOutputStream(); - OutputStream normOut = new MirrorOutputStream(baos, System.out); - OutputStream normErr = new MirrorOutputStream(errBaos, System.err); + OutputStream normOut = new MirrorOutputStream(baos/*, System.out*/); + OutputStream normErr = new MirrorOutputStream(errBaos/*, System.err*/); Everge evg = new Everge(); evg.setOutput(normOut); @@ -55,7 +57,7 @@ public class EvergeTest { evg.processArgs("--verbosity", "4"); List<String> errs = new ArrayList<>(); boolean stat = evg.processArgs(errs, "--input-status", "line", "--file", - "data/test/evg-test1.rp", "data/test/evg-test1.inp"); + "data/test/evg-test1.evg", "data/test/evg-test1.inp"); if (!stat) { System.err.println("[ERROR] Did not succesfully process args"); for (String err : errs) { diff --git a/src/test/java/bjc/everge/ReplPairTest.java b/src/test/java/bjc/everge/ReplPairTest.java index f88279b..650ee14 100644 --- a/src/test/java/bjc/everge/ReplPairTest.java +++ b/src/test/java/bjc/everge/ReplPairTest.java @@ -22,11 +22,13 @@ public class ReplPairTest { @Test public void testLoadFile() { List<ReplPair> lrp = null; - String fName = "data/test/test1-empty.rp"; + String fName = "data/test/test1-empty.evg"; try (FileInputStream fis = new FileInputStream(fName); Scanner scn = new Scanner(fis)) { - lrp = ReplPair.readList(scn); + ReplPairParser parser = new ReplPairParser(); + + lrp = parser.readList(scn); assertTrue(lrp.size() == 0); } catch (IOException ioex) { @@ -36,28 +38,28 @@ public class ReplPairTest { @Test public void testSingleReplace() { - assertMultiReplace("data/test/test2-singlereplace.rp", "test2", "test1", "test2", "test2"); + assertMultiReplace("data/test/test2-singlereplace.evg", "test2", "test1", "test2", "test2"); } @Test public void testMultiReplace() { - assertMultiReplace("data/test/test3-multireplace.rp", "A B C", "a b c", "A A B", "a a b", + assertMultiReplace("data/test/test3-multireplace.evg", "A B C", "a b c", "A A B", "a a b", "AAB", "aab"); } @Test public void testReplaceOrder() { - assertMultiReplace("data/test/test4-implicitorder.rp", "a", "a", "d", "ab"); + assertMultiReplace("data/test/test4-implicitorder.evg", "a", "a", "d", "ab"); } @Test public void testReplaceExpOrder() { - assertMultiReplace(false, "data/test/test5-explicitorder.rp", "a", "a", "aa", "ab"); + assertMultiReplace(false, "data/test/test5-explicitorder.evg", "a", "a", "aa", "ab"); } @Test public void testStaging() { - assertMultiReplace("data/test/test6-staging.rp", "c", "a", "y2", "x"); + assertMultiReplace("data/test/test6-staging.evg", "c", "a", "y2", "x"); } @Test @@ -67,7 +69,7 @@ public class ReplPairTest { + " replacement body for raw name 'a'" + "\n\t\tContext: No associated line"; - assertThrownMessage(msg, "data/test/test7-error.rp"); + assertThrownMessage(msg, "data/test/test7-error.evg"); } @Test @@ -83,19 +85,19 @@ public class ReplPairTest { @Test public void testGlobals() { - assertMultiReplace("data/test/test8-globals.rp", "b1d\n1d\n1b1", "acca"); + assertMultiReplace("data/test/test8-globals.evg", "b1d\n1d\n1b1", "acca"); } @Test public void testGuards() { - assertMultiReplace("data/test/test10-guard.rp", "a", "a", "bbb", "aaa"); + assertMultiReplace("data/test/test10-guard.evg", "a", "a", "bbb", "aaa"); } @Test public void testMultiControl() { - assertMultiReplace("data/test/test11-bodyinlinemulti.rp", "bc", "a", "z\na", "d", "m", "po"); + assertMultiReplace("data/test/test11-bodyinlinemulti.evg", "bc", "a", "z\na", "d", "m", "po"); // NOTE Uncomment when :EndingSlash is fixed - //assertMultiReplace("data/test/test11.rp", "q\\", "FG"); + //assertMultiReplace("data/test/test11-bodyinlinemulti.evg", "q\\", "FG"); } } diff --git a/src/test/java/bjc/everge/TestUtils.java b/src/test/java/bjc/everge/TestUtils.java index f3898c7..80d009c 100644 --- a/src/test/java/bjc/everge/TestUtils.java +++ b/src/test/java/bjc/everge/TestUtils.java @@ -1,7 +1,7 @@ package bjc.everge; import bjc.everge.ControlledString.Control; -import bjc.everge.ControlledString.ParseStrings; +import bjc.everge.ControlledString.ControlledStringParseOptions; import java.io.FileInputStream; @@ -25,7 +25,8 @@ public class TestUtils { public static void assertThrownMessage(boolean logMsg, String msg, String fle) { try (FileInputStream fis = new FileInputStream(fle); Scanner scn = new Scanner(fis)) { - ReplPair.readList(new ArrayList<>(), scn); + ReplPairParser parser = new ReplPairParser(); + parser.readList(new ArrayList<>(), scn); assertTrue(false); } catch (BadReplParse rpex) { @@ -62,7 +63,8 @@ public class TestUtils { try (FileInputStream fis = new FileInputStream(fle); Scanner scn = new Scanner(fis)) { - lrp = ReplPair.readList(scn); + ReplPairParser parser = new ReplPairParser(); + lrp = parser.readList(scn); } catch (BadReplParse rpex) { System.err.println(rpex.toPrintString()); @@ -156,13 +158,13 @@ public class TestUtils { public static void assertIsControl(boolean doLog, String inp, String strang, Control... args) { ControlledString cs - = ControlledString.parse(inp, new ParseStrings("//", ";", "/", "|")); + = ControlledString.parse(inp, new ControlledStringParseOptions("//", ";", "/", "|")); if (doLog) { System.err.printf("[LOG] CS: %s\n", cs); } - assertEquals(strang, cs.strang); + assertEquals(strang, cs.body); assertEquals("array length mismatch:", args.length, cs.count()); |
