Bug 19365 ArrayIndexOutOfBounds: editing Build Path .jar
F2 - File -> New -> Project... - Plug-in Development - Plug-in Project -> Next - set name="asd", Next - Next - select Hello World wizard, Next - Finish -> creates new Project "asd" - select it in the Packages view, right-click -> Properties... - go to Java Build Path page - go to contained Libraries tab - select any of the ECLIPSE_HOME... libraries shown in the list - press Edit... - press OK in the subsequent Variable Extension dialog, get the attached exception
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/LibrariesWorkbookPage.java
if (!existingElements.contains(elem)) {
					result.add(elem);
				}
			}
			return (CPListElement[]) result.toArray(new CPListElement[result.size()]);
		}
		return null;
	}
	
	private CPListElement[] openContainerDialog(String title, ClasspathContainerWizard wizard) {
		WizardDialog dialog= new WizardDialog(getShell(), wizard);
		PixelConverter converter= new PixelConverter(getShell());
		
		dialog.setMinimumPageSize(converter.convertWidthInCharsToPixels(40), converter.convertHeightInCharsToPixels(20));
		dialog.create();
		dialog.getShell().setText(title);
		if (dialog.open() == dialog.OK) {
			IClasspathEntry created= wizard.getNewEntry();
			if (created != null) {			
				CPListElement elem= new CPListElement(fCurrJProject, IClasspathEntry.CPE_CONTAINER, created.getPath(), null);
				if (elem != null) {
					return new CPListElement[] { elem };
				}
			}
		}			
		return null;
	}	
	
	
	private void addAttachmentsFromExistingLibs(CPListElement elem) {