test_class.declarator: xlsDetector
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      XlsDetector xlsDetector;
test_class.type: XlsDetector
test_class.var_name: xlsDetector
test_class.file: dataprep-backend-service/src/test/java/org/talend/dataprep/schema/xls/XlsDetectorTest.java
test_class.identifier: XlsDetectorTest
test_class.superclass: extends AbstractSchemaTestUtils
test_case.body: @Test
      public void read_xls_that_can_be_parsed_as_csv_TDP_375() throws Exception {
  
          String fileName = "TDP-375_xsl_read_as_csv.xls";
  
          try (InputStream inputStream = this.getClass().getResourceAsStream(fileName)) {
              Format actual = xlsDetector.detect(inputStream);
              Assert.assertNotNull(actual);
              assertTrue(actual.getFormatFamily() instanceof XlsFormatFamily);
              assertEquals(XlsFormatFamily.MEDIA_TYPE, actual.getFormatFamily().getMediaType());
              assertTrue(StringUtils.equals("UTF-8", actual.getEncoding()));
          }
  
      }
test_case.class_method_signature: XlsDetectorTest.read_xls_that_can_be_parsed_as_csv_TDP_375()
test_case.full_signature: @Test public void read_xls_that_can_be_parsed_as_csv_TDP_375()
test_case.identifier: read_xls_that_can_be_parsed_as_csv_TDP_375
test_case.invocations: getResourceAsStream getClass detect assertNotNull assertTrue getFormatFamily assertEquals getMediaType getFormatFamily assertTrue equals getEncoding
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void read_xls_that_can_be_parsed_as_csv_TDP_375()
focal_class.declarator: OLD_XLS_MEDIA_TYPE =
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
focal_class.modifier: private static final
focal_class.original_string: private static final String OLD_XLS_MEDIA_TYPE =
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
focal_class.type: String
focal_class.var_name: OLD_XLS_MEDIA_TYPE
focal_class.declarator: zipContainerDetector = new ZipContainerDetector()
focal_class.modifier: private
focal_class.original_string: private ZipContainerDetector zipContainerDetector = new ZipContainerDetector();
focal_class.type: ZipContainerDetector
focal_class.var_name: zipContainerDetector
focal_class.declarator: xlsFormatFamily
focal_class.modifier: @Autowired
      private transient
focal_class.original_string: @Autowired
      private transient XlsFormatFamily xlsFormatFamily;
focal_class.type: XlsFormatFamily
focal_class.var_name: xlsFormatFamily
focal_class.file: dataprep-backend-service/src/main/java/org/talend/dataprep/schema/xls/XlsDetector.java
focal_class.identifier: XlsDetector
focal_class.interfaces: implements Detector
focal_class.class_method_signature: XlsDetector.detect(Metadata metadata, TikaInputStream inputStream)
focal_class.full_signature: @Override public Format detect(Metadata metadata, TikaInputStream inputStream)
focal_class.identifier: detect
focal_class.modifiers: @Override public
focal_class.parameters: (Metadata metadata, TikaInputStream inputStream)
focal_class.return: Format
focal_class.signature: Format detect(Metadata metadata, TikaInputStream inputStream)
focal_class.superclass: extends POIFSContainerDetector
focal_method.body: @Override
      public Format detect(Metadata metadata, TikaInputStream inputStream) throws IOException {
  
          Format result = null;
  
          MediaType mediaType = super.detect(inputStream, metadata);
          if (mediaType == null || StringUtils.equals(mediaType.toString(), FormatUtils.UNKNOWN_MEDIA_TYPE)) {
              mediaType = zipContainerDetector.detect(inputStream, new Metadata());
          }
  
          if (mediaType != null) {
              String mediaTypeName = mediaType.toString();
              if (StringUtils.startsWith(mediaTypeName, XlsFormatFamily.MEDIA_TYPE)
                      || StringUtils.equals(mediaTypeName, OLD_XLS_MEDIA_TYPE)) {
                  result = new Format(xlsFormatFamily, FormatUtils.DEFAULT_ENCODING);
              }
          }
  
          return result;
      }
focal_method.class_method_signature: XlsDetector.detect(Metadata metadata, TikaInputStream inputStream)
focal_method.full_signature: @Override public Format detect(Metadata metadata, TikaInputStream inputStream)
focal_method.identifier: detect
focal_method.invocations: detect equals toString detect toString startsWith equals
focal_method.modifiers: @Override public
focal_method.parameters: (Metadata metadata, TikaInputStream inputStream)
focal_method.return: Format
focal_method.signature: Format detect(Metadata metadata, TikaInputStream inputStream)