Buggy code:
@ Repository ( "userDao" ) public class UserDao { @ Autowired private JdbcTemplate jdbcTemplate ; public int userRegister ( final JSONObject user ) { } public void savePicFile ( String userId , String localPath , String wx_url ) { } public void saveVoiceFile ( String userId , String localPath , String wx_url , String wx_current_id , String voiceTime ) { } public Map < String , String > getUserInfoById ( String userId ) { } public List < Object > getUserImgs ( String userId ) { } public Map < String , String > getUserVoiceById ( String userId ) { } public Map < String , String > getVoiceByWXid ( String wx_origin_id ) { } public void saveCommnet ( String commentUser , String beCommentedUser , String comment ) { } public List < Object > getUsercommnets ( String userId ) { List < Object > comments = new ArrayList < Object > ( ) ; StringBuffer comSql = new StringBuffer ( ) ; comSql . append ( ( "(SELECT<seq2seq4repair_space>c.id<seq2seq4repair_space>id<seq2seq4repair_space>," + ( ( ( "'游客'" + "<seq2seq4repair_space>name,c.comment<seq2seq4repair_space>comment<seq2seq4repair_space>," ) + "''" ) + "<seq2seq4repair_space>pic<seq2seq4repair_space>FROM<seq2seq4repair_space>" ) ) ) ; comSql . append ( "<seq2seq4repair_space>t_comment<seq2seq4repair_space>c" ) ; comSql . append ( ( ( "<seq2seq4repair_space>WHERE<seq2seq4repair_space>c.be_commented_user<seq2seq4repair_space>=<seq2seq4repair_space>'" + userId ) + "'" ) ) ; comSql . append ( "<seq2seq4repair_space>AND<seq2seq4repair_space>c.comment_user<seq2seq4repair_space>=''<seq2seq4repair_space>" ) ; 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,c.comment<seq2seq4repair_space>comment<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.comment_user<seq2seq4repair_space>and<seq2seq4repair_space>fileType<seq2seq4repair_space>=<seq2seq4repair_space>'1'<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>id)<seq2seq4repair_space>" + "pic<seq2seq4repair_space>FROM<seq2seq4repair_space>" ) ) ) ; comSql . append ( "<seq2seq4repair_space>t_comment<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.comment_user<seq2seq4repair_space>=<seq2seq4repair_space>u.id<seq2seq4repair_space>" ) ; comSql . append ( ( ( "<seq2seq4repair_space>WHERE<seq2seq4repair_space>c.be_commented_user<seq2seq4repair_space>=<seq2seq4repair_space>'" + userId ) + "'" ) ) ; comSql . append ( "<seq2seq4repair_space>AND<seq2seq4repair_space>c.comment_user<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 ( ( "评论列表" + ( 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 ) ; } comments . add ( userMap ) ; } return comments ; } public void saveDianZan ( String commentUser , String beCommentedUser , String comment ) { } public Boolean isUserPraised ( String zanUserId , String beZanUser ) { } public int getDianzanCountByUserId ( String beZanUser ) { } public List < Map < String , Object > > getUsersByType ( String type , int page ) { } public List < Map < String , Object > > getRenqiUsers ( ) { } public List < Map < String , Object > > getMokeUsers ( String searchKey , int page ) { } public void addPrice ( String userId , int price ) { } public void addRenqi ( String userId , int price ) { } public void updateVoice ( String oldId , String newId , long current ) { } public void updateAllUserPriceToOld ( ) { } public Boolean isEmailRepeat ( String email ) { } public boolean isNicknameRepeat ( String nickName ) { } public boolean isPhoneNumberRepeat ( String phone ) { } }

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