Bug 46088 Create method quick fix declares Object as return type [quick fix]
When you write the following code Bla var = getMyBla(); and press Ctrl-1, you can have the method "getMyBla" created. However, if the type Bla is not (yet) known, the method gets declared as private Object getMyBla() { ... } If you press Ctrl-1 again, the import for Bla is added. If the order of the two quickfixes was reversed, you'd get the correct method declaration.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/NewVariableCompletionProposal.java
BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(node);
		if (decl instanceof MethodDeclaration) {
			ASTRewrite rewrite= new ASTRewrite(decl);
			
			SingleVariableDeclaration newDecl= ast.newSingleVariableDeclaration();
			newDecl.setType(evaluateVariableType(ast));
			newDecl.setName(ast.newSimpleName(node.getIdentifier()));
			
			rewrite.markAsInserted(newDecl);
			((MethodDeclaration)decl).parameters().add(newDecl);
			
			markAsLinked(rewrite, node, true, KEY_NAME);
			markAsLinked(rewrite, newDecl.getType(), false, KEY_TYPE);
			markAsLinked(rewrite, newDecl.getName(), false, KEY_NAME);
			
			return rewrite;
		}
		return null;
	}
	private ASTRewrite doAddLocal(CompilationUnit cu) throws CoreException {
		AST ast= cu.getAST();
		
		SimpleName node= fOriginalNode;
		BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(node);
		if (decl instanceof MethodDeclaration || decl instanceof Initializer) {
			ASTRewrite rewrite= new ASTRewrite(decl);
					
			ASTNode parent= node.getParent();
			if (parent.getNodeType() == ASTNode.ASSIGNMENT) {
				Assignment assignment= (Assignment) parent;