Buggy code:
@ Repository ( "questionDao" ) public class QuestionDao { @ Autowired private JdbcTemplate jdbcTemplate ; public void saveReply ( String reply , int replyTo , String replyUser ) { } public List < Object > getReplys ( String question ) { List < Object > replys = new ArrayList < Object > ( ) ; StringBuffer comSql = new StringBuffer ( ) ; comSql . append ( ( "(SELECT<seq2seq4repair_space>c.id<seq2seq4repair_space>id<seq2seq4repair_space>," + ( ( ( "'游客'" + "<seq2seq4repair_space>name,q.question<seq2seq4repair_space>question,c.reply<seq2seq4repair_space>reply<seq2seq4repair_space>," ) + "''" ) + "<seq2seq4repair_space>pic<seq2seq4repair_space>FROM<seq2seq4repair_space>" ) ) ) ; comSql . append ( "t_question_reply<seq2seq4repair_space>c<seq2seq4repair_space>INNER<seq2seq4repair_space>JOIN<seq2seq4repair_space>t_question<seq2seq4repair_space>q<seq2seq4repair_space>ON<seq2seq4repair_space>c.replyTo<seq2seq4repair_space>=<seq2seq4repair_space>q.id<seq2seq4repair_space>" ) ; comSql . append ( "<seq2seq4repair_space>WHERE<seq2seq4repair_space>" ) ; comSql . append ( "<seq2seq4repair_space>c.replyUser<seq2seq4repair_space>=''<seq2seq4repair_space>" ) ; comSql . append ( ( ( "<seq2seq4repair_space>AND<seq2seq4repair_space>c.replyTo<seq2seq4repair_space>=<seq2seq4repair_space>'" + question ) + "'" ) ) ; comSql . append ( "<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>c.id<seq2seq4repair_space>desc)" ) ; comSql . append ( "<seq2seq4repair_space>UNION<seq2seq4repair_space>" ) ; comSql . append ( ( "(SELECT<seq2seq4repair_space>c.id<seq2seq4repair_space>id,u.name<seq2seq4repair_space>name,q.question<seq2seq4repair_space>question<seq2seq4repair_space>,c.reply<seq2seq4repair_space>reply,<seq2seq4repair_space>" + ( "(SELECT<seq2seq4repair_space>min(local_path)<seq2seq4repair_space>from<seq2seq4repair_space>t_file<seq2seq4repair_space>where<seq2seq4repair_space>pk_user<seq2seq4repair_space>=<seq2seq4repair_space>c.replyUser<seq2seq4repair_space>and<seq2seq4repair_space>fileType<seq2seq4repair_space>=<seq2seq4repair_space>'1'<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>id<seq2seq4repair_space>)<seq2seq4repair_space>pic<seq2seq4repair_space>" + "FROM<seq2seq4repair_space>" ) ) ) ; comSql . append ( "t_question_reply<seq2seq4repair_space>c<seq2seq4repair_space>INNER<seq2seq4repair_space>JOIN<seq2seq4repair_space>t_user<seq2seq4repair_space>u<seq2seq4repair_space>" ) ; comSql . append ( "<seq2seq4repair_space>ON<seq2seq4repair_space>c.replyUser<seq2seq4repair_space>=<seq2seq4repair_space>u.id<seq2seq4repair_space>" ) ; comSql . append ( "<seq2seq4repair_space>INNER<seq2seq4repair_space>JOIN<seq2seq4repair_space>t_question<seq2seq4repair_space>q<seq2seq4repair_space>ON<seq2seq4repair_space>c.replyTo<seq2seq4repair_space>=<seq2seq4repair_space>q.id<seq2seq4repair_space>" ) ; comSql . append ( ( ( "<seq2seq4repair_space>WHERE<seq2seq4repair_space>c.replyTo<seq2seq4repair_space>=<seq2seq4repair_space>'" + question ) + "'" ) ) ; comSql . append ( "<seq2seq4repair_space>AND<seq2seq4repair_space>c.replyUser<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>null" ) ; comSql . append ( "<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>c.id<seq2seq4repair_space>desc)" ) ; comSql . append ( "<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>id<seq2seq4repair_space>desc<seq2seq4repair_space>" ) ; System . out . println ( ( "SSSS" + ( comSql . toString ( ) ) ) ) ; List rows = jdbcTemplate . queryForList ( comSql . toString ( ) ) ; Iterator it = rows . iterator ( ) ; while ( it . hasNext ( ) ) { Map userMap = ( ( Map ) ( it . next ( ) ) ) ; String username = ( ( String ) ( userMap . get ( "name" ) ) ) ; String pic = ( ( String ) ( userMap . get ( "pic" ) ) ) ; if ( ( ( pic == null ) || ( "" . equals ( pic ) ) ) && ( ! ( "游客" . equals ( username ) ) ) ) { <START_BUG> pic = "//simi//bgimg//cover.jpg" ; <END_BUG> userMap . put ( "pic" , pic ) ; } replys . add ( userMap ) ; } return replys ; } public String getQuestionNameById ( String userId ) { } }

Fix:
pic = "//simi//user//file.do?file=default.jpg&userId=default" ;