You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2022/10/29 06:28:29 UTC

[groovy] branch GROOVY_4_0_X updated (1e7573ef14 -> 0448ffad9c)

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a change to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


    from 1e7573ef14 Ignore Vscode & Fleet folders
     new 2ac434ccd7 Fix minor typos in documentations in spec/doc
     new b2d5a078f6 Polish org.apache.groovy package documentation
     new 2ca6b35b28 Polish org.codehaus.groovy package documentation
     new 524ef1f846 Fix minor typos in subprojects javadoc and comments
     new 3a9862c4af Polish org.codehaus.groovy.runtime package documentation
     new 5f141b5dbf fix broken test
     new 660343cad4 fix typos
     new 0448ffad9c fix typo

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 benchmark/bench.groovy                             |   4 +-
 .../org/codehaus/groovy/tools/GrapeMain.groovy     |   2 +-
 .../apache/groovy/ast/tools/ClassNodeUtils.java    |   8 +-
 .../groovy/ast/tools/ImmutablePropertyUtils.java   |   2 +-
 .../internal/metaclass/MetaClassConstant.java      |   2 +-
 .../apache/groovy/parser/antlr4/AstBuilder.java    |   6 +-
 .../apache/groovy/plugin/GroovyRunnerRegistry.java |   2 +-
 .../java/org/apache/groovy/util/SystemUtil.java    |   2 +-
 .../groovy/util/concurrent/LazyInitializable.java  |   2 +-
 .../ConcurrentLinkedHashMap.java                   |  10 +-
 .../concurrentlinkedhashmap/LinkedDeque.java       |   2 +-
 .../concurrentlinkedhashmap/Weighers.java          |   6 +-
 .../java/org/codehaus/groovy/GroovyBugError.java   |   2 +-
 .../codehaus/groovy/control/ClassNodeResolver.java |   4 +-
 .../codehaus/groovy/control/CompilationUnit.java   |   4 +-
 .../org/codehaus/groovy/control/CompilePhase.java  |   4 +-
 .../groovy/control/ConfigurationException.java     |   2 +-
 .../codehaus/groovy/control/ErrorCollector.java    |   2 +-
 .../codehaus/groovy/control/GenericsVisitor.java   |   2 +-
 .../groovy/control/InstanceOfVerifier.java         |   2 +-
 .../codehaus/groovy/control/ResolveVisitor.java    |   8 +-
 .../codehaus/groovy/control/StaticVerifier.java    |   2 +-
 .../control/customizers/ImportCustomizer.java      |   2 +-
 .../customizers/builder/PostCompletionFactory.java |   2 +-
 .../groovy/control/io/AbstractReaderSource.java    |   4 +-
 .../groovy/control/io/InputStreamReaderSource.java |   2 +-
 .../org/codehaus/groovy/control/io/NullWriter.java |   2 +-
 .../codehaus/groovy/control/io/ReaderSource.java   |   2 +-
 .../org/codehaus/groovy/reflection/ClassInfo.java  |   4 +-
 .../codehaus/groovy/reflection/ParameterTypes.java |   8 +-
 .../groovy/reflection/ReflectionUtils.java         |   2 +-
 .../reflection/v7/GroovyClassValueJava7.java       |   2 +-
 .../codehaus/groovy/runtime/ConversionHandler.java |   2 +-
 .../groovy/runtime/DefaultGroovyMethods.java       | 106 ++++++++--------
 .../groovy/runtime/EncodingGroovyMethods.java      |   8 +-
 .../org/codehaus/groovy/runtime/FormatHelper.java  |   2 +-
 .../org/codehaus/groovy/runtime/GStringImpl.java   |   2 +-
 .../codehaus/groovy/runtime/HandleMetaClass.java   |   4 +-
 .../codehaus/groovy/runtime/IOGroovyMethods.java   |   2 +-
 .../org/codehaus/groovy/runtime/InvokerHelper.java |   4 +-
 .../codehaus/groovy/runtime/MetaClassHelper.java   |  26 ++--
 .../org/codehaus/groovy/runtime/MethodKey.java     |   6 +-
 .../codehaus/groovy/runtime/MethodRankHelper.java  |  32 +++--
 .../org/codehaus/groovy/runtime/NullObject.java    |   4 +-
 .../groovy/runtime/ProxyGeneratorAdapter.java      |   2 +-
 .../groovy/runtime/ResourceGroovyMethods.java      |  28 ++---
 .../groovy/runtime/ScriptBytecodeAdapter.java      |   2 +-
 .../groovy/runtime/StringGroovyMethods.java        |  14 +--
 .../groovy/runtime/callsite/CallSiteArray.java     |   2 +-
 .../callsite/ConstructorMetaMethodSite.java        |   6 +-
 .../groovy/runtime/callsite/ConstructorSite.java   |   2 +-
 .../runtime/callsite/MetaClassConstructorSite.java |   2 +-
 .../groovy/runtime/callsite/MetaClassSite.java     |   2 +-
 .../callsite/PlainObjectMetaMethodSite.java        |   2 +-
 .../runtime/callsite/PogoMetaMethodSite.java       |   2 +-
 .../groovy/runtime/callsite/PojoMetaClassSite.java |   2 +-
 .../runtime/callsite/PojoMetaMethodSite.java       |  14 +--
 .../runtime/callsite/StaticMetaClassSite.java      |   2 +-
 .../runtime/callsite/StaticMetaMethodSite.java     |  14 +--
 .../groovy/runtime/m12n/ExtensionModule.java       |   2 +-
 .../groovy/runtime/memoize/CommonCache.java        |   4 +-
 .../runtime/memoize/ConcurrentCommonCache.java     |   4 +-
 .../runtime/memoize/ConcurrentSoftCache.java       |   4 +-
 .../groovy/runtime/memoize/EvictableCache.java     |   2 +-
 .../groovy/runtime/memoize/StampedCommonCache.java |   4 +-
 .../groovy/runtime/metaclass/ClosureMetaClass.java |   2 +-
 .../runtime/metaclass/ConcurrentReaderHashMap.java | 134 ++++++++++-----------
 .../runtime/metaclass/DefaultMetaClassInfo.java    |  86 ++++++-------
 .../runtime/metaclass/MetaClassRegistryImpl.java   |  20 +--
 .../runtime/metaclass/MultipleSetterProperty.java  |   2 +-
 .../runtime/metaclass/NewInstanceMetaMethod.java   |   2 +-
 .../typehandling/DefaultTypeTransformation.java    |   2 +-
 .../java/org/codehaus/groovy/syntax/CSTNode.java   |   2 +-
 .../java/org/codehaus/groovy/syntax/Types.java     |   4 +-
 .../org/codehaus/groovy/tools/StringHelper.java    |  14 +--
 .../groovy/tools/javac/JavaStubGenerator.java      |   2 +-
 .../groovy/tools/shell/util/MessageSource.java     |   2 +-
 .../groovy/transform/ASTTransformationVisitor.java |   4 +-
 .../transform/AnnotationCollectorTransform.java    |   2 +-
 .../transform/BaseScriptASTTransformation.java     |   4 +-
 .../InheritConstructorsASTTransformation.java      |   2 +-
 .../groovy/transform/stc/ExtensionMethodCache.java |   2 +-
 .../stc/GroovyTypeCheckingExtensionSupport.java    |   2 +-
 .../groovy/transform/stc/SecondPassExpression.java |   2 +-
 .../transform/stc/StaticTypeCheckingSupport.java   |   8 +-
 .../transform/stc/StaticTypeCheckingVisitor.java   |   8 +-
 .../ReturnStatementToIterationConverter.java       |   2 +-
 .../codehaus/groovy/util/CharSequenceReader.java   |   4 +-
 .../codehaus/groovy/util/LongArrayIterator.java    |   2 +-
 .../codehaus/groovy/util/ManagedLinkedList.java    |   2 +-
 .../org/codehaus/groovy/vmplugin/VMPlugin.java     |   4 +-
 .../codehaus/groovy/vmplugin/v7/IndyInterface.java |   2 +-
 .../codehaus/groovy/vmplugin/v8/IndyInterface.java |   4 +-
 .../org/codehaus/groovy/vmplugin/v8/IndyMath.java  |   2 +-
 .../org/codehaus/groovy/vmplugin/v8/Selector.java  |  36 +++---
 .../groovy/vmplugin/v8/TypeTransformers.java       |   8 +-
 .../org/codehaus/groovy/vmplugin/v9/Java9.java     |   2 +-
 src/spec/doc/_design-pattern-monoid.adoc           |   2 +-
 src/spec/doc/_design-pattern-singleton.adoc        |   4 +-
 src/spec/doc/_records.adoc                         |   2 +-
 src/spec/doc/_traits.adoc                          |   2 +-
 src/spec/doc/_type-checking-extensions.adoc        |   2 +-
 src/spec/doc/_working-with-io.adoc                 |   2 +-
 src/spec/doc/core-closures.adoc                    |   8 +-
 src/spec/doc/core-differences-java.adoc            |   2 +-
 src/spec/doc/core-domain-specific-languages.adoc   |  10 +-
 src/spec/doc/core-getting-started.adoc             |   4 +-
 src/spec/doc/core-metaprogramming.adoc             |  28 ++---
 src/spec/doc/core-object-orientation.adoc          |  20 +--
 src/spec/doc/core-operators.adoc                   |   2 +-
 src/spec/doc/core-program-structure.adoc           |  12 +-
 src/spec/doc/core-semantics.adoc                   |  26 ++--
 src/spec/doc/core-syntax.adoc                      |   8 +-
 src/spec/doc/core-testing-guide.adoc               |  24 ++--
 src/spec/doc/grape.adoc                            |   6 +-
 src/spec/doc/guide-integrating.adoc                |   2 +-
 src/spec/doc/performance-guide.adoc                |   2 +-
 src/spec/doc/style-guide.adoc                      |   6 +-
 src/spec/doc/tools-groovyc.adoc                    |   6 +-
 .../mock/interceptor/StubCallSequenceTest.groovy   |   4 +-
 .../main/java/org/codehaus/groovy/ant/Groovy.java  |   2 +-
 .../main/java/org/codehaus/groovy/ant/Groovyc.java |   8 +-
 .../org/codehaus/groovy/ant/RootLoaderRef.java     |   2 +-
 .../org/codehaus/groovy/ant/UberCompileTask.java   |   4 +-
 .../builder/AstBuilderFromSpecificationTest.groovy |   2 +-
 .../groovy/groovy/cli/picocli/CliBuilder.groovy    |   2 +-
 .../groovy/groovy/console/ui/ConsoleActions.groovy |   4 +-
 .../ui/text/StructuredSyntaxDocumentFilter.java    |   2 +-
 .../groovy/groovy/console/ui/text/TextEditor.java  |   2 +-
 .../contracts/ast/visitor/ASTNodeMetaData.java     |   2 +-
 .../groovy/contracts/common/spi/Lifecycle.java     |   4 +-
 .../datetime/extensions/DateTimeExtensions.java    |  16 +--
 .../dateutil/extensions/DateUtilExtensions.java    |   2 +-
 .../dsl/expression/AbstractGinqExpression.java     |   2 +-
 .../provider/collection/runtime/Queryable.java     |   2 +-
 .../test/org/apache/groovy/ginq/GinqTest.groovy    | 104 ++++++++--------
 .../org/codehaus/groovy/groovydoc/GroovyType.java  |   6 +-
 .../groovy/groovysh/InteractiveShellRunner.groovy  |   2 +-
 .../groovy/groovysh/commands/HistoryCommand.groovy |   9 +-
 .../completion/ImportsSyntaxCompleterTest.groovy   |   2 +-
 .../groovy/jmx/builder/JmxMetaMapBuilder.groovy    |   2 +-
 .../src/main/java/groovy/jmx/GroovyMBean.java      |   4 +-
 .../src/main/java/groovy/json/JsonBuilder.java     |   4 +-
 .../src/main/java/groovy/json/JsonGenerator.java   |   2 +-
 .../src/main/java/groovy/json/JsonOutput.java      |   2 +-
 .../src/main/java/groovy/json/JsonParserType.java  |   2 +-
 .../src/main/java/groovy/json/JsonToken.java       |   4 +-
 .../java/groovy/json/StreamingJsonBuilder.java     |   2 +-
 .../org/apache/groovy/json/internal/CharBuf.java   |   2 +-
 .../apache/groovy/json/internal/LazyValueMap.java  |   2 +-
 .../test/groovy/groovy/json/JsonBuilderTest.groovy |   4 +-
 .../groovy/json/StreamingJsonBuilderTest.groovy    |   4 +-
 .../groovy/jsr223/GroovyScriptEngineFactory.java   |   2 +-
 .../transform/MacroCallTransformingVisitor.java    |   2 +-
 .../groovy/nio/extensions/NioExtensions.java       |  10 +-
 .../java/groovy/servlet/AbstractHttpServlet.java   |   4 +-
 .../main/java/groovy/servlet/GroovyServlet.java    |   2 +-
 .../main/java/groovy/servlet/ServletBinding.java   |   2 +-
 .../groovy/servlet/ServletBindingTest.groovy       |   4 +-
 .../src/main/java/groovy/sql/DataSet.java          |   3 +-
 .../java/groovy/sql/GroovyResultSetExtension.java  |   2 +-
 .../groovy-sql/src/main/java/groovy/sql/Sql.java   |  54 ++++-----
 .../main/java/groovy/swing/table/TableSorter.java  |   2 +-
 .../groovy/text/StreamingTemplateEngine.java       |  12 +-
 .../groovy/groovy/text/markup/BaseTemplate.java    |   8 +-
 .../groovy/text/markup/TemplateResolver.java       |   2 +-
 .../groovy/groovy/mock/interceptor/package.html    |   4 +-
 subprojects/groovy-typecheckers/build.gradle       |   4 +-
 .../main/groovy/groovy/xml/XmlParserFactory.groovy |   2 +-
 .../groovy/groovy/xml/XmlSlurperFactory.groovy     |   2 +-
 .../src/main/java/groovy/xml/XmlParser.java        |   4 +-
 .../src/main/java/groovy/xml/XmlUtil.java          |  18 ++-
 .../java/groovy/xml/slurpersupport/Attribute.java  |   2 +-
 .../groovy/xml/slurpersupport/GPathResult.java     |   4 +-
 subprojects/performance/src/files/pleac01.groovy   |   2 +-
 .../reflection/ClassInfoDeadlockStressTest.java    |   2 +-
 .../util/ManagedConcurrentMapStressTest.java       |   2 +-
 .../util/ManagedConcurrentValueMapStressTest.java  |   2 +-
 178 files changed, 679 insertions(+), 673 deletions(-)


[groovy] 05/08: Polish org.codehaus.groovy.runtime package documentation

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 3a9862c4af65229e401aee68767d481d58636d1b
Author: Marc Wrobel <ma...@gmail.com>
AuthorDate: Tue Oct 18 13:37:51 2022 +0200

    Polish org.codehaus.groovy.runtime package documentation
    
    Fix typos and improve documentation (javadoc, comments) in the org.codehaus.groovy.runtime package.
    
    Note that the following words / expressions were preferred :
    
    - all of the -> all the (when possible because it is easier to read),
    - whether or not -> whether (when possible because it is easier to read),
    - sub-directory -> subdirectory (more common, see https://www.merriam-webster.com/dictionary/subdirectory),
    - meta class -> metaclass (incorrect, see https://en.wikipedia.org/wiki/Metaclass).
    
    A bunch of @return has been converted to method summary to fix the following sonatype-lift warnings: https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment.
    
    Trailing whitespaces were also removed in the process.
---
 .../codehaus/groovy/runtime/ConversionHandler.java |   2 +-
 .../groovy/runtime/DefaultGroovyMethods.java       | 106 ++++++++--------
 .../groovy/runtime/EncodingGroovyMethods.java      |   8 +-
 .../org/codehaus/groovy/runtime/FormatHelper.java  |   2 +-
 .../org/codehaus/groovy/runtime/GStringImpl.java   |   2 +-
 .../codehaus/groovy/runtime/HandleMetaClass.java   |   4 +-
 .../codehaus/groovy/runtime/IOGroovyMethods.java   |   2 +-
 .../org/codehaus/groovy/runtime/InvokerHelper.java |   4 +-
 .../codehaus/groovy/runtime/MetaClassHelper.java   |  26 ++--
 .../org/codehaus/groovy/runtime/MethodKey.java     |   6 +-
 .../codehaus/groovy/runtime/MethodRankHelper.java  |  32 +++--
 .../org/codehaus/groovy/runtime/NullObject.java    |   4 +-
 .../groovy/runtime/ProxyGeneratorAdapter.java      |   2 +-
 .../groovy/runtime/ResourceGroovyMethods.java      |  28 ++---
 .../groovy/runtime/ScriptBytecodeAdapter.java      |   2 +-
 .../groovy/runtime/StringGroovyMethods.java        |  14 +--
 .../groovy/runtime/callsite/CallSiteArray.java     |   2 +-
 .../callsite/ConstructorMetaMethodSite.java        |   6 +-
 .../groovy/runtime/callsite/ConstructorSite.java   |   2 +-
 .../runtime/callsite/MetaClassConstructorSite.java |   2 +-
 .../groovy/runtime/callsite/MetaClassSite.java     |   2 +-
 .../callsite/PlainObjectMetaMethodSite.java        |   2 +-
 .../runtime/callsite/PogoMetaMethodSite.java       |   2 +-
 .../groovy/runtime/callsite/PojoMetaClassSite.java |   2 +-
 .../runtime/callsite/PojoMetaMethodSite.java       |  14 +--
 .../runtime/callsite/StaticMetaClassSite.java      |   2 +-
 .../runtime/callsite/StaticMetaMethodSite.java     |  14 +--
 .../groovy/runtime/m12n/ExtensionModule.java       |   2 +-
 .../groovy/runtime/memoize/CommonCache.java        |   4 +-
 .../runtime/memoize/ConcurrentCommonCache.java     |   4 +-
 .../runtime/memoize/ConcurrentSoftCache.java       |   4 +-
 .../groovy/runtime/memoize/EvictableCache.java     |   2 +-
 .../groovy/runtime/memoize/StampedCommonCache.java |   4 +-
 .../groovy/runtime/metaclass/ClosureMetaClass.java |   2 +-
 .../runtime/metaclass/ConcurrentReaderHashMap.java | 134 ++++++++++-----------
 .../runtime/metaclass/DefaultMetaClassInfo.java    |  86 ++++++-------
 .../runtime/metaclass/MetaClassRegistryImpl.java   |  20 +--
 .../runtime/metaclass/MultipleSetterProperty.java  |   2 +-
 .../runtime/metaclass/NewInstanceMetaMethod.java   |   2 +-
 .../typehandling/DefaultTypeTransformation.java    |   2 +-
 40 files changed, 280 insertions(+), 282 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/runtime/ConversionHandler.java b/src/main/java/org/codehaus/groovy/runtime/ConversionHandler.java
index 479e9cd38e..3babe01e46 100644
--- a/src/main/java/org/codehaus/groovy/runtime/ConversionHandler.java
+++ b/src/main/java/org/codehaus/groovy/runtime/ConversionHandler.java
@@ -45,7 +45,7 @@ public abstract class ConversionHandler implements InvocationHandler, Serializab
     private MetaClass metaClass;
 
     /**
-     * Creates a ConversionHandler with an delegate.
+     * Creates a ConversionHandler with a delegate.
      *
      * @param delegate the delegate
      * @throws IllegalArgumentException if the given delegate is null
diff --git a/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
index 76cb3abca2..98dbb493f5 100644
--- a/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
@@ -369,7 +369,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 
     /**
      * Allows the closure to be called for the object reference self (similar
-     * to <code>with</code> and always returns self.
+     * to <code>with</code>) and always returns self.
      * <p>
      * Any method invoked inside the closure will first be invoked on the
      * self reference. For instance, the following method calls to the append()
@@ -3446,7 +3446,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Collates this array into into sub-lists.
+     * Collates this array into sub-lists.
      *
      * @param self          an array
      * @param size          the length of each sub-list in the returned list
@@ -4049,7 +4049,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 
     /**
      * Iterates through this Iterable transforming each item using the closure
-     * as a transformer into a map entry, returning the supplied map with all of the transformed entries added to it.
+     * as a transformer into a map entry, returning the supplied map with all the transformed entries added to it.
      * <pre class="groovyTestCase">
      * def letters = "abc"
      * // collect letters with index
@@ -4857,12 +4857,12 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Returns <tt>true</tt> if this iterable contains all of the elements
+     * Returns <tt>true</tt> if this iterable contains all the elements
      * in the specified array.
      *
      * @param  self  an Iterable to be checked for containment
      * @param  items array to be checked for containment in this iterable
-     * @return <tt>true</tt> if this collection contains all of the elements
+     * @return <tt>true</tt> if this collection contains all the elements
      *           in the specified array
      * @see    Collection#containsAll(Collection)
      * @since 2.4.0
@@ -5021,7 +5021,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Modifies the collection by adding all of the elements in the specified array to the collection.
+     * Modifies the collection by adding all the elements in the specified array to the collection.
      * The behavior of this operation is undefined if
      * the specified array is modified while the operation is in progress.
      *
@@ -5039,7 +5039,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Modifies this list by inserting all of the elements in the specified array into the
+     * Modifies this list by inserting all the elements in the specified array into the
      * list at the specified position.  Shifts the
      * element currently at that position (if any) and any subsequent
      * elements to the right (increases their indices).  The new elements
@@ -5193,7 +5193,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self a Collection of lists
      * @param function a closure to be called on each combination
-     * @return a List of the results of applying the closure to each combinations found
+     * @return a List of the results of applying the closure to each combination found
      * @see groovy.util.GroovyCollections#combinations(Iterable)
      * @since 2.2.0
      */
@@ -6038,7 +6038,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <pre class="groovyTestCase">assert 1+2+3+4 == [1,2,3,4].sum()</pre>
      *
      * @param self Iterable of values to add together
-     * @return The sum of all of the items
+     * @return The sum of all the items
      * @see #sum(Iterator)
      * @since 2.2.0
      */
@@ -6051,7 +6051,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * "plus" method on all items in the array.
      *
      * @param self The array of values to add together
-     * @return The sum of all of the items
+     * @return The sum of all the items
      * @see #sum(java.util.Iterator)
      * @since 1.7.1
      */
@@ -6065,7 +6065,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * exhausted of elements after determining the sum value.
      *
      * @param self an Iterator for the values to add together
-     * @return The sum of all of the items
+     * @return The sum of all the items
      * @since 1.5.5
      */
     public static Object sum(Iterator<Object> self) {
@@ -6164,7 +6164,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self         an Iterable of values to sum
      * @param initialValue the items in the collection will be summed to this initial value
-     * @return The sum of all of the items.
+     * @return The sum of all the items.
      * @see #sum(Iterator, Object)
      * @since 2.2.0
      */
@@ -6177,7 +6177,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self         an array of values to sum
      * @param initialValue the items in the array will be summed to this initial value
-     * @return The sum of all of the items.
+     * @return The sum of all the items.
      * @since 1.7.1
      */
     public static Object sum(Object[] self, Object initialValue) {
@@ -6191,7 +6191,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self         an Iterator for the values to add together
      * @param initialValue the items in the collection will be summed to this initial value
-     * @return The sum of all of the items
+     * @return The sum of all the items
      * @since 1.5.5
      */
     public static Object sum(Iterator<?> self, Object initialValue) {
@@ -6458,7 +6458,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * </pre>
      *
      * @param self Iterable of values to average
-     * @return The average of all of the items
+     * @return The average of all the items
      * @see #average(Iterator)
      * @since 3.0.0
      */
@@ -6475,7 +6475,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * </pre>
      *
      * @param self The array of values to average
-     * @return The average of all of the items
+     * @return The average of all the items
      * @see #sum(java.lang.Object[])
      * @since 3.0.0
      */
@@ -6514,7 +6514,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * </pre>
      *
      * @param self an Iterator for the values to average
-     * @return The average of all of the items
+     * @return The average of all the items
      * @since 3.0.0
      */
     public static Object average(Iterator<?> self) {
@@ -6760,7 +6760,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 
     /**
      * Concatenates the <code>toString()</code> representation of each
-     * items in this array, with the given String as a separator between each
+     * item in this array, with the given String as a separator between each
      * item.
      *
      * @param self      an array of Object
@@ -7884,7 +7884,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * or with more options {@link #withDefault(Map, boolean, boolean, Closure)}.
      *
      * @param map          a Map
-     * @param key          the key to lookup the value of
+     * @param key          the key to look up the value
      * @param defaultValue the value to return and add to the map for this key if
      *                     there is no entry for the given key
      * @return the value of the given key or the default value, added to the map if the
@@ -10342,7 +10342,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Returns an Iterator containing all of the items from this iterator except the last one.
+     * Returns an Iterator containing all the items from this iterator except the last one.
      * <pre class="groovyTestCase">
      * def iter = [3, 4, 2].listIterator()
      * def result = iter.init()
@@ -10429,7 +10429,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original List
      * @param num  the number of elements to take from this List
      * @return a List consisting of the first <code>num</code> elements from this List,
-     *         or else all the elements from the List if it has less then <code>num</code> elements.
+     *         or else all the elements from the List if it has less than <code>num</code> elements.
      * @since 1.8.1
      */
     public static <T> List<T> take(List<T> self, int num) {
@@ -10448,7 +10448,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original SortedSet
      * @param num  the number of elements to take from this SortedSet
      * @return a SortedSet consisting of the first <code>num</code> elements from this List,
-     *         or else all the elements from the SortedSet if it has less then <code>num</code> elements.
+     *         or else all the elements from the SortedSet if it has less than <code>num</code> elements.
      * @since 2.4.0
      */
     public static <T> SortedSet<T> take(SortedSet<T> self, int num) {
@@ -10467,7 +10467,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original array
      * @param num  the number of elements to take from this array
      * @return an array consisting of the first <code>num</code> elements of this array,
-     *         or else the whole array if it has less then <code>num</code> elements.
+     *         or else the whole array if it has less than <code>num</code> elements.
      * @since 1.8.1
      */
     public static <T> T[] take(T[] self, int num) {
@@ -10507,7 +10507,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original Iterable
      * @param num  the number of elements to take from this Iterable
      * @return a Collection consisting of the first <code>num</code> elements from this Iterable,
-     *         or else all the elements from the Iterable if it has less then <code>num</code> elements.
+     *         or else all the elements from the Iterable if it has less than <code>num</code> elements.
      * @since 1.8.7
      */
     public static <T> Collection<T> take(Iterable<T> self, int num) {
@@ -10561,7 +10561,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original map
      * @param num  the number of elements to take from this map
      * @return a new map consisting of the first <code>num</code> elements of this map,
-     *         or else the whole map if it has less then <code>num</code> elements.
+     *         or else the whole map if it has less than <code>num</code> elements.
      * @since 1.8.1
      */
     public static <K, V> Map<K, V> take(Map<K, V> self, int num) {
@@ -10643,7 +10643,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original array
      * @param num  the number of elements to take from this array
      * @return an array consisting of the last <code>num</code> elements of this array,
-     *         or else the whole array if it has less then <code>num</code> elements.
+     *         or else the whole array if it has less than <code>num</code> elements.
      * @since 2.4.0
      */
     public static <T> T[] takeRight(T[] self, int num) {
@@ -10683,7 +10683,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original Iterable
      * @param num  the number of elements to take from this Iterable
      * @return a Collection consisting of the last <code>num</code> elements from this Iterable,
-     *         or else all the elements from the Iterable if it has less then <code>num</code> elements.
+     *         or else all the elements from the Iterable if it has less than <code>num</code> elements.
      * @since 2.4.0
      */
     public static <T> Collection<T> takeRight(Iterable<T> self, int num) {
@@ -10713,7 +10713,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original List
      * @param num  the number of elements to take from this List
      * @return a List consisting of the last <code>num</code> elements from this List,
-     *         or else all the elements from the List if it has less then <code>num</code> elements.
+     *         or else all the elements from the List if it has less than <code>num</code> elements.
      * @since 2.4.0
      */
     public static <T> List<T> takeRight(List<T> self, int num) {
@@ -10732,7 +10732,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original SortedSet
      * @param num  the number of elements to take from this SortedSet
      * @return a SortedSet consisting of the last <code>num</code> elements from this SortedSet,
-     *         or else all the elements from the SortedSet if it has less then <code>num</code> elements.
+     *         or else all the elements from the SortedSet if it has less than <code>num</code> elements.
      * @since 2.4.0
      */
     public static <T> SortedSet<T> takeRight(SortedSet<T> self, int num) {
@@ -10751,7 +10751,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original SortedSet
      * @param num  the number of elements to drop from this Iterable
      * @return a SortedSet consisting of all the elements of this Iterable minus the first <code>num</code> elements,
-     *         or an empty list if it has less then <code>num</code> elements.
+     *         or an empty list if it has less than <code>num</code> elements.
      * @since 2.4.0
      */
     public static <T> SortedSet<T> drop(SortedSet<T> self, int num) {
@@ -10770,7 +10770,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original List
      * @param num  the number of elements to drop from this Iterable
      * @return a List consisting of all the elements of this Iterable minus the first <code>num</code> elements,
-     *         or an empty list if it has less then <code>num</code> elements.
+     *         or an empty list if it has less than <code>num</code> elements.
      * @since 1.8.1
      */
     public static <T> List<T> drop(List<T> self, int num) {
@@ -10798,7 +10798,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original Iterable
      * @param num  the number of elements to drop from this Iterable
      * @return a Collection consisting of all the elements of this Iterable minus the first <code>num</code> elements,
-     *         or an empty list if it has less then <code>num</code> elements.
+     *         or an empty list if it has less than <code>num</code> elements.
      * @since 1.8.7
      */
     public static <T> Collection<T> drop(Iterable<T> self, int num) {
@@ -10915,7 +10915,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original SortedSet
      * @param num  the number of elements to drop from this SortedSet
      * @return a List consisting of all the elements of this SortedSet minus the last <code>num</code> elements,
-     *         or an empty SortedSet if it has less then <code>num</code> elements.
+     *         or an empty SortedSet if it has less than <code>num</code> elements.
      * @since 2.4.0
      */
     public static <T> SortedSet<T> dropRight(SortedSet<T> self, int num) {
@@ -10934,7 +10934,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original List
      * @param num  the number of elements to drop from this List
      * @return a List consisting of all the elements of this List minus the last <code>num</code> elements,
-     *         or an empty List if it has less then <code>num</code> elements.
+     *         or an empty List if it has less than <code>num</code> elements.
      * @since 2.4.0
      */
     public static <T> List<T> dropRight(List<T> self, int num) {
@@ -10962,7 +10962,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original Iterable
      * @param num  the number of elements to drop from this Iterable
      * @return a Collection consisting of all the elements of this Iterable minus the last <code>num</code> elements,
-     *         or an empty list if it has less then <code>num</code> elements.
+     *         or an empty list if it has less than <code>num</code> elements.
      * @since 2.4.0
      */
     public static <T> Collection<T> dropRight(Iterable<T> self, int num) {
@@ -10996,7 +10996,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original Iterator
      * @param num  the number of elements to drop
      * @return an Iterator consisting of all the elements of this Iterator minus the last <code>num</code> elements,
-     *         or an empty Iterator if it has less then <code>num</code> elements.
+     *         or an empty Iterator if it has less than <code>num</code> elements.
      * @since 2.4.0
      */
     public static <T> Iterator<T> dropRight(Iterator<T> self, int num) {
@@ -11862,7 +11862,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     /**
      * Converts the given iterable to another type.
      *
-     * @param iterable a Iterable
+     * @param iterable an Iterable
      * @param clazz    the desired class
      * @return the object resulting from this type conversion
      * @see #asType(Collection, Class)
@@ -12684,7 +12684,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Creates a new List by inserting all of the elements in the specified array
+     * Creates a new List by inserting all the elements in the specified array
      * to the elements from the original List at the specified index.
      * Shifts the element currently at that index (if any) and any subsequent
      * elements to the right (increasing their indices).
@@ -12716,7 +12716,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Creates a new List by inserting all of the elements in the given additions List
+     * Creates a new List by inserting all the elements in the given additions List
      * to the elements from the original List at the specified index.
      * Shifts the element currently at that index (if any) and any subsequent
      * elements to the right (increasing their indices).  The new elements
@@ -12747,7 +12747,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Creates a new List by inserting all of the elements in the given Iterable
+     * Creates a new List by inserting all the elements in the given Iterable
      * to the elements from this List at the specified index.
      *
      * @param self      an original list
@@ -14220,7 +14220,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Implementation of the left shift operator for integral types.  Non integral
+     * Implementation of the left shift operator for integral types.  Non-integral
      * Number types throw UnsupportedOperationException.
      *
      * @param self    a Number object
@@ -14233,7 +14233,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Implementation of the right shift operator for integral types.  Non integral
+     * Implementation of the right shift operator for integral types.  Non-integral
      * Number types throw UnsupportedOperationException.
      *
      * @param self    a Number object
@@ -14246,7 +14246,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Implementation of the right shift (unsigned) operator for integral types.  Non integral
+     * Implementation of the right shift (unsigned) operator for integral types.  Non-integral
      * Number types throw UnsupportedOperationException.
      *
      * @param self    a Number object
@@ -15909,7 +15909,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self     a BigDecimal
      * @param exponent an Integer exponent
-     * @return a Number to the power of a the exponent
+     * @return a Number to the power of the exponent
      */
     public static Number power(BigDecimal self, Integer exponent) {
         if (exponent >= 0) {
@@ -15926,7 +15926,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      *  @param self     a BigInteger
      *  @param exponent an Integer exponent
-     *  @return a Number to the power of a the exponent
+     *  @return a Number to the power of the exponent
      */
     public static Number power(BigInteger self, Integer exponent) {
         if (exponent >= 0) {
@@ -15944,7 +15944,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      *  @param self     an Integer
      *  @param exponent an Integer exponent
-     *  @return a Number to the power of a the exponent
+     *  @return a Number to the power of the exponent
      */
     public static Number power(Integer self, Integer exponent) {
         if (exponent >= 0) {
@@ -15967,7 +15967,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self     a Long
      * @param exponent an Integer exponent
-     * @return a Number to the power of a the exponent
+     * @return a Number to the power of the exponent
      */
     public static Number power(Long self, Integer exponent) {
         if (exponent >= 0) {
@@ -15987,7 +15987,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self     a BigInteger
      * @param exponent a BigInteger exponent
-     * @return a BigInteger to the power of a the exponent
+     * @return a BigInteger to the power of the exponent
      * @since 2.3.8
      */
     public static BigInteger power(BigInteger self, BigInteger exponent) {
@@ -16190,7 +16190,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * Bitwise XOR together two Numbers.  Called when the '^' operator is used.
      *
      * @param left  a Number
-     * @param right another Number to bitwse XOR
+     * @param right another Number to bitwise XOR
      * @return the bitwise XOR of both Numbers
      * @since 1.0
      */
@@ -16211,7 +16211,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Negates the number.  Equivalent to the '-' operator when it preceeds
+     * Negates the number.  Equivalent to the '-' operator when it precedes
      * a single operand, i.e. <code>-10</code>
      *
      * @param left a Number
@@ -16224,7 +16224,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 
     /**
      * Returns the number, effectively being a noop for numbers.
-     * Operator overloaded form of the '+' operator when it preceeds
+     * Operator overloaded form of the '+' operator when it precedes
      * a single operand, i.e. <code>+10</code>
      *
      * @param left a Number
@@ -16973,7 +16973,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
      * <p>
      * Note that this method differs from {@link java.math.BigDecimal#round(java.math.MathContext)}
      * which specifies the digits to retain starting from the leftmost nonzero
-     * digit. This methods rounds the integral part to the nearest whole number.
+     * digit. This method rounds the integral part to the nearest whole number.
      *
      * @param number a BigDecimal
      * @return the rounded value of that BigDecimal
@@ -17211,7 +17211,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Transform this number to a the given type, using the 'as' operator.  The
+     * Transform this number to the given type, using the 'as' operator.  The
      * following types are supported in addition to the default
      * {@link #asType(java.lang.Object, java.lang.Class)}:
      * <ul>
diff --git a/src/main/java/org/codehaus/groovy/runtime/EncodingGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/EncodingGroovyMethods.java
index a0991e8742..5f8d53e217 100644
--- a/src/main/java/org/codehaus/groovy/runtime/EncodingGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/EncodingGroovyMethods.java
@@ -52,7 +52,7 @@ public class EncodingGroovyMethods {
      * information on Base64 encoding and chunking see <code>RFC 4648</code>.
      *
      * @param data Byte array to be encoded
-     * @param chunked whether or not the Base64 encoded data should be MIME chunked
+     * @param chunked whether the Base64 encoded data should be MIME chunked
      * @return object which will write the Base64 encoding of the byte array
      * @since 1.5.1
      */
@@ -79,7 +79,7 @@ public class EncodingGroovyMethods {
      * information on Base64 encoding and chunking see <code>RFC 4648</code>.
      *
      * @param data byte array to be encoded
-     * @param chunked whether or not the Base64 encoded data should be MIME chunked
+     * @param chunked whether the Base64 encoded data should be MIME chunked
      * @return object which will write the Base64 encoding of the byte array
      * @since 1.5.7
      */
@@ -187,7 +187,7 @@ public class EncodingGroovyMethods {
      * Base 64 Encoding with URL and Filename Safe Alphabet</code>.
      *
      * @param data Byte array to be encoded
-     * @param pad whether or not the encoded data should be padded
+     * @param pad whether the encoded data should be padded
      * @return object which will write the Base64 URL and Filename Safe encoding of the byte array
      * @since 2.5.0
      */
@@ -221,7 +221,7 @@ public class EncodingGroovyMethods {
      * Base 64 Encoding with URL and Filename Safe Alphabet</code>.
      *
      * @param data Byte array to be encoded
-     * @param pad whether or not the encoded data should be padded
+     * @param pad whether the encoded data should be padded
      * @return object which will write the Base64 URL and Filename Safe encoding of the byte array
      * @since 2.5.0
      */
diff --git a/src/main/java/org/codehaus/groovy/runtime/FormatHelper.java b/src/main/java/org/codehaus/groovy/runtime/FormatHelper.java
index 66127320e6..0e0b93f597 100644
--- a/src/main/java/org/codehaus/groovy/runtime/FormatHelper.java
+++ b/src/main/java/org/codehaus/groovy/runtime/FormatHelper.java
@@ -112,7 +112,7 @@ public class FormatHelper {
      * </pre>
      *
      * @param options a map of configuration options
-     * @param arguments the argument(s) to calulate the {@code toString} for
+     * @param arguments the argument(s) to calculate the {@code toString} for
      * @return the string rendering of the argument(s)
      * @see DefaultGroovyMethods#inspect(Object)
      */
diff --git a/src/main/java/org/codehaus/groovy/runtime/GStringImpl.java b/src/main/java/org/codehaus/groovy/runtime/GStringImpl.java
index e63475d43f..9d7fc95192 100644
--- a/src/main/java/org/codehaus/groovy/runtime/GStringImpl.java
+++ b/src/main/java/org/codehaus/groovy/runtime/GStringImpl.java
@@ -119,7 +119,7 @@ public class GStringImpl extends GString {
     /**
      * Get the strings of this GString.
      * <p>
-     * This methods returns the same array as used in the constructor.
+     * This method returns the same array as used in the constructor.
      * Changing the values will result in changes of the GString.
      * It is generally not recommended to do so.
      */
diff --git a/src/main/java/org/codehaus/groovy/runtime/HandleMetaClass.java b/src/main/java/org/codehaus/groovy/runtime/HandleMetaClass.java
index 09c659d828..a5ef820bbb 100644
--- a/src/main/java/org/codehaus/groovy/runtime/HandleMetaClass.java
+++ b/src/main/java/org/codehaus/groovy/runtime/HandleMetaClass.java
@@ -39,9 +39,9 @@ public class HandleMetaClass extends DelegatingMetaClass {
         super(mc);
         if (obj != null) {
             if (InvokerHelper.getMetaClass(obj.getClass()) == mc || !(mc instanceof ExpandoMetaClass))
-              object = obj; // object has default meta class, so we need to replace it on demand
+              object = obj; // object has default metaclass, so we need to replace it on demand
             else
-              object = NONE; // object already has per instance meta class
+              object = NONE; // object already has per instance metaclass
         }
     }
 
diff --git a/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
index 4f7633fed6..e104966b6d 100644
--- a/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
@@ -989,7 +989,7 @@ public class IOGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Standard iterator for a input stream which iterates through the stream
+     * Standard iterator for an input stream which iterates through the stream
      * content in a byte-based fashion.
      *
      * @param self an InputStream object
diff --git a/src/main/java/org/codehaus/groovy/runtime/InvokerHelper.java b/src/main/java/org/codehaus/groovy/runtime/InvokerHelper.java
index a83fbbaced..b6fa036b7d 100644
--- a/src/main/java/org/codehaus/groovy/runtime/InvokerHelper.java
+++ b/src/main/java/org/codehaus/groovy/runtime/InvokerHelper.java
@@ -125,7 +125,7 @@ public class InvokerHelper {
             }
             return answer;
         }
-        // let's assume its a collection of 1
+        // let's assume it's a collection of 1
         return Collections.singletonList(value);
     }
 
@@ -652,7 +652,7 @@ public class InvokerHelper {
     }
 
     /**
-     * Converts the given object into an array; if its an array then just
+     * Converts the given object into an array; if it's an array then just
      * cast otherwise wrap it in an array
      */
     public static Object[] asArray(Object arguments) {
diff --git a/src/main/java/org/codehaus/groovy/runtime/MetaClassHelper.java b/src/main/java/org/codehaus/groovy/runtime/MetaClassHelper.java
index d567f76210..df51723ea2 100644
--- a/src/main/java/org/codehaus/groovy/runtime/MetaClassHelper.java
+++ b/src/main/java/org/codehaus/groovy/runtime/MetaClassHelper.java
@@ -378,7 +378,7 @@ public class MetaClassHelper {
         long ret = 0;
         int noVargsLength = parametersLength - 1;
 
-        // if the number of parameters does not match we have 
+        // if the number of parameters does not match we have
         // a vargs usage
         //
         // case A: arguments.length<parameters.length
@@ -392,13 +392,13 @@ public class MetaClassHelper {
         // case B: arguments.length>parameters.length
         //
         //         In this case all arguments with a index bigger than
-        //         paramMinus1 are part of the vargs, so a 
-        //         distance calculation needs to be done against 
+        //         paramMinus1 are part of the vargs, so a
+        //         distance calculation needs to be done against
         //         parameters[noVargsLength].getComponentType()
         //
         //         VArgs penalty: 2l+arguments.length-parameters.length
         //
-        // case C: arguments.length==parameters.length && 
+        // case C: arguments.length==parameters.length &&
         //         isAssignableFrom( parameters[noVargsLength],
         //                           arguments[noVargsLength] )
         //
@@ -406,11 +406,11 @@ public class MetaClassHelper {
         //
         //         VArgs penalty: 0l
         //
-        // case D: arguments.length==parameters.length && 
+        // case D: arguments.length==parameters.length &&
         //         !isAssignableFrom( parameters[noVargsLength],
         //                            arguments[noVargsLength] )
         //
-        //         In this case we have a vargs case again, we need 
+        //         In this case we have a vargs case again, we need
         //         to calculate arguments[noVargsLength] against
         //         parameters[noVargsLength].getComponentType
         //
@@ -458,7 +458,7 @@ public class MetaClassHelper {
          *      assert foo(new Object(),new Object()) == 2
          *  --> D preferred over B
          *
-         *  This gives C<A<D<B 
+         *  This gives C<A<D<B
          */
 
         // first we calculate all arguments, that are for sure not part
@@ -597,7 +597,7 @@ public class MetaClassHelper {
         return answer;
     }
 
-    // 
+    //
 
     /**
      * @param list   a list of MetaMethods
@@ -663,7 +663,7 @@ public class MetaClassHelper {
             baseClass = fallback;
         }
         /*
-         * If no specific super class has been found and type fallback is an interface, check if all arg classes 
+         * If no specific super class has been found and type fallback is an interface, check if all arg classes
          * implement it. If yes, then that interface is the common type across arguments.
          */
         if (baseClass == Object.class && fallback.isInterface()) {
@@ -723,7 +723,7 @@ public class MetaClassHelper {
     /**
      * Returns a callable object for the given method name on the object.
      * The object acts like a Closure in that it can be called, like a closure
-     * and passed around - though really its a method pointer, not a closure per se.
+     * and passed around - though really it's a method pointer, not a closure per se.
      *
      * @param object     the object containing the method
      * @param methodName the method of interest
@@ -1004,14 +1004,14 @@ public class MetaClassHelper {
     }
 
     /**
-     * Sets the meta class for an object, by delegating to the appropriate
+     * Sets the metaclass for an object, by delegating to the appropriate
      * {@link DefaultGroovyMethods} helper method. This method was introduced as
      * a breaking change in 2.0 to solve rare cases of stack overflow. See GROOVY-5285.
      *
-     * The method is named doSetMetaClass in order to prevent misusages. Do not use
+     * The method is named doSetMetaClass in order to prevent misuses. Do not use
      * this method directly unless you know what you do.
      *
-     * @param self the object for which to set the meta class
+     * @param self the object for which to set the metaclass
      * @param mc the metaclass
      */
     public static void doSetMetaClass(Object self, MetaClass mc) {
diff --git a/src/main/java/org/codehaus/groovy/runtime/MethodKey.java b/src/main/java/org/codehaus/groovy/runtime/MethodKey.java
index 1dc93b55be..e0afed21cd 100644
--- a/src/main/java/org/codehaus/groovy/runtime/MethodKey.java
+++ b/src/main/java/org/codehaus/groovy/runtime/MethodKey.java
@@ -24,7 +24,7 @@ import java.util.List;
 
 
 /**
- * An abstract base class for a key used for comparators and Map keys to lookup a method by
+ * An abstract base class for a key used for comparators and Map keys to look up a method by
  * name and parameter types
  */
 public abstract class MethodKey {
@@ -41,7 +41,7 @@ public abstract class MethodKey {
     }
 
     /**
-     * Creates an immutable copy that we can cache. 
+     * Creates an immutable copy that we can cache.
      */
     public MethodKey createCopy() {
         int size = getParameterCount();
@@ -120,7 +120,7 @@ public abstract class MethodKey {
         /** @todo we should use the real Josh Bloch algorithm here */
 
         // can't remember the exact Josh Bloch algorithm and I've not got the book handy
-        // but its something like this IIRC
+        // but it's something like this IIRC
         for (int i = 0; i < size; i++) {
             answer *= 37;
             answer += 1 + getParameterType(i).hashCode();
diff --git a/src/main/java/org/codehaus/groovy/runtime/MethodRankHelper.java b/src/main/java/org/codehaus/groovy/runtime/MethodRankHelper.java
index 5f7b92c043..d013826a28 100644
--- a/src/main/java/org/codehaus/groovy/runtime/MethodRankHelper.java
+++ b/src/main/java/org/codehaus/groovy/runtime/MethodRankHelper.java
@@ -35,13 +35,13 @@ import java.util.Set;
 /**
  * Utility class for MissingMethodException, MissingPropertyException etc.
  * This class contains methods assisting in ranking and listing probable intended
- * methods/fields when a exception is thrown.
+ * methods/fields when an exception is thrown.
  */
 public class MethodRankHelper{
     //These are the costs for the various edit operations
     //they are used by the two DamerauLevenshtein implementations
     public static final int DL_SUBSTITUTION = 10;
-    public static final int DL_DELETE = 10; //This is also the cost for a insert
+    public static final int DL_DELETE = 10; //This is also the cost for an insert
     public static final int DL_TRANSPOSITION = 5;
     public static final int DL_CASE = 5;
 
@@ -62,7 +62,7 @@ public class MethodRankHelper{
 
     /**
      * Returns a string detailing possible solutions to a missing method
-     * if no good solutions can be found a empty string is returned.
+     * if no good solutions can be found an empty string is returned.
      *
      * @param methodName the name of the method that doesn't exist
      * @param type the class on which the method is invoked
@@ -140,7 +140,7 @@ public class MethodRankHelper{
 
     /**
      * Returns a string detailing possible solutions to a missing constructor
-     * if no good solutions can be found a empty string is returned.
+     * if no good solutions can be found an empty string is returned.
      *
      * @param arguments the arguments passed to the constructor
      * @param type the class on which the constructor is invoked
@@ -165,7 +165,7 @@ public class MethodRankHelper{
 
     /**
      * Returns a string detailing possible solutions to a missing field or property
-     * if no good solutions can be found a empty string is returned.
+     * if no good solutions can be found an empty string is returned.
      *
      * @param fieldName the missing field
      * @param type the class on which the field is sought
@@ -252,9 +252,8 @@ public class MethodRankHelper{
     }
 
     /**
-     * This class wraps a method object and a score variable so methods 
-     * Can easily be ranked by their likeness to a another method
-     *
+     * This class wraps a method object and a score variable so methods
+     * can easily be ranked by their likeness to another method
      */
     private static final class RankableMethod implements Comparable {
         final MetaMethod m;
@@ -313,9 +312,8 @@ public class MethodRankHelper{
     }
 
     /**
-     * This class wraps a method object and a score variable so methods 
-     * Can easily be ranked by their likeness to a another method
-     *
+     * This class wraps a method object and a score variable so methods
+     * can easily be ranked by their likeness to another method
      */
     private static final class RankableConstructor implements Comparable {
         final Constructor c;
@@ -341,8 +339,8 @@ public class MethodRankHelper{
     }
 
     /**
-     * This class wraps a method object and a score variable so methods 
-     * Can easily be ranked by their likeness to a another method
+     * This class wraps a method object and a score variable so methods
+     * can easily be ranked by their likeness to another method
      *
      */
     private static final class RankableField implements Comparable {
@@ -398,7 +396,7 @@ public class MethodRankHelper{
 
     /**
      * This is a slightly modified version of the Damerau Levenshtein distance
-     * algorithm. It has a additional test to see if a character has switched case,
+     * algorithm. It has an additional test to see if a character has switched case,
      * in the original algorithm this counts as a substitution.
      * The "cost" for a substitution is given as 10 instead of 1 in this version,
      * this enables transpositions and case modifications to have a lower cost than
@@ -406,7 +404,7 @@ public class MethodRankHelper{
      *
      * Currently the lowercase versions of t_j and s_i isn't cached, its probable
      * that some speed could be gained from this.
-     * 
+     *
      * This version is based on Chas Emerick's implementation of Levenshtein Distance
      * for jakarta commons.
      * @param s a CharSequence
@@ -452,7 +450,7 @@ public class MethodRankHelper{
             for (i = 1; i <= n; i++) {
                 s_i = s.charAt(i - 1);
                 if (Character.isLowerCase(s_i) ^ Character.isLowerCase(t_j)) {
-                    //if s_i and t_i don't have have the same case
+                    //if s_i and t_i don't have the same case
                     cost = caselessCompare(s_i, t_j) ? DL_CASE : DL_SUBSTITUTION;
                 } else {
                     //if they share case check for substitution
@@ -496,7 +494,7 @@ public class MethodRankHelper{
     }
 
     /**
-     * This is a implementation of DL distance between two Object arrays instead
+     * This is an implementation of DL distance between two Object arrays instead
      * of character streams. The objects are compared using their equals method.
      * No objects may be null.
      * This implementation is based on Chas Emerick's implementation of Levenshtein Distance
diff --git a/src/main/java/org/codehaus/groovy/runtime/NullObject.java b/src/main/java/org/codehaus/groovy/runtime/NullObject.java
index c4703e24f9..6e68e40b6e 100644
--- a/src/main/java/org/codehaus/groovy/runtime/NullObject.java
+++ b/src/main/java/org/codehaus/groovy/runtime/NullObject.java
@@ -75,7 +75,7 @@ public class NullObject extends GroovyObjectSupport {
     /**
      * Tries to set a property on null, which will always fail
      *
-     * @param property - the proprty to set
+     * @param property - the property to set
      * @param newValue - the new value of the property
      */
     @Override
@@ -131,7 +131,7 @@ public class NullObject extends GroovyObjectSupport {
     /**
      * Fallback for null+null.
      * The result is always a NPE. The plus(String) version will catch
-     * the case of adding a non null String to null.
+     * the case of adding a non-null String to null.
      *
      * @param o - the Object
      * @return nothing
diff --git a/src/main/java/org/codehaus/groovy/runtime/ProxyGeneratorAdapter.java b/src/main/java/org/codehaus/groovy/runtime/ProxyGeneratorAdapter.java
index 337662cdfe..5ad0015bf4 100644
--- a/src/main/java/org/codehaus/groovy/runtime/ProxyGeneratorAdapter.java
+++ b/src/main/java/org/codehaus/groovy/runtime/ProxyGeneratorAdapter.java
@@ -382,7 +382,7 @@ public class ProxyGeneratorAdapter extends ClassVisitor {
      * Visit every class/interface this proxy should implement, and generate the appropriate
      * bytecode for delegation if available.
      *
-     * @param clazz an class for which to generate bytecode
+     * @param clazz a class for which to generate bytecode
      */
     private void visitClass(final Class<?> clazz) {
         Method[] methods = clazz.getDeclaredMethods();
diff --git a/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
index 9a25ed154c..25d434eec4 100644
--- a/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
@@ -1259,7 +1259,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Processes each descendant file in this directory and any sub-directories.
+     * Processes each descendant file in this directory and any subdirectories.
      * Processing consists of potentially calling <code>closure</code> passing it the current
      * file (which may be a normal file or subdirectory) and then if a subdirectory was encountered,
      * recursively processing the subdirectory. Whether the closure is called is determined by whether
@@ -1289,7 +1289,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Processes each descendant file in this directory and any sub-directories.
+     * Processes each descendant file in this directory and any subdirectories.
      * Processing consists of potentially calling <code>closure</code> passing it the current
      * file (which may be a normal file or subdirectory) and then if a subdirectory was encountered,
      * recursively processing the subdirectory.
@@ -1439,7 +1439,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Processes each descendant file in this directory and any sub-directories.
+     * Processes each descendant file in this directory and any subdirectories.
      * Convenience method for {@link #traverse(java.io.File, java.util.Map, groovy.lang.Closure)} when
      * no options to alter the traversal behavior are required.
      *
@@ -1545,7 +1545,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Processes each descendant file in this directory and any sub-directories.
+     * Processes each descendant file in this directory and any subdirectories.
      * Processing consists of calling <code>closure</code> passing it the current
      * file (which may be a normal file or subdirectory) and then if a subdirectory was encountered,
      * recursively processing the subdirectory.
@@ -2144,7 +2144,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
 
     /**
      * Create a new PrintWriter for this file which is then
-     * passed it into the given closure.  This method ensures its the writer
+     * passed it into the given closure.  This method ensures the writer
      * is closed after the closure returns.
      *
      * @param file    a File
@@ -2307,7 +2307,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param url a URL
      * @return a BufferedReader for the URL
-     * @throws MalformedURLException is thrown if the URL is not well formed
+     * @throws MalformedURLException is thrown if the URL is not well-formed
      * @throws IOException           if an I/O error occurs while creating the input stream
      * @since 1.5.5
      */
@@ -2330,7 +2330,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param url        a URL
      * @param parameters connection parameters
      * @return a BufferedReader for the URL
-     * @throws MalformedURLException is thrown if the URL is not well formed
+     * @throws MalformedURLException is thrown if the URL is not well-formed
      * @throws IOException           if an I/O error occurs while creating the input stream
      * @since 1.8.1
      */
@@ -2352,7 +2352,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param url     a URL
      * @param charset opens the stream with a specified charset
      * @return a BufferedReader for the URL
-     * @throws MalformedURLException is thrown if the URL is not well formed
+     * @throws MalformedURLException is thrown if the URL is not well-formed
      * @throws IOException           if an I/O error occurs while creating the input stream
      * @since 1.5.5
      */
@@ -2367,7 +2367,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param parameters connection parameters
      * @param charset    opens the stream with a specified charset
      * @return a BufferedReader for the URL
-     * @throws MalformedURLException is thrown if the URL is not well formed
+     * @throws MalformedURLException is thrown if the URL is not well-formed
      * @throws IOException           if an I/O error occurs while creating the input stream
      * @since 1.8.1
      */
@@ -2618,7 +2618,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self the CharSequence representing a URI
      * @return a URI
-     * @throws java.net.URISyntaxException is thrown if the URI is not well formed.
+     * @throws java.net.URISyntaxException is thrown if the URI is not well-formed.
      * @since 1.8.2
      */
     public static URI toURI(CharSequence self) throws URISyntaxException {
@@ -2630,7 +2630,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self the String representing a URI
      * @return a URI
-     * @throws java.net.URISyntaxException is thrown if the URI is not well formed.
+     * @throws java.net.URISyntaxException is thrown if the URI is not well-formed.
      * @since 1.0
      */
     public static URI toURI(String self) throws URISyntaxException {
@@ -2642,7 +2642,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self the CharSequence representing a URL
      * @return a URL
-     * @throws java.net.MalformedURLException is thrown if the URL is not well formed.
+     * @throws java.net.MalformedURLException is thrown if the URL is not well-formed.
      * @since 1.8.2
      */
     public static URL toURL(CharSequence self) throws MalformedURLException {
@@ -2654,7 +2654,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self the String representing a URL
      * @return a URL
-     * @throws java.net.MalformedURLException is thrown if the URL is not well formed.
+     * @throws java.net.MalformedURLException is thrown if the URL is not well-formed.
      * @since 1.0
      */
     public static URL toURL(String self) throws MalformedURLException {
@@ -2687,7 +2687,7 @@ public class ResourceGroovyMethods extends DefaultGroovyMethodsSupport {
     /**
      * Gets path from a <code>List</code> of <code>String</code>s.
      *
-     * @param pathStack     <code>List</code> of <code>String</code>s to be concated as a path.
+     * @param pathStack     <code>List</code> of <code>String</code>s to be concatenated as a path.
      * @param separatorChar <code>char</code> to be used as separator between names in path
      * @return <code>String</code>, never <code>null</code>
      */
diff --git a/src/main/java/org/codehaus/groovy/runtime/ScriptBytecodeAdapter.java b/src/main/java/org/codehaus/groovy/runtime/ScriptBytecodeAdapter.java
index 9204565307..599f6d2a49 100644
--- a/src/main/java/org/codehaus/groovy/runtime/ScriptBytecodeAdapter.java
+++ b/src/main/java/org/codehaus/groovy/runtime/ScriptBytecodeAdapter.java
@@ -668,7 +668,7 @@ public class ScriptBytecodeAdapter {
         }
         if (from instanceof Integer && to instanceof Integer) {
             // Currently, empty ranges where from != to, the range is full exclusive (e.g. 0<..<-1) and from and to
-            // have a different sign are constructed as IntRanges. This is because t3hese ranges can still be used to
+            // have a different sign are constructed as IntRanges. This is because these ranges can still be used to
             // index into lists.
             return new IntRange(!exclusiveLeft, !exclusiveRight, (Integer) from, (Integer) to);
         }
diff --git a/src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java
index 9cbd80ce1e..f8ef4d20a4 100644
--- a/src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java
@@ -760,7 +760,7 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self    the source CharSequence
      * @param regex   a Regex CharSequence
-     * @param closure a closure with one parameter or as much parameters as groups
+     * @param closure a closure with one parameter or as many parameters as groups
      * @return the source CharSequence
      *
      * @since 1.8.2
@@ -780,7 +780,7 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self    the source CharSequence
      * @param pattern a regex Pattern
-     * @param closure a closure with one parameter or as much parameters as groups
+     * @param closure a closure with one parameter or as many parameters as groups
      * @return the source CharSequence
      *
      * @since 1.8.2
@@ -800,7 +800,7 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self    the source string
      * @param pattern a regex Pattern
-     * @param closure a closure with one parameter or as much parameters as groups
+     * @param closure a closure with one parameter or as many parameters as groups
      * @return the source string
      *
      * @since 1.6.1
@@ -819,7 +819,7 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      *
      * @param self    the source string
      * @param regex   a Regex string
-     * @param closure a closure with one parameter or as much parameters as groups
+     * @param closure a closure with one parameter or as many parameters as groups
      * @return the source string
      *
      * @since 1.6.0
@@ -2979,7 +2979,7 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original CharSequence
      * @param num  the number of chars to take from this CharSequence
      * @return a CharSequence consisting of the first {@code num} chars,
-     *         or else the whole CharSequence if it has less then {@code num} elements.
+     *         or else the whole CharSequence if it has less than {@code num} elements.
      *
      * @since 1.8.1
      */
@@ -2999,7 +2999,7 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original GString
      * @param num  the number of chars to take from this GString
      * @return a String consisting of the first {@code num} chars,
-     *         or else the whole GString if it has less then {@code num} elements.
+     *         or else the whole GString if it has less than {@code num} elements.
      *
      * @since 2.3.7
      */
@@ -3013,7 +3013,7 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * @param self the original String
      * @param num  the number of chars to take from this String
      * @return a String consisting of the first {@code num} chars,
-     *         or else the whole String if it has less then {@code num} elements.
+     *         or else the whole String if it has less than {@code num} elements.
      *
      * @since 2.5.5
      */
diff --git a/src/main/java/org/codehaus/groovy/runtime/callsite/CallSiteArray.java b/src/main/java/org/codehaus/groovy/runtime/callsite/CallSiteArray.java
index 04c2e0865f..cecdac3785 100644
--- a/src/main/java/org/codehaus/groovy/runtime/callsite/CallSiteArray.java
+++ b/src/main/java/org/codehaus/groovy/runtime/callsite/CallSiteArray.java
@@ -113,7 +113,7 @@ public final class CallSiteArray {
     }
 
     // for MetaClassImpl we try to pick meta method,
-    // otherwise or if method doesn't exist we make call via POJO meta class
+    // otherwise or if method doesn't exist we make call via POJO metaclass
     private static CallSite createPojoSite(CallSite callSite, Object receiver, Object[] args) {
         final Class klazz = receiver.getClass();
         MetaClass metaClass = InvokerHelper.getMetaClass(receiver);
diff --git a/src/main/java/org/codehaus/groovy/runtime/callsite/ConstructorMetaMethodSite.java b/src/main/java/org/codehaus/groovy/runtime/callsite/ConstructorMetaMethodSite.java
index 8c3b950c2f..0dda86c555 100644
--- a/src/main/java/org/codehaus/groovy/runtime/callsite/ConstructorMetaMethodSite.java
+++ b/src/main/java/org/codehaus/groovy/runtime/callsite/ConstructorMetaMethodSite.java
@@ -26,7 +26,7 @@ import org.codehaus.groovy.runtime.ScriptBytecodeAdapter;
 
 /**
  * Call site for invoking static methods
-*   meta class  - cached
+*   metaclass  - cached
 *   method - not cached
 */
 public class ConstructorMetaMethodSite extends MetaMethodSite {
@@ -49,9 +49,9 @@ public class ConstructorMetaMethodSite extends MetaMethodSite {
 
     @Override
     public final Object callConstructor(Object receiver, Object[] args) throws Throwable {
-        if (receiver == metaClass.getTheClass() // meta class match receiver
+        if (receiver == metaClass.getTheClass() // metaclass match receiver
            && ((MetaClassImpl)metaClass).getVersion() == version // metaClass still be valid
-           && MetaClassHelper.sameClasses(params, args) )  
+           && MetaClassHelper.sameClasses(params, args) )
         {
             MetaClassHelper.unwrap(args);
             try {
diff --git a/src/main/java/org/codehaus/groovy/runtime/callsite/ConstructorSite.java b/src/main/java/org/codehaus/groovy/runtime/callsite/ConstructorSite.java
index dbe1f7413e..7e9a5be5d9 100644
--- a/src/main/java/org/codehaus/groovy/runtime/callsite/ConstructorSite.java
+++ b/src/main/java/org/codehaus/groovy/runtime/callsite/ConstructorSite.java
@@ -52,7 +52,7 @@ public class ConstructorSite extends MetaClassSite {
     }
 
     protected final boolean checkCall(Object receiver, Object[] args) {
-        return receiver == metaClass.getTheClass() // meta class match receiver
+        return receiver == metaClass.getTheClass() // metaclass match receiver
                 && ((MetaClassImpl) metaClass).getVersion() == version // metaClass still be valid
                 && MetaClassHelper.sameClasses(params, args);
     }
diff --git a/src/main/java/org/codehaus/groovy/runtime/callsite/MetaClassConstructorSite.java b/src/main/java/org/codehaus/groovy/runtime/callsite/MetaClassConstructorSite.java
index e76399aa31..d6535957ab 100644
--- a/src/main/java/org/codehaus/groovy/runtime/callsite/MetaClassConstructorSite.java
+++ b/src/main/java/org/codehaus/groovy/runtime/callsite/MetaClassConstructorSite.java
@@ -25,7 +25,7 @@ import org.codehaus.groovy.runtime.ScriptBytecodeAdapter;
 
 /**
  * Call site for constructor
- *   meta class - cached
+ *   metaclass - cached
  *   method - not cached
 */
 public class MetaClassConstructorSite extends MetaClassSite {
diff --git a/src/main/java/org/codehaus/groovy/runtime/callsite/MetaClassSite.java b/src/main/java/org/codehaus/groovy/runtime/callsite/MetaClassSite.java
index e275510735..480ce305e3 100644
--- a/src/main/java/org/codehaus/groovy/runtime/callsite/MetaClassSite.java
+++ b/src/main/java/org/codehaus/groovy/runtime/callsite/MetaClassSite.java
@@ -21,7 +21,7 @@ package org.codehaus.groovy.runtime.callsite;
 import groovy.lang.MetaClass;
 
 /**
- * Call site which holds reference to meta class.
+ * Call site which holds reference to metaclass.
 */
 public abstract class MetaClassSite extends AbstractCallSite {
 
diff --git a/src/main/java/org/codehaus/groovy/runtime/callsite/PlainObjectMetaMethodSite.java b/src/main/java/org/codehaus/groovy/runtime/callsite/PlainObjectMetaMethodSite.java
index b396e26381..3a8ffd04e2 100644
--- a/src/main/java/org/codehaus/groovy/runtime/callsite/PlainObjectMetaMethodSite.java
+++ b/src/main/java/org/codehaus/groovy/runtime/callsite/PlainObjectMetaMethodSite.java
@@ -29,7 +29,7 @@ import java.lang.reflect.Method;
 
 /**
  * Plain ordinary object call site
- *   meta class - cached
+ *   metaclass - cached
  *   method - cached
  *
  */
diff --git a/src/main/java/org/codehaus/groovy/runtime/callsite/PogoMetaMethodSite.java b/src/main/java/org/codehaus/groovy/runtime/callsite/PogoMetaMethodSite.java
index 3ed328dffe..04ca90d804 100644
--- a/src/main/java/org/codehaus/groovy/runtime/callsite/PogoMetaMethodSite.java
+++ b/src/main/java/org/codehaus/groovy/runtime/callsite/PogoMetaMethodSite.java
@@ -33,7 +33,7 @@ import java.lang.reflect.Method;
 
 /**
  * POGO call site
- *   meta class - cached
+ *   metaclass - cached
  *   method - cached
 */
 public class PogoMetaMethodSite extends PlainObjectMetaMethodSite {
diff --git a/src/main/java/org/codehaus/groovy/runtime/callsite/PojoMetaClassSite.java b/src/main/java/org/codehaus/groovy/runtime/callsite/PojoMetaClassSite.java
index 846ee9b5ae..7acfca411c 100644
--- a/src/main/java/org/codehaus/groovy/runtime/callsite/PojoMetaClassSite.java
+++ b/src/main/java/org/codehaus/groovy/runtime/callsite/PojoMetaClassSite.java
@@ -25,7 +25,7 @@ import org.codehaus.groovy.runtime.ScriptBytecodeAdapter;
 
 /**
  * POJO call site
- *   meta class - cached
+ *   metaclass - cached
  *   method - not cached
 */
 public class PojoMetaClassSite extends MetaClassSite{
diff --git a/src/main/java/org/codehaus/groovy/runtime/callsite/PojoMetaMethodSite.java b/src/main/java/org/codehaus/groovy/runtime/callsite/PojoMetaMethodSite.java
index 6d203f4fea..3bf972f957 100644
--- a/src/main/java/org/codehaus/groovy/runtime/callsite/PojoMetaMethodSite.java
+++ b/src/main/java/org/codehaus/groovy/runtime/callsite/PojoMetaMethodSite.java
@@ -33,7 +33,7 @@ import java.lang.reflect.Method;
 
 /**
  * POJO call site
- *   meta class - cached
+ *   metaclass - cached
  *   method - cached
 */
 public class PojoMetaMethodSite extends PlainObjectMetaMethodSite {
@@ -66,7 +66,7 @@ public class PojoMetaMethodSite extends PlainObjectMetaMethodSite {
 
     protected final boolean checkCall(Object receiver, Object[] args) {
         try {
-            return receiver.getClass() == metaClass.getTheClass() // meta class match receiver
+            return receiver.getClass() == metaClass.getTheClass() // metaclass match receiver
                && checkPojoMetaClass()
                && MetaClassHelper.sameClasses(params, args);
         }
@@ -80,7 +80,7 @@ public class PojoMetaMethodSite extends PlainObjectMetaMethodSite {
 
     protected final boolean checkCall(Object receiver) {
         try {
-            return receiver.getClass() == metaClass.getTheClass() // meta class match receiver
+            return receiver.getClass() == metaClass.getTheClass() // metaclass match receiver
                && checkPojoMetaClass()
                && MetaClassHelper.sameClasses(params);
         } catch (NullPointerException e) {
@@ -93,7 +93,7 @@ public class PojoMetaMethodSite extends PlainObjectMetaMethodSite {
 
     protected final boolean checkCall(Object receiver, Object arg1) {
         try {
-            return receiver.getClass() == metaClass.getTheClass() // meta class match receiver
+            return receiver.getClass() == metaClass.getTheClass() // metaclass match receiver
                && checkPojoMetaClass()
                && MetaClassHelper.sameClasses(params, arg1);
         } catch (NullPointerException e) {
@@ -106,7 +106,7 @@ public class PojoMetaMethodSite extends PlainObjectMetaMethodSite {
 
     protected final boolean checkCall(Object receiver, Object arg1, Object arg2) {
         try {
-            return receiver.getClass() == metaClass.getTheClass() // meta class match receiver
+            return receiver.getClass() == metaClass.getTheClass() // metaclass match receiver
                && checkPojoMetaClass()
                && MetaClassHelper.sameClasses(params, arg1, arg2);
         } catch (NullPointerException e) {
@@ -119,7 +119,7 @@ public class PojoMetaMethodSite extends PlainObjectMetaMethodSite {
 
     protected final boolean checkCall(Object receiver, Object arg1, Object arg2, Object arg3) {
         try {
-            return receiver.getClass() == metaClass.getTheClass() // meta class match receiver
+            return receiver.getClass() == metaClass.getTheClass() // metaclass match receiver
                && checkPojoMetaClass()
                && MetaClassHelper.sameClasses(params, arg1, arg2, arg3);
         } catch (NullPointerException e) {
@@ -132,7 +132,7 @@ public class PojoMetaMethodSite extends PlainObjectMetaMethodSite {
 
     protected final boolean checkCall(Object receiver, Object arg1, Object arg2, Object arg3, Object arg4) {
         try {
-            return receiver.getClass() == metaClass.getTheClass() // meta class match receiver
+            return receiver.getClass() == metaClass.getTheClass() // metaclass match receiver
                && checkPojoMetaClass()
                && MetaClassHelper.sameClasses(params, arg1, arg2, arg3, arg4);
         } catch (NullPointerException e) {
diff --git a/src/main/java/org/codehaus/groovy/runtime/callsite/StaticMetaClassSite.java b/src/main/java/org/codehaus/groovy/runtime/callsite/StaticMetaClassSite.java
index 0681204a63..59f2678d32 100644
--- a/src/main/java/org/codehaus/groovy/runtime/callsite/StaticMetaClassSite.java
+++ b/src/main/java/org/codehaus/groovy/runtime/callsite/StaticMetaClassSite.java
@@ -25,7 +25,7 @@ import org.codehaus.groovy.runtime.ScriptBytecodeAdapter;
 
 /**
  * Call site for invoking static methods
- *   meta class  - cached
+ *   metaclass  - cached
  *   method - not cached
  */
 public class StaticMetaClassSite extends MetaClassSite {
diff --git a/src/main/java/org/codehaus/groovy/runtime/callsite/StaticMetaMethodSite.java b/src/main/java/org/codehaus/groovy/runtime/callsite/StaticMetaMethodSite.java
index c9e6676be9..2af8e69d3b 100644
--- a/src/main/java/org/codehaus/groovy/runtime/callsite/StaticMetaMethodSite.java
+++ b/src/main/java/org/codehaus/groovy/runtime/callsite/StaticMetaMethodSite.java
@@ -27,7 +27,7 @@ import org.codehaus.groovy.runtime.ScriptBytecodeAdapter;
 
 /**
  * POJO call site
- *   meta class - cached
+ *   metaclass - cached
  *   method - cached
 */
 public class StaticMetaMethodSite extends MetaMethodSite {
@@ -48,37 +48,37 @@ public class StaticMetaMethodSite extends MetaMethodSite {
     }
 
     protected final boolean checkCall(Object receiver, Object[] args) {
-        return receiver == metaClass.getTheClass() // meta class match receiver
+        return receiver == metaClass.getTheClass() // metaclass match receiver
            && ((MetaClassImpl)metaClass).getVersion() == version // metaClass still be valid
            && MetaClassHelper.sameClasses(params, args);
     }
 
     protected final boolean checkCall(Object receiver) {
-        return receiver == metaClass.getTheClass() // meta class match receiver
+        return receiver == metaClass.getTheClass() // metaclass match receiver
            && ((MetaClassImpl)metaClass).getVersion() == version // metaClass still be valid
            && MetaClassHelper.sameClasses(params);
     }
 
     protected final boolean checkCall(Object receiver, Object arg1) {
-        return receiver == metaClass.getTheClass() // meta class match receiver
+        return receiver == metaClass.getTheClass() // metaclass match receiver
            && ((MetaClassImpl)metaClass).getVersion() == version // metaClass still be valid
            && MetaClassHelper.sameClasses(params, arg1);
     }
 
     protected final boolean checkCall(Object receiver, Object arg1, Object arg2) {
-        return receiver == metaClass.getTheClass() // meta class match receiver
+        return receiver == metaClass.getTheClass() // metaclass match receiver
            && ((MetaClassImpl)metaClass).getVersion() == version // metaClass still be valid
            && MetaClassHelper.sameClasses(params, arg1, arg2);
     }
 
     protected final boolean checkCall(Object receiver, Object arg1, Object arg2, Object arg3) {
-        return receiver == metaClass.getTheClass() // meta class match receiver
+        return receiver == metaClass.getTheClass() // metaclass match receiver
            && ((MetaClassImpl)metaClass).getVersion() == version // metaClass still be valid
            && MetaClassHelper.sameClasses(params, arg1, arg2, arg3);
     }
 
     protected final boolean checkCall(Object receiver, Object arg1, Object arg2, Object arg3, Object arg4) {
-        return receiver == metaClass.getTheClass() // meta class match receiver
+        return receiver == metaClass.getTheClass() // metaclass match receiver
            && ((MetaClassImpl)metaClass).getVersion() == version // metaClass still be valid
            && MetaClassHelper.sameClasses(params, arg1, arg2, arg3, arg4);
     }
diff --git a/src/main/java/org/codehaus/groovy/runtime/m12n/ExtensionModule.java b/src/main/java/org/codehaus/groovy/runtime/m12n/ExtensionModule.java
index 887ba30b16..e8dd0e145a 100644
--- a/src/main/java/org/codehaus/groovy/runtime/m12n/ExtensionModule.java
+++ b/src/main/java/org/codehaus/groovy/runtime/m12n/ExtensionModule.java
@@ -24,7 +24,7 @@ import java.util.List;
 
 /**
  * An extension module is a class responsible for providing a list of {@link MetaMethod meta methods} to the Groovy
- * compiler and runtime. Those methods are use to "dynamically extend" existing classes by adding methods to
+ * compiler and runtime. Those methods are used to "dynamically extend" existing classes by adding methods to
  * existing classes.
  *
  * @since 2.0.0
diff --git a/src/main/java/org/codehaus/groovy/runtime/memoize/CommonCache.java b/src/main/java/org/codehaus/groovy/runtime/memoize/CommonCache.java
index 0f7fb751d8..cf231a4614 100644
--- a/src/main/java/org/codehaus/groovy/runtime/memoize/CommonCache.java
+++ b/src/main/java/org/codehaus/groovy/runtime/memoize/CommonCache.java
@@ -75,7 +75,7 @@ public class CommonCache<K, V> implements EvictableCache<K, V>, ValueConvertable
     }
 
     /**
-     * Constructs a LRU cache with the specified initial capacity and max size.
+     * Constructs an LRU cache with the specified initial capacity and max size.
      * The LRU cache is slower than {@link LRUCache}
      *
      * @param initialCapacity initial capacity of the LRU cache
@@ -86,7 +86,7 @@ public class CommonCache<K, V> implements EvictableCache<K, V>, ValueConvertable
     }
 
     /**
-     * Constructs a LRU cache with the default initial capacity
+     * Constructs an LRU cache with the default initial capacity
      *
      * @param maxSize max size of the LRU cache
      * @see #CommonCache(int, int)
diff --git a/src/main/java/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCache.java b/src/main/java/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCache.java
index ace4ae6af0..2f31c62ff2 100644
--- a/src/main/java/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCache.java
+++ b/src/main/java/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCache.java
@@ -60,7 +60,7 @@ public class ConcurrentCommonCache<K, V> implements EvictableCache<K, V>, ValueC
     }
 
     /**
-     * Constructs a LRU cache with the specified initial capacity and max size.
+     * Constructs an LRU cache with the specified initial capacity and max size.
      * The LRU cache is slower than {@link LRUCache}
      *
      * @param initialCapacity initial capacity of the LRU cache
@@ -71,7 +71,7 @@ public class ConcurrentCommonCache<K, V> implements EvictableCache<K, V>, ValueC
     }
 
     /**
-     * Constructs a LRU cache with the default initial capacity(16)
+     * Constructs an LRU cache with the default initial capacity(16)
      *
      * @param maxSize max size of the LRU cache
      * @see #ConcurrentCommonCache(int, int)
diff --git a/src/main/java/org/codehaus/groovy/runtime/memoize/ConcurrentSoftCache.java b/src/main/java/org/codehaus/groovy/runtime/memoize/ConcurrentSoftCache.java
index a265810496..85c7a9cc92 100644
--- a/src/main/java/org/codehaus/groovy/runtime/memoize/ConcurrentSoftCache.java
+++ b/src/main/java/org/codehaus/groovy/runtime/memoize/ConcurrentSoftCache.java
@@ -51,7 +51,7 @@ public class ConcurrentSoftCache<K, V> extends ConcurrentCommonCache<K, SoftRefe
     }
 
     /**
-     * Constructs a LRU cache with the specified initial capacity and max size.
+     * Constructs an LRU cache with the specified initial capacity and max size.
      * The LRU cache is slower than {@link LRUCache}
      *
      * @param initialCapacity initial capacity of the LRU cache
@@ -62,7 +62,7 @@ public class ConcurrentSoftCache<K, V> extends ConcurrentCommonCache<K, SoftRefe
     }
 
     /**
-     * Constructs a LRU cache with the default initial capacity(16)
+     * Constructs an LRU cache with the default initial capacity(16)
      *
      * @param maxSize max size of the LRU cache
      * @see #ConcurrentSoftCache(int, int)
diff --git a/src/main/java/org/codehaus/groovy/runtime/memoize/EvictableCache.java b/src/main/java/org/codehaus/groovy/runtime/memoize/EvictableCache.java
index 90c125eabb..5b0789c3cb 100644
--- a/src/main/java/org/codehaus/groovy/runtime/memoize/EvictableCache.java
+++ b/src/main/java/org/codehaus/groovy/runtime/memoize/EvictableCache.java
@@ -82,7 +82,7 @@ public interface EvictableCache<K, V> extends MemoizeCache<K, V>, Map<K, V>/* */
     int size();
 
     /**
-     * Represents a eviction strategy for the cache with limited size
+     * Represents an eviction strategy for the cache with limited size
      */
     enum EvictionStrategy {
         /**
diff --git a/src/main/java/org/codehaus/groovy/runtime/memoize/StampedCommonCache.java b/src/main/java/org/codehaus/groovy/runtime/memoize/StampedCommonCache.java
index 1b1da7ab13..f084321d75 100644
--- a/src/main/java/org/codehaus/groovy/runtime/memoize/StampedCommonCache.java
+++ b/src/main/java/org/codehaus/groovy/runtime/memoize/StampedCommonCache.java
@@ -62,7 +62,7 @@ public class StampedCommonCache<K, V> implements EvictableCache<K, V>, ValueConv
     }
 
     /**
-     * Constructs a LRU cache with the specified initial capacity and max size.
+     * Constructs an LRU cache with the specified initial capacity and max size.
      * The LRU cache is slower than {@link LRUCache}
      *
      * @param initialCapacity initial capacity of the LRU cache
@@ -73,7 +73,7 @@ public class StampedCommonCache<K, V> implements EvictableCache<K, V>, ValueConv
     }
 
     /**
-     * Constructs a LRU cache with the default initial capacity(16)
+     * Constructs an LRU cache with the default initial capacity(16)
      *
      * @param maxSize max size of the LRU cache
      * @see #StampedCommonCache(int, int)
diff --git a/src/main/java/org/codehaus/groovy/runtime/metaclass/ClosureMetaClass.java b/src/main/java/org/codehaus/groovy/runtime/metaclass/ClosureMetaClass.java
index b8ed7f4330..fc17726f63 100644
--- a/src/main/java/org/codehaus/groovy/runtime/metaclass/ClosureMetaClass.java
+++ b/src/main/java/org/codehaus/groovy/runtime/metaclass/ClosureMetaClass.java
@@ -52,7 +52,7 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * A meta class for closures generated by the Groovy compiler. These classes
+ * A metaclass for closures generated by the Groovy compiler. These classes
  * have special characteristics this MetaClass uses. One of these is that a
  * generated Closure has only additional doCall methods, all other methods
  * are in the Closure class as well. To use this fact this MetaClass uses
diff --git a/src/main/java/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java b/src/main/java/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java
index a4d2f706a8..91fdea6236 100644
--- a/src/main/java/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java
+++ b/src/main/java/org/codehaus/groovy/runtime/metaclass/ConcurrentReaderHashMap.java
@@ -67,7 +67,7 @@ import java.util.Set;
  *
  * This class also supports optional guaranteed
  * exclusive reads, simply by surrounding a call within a synchronized
- * block, as in <br> 
+ * block, as in <br>
  * <code>ConcurrentReaderHashMap t; ... Object v; <br>
  * synchronized(t) { v = t.get(k); } </code> <br>
  *
@@ -78,7 +78,7 @@ import java.util.Set;
  *   ConcurrentReaderHashMap t; ...            // Inefficient version
  *   Object key; ...
  *   Object value; ...
- *   synchronized(t) { 
+ *   synchronized(t) {
  *     if (!t.containsKey(key))
  *       t.put(key, value);
  *       // other code if not previously present
@@ -123,7 +123,7 @@ import java.util.Set;
  * during updates. Like Hashtable but unlike java.util.HashMap,
  * this class does NOT allow <tt>null</tt> to be used as a key or
  * value.  This class is also typically faster than ConcurrentHashMap
- * when there is usually only one thread updating the table, but 
+ * when there is usually only one thread updating the table, but
  * possibly many retrieving values from it.
  * <p>
  *
@@ -136,8 +136,8 @@ import java.util.Set;
  * @author Adapted from ConcurrentHashMap (Doug Lea)
  * @author adapted by the Groovy community
  */
-public class ConcurrentReaderHashMap 
-  extends AbstractMap 
+public class ConcurrentReaderHashMap
+  extends AbstractMap
   implements Cloneable, Serializable {
   private static final long serialVersionUID = -3225682440765612861L;
 
@@ -176,7 +176,7 @@ public class ConcurrentReaderHashMap
   protected final BarrierLock barrierLock = new BarrierLock();
 
   /**
-   * field written to only to guarantee lock ordering.
+   * field written only to guarantee lock ordering.
    **/
   protected transient Object lastWrite;
 
@@ -185,7 +185,7 @@ public class ConcurrentReaderHashMap
    * all readers to see table. Call only when already
    * holding main sync lock.
    **/
-  protected final void recordModification(Object x) { 
+  protected final void recordModification(Object x) {
     synchronized(barrierLock) {
       lastWrite = x;
     }
@@ -196,9 +196,9 @@ public class ConcurrentReaderHashMap
    * accesses will be at least as fresh as from last
    * use of barrierLock
    **/
-  protected final Entry[] getTableForReading() { 
+  protected final Entry[] getTableForReading() {
     synchronized(barrierLock) {
-      return table; 
+      return table;
     }
   }
 
@@ -207,12 +207,12 @@ public class ConcurrentReaderHashMap
    * The default initial number of table slots for this table (32).
    * Used when not otherwise specified in constructor.
    **/
-  public static final int DEFAULT_INITIAL_CAPACITY = 32; 
+  public static final int DEFAULT_INITIAL_CAPACITY = 32;
 
 
   /**
    * The minimum capacity, used if a lower value is implicitly specified
-   * by either of the constructors with arguments.  
+   * by either of the constructors with arguments.
    * MUST be a power of two.
    */
   private static final int MINIMUM_CAPACITY = 4;
@@ -229,7 +229,7 @@ public class ConcurrentReaderHashMap
    * Used when not otherwise specified in constructor.
    **/
 
-  public static final float DEFAULT_LOAD_FACTOR = 0.75f; 
+  public static final float DEFAULT_LOAD_FACTOR = 0.75f;
 
 
   /**
@@ -258,7 +258,7 @@ public class ConcurrentReaderHashMap
   protected float loadFactor;
 
   /**
-   * Returns the appropriate capacity (power of two) for the specified 
+   * Returns the appropriate capacity (power of two) for the specified
    * initial capacity argument.
    */
   private static int p2capacity(int initialCapacity) {
@@ -289,21 +289,21 @@ public class ConcurrentReaderHashMap
     return ((h << 7) - h + (h >>> 9) + (h >>> 17));
   }
 
-  /** 
-   * Check for equality of non-null references x and y. 
+  /**
+   * Check for equality of non-null references x and y.
    **/
   protected boolean eq(Object x, Object y) {
     return x == y || x.equals(y);
   }
 
   /**
-   * Constructs a new, empty map with the specified initial 
-   * capacity and the specified load factor. 
+   * Constructs a new, empty map with the specified initial
+   * capacity and the specified load factor.
    *
    * @param initialCapacity the initial capacity
    *  The actual initial capacity is rounded to the nearest power of two.
    * @param loadFactor  the load factor of the ConcurrentReaderHashMap
-   * @throws IllegalArgumentException  if the initial maximum number 
+   * @throws IllegalArgumentException  if the initial maximum number
    *               of elements is less
    *               than zero, or if the load factor is non-positive.
    */
@@ -320,12 +320,12 @@ public class ConcurrentReaderHashMap
   }
 
   /**
-   * Constructs a new, empty map with the specified initial 
+   * Constructs a new, empty map with the specified initial
    * capacity and default load factor.
    *
-   * @param   initialCapacity   the initial capacity of the 
+   * @param   initialCapacity   the initial capacity of the
    *                            ConcurrentReaderHashMap.
-   * @throws    IllegalArgumentException if the initial maximum number 
+   * @throws    IllegalArgumentException if the initial maximum number
    *              of elements is less than zero.
    */
   public ConcurrentReaderHashMap(int initialCapacity) {
@@ -389,7 +389,7 @@ public class ConcurrentReaderHashMap
     // throw null pointer exception if key null
     int hash = hash(key);
 
-    /* 
+    /*
        Start off at the apparently correct bin.  If entry is found, we
        need to check after a barrier anyway.  If not found, we need a
        barrier to check if we are actually in right bin. So either
@@ -422,7 +422,7 @@ public class ConcurrentReaderHashMap
 
       else if (e.hash == hash && eq(key, e.key)) {
         Object value = e.value;
-        if (value != null) 
+        if (value != null)
           return value;
 
         // Entry was invalidated during deletion. But it could
@@ -444,10 +444,10 @@ public class ConcurrentReaderHashMap
 
   /**
    * Tests if the specified object is a key in this table.
-   * 
+   *
    * @param   key   possible key.
-   * @return  <code>true</code> if and only if the specified object 
-   *          is a key in this table, as determined by the 
+   * @return  <code>true</code> if and only if the specified object
+   *          is a key in this table, as determined by the
    *          <tt>equals</tt> method; <code>false</code> otherwise.
    * @exception  NullPointerException  if the key is <code>null</code>.
    * @see     #contains(Object)
@@ -458,12 +458,12 @@ public class ConcurrentReaderHashMap
   }
 
   /**
-   * Maps the specified <code>key</code> to the specified 
-   * <code>value</code> in this table. Neither the key nor the 
+   * Maps the specified <code>key</code> to the specified
+   * <code>value</code> in this table. Neither the key nor the
    * value can be <code>null</code>. <p>
    *
-   * The value can be retrieved by calling the <code>get</code> method 
-   * with a key that is equal to the original key. 
+   * The value can be retrieved by calling the <code>get</code> method
+   * with a key that is equal to the original key.
    *
    * @param      key     the table key.
    * @param      value   the value.
@@ -475,7 +475,7 @@ public class ConcurrentReaderHashMap
    */
   @Override
   public Object put(Object key, Object value) {
-    if (value == null) 
+    if (value == null)
       throw new NullPointerException();
 
     int hash = hash(key);
@@ -502,7 +502,7 @@ public class ConcurrentReaderHashMap
           }
         }
         else {
-          Object oldValue = e.value; 
+          Object oldValue = e.value;
           if (first == tab[index] && oldValue != null) {
             e.value = value;
             return oldValue;
@@ -520,7 +520,7 @@ public class ConcurrentReaderHashMap
    * Continuation of put(), called only when sync lock is
    * held and interference has been detected.
    **/
-  protected Object sput(Object key, Object value, int hash) { 
+  protected Object sput(Object key, Object value, int hash) {
 
     Entry[] tab = table;
     int index = hash & (tab.length-1);
@@ -536,7 +536,7 @@ public class ConcurrentReaderHashMap
         return null;
       }
       else if (e.hash == hash && eq(key, e.key)) {
-        Object oldValue = e.value; 
+        Object oldValue = e.value;
         e.value = value;
         return oldValue;
       }
@@ -551,7 +551,7 @@ public class ConcurrentReaderHashMap
    * with a larger capacity. This method is called automatically when the
    * number of keys in this map exceeds its capacity and load factor.
    */
-  protected void rehash() { 
+  protected void rehash() {
     Entry[] oldTable = table;
     int oldCapacity = oldTable.length;
     if (oldCapacity >= MAXIMUM_CAPACITY) {
@@ -617,7 +617,7 @@ public class ConcurrentReaderHashMap
   }
 
   /**
-   * Removes the key (and its corresponding value) from this 
+   * Removes the key (and its corresponding value) from this
    * table. This method does nothing if the key is not in the table.
    *
    * @param   key   the key that needs to be removed.
@@ -629,7 +629,7 @@ public class ConcurrentReaderHashMap
   @Override
   public Object remove(Object key) {
     /*
-      Find the entry, then 
+      Find the entry, then
         1. Set value field to null, to force get() to retry
         2. Rebuild the list without this entry.
            All entries following removed node can stay in list, but
@@ -645,8 +645,8 @@ public class ConcurrentReaderHashMap
     Entry first = tab[index];
     Entry e = first;
 
-    for (e = first; e != null; e = e.next) 
-      if (e.hash == hash && eq(key, e.key)) 
+    for (e = first; e != null; e = e.next)
+      if (e.hash == hash && eq(key, e.key))
         break;
 
 
@@ -713,7 +713,7 @@ public class ConcurrentReaderHashMap
    *
    * @param value value whose presence in this map is to be tested.
    * @return <tt>true</tt> if this map maps one or more keys to the
-   * specified value.  
+   * specified value.
    * @exception  NullPointerException  if the value is <code>null</code>.
    */
   @Override
@@ -738,10 +738,10 @@ public class ConcurrentReaderHashMap
    *
    * Note that this method is identical in functionality to containsValue,
    * (which is part of the Map interface in the collections framework).
-   * 
+   *
    * @param      value   a value to search for.
    * @return     <code>true</code> if and only if some key maps to the
-   *             <code>value</code> argument in this table as 
+   *             <code>value</code> argument in this table as
    *             determined by the <tt>equals</tt> method;
    *             <code>false</code> otherwise.
    * @exception  NullPointerException  if the value is <code>null</code>.
@@ -755,8 +755,8 @@ public class ConcurrentReaderHashMap
 
 
   /**
-   * Copies all of the mappings from the specified map to this one.
-   * 
+   * Copies all the mappings from the specified map to this one.
+   *
    * These mappings replace any mappings that this map had for any of the
    * keys currently in the specified Map.
    *
@@ -790,11 +790,11 @@ public class ConcurrentReaderHashMap
   @Override
   public synchronized void clear() {
     Entry[] tab = table;
-    for (int i = 0; i < tab.length ; ++i) { 
+    for (int i = 0; i < tab.length ; ++i) {
 
       // must invalidate all to force concurrent get's to wait and then retry
-      for (Entry e = tab[i]; e != null; e = e.next) 
-        e.value = null; 
+      for (Entry e = tab[i]; e != null; e = e.next)
+        e.value = null;
 
       tab[i] = null;
     }
@@ -803,7 +803,7 @@ public class ConcurrentReaderHashMap
   }
 
   /**
-   * Returns a shallow copy of this 
+   * Returns a shallow copy of this
    * <tt>ConcurrentReaderHashMap</tt> instance: the keys and
    * values themselves are not cloned.
    *
@@ -811,7 +811,7 @@ public class ConcurrentReaderHashMap
    */
   @Override
   public synchronized Object clone() {
-    try { 
+    try {
       ConcurrentReaderHashMap t = (ConcurrentReaderHashMap)super.clone();
 
       t.keySet = null;
@@ -824,14 +824,14 @@ public class ConcurrentReaderHashMap
 
       for (int i = 0; i < tab.length; ++i) {
         Entry first = null;
-        for (Entry e = tab[i]; e != null; e = e.next) 
+        for (Entry e = tab[i]; e != null; e = e.next)
           first = new Entry(e.hash, e.key, e.value, first);
         ttab[i] = first;
       }
 
       return t;
-    } 
-    catch (CloneNotSupportedException e) { 
+    }
+    catch (CloneNotSupportedException e) {
       // this shouldn't happen, since we are Cloneable
       throw new InternalError();
     }
@@ -1044,11 +1044,11 @@ public class ConcurrentReaderHashMap
    */
   protected static class Entry implements Map.Entry {
 
-    /* 
+    /*
        The use of volatile for value field ensures that
        we can detect status changes without synchronization.
        The other fields are never changed, and are
-       marked as final. 
+       marked as final.
     */
     protected final int hash;
     protected final Object key;
@@ -1062,7 +1062,7 @@ public class ConcurrentReaderHashMap
       this.value = value;
     }
 
-    // Map.Entry Ops 
+    // Map.Entry Ops
 
     @Override
     public Object getKey() {
@@ -1077,23 +1077,23 @@ public class ConcurrentReaderHashMap
      * return null, reflecting the fact that the entry has been
      * concurrently removed. However, there are no assurances that
      * concurrent removals will be reflected using this method.
-     * 
-     * @return     the current value, or null if the entry has been 
+     *
+     * @return     the current value, or null if the entry has been
      * detectably removed.
      **/
     @Override
     public Object getValue() {
-      return value; 
+      return value;
     }
 
     /**
-     * Set the value of this entry.  Note: In an entrySet or
+     * Set the value of this entry (Note: In an entrySet or
      * entrySet.iterator), unless the set or iterator is used under
      * synchronization of the table as a whole (or you can otherwise
      * guarantee lack of concurrent modification), <tt>setValue</tt>
      * is not strictly guaranteed to actually replace the value field
      * obtained via the <tt>get</tt> operation of the underlying hash
-     * table in multi-threaded applications.  If iterator-wide
+     * table in multithreaded applications.  If iterator-wide
      * synchronization is not used, and any other concurrent
      * <tt>put</tt> or <tt>remove</tt> operations occur, sometimes
      * even to <em>other</em> entries, then this change is not
@@ -1104,7 +1104,7 @@ public class ConcurrentReaderHashMap
      * @return     the previous value, or null if entry has been detectably
      * removed.
      * @exception  NullPointerException  if the value is <code>null</code>.
-     * 
+     *
      **/
     @Override
     public Object setValue(Object value) {
@@ -1137,7 +1137,7 @@ public class ConcurrentReaderHashMap
 
   protected class HashIterator implements Iterator, Enumeration {
     protected final Entry[] tab;           // snapshot of table
-    protected int index;                   // current slot 
+    protected int index;                   // current slot
     protected Entry entry = null;          // current node of slot
     protected Object currentKey;           // key for current node
     protected Object currentValue;         // value for current node
@@ -1162,7 +1162,7 @@ public class ConcurrentReaderHashMap
         returns normally if hasNext() returns true. This avoids
         surprises especially when final element is removed during
         traversal -- instead, we just ignore the removal during
-        current traversal.  
+        current traversal.
       */
 
       for (;;) {
@@ -1225,7 +1225,7 @@ public class ConcurrentReaderHashMap
 
 
   /**
-   * Save the state of the <tt>ConcurrentReaderHashMap</tt> 
+   * Save the state of the <tt>ConcurrentReaderHashMap</tt>
    * instance to a stream (i.e.,
    * serialize it).
    *
@@ -1262,7 +1262,7 @@ public class ConcurrentReaderHashMap
   }
 
   /**
-   * Reconstitute the <tt>ConcurrentReaderHashMap</tt> 
+   * Reconstitute the <tt>ConcurrentReaderHashMap</tt>
    * instance from a stream (i.e.,
    * deserialize it).
    *
@@ -1288,14 +1288,14 @@ public class ConcurrentReaderHashMap
     }
   }
 
-  /** 
+  /**
    * @return the number of slots in this table
    **/
   public synchronized int capacity() {
     return table.length;
   }
 
-  /** 
+  /**
    * @return the load factor
    **/
   public float loadFactor() {
diff --git a/src/main/java/org/codehaus/groovy/runtime/metaclass/DefaultMetaClassInfo.java b/src/main/java/org/codehaus/groovy/runtime/metaclass/DefaultMetaClassInfo.java
index 12a01bebcc..bac00a9eae 100644
--- a/src/main/java/org/codehaus/groovy/runtime/metaclass/DefaultMetaClassInfo.java
+++ b/src/main/java/org/codehaus/groovy/runtime/metaclass/DefaultMetaClassInfo.java
@@ -29,21 +29,21 @@ public class DefaultMetaClassInfo {
     //                  boolean
     //---------------------------------------------
 
-    // if original boolean meta class
+    // if original boolean metaclass
     private static boolean origBoolean = true;
     // if origBoolean and withoutCustomHandle
     private static boolean origBooleanRes = true;
 
     /**
-     * @return  true if no meta class creation handle is set and if
-     *          the original boolean meta class is used.
+     * Returns true if no metaclass creation handle is set and if
+     * the original boolean metaclass is used.
      */
     public static boolean isOrigBool() {
         return origBooleanRes;
     }
 
     /**
-     * sets if the original boolean meta class is used
+     * Sets if the original boolean metaclass is used.
      */
     public static void setOrigBool(boolean v) {
         origBoolean = v;
@@ -54,21 +54,21 @@ public class DefaultMetaClassInfo {
     //                  byte
     //---------------------------------------------
 
-    // if original Byte meta class
+    // if original Byte metaclass
     private static boolean origByte = true;
     // if origByte and withoutCustomHandle
     private static boolean origByteRes = true;
 
     /**
-     * @return  true if no meta class creation handle is set and if
-     *          the original byte meta class is used.
+     * Returns true if no metaclass creation handle is set and if
+     * the original byte metaclass is used.
      */
     public static boolean isOrigByte() {
         return origByteRes;
     }
 
     /**
-     * sets if the original byte meta class is used
+     * Sets if the original byte metaclass is used.
      */
     public static void setOrigByte(boolean v) {
         origByte = v;
@@ -79,21 +79,21 @@ public class DefaultMetaClassInfo {
     //                  char
     //---------------------------------------------
 
-    // if original char meta class
+    // if original char metaclass
     private static boolean origChar = true;
     // if origChar and withoutCustomHandle
     private static boolean origCharRes = true;
 
     /**
-     * @return  true if no meta class creation handle is set and if
-     *          the original char meta class is used.
+     * Returns true if no metaclass creation handle is set and if
+     * the original char metaclass is used.
      */
     public static boolean isOrigChar() {
         return origCharRes;
     }
 
     /**
-     * sets if the original char meta class is used
+     * Sets if the original char metaclass is used.
      */
     public static void setOrigChar(boolean v) {
         origChar = v;
@@ -104,21 +104,21 @@ public class DefaultMetaClassInfo {
     //                  short
     //---------------------------------------------
 
-    // if original short meta class
+    // if original short metaclass
     private static boolean origShort = true;
     // if origShort and withoutCustomHandle
     private static boolean origShortRes = true;
 
     /**
-     * @return  true if no meta class creation handle is set and if
-     *          the original short meta class is used.
+     * Returns true if no metaclass creation handle is set and if
+     * the original short metaclass is used.
      */
     public static boolean isOrigShort() {
         return origShortRes;
     }
 
     /**
-     * sets if the original short meta class is used
+     * Sets if the original short metaclass is used.
      */
     public static void setOrigShort(boolean v) {
         origShort = v;
@@ -129,21 +129,21 @@ public class DefaultMetaClassInfo {
     //                  int
     //---------------------------------------------
 
-    // if original Integer meta class
+    // if original Integer metaclass
     private static boolean origInt = true;
     // if origInt and withoutCustomHandle
     private static boolean origIntRes = true;
 
     /**
-     * @return  true if no meta class creation handle is set and if
-     *          the original integer meta class is used.
+     * Returns true if no metaclass creation handle is set and if
+     * the original integer metaclass is used.
      */
     public static boolean isOrigInt() {
         return origIntRes;
     }
 
     /**
-     * sets if the original int meta class is used
+     * Sets if the original int metaclass is used.
      */
     public static void setOrigInt(boolean v) {
         origInt = v;
@@ -154,21 +154,21 @@ public class DefaultMetaClassInfo {
     //                  int[]
     //---------------------------------------------
 
-    // if original Integer[] meta class
+    // if original Integer[] metaclass
     private static boolean origIntArray = true;
     // if origInt and withoutCustomHandle
     private static boolean origIntArrayWCH = true;
 
     /**
-     * @return  true if no meta class creation handle is set and if
-     *          the original integer array meta class is used.
+     * Returns true if no metaclass creation handle is set and if
+     * the original integer array metaclass is used.
      */
     public static boolean isOrigIntArray() {
         return origIntArrayWCH;
     }
 
     /**
-     * sets if the original int array meta class is used
+     * Sets if the original int array metaclass is used.
      */
     public static void setOrigIntArray(boolean v) {
         origIntArray = v;
@@ -179,21 +179,21 @@ public class DefaultMetaClassInfo {
     //                  long
     //---------------------------------------------
 
-    // if original long meta class
+    // if original long metaclass
     private static boolean origLong = true;
     // if origLong and withoutCustomHandle
     private static boolean origLongRes = true;
 
     /**
-     * @return  true if no meta class creation handle is set and if
-     *          the original long meta class is used.
+     * Returns true if no metaclass creation handle is set and if
+     * the original long metaclass is used.
      */
     public static boolean isOrigLong() {
         return origLongRes;
     }
 
     /**
-     * sets if the original long meta class is used
+     * Sets if the original long metaclass is used.
      */
     public static void setOrigLong(boolean v) {
         origLong = v;
@@ -204,21 +204,21 @@ public class DefaultMetaClassInfo {
     //                  float
     //---------------------------------------------
 
-    // if original float meta class
+    // if original float metaclass
     private static boolean origFloat = true;
     // if origFloat and withoutCustomHandle
     private static boolean origFloatRes = true;
 
     /**
-     * @return  true if no meta class creation handle is set and if
-     *          the original float meta class is used.
+     * Returns true if no metaclass creation handle is set and if
+     * the original float metaclass is used.
      */
     public static boolean isOrigFloat() {
         return origFloatRes;
     }
 
     /**
-     * sets if the original float meta class is used
+     * Sets if the original float metaclass is used.
      */
     public static void setOrigFloat(boolean v) {
         origFloat = v;
@@ -229,21 +229,21 @@ public class DefaultMetaClassInfo {
     //                  double
     //---------------------------------------------
 
-    // if original double meta class
+    // if original double metaclass
     private static boolean origDouble = true;
     // if origFloat and withoutCustomHandle
     private static boolean origDoubleRes = true;
 
     /**
-     * @return  true if no meta class creation handle is set and if
-     *          the original double meta class is used.
+     * Returns true if no metaclass creation handle is set and if
+     * the original double metaclass is used.
      */
     public static boolean isOrigDouble() {
         return origDoubleRes;
     }
 
     /**
-     * sets if the original double meta class is used
+     * Sets if the original double metaclass is used.
      */
     public static void setOrigDouble(boolean v) {
         origDouble = v;
@@ -251,14 +251,14 @@ public class DefaultMetaClassInfo {
     }
 
     //---------------------------------------------
-    //     custom meta class creation handle
+    //     custom metaclass creation handle
     //---------------------------------------------
 
-    // if a custom meta class creation handle is set
+    // if a custom metaclass creation handle is set
     private static boolean withoutCustomHandle = true;
 
     /**
-     * sets if the system uses a custom meta class creation handle
+     * Sets if the system uses a custom metaclass creation handle.
      */
     public static void setWithoutCustomMetaclassCreationHandle(boolean mch) {
         withoutCustomHandle = mch;
@@ -278,7 +278,7 @@ public class DefaultMetaClassInfo {
 
     public static boolean disabledStandardMetaClass() {
         return disabledStandardMC;
-    }    
+    }
 
 
     private static void changeFlags(boolean mch) {
@@ -293,7 +293,7 @@ public class DefaultMetaClassInfo {
             origByteRes = origByte; origCharRes = origChar;
             origBooleanRes = origBoolean; origShortRes = origShort;
             origIntRes = origInt; origLongRes = origLong;
-            origFloatRes = origFloat; origDoubleRes = origDouble; 
+            origFloatRes = origFloat; origDoubleRes = origDouble;
             origIntArrayWCH = origIntArray;
         }
     }
@@ -309,7 +309,7 @@ public class DefaultMetaClassInfo {
             setOrigInt(orig);
         } else if (c.getComponentType()==Integer.class) {
             setOrigIntArray(orig);
-        } else if (c==Long.class) { 
+        } else if (c==Long.class) {
             setOrigLong(orig);
         } else if (c==Float.class) {
             setOrigFloat(orig);
@@ -323,7 +323,7 @@ public class DefaultMetaClassInfo {
     //         GlobalMetaClassVersioning
     //---------------------------------------------
     public static class ConstantMetaClassVersioning {
-        private boolean valid = true; 
+        private boolean valid = true;
         public boolean isValid(){return valid;}
     }
     private static ConstantMetaClassVersioning constantMetaClassVersioning = new ConstantMetaClassVersioning();
diff --git a/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java b/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
index 59cb1ace1e..8b33af99b7 100644
--- a/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
+++ b/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
@@ -99,7 +99,7 @@ public class MetaClassRegistryImpl implements MetaClassRegistry{
     }
 
     /**
-     * @param useAccessible defines whether or not the {@link java.lang.reflect.AccessibleObject#setAccessible(boolean)}
+     * @param useAccessible defines whether the {@link java.lang.reflect.AccessibleObject#setAccessible(boolean)}
      *                      method will be called to enable access to all methods when using reflection
      */
     public MetaClassRegistryImpl(boolean useAccessible) {
@@ -146,7 +146,7 @@ public class MetaClassRegistryImpl implements MetaClassRegistry{
         addNonRemovableMetaClassRegistryChangeEventListener(cmcu -> {
             // The calls to DefaultMetaClassInfo.setPrimitiveMeta and sdyn.setBoolean need to be
             // ordered. Even though metaClassInfo is thread-safe, it is included in the block
-            // so the meta classes are added to the queue in the same order.
+            // so the metaclasses are added to the queue in the same order.
             synchronized (metaClassInfo) {
                metaClassInfo.add(cmcu.getNewMetaClass());
                DefaultMetaClassInfo.getNewConstantMetaClassVersioning();
@@ -274,7 +274,7 @@ public class MetaClassRegistryImpl implements MetaClassRegistry{
     }
 
     /**
-     * if oldMc is null, newMc will replace whatever meta class was used before.
+     * if oldMc is null, newMc will replace whatever metaclass was used before.
      * if oldMc is not null, then newMc will be used only if the stored mc is
      * the same as oldMc
      */
@@ -361,7 +361,7 @@ public class MetaClassRegistryImpl implements MetaClassRegistry{
     }
 
     /**
-     * Adds a listener for constant meta classes.
+     * Adds a listener for constant metaclasses.
      * @param listener the listener
      */
     @Override
@@ -373,7 +373,7 @@ public class MetaClassRegistryImpl implements MetaClassRegistry{
 
 
     /**
-     * Adds a listener for constant meta classes. This listener cannot be removed!
+     * Adds a listener for constant metaclasses. This listener cannot be removed!
      * @param listener the listener
      */
     @Override
@@ -384,7 +384,7 @@ public class MetaClassRegistryImpl implements MetaClassRegistry{
     }
 
     /**
-     * Removes a constant meta class listener.
+     * Removes a constant metaclass listener.
      * @param listener the listener
      */
     @Override
@@ -455,10 +455,10 @@ public class MetaClassRegistryImpl implements MetaClassRegistry{
     }
 
     /**
-     * Returns an iterator to iterate over all constant meta classes.
+     * Returns an iterator to iterate over all constant metaclasses.
      * This iterator can be seen as making a snapshot of the current state
-     * of the registry. The snapshot will include all meta classes that has
-     * been used unless they are already collected. Collected meta classes
+     * of the registry. The snapshot will include all metaclasses that has
+     * been used unless they are already collected. Collected metaclasses
      * will be skipped automatically, so you can expect that each element
      * of the iteration is not null. Calling this method is thread safe, the
      * usage of the iterator is not.
@@ -472,7 +472,7 @@ public class MetaClassRegistryImpl implements MetaClassRegistry{
         return new Iterator() {
             // index in the ref array
             private int index = 0;
-            // the current meta class
+            // the current metaclass
             private MetaClass currentMeta;
             // used to ensure that hasNext has been called
             private boolean hasNextCalled = false;
diff --git a/src/main/java/org/codehaus/groovy/runtime/metaclass/MultipleSetterProperty.java b/src/main/java/org/codehaus/groovy/runtime/metaclass/MultipleSetterProperty.java
index 7d03e3f3ce..436fa13832 100644
--- a/src/main/java/org/codehaus/groovy/runtime/metaclass/MultipleSetterProperty.java
+++ b/src/main/java/org/codehaus/groovy/runtime/metaclass/MultipleSetterProperty.java
@@ -27,7 +27,7 @@ import org.codehaus.groovy.runtime.MetaClassHelper;
 
 /**
  * This class represents a property with multiple setters. Unlike a MetaBeanProperty you cannot get the setter
- * in this case. Instead invocation is done through the meta class of the property recevier.
+ * in this case. Instead invocation is done through the metaclass of the property receiver.
  */
 public class MultipleSetterProperty extends MetaProperty {
     private MetaMethod getter;
diff --git a/src/main/java/org/codehaus/groovy/runtime/metaclass/NewInstanceMetaMethod.java b/src/main/java/org/codehaus/groovy/runtime/metaclass/NewInstanceMetaMethod.java
index 4b2dd97319..03e83be815 100644
--- a/src/main/java/org/codehaus/groovy/runtime/metaclass/NewInstanceMetaMethod.java
+++ b/src/main/java/org/codehaus/groovy/runtime/metaclass/NewInstanceMetaMethod.java
@@ -43,7 +43,7 @@ public class NewInstanceMetaMethod extends NewMetaMethod {
 
     @Override
     public int getModifiers() {
-        // lets clear the static bit
+        // let's clear the static bit
         return Modifier.PUBLIC;
     }
 
diff --git a/src/main/java/org/codehaus/groovy/runtime/typehandling/DefaultTypeTransformation.java b/src/main/java/org/codehaus/groovy/runtime/typehandling/DefaultTypeTransformation.java
index 00b3288203..40c1f00354 100644
--- a/src/main/java/org/codehaus/groovy/runtime/typehandling/DefaultTypeTransformation.java
+++ b/src/main/java/org/codehaus/groovy/runtime/typehandling/DefaultTypeTransformation.java
@@ -373,7 +373,7 @@ public class DefaultTypeTransformation {
 
         Object[] args = null;
         if (object instanceof Collection) {
-            // let's try invoke the constructor with the list as arguments
+            // let's try to invoke the constructor with the list as arguments
             // such as for creating a Dimension, Point, Color etc.
             Collection collection = (Collection) object;
             args = collection.toArray();


[groovy] 03/08: Polish org.codehaus.groovy package documentation

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 2ca6b35b28a99c343b26fc3b79e5ada0131f8370
Author: Marc Wrobel <ma...@gmail.com>
AuthorDate: Tue Oct 18 14:46:43 2022 +0200

    Polish org.codehaus.groovy package documentation
    
    Fix typos and improve documentation (javadoc, comments) in the org.codehaus.groovy package. A typo in the Grape resolve command were also fixed.
    
    Note that the following words / expressions were preferred :
    
    - all of the -> all the (when possible because it is easier to read),
    - whether or not -> whether (when possible because it is easier to read),
    - sub-type -> subtype (more common, see https://docs.oracle.com/javase/tutorial/java/generics/subtyping.html),
    - sub-class -> subclass (more common, see https://docs.oracle.com/javase/tutorial/java/IandI/subclasses.html),
    - meta class -> metaclass (incorrect, see https://en.wikipedia.org/wiki/Metaclass).
    
    Trailing whitespaces were also removed in the process.
---
 .../org/codehaus/groovy/tools/GrapeMain.groovy     |  2 +-
 .../java/org/codehaus/groovy/GroovyBugError.java   |  2 +-
 .../codehaus/groovy/control/ClassNodeResolver.java |  4 +--
 .../codehaus/groovy/control/CompilationUnit.java   |  4 +--
 .../org/codehaus/groovy/control/CompilePhase.java  |  4 +--
 .../groovy/control/ConfigurationException.java     |  2 +-
 .../codehaus/groovy/control/ErrorCollector.java    |  2 +-
 .../codehaus/groovy/control/GenericsVisitor.java   |  2 +-
 .../groovy/control/InstanceOfVerifier.java         |  2 +-
 .../codehaus/groovy/control/ResolveVisitor.java    |  8 ++---
 .../codehaus/groovy/control/StaticVerifier.java    |  2 +-
 .../control/customizers/ImportCustomizer.java      |  2 +-
 .../customizers/builder/PostCompletionFactory.java |  2 +-
 .../groovy/control/io/AbstractReaderSource.java    |  4 +--
 .../groovy/control/io/InputStreamReaderSource.java |  2 +-
 .../org/codehaus/groovy/control/io/NullWriter.java |  2 +-
 .../codehaus/groovy/control/io/ReaderSource.java   |  2 +-
 .../org/codehaus/groovy/reflection/ClassInfo.java  |  4 +--
 .../codehaus/groovy/reflection/ParameterTypes.java |  8 ++---
 .../groovy/reflection/ReflectionUtils.java         |  2 +-
 .../reflection/v7/GroovyClassValueJava7.java       |  2 +-
 .../java/org/codehaus/groovy/syntax/CSTNode.java   |  2 +-
 .../java/org/codehaus/groovy/syntax/Types.java     |  4 +--
 .../org/codehaus/groovy/tools/StringHelper.java    | 14 ++++-----
 .../groovy/tools/javac/JavaStubGenerator.java      |  2 +-
 .../groovy/tools/shell/util/MessageSource.java     |  2 +-
 .../groovy/transform/ASTTransformationVisitor.java |  4 +--
 .../transform/AnnotationCollectorTransform.java    |  2 +-
 .../transform/BaseScriptASTTransformation.java     |  4 +--
 .../InheritConstructorsASTTransformation.java      |  2 +-
 .../groovy/transform/stc/ExtensionMethodCache.java |  2 +-
 .../stc/GroovyTypeCheckingExtensionSupport.java    |  2 +-
 .../groovy/transform/stc/SecondPassExpression.java |  2 +-
 .../transform/stc/StaticTypeCheckingSupport.java   |  8 ++---
 .../transform/stc/StaticTypeCheckingVisitor.java   |  8 ++---
 .../ReturnStatementToIterationConverter.java       |  2 +-
 .../codehaus/groovy/util/CharSequenceReader.java   |  4 +--
 .../codehaus/groovy/util/LongArrayIterator.java    |  2 +-
 .../codehaus/groovy/util/ManagedLinkedList.java    |  2 +-
 .../org/codehaus/groovy/vmplugin/VMPlugin.java     |  4 +--
 .../codehaus/groovy/vmplugin/v8/IndyInterface.java |  2 +-
 .../org/codehaus/groovy/vmplugin/v8/IndyMath.java  |  2 +-
 .../org/codehaus/groovy/vmplugin/v8/Selector.java  | 36 +++++++++++-----------
 .../groovy/vmplugin/v8/TypeTransformers.java       |  8 ++---
 .../org/codehaus/groovy/vmplugin/v9/Java9.java     |  2 +-
 45 files changed, 93 insertions(+), 93 deletions(-)

diff --git a/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy b/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy
index c2c0f16ac9..4da7308163 100644
--- a/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy
+++ b/src/main/groovy/org/codehaus/groovy/tools/GrapeMain.groovy
@@ -200,7 +200,7 @@ class GrapeMain implements Runnable {
     @Command(name = 'resolve', header = 'Enumerates the jars used by a grape',
             customSynopsis = 'grape resolve [-adhisv] (<groupId> <artifactId> <version>)+',
             description = [
-                    'Prints the file locations of the jars representing the artifcats for the specified module(s) and the respective transitive dependencies.',
+                    'Prints the file locations of the jars representing the artifacts for the specified module(s) and the respective transitive dependencies.',
                     '',
                     'Parameters:',
                     '      <group>     Which module group the module comes from. Translates directly',
diff --git a/src/main/java/org/codehaus/groovy/GroovyBugError.java b/src/main/java/org/codehaus/groovy/GroovyBugError.java
index 58cf8e64b8..af32df52bf 100644
--- a/src/main/java/org/codehaus/groovy/GroovyBugError.java
+++ b/src/main/java/org/codehaus/groovy/GroovyBugError.java
@@ -73,7 +73,7 @@ public class GroovyBugError extends AssertionError {
 
     /**
      * Returns the detail message string of this error. The message
-     * will consist of the bug text prefixed by "BUG! " if there this
+     * will consist of the bug text prefixed by "BUG! " if this
      * instance was created using a message. If this error was
      * constructed without using a bug text the message of the cause
      * is used prefixed by "BUG! UNCAUGHT EXCEPTION: "
diff --git a/src/main/java/org/codehaus/groovy/control/ClassNodeResolver.java b/src/main/java/org/codehaus/groovy/control/ClassNodeResolver.java
index d56d021f55..8be558d3e1 100644
--- a/src/main/java/org/codehaus/groovy/control/ClassNodeResolver.java
+++ b/src/main/java/org/codehaus/groovy/control/ClassNodeResolver.java
@@ -77,7 +77,7 @@ public class ClassNodeResolver {
          */
         public boolean isClassNode() { return cn!=null; }
         /**
-         * returns true if a SourecUnit is stored
+         * returns true if a SourceUnit is stored
          */
         public boolean isSourceUnit() { return su!=null; }
         /**
@@ -254,7 +254,7 @@ public class ClassNodeResolver {
             try {
                 asmClass = new DecompiledClassNode(AsmDecompiler.parseClass(resource), new AsmReferenceResolver(this, compilationUnit));
                 if (!asmClass.getName().equals(name)) {
-                    // this may happen under Windows because getResource is case insensitive under that OS!
+                    // this may happen under Windows because getResource is case-insensitive under that OS!
                     asmClass = null;
                 }
             } catch (IOException e) {
diff --git a/src/main/java/org/codehaus/groovy/control/CompilationUnit.java b/src/main/java/org/codehaus/groovy/control/CompilationUnit.java
index 23081686ca..974a4f8db8 100644
--- a/src/main/java/org/codehaus/groovy/control/CompilationUnit.java
+++ b/src/main/java/org/codehaus/groovy/control/CompilationUnit.java
@@ -577,7 +577,7 @@ public class CompilationUnit extends ProcessingUnit {
     }
 
     /**
-     * Adds a ClassNode directly to the unit (ie. without source).
+     * Adds a ClassNode directly to the unit (i.e. without source).
      * WARNING: the source is needed for error reporting, using
      * this method without setting a SourceUnit will cause
      * NullPinterExceptions
@@ -774,7 +774,7 @@ public class CompilationUnit extends ProcessingUnit {
             visitor = new ExtendedVerifier(source);
             visitor.visitClass(classNode);
 
-            // because the class may be generated even if a error was found
+            // because the class may be generated even if an error was found
             // and that class may have an invalid format we fail here if needed
             getErrorCollector().failIfErrors();
 
diff --git a/src/main/java/org/codehaus/groovy/control/CompilePhase.java b/src/main/java/org/codehaus/groovy/control/CompilePhase.java
index 9c45c3c85c..207f55c3ee 100644
--- a/src/main/java/org/codehaus/groovy/control/CompilePhase.java
+++ b/src/main/java/org/codehaus/groovy/control/CompilePhase.java
@@ -30,7 +30,7 @@ public enum CompilePhase {
     INITIALIZATION(Phases.INITIALIZATION),
 
     /**
-    * the grammar is used to to produce tree of tokens representing the source code
+    * the grammar is used to produce tree of tokens representing the source code
     */
     PARSING(Phases.PARSING),
 
@@ -92,7 +92,7 @@ public enum CompilePhase {
     }
 
     /**
-    * Returns the underlieng integer Phase number.
+    * Returns the underlying integer Phase number.
     */
     public int getPhaseNumber() {
         return phaseNumber;
diff --git a/src/main/java/org/codehaus/groovy/control/ConfigurationException.java b/src/main/java/org/codehaus/groovy/control/ConfigurationException.java
index 68f56d2a5c..1dd92d2622 100644
--- a/src/main/java/org/codehaus/groovy/control/ConfigurationException.java
+++ b/src/main/java/org/codehaus/groovy/control/ConfigurationException.java
@@ -52,7 +52,7 @@ public class ConfigurationException extends RuntimeException implements GroovyEx
     }
 
     /**
-     * Its always fatal.
+     * It's always fatal.
      */
     @Override
     public boolean isFatal() {
diff --git a/src/main/java/org/codehaus/groovy/control/ErrorCollector.java b/src/main/java/org/codehaus/groovy/control/ErrorCollector.java
index 94668b2a42..af59e50fc7 100644
--- a/src/main/java/org/codehaus/groovy/control/ErrorCollector.java
+++ b/src/main/java/org/codehaus/groovy/control/ErrorCollector.java
@@ -117,7 +117,7 @@ public class ErrorCollector implements Serializable {
      * The message is not required to have a source line and column specified, but it is best practice to try
      * and include that information.
      * @param fatal
-     *      if true then then processing will stop
+     *      if true then processing will stop
      */
     public void addError(final Message message, final boolean fatal) throws CompilationFailedException {
         if (fatal) {
diff --git a/src/main/java/org/codehaus/groovy/control/GenericsVisitor.java b/src/main/java/org/codehaus/groovy/control/GenericsVisitor.java
index c596e036ea..515bbb7934 100644
--- a/src/main/java/org/codehaus/groovy/control/GenericsVisitor.java
+++ b/src/main/java/org/codehaus/groovy/control/GenericsVisitor.java
@@ -167,7 +167,7 @@ public class GenericsVisitor extends ClassCodeVisitorSupport {
             addError(message, cn);
             return;
         }
-        // parameterize a type by using all of the parameters only
+        // parameterize a type by using all the parameters only
         if (cnTypes.length != rnTypes.length) {
             if (Boolean.FALSE.equals(isAIC) && cnTypes.length == 0) {
                 return; // allow Diamond for non-AIC cases from CCE
diff --git a/src/main/java/org/codehaus/groovy/control/InstanceOfVerifier.java b/src/main/java/org/codehaus/groovy/control/InstanceOfVerifier.java
index 8eacaf2da5..9ccd27a051 100644
--- a/src/main/java/org/codehaus/groovy/control/InstanceOfVerifier.java
+++ b/src/main/java/org/codehaus/groovy/control/InstanceOfVerifier.java
@@ -45,7 +45,7 @@ public abstract class InstanceOfVerifier extends ClassCodeVisitorSupport {
                     addTypeError(expression.getRightExpression(), "type parameter " + referenceType.getUnresolvedName() +
                         ". Use its erasure " + referenceType.getNameWithoutPackage() + " instead since further generic type information will be erased at runtime");
                 } else if (referenceType.getGenericsTypes() != null) {
-                    // TODO: Cannot perform instanceof check against parameterized type Class<Type>. Use the form Class<?> instead since further eneric type information will be erased at runtime
+                    // TODO: Cannot perform instanceof check against parameterized type Class<Type>. Use the form Class<?> instead since further generic type information will be erased at runtime
                 }
             }
         }
diff --git a/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java b/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
index 31ab094b0f..c2eee6a3af 100644
--- a/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
+++ b/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
@@ -155,7 +155,7 @@ public class ResolveVisitor extends ClassCodeExpressionTransformer {
      * does when combining package names and class names. The idea
      * that if we use a package, then we do not want to replace the
      * '.' with a '$' for the package part, only for the class name
-     * part. There is also the case of a imported class, so this logic
+     * part. There is also the case of an imported class, so this logic
      * can't be done in these cases...
      */
     private static class ConstructedClassWithPackage extends ClassNode {
@@ -653,7 +653,7 @@ public class ResolveVisitor extends ClassCodeExpressionTransformer {
                     // At this point we know that we have a match for pname. This may
                     // mean, that name[pname.length()..<-1] is a static inner class.
                     // For this the rest of the name does not need any dots in its name.
-                    // It is either completely a inner static class or it is not.
+                    // It is either completely an inner static class or it is not.
                     // Since we do not want to have useless lookups we create the name
                     // completely and use a ConstructedClassWithPackage to prevent lookups against the package.
                     String className = aliasedNode.getNameWithoutPackage() + "$" + name.substring(pname.length() + 1).replace('.', '$');
@@ -764,7 +764,7 @@ public class ResolveVisitor extends ClassCodeExpressionTransformer {
             classNodeResolver = new ClassNodeResolver();
         // We do not need to check instances of LowerCaseClass
         // to be a Class, because unless there was an import for
-        // for this we do not lookup these cases. This was a decision
+        // this we do not look up these cases. This was a decision
         // made on the mailing list. To ensure we will not visit this
         // method again we set a NO_CLASS for this name
         if (type instanceof LowerCaseClass) {
@@ -872,7 +872,7 @@ public class ResolveVisitor extends ClassCodeExpressionTransformer {
         return tuple(name, Boolean.FALSE);
     }
 
-    // iterate from the inner most to the outer and check for classes
+    // iterate from the innermost to the outer and check for classes
     // this check will ignore a .class property, for Example Integer.class will be
     // a PropertyExpression with the ClassExpression of Integer as objectExpression
     // and class as property
diff --git a/src/main/java/org/codehaus/groovy/control/StaticVerifier.java b/src/main/java/org/codehaus/groovy/control/StaticVerifier.java
index 59bd2f9e33..3d7d27758a 100644
--- a/src/main/java/org/codehaus/groovy/control/StaticVerifier.java
+++ b/src/main/java/org/codehaus/groovy/control/StaticVerifier.java
@@ -88,7 +88,7 @@ public class StaticVerifier extends ClassCodeVisitorSupport {
     @Override
     public void visitVariableExpression(VariableExpression ve) {
         if (ve.getAccessedVariable() instanceof DynamicVariable && (ve.isInStaticContext() || inSpecialConstructorCall) && !inClosure) {
-            // GROOVY-5687: interface constants not visible to implementing sub-class in static context
+            // GROOVY-5687: interface constants not visible to implementing subclass in static context
             if (methodNode != null && methodNode.isStatic()) {
                 FieldNode fieldNode = getDeclaredOrInheritedField(methodNode.getDeclaringClass(), ve.getName());
                 if (fieldNode != null && fieldNode.isStatic()) {
diff --git a/src/main/java/org/codehaus/groovy/control/customizers/ImportCustomizer.java b/src/main/java/org/codehaus/groovy/control/customizers/ImportCustomizer.java
index d1bf9d01a5..971c397d6c 100644
--- a/src/main/java/org/codehaus/groovy/control/customizers/ImportCustomizer.java
+++ b/src/main/java/org/codehaus/groovy/control/customizers/ImportCustomizer.java
@@ -29,7 +29,7 @@ import java.util.LinkedList;
 import java.util.List;
 
 /**
- * This compilation customizer allows addiing various types of imports to the compilation unit. Supports adding:
+ * This compilation customizer allows adding various types of imports to the compilation unit. Supports adding:
  * <ul>
  *     <li>standard imports via {@link #addImports(String...)} or {@link #addImport(String, String)}</li>
  *     <li>star imports via {@link #addStarImports(String...)}</li>
diff --git a/src/main/java/org/codehaus/groovy/control/customizers/builder/PostCompletionFactory.java b/src/main/java/org/codehaus/groovy/control/customizers/builder/PostCompletionFactory.java
index d18564cb66..b7a24c96a3 100644
--- a/src/main/java/org/codehaus/groovy/control/customizers/builder/PostCompletionFactory.java
+++ b/src/main/java/org/codehaus/groovy/control/customizers/builder/PostCompletionFactory.java
@@ -21,7 +21,7 @@ package org.codehaus.groovy.control.customizers.builder;
 import groovy.util.FactoryBuilderSupport;
 
 /**
- * A helper interface for factories which require post processing of generated nodes.
+ * A helper interface for factories which require post-processing of generated nodes.
  *
  * @since 2.1.0
  */
diff --git a/src/main/java/org/codehaus/groovy/control/io/AbstractReaderSource.java b/src/main/java/org/codehaus/groovy/control/io/AbstractReaderSource.java
index df9c11e614..37f764e8d8 100644
--- a/src/main/java/org/codehaus/groovy/control/io/AbstractReaderSource.java
+++ b/src/main/java/org/codehaus/groovy/control/io/AbstractReaderSource.java
@@ -37,8 +37,8 @@ public abstract class AbstractReaderSource implements ReaderSource {
     }
 
     /**
-     * Returns true if the source can be restarted (ie. if getReader()
-     * will return non-null on subsequent calls.
+     * Returns true if the source can be restarted (i.e. if getReader()
+     * will return non-null on subsequent calls).
      */
     @Override
     public boolean canReopenSource() {
diff --git a/src/main/java/org/codehaus/groovy/control/io/InputStreamReaderSource.java b/src/main/java/org/codehaus/groovy/control/io/InputStreamReaderSource.java
index c4bcd0c381..f2fcec42b8 100644
--- a/src/main/java/org/codehaus/groovy/control/io/InputStreamReaderSource.java
+++ b/src/main/java/org/codehaus/groovy/control/io/InputStreamReaderSource.java
@@ -58,7 +58,7 @@ public class InputStreamReaderSource extends AbstractReaderSource {
 
     /**
      * Returns true if the source can be restarted (ie. if getReader()
-     * will return non-null on subsequent calls.
+     * will return non-null on subsequent calls).
      */
     @Override
     public boolean canReopenSource() {
diff --git a/src/main/java/org/codehaus/groovy/control/io/NullWriter.java b/src/main/java/org/codehaus/groovy/control/io/NullWriter.java
index 0efc9f4660..6ac4859dfc 100644
--- a/src/main/java/org/codehaus/groovy/control/io/NullWriter.java
+++ b/src/main/java/org/codehaus/groovy/control/io/NullWriter.java
@@ -21,7 +21,7 @@ package org.codehaus.groovy.control.io;
 import java.io.Writer;
 
 /**
- *  An Writer than eats its input.
+ *  A Writer that eats its input.
  */
 public class NullWriter extends Writer {
     public static final NullWriter DEFAULT = new NullWriter();
diff --git a/src/main/java/org/codehaus/groovy/control/io/ReaderSource.java b/src/main/java/org/codehaus/groovy/control/io/ReaderSource.java
index 95a1d1bcb5..d199ebfe99 100644
--- a/src/main/java/org/codehaus/groovy/control/io/ReaderSource.java
+++ b/src/main/java/org/codehaus/groovy/control/io/ReaderSource.java
@@ -40,7 +40,7 @@ public interface ReaderSource extends HasCleanup {
 
    /**
     *  Returns true if the source can be restarted (ie. if getReader()
-    *  will return non-null on subsequent calls.
+    *  will return non-null on subsequent calls).
     * @return true if the resource can be reopened for reading
     */
     boolean canReopenSource();
diff --git a/src/main/java/org/codehaus/groovy/reflection/ClassInfo.java b/src/main/java/org/codehaus/groovy/reflection/ClassInfo.java
index f01cb3bcd7..f85d87627f 100644
--- a/src/main/java/org/codehaus/groovy/reflection/ClassInfo.java
+++ b/src/main/java/org/codehaus/groovy/reflection/ClassInfo.java
@@ -62,7 +62,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 /**
  * Handle for all information we want to keep about the class
  * <p>
- * This class handles caching internally and its advisable to not store
+ * This class handles caching internally and it's advisable to not store
  * references directly to objects of this class.  The static factory method
  * {@link ClassInfo#getClassInfo(Class)} should be used to retrieve an instance
  * from the cache.  Internally the {@code Class} associated with a {@code ClassInfo}
@@ -299,7 +299,7 @@ public class ClassInfo implements Finalizable {
      * If no {@code MetaClass} exists one will be created.
      * <p>
      * It is not safe to call this method without a {@code Class} associated with this {@code ClassInfo}.
-     * It is advisable to aways retrieve a ClassInfo instance from the cache by using the static
+     * It is advisable to always retrieve a ClassInfo instance from the cache by using the static
      * factory method {@link ClassInfo#getClassInfo(Class)} to ensure the referenced Class is
      * strongly reachable.
      *
diff --git a/src/main/java/org/codehaus/groovy/reflection/ParameterTypes.java b/src/main/java/org/codehaus/groovy/reflection/ParameterTypes.java
index 4f1ca86d40..cdbbd6f414 100644
--- a/src/main/java/org/codehaus/groovy/reflection/ParameterTypes.java
+++ b/src/main/java/org/codehaus/groovy/reflection/ParameterTypes.java
@@ -196,7 +196,7 @@ public class ParameterTypes {
             return newArgs;
         } else if (argumentArray.length == paramTypes.length) {
             // the number of arguments is correct, but if the last argument
-            // is no array we have to wrap it in a array. If the last argument
+            // is no array we have to wrap it in an array. If the last argument
             // is null, then we don't have to do anything
             Object lastArgument = argumentArray[argumentArray.length - 1];
             if (lastArgument != null && !lastArgument.getClass().isArray()) {
@@ -250,7 +250,7 @@ public class ParameterTypes {
     }
 
     private static boolean isValidExactMethod(Class[] arguments, CachedClass[] pt) {
-        // lets check the parameter types match
+        // let's check the parameter types match
         int size = pt.length;
         for (int i = 0; i < size; i++) {
             if (!pt[i].isAssignableFrom(arguments[i])) {
@@ -261,7 +261,7 @@ public class ParameterTypes {
     }
 
     public boolean isValidExactMethod(Object[] args) {
-        // lets check the parameter types match
+        // let's check the parameter types match
         getParametersTypes0();
         int size = args.length;
         if (size != parameterTypes.length)
@@ -277,7 +277,7 @@ public class ParameterTypes {
     }
 
     public boolean isValidExactMethod(Class[] args) {
-        // lets check the parameter types match
+        // let's check the parameter types match
         getParametersTypes0();
         int size = args.length;
         if (size != parameterTypes.length)
diff --git a/src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java b/src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java
index dc390437d4..f88205fd0a 100644
--- a/src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java
+++ b/src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java
@@ -78,7 +78,7 @@ public class ReflectionUtils {
     private static final ClassContextHelper HELPER = new ClassContextHelper();
 
     /**
-     * Determines whether or not the getCallingClass methods will return
+     * Determines whether the getCallingClass methods will return
      * any sensible results.  On JVMs that are not Sun derived i.e.
      * (gcj, Harmony) this will likely return false.  When not available
      * all getCallingClass methods will return null.
diff --git a/src/main/java/org/codehaus/groovy/reflection/v7/GroovyClassValueJava7.java b/src/main/java/org/codehaus/groovy/reflection/v7/GroovyClassValueJava7.java
index a964a3e7d5..fea3d9e621 100644
--- a/src/main/java/org/codehaus/groovy/reflection/v7/GroovyClassValueJava7.java
+++ b/src/main/java/org/codehaus/groovy/reflection/v7/GroovyClassValueJava7.java
@@ -20,7 +20,7 @@ package org.codehaus.groovy.reflection.v7;
 
 import org.codehaus.groovy.reflection.GroovyClassValue;
 
-/** GroovyClassValue implementaion that simply delegates to Java 7's java.lang.ClassValue
+/** GroovyClassValue implementation that simply delegates to Java 7's java.lang.ClassValue
  * @see java.lang.ClassValue
  *
  * @param <T>
diff --git a/src/main/java/org/codehaus/groovy/syntax/CSTNode.java b/src/main/java/org/codehaus/groovy/syntax/CSTNode.java
index 821f14949c..38b0762f10 100644
--- a/src/main/java/org/codehaus/groovy/syntax/CSTNode.java
+++ b/src/main/java/org/codehaus/groovy/syntax/CSTNode.java
@@ -158,7 +158,7 @@ public abstract class CSTNode {
     }
 
     /**
-     * Returns true if the node an its first four children match the
+     * Returns true if the node and its first four children match the
      * specified types.  Missing nodes have type Types.NULL.
      */
     boolean matches(int type, int child1, int child2, int child3, int child4) {
diff --git a/src/main/java/org/codehaus/groovy/syntax/Types.java b/src/main/java/org/codehaus/groovy/syntax/Types.java
index 4cf90c40b0..12d19f2649 100644
--- a/src/main/java/org/codehaus/groovy/syntax/Types.java
+++ b/src/main/java/org/codehaus/groovy/syntax/Types.java
@@ -1106,7 +1106,7 @@ public class Types {
 
 
     /**
-     * Adds a element to the TEXTS and LOOKUP.
+     * Adds an element to the TEXTS and LOOKUP.
      */
     private static void addTranslation(String text, int type) {
         TEXTS.put(type, text);
@@ -1114,7 +1114,7 @@ public class Types {
     }
 
     /**
-     * Adds a element to the KEYWORDS, TEXTS and LOOKUP.
+     * Adds an element to the KEYWORDS, TEXTS and LOOKUP.
      */
     private static void addKeyword(String text, int type) {
         KEYWORDS.add(text);
diff --git a/src/main/java/org/codehaus/groovy/tools/StringHelper.java b/src/main/java/org/codehaus/groovy/tools/StringHelper.java
index c01388a3dc..d5cfc9be16 100644
--- a/src/main/java/org/codehaus/groovy/tools/StringHelper.java
+++ b/src/main/java/org/codehaus/groovy/tools/StringHelper.java
@@ -27,12 +27,12 @@ public class StringHelper {
     private static final String[] EMPTY_STRING_ARRAY = new String[0];
 
     /**
-     * This method tokenizes a string by space characters, 
-     * but ignores spaces in quoted parts,that are parts in 
-     * '' or "". The method does allows the usage of "" in '' 
-     * and '' in "". The space character between tokens is not 
-     * returned. 
-     * 
+     * This method tokenizes a string by space characters,
+     * but ignores spaces in quoted parts,that are parts in
+     * '' or "". The method allows the usage of "" in ''
+     * and '' in "". The space character between tokens is not
+     * returned.
+     *
      * @param s the string to tokenize
      * @return the tokens
      */
@@ -82,5 +82,5 @@ public class StringHelper {
             pos++;
         }
         return pos;
-    } 
+    }
 }
diff --git a/src/main/java/org/codehaus/groovy/tools/javac/JavaStubGenerator.java b/src/main/java/org/codehaus/groovy/tools/javac/JavaStubGenerator.java
index 8542cd060c..b5fa76ae70 100644
--- a/src/main/java/org/codehaus/groovy/tools/javac/JavaStubGenerator.java
+++ b/src/main/java/org/codehaus/groovy/tools/javac/JavaStubGenerator.java
@@ -328,7 +328,7 @@ public class JavaStubGenerator {
             };
             int origNumConstructors = classNode.getDeclaredConstructors().size();
             verifier.visitClass(classNode);
-            // undo unwanted side-effect of verifier
+            // undo unwanted side effect of verifier
             if (origNumConstructors == 0 && classNode.getDeclaredConstructors().size() == 1) {
                 classNode.getDeclaredConstructors().clear();
             }
diff --git a/src/main/java/org/codehaus/groovy/tools/shell/util/MessageSource.java b/src/main/java/org/codehaus/groovy/tools/shell/util/MessageSource.java
index ead7bcd310..8fba88c9ad 100644
--- a/src/main/java/org/codehaus/groovy/tools/shell/util/MessageSource.java
+++ b/src/main/java/org/codehaus/groovy/tools/shell/util/MessageSource.java
@@ -118,7 +118,7 @@ public class MessageSource
     }
 
     /**
-     * Format a message (based on {@link MessageFormat} using the message
+     * Format a message (based on {@link MessageFormat}) using the message
      * from the resource bundles using the given code as a pattern and the
      * given objects as arguments.
      */
diff --git a/src/main/java/org/codehaus/groovy/transform/ASTTransformationVisitor.java b/src/main/java/org/codehaus/groovy/transform/ASTTransformationVisitor.java
index e773357e14..499a7562d1 100644
--- a/src/main/java/org/codehaus/groovy/transform/ASTTransformationVisitor.java
+++ b/src/main/java/org/codehaus/groovy/transform/ASTTransformationVisitor.java
@@ -66,7 +66,7 @@ import java.util.Set;
  * <p>
  * {@link org.codehaus.groovy.transform.ASTTransformationCollectorCodeVisitor} will add a list
  * of annotations that this visitor should be concerned about.  All other
- * annotations are ignored, whether or not they are GroovyASTTransformation
+ * annotations are ignored, whether they are GroovyASTTransformation
  * annotated or not.
  * <p>
  * A Two-pass method is used. First all candidate annotations are added to a
@@ -140,7 +140,7 @@ public final class ASTTransformationVisitor extends ClassCodeVisitorSupport {
             // first pass, collect nodes
             super.visitClass(classNode);
 
-            // second pass, call visit on all of the collected nodes
+            // second pass, call visit on all the collected nodes
             List<Tuple2<ASTTransformation, ASTNode[]>> tuples = new ArrayList<>();
             for (ASTNode[] node : targetNodes) {
                 for (ASTTransformation snt : transforms.get(node[0])) {
diff --git a/src/main/java/org/codehaus/groovy/transform/AnnotationCollectorTransform.java b/src/main/java/org/codehaus/groovy/transform/AnnotationCollectorTransform.java
index 1eaa870932..0505a6ae06 100644
--- a/src/main/java/org/codehaus/groovy/transform/AnnotationCollectorTransform.java
+++ b/src/main/java/org/codehaus/groovy/transform/AnnotationCollectorTransform.java
@@ -379,7 +379,7 @@ public class AnnotationCollectorTransform {
      * get the list of annotations we aliased from the collector and adds it to
      * aliasAnnotationUsage. The method will also map all members from
      * aliasAnnotationUsage to the aliased nodes. Should a member stay unmapped,
-     * we will ad an error. Further processing of those members is done by the
+     * we will add an error. Further processing of those members is done by the
      * annotations.
      *
      * @param collector                 reference to the annotation with {@link AnnotationCollector}
diff --git a/src/main/java/org/codehaus/groovy/transform/BaseScriptASTTransformation.java b/src/main/java/org/codehaus/groovy/transform/BaseScriptASTTransformation.java
index dbc4e5d94e..21cca0fa43 100644
--- a/src/main/java/org/codehaus/groovy/transform/BaseScriptASTTransformation.java
+++ b/src/main/java/org/codehaus/groovy/transform/BaseScriptASTTransformation.java
@@ -131,11 +131,11 @@ public class BaseScriptASTTransformation extends AbstractASTTransformation {
         // Method in base script that will contain the script body code.
         MethodNode runScriptMethod = ClassHelper.findSAM(baseScriptType);
 
-        // If they want to use a name other than than "run", then make the change.
+        // If they want to use a name other than "run", then make the change.
         if (isCustomScriptBodyMethod(runScriptMethod)) {
             MethodNode defaultMethod = cNode.getDeclaredMethod("run", Parameter.EMPTY_ARRAY);
             // GROOVY-6706: Sometimes an NPE is thrown here.
-            // The reason is that our transform is getting called more than once sometimes.  
+            // The reason is that our transform is getting called more than once sometimes.
             if (defaultMethod != null) {
                 cNode.removeMethod(defaultMethod);
                 MethodNode methodNode = new MethodNode(runScriptMethod.getName(), runScriptMethod.getModifiers() & ~ACC_ABSTRACT
diff --git a/src/main/java/org/codehaus/groovy/transform/InheritConstructorsASTTransformation.java b/src/main/java/org/codehaus/groovy/transform/InheritConstructorsASTTransformation.java
index 02a1fbd2b9..80a90f94a9 100644
--- a/src/main/java/org/codehaus/groovy/transform/InheritConstructorsASTTransformation.java
+++ b/src/main/java/org/codehaus/groovy/transform/InheritConstructorsASTTransformation.java
@@ -78,7 +78,7 @@ public class InheritConstructorsASTTransformation extends AbstractASTTransformat
             // We need @InheritConstructors from parent classes processed first
             // so force that order here. The transformation is benign on an already
             // processed node so processing twice in any order won't matter bar
-            // a very small time penalty.
+            // a very small-time penalty.
             processClass(sNode, node);
         }
         for (ConstructorNode cn : sNode.getDeclaredConstructors()) {
diff --git a/src/main/java/org/codehaus/groovy/transform/stc/ExtensionMethodCache.java b/src/main/java/org/codehaus/groovy/transform/stc/ExtensionMethodCache.java
index 713aca34af..48c22937d8 100644
--- a/src/main/java/org/codehaus/groovy/transform/stc/ExtensionMethodCache.java
+++ b/src/main/java/org/codehaus/groovy/transform/stc/ExtensionMethodCache.java
@@ -33,7 +33,7 @@ import static org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.EXTENS
 
 /**
  * This class is used to make extension methods lookup faster. Basically, it will only
- * collect the list of extension methods (see {@link ExtensionModule} if the list of
+ * collect the list of extension methods (see {@link ExtensionModule}) if the list of
  * extension modules has changed. It avoids recomputing the whole list each time we perform
  * a method lookup.
  */
diff --git a/src/main/java/org/codehaus/groovy/transform/stc/GroovyTypeCheckingExtensionSupport.java b/src/main/java/org/codehaus/groovy/transform/stc/GroovyTypeCheckingExtensionSupport.java
index e741e108cb..0aeb8ff68c 100644
--- a/src/main/java/org/codehaus/groovy/transform/stc/GroovyTypeCheckingExtensionSupport.java
+++ b/src/main/java/org/codehaus/groovy/transform/stc/GroovyTypeCheckingExtensionSupport.java
@@ -56,7 +56,7 @@ import java.util.Map;
 /**
  * Base class for type checking extensions written in Groovy. Compared to its superclass, {@link TypeCheckingExtension},
  * this class adds a number of utility methods aimed at leveraging the syntax of the Groovy language to improve
- * expressivity and conciseness.
+ * expressiveness and conciseness.
  *
  * @since 2.1.0
  */
diff --git a/src/main/java/org/codehaus/groovy/transform/stc/SecondPassExpression.java b/src/main/java/org/codehaus/groovy/transform/stc/SecondPassExpression.java
index aafe263122..13895d4dc7 100644
--- a/src/main/java/org/codehaus/groovy/transform/stc/SecondPassExpression.java
+++ b/src/main/java/org/codehaus/groovy/transform/stc/SecondPassExpression.java
@@ -23,7 +23,7 @@ import org.codehaus.groovy.ast.expr.Expression;
 import java.util.Objects;
 
 /**
- * An utility class used to wrap an expression with additional metadata used by the type checker.
+ * A utility class used to wrap an expression with additional metadata used by the type checker.
  * In particular, this is used to detect closure shared variables misuses. We need in some circumstances
  * to store the method call expression and its argument types.
  */
diff --git a/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java b/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java
index 01682bbee7..f9e888b2f9 100644
--- a/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java
+++ b/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java
@@ -227,7 +227,7 @@ public abstract class StaticTypeCheckingSupport {
 
     /**
      * This comparator is used when we return the list of methods from DGM which name correspond to a given
-     * name. As we also lookup for DGM methods of superclasses or interfaces, it may be possible to find
+     * name. As we also look up for DGM methods of superclasses or interfaces, it may be possible to find
      * two methods which have the same name and the same arguments. In that case, we should not add the method
      * from superclass or interface otherwise the system won't be able to select the correct method, resulting
      * in an ambiguous method selection for similar methods.
@@ -723,7 +723,7 @@ public abstract class StaticTypeCheckingSupport {
                     : implementsInterfaceOrSubclassOf(leftRedirect, rightRedirect); // GROOVY-10067, GROOVY-10342
 
         } else if (isBigDecimalType(leftRedirect) || Number_TYPE.equals(leftRedirect)) {
-            // BigDecimal or Number can be assigned any derivitave of java.lang.Number
+            // BigDecimal or Number can be assigned any derivative of java.lang.Number
             if (isNumberType(rightRedirect) || rightRedirect.isDerivedFrom(Number_TYPE)) {
                 return true;
             }
@@ -2257,8 +2257,8 @@ public abstract class StaticTypeCheckingSupport {
     }
 
     /**
-     * Returns true if the class node represents a the class node for the Class class
-     * and if the parametrized type is a neither a placeholder or a wildcard. For example,
+     * Returns true if the class node represents a class node for the Class class
+     * and if the parametrized type is a neither a placeholder nor a wildcard. For example,
      * the class node Class&lt;Foo&gt; where Foo is a class would return true, but the class
      * node for Class&lt;?&gt; would return false.
      *
diff --git a/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java b/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java
index 329c3a6608..d984b01674 100644
--- a/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java
+++ b/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java
@@ -858,7 +858,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
                     if (!Modifier.isPublic(modifiers) && !enclosingType.equals(resultType)
                             && !getOutermost(enclosingType).equals(getOutermost(resultType))
                             && (Modifier.isPrivate(modifiers) || !Objects.equals(enclosingType.getPackageName(), resultType.getPackageName()))) {
-                        resultType = originType; // TODO: Find accesible type in hierarchy of resultType?
+                        resultType = originType; // TODO: Find accessible type in hierarchy of resultType?
                     } else if (GenericsUtils.hasUnresolvedGenerics(resultType)) { // GROOVY-9033, GROOVY-10089, et al.
                         Map<GenericsTypeName, GenericsType> enclosing = extractGenericsParameterMapOfThis(typeCheckingContext);
                         resultType = fullyResolveType(resultType, Optional.ofNullable(enclosing).orElseGet(Collections::emptyMap));
@@ -3769,7 +3769,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
      * In the case of a <em>Object.with { ... }</em> call, this method is supposed to retrieve
      * the inferred closure return type.
      *
-     * @param callArguments the argument list from the <em>Object#with(Closure)</em> call, ie. a single closure expression
+     * @param callArguments the argument list from the <em>Object#with(Closure)</em> call, i.e. a single closure expression
      * @return the inferred closure return type or <em>null</em>
      */
     protected ClassNode getInferredReturnTypeFromWithClosureArgument(final Expression callArguments) {
@@ -4577,7 +4577,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
 
     /**
      * For "{@code List<Type> x = [...]}" or "{@code Set<Type> y = [...]}", etc.
-     * the literal may be composed of sub-types of {@code Type}. In these cases,
+     * the literal may be composed of subtypes of {@code Type}. In these cases,
      * {@code ArrayList<Type>} is an appropriate result type for the expression.
      */
     private static ClassNode getLiteralResultType(final ClassNode targetType, final ClassNode sourceType, final ClassNode baseType) {
@@ -5487,7 +5487,7 @@ public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
 
     /**
      * Given method call like "m(Collections.emptyList())", the type of the call
-     * argument is {@code List<T>} without explicit type arguments. Knowning the
+     * argument is {@code List<T>} without explicit type arguments. Knowing the
      * method target of "m", {@code T} could be resolved.
      */
     private void resolvePlaceholdersFromImplicitTypeHints(final ClassNode[] actuals, final ArgumentListExpression argumentList, final Parameter[] parameterArray) {
diff --git a/src/main/java/org/codehaus/groovy/transform/tailrec/ReturnStatementToIterationConverter.java b/src/main/java/org/codehaus/groovy/transform/tailrec/ReturnStatementToIterationConverter.java
index e1c37bc07e..24d1891507 100644
--- a/src/main/java/org/codehaus/groovy/transform/tailrec/ReturnStatementToIterationConverter.java
+++ b/src/main/java/org/codehaus/groovy/transform/tailrec/ReturnStatementToIterationConverter.java
@@ -80,7 +80,7 @@ public class ReturnStatementToIterationConverter {
         }
 
         /*
-         * Assign the iteration variables their new value before recuring
+         * Assign the iteration variables their new value before recurring
          */
         for (int i = 0, n = arguments.size(); i < n; i++) {
             ExpressionStatement argAssignment = createAssignmentToIterationVariable(arguments.get(i), i, positionMapping);
diff --git a/src/main/java/org/codehaus/groovy/util/CharSequenceReader.java b/src/main/java/org/codehaus/groovy/util/CharSequenceReader.java
index ccabdbec29..c4e8cceb65 100644
--- a/src/main/java/org/codehaus/groovy/util/CharSequenceReader.java
+++ b/src/main/java/org/codehaus/groovy/util/CharSequenceReader.java
@@ -94,7 +94,7 @@ public class CharSequenceReader extends Reader implements Serializable {
     }
 
     /**
-     * Read the sepcified number of characters into the array.
+     * Read the specified number of characters into the array.
      *
      * @param array The array to store the characters in
      * @param offset The starting position in the array to store
@@ -166,4 +166,4 @@ public class CharSequenceReader extends Reader implements Serializable {
     public String toString() {
         return charSequence.toString();
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/codehaus/groovy/util/LongArrayIterator.java b/src/main/java/org/codehaus/groovy/util/LongArrayIterator.java
index 1e30adb87d..638fc25fa1 100644
--- a/src/main/java/org/codehaus/groovy/util/LongArrayIterator.java
+++ b/src/main/java/org/codehaus/groovy/util/LongArrayIterator.java
@@ -23,7 +23,7 @@ import java.util.Iterator;
 import java.util.NoSuchElementException;
 
 /**
- * Allow a longt array to be used where an Iterator is expected.
+ * Allow a long array to be used where an Iterator is expected.
  *
  * @since 3.0.8
  */
diff --git a/src/main/java/org/codehaus/groovy/util/ManagedLinkedList.java b/src/main/java/org/codehaus/groovy/util/ManagedLinkedList.java
index 2a6067b5bf..72b3f4d604 100644
--- a/src/main/java/org/codehaus/groovy/util/ManagedLinkedList.java
+++ b/src/main/java/org/codehaus/groovy/util/ManagedLinkedList.java
@@ -122,7 +122,7 @@ public class ManagedLinkedList<T> {
     }
 
     /**
-     * Returns an array of non null elements from the source array.
+     * Returns an array of non-null elements from the source array.
      *
      * @param tArray the source array
      * @return the array
diff --git a/src/main/java/org/codehaus/groovy/vmplugin/VMPlugin.java b/src/main/java/org/codehaus/groovy/vmplugin/VMPlugin.java
index 3ba797e91c..aea8c112f7 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/VMPlugin.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/VMPlugin.java
@@ -131,7 +131,7 @@ public interface VMPlugin {
     /**
      * transform meta method
      *
-     * @param metaClass meta class
+     * @param metaClass metaclass
      * @param metaMethod the original meta method
      * @param caller caller class, whose method sets accessible for methods
      * @return the transformed meta method
@@ -163,7 +163,7 @@ public interface VMPlugin {
     /**
      * transform meta method.
      *
-     * @param metaClass meta class
+     * @param metaClass metaclass
      * @param metaMethod the original meta method
      * @return the transformed meta method
      */
diff --git a/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyInterface.java b/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyInterface.java
index 122ed4fe7b..318bba0a4f 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyInterface.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyInterface.java
@@ -173,7 +173,7 @@ public class IndyInterface {
     }
 
     /**
-     * Callback for constant meta class update change
+     * Callback for constant metaclass update change
      */
     protected static void invalidateSwitchPoints() {
         if (LOG_ENABLED) {
diff --git a/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyMath.java b/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyMath.java
index 56b2a7bd29..476dbd6307 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyMath.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyMath.java
@@ -38,7 +38,7 @@ import static org.codehaus.groovy.vmplugin.v8.TypeHelper.replaceWithMoreSpecific
  * This class contains math operations used by indy instead of the normal
  * meta method and call site caching system. The goal is to avoid boxing, thus
  * use primitive types for parameters and return types where possible.
- * WARNING: This class is for internal use only. Do not use it outside of the
+ * WARNING: This class is for internal use only. Do not use it outside the
  * org.codehaus.groovy.vmplugin.v7 package of groovy-core.
  */
 public class IndyMath {
diff --git a/src/main/java/org/codehaus/groovy/vmplugin/v8/Selector.java b/src/main/java/org/codehaus/groovy/vmplugin/v8/Selector.java
index 07f61adca7..856df001fa 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/v8/Selector.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/v8/Selector.java
@@ -205,7 +205,7 @@ public abstract class Selector {
 
             if (staticTargetType.isPrimitive()) {
                 handle = MethodHandles.insertArguments(GROOVY_CAST_EXCEPTION, 1, staticTargetType);
-                // need to call here here because we used the static target type
+                // need to call here because we used the static target type
                 // it won't be done otherwise because handle.type() == callSite.type()
                 castAndSetGuards();
             } else {
@@ -295,7 +295,7 @@ public abstract class Selector {
         }
 
         /**
-         * this method chooses a property from the meta class.
+         * this method chooses a property from the metaclass.
          */
         @Override
         public void chooseMeta(MetaClassImpl mci) {
@@ -353,8 +353,8 @@ public abstract class Selector {
 
         /**
          * Additionally to the normal {@link MethodSelector#setHandleForMetaMethod()}
-         * task we have to also take care of generic getter methods, that depend
-         * one the name.
+         * task we have to also take care of generic getter methods, that depends
+         * on the name.
          */
         @Override
         public void setHandleForMetaMethod() {
@@ -397,7 +397,7 @@ public abstract class Selector {
         }
 
         /**
-         * For a constructor call we always use the static meta class from the registry
+         * For a constructor call we always use the static metaclass from the registry
          */
         @Override
         public MetaClass getMetaClass() {
@@ -407,7 +407,7 @@ public abstract class Selector {
         }
 
         /**
-         * This method chooses a constructor from the meta class.
+         * This method chooses a constructor from the metaclass.
          */
         @Override
         public void chooseMeta(MetaClassImpl mci) {
@@ -447,7 +447,7 @@ public abstract class Selector {
             if (beanConstructor) {
                 // we have handle that takes no arguments to create the bean,
                 // we have to use its return value to call #setBeanProperties with it
-                // and the meta class.
+                // and the metaclass.
 
                 // to do this we first bind the values to #setBeanProperties
                 MethodHandle con = BEAN_CONSTRUCTOR_PROPERTY_SETTER.bindTo(mc);
@@ -501,7 +501,7 @@ public abstract class Selector {
 
     /**
      * Method invocation based {@link Selector}.
-     * This Selector is called for method invocations and is base for cosntructor
+     * This Selector is called for method invocations and is base for constructor
      * calls as well as getProperty calls.
      */
     private static class MethodSelector extends Selector {
@@ -560,7 +560,7 @@ public abstract class Selector {
         }
 
         /**
-         * Gives the meta class to an Object.
+         * Gives the metaclass to an Object.
          */
         public MetaClass getMetaClass() {
             Object receiver = args[0];
@@ -582,9 +582,9 @@ public abstract class Selector {
         }
 
         /**
-         * Uses the meta class to get a meta method for a method call.
-         * There will be no meta method selected, if the meta class is no MetaClassImpl
-         * or the meta class is an AdaptingMetaClass.
+         * Uses the metaclass to get a meta method for a method call.
+         * There will be no meta method selected, if the metaclass is no MetaClassImpl
+         * or the metaclass is an AdaptingMetaClass.
          */
         public void chooseMeta(MetaClassImpl mci) {
             if (mci == null) return;
@@ -701,7 +701,7 @@ public abstract class Selector {
         }
 
         /**
-         * Creates a MethodHandle, which will use the meta class path.
+         * Creates a MethodHandle, which will use the metaclass path.
          * This method is called only if no handle has been created before. This
          * is usually the case if the method selection failed.
          */
@@ -718,7 +718,7 @@ public abstract class Selector {
                 if (LOG_ENABLED) LOG.info("use invokeMethod with bound meta class");
 
                 if (receiver instanceof GroovyObject) {
-                    // if the meta class call fails we may still want to fall back to call
+                    // if the metaclass call fails we may still want to fall back to call
                     // GroovyObject#invokeMethod if the receiver is a GroovyObject
                     if (LOG_ENABLED) LOG.info("add MissingMethod handler for GroovyObject#invokeMethod fallback path");
                     handle = MethodHandles.catchException(handle, MissingMethodException.class, GROOVY_OBJECT_INVOKER);
@@ -926,7 +926,7 @@ public abstract class Selector {
                 }
             }
 
-            // handle constant meta class and category changes
+            // handle constant metaclass and category changes
             handle = switchPoint.guardWithTest(handle, fallback);
             if (LOG_ENABLED) LOG.info("added switch point guard");
 
@@ -1005,10 +1005,10 @@ public abstract class Selector {
 
         /**
          * setting a call site target consists of the following steps:
-         * # get the meta class
+         * # get the metaclass
          * # select a method/constructor/property from it, if it is a MetaClassImpl
          * # make a handle out of the selection
-         * # if nothing could be selected select a path through the given MetaClass or the GroovyObject
+         * # if nothing could be selected, select a path through the given MetaClass or the GroovyObject
          * # apply transformations for vargs, implicit null argument, coercion, wrapping, null receiver and spreading
          */
         @Override
@@ -1047,7 +1047,7 @@ public abstract class Selector {
 
     /**
      * Returns {@link NullObject#getNullObject()} if the receiver
-     * (args[0]) is null. If it is not null, the recevier itself
+     * (args[0]) is null. If it is not null, the receiver itself
      * is returned.
      */
     public Object getCorrectedReceiver() {
diff --git a/src/main/java/org/codehaus/groovy/vmplugin/v8/TypeTransformers.java b/src/main/java/org/codehaus/groovy/vmplugin/v8/TypeTransformers.java
index 9ef2757bb6..55c77b65bd 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/v8/TypeTransformers.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/v8/TypeTransformers.java
@@ -155,7 +155,7 @@ public class TypeTransformers {
                 // return ProxyGenerator.INSTANCE.instantiateAggregate(impl,Collections.singletonList(clazz));
                 // TO_SAMTRAIT_PROXY is a handle (Object,Object,ProxyGenerator,Class)GroovyObject
                 // where the second object is the input closure, everything else
-                // needs to be provide and is in remaining order: method name,
+                // needs to be provided and is in remaining order: method name,
                 // ProxyGenerator.INSTANCE and singletonList(parameter)
                 MethodHandle ret = TO_SAMTRAIT_PROXY;
                 ret = MethodHandles.insertArguments(ret, 2, ProxyGenerator.INSTANCE, Collections.singletonList(parameter));
@@ -168,8 +168,8 @@ public class TypeTransformers {
             //        new Class[]{parameter},
             //        new ConvertedClosure((Closure) arg));
             // TO_REFLECTIVE_PROXY will do that for us, though
-            // input is the closure, the method name, the class loader and the 
-            // class[]. All of that but the closure must be provided here  
+            // input is the closure, the method name, the class loader and the
+            // class[]. All of that but the closure must be provided here
             MethodHandle ret = TO_REFLECTIVE_PROXY;
             ret = MethodHandles.insertArguments(ret, 1,
                     method.getName(),
@@ -183,7 +183,7 @@ public class TypeTransformers {
             //            instantiateAggregateFromBaseClass(m, parameter);
             // TO_GENERATED_PROXY is a handle (Object,Object,ProxyGenerator,Class)GroovyObject
             // where the second object is the input closure, everything else
-            // needs to be provide and is in remaining order: method name, 
+            // needs to be provided and is in remaining order: method name,
             // ProxyGenerator.INSTANCE and parameter
             MethodHandle ret = TO_GENERATED_PROXY;
             ret = MethodHandles.insertArguments(ret, 2, ProxyGenerator.INSTANCE, parameter);
diff --git a/src/main/java/org/codehaus/groovy/vmplugin/v9/Java9.java b/src/main/java/org/codehaus/groovy/vmplugin/v9/Java9.java
index 7df62fca62..5a744c3e27 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/v9/Java9.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/v9/Java9.java
@@ -288,7 +288,7 @@ public class Java9 extends Java8 {
             } else if (declaringClass.isAssignableFrom(theClass)) {
                 // if caller can not access the method,
                 // try to find the corresponding method in its derived class
-                // GROOVY-9081: Sub-class derives the protected members from public class, "Invoke the members on the sub class instances"
+                // GROOVY-9081: Sub-class derives the protected members from public class, "Invoke the members on the subclass instances"
                 // e.g. StringBuilder sb = new StringBuilder(); sb.setLength(0);
                 // `setLength` is the method of `AbstractStringBuilder`, which is `package-private`
                 Optional<CachedMethod> cachedMethod = getAccessibleMetaMethod(metaMethod, paramTypes, caller, theClass, false);


[groovy] 08/08: fix typo

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 0448ffad9c459135026e46c5a2db11e53ef7fe63
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Oct 26 08:55:51 2022 +1000

    fix typo
---
 src/spec/doc/core-metaprogramming.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/spec/doc/core-metaprogramming.adoc b/src/spec/doc/core-metaprogramming.adoc
index 2ddf603f94..e752d029de 100644
--- a/src/spec/doc/core-metaprogramming.adoc
+++ b/src/spec/doc/core-metaprogramming.adoc
@@ -3383,7 +3383,7 @@ include::../test/metaprogramming/MacroVariableSubstitutionTest.groovy[tags=md5tr
 
 <1> We need a reference to a variable expression
 <2> If using a class outside the standard packages we should add any needed imports or use the qualified name. When
-using the qualified named of a given static method you need to make sure it's resolved in the proper compile phase. In
+using the qualified name of a given static method you need to make sure it's resolved in the proper compile phase. In
 this particular case we're instructing the macro to resolve it at the SEMANTIC_ANALYSIS phase, which is the first compile phase
 with type information.
 <3> In order to substitute any `expression` inside the macro we need to use the `$v` method. `$v` receives a closure as an


[groovy] 04/08: Fix minor typos in subprojects javadoc and comments

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 524ef1f846fe4a9d889f57acc2b7ef04ac2f0dab
Author: Marc Wrobel <ma...@gmail.com>
AuthorDate: Tue Oct 18 12:58:53 2022 +0200

    Fix minor typos in subprojects javadoc and comments
    
    Note that the following words / expressions were preferred :
    
    - meta data -> metadata (incorrect, see https://www.merriam-webster.com/dictionary/metadata)
    - sub-type -> subtype (more common, see https://www.merriam-webster.com/dictionary/subtype)
    - sub-directory -> subdirectory (more common, see https://www.merriam-webster.com/dictionary/subdirectory)
    - whether or not -> whether (when possible because it is easier to read)
    
    Empty catch blocks has been documented to prevent the following sonatype-lift warning: https://google.github.io/styleguide/javaguide.html#s6.2-caught-exceptions.
---
 .../main/java/org/codehaus/groovy/ant/Groovy.java  |  2 +-
 .../main/java/org/codehaus/groovy/ant/Groovyc.java |  8 ++--
 .../org/codehaus/groovy/ant/RootLoaderRef.java     |  2 +-
 .../org/codehaus/groovy/ant/UberCompileTask.java   |  4 +-
 .../builder/AstBuilderFromSpecificationTest.groovy |  2 +-
 .../groovy/groovy/cli/picocli/CliBuilder.groovy    |  2 +-
 .../groovy/groovy/console/ui/ConsoleActions.groovy |  4 +-
 .../ui/text/StructuredSyntaxDocumentFilter.java    |  2 +-
 .../groovy/groovy/console/ui/text/TextEditor.java  |  2 +-
 .../contracts/ast/visitor/ASTNodeMetaData.java     |  2 +-
 .../groovy/contracts/common/spi/Lifecycle.java     |  4 +-
 .../datetime/extensions/DateTimeExtensions.java    | 16 +++----
 .../dsl/expression/AbstractGinqExpression.java     |  2 +-
 .../provider/collection/runtime/Queryable.java     |  2 +-
 .../org/codehaus/groovy/groovydoc/GroovyType.java  |  6 +--
 .../groovy/groovysh/InteractiveShellRunner.groovy  |  2 +-
 .../completion/ImportsSyntaxCompleterTest.groovy   |  2 +-
 .../groovy/jmx/builder/JmxMetaMapBuilder.groovy    |  2 +-
 .../src/main/java/groovy/jmx/GroovyMBean.java      |  4 +-
 .../src/main/java/groovy/json/JsonBuilder.java     |  2 +-
 .../src/main/java/groovy/json/JsonGenerator.java   |  2 +-
 .../src/main/java/groovy/json/JsonOutput.java      |  2 +-
 .../src/main/java/groovy/json/JsonParserType.java  |  2 +-
 .../src/main/java/groovy/json/JsonToken.java       |  4 +-
 .../java/groovy/json/StreamingJsonBuilder.java     |  2 +-
 .../org/apache/groovy/json/internal/CharBuf.java   |  2 +-
 .../apache/groovy/json/internal/LazyValueMap.java  |  2 +-
 .../groovy/jsr223/GroovyScriptEngineFactory.java   |  2 +-
 .../transform/MacroCallTransformingVisitor.java    |  2 +-
 .../groovy/nio/extensions/NioExtensions.java       | 10 ++--
 .../java/groovy/servlet/AbstractHttpServlet.java   |  4 +-
 .../main/java/groovy/servlet/GroovyServlet.java    |  2 +-
 .../main/java/groovy/servlet/ServletBinding.java   |  2 +-
 .../groovy/servlet/ServletBindingTest.groovy       |  4 +-
 .../src/main/java/groovy/sql/DataSet.java          |  3 +-
 .../java/groovy/sql/GroovyResultSetExtension.java  |  2 +-
 .../groovy-sql/src/main/java/groovy/sql/Sql.java   | 54 +++++++++++-----------
 .../groovy/text/StreamingTemplateEngine.java       | 12 ++---
 .../groovy/groovy/text/markup/BaseTemplate.java    |  8 ++--
 .../groovy/text/markup/TemplateResolver.java       |  2 +-
 .../groovy/groovy/mock/interceptor/package.html    |  4 +-
 subprojects/groovy-typecheckers/build.gradle       |  4 +-
 .../main/groovy/groovy/xml/XmlParserFactory.groovy |  2 +-
 .../groovy/groovy/xml/XmlSlurperFactory.groovy     |  2 +-
 .../src/main/java/groovy/xml/XmlParser.java        |  4 +-
 .../src/main/java/groovy/xml/XmlUtil.java          | 18 +++++---
 .../java/groovy/xml/slurpersupport/Attribute.java  |  2 +-
 .../groovy/xml/slurpersupport/GPathResult.java     |  4 +-
 subprojects/performance/src/files/pleac01.groovy   |  2 +-
 .../reflection/ClassInfoDeadlockStressTest.java    |  2 +-
 .../util/ManagedConcurrentMapStressTest.java       |  2 +-
 .../util/ManagedConcurrentValueMapStressTest.java  |  2 +-
 52 files changed, 124 insertions(+), 119 deletions(-)

diff --git a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
index 60cdb9a0ad..2745eb968e 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
@@ -716,7 +716,7 @@ public class Groovy extends Java {
     }
 
     /**
-     * Try to build a script name for the script of the groovy task to have an helpful value in stack traces in case of exception
+     * Try to build a script name for the script of the groovy task to have a helpful value in stack traces in case of exception
      *
      * @return the name to use when compiling the script
      */
diff --git a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
index 3fcdbaf55c..1254b7e6da 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
@@ -565,9 +565,9 @@ public class Groovyc extends MatchingTask {
     }
 
     /**
-     * Gets whether or not the ant classpath is to be included in the classpath.
+     * Gets whether the ant classpath is to be included in the classpath.
      *
-     * @return whether or not the ant classpath is to be included in the classpath
+     * @return whether the ant classpath is to be included in the classpath
      */
     public boolean getIncludeantruntime() {
         return includeAntRuntime;
@@ -583,7 +583,7 @@ public class Groovyc extends MatchingTask {
     }
 
     /**
-     * Gets whether or not the java runtime should be included in this
+     * Gets whether the java runtime should be included in this
      * task's classpath.
      *
      * @return the includejavaruntime attribute
@@ -1417,7 +1417,7 @@ public class Groovyc extends MatchingTask {
             /*
              * Iterate over the classpath provided to groovyc, and add any missing path
              * entries to the AntClassLoader.  This is a workaround, since for some reason
-             * 'directory' classpath entries were not added to the AntClassLoader' classpath.
+             * 'directory' classpath entries were not added to the 'AntClassLoader' classpath.
              */
             for (String cpEntry : classpath) {
                 boolean found = false;
diff --git a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/RootLoaderRef.java b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/RootLoaderRef.java
index 933cdabbd6..377e4d00d3 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/RootLoaderRef.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/RootLoaderRef.java
@@ -51,7 +51,7 @@ import java.security.PrivilegedAction;
  * the logging jar starts with "commons-logging-".
  *
  * This was needed because if ant wants to access a task argument that uses for example a Path
- * it look for a matching method which includes a matching class. But two classes of the same name
+ * it looks for a matching method which includes a matching class. But two classes of the same name
  * with different class loaders are different, so ant would not be able to find the method.
  *
  * @see org.codehaus.groovy.tools.RootLoader
diff --git a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/UberCompileTask.java b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/UberCompileTask.java
index 66ce06a583..f425eef2cb 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/UberCompileTask.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/UberCompileTask.java
@@ -35,7 +35,7 @@ import java.io.IOException;
  * This works by invoking the {@link GenerateStubsTask} task, then the
  * {@link Javac} task and then the {@link GroovycTask}.  Each task can be
  * configured by creating a nested element.  Common configuration such as
- * the source dir and classpath is picked up from this tasks configuration.
+ * the source dir and classpath is picked up from this task's configuration.
  */
 public class UberCompileTask extends Task {
     private Path src;
@@ -243,4 +243,4 @@ public class UberCompileTask extends Task {
             return UberCompileTask.this.getTaskName() + ":groovyc";
         }
     }
-}
\ No newline at end of file
+}
diff --git a/subprojects/groovy-astbuilder/src/test/groovy/org/codehaus/groovy/ast/builder/AstBuilderFromSpecificationTest.groovy b/subprojects/groovy-astbuilder/src/test/groovy/org/codehaus/groovy/ast/builder/AstBuilderFromSpecificationTest.groovy
index 0ac0841d21..7f87a0ff83 100644
--- a/subprojects/groovy-astbuilder/src/test/groovy/org/codehaus/groovy/ast/builder/AstBuilderFromSpecificationTest.groovy
+++ b/subprojects/groovy-astbuilder/src/test/groovy/org/codehaus/groovy/ast/builder/AstBuilderFromSpecificationTest.groovy
@@ -91,7 +91,7 @@ import static org.objectweb.asm.Opcodes.ACC_PUBLIC
 import static org.objectweb.asm.Opcodes.ACC_STATIC
 
 /**
- * Unit test for the AST from Psuedo-specification feature.
+ * Unit test for the AST from Pseudo-specification feature.
  */
 class AstBuilderFromSpecificationTest extends GroovyTestCase {
 
diff --git a/subprojects/groovy-cli-picocli/src/main/groovy/groovy/cli/picocli/CliBuilder.groovy b/subprojects/groovy-cli-picocli/src/main/groovy/groovy/cli/picocli/CliBuilder.groovy
index e9248c52ad..bf114f06ef 100644
--- a/subprojects/groovy-cli-picocli/src/main/groovy/groovy/cli/picocli/CliBuilder.groovy
+++ b/subprojects/groovy-cli-picocli/src/main/groovy/groovy/cli/picocli/CliBuilder.groovy
@@ -378,7 +378,7 @@ class CliBuilder {
      * For backwards compatibility with Apache Commons CLI, set this property to
      * <code>true</code> if the parser should recognize long options with both
      * a single hyphen and a double hyphen prefix. The default is <code>false</code>,
-     * so only long options with a double hypen prefix (<code>--option</code>) are recognized.
+     * so only long options with a double hyphen prefix (<code>--option</code>) are recognized.
      * @since 2.5
      */
     boolean acceptLongOptionsWithSingleHyphen = false
diff --git a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/ConsoleActions.groovy b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/ConsoleActions.groovy
index 5d72714d74..f4606cf0ab 100644
--- a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/ConsoleActions.groovy
+++ b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/ConsoleActions.groovy
@@ -219,7 +219,7 @@ loopModeAction = action(
         name: 'Loop Mode',
         closure: controller.&loopMode,
         mnemonic: 'p',
-        shortDescription: 'Run script continuously in a loop when run is envoked. Uncheck to stop loop'
+        shortDescription: 'Run script continuously in a loop when run is invoked. Uncheck to stop loop'
 )
 
 runSelectionAction = action(
@@ -460,4 +460,4 @@ preferencesAction = action(
         closure: controller.&preferences,
         mnemonic: 'S',
         shortDescription: 'Preference Settings'
-)
\ No newline at end of file
+)
diff --git a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/text/StructuredSyntaxDocumentFilter.java b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/text/StructuredSyntaxDocumentFilter.java
index d38ca308bd..aedbd58644 100644
--- a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/text/StructuredSyntaxDocumentFilter.java
+++ b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/text/StructuredSyntaxDocumentFilter.java
@@ -414,7 +414,7 @@ public class StructuredSyntaxDocumentFilter extends DocumentFilter {
             }
             if (matchEnd < checkPoint) {
                 // if we finished before hitting the end of the checkpoint from
-                // no mroe matches, then set ensure the text is reset to the
+                // no more matches, then set ensure the text is reset to the
                 // defaultStyle
                 styledDocument.setCharacterAttributes(matchEnd, checkPoint - matchEnd, defaultStyle, true);
             }
diff --git a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/text/TextEditor.java b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/text/TextEditor.java
index cecec91881..b9ce09c99e 100644
--- a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/text/TextEditor.java
+++ b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/text/TextEditor.java
@@ -346,7 +346,7 @@ public class TextEditor extends JTextPane implements Pageable, Printable {
         super.processKeyEvent(e);
 
         //  Handle release of Insert key to toggle overtype/insert mode
-        //  unless a modifier is active (eg Shift+Insert for paste or
+        //  unless a modifier is active (e.g. Shift+Insert for paste or
         //  Ctrl+Insert for Copy)
         if (e.getID() == KeyEvent.KEY_RELEASED &&
                 e.getKeyCode() == KeyEvent.VK_INSERT &&
diff --git a/subprojects/groovy-contracts/src/main/java/org/apache/groovy/contracts/ast/visitor/ASTNodeMetaData.java b/subprojects/groovy-contracts/src/main/java/org/apache/groovy/contracts/ast/visitor/ASTNodeMetaData.java
index 4f9fe5f071..1d9148b6bc 100644
--- a/subprojects/groovy-contracts/src/main/java/org/apache/groovy/contracts/ast/visitor/ASTNodeMetaData.java
+++ b/subprojects/groovy-contracts/src/main/java/org/apache/groovy/contracts/ast/visitor/ASTNodeMetaData.java
@@ -19,7 +19,7 @@
 package org.apache.groovy.contracts.ast.visitor;
 
 /**
- * Holds all constants to be used as AST node meta data keys.
+ * Holds all constants to be used as AST node metadata keys.
  */
 public interface ASTNodeMetaData {
     String PROCESSED = "org.apache.groovy.contracts.PROCESSED";
diff --git a/subprojects/groovy-contracts/src/main/java/org/apache/groovy/contracts/common/spi/Lifecycle.java b/subprojects/groovy-contracts/src/main/java/org/apache/groovy/contracts/common/spi/Lifecycle.java
index 04ec888bfc..f926b1cf82 100644
--- a/subprojects/groovy-contracts/src/main/java/org/apache/groovy/contracts/common/spi/Lifecycle.java
+++ b/subprojects/groovy-contracts/src/main/java/org/apache/groovy/contracts/common/spi/Lifecycle.java
@@ -25,7 +25,7 @@ import org.codehaus.groovy.ast.MethodNode;
  * <p>Specifies life-cycle hook-ins for applying AST transformation logic before and
  * after the annotation processors have been run.</p>
  *
- * <p>During excution of GContracts AST transformations, the following process is applied on each {@link ClassNode}
+ * <p>During execution of GContracts AST transformations, the following process is applied on each {@link ClassNode}
  * instance which qualifies for contract annotations:</P>
  *
  * <ol>
@@ -42,7 +42,7 @@ import org.codehaus.groovy.ast.MethodNode;
  *
  * <h3>Handling of AnnotationProcessor implementation classes</h3>
  *
- * <p>{@link AnnotationProcessor} implementatios are used to modify domain classes found in <tt>org.apache.groovy.contracts.domain</tt>. For that
+ * <p>{@link AnnotationProcessor} implementations are used to modify domain classes found in <tt>org.apache.groovy.contracts.domain</tt>. For that
  * reason, concrete annotation processor often don't modify AST nodes directly, but simply work with domain classes like
  * {@link org.apache.groovy.contracts.domain.Contract}. Whenever an annotation processor is done, it has finished its work on the
  * underlying domain model. </p>
diff --git a/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java b/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java
index 5b71e2a83e..5a00307760 100644
--- a/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java
+++ b/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java
@@ -117,8 +117,8 @@ public final class DateTimeExtensions {
      * unit each iteration, calling the closure once per iteration. The closure may accept a single
      * {@link java.time.temporal.Temporal} argument.
      * <p>
-     * The particular unit incremented by depends on the specific sub-type of {@link java.time.temporal.Temporal}.
-     * Most sub-types use a unit of {@link java.time.temporal.ChronoUnit#SECONDS} except for
+     * The particular unit incremented by depends on the specific subtype of {@link java.time.temporal.Temporal}.
+     * Most subtypes use a unit of {@link java.time.temporal.ChronoUnit#SECONDS} except for
      * <ul>
      * <li>{@link java.time.chrono.ChronoLocalDate} and its sub-types use {@link java.time.temporal.ChronoUnit#DAYS}.
      * <li>{@link java.time.YearMonth} uses {@link java.time.temporal.ChronoUnit#MONTHS}.
@@ -185,8 +185,8 @@ public final class DateTimeExtensions {
      * unit each iteration, calling the closure once per iteration. The closure may accept a single
      * {@link java.time.temporal.Temporal} argument.
      * <p>
-     * The particular unit decremented by depends on the specific sub-type of {@link java.time.temporal.Temporal}.
-     * Most sub-types use a unit of {@link java.time.temporal.ChronoUnit#SECONDS} except for
+     * The particular unit decremented by depends on the specific subtype of {@link java.time.temporal.Temporal}.
+     * Most subtypes use a unit of {@link java.time.temporal.ChronoUnit#SECONDS} except for
      * <ul>
      * <li>{@link java.time.chrono.ChronoLocalDate} and its sub-types use {@link java.time.temporal.ChronoUnit#DAYS}.
      * <li>{@link java.time.YearMonth} uses {@link java.time.temporal.ChronoUnit#MONTHS}.
@@ -503,7 +503,7 @@ public final class DateTimeExtensions {
      * Returns an {@link java.time.Instant} that is one second after this instant.
      *
      * @param self an Instant
-     * @return an Instant one second ahead
+     * @return an Instant one-second ahead
      * @since 2.5.0
      */
     public static Instant next(final Instant self) {
@@ -514,7 +514,7 @@ public final class DateTimeExtensions {
      * Returns an {@link java.time.Instant} that one second before this instant.
      *
      * @param self an Instant
-     * @return an Instant one second behind
+     * @return an Instant one-second behind
      * @since 2.5.0
      */
     public static Instant previous(final Instant self) {
@@ -1372,7 +1372,7 @@ public final class DateTimeExtensions {
      * No normalization is performed.
      *
      * @param self a Period
-     * @return a Period one day longer in length
+     * @return a Period one-day longer in length
      * @since 2.5.0
      */
     public static Period next(final Period self) {
@@ -1384,7 +1384,7 @@ public final class DateTimeExtensions {
      * No normalization is performed.
      *
      * @param self a Period
-     * @return a Period one day shorter in length
+     * @return a Period one-day shorter in length
      * @since 2.5.0
      */
     public static Period previous(final Period self) {
diff --git a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/dsl/expression/AbstractGinqExpression.java b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/dsl/expression/AbstractGinqExpression.java
index 75a474fe51..e15792e5c7 100644
--- a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/dsl/expression/AbstractGinqExpression.java
+++ b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/dsl/expression/AbstractGinqExpression.java
@@ -25,7 +25,7 @@ import org.codehaus.groovy.ast.expr.Expression;
 import org.codehaus.groovy.ast.expr.ExpressionTransformer;
 
 /**
- * Represents GINQ expression which could hold meta data
+ * Represents GINQ expression which could hold metadata
  *
  * @since 4.0.0
  */
diff --git a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/Queryable.java b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/Queryable.java
index a8c5e22523..84dca68003 100644
--- a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/Queryable.java
+++ b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/Queryable.java
@@ -354,7 +354,7 @@ public interface Queryable<T> {
 
     //  Built-in aggregate functions {
     /**
-     * Aggreate function {@code count}, similar to SQL's {@code count}
+     * Aggregate function {@code count}, similar to SQL's {@code count}
      *
      * @return count result
      * @since 4.0.0
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyType.java b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyType.java
index 0c222e6e0b..0c1c8e247f 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyType.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyType.java
@@ -24,7 +24,7 @@ public interface GroovyType {
 
     /**
      * The qualified name of this type excluding any dimension information.
-     * For example, a two dimensional array of String returns "<code>java.lang.String</code>".
+     * For example, a two-dimensional array of String returns "<code>java.lang.String</code>".
      */
     String qualifiedTypeName();
 
@@ -36,13 +36,13 @@ public interface GroovyType {
 
     /**
      * The unqualified name of this type excluding any dimension information.
-     * For example, a two dimensional array of String returns "<code>String</code>".
+     * For example, a two-dimensional array of String returns "<code>String</code>".
      */
     String typeName();
 
     /**
      * The qualified name including any dimension information.
-     * For example, a two dimensional array of String returns
+     * For example, a two-dimensional array of String returns
      * "<code>java.lang.String[][]</code>", and the parameterized type
      * <code>List&lt;Integer&gt;</code> returns "<code>java.util.List&lt;java.lang.Integer&gt;</code>".
      */
diff --git a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/InteractiveShellRunner.groovy b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/InteractiveShellRunner.groovy
index 13fbc5940b..6bced9633f 100644
--- a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/InteractiveShellRunner.groovy
+++ b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/InteractiveShellRunner.groovy
@@ -140,7 +140,7 @@ class InteractiveShellRunner extends ShellRunner implements Runnable {
     }
 
     private void adjustHistory() {
-        // we save the evicted line in casesomeone wants to use it with history recall
+        // we save the evicted line in case someone wants to use it with history recall
         if (shell instanceof Groovysh) {
             def history = shell.history
             shell.historyFull = (history != null) && (history.size() >= history.maxSize)
diff --git a/subprojects/groovy-groovysh/src/test/groovy/org/apache/groovy/groovysh/completion/ImportsSyntaxCompleterTest.groovy b/subprojects/groovy-groovysh/src/test/groovy/org/apache/groovy/groovysh/completion/ImportsSyntaxCompleterTest.groovy
index 6746df90e2..53b483cca3 100644
--- a/subprojects/groovy-groovysh/src/test/groovy/org/apache/groovy/groovysh/completion/ImportsSyntaxCompleterTest.groovy
+++ b/subprojects/groovy-groovysh/src/test/groovy/org/apache/groovy/groovysh/completion/ImportsSyntaxCompleterTest.groovy
@@ -55,7 +55,7 @@ class ImportsSyntaxCompleterTest extends CompleterTestSupport {
             def candidates = ['prefill']
             assert completer.findMatchingPreImportedClasses('Big', candidates)
             assert ['prefill', 'BigInteger', 'BigDecimal'] == candidates
-            // test again without invoking pakage Helper
+            // test again without invoking package Helper
             assert completer.findMatchingPreImportedClasses('Big', candidates)
             assert ['prefill', 'BigInteger', 'BigDecimal', 'BigInteger', 'BigDecimal'] == candidates
         }
diff --git a/subprojects/groovy-jmx/src/main/groovy/groovy/jmx/builder/JmxMetaMapBuilder.groovy b/subprojects/groovy-jmx/src/main/groovy/groovy/jmx/builder/JmxMetaMapBuilder.groovy
index 4c8d8c897d..38950e5978 100644
--- a/subprojects/groovy-jmx/src/main/groovy/groovy/jmx/builder/JmxMetaMapBuilder.groovy
+++ b/subprojects/groovy-jmx/src/main/groovy/groovy/jmx/builder/JmxMetaMapBuilder.groovy
@@ -329,7 +329,7 @@ class JmxMetaMapBuilder {
 
                 // ctorName:[]
                 if (descriptor && (descriptor instanceof List && descriptor.size() == 0)) {
-                    params = null // represnts a ctor with no params
+                    params = null // represents a ctor with no params
                 }
                 // ctorName:["paramType1","paramType2"..."paramTypeN"]
                 if (descriptor && (descriptor instanceof List && descriptor.size() > 0)) {
diff --git a/subprojects/groovy-jmx/src/main/java/groovy/jmx/GroovyMBean.java b/subprojects/groovy-jmx/src/main/java/groovy/jmx/GroovyMBean.java
index 26a6e8ef21..1f6143bcad 100644
--- a/subprojects/groovy-jmx/src/main/java/groovy/jmx/GroovyMBean.java
+++ b/subprojects/groovy-jmx/src/main/java/groovy/jmx/GroovyMBean.java
@@ -209,7 +209,7 @@ public class GroovyMBean extends GroovyObjectSupport {
     }
 
     /**
-     * List of string representations of all of the attributes on the MBean.
+     * List of string representations of all the attributes on the MBean.
      *
      * @return list of descriptions of each attribute on the mbean
      */
@@ -288,7 +288,7 @@ public class GroovyMBean extends GroovyObjectSupport {
     }
 
     /**
-     * Description of all of the operations available on the MBean.
+     * Description of all the operations available on the MBean.
      *
      * @return full description of each operation on the MBean
      */
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
index a64fab6abc..99501fccb4 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
@@ -46,7 +46,7 @@ import java.util.Map;
  *       def builder = new groovy.json.JsonBuilder()
  *       def root = builder.people {
  *           person {
- *               firstName 'Guillame'
+ *               firstName 'Guillaume'
  *               lastName 'Laforge'
  *               // Named arguments are valid values for objects too
  *               address(
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonGenerator.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonGenerator.java
index bd9e89aac4..e66f585399 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonGenerator.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonGenerator.java
@@ -237,7 +237,7 @@ public interface JsonGenerator {
          *
          * <p>If two or more closures are registered for the exact same type the last
          * closure based on the order they were specified will be used.  When serializing an
-         * object its type is compared to the list of registered types in the order the were
+         * object its type is compared to the list of registered types in the order they were
          * given and the closure for the first suitable type will be called.  Therefore, it is
          * important to register more specific types first.
          *
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonOutput.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonOutput.java
index 4f65292499..cb55f417c2 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonOutput.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonOutput.java
@@ -34,7 +34,7 @@ import java.util.UUID;
 
 /**
  * Class responsible for the actual String serialization of the possible values of a JSON structure.
- * This class can also be used as a category, so as to add <code>toJson()</code> methods to various types.
+ * This class can also be used as a category to add <code>toJson()</code> methods to various types.
  * <p>
  * This class does not provide the ability to customize the resulting output.  A {@link JsonGenerator}
  * can be used if the ability to alter the resulting output is required.
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonParserType.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonParserType.java
index 1a62b2dcff..3b5599b03f 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonParserType.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonParserType.java
@@ -19,7 +19,7 @@
 package groovy.json;
 
 /**
- * Allows selection of parser type for new new JsonSlurper.
+ * Allows selection of parser type for new JsonSlurper.
  * <p />
  * To enable the INDEX_OVERLAY parser do this:
  *
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonToken.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonToken.java
index 03da4015d0..69cc12def4 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonToken.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonToken.java
@@ -55,8 +55,8 @@ public class JsonToken {
     private String text;
 
     /**
-     * Return the value represented by this token (ie. a number, a string, a boolean or null).
-     * For numbers, BigDecimal is returned for decimals and Integer, Long or BigInteger for 
+     * Return the value represented by this token (i.e. a number, a string, a boolean or null).
+     * For numbers, BigDecimal is returned for decimals and Integer, Long or BigInteger for
      * integral numbers.
      *
      * @return the represented value
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/StreamingJsonBuilder.java b/subprojects/groovy-json/src/main/java/groovy/json/StreamingJsonBuilder.java
index 525c332f58..ca666c871b 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/StreamingJsonBuilder.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/StreamingJsonBuilder.java
@@ -41,7 +41,7 @@ import java.util.Map;
  * to be able to learn about the various possibilities of usage.
  * <p>
  * Unlike the JsonBuilder class which creates a data structure in memory,
- * which is handy in those situations where you want to alter the structure programatically before output,
+ * which is handy in those situations where you want to alter the structure programmatically before output,
  * the StreamingJsonBuilder streams to a writer directly without any memory data structure.
  * So if you don't need to modify the structure, and want a more memory-efficient approach,
  * please use the StreamingJsonBuilder.
diff --git a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/CharBuf.java b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/CharBuf.java
index 7de6418cdb..3b8c3d1108 100644
--- a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/CharBuf.java
+++ b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/CharBuf.java
@@ -434,7 +434,7 @@ public class CharBuf extends Writer implements CharSequence {
                         _buffer[_location] = '\\';
                         _location++;
                         break;
-                    //There is not requirement to escape solidus so we will not.
+                    //There is no requirement to escape solidus so we will not.
 //                        case '/':
 //                            _buffer[_location] = '\\';
 //                            _location ++;
diff --git a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/LazyValueMap.java b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/LazyValueMap.java
index c3b5a8215b..e7d9373b29 100644
--- a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/LazyValueMap.java
+++ b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/LazyValueMap.java
@@ -60,7 +60,7 @@ public class LazyValueMap extends AbstractMap<String, Object> implements ValueMa
      */
     private int len = 0;
     /**
-     * Holds whether or not we ae in lazy chop mode or not.
+     * Holds whether we are in lazy chop mode.
      */
     private final boolean lazyChop;
 
diff --git a/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineFactory.java b/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineFactory.java
index ce196b7c5d..0625de8e9a 100644
--- a/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineFactory.java
+++ b/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineFactory.java
@@ -86,7 +86,7 @@ public class GroovyScriptEngineFactory implements ScriptEngineFactory {
     }
 
     /**
-     * This is also different than scripting.dev.java.net which used an
+     * This is also different from scripting.dev.java.net which used an
      * initial lowercase.  But these are proper names and should be capitalized.
      */
     @Override
diff --git a/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/transform/MacroCallTransformingVisitor.java b/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/transform/MacroCallTransformingVisitor.java
index 4e5c8d50a3..d332e75a41 100644
--- a/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/transform/MacroCallTransformingVisitor.java
+++ b/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/transform/MacroCallTransformingVisitor.java
@@ -44,7 +44,7 @@ import java.util.List;
 /**
  * Visitor to find and transform macro method calls. For the performance reasons it's not a transformer,
  * but transforming visitor - it mutates {@link MethodCallExpression} if it's a macro method call by replacing
- * original call (i.e. {@code myMacroMethod("foo", "bar")} with something like:
+ * original call (i.e. {@code myMacroMethod("foo", "bar")}) with something like:
  * {@code MacroStub.INSTANCE.macroMethod(123)}
  * (where {@code myMacroMethod} returns constant expression {@code 123})
  *
diff --git a/subprojects/groovy-nio/src/main/java/org/apache/groovy/nio/extensions/NioExtensions.java b/subprojects/groovy-nio/src/main/java/org/apache/groovy/nio/extensions/NioExtensions.java
index dedf30eee6..499c579294 100644
--- a/subprojects/groovy-nio/src/main/java/org/apache/groovy/nio/extensions/NioExtensions.java
+++ b/subprojects/groovy-nio/src/main/java/org/apache/groovy/nio/extensions/NioExtensions.java
@@ -910,7 +910,7 @@ public class NioExtensions extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Processes each descendant file in this directory and any sub-directories.
+     * Processes each descendant file in this directory and any subdirectories.
      * Processing consists of potentially calling <code>closure</code> passing it the current
      * file (which may be a normal file or subdirectory) and then if a subdirectory was encountered,
      * recursively processing the subdirectory. Whether the closure is called is determined by whether
@@ -939,7 +939,7 @@ public class NioExtensions extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Processes each descendant file in this directory and any sub-directories.
+     * Processes each descendant file in this directory and any subdirectories.
      * Processing consists of potentially calling <code>closure</code> passing it the current
      * file (which may be a normal file or subdirectory) and then if a subdirectory was encountered,
      * recursively processing the subdirectory.
@@ -1078,7 +1078,7 @@ public class NioExtensions extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Processes each descendant file in this directory and any sub-directories.
+     * Processes each descendant file in this directory and any subdirectories.
      * Convenience method for {@link #traverse(Path, java.util.Map, groovy.lang.Closure)} when
      * no options to alter the traversal behavior are required.
      *
@@ -1190,7 +1190,7 @@ public class NioExtensions extends DefaultGroovyMethodsSupport {
     }
 
     /**
-     * Processes each descendant file in this directory and any sub-directories.
+     * Processes each descendant file in this directory and any subdirectories.
      * Processing consists of calling <code>closure</code> passing it the current
      * file (which may be a normal file or subdirectory) and then if a subdirectory was encountered,
      * recursively processing the subdirectory.
@@ -1788,7 +1788,7 @@ public class NioExtensions extends DefaultGroovyMethodsSupport {
 
     /**
      * Create a new PrintWriter for this file which is then
-     * passed it into the given closure.  This method ensures its the writer
+     * passed it into the given closure. This method ensures the writer
      * is closed after the closure returns.
      *
      * @param self    a Path
diff --git a/subprojects/groovy-servlet/src/main/java/groovy/servlet/AbstractHttpServlet.java b/subprojects/groovy-servlet/src/main/java/groovy/servlet/AbstractHttpServlet.java
index d6c1f87ce7..5b4899f80e 100644
--- a/subprojects/groovy-servlet/src/main/java/groovy/servlet/AbstractHttpServlet.java
+++ b/subprojects/groovy-servlet/src/main/java/groovy/servlet/AbstractHttpServlet.java
@@ -71,7 +71,7 @@ import java.util.regex.Pattern;
  * </pre>
  * <p>
  * If you experience class-loading-troubles with Tomcat 4 (or higher) or any
- * other servlet container using custom class loader setups, you can fallback
+ * other servlet container using custom class loader setups, you can fall back
  * to use (slower) reflection in Groovy's MetaClass implementation. Please
  * contact the dev team with your problem! Thanks.
  * The servlet init parameter name is:
@@ -147,7 +147,7 @@ public abstract class AbstractHttpServlet extends HttpServlet implements Resourc
     protected boolean reflection;
 
     /**
-     * Debug flag logging the class the class loader of the request.
+     * Debug flag logging the classloader of the request.
      */
     private boolean logGROOVY861;
 
diff --git a/subprojects/groovy-servlet/src/main/java/groovy/servlet/GroovyServlet.java b/subprojects/groovy-servlet/src/main/java/groovy/servlet/GroovyServlet.java
index b8e15f3ecd..e8ca0ffd36 100644
--- a/subprojects/groovy-servlet/src/main/java/groovy/servlet/GroovyServlet.java
+++ b/subprojects/groovy-servlet/src/main/java/groovy/servlet/GroovyServlet.java
@@ -169,7 +169,7 @@ public class GroovyServlet extends AbstractHttpServlet {
     }
 
     /**
-     * Hook method to setup the GroovyScriptEngine to use.<br>
+     * Hook method to set up the GroovyScriptEngine to use.<br>
      * Subclasses may override this method to provide a custom engine.
      */
     protected GroovyScriptEngine createGroovyScriptEngine(){
diff --git a/subprojects/groovy-servlet/src/main/java/groovy/servlet/ServletBinding.java b/subprojects/groovy-servlet/src/main/java/groovy/servlet/ServletBinding.java
index 1d97272505..53ebcb9205 100644
--- a/subprojects/groovy-servlet/src/main/java/groovy/servlet/ServletBinding.java
+++ b/subprojects/groovy-servlet/src/main/java/groovy/servlet/ServletBinding.java
@@ -84,7 +84,7 @@ import java.util.Map;
  *
  * If <code>response.getWriter()</code> is called directly (without using out), then a write method
  * call on 'sout' will not cause the <code>IllegalStateException</code>, but it will still be invalid.
- * It is the responsibility of the user of this class, to not to mix these different usage
+ * It is the responsibility of the user of this class to not mix these different usage
  * styles. The same applies to calling <code>response.getOutputStream()</code> and using 'out' or 'html'.
  *
  * <h3>Methods</h3>
diff --git a/subprojects/groovy-servlet/src/test/groovy/groovy/servlet/ServletBindingTest.groovy b/subprojects/groovy-servlet/src/test/groovy/groovy/servlet/ServletBindingTest.groovy
index c8becfc63f..f6cf52118f 100644
--- a/subprojects/groovy-servlet/src/test/groovy/groovy/servlet/ServletBindingTest.groovy
+++ b/subprojects/groovy-servlet/src/test/groovy/groovy/servlet/ServletBindingTest.groovy
@@ -133,7 +133,7 @@ class ServletBindingTest extends GroovyTestCase {
     }
 
     /**
-     * Tests that getVariables truely returns all variables
+     * Tests that getVariables truly returns all variables
      */
     void testGetVariables_Contract() {
         def expectedVariables = ['request', 'response', 'context', 'application',
@@ -226,7 +226,7 @@ class ServletBindingTest extends GroovyTestCase {
     }
 
     /**
-     * Tests the contract on setVarible().
+     * Tests the contract on setVariable().
      */
     void testSetVariable_Contract() {
         def request = makeDefaultRequest()
diff --git a/subprojects/groovy-sql/src/main/java/groovy/sql/DataSet.java b/subprojects/groovy-sql/src/main/java/groovy/sql/DataSet.java
index 9e901decd4..e2198eefa1 100644
--- a/subprojects/groovy-sql/src/main/java/groovy/sql/DataSet.java
+++ b/subprojects/groovy-sql/src/main/java/groovy/sql/DataSet.java
@@ -456,8 +456,7 @@ public class DataSet extends Sql {
     }
 
     /**
-     * Returns a List of all of the rows from the table a DataSet
-     * represents.
+     * Returns a List of all the rows from the DataSet.
      *
      * @return Returns a list of GroovyRowResult objects from the dataset
      * @throws SQLException if a database error occurs
diff --git a/subprojects/groovy-sql/src/main/java/groovy/sql/GroovyResultSetExtension.java b/subprojects/groovy-sql/src/main/java/groovy/sql/GroovyResultSetExtension.java
index dfa280c307..b0871eb3d8 100644
--- a/subprojects/groovy-sql/src/main/java/groovy/sql/GroovyResultSetExtension.java
+++ b/subprojects/groovy-sql/src/main/java/groovy/sql/GroovyResultSetExtension.java
@@ -31,7 +31,7 @@ import java.util.Map;
 
 /**
  * GroovyResultSetExtension implements additional logic for ResultSet. Due to
- * the version incompatibility between java6 and java5 this methods are moved
+ * the version incompatibility between java6 and java5 those methods were moved
  * here from the original GroovyResultSet class. The methods in this class are
  * used by the proxy GroovyResultSetProxy, which will try to invoke methods
  * on this class before invoking it on ResultSet.
diff --git a/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java b/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
index 497047f723..e8645266b3 100644
--- a/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
+++ b/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
@@ -1207,7 +1207,7 @@ public class Sql implements AutoCloseable {
      * Resource handling is performed automatically where appropriate.
      *
      * @param sql         the sql statement
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @param rowClosure  called for each row with a GroovyResultSet
      * @throws SQLException if a database access error occurs
      */
@@ -1239,7 +1239,7 @@ public class Sql implements AutoCloseable {
      * @param sql         the sql statement
      * @param offset      the 1-based offset for the first row to be processed
      * @param maxRows     the maximum number of rows to be processed
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @param rowClosure  called for each row with a GroovyResultSet
      * @throws SQLException if a database access error occurs
      */
@@ -1306,7 +1306,7 @@ public class Sql implements AutoCloseable {
      * @param params      a list of parameters
      * @param offset      the 1-based offset for the first row to be processed
      * @param maxRows     the maximum number of rows to be processed
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @param rowClosure  called for each row with a GroovyResultSet
      * @throws SQLException if a database access error occurs
      */
@@ -1344,7 +1344,7 @@ public class Sql implements AutoCloseable {
      * @param map         a map containing the named parameters
      * @param offset      the 1-based offset for the first row to be processed
      * @param maxRows     the maximum number of rows to be processed
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @param rowClosure  called for each row with a GroovyResultSet
      * @throws SQLException if a database access error occurs
      * @since 1.8.7
@@ -1363,7 +1363,7 @@ public class Sql implements AutoCloseable {
      * @param sql         the sql statement
      * @param offset      the 1-based offset for the first row to be processed
      * @param maxRows     the maximum number of rows to be processed
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @param rowClosure  called for each row with a GroovyResultSet
      * @throws SQLException if a database access error occurs
      * @since 1.8.7
@@ -1404,7 +1404,7 @@ public class Sql implements AutoCloseable {
      *
      * @param sql         the sql statement
      * @param params      a list of parameters
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @param rowClosure  called for each row with a GroovyResultSet
      * @throws SQLException if a database access error occurs
      */
@@ -1420,7 +1420,7 @@ public class Sql implements AutoCloseable {
      *
      * @param sql         the sql statement
      * @param params      a map of named parameters
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @param rowClosure  called for each row with a GroovyResultSet
      * @throws SQLException if a database access error occurs
      * @since 1.8.7
@@ -1437,7 +1437,7 @@ public class Sql implements AutoCloseable {
      *
      * @param params      a map of named parameters
      * @param sql         the sql statement
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @param rowClosure  called for each row with a GroovyResultSet
      * @throws SQLException if a database access error occurs
      * @since 1.8.7
@@ -1593,7 +1593,7 @@ public class Sql implements AutoCloseable {
      * Resource handling is performed automatically where appropriate.
      *
      * @param gstring     a GString containing the SQL query with embedded params
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @param rowClosure  called for each row with a GroovyResultSet
      * @throws SQLException if a database access error occurs
      * @see #expand(Object)
@@ -1624,7 +1624,7 @@ public class Sql implements AutoCloseable {
      * "scrollable" type.
      *
      * @param gstring     a GString containing the SQL query with embedded params
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @param offset      the 1-based offset for the first row to be processed
      * @param maxRows     the maximum number of rows to be processed
      * @param rowClosure  called for each row with a GroovyResultSet
@@ -1751,7 +1751,7 @@ public class Sql implements AutoCloseable {
      * Resource handling is performed automatically where appropriate.
      *
      * @param sql         the SQL statement
-     * @param metaClosure called with meta data of the ResultSet
+     * @param metaClosure called with metadata of the ResultSet
      * @return a list of GroovyRowResult objects
      * @throws SQLException if a database access error occurs
      */
@@ -1780,7 +1780,7 @@ public class Sql implements AutoCloseable {
      * @param sql         the SQL statement
      * @param offset      the 1-based offset for the first row to be processed
      * @param maxRows     the maximum number of rows to be processed
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @return a list of GroovyRowResult objects
      * @throws SQLException if a database access error occurs
      */
@@ -1971,7 +1971,7 @@ public class Sql implements AutoCloseable {
      *
      * @param sql         the SQL statement
      * @param params      a list of parameters
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @return a list of GroovyRowResult objects
      * @throws SQLException if a database access error occurs
      */
@@ -1986,7 +1986,7 @@ public class Sql implements AutoCloseable {
      *
      * @param sql         the SQL statement
      * @param params      a map of named parameters
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @return a list of GroovyRowResult objects
      * @throws SQLException if a database access error occurs
      * @since 1.8.7
@@ -2002,7 +2002,7 @@ public class Sql implements AutoCloseable {
      *
      * @param params      a map of named parameters
      * @param sql         the SQL statement
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @return a list of GroovyRowResult objects
      * @throws SQLException if a database access error occurs
      * @since 1.8.7
@@ -2037,7 +2037,7 @@ public class Sql implements AutoCloseable {
      * @param params      a list of parameters
      * @param offset      the 1-based offset for the first row to be processed
      * @param maxRows     the maximum number of rows to be processed
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @return a list of GroovyRowResult objects
      * @throws SQLException if a database access error occurs
      */
@@ -2061,7 +2061,7 @@ public class Sql implements AutoCloseable {
      * @param params      a map of named parameters
      * @param offset      the 1-based offset for the first row to be processed
      * @param maxRows     the maximum number of rows to be processed
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @return a list of GroovyRowResult objects
      * @throws SQLException if a database access error occurs
      * @since 1.8.7
@@ -2079,7 +2079,7 @@ public class Sql implements AutoCloseable {
      * @param sql         the SQL statement
      * @param offset      the 1-based offset for the first row to be processed
      * @param maxRows     the maximum number of rows to be processed
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @return a list of GroovyRowResult objects
      * @throws SQLException if a database access error occurs
      * @since 1.8.7
@@ -2154,7 +2154,7 @@ public class Sql implements AutoCloseable {
      * Resource handling is performed automatically where appropriate.
      *
      * @param gstring     a GString containing the SQL query with embedded params
-     * @param metaClosure called with meta data of the ResultSet
+     * @param metaClosure called with metadata of the ResultSet
      * @return a list of GroovyRowResult objects
      * @throws SQLException if a database access error occurs
      * @see #expand(Object)
@@ -2187,7 +2187,7 @@ public class Sql implements AutoCloseable {
      * @param gstring     the SQL statement
      * @param offset      the 1-based offset for the first row to be processed
      * @param maxRows     the maximum number of rows to be processed
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @return a list of GroovyRowResult objects
      * @throws SQLException if a database access error occurs
      */
@@ -2722,7 +2722,7 @@ public class Sql implements AutoCloseable {
      * @param params         The parameter values that will be substituted
      *                       into the SQL statement's parameter slots
      * @param keyColumnNames a list of column names indicating the columns that should be returned from the
-     *                       inserted row or rows (some drivers may be case sensitive, e.g. may require uppercase names)
+     *                       inserted row or rows (some drivers may be case-sensitive, e.g. may require uppercase names)
      * @return A list of the auto-generated row results for each inserted row (typically auto-generated keys)
      * @throws SQLException if a database access error occurs
      * @see Connection#prepareStatement(String, String[])
@@ -2771,7 +2771,7 @@ public class Sql implements AutoCloseable {
      * @param params         a map containing the named parameters
      * @param sql            The SQL statement to execute
      * @param keyColumnNames a list of column names indicating the columns that should be returned from the
-     *                       inserted row or rows (some drivers may be case sensitive, e.g. may require uppercase names)
+     *                       inserted row or rows (some drivers may be case-sensitive, e.g. may require uppercase names)
      * @return A list of the auto-generated row results for each inserted row (typically auto-generated keys)
      * @throws SQLException if a database access error occurs
      * @see Connection#prepareStatement(String, String[])
@@ -2810,7 +2810,7 @@ public class Sql implements AutoCloseable {
      *
      * @param sql            The SQL statement to execute
      * @param keyColumnNames an array of column names indicating the columns that should be returned from the
-     *                       inserted row or rows (some drivers may be case sensitive, e.g. may require uppercase names)
+     *                       inserted row or rows (some drivers may be case-sensitive, e.g. may require uppercase names)
      * @return A list of the auto-generated row results for each inserted row (typically auto-generated keys)
      * @throws SQLException if a database access error occurs
      * @since 2.3.2
@@ -2844,7 +2844,7 @@ public class Sql implements AutoCloseable {
      *
      * @param sql            The SQL statement to execute
      * @param keyColumnNames an array of column names indicating the columns that should be returned from the
-     *                       inserted row or rows (some drivers may be case sensitive, e.g. may require uppercase names)
+     *                       inserted row or rows (some drivers may be case-sensitive, e.g. may require uppercase names)
      * @param params         The parameter values that will be substituted
      *                       into the SQL statement's parameter slots
      * @return A list of the auto-generated row results for each inserted row (typically auto-generated keys)
@@ -2911,7 +2911,7 @@ public class Sql implements AutoCloseable {
      *
      * @param gstring        a GString containing the SQL query with embedded params
      * @param keyColumnNames a list of column names indicating the columns that should be returned from the
-     *                       inserted row or rows (some drivers may be case sensitive, e.g. may require uppercase names)
+     *                       inserted row or rows (some drivers may be case-sensitive, e.g. may require uppercase names)
      * @return A list of the auto-generated row results for each inserted row (typically auto-generated keys)
      * @throws SQLException if a database access error occurs
      * @see Connection#prepareStatement(String, String[])
@@ -4028,7 +4028,7 @@ public class Sql implements AutoCloseable {
      *
      * @param sql         query to execute
      * @param rs          the ResultSet to process
-     * @param metaClosure called for meta data (only once after sql execution)
+     * @param metaClosure called for metadata (only once after sql execution)
      * @return the resulting list of rows
      * @throws SQLException if a database error occurs
      */
@@ -4418,7 +4418,7 @@ public class Sql implements AutoCloseable {
      * Default behavior is to call a previously saved closure, if any, using the
      * statement as a parameter.
      *
-     * @param statement the statement to cleanup
+     * @param statement the statement to clean up
      * @since 4.0.1
      */
     protected void cleanup(Statement statement) {
diff --git a/subprojects/groovy-templates/src/main/groovy/groovy/text/StreamingTemplateEngine.java b/subprojects/groovy-templates/src/main/groovy/groovy/text/StreamingTemplateEngine.java
index f3c78dc343..02ae2d3c34 100644
--- a/subprojects/groovy-templates/src/main/groovy/groovy/text/StreamingTemplateEngine.java
+++ b/subprojects/groovy-templates/src/main/groovy/groovy/text/StreamingTemplateEngine.java
@@ -264,7 +264,7 @@ public class StreamingTemplateEngine extends TemplateEngine {
             private static final long serialVersionUID = -3786157136157691230L;
         }
 
-        //WE USE THIS AS REUSABLE        
+        //WE USE THIS AS REUSABLE
         //CHECKSTYLE.OFF: ConstantNameCheck - special case with a reusable exception
         private static final FinishedReadingException finishedReadingException;
         //CHECKSTYLE.ON: ConstantNameCheck
@@ -541,7 +541,7 @@ public class StreamingTemplateEngine extends TemplateEngine {
 
              Note: we don't do java escaping of slashes in the below
              example, i.e. the source string is what you would see in a text editor when looking at your template
-             file: 
+             file:
              source string     result
              'bob'            -> 'bob'
              '\bob'           -> '\bob'
@@ -559,7 +559,7 @@ public class StreamingTemplateEngine extends TemplateEngine {
                 //this means we have received a double backslash sequence
                 //if this is followed by ${ or <% we output one backslash
                 //and interpret the following sequences with groovy, if followed by anything
-                //else we output the two backslashes and continue as usual 
+                //else we output the two backslashes and continue as usual
                 source.mark(3);
                 int d = read(source, sourcePosition, lookAhead);
                 c = read(source, sourcePosition, lookAhead);
@@ -630,7 +630,7 @@ public class StreamingTemplateEngine extends TemplateEngine {
         }
 
         /**
-         * Parses a non curly dollar preceded identifier of the type
+         * Parses a non-curly dollar preceded identifier of the type
          * '$bird' in the following template example:
          *
          * <pre>
@@ -785,7 +785,7 @@ public class StreamingTemplateEngine extends TemplateEngine {
         /*
          * Create groovy assertion style error message for template error. Example:
          *
-         * Error parsing expression on line 71 column 15, message: no such property jboss for for class DUMMY
+         * Error parsing expression on line 71 column 15, message: no such property jboss for class DUMMY
          * templatedata${jboss}templateddatatemplateddata
          *             ^------^
          *                 |
@@ -853,7 +853,7 @@ public class StreamingTemplateEngine extends TemplateEngine {
             try {
                 msg += "\n" + getErrorContext(p.row);
             } catch (IOException e) {
-                //we opt for not doing anthing here...we just do not get context if
+                //we opt for not doing anything here...we just do not get context if
                 //this happens
             }
 
diff --git a/subprojects/groovy-templates/src/main/groovy/groovy/text/markup/BaseTemplate.java b/subprojects/groovy-templates/src/main/groovy/groovy/text/markup/BaseTemplate.java
index fbf53f5215..2495bd21c4 100644
--- a/subprojects/groovy-templates/src/main/groovy/groovy/text/markup/BaseTemplate.java
+++ b/subprojects/groovy-templates/src/main/groovy/groovy/text/markup/BaseTemplate.java
@@ -382,8 +382,8 @@ public abstract class BaseTemplate implements Writable {
     }
 
     /**
-     * Imports a template and renders it using the specified model, allowing fine grained composition
-     * of templates and layouting. This works similarily to a template include but allows a distinct
+     * Imports a template and renders it using the specified model, allowing fine-grained composition
+     * of templates and layouting. This works similarly to a template include but allows a distinct
      * model to be used. This version doesn't inherit the model from the parent. If you need model
      * inheritance, see {@link #layout(java.util.Map, String, boolean)}.
      * @param model model to be passed to the template
@@ -397,8 +397,8 @@ public abstract class BaseTemplate implements Writable {
     }
 
     /**
-     * Imports a template and renders it using the specified model, allowing fine grained composition of templates and
-     * layouting. This works similarily to a template include but allows a distinct model to be used. If the layout
+     * Imports a template and renders it using the specified model, allowing fine-grained composition of templates and
+     * layouting. This works similarly to a template include but allows a distinct model to be used. If the layout
      * inherits from the parent model, a new model is created, with the values from the parent model, eventually
      * overridden with those provided specifically for this layout.
      *
diff --git a/subprojects/groovy-templates/src/main/groovy/groovy/text/markup/TemplateResolver.java b/subprojects/groovy-templates/src/main/groovy/groovy/text/markup/TemplateResolver.java
index 4dac742b9b..7b0345ab91 100644
--- a/subprojects/groovy-templates/src/main/groovy/groovy/text/markup/TemplateResolver.java
+++ b/subprojects/groovy-templates/src/main/groovy/groovy/text/markup/TemplateResolver.java
@@ -22,7 +22,7 @@ import java.io.IOException;
 import java.net.URL;
 
 /**
- * Interface for template resolvers, which, given a template identifier, return an URL where the template
+ * Interface for template resolvers, which, given a template identifier, return a URL where the template
  * can be loaded.
  */
 public interface TemplateResolver {
diff --git a/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/package.html b/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/package.html
index edc0ef1c9b..8f3c8a7b59 100644
--- a/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/package.html
+++ b/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/package.html
@@ -29,7 +29,7 @@
     <dl>
         <dt>Collaborator</dt>
         <dd>An ordinary Groovy or Java class that's instance or class methods
-        are to be called. Calling them can be time consuming or produce side effects that
+        are to be called. Calling them can be time-consuming or produce side effects that
         are unwanted when testing (e.g. database operations). </dd>
 
         <dt>Caller</dt>
@@ -73,4 +73,4 @@
     </ul>
    <p>For an extensive list of usages see the unit tests in this package.</p>
   </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/subprojects/groovy-typecheckers/build.gradle b/subprojects/groovy-typecheckers/build.gradle
index 6564937772..745c6c5485 100644
--- a/subprojects/groovy-typecheckers/build.gradle
+++ b/subprojects/groovy-typecheckers/build.gradle
@@ -10,7 +10,7 @@
  *    http://www.apache.org/licenses/LICENSE-2.0
  *
  *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed oHistoryRecordGetTextToRunTestsn an
+ *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
@@ -28,4 +28,4 @@ dependencies {
 groovyLibrary {
     withoutBinaryCompatibilityChecks()
     optionalModule()
-}
\ No newline at end of file
+}
diff --git a/subprojects/groovy-xml/src/main/groovy/groovy/xml/XmlParserFactory.groovy b/subprojects/groovy-xml/src/main/groovy/groovy/xml/XmlParserFactory.groovy
index d19739d97c..1eddf714cd 100644
--- a/subprojects/groovy-xml/src/main/groovy/groovy/xml/XmlParserFactory.groovy
+++ b/subprojects/groovy-xml/src/main/groovy/groovy/xml/XmlParserFactory.groovy
@@ -19,7 +19,7 @@
 package groovy.xml
 
 /**
- * Factory method targetting dynamic contexts which allows a new {@code XmlParser} to be created.
+ * Factory method targeting dynamic contexts which allows a new {@code XmlParser} to be created.
  * It is intended to assist with migration from Groovy 2.5.x to Groovy 3+.
  * Code using this factory will not need to change moving from 2.x to 3+.
  * In Groovy 2.5.x, a {@code groovy.util.XmlParser} will be returned.
diff --git a/subprojects/groovy-xml/src/main/groovy/groovy/xml/XmlSlurperFactory.groovy b/subprojects/groovy-xml/src/main/groovy/groovy/xml/XmlSlurperFactory.groovy
index d5898b9e49..d9c80689e9 100644
--- a/subprojects/groovy-xml/src/main/groovy/groovy/xml/XmlSlurperFactory.groovy
+++ b/subprojects/groovy-xml/src/main/groovy/groovy/xml/XmlSlurperFactory.groovy
@@ -19,7 +19,7 @@
 package groovy.xml
 
 /**
- * Factory method targetting dynamic contexts which allows a new {@code XmlSlurper} to be created.
+ * Factory method targeting dynamic contexts which allows a new {@code XmlSlurper} to be created.
  * It is intended to assist with migration from Groovy 2.5.x to Groovy 3+.
  * Code using this factory will not need to change moving from 2.x to 3+.
  * In Groovy 2.5.x, a {@code groovy.util.XmlSlurper} will be returned.
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/XmlParser.java b/subprojects/groovy-xml/src/main/java/groovy/xml/XmlParser.java
index 976ad0f9d2..d275abdbc1 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/XmlParser.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/XmlParser.java
@@ -245,7 +245,7 @@ public class XmlParser implements ContentHandler {
     /**
      * Parse the content of the specified URI into a tree of Nodes.
      *
-     * @param uri a String containing a uri pointing to the XML to be parsed
+     * @param uri a String containing a URI pointing to the XML to be parsed
      * @return the root node of the parsed tree of Nodes
      * @throws SAXException Any SAX exception, possibly
      *                      wrapping another exception.
@@ -366,7 +366,7 @@ public class XmlParser implements ContentHandler {
     }
 
     // ContentHandler interface
-    //-------------------------------------------------------------------------                    
+    //-------------------------------------------------------------------------
     @Override
     public void startDocument() throws SAXException {
         parent = null;
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/XmlUtil.java b/subprojects/groovy-xml/src/main/java/groovy/xml/XmlUtil.java
index 749291515e..91cac1ab31 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/XmlUtil.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/XmlUtil.java
@@ -390,7 +390,7 @@ public class XmlUtil {
 
     /**
      * Factory method to create a SAXParser configured to validate according to a particular schema language and
-     * an URL pointing to the schema to validate against.
+     * a URL pointing to the schema to validate against.
      * The created SAXParser will be namespace-aware and not validate against DTDs.
      *
      * @param schemaLanguage the schema language used, e.g. XML Schema or RelaxNG (as per the String representation in javax.xml.XMLConstants)
@@ -407,7 +407,7 @@ public class XmlUtil {
 
     /**
      * Factory method to create a SAXParser configured to validate according to a particular schema language and
-     * an URL pointing to the schema to validate against.
+     * a URL pointing to the schema to validate against.
      *
      * @param schemaLanguage the schema language used, e.g. XML Schema or RelaxNG (as per the String representation in javax.xml.XMLConstants)
      * @param namespaceAware will the parser be namespace aware
@@ -567,20 +567,26 @@ public class XmlUtil {
         try {
             factory.setFeature(feature, value);
         }
-        catch (TransformerConfigurationException ignored) { }
+        catch (TransformerConfigurationException ignored) {
+            // feature is not supported, ignore
+        }
     }
 
     public static void setFeatureQuietly(DocumentBuilderFactory factory, String feature, boolean value) {
         try {
             factory.setFeature(feature, value);
         }
-        catch (ParserConfigurationException ignored) { }
+        catch (ParserConfigurationException ignored) {
+            // feature is not supported, ignore
+        }
     }
 
     public static void setFeatureQuietly(SAXParserFactory factory, String feature, boolean value) {
         try {
             factory.setFeature(feature, value);
         }
-        catch (ParserConfigurationException | SAXNotSupportedException | SAXNotRecognizedException ignored) { }
+        catch (ParserConfigurationException | SAXNotSupportedException | SAXNotRecognizedException ignored) {
+            // feature is not supported, ignore
+        }
     }
-}
\ No newline at end of file
+}
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Attribute.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Attribute.java
index fd35f950d3..f90e5a8710 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Attribute.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/Attribute.java
@@ -148,7 +148,7 @@ public class Attribute extends GPathResult {
     }
 
     /**
-     * NOP, because an node can not be appended to an attribute.
+     * NOP, because a node can not be appended to an attribute.
      */
     @Override
     protected void appendNode(final Object newValue) {
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/GPathResult.java b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/GPathResult.java
index 19218d4ccd..e654ebd1f7 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/GPathResult.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/slurpersupport/GPathResult.java
@@ -284,7 +284,7 @@ public abstract class GPathResult extends GroovyObjectSupport implements Writabl
     }
 
     /**
-     * Converts the text of this GPathResult to a Integer object.
+     * Converts the text of this GPathResult to an Integer object.
      *
      * @return the GPathResult, converted to a <code>Integer</code>
      */
@@ -652,7 +652,7 @@ public abstract class GPathResult extends GroovyObjectSupport implements Writabl
                     } else {
                         delegate.invokeMethod("yield", new Object[]{child});
                     }
-                }                
+                }
             }
         };
     }
diff --git a/subprojects/performance/src/files/pleac01.groovy b/subprojects/performance/src/files/pleac01.groovy
index 8b4046a06a..1a577702c4 100644
--- a/subprojects/performance/src/files/pleac01.groovy
+++ b/subprojects/performance/src/files/pleac01.groovy
@@ -249,7 +249,7 @@ assert v1 == 'omega' && v2 == 'alpha'
 
 // @@PLEAC@@_1.4
 //----------------------------------------------------------------------------------
-// char and int are interchangable, apart from precision difference
+// char and int are interchangeable, apart from precision difference
 // char use 16 bits while int use 32, requiring a cast from int to char
 char ch = 'e'
 int num = ch         // no problem
diff --git a/subprojects/stress/src/stressTest/java/org/codehaus/groovy/reflection/ClassInfoDeadlockStressTest.java b/subprojects/stress/src/stressTest/java/org/codehaus/groovy/reflection/ClassInfoDeadlockStressTest.java
index 338e00660a..a0d04bdabf 100644
--- a/subprojects/stress/src/stressTest/java/org/codehaus/groovy/reflection/ClassInfoDeadlockStressTest.java
+++ b/subprojects/stress/src/stressTest/java/org/codehaus/groovy/reflection/ClassInfoDeadlockStressTest.java
@@ -47,7 +47,7 @@ public class ClassInfoDeadlockStressTest {
      * We first generate a large number of ClassInfo instances for classes
      * that are no longer reachable.  Then queue up threads to all request
      * ClassInfo instances for new classes simultaneously to ensure that
-     * clearing the old references wont deadlock the creation of new
+     * clearing the old references won't deadlock the creation of new
      * instances.
      * <p>
      * GROOVY-8067
diff --git a/subprojects/stress/src/stressTest/java/org/codehaus/groovy/util/ManagedConcurrentMapStressTest.java b/subprojects/stress/src/stressTest/java/org/codehaus/groovy/util/ManagedConcurrentMapStressTest.java
index 0fb936f63b..24bd06ff10 100644
--- a/subprojects/stress/src/stressTest/java/org/codehaus/groovy/util/ManagedConcurrentMapStressTest.java
+++ b/subprojects/stress/src/stressTest/java/org/codehaus/groovy/util/ManagedConcurrentMapStressTest.java
@@ -79,7 +79,7 @@ public class ManagedConcurrentMapStressTest {
     /**
      * This tests for deadlock which can happen if more than one thread is allowed
      * to process entries from the same RefQ. We run multiple iterations because it
-     * wont always be detected one run.
+     * won't always be detected in one run.
      *
      * @throws Exception
      */
diff --git a/subprojects/stress/src/stressTest/java/org/codehaus/groovy/util/ManagedConcurrentValueMapStressTest.java b/subprojects/stress/src/stressTest/java/org/codehaus/groovy/util/ManagedConcurrentValueMapStressTest.java
index d379f97680..e8b56a6502 100644
--- a/subprojects/stress/src/stressTest/java/org/codehaus/groovy/util/ManagedConcurrentValueMapStressTest.java
+++ b/subprojects/stress/src/stressTest/java/org/codehaus/groovy/util/ManagedConcurrentValueMapStressTest.java
@@ -73,7 +73,7 @@ public class ManagedConcurrentValueMapStressTest {
     /**
      * This tests for deadlock which can happen if more than one thread is allowed
      * to process entries from the same RefQ. We run multiple iterations because it
-     * wont always be detected one run.
+     * won't always be detected in one run.
      *
      * @throws Exception
      */


[groovy] 01/08: Fix minor typos in documentations in spec/doc

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 2ac434ccd78c1fe07b4e5bdae7a7530a3e615358
Author: Marc Wrobel <ma...@gmail.com>
AuthorDate: Tue Oct 18 12:36:36 2022 +0200

    Fix minor typos in documentations in spec/doc
    
    A few trailing whitespaces were removed in the process.
---
 src/spec/doc/_design-pattern-monoid.adoc         |  2 +-
 src/spec/doc/_design-pattern-singleton.adoc      |  4 ++--
 src/spec/doc/_records.adoc                       |  2 +-
 src/spec/doc/_traits.adoc                        |  2 +-
 src/spec/doc/_type-checking-extensions.adoc      |  2 +-
 src/spec/doc/_working-with-io.adoc               |  2 +-
 src/spec/doc/core-closures.adoc                  |  8 ++++----
 src/spec/doc/core-differences-java.adoc          |  2 +-
 src/spec/doc/core-domain-specific-languages.adoc | 10 ++++-----
 src/spec/doc/core-getting-started.adoc           |  4 ++--
 src/spec/doc/core-metaprogramming.adoc           | 26 ++++++++++++------------
 src/spec/doc/core-object-orientation.adoc        | 20 +++++++++---------
 src/spec/doc/core-operators.adoc                 |  2 +-
 src/spec/doc/core-program-structure.adoc         | 12 +++++------
 src/spec/doc/core-semantics.adoc                 | 26 ++++++++++++------------
 src/spec/doc/core-syntax.adoc                    |  8 ++++----
 src/spec/doc/core-testing-guide.adoc             | 24 +++++++++++-----------
 src/spec/doc/grape.adoc                          |  6 +++---
 src/spec/doc/guide-integrating.adoc              |  2 +-
 src/spec/doc/performance-guide.adoc              |  2 +-
 src/spec/doc/style-guide.adoc                    |  6 +++---
 src/spec/doc/tools-groovyc.adoc                  |  6 +++---
 22 files changed, 89 insertions(+), 89 deletions(-)

diff --git a/src/spec/doc/_design-pattern-monoid.adoc b/src/spec/doc/_design-pattern-monoid.adoc
index 111b94cec3..a8125e4ce8 100644
--- a/src/spec/doc/_design-pattern-monoid.adoc
+++ b/src/spec/doc/_design-pattern-monoid.adoc
@@ -105,7 +105,7 @@ we can employ some interesting ways to solve the aggregation including:
 to potentially start part way through be reusing a cached value of summing 1..4 if that had been calculated earlier
 * Inherent parallelization can make use of multiple cores
 
-Let's just look at the first of these in more detail. With a multi-core
+Let's just look at the first of these in more detail. With a multicore
 processor, one core could add `10` plus `11`, another core `12` plus `13`, and so on.
 We'd use the _identity_ element if needed (shown being added to `16` in our example).
 Then the intermediate results could also be added together concurrently and so on until the result was reached.
diff --git a/src/spec/doc/_design-pattern-singleton.adoc b/src/spec/doc/_design-pattern-singleton.adoc
index dee50276f0..67c422193e 100644
--- a/src/spec/doc/_design-pattern-singleton.adoc
+++ b/src/spec/doc/_design-pattern-singleton.adoc
@@ -38,7 +38,7 @@ Suppose we wish to create a class for collecting votes. Because getting the righ
 include::../test/DesignPatternsTest.groovy[tags=singleton_vote_collector,indent=0]
 ----
 
-Some points of interest about this code:
+Some points of interest in this code:
 
 - it has a private constructor, so no `VoteCollector` objects can be created in our system (except for the `INSTANCE` we create)
 - the `INSTANCE` is also private, so it can't be changed once set
@@ -158,4 +158,4 @@ Client: 14800362, Calc: 10580099, Total Calculations: 2
 - http://www.ibm.com/developerworks/webservices/library/co-single/index.html[Use your singletons wisely]
 - http://www.ibm.com/developerworks/java/library/j-dcl/index.html[Double-checked locking and the Singleton pattern]
 - https://web.archive.org/web/20160807234810/http://blog.crazybob.org/2007/01/lazy-loading-singletons.html[Lazy Loading Singletons]
-- https://csharpindepth.com/Articles/Singleton[Implementing the Singleton Pattern in C#]
\ No newline at end of file
+- https://csharpindepth.com/Articles/Singleton[Implementing the Singleton Pattern in C#]
diff --git a/src/spec/doc/_records.adoc b/src/spec/doc/_records.adoc
index 9aa8ac8a6d..1d507fca06 100644
--- a/src/spec/doc/_records.adoc
+++ b/src/spec/doc/_records.adoc
@@ -58,7 +58,7 @@ include::../test/RecordSpecificationTest.groovy[tags=record_message_equivalent,i
 
 Note the special naming convention for record getters. They are the same name as the field
 (rather than the often common JavaBean convention of capitalized with a "get" prefix).
-Rather than refering to a record's fields or properties, the term _component_
+Rather than referring to a record's fields or properties, the term _component_
 is typically used for records. So our `Message` record has `from`, `to`, and `body` components.
 
 Like in Java, you can override the normally implicitly supplied methods
diff --git a/src/spec/doc/_traits.adoc b/src/spec/doc/_traits.adoc
index d165755de5..9616119047 100644
--- a/src/spec/doc/_traits.adoc
+++ b/src/spec/doc/_traits.adoc
@@ -813,7 +813,7 @@ In order to make this contract explicit, and to make the type checker aware of t
 a `@SelfType` annotation that will:
 
 * let you declare the types that a class that implements this trait must inherit or implement
-* throw a compile time error if those type constraints are not satisfied
+* throw a compile-time error if those type constraints are not satisfied
 
 So in our previous example, we can fix the trait using the `@groovy.transform.SelfType` annotation:
 
diff --git a/src/spec/doc/_type-checking-extensions.adoc b/src/spec/doc/_type-checking-extensions.adoc
index 0cda7b3cb5..a2f6fb6f4c 100644
--- a/src/spec/doc/_type-checking-extensions.adoc
+++ b/src/spec/doc/_type-checking-extensions.adoc
@@ -958,7 +958,7 @@ without the extension, the code would still pass.
 === Mixed mode compilation
 
 In the previous section, we highlighted the fact that you can activate type checking extensions with
-`@CompileStatic`. In that context, the type checker would not complain any more about some unresolved variables or
+`@CompileStatic`. In that context, the type checker would not complain anymore about some unresolved variables or
 unknown method calls, but it would still wouldn't know how to compile them statically.
 
 Mixed mode compilation offers a third way, which is to instruct the compiler that whenever an unresolved variable
diff --git a/src/spec/doc/_working-with-io.adoc b/src/spec/doc/_working-with-io.adoc
index 91ebc2a3ca..12981a3b7c 100644
--- a/src/spec/doc/_working-with-io.adoc
+++ b/src/spec/doc/_working-with-io.adoc
@@ -281,7 +281,7 @@ There are also variations of `consumeProcessOutput` that make use of `StringBuff
 `OutputStream` etc... For a complete list, please read the
 http://docs.groovy-lang.org/latest/html/groovy-jdk/java/lang/Process.html[GDK API for java.lang.Process]
 
-In addition, these is a `pipeTo` command (mapped to `|`
+In addition, there is a `pipeTo` command (mapped to `|`
 to allow overloading) which lets the output stream of one process be fed
 into the input stream of another process.
 
diff --git a/src/spec/doc/core-closures.adoc b/src/spec/doc/core-closures.adoc
index 62d56f9a34..f9e945bb8f 100644
--- a/src/spec/doc/core-closures.adoc
+++ b/src/spec/doc/core-closures.adoc
@@ -223,7 +223,7 @@ include::../test/ClosuresSpecTest.groovy[tags=closure_this,indent=0]
 <2> calling the closure will return the instance of `Enclosing` where the closure is defined
 <3> in general, you will just want to use the shortcut `this` notation
 <4> and it returns *exactly* the same object
-<5> if the closure is defined in a inner class
+<5> if the closure is defined in an inner class
 <6> `this` in the closure *will* return the inner class, not the top-level one
 <7> in case of nested closures, like here `cl` being defined inside the scope of `nestedClosures`
 <8> then `this` corresponds to the closest outer class, not the enclosing closure!
@@ -250,7 +250,7 @@ include::../test/ClosuresSpecTest.groovy[tags=closure_owner,indent=0]
 <2> calling the closure will return the instance of `Enclosing` where the closure is defined
 <3> in general, you will just want to use the shortcut `owner` notation
 <4> and it returns *exactly* the same object
-<5> if the closure is defined in a inner class
+<5> if the closure is defined in an inner class
 <6> `owner` in the closure *will* return the inner class, not the top-level one
 <7> but in case of nested closures, like here `cl` being defined inside the scope of `nestedClosures`
 <8> then `owner` corresponds to the enclosing closure, hence a different object from `this`!
@@ -495,7 +495,7 @@ include::../test/ClosuresSpecTest.groovy[tags=left_curry,indent=0]
 
 ==== Right currying
 
-Similarily to left currying, it is possible to set the right-most parameter of a closure:
+Similarly to left currying, it is possible to set the right-most parameter of a closure:
 
 [source,groovy]
 ----
@@ -554,7 +554,7 @@ The behavior of the cache can be tweaked using alternate methods:
 * `memoizeAtLeast` will generate a new closure which caches *at least* _n_ values
 * `memoizeBetween` will generate a new closure which caches *at least* _n_ values and *at most* _n_ values
 
-The cache used in all memoize variants is a LRU cache.
+The cache used in all memoize variants is an LRU cache.
 
 === Composition
 
diff --git a/src/spec/doc/core-differences-java.adoc b/src/spec/doc/core-differences-java.adoc
index cbb5264714..55b17b6bb2 100644
--- a/src/spec/doc/core-differences-java.adoc
+++ b/src/spec/doc/core-differences-java.adoc
@@ -169,7 +169,7 @@ new File('/path/to/file').withReader('UTF-8') { reader ->
 WARNING: The implementation of anonymous inner classes and nested classes follow Java closely,
 but there are some differences, e.g.
 local variables accessed from within such classes don't have to be final.
-We piggy-back on some implementation details we use for `groovy.lang.Closure`
+We piggyback on some implementation details we use for `groovy.lang.Closure`
 when generating inner class bytecode.
 
 === Static inner classes
diff --git a/src/spec/doc/core-domain-specific-languages.adoc b/src/spec/doc/core-domain-specific-languages.adoc
index 59998a807f..3838f7c815 100644
--- a/src/spec/doc/core-domain-specific-languages.adoc
+++ b/src/spec/doc/core-domain-specific-languages.adoc
@@ -132,7 +132,7 @@ This allows you to provide your own Java or Groovy objects which can take advant
 
 [options="header"]
 |======================
-|Operator | Method 
+|Operator | Method
 | `a + b` | a.plus(b)
 | `a - b` | a.minus(b)
 | `a * b` | a.multiply(b)
@@ -273,7 +273,7 @@ An illustration of this can be found in Groovy using the `TimeCategory`:
 include::../test/metaprogramming/CategoryTest.groovy[tags=time_category,indent=0]
 ----
 <1> using the `TimeCategory`, a property `minute` is added to the `Integer` class
-<2> similarily, the `months` method returns a `groovy.time.DatumDependentDuration` which can be used in calculus
+<2> similarly, the `months` method returns a `groovy.time.DatumDependentDuration` which can be used in calculus
 
 Categories are lexically bound, making them a great fit for internal DSLs.
 
@@ -351,7 +351,7 @@ include::../test/DelegatesToSpecTest.groovy[tags=email_builder_usage,indent=0]
 ---------------------------------------
 
 Then the type checker will know that there’s an `email` method accepting
-a `Closure`, but it will complain for every method call *inside* the
+a `Closure`, but it will complain about every method call *inside* the
 closure, because `from`, for example, is not a method which is defined
 in the class. Indeed, it’s defined in the `EmailSpec` class and it has
 absolutely no hint to help it knowing that the closure delegate will, at
@@ -1032,7 +1032,7 @@ You can also share all the settings by simply sharing the config file.
 
 If:
 
-* runtime metaprogramming doesn't allow you do do what you want
+* runtime metaprogramming doesn't allow you to do what you want
 * you need to improve the performance of the execution of your DSLs
 * you want to leverage the same syntax as Groovy but with different semantics
 * you want to improve support for type checking in your DSLs
@@ -1080,7 +1080,7 @@ include::../../../subprojects/groovy-xml/src/spec/doc/_dom-builder.adoc[leveloff
 
 ==== NodeBuilder
 
-`NodeBuilder` is used for creating nested trees of gapi:groovy.util.Node[Node] objects for handling arbitrary data. 
+`NodeBuilder` is used for creating nested trees of gapi:groovy.util.Node[Node] objects for handling arbitrary data.
 To create a simple user list you use a `NodeBuilder` like this:
 
 [source,groovy]
diff --git a/src/spec/doc/core-getting-started.adoc b/src/spec/doc/core-getting-started.adoc
index 4b4b6d6b2b..1858bfd188 100644
--- a/src/spec/doc/core-getting-started.adoc
+++ b/src/spec/doc/core-getting-started.adoc
@@ -107,7 +107,7 @@ That's all there is to it!
 
 ==== MacPorts
 
-If you're on MacOS and have https://www.macports.org[MacPorts] installed, you can run:
+If you're on macOS and have https://www.macports.org[MacPorts] installed, you can run:
 
 [source,shell]
 ----
@@ -116,7 +116,7 @@ sudo port install groovy
 
 ==== Homebrew
 
-If you're on MacOS and have https://mxcl.github.com/homebrew[Homebrew] installed, you can run:
+If you're on macOS and have https://mxcl.github.com/homebrew[Homebrew] installed, you can run:
 
 [source,shell]
 ----
diff --git a/src/spec/doc/core-metaprogramming.adoc b/src/spec/doc/core-metaprogramming.adoc
index 235e7d6d48..2ddf603f94 100644
--- a/src/spec/doc/core-metaprogramming.adoc
+++ b/src/spec/doc/core-metaprogramming.adoc
@@ -562,7 +562,7 @@ The following sections go into detail on how `ExpandoMetaClass` can be used in v
 
 ===== Methods
 
-Once the `ExpandoMetaClass` is accessed by calling the `metaClass` property, methods can added by using either the left shift
+Once the `ExpandoMetaClass` is accessed by calling the `metaClass` property, methods can be added by using either the left shift
 `<<` or the `=` operator.
 
 [NOTE]
@@ -677,8 +677,8 @@ class HTMLCodec {
 
 The example above shows a codec implementation. Grails comes with various codec implementations each defined in a single class.
 At runtime there will be multiple codec classes in the application classpath. At application startup the framework adds
-a `encodeXXX` and a `decodeXXX` method to certain meta-classes where `XXX` is the first part of the codec class name (e.g.
-`encodeHTML`). This mechanism is in the following shown in some Groovy pseudo-code:
+a `encodeXXX` and a `decodeXXX` method to certain metaclasses where `XXX` is the first part of the codec class name (e.g.
+`encodeHTML`). This mechanism is in the following shown in some Groovy pseudocode:
 
 [source,groovy]
 ----
@@ -723,7 +723,7 @@ The following example shows how to override `invokeMethod`:
 include::../test/metaprogramming/ExpandoMetaClassTest.groovy[tags=emc_invoke_method,indent=0]
 ----
 
-The first step in the `Closure` code is to lookup the `MetaMethod` for the given name and arguments. If the method
+The first step in the `Closure` code is to look up the `MetaMethod` for the given name and arguments. If the method
 can be found everything is fine and it is delegated to. If not, a dummy value is returned.
 
 [NOTE]
@@ -937,7 +937,7 @@ boilerplate code incorrect is reduced.
 
 [[xform-ToString]]
 ===== `@groovy.transform.ToString`
-The `@ToString` AST transformation generates a human readable `toString` representation of the class. For example,
+The `@ToString` AST transformation generates a human-readable `toString` representation of the class. For example,
 annotating the `Person` class like below will automatically generate the `toString` method for you:
 
 [source,groovy]
@@ -1761,7 +1761,7 @@ include::../test/CodeGenerationASTTransformsTest.groovy[tags=autoimplement_excep
 ----
 
 The fourth example illustrates the case of user supplied code. Our class is annotated with `@AutoImplement`,
-implements an interface, has an explcitly overriden `hasNext` method, and has an annotation attribute containing the
+implements an interface, has an explicitly overridden `hasNext` method, and has an annotation attribute containing the
 supplied code for any supplied methods. Here is the class definition:
 
 [source,groovy]
@@ -1807,7 +1807,7 @@ singleton, ...) by using a declarative style.
 ===== `@groovy.transform.BaseScript`
 
 `@BaseScript` is used within scripts to indicate that the script should
-extend fron a custom script base class rather than `groovy.lang.Script`.
+extend from a custom script base class rather than `groovy.lang.Script`.
 See the documentation for <<{core-domain-specific-languages}#dsl-basescript,domain specific languages>> for further details.
 
 [[xform-Delegate]]
@@ -2085,7 +2085,7 @@ and some non-tail recursive calls are erroneously treated as tail recursive.
 
 The `@Singleton` annotation can be used to implement the singleton design pattern on a class. The singleton instance
 is defined eagerly by default, using class initialization, or lazily, in which case the field is initialized using
-double checked locking.
+double-checked locking.
 
 [source,groovy]
 ----
@@ -2432,7 +2432,7 @@ generating code which will for example allow you to interrupt execution automati
 ===== `@groovy.transform.ThreadInterrupt`
 
 One complicated situation in the JVM world is when a thread can't be stopped. The `Thread#stop` method exists but is
-deprecated (and isn't reliable) so your only chance relies in `Thread#interrupt`. Calling the latter will set the
+deprecated (and isn't reliable) so your only chance lies in `Thread#interrupt`. Calling the latter will set the
 `interrupt` flag on the thread, but it will *not* stop the execution of the thread. This is problematic because it's the
 responsibility of the code executing in the thread to check the interrupt flag and properly exit. This makes sense when
 you, as a developer, know that the code you are executing is meant to be run in an independent thread, but in general,
@@ -3045,7 +3045,7 @@ transformations may only be applied in the semantic analysis phase or
 later. Briefly, the compiler phases are:
 
 * _Initialization_: source files are opened and environment configured
-* _Parsing_: the grammar is used to to produce tree of tokens representing
+* _Parsing_: the grammar is used to produce tree of tokens representing
 the source code
 * _Conversion_: An abstract syntax tree (AST) is created from token trees.
 * _Semantic Analysis_: Performs consistency and validity checks that the
@@ -3339,10 +3339,10 @@ Although the `macro` method is used in this example to create a **statement** th
 **expressions** as well, it depends on which `macro` signature you use:
 
 - `macro(Closure)`: Create a given statement with the code inside the closure.
-- `macro(Boolean,Closure)`: if **true** wrap expressions inside the closure inside an statement, if **false** then return
+- `macro(Boolean,Closure)`: if **true** wrap expressions inside the closure inside a statement, if **false** then return
 an expression
 - `macro(CompilePhase, Closure)`: Create a given statement with the code inside the closure in a specific compile phase
-- `macro(CompilePhase, Boolean, Closure)`: Create an statement or an expression (true == statement, false == expression)
+- `macro(CompilePhase, Boolean, Closure)`: Create a statement or an expression (true == statement, false == expression)
 in a specific compilation phase.
 
 NOTE: All these signatures can be found at `org.codehaus.groovy.macro.runtime.MacroGroovyMethods`
@@ -3478,7 +3478,7 @@ assert null == safe(safe(nullObject.hashcode()).toString())
 ==== Testing AST transformations
 ===== Separating source trees
 
-This section is about good practices with regards to testing AST transformations. Previous sections highlighted the fact
+This section is about good practices in regard to testing AST transformations. Previous sections highlighted the fact
 that to be able to execute an AST transformation, it has to be precompiled. It might sound obvious but a lot of people
 get caught on this, trying to use an AST transformation in the same source tree as where it is defined.
 
diff --git a/src/spec/doc/core-object-orientation.adoc b/src/spec/doc/core-object-orientation.adoc
index 0c261b6b50..65d5a19a9a 100644
--- a/src/spec/doc/core-object-orientation.adoc
+++ b/src/spec/doc/core-object-orientation.adoc
@@ -120,7 +120,7 @@ List<String> roles = ['Trinity', 'Morpheus']
 ----
 
 Java employs type erasure for backwards compatibility with earlier versions of Java.
-Dynamic Groovy can be thought of as more agressively applying type erasure.
+Dynamic Groovy can be thought of as more aggressively applying type erasure.
 In general,  less generics type information will be checked at compile time.
 Groovy's static nature employs similar checks to Java with regard to generics information.
 
@@ -128,7 +128,7 @@ Groovy's static nature employs similar checks to Java with regard to generics in
 
 Groovy classes are very similar to Java classes, and are compatible with Java ones at JVM level.
 They may have methods, fields and properties (think JavaBeans properties but with less boilerplate).
-Classes and class members can have the same modifiers (public, protected, private, static, etc) as in Java
+Classes and class members can have the same modifiers (public, protected, private, static, etc.) as in Java
 with some minor differences at the source level which are explained shortly.
 
 The key differences between Groovy classes and their Java counterparts are:
@@ -163,7 +163,7 @@ include::../test/ClassTest.groovy[tags=class_instantiation,indent=0]
 
 === Inner class
 
-Inner classes are defined within another classes. The enclosing class can use the inner class as usual. On the other side, a inner class can access members of its enclosing class, even if they are private. Classes other than the enclosing class are not allowed to access inner classes. Here is an example:
+Inner classes are defined within another classes. The enclosing class can use the inner class as usual. On the other side, an inner class can access members of its enclosing class, even if they are private. Classes other than the enclosing class are not allowed to access inner classes. Here is an example:
 
 [source,groovy]
 ----
@@ -339,7 +339,7 @@ Groovy supports two invocation styles:
 
 To create an object by using positional parameters, the respective class needs to declare one or more
 constructors. In the case of multiple constructors, each must have a unique type signature. The constructors can also
-added to the class using the gapi:groovy.transform.TupleConstructor[] annotation.
+be added to the class using the gapi:groovy.transform.TupleConstructor[] annotation.
 
 Typically, once at least one constructor is declared, the class can only be instantiated by having one of its
 constructors called. It is worth noting that, in this case, you can't normally create the class with named parameters.
@@ -397,7 +397,7 @@ is a Map but there are also additional positional parameters. Use this style wit
 
 === Methods
 
-Groovy methods are quite similar to other languages. Some peculiarities will be shown in the next subsections. 
+Groovy methods are quite similar to other languages. Some peculiarities will be shown in the next subsections.
 
 ==== Method definition
 
@@ -752,7 +752,7 @@ which defines the property:
 include::../test/ClassTest.groovy[tags=property_access,indent=0]
 ----
 <1> `this.name` will directly access the field because the property is accessed from within the class that defines it
-<2> similarily a read access is done directly on the `name` field
+<2> similarly a read access is done directly on the `name` field
 <3> write access to the property is done outside of the `Person` class so it will implicitly call `setName`
 <4> read access to the property is done outside of the `Person` class so it will implicitly call `getName`
 <5> this will call the `name` method on `Person` which performs a direct access to the field
@@ -778,7 +778,7 @@ include::../test/ClassTest.groovy[tags=pseudo_properties,indent=0]
 ----
 <1> writing `p.name` is allowed because there is a pseudo-property `name`
 <2> reading `p.age` is allowed because there is a pseudo-readonly property `age`
-<3> writing `p.groovy` is allowed because there is a pseudo-writeonly property `groovy`
+<3> writing `p.groovy` is allowed because there is a pseudo-write-only property `groovy`
 
 This syntactic sugar is at the core of many DSLs written in Groovy.
 
@@ -1145,7 +1145,7 @@ we will imagine two annotations, each of them accepting one argument:
 include::../test/ClassTest.groovy[tags=collected_ann_explosive,indent=0]
 ----
 
-And suppose that you want create a meta-annotation named `@Explosive`:
+And suppose that you want to create a meta-annotation named `@Explosive`:
 
 [source,groovy]
 ----
@@ -1205,8 +1205,8 @@ and then place your meta-annotation on a class that already has an explicit `@To
 annotation. Should this be an error? Should both annotations be applied? Does one take
 priority over the other? There is no correct answer. In some scenarios it might be
 quite appropriate for any of these answers to be correct. So, rather than trying to
-preempt one correct way to handle the duplicate annotation issue, Groovy let's you
-write your own custom meta-annotation processors (covered next) and let's you write
+preempt one correct way to handle the duplicate annotation issue, Groovy lets you
+write your own custom meta-annotation processors (covered next) and lets you write
 whatever checking logic you like within AST transforms - which are a frequent target for
 aggregating. Having said that, by simply setting the `mode`, a number of commonly
 expected scenarios are handled automatically for you within any extra coding.
diff --git a/src/spec/doc/core-operators.adoc b/src/spec/doc/core-operators.adoc
index 50dde78560..7c3718864a 100644
--- a/src/spec/doc/core-operators.adoc
+++ b/src/spec/doc/core-operators.adoc
@@ -731,7 +731,7 @@ include::../test/OperatorsTest.groovy[tags=spaceship,indent=0]
 [[subscript-operator]]
 === Subscript operator
 
-The subscript operator is a short hand notation for `getAt` or `putAt`, depending on whether you find it on
+The subscript operator is a shorthand notation for `getAt` or `putAt`, depending on whether you find it on
 the left hand side or the right hand side of an assignment:
 
 [source,groovy]
diff --git a/src/spec/doc/core-program-structure.adoc b/src/spec/doc/core-program-structure.adoc
index 8412f1d5ff..baded9edce 100644
--- a/src/spec/doc/core-program-structure.adoc
+++ b/src/spec/doc/core-program-structure.adoc
@@ -31,7 +31,7 @@ This chapter covers the program structure of the Groovy programming language.
 
 == Package names
 
-Package names play exactly the same role as in Java. They allows us to separate the code base without any conflicts. Groovy classes must specify their package before the class definition, else the default package is assumed. 
+Package names play exactly the same role as in Java. They allow us to separate the code base without any conflicts. Groovy classes must specify their package before the class definition, else the default package is assumed.
 
 Defining a package is very similar to Java:
 
@@ -62,7 +62,7 @@ Default imports are the imports that Groovy language provides by default. For ex
 include::../test/PackageTest.groovy[tags=default_import,indent=0]
 ----
 
-The same code in Java needs an import statement to `Date` class like this: ++import java.util.Date++. Groovy by default imports these classes for you. 
+The same code in Java needs an import statement to `Date` class like this: ++import java.util.Date++. Groovy by default imports these classes for you.
 
 The below imports are added by groovy for you:
 
@@ -91,7 +91,7 @@ include::../test/PackageTest.groovy[tags=import_statement,indent=0]
 
 === Star import
 
-Groovy, like Java, provides a special way to import all classes from a package using `*`, the so called star import. `MarkupBuilder` is a class which is in package `groovy.xml`, alongside another class called `StreamingMarkupBuilder`. In case you need to use both classes, you can do:
+Groovy, like Java, provides a special way to import all classes from a package using `*`, the so-called star import. `MarkupBuilder` is a class which is in package `groovy.xml`, alongside another class called `StreamingMarkupBuilder`. In case you need to use both classes, you can do:
 
 [source,groovy]
 ----
@@ -105,7 +105,7 @@ That's perfectly valid code. But with a `*` import, we can achieve the same effe
 include::../test/PackageTest.groovy[tags=star_import,indent=0]
 ----
 
-One problem with `*` imports is that they can clutter your local namespace. But with the kinds of aliasing provided by Groovy, this can be solved easily. 
+One problem with `*` imports is that they can clutter your local namespace. But with the kinds of aliasing provided by Groovy, this can be solved easily.
 
 === Static import
 
@@ -143,7 +143,7 @@ Now, that's clean!
 
 A static star import is very similar to the regular star import. It will import all the static methods from the given class.
 
-For example, lets say we need to calculate sines and cosines for our application. 
+For example, lets say we need to calculate sines and cosines for our application.
 The class `java.lang.Math` has static methods named `sin` and `cos` which fit our need. With the help of a static star import, we can do:
 
 [source,groovy]
@@ -266,7 +266,7 @@ method that the compiler will generate and will *not* be visible outside of the
 a variable will *not* be visible in other methods of the script
 * if the variable is undeclared, it goes into the gapi:groovy.lang.Script#getBinding()[script binding]. The binding is
 visible from the methods, and is especially important if you use a script to interact with an application and need to
-share data between the script and the application. Readers might refer to the 
+share data between the script and the application. Readers might refer to the
 <<{guide-integrating}#_integrating_groovy_in_a_java_application,integration guide>> for more information.
 
 TIP: Another approach to making a variable visible to all methods, is to use the
diff --git a/src/spec/doc/core-semantics.adoc b/src/spec/doc/core-semantics.adoc
index 2098da4edf..b217c9c445 100644
--- a/src/spec/doc/core-semantics.adoc
+++ b/src/spec/doc/core-semantics.adoc
@@ -416,7 +416,7 @@ Which will print the value for each sub-expression:
 include::../test/semantics/PowerAssertTest.groovy[tags=assert_error_2,indent=0]
 ----
 
-In case you don't want a pretty printed error message like above, you can fallback to a custom error message by
+In case you don't want a pretty printed error message like above, you can fall back to a custom error message by
 changing the optional message part of the assertion, like in this example:
 
 [source,groovy]
@@ -597,7 +597,7 @@ NOTE: array access are zero-based in GPath expressions
 
 ==== GPath for XML navigation
 
-Here is an example with a XML document and various form of GPath expressions:
+Here is an example with an XML document and various form of GPath expressions:
 [source,groovy]
 ----
 include::../test/semantics/GPathTest.groovy[tags=gpath_on_xml_1,indent=0]
@@ -681,7 +681,7 @@ include::../test/CoercionTest.groovy[tags=method_call_with_implicit_coercion,ind
 -----
 
 As you can see, this has the advantage of letting you use the closure syntax for method calls, that is to say put the
-closure outside of the parenthesis, improving the readability of your code.
+closure outside the parenthesis, improving the readability of your code.
 
 ==== Closure to arbitrary type coercion
 
@@ -876,7 +876,7 @@ Method calls can omit the parentheses if there is at least one parameter and the
 include::../test/semantics/OptionalityTest.groovy[tags=optional_parentheses,indent=0]
 ----
 
-Parentheses are required for method calls without parameters or ambiguous method calls: 
+Parentheses are required for method calls without parameters or ambiguous method calls:
 
 [source,groovy]
 ----
@@ -926,7 +926,7 @@ include::../test/semantics/OptionalityTest.groovy[tags=omitted_return_keyword,in
 
 === Optional public keyword
 
-By default, Groovy classes and methods are `public`. Therefore this class: 
+By default, Groovy classes and methods are `public`. Therefore this class:
 
 [source,groovy]
 ----
@@ -1502,7 +1502,7 @@ include::../test/typing/TypeCheckingTest.groovy[tags=method_not_type_checked,ind
 
 The example above shows a class that Groovy will be able to compile. However, if you try to create an instance of `MyService` and call the
 `doSomething` method, then it will fail *at runtime*, because `printLine` doesn't exist. Of course, we already showed how Groovy could make
-this a perfectly valid call, for example by catching `MethodMissingException` or implementing a custom meta-class, but if you know you're
+this a perfectly valid call, for example by catching `MethodMissingException` or implementing a custom metaclass, but if you know you're
 not in such a case, `@TypeChecked` comes handy:
 
 [source,groovy]
@@ -1578,7 +1578,7 @@ include::../test/typing/TypeCheckingTest.groovy[tags=typeinference_field_vs_loca
 
 Why such a difference? The reason is _thread safety_. At compile time, we can't make *any* guarantee about the type of
 a field. Any thread can access any field at any time and between the moment a field is assigned a variable of some
-type in a method and the time is is used the line after, another thread may have changed the contents of the field. This
+type in a method and the time is used the line after, another thread may have changed the contents of the field. This
 is not the case for local variables: we know if they "escape" or not, so we can make sure that the type of a variable is
 constant (or not) over time. Note that even if a field is final, the JVM makes no guarantee about it, so the type checker
 doesn't behave differently if a field is final or not.
@@ -1825,7 +1825,7 @@ In Groovy, we could write:
 include::../test/typing/TypeCheckingTest.groovy[tags=groovy_method_selection,indent=0]
 ----
 
-But this time, it will return `6`, because the method which is chosen is chosen *at runtime*, based on the _actual_
+But this time, it will return `6`, because the method which is chosen *at runtime*, based on the _actual_
 argument types. So at runtime, `o` is a `String` so the `String` variant is used. Note that this behavior has nothing
 to do with type checking, it's the way Groovy works in general: dynamic dispatch.
 
@@ -1979,7 +1979,7 @@ include::../test/typing/TypeCheckingTest.groovy[tags=cl_pt_workaround,indent=0]
 ----
 <1> the type of `it` needs to be declared explicitly
 
-By explicitly declaring the type of the `it` variable, you can workaround the problem and make this code statically
+By explicitly declaring the type of the `it` variable, you can work around the problem and make this code statically
 checked.
 
 ====== Parameters inferred from single-abstract method types
@@ -1997,8 +1997,8 @@ include::../test/typing/TypeCheckingTest.groovy[tags=cl_pt_workaround_sam,indent
 <3> there's no need to declare the type of the `it` variable anymore
 <4> `it.age` compiles properly, the type of `it` is inferred from the `Predicate#apply` method signature
 
-TIP: By using this technique, we leverage the _automatic coercion of closures to SAM types_ feature of Groovy. The
-question whether you should use a _SAM type_ or a _Closure_ really depends on what you need to do. In a lot of cases,
+TIP: By using this technique, we leverage the _automatic coercion of closures to SAM types_ feature of Groovy.
+Whether you should use a _SAM type_ or a _Closure_ really depends on what you need to do. In a lot of cases,
 using a SAM interface is enough, especially if you consider functional interfaces as they are found in Java 8. However,
 closures provide features that are not accessible to functional interfaces. In particular, closures can have a delegate,
 and owner and can be manipulated as objects (for example, cloned, serialized, curried, ...) before being called. They can
@@ -2152,7 +2152,7 @@ In short, the lack of the `@ClosureParams` annotation on a method accepting a `C
 
 A third optional argument is named _conflictResolutionStrategy_. It can reference a class (extending from
 `ClosureSignatureConflictResolver`) that can perform additional resolution of parameter types if more than
-one are found after initial inference calculations are complete. Groovy comes with the a default type resolver
+one are found after initial inference calculations are complete. Groovy comes with a default type resolver
 which does nothing, and another which selects the first signature if multiple are found. The resolver is
 only invoked if more than one signature is found and is by design a post processor. Any statements which need
 injected typing information must pass one of the parameter signatures determined through type hints. The
@@ -2171,7 +2171,7 @@ discussed in a link:core-domain-specific-languages.html#section-delegatesto[spec
 In the <<static-type-checking,type checking section>>, we have seen that Groovy provides optional type checking thanks to the
 `@TypeChecked` annotation. The type checker runs at compile time and performs a static analysis of dynamic code. The
 program will behave exactly the same whether type checking has been enabled or not. This means that the `@TypeChecked`
-annotation is neutral with regards to the semantics of a program. Even though it may be necessary to add type information
+annotation is neutral in regard to the semantics of a program. Even though it may be necessary to add type information
 in the sources so that the program is considered type safe, in the end, the semantics of the program are the same.
 
 While this may sound fine, there is actually one issue with this: type checking of dynamic code, done at compile time, is
diff --git a/src/spec/doc/core-syntax.adoc b/src/spec/doc/core-syntax.adoc
index f0358a4122..8f022097d6 100644
--- a/src/spec/doc/core-syntax.adoc
+++ b/src/spec/doc/core-syntax.adoc
@@ -500,7 +500,7 @@ resulting in an updated string containing the new number value.
 
 [NOTE]
 An embedded closure expression taking more than one parameter will generate an exception at runtime.
-Only closures with zero or one parameters are allowed.
+Only closures with zero or one parameter are allowed.
 
 ==== Interoperability with Java
 
@@ -513,7 +513,7 @@ the `toString()` method of the GString is automatically and transparently called
 include::../test/SyntaxTest.groovy[tags=java_gstring_interop_1,indent=0]
 ----
 <1> We create a GString variable
-<2> We double check it's an instance of the GString
+<2> We double-check it's an instance of the GString
 <3> We then pass that GString to a method taking a String as parameter
 <4> The signature of the `takeString()` method explicitly says its sole parameter is a String
 <5> We also verify that the parameter is indeed a String and not a GString.
@@ -757,13 +757,13 @@ include::../test/SyntaxTest.groovy[tags=subscript_and_leftshift,indent=0]
 <5> Access two elements at once, returning a new list containing those two elements
 <6> Use a range to access a range of values from the list, from a start to an end element position
 
-As lists can be heterogeneous in nature, lists can also contain other lists to create multi-dimensional lists:
+As lists can be heterogeneous in nature, lists can also contain other lists to create multidimensional lists:
 
 [source,groovy]
 ----
 include::../test/SyntaxTest.groovy[tags=multi_dim_list,indent=0]
 ----
-<1> Define a list of list of numbers
+<1> Define a list of numbers
 <2> Access the second element of the top-most list, and the first element of the inner list
 
 == Arrays
diff --git a/src/spec/doc/core-testing-guide.adoc b/src/spec/doc/core-testing-guide.adoc
index 32ac1462a2..f0649d7558 100644
--- a/src/spec/doc/core-testing-guide.adoc
+++ b/src/spec/doc/core-testing-guide.adoc
@@ -85,7 +85,7 @@ Another important difference from Java is that in Groovy assertions are _enabled
 decision to remove the possibility to deactivate assertions. Or, as Bertrand Meyer stated, ``it makes no sense to take
 off your swim ring if you put your feet into real water``.
 
-One thing to be aware of are methods with side-effects inside Boolean expressions in power assertion statements. As
+One thing to be aware of are methods with side effects inside Boolean expressions in power assertion statements. As
 the internal error message construction mechanism does only store references to instances under target,
  it happens that the error message text is invalid at rendering time in case of side-effecting methods involved:
 
@@ -107,7 +107,7 @@ assert [[1,2,3,3,3,3,4]].first().unique() == [1,2,3]
 [NOTE]
 If you choose to provide a custom assertion error message this can be done by using the Java syntax `assert
 expression1 : expression2` where `expression1` is the Boolean expression and `expression2` is the custom error message.
- Be aware though that this will disable the power assert and will fully fallback to custom
+ Be aware though that this will disable the power assert and will fully fall back to custom
  error messages on assertion errors.
 
 === Mocking and Stubbing
@@ -145,7 +145,7 @@ useful in simple cases none-the-less.
 Classes or interfaces holding a single method, including SAM (single abstract method) classes, can be used to coerce
 a closure block to be an object of the given type. Be aware that for doing this, Groovy internally create a proxy object
 descending for the given class. So the object will not be a direct instance of the given class. This important if, for
-example, the generated proxy object's meta-class is altered afterwards.
+example, the generated proxy object's metaclass is altered afterwards.
 
 Let's have an example on coercing a closure to be of a specific type:
 
@@ -209,7 +209,7 @@ include::../test/testingguide/MockingExampleTests.groovy[tags=stubFor,indent=0]
 <3> a `Closure` is passed to `use` which enables the stubbing functionality
 <4> a call to `verify` (optional) checks whether the number of method calls is as expected
 
-`MockFor` and `StubFor` can not be used to test statically compiled classes e.g for Java classes or Groovy classes that
+`MockFor` and `StubFor` can not be used to test statically compiled classes e.g. for Java classes or Groovy classes that
 make use of `@CompileStatic`. To stub and/or mock these classes you can use Spock or one of the Java mocking libraries.
 
 [[testing_guide_emc]]
@@ -219,7 +219,7 @@ Groovy includes a special `MetaClass` the so-called `ExpandoMetaClass` (EMC). It
 constructors, properties and static methods using a neat closure syntax.
 
 Every `java.lang.Class` is supplied with a special `metaClass` property that will give a reference to an
-`ExpandoMetaClass` instance. The expando meta-class is not restricted to custom classes, it can be used for
+`ExpandoMetaClass` instance. The expando metaclass is not restricted to custom classes, it can be used for
 JDK classes like for example `java.lang.String` as well:
 
 [source,groovy]
@@ -249,8 +249,8 @@ help of `ExpandoMetaClass`. This lets the domain object register itself in the S
 for injection of services or other beans controlled by the dependency-injection container.
 
 If you want to change the `metaClass` property on a per test method level you need to remove the changes that were
-done to the meta-class, otherwise those changes would be persistent across test method calls. Changes are removed by
-replacing the meta-class in the `GroovyMetaClassRegistry`:
+done to the metaclass, otherwise those changes would be persistent across test method calls. Changes are removed by
+replacing the metaclass in the `GroovyMetaClassRegistry`:
 
 [source,groovy]
 ----
@@ -262,7 +262,7 @@ the changes in the cleanup method of your chosen testing runtime. A good example
 https://github.com/grails/grails-core/blob/master/grails-bootstrap/src/main/groovy/grails/build/support/MetaClassRegistryCleaner.java[in the Grails web
 development framework].
 
-Besides using the `ExpandoMetaClass` on a class-level, there is also support for using the meta-class on a per-object
+Besides using the `ExpandoMetaClass` on a class-level, there is also support for using the metaclass on a per-object
 level:
 
 [source,groovy]
@@ -270,8 +270,8 @@ level:
 include::../test/testingguide/MockingExampleTests.groovy[tags=emc5,indent=0]
 ----
 
-In this case the meta-class change is related to the instance only. Depending on the test scenario this might be a better
-fit than the global meta-class change.
+In this case the metaclass change is related to the instance only. Depending on the test scenario this might be a better
+fit than the global metaclass change.
 
 === GDK Methods
 
@@ -510,7 +510,7 @@ language features in third party libraries, for example, by using Groovy AST tra
 This section should not serve as detailed guide on how to use Spock, it should rather give an impression what Spock
 is about and how it can be leveraged for unit, integration, functional or any other type of testing.
 
-The next section we will have an first look at the anatomy of a Spock specification. It should give a
+The next section we will have a first look at the anatomy of a Spock specification. It should give a
 pretty good feeling on what Spock is up to.
 
 === Specifications
@@ -619,7 +619,7 @@ browser.drive {
 }
 ---------------------------------------------------------------------------------------------------
 <1> A new `Browser` instance is created. In this case it uses the Selenium `FirefoxDriver` and sets the `baseUrl`.
-<2> `go` is used to navigate to an URL or relative URI
+<2> `go` is used to navigate to a URL or relative URI
 <3> `$` together with CSS selectors is used to access the `username` and `password` DOM fields.
 
 The `Browser` class comes with a `drive` method that delegates all method/property calls to the current
diff --git a/src/spec/doc/grape.adoc b/src/spec/doc/grape.adoc
index 8dfd68cbac..7645781632 100644
--- a/src/spec/doc/grape.adoc
+++ b/src/spec/doc/grape.adoc
@@ -117,7 +117,7 @@ proxy server, you can specify those settings on the command like via the
 groovy -Dhttp.proxyHost=yourproxy -Dhttp.proxyPort=8080 yourscript.groovy
 -------------------------------------------------------------------------
 
-Or you can make this system wide by adding these properties to your
+Or you can make this system-wide by adding these properties to your
 JAVA_OPTS environment variable:
 
 ------------------------------------------------------------
@@ -234,7 +234,7 @@ annotation to apply to only a subset of the Grab annotations.
 === Method call
 
 Typically a call to grab will occur early in the script or in class
-initialization. This is to insure that the libraries are made available
+initialization. This is to ensure that the libraries are made available
 to the ClassLoader before the groovy code relies on the code. A couple
 of typical calls may appear as follows:
 
@@ -303,7 +303,7 @@ runtime exception.
 [[Grape-ArgumentsMaparguments]]
 ==== Arguments Map arguments
 
-* `classLoader:` - <GroovyClassLaoder> or <RootClassLoader> - The
+* `classLoader:` - <GroovyClassLoader> or <RootClassLoader> - The
 ClassLoader to add resolved Jars to
 * `refObject:` - <Object> - The closest parent ClassLoader for the
 object’s class will be treated as though it were passed in as
diff --git a/src/spec/doc/guide-integrating.adoc b/src/spec/doc/guide-integrating.adoc
index 182615eb22..8c6fbd14d2 100644
--- a/src/spec/doc/guide-integrating.adoc
+++ b/src/spec/doc/guide-integrating.adoc
@@ -55,7 +55,7 @@ include::../test/IntegrationTest.groovy[tags=eval_x,indent=0]
 <4> Simple evaluation with three bound parameters named `x`, `y` and `z`
 
 The `Eval` class makes it very easy to evaluate simple scripts, but doesn't scale: there is no caching of the script, and
-it isn't meant to evaluate more than one liners.
+it isn't meant to evaluate more than one-liners.
 
 [[integ-groovyshell]]
 === GroovyShell
diff --git a/src/spec/doc/performance-guide.adoc b/src/spec/doc/performance-guide.adoc
index aec25ef41a..b652505198 100644
--- a/src/spec/doc/performance-guide.adoc
+++ b/src/spec/doc/performance-guide.adoc
@@ -29,5 +29,5 @@ The Parrot parser is based on antlr4 and introduced since Groovy 3.0.0. It provi
 | groovy.parallel.parse | Parsing groovy source files in parallel. | `false` util Groovy 4.0.0 | 3.0.5+ | -Dgroovy.parallel.parse=true
 | groovy.antlr4.cache.threshold | antlr4 relies on DFA cache heavily for better performance, so antlr4 will not clear DFA cache, thus OutOfMemoryError will probably occur. Groovy trades off parsing performance and memory usage, when the count of Groovy source files parsed hits the cache threshold, the DFA cache will be cleared. *Note:* `0` means never clearing DFA cache, so requiring bigger JVM heap size. Or set a greater value, e.g. 200 to clear DFA cache if threshold hits. **Note: ** t [...]
 | groovy.antlr4.sll.threshold | Parrot parser will try SLL mode and then try LL mode if SLL failed. But the more tokens to parse, the more likely SLL will fail. If SLL threshold hits, SLL will be skipped. Setting the threshold to `0` means never trying SLL mode, which is not recommended at most cases because SLL is the fastest mode though SLL is less powerful than LL. **Note: ** the threshold specified is the token count | `-1` (disabled by default) | 3.0.9+ | -Dgroovy.antlr4.sll.threshold=1000
-| groovy.antlr4.clear.lexer.dfa.cache | Clear the DFA cache for lexer. The DFA cache for lexer is always small and important for parsing performance, so it's strongly recommended to leave it as it is util OutOfMemoryError will truely occur | `false`| 3.0.9+ | -Dgroovy.antlr4.clear.lexer.dfa.cache=true
+| groovy.antlr4.clear.lexer.dfa.cache | Clear the DFA cache for lexer. The DFA cache for lexer is always small and important for parsing performance, so it's strongly recommended to leave it as it is until OutOfMemoryError will truly occur | `false`| 3.0.9+ | -Dgroovy.antlr4.clear.lexer.dfa.cache=true
 |=======================================================================
diff --git a/src/spec/doc/style-guide.adoc b/src/spec/doc/style-guide.adoc
index 0817ef4a0a..9315fab66b 100644
--- a/src/spec/doc/style-guide.adoc
+++ b/src/spec/doc/style-guide.adoc
@@ -276,7 +276,7 @@ class Person {
 }
 ----
 
-As you can see, a free standing 'field' without modifier visibility actually
+As you can see, a freestanding 'field' without modifier visibility actually
 makes the Groovy compiler to generate a private field and a getter and setter for you.
 
 When using such POGOs from Java, the getter and setter are indeed there, and can be used as usual, of course.
@@ -475,7 +475,7 @@ assert "foooo/baaaaar" ==~ /fo+\/ba+r/
 The advantage of the "slashy" notation is that you don't need to double escape backslashes, making working with regex a bit simpler.
 
 Last but not least, prefer using single quoted strings when you need string constants,
-and use double quoted strings when you are explicitly relying on string interpolation.
+and use double-quoted strings when you are explicitly relying on string interpolation.
 
 == Native syntax for data structures
 
@@ -588,7 +588,7 @@ Same thing for collections, etc.
 
 Thus, you can use some shortcuts in things like `while()`, `if()`, the ternary operator, the Elvis operator (see below), etc.
 
-It's even possible to customize the Groovy Truth, by adding an boolean `asBoolean()` method to your classes!
+It's even possible to customize the Groovy Truth, by adding a boolean `asBoolean()` method to your classes!
 
 == Safe graph navigation
 
diff --git a/src/spec/doc/tools-groovyc.adoc b/src/spec/doc/tools-groovyc.adoc
index 240ecd1e7e..43ec83453f 100644
--- a/src/spec/doc/tools-groovyc.adoc
+++ b/src/spec/doc/tools-groovyc.adoc
@@ -45,7 +45,7 @@ a number of command line switches:
 | | --temp | Temporary directory for the compiler |
 | | --encoding | Encoding of the source files | groovyc --encoding utf-8 script.groovy
 | | --help | Displays help for the command line groovyc tool | groovyc --help
-| -d | | Specify where to place generated class files. | groovyc -d target Person.groovy 
+| -d | | Specify where to place generated class files. | groovyc -d target Person.groovy
 | -v | --version | Displays the compiler version | groovyc -v
 | -e | --exception | Displays the stack trace in case of compilation error | groovyc -e script.groovy
 | -j | --jointCompilation* | Enables joint compilation | groovyc -j A.groovy B.java
@@ -189,7 +189,7 @@ typical Maven build phases normally. For example, `mvn test` will
 execute the test phase, compiling Groovy source and Groovy test source
 and finally executing the unit tests. If you run `mvn jar` it will
 execute the jar phase bundling up all of your compiled production
-classes into a jar after all of the unit tests pass. For more detail on
+classes into a jar after all the unit tests pass. For more detail on
 Maven build phases consult the Maven2 documentation.
 
 === GMaven and GMavenPlus
@@ -245,7 +245,7 @@ compilation in the normal Groovy compiler way. This allows mixing of
 Java and Groovy files without constraint.
 
 Joint compilation can be enabled using the `-j` flag with the command-line compiler,
-or using using a nested tag and all the attributes and further nested tags as required
+or using a nested tag and all the attributes and further nested tags as required
 for the Ant task.
 
 It is important to know that if you don't enable joint compilation and try to compile


[groovy] 06/08: fix broken test

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 5f141b5dbfd949b63d2409cbff6c87f9baa5b273
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat Oct 22 10:34:09 2022 +1000

    fix broken test
---
 subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java    | 2 +-
 .../groovy-json/src/test/groovy/groovy/json/JsonBuilderTest.groovy    | 4 ++--
 .../src/test/groovy/groovy/json/StreamingJsonBuilderTest.groovy       | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
index 99501fccb4..c4563c7316 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
@@ -63,7 +63,7 @@ import java.util.Map;
  *       // creates a data structure made of maps (Json object) and lists (Json array)
  *       assert root instanceof Map
  *
- *       assert builder.toString() == '{"people":{"person":{"firstName":"Guillame","lastName":"Laforge","address":{"city":"Paris","country":"France","zip":12345},"married":true,"conferences":["JavaOne","Gr8conf"]}}}'
+ *       assert builder.toString() == '{"people":{"person":{"firstName":"Guillaume","lastName":"Laforge","address":{"city":"Paris","country":"France","zip":12345},"married":true,"conferences":["JavaOne","Gr8conf"]}}}'
  * </code></pre>
  *
  * @since 1.8.0
diff --git a/subprojects/groovy-json/src/test/groovy/groovy/json/JsonBuilderTest.groovy b/subprojects/groovy-json/src/test/groovy/groovy/json/JsonBuilderTest.groovy
index bb4b99b162..54be8aa692 100644
--- a/subprojects/groovy-json/src/test/groovy/groovy/json/JsonBuilderTest.groovy
+++ b/subprojects/groovy-json/src/test/groovy/groovy/json/JsonBuilderTest.groovy
@@ -326,7 +326,7 @@ class JsonBuilderTest extends GroovyTestCase {
         def builder = new groovy.json.JsonBuilder()
         def root = builder.people {
             person {
-                firstName 'Guillame'
+                firstName 'Guillaume'
                 lastName 'Laforge'
                 // Maps are valid values for objects too
                 address(
@@ -342,7 +342,7 @@ class JsonBuilderTest extends GroovyTestCase {
         // creates a data structure made of maps (Json object) and lists (Json array)
         assert root instanceof Map
 
-        assert builder.toString() == '{"people":{"person":{"firstName":"Guillame","lastName":"Laforge","address":{"city":"Paris","country":"France","zip":12345},"married":true,"conferences":["JavaOne","Gr8conf"]}}}'
+        assert builder.toString() == '{"people":{"person":{"firstName":"Guillaume","lastName":"Laforge","address":{"city":"Paris","country":"France","zip":12345},"married":true,"conferences":["JavaOne","Gr8conf"]}}}'
     }
 
     void testEdgeCases() {
diff --git a/subprojects/groovy-json/src/test/groovy/groovy/json/StreamingJsonBuilderTest.groovy b/subprojects/groovy-json/src/test/groovy/groovy/json/StreamingJsonBuilderTest.groovy
index a4942654e9..a9fd2b6cce 100644
--- a/subprojects/groovy-json/src/test/groovy/groovy/json/StreamingJsonBuilderTest.groovy
+++ b/subprojects/groovy-json/src/test/groovy/groovy/json/StreamingJsonBuilderTest.groovy
@@ -443,7 +443,7 @@ class StreamingJsonBuilderTest extends GroovyTestCase {
             def builder = new StreamingJsonBuilder(w)
             builder.people {
                 person {
-                    firstName 'Guillame'
+                    firstName 'Guillaume'
                     lastName 'Laforge'
                     // Maps are valid values for objects too
                     address(
@@ -456,7 +456,7 @@ class StreamingJsonBuilderTest extends GroovyTestCase {
                 }
             }
 
-            assert w.toString() == '{"people":{"person":{"firstName":"Guillame","lastName":"Laforge","address":{"city":"Paris","country":"France","zip":12345},"married":true,"conferences":["JavaOne","Gr8conf"]}}}'
+            assert w.toString() == '{"people":{"person":{"firstName":"Guillaume","lastName":"Laforge","address":{"city":"Paris","country":"France","zip":12345},"married":true,"conferences":["JavaOne","Gr8conf"]}}}'
         }
     }
 


[groovy] 07/08: fix typos

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 660343cad4d59b88d6ff34daa1520457dfdf7cd4
Author: Paul King <pa...@asert.com.au>
AuthorDate: Tue Oct 25 12:35:17 2022 +1000

    fix typos
---
 benchmark/bench.groovy                             |   4 +-
 .../concurrentlinkedhashmap/LinkedDeque.java       |   2 +-
 .../codehaus/groovy/vmplugin/v7/IndyInterface.java |   2 +-
 .../codehaus/groovy/vmplugin/v8/IndyInterface.java |   2 +-
 .../mock/interceptor/StubCallSequenceTest.groovy   |   4 +-
 .../dateutil/extensions/DateUtilExtensions.java    |   2 +-
 .../test/org/apache/groovy/ginq/GinqTest.groovy    | 104 ++++++++++-----------
 .../groovy/groovysh/commands/HistoryCommand.groovy |   9 +-
 .../main/java/groovy/swing/table/TableSorter.java  |   2 +-
 9 files changed, 67 insertions(+), 64 deletions(-)

diff --git a/benchmark/bench.groovy b/benchmark/bench.groovy
index 1e76f0654e..6f5d2a23f6 100644
--- a/benchmark/bench.groovy
+++ b/benchmark/bench.groovy
@@ -100,7 +100,7 @@ void horizontalBreak() {
 }
 
 boolean prepare(bench, ending) {
-    // copy file to exec folder it it exists
+    // copy file to exec folder if it exists
     def orig = new File("bench/$bench$ending")
     if (!orig.exists()) return false;
 
@@ -171,4 +171,4 @@ void setGroovyLib() {
         if (name.contains("sources")) return
         GROOVY_LIB = entry.absolutePath
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/LinkedDeque.java b/src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/LinkedDeque.java
index 052219ac3a..8933405784 100644
--- a/src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/LinkedDeque.java
+++ b/src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/LinkedDeque.java
@@ -399,7 +399,7 @@ final class LinkedDeque<E extends Linked<E>> extends AbstractCollection<E> imple
     E cursor;
 
     /**
-     * Creates an iterator that can can traverse the deque.
+     * Creates an iterator that can traverse the deque.
      *
      * @param start the initial element to begin traversal from
      */
diff --git a/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyInterface.java b/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyInterface.java
index 90b69a3d09..0088acfa36 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyInterface.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyInterface.java
@@ -95,7 +95,7 @@ public class IndyInterface {
     }
 
     /**
-     * LOOKUP constant used for for example unreflect calls
+     * LOOKUP constant used for example in unreflect calls
      */
     public static final MethodHandles.Lookup LOOKUP = org.codehaus.groovy.vmplugin.v8.IndyInterface.LOOKUP;
 
diff --git a/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyInterface.java b/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyInterface.java
index 318bba0a4f..746a6d8495 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyInterface.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/v8/IndyInterface.java
@@ -135,7 +135,7 @@ public class IndyInterface {
     }
 
     /**
-     * LOOKUP constant used for for example unreflect calls
+     * LOOKUP constant used for example in unreflect calls
      */
     public static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();
 
diff --git a/src/test/groovy/mock/interceptor/StubCallSequenceTest.groovy b/src/test/groovy/mock/interceptor/StubCallSequenceTest.groovy
index 89fba03e5f..a5676ae4db 100644
--- a/src/test/groovy/mock/interceptor/StubCallSequenceTest.groovy
+++ b/src/test/groovy/mock/interceptor/StubCallSequenceTest.groovy
@@ -23,7 +23,7 @@ import junit.framework.AssertionFailedError
 
 /**
  * Testing Groovy Stub support for multiple calls to the Collaborator with
- * demanding one or two methods multiple and and various ranges.
+ * demanding one or two methods multiple and various ranges.
  */
 class StubCallSequenceTest extends GroovyTestCase {
 
@@ -225,4 +225,4 @@ class StubCallSequenceTest extends GroovyTestCase {
         shouldFail(IllegalArgumentException.class) { stub.demand.one(1..0) { 1 } }
     }
 
-}
\ No newline at end of file
+}
diff --git a/subprojects/groovy-dateutil/src/main/java/org/apache/groovy/dateutil/extensions/DateUtilExtensions.java b/subprojects/groovy-dateutil/src/main/java/org/apache/groovy/dateutil/extensions/DateUtilExtensions.java
index a0c57bdeab..28d50619f1 100644
--- a/subprojects/groovy-dateutil/src/main/java/org/apache/groovy/dateutil/extensions/DateUtilExtensions.java
+++ b/subprojects/groovy-dateutil/src/main/java/org/apache/groovy/dateutil/extensions/DateUtilExtensions.java
@@ -635,7 +635,7 @@ public class DateUtilExtensions {
     }
 
     /**
-     * <p>Return a string representation of the date and time time portion of
+     * <p>Return a string representation of the date and time portion of
      * this Date instance, according to the locale-specific format used by
      * {@link java.text.DateFormat}.  This method uses the {@link java.text.DateFormat#SHORT}
      * preset for the day portion and {@link java.text.DateFormat#MEDIUM} for the time
diff --git a/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy b/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
index 2c0db251ec..1a9bbc0cb7 100644
--- a/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
+++ b/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
@@ -752,7 +752,7 @@ class GinqTest {
     }
 
     @Test
-    void "testGinq - from innerjoin innerjoin leftjoin select - 1"() {
+    void "testGinq - from innerjoin leftjoin select - 1"() {
         assertGinqScript '''
             def nums1 = [1, 2, 3, 4, 5]
             def nums2 = [2, 3, 4, 5, 6, 7]
@@ -1082,10 +1082,10 @@ class GinqTest {
                 }
             }
 
-            def persons = [new Person('Daniel', 'Sun', 35, 'Male'), new Person('Linda', 'Yang', 21, 'Female'), 
+            def persons = [new Person('Daniel', 'Sun', 35, 'Male'), new Person('Linda', 'Yang', 21, 'Female'),
                           new Person('Peter', 'Yang', 30, 'Male'), new Person('Rose', 'Yang', 30, 'Female')]
-            def luckyInfoList = [new LuckyInfo('Sun', 'Male', true), new LuckyInfo('Yang', 'Female', true), 
-                                 new LuckyInfo('Yang', 'Male', false)]        
+            def luckyInfoList = [new LuckyInfo('Sun', 'Male', true), new LuckyInfo('Yang', 'Female', true),
+                                 new LuckyInfo('Yang', 'Male', false)]
 
             assert ['Daniel', 'Linda', 'Rose'] == GQ {
                 from p in persons
@@ -1988,7 +1988,7 @@ class GinqTest {
             assert [[2, 2], [3, 3]] == GQ {
                 from n1 in nums1
                 fulljoin n2 in nums2 on n1 == n2
-                where n1 != null && n2 != null 
+                where n1 != null && n2 != null
                 select n1, n2
             }.toList()
         '''
@@ -2028,7 +2028,7 @@ class GinqTest {
             assert [[2, 2], [3, 3]] == GQ {
                 from n1 in nums1
                 fullhashjoin n2 in nums2 on n1 == n2
-                where n1 != null && n2 != null 
+                where n1 != null && n2 != null
                 select n1, n2
             }.toList()
         '''
@@ -2697,7 +2697,7 @@ class GinqTest {
                 }
             }
 
-            def persons = [new Person('Daniel', 'Sun', 35, 'Male'), new Person('Linda', 'Yang', 21, 'Female'), 
+            def persons = [new Person('Daniel', 'Sun', 35, 'Male'), new Person('Linda', 'Yang', 21, 'Female'),
                           new Person('Peter', 'Yang', 30, 'Male'), new Person('Rose', 'Yang', 30, 'Female')]
 
             assert [['Male', 30, 35], ['Female', 21, 30]] == GQ {
@@ -3357,7 +3357,7 @@ class GinqTest {
     @Test
     void "testGinq - GINQ examples - 1"() {
         assertGinqScript '''
-            def expected = 
+            def expected =
                 [['1 * 1 = 1', '', '', '', '', '', '', '', ''],
                  ['1 * 2 = 2', '2 * 2 = 4', '', '', '', '', '', '', ''],
                  ['1 * 3 = 3', '2 * 3 = 6', '3 * 3 = 9', '', '', '', '', '', ''],
@@ -3468,7 +3468,7 @@ class GinqTest {
         assertGinqScript '''
             assert [[0, 1], [1, 2], [2, 3]] == GQ {
 // tag::ginq_tips_05[]
-                from n in [1, 2, 3] 
+                from n in [1, 2, 3]
                 select _rn, n
 // end::ginq_tips_05[]
             }.toList()
@@ -3605,7 +3605,7 @@ class GinqTest {
                 select (
                     from m in [2, 3, 4]
                     where m == n
-                    select m   
+                    select m
                 ) as sqr
             }.toList()
         '''
@@ -3620,7 +3620,7 @@ class GinqTest {
                 select n, (
                     from m in [2, 3, 4]
                     where m == n
-                    select m   
+                    select m
                 ) as sqr
             }.toList()
 // end::ginq_nested_04[]
@@ -3636,7 +3636,7 @@ class GinqTest {
                 select n, (
                     from m in [2, 3, 4]
                     where m == n && m == k
-                    select m   
+                    select m
                 ) as sqr
             }.toList()
         '''
@@ -3651,7 +3651,7 @@ class GinqTest {
                 select (
                     from m in [2, 3, 4]
                     where m == n && m == k
-                    select m   
+                    select m
                 )
             }.toList()
         '''
@@ -3666,7 +3666,7 @@ class GinqTest {
                 select n, (
                     from m in [2, 3, 4]
                     where m == n && m == k
-                    select m   
+                    select m
                 )
             }.toList()
         '''
@@ -3682,7 +3682,7 @@ class GinqTest {
                     from m in [2, 3, 4]
                     where m == n
                     limit 1
-                    select m   
+                    select m
                 )
             }.toList()
 // end::ginq_nested_03[]
@@ -3698,12 +3698,12 @@ class GinqTest {
                     from m in [2, 3, 4]
                     where m == n
                     limit 1
-                    select m   
+                    select m
                 ), (
                     from m in [3, 4, 5]
                     where m == n
                     limit 1
-                    select m   
+                    select m
                 )
             }.toList()
         '''
@@ -3718,12 +3718,12 @@ class GinqTest {
                     from m in [2, 3, 4]
                     where m == n
                     limit 1
-                    select m   
+                    select m
                 ) as sqr1, (
                     from m in [3, 4, 5]
                     where m == n
                     limit 1
-                    select m   
+                    select m
                 ) as sqr2
             }.toList()
         '''
@@ -3738,7 +3738,7 @@ class GinqTest {
                     select n, (
                         from m in [2, 3, 4]
                         where m == n
-                        select m   
+                        select m
                     ) as sqr
                 )
                 select v.n, v.sqr
@@ -3754,7 +3754,7 @@ class GinqTest {
                 select (
                     from m in [2, 3, 4]
                     where m > n
-                    select sum(m)  
+                    select sum(m)
                 )
             }.toList()
         '''
@@ -4035,7 +4035,7 @@ class GinqTest {
 // tag::ginq_aggfunction_01[]
             assert [[1, 3, 2, 2, 6, 3, 3, 6]] == GQ {
                 from n in [1, 2, 3]
-                select min(n), max(n), avg(n), median(n), sum(n), count(n), count(), 
+                select min(n), max(n), avg(n), median(n), sum(n), count(n), count(),
                         agg(_g.stream().map(r -> r.n).reduce(BigDecimal.ZERO, BigDecimal::add))
             }.toList()
 // end::ginq_aggfunction_01[]
@@ -5037,7 +5037,7 @@ class GinqTest {
     @Test
     void "testGinq - parallel - 4"() {
         assertGinqScript '''
-            assert [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], 
+            assert [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5],
                     [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]] == GQ(parallel:true) {
                 from n in 1..10
                 select _rn, n
@@ -5048,7 +5048,7 @@ class GinqTest {
     @Test
     void "testGinq - parallel - 5"() {
         assertGinqScript '''
-            assert [[0, 0, 1], [1, 1, 2], [2, 2, 3], [3, 3, 4], [4, 4, 5], 
+            assert [[0, 0, 1], [1, 1, 2], [2, 2, 3], [3, 3, 4], [4, 4, 5],
                     [5, 5, 6], [6, 6, 7], [7, 7, 8], [8, 8, 9], [9, 9, 10]] == GQ(parallel:true) {
                 from n in 1..10
                 select _rn, (rowNumber() over(orderby n)), n
@@ -5605,8 +5605,8 @@ class GinqTest {
     void "testGinq - window - 42"() {
         assertGinqScript '''
 // tag::ginq_winfunction_23[]
-            assert [[1, 2, 2, 2, 1, 1], [1, 2, 2, 2, 1, 1], 
-                    [2, 2, 2, 4, 2, 2], [2, 2, 2, 4, 2, 2], 
+            assert [[1, 2, 2, 2, 1, 1], [1, 2, 2, 2, 1, 1],
+                    [2, 2, 2, 4, 2, 2], [2, 2, 2, 4, 2, 2],
                     [3, 2, 2, 6, 3, 3], [3, 2, 2, 6, 3, 3]] == GQ {
                 from n in [1, 1, 2, 2, 3, 3]
                 select n, (count() over(partitionby n)),
@@ -5637,11 +5637,11 @@ class GinqTest {
     void "testGinq - window - 44"() {
         assertGinqScript '''
 // tag::ginq_winfunction_25[]
-            assert [['a', 1, 1], ['b', 2, 2], ['b', 2, 2], 
-                    ['c', 4, 3], ['c', 4, 3], ['d', 6, 4], 
+            assert [['a', 1, 1], ['b', 2, 2], ['b', 2, 2],
+                    ['c', 4, 3], ['c', 4, 3], ['d', 6, 4],
                     ['e', 7, 5]] == GQ {
                 from s in ['a', 'b', 'b', 'c', 'c', 'd', 'e']
-                select s, 
+                select s,
                     (rank() over(orderby s)),
                     (denseRank() over(orderby s))
             }.toList()
@@ -5656,8 +5656,8 @@ class GinqTest {
             assert [[2, 6, 3, 1, 3, 4], [1, 6, 3, 1, 3, 4],
                     [3, 6, 3, 1, 3, 4], [null, 6, 3, 1, 3, 4]] == GQ {
                 from n in [2, 1, 3, null]
-                select n, (sum(n) over()), 
-                          (max(n) over()), 
+                select n, (sum(n) over()),
+                          (max(n) over()),
                           (min(n) over()),
                           (count(n) over()),
                           (count() over())
@@ -5711,8 +5711,8 @@ class GinqTest {
         assertGinqScript '''
             assert [[1, 3, 2, 1, 2, 1.5, 1.5], [2, 6, 3, 1, 3, 2, 2], [3, 5, 3, 2, 2, 2.5, 2.5]] == GQ {
                 from n in [1, 2, 3]
-                select n, (sum(n) over(orderby n rows -1, 1)), 
-                          (max(n) over(orderby n rows -1, 1)), 
+                select n, (sum(n) over(orderby n rows -1, 1)),
+                          (max(n) over(orderby n rows -1, 1)),
                           (min(n) over(orderby n rows -1, 1)),
                           (count(n) over(orderby n rows -1, 1)),
                           (avg(n) over(orderby n rows -1, 1)),
@@ -5762,7 +5762,7 @@ class GinqTest {
 // tag::ginq_winfunction_32[]
             assert [[1, 0, 0], [2, 1, 1], [5, 0, 0], [5, 0, 0]] == GQ {
                 from n in [1, 2, 5, 5]
-                select n, (count() over(orderby n in desc range -2, -1)), 
+                select n, (count() over(orderby n in desc range -2, -1)),
                           (sum(n) over(orderby n in desc range -2, -1))
             }.toList()
 // end::ginq_winfunction_32[]
@@ -5786,7 +5786,7 @@ class GinqTest {
 // tag::ginq_winfunction_31[]
             assert [[1, 1, 2], [2, 0, 0], [5, 0, 0], [5, 0, 0]] == GQ {
                 from n in [1, 2, 5, 5]
-                select n, (count() over(orderby n in desc range 1, 2)), 
+                select n, (count() over(orderby n in desc range 1, 2)),
                           (sum(n) over(orderby n in desc range 1, 2))
             }.toList()
 // end::ginq_winfunction_31[]
@@ -5799,7 +5799,7 @@ class GinqTest {
 // tag::ginq_winfunction_29[]
             assert [[1, 3, 12], [2, 2, 10], [5, 0, 0], [5, 0, 0]] == GQ {
                 from n in [1, 2, 5, 5]
-                select n, (count() over(orderby n range 1, null)), 
+                select n, (count() over(orderby n range 1, null)),
                           (sum(n) over(orderby n range 1, null))
             }.toList()
 // end::ginq_winfunction_29[]
@@ -5811,7 +5811,7 @@ class GinqTest {
         assertGinqScript '''
             assert [[1, 3, 12], [2, 2, 10], [5, 0, 0], [5, 0, 0]] == GQ {
                 from n in [1, 2, 5, 5]
-                select n, (count() over(orderby n in desc range 1, null)), 
+                select n, (count() over(orderby n in desc range 1, null)),
                           (sum(n) over(orderby n in desc range 1, null))
             }.toList()
         '''
@@ -5823,7 +5823,7 @@ class GinqTest {
 // tag::ginq_winfunction_30[]
             assert [[1, 2, 3], [2, 2, 3], [5, 4, 13], [5, 4, 13]] == GQ {
                 from n in [1, 2, 5, 5]
-                select n, (count() over(orderby n range null, 1)), 
+                select n, (count() over(orderby n range null, 1)),
                           (sum(n) over(orderby n range null, 1))
             }.toList()
 // end::ginq_winfunction_30[]
@@ -5835,7 +5835,7 @@ class GinqTest {
         assertGinqScript '''
             assert [[1, 2, 3], [2, 2, 3], [5, 4, 13], [5, 4, 13]] == GQ {
                 from n in [1, 2, 5, 5]
-                select n, (count() over(orderby n in desc range null, 1)), 
+                select n, (count() over(orderby n in desc range null, 1)),
                           (sum(n) over(orderby n in desc range null, 1))
             }.toList()
         '''
@@ -5846,7 +5846,7 @@ class GinqTest {
         assertGinqScript '''
             assert [[1, 4, 13], [2, 4, 13], [5, 4, 13], [5, 4, 13]] == GQ {
                 from n in [1, 2, 5, 5]
-                select n, (count() over(orderby n range null, null)), 
+                select n, (count() over(orderby n range null, null)),
                           (sum(n) over(orderby n range null, null))
             }.toList()
         '''
@@ -5857,7 +5857,7 @@ class GinqTest {
         assertGinqScript '''
             assert [[1, 4, 13], [2, 4, 13], [5, 4, 13], [5, 4, 13]] == GQ {
                 from n in [1, 2, 5, 5]
-                select n, (count() over(orderby n in desc range null, null)), 
+                select n, (count() over(orderby n in desc range null, null)),
                           (sum(n) over(orderby n in desc range null, null))
             }.toList()
         '''
@@ -5893,7 +5893,7 @@ class GinqTest {
 // tag::ginq_winfunction_33[]
             assert [[1, 2, 3], [2, 2, 3], [5, 2, 10], [5, 2, 10]] == GQ {
                 from n in [1, 2, 5, 5]
-                select n, (count() over(orderby n range -1, 1)), 
+                select n, (count() over(orderby n range -1, 1)),
                           (sum(n) over(orderby n range -1, 1))
             }.toList()
 // end::ginq_winfunction_33[]
@@ -5905,7 +5905,7 @@ class GinqTest {
         assertGinqScript '''
             assert [[1, 2, 3], [2, 2, 3], [5, 2, 10], [5, 2, 10]] == GQ {
                 from n in [1, 2, 5, 5]
-                select n, (count() over(orderby n in desc range -1, 1)), 
+                select n, (count() over(orderby n in desc range -1, 1)),
                           (sum(n) over(orderby n in desc range -1, 1))
             }.toList()
         '''
@@ -5916,7 +5916,7 @@ class GinqTest {
         assertGinqScript '''
             assert [[1, 3, 4], [1, 3, 4], [2, 3, 4], [5, 2, 10], [5, 2, 10]] == GQ {
                 from n in [1, 1, 2, 5, 5]
-                select n, (count() over(orderby n range -1, 1)), 
+                select n, (count() over(orderby n range -1, 1)),
                           (sum(n) over(orderby n range -1, 1))
             }.toList()
         '''
@@ -5927,7 +5927,7 @@ class GinqTest {
         assertGinqScript '''
             assert [[1, 3, 4], [1, 3, 4], [2, 3, 4], [5, 2, 10], [5, 2, 10]] == GQ {
                 from n in [1, 1, 2, 5, 5]
-                select n, (count() over(orderby n in desc range -1, 1)), 
+                select n, (count() over(orderby n in desc range -1, 1)),
                           (sum(n) over(orderby n in desc range -1, 1))
             }.toList()
         '''
@@ -6058,8 +6058,8 @@ class GinqTest {
     void "testGinq - window - 78"() {
         assertGinqScript '''
 // tag::ginq_winfunction_35[]
-            assert [[1, 0.816496580927726], 
-                    [2, 0.816496580927726], 
+            assert [[1, 0.816496580927726],
+                    [2, 0.816496580927726],
                     [3, 0.816496580927726]] == GQ {
                 from n in [1, 2, 3]
                 select n, (stdev(n) over())
@@ -6084,8 +6084,8 @@ class GinqTest {
     void "testGinq - window - 80"() {
         assertGinqScript '''
 // tag::ginq_winfunction_37[]
-            assert [[1, 0.6666666666666667], 
-                    [2, 0.6666666666666667], 
+            assert [[1, 0.6666666666666667],
+                    [2, 0.6666666666666667],
                     [3, 0.6666666666666667]] == GQ {
                 from n in [1, 2, 3]
                 select n, (var(n) over())
@@ -6111,8 +6111,8 @@ class GinqTest {
         assertGinqScript '''
 // tag::ginq_winfunction_39[]
             assert [[1, 0], [2, 0], [3, 0],
-                    [4, 1], [5, 1], 
-                    [6, 2], [7, 2],[8, 2], 
+                    [4, 1], [5, 1],
+                    [6, 2], [7, 2],[8, 2],
                     [9, 3], [10, 3]] == GQ {
                 from n in 1..10
                 select n, (ntile(4) over(orderby n))
@@ -6141,7 +6141,7 @@ class GinqTest {
         assertGinqScript '''
             assert [[3, 1, 1], [3, 1, 1], [2, 3, 2], [2, 3, 2], [1, 5, 3]] == GQ {
                 from n in [3, 3, 2, 2, 1]
-                select n, 
+                select n,
                     (rank() over(orderby n in desc)),
                     (denseRank() over(orderby n in desc))
             }.toList()
diff --git a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/commands/HistoryCommand.groovy b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/commands/HistoryCommand.groovy
index 056505b3ee..1c579f8903 100644
--- a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/commands/HistoryCommand.groovy
+++ b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/commands/HistoryCommand.groovy
@@ -63,6 +63,9 @@ class HistoryCommand extends ComplexCommandSupport {
         return null
     }
 
+    /**
+     * history show - shows a list of indexes and past commands
+     */
     def do_show = {
         Iterator<History.Entry> histIt = history.iterator()
         while (histIt.hasNext()) {
@@ -90,14 +93,14 @@ class HistoryCommand extends ComplexCommandSupport {
     }
 
     /**
-     * history show shows a list of indexes and past commands. recall serves to rerun one of those by their index.
-     * There is is moving window of indexes, so the first valid index will usually be greater than zero.
+     * history recall - serves to rerun a command from the history by its index.
+     * There is a moving window of indexes, so the first valid index will usually be greater than zero.
      */
     def do_recall = {args ->
         String line
 
         if (!args || ((List)args).size() != 1) {
-            fail('History recall requires a single history identifer')
+            fail('History recall requires a single history identifier')
         }
 
         String ids = ((List<String>)args)[0]
diff --git a/subprojects/groovy-swing/src/main/java/groovy/swing/table/TableSorter.java b/subprojects/groovy-swing/src/main/java/groovy/swing/table/TableSorter.java
index 89b72db4c2..b10eee4906 100644
--- a/subprojects/groovy-swing/src/main/java/groovy/swing/table/TableSorter.java
+++ b/subprojects/groovy-swing/src/main/java/groovy/swing/table/TableSorter.java
@@ -245,7 +245,7 @@ public class TableSorter extends TableMap {
         than assigned otherwise sister calls in the recursion might
         get out of sync.  When the number of elements is three they
         are partitioned so that the first set, [low, mid), has one
-        element and and the second, [mid, high), has two. We skip the
+        element and the second, [mid, high), has two. We skip the
         optimisation when the number of elements is three or less as
         the first compare in the normal merge will produce the same
         sequence of steps. This optimisation seems to be worthwhile


[groovy] 02/08: Polish org.apache.groovy package documentation

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit b2d5a078f68e19d0f47392928708ccc04126ba93
Author: Marc Wrobel <ma...@gmail.com>
AuthorDate: Tue Oct 18 15:05:01 2022 +0200

    Polish org.apache.groovy package documentation
    
    Fix typos and improve documentation (javadoc, comments) in the org.apache.groovy package.
    
    Note that the following words / expressions were preferred :
    
    - meta data -> metadata (incorrect, see https://www.merriam-webster.com/dictionary/metadata)
    - sub-class -> subclass (more common, see https://docs.oracle.com/javase/tutorial/java/IandI/subclasses.html),
    - meta class -> metaclass (incorrect, see https://en.wikipedia.org/wiki/Metaclass).
---
 src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java  |  8 ++++----
 .../org/apache/groovy/ast/tools/ImmutablePropertyUtils.java    |  2 +-
 .../apache/groovy/internal/metaclass/MetaClassConstant.java    |  2 +-
 src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java  |  6 +++---
 .../java/org/apache/groovy/plugin/GroovyRunnerRegistry.java    |  2 +-
 src/main/java/org/apache/groovy/util/SystemUtil.java           |  2 +-
 .../org/apache/groovy/util/concurrent/LazyInitializable.java   |  2 +-
 .../concurrentlinkedhashmap/ConcurrentLinkedHashMap.java       | 10 +++++-----
 .../util/concurrent/concurrentlinkedhashmap/Weighers.java      |  6 +++---
 9 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java b/src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java
index 0e968f14e2..b3eb22ed49 100644
--- a/src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java
+++ b/src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java
@@ -63,11 +63,11 @@ public class ClassNodeUtils {
     private ClassNodeUtils() { }
 
     /**
-     * Formats a type name into a human readable version. For arrays, appends "[]" to the formatted
+     * Formats a type name into a human-readable version. For arrays, appends "[]" to the formatted
      * type name of the component. For unit class nodes, uses the class node name.
      *
      * @param cNode the type to format
-     * @return a human readable version of the type name (java.lang.String[] for example)
+     * @return a human-readable version of the type name (java.lang.String[] for example)
      */
     public static String formatTypeName(final ClassNode cNode) {
         if (cNode.isArray()) {
@@ -350,7 +350,7 @@ public class ClassNodeUtils {
     }
 
     /**
-     * Detect whether a given ClassNode is a inner class (non-static).
+     * Detect whether a given ClassNode is an inner class (non-static).
      *
      * @param cNode the ClassNode of interest
      * @return true if the given node is a (non-static) inner class, else false
@@ -387,7 +387,7 @@ public class ClassNodeUtils {
     /**
      * Determine if an explicit (non-generated) constructor is in the class.
      *
-     * @param xform if non null, add an error if an explicit constructor is found
+     * @param xform if non-null, add an error if an explicit constructor is found
      * @param cNode the type of the containing class
      * @return true if an explicit (non-generated) constructor was found
      */
diff --git a/src/main/java/org/apache/groovy/ast/tools/ImmutablePropertyUtils.java b/src/main/java/org/apache/groovy/ast/tools/ImmutablePropertyUtils.java
index a8ea396a30..646ec044c9 100644
--- a/src/main/java/org/apache/groovy/ast/tools/ImmutablePropertyUtils.java
+++ b/src/main/java/org/apache/groovy/ast/tools/ImmutablePropertyUtils.java
@@ -61,7 +61,7 @@ public class ImmutablePropertyUtils {
      * Also, Color is not final so while not normally used with child
      * classes, it isn't strictly immutable. Use at your own risk.
      *
-     * This list can by extended by providing "known immutable" classes
+     * This list can be extended by providing "known immutable" classes
      * via Immutable.knownImmutableClasses
      */
     private static final Set<String> BUILTIN_IMMUTABLES = new HashSet<>(Arrays.asList(
diff --git a/src/main/java/org/apache/groovy/internal/metaclass/MetaClassConstant.java b/src/main/java/org/apache/groovy/internal/metaclass/MetaClassConstant.java
index df5a7ec964..81c7659f55 100644
--- a/src/main/java/org/apache/groovy/internal/metaclass/MetaClassConstant.java
+++ b/src/main/java/org/apache/groovy/internal/metaclass/MetaClassConstant.java
@@ -26,7 +26,7 @@ import org.apache.groovy.lang.annotation.Incubating;
 import java.lang.invoke.SwitchPoint;
 
 /**
- * The one and only implementation of a meta class.
+ * The one and only implementation of a metaclass.
  * INTERNAL USE ONLY.
  */
 @Incubating
diff --git a/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java b/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
index 8997dedd43..fc0a1765e3 100644
--- a/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
+++ b/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
@@ -3443,7 +3443,7 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object> {
         InnerClassNode anonymousInnerClass;
         if (ctx.t == 1) {
             anonymousInnerClass = new EnumConstantClassNode(outerClass, innerClassName, superClass.getPlainNodeReference());
-            // and remove the final modifier from superClass to allow the sub class
+            // and remove the final modifier from superClass to allow the subclass
             superClass.setModifiers(superClass.getModifiers() & ~Opcodes.ACC_FINAL);
         } else {
             anonymousInnerClass = new InnerClassNode(outerClass, innerClassName, Opcodes.ACC_PUBLIC, superClass);
@@ -4452,7 +4452,7 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object> {
             methodCallExpression.setSafe(false);
         }
 
-        // if the generics types meta data is not empty, it is a generic method call, e.g. obj.<Integer>a(1, 2)
+        // if the generics types metadata is not empty, it is a generic method call, e.g. obj.<Integer>a(1, 2)
         methodCallExpression.setGenericsTypes(
                 propertyExpression.getNodeMetaData(PATH_EXPRESSION_BASE_EXPR_GENERICS_TYPES));
 
@@ -4718,7 +4718,7 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object> {
         }
 
         if (!(nmd instanceof Boolean)) {
-            throw new GroovyBugError(nodeMetaDataHandler + " node meta data[" + key + "] is not an instance of Boolean");
+            throw new GroovyBugError(nodeMetaDataHandler + " node metadata[" + key + "] is not an instance of Boolean");
         }
 
         return (Boolean) nmd;
diff --git a/src/main/java/org/apache/groovy/plugin/GroovyRunnerRegistry.java b/src/main/java/org/apache/groovy/plugin/GroovyRunnerRegistry.java
index 4ed02e265f..411d725d3e 100644
--- a/src/main/java/org/apache/groovy/plugin/GroovyRunnerRegistry.java
+++ b/src/main/java/org/apache/groovy/plugin/GroovyRunnerRegistry.java
@@ -282,7 +282,7 @@ public class GroovyRunnerRegistry implements Map<String, GroovyRunner>, Iterable
     /**
      * Returns the registered runner for the specified key.
      *
-     * @param key used to lookup the runner
+     * @param key used to look up the runner
      * @return the runner registered with the given key
      */
     @Override
diff --git a/src/main/java/org/apache/groovy/util/SystemUtil.java b/src/main/java/org/apache/groovy/util/SystemUtil.java
index 503928aa90..d0145ab754 100644
--- a/src/main/java/org/apache/groovy/util/SystemUtil.java
+++ b/src/main/java/org/apache/groovy/util/SystemUtil.java
@@ -138,7 +138,7 @@ public class SystemUtil {
     }
 
     /**
-     * Retrieves an Long System property
+     * Retrieves a Long System property
      *
      * @param name the name of the system property.
      * @param def the default value
diff --git a/src/main/java/org/apache/groovy/util/concurrent/LazyInitializable.java b/src/main/java/org/apache/groovy/util/concurrent/LazyInitializable.java
index 7374d37326..54f167725c 100644
--- a/src/main/java/org/apache/groovy/util/concurrent/LazyInitializable.java
+++ b/src/main/java/org/apache/groovy/util/concurrent/LazyInitializable.java
@@ -20,7 +20,7 @@ package org.apache.groovy.util.concurrent;
 
 /**
  *  A {@code LazyInitializable} is an object that can be initialized lazily.
- *  Note: the instance field {@code initialized} of sub-class should be {@code volatile} to avoid JVM instructions re-ordering
+ *  Note: the instance field {@code initialized} of subclass should be {@code volatile} to avoid JVM instructions re-ordering
  *
  * @since 3.0.0
  */
diff --git a/src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java b/src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java
index cac5cfec4b..5266a1d6ca 100644
--- a/src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java
+++ b/src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java
@@ -947,7 +947,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
   }
 
   /**
-   * Returns a unmodifiable snapshot {@link Set} view of the keys contained in
+   * Returns an unmodifiable snapshot {@link Set} view of the keys contained in
    * this map. The set's iterator returns the keys whose order of iteration is
    * the ascending order in which its entries are considered eligible for
    * retention, from the least-likely to be retained to the most-likely.
@@ -975,7 +975,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
    * of the keys.
    *
    * @param limit the maximum size of the returned set
-   * @return a ascending snapshot view of the keys in this map
+   * @return an ascending snapshot view of the keys in this map
    * @throws IllegalArgumentException if the limit is negative
    */
   public Set<K> ascendingKeySetWithLimit(int limit) {
@@ -1064,7 +1064,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
    * policy, determining the retention ordering requires a traversal of the
    * entries.
    *
-   * @return a ascending snapshot view of this map
+   * @return an ascending snapshot view of this map
    */
   public Map<K, V> ascendingMap() {
     return ascendingMapWithLimit(Integer.MAX_VALUE);
@@ -1083,7 +1083,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
    * entries.
    *
    * @param limit the maximum size of the returned map
-   * @return a ascending snapshot view of this map
+   * @return an ascending snapshot view of this map
    * @throws IllegalArgumentException if the limit is negative
    */
   public Map<K, V> ascendingMapWithLimit(int limit) {
@@ -1675,7 +1675,7 @@ public final class ConcurrentLinkedHashMap<K, V> extends AbstractMap<K, V>
      * entry consumes. The default algorithm bounds the map by the number of
      * key-value pairs by giving each entry a weight of <tt>1</tt>.
      *
-     * @param weigher the algorithm to determine a entry's weight
+     * @param weigher the algorithm to determine an entry's weight
      * @throws NullPointerException if the weigher is null
      */
     public Builder<K, V> weigher(EntryWeigher<? super K, ? super V> weigher) {
diff --git a/src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/Weighers.java b/src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/Weighers.java
index 5b7f7a4e3e..f2be15419e 100644
--- a/src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/Weighers.java
+++ b/src/main/java/org/apache/groovy/util/concurrent/concurrentlinkedhashmap/Weighers.java
@@ -34,11 +34,11 @@ public final class Weighers {
   }
 
   /**
-   * A entry weigher backed by the specified weigher. The weight of the value
+   * An entry weigher backed by the specified weigher. The weight of the value
    * determines the weight of the entry.
    *
-   * @param weigher the weigher to be "wrapped" in a entry weigher.
-   * @return A entry weigher view of the specified weigher.
+   * @param weigher the weigher to be "wrapped" in an entry weigher.
+   * @return An entry weigher view of the specified weigher.
    */
   public static <K, V> EntryWeigher<K, V> asEntryWeigher(
       final Weigher<? super V> weigher) {