diff --git a/jni/GifTranscoder.cpp b/jni/GifTranscoder.cpp
index 9169f1b..324d315 100644
--- a/jni/GifTranscoder.cpp
+++ b/jni/GifTranscoder.cpp
@@ -173,7 +173,7 @@
                     return false;
                 }
 
-                // Sanity-check the current image position.
+                // Check the current image position.
                 if (gifIn->Image.Left < 0 ||
                         gifIn->Image.Top < 0 ||
                         gifIn->Image.Left + gifIn->Image.Width > gifIn->SWidth ||
diff --git a/res/values/constants.xml b/res/values/constants.xml
index 8985fd1..e494e95 100644
--- a/res/values/constants.xml
+++ b/res/values/constants.xml
@@ -33,7 +33,7 @@
     <string name="advanced_pref_key" translatable="false">advanced_prefs</string>
 
     <!-- Subscription-specific settings. The values of these pref keys must be prefixed with
-         "buglesub_" to allow for runtime sanity checks -->
+         "buglesub_" to allow for runtime checks -->
     <string name="delivery_reports_pref_key" translatable="false">buglesub_delivery_reports</string>
     <bool name="delivery_reports_pref_default" translatable="false">false</bool>
     <string name="auto_retrieve_mms_pref_key" translatable="false">buglesub_auto_retrieve_mms</string>
diff --git a/src/com/android/messaging/datamodel/DatabaseHelper.java b/src/com/android/messaging/datamodel/DatabaseHelper.java
index ed4a287..486973e 100644
--- a/src/com/android/messaging/datamodel/DatabaseHelper.java
+++ b/src/com/android/messaging/datamodel/DatabaseHelper.java
@@ -49,10 +49,13 @@
         return Integer.parseInt(context.getResources().getString(R.string.database_version));
     }
 
-    /** Table containing names of all other tables and views */
-    private static final String MASTER_TABLE = "sqlite_master";
+    /**
+     * Table containing names of all other tables and views.
+     * TODO(rtenneti): Fix the following special SQLLite table name when SQLLite changes.
+     */
+    private static final String PRIMARY_TABLE = "sqlite_master";
     /** Column containing the name of the tables and views */
-    private static final String[] MASTER_COLUMNS = new String[] { "name", };
+    private static final String[] PRIMARY_COLUMNS = new String[] { "name", };
 
     // Table names
     public static final String CONVERSATIONS_TABLE = "conversations";
@@ -682,7 +685,7 @@
      */
     private static void dropAllTables(final SQLiteDatabase db) {
         final Cursor tableCursor =
-                db.query(MASTER_TABLE, MASTER_COLUMNS, "type='table'", null, null, null, null);
+                db.query(PRIMARY_TABLE, PRIMARY_COLUMNS, "type='table'", null, null, null, null);
         if (tableCursor != null) {
             try {
                 final String dropPrefix = "DROP TABLE IF EXISTS ";
@@ -713,7 +716,7 @@
      */
     private static void dropAllTriggers(final SQLiteDatabase db) {
         final Cursor triggerCursor =
-                db.query(MASTER_TABLE, MASTER_COLUMNS, "type='trigger'", null, null, null, null);
+                db.query(PRIMARY_TABLE, PRIMARY_COLUMNS, "type='trigger'", null, null, null, null);
         if (triggerCursor != null) {
             try {
                 final String dropPrefix = "DROP TRIGGER IF EXISTS ";
@@ -744,7 +747,7 @@
      */
     public static void dropAllViews(final SQLiteDatabase db) {
         final Cursor viewCursor =
-                db.query(MASTER_TABLE, MASTER_COLUMNS, "type='view'", null, null, null, null);
+                db.query(PRIMARY_TABLE, PRIMARY_COLUMNS, "type='view'", null, null, null, null);
         if (viewCursor != null) {
             try {
                 while (viewCursor.moveToNext()) {
@@ -762,7 +765,7 @@
      */
     private static void dropAllIndexes(final SQLiteDatabase db) {
         final Cursor indexCursor =
-                db.query(MASTER_TABLE, MASTER_COLUMNS, "type='index'", null, null, null, null);
+                db.query(PRIMARY_TABLE, PRIMARY_COLUMNS, "type='index'", null, null, null, null);
         if (indexCursor != null) {
             try {
                 final String dropPrefix = "DROP INDEX IF EXISTS ";
diff --git a/src/com/android/messaging/datamodel/data/ConversationData.java b/src/com/android/messaging/datamodel/data/ConversationData.java
index 55d5bfc..704e46f 100644
--- a/src/com/android/messaging/datamodel/data/ConversationData.java
+++ b/src/com/android/messaging/datamodel/data/ConversationData.java
@@ -780,8 +780,8 @@
     }
 
     /**
-     * A dummy implementation of {@link ConversationDataListener} so that subclasses may opt to
-     * implement some, but not all, of the interface methods.
+     * A placeholder implementation of {@link ConversationDataListener} so that subclasses may opt
+     * to implement some, but not all, of the interface methods.
      */
     public static class SimpleConversationDataListener implements ConversationDataListener {
 
diff --git a/src/com/android/messaging/datamodel/media/BindableMediaRequest.java b/src/com/android/messaging/datamodel/media/BindableMediaRequest.java
index 36521d5..d979323 100644
--- a/src/com/android/messaging/datamodel/media/BindableMediaRequest.java
+++ b/src/com/android/messaging/datamodel/media/BindableMediaRequest.java
@@ -19,7 +19,7 @@
 import com.android.messaging.datamodel.media.MediaResourceManager.MediaResourceLoadListener;
 
 /**
- * The {@link MediaRequest} interface is threading-model-blind, allowing the implementations to
+ * The {@link MediaRequest} interface is threading-model-oblivious, allowing the implementations to
  * be processed synchronously or asynchronously.
  * This is a {@link MediaRequest} implementation that includes functionalities such as binding and
  * event callbacks for multi-threaded media request processing.
diff --git a/src/com/android/messaging/datamodel/media/MediaRequest.java b/src/com/android/messaging/datamodel/media/MediaRequest.java
index 703671b..78ae85e 100644
--- a/src/com/android/messaging/datamodel/media/MediaRequest.java
+++ b/src/com/android/messaging/datamodel/media/MediaRequest.java
@@ -21,7 +21,7 @@
  * Keeps track of a media loading request. MediaResourceManager uses this interface to load, encode,
  * decode, and cache different types of media resource.
  *
- * This interface defines a media request class that's threading-model-blind. Wrapper classes
+ * This interface defines a media request class that's threading-model-oblivious. Wrapper classes
  * (such as {@link AsyncMediaRequestWrapper} wraps around any base media request to offer async
  * extensions).
  */
@@ -67,4 +67,4 @@
      * Returns the descriptor defining the request.
      */
     MediaRequestDescriptor<T> getDescriptor();
-}
\ No newline at end of file
+}
diff --git a/src/com/android/messaging/mmslib/pdu/PduComposer.java b/src/com/android/messaging/mmslib/pdu/PduComposer.java
index f318382..ace49d1 100644
--- a/src/com/android/messaging/mmslib/pdu/PduComposer.java
+++ b/src/com/android/messaging/mmslib/pdu/PduComposer.java
@@ -1080,7 +1080,7 @@
             }
 
             if (dataLength != (attachment.getLength() - headerLength)) {
-                throw new RuntimeException("BUG: Length sanity check failed");
+                throw new RuntimeException("BUG: Length check failed");
             }
 
             mStack.pop();
diff --git a/src/com/android/messaging/mmslib/pdu/PduPersister.java b/src/com/android/messaging/mmslib/pdu/PduPersister.java
index 1139aa1..d1175ab 100644
--- a/src/com/android/messaging/mmslib/pdu/PduPersister.java
+++ b/src/com/android/messaging/mmslib/pdu/PduPersister.java
@@ -1440,7 +1440,7 @@
 
         // Save parts first to avoid inconsistent message is loaded
         // while saving the parts.
-        final long dummyId = System.currentTimeMillis(); // Dummy ID of the msg.
+        final long placeholderId = System.currentTimeMillis(); // Placeholder ID of the msg.
 
         // Figure out if this PDU is a text-only message
         boolean textOnly = true;
@@ -1463,7 +1463,7 @@
                 }
                 for (int i = 0; i < partsNum; i++) {
                     final PduPart part = body.getPart(i);
-                    persistPart(part, dummyId, preOpenedFiles);
+                    persistPart(part, placeholderId, preOpenedFiles);
 
                     // If we've got anything besides text/plain or SMIL part, then we've got
                     // an mms message with some other type of attachment.
@@ -1501,14 +1501,14 @@
                 throw new MmsException("persist() failed: return null.");
             }
             // Get the real ID of the PDU and update all parts which were
-            // saved with the dummy ID.
+            // saved with the placeholder ID.
             msgId = ContentUris.parseId(res);
         }
 
         values = new ContentValues(1);
         values.put(Part.MSG_ID, msgId);
         SqliteWrapper.update(mContext, mContentResolver,
-                Uri.parse("content://mms/" + dummyId + "/part"),
+                Uri.parse("content://mms/" + placeholderId + "/part"),
                 values, null, null);
         // We should return the longest URI of the persisted PDU, for
         // example, if input URI is "content://mms/inbox" and the _ID of
diff --git a/src/com/android/messaging/ui/appsettings/ApnEditorActivity.java b/src/com/android/messaging/ui/appsettings/ApnEditorActivity.java
index ae4b2eb..5d19a83 100644
--- a/src/com/android/messaging/ui/appsettings/ApnEditorActivity.java
+++ b/src/com/android/messaging/ui/appsettings/ApnEditorActivity.java
@@ -365,8 +365,8 @@
                 protected Void doInBackground(Void... params) {
                     ContentValues values = new ContentValues();
 
-                    // Add a dummy name "Untitled", if the user exits the screen without adding a
-                    // name but entered other information worth keeping.
+                    // Add a placeholder name "Untitled", if the user exits the screen without
+                    // adding a name but entered other information worth keeping.
                     values.put(Telephony.Carriers.NAME, name.length() < 1 ?
                             getResources().getString(R.string.untitled_apn) : name);
                     values.put(Telephony.Carriers.MMSPROXY, checkNotSet(mMmsProxy.getText()));
diff --git a/src/com/android/messaging/ui/appsettings/SettingsActivity.java b/src/com/android/messaging/ui/appsettings/SettingsActivity.java
index e8c05ec..dc16d0a 100644
--- a/src/com/android/messaging/ui/appsettings/SettingsActivity.java
+++ b/src/com/android/messaging/ui/appsettings/SettingsActivity.java
@@ -46,7 +46,7 @@
 import java.util.List;
 
 /**
- * Shows the "master" settings activity that contains two parts, one for application-wide settings
+ * Shows the "primary" settings activity that contains two parts, one for application-wide settings
  * (dubbed "General settings"), and one or more for per-subscription settings (dubbed "Messaging
  * settings" for single-SIM, and the actual SIM name for multi-SIM). Clicking on either item
  * (e.g. "General settings") will open the detail settings activity (ApplicationSettingsActivity
diff --git a/src/com/android/messaging/util/Trace.java b/src/com/android/messaging/util/Trace.java
index da1e87c..69910f7 100644
--- a/src/com/android/messaging/util/Trace.java
+++ b/src/com/android/messaging/util/Trace.java
@@ -101,7 +101,7 @@
     }
 
     /**
-     * Dummy class that we use if we aren't really tracing.
+     * Placeholder class that we use if we aren't really tracing.
      */
     private static final class TraceShim extends AbstractTrace {
         @Override
diff --git a/tests/src/com/android/messaging/datamodel/action/ActionServiceTest.java b/tests/src/com/android/messaging/datamodel/action/ActionServiceTest.java
index 5eb0f67..8daafb8 100644
--- a/tests/src/com/android/messaging/datamodel/action/ActionServiceTest.java
+++ b/tests/src/com/android/messaging/datamodel/action/ActionServiceTest.java
@@ -80,7 +80,7 @@
     }
 
     /**
-     * For a dummy action verify that the service intent is constructed and queued correctly and
+     * For a chat action verify that the service intent is constructed and queued correctly and
      * that when that intent is processed it actually executes the action.
      */
     public void testChatServiceCreatesIntentAndExecutesAction() {
