Program: 38862
Project: 38862
Buggy source:
@Test public void test() throws IOException {
  RegularTimeSeriesIndex index=RegularTimeSeriesIndex.create(Interval.parse("String_Node_Str"),Duration.ofMinutes(15));
  ImmutableMap<String,String> tags=ImmutableMap.of("String_Node_Str","String_Node_Str");
  TimeSeriesMetadata metadata=new TimeSeriesMetadata("String_Node_Str",TimeSeriesDataType.DOUBLE,tags,index);
  assertEquals("String_Node_Str",metadata.getName());
  assertEquals(TimeSeriesDataType.DOUBLE,metadata.getDataType());
  assertEquals(tags,metadata.getTags());
  assertSame(index,metadata.getIndex());
  assertEquals("String_Node_Str",metadata.toString());
  String jsonRef=String.join(System.lineSeparator(),"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  String json=JsonUtil.toJson(metadata::writeJson);
  assertEquals(jsonRef,json);
  TimeSeriesMetadata metadata2=JsonUtil.parseJson(json,TimeSeriesMetadata::parseJson);
  assertNotNull(metadata2);
  assertEquals(metadata,metadata2);
  ObjectMapper objectMapper=new ObjectMapper().registerModule(new TimeSeriesJsonModule());
  assertEquals(metadata,objectMapper.readValue(objectMapper.writeValueAsString(metadata),TimeSeriesMetadata.class));
  List<TimeSeriesMetadata> metadataList=objectMapper.readValue(objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(Arrays.asList(metadata,metadata)),TypeFactory.defaultInstance().constructCollectionType(List.class,TimeSeriesMetadata.class));
  assertEquals(2,metadataList.size());
  assertEquals(metadata,metadataList.get(0));
  assertEquals(metadata,metadataList.get(1));
}

Fixed version (ground truth):
@Test public void test() throws IOException {
  RegularTimeSeriesIndex index=RegularTimeSeriesIndex.create(Interval.parse("String_Node_Str"),Duration.ofMinutes(15));
  ImmutableMap<String,String> tags=ImmutableMap.of("String_Node_Str","String_Node_Str");
  TimeSeriesMetadata metadata=new TimeSeriesMetadata("String_Node_Str",TimeSeriesDataType.DOUBLE,tags,index);
  assertEquals("String_Node_Str",metadata.getName());
  assertEquals(TimeSeriesDataType.DOUBLE,metadata.getDataType());
  assertEquals(tags,metadata.getTags());
  assertSame(index,metadata.getIndex());
  assertEquals("String_Node_Str",metadata.toString());
  String jsonRef=String.join(System.lineSeparator(),"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  String json=JsonUtil.toJson(metadata::writeJson);
  assertEquals(jsonRef,json);
  TimeSeriesMetadata metadata2=JsonUtil.parseJson(json,TimeSeriesMetadata::parseJson);
  assertNotNull(metadata2);
  assertEquals(metadata,metadata2);
  ObjectMapper objectMapper=JsonUtil.createObjectMapper().registerModule(new TimeSeriesJsonModule());
  assertEquals(metadata,objectMapper.readValue(objectMapper.writeValueAsString(metadata),TimeSeriesMetadata.class));
  List<TimeSeriesMetadata> metadataList=objectMapper.readValue(objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(Arrays.asList(metadata,metadata)),TypeFactory.defaultInstance().constructCollectionType(List.class,TimeSeriesMetadata.class));
  assertEquals(2,metadataList.size());
  assertEquals(metadata,metadataList.get(0));
  assertEquals(metadata,metadataList.get(1));
}