Program: 33551
Project: 33551
Buggy source:
@Test public void insertStringTest() throws ConnectorException {
  ClusterName clusterName=getClusterName();
  TableMetadataBuilder tableMetadataBuilder=new TableMetadataBuilder(CATALOG,TABLE);
  TableMetadata tableMetadata=tableMetadataBuilder.addColumn(STRING_COLUMN,ColumnType.VARCHAR).build(false);
  sConnector.getMetadataEngine().createTable(getClusterName(),tableMetadata);
  LogicalWorkFlowCreator logicalWorkFlowCreator=new LogicalWorkFlowCreator(CATALOG,TABLE,clusterName);
  LinkedList<LogicalWorkFlowCreator.ConnectorField> selectColumns=new LinkedList<>();
  selectColumns.add(logicalWorkFlowCreator.createConnectorField(STRING_COLUMN,STRING_COLUMN,ColumnType.VARCHAR));
  LogicalWorkflow logicalWorkFlow=logicalWorkFlowCreator.addColumnName(STRING_COLUMN).addSelect(selectColumns).addWindow(WindowType.NUM_ROWS,1).getLogicalWorkflow();
  ResultHandlerTest resultSet=new ResultHandlerTest();
  StreamingRead reader=new StreamingRead(sConnector,logicalWorkFlow,resultSet);
  String queryId=String.valueOf(Math.abs(random.nextLong()));
  reader.setQueryId(queryId);
  reader.start();
  waitSeconds(15);
  StreamingInserter streamingInserter=new StreamingInserter(sConnector,clusterName,tableMetadata,new RowToInsertDefault());
  streamingInserter.numOfElement(10).elementPerSecond(5);
  streamingInserter.start();
  streamingInserter.addTypeToInsert(ColumnType.VARCHAR);
  waitSeconds(10);
  streamingInserter.end();
  endReader(reader);
  ResultSet resSet=resultSet.getResultSet(queryId);
  List<ColumnMetadata> columnMetadata=resSet.getColumnMetadata();
  assertEquals(STRING_COLUMN,columnMetadata.get(0).getName().getName());
  List<String> numsRecovered=new ArrayList<String>(10);
  for (  Row recoveredRow : resSet.getRows()) {
    if (((String)recoveredRow.getCell(STRING_COLUMN).getValue()).equals("String_Node_Str")) {
      numsRecovered.add((String)recoveredRow.getCell(STRING_COLUMN).getValue());
    }
  }
  assertTrue(columnMetadata.size() == 1);
  assertEquals(ColumnType.VARCHAR,columnMetadata.get(0).getColumnType());
  assertTrue(resSet.getRows().get(0).getCell(STRING_COLUMN).getValue() instanceof String);
}

Fixed version (ground truth):
@Test public void insertStringTest() throws ConnectorException {
  ClusterName clusterName=getClusterName();
  TableMetadataBuilder tableMetadataBuilder=new TableMetadataBuilder(CATALOG,TABLE,clusterName.getName());
  TableMetadata tableMetadata=tableMetadataBuilder.addColumn(STRING_COLUMN,ColumnType.VARCHAR).build(false);
  sConnector.getMetadataEngine().createTable(getClusterName(),tableMetadata);
  LogicalWorkFlowCreator logicalWorkFlowCreator=new LogicalWorkFlowCreator(CATALOG,TABLE,clusterName);
  LinkedList<LogicalWorkFlowCreator.ConnectorField> selectColumns=new LinkedList<>();
  selectColumns.add(logicalWorkFlowCreator.createConnectorField(STRING_COLUMN,STRING_COLUMN,ColumnType.VARCHAR));
  LogicalWorkflow logicalWorkFlow=logicalWorkFlowCreator.addColumnName(STRING_COLUMN).addSelect(selectColumns).addWindow(WindowType.NUM_ROWS,1).getLogicalWorkflow();
  ResultHandlerTest resultSet=new ResultHandlerTest();
  StreamingRead reader=new StreamingRead(sConnector,logicalWorkFlow,resultSet);
  String queryId=String.valueOf(Math.abs(random.nextLong()));
  reader.setQueryId(queryId);
  reader.start();
  waitSeconds(15);
  StreamingInserter streamingInserter=new StreamingInserter(sConnector,clusterName,tableMetadata,new RowToInsertDefault());
  streamingInserter.numOfElement(10).elementPerSecond(5);
  streamingInserter.start();
  streamingInserter.addTypeToInsert(ColumnType.VARCHAR);
  waitSeconds(10);
  streamingInserter.end();
  endReader(reader);
  ResultSet resSet=resultSet.getResultSet(queryId);
  List<ColumnMetadata> columnMetadata=resSet.getColumnMetadata();
  assertEquals(STRING_COLUMN,columnMetadata.get(0).getName().getName());
  List<String> numsRecovered=new ArrayList<String>(10);
  for (  Row recoveredRow : resSet.getRows()) {
    if (((String)recoveredRow.getCell(STRING_COLUMN).getValue()).equals("String_Node_Str")) {
      numsRecovered.add((String)recoveredRow.getCell(STRING_COLUMN).getValue());
    }
  }
  assertTrue(columnMetadata.size() == 1);
  assertEquals(ColumnType.VARCHAR,columnMetadata.get(0).getColumnType());
  assertTrue(resSet.getRows().get(0).getCell(STRING_COLUMN).getValue() instanceof String);
}