OutOfMemoryException with CPD task

16 views
Skip to first unread message

hank...@gmail.com

unread,
May 6, 2008, 7:12:24 AM5/6/08
to glean-code-users
I'm getting an OutOfMemory exception from CPD (but not PMD, strangely
enough) when I run glean on my codebase. I've already bumped up the
max memory to 1024M using the ANT_OPTS environment variable. Any
ideas?

Thanks,

Hank Gay

John Brugge

unread,
May 6, 2008, 10:16:58 PM5/6/08
to glean-co...@googlegroups.com
Hank,

Can you give a little more context for your situation?
- What is the size of the codebase (number of classes, lines of code)?
- What version of PMD/CPD are you using?
- What version of the JDK?
- What OS?
- Did this just start happening, or did CPD used to work for you?

Thanks,

hank...@gmail.com

unread,
May 7, 2008, 3:54:50 PM5/7/08
to glean-code-users
I just started trying to apply glean and CPD to this project, and I'm
using PMD 4.2.1. JavaNCSS tells me its 205,654 lines. I'm using JDK
1.5.0_13 on Mac OS X "Leopard". I also had this problem later when
running statscvs.

Thanks,

Hank

John Brugge

unread,
May 7, 2008, 11:27:32 PM5/7/08
to glean-co...@googlegroups.com
Hank,

That is a decent sized source tree to work against. You may need more JVM space for some of these tools to process it all at once. If you can give it 2Gb, I would try that. My environment is very similar to yours, but I don't know that I've run these tools against codebases of that size.

You might also check with peoples' experience on the PMD/CPD forums.

John

hank...@gmail.com

unread,
May 8, 2008, 1:17:40 PM5/8/08
to glean-code-users
John,

I wound up cranking it up to 3G, which works but seems unreasonable.
Oh well, I've got it so why not flaunt it. Of course, since this is
the way my week has been going, it still errored out because MacRoman
is an unsupported encoding. Despite the troubles, I really appreciate
the work you've put into making such a great tool.

Hank

On May 7, 11:27 pm, "John Brugge" <john.bru...@gmail.com> wrote:
> Hank,
>
> That is a decent sized source tree to work against. You may need more JVM
> space for some of these tools to process it all at once. If you can give it
> 2Gb, I would try that. My environment is very similar to yours, but I don't
> know that I've run these tools against codebases of that size.
>
> You might also check with peoples' experience on the PMD/CPD forums.
>
> John
>

John Brugge

unread,
May 8, 2008, 1:47:53 PM5/8/08
to glean-co...@googlegroups.com
Hank,

Glad to hear you made headway. For the MacRoman issue, you might try this before running Glean:

export ANT_OPTS="-Dfile.encoding=UTF-8"

I've been meaning to add that to the FAQ.

Hope that helps,
John

hank...@gmail.com

unread,
May 12, 2008, 6:33:43 PM5/12/08
to glean-code-users
Thanks. That took care of that.

Hank
Reply all
Reply to author
Forward
0 new messages