Bug 29078 Completion for anonymous inner class results in syntax error
1) enable smart brackets 2) type in Runnable runnable= new Runnable(<code assist>) ->you get the code below with one superflus parenthesis: Runnable runnable= new Runnable() { public void run() { } })
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeCompletionProposal.java
String lineDelim= StubUtility.getLineDelimiterFor(document);
		int tabWidth= CodeFormatterPreferencePage.getTabSize();
		IRegion region= document.getLineInformationOfOffset(getReplacementOffset());
		int indent= Strings.computeIndent(document.get(region.getOffset(), region.getLength()), tabWidth);
		
		String replacement= StubUtility.codeFormat(buf.toString(), indent, lineDelim);
		return Strings.trimLeadingTabsAndSpaces(replacement);
	}	
	
	private boolean createStubs(StringBuffer buf, ImportsStructure imports) throws JavaModelException {
		if (fDeclaringType == null) {
			return true;
		}
		CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
		ITypeHierarchy hierarchy= fDeclaringType.newSupertypeHierarchy(null);
		OverrideMethodQuery selectionQuery= fDeclaringType.isClass() ? new OverrideMethodQuery(JavaPlugin.getActiveWorkbenchShell(), true) : null;
		String[] unimplemented= StubUtility.evalUnimplementedMethods(fDeclaringType, hierarchy, true, settings, selectionQuery, imports);
		if (unimplemented != null) {
			for (int i= 0; i < unimplemented.length; i++) {
				buf.append(unimplemented[i]);
				if (i < unimplemented.length - 1) {
					buf.append('\n');
				}
			}
			return true;
		}
		return false;
	}
}