Buggy code:
public class NewJBPMProjectWizard extends BasicNewResourceWizard { public static final String JBPM_CLASSPATH_CONTAINER_PATH = "JBPM//jbpm" ; private IProject newProject ; private WizardNewProjectCreationPage mainPage ; private NewJBPMProjectWizardPage extraPage ; private NewJBPMProjectRuntimeWizardPage runtimePage ; public void addPages ( ) { } public boolean performFinish ( ) { } private void createJBPMProject ( ) { } private IProject createNewProject ( ) { } private void addNatures ( IProjectDescription projectDescription ) { } private void createProject ( IProjectDescription description , IProject projectHandle , IProgressMonitor monitor ) throws CoreException , OperationCanceledException { } private void createJBPMRuntime ( IJavaProject project , IProgressMonitor monitor ) throws CoreException { } private void createOutputLocation ( IJavaProject project , IProgressMonitor monitor ) throws CoreException , JavaModelException { } private void addJavaBuilder ( IJavaProject project , IProgressMonitor monitor ) throws CoreException { IProjectDescription description = project . getProject ( ) . getDescription ( ) ; ICommand [ ] commands = description . getBuildSpec ( ) ; <START_BUG> ICommand [ ] newCommands = new ICommand [ ( commands . length ) + 1 ] ; <END_BUG> System . arraycopy ( commands , 0 , newCommands , 0 , commands . length ) ; ICommand javaCommand = description . newCommand ( ) ; javaCommand . setBuilderName ( "org.eclipse.jdt.core.javabuilder" ) ; newCommands [ commands . length ] = javaCommand ; ICommand droolsCommand = description . newCommand ( ) ; droolsCommand . setBuilderName ( "org.drools.eclipse.droolsbuilder" ) ; newCommands [ ( ( commands . length ) + 1 ) ] = droolsCommand ; description . setBuildSpec ( newCommands ) ; project . getProject ( ) . setDescription ( description , monitor ) ; } private void setClasspath ( IJavaProject project , IProgressMonitor monitor ) throws CoreException , JavaModelException { } private void addSourceFolders ( IJavaProject project , IProgressMonitor monitor ) throws CoreException , JavaModelException { } private void addJRELibraries ( IJavaProject project , IProgressMonitor monitor ) throws JavaModelException { } private static IPath getClassPathContainerPath ( ) { } private static void createJBPMLibraryContainer ( IJavaProject project , IProgressMonitor monitor ) throws JavaModelException { } public static void addJBPMLibraries ( IJavaProject project , IProgressMonitor monitor ) throws JavaModelException { } private void createInitialContent ( IJavaProject project , IProgressMonitor monitor ) throws IOException , CoreException , JavaModelException { } private void createProcess ( IJavaProject project , IProgressMonitor monitor ) throws CoreException { } private void createProcessSampleLauncher ( IJavaProject project ) throws IOException , JavaModelException { } private byte [ ] readStream ( InputStream inputstream ) throws IOException { } private void addSourceFolder ( IJavaProject project , List list , String s , IProgressMonitor monitor ) throws CoreException { } private void createFolder ( IFolder folder , IProgressMonitor monitor ) throws CoreException { } }

Fix:
ICommand [ ] newCommands = new ICommand [ ( commands . length ) + 2 ] ;