Buggy code:
public class JMeterReport implements JMeterPlugin { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final int PROPFILE_OPT = 'p' ; private static final int PROPFILE2_OPT = 'q' ; private static final int TESTFILE_OPT = 't' ; private static final int LOGFILE_OPT = 'l' ; private static final int NONGUI_OPT = 'n' ; private static final int HELP_OPT = 'h' ; private static final int VERSION_OPT = 'v' ; private static final int SERVER_OPT = 's' ; private static final int JMETER_PROPERTY = 'J' ; private static final int SYSTEM_PROPERTY = 'D' ; private static final int LOGLEVEL = 'L' ; private static final int REMOTE_OPT = 'r' ; private static final int JMETER_HOME_OPT = 'd' ; private JMeterReport parent ; private static final CLOptionDescriptor [ ] options = new CLOptionDescriptor [ ] { new CLOptionDescriptor ( "help" , CLOptionDescriptor . ARGUMENT_DISALLOWED , JMeterReport . HELP_OPT , "print<seq2seq4repair_space>usage<seq2seq4repair_space>information<seq2seq4repair_space>and<seq2seq4repair_space>exit" ) , new CLOptionDescriptor ( "version" , CLOptionDescriptor . ARGUMENT_DISALLOWED , JMeterReport . VERSION_OPT , "print<seq2seq4repair_space>the<seq2seq4repair_space>version<seq2seq4repair_space>information<seq2seq4repair_space>and<seq2seq4repair_space>exit" ) , new CLOptionDescriptor ( "propfile" , CLOptionDescriptor . ARGUMENT_REQUIRED , JMeterReport . PROPFILE_OPT , "the<seq2seq4repair_space>jmeter<seq2seq4repair_space>property<seq2seq4repair_space>file<seq2seq4repair_space>to<seq2seq4repair_space>use" ) , new CLOptionDescriptor ( "addprop" , ( ( CLOptionDescriptor . ARGUMENT_REQUIRED ) | ( CLOptionDescriptor . DUPLICATES_ALLOWED ) ) , JMeterReport . PROPFILE2_OPT , "additional<seq2seq4repair_space>property<seq2seq4repair_space>file(s)" ) , new CLOptionDescriptor ( "testfile" , CLOptionDescriptor . ARGUMENT_REQUIRED , JMeterReport . TESTFILE_OPT , "the<seq2seq4repair_space>jmeter<seq2seq4repair_space>test(.jmx)<seq2seq4repair_space>file<seq2seq4repair_space>to<seq2seq4repair_space>run" ) , new CLOptionDescriptor ( "logfile" , CLOptionDescriptor . ARGUMENT_REQUIRED , JMeterReport . LOGFILE_OPT , "the<seq2seq4repair_space>file<seq2seq4repair_space>to<seq2seq4repair_space>log<seq2seq4repair_space>samples<seq2seq4repair_space>to" ) , new CLOptionDescriptor ( "nongui" , CLOptionDescriptor . ARGUMENT_DISALLOWED , JMeterReport . NONGUI_OPT , "run<seq2seq4repair_space>JMeter<seq2seq4repair_space>in<seq2seq4repair_space>nongui<seq2seq4repair_space>mode" ) , new CLOptionDescriptor ( "server" , CLOptionDescriptor . ARGUMENT_DISALLOWED , JMeterReport . SERVER_OPT , "run<seq2seq4repair_space>the<seq2seq4repair_space>JMeter<seq2seq4repair_space>server" ) , new CLOptionDescriptor ( "jmeterproperty" , ( ( CLOptionDescriptor . DUPLICATES_ALLOWED ) | ( CLOptionDescriptor . ARGUMENTS_REQUIRED_2 ) ) , JMeterReport . JMETER_PROPERTY , "Define<seq2seq4repair_space>additional<seq2seq4repair_space>JMeter<seq2seq4repair_space>properties" ) , new CLOptionDescriptor ( "systemproperty" , ( ( CLOptionDescriptor . DUPLICATES_ALLOWED ) | ( CLOptionDescriptor . ARGUMENTS_REQUIRED_2 ) ) , JMeterReport . SYSTEM_PROPERTY , "Define<seq2seq4repair_space>additional<seq2seq4repair_space>JMeter<seq2seq4repair_space>properties" ) , new CLOptionDescriptor ( "loglevel" , ( ( CLOptionDescriptor . DUPLICATES_ALLOWED ) | ( CLOptionDescriptor . ARGUMENTS_REQUIRED_2 ) ) , JMeterReport . LOGLEVEL , ( "Define<seq2seq4repair_space>loglevel:<seq2seq4repair_space>[category=]level<seq2seq4repair_space>e.g.<seq2seq4repair_space>jorphan=INFO<seq2seq4repair_space>or<seq2seq4repair_space>" + "jmeter.util=DEBUG" ) ) , new CLOptionDescriptor ( "runremote" , CLOptionDescriptor . ARGUMENT_DISALLOWED , JMeterReport . REMOTE_OPT , "Start<seq2seq4repair_space>remote<seq2seq4repair_space>servers<seq2seq4repair_space>from<seq2seq4repair_space>non-gui<seq2seq4repair_space>mode" ) , new CLOptionDescriptor ( "homedir" , CLOptionDescriptor . ARGUMENT_REQUIRED , JMeterReport . JMETER_HOME_OPT , "the<seq2seq4repair_space>jmeter<seq2seq4repair_space>home<seq2seq4repair_space>directory<seq2seq4repair_space>to<seq2seq4repair_space>use" ) } ; transient boolean testEnded = false ; public JMeterReport ( ) { } private static final String [ ] [ ] DEFAULT_ICONS = new String [ ] [ ] { new String [ ] { AbstractListenerGui . class . getName ( ) , "org//apache//jmeter//images//meter.png" } , new String [ ] { AbstractConfigGui . class . getName ( ) , "org//apache//jmeter//images//testtubes.png" } , new String [ ] { HTMLReportWriterGui . class . getName ( ) , "org//apache//jmeter//images//new//pencil.png" } , new String [ ] { ReportPageGui . class . getName ( ) , "org//apache//jmeter//images//new//scroll.png" } , new String [ ] { ReportGui . class . getName ( ) , "org//apache//jmeter//images//new//book.png" } } ; public String [ ] [ ] getIconMappings ( ) { } public String [ ] [ ] getResourceBundles ( ) { } public void startNonGui ( CLOption testFile , CLOption logFile ) { <START_BUG> System . setProperty ( "JMeter.NonGui" , "true" ) ; <END_BUG> JMeterReport driver = new JMeterReport ( ) ; driver . parent = this ; PluginManager . install ( this , false ) ; } public void startGui ( CLOption testFile ) { } public void start ( String [ ] args ) { } private void initializeProperties ( CLArgsParser parser ) { } private void convertSubTree ( HashTree tree ) { } private static class ListenToTest implements Runnable , Remoteable , TestListener { int started = 0 ; private JMeterReport _parent ; private ListenToTest ( JMeterReport parent ) { } public synchronized void testEnded ( String host ) { } public void testEnded ( ) { } public synchronized void testStarted ( String host ) { } public void testStarted ( ) { } public void run ( ) { } public void testIterationStart ( LoopIterationEvent event ) { } } }

Fix:
System . setProperty ( JMETER_NON_GUI , "true" ) ;