Source:
<code>private List<String> getLombokRequiredProperties(final Element lombokClassElement) { List<String> requiredPropertyNames = new ArrayList<>(); List<String> defaultedPropertyNames = new ArrayList<>(); for (Element member : lombokClassElement.getEnclosedElements()) { <START> if (member.getKind() == ElementKind.FIELD) { <END> for (AnnotationMirror anm : atypeFactory.getElementUtils().getAllAnnotationMirrors(member)) { if (NONNULL_ANNOTATIONS.contains(AnnotationUtils.annotationName(anm))) { requiredPropertyNames.add(member.getSimpleName().toString()); } } } else if (member.getKind() == ElementKind.METHOD && ElementUtils.hasAnnotation(member, "lombok.Generated")) { String methodName = member.getSimpleName().toString(); if (methodName.startsWith("$default$")) { String propName = methodName.substring(9); defaultedPropertyNames.add(propName); } } else if (member.getKind().isClass() && member.toString().endsWith("Builder")) { for (Element builderMember : member.getEnclosedElements()) { if (builderMember.getKind() == ElementKind.METHOD && ElementUtils.hasAnnotation(builderMember, "lombok.Generated")) { String methodName = builderMember.getSimpleName().toString(); if (methodName.startsWith("clear")) { String propName = Introspector.decapitalize( methodName.substring(5)); defaultedPropertyNames.add(propName); } } else if (builderMember.getKind() == ElementKind.FIELD) { VariableTree variableTree = (VariableTree) atypeFactory.declarationFromElement(builderMember); if (variableTree != null && variableTree.getInitializer() != null) { String propName = variableTree.getName().toString(); defaultedPropertyNames.add(propName); defaultedElements.put(builderMember, propName); } else if (defaultedElements.containsKey(builderMember)) { defaultedPropertyNames.add(defaultedElements.get(builderMember)); } } } } } requiredPropertyNames.removeAll(defaultedPropertyNames); return requiredPropertyNames; }</code><technical_language>body of this if statement account for possibility field declaration contains initializer. Is possible</technical_language>

Target:
private List<String> getLombokRequiredProperties(final Element lombokClassElement) { List<String> requiredPropertyNames = new ArrayList<>(); List<String> defaultedPropertyNames = new ArrayList<>(); for (Element member : lombokClassElement.getEnclosedElements()) { if (member.getKind() == ElementKind.FIELD) { for (AnnotationMirror anm : atypeFactory.getElementUtils().getAllAnnotationMirrors(member)) { if (NONNULL_ANNOTATIONS.contains(AnnotationUtils.annotationName(anm))) { requiredPropertyNames.add(member.getSimpleName().toString()); } } } else if (member.getKind() == ElementKind.METHOD && ElementUtils.hasAnnotation(member, "lombok.Generated")) { String methodName = member.getSimpleName().toString(); if (methodName.startsWith("$default$")) { String propName = methodName.substring(9); defaultedPropertyNames.add(propName); } } else if (member.getKind().isClass() && member.toString().endsWith("Builder")) { for (Element builderMember : member.getEnclosedElements()) { if (builderMember.getKind() == ElementKind.METHOD && ElementUtils.hasAnnotation(builderMember, "lombok.Generated")) { String methodName = builderMember.getSimpleName().toString(); if (methodName.startsWith("clear")) { String propName = Introspector.decapitalize( methodName.substring(5)); defaultedPropertyNames.add(propName); } } else if (builderMember.getKind() == ElementKind.FIELD) { VariableTree variableTree = (VariableTree) atypeFactory.declarationFromElement(builderMember); if (variableTree != null && variableTree.getInitializer() != null) { Name propName = variableTree.getName(); defaultedPropertyNames.add(propName.toString()); defaultedElements.put(builderMember, propName); } else if (defaultedElements.containsKey(builderMember)) { defaultedPropertyNames.add( defaultedElements.get(builderMember).toString()); } } } } } requiredPropertyNames.removeAll(defaultedPropertyNames); return requiredPropertyNames; }