Source:
protected void checkFieldsInitialized( Tree blockNode, boolean staticFields, Store store, List<? extends AnnotationMirror> receiverAnnotations) { if (store == null) { return; } String COMMITMENT_FIELDS_UNINITIALIZED_KEY = (staticFields ? COMMITMENT_STATIC_FIELDS_UNINITIALIZED : COMMITMENT_FIELDS_UNINITIALIZED); Pair<List<VariableTree>, List<VariableTree>> uninitializedFields = atypeFactory.getUninitializedFields( store, getCurrentPath(), staticFields, receiverAnnotations); List<VariableTree> violatingFields = uninitializedFields.first; List<VariableTree> nonviolatingFields = uninitializedFields.second; if (staticFields) { } else { violatingFields.removeAll(initializedFields); nonviolatingFields.removeAll(initializedFields); } violatingFields.removeIf( f -> checker.shouldSuppressWarnings( TreeUtils.elementFromTree(f), COMMITMENT_FIELDS_UNINITIALIZED_KEY)); nonviolatingFields.removeIf( f -> checker.shouldSuppressWarnings( TreeUtils.elementFromTree(f), COMMITMENT_FIELDS_UNINITIALIZED_KEY)); if (!violatingFields.isEmpty()) { StringJoiner fieldsString = new StringJoiner(", "); for (VariableTree f : violatingFields) { fieldsString.add(f.getName()); } checker.reportError(blockNode, COMMITMENT_FIELDS_UNINITIALIZED_KEY, fieldsString); } WholeProgramInference wpi = atypeFactory.getWholeProgramInference(); if (wpi != null) { List<VariableTree> uninitFields = new ArrayList<>(violatingFields); uninitFields.addAll(nonviolatingFields); for (VariableTree fieldTree : uninitFields) { Element elt = TreeUtils.elementFromTree(fieldTree); ((WholeProgramInferenceScenes) wpi) .updateFieldFromType( fieldTree, elt, fieldTree.getName().toString(), atypeFactory.getDefaultValueAnnotatedType(elt.asType()), atypeFactory); } } }

Target:
protected void checkFieldsInitialized( Tree blockNode, boolean staticFields, Store store, List<? extends AnnotationMirror> receiverAnnotations) { if (store == null) { return; } String COMMITMENT_FIELDS_UNINITIALIZED_KEY = (staticFields ? COMMITMENT_STATIC_FIELDS_UNINITIALIZED : COMMITMENT_FIELDS_UNINITIALIZED); Pair<List<VariableTree>, List<VariableTree>> uninitializedFields = atypeFactory.getUninitializedFields( store, getCurrentPath(), staticFields, receiverAnnotations); List<VariableTree> violatingFields = uninitializedFields.first; List<VariableTree> nonviolatingFields = uninitializedFields.second; if (staticFields) { } else { violatingFields.removeAll(initializedFields); nonviolatingFields.removeAll(initializedFields); } violatingFields.removeIf( f -> checker.shouldSuppressWarnings( TreeUtils.elementFromTree(f), COMMITMENT_FIELDS_UNINITIALIZED_KEY)); nonviolatingFields.removeIf( f -> checker.shouldSuppressWarnings( TreeUtils.elementFromTree(f), COMMITMENT_FIELDS_UNINITIALIZED_KEY)); if (!violatingFields.isEmpty()) { StringJoiner fieldsString = new StringJoiner(", "); for (VariableTree f : violatingFields) { fieldsString.add(f.getName()); } checker.reportError(blockNode, COMMITMENT_FIELDS_UNINITIALIZED_KEY, fieldsString); } WholeProgramInference wpi = atypeFactory.getWholeProgramInference(); if (wpi != null) { List<VariableTree> uninitFields = new ArrayList<>(violatingFields); uninitFields.addAll(nonviolatingFields); for (VariableTree fieldTree : uninitFields) { Element elt = TreeUtils.elementFromTree(fieldTree); wpi.updateFieldFromType( fieldTree, elt, fieldTree.getName().toString(), atypeFactory.getDefaultValueAnnotatedType(elt.asType())); } } }