Code review comment: NIT:  you are using two space here, but should be one. 

Code before review:
public static void main(String[] args) throws IOException {
FormRecognizerClient client = new FormRecognizerClientBuilder()
.credential(new AzureKeyCredential("{key}"))
.endpoint("https:
.buildClient();
File analyzeFile = new File("../formrecognizer/azure-ai-formrecognizer/src/samples/java/sample-forms/"
+ "forms/Form_1.jpg");
List<RecognizedForm> formsWithLabeledModel =
client.beginRecognizeCustomForms(
new FileInputStream(analyzeFile), analyzeFile.length(),
"{labeled_model_Id}",
new RecognizeOptions()
.setContentType(FormContentType.APPLICATION_PDF)
.setIncludeFieldElements(true)
.setPollInterval(Duration.ofSeconds(5)))
.getFinalResult();
List<RecognizedForm> formsWithUnlabeledModel =
client.beginRecognizeCustomForms(new FileInputStream(analyzeFile), analyzeFile.length(),
"{unlabeled_model_Id}",
new RecognizeOptions()
.setContentType(FormContentType.APPLICATION_PDF)
.setIncludeFieldElements(true)
.setPollInterval(Duration.ofSeconds(5)))
.getFinalResult();
System.out.println("--------Recognizing forms with labeled custom model--------");
formsWithLabeledModel.forEach(labeledForm -> labeledForm.getFields().forEach((label, formField) -> {
final StringBuilder boundingBoxStr = new StringBuilder();
if (formField.getValueData().getBoundingBox() != null) {
formField.getValueData().getBoundingBox().getPoints().stream().map(point ->
String.format("[%.2f, %.2f]", point.getX(), point.getY())).forEach(boundingBoxStr::append);
}
System.out.printf("Field %s has value %s based on %s within bounding box %s with a confidence score "
+ "of %.2f.%n",
label, formField.getValue(), formField.getValueData().getText(), boundingBoxStr,
formField.getConfidence());
System.out.println("Value for a specific labeled field using the training-time label:");
labeledForm.getFields().entrySet()
.stream()
.filter(formFieldEntry -> "MerchantName".equals(formFieldEntry.getKey()))
.findAny()
.ifPresent(formFieldEntry ->
System.out.printf("The Merchant name is: %s%n", formFieldEntry.getValue()));
}));
System.out.println("-----------------------------------------------------------");
System.out.println("-------Recognizing forms with unlabeled custom model-------");
formsWithUnlabeledModel.forEach(unLabeledForm -> unLabeledForm.getFields().forEach((label, formField) -> {
final StringBuilder boundingBoxStr = new StringBuilder();
if (formField.getValueData().getBoundingBox() != null) {
formField.getValueData().getBoundingBox().getPoints().stream().map(point ->
String.format("[%.2f, %.2f]", point.getX(), point.getY())).forEach(boundingBoxStr::append);
}
if (formField.getLabelData() != null && formField.getLabelData().getBoundingBox() != null) {
formField.getLabelData().getBoundingBox().getPoints().stream().map(point ->
String.format("[%.2f, %.2f]", point.getX(), point.getY())).forEach(boundingBoxStr::append);
System.out.printf("Field %s has label %s  within bounding box %s with a confidence score "
+ "of %.2f.%n",
label, formField.getLabelData().getText(), "", formField.getConfidence());
}
System.out.printf("Field %s has value %s based on %s within bounding box %s with a confidence score "
+ "of %.2f.%n",
label, formField.getValue(), formField.getValueData().getText(), boundingBoxStr,
formField.getConfidence());
unLabeledForm.getFields().entrySet()
.stream()
.filter(formFieldEntry -> "Vendor Name:".equals(formFieldEntry.getValue().getLabelData().getText()))
.findAny()
.ifPresent(formFieldEntry -> System.out.printf("The Vendor name is: %s%n", formFieldEntry.getValue()));
}));
}

Line under review: System.out.printf("Field %s has label %s  within bounding box %s with a confidence score "

Code after addressing the review:
public static void main(String[] args) throws IOException {
FormRecognizerClient client = new FormRecognizerClientBuilder()
.credential(new AzureKeyCredential("{key}"))
.endpoint("https:
.buildClient();
File analyzeFile = new File("../formrecognizer/azure-ai-formrecognizer/src/samples/java/sample-forms/"
+ "forms/Form_1.jpg");
List<RecognizedForm> formsWithLabeledModel =
client.beginRecognizeCustomForms(
new FileInputStream(analyzeFile), analyzeFile.length(),
"{labeled_model_Id}",
new RecognizeOptions()
.setContentType(FormContentType.APPLICATION_PDF)
.setIncludeFieldElements(true)
.setPollInterval(Duration.ofSeconds(5)))
.getFinalResult();
List<RecognizedForm> formsWithUnlabeledModel =
client.beginRecognizeCustomForms(new FileInputStream(analyzeFile), analyzeFile.length(),
"{unlabeled_model_Id}",
new RecognizeOptions()
.setContentType(FormContentType.APPLICATION_PDF)
.setIncludeFieldElements(true)
.setPollInterval(Duration.ofSeconds(5)))
.getFinalResult();
System.out.println("--------Recognizing forms with labeled custom model--------");
formsWithLabeledModel.forEach(labeledForm -> labeledForm.getFields().forEach((label, formField) -> {
final StringBuilder boundingBoxStr = new StringBuilder();
if (formField.getValueData().getBoundingBox() != null) {
formField.getValueData().getBoundingBox().getPoints().stream().map(point ->
String.format("[%.2f, %.2f]", point.getX(), point.getY())).forEach(boundingBoxStr::append);
}
System.out.printf("Field %s has value %s based on %s within bounding box %s with a confidence score "
+ "of %.2f.%n",
label, formField.getValue(), formField.getValueData().getText(), boundingBoxStr,
formField.getConfidence());
System.out.println("Value for a specific labeled field using the training-time label:");
labeledForm.getFields().entrySet()
.stream()
.filter(formFieldEntry -> "MerchantName".equals(formFieldEntry.getKey()))
.findAny()
.ifPresent(formFieldEntry ->
System.out.printf("The Merchant name is: %s%n", formFieldEntry.getValue()));
}));
System.out.println("-----------------------------------------------------------");
System.out.println("-------Recognizing forms with unlabeled custom model-------");
formsWithUnlabeledModel.forEach(unLabeledForm -> unLabeledForm.getFields().forEach((label, formField) -> {
final StringBuilder boundingBoxStr = new StringBuilder();
if (formField.getValueData().getBoundingBox() != null) {
formField.getValueData().getBoundingBox().getPoints().stream().map(point ->
String.format("[%.2f, %.2f]", point.getX(), point.getY())).forEach(boundingBoxStr::append);
}
if (formField.getLabelData() != null && formField.getLabelData().getBoundingBox() != null) {
formField.getLabelData().getBoundingBox().getPoints().stream().map(point ->
String.format("[%.2f, %.2f]", point.getX(), point.getY())).forEach(boundingBoxStr::append);
System.out.printf("Field %s has label %s within bounding box %s with a confidence score "
+ "of %.2f.%n",
label, formField.getLabelData().getText(), "", formField.getConfidence());
}
System.out.printf("Field %s has value %s based on %s within bounding box %s with a confidence score "
+ "of %.2f.%n",
label, formField.getValue(), formField.getValueData().getText(), boundingBoxStr,
formField.getConfidence());
unLabeledForm.getFields().entrySet()
.stream()
.filter(formFieldEntry -> "Vendor Name:".equals(formFieldEntry.getValue().getLabelData().getText()))
.findAny()
.ifPresent(formFieldEntry -> System.out.printf("The Vendor name is: %s%n", formFieldEntry.getValue()));
}));
}