Source:
<code>private static Geometry readPolygon(SliceInput input, boolean multitype) { skipEsriType(input); skipEnvelope(input); int partCount = input.readInt(); if (partCount == 0) { if (multitype) { <START> return GEOMETRY_FACTORY.createPolygon(); <END> } else { return GEOMETRY_FACTORY.createPolygon(); } } int pointCount = input.readInt(); int[] startIndexes = new int[partCount]; for (int i = 0; i < partCount; i++) { startIndexes[i] = input.readInt(); } int[] partLengths = new int[partCount]; if (partCount > 1) { partLengths[0] = startIndexes[1]; for (int i = 1; i < partCount - 1; i++) { partLengths[i] = startIndexes[i + 1] - startIndexes[i]; } } partLengths[partCount - 1] = pointCount - startIndexes[partCount - 1]; LinearRing shell = null; List<LinearRing> holes = new ArrayList<>(); List<Polygon> polygons = new ArrayList<>(); for (int i = 0; i < partCount; i++) { Coordinate[] coordinates = readCoordinates(input, partLengths[i]); if (isClockwise(coordinates)) { if (shell != null) { polygons.add(GEOMETRY_FACTORY.createPolygon(shell, holes.toArray(new LinearRing[0]))); holes.clear(); } else { verify(holes.isEmpty(), "shell is null but holes found"); } shell = GEOMETRY_FACTORY.createLinearRing(coordinates); } else { verify(shell != null, "shell is null but hole found"); holes.add(GEOMETRY_FACTORY.createLinearRing(coordinates)); } } polygons.add(GEOMETRY_FACTORY.createPolygon(shell, holes.toArray(new LinearRing[0]))); if (multitype) { return GEOMETRY_FACTORY.createMultiPolygon(polygons.toArray(new Polygon[0])); } else { verify(polygons.size() == 1); return polygons.get(0); } }</code><technical_language>s/createPolygon()/createMultiPolygon()</technical_language>

Target:
private static Geometry readPolygon(SliceInput input, boolean multitype) { skipEsriType(input); skipEnvelope(input); int partCount = input.readInt(); if (partCount == 0) { if (multitype) { return GEOMETRY_FACTORY.createMultiPolygon(); } return GEOMETRY_FACTORY.createPolygon(); } int pointCount = input.readInt(); int[] startIndexes = new int[partCount]; for (int i = 0; i < partCount; i++) { startIndexes[i] = input.readInt(); } int[] partLengths = new int[partCount]; if (partCount > 1) { partLengths[0] = startIndexes[1]; for (int i = 1; i < partCount - 1; i++) { partLengths[i] = startIndexes[i + 1] - startIndexes[i]; } } partLengths[partCount - 1] = pointCount - startIndexes[partCount - 1]; LinearRing shell = null; List<LinearRing> holes = new ArrayList<>(); List<Polygon> polygons = new ArrayList<>(); for (int i = 0; i < partCount; i++) { Coordinate[] coordinates = readCoordinates(input, partLengths[i]); if (isClockwise(coordinates)) { if (shell != null) { polygons.add(GEOMETRY_FACTORY.createPolygon(shell, holes.toArray(new LinearRing[0]))); holes.clear(); } else { verify(holes.isEmpty(), "shell is null but holes found"); } shell = GEOMETRY_FACTORY.createLinearRing(coordinates); } else { verify(shell != null, "shell is null but hole found"); holes.add(GEOMETRY_FACTORY.createLinearRing(coordinates)); } } polygons.add(GEOMETRY_FACTORY.createPolygon(shell, holes.toArray(new LinearRing[0]))); if (multitype) { return GEOMETRY_FACTORY.createMultiPolygon(polygons.toArray(new Polygon[0])); } return getOnlyElement(polygons); }