if (fReplaceAllOccurrences){ IASTFragment[] allMatches= ASTFragmentFactory.createFragmentForFullSubtree(getSelectedMethodNode()) .getSubFragmentsMatching(getSelectedExpression()); return retainOnlyReplacableMatches(allMatches); } else if (canReplace(getSelectedExpression())) return new IASTFragment[]{getSelectedExpression()}; else return new IASTFragment[0];
return retainOnlyReplacableMatches(getMatchingFragments());
	private IASTFragment[] getFragmentsToReplace() throws JavaModelException {		if (fReplaceAllOccurrences){			IASTFragment[] allMatches= ASTFragmentFactory.createFragmentForFullSubtree(getSelectedMethodNode())			                                             .getSubFragmentsMatching(getSelectedExpression());			return retainOnlyReplacableMatches(allMatches);		} else if (canReplace(getSelectedExpression()))			return new IASTFragment[]{getSelectedExpression()};			else				return new IASTFragment[0];	}