final Expression left = node.getLeft();
if (left instanceof MemberReferenceExpression &&
((MemberReferenceExpression) left).getTarget() instanceof ThisReferenceExpression) {
final MemberReferenceExpression reference = (MemberReferenceExpression) left;
final MemberReference memberReference = reference.getUserData(Keys.MEMBER_REFERENCE);
if (memberReference instanceof FieldReference) {
final FieldDefinition resolvedField = ((FieldReference) memberReference).resolve();
if (resolvedField != null && resolvedField.hasConstantValue()) {
final AstNode parent = node.getParent();
if (parent instanceof ExpressionStatement) {
parent.remove();
}
else {
reference.remove();
node.replaceWith(reference);
}
}
}
}