Buggy code:
i >= 0 ; i -- ) { Status status = statuses . get ( i ) ; if ( ( status . getId ( ) ) < ( user . getLatestId ( ) ) ) continue ; String name = status . getUser ( ) . getScreenName ( ) ; String statusText = status . getText ( ) ; Twitter2Others . log . info ( String . format ( "@%s<seq2seq4repair_space>-<seq2seq4repair_space>%s" , name , statusText ) ) ; try { if ( status . isRetweet ( ) ) { Twitter2Others . log . info ( ( "It's<seq2seq4repair_space>Retweet:" + statusText ) ) ; if ( user . isDropRetweets ( ) ) { user . setLatestId ( status . getId ( ) ) ; Twitter2Others . log . debug ( ( ( "Skipped<seq2seq4repair_space>" + statusText ) + "<seq2seq4repair_space>because<seq2seq4repair_space>status<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>retweet." ) ) ; continue ; } else { filters . remove ( mappingFilter ) ; filters . remove ( mentionFilter ) ; filters . remove ( menFilter ) ; filters . use ( retweetFilter ) ; } } else { Twitter2Others . log . info ( ( "It's<seq2seq4repair_space>not<seq2seq4repair_space>Retweet:" + statusText ) ) ; if ( ( user . isDropMentions ( ) ) && ( ! ( status . getSource ( ) . equalsIgnoreCase ( "foursquare" ) ) ) ) { filters . remove ( mappingFilter ) ; filters . remove ( retweetFilter ) ; filters . remove ( menFilter ) ; filters . use ( mentionFilter ) ; } else { filters . remove ( mentionFilter ) ; filters . remove ( retweetFilter ) ; filters . use ( mappingFilter ) ; filters . use ( menFilter ) ; } } statusText = filters . filter ( statusText ) ; if ( statusText == null ) { user . setLatestId ( status . getId ( ) ) ; Twitter2Others . log . info ( String . format ( "Skipped<seq2seq4repair_space>%s<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>filter." , statusText ) ) ; continue ; } byte [ ] image = null ; GeoLocation location = null ; String statusTextWithImageURL = statusText ; if ( ! ( user . isNoImage ( ) ) ) { MediaEntity [ ] mediaEntities = status . getMediaEntities ( ) ; if ( mediaEntities != null ) { for ( MediaEntity entity : mediaEntities ) { statusText += "<seq2seq4repair_space>" + ( entity . getMediaURL ( ) ) ; } Twitter2Others . log . info ( ( "with<seq2seq4repair_space>media<seq2seq4repair_space>url:<seq2seq4repair_space>" + statusText ) ) ; } StatusImageExtractor ex = new StatusImageExtractor ( ) ; StringBuffer buf = new StringBuffer ( statusText ) ; image = ex . extract ( buf ) ; if ( image != null ) { statusText = buf . toString ( ) ; } } if ( user . isWithGeo ( ) ) { location = status . getGeoLocation ( ) ; } if ( user . isSyncWeibo ( ) ) { try { if ( ( image != null ) && ( location != null ) ) { weibo . uploadStatus ( statusText , new ImageItem ( image ) , location . getLatitude ( ) , location . getLongitude ( ) ) ; Twitter2Others . log . info ( String . format ( "Weibo<seq2seq4repair_space>@%s<seq2seq4repair_space>-<seq2seq4repair_space>%s<seq2seq4repair_space>sent<seq2seq4repair_space>with<seq2seq4repair_space>image&geo." , name , statusText ) ) ; } else if ( ( image != null ) && ( location == null ) ) { weibo . uploadStatus ( statusText , new ImageItem ( image ) ) ; Twitter2Others . log . info ( String . format ( "Weibo<seq2seq4repair_space>@%s<seq2seq4repair_space>-<seq2seq4repair_space>%s<seq2seq4repair_space>sent<seq2seq4repair_space>with<seq2seq4repair_space>image." , name , statusText ) ) ; } else if ( ( image == null ) && ( location != null ) ) { weibo . updateStatus ( statusText , location . getLatitude ( ) , location . getLongitude ( ) ) ; Twitter2Others . log . info ( String . format ( "Weibo<seq2seq4repair_space>@%s<seq2seq4repair_space>-<seq2seq4repair_space>%s<seq2seq4repair_space>sent<seq2seq4repair_space>with<seq2seq4repair_space>geo." , name , statusText ) ) ; } else { weibo . updateStatus ( statusText ) ; Twitter2Others . log . info ( String . format ( "Weibo<seq2seq4repair_space>@%s<seq2seq4repair_space>-<seq2seq4repair_space>%s<seq2seq4repair_space>sent." , name , statusText ) ) ; } try { <START_BUG> Thread . sleep ( 1000 ) ; <END_BUG> } catch ( InterruptedException ex ) { Twitter2Others . log . error ( "Thread.sleep<seq2seq4repair_space>failed" ) ; } } catch ( WeiboException e ) { Twitter2Others . log . error ( "Faile<seq2seq4repair_space>to<seq2seq4repair_space>update<seq2seq4repair_space>Weibo." , e ) ; } } if ( user . isSyncFanfou ( ) ) { try { if ( ( image != null ) && ( location == null ) ) { fanfou4j . Status fStatus = fanfou . uploadStatus ( statusText , new fanfou4j . http . ImageItem ( "photo" , image ) ) ; if ( ( fStatus != null ) && ( ( fStatus . getId ( ) ) != null ) ) { Twitter2Others . log . info ( String . format ( "Fanfou<seq2seq4repair_space>@%s<seq2seq4repair_space>-<seq2seq4repair_space>%s<seq2seq4repair_space>sent<seq2seq4repair_space>with<seq2seq4repair_space>image." , name , statusText ) ) ; } else { fanfou . updateStatus ( statusTextWithImageURL ) ; Twitter2Others . log . info ( String . format ( "Fanfou<seq2seq4repair_space>@%s<seq2seq4repair_space>-<seq2seq4repair_space>%s<seq2seq4repair_space>sent." , name , statusText ) ) ; } } else if ( ( image == null ) && ( location != null ) ) { fanfou . updateStatus ( statusText , location . getLatitude ( ) , location . getLongitude ( ) ) ; Twitter2Others . log . info ( String . format ( "Fanfou<seq2seq4repair_space>@%s<seq2seq4repair_space>-<seq2seq4repair_space>%s<seq2seq4repair_space>sent<seq2seq4repair_space>with<seq2seq4repair_space>geo." , name , statusText ) ) ; } else { fanfou . updateStatus ( statusText ) ; Twitter2Others . log . info ( String . format ( "Fanfou<seq2seq4repair_space>@%s<seq2seq4repair_space>-<seq2seq4repair_space>%s<seq2seq4repair_space>sent." , name , statusText ) ) ; } try { Thread . sleep ( 1000 ) ; } catch ( InterruptedException ex ) { Twitter2Others . log . error ( "Thread.sleep<seq2seq4repair_space>failed" ) ; } } catch ( FanfouException e ) { Twitter2Others . log . error ( "Faile<seq2seq4repair_space>to<seq2seq4repair_space>update<seq2seq4repair_space>Fanfou." , e ) ; } } } catch ( WeiboException e ) { if ( ( e . getStatusCode ( ) ) != 400 ) { Twitter2Others . log . warn ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>update<seq2seq4repair_space>Weibo" ) ; break ;

Fix:
Thread . sleep ( 500 ) ;