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
if (node.equals(assignment.getLeftHandSide())) {
					int parentParentKind= parent.getParent().getNodeType();
					if (parentParentKind == ASTNode.EXPRESSION_STATEMENT) {
						
						
						VariableDeclarationFragment newDeclFrag= ast.newVariableDeclarationFragment();
						VariableDeclarationStatement newDecl= ast.newVariableDeclarationStatement(newDeclFrag);
						newDecl.setType(evaluateVariableType(ast));
						
						Expression placeholder= (Expression) rewrite.createCopy(assignment.getRightHandSide());
						newDeclFrag.setInitializer(placeholder);
						newDeclFrag.setName(ast.newSimpleName(node.getIdentifier()));
						rewrite.markAsReplaced(assignment.getParent(), newDecl);
						
						markAsLinked(rewrite, newDeclFrag.getName(), true, KEY_NAME);
						markAsLinked(rewrite, newDecl.getType(), false, KEY_TYPE);
						return rewrite;
					} else if (parentParentKind == ASTNode.FOR_STATEMENT) {
						
						
						ForStatement forStatement= (ForStatement) parent.getParent();
						if (forStatement.initializers().size() == 1 && assignment.equals(forStatement.initializers().get(0))) {
							VariableDeclarationFragment frag= ast.newVariableDeclarationFragment();
							VariableDeclarationExpression expression= ast.newVariableDeclarationExpression(frag);
							frag.setName(ast.newSimpleName(node.getIdentifier()));
							Expression placeholder= (Expression) rewrite.createCopy(assignment.getRightHandSide());
							frag.setInitializer(placeholder);
							expression.setType(evaluateVariableType(ast));
							
							rewrite.markAsReplaced(assignment, expression);