ASTNode selectedNode= problem.getCoveringNode(context);
ASTNode selectedNode= problem.getCoveringNode(astRoot);
	public static void addAbstractMethodProposals(IAssistContext context, IProblemLocation problem, Collection proposals) throws CoreException {		ICompilationUnit cu= context.getCompilationUnit();		CompilationUnit astRoot= context.getASTRoot();		ASTNode selectedNode= problem.getCoveringNode(context);		if (selectedNode == null) {			return;		}		MethodDeclaration decl;		if (selectedNode instanceof SimpleName) {			decl= (MethodDeclaration) selectedNode.getParent();		} else if (selectedNode instanceof MethodDeclaration) {			decl= (MethodDeclaration) selectedNode;		} else {			return;		}			ASTNode parentType= ASTResolving.findParentType(decl);		TypeDeclaration parentTypeDecl= null;		boolean parentIsAbstractClass= false;		if (parentType instanceof TypeDeclaration) {			parentTypeDecl= (TypeDeclaration) parentType;			parentIsAbstractClass= !parentTypeDecl.isInterface() && Modifier.isAbstract(parentTypeDecl.getModifiers());		}		boolean hasNoBody= (decl.getBody() == null);				if (problem.getProblemId() == IProblem.AbstractMethodInAbstractClass || parentIsAbstractClass) {			ASTRewrite rewrite= new ASTRewrite(decl.getParent());						AST ast= astRoot.getAST();			MethodDeclaration modifiedNode= ast.newMethodDeclaration();			modifiedNode.setConstructor(decl.isConstructor());			modifiedNode.setExtraDimensions(decl.getExtraDimensions());			modifiedNode.setModifiers(decl.getModifiers() & ~Modifier.ABSTRACT);			rewrite.markAsModified(decl, modifiedNode);			if (hasNoBody) {				Block newBody= ast.newBlock();				rewrite.markAsInserted(newBody);				decl.setBody(newBody);				Expression expr= ASTNodeFactory.newDefaultExpression(ast, decl.getReturnType(), decl.getExtraDimensions());				if (expr != null) {					ReturnStatement returnStatement= ast.newReturnStatement();					returnStatement.setExpression(expr);					newBody.statements().add(returnStatement);				}			}				String label= CorrectionMessages.getString("ModifierCorrectionSubProcessor.removeabstract.description"); //$NON-NLS-1$			Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);			ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, cu, rewrite, 6, image);			proposal.ensureNoModifications();			proposals.add(proposal);		}				if (!hasNoBody && problem.getProblemId() == IProblem.BodyForAbstractMethod) {			ASTRewrite rewrite= new ASTRewrite(decl.getParent());			rewrite.markAsRemoved(decl.getBody());						String label= CorrectionMessages.getString("ModifierCorrectionSubProcessor.removebody.description"); //$NON-NLS-1$			Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);			ASTRewriteCorrectionProposal proposal2= new ASTRewriteCorrectionProposal(label, cu, rewrite, 5, image);			proposal2.ensureNoModifications();			proposals.add(proposal2);		}				if (problem.getProblemId() == IProblem.AbstractMethodInAbstractClass && (parentTypeDecl != null)) {			ASTRewriteCorrectionProposal proposal= getMakeTypeStaticProposal(cu, parentTypeDecl, 5);			proposals.add(proposal);		}					}