THRIFT-2849: spelling errors fixed using codespell tool

Client: All
Patch: Anatol Pomozov

This closes #281
diff --git a/aclocal/ax_javac_and_java.m4 b/aclocal/ax_javac_and_java.m4
index fdb4bf0..581b450 100644
--- a/aclocal/ax_javac_and_java.m4
+++ b/aclocal/ax_javac_and_java.m4
@@ -7,7 +7,7 @@
 dnl java command tested.  Otherwise, a hard-coded list will be used.
 dnl Similarly for "JAVAC".
 dnl
-dnl AX_JAVAC_AND_JAVA does not currenly support testing for a particular
+dnl AX_JAVAC_AND_JAVA does not currently support testing for a particular
 dnl Java version, testing for only one of "java" and "javac", or
 dnl compiling or running user-provided Java code.
 dnl
diff --git a/compiler/cpp/src/generate/t_csharp_generator.cc b/compiler/cpp/src/generate/t_csharp_generator.cc
index a0cddbf..4762873 100644
--- a/compiler/cpp/src/generate/t_csharp_generator.cc
+++ b/compiler/cpp/src/generate/t_csharp_generator.cc
@@ -691,7 +691,7 @@
   if ((serialize_ || wcf_) && !is_exception) {
     indent(out) << "[DataContract(Namespace=\"" << wcf_namespace_ << "\")]"
                 << endl; // do not make exception classes directly WCF serializable, we provide a
-                         // seperate "fault" for that
+                         // separate "fault" for that
   }
   bool is_final = (tstruct->annotations_.find("final") != tstruct->annotations_.end());
 
diff --git a/compiler/cpp/src/generate/t_html_generator.cc b/compiler/cpp/src/generate/t_html_generator.cc
index f5185ea..8e54ac1 100644
--- a/compiler/cpp/src/generate/t_html_generator.cc
+++ b/compiler/cpp/src/generate/t_html_generator.cc
@@ -716,7 +716,7 @@
  */
 void t_html_generator::print_const_value(t_type* type, t_const_value* tvalue) {
 
-  // if tvalue is an indentifier, the constant content is already shown elsewhere
+  // if tvalue is an identifier, the constant content is already shown elsewhere
   if (tvalue->get_type() == t_const_value::CV_IDENTIFIER) {
     string fname = program_->get_name() + ".html";
     string name = escape_html(tvalue->get_identifier());
diff --git a/compiler/cpp/src/generate/t_php_generator.cc b/compiler/cpp/src/generate/t_php_generator.cc
index 827af9f..b45773c 100644
--- a/compiler/cpp/src/generate/t_php_generator.cc
+++ b/compiler/cpp/src/generate/t_php_generator.cc
@@ -228,7 +228,7 @@
     return (nsglobal_.size() ? NSGLOBAL_B : NSGLOBAL) + ns;
   }
 
-  // add a directory to allready existing namespace
+  // add a directory to already existing namespace
   string php_namespace_directory(string directory, bool end = true) {
     (void)directory;
     if (end) {
diff --git a/compiler/cpp/src/globals.h b/compiler/cpp/src/globals.h
index 93d11aa..af90616 100644
--- a/compiler/cpp/src/globals.h
+++ b/compiler/cpp/src/globals.h
@@ -123,7 +123,7 @@
 };
 
 /**
- * The program level doctext. Stored seperately to make parsing easier.
+ * The program level doctext. Stored separately to make parsing easier.
  */
 extern char* g_program_doctext_candidate;
 extern int g_program_doctext_lineno;
diff --git a/compiler/cpp/src/main.cc b/compiler/cpp/src/main.cc
index 57cd460..c0166a1 100644
--- a/compiler/cpp/src/main.cc
+++ b/compiler/cpp/src/main.cc
@@ -992,7 +992,7 @@
   if (gen_recurse) {
     const vector<t_program*>& includes = program->get_includes();
     for (size_t i = 0; i < includes.size(); ++i) {
-      // Propogate output path from parent to child programs
+      // Propagate output path from parent to child programs
       includes[i]->set_out_path(program->get_out_path(), program->is_out_path_absolute());
 
       generate(includes[i], generator_strings);
diff --git a/compiler/cpp/src/parse/t_program.h b/compiler/cpp/src/parse/t_program.h
index 51157aa..386f589 100644
--- a/compiler/cpp/src/parse/t_program.h
+++ b/compiler/cpp/src/parse/t_program.h
@@ -135,11 +135,11 @@
    * @return     true if a certain collision was found, otherwise false
    */
   bool is_unique_typename(t_type* t) {
-    int occurances = program_typename_count(this, t);
+    int occurrences = program_typename_count(this, t);
     for (std::vector<t_program*>::iterator it = includes_.begin(); it != includes_.end(); ++it) {
-      occurances += program_typename_count(*it, t);
+      occurrences += program_typename_count(*it, t);
     }
-    return 0 == occurances;
+    return 0 == occurrences;
   }
 
   /**
@@ -149,12 +149,12 @@
    * @return     the number of certain typename collisions
    */
   int program_typename_count(t_program* prog, t_type* t) {
-    int occurances = 0;
-    occurances += collection_typename_count(prog, prog->typedefs_, t);
-    occurances += collection_typename_count(prog, prog->enums_, t);
-    occurances += collection_typename_count(prog, prog->objects_, t);
-    occurances += collection_typename_count(prog, prog->services_, t);
-    return occurances;
+    int occurrences = 0;
+    occurrences += collection_typename_count(prog, prog->typedefs_, t);
+    occurrences += collection_typename_count(prog, prog->enums_, t);
+    occurrences += collection_typename_count(prog, prog->objects_, t);
+    occurrences += collection_typename_count(prog, prog->services_, t);
+    return occurrences;
   }
 
   /**
@@ -166,11 +166,11 @@
    */
   template <class T>
   int collection_typename_count(t_program* prog, T type_collection, t_type* t) {
-    int occurances = 0;
+    int occurrences = 0;
     for (typename T::iterator it = type_collection.begin(); it != type_collection.end(); ++it)
       if (t != *it && 0 == t->get_name().compare((*it)->get_name()) && is_common_namespace(prog, t))
-        ++occurances;
-    return occurances;
+        ++occurrences;
+    return occurrences;
   }
 
   /**
diff --git a/contrib/fb303/TClientInfo.h b/contrib/fb303/TClientInfo.h
index d0a9770..6668c19 100644
--- a/contrib/fb303/TClientInfo.h
+++ b/contrib/fb303/TClientInfo.h
@@ -192,7 +192,7 @@
 
   /**
    * Return as string the thrift call either currently being processed or
-   * most recently processed if the connection is still open for additonal
+   * most recently processed if the connection is still open for additional
    * calls.  Returns NULL if a call hasn't been made yet or processing
    * has ended.
    */
diff --git a/contrib/fb303/aclocal/ax_javac_and_java.m4 b/contrib/fb303/aclocal/ax_javac_and_java.m4
index fdb4bf0..581b450 100644
--- a/contrib/fb303/aclocal/ax_javac_and_java.m4
+++ b/contrib/fb303/aclocal/ax_javac_and_java.m4
@@ -7,7 +7,7 @@
 dnl java command tested.  Otherwise, a hard-coded list will be used.
 dnl Similarly for "JAVAC".
 dnl
-dnl AX_JAVAC_AND_JAVA does not currenly support testing for a particular
+dnl AX_JAVAC_AND_JAVA does not currently support testing for a particular
 dnl Java version, testing for only one of "java" and "javac", or
 dnl compiling or running user-provided Java code.
 dnl
diff --git a/contrib/parse_profiling.py b/contrib/parse_profiling.py
index 52d2211..3d46fb8 100755
--- a/contrib/parse_profiling.py
+++ b/contrib/parse_profiling.py
@@ -42,7 +42,7 @@
         self.address = address
         self.sourceFile = None
         self.sourceLine = None
-        self.funtion = None
+        self.function = None
 
 
 g_addrs_by_filename = {}
diff --git a/contrib/thrift-maven-plugin/src/main/java/org/apache/thrift/maven/AbstractThriftMojo.java b/contrib/thrift-maven-plugin/src/main/java/org/apache/thrift/maven/AbstractThriftMojo.java
index a3b5af6..63451c3 100644
--- a/contrib/thrift-maven-plugin/src/main/java/org/apache/thrift/maven/AbstractThriftMojo.java
+++ b/contrib/thrift-maven-plugin/src/main/java/org/apache/thrift/maven/AbstractThriftMojo.java
@@ -193,7 +193,7 @@
                     attachFiles();
                 }
             } catch (IOException e) {
-                throw new MojoExecutionException("An IO error occured", e);
+                throw new MojoExecutionException("An IO error occurred", e);
             } catch (IllegalArgumentException e) {
                 throw new MojoFailureException("thrift failed to execute because: " + e.getMessage(), e);
             } catch (CommandLineException e) {
diff --git a/contrib/vagrant/centos-6.5/README.md b/contrib/vagrant/centos-6.5/README.md
index 3d1dc07..76dca44 100644
--- a/contrib/vagrant/centos-6.5/README.md
+++ b/contrib/vagrant/centos-6.5/README.md
@@ -15,7 +15,7 @@
 
 The provisioning script (inside the Vagrantfile) runs ./bootstrap.sh, ./configure, make and make check, but does not install thrift. To install thrift run "make install".
 
-The Vagrant base box used here is a minimal Centos 6.5 VirtualBox with 2GB RAM and 2 CPUs. For more Vagrant information: https://www.vagrantup.com. A summary of the base box preperation follows:
+The Vagrant base box used here is a minimal Centos 6.5 VirtualBox with 2GB RAM and 2 CPUs. For more Vagrant information: https://www.vagrantup.com. A summary of the base box preparation follows:
 
 root password: vagrant
 
diff --git a/contrib/zeromq/csharp/TZmqClient.cs b/contrib/zeromq/csharp/TZmqClient.cs
index c792882..e9ab516 100644
--- a/contrib/zeromq/csharp/TZmqClient.cs
+++ b/contrib/zeromq/csharp/TZmqClient.cs
@@ -47,7 +47,7 @@
 				throw new NotImplementedException ();
 
 			if (_rbuf.Length == 0) {
-				//Fill the Buffer with the complete ZMQ Message which needs to be(?!) the complete Thrift reponse
+				//Fill the Buffer with the complete ZMQ Message which needs to be(?!) the complete Thrift response
 				debug ("Client_Read Filling buffer..");
 				byte[] tmpBuf = _sock.Recv ();
 				debug (string.Format("Client_Read filled with {0}b",tmpBuf.Length));
diff --git a/debian/rules b/debian/rules
index 633b17e..d8462d1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -193,11 +193,11 @@
 	dh_gencontrol
 	dh_md5sums
 	dh_builddeb
-# Build architecture independant packages using the common target.
+# Build architecture independent packages using the common target.
 binary-indep: build-indep install-indep
 	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
 
-# Build architecture dependant packages using the common target.
+# Build architecture dependent packages using the common target.
 binary-arch: build-arch install-arch
 	echo "php:Depends=phpapi-$(php-config5 --phpapi)" > debian/substvars
 	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
diff --git a/lib/cocoa/src/transport/TSSLSocketClient.m b/lib/cocoa/src/transport/TSSLSocketClient.m
index db5a2b4..5be04ef 100644
--- a/lib/cocoa/src/transport/TSSLSocketClient.m
+++ b/lib/cocoa/src/transport/TSSLSocketClient.m
@@ -193,8 +193,8 @@
         case NSStreamEventErrorOccurred:
         {
             NSError *theError = [aStream streamError];
-            NSLog(@"Error occured opening stream: %@", theError);
-//            @throw [TSSLSocketException exceptionWithReason: @"Error occured opening stream" error: theError];
+            NSLog(@"Error occurred opening stream: %@", theError);
+//            @throw [TSSLSocketException exceptionWithReason: @"Error occurred opening stream" error: theError];
             break;
         }
         case NSStreamEventEndEncountered:
diff --git a/lib/cpp/libthrift.vcxproj.filters b/lib/cpp/libthrift.vcxproj.filters
index c38516b..4effa87 100644
--- a/lib/cpp/libthrift.vcxproj.filters
+++ b/lib/cpp/libthrift.vcxproj.filters
@@ -25,19 +25,19 @@
       <Filter>concurrency</Filter>
     </ClCompile>
     <ClCompile Include="src\thrift\protocol\TDebugProtocol.cpp">
-      <Filter>protocal</Filter>
+      <Filter>protocol</Filter>
     </ClCompile>
     <ClCompile Include="src\thrift\protocol\TDenseProtocol.cpp">
-      <Filter>protocal</Filter>
+      <Filter>protocol</Filter>
     </ClCompile>
     <ClCompile Include="src\thrift\protocol\TBase64Utils.cpp">
-      <Filter>protocal</Filter>
+      <Filter>protocol</Filter>
     </ClCompile>
     <ClCompile Include="src\thrift\protocol\TJSONProtocol.cpp">
-      <Filter>protocal</Filter>
+      <Filter>protocol</Filter>
     </ClCompile>
     <ClCompile Include="src\thrift\protocol\TMultiplexedProtocol.cpp">
-      <Filter>protocal</Filter>
+      <Filter>protocol</Filter>
     </ClCompile>
     <ClCompile Include="src\thrift\transport\TFDTransport.cpp">
       <Filter>transport</Filter>
@@ -120,7 +120,7 @@
       <Filter>transport</Filter>
     </ClInclude>
     <ClInclude Include="src\thrift\protocol\TBinaryProtocol.h">
-      <Filter>protocal</Filter>
+      <Filter>protocol</Filter>
     </ClInclude>
     <ClInclude Include="src\thrift\Thrift.h" />
     <ClInclude Include="src\thrift\TProcessor.h" />
@@ -153,10 +153,10 @@
       <Filter>windows</Filter>
     </ClInclude>
     <ClInclude Include="src\thrift\protocol\TProtocol.h">
-      <Filter>protocal</Filter>
+      <Filter>protocol</Filter>
     </ClInclude>
     <ClInclude Include="src\thrift\protocol\TVirtualProtocol.h">
-      <Filter>protocal</Filter>
+      <Filter>protocol</Filter>
     </ClInclude>
     <ClInclude Include="src\thrift\server\TServer.h">
       <Filter>server</Filter>
@@ -201,16 +201,16 @@
       <Filter>transport</Filter>
     </ClInclude>
     <ClInclude Include="src\thrift\protocol\TJSONProtocol.h">
-      <Filter>protocal</Filter>
+      <Filter>protocol</Filter>
     </ClInclude>
     <ClInclude Include="src\thrift\protocol\TMultiplexedProtocol.h">
-      <Filter>protocal</Filter>
+      <Filter>protocol</Filter>
     </ClInclude>
     <ClInclude Include="src\thrift\protocol\TDenseProtocol.h">
-      <Filter>protocal</Filter>
+      <Filter>protocol</Filter>
     </ClInclude>
     <ClInclude Include="src\thrift\protocol\TDebugProtocol.h">
-      <Filter>protocal</Filter>
+      <Filter>protocol</Filter>
     </ClInclude>
     <ClInclude Include="src\thrift\transport\TServerSocket.h">
       <Filter>transport</Filter>
@@ -247,7 +247,7 @@
     </ClInclude>
   </ItemGroup>
   <ItemGroup>
-    <Filter Include="protocal">
+    <Filter Include="protocol">
       <UniqueIdentifier>{07ced19b-b72a-4105-9ffb-6d2bcf64497e}</UniqueIdentifier>
     </Filter>
     <Filter Include="transport">
@@ -274,7 +274,7 @@
   </ItemGroup>
   <ItemGroup>
     <None Include="src\thrift\protocol\TBinaryProtocol.tcc">
-      <Filter>protocal</Filter>
+      <Filter>protocol</Filter>
     </None>
     <None Include="src\thrift\windows\tr1\functional">
       <Filter>windows\tr1</Filter>
diff --git a/lib/cpp/src/thrift/TLogging.h b/lib/cpp/src/thrift/TLogging.h
index 096054c..07ff030 100644
--- a/lib/cpp/src/thrift/TLogging.h
+++ b/lib/cpp/src/thrift/TLogging.h
@@ -62,7 +62,7 @@
 #endif
 
 /**
- * analagous to T_DEBUG but also prints the time
+ * analogous to T_DEBUG but also prints the time
  *
  * @param string  format_string input: printf style format string
  */
@@ -88,7 +88,7 @@
 #endif
 
 /**
- * analagous to T_DEBUG but uses input level to determine whether or not the string
+ * analogous to T_DEBUG but uses input level to determine whether or not the string
  * should be logged.
  *
  * @param int     level: specified debug level
@@ -120,7 +120,7 @@
   }
 
 /**
- * Analagous to T_ERROR, additionally aborting the process.
+ * Analogous to T_ERROR, additionally aborting the process.
  * WARNING: macro calls abort(), ending program execution
  *
  * @param string  format_string input: printf style format string
diff --git a/lib/cpp/src/thrift/concurrency/PosixThreadFactory.h b/lib/cpp/src/thrift/concurrency/PosixThreadFactory.h
index 4004231..b26d296 100644
--- a/lib/cpp/src/thrift/concurrency/PosixThreadFactory.h
+++ b/lib/cpp/src/thrift/concurrency/PosixThreadFactory.h
@@ -46,7 +46,7 @@
    *
    * Absolute priority is determined by scheduler policy and OS. This
    * enumeration specifies relative priorities such that one can specify a
-   * priority withing a giving scheduler policy without knowing the absolute
+   * priority within a giving scheduler policy without knowing the absolute
    * value of the priority.
    */
   enum PRIORITY {
diff --git a/lib/cpp/src/thrift/processor/TMultiplexedProcessor.h b/lib/cpp/src/thrift/processor/TMultiplexedProcessor.h
index a97f6a9..0ef7261 100644
--- a/lib/cpp/src/thrift/processor/TMultiplexedProcessor.h
+++ b/lib/cpp/src/thrift/processor/TMultiplexedProcessor.h
@@ -96,7 +96,7 @@
     *
     * \param [in] serviceName Name of a service, has to be identical to the name
     *                         declared in the Thrift IDL, e.g. "WeatherReport".
-    * \param [in] processor   Implementation of a service, ususally referred to
+    * \param [in] processor   Implementation of a service, usually referred to
     *                         as "handlers", e.g. WeatherReportHandler,
     *                         implementing WeatherReportIf interface.
     */
diff --git a/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc b/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc
index 85dde6c..7f2583c 100644
--- a/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc
+++ b/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc
@@ -261,7 +261,7 @@
 }
 
 /**
- * Write a string to the wire with a varint size preceeding.
+ * Write a string to the wire with a varint size preceding.
  */
 template <class Transport_>
 uint32_t TCompactProtocolT<Transport_>::writeString(const std::string& str) {
diff --git a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
index ca450f4..72cd28b 100644
--- a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
+++ b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
@@ -656,7 +656,7 @@
 }
 
 uint32_t TJSONProtocol::writeByte(const int8_t byte) {
-  // writeByte() must be handled specially becuase boost::lexical cast sees
+  // writeByte() must be handled specially because boost::lexical cast sees
   // int8_t as a text type instead of an integer type
   return writeJSONInteger((int16_t)byte);
 }
@@ -984,7 +984,7 @@
   return readJSONInteger(value);
 }
 
-// readByte() must be handled properly becuase boost::lexical cast sees int8_t
+// readByte() must be handled properly because boost::lexical cast sees int8_t
 // as a text type instead of an integer type
 uint32_t TJSONProtocol::readByte(int8_t& byte) {
   int16_t tmp = (int16_t)byte;
diff --git a/lib/cpp/src/thrift/protocol/TJSONProtocol.h b/lib/cpp/src/thrift/protocol/TJSONProtocol.h
index b19c35d..3c7b9d7 100644
--- a/lib/cpp/src/thrift/protocol/TJSONProtocol.h
+++ b/lib/cpp/src/thrift/protocol/TJSONProtocol.h
@@ -43,7 +43,7 @@
  * 2. Thrift doubles are represented as JSON numbers. Some special values are
  *    represented as strings:
  *    a. "NaN" for not-a-number values
- *    b. "Infinity" for postive infinity
+ *    b. "Infinity" for positive infinity
  *    c. "-Infinity" for negative infinity
  *
  * 3. Thrift string values are emitted as JSON strings, with appropriate
diff --git a/lib/cpp/src/thrift/server/TNonblockingServer.h b/lib/cpp/src/thrift/server/TNonblockingServer.h
index 7853d54..3edc795 100644
--- a/lib/cpp/src/thrift/server/TNonblockingServer.h
+++ b/lib/cpp/src/thrift/server/TNonblockingServer.h
@@ -669,7 +669,7 @@
 
   /**
    * Check buffer sizes every "count" calls.  This allows buffer limits
-   * to be enforced for persistant connections with a controllable degree
+   * to be enforced for persistent connections with a controllable degree
    * of overhead. 0 disables checks except at connection close.
    *
    * @param count the number of calls between checks, or 0 to disable
@@ -812,7 +812,7 @@
    * C-callable event handler for listener events.  Provides a callback
    * that libevent can understand which invokes server->handleEvent().
    *
-   * @param fd the descriptor the event occured on.
+   * @param fd the descriptor the event occurred on.
    * @param which the flags associated with the event.
    * @param v void* callback arg where we placed TNonblockingServer's "this".
    */
diff --git a/lib/cpp/src/thrift/transport/TBufferTransports.cpp b/lib/cpp/src/thrift/transport/TBufferTransports.cpp
index 25adb23..bedb5a5 100644
--- a/lib/cpp/src/thrift/transport/TBufferTransports.cpp
+++ b/lib/cpp/src/thrift/transport/TBufferTransports.cpp
@@ -63,7 +63,7 @@
 void TBufferedTransport::writeSlow(const uint8_t* buf, uint32_t len) {
   uint32_t have_bytes = static_cast<uint32_t>(wBase_ - wBuf_.get());
   uint32_t space = static_cast<uint32_t>(wBound_ - wBase_);
-  // We should only take the slow path if we can't accomodate the write
+  // We should only take the slow path if we can't accommodate the write
   // with the free space already in the buffer.
   assert(wBound_ - wBase_ < static_cast<ptrdiff_t>(len));
 
diff --git a/lib/cpp/src/thrift/transport/TBufferTransports.h b/lib/cpp/src/thrift/transport/TBufferTransports.h
index da75052..c94ae1e 100644
--- a/lib/cpp/src/thrift/transport/TBufferTransports.h
+++ b/lib/cpp/src/thrift/transport/TBufferTransports.h
@@ -86,7 +86,7 @@
   /**
    * Fast-path write.
    *
-   * When we have enough empty space in our buffer to accomodate the write, we
+   * When we have enough empty space in our buffer to accommodate the write, we
    * can satisfy it with a single memcpy, then adjust our internal pointers.
    * If the buffer is full, we call out to our slow path, implemented by a
    * subclass.  This method is meant to eventually be nonvirtual and
@@ -629,7 +629,7 @@
   uint32_t available_write() const { return static_cast<uint32_t>(wBound_ - wBase_); }
 
   // Returns a pointer to where the client can write data to append to
-  // the TMemoryBuffer, and ensures the buffer is big enough to accomodate a
+  // the TMemoryBuffer, and ensures the buffer is big enough to accommodate a
   // write of the provided length.  The returned pointer is very convenient for
   // passing to read(), recv(), or similar. You must call wroteBytes() as soon
   // as data is written or the buffer will not be aware that data has changed.
diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.cpp b/lib/cpp/src/thrift/transport/TSSLSocket.cpp
index de5876c..682f63c 100644
--- a/lib/cpp/src/thrift/transport/TSSLSocket.cpp
+++ b/lib/cpp/src/thrift/transport/TSSLSocket.cpp
@@ -204,7 +204,7 @@
     return false;
   }
   int shutdown = SSL_get_shutdown(ssl_);
-  // "!!" is squelching C4800 "forcing bool -> true or false" perfomance warning
+  // "!!" is squelching C4800 "forcing bool -> true or false" performance warning
   bool shutdownReceived = !!(shutdown & SSL_RECEIVED_SHUTDOWN);
   bool shutdownSent = !!(shutdown & SSL_SENT_SHUTDOWN);
   if (shutdownReceived && shutdownSent) {
diff --git a/lib/cpp/src/thrift/transport/TSocket.h b/lib/cpp/src/thrift/transport/TSocket.h
index 38bd789..427b91f 100644
--- a/lib/cpp/src/thrift/transport/TSocket.h
+++ b/lib/cpp/src/thrift/transport/TSocket.h
@@ -186,7 +186,7 @@
   void setKeepAlive(bool keepAlive);
 
   /**
-   * Get socket information formated as a string <Host: x Port: x>
+   * Get socket information formatted as a string <Host: x Port: x>
    */
   std::string getSocketInfo();
 
diff --git a/lib/cpp/test/TransportTest.cpp b/lib/cpp/test/TransportTest.cpp
index 0305732..451fcef 100644
--- a/lib/cpp/test/TransportTest.cpp
+++ b/lib/cpp/test/TransportTest.cpp
@@ -755,7 +755,7 @@
  * - Combining many tests into a single function makes it more difficult to
  *   tell precisely which tests failed.  It also means you can't get a progress
  *   update after each test, and the tests are already fairly slow.
- * - Similar registration could be acheived with BOOST_TEST_CASE_TEMPLATE,
+ * - Similar registration could be achieved with BOOST_TEST_CASE_TEMPLATE,
  *   but it requires a lot of awkward MPL code, and results in useless test
  *   case names.  (The names are generated from std::type_info::name(), which
  *   is compiler-dependent.  gcc returns mangled names.)
diff --git a/lib/csharp/src/Protocol/TMultiplexedProcessor.cs b/lib/csharp/src/Protocol/TMultiplexedProcessor.cs
index 050b162..35d138c 100644
--- a/lib/csharp/src/Protocol/TMultiplexedProcessor.cs
+++ b/lib/csharp/src/Protocol/TMultiplexedProcessor.cs
@@ -61,7 +61,7 @@
          * Args:
          * - serviceName    Name of a service, has to be identical to the name
          *                  declared in the Thrift IDL, e.g. "WeatherReport".
-         * - processor      Implementation of a service, ususally referred to as "handlers",
+         * - processor      Implementation of a service, usually referred to as "handlers",
          *                  e.g. WeatherReportHandler implementing WeatherReport.Iface.
          */
         public void RegisterProcessor(String serviceName, TProcessor processor)
diff --git a/lib/d/src/thrift/async/libevent.d b/lib/d/src/thrift/async/libevent.d
index 3358bef..967c41f 100644
--- a/lib/d/src/thrift/async/libevent.d
+++ b/lib/d/src/thrift/async/libevent.d
@@ -430,7 +430,7 @@
   Work[][TAsyncTransport] workQueues_;
 
   /// The total number of work items not yet finished (queued and currently
-  /// excecuted) and delays not yet executed.
+  /// executed) and delays not yet executed.
   uint queuedCount_;
 
   /// Protects queuedCount_.
diff --git a/lib/d/src/thrift/base.d b/lib/d/src/thrift/base.d
index 266201b..5de13c5 100644
--- a/lib/d/src/thrift/base.d
+++ b/lib/d/src/thrift/base.d
@@ -43,7 +43,7 @@
   }
 
   /// The exceptions thrown by the children of the operation. If applicable,
-  /// the list is ordered in the same way the exceptions occured.
+  /// the list is ordered in the same way the exceptions occurred.
   Exception[] exceptions;
 }
 
@@ -62,7 +62,7 @@
  * Examples:
  * ---
  * logInfo("An informative message.");
- * logError("Some error occured: %s", e);
+ * logError("Some error occurred: %s", e);
  * ---
  */
 alias logFormatted!g_infoLogSink logInfo;
diff --git a/lib/d/src/thrift/codegen/client.d b/lib/d/src/thrift/codegen/client.d
index 09753da..117b076 100644
--- a/lib/d/src/thrift/codegen/client.d
+++ b/lib/d/src/thrift/codegen/client.d
@@ -192,7 +192,7 @@
         code ~= "oprot_.writeMessageEnd();\n";
         code ~= "oprot_.transport.flush();\n";
 
-        // If this is not a oneway method, generate the recieving code.
+        // If this is not a oneway method, generate the receiving code.
         if (!methodMetaFound || methodMeta.type != TMethodType.ONEWAY) {
           code ~= "TPresultStruct!(Interface, `" ~ methodName ~ "`) result;\n";
 
diff --git a/lib/d/src/thrift/codegen/client_pool.d b/lib/d/src/thrift/codegen/client_pool.d
index ebf5b60..c46b743 100644
--- a/lib/d/src/thrift/codegen/client_pool.d
+++ b/lib/d/src/thrift/codegen/client_pool.d
@@ -205,7 +205,7 @@
           } else {
             // We are dealing with a normal exception thrown by the
             // server-side method, just pass it on. As far as we are
-            // concerned, the method call succeded.
+            // concerned, the method call succeeded.
             pool_.recordSuccess(c);
             throw e;
           }
diff --git a/lib/d/src/thrift/codegen/idlgen.d b/lib/d/src/thrift/codegen/idlgen.d
index 03e9b90..18af1aa 100644
--- a/lib/d/src/thrift/codegen/idlgen.d
+++ b/lib/d/src/thrift/codegen/idlgen.d
@@ -155,10 +155,10 @@
       // the front. Because with the Thrift compiler types can only depend on
       // other types that have already been defined, we collect all the
       // dependencies, prepend them to the list, and then prune the duplicates
-      // (keeping the first occurences). If this requirement should ever be
+      // (keeping the first occurrences). If this requirement should ever be
       // dropped from Thrift, this could be easily adapted to handle circular
       // dependencies by passing TypeTuple!(T, List) to ForAllWithList instead
-      // of appending List afterwards, and removing the now unneccesary
+      // of appending List afterwards, and removing the now unnecessary
       // NoDuplicates.
       alias NoDuplicates!(
         ForAllWithList!(
diff --git a/lib/d/src/thrift/codegen/processor.d b/lib/d/src/thrift/codegen/processor.d
index e6b77fa..5ce7ac6 100644
--- a/lib/d/src/thrift/codegen/processor.d
+++ b/lib/d/src/thrift/codegen/processor.d
@@ -254,7 +254,7 @@
         code ~= "result.set!`success`(" ~ call ~ ");\n";
       }
 
-      // If this is not a oneway method, generate the recieving code.
+      // If this is not a oneway method, generate the receiving code.
       if (!methodMetaFound || methodMeta.type != TMethodType.ONEWAY) {
         if (methodMetaFound) {
           foreach (e; methodMeta.exceptions) {
diff --git a/lib/d/src/thrift/server/base.d b/lib/d/src/thrift/server/base.d
index b56ae66..f97adbe 100644
--- a/lib/d/src/thrift/server/base.d
+++ b/lib/d/src/thrift/server/base.d
@@ -37,7 +37,7 @@
   /**
    * Starts serving.
    *
-   * Blocks until the server finishes, i.e. a serious problem occured or the
+   * Blocks until the server finishes, i.e. a serious problem occurred or the
    * cancellation request has been triggered.
    *
    * Server implementations are expected to implement cancellation in a best-
diff --git a/lib/d/src/thrift/transport/file.d b/lib/d/src/thrift/transport/file.d
index 7c6705a..9aebd82 100644
--- a/lib/d/src/thrift/transport/file.d
+++ b/lib/d/src/thrift/transport/file.d
@@ -246,7 +246,7 @@
     enforce(!isOpen, new TTransportException(
       "Cannot set chunk size after TFileReaderTransport has been opened."));
     enforce(value > EventSize.sizeof, new TTransportException("Chunks must " ~
-      "be large enough to accomodate at least a single byte of payload data."));
+      "be large enough to accommodate at least a single byte of payload data."));
     chunkSize_ = value;
   }
 
diff --git a/lib/d/src/thrift/util/future.d b/lib/d/src/thrift/util/future.d
index 7c127c4..2b32a01 100644
--- a/lib/d/src/thrift/util/future.d
+++ b/lib/d/src/thrift/util/future.d
@@ -316,7 +316,7 @@
 }
 
 /**
- * Creates an interface that is similiar to a given one, but accepts an
+ * Creates an interface that is similar to a given one, but accepts an
  * additional, optional TCancellation parameter each method, and returns
  * TFutures instead of plain return values.
  *
@@ -454,7 +454,7 @@
 
       ++completedCount_;
       if (completedCount_ == futures_.length) {
-        // This was the last future in the list, there is no possiblity
+        // This was the last future in the list, there is no possibility
         // another result could ever become available.
         finished_ = true;
       }
diff --git a/lib/d/src/thrift/util/hashset.d b/lib/d/src/thrift/util/hashset.d
index 3fa466e..ede122e 100644
--- a/lib/d/src/thrift/util/hashset.d
+++ b/lib/d/src/thrift/util/hashset.d
@@ -31,7 +31,7 @@
  * std.container gains something suitable.
  */
 // Note: The funky pointer casts (i.e. *(cast(immutable(E)*)&e) instead of
-// just cast(immutable(E))e) are a workaround for LDC 2 compatibilty.
+// just cast(immutable(E))e) are a workaround for LDC 2 compatibility.
 final class HashSet(E) {
   ///
   this() {}
@@ -88,7 +88,7 @@
 
   ///
   auto opSlice() const {
-    // TODO: Implement using AA key range once availabe in release DMD/druntime
+    // TODO: Implement using AA key range once available in release DMD/druntime
     // to avoid allocation.
     return cast(E[])(aa_.keys);
   }
diff --git a/lib/d/test/async_test.d b/lib/d/test/async_test.d
index 16db51b..f1a0cf3 100644
--- a/lib/d/test/async_test.d
+++ b/lib/d/test/async_test.d
@@ -340,9 +340,9 @@
           if (trace_) writefln(`Calling delayedEcho("%s", 100 ms)...`, id);
           auto a = client.delayedEcho(id, 100);
           enforce(!a.completion.wait(dur!"usecs"(1)),
-            text("wait() succeded early (", a.get(), ", ", id, ")."));
+            text("wait() succeeded early (", a.get(), ", ", id, ")."));
           enforce(!a.completion.wait(dur!"usecs"(1)),
-            text("wait() succeded early (", a.get(), ", ", id, ")."));
+            text("wait() succeeded early (", a.get(), ", ", id, ")."));
           enforce(a.completion.wait(dur!"msecs"(200)),
             text("wait() didn't succeed as expected (", id, ")."));
           enforce(a.get() == id);
@@ -353,9 +353,9 @@
           if (trace_) writefln(`Calling delayedFail("%s", 100 ms)... `, id);
           auto a = client.delayedFail(id, 100);
           enforce(!a.completion.wait(dur!"usecs"(1)),
-            text("wait() succeded early (", id, ", ", collectException(a.get()), ")."));
+            text("wait() succeeded early (", id, ", ", collectException(a.get()), ")."));
           enforce(!a.completion.wait(dur!"usecs"(1)),
-            text("wait() succeded early (", id, ", ", collectException(a.get()), ")."));
+            text("wait() succeeded early (", id, ", ", collectException(a.get()), ")."));
           enforce(a.completion.wait(dur!"msecs"(200)),
             text("wait() didn't succeed as expected (", id, ")."));
           auto e = cast(AsyncTestException)collectException(a.get());
diff --git a/lib/delphi/test/TestClient.pas b/lib/delphi/test/TestClient.pas
index dc39828..9b091ae 100644
--- a/lib/delphi/test/TestClient.pas
+++ b/lib/delphi/test/TestClient.pas
@@ -511,7 +511,7 @@
 
   s := client.testString(HUGE_TEST_STRING);
   Expect( length(s) = length(HUGE_TEST_STRING),
-          'testString( lenght(HUGE_TEST_STRING) = '+IntToStr(Length(HUGE_TEST_STRING))+') '
+          'testString( length(HUGE_TEST_STRING) = '+IntToStr(Length(HUGE_TEST_STRING))+') '
          +'=> length(result) = '+IntToStr(Length(s)));
 
   i8 := client.testByte(1);
diff --git a/lib/delphi/test/skip/README.md b/lib/delphi/test/skip/README.md
index 9975a0b..f349368 100644
--- a/lib/delphi/test/skip/README.md
+++ b/lib/delphi/test/skip/README.md
@@ -3,7 +3,7 @@
 of the same protocol.
 
 The intention of this test is to ensure fully
-working compatibilty features of the Delphi Thrift
+working compatibility features of the Delphi Thrift
 implementation.
 
 The expected test result is, that no errors occur
diff --git a/lib/delphi/test/skip/skiptest_version1.dpr b/lib/delphi/test/skip/skiptest_version1.dpr
index caf3023..ab57ba0 100644
--- a/lib/delphi/test/skip/skiptest_version1.dpr
+++ b/lib/delphi/test/skip/skiptest_version1.dpr
@@ -96,7 +96,7 @@
     client := nil;  // not Free!
     cliRef := nil;
     stm.Free;
-    if client = nil then {warning supressed};
+    if client = nil then {warning suppressed};
   end;
 
   DeleteFile( fname+REQUEST_EXT);
@@ -123,7 +123,7 @@
     client := nil;  // not Free!
     cliRef := nil;
     stm.Free;
-    if client = nil then {warning supressed};
+    if client = nil then {warning suppressed};
   end;
 end;
 
@@ -150,7 +150,7 @@
     server := nil;  // not Free!
     stmIn.Free;
     stmOut.Free;
-    if server = nil then {warning supressed};
+    if server = nil then {warning suppressed};
   end;
 
   DeleteFile( fname+RESPONSE_EXT);
diff --git a/lib/delphi/test/skip/skiptest_version2.dpr b/lib/delphi/test/skip/skiptest_version2.dpr
index 14d6048..ab5d41a 100644
--- a/lib/delphi/test/skip/skiptest_version2.dpr
+++ b/lib/delphi/test/skip/skiptest_version2.dpr
@@ -122,7 +122,7 @@
     client := nil;  // not Free!
     cliRef := nil;
     stm.Free;
-    if client = nil then {warning supressed};
+    if client = nil then {warning suppressed};
   end;
 
   DeleteFile( fname+REQUEST_EXT);
@@ -150,7 +150,7 @@
     client := nil;  // not Free!
     cliRef := nil;
     stm.Free;
-    if client = nil then {warning supressed};
+    if client = nil then {warning suppressed};
   end;
 end;
 
@@ -177,7 +177,7 @@
     server := nil;  // not Free!
     stmIn.Free;
     stmOut.Free;
-    if server = nil then {warning supressed};
+    if server = nil then {warning suppressed};
   end;
 
   DeleteFile( fname+RESPONSE_EXT);
diff --git a/lib/erl/src/thrift_json_parser.erl b/lib/erl/src/thrift_json_parser.erl
index b7dd586..4e47f10 100644
--- a/lib/erl/src/thrift_json_parser.erl
+++ b/lib/erl/src/thrift_json_parser.erl
@@ -219,7 +219,7 @@
 string(<<_/utf8, Rest/binary>>, Handler, Acc, Stack, Config=#config{strict_utf8=false}) ->
     string(Rest, Handler, acc_seq(Acc, 16#fffd), Stack, Config);
 %% u+fffe and u+ffff for R14BXX (subsequent runtimes will happily match the
-%%  preceeding clause
+%%  preceding clause
 string(<<239, 191, X, Rest/binary>>, Handler, Acc, Stack, Config=#config{strict_utf8=false})
         when X == 190; X == 191 ->
     string(Rest, Handler, acc_seq(Acc, 16#fffd), Stack, Config);
diff --git a/lib/go/thrift/compact_protocol.go b/lib/go/thrift/compact_protocol.go
index 0857a7a..ecff814 100644
--- a/lib/go/thrift/compact_protocol.go
+++ b/lib/go/thrift/compact_protocol.go
@@ -298,7 +298,7 @@
 	return NewTProtocolException(err)
 }
 
-// Write a string to the wire with a varint size preceeding.
+// Write a string to the wire with a varint size preceding.
 func (p *TCompactProtocol) WriteString(value string) error {
 	_, e := p.writeVarint32(int32(len(value)))
 	if e != nil {
@@ -678,13 +678,13 @@
 	binary.LittleEndian.PutUint64(buf, uint64(n))
 }
 
-// Writes a byte without any possiblity of all that field header nonsense.
+// Writes a byte without any possibility of all that field header nonsense.
 // Used internally by other writing methods that know they need to write a byte.
 func (p *TCompactProtocol) writeByteDirect(b byte) error {
 	return p.trans.WriteByte(b)
 }
 
-// Writes a byte without any possiblity of all that field header nonsense.
+// Writes a byte without any possibility of all that field header nonsense.
 func (p *TCompactProtocol) writeIntAsByteDirect(n int) (int, error) {
 	return 1, p.writeByteDirect(byte(n))
 }
diff --git a/lib/go/thrift/socket.go b/lib/go/thrift/socket.go
index d5af4f4..5b3944d 100644
--- a/lib/go/thrift/socket.go
+++ b/lib/go/thrift/socket.go
@@ -100,7 +100,7 @@
 	return nil
 }
 
-// Retreive the underlying net.Conn
+// Retrieve the underlying net.Conn
 func (p *TSocket) Conn() net.Conn {
 	return p.conn
 }
diff --git a/lib/go/thrift/ssl_socket.go b/lib/go/thrift/ssl_socket.go
index 943bd90..d28975e 100644
--- a/lib/go/thrift/ssl_socket.go
+++ b/lib/go/thrift/ssl_socket.go
@@ -102,7 +102,7 @@
 	return nil
 }
 
-// Retreive the underlying net.Conn
+// Retrieve the underlying net.Conn
 func (p *TSSLSocket) Conn() net.Conn {
 	return p.conn
 }
diff --git a/lib/haxe/src/org/apache/thrift/protocol/TMultiplexedProcessor.hx b/lib/haxe/src/org/apache/thrift/protocol/TMultiplexedProcessor.hx
index 7354ff4..a4d8237 100644
--- a/lib/haxe/src/org/apache/thrift/protocol/TMultiplexedProcessor.hx
+++ b/lib/haxe/src/org/apache/thrift/protocol/TMultiplexedProcessor.hx
@@ -58,7 +58,7 @@
      * Args:
      * - serviceName    Name of a service, has to be identical to the name
      *                  declared in the Thrift IDL, e.g. "WeatherReport".
-     * - processor      Implementation of a service, ususally referred to as "handlers",
+     * - processor      Implementation of a service, usually referred to as "handlers",
      *                  e.g. WeatherReportHandler implementing WeatherReport.Iface.
      */
     public function RegisterProcessor(serviceName : String, processor : TProcessor, asDefault : Bool = false) : Void {
diff --git a/lib/hs/README.md b/lib/hs/README.md
index fe525bd..c7233f3 100755
--- a/lib/hs/README.md
+++ b/lib/hs/README.md
@@ -89,7 +89,7 @@
   data MyIface = MyIface
 
 and then declare it an instance of each iface class, starting with the superest
-class and proceding down (all the while defining the methods).  Then pass your
+class and proceeding down (all the while defining the methods).  Then pass your
 label to process as the handler.
 
 Processor
diff --git a/lib/java/src/org/apache/thrift/TMultiplexedProcessor.java b/lib/java/src/org/apache/thrift/TMultiplexedProcessor.java
index 0bf4919..f6547ac 100644
--- a/lib/java/src/org/apache/thrift/TMultiplexedProcessor.java
+++ b/lib/java/src/org/apache/thrift/TMultiplexedProcessor.java
@@ -60,7 +60,7 @@
      *
      * @param serviceName Name of a service, has to be identical to the name
      * declared in the Thrift IDL, e.g. "WeatherReport".
-     * @param processor Implementation of a service, ususally referred to
+     * @param processor Implementation of a service, usually referred to
      * as "handlers", e.g. WeatherReportHandler implementing WeatherReport.Iface.
      */
     public void registerProcessor(String serviceName, TProcessor processor) {
diff --git a/lib/java/test/log4j.properties b/lib/java/test/log4j.properties
index 878b2fc..ab9beba 100644
--- a/lib/java/test/log4j.properties
+++ b/lib/java/test/log4j.properties
@@ -1,6 +1,6 @@
 # log4j configuration used during build and unit tests
 log4j.rootLogger=debug,stdout
-log4j.threshhold=ALL
+log4j.threshold=ALL
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
diff --git a/lib/js/src/thrift.js b/lib/js/src/thrift.js
index 7a18206..79c921c 100644
--- a/lib/js/src/thrift.js
+++ b/lib/js/src/thrift.js
@@ -1220,7 +1220,7 @@
 
     /** Returns an object with a value property set to 
      *  False unless the next number in the protocol buffer 
-     *  is 1, in which case teh value property is True */
+     *  is 1, in which case the value property is True */
     readBool: function() {
         var r = this.readI32();
 
diff --git a/lib/js/test/test.js b/lib/js/test/test.js
index 1504f62..59b0876 100755
--- a/lib/js/test/test.js
+++ b/lib/js/test/test.js
@@ -27,7 +27,7 @@
  * Normal and jQuery interfaces. All synchronous tests belong
  * here.
  * 
- * Asynchronous sucess callbacks passed as the last parameter 
+ * Asynchronous success callbacks passed as the last parameter 
  * of an RPC call should be identical in both Normal and jQuery
  * interfaces. Async success tests belong here.
  * 
diff --git a/lib/lua/Thrift.lua b/lib/lua/Thrift.lua
index 6ff8ecb..da5bb63 100644
--- a/lib/lua/Thrift.lua
+++ b/lib/lua/Thrift.lua
@@ -69,7 +69,7 @@
   ONEWAY = 4
 }
 
--- Recursive __index function to achive inheritance
+-- Recursive __index function to achieve inheritance
 function __tobj_index(self, key)
   local v = rawget(self, key)
   if v ~= nil then
diff --git a/lib/nodejs/lib/thrift/web_server.js b/lib/nodejs/lib/thrift/web_server.js
index 5b2ebeb..c575c6d 100644
--- a/lib/nodejs/lib/thrift/web_server.js
+++ b/lib/nodejs/lib/thrift/web_server.js
@@ -293,7 +293,7 @@
     
     //Setup the processor
     if (svcObj.processor instanceof MultiplexedProcessor) {
-      //Multiplex processors have pre embeded processor/handler pairs, save as is
+      //Multiplex processors have pre embedded processor/handler pairs, save as is
       svcObj.processor = svcObj.processor;
     } else {
       //For historical reasons Node.js supports processors passed in directly or via the
@@ -302,7 +302,7 @@
       //  support any of the four possibilities here.
       var processor = (svcObj.processor) ? (svcObj.processor.Processor || svcObj.processor) : 
                                            (svcObj.cls.Processor || svcObj.cls);
-      //Processors can be supplied as constructed objects with handlers already embeded,
+      //Processors can be supplied as constructed objects with handlers already embedded,
       //  if a handler is provided we construct a new processor, if not we use the processor
       //  object directly
       if (svcObj.handler) {
@@ -505,7 +505,7 @@
     try {
       svc = services[Object.keys(services)[0]];
     } catch(e) {
-      socket.write("HTTP/1.1 403 No Apache Thrift Service availible\r\n\r\n");
+      socket.write("HTTP/1.1 403 No Apache Thrift Service available\r\n\r\n");
       return;
     }
     //Perform upgrade
diff --git a/lib/ocaml/README-OCamlMakefile b/lib/ocaml/README-OCamlMakefile
index 0a97c64..57ef019 100644
--- a/lib/ocaml/README-OCamlMakefile
+++ b/lib/ocaml/README-OCamlMakefile
@@ -200,7 +200,7 @@
   of your library using "-noautolink" and add another linkflag that
   links in your C-library explicitly.
 
-What concerns maintainance:
+What concerns maintenance:
 
   "make clean" removes all (all!) automatically generated files - so
   again: make sure your variables are ok!
diff --git a/lib/perl/README.md b/lib/perl/README.md
index 691488b..c48ce25 100644
--- a/lib/perl/README.md
+++ b/lib/perl/README.md
@@ -28,7 +28,7 @@
 Exceptions are thrown with die so be sure to wrap eval{} statments
 around any code that contains exceptions.
 
-The 64bit Integers work only upto 2^42 on my machine :-?
+The 64bit Integers work only up to 2^42 on my machine :-?
 Math::BigInt is probably needed.
 
 Please see tutoral and test dirs for examples...
diff --git a/lib/php/lib/Thrift/TMultiplexedProcessor.php b/lib/php/lib/Thrift/TMultiplexedProcessor.php
index 02b8321..138f95b 100644
--- a/lib/php/lib/Thrift/TMultiplexedProcessor.php
+++ b/lib/php/lib/Thrift/TMultiplexedProcessor.php
@@ -61,7 +61,7 @@
      *
      * @param serviceName Name of a service, has to be identical to the name
      * declared in the Thrift IDL, e.g. "WeatherReport".
-     * @param processor Implementation of a service, ususally referred to
+     * @param processor Implementation of a service, usually referred to
      * as "handlers", e.g. WeatherReportHandler implementing WeatherReport.Iface.
      */
     public function registerProcessor($serviceName, $processor)
diff --git a/lib/py/setup.py b/lib/py/setup.py
index bd177b3..7e0a964 100644
--- a/lib/py/setup.py
+++ b/lib/py/setup.py
@@ -102,7 +102,7 @@
 except BuildFailed:
     print()
     print('*' * 80)
-    print("An error occured while trying to compile with the C extension enabled")
+    print("An error occurred while trying to compile with the C extension enabled")
     print("Attempting to build without the extension now")
     print('*' * 80)
     print()
diff --git a/lib/py/src/protocol/fastbinary.c b/lib/py/src/protocol/fastbinary.c
index 2ce5660..4133e98 100644
--- a/lib/py/src/protocol/fastbinary.c
+++ b/lib/py/src/protocol/fastbinary.c
@@ -332,7 +332,7 @@
 }
 
 
-/* --- MAIN RECURSIVE OUTPUT FUCNTION -- */
+/* --- MAIN RECURSIVE OUTPUT FUNCTION -- */
 
 static int
 output_val(PyObject* output, PyObject* value, TType type, PyObject* typeargs) {
@@ -936,7 +936,7 @@
 }
 
 
-/* --- MAIN RECURSIVE INPUT FUCNTION --- */
+/* --- MAIN RECURSIVE INPUT FUNCTION --- */
 
 // Returns a new reference.
 static PyObject*
diff --git a/lib/py/src/server/TNonblockingServer.py b/lib/py/src/server/TNonblockingServer.py
index 4a035b6..39486cd 100644
--- a/lib/py/src/server/TNonblockingServer.py
+++ b/lib/py/src/server/TNonblockingServer.py
@@ -261,7 +261,7 @@
     def wake_up(self):
         """Wake up main thread.
 
-        The server usualy waits in select call in we should terminate one.
+        The server usually waits in select call in we should terminate one.
         The simplest way is using socketpair.
 
         Select always wait to read from the first socket of socketpair.
diff --git a/lib/ts/thrift.d.ts b/lib/ts/thrift.d.ts
index 470adfe..25ee5b0 100644
--- a/lib/ts/thrift.d.ts
+++ b/lib/ts/thrift.d.ts
@@ -219,7 +219,7 @@
      * Creates a jQuery XHR object to be used for a Thrift server call.
      * @param {object} client - The Thrift Service client object generated by the IDL compiler.
      * @param {object} postData - The message to send to the server.
-     * @param {function} args - The function to call if the request suceeds.
+     * @param {function} args - The function to call if the request succeeds.
      * @param {function} recv_method - The Thrift Service Client receive method for the call.
      * @returns {object} A new jQuery XHR object.
      */
diff --git a/test/DocTest.thrift b/test/DocTest.thrift
index c93ac3b..9d19855 100644
--- a/test/DocTest.thrift
+++ b/test/DocTest.thrift
@@ -155,7 +155,7 @@
 typedef i32 TrivialMultiLine
 
 /**
- * This is the cannonical example
+ * This is the canonical example
  * of a multiline docstring.
  */
 typedef i32 StandardMultiLine
diff --git a/test/README.md b/test/README.md
index 5e3e5d5..a3b75fc 100755
--- a/test/README.md
+++ b/test/README.md
@@ -9,7 +9,7 @@
 with different transports, protocols and languages.
 
 Unit tests for languages ar usually located under lib/<lang>/test/
-cross language tests acording to [ThriftTest.thrift](ThriftTest.thrift) shall be
+cross language tests according to [ThriftTest.thrift](ThriftTest.thrift) shall be
 provided for every language including executables with the following command
 line interface for servers:
 
diff --git a/test/ThriftTest.thrift b/test/ThriftTest.thrift
index 061a570..057db91 100644
--- a/test/ThriftTest.thrift
+++ b/test/ThriftTest.thrift
@@ -172,7 +172,7 @@
   double       testDouble(1: double thing),
 
   /**
-   * Prints 'testStruct("{%s}")' where thing has been formatted into a string of comma seperated values
+   * Prints 'testStruct("{%s}")' where thing has been formatted into a string of comma separated values
    * @param Xtruct thing - the Xtruct to print
    * @return Xtruct - returns the Xtruct 'thing'
    */
@@ -187,7 +187,7 @@
 
   /**
    * Prints 'testMap("{%s")' where thing has been formatted into a string of  'key => value' pairs
-   *  seperated by commas and new lines
+   *  separated by commas and new lines
    * @param map<i32,i32> thing - the map<i32,i32> to print
    * @return map<i32,i32> - returns the map<i32,i32> 'thing'
    */
@@ -195,7 +195,7 @@
 
   /**
    * Prints 'testStringMap("{%s}")' where thing has been formatted into a string of  'key => value' pairs
-   *  seperated by commas and new lines
+   *  separated by commas and new lines
    * @param map<string,string> thing - the map<string,string> to print
    * @return map<string,string> - returns the map<string,string> 'thing'
    */
@@ -203,7 +203,7 @@
 
   /**
    * Prints 'testSet("{%s}")' where thing has been formatted into a string of  values
-   *  seperated by commas and new lines
+   *  separated by commas and new lines
    * @param set<i32> thing - the set<i32> to print
    * @return set<i32> - returns the set<i32> 'thing'
    */
@@ -211,7 +211,7 @@
 
   /**
    * Prints 'testList("{%s}")' where thing has been formatted into a string of  values
-   *  seperated by commas and new lines
+   *  separated by commas and new lines
    * @param list<i32> thing - the list<i32> to print
    * @return list<i32> - returns the list<i32> 'thing'
    */
diff --git a/test/go/src/common/printing_handler.go b/test/go/src/common/printing_handler.go
index e93621f..6cc1507 100644
--- a/test/go/src/common/printing_handler.go
+++ b/test/go/src/common/printing_handler.go
@@ -91,7 +91,7 @@
 	return thing, nil
 }
 
-// Prints 'testStruct("{%s}")' where thing has been formatted into a string of comma seperated values
+// Prints 'testStruct("{%s}")' where thing has been formatted into a string of comma separated values
 // @param Xtruct thing - the Xtruct to print
 // @return Xtruct - returns the Xtruct 'thing'
 //
@@ -115,7 +115,7 @@
 }
 
 // Prints 'testMap("{%s")' where thing has been formatted into a string of  'key => value' pairs
-//  seperated by commas and new lines
+//  separated by commas and new lines
 // @param map<i32,i32> thing - the map<i32,i32> to print
 // @return map<i32,i32> - returns the map<i32,i32> 'thing'
 //
@@ -137,7 +137,7 @@
 }
 
 // Prints 'testStringMap("{%s}")' where thing has been formatted into a string of  'key => value' pairs
-//  seperated by commas and new lines
+//  separated by commas and new lines
 // @param map<string,string> thing - the map<string,string> to print
 // @return map<string,string> - returns the map<string,string> 'thing'
 //
@@ -159,7 +159,7 @@
 }
 
 // Prints 'testSet("{%s}")' where thing has been formatted into a string of  values
-//  seperated by commas and new lines
+//  separated by commas and new lines
 // @param set<i32> thing - the set<i32> to print
 // @return set<i32> - returns the set<i32> 'thing'
 //
@@ -181,7 +181,7 @@
 }
 
 // Prints 'testList("{%s}")' where thing has been formatted into a string of  values
-//  seperated by commas and new lines
+//  separated by commas and new lines
 // @param list<i32> thing - the list<i32> to print
 // @return list<i32> - returns the list<i32> 'thing'
 //
diff --git a/test/haxe/src/TestServerHandler.hx b/test/haxe/src/TestServerHandler.hx
index f067bde..9fc7d14 100644
--- a/test/haxe/src/TestServerHandler.hx
+++ b/test/haxe/src/TestServerHandler.hx
@@ -118,7 +118,7 @@
 
     /**
     * Prints 'testStruct("{%s}")' where thing has been formatted
-    *  into a string of comma seperated values
+    *  into a string of comma separated values
     * @param Xtruct thing - the Xtruct to print
     * @return Xtruct - returns the Xtruct 'thing'
     *
@@ -158,7 +158,7 @@
     /**
     * Prints 'testMap("{%s")' where thing has been formatted
     *  into a string of  'key => value' pairs
-    *  seperated by commas and new lines
+    *  separated by commas and new lines
     * @param map<i32,i32> thing - the map<i32,i32> to print
     * @return map<i32,i32> - returns the map<i32,i32> 'thing'
     *
@@ -183,7 +183,7 @@
     /**
     * Prints 'testStringMap("{%s}")' where thing has been formatted
     *  into a string of  'key => value' pairs
-    *  seperated by commas and new lines
+    *  separated by commas and new lines
     * @param map<string,string> thing - the map<string,string> to print
     * @return map<string,string> - returns the map<string,string> 'thing'
     *
@@ -208,7 +208,7 @@
     /**
     * Prints 'testSet("{%s}")' where thing has been formatted
     *  into a string of  values
-    *  seperated by commas and new lines
+    *  separated by commas and new lines
     * @param set<i32> thing - the set<i32> to print
     * @return set<i32> - returns the set<i32> 'thing'
     *
@@ -233,7 +233,7 @@
     /**
     * Prints 'testList("{%s}")' where thing has been formatted
     *  into a string of  values
-    *  seperated by commas and new lines
+    *  separated by commas and new lines
     * @param list<i32> thing - the list<i32> to print
     * @return list<i32> - returns the list<i32> 'thing'
     *
diff --git a/test/rb/core/transport/test_transport.rb b/test/rb/core/transport/test_transport.rb
index 52755c1..37afa85 100644
--- a/test/rb/core/transport/test_transport.rb
+++ b/test/rb/core/transport/test_transport.rb
@@ -51,7 +51,7 @@
   
   # TODO:
   # This doesn't necessarily test he right thing.
-  # It _looks_ like read isn't guarenteed to return the length
+  # It _looks_ like read isn't guaranteed to return the length
   # you ask for and read_all is. This means our test needs to check
   # for blocking. -- Kevin Clark 3/27/08
   def test_read_all
diff --git a/test/test.py b/test/test.py
index a7e6105..c04ff8d 100644
--- a/test/test.py
+++ b/test/test.py
@@ -42,9 +42,9 @@
     dest="verbose", const=0,
     help="minimal output")
 parser.add_option("--server", type="string", dest="servers", default="",
-    help="list of servers to test seperated by commas, eg:- --server=cpp,java")
+    help="list of servers to test separated by commas, eg:- --server=cpp,java")
 parser.add_option("--client", type="string", dest="clients", default="",
-    help="list of clients to test seperated by commas, eg:- --client=cpp,java")
+    help="list of clients to test separated by commas, eg:- --client=cpp,java")
 parser.set_defaults(verbose=1)
 options, args = parser.parse_args()
 
diff --git a/tutorial/c_glib/c_glib_client.c b/tutorial/c_glib/c_glib_client.c
index 3cea0c2..986d517 100644
--- a/tutorial/c_glib/c_glib_client.c
+++ b/tutorial/c_glib/c_glib_client.c
@@ -77,7 +77,7 @@
      information about any error that occurs.
 
      On success, client methods return TRUE. A return value of FALSE
-     indicates an error occured and the error parameter has been
+     indicates an error occurred and the error parameter has been
      set. */
   if (!error && calculator_if_ping (client, &error)) {
     puts ("ping()");
diff --git a/tutorial/c_glib/c_glib_server.c b/tutorial/c_glib/c_glib_server.c
index 27f9f95..a20ab54 100644
--- a/tutorial/c_glib/c_glib_server.c
+++ b/tutorial/c_glib/c_glib_server.c
@@ -108,7 +108,7 @@
    about any error that occurs.
 
    On success, a handler method returns TRUE. A return value of FALSE
-   indicates an error occured and the error parameter has been
+   indicates an error occurred and the error parameter has been
    set. (Methods should not return FALSE without first setting the
    error parameter.) */
 static gboolean