test_class.declarator: csv = new File("src/test/resources/aml/iomatrix/TestDefineHeader.csv")
test_class.modifier: private final
test_class.original_string: private final File csv = new File("src/test/resources/aml/iomatrix/TestDefineHeader.csv");
test_class.type: File
test_class.var_name: csv
test_class.declarator: PATH = "src/test/resources/aml/iomatrix/"
test_class.modifier: private final
test_class.original_string: private final String PATH = "src/test/resources/aml/iomatrix/";
test_class.type: String
test_class.var_name: PATH
test_class.declarator: XLSX_MATRIX = "Execl_2007_2013.xlsx"
test_class.modifier: private final
test_class.original_string: private final String XLSX_MATRIX = "Execl_2007_2013.xlsx";
test_class.type: String
test_class.var_name: XLSX_MATRIX
test_class.declarator: XLS_MATRIX = "Execl_97_2003.xls"
test_class.modifier: private final
test_class.original_string: private final String XLS_MATRIX = "Execl_97_2003.xls";
test_class.type: String
test_class.var_name: XLS_MATRIX
test_class.declarator: CSV_MATRIX = "Csv.csv"
test_class.modifier: private final
test_class.original_string: private final String CSV_MATRIX = "Csv.csv";
test_class.type: String
test_class.var_name: CSV_MATRIX
test_class.declarator: YAML_MATRIX = "SystemColumns.yaml"
test_class.modifier: private final
test_class.original_string: private final String YAML_MATRIX = "SystemColumns.yaml";
test_class.type: String
test_class.var_name: YAML_MATRIX
test_class.declarator: ERROR_YAML_MATRIX = "ErrorArrayInBlock.yaml"
test_class.modifier: private final
test_class.original_string: private final String ERROR_YAML_MATRIX = "ErrorArrayInBlock.yaml";
test_class.type: String
test_class.var_name: ERROR_YAML_MATRIX
test_class.declarator: JSON_MATRIX = "JSON.json"
test_class.modifier: private final
test_class.original_string: private final String JSON_MATRIX = "JSON.json";
test_class.type: String
test_class.var_name: JSON_MATRIX
test_class.declarator: YAML_MATRIX_WITH_NULLS = "MatrixWithNulls.yaml"
test_class.modifier: private final
test_class.original_string: private final String YAML_MATRIX_WITH_NULLS = "MatrixWithNulls.yaml";
test_class.type: String
test_class.var_name: YAML_MATRIX_WITH_NULLS
test_class.declarator: thrown = ExpectedException.none()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public ExpectedException thrown = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: thrown
test_class.file: BackEnd/Core/sailfish-core/src/test/java/com/exactpro/sf/aml/iomatrix/AdvancedMatrixReaderTest.java
test_class.identifier: AdvancedMatrixReaderTest
test_case.body: @Test
      public void testYamlMatrixWithNulls() throws Exception {
          try (AdvancedMatrixReader reader = new AdvancedMatrixReader(new File(PATH + YAML_MATRIX_WITH_NULLS))) {
  
              Assert.assertEquals(asMapWithNumberLine(el("#action", "test case start", 17)),
                      reader.readCells());
              Assert.assertEquals(asMapWithNumberLine(el("#reference", "BL1", 19),
                      el("#action", "send", 20),
                      el("Side", "BUY", 21)),
                      reader.readCells());
              Assert.assertEquals(asMapWithNumberLine(el("#reference", "BL2", 22)),
                      reader.readCells());
              Assert.assertEquals(asMapWithNumberLine(el("#action", "Test case end", 17)),
                      reader.readCells());
          }
      }
test_case.class_method_signature: AdvancedMatrixReaderTest.testYamlMatrixWithNulls()
test_case.full_signature: @Test public void testYamlMatrixWithNulls()
test_case.identifier: testYamlMatrixWithNulls
test_case.invocations: assertEquals asMapWithNumberLine el readCells assertEquals asMapWithNumberLine el el el readCells assertEquals asMapWithNumberLine el readCells assertEquals asMapWithNumberLine el readCells
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testYamlMatrixWithNulls()
focal_class.declarator: ACTION_FIELD = Column.Action.getName()
focal_class.modifier: private static final
focal_class.original_string: private static final String ACTION_FIELD = Column.Action.getName();
focal_class.type: String
focal_class.var_name: ACTION_FIELD
focal_class.declarator: DEFINE_HEADER = JavaStatement.DEFINE_HEADER.getValue()
focal_class.modifier: private static final
focal_class.original_string: private static final String DEFINE_HEADER = JavaStatement.DEFINE_HEADER.getValue();
focal_class.type: String
focal_class.var_name: DEFINE_HEADER
focal_class.declarator: SYSTEM_FIELD_PREFIX = Column.getSystemPrefix()
focal_class.modifier: private static final
focal_class.original_string: private static final String SYSTEM_FIELD_PREFIX = Column.getSystemPrefix();
focal_class.type: String
focal_class.var_name: SYSTEM_FIELD_PREFIX
focal_class.declarator: reader
focal_class.modifier: private final
focal_class.original_string: private final IMatrixReader reader;
focal_class.type: IMatrixReader
focal_class.var_name: reader
focal_class.declarator: header
focal_class.modifier: private
focal_class.original_string: private List<SimpleCell> header;
focal_class.type: List<SimpleCell>
focal_class.var_name: header
focal_class.declarator: fileType
focal_class.modifier: private final
focal_class.original_string: private final MatrixFileTypes fileType;
focal_class.type: MatrixFileTypes
focal_class.var_name: fileType
focal_class.declarator: positionFound
focal_class.modifier: private
focal_class.original_string: private boolean positionFound;
focal_class.type: boolean
focal_class.var_name: positionFound
focal_class.declarator: actionPosition = -1
focal_class.modifier: private
focal_class.original_string: private int actionPosition = -1;
focal_class.type: int
focal_class.var_name: actionPosition
focal_class.declarator: rowNumber = 1
focal_class.modifier: private
focal_class.original_string: private int rowNumber = 1;
focal_class.type: int
focal_class.var_name: rowNumber
focal_class.file: BackEnd/Core/sailfish-core/src/main/java/com/exactpro/sf/aml/iomatrix/AdvancedMatrixReader.java
focal_class.identifier: AdvancedMatrixReader
focal_class.interfaces: implements AutoCloseable
focal_class.class_method_signature: AdvancedMatrixReader.AdvancedMatrixReader(File file)
focal_class.full_signature: public  AdvancedMatrixReader(File file)
focal_class.identifier: AdvancedMatrixReader
focal_class.modifiers: public
focal_class.parameters: (File file)
focal_class.signature:  AdvancedMatrixReader(File file)
focal_class.class_method_signature: AdvancedMatrixReader.AdvancedMatrixReader(File file, String encoding)
focal_class.full_signature: public  AdvancedMatrixReader(File file, String encoding)
focal_class.identifier: AdvancedMatrixReader
focal_class.modifiers: public
focal_class.parameters: (File file, String encoding)
focal_class.signature:  AdvancedMatrixReader(File file, String encoding)
focal_class.class_method_signature: AdvancedMatrixReader.fillHeaders()
focal_class.full_signature: private void fillHeaders()
focal_class.identifier: fillHeaders
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void fillHeaders()
focal_class.class_method_signature: AdvancedMatrixReader.readCells()
focal_class.full_signature: public Map<String, SimpleCell> readCells()
focal_class.identifier: readCells
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, SimpleCell>
focal_class.signature: Map<String, SimpleCell> readCells()
focal_class.class_method_signature: AdvancedMatrixReader.getReader(File matrixPath)
focal_class.full_signature: public static IMatrixReader getReader(File matrixPath)
focal_class.identifier: getReader
focal_class.modifiers: public static
focal_class.parameters: (File matrixPath)
focal_class.return: IMatrixReader
focal_class.signature: IMatrixReader getReader(File matrixPath)
focal_class.class_method_signature: AdvancedMatrixReader.getReader(File matrixPath, String encoding)
focal_class.full_signature: public static IMatrixReader getReader(File matrixPath, String encoding)
focal_class.identifier: getReader
focal_class.modifiers: public static
focal_class.parameters: (File matrixPath, String encoding)
focal_class.return: IMatrixReader
focal_class.signature: IMatrixReader getReader(File matrixPath, String encoding)
focal_class.class_method_signature: AdvancedMatrixReader.getFileType()
focal_class.full_signature: public MatrixFileTypes getFileType()
focal_class.identifier: getFileType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: MatrixFileTypes
focal_class.signature: MatrixFileTypes getFileType()
focal_class.class_method_signature: AdvancedMatrixReader.getRowNumber()
focal_class.full_signature: public int getRowNumber()
focal_class.identifier: getRowNumber
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getRowNumber()
focal_class.class_method_signature: AdvancedMatrixReader.getHeader()
focal_class.full_signature: public List<SimpleCell> getHeader()
focal_class.identifier: getHeader
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<SimpleCell>
focal_class.signature: List<SimpleCell> getHeader()
focal_class.class_method_signature: AdvancedMatrixReader.hasNext()
focal_class.full_signature: public boolean hasNext()
focal_class.identifier: hasNext
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasNext()
focal_class.class_method_signature: AdvancedMatrixReader.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: AdvancedMatrixReader.redefineHeaders(SimpleCell[] readedSimpleCells)
focal_class.full_signature: private void redefineHeaders(SimpleCell[] readedSimpleCells)
focal_class.identifier: redefineHeaders
focal_class.modifiers: private
focal_class.parameters: (SimpleCell[] readedSimpleCells)
focal_class.return: void
focal_class.signature: void redefineHeaders(SimpleCell[] readedSimpleCells)
focal_class.class_method_signature: AdvancedMatrixReader.checkHeaders(List<SimpleCell> headers)
focal_class.full_signature: private boolean checkHeaders(List<SimpleCell> headers)
focal_class.identifier: checkHeaders
focal_class.modifiers: private
focal_class.parameters: (List<SimpleCell> headers)
focal_class.return: boolean
focal_class.signature: boolean checkHeaders(List<SimpleCell> headers)
focal_method.body: public Map<String, SimpleCell> readCells() throws IOException, AMLException {
  
          SimpleCell[] readedCells = reader.readCells();
  
          if (actionPosition > -1) {
              if (readedCells.length > actionPosition && readedCells[actionPosition].getValue().equals(DEFINE_HEADER)) {
                  redefineHeaders(readedCells);
              }
          }
  
          Map<String, SimpleCell> result = new LinkedHashMap<>();
  
          for (int i = 0; i < Math.min(header.size(), readedCells.length); i++) {
              SimpleCell value = readedCells[i];
  
              if(!value.getValue().isEmpty()) {
                  result.put(header.get(i).getValue(), value);
              }
          }
          // Key-value pair with key "" inserts into result map, if "DefineHeader"
          // command overrides longer header than original. Delete it's.
          result.remove("");
  
          rowNumber++;
  
          return result;
      }
focal_method.class_method_signature: AdvancedMatrixReader.readCells()
focal_method.full_signature: public Map<String, SimpleCell> readCells()
focal_method.identifier: readCells
focal_method.invocations: readCells equals getValue redefineHeaders min size isEmpty getValue put getValue get remove
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: Map<String, SimpleCell>
focal_method.signature: Map<String, SimpleCell> readCells()