<commit_before>import { IComponentOptions, IController, module } from 'angular';

import { UUIDGenerator } from 'core/utils/uuid.service';
import { IStage, IExpectedArtifact } from 'core';

class ProducesArtifactsCtrl implements IController {
  public stage: IStage;

  constructor() {
    'nginject';
  }

  public hasExpectedArtifacts(): boolean {
    return this.stage
      && this.stage.expectedArtifacts instanceof Array
      && this.stage.expectedArtifacts.length > 0;
  }

  public removeExpectedArtifact(stage: IStage, expectedArtifact: IExpectedArtifact) {
    if (!this.hasExpectedArtifacts()) {<commit_msg>fix(artifacts): removing artifact from 'produces artifacts' throws exception (#4911)<commit_after>import { IComponentOptions, IController, module } from 'angular';
import { BindAll } from 'lodash-decorators';

import { UUIDGenerator } from 'core/utils/uuid.service';
import { IStage, IExpectedArtifact } from 'core';

@BindAll()
class ProducesArtifactsCtrl implements IController {
  public stage: IStage;

  constructor() {
    'nginject';
  }

  public hasExpectedArtifacts(): boolean {
    return this.stage
      && this.stage.expectedArtifacts instanceof Array
      && this.stage.expectedArtifacts.length > 0;
  }

  public removeExpectedArtifact(stage: IStage, expectedArtifact: IExpectedArtifact) {
    if (!this.hasExpectedArtifacts()) {
{'fraction_non_alphanumeric': 0.10622710622710622, 'fraction_numerical': 0.004395604395604396, 'mean_word_length': 4.913419913419913, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '264959', 'n_tokens_mistral': 395, 'n_tokens_neox': 379, 'n_words': 95}