Buggy code:
@ Service ( "sandboxService" ) @ ManagedService ( path = "//sandbox//atmosphere//rpc" , interceptors = { AtmosphereResourceLifecycleInterceptor . class , TrackMessageSizeInterceptor . class , GwtRpcInterceptor . class , SuspendTrackerInterceptor . class , AtmosphereMessageInterceptor . class , IdleResourceInterceptor . class } ) public class SandboxServiceImpl implements SandboxService , InitializingBean { private static final Logger LOG = LoggerFactory . getLogger ( SandboxServiceImpl . class ) ; private static final String DEMO_PROJECTS_FOLDER = "demo_projects" ; private static final String DEMO_PROJECTS_XML_FILE = "demo_projects.xml" ; private static final String SANDBOX_ENV_FILE = "sandbox-env.properties" ; private static final String CHANGE_KAA_HOST_DIALOG_SHOWN_PROPERTY = "changeKaaHostDialogShown" ; private static final int MESSAGE_BROADCAST_TIMEOUT = 10000 ; private static final String ANALYTICS_USER_ID_FILE = "analytics_user_id" ; @ Autowired private CacheService cacheService ; @ Value ( "#{properties[sandbox_home]}" ) private String sandboxHome ; @ Value ( "#{properties[gui_change_host_enabled]}" ) private boolean guiChangeHostEnabled ; @ Value ( "#{properties[gui_get_logs_enabled]}" ) private boolean guiGetLogsEnabled ; @ Value ( "#{properties[enable_analytics]}" ) private boolean enableAnalytics ; @ Value ( "#{properties[analytics_tracking_id]}" ) private String analyticsTrackingId ; private Map < String , Project > projectsMap = new HashMap < > ( ) ; private static String [ ] sandboxEnv ; private static AtmosphereResourceFactory atmosphereResourceFactory ; private static String analyticsUserId ; @ Override public void afterPropertiesSet ( ) throws Exception { } private void prepareAnalytics ( ) throws IOException { } @ Ready public void onReady ( final AtmosphereResource r ) { } @ Disconnect public void disconnected ( AtmosphereResourceEvent event ) { } @ Post public void post ( AtmosphereResource r ) { } @ Override public String getKaaVersion ( ) throws SandboxServiceException { } @ Override public boolean changeKaaHostEnabled ( ) throws SandboxServiceException { } @ Override public boolean showChangeKaaHostDialog ( ) throws SandboxServiceException { } @ Override public void changeKaaHostDialogShown ( ) throws SandboxServiceException { } @ Override public void changeKaaHost ( String uuid , String host ) throws SandboxServiceException { } @ Override public boolean getLogsEnabled ( ) throws SandboxServiceException { } @ Override public void getLogsArchive ( ) throws SandboxServiceException { <START_BUG> if ( guiChangeHostEnabled ) { <END_BUG> SandboxServiceImpl . executeCommand ( null , new String [ ] { "sudo" , ( sandboxHome ) + "//create_logs_archive.sh" } , null ) ; } else { throw new SandboxServiceException ( "Get<seq2seq4repair_space>logs<seq2seq4repair_space>from<seq2seq4repair_space>GUI<seq2seq4repair_space>is<seq2seq4repair_space>disabled!" ) ; } } @ Override public void changeKaaLogLevel ( String uuid , String logLevel , Boolean removeOldLogs ) throws SandboxServiceException { } @ Override public String getKaaCurrentHost ( ) throws SandboxServiceException { } @ Override public LogLevel getKaaCurrentLogLevel ( ) throws SandboxServiceException { } @ Override public AnalyticsInfo getAnalyticsInfo ( ) throws SandboxServiceException { } @ Override public List < Project > getDemoProjects ( ) throws SandboxServiceException { } @ Override public Project getDemoProject ( String projectId ) throws SandboxServiceException { } @ Override public boolean checkProjectDataExists ( String projectId , ProjectDataType dataType ) throws SandboxServiceException { } @ Override public void buildProjectData ( String uuid , BuildOutputData outputData , String projectId , ProjectDataType dataType ) throws SandboxServiceException { } private static void executeCommand ( SandboxServiceImpl . ClientMessageOutputStream outStream , String [ ] command , File workingDir ) throws SandboxServiceException { } private static String executeCommand ( String ... command ) throws SandboxServiceException { } private static File createTempDirectory ( String prefix ) throws IOException { } private static void broadcastMessage ( String uuid , Object message ) { } class ClientMessageOutputStream extends OutputStream { private String resourceUuid ; private PrintStream out ; ClientMessageOutputStream ( String resourceUuid , PrintStream out ) { } @ Override public void write ( int b ) throws IOException { } @ Override public void write ( byte [ ] b , int off , int len ) throws IOException { } public void println ( String text ) { } } }

Fix:
if ( guiGetLogsEnabled ) {