Buggy code:
@ Service public class OrderReadPlatformServiceImpl implements OrderReadPlatformService { private final JdbcTemplate jdbcTemplate ; private final PlatformSecurityContext context ; private static PriceReadPlatformService priceReadPlatformService ; @ Autowired public OrderReadPlatformServiceImpl ( final PlatformSecurityContext context , final TenantAwareRoutingDataSource dataSource , final PriceReadPlatformService priceReadPlatformService ) { } @ Override public List < PlanCodeData > retrieveAllPlatformData ( Long planId , Long clientId ) { } private static final class PeriodMapper implements RowMapper < PlanCodeData > { @ Override public PlanCodeData mapRow ( final ResultSet rs , final int rowNum ) throws SQLException { } } @ Override public List < PaytermData > retrieveAllPaytermData ( ) { } private static final class PaytermMapper implements RowMapper < PaytermData > { @ Override public PaytermData mapRow ( final ResultSet rs , final int rowNum ) throws SQLException { } } @ Override public List < OrderPriceData > retrieveOrderPriceData ( Long orderId ) { } private static final class OrderPriceMapper implements RowMapper < OrderPriceData > { public String schema ( ) { } @ Override public OrderPriceData mapRow ( final ResultSet rs , final int rowNum ) throws SQLException { } } @ Override public List < PaytermData > getChargeCodes ( Long planCode , Long clientId ) { } private static final class BillingFreaquencyMapper implements RowMapper < PaytermData > { @ Override public PaytermData mapRow ( final ResultSet rs , final int rowNum ) throws SQLException { } } @ Override public List < OrderPriceData > retrieveOrderPriceDetails ( Long orderId , Long clientId ) { } private static final class OrderPriceDataMapper implements RowMapper < OrderPriceData > { @ Override public OrderPriceData mapRow ( final ResultSet rs , final int rowNum ) throws SQLException { } } @ Override public List < OrderData > retrieveClientOrderDetails ( Long clientId ) { } private static final class ClientOrderMapper implements RowMapper < OrderData > { public String clientOrderLookupSchema ( ) { } @ Override public OrderData mapRow ( final ResultSet rs , final int rowNum ) throws SQLException { } } @ Override public List < OrderHistoryData > retrieveOrderHistoryDetails ( String orderNo ) { } private static final class OrderHistoryMapper implements RowMapper < OrderHistoryData > { public String clientOrderLookupSchema ( ) { } @ Override public OrderHistoryData mapRow ( final ResultSet rs , final int rowNum ) throws SQLException { } } @ Override public List < OrderData > getActivePlans ( Long clientId , String planType ) { } private static final class ActivePlanMapper implements RowMapper < OrderData > { public String activePlanLookupSchema ( ) { } @ Override public OrderData mapRow ( final ResultSet rs , final int rowNum ) throws SQLException { } } @ Override public OrderData retrieveOrderDetails ( Long orderId ) { } @ Override public Long getRetrackId ( Long id ) { } private static final class OSDMapper implements RowMapper < Long > { @ Override public Long mapRow ( final ResultSet rs , final int rowNum ) throws SQLException { } } @ Override public String getOSDTransactionType ( Long id ) { } private static final class OSDMapper1 implements RowMapper < String > { @ Override public String mapRow ( final ResultSet rs , final int rowNum ) throws SQLException { } } @ Override public String checkRetrackInterval ( final Long entityId ) { } @ Override public List < OrderLineData > retrieveOrderServiceDetails ( Long orderId ) { } private static final class ClientOrderServiceMapper implements RowMapper < OrderLineData > { public String orderServiceLookupSchema ( ) { } @ Override public OrderLineData mapRow ( final ResultSet rs , final int rowNum ) throws SQLException { } } @ Override public List < OrderDiscountData > retrieveOrderDiscountDetails ( Long orderId ) { } private static final class ClientOrderDiscountMapper implements RowMapper < OrderDiscountData > { public String orderDiscountLookupSchema ( ) { } @ Override public OrderDiscountData mapRow ( final ResultSet rs , final int rowNum ) throws SQLException { } } @ Override public Long retrieveClientActiveOrderDetails ( Long clientId , String serialNo ) { } private static final class ClientActiveOrderMapper implements RowMapper < Long > { public String activeOrderLookupSchemaForAssociation ( ) { } public String activeOrderLookupSchema ( ) { } @ Override public Long mapRow ( final ResultSet rs , final int rowNum ) throws SQLException { } } @ Override public List < Long > retrieveOrderActiveAndDisconnectionIds ( Long clientId , Long planId ) { final OrderReadPlatformServiceImpl . OrderIdMapper mapper = new OrderReadPlatformServiceImpl . OrderIdMapper ( ) ; <START_BUG> final String sql = "select<seq2seq4repair_space>id<seq2seq4repair_space>from<seq2seq4repair_space>b_orders<seq2seq4repair_space>o<seq2seq4repair_space>where<seq2seq4repair_space>o.order_status<seq2seq4repair_space>in<seq2seq4repair_space>(1,3)<seq2seq4repair_space>and<seq2seq4repair_space>o.client_id=?<seq2seq4repair_space>and<seq2seq4repair_space>o.plan_id<seq2seq4repair_space>=?<seq2seq4repair_space>" ; <END_BUG> return this . jdbcTemplate . query ( sql , mapper , new Object [ ] { clientId , planId } ) ; } private static final class OrderIdMapper implements RowMapper < Long > { @ Override public Long mapRow ( final ResultSet rs , int rowNum ) throws SQLException { } } }

Fix:
final String sql = "select<seq2seq4repair_space>id<seq2seq4repair_space>from<seq2seq4repair_space>b_orders<seq2seq4repair_space>o<seq2seq4repair_space>where<seq2seq4repair_space>o.order_status<seq2seq4repair_space>in<seq2seq4repair_space>(1,3)<seq2seq4repair_space>and<seq2seq4repair_space>o.client_id=?<seq2seq4repair_space>and<seq2seq4repair_space>o.plan_id<seq2seq4repair_space>=?<seq2seq4repair_space>and<seq2seq4repair_space>o.is_deleted<seq2seq4repair_space>=<seq2seq4repair_space>'N'" ;