Clean up debugger orthography.

Mainly just for ids, and not in the JDWP code. Fixing everything at
once is just not practical.

Change-Id: I06464d5765b33dca65eb3c24bdd8aaf84b9631a5
diff --git a/src/debugger.cc b/src/debugger.cc
index 367d487..deef322 100644
--- a/src/debugger.cc
+++ b/src/debugger.cc
@@ -566,13 +566,13 @@
   }
 }
 
-std::string Dbg::GetClassName(JDWP::RefTypeId classId) {
-  Object* o = gRegistry->Get<Object*>(classId);
+std::string Dbg::GetClassName(JDWP::RefTypeId class_id) {
+  Object* o = gRegistry->Get<Object*>(class_id);
   if (o == NULL) {
     return "NULL";
   }
   if (o == kInvalidObject) {
-    return StringPrintf("invalid object %p", reinterpret_cast<void*>(classId));
+    return StringPrintf("invalid object %p", reinterpret_cast<void*>(class_id));
   }
   if (!o->IsClass()) {
     return StringPrintf("non-class %p", o); // This is only used for debugging output anyway.
@@ -580,17 +580,17 @@
   return DescriptorToName(ClassHelper(o->AsClass()).GetDescriptor());
 }
 
-JDWP::JdwpError Dbg::GetClassObject(JDWP::RefTypeId id, JDWP::ObjectId& classObjectId) {
+JDWP::JdwpError Dbg::GetClassObject(JDWP::RefTypeId id, JDWP::ObjectId& class_object_id) {
   JDWP::JdwpError status;
   Class* c = DecodeClass(id, status);
   if (c == NULL) {
     return status;
   }
-  classObjectId = gRegistry->Add(c);
+  class_object_id = gRegistry->Add(c);
   return JDWP::ERR_NONE;
 }
 
-JDWP::JdwpError Dbg::GetSuperclass(JDWP::RefTypeId id, JDWP::RefTypeId& superclassId) {
+JDWP::JdwpError Dbg::GetSuperclass(JDWP::RefTypeId id, JDWP::RefTypeId& superclass_id) {
   JDWP::JdwpError status;
   Class* c = DecodeClass(id, status);
   if (c == NULL) {
@@ -598,9 +598,9 @@
   }
   if (c->IsInterface()) {
     // http://code.google.com/p/android/issues/detail?id=20856
-    superclassId = 0;
+    superclass_id = 0;
   } else {
-    superclassId = gRegistry->Add(c->GetSuperClass());
+    superclass_id = gRegistry->Add(c->GetSuperClass());
   }
   return JDWP::ERR_NONE;
 }
@@ -632,15 +632,15 @@
   return JDWP::ERR_NONE;
 }
 
-JDWP::JdwpError Dbg::GetReflectedType(JDWP::RefTypeId classId, JDWP::ExpandBuf* pReply) {
+JDWP::JdwpError Dbg::GetReflectedType(JDWP::RefTypeId class_id, JDWP::ExpandBuf* pReply) {
   JDWP::JdwpError status;
-  Class* c = DecodeClass(classId, status);
+  Class* c = DecodeClass(class_id, status);
   if (c == NULL) {
     return status;
   }
 
   expandBufAdd1(pReply, c->IsInterface() ? JDWP::TT_INTERFACE : JDWP::TT_CLASS);
-  expandBufAddRefTypeId(pReply, classId);
+  expandBufAddRefTypeId(pReply, class_id);
   return JDWP::ERR_NONE;
 }
 
@@ -670,9 +670,9 @@
   Runtime::Current()->GetClassLinker()->VisitClasses(ClassListCreator::Visit, &clc);
 }
 
-JDWP::JdwpError Dbg::GetClassInfo(JDWP::RefTypeId classId, JDWP::JdwpTypeTag* pTypeTag, uint32_t* pStatus, std::string* pDescriptor) {
+JDWP::JdwpError Dbg::GetClassInfo(JDWP::RefTypeId class_id, JDWP::JdwpTypeTag* pTypeTag, uint32_t* pStatus, std::string* pDescriptor) {
   JDWP::JdwpError status;
-  Class* c = DecodeClass(classId, status);
+  Class* c = DecodeClass(class_id, status);
   if (c == NULL) {
     return status;
   }
@@ -704,8 +704,8 @@
   }
 }
 
-JDWP::JdwpError Dbg::GetReferenceType(JDWP::ObjectId objectId, JDWP::ExpandBuf* pReply) {
-  Object* o = gRegistry->Get<Object*>(objectId);
+JDWP::JdwpError Dbg::GetReferenceType(JDWP::ObjectId object_id, JDWP::ExpandBuf* pReply) {
+  Object* o = gRegistry->Get<Object*>(object_id);
   if (o == NULL || o == kInvalidObject) {
     return JDWP::ERR_INVALID_OBJECT;
   }
@@ -726,9 +726,9 @@
   return JDWP::ERR_NONE;
 }
 
-JDWP::JdwpError Dbg::GetSignature(JDWP::RefTypeId classId, std::string& signature) {
+JDWP::JdwpError Dbg::GetSignature(JDWP::RefTypeId class_id, std::string& signature) {
   JDWP::JdwpError status;
-  Class* c = DecodeClass(classId, status);
+  Class* c = DecodeClass(class_id, status);
   if (c == NULL) {
     return status;
   }
@@ -736,9 +736,9 @@
   return JDWP::ERR_NONE;
 }
 
-JDWP::JdwpError Dbg::GetSourceFile(JDWP::RefTypeId classId, std::string& result) {
+JDWP::JdwpError Dbg::GetSourceFile(JDWP::RefTypeId class_id, std::string& result) {
   JDWP::JdwpError status;
-  Class* c = DecodeClass(classId, status);
+  Class* c = DecodeClass(class_id, status);
   if (c == NULL) {
     return status;
   }
@@ -746,8 +746,8 @@
   return JDWP::ERR_NONE;
 }
 
-JDWP::JdwpError Dbg::GetObjectTag(JDWP::ObjectId objectId, uint8_t& tag) {
-  Object* o = gRegistry->Get<Object*>(objectId);
+JDWP::JdwpError Dbg::GetObjectTag(JDWP::ObjectId object_id, uint8_t& tag) {
+  Object* o = gRegistry->Get<Object*>(object_id);
   if (o == kInvalidObject) {
     return JDWP::ERR_INVALID_OBJECT;
   }
@@ -785,9 +785,9 @@
   }
 }
 
-JDWP::JdwpError Dbg::GetArrayLength(JDWP::ObjectId arrayId, int& length) {
+JDWP::JdwpError Dbg::GetArrayLength(JDWP::ObjectId array_id, int& length) {
   JDWP::JdwpError status;
-  Array* a = DecodeArray(arrayId, status);
+  Array* a = DecodeArray(array_id, status);
   if (a == NULL) {
     return status;
   }
@@ -795,9 +795,9 @@
   return JDWP::ERR_NONE;
 }
 
-JDWP::JdwpError Dbg::OutputArray(JDWP::ObjectId arrayId, int offset, int count, JDWP::ExpandBuf* pReply) {
+JDWP::JdwpError Dbg::OutputArray(JDWP::ObjectId array_id, int offset, int count, JDWP::ExpandBuf* pReply) {
   JDWP::JdwpError status;
-  Array* a = DecodeArray(arrayId, status);
+  Array* a = DecodeArray(array_id, status);
   if (a == NULL) {
     return status;
   }
@@ -841,11 +841,11 @@
   return JDWP::ERR_NONE;
 }
 
-JDWP::JdwpError Dbg::SetArrayElements(JDWP::ObjectId arrayId, int offset, int count,
+JDWP::JdwpError Dbg::SetArrayElements(JDWP::ObjectId array_id, int offset, int count,
                                       const uint8_t* src)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
   JDWP::JdwpError status;
-  Array* a = DecodeArray(arrayId, status);
+  Array* a = DecodeArray(array_id, status);
   if (a == NULL) {
     return status;
   }
@@ -899,9 +899,9 @@
   return gRegistry->Add(String::AllocFromModifiedUtf8(Thread::Current(), str.c_str()));
 }
 
-JDWP::JdwpError Dbg::CreateObject(JDWP::RefTypeId classId, JDWP::ObjectId& new_object) {
+JDWP::JdwpError Dbg::CreateObject(JDWP::RefTypeId class_id, JDWP::ObjectId& new_object) {
   JDWP::JdwpError status;
-  Class* c = DecodeClass(classId, status);
+  Class* c = DecodeClass(class_id, status);
   if (c == NULL) {
     return status;
   }
@@ -912,10 +912,10 @@
 /*
  * Used by Eclipse's "Display" view to evaluate "new byte[5]" to get "(byte[]) [0, 0, 0, 0, 0]".
  */
-JDWP::JdwpError Dbg::CreateArrayObject(JDWP::RefTypeId arrayClassId, uint32_t length,
+JDWP::JdwpError Dbg::CreateArrayObject(JDWP::RefTypeId array_class_id, uint32_t length,
                                        JDWP::ObjectId& new_array) {
   JDWP::JdwpError status;
-  Class* c = DecodeClass(arrayClassId, status);
+  Class* c = DecodeClass(array_class_id, status);
   if (c == NULL) {
     return status;
   }
@@ -923,11 +923,11 @@
   return JDWP::ERR_NONE;
 }
 
-bool Dbg::MatchType(JDWP::RefTypeId instClassId, JDWP::RefTypeId classId) {
+bool Dbg::MatchType(JDWP::RefTypeId instance_class_id, JDWP::RefTypeId class_id) {
   JDWP::JdwpError status;
-  Class* c1 = DecodeClass(instClassId, status);
+  Class* c1 = DecodeClass(instance_class_id, status);
   CHECK(c1 != NULL);
-  Class* c2 = DecodeClass(classId, status);
+  Class* c2 = DecodeClass(class_id, status);
   CHECK(c2 != NULL);
   return c1->IsAssignableFrom(c2);
 }
@@ -981,9 +981,9 @@
   }
 }
 
-std::string Dbg::GetMethodName(JDWP::RefTypeId, JDWP::MethodId methodId)
+std::string Dbg::GetMethodName(JDWP::RefTypeId, JDWP::MethodId method_id)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
-  AbstractMethod* m = FromMethodId(methodId);
+  AbstractMethod* m = FromMethodId(method_id);
   return MethodHelper(m).GetName();
 }
 
@@ -1037,9 +1037,9 @@
   return slot;
 }
 
-JDWP::JdwpError Dbg::OutputDeclaredFields(JDWP::RefTypeId classId, bool with_generic, JDWP::ExpandBuf* pReply) {
+JDWP::JdwpError Dbg::OutputDeclaredFields(JDWP::RefTypeId class_id, bool with_generic, JDWP::ExpandBuf* pReply) {
   JDWP::JdwpError status;
-  Class* c = DecodeClass(classId, status);
+  Class* c = DecodeClass(class_id, status);
   if (c == NULL) {
     return status;
   }
@@ -1064,10 +1064,10 @@
   return JDWP::ERR_NONE;
 }
 
-JDWP::JdwpError Dbg::OutputDeclaredMethods(JDWP::RefTypeId classId, bool with_generic,
+JDWP::JdwpError Dbg::OutputDeclaredMethods(JDWP::RefTypeId class_id, bool with_generic,
                                            JDWP::ExpandBuf* pReply) {
   JDWP::JdwpError status;
-  Class* c = DecodeClass(classId, status);
+  Class* c = DecodeClass(class_id, status);
   if (c == NULL) {
     return status;
   }
@@ -1092,9 +1092,9 @@
   return JDWP::ERR_NONE;
 }
 
-JDWP::JdwpError Dbg::OutputDeclaredInterfaces(JDWP::RefTypeId classId, JDWP::ExpandBuf* pReply) {
+JDWP::JdwpError Dbg::OutputDeclaredInterfaces(JDWP::RefTypeId class_id, JDWP::ExpandBuf* pReply) {
   JDWP::JdwpError status;
-  Class* c = DecodeClass(classId, status);
+  Class* c = DecodeClass(class_id, status);
   if (c == NULL) {
     return status;
   }
@@ -1108,7 +1108,7 @@
   return JDWP::ERR_NONE;
 }
 
-void Dbg::OutputLineTable(JDWP::RefTypeId, JDWP::MethodId methodId, JDWP::ExpandBuf* pReply)
+void Dbg::OutputLineTable(JDWP::RefTypeId, JDWP::MethodId method_id, JDWP::ExpandBuf* pReply)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
   struct DebugCallbackContext {
     int numItems;
@@ -1122,7 +1122,7 @@
       return true;
     }
   };
-  AbstractMethod* m = FromMethodId(methodId);
+  AbstractMethod* m = FromMethodId(method_id);
   MethodHelper mh(m);
   uint64_t start, end;
   if (m->IsNative()) {
@@ -1151,7 +1151,7 @@
   JDWP::Set4BE(expandBufGetBuffer(pReply) + numLinesOffset, context.numItems);
 }
 
-void Dbg::OutputVariableTable(JDWP::RefTypeId, JDWP::MethodId methodId, bool with_generic, JDWP::ExpandBuf* pReply) {
+void Dbg::OutputVariableTable(JDWP::RefTypeId, JDWP::MethodId method_id, bool with_generic, JDWP::ExpandBuf* pReply) {
   struct DebugCallbackContext {
     JDWP::ExpandBuf* pReply;
     size_t variable_count;
@@ -1176,7 +1176,7 @@
       ++pContext->variable_count;
     }
   };
-  AbstractMethod* m = FromMethodId(methodId);
+  AbstractMethod* m = FromMethodId(method_id);
   MethodHelper mh(m);
   const DexFile::CodeItem* code_item = mh.GetCodeItem();
 
@@ -1200,29 +1200,29 @@
   JDWP::Set4BE(expandBufGetBuffer(pReply) + variable_count_offset, context.variable_count);
 }
 
-JDWP::JdwpTag Dbg::GetFieldBasicTag(JDWP::FieldId fieldId) {
-  return BasicTagFromDescriptor(FieldHelper(FromFieldId(fieldId)).GetTypeDescriptor());
+JDWP::JdwpTag Dbg::GetFieldBasicTag(JDWP::FieldId field_id) {
+  return BasicTagFromDescriptor(FieldHelper(FromFieldId(field_id)).GetTypeDescriptor());
 }
 
-JDWP::JdwpTag Dbg::GetStaticFieldBasicTag(JDWP::FieldId fieldId) {
-  return BasicTagFromDescriptor(FieldHelper(FromFieldId(fieldId)).GetTypeDescriptor());
+JDWP::JdwpTag Dbg::GetStaticFieldBasicTag(JDWP::FieldId field_id) {
+  return BasicTagFromDescriptor(FieldHelper(FromFieldId(field_id)).GetTypeDescriptor());
 }
 
-static JDWP::JdwpError GetFieldValueImpl(JDWP::RefTypeId refTypeId, JDWP::ObjectId objectId,
-                                         JDWP::FieldId fieldId, JDWP::ExpandBuf* pReply,
+static JDWP::JdwpError GetFieldValueImpl(JDWP::RefTypeId ref_type_id, JDWP::ObjectId object_id,
+                                         JDWP::FieldId field_id, JDWP::ExpandBuf* pReply,
                                          bool is_static)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
   JDWP::JdwpError status;
-  Class* c = DecodeClass(refTypeId, status);
-  if (refTypeId != 0 && c == NULL) {
+  Class* c = DecodeClass(ref_type_id, status);
+  if (ref_type_id != 0 && c == NULL) {
     return status;
   }
 
-  Object* o = gRegistry->Get<Object*>(objectId);
+  Object* o = gRegistry->Get<Object*>(object_id);
   if ((!is_static && o == NULL) || o == kInvalidObject) {
     return JDWP::ERR_INVALID_OBJECT;
   }
-  Field* f = FromFieldId(fieldId);
+  Field* f = FromFieldId(field_id);
 
   Class* receiver_class = c;
   if (receiver_class == NULL && o != NULL) {
@@ -1272,23 +1272,23 @@
   return JDWP::ERR_NONE;
 }
 
-JDWP::JdwpError Dbg::GetFieldValue(JDWP::ObjectId objectId, JDWP::FieldId fieldId,
+JDWP::JdwpError Dbg::GetFieldValue(JDWP::ObjectId object_id, JDWP::FieldId field_id,
                                    JDWP::ExpandBuf* pReply) {
-  return GetFieldValueImpl(0, objectId, fieldId, pReply, false);
+  return GetFieldValueImpl(0, object_id, field_id, pReply, false);
 }
 
-JDWP::JdwpError Dbg::GetStaticFieldValue(JDWP::RefTypeId refTypeId, JDWP::FieldId fieldId, JDWP::ExpandBuf* pReply) {
-  return GetFieldValueImpl(refTypeId, 0, fieldId, pReply, true);
+JDWP::JdwpError Dbg::GetStaticFieldValue(JDWP::RefTypeId ref_type_id, JDWP::FieldId field_id, JDWP::ExpandBuf* pReply) {
+  return GetFieldValueImpl(ref_type_id, 0, field_id, pReply, true);
 }
 
-static JDWP::JdwpError SetFieldValueImpl(JDWP::ObjectId objectId, JDWP::FieldId fieldId,
+static JDWP::JdwpError SetFieldValueImpl(JDWP::ObjectId object_id, JDWP::FieldId field_id,
                                          uint64_t value, int width, bool is_static)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
-  Object* o = gRegistry->Get<Object*>(objectId);
+  Object* o = gRegistry->Get<Object*>(object_id);
   if ((!is_static && o == NULL) || o == kInvalidObject) {
     return JDWP::ERR_INVALID_OBJECT;
   }
-  Field* f = FromFieldId(fieldId);
+  Field* f = FromFieldId(field_id);
 
   // The RI only enforces the static/non-static mismatch in one direction.
   // TODO: should we change the tests and check both?
@@ -1332,17 +1332,17 @@
   return JDWP::ERR_NONE;
 }
 
-JDWP::JdwpError Dbg::SetFieldValue(JDWP::ObjectId objectId, JDWP::FieldId fieldId, uint64_t value,
+JDWP::JdwpError Dbg::SetFieldValue(JDWP::ObjectId object_id, JDWP::FieldId field_id, uint64_t value,
                                    int width) {
-  return SetFieldValueImpl(objectId, fieldId, value, width, false);
+  return SetFieldValueImpl(object_id, field_id, value, width, false);
 }
 
-JDWP::JdwpError Dbg::SetStaticFieldValue(JDWP::FieldId fieldId, uint64_t value, int width) {
-  return SetFieldValueImpl(0, fieldId, value, width, true);
+JDWP::JdwpError Dbg::SetStaticFieldValue(JDWP::FieldId field_id, uint64_t value, int width) {
+  return SetFieldValueImpl(0, field_id, value, width, true);
 }
 
-std::string Dbg::StringToUtf8(JDWP::ObjectId strId) {
-  String* s = gRegistry->Get<String*>(strId);
+std::string Dbg::StringToUtf8(JDWP::ObjectId string_id) {
+  String* s = gRegistry->Get<String*>(string_id);
   return s->ToModifiedUtf8();
 }
 
@@ -1397,9 +1397,9 @@
   return JDWP::ERR_NONE;
 }
 
-std::string Dbg::GetThreadGroupName(JDWP::ObjectId threadGroupId) {
+std::string Dbg::GetThreadGroupName(JDWP::ObjectId thread_group_id) {
   ScopedObjectAccess soa(Thread::Current());
-  Object* thread_group = gRegistry->Get<Object*>(threadGroupId);
+  Object* thread_group = gRegistry->Get<Object*>(thread_group_id);
   CHECK(thread_group != NULL);
 
   Class* c = Runtime::Current()->GetClassLinker()->FindSystemClass("Ljava/lang/ThreadGroup;");
@@ -1410,8 +1410,8 @@
   return s->ToModifiedUtf8();
 }
 
-JDWP::ObjectId Dbg::GetThreadGroupParent(JDWP::ObjectId threadGroupId) {
-  Object* thread_group = gRegistry->Get<Object*>(threadGroupId);
+JDWP::ObjectId Dbg::GetThreadGroupParent(JDWP::ObjectId thread_group_id) {
+  Object* thread_group = gRegistry->Get<Object*>(thread_group_id);
   CHECK(thread_group != NULL);
 
   Class* c = Runtime::Current()->GetClassLinker()->FindSystemClass("Ljava/lang/ThreadGroup;");
@@ -1741,9 +1741,9 @@
 struct GetThisVisitor : public StackVisitor {
   GetThisVisitor(const ManagedStack* stack,
                  const std::deque<InstrumentationStackFrame>* instrumentation_stack,
-                 Context* context, JDWP::FrameId frameId)
+                 Context* context, JDWP::FrameId frame_id)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
-      : StackVisitor(stack, instrumentation_stack, context), this_object(NULL), frame_id(frameId) {}
+      : StackVisitor(stack, instrumentation_stack, context), this_object(NULL), frame_id(frame_id) {}
 
   // TODO: Enable annotalysis. We know lock is held in constructor, but abstraction confuses
   // annotalysis.
@@ -1800,15 +1800,15 @@
   return JDWP::ERR_NONE;
 }
 
-void Dbg::GetLocalValue(JDWP::ObjectId thread_id, JDWP::FrameId frameId, int slot, JDWP::JdwpTag tag,
+void Dbg::GetLocalValue(JDWP::ObjectId thread_id, JDWP::FrameId frame_id, int slot, JDWP::JdwpTag tag,
                         uint8_t* buf, size_t width) {
   struct GetLocalVisitor : public StackVisitor {
     GetLocalVisitor(const ManagedStack* stack,
                     const std::deque<InstrumentationStackFrame>* instrumentation_stack,
-                    Context* context, JDWP::FrameId frameId, int slot, JDWP::JdwpTag tag,
+                    Context* context, JDWP::FrameId frame_id, int slot, JDWP::JdwpTag tag,
                     uint8_t* buf, size_t width)
         SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
-        : StackVisitor(stack, instrumentation_stack, context), frame_id_(frameId), slot_(slot), tag_(tag),
+        : StackVisitor(stack, instrumentation_stack, context), frame_id_(frame_id), slot_(slot), tag_(tag),
           buf_(buf), width_(width) {}
 
     // TODO: Enable annotalysis. We know lock is held in constructor, but abstraction confuses
@@ -1937,11 +1937,11 @@
   }
   UniquePtr<Context> context(Context::Create());
   GetLocalVisitor visitor(thread->GetManagedStack(), thread->GetInstrumentationStack(), context.get(),
-                          frameId, slot, tag, buf, width);
+                          frame_id, slot, tag, buf, width);
   visitor.WalkStack();
 }
 
-void Dbg::SetLocalValue(JDWP::ObjectId thread_id, JDWP::FrameId frameId, int slot, JDWP::JdwpTag tag,
+void Dbg::SetLocalValue(JDWP::ObjectId thread_id, JDWP::FrameId frame_id, int slot, JDWP::JdwpTag tag,
                         uint64_t value, size_t width) {
   struct SetLocalVisitor : public StackVisitor {
     SetLocalVisitor(const ManagedStack* stack, const std::deque<InstrumentationStackFrame>* instrumentation_stack, Context* context,
@@ -2025,7 +2025,7 @@
   }
   UniquePtr<Context> context(Context::Create());
   SetLocalVisitor visitor(thread->GetManagedStack(), thread->GetInstrumentationStack(), context.get(),
-                          frameId, slot, tag, value, width);
+                          frame_id, slot, tag, value, width);
   visitor.WalkStack();
 }
 
@@ -2400,8 +2400,8 @@
   }
 }
 
-JDWP::JdwpError Dbg::InvokeMethod(JDWP::ObjectId thread_id, JDWP::ObjectId objectId,
-                                  JDWP::RefTypeId classId, JDWP::MethodId methodId,
+JDWP::JdwpError Dbg::InvokeMethod(JDWP::ObjectId thread_id, JDWP::ObjectId object_id,
+                                  JDWP::RefTypeId class_id, JDWP::MethodId method_id,
                                   uint32_t arg_count, uint64_t* arg_values,
                                   JDWP::JdwpTag* arg_types, uint32_t options,
                                   JDWP::JdwpTag* pResultTag, uint64_t* pResultValue,
@@ -2450,7 +2450,7 @@
     }
 
     JDWP::JdwpError status;
-    Object* receiver = gRegistry->Get<Object*>(objectId);
+    Object* receiver = gRegistry->Get<Object*>(object_id);
     if (receiver == kInvalidObject) {
       return JDWP::ERR_INVALID_OBJECT;
     }
@@ -2461,12 +2461,12 @@
     }
     // TODO: check that 'thread' is actually a java.lang.Thread!
 
-    Class* c = DecodeClass(classId, status);
+    Class* c = DecodeClass(class_id, status);
     if (c == NULL) {
       return status;
     }
 
-    AbstractMethod* m = FromMethodId(methodId);
+    AbstractMethod* m = FromMethodId(method_id);
     if (m->IsStatic() != (receiver == NULL)) {
       return JDWP::ERR_INVALID_METHODID;
     }
diff --git a/src/debugger.h b/src/debugger.h
index 5c625ea..fb70d880 100644
--- a/src/debugger.h
+++ b/src/debugger.h
@@ -125,110 +125,110 @@
    */
   static std::string GetClassName(JDWP::RefTypeId id)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError GetClassObject(JDWP::RefTypeId id, JDWP::ObjectId& classObjectId)
+  static JDWP::JdwpError GetClassObject(JDWP::RefTypeId id, JDWP::ObjectId& class_object_id)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError GetSuperclass(JDWP::RefTypeId id, JDWP::RefTypeId& superclassId)
+  static JDWP::JdwpError GetSuperclass(JDWP::RefTypeId id, JDWP::RefTypeId& superclass_id)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   static JDWP::JdwpError GetClassLoader(JDWP::RefTypeId id, JDWP::ExpandBuf* pReply)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   static JDWP::JdwpError GetModifiers(JDWP::RefTypeId id, JDWP::ExpandBuf* pReply)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError GetReflectedType(JDWP::RefTypeId classId, JDWP::ExpandBuf* pReply)
+  static JDWP::JdwpError GetReflectedType(JDWP::RefTypeId class_id, JDWP::ExpandBuf* pReply)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   static void GetClassList(std::vector<JDWP::RefTypeId>& classes)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError GetClassInfo(JDWP::RefTypeId classId, JDWP::JdwpTypeTag* pTypeTag,
+  static JDWP::JdwpError GetClassInfo(JDWP::RefTypeId class_id, JDWP::JdwpTypeTag* pTypeTag,
                                       uint32_t* pStatus, std::string* pDescriptor)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   static void FindLoadedClassBySignature(const char* descriptor, std::vector<JDWP::RefTypeId>& ids)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError GetReferenceType(JDWP::ObjectId objectId, JDWP::ExpandBuf* pReply);
-  static JDWP::JdwpError GetSignature(JDWP::RefTypeId refTypeId, std::string& signature)
+  static JDWP::JdwpError GetReferenceType(JDWP::ObjectId object_id, JDWP::ExpandBuf* pReply);
+  static JDWP::JdwpError GetSignature(JDWP::RefTypeId ref_type_id, std::string& signature)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError GetSourceFile(JDWP::RefTypeId refTypeId, std::string& source_file)
+  static JDWP::JdwpError GetSourceFile(JDWP::RefTypeId ref_type_id, std::string& source_file)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError GetObjectTag(JDWP::ObjectId objectId, uint8_t& tag)
+  static JDWP::JdwpError GetObjectTag(JDWP::ObjectId object_id, uint8_t& tag)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   static size_t GetTagWidth(JDWP::JdwpTag tag);
 
-  static JDWP::JdwpError GetArrayLength(JDWP::ObjectId arrayId, int& length)
+  static JDWP::JdwpError GetArrayLength(JDWP::ObjectId array_id, int& length)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError OutputArray(JDWP::ObjectId arrayId, int firstIndex, int count,
+  static JDWP::JdwpError OutputArray(JDWP::ObjectId array_id, int offset, int count,
                                      JDWP::ExpandBuf* pReply)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError SetArrayElements(JDWP::ObjectId arrayId, int firstIndex, int count,
+  static JDWP::JdwpError SetArrayElements(JDWP::ObjectId array_id, int offset, int count,
                                           const uint8_t* buf)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
   static JDWP::ObjectId CreateString(const std::string& str)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError CreateObject(JDWP::RefTypeId classId, JDWP::ObjectId& new_object)
+  static JDWP::JdwpError CreateObject(JDWP::RefTypeId class_id, JDWP::ObjectId& new_object)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError CreateArrayObject(JDWP::RefTypeId arrayTypeId, uint32_t length,
+  static JDWP::JdwpError CreateArrayObject(JDWP::RefTypeId array_class_id, uint32_t length,
                                            JDWP::ObjectId& new_array)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
-  static bool MatchType(JDWP::RefTypeId instClassId, JDWP::RefTypeId classId)
+  static bool MatchType(JDWP::RefTypeId instance_class_id, JDWP::RefTypeId class_id)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
   /*
    * Method and Field
    */
-  static std::string GetMethodName(JDWP::RefTypeId refTypeId, JDWP::MethodId id)
+  static std::string GetMethodName(JDWP::RefTypeId ref_type_id, JDWP::MethodId id)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError OutputDeclaredFields(JDWP::RefTypeId refTypeId, bool withGeneric,
+  static JDWP::JdwpError OutputDeclaredFields(JDWP::RefTypeId ref_type_id, bool with_generic,
                                               JDWP::ExpandBuf* pReply)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError OutputDeclaredMethods(JDWP::RefTypeId refTypeId, bool withGeneric,
+  static JDWP::JdwpError OutputDeclaredMethods(JDWP::RefTypeId ref_type_id, bool with_generic,
                                                JDWP::ExpandBuf* pReply)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError OutputDeclaredInterfaces(JDWP::RefTypeId refTypeId,
+  static JDWP::JdwpError OutputDeclaredInterfaces(JDWP::RefTypeId ref_type_id,
                                                   JDWP::ExpandBuf* pReply)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static void OutputLineTable(JDWP::RefTypeId refTypeId, JDWP::MethodId methodId,
+  static void OutputLineTable(JDWP::RefTypeId ref_type_id, JDWP::MethodId method_id,
                               JDWP::ExpandBuf* pReply)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static void OutputVariableTable(JDWP::RefTypeId refTypeId, JDWP::MethodId id, bool withGeneric,
+  static void OutputVariableTable(JDWP::RefTypeId ref_type_id, JDWP::MethodId id, bool with_generic,
                                   JDWP::ExpandBuf* pReply)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
-  static JDWP::JdwpTag GetFieldBasicTag(JDWP::FieldId fieldId)
+  static JDWP::JdwpTag GetFieldBasicTag(JDWP::FieldId field_id)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpTag GetStaticFieldBasicTag(JDWP::FieldId fieldId)
+  static JDWP::JdwpTag GetStaticFieldBasicTag(JDWP::FieldId field_id)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);;
-  static JDWP::JdwpError GetFieldValue(JDWP::ObjectId objectId, JDWP::FieldId fieldId,
+  static JDWP::JdwpError GetFieldValue(JDWP::ObjectId object_id, JDWP::FieldId field_id,
                                        JDWP::ExpandBuf* pReply)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError SetFieldValue(JDWP::ObjectId objectId, JDWP::FieldId fieldId,
+  static JDWP::JdwpError SetFieldValue(JDWP::ObjectId object_id, JDWP::FieldId field_id,
                                        uint64_t value, int width)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError GetStaticFieldValue(JDWP::RefTypeId refTypeId, JDWP::FieldId fieldId,
+  static JDWP::JdwpError GetStaticFieldValue(JDWP::RefTypeId ref_type_id, JDWP::FieldId field_id,
                                              JDWP::ExpandBuf* pReply)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError SetStaticFieldValue(JDWP::FieldId fieldId, uint64_t value, int width)
+  static JDWP::JdwpError SetStaticFieldValue(JDWP::FieldId field_id, uint64_t value, int width)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
-  static std::string StringToUtf8(JDWP::ObjectId strId)
+  static std::string StringToUtf8(JDWP::ObjectId string_id)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
   /*
    * Thread, ThreadGroup, Frame
    */
-  static JDWP::JdwpError GetThreadName(JDWP::ObjectId threadId, std::string& name)
+  static JDWP::JdwpError GetThreadName(JDWP::ObjectId thread_id, std::string& name)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
       LOCKS_EXCLUDED(Locks::thread_list_lock_);
-  static JDWP::JdwpError GetThreadGroup(JDWP::ObjectId threadId, JDWP::ExpandBuf* pReply);
-  static std::string GetThreadGroupName(JDWP::ObjectId threadGroupId);
-  static JDWP::ObjectId GetThreadGroupParent(JDWP::ObjectId threadGroupId)
+  static JDWP::JdwpError GetThreadGroup(JDWP::ObjectId thread_id, JDWP::ExpandBuf* pReply);
+  static std::string GetThreadGroupName(JDWP::ObjectId thread_group_id);
+  static JDWP::ObjectId GetThreadGroupParent(JDWP::ObjectId thread_group_id)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   static JDWP::ObjectId GetSystemThreadGroupId()
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   static JDWP::ObjectId GetMainThreadGroupId();
 
-  static JDWP::JdwpError GetThreadStatus(JDWP::ObjectId threadId, JDWP::JdwpThreadStatus* pThreadStatus, JDWP::JdwpSuspendStatus* pSuspendStatus);
-  static JDWP::JdwpError GetThreadDebugSuspendCount(JDWP::ObjectId threadId, JDWP::ExpandBuf* pReply);
-  static JDWP::JdwpError IsSuspended(JDWP::ObjectId threadId, bool& result);
-  //static void WaitForSuspend(JDWP::ObjectId threadId);
+  static JDWP::JdwpError GetThreadStatus(JDWP::ObjectId thread_id, JDWP::JdwpThreadStatus* pThreadStatus, JDWP::JdwpSuspendStatus* pSuspendStatus);
+  static JDWP::JdwpError GetThreadDebugSuspendCount(JDWP::ObjectId thread_id, JDWP::ExpandBuf* pReply);
+  static JDWP::JdwpError IsSuspended(JDWP::ObjectId thread_id, bool& result);
+  //static void WaitForSuspend(JDWP::ObjectId thread_id);
 
   // Fills 'thread_ids' with the threads in the given thread group. If thread_group_id == 0,
   // returns all threads.
@@ -237,7 +237,7 @@
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
   static void GetChildThreadGroups(JDWP::ObjectId thread_group_id, std::vector<JDWP::ObjectId>& child_thread_group_ids);
 
-  static JDWP::JdwpError GetThreadFrameCount(JDWP::ObjectId threadId, size_t& result);
+  static JDWP::JdwpError GetThreadFrameCount(JDWP::ObjectId thread_id, size_t& result);
   static JDWP::JdwpError GetThreadFrames(JDWP::ObjectId thread_id, size_t start_frame,
                                          size_t frame_count, JDWP::ExpandBuf* buf)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
@@ -248,12 +248,12 @@
       LOCKS_EXCLUDED(Locks::thread_list_lock_,
                      Locks::thread_suspend_count_lock_);
   static void ResumeVM();
-  static JDWP::JdwpError SuspendThread(JDWP::ObjectId threadId, bool request_suspension = true)
+  static JDWP::JdwpError SuspendThread(JDWP::ObjectId thread_id, bool request_suspension = true)
       LOCKS_EXCLUDED(Locks::mutator_lock_,
                      Locks::thread_list_lock_,
                      Locks::thread_suspend_count_lock_);
 
-  static void ResumeThread(JDWP::ObjectId threadId)
+  static void ResumeThread(JDWP::ObjectId thread_id)
       LOCKS_EXCLUDED(Locks::thread_list_lock_,
                      Locks::thread_suspend_count_lock_)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
@@ -264,10 +264,10 @@
       LOCKS_EXCLUDED(Locks::thread_list_lock_,
                      Locks::thread_suspend_count_lock_)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static void GetLocalValue(JDWP::ObjectId threadId, JDWP::FrameId frameId, int slot,
+  static void GetLocalValue(JDWP::ObjectId thread_id, JDWP::FrameId frame_id, int slot,
                             JDWP::JdwpTag tag, uint8_t* buf, size_t expectedLen)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static void SetLocalValue(JDWP::ObjectId threadId, JDWP::FrameId frameId, int slot,
+  static void SetLocalValue(JDWP::ObjectId thread_id, JDWP::FrameId frame_id, int slot,
                             JDWP::JdwpTag tag, uint64_t value, size_t width)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
@@ -303,14 +303,14 @@
   static void UnwatchLocation(const JDWP::JdwpLocation* pLoc)
       LOCKS_EXCLUDED(Locks::breakpoint_lock_)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static JDWP::JdwpError ConfigureStep(JDWP::ObjectId threadId, JDWP::JdwpStepSize size,
+  static JDWP::JdwpError ConfigureStep(JDWP::ObjectId thread_id, JDWP::JdwpStepSize size,
                                        JDWP::JdwpStepDepth depth)
       LOCKS_EXCLUDED(Locks::breakpoint_lock_)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-  static void UnconfigureStep(JDWP::ObjectId threadId) LOCKS_EXCLUDED(Locks::breakpoint_lock_);
+  static void UnconfigureStep(JDWP::ObjectId thread_id) LOCKS_EXCLUDED(Locks::breakpoint_lock_);
 
-  static JDWP::JdwpError InvokeMethod(JDWP::ObjectId threadId, JDWP::ObjectId objectId,
-                                      JDWP::RefTypeId classId, JDWP::MethodId methodId,
+  static JDWP::JdwpError InvokeMethod(JDWP::ObjectId thread_id, JDWP::ObjectId object_id,
+                                      JDWP::RefTypeId class_id, JDWP::MethodId method_id,
                                       uint32_t arg_count, uint64_t* arg_values,
                                       JDWP::JdwpTag* arg_types, uint32_t options,
                                       JDWP::JdwpTag* pResultTag, uint64_t* pResultValue,