Buggy code:
public class API implements APIProvider { private static final int MS_TO_SECONDS = 1000 ; private final Connection c ; public API ( Connection c ) { } @ Override public Result < Map < String , String > > getUsers ( ) { } private Long validateUsername ( String username ) throws SQLException { } @ Override public Result < PersonView > getPersonView ( String username ) { } @ Override public Result < List < SimpleForumSummaryView > > getSimpleForums ( ) { } @ Override public Result < Integer > countPostsInTopic ( long topicId ) { } private Long validateTopicId ( long topicId ) throws SQLException { } @ Override public Result < List < PersonView > > getLikers ( long topicId ) { } @ Override public Result < SimpleTopicView > getSimpleTopic ( long topicId ) { } @ Override public Result < PostView > getLatestPost ( long topicId ) { } @ Override public Result < List < ForumSummaryView > > getForums ( ) { } @ Override public Result createForum ( String title ) { } @ Override public Result createPost ( long topicId , String username , String text ) { } @ Override public Result addNewPerson ( String name , String username , String studentId ) { } @ Override public Result < ForumView > getForum ( long id ) { <START_BUG> final String STMT = "SELECT<seq2seq4repair_space>Forum.id<seq2seq4repair_space>AS<seq2seq4repair_space>id,<seq2seq4repair_space>Forum.title<seq2seq4repair_space>AS<seq2seq4repair_space>title,<seq2seq4repair_space>Topic.id<seq2seq4repair_space>AS<seq2seq4repair_space>topicId,<seq2seq4repair_space>Topic.title<seq2seq4repair_space>AS<seq2seq4repair_space>topicTitle<seq2seq4repair_space>" + ( "FROM<seq2seq4repair_space>Forum<seq2seq4repair_space>INNER<seq2seq4repair_space>JOIN<seq2seq4repair_space>Topic<seq2seq4repair_space>ON<seq2seq4repair_space>Forum.id<seq2seq4repair_space>=<seq2seq4repair_space>Topic.ForumId<seq2seq4repair_space>" + "WHERE<seq2seq4repair_space>forumId<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>Topic<seq2seq4repair_space>ASC;" ) ; <END_BUG> List < SimpleTopicSummaryView > topics = new ArrayList < > ( ) ; try ( PreparedStatement p = c . prepareStatement ( STMT ) ) { p . setInt ( 1 , ( ( int ) ( id ) ) ) ; ResultSet rs = p . executeQuery ( ) ; if ( rs . next ( ) ) { topics . add ( new SimpleTopicSummaryView ( rs . getLong ( "topicId" ) , rs . getLong ( "id" ) , rs . getString ( "topicTitle" ) ) ) ; } else { return Result . failure ( "Not<seq2seq4repair_space>found" ) ; } return Result . success ( new ForumView ( id , rs . getString ( "title" ) , topics ) ) ; } catch ( SQLException e ) { return Result . fatal ( e . getMessage ( ) ) ; } } private boolean validatePostCount ( long topicId , int page ) throws SQLException { } @ Override public Result < TopicView > getTopic ( long topicId , int page ) { } private boolean likeNeedsChanging ( long TopicId , long PersonId , boolean intendToLike ) throws SQLException { } @ Override public Result likeTopic ( String username , long topicId , boolean like ) { } @ Override public Result favouriteTopic ( String username , long topicId , boolean fav ) { } private String validateForumId ( long forumId ) throws SQLException { } @ Override public Result createTopic ( long forumId , String username , String title , String text ) { } @ Override public Result < List < AdvancedForumSummaryView > > getAdvancedForums ( ) { } @ Override public Result < AdvancedPersonView > getAdvancedPersonView ( String username ) { } @ Override public Result < AdvancedForumView > getAdvancedForum ( long id ) { } @ Override public Result likePost ( String username , long topicId , int post , boolean like ) { } No newline ; at end ; of file ; }

Fix:
final String STMT = "SELECT<seq2seq4repair_space>Forum.id<seq2seq4repair_space>AS<seq2seq4repair_space>id,<seq2seq4repair_space>Forum.title<seq2seq4repair_space>AS<seq2seq4repair_space>title,<seq2seq4repair_space>Topic.id<seq2seq4repair_space>AS<seq2seq4repair_space>topicId,<seq2seq4repair_space>Topic.title<seq2seq4repair_space>AS<seq2seq4repair_space>topicTitle<seq2seq4repair_space>" + ( "FROM<seq2seq4repair_space>Forum<seq2seq4repair_space>INNER<seq2seq4repair_space>JOIN<seq2seq4repair_space>Topic<seq2seq4repair_space>ON<seq2seq4repair_space>Forum.id<seq2seq4repair_space>=<seq2seq4repair_space>Topic.ForumId<seq2seq4repair_space>" + "WHERE<seq2seq4repair_space>forumId<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>Topic.title<seq2seq4repair_space>ASC;" ) ;