if (javaElements != null && javaElements.length > 0)
if (javaElements != null && javaElements.length > 0 && javaElements[0] != null)
	private CopyRefactoring verifyEnabled(IResource[] resources, IJavaElement[] javaElements, INewNameQueries newNameQueries, IReorgQueries reorgQueries) throws JavaModelException {		IJavaProject project= null;		if (javaElements != null && javaElements.length > 0)			project= javaElements[0].getJavaProject();		CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(project);		assertTrue("copy should be enabled", CopyRefactoring.isAvailable(resources, javaElements, settings));		CopyRefactoring refactoring2= CopyRefactoring.create(resources, javaElements, settings);		assertNotNull(refactoring2);		if (newNameQueries != null)			refactoring2.setNewNameQueries(newNameQueries);		if (reorgQueries != null)			refactoring2.setReorgQueries(reorgQueries);		return refactoring2;	}