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)
- * CASE_INSENSITIVE flag. If CASE_INSENSITIVE
* is not set, then this flag has no effect.
* COMMENTS (0x0004)
@@ -242,7 +242,7 @@
* CANON_EQ (0x0080)
- *