Program: 33552
Project: 33552
Buggy source:
@Test public void insertIntTest() throws ConnectorException {
  ClusterName clusterName=getClusterName();
  TableMetadataBuilder tableMetadataBuilder=new TableMetadataBuilder(CATALOG,TABLE);
  TableMetadata tableMetadata=tableMetadataBuilder.addColumn(INTEGER_COLUMN,ColumnType.INT).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(INTEGER_COLUMN,INTEGER_COLUMN,ColumnType.INT));
  selectColumns.add(logicalWorkFlowCreator.createConnectorField(STRING_COLUMN,STRING_COLUMN,ColumnType.VARCHAR));
  LogicalWorkflow logicalWorkFlow=logicalWorkFlowCreator.addColumnName(INTEGER_COLUMN).addColumnName(STRING_COLUMN).addWindow(WindowType.NUM_ROWS,1).addSelect(selectColumns).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(20);
  StreamingInserter streamingInserter=new StreamingInserter(sConnector,clusterName,tableMetadata,new RowToInsertDefault());
  streamingInserter.numOfElement(10).elementPerSecond(5);
  streamingInserter.addTypeToInsert(ColumnType.INT).addTypeToInsert(ColumnType.VARCHAR);
  streamingInserter.start();
  waitSeconds(15);
  streamingInserter.end();
  waitSeconds(10);
  reader.end();
  ResultSet resSet=resultSet.getResultSet(queryId);
  List<Integer> numsRecovered=new ArrayList<Integer>(10);
  for (  Row recoveredRow : resSet.getRows()) {
    if (recoveredRow.getCell(STRING_COLUMN).getValue().equals("String_Node_Str")) {
      numsRecovered.add((Integer)recoveredRow.getCell(INTEGER_COLUMN).getValue());
    }
  }
  assertEquals(10,numsRecovered.size());
  List<ColumnMetadata> columnMetadata=resSet.getColumnMetadata();
  assertEquals(INTEGER_COLUMN,columnMetadata.get(0).getName().getName());
  for (int i=0; i < 10; i++) {
    assertTrue(numsRecovered.contains(new Integer(i)));
  }
  assertTrue(columnMetadata.size() == 2);
  assertEquals(ColumnType.INT,columnMetadata.get(0).getColumnType());
  assertTrue(resSet.getRows().get(0).getCell(INTEGER_COLUMN).getValue() instanceof Integer);
}

Fixed version (ground truth):
@Test public void insertIntTest() throws ConnectorException {
  ClusterName clusterName=getClusterName();
  TableMetadataBuilder tableMetadataBuilder=new TableMetadataBuilder(CATALOG,TABLE,clusterName.getName());
  TableMetadata tableMetadata=tableMetadataBuilder.addColumn(INTEGER_COLUMN,ColumnType.INT).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(INTEGER_COLUMN,INTEGER_COLUMN,ColumnType.INT));
  selectColumns.add(logicalWorkFlowCreator.createConnectorField(STRING_COLUMN,STRING_COLUMN,ColumnType.VARCHAR));
  LogicalWorkflow logicalWorkFlow=logicalWorkFlowCreator.addColumnName(INTEGER_COLUMN).addColumnName(STRING_COLUMN).addWindow(WindowType.NUM_ROWS,1).addSelect(selectColumns).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(20);
  StreamingInserter streamingInserter=new StreamingInserter(sConnector,clusterName,tableMetadata,new RowToInsertDefault());
  streamingInserter.numOfElement(10).elementPerSecond(5);
  streamingInserter.addTypeToInsert(ColumnType.INT).addTypeToInsert(ColumnType.VARCHAR);
  streamingInserter.start();
  waitSeconds(15);
  streamingInserter.end();
  waitSeconds(10);
  reader.end();
  ResultSet resSet=resultSet.getResultSet(queryId);
  List<Integer> numsRecovered=new ArrayList<Integer>(10);
  for (  Row recoveredRow : resSet.getRows()) {
    if (recoveredRow.getCell(STRING_COLUMN).getValue().equals("String_Node_Str")) {
      numsRecovered.add((Integer)recoveredRow.getCell(INTEGER_COLUMN).getValue());
    }
  }
  assertEquals(10,numsRecovered.size());
  List<ColumnMetadata> columnMetadata=resSet.getColumnMetadata();
  assertEquals(INTEGER_COLUMN,columnMetadata.get(0).getName().getName());
  for (int i=0; i < 10; i++) {
    assertTrue(numsRecovered.contains(new Integer(i)));
  }
  assertTrue(columnMetadata.size() == 2);
  assertEquals(ColumnType.INT,columnMetadata.get(0).getColumnType());
  assertTrue(resSet.getRows().get(0).getCell(INTEGER_COLUMN).getValue() instanceof Integer);
}