Buggy code:
public class JdbcMastersDao extends JdbcDaoSupport implements MastersDao { int compid = 1 ; @ Override public List < AssetTree > getAssetTreeList ( ) { } private static class DataAssettreeMapper implements ParameterizedRowMapper < AssetTree > { public AssetTree mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } @ Override public List < UserPref > getUserFav ( ) { } @ Override public List < User > getUserList ( ) { } private static class DataUserListTypeMapper implements ParameterizedRowMapper < User > { public User mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } List < Operator > opeList = new ArrayList < Operator > ( ) ; public List < Operator > getOpeList ( ) { } public void setOpeList ( List < Operator > opeList ) { } public List < RoleDsp > getRoleDtls ( ) { } public List < RoleDsp > getLogUserRole ( ) { } private static class RoleLogMapper implements ParameterizedRowMapper < RoleDsp > { public RoleDsp mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } public static class StringRowMapper implements ParameterizedRowMapper < String > { public String mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } List < Operator > opeListtag = new ArrayList < Operator > ( ) ; public List < Operator > getOpeListTag ( ) { } private static class UsrFavMapper implements ParameterizedRowMapper < UserPref > { public UserPref mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } public boolean updateUserLogin ( String uname ) { } public List < TestFrequency > getFreqList ( int testid ) { } private static class TestFreqMapper implements ParameterizedRowMapper < TestFrequency > { public TestFrequency mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } @ Transactional public int insertTestData ( TestData testdata , List < TestFrequency > testfreqlist , List < DataLog > dataloglist , String strmode , String action ) { } public int InsertProduct ( Product prod ) { } public List < Product > getProductList ( ) { } @ Transactional public boolean deleteproduct ( int id ) { } public boolean updateProduct ( Product prduct ) { } public Product getProduct ( int id ) { } private static class ProductMapper implements ParameterizedRowMapper < Product > { public Product mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } public int InsertProductSer ( ProductSerial prodser ) { } public List < ProductSerial > getProductSerList ( ) { } @ Transactional public boolean deleteproductser ( int id ) { } public boolean updateProductSer ( ProductSerial prduct ) { } public ProductSerial getProductSer ( int id ) { } public List < ProductSerial > getProdVerSer ( ) { } private static class ProdVerSerMapper implements ParameterizedRowMapper < ProductSerial > { public ProductSerial mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } private static class ProductSerMapper implements ParameterizedRowMapper < ProductSerial > { public ProductSerial mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } @ Transactional public boolean deleteTestData ( int id ) { } public boolean updateTestData ( TestData testdata ) { } public TestData getTestData ( int id ) { } private static class TestDataMapper implements ParameterizedRowMapper < TestData > { public TestData mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } public void UpdateTestFreq ( List < TestFrequency > testfreqlist , int testid ) { } public String getType ( int testid ) { } public boolean InsertAmpPhase ( List < DataLog > datalist , ImportData impdata ) { } @ Autowired private JdbcTemplate jdbcTemplate ; @ Override public Map < String , Object > GetAmpPhaseValue ( String prodserids , String typ ) { } public List < Product > getProductWithAmpphase ( ) { List dataList = new ArrayList ( ) ; <START_BUG> String sql = "select<seq2seq4repair_space>p.Product_id,Productname,Version,PType,ImageFileName<seq2seq4repair_space>from<seq2seq4repair_space>product<seq2seq4repair_space>p<seq2seq4repair_space>inner<seq2seq4repair_space>join<seq2seq4repair_space>product_serial<seq2seq4repair_space>s<seq2seq4repair_space>on<seq2seq4repair_space>p.product_id=s.product_id<seq2seq4repair_space>where<seq2seq4repair_space>s.prodserial_id<seq2seq4repair_space>in<seq2seq4repair_space>(select<seq2seq4repair_space>prodserial_id<seq2seq4repair_space>from<seq2seq4repair_space>vw_ampphase)" ; <END_BUG> dataList = getJdbcTemplate ( ) . query ( sql , new JdbcMastersDao . ProductMapper ( ) ) ; return dataList ; } No newline ; at end ; of file ; }

Fix:
String sql = "select<seq2seq4repair_space>distinct<seq2seq4repair_space>p.Product_id,Productname,Version,PType,ImageFileName<seq2seq4repair_space>from<seq2seq4repair_space>product<seq2seq4repair_space>p<seq2seq4repair_space>inner<seq2seq4repair_space>join<seq2seq4repair_space>product_serial<seq2seq4repair_space>s<seq2seq4repair_space>on<seq2seq4repair_space>p.product_id=s.product_id<seq2seq4repair_space>where<seq2seq4repair_space>s.prodserial_id<seq2seq4repair_space>in<seq2seq4repair_space>(select<seq2seq4repair_space>prodserial_id<seq2seq4repair_space>from<seq2seq4repair_space>vw_ampphase)" ;