Fix some FIXMEs

- Some pull request closed without change state to 'merged'.Therefore, checking state equals 'closed'.
- Allow pull request relates to multi upstream pull request or bugzilla issue.
- Use .equals() to check flag status.