public static FieldDeclaration mergeField(FieldDeclaration one, FieldDeclaration two) {
if (isAllNull(one, two)) return null;
FieldDeclaration fd = null;
if (isAllNotNull(one, two)) {
fd = new FieldDeclaration();
fd.setType(mergeSelective(one.getType(), two.getType()));
fd.setComment(mergeSelective(one.getComment(), two.getComment()));
fd.setAnnotations(mergeListNoDuplicate(one.getAnnotations(), two.getAnnotations()));
fd.setModifiers(mergeModifiers(one.getModifiers(), two.getModifiers()));
fd.setJavaDoc(mergeSelective(one.getJavaDoc(), two.getJavaDoc()));
fd.setVariables(mergeListNoDuplicate(one.getVariables(), two.getVariables()));
LOG.info("merge FieldDeclaration --> {}", fd.getVariables());
} else {
fd = findFirstNotNull(one, two);
LOG.info("add FieldDeclaration --> {}", fd.getVariables());
}
return fd;
}