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
fCurrJProject= jproject;
		updateLibrariesList();
	}
	
	private boolean isLibraryKind(int kind) {
		return kind == IClasspathEntry.CPE_LIBRARY || kind == IClasspathEntry.CPE_VARIABLE || kind == IClasspathEntry.CPE_CONTAINER;
	}
	
	private void updateLibrariesList() {
		List cpelements= fClassPathList.getElements();
		List libelements= new ArrayList(cpelements.size());
		
		int nElements= cpelements.size();
		for (int i= 0; i < nElements; i++) {
			CPListElement cpe= (CPListElement)cpelements.get(i);
			if (isLibraryKind(cpe.getEntryKind())) {
				libelements.add(cpe);
			}
		}
		fLibrariesList.setElements(libelements);
	}		
		
	
	
	public Control getControl(Composite parent) {
		PixelConverter converter= new PixelConverter(parent);
		
		Composite composite= new Composite(parent, SWT.NONE);
			
		LayoutUtil.doDefaultLayout(composite, new DialogField[] { fLibrariesList }, true, SWT.DEFAULT, SWT.DEFAULT);