Index: src/test/java/org/apache/harmony/tests/java/util/regex/PatternTest.java =================================================================== --- src/test/java/org/apache/harmony/tests/java/util/regex/PatternTest.java (revision 487569) +++ src/test/java/org/apache/harmony/tests/java/util/regex/PatternTest.java (working copy) @@ -330,21 +330,21 @@ String pattern = "b)a"; try { Pattern.compile(pattern); - fail("Expected a PatternSyntacException when compiling pattern: " + pattern); + fail("Expected a PatternSyntaxException when compiling pattern: " + pattern); } catch (PatternSyntaxException e) { // pass } pattern = "bcde)a"; try { Pattern.compile(pattern); - fail("Expected a PatternSyntacException when compiling pattern: " + pattern); + fail("Expected a PatternSyntaxException when compiling pattern: " + pattern); } catch (PatternSyntaxException e) { // pass } pattern = "bbg())a"; try { Pattern pat = Pattern.compile(pattern); - fail("Expected a PatternSyntacException when compiling pattern: " + pattern); + fail("Expected a PatternSyntaxException when compiling pattern: " + pattern); } catch (PatternSyntaxException e) { // pass } @@ -352,7 +352,7 @@ pattern = "cdb(?i))a"; try { Pattern pat = Pattern.compile(pattern); - fail("Expected a PatternSyntacException when compiling pattern: " + pattern); + fail("Expected a PatternSyntaxException when compiling pattern: " + pattern); } catch (PatternSyntaxException e) { // pass } @@ -793,7 +793,7 @@ pat = Pattern.compile("(?>aa|a)aabb"); assertFalse(pat.matcher("aaabb").matches()); - // quantifiers over look aheads + // quantifiers over look ahead pat = Pattern.compile(".*(?<=abc)*\\.log$"); assertTrue(pat.matcher("cde.log").matches()); pat = Pattern.compile(".*(?<=abc)+\\.log$"); Index: src/main/java/java/util/regex/BackReferencedSingleSet.java =================================================================== --- src/main/java/java/util/regex/BackReferencedSingleSet.java (revision 487569) +++ src/main/java/java/util/regex/BackReferencedSingleSet.java (working copy) @@ -43,7 +43,7 @@ * * To fix this problem we replace backreferenced groups with instances of * this class, which will use matches instead of find; this will affect - * perfomance, but ensure correctness of the match. + * performance, but ensure correctness of the match. */ public BackReferencedSingleSet(AbstractSet child, FSet fSet) { Index: src/main/java/java/util/regex/EmptySet.java =================================================================== --- src/main/java/java/util/regex/EmptySet.java (revision 487569) +++ src/main/java/java/util/regex/EmptySet.java (working copy) @@ -22,7 +22,7 @@ package java.util.regex; /** - * Valid constatnt zero character match. + * Valid constant zero character match. * * @author Nikolay A. Kuznetsov * @version $Revision: 1.4.2.2 $ Index: src/main/java/java/util/regex/MatchResultImpl.java =================================================================== --- src/main/java/java/util/regex/MatchResultImpl.java (revision 487569) +++ src/main/java/java/util/regex/MatchResultImpl.java (working copy) @@ -26,7 +26,7 @@ import org.apache.harmony.regex.internal.nls.Messages; /** - * Match result implementaion + * Match result implementation * Note: probably it might make sense to combine this class with Matcher. * * @author Nikolay A. Kuznetsov Index: src/main/java/java/util/regex/Lexer.java =================================================================== --- src/main/java/java/util/regex/Lexer.java (revision 487569) +++ src/main/java/java/util/regex/Lexer.java (working copy) @@ -493,7 +493,7 @@ /** * Moves pointer one position right; save current character to lookBack; - * lookAhead to current one and finaly read one more to lookAhead; + * lookAhead to current one and finally read one more to lookAhead; */ private void movePointer() { // swap pointers @@ -505,7 +505,7 @@ boolean reread; do { reread = false; - // read next character analize it and construct token: + // read next character analyze it and construct token: // // lookAhead = (index < pattern.length) ? nextCodePoint() : 0; @@ -762,7 +762,7 @@ */ if (lookAhead >= 256) { - //Erase auxiliaury bit + //Erase auxiliary bit lookAhead = (lookAhead & 0xff); flags = lookAhead; lookAhead = lookAhead << 16; @@ -1264,7 +1264,7 @@ if (Character.isHighSurrogate(high)) { - //low and high char may be delimetered by spaces + //low and high char may be delimited by spaces int lowExpectedIndex = prevNW + 1; if (lowExpectedIndex < pattern.length) { Index: src/main/java/java/util/regex/PosAltGroupQuantifierSet.java =================================================================== --- src/main/java/java/util/regex/PosAltGroupQuantifierSet.java (revision 487569) +++ src/main/java/java/util/regex/PosAltGroupQuantifierSet.java (working copy) @@ -23,7 +23,7 @@ /** * Possessive quantifier over group, see java.util.regex.GroupQuantifierSet - * for more dertails. + * for more details. * * @author Nikolay A. Kuznetsov * @version $Revision: 1.7.2.2 $ Index: src/main/java/java/util/regex/SequenceSet.java =================================================================== --- src/main/java/java/util/regex/SequenceSet.java (revision 487569) +++ src/main/java/java/util/regex/SequenceSet.java (working copy) @@ -22,9 +22,9 @@ package java.util.regex; /** - * This class represents nodes constructed with character sequenses. For + * This class represents nodes constructed with character sequences. For * example, lets consider regular expression: ".*word.*". During regular - * expression compilation phase character sequense w-o-r-d, will be represented + * expression compilation phase character sequence w-o-r-d, will be represented * with single node for the entire word. * * During the match phase, Moyer-Moore algorithm will be used for fast @@ -99,7 +99,7 @@ } public String getName() { - return "secuence: " + string; //$NON-NLS-1$ + return "sequence: " + string; //$NON-NLS-1$ } public boolean first(AbstractSet set) { Index: src/main/java/java/util/regex/UCISequenceSet.java =================================================================== --- src/main/java/java/util/regex/UCISequenceSet.java (revision 487569) +++ src/main/java/java/util/regex/UCISequenceSet.java (working copy) @@ -54,6 +54,6 @@ } public String getName() { - return "UCI secuence: " + string; //$NON-NLS-1$ + return "UCI sequence: " + string; //$NON-NLS-1$ } } Index: src/main/java/java/util/regex/DotQuantifierSet.java =================================================================== --- src/main/java/java/util/regex/DotQuantifierSet.java (revision 487569) +++ src/main/java/java/util/regex/DotQuantifierSet.java (working copy) @@ -66,11 +66,11 @@ // we don't skip line terminators here, but return zero match instead // // - // 2. find first occurance of the searched pattern + // 2. find first occurrence of the searched pattern // // int res = next.find(stringIndex, testString, matchResult); - // 3. Check if we have other occurances till the end of line + // 3. Check if we have other occurrences till the end of line // (because .* is greedy and we need last one) // // if (res >= 0) { Index: src/main/java/java/util/regex/CompositeRangeSet.java =================================================================== --- src/main/java/java/util/regex/CompositeRangeSet.java (revision 487569) +++ src/main/java/java/util/regex/CompositeRangeSet.java (working copy) @@ -86,7 +86,7 @@ * characters into two ranges: the first consisting of these surrogate * characters and the second consisting of all others characters * from the parent range. - * This class represents the parent range splitted in such a manner. + * This class represents the parent range split in such a manner. */ class CompositeRangeSet extends JointSet { Index: src/main/java/java/util/regex/CharClass.java =================================================================== --- src/main/java/java/util/regex/CharClass.java (revision 487569) +++ src/main/java/java/util/regex/CharClass.java (working copy) @@ -65,7 +65,7 @@ /* * We can use this method safely even if nonBitSet != null - * due to specific of range constrcutions in regular expressions. + * due to specific of range constructions in regular expressions. */ public CharClass add(int ch) { if (ci) { @@ -103,7 +103,7 @@ } /* - * The difference between add(AbstarctCharClass) and union(AbstractCharClass) + * The difference between add(AbstractCharClass) and union(AbstractCharClass) * is that add() is used for constructions like "[^abc\\d]" * (this pattern doesn't match "1") * while union is used for constructions like "[^abc[\\d]]" Index: src/main/java/java/util/regex/WordBoundary.java =================================================================== --- src/main/java/java/util/regex/WordBoundary.java (revision 487569) +++ src/main/java/java/util/regex/WordBoundary.java (working copy) @@ -23,7 +23,7 @@ /** * Represents word boundary, checks current character and previous one if - * differet types returns true; + * different types returns true; * * @author Nikolay A. Kuznetsov * @version $Revision: 1.3.2.2 $ Index: src/main/java/java/util/regex/GroupQuantifierSet.java =================================================================== --- src/main/java/java/util/regex/GroupQuantifierSet.java (revision 487569) +++ src/main/java/java/util/regex/GroupQuantifierSet.java (working copy) @@ -22,7 +22,7 @@ package java.util.regex; /** - * Default quantifier over groups, in fact this type of quantifiier is + * Default quantifier over groups, in fact this type of quantifier is * generally used for constructions we cant identify number of characters they * consume. * Index: src/main/java/java/util/regex/Quantifier.java =================================================================== --- src/main/java/java/util/regex/Quantifier.java (revision 487569) +++ src/main/java/java/util/regex/Quantifier.java (working copy) @@ -23,7 +23,7 @@ /** * Represents RE quantifier; contains two fields responsible for min and max - * number of repetitions. Negative value for maximum bumber of repetition + * number of repetitions. Negative value for maximum number of repetition * represents infinity(i.e. +,*) * * @author Nikolay A. Kuznetsov Index: src/main/java/java/util/regex/Pattern.java =================================================================== --- src/main/java/java/util/regex/Pattern.java (revision 487569) +++ src/main/java/java/util/regex/Pattern.java (working copy) @@ -220,7 +220,7 @@ * than ASCII, then the UNICODE_CASE must also be set to enable Unicode case * detection. *
UNICODE_CASE (0x0040) - *
Enables Unicode case folding if used in conjuntion with the + *
Enables Unicode case folding if used in conjunction with the * CASE_INSENSITIVE flag. If CASE_INSENSITIVE * is not set, then this flag has no effect. *
COMMENTS (0x0004) @@ -242,7 +242,7 @@ *
Enables the DOT (".") character in regular expressions to match line * terminators. By default, line terminators are not matched by DOT. *
CANON_EQ (0x0080) - *
Enables matching of character sequences which are cacnonically + *
Enables matching of character sequences which are canonically * equivalent according to the Unicode standard. Canonical equivalence is * described here: http://www.unicode.org/reports/tr15/. By default, * canonical equivalence is not detected while matching. @@ -1007,7 +1007,7 @@ } /** - * proceess [...] ranges + * process [...] ranges */ private CharClass processRangeExpression(boolean alt) { CharClass res = new CharClass(alt, hasFlag(Pattern.CASE_INSENSITIVE), @@ -1335,7 +1335,7 @@ } /** - * Dismiss public costructor. + * Dismiss public constructor. * */ private Pattern() { Index: src/main/java/java/util/regex/PosPlusGroupQuantifierSet.java =================================================================== --- src/main/java/java/util/regex/PosPlusGroupQuantifierSet.java (revision 487569) +++ src/main/java/java/util/regex/PosPlusGroupQuantifierSet.java (working copy) @@ -22,7 +22,7 @@ package java.util.regex; /** - * Posessive + quantifier node over groups. + * Possessive + quantifier node over groups. * * @author Nikolay A. Kuznetsov * @version $Revision: 1.7.2.2 $ Index: src/main/java/java/util/regex/AtomicJointSet.java =================================================================== --- src/main/java/java/util/regex/AtomicJointSet.java (revision 487569) +++ src/main/java/java/util/regex/AtomicJointSet.java (working copy) @@ -25,7 +25,7 @@ /** * This class represent atomic group (?>X), once X matches, - * this match become unchangable till the end of the match. + * this match become unchangeable till the end of the match. * * @author Nikolay A. Kuznetsov * @version $Revision: 1.4.2.2 $ Index: src/main/java/java/util/regex/DecomposedCharSet.java =================================================================== --- src/main/java/java/util/regex/DecomposedCharSet.java (revision 487569) +++ src/main/java/java/util/regex/DecomposedCharSet.java (working copy) @@ -214,7 +214,7 @@ * * @param strIndex - index to read codepoint at * @param testString - input - * @param matchResult - auxilary object + * @param matchResult - auxiliary object * @return codepoint at given strIndex at testString and */ public int codePointAt(int strIndex, CharSequence testString, Index: src/main/java/java/util/regex/UCIRangeSet.java =================================================================== --- src/main/java/java/util/regex/UCIRangeSet.java (revision 487569) +++ src/main/java/java/util/regex/UCIRangeSet.java (working copy) @@ -23,7 +23,7 @@ /** * Represents node accepting single character from the given char class. Note, - * this class contains normalaized characters fo unicode case, asci case is + * this class contains normalized characters fo unicode case, asci case is * supported through adding both symbols to the range. * * @author Nikolay A. Kuznetsov Index: src/main/java/java/util/regex/AbstractSet.java =================================================================== --- src/main/java/java/util/regex/AbstractSet.java (revision 487569) +++ src/main/java/java/util/regex/AbstractSet.java (working copy) @@ -62,7 +62,7 @@ } /** - * Checks if this node matches in given position and requrcively call + * Checks if this node matches in given position and recursively call * next node matches on positive self match. Returns positive integer if * entire match succeed, negative otherwise * @param stringIndex - string index to start from; @@ -183,11 +183,11 @@ /** * Returns true if the given node intersects with this one, * false otherwise. - * This method is bieng used for quantifiers construction, + * This method is being used for quantifiers construction, * lets consider the following regular expression (a|b)*ccc. * * (a|b) does not intersects with "ccc" and thus can be quantified - * greedly (w/o kickbacks), like *+ instead of *. + * greedily (w/o kickbacks), like *+ instead of *. * * @param set - usually previous node * Index: src/main/java/java/util/regex/AbstractCharClass.java =================================================================== --- src/main/java/java/util/regex/AbstractCharClass.java (revision 487569) +++ src/main/java/java/util/regex/AbstractCharClass.java (working copy) @@ -306,7 +306,7 @@ static class LazyGraph extends LazyAlnum { protected AbstractCharClass computeValue() { - /* plus punctiation */ + /* plus punctuation */ return ((CharClass) super.computeValue()).add(0x21, 0x40).add(0x5B, 0x60).add(0x7B, 0x7E); }