diff --git a/testApps/ChatGPT_Benchmarks/EXN_nullptr/app_bug/app/src/main/java/com/example/nullptr/MainActivity.java b/testApps/ChatGPT_Benchmarks/EXN_nullptr/app_bug/app/src/main/java/com/example/nullptr/MainActivity.java index dfe6adbd..4a2ab4ce 100644 --- a/testApps/ChatGPT_Benchmarks/EXN_nullptr/app_bug/app/src/main/java/com/example/nullptr/MainActivity.java +++ b/testApps/ChatGPT_Benchmarks/EXN_nullptr/app_bug/app/src/main/java/com/example/nullptr/MainActivity.java @@ -44,7 +44,7 @@ protected void onCreate(Bundle savedInstanceState) { public void launchSecondActivity() { Intent intent = new Intent(this, SecondActivity.class); Log.i("histInstrumentation"," " + System.identityHashCode(intent) + " = new Intent " + System.identityHashCode(this) + " " + System.identityHashCode(SecondActivity.class)); - String key = "extra_data"; + String key = new String("extra_data"); String val = "Hello, SecondActivity!"; intent.putExtra(key,val); Log.i("histInstrumentation","ci " + System.identityHashCode(intent) + " putExtra " + System.identityHashCode(key) + " " + System.identityHashCode(val)); @@ -52,4 +52,4 @@ public void launchSecondActivity() { Log.i("histInstrumentation","ci " + System.identityHashCode(this) + " startActivity " + System.identityHashCode(intent)); } -} \ No newline at end of file +} diff --git a/testApps/ChatGPT_Benchmarks/EXN_nullptr/app_bug/app/src/main/java/com/example/nullptr/SecondActivity.java b/testApps/ChatGPT_Benchmarks/EXN_nullptr/app_bug/app/src/main/java/com/example/nullptr/SecondActivity.java index 2a7fee5b..251cff36 100644 --- a/testApps/ChatGPT_Benchmarks/EXN_nullptr/app_bug/app/src/main/java/com/example/nullptr/SecondActivity.java +++ b/testApps/ChatGPT_Benchmarks/EXN_nullptr/app_bug/app/src/main/java/com/example/nullptr/SecondActivity.java @@ -16,7 +16,7 @@ protected void onCreate(Bundle savedInstanceState) { // Attempting to retrieve the extra data and display it Intent tmp1 = getIntent(); Log.i("histInstrumentation",System.identityHashCode(tmp1) + " = ci " + System.identityHashCode(this) + " getIntent " ); - String key = "extra_data"; + String key = new String("extra_data"); String data = tmp1.getStringExtra(key); // This key is incorrect Log.i("histInstrumentation",System.identityHashCode(data) + " = ci " + System.identityHashCode(tmp1) + " getStringExtra " + System.identityHashCode(key) ); TextView textView = findViewById(R.id.textView);