test_class.declarator: contentAnalysis
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      ContentAnalysis contentAnalysis;
test_class.type: ContentAnalysis
test_class.var_name: contentAnalysis
test_class.file: dataprep-dataset/src/test/java/org/talend/dataprep/dataset/service/analysis/synchronous/ContentAnalysisTest.java
test_class.identifier: ContentAnalysisTest
test_class.superclass: extends DataSetBaseTest
test_case.body: @Test(expected = IllegalArgumentException.class)
      public void testEmptyDataSetId() {
          contentAnalysis.analyze("");
      }
test_case.class_method_signature: ContentAnalysisTest.testEmptyDataSetId()
test_case.full_signature: @Test(expected = IllegalArgumentException.class) public void testEmptyDataSetId()
test_case.identifier: testEmptyDataSetId
test_case.invocations: analyze
test_case.modifiers: @Test(expected = IllegalArgumentException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEmptyDataSetId()
focal_class.declarator: LOG = LoggerFactory.getLogger(ContentAnalysis.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(ContentAnalysis.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: sizeLimit
focal_class.modifier: @Value("${dataset.records.limit:10000}")
      private
focal_class.original_string: @Value("${dataset.records.limit:10000}")
      private Long sizeLimit;
focal_class.type: Long
focal_class.var_name: sizeLimit
focal_class.declarator: repository
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private DataSetMetadataRepository repository;
focal_class.type: DataSetMetadataRepository
focal_class.var_name: repository
focal_class.declarator: contentStore
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ContentStoreRouter contentStore;
focal_class.type: ContentStoreRouter
focal_class.var_name: contentStore
focal_class.file: dataprep-dataset/src/main/java/org/talend/dataprep/dataset/service/analysis/synchronous/ContentAnalysis.java
focal_class.identifier: ContentAnalysis
focal_class.interfaces: implements SynchronousDataSetAnalyzer
focal_class.class_method_signature: ContentAnalysis.analyze(String dataSetId)
focal_class.full_signature: @Override public void analyze(String dataSetId)
focal_class.identifier: analyze
focal_class.modifiers: @Override public
focal_class.parameters: (String dataSetId)
focal_class.return: void
focal_class.signature: void analyze(String dataSetId)
focal_class.class_method_signature: ContentAnalysis.updateHeaderAndFooter(DataSetMetadata metadata)
focal_class.full_signature: private void updateHeaderAndFooter(DataSetMetadata metadata)
focal_class.identifier: updateHeaderAndFooter
focal_class.modifiers: private
focal_class.parameters: (DataSetMetadata metadata)
focal_class.return: void
focal_class.signature: void updateHeaderAndFooter(DataSetMetadata metadata)
focal_class.class_method_signature: ContentAnalysis.updateLimit(DataSetMetadata metadata)
focal_class.full_signature: private void updateLimit(DataSetMetadata metadata)
focal_class.identifier: updateLimit
focal_class.modifiers: private
focal_class.parameters: (DataSetMetadata metadata)
focal_class.return: void
focal_class.signature: void updateLimit(DataSetMetadata metadata)
focal_class.class_method_signature: ContentAnalysis.order()
focal_class.full_signature: @Override public int order()
focal_class.identifier: order
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int order()
focal_method.body: @Override
      public void analyze(String dataSetId) {
  
          // defensive programming
          if (StringUtils.isEmpty(dataSetId)) {
              throw new IllegalArgumentException("Data set id cannot be null or empty.");
          }
  
          DistributedLock datasetLock = repository.createDatasetMetadataLock(dataSetId);
          datasetLock.lock();
          try {
              DataSetMetadata metadata = repository.get(dataSetId);
              if (metadata != null) {
                  LOG.info("Indexing content of data set #{}...", metadata.getId());
  
                  updateHeaderAndFooter(metadata);
                  updateLimit(metadata);
  
                  metadata.getLifecycle().contentIndexed(true);
  
                  DataSetMetadata savedDataSetMetadata = repository.get(dataSetId);
                  // in order to check that the dataset was not deleted during analysis
                  if (savedDataSetMetadata != null) {
                      repository.save(metadata);
                  }
                  LOG.info("Indexed content of data set #{}.", dataSetId);
              } else {
                  LOG.info("Data set #{} no longer exists.", dataSetId); //$NON-NLS-1$
              }
          } finally {
              datasetLock.unlock();
          }
      }
focal_method.class_method_signature: ContentAnalysis.analyze(String dataSetId)
focal_method.full_signature: @Override public void analyze(String dataSetId)
focal_method.identifier: analyze
focal_method.invocations: isEmpty createDatasetMetadataLock lock get info getId updateHeaderAndFooter updateLimit contentIndexed getLifecycle get save info info unlock
focal_method.modifiers: @Override public
focal_method.parameters: (String dataSetId)
focal_method.return: void
focal_method.signature: void analyze(String dataSetId)