Bug 223886 [Import/Export] ArrayIndexOutOfBoundsException while importing project in archive
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java
ProjectRecord(Object file, Object parent, int level) {
			this.projectArchiveFile = file;
			this.parent = parent;
			this.level = level;
			setProjectName();
		}
		/**
		 * Set the name of the project based on the projectFile.
		 */
		private void setProjectName() {
			try {
				if (projectArchiveFile != null) {
					InputStream stream = structureProvider
							.getContents(projectArchiveFile);
					if (stream != null) {
						description = IDEWorkbenchPlugin
								.getPluginWorkspace().loadProjectDescription(
										stream);
						stream.close();
					}
					if (projectArchiveFile instanceof ZipEntry) {
						IPath path= new Path(((ZipEntry) projectArchiveFile).getName());
						projectName= path.segment(path.segmentCount() - 2);
					}
					else if (projectArchiveFile instanceof TarEntry) {
						IPath path= new Path(((TarEntry) projectArchiveFile).getName());
						projectName= path.segment(path.segmentCount() - 2);
					}
				} else {
					IPath path = new Path(projectSystemFile.getPath());