[hibernate-dev] generated code in hibernate

Gunnar Morling gunnar at hibernate.org
Thu Oct 17 08:50:25 EDT 2013


Another category are Java types generated from XML schemas defining several
descriptors such as validation.xml in Hibernate Validator. Generally you'll
find any generated code under target/generated-sources or similar once you
have run a project's build.

--Gunnar


2013/10/17 Sanne Grinovero <sanne at hibernate.org>

> Hi Jonathan,
> no there is quite some code being generated during the build, my guess
> is that you're looking in the committed code?
> We don't consider it a good idea to include the generated code in our
> source code repository, so you won't find any unless you start the
> build.
>
> There are at least two categories of sources being generated:
> - the HQL parser code is generated from grammar definitions; we use
> ANTLR for this, explicitly invoked during the build process.
> - the logger implementations are generated from annotated interfaces,
> an annotation processor takes care of these.
>
> Best luck with your work, static analysis is fascinating!
>
> Sanne
>
>
> On 17 October 2013 13:20, Jonathan Bernwieser
> <bernwieserjonathan at gmail.com> wrote:
> > Hi there,
> > I am currently doing my Bachelor thesis at TU Munich, at the Software
> > Engineering chair of Prof. Broy.
> >
> >
> > The goal of this thesis is to create a tool to automatically categorize
> > source code in open source software. Different categories will be "test
> > code", "generated code" and "productive code" to better evaluate and use
> the
> > results of quality-check techniques. (Static analyses might detect
> certain
> > quality problems even though they're not relevant for a certain code
> > category. One example would be the amount of clones found in a project.
> It
> > has to be checked what kind of category the evaluated code belongs to as
> > clones aren't causing quality issues if they occur in "generated code".)
> >
> >
> >
> > In order to create and test heuristics to identify code categories, I
> first
> > need to create manually a collection of different projects (or classes
> to be
> > more specific) I actually know about what kind of category they belong
> to.
> >
> > While manually going through the hibernate project I couldn't find any
> files
> > that were automatically generated. Is that correct or are there any
> > generated classes I didn't recognize?
> >
> >
> > Thanks you for your help.
> > Looking forward to hearing from you,
> >
> > Regards,
> >
> >
> > Jonathan
> >
> >
> >
> >
> >
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>


More information about the hibernate-dev mailing list