changeset 52517:52be2c714a2f

8212939: Add space after if/while/for/switch and parenthesis Summary: Add spaces where needed Reviewed-by: cjplummer, sspitsyn
author jcbeyler
date Mon, 12 Nov 2018 13:13:00 -0800
parents 710e5a66a64e
children 13f0aac77d60
files test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn004/libforceEarlyReturn004a.cpp test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn005/libforceEarlyReturn005a.cpp test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn002/libforceEarlyReturn002a.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/attach008Agent00.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach041/attach041Agent00.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach042/attach042Agent00.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/Breakpoint/breakpoint001/breakpoint001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassLoad/classload001/classload001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/abort/Abort.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/callbacks/Callbacks.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/concrete-klass-filter/ConcreteKlassFilter.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/HeapFilter.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/non-concrete-klass-filter/NonConcreteKlassFilter.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe002/popframe002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe005/popframe005.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe011/popframe011.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass006/redefclass006.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass028/redefclass028.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass029/redefclass029.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass030/redefclass030.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform003/retransform003.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetJNIFunctionTable/setjniftab001/setjniftab001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP11/ap11t001/ap11t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS103/hs103t002/hs103t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS104/hs104t002/hs104t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t002/hs203t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t002/hs204t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t003/hs204t003.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t002/ji03t002.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/ji05t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI06/ji06t001/ji06t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA05/ma05t001/ma05t001.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA05/ma05t001/ma05t001a.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/timers/JvmtiTest/JvmtiTest.cpp test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/ThreadController.cpp test/hotspot/jtreg/vmTestbase/nsk/share/JVMTIagent.cpp test/hotspot/jtreg/vmTestbase/nsk/share/aod/aod.cpp test/hotspot/jtreg/vmTestbase/nsk/share/jdi/MonitorEnterExecutor.cpp test/hotspot/jtreg/vmTestbase/nsk/share/jni/JNIreferences.cpp test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/Injector.cpp test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/aod/jvmti_aod.cpp test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.cpp test/hotspot/jtreg/vmTestbase/nsk/share/locks/JNIMonitorLocker.cpp test/hotspot/jtreg/vmTestbase/nsk/share/locks/LockingThread.cpp test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress001.cpp test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress003.cpp test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress004.cpp test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress005.cpp
diffstat 49 files changed, 314 insertions(+), 314 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn004/libforceEarlyReturn004a.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn004/libforceEarlyReturn004a.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -38,7 +38,7 @@
     env->SetBooleanField(object, field, 1);
 
     // execute infinite loop to be sure that thread in native method
-    while(always_true)
+    while (always_true)
     {
         // Need some dummy code so the optimizer does not remove this loop.
         dummy_counter = dummy_counter < 1000 ? 0 : dummy_counter + 1;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn005/libforceEarlyReturn005a.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn005/libforceEarlyReturn005a.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -32,7 +32,7 @@
 {
         jint success  = env->MonitorEnter(object);
 
-        if(success != 0)
+        if (success != 0)
         {
                 NSK_COMPLAIN1("MonitorEnter return non-zero: %d\n", success);
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn002/libforceEarlyReturn002a.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn002/libforceEarlyReturn002a.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -38,7 +38,7 @@
     env->SetBooleanField(object, field, 1);
 
     // execute infinite loop to be sure that thread in native method
-    while(always_true)
+    while (always_true)
     {
         // Need some dummy code so the optimizer does not remove this loop.
         dummy_counter = dummy_counter < 1000 ? 0 : dummy_counter + 1;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/attach008Agent00.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/attach008Agent00.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -73,7 +73,7 @@
         jobject object) {
     char threadName[MAX_STRING_LENGTH];
 
-    if(!nsk_jvmti_aod_getThreadName(jvmti, thread, threadName)) {
+    if (!nsk_jvmti_aod_getThreadName(jvmti, thread, threadName)) {
         nsk_jvmti_aod_disableEventsAndFinish(agentName, testEvents, testEventsNumber, 0, jvmti, jni);
         return;
     }
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach041/attach041Agent00.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach041/attach041Agent00.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -52,7 +52,7 @@
     int i;
     char threadGroupName[MAX_STRING_LENGTH];
 
-    if(!NSK_JVMTI_VERIFY(jvmti->GetThreadGroupInfo(group, &groupInfo))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->GetThreadGroupInfo(group, &groupInfo))) {
         return 0;
     }
 
@@ -61,7 +61,7 @@
 
     NSK_DISPLAY3("%s: trying to find thread '%s' in group '%s'\n", agentName, threadNameToFind, threadGroupName);
 
-    if(!NSK_JVMTI_VERIFY(jvmti->GetThreadGroupChildren(group, &threadsCount, &threads, &groupsCount, &groups))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->GetThreadGroupChildren(group, &threadsCount, &threads, &groupsCount, &groups))) {
         return 0;
     }
 
@@ -118,7 +118,7 @@
         jthreadGroup *topGroups;
         int i;
 
-        if(!NSK_JVMTI_VERIFY(jvmti->GetTopThreadGroups(&groupsCount, &topGroups))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->GetTopThreadGroups(&groupsCount, &topGroups))) {
             NSK_COMPLAIN1("%s: failed to get top thread groups\n", agentName);
             nsk_jvmti_aod_disableEventAndFinish(agentName, JVMTI_EVENT_THREAD_START, 0, jvmti, jni);
             return;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach042/attach042Agent00.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach042/attach042Agent00.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -48,7 +48,7 @@
         jthread thread) {
     char startedThreadName[MAX_STRING_LENGTH];
 
-    if(!nsk_jvmti_aod_getThreadName(jvmti, thread, startedThreadName)) {
+    if (!nsk_jvmti_aod_getThreadName(jvmti, thread, startedThreadName)) {
         nsk_jvmti_aod_disableEventAndFinish(agentName, JVMTI_EVENT_THREAD_START, 0, jvmti, jni);
         return;
     }
@@ -62,7 +62,7 @@
         int i;
         int startedThreadWasFound = 0;
 
-        if(!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threadsCount, &threads))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threadsCount, &threads))) {
             NSK_COMPLAIN1("%s: failed to get all threads\n", agentName);
             nsk_jvmti_aod_disableEventAndFinish(agentName, JVMTI_EVENT_THREAD_START, 0, jvmti, jni);
             return;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Breakpoint/breakpoint001/breakpoint001.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Breakpoint/breakpoint001/breakpoint001.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -58,7 +58,7 @@
 static void initCounters() {
     int i;
 
-    for(i=0; i<METH_NUM; i++)
+    for (i=0; i<METH_NUM; i++)
         bpEvents[i] = 0;
 }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassLoad/classload001/classload001.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassLoad/classload001/classload001.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -79,10 +79,10 @@
 static void initCounters() {
     size_t i;
 
-    for(i=0; i<EXP_SIG_NUM; i++)
+    for (i=0; i<EXP_SIG_NUM; i++)
         clsEvents[i] = 0;
 
-    for(i=0; i<UNEXP_SIG_NUM; i++)
+    for (i=0; i<UNEXP_SIG_NUM; i++)
         primClsEvents[i] = 0;
 }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/abort/Abort.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/abort/Abort.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -81,10 +81,10 @@
   int invocations = 0;
 
   NSK_DISPLAY0("Waiting debugee.\n");
-  if(!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, &event, NULL))) {
+  if (!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, &event, NULL))) {
     return;
   }
-  if(!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
+  if (!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
     return;
   }
 
@@ -95,18 +95,18 @@
   primitive_callbacks.heap_iteration_callback = &heap_callback;
 
   NSK_DISPLAY0("Iterating over reachable objects.\n");
-  if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, NULL, &primitive_callbacks, &invocations))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, NULL, &primitive_callbacks, &invocations))) {
     nsk_jvmti_setFailStatus();
     return;
   }
 
-  if(invocations != 1) {
+  if (invocations != 1) {
     NSK_COMPLAIN1("Primitive callbacks were invoked more than once: "
                   "%d invocations registered.\n",invocations);
     nsk_jvmti_setFailStatus();
   }
 
-  if(!NSK_VERIFY(nsk_jvmti_resumeSync()))
+  if (!NSK_VERIFY(nsk_jvmti_resumeSync()))
     return;
 }
 
@@ -139,12 +139,12 @@
   caps.can_tag_objects = 1;
   caps.can_generate_object_free_events = 1;
 
-  if(!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
     return JNI_ERR;
   }
 
   memset(&event_callbacks, 0, sizeof(jvmtiEventCallbacks));
-  if(!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) {
     return JNI_ERR;
   }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/callbacks/Callbacks.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/callbacks/Callbacks.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -111,25 +111,25 @@
 
 // Check if the signature is signature of primitive type.
 jboolean is_primitive_type(const char *signature) {
-  if(!strcmp(signature,"C")
-     || !strcmp(signature, "B")
-     || !strcmp(signature, "S")
-     || !strcmp(signature, "I")
-     || !strcmp(signature, "J")
-     || !strcmp(signature, "F")
-     || !strcmp(signature, "D")
-     || !strcmp(signature, "Z"))
+  if (!strcmp(signature,"C")
+      || !strcmp(signature, "B")
+      || !strcmp(signature, "S")
+      || !strcmp(signature, "I")
+      || !strcmp(signature, "J")
+      || !strcmp(signature, "F")
+      || !strcmp(signature, "D")
+      || !strcmp(signature, "Z"))
     return JNI_TRUE;
   return JNI_FALSE;
 }
 
 // For given signature find expected tag type
 int get_tag_type(const char *signature) {
-  if(is_primitive_type(signature)) {
+  if (is_primitive_type(signature)) {
     return TAG_TYPE_PRIMITIVE;
-  } else if(signature[0]=='[' && is_primitive_type(signature+1)) {
+  } else if (signature[0]=='[' && is_primitive_type(signature+1)) {
     return TAG_TYPE_ARRAY;
-  } else if(!strcmp(signature, "Ljava/lang/String;")) {
+  } else if (!strcmp(signature, "Ljava/lang/String;")) {
     return TAG_TYPE_STRING;
   } else {
     return TAG_TYPE_OBJECT;
@@ -141,7 +141,7 @@
   * Returns 0 if value matched with expected.
   */
 jboolean verify_value(jvalue value, jvmtiPrimitiveType type) {
-  switch(type) {
+  switch (type) {
   case JVMTI_PRIMITIVE_TYPE_BOOLEAN:
     return value.z==BOOLEAN;
   case JVMTI_PRIMITIVE_TYPE_BYTE:
@@ -167,7 +167,7 @@
 // Check that array values are correct depending on type of elements
 jboolean verify_array(const void *array, jvmtiPrimitiveType type, jint length) {
   void *expected_array;
-  switch(type) {
+  switch (type) {
   case JVMTI_PRIMITIVE_TYPE_BOOLEAN:
     expected_array = (void*)BOOLEAN_ARRAY;
     break;
@@ -210,11 +210,11 @@
   tag = *object_tag_ptr;
 
   // skip all non-tagged fields as well as fields of tagged objects
-  if(tag == 0 ||
-     DECODE_TYPE(tag) == TAG_TYPE_OBJECT ||
-     DECODE_TYPE(tag) == TAG_TYPE_STRING) {
+  if (tag == 0 ||
+      DECODE_TYPE(tag) == TAG_TYPE_OBJECT ||
+      DECODE_TYPE(tag) == TAG_TYPE_STRING) {
     return 0;
-  } else if(DECODE_TYPE(tag) != TAG_TYPE_PRIMITIVE) {
+  } else if (DECODE_TYPE(tag) != TAG_TYPE_PRIMITIVE) {
     NSK_COMPLAIN3("jvmtiPrimitiveFieldCallback was invoked for an object with "
                   "non-primitive field tag (0x%lX) corresponging to %s::%s.\n",
                   DECODE_TYPE(tag),
@@ -226,7 +226,7 @@
 
   objects_info[DECODE_OBJECT(tag)].fields[info->field.index].found++;
 
-  if(!verify_value(value, value_type)) {
+  if (!verify_value(value, value_type)) {
     NSK_COMPLAIN2("Field %s::%s has unexpected value.\n",
                   objects_info[DECODE_OBJECT(tag)].name,
                   objects_info[DECODE_OBJECT(tag)].fields[info->field.index].name);
@@ -245,9 +245,9 @@
   int i;
 
   //skip all untegged strings
-  if(*tag_ptr==0) {
+  if (*tag_ptr==0) {
     return 0;
-  } else if(DECODE_TYPE(*tag_ptr) != TAG_TYPE_STRING) {
+  } else if (DECODE_TYPE(*tag_ptr) != TAG_TYPE_STRING) {
     NSK_COMPLAIN2("jvmtiStringPrimitiveValueCallback was invoked for an object "
                   "with non-string tag corresponding to %s::%s.\n",
                   objects_info[DECODE_OBJECT(*tag_ptr)].name,
@@ -258,7 +258,7 @@
   objects_info[DECODE_OBJECT(*tag_ptr)].fields[DECODE_FIELD(*tag_ptr)].found++;
 
   //check that reported length is the same as expected
-  if(value_length != (jint) wcslen(STRING)) {
+  if (value_length != (jint) wcslen(STRING)) {
     NSK_COMPLAIN4("Length of reported string %s::%s is %d while %d is expected.\n",
                   objects_info[DECODE_OBJECT(*tag_ptr)].name,
                   objects_info[DECODE_OBJECT(*tag_ptr)].fields[DECODE_FIELD(*tag_ptr)].name,
@@ -269,11 +269,11 @@
   }
 
   //compare reported value with expected one
-  for(i = 0; i<value_length && matched; i++) {
+  for (i = 0; i<value_length && matched; i++) {
     matched = value[i] == STRING[i];
   }
 
-  if(!matched) {
+  if (!matched) {
     NSK_COMPLAIN2("Value of field %s::%s has unexpected value.\n",
                   objects_info[DECODE_OBJECT(*tag_ptr)].name,
                   objects_info[DECODE_OBJECT(*tag_ptr)].fields[DECODE_FIELD(*tag_ptr)].name);
@@ -291,9 +291,9 @@
                             const void* elements,
                             void* user_data) {
   //skip untegged arrays
-  if(*tag_ptr == 0) {
+  if (*tag_ptr == 0) {
     return 0;
-  } else if(DECODE_TYPE(*tag_ptr) != TAG_TYPE_ARRAY) {
+  } else if (DECODE_TYPE(*tag_ptr) != TAG_TYPE_ARRAY) {
     NSK_COMPLAIN2("jvmtiArrayPrimitiveValueCallbak was invoked for object "
                   "with non-array tag corresponding to %s::%s.\n",
                   objects_info[DECODE_OBJECT(*tag_ptr)].name,
@@ -305,14 +305,14 @@
   objects_info[DECODE_OBJECT(*tag_ptr)].fields[DECODE_FIELD(*tag_ptr)].found++;
 
   //check if reported length is the same as expected
-  if(element_count != ARRAY_LENGTH) {
+  if (element_count != ARRAY_LENGTH) {
     NSK_COMPLAIN4("Length of array %s::%s is %d while %d is expected.\n",
                   objects_info[DECODE_OBJECT(*tag_ptr)].name,
                   objects_info[DECODE_OBJECT(*tag_ptr)].fields[DECODE_FIELD(*tag_ptr)].name,
                   element_count,
                   ARRAY_LENGTH);
     nsk_jvmti_setFailStatus();
-  } else if(!verify_array(elements, element_type, element_count)) {
+  } else if (!verify_array(elements, element_type, element_count)) {
     //compare array with expected one
     NSK_COMPLAIN2("Value of field %s::%s has unexpected value.\n",
                   objects_info[DECODE_OBJECT(*tag_ptr)].name,
@@ -328,11 +328,11 @@
                            jint length,
                            void* user_data) {
   //skip untagged objects
-  if(*tag_ptr == 0) {
+  if (*tag_ptr == 0) {
     return 0;
   }
 
-  if(DECODE_TYPE(*tag_ptr) != TAG_TYPE_PRIMITIVE) {
+  if (DECODE_TYPE(*tag_ptr) != TAG_TYPE_PRIMITIVE) {
     objects_info[DECODE_OBJECT(*tag_ptr)].fields[DECODE_FIELD(*tag_ptr)].found++;
   }
 
@@ -341,7 +341,7 @@
 
 JNIEXPORT void JNICALL
 object_free_callback(jvmtiEnv* jvmti, jlong tag) {
-  if(DECODE_TYPE(tag)==TAG_TYPE_PRIMITIVE) {
+  if (DECODE_TYPE(tag)==TAG_TYPE_PRIMITIVE) {
     int object = DECODE_OBJECT(tag);
     objects_info[object].collected = 1;
     NSK_DISPLAY1("Object %s collected.\n",
@@ -368,69 +368,69 @@
   jobjectArray testObjects;
   int object;
 
-  if(!NSK_VERIFY(NULL != (debugee = jni->FindClass(className))))
+  if (!NSK_VERIFY(NULL != (debugee = jni->FindClass(className))))
     return JNI_ERR;
 
-  if(!NSK_VERIFY(NULL != (testObjectsField = jni->GetStaticFieldID(debugee, fieldName, fieldSig))))
+  if (!NSK_VERIFY(NULL != (testObjectsField = jni->GetStaticFieldID(debugee, fieldName, fieldSig))))
     return JNI_ERR;
 
-  if(!NSK_VERIFY(NULL != (testObjects = (jobjectArray)(jni->GetStaticObjectField(
+  if (!NSK_VERIFY(NULL != (testObjects = (jobjectArray)(jni->GetStaticObjectField(
           debugee, testObjectsField)))))
     return JNI_ERR;
 
   // For each of test objects tag every field
-  for(object = 0; object<TEST_OBJECTS_COUNT; object++) {
+  for (object = 0; object<TEST_OBJECTS_COUNT; object++) {
     jobject target;
     jclass targetClass;
     jfieldID *targetFields;
     jint field;
 
     memset(&objects_info[object],0,sizeof(object_info_t));
-    if(!NSK_VERIFY(NULL != (target = jni->GetObjectArrayElement(testObjects, object))))
+    if (!NSK_VERIFY(NULL != (target = jni->GetObjectArrayElement(testObjects, object))))
       return JNI_ERR;
 
-    if(!NSK_VERIFY(NULL != (targetClass = jni->GetObjectClass(target))))
+    if (!NSK_VERIFY(NULL != (targetClass = jni->GetObjectClass(target))))
       return JNI_ERR;
 
-    if(!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(targetClass, &(objects_info[object].name), NULL)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(targetClass, &(objects_info[object].name), NULL)))
       return JNI_ERR;
 
-    if(!NSK_JVMTI_VERIFY(jvmti->GetClassFields(
+    if (!NSK_JVMTI_VERIFY(jvmti->GetClassFields(
             targetClass, &(objects_info[object].fields_count), &targetFields)))
       return JNI_ERR;
 
     objects_info[object].fields = (field_info_t*)calloc(objects_info[object].fields_count,sizeof(field_info_t));
 
     // Iterate over fields, collect info about it and tag non primitive fields.
-    for(field = 0; field < objects_info[object].fields_count; field++) {
-      if(!NSK_JVMTI_VERIFY(jvmti->GetFieldName(targetClass,
-                                               targetFields[field],
-                                               &objects_info[object].fields[field].name,
-                                               &objects_info[object].fields[field].signature,
-                                               NULL)))
+    for (field = 0; field < objects_info[object].fields_count; field++) {
+      if (!NSK_JVMTI_VERIFY(jvmti->GetFieldName(targetClass,
+                                                targetFields[field],
+                                                &objects_info[object].fields[field].name,
+                                                &objects_info[object].fields[field].signature,
+                                                NULL)))
         return JNI_ERR;
-      if(is_primitive_type(objects_info[object].fields[field].signature)) {
+      if (is_primitive_type(objects_info[object].fields[field].signature)) {
         objects_info[object].fields[field].primitive = 1;
       } else {
         jint modifiers;
         jobject value;
         int tag_type = get_tag_type(objects_info[object].fields[field].signature);
-        if(!NSK_JVMTI_VERIFY(jvmti->GetFieldModifiers(
+        if (!NSK_JVMTI_VERIFY(jvmti->GetFieldModifiers(
                 targetClass, targetFields[field], &modifiers))) {
           return JNI_ERR;
         }
-        if(modifiers & STATIC_FIELD) {
-          if(!NSK_VERIFY(NULL != (value = jni->GetStaticObjectField(targetClass,
-                                                                    targetFields[field])))) {
+        if (modifiers & STATIC_FIELD) {
+          if (!NSK_VERIFY(NULL != (value = jni->GetStaticObjectField(targetClass,
+                                                                     targetFields[field])))) {
             return JNI_ERR;
           }
         } else {
-          if(!NSK_VERIFY(NULL != (value = jni->GetObjectField(target, targetFields[field])))) {
+          if (!NSK_VERIFY(NULL != (value = jni->GetObjectField(target, targetFields[field])))) {
             return JNI_ERR;
           }
         }
         //tag field's value
-        if(!NSK_JVMTI_VERIFY(jvmti->SetTag(value, ENCODE_TAG(tag_type,object,field)))) {
+        if (!NSK_JVMTI_VERIFY(jvmti->SetTag(value, ENCODE_TAG(tag_type,object,field)))) {
           return JNI_ERR;
         }
         //remove local reference so object will have a chance to become unreachable
@@ -439,9 +439,9 @@
     }
 
     // tag class and it's instance to pass this tag into primitive field callback
-    if(!NSK_JVMTI_VERIFY(jvmti->SetTag(target, ENCODE_TAG(TAG_TYPE_PRIMITIVE,object,0))))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, ENCODE_TAG(TAG_TYPE_PRIMITIVE,object,0))))
       return JNI_ERR;
-    if(!NSK_JVMTI_VERIFY(jvmti->SetTag(targetClass, ENCODE_TAG(TAG_TYPE_PRIMITIVE,object,0))))
+    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(targetClass, ENCODE_TAG(TAG_TYPE_PRIMITIVE,object,0))))
       return JNI_ERR;
 
     NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)targetFields));
@@ -459,8 +459,8 @@
 void release_object_info(jvmtiEnv *jvmti, JNIEnv *jni) {
   int object;
   int field;
-  for(object = 0; object < TEST_OBJECTS_COUNT; object++) {
-    for(field = 0; field < objects_info[object].fields_count; field++) {
+  for (object = 0; object < TEST_OBJECTS_COUNT; object++) {
+    for (field = 0; field < objects_info[object].fields_count; field++) {
       jvmti->Deallocate((unsigned char*)objects_info[object].fields[field].name);
       jvmti->Deallocate((unsigned char*)objects_info[object].fields[field].signature);
     }
@@ -473,15 +473,15 @@
 void verify_objects() {
   int object;
   int field;
-  for(object = 0; object < TEST_OBJECTS_COUNT; object++) {
-    for(field = 0; field < objects_info[object].fields_count; field++) {
+  for (object = 0; object < TEST_OBJECTS_COUNT; object++) {
+    for (field = 0; field < objects_info[object].fields_count; field++) {
       // If primitive field of object that was not collected or
       // non primitive field that was not collected was not found
       // expected amount of times, than test failed.
-      if((objects_info[object].fields[field].primitive && !objects_info[object].collected)
-         || !objects_info[object].fields[field].collected) {
+      if ((objects_info[object].fields[field].primitive && !objects_info[object].collected)
+          || !objects_info[object].fields[field].collected) {
         int expected = 0;
-        switch(get_tag_type(objects_info[object].fields[field].signature)) {
+        switch (get_tag_type(objects_info[object].fields[field].signature)) {
         case TAG_TYPE_STRING:
           expected = STRING_OCCURANCE_COUNT;
           break;
@@ -495,7 +495,7 @@
           expected = NONPRIMITIVE_OCCURANCE_COUNT;
           break;
         }
-        if(expected != objects_info[object].fields[field].found) {
+        if (expected != objects_info[object].fields[field].found) {
           NSK_COMPLAIN4("Field %s::%s expected to be found %d times, "
                         "but it was found %d times.\n",
                         objects_info[object].name,
@@ -515,15 +515,15 @@
   jvmtiHeapCallbacks primitive_callbacks;
 
   NSK_DISPLAY0("Waiting debugee.\n");
-  if(!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, &event, NULL))) {
+  if (!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, &event, NULL))) {
     return;
   }
-  if(!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
+  if (!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
     return;
   }
 
   NSK_DISPLAY0("Tagging fields.\n");
-  if(!NSK_VERIFY(JNI_OK==tag_objects(jvmti, jni))) {
+  if (!NSK_VERIFY(JNI_OK==tag_objects(jvmti, jni))) {
     return;
   }
 
@@ -534,7 +534,7 @@
   primitive_callbacks.heap_iteration_callback = &heap_callback;
 
   NSK_DISPLAY0("Iterating over reachable objects.\n");
-  if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, NULL, &primitive_callbacks, NULL))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, NULL, &primitive_callbacks, NULL))) {
     nsk_jvmti_setFailStatus();
     return;
   }
@@ -542,16 +542,16 @@
   NSK_DISPLAY0("Verifying that all filds were found.\n");
   verify_objects();
 
-  if(!NSK_VERIFY(nsk_jvmti_resumeSync())) {
+  if (!NSK_VERIFY(nsk_jvmti_resumeSync())) {
     return;
   }
 
-  if(!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
+  if (!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
     return;
   }
 
   NSK_DISPLAY0("Iterating over unreachable objects.\n");
-  if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, NULL, &primitive_callbacks, NULL))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, NULL, &primitive_callbacks, NULL))) {
     nsk_jvmti_setFailStatus();
     return;
   }
@@ -559,13 +559,13 @@
   NSK_DISPLAY0("Verifying that all filds were found.\n");
   verify_objects();
 
-  if(!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_DISABLE, 1, &event, NULL))) {
+  if (!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_DISABLE, 1, &event, NULL))) {
     return;
   }
 
   release_object_info(jvmti, jni);
 
-  if(!NSK_VERIFY(nsk_jvmti_resumeSync()))
+  if (!NSK_VERIFY(nsk_jvmti_resumeSync()))
     return;
 }
 
@@ -598,13 +598,13 @@
   caps.can_tag_objects = 1;
   caps.can_generate_object_free_events = 1;
 
-  if(!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
     return JNI_ERR;
   }
 
   memset(&event_callbacks, 0, sizeof(jvmtiEventCallbacks));
   event_callbacks.ObjectFree = &object_free_callback;
-  if(!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) {
     return JNI_ERR;
   }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/concrete-klass-filter/ConcreteKlassFilter.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/concrete-klass-filter/ConcreteKlassFilter.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -56,7 +56,7 @@
                             jvmtiPrimitiveType value_type,
                             void* user_data) {
   //only field of our test object are expected
-  if(*object_tag_ptr != TEST_OBJECT_TAG) {
+  if (*object_tag_ptr != TEST_OBJECT_TAG) {
     NSK_COMPLAIN2("jvmtiPrimitiveFieldCallback was invoked for primitive "
                   "field with unexpected class tag 0x%lX and object tag 0x%lX.\n",
                   object_class_tag, *object_tag_ptr);
@@ -64,13 +64,13 @@
     return 0;
   }
   //expected field is long
-  if(value_type != JVMTI_PRIMITIVE_TYPE_LONG) {
+  if (value_type != JVMTI_PRIMITIVE_TYPE_LONG) {
     NSK_COMPLAIN0("jvmtiPrimitiveFieldCallback was invoked for non-long field.\n");
     nsk_jvmti_setFailStatus();
     return 0;
   }
   //check value
-  if(value.j != EXPECTED_PRIMITIVE_VALUE) {
+  if (value.j != EXPECTED_PRIMITIVE_VALUE) {
     NSK_COMPLAIN0("Unexpected value was passed to jvmtiPrimitiveFieldCallback.\n");
     NSK_COMPLAIN1("Expected value: 0x%lX.\n", EXPECTED_PRIMITIVE_VALUE);
     NSK_COMPLAIN1("Passed value: 0x%lX.\n", value.j);
@@ -114,7 +114,7 @@
                            jint length,
                            void* user_data) {
   //test object have to be reported by this callback
-  if(*tag_ptr != TEST_OBJECT_TAG) {
+  if (*tag_ptr != TEST_OBJECT_TAG) {
     NSK_COMPLAIN2("Object with unexpected class tag 0x%lX and object tag 0x%lX "
                   "was passed to jvmtiHeapIterationCallback.\n", class_tag, *tag_ptr);
     nsk_jvmti_setFailStatus();
@@ -123,7 +123,7 @@
 
   non_primitive_reported++;
 
-  if(non_primitive_reported>EXPECTED_NON_PRIMITIVES_COUNT) {
+  if (non_primitive_reported>EXPECTED_NON_PRIMITIVES_COUNT) {
     NSK_COMPLAIN1("Test object was reported more than %d times.\n",
                   EXPECTED_NON_PRIMITIVES_COUNT);
     nsk_jvmti_setFailStatus();
@@ -134,7 +134,7 @@
 
 JNIEXPORT void JNICALL
 object_free_callback(jvmtiEnv* jvmti, jlong tag) {
-  if(tag != TEST_OBJECT_TAG) {
+  if (tag != TEST_OBJECT_TAG) {
     NSK_COMPLAIN1("object free callback was invoked for an object with "
                   "unexpected tag 0x%lX.\n",tag);
     nsk_jvmti_setFailStatus();
@@ -152,22 +152,22 @@
   jobject testObject;
   jclass testObjectClass;
 
-  if(!NSK_VERIFY(NULL != (debugee = jni->FindClass(className))))
+  if (!NSK_VERIFY(NULL != (debugee = jni->FindClass(className))))
     return JNI_ERR;
 
-  if(!NSK_VERIFY(NULL != (testObjectField = jni->GetStaticFieldID(debugee, fieldName, fieldSig))))
+  if (!NSK_VERIFY(NULL != (testObjectField = jni->GetStaticFieldID(debugee, fieldName, fieldSig))))
     return JNI_ERR;
 
-  if(!NSK_VERIFY(NULL != (testObject = (jni->GetStaticObjectField(debugee, testObjectField)))))
+  if (!NSK_VERIFY(NULL != (testObject = (jni->GetStaticObjectField(debugee, testObjectField)))))
     return JNI_ERR;
 
-  if(!NSK_VERIFY(NULL != (testObjectClass = (jni->GetObjectClass(testObject)))))
+  if (!NSK_VERIFY(NULL != (testObjectClass = (jni->GetObjectClass(testObject)))))
     return JNI_ERR;
 
   // tag class and it's instance to pass this tag into primitive field callback
-  if(!NSK_JVMTI_VERIFY(jvmti->SetTag(testObject, TEST_OBJECT_TAG)))
+  if (!NSK_JVMTI_VERIFY(jvmti->SetTag(testObject, TEST_OBJECT_TAG)))
     return JNI_ERR;
-  if(!NSK_JVMTI_VERIFY(jvmti->SetTag(testObjectClass, TEST_OBJECT_TAG)))
+  if (!NSK_JVMTI_VERIFY(jvmti->SetTag(testObjectClass, TEST_OBJECT_TAG)))
     return JNI_ERR;
 
   jni->DeleteLocalRef(testObjectClass);
@@ -178,8 +178,8 @@
 
 void verify_objects() {
   //if test object was not unloaded then it's field expected to be found once.
-  if(object_unloaded) return;
-  if(field_found == 0) {
+  if (object_unloaded) return;
+  if (field_found == 0) {
     NSK_COMPLAIN0("TestClass instance field was not found.\n");
     nsk_jvmti_setFailStatus();
   } if (field_found > 1) {
@@ -197,22 +197,22 @@
   jvmtiHeapCallbacks primitive_callbacks;
   jclass klass;
 
-  if(!NSK_VERIFY(NULL != (klass = jni->FindClass(testClassName)))) {
+  if (!NSK_VERIFY(NULL != (klass = jni->FindClass(testClassName)))) {
     NSK_COMPLAIN1("Can't find class %s.\n",testClassName);
     nsk_jvmti_setFailStatus();
     return;
   }
 
   NSK_DISPLAY0("Waiting debugee.\n");
-  if(!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, &event, NULL))) {
+  if (!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, &event, NULL))) {
     return;
   }
-  if(!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
+  if (!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
     return;
   }
 
   NSK_DISPLAY0("Tagging fields.\n");
-  if(!NSK_VERIFY(JNI_OK==tag_objects(jvmti, jni))) {
+  if (!NSK_VERIFY(JNI_OK==tag_objects(jvmti, jni))) {
     return;
   }
 
@@ -223,7 +223,7 @@
   primitive_callbacks.heap_iteration_callback = &heap_callback;
 
   NSK_DISPLAY0("Iterating over reachable objects.\n");
-  if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, klass, &primitive_callbacks, NULL))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, klass, &primitive_callbacks, NULL))) {
     nsk_jvmti_setFailStatus();
     return;
   }
@@ -231,16 +231,16 @@
   NSK_DISPLAY0("Verifying that all filds were found.\n");
   verify_objects();
 
-  if(!NSK_VERIFY(nsk_jvmti_resumeSync())) {
+  if (!NSK_VERIFY(nsk_jvmti_resumeSync())) {
     return;
   }
 
-  if(!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
+  if (!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
     return;
   }
 
   NSK_DISPLAY0("Iterating over unreachable objects.\n");
-  if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, klass, &primitive_callbacks, NULL))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, klass, &primitive_callbacks, NULL))) {
     nsk_jvmti_setFailStatus();
     return;
   }
@@ -248,7 +248,7 @@
   NSK_DISPLAY0("Verifying that all filds were found.\n");
   verify_objects();
 
-  if(!NSK_VERIFY(nsk_jvmti_resumeSync()))
+  if (!NSK_VERIFY(nsk_jvmti_resumeSync()))
     return;
 }
 
@@ -281,13 +281,13 @@
   caps.can_tag_objects = 1;
   caps.can_generate_object_free_events = 1;
 
-  if(!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
     return JNI_ERR;
   }
 
   memset(&event_callbacks, 0, sizeof(jvmtiEventCallbacks));
   event_callbacks.ObjectFree = &object_free_callback;
-  if(!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) {
     return JNI_ERR;
   }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/HeapFilter.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/HeapFilter.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -108,21 +108,21 @@
 
 // Check if the signature is signature of primitive type.
 jboolean is_primitive_type(const char *signature) {
-  if(!strcmp(signature,"C")
-     || !strcmp(signature, "B")
-     || !strcmp(signature, "S")
-     || !strcmp(signature, "I")
-     || !strcmp(signature, "J")
-     || !strcmp(signature, "F")
-     || !strcmp(signature, "D")
-     || !strcmp(signature, "Z"))
+  if (!strcmp(signature,"C")
+      || !strcmp(signature, "B")
+      || !strcmp(signature, "S")
+      || !strcmp(signature, "I")
+      || !strcmp(signature, "J")
+      || !strcmp(signature, "F")
+      || !strcmp(signature, "D")
+      || !strcmp(signature, "Z"))
     return JNI_TRUE;
   return JNI_FALSE;
 }
 
 //check tag values accoring to heap filter choosed for test
 jboolean verify_tag(jlong class_tag, jlong object_tag) {
-  switch(filter_type) {
+  switch (filter_type) {
   case JVMTI_HEAP_FILTER_TAGGED:
     return object_tag == 0;
   case JVMTI_HEAP_FILTER_UNTAGGED:
@@ -138,7 +138,7 @@
 
 //check whether or not field expected to be reported
 jboolean occurance_expected(int tagged, int is_static, int is_primitive) {
-  switch(filter_type) {
+  switch (filter_type) {
   case JVMTI_HEAP_FILTER_TAGGED:
     return !tagged;
   case JVMTI_HEAP_FILTER_UNTAGGED:
@@ -167,11 +167,11 @@
 
   //iterate over all fields found during tagging and compare reported value
   //with their values.
-  if(value_type != JVMTI_PRIMITIVE_TYPE_INT)
+  if (value_type != JVMTI_PRIMITIVE_TYPE_INT)
     return 0;
-  for(object = 0; object < TEST_OBJECTS_COUNT; object++) {
-    for(field = 0; field < objects_info[object].fields_count; field++) {
-      if(objects_info[object].fields[field].type == TYPE_FIELD &&
+  for (object = 0; object < TEST_OBJECTS_COUNT; object++) {
+    for (field = 0; field < objects_info[object].fields_count; field++) {
+      if (objects_info[object].fields[field].type == TYPE_FIELD &&
          *(jint*)(objects_info[object].fields[field].value) == value.i) {
         objects_info[object].fields[field].found++;
       }
@@ -191,17 +191,17 @@
   if (!NSK_VERIFY(verify_tag(class_tag, *tag_ptr))) {
     nsk_jvmti_setFailStatus();
   }
-  for(object = 0; object < TEST_OBJECTS_COUNT; object++) {
-    for(field = 0; field < objects_info[object].fields_count; field++) {
-      if(objects_info[object].fields[field].type == TYPE_STRING &&
+  for (object = 0; object < TEST_OBJECTS_COUNT; object++) {
+    for (field = 0; field < objects_info[object].fields_count; field++) {
+      if (objects_info[object].fields[field].type == TYPE_STRING &&
          value_length == objects_info[object].fields[field].size) {
         int matched = 1;
         int i;
         wchar_t *str = (wchar_t*)objects_info[object].fields[field].value;
-        for(i = 0; i < value_length && matched; i++) {
+        for (i = 0; i < value_length && matched; i++) {
           matched = (str[i] == value[i]);
         }
-        if(matched)
+        if (matched)
           objects_info[object].fields[field].found++;
       }
     }
@@ -222,17 +222,17 @@
   if (!NSK_VERIFY(verify_tag(class_tag, *tag_ptr))) {
     nsk_jvmti_setFailStatus();
   }
-  for(object = 0; object < TEST_OBJECTS_COUNT; object++) {
-    for(field = 0; field < objects_info[object].fields_count; field++) {
-      if(objects_info[object].fields[field].type == TYPE_ARRAY &&
+  for (object = 0; object < TEST_OBJECTS_COUNT; object++) {
+    for (field = 0; field < objects_info[object].fields_count; field++) {
+      if (objects_info[object].fields[field].type == TYPE_ARRAY &&
          element_count == objects_info[object].fields[field].size) {
         int matched = 1;
         int i;
-        for(i = 0; i < element_count && matched; i++) {
+        for (i = 0; i < element_count && matched; i++) {
           matched = ((jint*)objects_info[object].fields[field].value)[i]==
             ((jint*)elements)[i];
         }
-        if(matched)
+        if (matched)
           objects_info[object].fields[field].found++;
       }
     }
@@ -257,18 +257,18 @@
 
 JNIEXPORT void JNICALL
 object_free_callback(jvmtiEnv* jvmti, jlong tag) {
-  if(DECODE_TYPE(tag) == OBJECT_TAG) {
+  if (DECODE_TYPE(tag) == OBJECT_TAG) {
     objects_info[DECODE_OBJECT(tag)].collected = 1;
-  } else if(DECODE_TYPE(tag) == FIELD_TAG) {
+  } else if (DECODE_TYPE(tag) == FIELD_TAG) {
     objects_info[DECODE_OBJECT(tag)].fields[DECODE_FIELD(tag)].collected = 1;
   }
 }
 
 //set expected fields value according to it's type
 void set_expected_value(field_info_t *field, int tagged, int is_static) {
-  if(field->primitive) {
+  if (field->primitive) {
     field->size = (int) sizeof(jint);
-    if(is_static) {
+    if (is_static) {
       field->value = (void*)(tagged ? &TAGGED_STATIC_INT_VALUE:
                              &UNTAGGED_STATIC_INT_VALUE);
     } else {
@@ -299,18 +299,18 @@
   jobjectArray testObjects;
   int object;
 
-  if(!NSK_VERIFY(NULL != (debugee = jni->FindClass(className))))
+  if (!NSK_VERIFY(NULL != (debugee = jni->FindClass(className))))
     return JNI_ERR;
 
-  if(!NSK_VERIFY(NULL != (testObjectsField = jni->GetStaticFieldID(debugee, fieldName, fieldSig))))
+  if (!NSK_VERIFY(NULL != (testObjectsField = jni->GetStaticFieldID(debugee, fieldName, fieldSig))))
     return JNI_ERR;
 
-  if(!NSK_VERIFY(NULL != (testObjects = (jobjectArray)(jni->GetStaticObjectField(
+  if (!NSK_VERIFY(NULL != (testObjects = (jobjectArray)(jni->GetStaticObjectField(
           debugee, testObjectsField)))))
     return JNI_ERR;
 
   // For each of test objects tag every field
-  for(object = 0; object<TEST_OBJECTS_COUNT; object++) {
+  for (object = 0; object<TEST_OBJECTS_COUNT; object++) {
     jobject target;
     jclass targetClass;
     jfieldID *targetFields;
@@ -318,58 +318,58 @@
     int tagged = object == 0;
 
     memset(&objects_info[object],0,sizeof(object_info_t));
-    if(!NSK_VERIFY(NULL != (target = jni->GetObjectArrayElement(testObjects, object))))
+    if (!NSK_VERIFY(NULL != (target = jni->GetObjectArrayElement(testObjects, object))))
       return JNI_ERR;
 
-    if(!NSK_VERIFY(NULL != (targetClass = jni->GetObjectClass(target))))
+    if (!NSK_VERIFY(NULL != (targetClass = jni->GetObjectClass(target))))
       return JNI_ERR;
 
-    if(!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(targetClass, &(objects_info[object].name), NULL)))
+    if (!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(targetClass, &(objects_info[object].name), NULL)))
       return JNI_ERR;
 
-    if(!NSK_JVMTI_VERIFY(jvmti->GetClassFields(
+    if (!NSK_JVMTI_VERIFY(jvmti->GetClassFields(
             targetClass, &(objects_info[object].fields_count), &targetFields)))
       return JNI_ERR;
 
     objects_info[object].fields = (field_info_t*)calloc(objects_info[object].fields_count,sizeof(field_info_t));
 
     // Iterate over fields, collect info about it and tag non primitive fields.
-    for(field = 0; field < objects_info[object].fields_count; field++) {
+    for (field = 0; field < objects_info[object].fields_count; field++) {
       jint modifiers;
       int is_static = 0;
       int is_primitive = 0;
-      if(!NSK_JVMTI_VERIFY(jvmti->GetFieldName(targetClass,
-                                               targetFields[field],
-                                               &objects_info[object].fields[field].name,
-                                               &objects_info[object].fields[field].signature,
-                                               NULL)))
+      if (!NSK_JVMTI_VERIFY(jvmti->GetFieldName(targetClass,
+                                                targetFields[field],
+                                                &objects_info[object].fields[field].name,
+                                                &objects_info[object].fields[field].signature,
+                                                NULL)))
         return JNI_ERR;
-      if(!NSK_JVMTI_VERIFY(jvmti->GetFieldModifiers(
+      if (!NSK_JVMTI_VERIFY(jvmti->GetFieldModifiers(
               targetClass, targetFields[field], &modifiers))) {
         return JNI_ERR;
       }
       is_static = (modifiers & STATIC_FIELD) == STATIC_FIELD;
-      if(is_primitive_type(objects_info[object].fields[field].signature)) {
+      if (is_primitive_type(objects_info[object].fields[field].signature)) {
         objects_info[object].fields[field].primitive = 1;
         is_primitive = 1;
       } else {
         jobject value;
-        if(!NSK_JVMTI_VERIFY(jvmti->GetFieldModifiers(
+        if (!NSK_JVMTI_VERIFY(jvmti->GetFieldModifiers(
                 targetClass, targetFields[field], &modifiers))) {
           return JNI_ERR;
         }
-        if(is_static) {
-          if(!NSK_VERIFY(NULL != (value = jni->GetStaticObjectField(
+        if (is_static) {
+          if (!NSK_VERIFY(NULL != (value = jni->GetStaticObjectField(
                   targetClass, targetFields[field])))) {
             return JNI_ERR;
           }
         } else {
-          if(!NSK_VERIFY(NULL != (value = jni->GetObjectField(target, targetFields[field])))) {
+          if (!NSK_VERIFY(NULL != (value = jni->GetObjectField(target, targetFields[field])))) {
             return JNI_ERR;
           }
         }
-        if(tagged) {
-          if(!NSK_JVMTI_VERIFY(jvmti->SetTag(value, ENCODE_TAG(FIELD_TAG,object,field)))) {
+        if (tagged) {
+          if (!NSK_JVMTI_VERIFY(jvmti->SetTag(value, ENCODE_TAG(FIELD_TAG,object,field)))) {
             return JNI_ERR;
           }
         }
@@ -384,10 +384,10 @@
     }
 
     // tag class and it's instance to pass this tag into primitive field callback
-    if(tagged) {
-      if(!NSK_JVMTI_VERIFY(jvmti->SetTag(target, ENCODE_TAG(OBJECT_TAG,object,0))))
+    if (tagged) {
+      if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, ENCODE_TAG(OBJECT_TAG,object,0))))
         return JNI_ERR;
-      if(!NSK_JVMTI_VERIFY(jvmti->SetTag(targetClass, ENCODE_TAG(CLASS_TAG,object,0))))
+      if (!NSK_JVMTI_VERIFY(jvmti->SetTag(targetClass, ENCODE_TAG(CLASS_TAG,object,0))))
         return JNI_ERR;
     }
 
@@ -406,8 +406,8 @@
 void release_object_info(jvmtiEnv *jvmti, JNIEnv *jni) {
   int object;
   int field;
-  for(object = 0; object < TEST_OBJECTS_COUNT; object++) {
-    for(field = 0; field < objects_info[object].fields_count; field++) {
+  for (object = 0; object < TEST_OBJECTS_COUNT; object++) {
+    for (field = 0; field < objects_info[object].fields_count; field++) {
       jvmti->Deallocate((unsigned char*)objects_info[object].fields[field].name);
       jvmti->Deallocate((unsigned char*)objects_info[object].fields[field].signature);
     }
@@ -420,18 +420,18 @@
 void verify_objects(int reachable) {
   int object;
   int field;
-  for(object = 0; object < (reachable?TEST_OBJECTS_COUNT:TAGGED_OBJECTS); object++) {
-    for(field = 0; field < objects_info[object].fields_count; field++) {
+  for (object = 0; object < (reachable?TEST_OBJECTS_COUNT:TAGGED_OBJECTS); object++) {
+    for (field = 0; field < objects_info[object].fields_count; field++) {
       // If primitive field of object that was not collected or
       // non primitive field that was not collected was not found
       // expected amount of times, than test failed.
-      if((objects_info[object].fields[field].primitive &&
-          !objects_info[object].collected)
-         ||
-         (!objects_info[object].fields[field].primitive &&
-          !objects_info[object].fields[field].collected)) {
-        if(objects_info[object].fields[field].expected !=
-           objects_info[object].fields[field].found) {
+      if ((objects_info[object].fields[field].primitive &&
+           !objects_info[object].collected)
+          ||
+          (!objects_info[object].fields[field].primitive &&
+           !objects_info[object].fields[field].collected)) {
+        if (objects_info[object].fields[field].expected !=
+            objects_info[object].fields[field].found) {
           NSK_COMPLAIN4("Field %s::%s expected to be found %d times, "
                         "but it was found %d times.\n",
                         objects_info[object].name,
@@ -453,15 +453,15 @@
   jvmtiEventCallbacks event_callbacks;
 
   NSK_DISPLAY0("Waiting debugee.\n");
-  if(!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, &event, NULL))) {
+  if (!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, &event, NULL))) {
     return;
   }
-  if(!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
+  if (!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
     return;
   }
 
   NSK_DISPLAY0("Tagging fields.\n");
-  if(!NSK_VERIFY(JNI_OK==tag_objects(jvmti, jni))) {
+  if (!NSK_VERIFY(JNI_OK==tag_objects(jvmti, jni))) {
     return;
   }
 
@@ -472,7 +472,7 @@
   primitive_callbacks.heap_iteration_callback = &heap_callback;
 
   NSK_DISPLAY0("Iterating over reachable objects.\n");
-  if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(filter_type, NULL, &primitive_callbacks, NULL))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(filter_type, NULL, &primitive_callbacks, NULL))) {
     nsk_jvmti_setFailStatus();
     return;
   }
@@ -480,16 +480,16 @@
   NSK_DISPLAY0("Verifying that all fields were found.\n");
   verify_objects(1);
 
-  if(!NSK_VERIFY(nsk_jvmti_resumeSync())) {
+  if (!NSK_VERIFY(nsk_jvmti_resumeSync())) {
     return;
   }
 
-  if(!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
+  if (!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
     return;
   }
 
   NSK_DISPLAY0("Iterating over unreachable objects.\n");
-  if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(filter_type, NULL, &primitive_callbacks, NULL))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(filter_type, NULL, &primitive_callbacks, NULL))) {
     nsk_jvmti_setFailStatus();
     return;
   }
@@ -502,13 +502,13 @@
    * since it will free some memory that the callback will access.
    */
   memset(&event_callbacks, 0, sizeof(jvmtiEventCallbacks));
-  if(!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) {
     return;
   }
 
   release_object_info(jvmti, jni);
 
-  if(!NSK_VERIFY(nsk_jvmti_resumeSync()))
+  if (!NSK_VERIFY(nsk_jvmti_resumeSync()))
     return;
 }
 
@@ -537,14 +537,14 @@
   nsk_jvmti_parseOptions(options);
 
   type = nsk_jvmti_findOptionValue("filter");
-  if(type != NULL) {
-    if(0 == strcmp(type, "JVMTI_HEAP_FILTER_TAGGED")) {
+  if (type != NULL) {
+    if (0 == strcmp(type, "JVMTI_HEAP_FILTER_TAGGED")) {
       filter_type = JVMTI_HEAP_FILTER_TAGGED;
-    } else if(0 == strcmp(type, "JVMTI_HEAP_FILTER_UNTAGGED")) {
+    } else if (0 == strcmp(type, "JVMTI_HEAP_FILTER_UNTAGGED")) {
       filter_type = JVMTI_HEAP_FILTER_UNTAGGED;
-    } else if(0 == strcmp(type, "JVMTI_HEAP_FILTER_CLASS_TAGGED")) {
+    } else if (0 == strcmp(type, "JVMTI_HEAP_FILTER_CLASS_TAGGED")) {
       filter_type = JVMTI_HEAP_FILTER_CLASS_TAGGED;
-    } else if(0 == strcmp(type, "JVMTI_HEAP_FILTER_CLASS_UNTAGGED")) {
+    } else if (0 == strcmp(type, "JVMTI_HEAP_FILTER_CLASS_UNTAGGED")) {
       filter_type = JVMTI_HEAP_FILTER_CLASS_UNTAGGED;
     } else {
       NSK_COMPLAIN1("unknown filter value '%s'.\n",type);
@@ -561,13 +561,13 @@
   caps.can_tag_objects = 1;
   caps.can_generate_object_free_events = 1;
 
-  if(!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
     return JNI_ERR;
   }
 
   memset(&event_callbacks, 0, sizeof(jvmtiEventCallbacks));
   event_callbacks.ObjectFree = &object_free_callback;
-  if(!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) {
     return JNI_ERR;
   }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/non-concrete-klass-filter/NonConcreteKlassFilter.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/non-concrete-klass-filter/NonConcreteKlassFilter.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -62,7 +62,7 @@
                             jvmtiPrimitiveType value_type,
                             void* user_data) {
   //nothing should be reported in ZERO_INVOCATIONS_PHASE
-  if(phase == ZERO_INVOCATIONS_PHASE) {
+  if (phase == ZERO_INVOCATIONS_PHASE) {
     NSK_COMPLAIN2("jvmtiPrimitiveFieldCallback was invoked for a field with "
                   "class tag 0x%lX and object tag 0x%lX during iteration with "
                   "interface or abstract class as a filter.\n",
@@ -70,10 +70,10 @@
     nsk_jvmti_setFailStatus();
   } else {
     int i;
-    if(value_type != JVMTI_PRIMITIVE_TYPE_LONG)
+    if (value_type != JVMTI_PRIMITIVE_TYPE_LONG)
       return 0;
 
-    if(IS_FIELD_UNEXPECTED(value.j)) {
+    if (IS_FIELD_UNEXPECTED(value.j)) {
       NSK_COMPLAIN3("Unexpected value 0x%lX was repotrted by "
                     "jvmtiPrimitiveFieldCallback for an object with "
                     "class tag 0x%lX and object tag 0x%lX.\n",
@@ -83,8 +83,8 @@
     }
 
     //find reported field in expected values
-    for(i = 0; i < EXPECTED_PRIMITIVES; i++) {
-      if(expected_values[i] == value.j)
+    for (i = 0; i < EXPECTED_PRIMITIVES; i++) {
+      if (expected_values[i] == value.j)
         occurancies[i]++;
     }
 
@@ -123,7 +123,7 @@
                            jint length,
                            void* user_data) {
   //nothing should be reported in ZERO_INVOCATIONS_PHASE
-  if(phase == ZERO_INVOCATIONS_PHASE) {
+  if (phase == ZERO_INVOCATIONS_PHASE) {
     NSK_COMPLAIN2("jvmtiHeapIterationCallback was invoked for an object with "
                   "class tag 0x%lX and object tag 0x%lX during iteration with "
                   "interface or abstract class as a klass-filter.\n",
@@ -141,10 +141,10 @@
   int i;
 
   NSK_DISPLAY0("Waiting debugee.\n");
-  if(!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, &event, NULL))) {
+  if (!NSK_VERIFY(nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, &event, NULL))) {
     return;
   }
-  if(!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
+  if (!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) {
     return;
   }
 
@@ -155,14 +155,14 @@
   primitive_callbacks.heap_iteration_callback = &heap_callback;
 
   phase = ZERO_INVOCATIONS_PHASE;
-  for(i = 0; i < FILTER_COUNT; i++) {
-    if(!NSK_VERIFY(NULL != (klass = jni->FindClass(types[i])))) {
+  for (i = 0; i < FILTER_COUNT; i++) {
+    if (!NSK_VERIFY(NULL != (klass = jni->FindClass(types[i])))) {
       NSK_COMPLAIN1("Can't find class %s.\n",types[i]);
       nsk_jvmti_setFailStatus();
       return;
     }
     NSK_DISPLAY1("Iterating through heap with klass-filter '%s'.\n",types[i]);
-    if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, klass, &primitive_callbacks, NULL))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, klass, &primitive_callbacks, NULL))) {
       nsk_jvmti_setFailStatus();
       return;
     }
@@ -170,17 +170,17 @@
 
   phase = STATIC_FIELDS_FINDING_PHASE;
   NSK_DISPLAY0("Iterating through heap with klass-filter 'java/lang/Class'.\n");
-  if(!NSK_VERIFY(NULL != (klass = jni->FindClass("java/lang/Class")))) {
+  if (!NSK_VERIFY(NULL != (klass = jni->FindClass("java/lang/Class")))) {
     NSK_COMPLAIN0("Can't find class java/lang/Class.\n");
     nsk_jvmti_setFailStatus();
     return;
   }
-  if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, klass, &primitive_callbacks, NULL))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, klass, &primitive_callbacks, NULL))) {
     nsk_jvmti_setFailStatus();
     return;
   }
-  for(i = 0; i < EXPECTED_PRIMITIVES; i++) {
-    if(occurancies[i] != EXPECTED_OCCURANCE_COUNT) {
+  for (i = 0; i < EXPECTED_PRIMITIVES; i++) {
+    if (occurancies[i] != EXPECTED_OCCURANCE_COUNT) {
       NSK_COMPLAIN3("Primitive static field with value 0x%lX was reported "
                     "%d times while expected to be reported %d times.\n",
                     expected_values[i], occurancies[i], EXPECTED_OCCURANCE_COUNT);
@@ -188,7 +188,7 @@
     }
   }
 
-  if(!NSK_VERIFY(nsk_jvmti_resumeSync()))
+  if (!NSK_VERIFY(nsk_jvmti_resumeSync()))
     return;
 }
 
@@ -221,12 +221,12 @@
   caps.can_tag_objects = 1;
   caps.can_generate_object_free_events = 1;
 
-  if(!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
     return JNI_ERR;
   }
 
   memset(&event_callbacks, 0, sizeof(jvmtiEventCallbacks));
-  if(!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) {
+  if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) {
     return JNI_ERR;
   }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe002/popframe002.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe002/popframe002.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -101,7 +101,7 @@
         tot_result = STATUS_FAILED;
     }
 
-    switch(t_case) {
+    switch (t_case) {
 /* NULL pointer to the thread in debug mode */
     case 1:
         printf("\nInvoke PopFrame() with NULL pointer to a thread...\n");
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe005/popframe005.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe005/popframe005.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -124,7 +124,7 @@
                     , entry_name
                     , entry_sig
                     );
-        } while(0);
+        } while (0);
 
         if (failure) {
             NSK_COMPLAIN1("#### MethodExit event occurred (tid: %d) ####\n"
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe011/popframe011.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe011/popframe011.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -110,7 +110,7 @@
         return STATUS_FAILED;
     }
 
-    switch(t_case) {
+    switch (t_case) {
 /* NULL pointer to the thread in debug mode */
     case 1:
         printf("\nInvoke PopFrame() with NULL pointer to a thread...\n");
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass006/redefclass006.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass006/redefclass006.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -100,7 +100,7 @@
         return PASSED;
     }
 
-    switch(t_case) {
+    switch (t_case) {
 /* NULL pointer to the jvmtiClassDefinition */
         case 0:
             break;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass028/redefclass028.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass028/redefclass028.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -179,7 +179,7 @@
             nsk_jvmti_resumeSync();
             exit(95 + PASSED);
         }
-    } while(fire == 0);
+    } while (fire == 0);
 
     NSK_DISPLAY0("agentProc: hotspot method compiled\n\n");
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass029/redefclass029.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass029/redefclass029.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -178,7 +178,7 @@
             nsk_jvmti_resumeSync();
             exit(95 + PASSED);
         }
-    } while(fire == 0);
+    } while (fire == 0);
 
     NSK_DISPLAY0("agentProc: hotspot method compiled\n\n");
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass030/redefclass030.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass030/redefclass030.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -179,7 +179,7 @@
             nsk_jvmti_resumeSync();
             exit(95 + PASSED);
         }
-    } while(fire == 0);
+    } while (fire == 0);
 
     NSK_DISPLAY0("agentProc: hotspot method compiled\n\n");
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform003/retransform003.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform003/retransform003.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -157,7 +157,7 @@
     if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
         return JNI_ERR;
 
-    if(nsk_jvmti_findOptionIntValue("can_retransform_classes", 1)) {
+    if (nsk_jvmti_findOptionIntValue("can_retransform_classes", 1)) {
         caps.can_retransform_classes = 1;
     } else {
         caps.can_retransform_classes = 0;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetJNIFunctionTable/setjniftab001/setjniftab001.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetJNIFunctionTable/setjniftab001/setjniftab001.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -287,7 +287,7 @@
                     i+1);
                 result = STATUS_FAILED;
             }
-        } while(thrStarted[i] != 1);
+        } while (thrStarted[i] != 1);
         if (verbose)
             printf("\nthe waiting thread #%d started\n",
                 i+1);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP11/ap11t001/ap11t001.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP11/ap11t001/ap11t001.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -121,7 +121,7 @@
             nsk_jvmti_setFailStatus();
             NSK_COMPLAIN1("VMObjectAlloc: event's thread was found in the list of live threads: %s\n\n", threadInfo.name);
         }
-    } while(0);
+    } while (0);
 
 
     /* Check that object_klass is loaded class
@@ -143,7 +143,7 @@
 
         if (classes != NULL)
             jvmti->Deallocate((unsigned char*)classes);
-    } while(0);
+    } while (0);
 
 
     /* Check for object_klass
@@ -172,7 +172,7 @@
             NSK_COMPLAIN2("VMObjectAlloc: inconsistent object size data\n\t"
                " size passed in to callback: %d\n\t size returned by GetObjectSize: %d\n\n", (long)size, (long)objSize);
         }
-    } while(0);
+    } while (0);
 
     if (signature != NULL)
         jvmti->Deallocate((unsigned char*)signature);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS103/hs103t002/hs103t002.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS103/hs103t002/hs103t002.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -71,7 +71,7 @@
   nsk_printf("doRedefineInNativeThread\n");
   cla = jni->FindClass(SEARCH_NAME);
   nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName, sizeof(fileName)/sizeof(char));
-  for(i = 0; i < 30; i++) {
+  for (i = 0; i < 30; i++) {
     nsk_printf(" Inside the redefine method..\n");
     if (nsk_jvmti_redefineClass(jvmti, cla,fileName) == NSK_TRUE) {
       nsk_printf("\nMyClass :: Successfully redefined..\n");
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS104/hs104t002/hs104t002.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS104/hs104t002/hs104t002.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -48,7 +48,7 @@
     return JNI_VERSION_1_8;
 }
 #endif
-jint  Agent_Initialize(JavaVM *vm, char *options, void *reserved){
+jint  Agent_Initialize(JavaVM *vm, char *options, void *reserved) {
     if (!NSK_VERIFY (JNI_OK == vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1_1))) {
         nsk_printf("#error Agent :: Could not load JVMTI interface.\n");
         return JNI_ERR;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t002/hs203t002.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t002/hs203t002.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -98,7 +98,7 @@
     nsk_printf(" %d..",redefineNumber);
     nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName, sizeof(fileName)/sizeof(char));
 
-    if(nsk_jvmti_redefineClass(jvmti, threadClass,fileName) == NSK_TRUE) {
+    if (nsk_jvmti_redefineClass(jvmti, threadClass,fileName) == NSK_TRUE) {
         nsk_printf("Agent:: Redefined..\n");
     } else {
         nsk_printf(" Failed to redefine..\n");
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -51,7 +51,7 @@
 char *getClassName(jvmtiEnv *jvmti, jclass  klass) {
     char * className;
     char * generic;
-    if(!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(klass, &className, &generic))) {
+    if (!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(klass, &className, &generic))) {
         nsk_jvmti_setFailStatus();
     }
     return className;
@@ -64,7 +64,7 @@
         jclass klass) {
     char * name;
     name = getClassName(jvmti_env,klass);
-    if((strcmp(name,CLASS_NAME) == 0) && (redefineNumber== 1)) {
+    if ((strcmp(name,CLASS_NAME) == 0) && (redefineNumber== 1)) {
        char fileName[512];
         nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName,
                         sizeof(fileName)/sizeof(char));
@@ -100,7 +100,7 @@
         } else {
             NSK_COMPLAIN0("\nMyClass :: Failed to redefine ..\n");
         }
-        if((myTestClass = (jclass) jni_env->NewGlobalRef(klass)) == NULL) {
+        if ((myTestClass = (jclass) jni_env->NewGlobalRef(klass)) == NULL) {
             NSK_COMPLAIN0("Failed to create global ref...");
         }
     }
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t002/hs204t002.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t002/hs204t002.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -54,7 +54,7 @@
     redefineNumber=0;
     jvmti->GetClassSignature(klass, &className, &generic);
     /* printf("Agent::Class Name %s \n",className); */
-    if((strcmp(className, CLASS_NAME) == 0)) {
+    if ((strcmp(className, CLASS_NAME) == 0)) {
         jclass cls;
         cls = jni->FindClass(SEARCH_NAME);
         if (cls == NULL) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t003/hs204t003.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t003/hs204t003.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -55,7 +55,7 @@
         NSK_DISPLAY0(" Agent :: Failed get class signature.\n");
         nsk_jvmti_agentFailed();
     } else {
-        if((strcmp(className, CLASS_NAME) == 0)) {
+        if ((strcmp(className, CLASS_NAME) == 0)) {
             jfieldID fieldId;
             if (!NSK_JNI_VERIFY(jni, (fieldId = jni->GetStaticFieldID(klass, FIELDNAME, TYPE)) != NULL)) {
                     NSK_DISPLAY0(" Agent :: Failed to get FieldId.\n");
@@ -114,7 +114,7 @@
         NSK_DISPLAY0(" Agent :: Failed get class signature.\n");
         nsk_jvmti_agentFailed();
     } else {
-        if((strcmp(className, CLASS_NAME) == 0)) {
+        if ((strcmp(className, CLASS_NAME) == 0)) {
             jvmtiThreadInfo info;
             nsk_jvmti_getFileName(redefineNumber, FILE_NAME, fileName,
                     sizeof(fileName)/sizeof(char));
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t002/ji03t002.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t002/ji03t002.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -145,7 +145,7 @@
             env->FatalError("cannot get field ID");
         }
 
-        switch(i) {
+        switch (i) {
         case 0:
             if (verbose)
                 printf("\ndoRedirect: overwriting the function CallStaticDoubleMethodV ...\n");
@@ -199,7 +199,7 @@
         if (verbose)
             printf("\ndoCall: calling %s JNI method for \"%s %s\"...\n",
                 msg, meth_info[i].m_name, meth_info[i].m_sign);
-        switch(i) {
+        switch (i) {
         case 0:
             dVal = env->CallStaticDoubleMethod(objCls, meth_info[i].mid, 73);
             break;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/ji05t001.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/ji05t001.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -186,7 +186,7 @@
     NSK_DISPLAY1("\nagent %s initializer: the JVMTI env obtained\n\tsetting event callbacks ...\n",
         (indx==0)?"A":"B");
     (void) memset(&callbacks, 0, sizeof(callbacks));
-    switch(indx) {
+    switch (indx) {
     case 0:
         callbacks.VMInit = &VMInitA;
         break;
@@ -240,7 +240,7 @@
                 (indx==0)?"A":"B", TRIES);
             exit(STATUS_FAILED);
         }
-    } while(thrstarted[indx] != 1);
+    } while (thrstarted[indx] != 1);
 
     NSK_DISPLAY1("\nstartAgent: the agent %s thread started\n",
         (indx==0)?"A":"B");
@@ -288,7 +288,7 @@
                 TRIES);
             exit(STATUS_FAILED);
         }
-    } while(redir[1] != 1);
+    } while (redir[1] != 1);
 
     /* check the interception set in another JVMTI env */
     NSK_DISPLAY0("\n>>> TEST CASE #4) First JVMTI env: checking the redirection set in second JVMTI env ...\n");
@@ -335,7 +335,7 @@
                 TRIES);
             exit(STATUS_FAILED);
         }
-    } while(redir[0] != 1);
+    } while (redir[0] != 1);
 
     /* check the interception set in another JVMTI env */
     NSK_DISPLAY0("\n>>> TEST CASE #2) Second JVMTI env: checking the redirection set in first JVMTI env ...\n");
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI06/ji06t001/ji06t001.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI06/ji06t001/ji06t001.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -252,7 +252,7 @@
                 TRIES);
             env->FatalError("ownerThread: time exceed");
         }
-    } while(releaseMon != 1);
+    } while (releaseMon != 1);
 
     if (exitMonitor(env, "ownerThread") == STATUS_FAILED)
         THREAD_return(STATUS_FAILED);
@@ -344,7 +344,7 @@
                 TRIES);
             env->FatalError(" the monitor is still not entered by the owner thread");
         }
-    } while(monEntered != 1);
+    } while (monEntered != 1);
 
     for (i=0; i<MAX_THREADS-1; i++) {
         NSK_DISPLAY1("starting waiting thread #%d ...\n",
@@ -368,7 +368,7 @@
                     i+1);
                 exit(STATUS_FAILED);
             }
-        } while(thrStarted[i] != 1);
+        } while (thrStarted[i] != 1);
         NSK_DISPLAY1("the waiting thread #%d started\n",
             i+1);
     }
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA05/ma05t001/ma05t001.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA05/ma05t001/ma05t001.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -65,7 +65,7 @@
     if (signature != NULL)
         jvmti_env->Deallocate((unsigned char*)signature);
 
-    switch(BreakpointEventsCount) {
+    switch (BreakpointEventsCount) {
     case 1:
         NSK_DISPLAY0("Testcase #1: FramePop in both agents\n");
         break;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA05/ma05t001/ma05t001a.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA05/ma05t001/ma05t001a.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -69,7 +69,7 @@
     if (signature != NULL)
         jvmti_env->Deallocate((unsigned char*)signature);
 
-    switch(MethodEntryEventsCount) {
+    switch (MethodEntryEventsCount) {
     case 1:
         NSK_DISPLAY0("Testcase #1: FramePop in both agents\n");
         if (!NSK_JVMTI_VERIFY(jvmti_env->NotifyFramePop(thread, 0)))
@@ -115,7 +115,7 @@
     if (signature != NULL)
         jvmti_env->Deallocate((unsigned char*)signature);
 
-    switch(MethodEntryEventsCount) {
+    switch (MethodEntryEventsCount) {
     case 1:
         /* It's ok */
         break;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/timers/JvmtiTest/JvmtiTest.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/timers/JvmtiTest/JvmtiTest.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -178,7 +178,7 @@
 static void print_timerinfo(jvmtiTimerInfo* timerInfo) {
   char buffer[32];
   const char* timerKind;
-  switch(timerInfo->kind) {
+  switch (timerInfo->kind) {
   case JVMTI_TIMER_USER_CPU:
     timerKind = "JVMTI_TIMER_USER_CPU";
     break;
--- a/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/ThreadController.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/ThreadController.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -441,7 +441,7 @@
         // while (!threadsGroupLocks.runnableCanExit.get()) {
         //        Thread.yield();
         //    }
-        while(flag==JNI_FALSE)
+        while (flag==JNI_FALSE)
         {
             GET_BOOL_FIELD(flag, threadsGroupLocks, ThreadsGroupLocks, "runnableCanExit");
             CALL_STATIC_VOID_NOPARAM(Thread, "yield");
@@ -476,7 +476,7 @@
      */
     JNIEXPORT jobject JNICALL
     Java_nsk_monitoring_share_ThreadController_getThreadState(JNIEnv *env,
-            jobject obj, jobject thread){
+            jobject obj, jobject thread) {
 
         JavaVM *vm;
         jvmtiEnv *jvmti;
@@ -486,18 +486,18 @@
         jstring stateName;
         jint state;
 
-        if(!NSK_VERIFY(
+        if (!NSK_VERIFY(
              env->GetJavaVM(&vm) == 0)) {
             return NULL;
         }
 
-        if(!NSK_VERIFY(
+        if (!NSK_VERIFY(
              vm->GetEnv((void **)&jvmti, JVMTI_VERSION_1)
                     == JNI_OK)) {
             return NULL;
         }
 
-        if(!NSK_VERIFY(
+        if (!NSK_VERIFY(
              jvmti->GetThreadState((jthread)thread, &state)
              == JVMTI_ERROR_NONE)) {
             return NULL;
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/JVMTIagent.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/JVMTIagent.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -627,7 +627,7 @@
 
     NSK_TRACE(jni_env->DeleteGlobalRef(rasCls));
 
-    while(clsInfoCurr != NULL) {
+    while (clsInfoCurr != NULL) {
         class_info *_clsInfo = clsInfoCurr;
 
         if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) clsInfoCurr->clazzsig)))
@@ -659,7 +659,7 @@
         lock(jni_env);
         display(0, "#### JVMTIagent: findAndHotSwap: >>>>>>>> entered the raw monitor \"eventLock\" ####\n");
 
-        while(clsInfoCurr != NULL) {
+        while (clsInfoCurr != NULL) {
             if (hotswap == HOTSWAP_EVERY_METHOD_ENTRY_FOR_EVERY_CLASS ||
                     hotswap == HOTSWAP_EVERY_EXCEPTION_FOR_EVERY_CLASS) {
                 display(1, "\n#### JVMTIagent: findAndHotSwap: going to hotswap tested class \"%s\" during execution of class \"%s\" ...\n",
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/aod/aod.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/aod/aod.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -148,7 +148,7 @@
         return NULL;
     }
 
-    for(i = 0; i < options->size; i++) {
+    for (i = 0; i < options->size; i++) {
         if (strcmp(option, options->names[i]) == 0) {
             return options->values[i];
         }
@@ -167,7 +167,7 @@
         return NSK_FALSE;
     }
 
-    for(i = 0; i < options->size; i++) {
+    for (i = 0; i < options->size; i++) {
         if (strcmp(option, options->names[i]) == 0) {
             return NSK_TRUE;
         }
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/MonitorEnterExecutor.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/MonitorEnterExecutor.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -33,7 +33,7 @@
 
         success  = env->MonitorEnter(thisObject);
 
-        if(success != 0)
+        if (success != 0)
         {
                 NSK_COMPLAIN1("MonitorEnter return non-zero: %d\n", success);
 
@@ -44,7 +44,7 @@
 
         success  = env->MonitorExit(thisObject);
 
-        if(success != 0)
+        if (success != 0)
         {
                 NSK_COMPLAIN1("MonitorExit return non-zero: %d\n", success);
 
@@ -61,7 +61,7 @@
 
         success  = env->MonitorEnter(thisObject);
 
-        if(success != 0)
+        if (success != 0)
         {
                 NSK_COMPLAIN1("MonitorEnter return non-zero: %d\n", success);
 
@@ -72,7 +72,7 @@
 
         success  = env->MonitorExit(thisObject);
 
-        if(success != 0)
+        if (success != 0)
         {
                 NSK_COMPLAIN1("MonitorExit return non-zero: %d\n", success);
 
@@ -89,7 +89,7 @@
 
         success  = env->MonitorEnter(thisObject);
 
-        if(success != 0)
+        if (success != 0)
         {
                 NSK_COMPLAIN1("MonitorEnter return non-zero: %d\n", success);
 
@@ -100,7 +100,7 @@
 
         success  = env->MonitorExit(thisObject);
 
-        if(success != 0)
+        if (success != 0)
         {
                 NSK_COMPLAIN1("MonitorExit return non-zero: %d\n", success);
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jni/JNIreferences.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jni/JNIreferences.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -37,31 +37,31 @@
         jint i;
         jint result = -1;
 
-        if(globalReferences == NULL)
+        if (globalReferences == NULL)
         {
                 globalReferences = (jobject*)malloc(sizeof(jobject) * maxJNIGlobalReferences);
 
-                if(globalReferences == NULL)
+                if (globalReferences == NULL)
                 {
                         NSK_COMPLAIN0("malloc return NULL\n");
                         return -1;
                 }
 
-                for(i = 0; i < maxJNIGlobalReferences; i++)
+                for (i = 0; i < maxJNIGlobalReferences; i++)
                 {
                         globalReferences[i] = NULL;
                 }
         }
 
-        for(i = 0; i < maxJNIGlobalReferences; i++)
+        for (i = 0; i < maxJNIGlobalReferences; i++)
         {
                 jobject reference = globalReferences[i];
 
-                if(reference == NULL)
+                if (reference == NULL)
                 {
                         reference = env->NewGlobalRef(object);
 
-                        if(reference == NULL)
+                        if (reference == NULL)
                         {
                                 NSK_COMPLAIN0("NewGlobalRef return NULL\n");
 
@@ -87,7 +87,7 @@
 {
         jobject reference = globalReferences[index];
 
-        if(reference == NULL)
+        if (reference == NULL)
         {
                 NSK_COMPLAIN1("globalReferences[%d] = NULL, possible wrong index is passed\n", index);
 
@@ -109,7 +109,7 @@
         jobject reference = env->NewLocalRef(object);
         jclass klass;
 
-        if(reference == NULL)
+        if (reference == NULL)
         {
                 NSK_COMPLAIN0("NewLocalRef return NULL\n");
 
@@ -136,32 +136,32 @@
         jint i;
         jint result = -1;
 
-        if(weakReferences == NULL)
+        if (weakReferences == NULL)
         {
                 weakReferences = (jweak*)malloc(sizeof(jweak) * maxJNIWeakReferences);
 
-                if(weakReferences == NULL)
+                if (weakReferences == NULL)
                 {
                         NSK_COMPLAIN0("malloc return NULL\n");
 
                         return -1;
                 }
 
-                for(i = 0; i < maxJNIWeakReferences; i++)
+                for (i = 0; i < maxJNIWeakReferences; i++)
                 {
                         weakReferences[i] = NULL;
                 }
         }
 
-        for(i = 0; i < maxJNIWeakReferences; i++)
+        for (i = 0; i < maxJNIWeakReferences; i++)
         {
                 jobject reference = weakReferences[i];
 
-                if(reference == NULL)
+                if (reference == NULL)
                 {
                         reference = env->NewWeakGlobalRef(object);
 
-                        if(reference == NULL)
+                        if (reference == NULL)
                         {
                                 NSK_COMPLAIN0("NewWeakGlobalRef return NULL\n");
 
@@ -187,7 +187,7 @@
 {
         jweak reference = weakReferences[index];
 
-        if(reference == NULL)
+        if (reference == NULL)
         {
                 NSK_COMPLAIN1("weakReferences[%d] = NULL, possible wrong index is passed\n", index);
 
@@ -196,7 +196,7 @@
                     "Requested weakReferences[] element is NULL, possible wrong index is passed");
         }
 
-        if(env->IsSameObject(reference, NULL) == JNI_TRUE)
+        if (env->IsSameObject(reference, NULL) == JNI_TRUE)
         {
                 NSK_COMPLAIN0("TEST BUG: Weak reference was collected\n");
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/Injector.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/Injector.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -377,7 +377,7 @@
     static u2 calculateOffsetDelta(u2 frameNumber, u2 frameOffsetDelta) {
         u2 oldOffset;
         u2 newOffset;
-        if(frameNumber == 0) {
+        if (frameNumber == 0) {
             stackFrameOffset = frameOffsetDelta;
             return (u2) map[stackFrameOffset];
         } else {
@@ -392,10 +392,10 @@
         u2 i;
         u2 offset;
         u1 tag;
-        for(i=0; i<count; i++) {
+        for (i=0; i<count; i++) {
             tag = get_u1();
             put_u1(tag);
-            if(tag == ITEM_Object) {
+            if (tag == ITEM_Object) {
                 copy_u2();
             } else if (tag == ITEM_Uninitialized) {
                 copy_u2();
@@ -421,10 +421,10 @@
 
 
 
-        for(i=0; i<number_of_entries; i++) {
+        for (i=0; i<number_of_entries; i++) {
             frame_type = get_u1();
 
-            if(frame_type <= SAME_END) {
+            if (frame_type <= SAME_END) {
                 // same_frame {
                 //        u1 frame_type = SAME; /* 0-63 */
                 // }
@@ -432,7 +432,7 @@
                 put_u1(SAME_FRAME_EXTENDED);
                 put_u2(calculateOffsetDelta(i, (u2) frame_type));
 
-            } else if((frame_type >= SAME_LOCALS_1_STACK_ITEM_BEGIN) && (frame_type<=SAME_LOCALS_1_STACK_ITEM_END)) {
+            } else if ((frame_type >= SAME_LOCALS_1_STACK_ITEM_BEGIN) && (frame_type<=SAME_LOCALS_1_STACK_ITEM_END)) {
                 // same_locals_1_stack_item_frame {
                 //         u1 frame_type = SAME_LOCALS_1_STACK_ITEM;/* 64-127 */
                 //         verification_type_info stack[1];
@@ -443,7 +443,7 @@
                 copyVerificationTypeInfo(1);
 
                 // Tags in the range [128-246] are reserved for future use.
-            } else if(frame_type == SAME_LOCALS_1_STACK_ITEM_EXTENDED) {
+            } else if (frame_type == SAME_LOCALS_1_STACK_ITEM_EXTENDED) {
                 // same_locals_1_stack_item_frame_extended {
                 //     u1 frame_type = SAME_LOCALS_1_STACK_ITEM_EXTENDED; /* 247 */
                 //     u2 offset_delta;
@@ -455,7 +455,7 @@
                 put_u2(calculateOffsetDelta(i, frameOffsetDelta));
                 copyVerificationTypeInfo(1);
 
-            } else if((frame_type >= CHOP_BEGIN) && (frame_type <= CHOP_END)) {
+            } else if ((frame_type >= CHOP_BEGIN) && (frame_type <= CHOP_END)) {
                 // chop_frame {
                 //         u1 frame_type = CHOP; /* 248-250 */
                 //         u2 offset_delta;
@@ -464,7 +464,7 @@
                 frameOffsetDelta = get_u2();
                 put_u2(calculateOffsetDelta(i, frameOffsetDelta));
 
-            } else if(frame_type == SAME_FRAME_EXTENDED) {
+            } else if (frame_type == SAME_FRAME_EXTENDED) {
                 // same_frame_extended {
                 //     u1 frame_type = SAME_FRAME_EXTENDED; /* 251 */
                 //     u2 offset_delta;
@@ -474,7 +474,7 @@
                 frameOffsetDelta = get_u2();
                 put_u2(calculateOffsetDelta(i, frameOffsetDelta));
 
-            } else if((frame_type >= APPEND_BEGIN) && (frame_type <= APPEND_END)) {
+            } else if ((frame_type >= APPEND_BEGIN) && (frame_type <= APPEND_END)) {
                 // append_frame {
                 //     u1 frame_type = APPEND; /* 252-254 */
                 //     u2 offset_delta;
@@ -486,7 +486,7 @@
                 put_u2(calculateOffsetDelta(i, frameOffsetDelta));
                 copyVerificationTypeInfo((u1)(frame_type - 251));
 
-            } else if(frame_type == FULL_FRAME) {
+            } else if (frame_type == FULL_FRAME) {
                 // sfull_frame {
                 //    u1 frame_type = FULL_FRAME; /* 255 */
                 //    u2 offset_delta;
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/aod/jvmti_aod.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/aod/jvmti_aod.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -116,7 +116,7 @@
 
 int nsk_jvmti_aod_getThreadName(jvmtiEnv * jvmti, jthread thread, char threadNameBuffer[]) {
     jvmtiThreadInfo info;
-    if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(thread, &info))){
+    if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(thread, &info))) {
         NSK_COMPLAIN0("Failed to get thread info\n");
         threadNameBuffer[0] = '\0';
         return NSK_FALSE;
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -268,7 +268,7 @@
          * If this break is not there then It will expects
          * to have. so a space should be sufficient as well.
          */
-        for(val_len=0; !(*opt_end == '\0' || isOptSep(*opt_end)); opt_end++,val_len++) {
+        for (val_len=0; !(*opt_end == '\0' || isOptSep(*opt_end)); opt_end++,val_len++) {
             //if (*opt_end == NSK_JVMTI_OPTION_START) {
             //    break;
             //}
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/locks/JNIMonitorLocker.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/locks/JNIMonitorLocker.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -59,7 +59,7 @@
 
         success = env->MonitorEnter(thisObject);
 
-        if(success != 0)
+        if (success != 0)
         {
                 NSK_COMPLAIN1("MonitorEnter return non-zero: %d\n", success);
 
@@ -103,7 +103,7 @@
 
         success = env->MonitorExit(thisObject);
 
-        if(success != 0)
+        if (success != 0)
         {
                 NSK_COMPLAIN1("MonitorExit return non-zero: %d\n", success);
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/locks/LockingThread.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/locks/LockingThread.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -34,7 +34,7 @@
 
         success  = env->MonitorEnter(object);
 
-        if(success != 0)
+        if (success != 0)
         {
                 NSK_COMPLAIN1("MonitorEnter return non-zero: %d\n", success);
 
@@ -50,7 +50,7 @@
 
         success  = env->MonitorExit(object);
 
-        if(success != 0)
+        if (success != 0)
         {
                 NSK_COMPLAIN1("MonitorExit return non-zero: %d\n", success);
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress001.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress001.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -72,7 +72,7 @@
         for (j=0;j<nstr;j++)
             element->checkstr[j] = (char *)c_malloc(env, DIGESTLENGTH*sizeof(char));
     }
-    for(j=0;j<DIGESTLENGTH;j++) {
+    for (j=0;j<DIGESTLENGTH;j++) {
         digest[j]=0;
     }
     element->str[allocs] = env->GetStringUTFChars(jstr,0); CE
@@ -97,7 +97,7 @@
         tmpstr=env->NewStringUTF(element->str[allocs-1]); CE
         for (j=0; j<nstr; j++) {
 
-            for(i=0;i<DIGESTLENGTH;i++) {
+            for (i=0;i<DIGESTLENGTH;i++) {
                 digest[i]=0;
             }
             for (k=0; k < strlen(element->str[j]); k++) {
@@ -168,7 +168,7 @@
         for (j=0;j<nstr;j++)
             javachars->checkstr[j] = (char *)c_malloc(env, DIGESTLENGTH*sizeof(char));
     }
-    for(j=0;j<DIGESTLENGTH;j++) {
+    for (j=0;j<DIGESTLENGTH;j++) {
         digest[j]=0;
     }
     javachars->str[index] = env->GetStringChars(jstr,0); CE
@@ -181,7 +181,7 @@
     }
 
     //memcpy(digest, elem, javachars->size[index]);
-    for(j=0;j<elem_len; j++) {
+    for (j=0;j<elem_len; j++) {
         digest[j % DIGESTLENGTH]+=elem[j];
     }
     memcpy(javachars->checkstr[index++],digest,DIGESTLENGTH);
@@ -201,10 +201,10 @@
                 elem[i] = (char) javachars->str[j][i];
             }
             //memcpy(digest, elem, javachars->size[j]);
-            for(i=0;i<DIGESTLENGTH;i++) {
+            for (i=0;i<DIGESTLENGTH;i++) {
                 digest[i]=0;
             }
-            for(i=0;i<javachars->size[j]; i++) {
+            for (i=0;i<javachars->size[j]; i++) {
                 digest[i % DIGESTLENGTH]+=elem[i];
             }
             free(elem);
@@ -217,7 +217,7 @@
             else {
                 equal=0;
                 printf("The Unicode element No. %d has been corrupted\n",j);
-                for(i=0;i<DIGESTLENGTH;i++) {
+                for (i=0;i<DIGESTLENGTH;i++) {
                     printf("digest[%d]=%02x checkstr[%d]=%02x\n",i,digest[i],i,javachars->checkstr[j][i]);
                 }
             }
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress003.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress003.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -67,7 +67,7 @@
     arrayArray[FLOAT]=env->NewFloatArray(SIZE); CE
     arrayArray[DOUBLE]=env->NewDoubleArray(SIZE); CE
 
-    for(i=0;i<8;i++)
+    for (i=0;i<8;i++)
     {env->SetObjectArrayElement(objectsArray,i,arrayArray[i]); CE }
 
     boolBuf=(jboolean *)malloc(SIZE*sizeof(jboolean));
@@ -163,7 +163,7 @@
     env->MonitorExit(jobj); CE
     arrayOrig=(jarray *)malloc(8*sizeof(jarray));
     arrayClone=(jarray *)malloc(8*sizeof(jarray));
-    for(i=0;i<8;i++) {
+    for (i=0;i<8;i++) {
     arrayOrig[i]=(jarray) env->GetObjectArrayElement(orig,i); CE
     arrayClone[i]=(jarray) env->GetObjectArrayElement(clone,i); CE
     }
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress004.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress004.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -43,7 +43,7 @@
     char *str;
     jint len=env->GetStringUTFLength(jstr); CE
 
-    for(i=0;i<DIGESTLENGTH;i++) {
+    for (i=0;i<DIGESTLENGTH;i++) {
       digest[i]=0;
     }
     str=(char *)malloc(len*sizeof(char));
@@ -56,10 +56,10 @@
         env->ExceptionClear();
     }
     critstr=env->GetStringCritical(jstr, 0); CE
-    for(i=0;i<len;i++)
+    for (i=0;i<len;i++)
     str[i] = (char) critstr[i];
     env->ReleaseStringCritical(jstr,critstr); CE
-    for(i=0;i<len;i++) {
+    for (i=0;i<len;i++) {
         digest[i % DIGESTLENGTH]+=str[i];
     }
     free(str);
@@ -93,7 +93,7 @@
     jint len;
     jchar *ch;
 
-    for(i=0;i<DIGESTLENGTH;i++) {
+    for (i=0;i<DIGESTLENGTH;i++) {
       digest[i]=0;
     }
     strlen =  env->GetStringUTFLength(jstr); CE
@@ -112,10 +112,10 @@
         env->ExceptionClear();
     }
     critstr=env->GetStringCritical(jstr, 0); CE
-    for(i=0;i<strlen;i++)
+    for (i=0;i<strlen;i++)
     str[i] = (char) critstr[i];
     env->ReleaseStringCritical(jstr,critstr); CE
-    for(i=0;i<strlen; i++) {
+    for (i=0;i<strlen; i++) {
       digest[i % DIGESTLENGTH]+=str[i % DIGESTLENGTH];
     }
 
@@ -139,8 +139,8 @@
     ch=(jchar *)env->GetPrimitiveArrayCritical(cArr,0); CE
 
     printf("Comparing: ");
-    for(i=0;i<len;i++)
-    if(ch[i]!=tmp[i]) {
+    for (i=0;i<len;i++)
+    if (ch[i]!=tmp[i]) {
         printf("Error in %d\n",i);
         printf("ch[%d]=%02x tmp[%d]=%02x\n",i,ch[i],i,tmp[i]);
         ret=JNI_FALSE;
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress005.cpp	Mon Nov 12 22:00:07 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress005.cpp	Mon Nov 12 13:13:00 2018 -0800
@@ -55,7 +55,7 @@
     env->MonitorEnter(jobj);
     CHECK_EXCEPTION
     if (!env->Throw(tobj)) {
-    if(env->ExceptionOccurred())
+    if (env->ExceptionOccurred())
         if (Exceptcalls%1000==0)
         fprintf(stderr, "NATIVE: Throw has been catched in native\n");
     env->ExceptionClear();