Program: 13216
Project: 13216
Buggy source:
@Test public void selectDynamicObjectAddsSubColumn() throws Exception {
  execute("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  ensureGreen();
  execute("String_Node_Str");
  assertEquals(4,response.rowCount());
  assertEquals("String_Node_Str",response.rows()[0][0]);
  short ordinal_position=1;
  assertEquals(ordinal_position++,response.rows()[0][1]);
  assertEquals("String_Node_Str",response.rows()[1][0]);
  assertEquals(ordinal_position++,response.rows()[1][1]);
  assertEquals("String_Node_Str",response.rows()[2][0]);
  assertEquals(ordinal_position++,response.rows()[2][1]);
  assertEquals("String_Node_Str",response.rows()[3][0]);
  assertEquals(ordinal_position,response.rows()[3][1]);
  execute("String_Node_Str",new Object[]{new HashMap<String,Object>(){
{
      put("String_Node_Str","String_Node_Str");
      put("String_Node_Str","String_Node_Str");
      put("String_Node_Str","String_Node_Str");
    }
  }
});
  execute("String_Node_Str");
  execute("String_Node_Str");
  waitForMappingUpdateOnAll("String_Node_Str","String_Node_Str");
  execute("String_Node_Str");
  assertEquals(5,response.rowCount());
  assertEquals("String_Node_Str",response.rows()[0][0]);
  ordinal_position=1;
  assertEquals(ordinal_position++,response.rows()[0][1]);
  assertEquals("String_Node_Str",response.rows()[1][0]);
  assertEquals(ordinal_position++,response.rows()[1][1]);
  assertEquals("String_Node_Str",response.rows()[2][0]);
  assertEquals(ordinal_position++,response.rows()[2][1]);
  assertEquals("String_Node_Str",response.rows()[3][0]);
  assertEquals(ordinal_position++,response.rows()[3][1]);
  assertEquals("String_Node_Str",response.rows()[4][0]);
  assertEquals(ordinal_position,response.rows()[4][1]);
}

Fixed version (ground truth):
@Test public void selectDynamicObjectAddsSubColumn() throws Exception {
  execute("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  ensureGreen();
  execute("String_Node_Str");
  assertEquals(4,response.rowCount());
  assertEquals("String_Node_Str",response.rows()[0][0]);
  short ordinal_position=1;
  assertEquals(ordinal_position++,response.rows()[0][1]);
  assertEquals("String_Node_Str",response.rows()[1][0]);
  assertEquals(ordinal_position++,response.rows()[1][1]);
  assertEquals("String_Node_Str",response.rows()[2][0]);
  assertEquals(ordinal_position++,response.rows()[2][1]);
  assertEquals("String_Node_Str",response.rows()[3][0]);
  assertEquals(ordinal_position,response.rows()[3][1]);
  execute("String_Node_Str",new Object[]{new HashMap<String,Object>(){
{
      put("String_Node_Str","String_Node_Str");
      put("String_Node_Str","String_Node_Str");
      put("String_Node_Str","String_Node_Str");
    }
  }
});
  execute("String_Node_Str");
  waitForMappingUpdateOnAll("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  execute("String_Node_Str");
  assertEquals(5,response.rowCount());
  assertEquals("String_Node_Str",response.rows()[0][0]);
  ordinal_position=1;
  assertEquals(ordinal_position++,response.rows()[0][1]);
  assertEquals("String_Node_Str",response.rows()[1][0]);
  assertEquals(ordinal_position++,response.rows()[1][1]);
  assertEquals("String_Node_Str",response.rows()[2][0]);
  assertEquals(ordinal_position++,response.rows()[2][1]);
  assertEquals("String_Node_Str",response.rows()[3][0]);
  assertEquals(ordinal_position++,response.rows()[3][1]);
  assertEquals("String_Node_Str",response.rows()[4][0]);
  assertEquals(ordinal_position,response.rows()[4][1]);
}