diff --git a/polyglot/piranha/test-resources/java/feature_flag_system_1/control/expected/XPFlagCleanerPositiveCases.java b/polyglot/piranha/test-resources/java/feature_flag_system_1/control/expected/XPFlagCleanerPositiveCases.java index 2670bd921..6b09cbf00 100644 --- a/polyglot/piranha/test-resources/java/feature_flag_system_1/control/expected/XPFlagCleanerPositiveCases.java +++ b/polyglot/piranha/test-resources/java/feature_flag_system_1/control/expected/XPFlagCleanerPositiveCases.java @@ -205,6 +205,10 @@ public int remove_else_if(boolean extra_toggle) { } } + public String multiple_stmt_after_return() { + return "not enabled"; + } + class XPTest { public boolean isToggleEnabled(TestExperimentName x) { return true; diff --git a/polyglot/piranha/test-resources/java/feature_flag_system_1/control/input/XPFlagCleanerPositiveCases.java b/polyglot/piranha/test-resources/java/feature_flag_system_1/control/input/XPFlagCleanerPositiveCases.java index db45b9c76..eaa962d93 100644 --- a/polyglot/piranha/test-resources/java/feature_flag_system_1/control/input/XPFlagCleanerPositiveCases.java +++ b/polyglot/piranha/test-resources/java/feature_flag_system_1/control/input/XPFlagCleanerPositiveCases.java @@ -267,6 +267,19 @@ public int remove_else_if(boolean extra_toggle) { } } + public String multiple_stmt_after_return() { + if (!experimentation.isToggleEnabled(TestExperimentName.STALE_FLAG)) { + return "not enabled"; + } + + System.out.println("remove 1"); + System.out.println("remove 2"); + System.out.println("remove 3"); + System.out.println("remove 4"); + System.out.println("remove 5"); + return "enabled"; + } + class XPTest { public boolean isToggleEnabled(TestExperimentName x) { return true;