Program: 13185
Project: 13185
Buggy source:
@Test public void testFs() throws Exception {
  ReferenceInfo refInfo=refInfo("String_Node_Str",DataTypes.STRING,RowGranularity.NODE);
  NestedObjectExpression fs=(NestedObjectExpression)resolver.getImplementation(refInfo);
  Map<String,Object> v=fs.value();
  String total=mapToSortedString((Map<String,Object>)v.get("String_Node_Str"));
  assertThat(total,is("String_Node_Str"));
  Object[] disks=(Object[])v.get("String_Node_Str");
  assertThat(disks.length,is(2));
  Map<String,Object> disk0=(Map<String,Object>)disks[0];
  assertThat((String)disk0.get("String_Node_Str"),is(resolveCanonicalPath("String_Node_Str")));
  assertThat((Long)disk0.get("String_Node_Str"),is(42L * 1024));
  Map<String,Object> disk1=(Map<String,Object>)disks[1];
  assertThat((String)disk1.get("String_Node_Str"),is(resolveCanonicalPath("String_Node_Str")));
  assertThat((Long)disk0.get("String_Node_Str"),is(42L * 1024));
  Object[] data=(Object[])v.get("String_Node_Str");
  assertThat(data.length,is(2));
  assertThat((String)((Map<String,Object>)data[0]).get("String_Node_Str"),is(resolveCanonicalPath("String_Node_Str")));
  assertThat((String)((Map<String,Object>)data[0]).get("String_Node_Str"),is(resolveCanonicalPath("String_Node_Str")));
  assertThat((String)((Map<String,Object>)data[1]).get("String_Node_Str"),is(resolveCanonicalPath("String_Node_Str")));
  assertThat((String)((Map<String,Object>)data[1]).get("String_Node_Str"),is(resolveCanonicalPath("String_Node_Str")));
  refInfo=refInfo("String_Node_Str",DataTypes.STRING,RowGranularity.NODE,"String_Node_Str","String_Node_Str");
  SimpleObjectExpression<Object[]> fsData=(SimpleObjectExpression<Object[]>)resolver.getImplementation(refInfo);
  for (  Object arrayElement : fsData.value()) {
    assertThat(arrayElement,instanceOf(BytesRef.class));
  }
}

Fixed version (ground truth):
@Test public void testFs() throws Exception {
  ReferenceInfo refInfo=refInfo("String_Node_Str",DataTypes.STRING,RowGranularity.NODE);
  NestedObjectExpression fs=(NestedObjectExpression)resolver.getImplementation(refInfo);
  Map<String,Object> v=fs.value();
  String total=mapToSortedString((Map<String,Object>)v.get("String_Node_Str"));
  assertThat(total,is("String_Node_Str"));
  Object[] disks=(Object[])v.get("String_Node_Str");
  assertThat(disks.length,is(2));
  Map<String,Object> disk0=(Map<String,Object>)disks[0];
  assertThat((String)disk0.get("String_Node_Str"),is(resolveCanonicalPath("String_Node_Str")));
  assertThat((Long)disk0.get("String_Node_Str"),is(42L));
  Map<String,Object> disk1=(Map<String,Object>)disks[1];
  assertThat((String)disk1.get("String_Node_Str"),is(resolveCanonicalPath("String_Node_Str")));
  assertThat((Long)disk0.get("String_Node_Str"),is(42L));
  Object[] data=(Object[])v.get("String_Node_Str");
  assertThat(data.length,is(2));
  assertThat((String)((Map<String,Object>)data[0]).get("String_Node_Str"),is(resolveCanonicalPath("String_Node_Str")));
  assertThat((String)((Map<String,Object>)data[0]).get("String_Node_Str"),is(resolveCanonicalPath("String_Node_Str")));
  assertThat((String)((Map<String,Object>)data[1]).get("String_Node_Str"),is(resolveCanonicalPath("String_Node_Str")));
  assertThat((String)((Map<String,Object>)data[1]).get("String_Node_Str"),is(resolveCanonicalPath("String_Node_Str")));
  refInfo=refInfo("String_Node_Str",DataTypes.STRING,RowGranularity.NODE,"String_Node_Str","String_Node_Str");
  SimpleObjectExpression<Object[]> fsData=(SimpleObjectExpression<Object[]>)resolver.getImplementation(refInfo);
  for (  Object arrayElement : fsData.value()) {
    assertThat(arrayElement,instanceOf(BytesRef.class));
  }
}