SAFE Logo
CodeMatch Detailed Report
Version: 5.6.0 | Date: 06/18/12 | Time: 19:09:04

SCORE

SETTINGS
Compare file 1: C:\Users\Evan\Desktop\Java2SE5.0\src\com\sun\jmx\snmp\IPAcl\TokenMgrError.java
To file 2: C:\Users\Evan\Desktop\Android2.2Froyo\org\apache\james\mime4j\field\address\parser\TokenMgrError.java
Links to results: Matching Statements
Matching Comments and Strings
Matching Instruction Sequences
Matching Identifiers
Partially Matching Identifiers
Score
RESULTS
Matching Statements
File1 Line# File2 Line# Statement
1119public class TokenMgrError extends Error
2028static final int LEXICAL_ERROR = 0
2533static final int STATIC_LEXER_ERROR = 1
3038static final int INVALID_LEXICAL_STATE = 2
3543static final int LOOP_DETECTED = 3
4149int errorCode
4755protected static final String addEscapes(String str) {
4856StringBuffer retval = new StringBuffer()
4957char ch
5058for (int i = 0
5058i < str.length()
5058i++) {
5159switch (str.charAt(i))
5361case 0 :
56
59
62
65
68
71
74
77
64
67
70
73
76
79
82
85
retval.append( )
8088if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
8189String s = + Integer.toString(ch, 16)
8290retval.append( + s.substring(s.length() - 4, s.length()))
8492retval.append(ch)
8997return retval.toString()
106114errorLine + +
107115errorColumn + +
108116(EOFSeen ? : ( + addEscapes(String.valueOf(curChar)) + ) + + (int)curChar + ) +
109117+ addEscapes(errorAfter) + )
121129public String getMessage() {
122130return super.getMessage()
129137public TokenMgrError() {
132140public TokenMgrError(String message, int reason) {
133141super(message)
134142errorCode = reason
137145public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
138146this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason)

to top

Matching Comments and Strings
File1 Line# File2 Line# Comment/String
1422* Ordinals for various reasons why an Error of this type can be thrown.
1826* Lexical error occured.
2331* An attempt wass made to create a second instance of a static token manager.
2836* Tried to change to an invalid lexical state.
3341* Detected (and bailed out of) an infinite loop in the token manager.
3846* Indicates the reason why the exception is thrown. It will have
3947* one of the above 4 values.
4452* Replaces unprintable characters by their espaced (or unicode escaped)
4553* equivalents in the given string
5664\\b
5967\\t
6270\\n
6573\\f
6876\\r
7179\\\"
7482\\\'
7785\\\\
81890000
8290\\u
93101* Returns a detailed message for the Error when it is thrown by the
94102* token manager to indicate a lexical error.
95103* Parameters :
96104* EOFSeen : indicates if EOF caused the lexicl error
97105* curLexState : lexical state in which this error occured
98106* errorLine : line number when the error occured
99107* errorColumn : column number when the error occured
100108* errorAfter : prefix that was seen before this error occured
101109* curchar : the offending character
102110* Note: You can customize the lexical error message by modifying this method.
105113Lexical error at line
106114, column
107115. Encountered:
108116<EOF>
109117after : \"
113121* You can also modify the body of this method to customize your error messages.
114122* For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
115123* of end-users concern, so you can return something like :
117125* "Internal Error : Please file a bug report .... "
119127* from this method for such cases in the release version of your parser.
126134* Constructors of various flavors follow.

to top

Matching Instruction Sequences
File1 Line# File2 Line# Number of matching instructions
9 17 48
54 65 22
54 68 19
54 71 16
54 74 13
54 77 10
57 62 22
60 62 19
63 62 16
66 62 13
69 62 10
105 113 13

to top

Matching Identifiers
0x20 0x7e 16 addEscapes append ch charAt curChar
EOFSeen Error errorAfter errorCode errorColumn errorLine getMessage INVALID_LEXICAL_STATE
length LEXICAL_ERROR LexicalError lexState LOOP_DETECTED message reason retval
STATIC_LEXER_ERROR str StringBuffer substring TokenMgrError toString valueOf

to top

Partially Matching Identifiers
*** NONE ***
to the top
SCORE 85

CodeSuite copyright 2003-2012 by Software Analysis and Forensic Engineering Corporation