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/JavaTypeCompletionProposal.java
setReplacementString(replacementString);
				setCursorPosition(replacementString.length());
			}
			
			super.apply(document, trigger, offset);
			
			if (impStructure != null) {
				int oldLen= document.getLength();
				impStructure.create(false, null);
				setReplacementOffset(getReplacementOffset() + document.getLength() - oldLen);
			}
		} catch (CoreException e) {
			JavaPlugin.log(e);
		} catch (BadLocationException e) {
			JavaPlugin.log(e);
		}
	}
	/*
	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension#isValidFor(IDocument, int)
	 */
	public boolean isValidFor(IDocument document, int offset) {
		boolean isValid= super.isValidFor(document, offset);
		if (isValid)
			return true;
		return
			(fUnqualifiedTypeName != null && startsWith(document, offset, fUnqualifiedTypeName)) ||
			(fFullyQualifiedTypeName != null && startsWith(document, offset, fFullyQualifiedTypeName));
	}
}