Buggy code:
@ RestController @ RequestMapping ( "//release" ) public class ReleaseController extends BaseController { static final Logger logger = LoggerFactory . getLogger ( ReleaseController . class ) ; @ Resource ( name = "taskExecutor" ) private TaskExecutor taskExecutor ; @ Autowired private ProjectManager projectManager ; @ Autowired private ReleaseManager releaseManager ; @ RequestMapping ( "//doRelease" ) @ ResponseBody public Map < String , Object > doRelease ( HttpServletRequest request ) { } @ RequestMapping ( "//tailReleaseLog" ) public void tailReleaseLog ( HttpServletRequest request ) { } @ RequestMapping ( "//templateList" ) @ ResponseBody public Map < String , Object > templateList ( HttpServletRequest request ) { } private Map < String , Object > getTemplateInfoByName ( String templateName , LoginUser loginUser ) { } @ RequestMapping ( "//editTemplate" ) @ ResponseBody public Map < String , Object > editTemplate ( HttpServletRequest request ) { } private Map < String , Object > updateTemplateValidate ( HttpServletRequest request , LoginUser loginUser ) { } private Map < String , Object > addTemplate ( String templateName , LoginUser loginUser , String projectList ) { } private Map < String , Object > editTemplate ( String templateName , LoginUser loginUser , String projectList ) { } private Map < String , Object > delTemplate ( String templateName , LoginUser loginUser ) { } private List < TemplateProject > getTemplateProjectList ( String projectList ) { } @ RequestMapping ( "//recordList" ) @ ResponseBody public Map < String , Object > recordList ( HttpServletRequest request ) { } private Map < String , Object > getRecordsValidate ( HttpServletRequest request , LoginUser loginUser ) { } @ RequestMapping ( "//addRecord" ) @ ResponseBody public Map < String , Object > addRecord ( HttpServletRequest request ) { } private Map < String , Object > addRecordValidate ( HttpServletRequest request , LoginUser loginUser ) { } @ RequestMapping ( "//offLine" ) @ ResponseBody public Map < String , Object > offLine ( HttpServletRequest request ) { } @ RequestMapping ( "//killServer" ) @ ResponseBody public Map < String , Object > killServer ( HttpServletRequest request ) { } @ RequestMapping ( "//backUp" ) @ ResponseBody public Map < String , Object > backUp ( HttpServletRequest request ) { } @ RequestMapping ( "//scp" ) @ ResponseBody public Map < String , Object > scp ( HttpServletRequest request ) { } @ RequestMapping ( "//scpPatch" ) @ ResponseBody public Map < String , Object > scpPatch ( HttpServletRequest request ) { } @ RequestMapping ( "//startServer" ) @ ResponseBody public Map < String , Object > startServer ( HttpServletRequest request ) { } @ RequestMapping ( "//onLine" ) @ ResponseBody public Map < String , Object > onLine ( HttpServletRequest request ) { } private Map < String , Object > validate ( LoginUser userInfo , HttpServletRequest request ) { } @ RequestMapping ( "//tailServerLog" ) public void tailServerLog ( HttpServletRequest request ) { ReleaseController . logger . info ( "查询server日志开始------------------------" ) ; LoginUser loginUser = UserInfoUtil . getUserInfo ( request ) ; if ( loginUser == null ) { ReleaseController . logger . info ( "查询server日志,获取用户登录信息为空" ) ; return ; } String projectName = request . getParameter ( "projectName" ) ; String ip = request . getParameter ( "ip" ) ; String envName = request . getParameter ( "envName" ) ; if ( ( ( StringUtils . isEmpty ( projectName ) ) || ( StringUtils . isEmpty ( ip ) ) ) || ( StringUtils . isEmpty ( envName ) ) ) { ReleaseController . logger . info ( ( ( ( ( ( "查询server日志,参数存在空值,projectName=" + projectName ) + ",ip=" ) + ip ) + ",envName=" ) + envName ) ) ; return ; } ProjectInfo info = projectManager . getProjectInfo ( projectName ) ; if ( info == null ) { ReleaseController . logger . info ( ( "查询server日志,获取工程信息为空,projectName=" + projectName ) ) ; return ; } String logPath = "" ; String tomcatPath = "" ; String sshPort = "" ; for ( EnvInfo envInfo : info . getEnvList ( ) ) { if ( envName . equals ( envInfo . getEnvName ( ) ) ) { for ( TerminalInfo terminalInfo : envInfo . getMachineList ( ) ) { if ( ip . equals ( terminalInfo . getIp ( ) ) ) { logPath = terminalInfo . getLogPath ( ) ; tomcatPath = terminalInfo . getServerPath ( ) ; sshPort = terminalInfo . getSshPort ( ) ; break ; } } } } String [ ] params = new String [ 7 ] ; StringBuffer param = new StringBuffer ( ) ; param . append ( "cd<seq2seq4repair_space>" ) . append ( tomcatPath ) . append ( ";.//beetle_release_tomcat_log.sh<seq2seq4repair_space>" ) . append ( logPath ) ; params [ 0 ] = "ssh" ; params [ 1 ] = "-p" ; params [ 2 ] = sshPort ; params [ 3 ] = ( ( Constants . SSH_LOGIN_USER ) + "@" ) + ip ; params [ 4 ] = "-i" ; <START_BUG> params [ 5 ] = Constants . SSH_KEY_FILE ; <END_BUG> params [ 6 ] = param . toString ( ) ; String tokenId = "" ; Cookie [ ] cookies = request . getCookies ( ) ; if ( ( cookies != null ) && ( ( cookies . length ) != 0 ) ) { for ( int i = 0 ; i < ( cookies . length ) ; i ++ ) { Cookie cookie = cookies [ i ] ; if ( "tokenId" . equals ( cookie . getName ( ) ) ) { tokenId = cookie . getValue ( ) ; break ; } } } String threadId = SeqGenerate . getThreadId ( ) ; TailLogTask task = new TailLogTask ( params , tokenId , threadId ) ; this . taskExecutor . execute ( task ) ; threadMap . put ( threadId , task ) ; } }

Fix:
params [ 5 ] = ( ( "//home//" + ( Constants . SSH_LOGIN_USER ) ) + "//" ) + ( Constants . SSH_KEY_FILE ) ;