Bug 73347 NPE in AdvancedQuickAssistProcessor.getInverseConditionProposals
I20040901 + plug-in export, J9 JXE Got this in log several times a day. No steps. !ENTRY org.eclipse.jdt.ui 4 10001 Sep 06, 2004 18:46:20.502 !MESSAGE Internal Error !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.ui.text.correction.AdvancedQuickAssistProcessor.getInverseConditionProposals(Unknown Source) at org.eclipse.jdt.internal.ui.text.correction.AdvancedQuickAssistProcessor.hasAssists(Unknown Source) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.hasAssists(Unknown Source) at org.eclipse.jdt.internal.ui.text.correction.QuickAssistLightBulbUpdater.calculateLightBulb(Unknown Source) at org.eclipse.jdt.internal.ui.text.correction.QuickAssistLightBulbUpdater.doSelectionChanged(Unknown Source) at org.eclipse.jdt.internal.ui.text.correction.QuickAssistLightBulbUpdater.access$0(Unknown Source) at org.eclipse.jdt.internal.ui.text.correction.QuickAssistLightBulbUpdater$1.selectionChanged(Unknown Source) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(Unknown Source) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(Unknown Source) at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AdvancedQuickAssistProcessor.java
prefixExpression.setOperand((Expression) rewrite.createMoveTarget(expression));
			return prefixExpression;
		}
		return (Expression) rewrite.createCopyTarget(expression);
	}
	private static Expression getInversedInfixBooleanExpression(AST ast, ASTRewrite rewrite,
			InfixExpression expression, InfixExpression.Operator newOperator) {
		InfixExpression newExpression = ast.newInfixExpression();
		newExpression.setOperator(newOperator);
		newExpression.setLeftOperand(getInversedBooleanExpression(ast, rewrite, expression.getLeftOperand()));
		newExpression.setRightOperand(getInversedBooleanExpression(ast, rewrite, expression.getRightOperand()));
		return newExpression;
	}
	private static Expression getInversedAndOrExpression(AST ast, ASTRewrite rewrite, InfixExpression infixExpression,
			Operator newOperator) {
		int newOperatorPrecedence = getInfixOperatorPrecedence(newOperator);
		
		Expression leftOperand = getInversedBooleanExpression(ast, rewrite, infixExpression.getLeftOperand());
		int leftPrecedence = getExpressionPrecedence(leftOperand);
		if (newOperatorPrecedence < leftPrecedence) {
			leftOperand = getParenthesizedExpression(ast, leftOperand);
		}
		
		Expression rightOperand = getInversedBooleanExpression(ast, rewrite, infixExpression.getRightOperand());
		int rightPrecedence = getExpressionPrecedence(rightOperand);
		if (newOperatorPrecedence < rightPrecedence) {
			rightOperand = getParenthesizedExpression(ast, rightOperand);
		}
		
		InfixExpression newExpression = ast.newInfixExpression();