#vulnerable code 
                                public void doGenerate(String excludeTables) {

        System.out.println("start generate...");
        DataSource dataSource = CodeGenHelpler.getDatasource();
        List<TableMeta> tableMetaList = new MetaBuilder(dataSource).build();
        CodeGenHelpler.excludeTables(tableMetaList, excludeTables);

        new JbootServiceInterfaceGenerator(basePackage, modelPacket).generate(tableMetaList);
        new JbootServiceImplGenerator(basePackage + ".impl", modelPacket).generate(tableMetaList);


        System.out.println("service generate finished !!!");

    } 
                            #location 5 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public void doGenerate(String excludeTables) {

        System.out.println("start generate...");
        List<TableMeta> tableMetaList = CodeGenHelpler.createMetaBuilder().build();
        CodeGenHelpler.excludeTables(tableMetaList, excludeTables);

        new JbootServiceInterfaceGenerator(basePackage, modelPacket).generate(tableMetaList);
        new JbootServiceImplGenerator(basePackage + ".impl", modelPacket).generate(tableMetaList);


        System.out.println("service generate finished !!!");

    }