test_class.declarator: reorderStepsUtils = new ReorderStepsUtils()
test_class.modifier: private
test_class.original_string: private ReorderStepsUtils reorderStepsUtils = new ReorderStepsUtils();
test_class.type: ReorderStepsUtils
test_class.var_name: reorderStepsUtils
test_class.file: dataprep-preparation/src/test/java/org/talend/dataprep/preparation/service/ReorderStepsUtilsTest.java
test_class.identifier: ReorderStepsUtilsTest
test_case.body: @Test
      public void useAColumnBeforeCreationOrAfterDeletion_coherentStepsList() throws Exception {
          List<AppendStep> steps = new ArrayList<>();
  
          steps.add(createAppendStep("0002", asList("0003", "0004")));
          steps.add(createAppendStep("0003", emptyList()));
  
          assertTrue(reorderStepsUtils.isStepOrderInvalid(steps));
      }
test_case.class_method_signature: ReorderStepsUtilsTest.useAColumnBeforeCreationOrAfterDeletion_coherentStepsList()
test_case.full_signature: @Test public void useAColumnBeforeCreationOrAfterDeletion_coherentStepsList()
test_case.identifier: useAColumnBeforeCreationOrAfterDeletion_coherentStepsList
test_case.invocations: add createAppendStep asList add createAppendStep emptyList assertTrue isStepOrderInvalid
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void useAColumnBeforeCreationOrAfterDeletion_coherentStepsList()
focal_class.declarator: COLUMN_IDS = "column_ids"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String COLUMN_IDS = "column_ids";
focal_class.type: String
focal_class.var_name: COLUMN_IDS
focal_class.file: dataprep-preparation/src/main/java/org/talend/dataprep/preparation/service/ReorderStepsUtils.java
focal_class.identifier: ReorderStepsUtils
focal_class.class_method_signature: ReorderStepsUtils.isStepOrderInvalid(List<AppendStep> appendSteps)
focal_class.full_signature:  boolean isStepOrderInvalid(List<AppendStep> appendSteps)
focal_class.identifier: isStepOrderInvalid
focal_class.parameters: (List<AppendStep> appendSteps)
focal_class.return: boolean
focal_class.signature: boolean isStepOrderInvalid(List<AppendStep> appendSteps)
focal_class.class_method_signature: ReorderStepsUtils.renameCreatedColumns(List<AppendStep> appendSteps)
focal_class.full_signature:  void renameCreatedColumns(List<AppendStep> appendSteps)
focal_class.identifier: renameCreatedColumns
focal_class.parameters: (List<AppendStep> appendSteps)
focal_class.return: void
focal_class.signature: void renameCreatedColumns(List<AppendStep> appendSteps)
focal_method.body: boolean isStepOrderInvalid(List<AppendStep> appendSteps) {
          // Add all the columns created by steps as not available at the beginning
          final Set<String> notYetAvailableColumnsIds = appendSteps
                  .stream()
                  .flatMap(step -> step.getDiff().getCreatedColumns().stream())
                  .collect(Collectors.toSet());
  
          return appendSteps.stream().noneMatch(step -> {
              for (Action action : step.getActions()) {
                  final Map<String, String> parameters = action.getParameters();
                  String[] columnIds = { parameters.get(ImplicitParameters.COLUMN_ID.getKey()) };
                  if (ActionScope.MULTI_COLUMNS
                          .getDisplayName()
                          .equals(action.getParameters().get(ImplicitParameters.SCOPE.getKey()))) {
                      columnIds = ActionsUtils.extractColumnsId(parameters.get(COLUMN_IDS));
                  }
  
                  // remove the created columns from not available columns
                  notYetAvailableColumnsIds.removeAll(step.getDiff().getCreatedColumns());
  
                  for (String columnId : columnIds) {
                      // if the columns is no
                      if (notYetAvailableColumnsIds.contains(columnId)) {
                          return true;
                      }
  
                      // add removed columns to non available
                      if (StringUtils.equalsIgnoreCase(DeleteColumn.DELETE_COLUMN_ACTION_NAME, action.getName())) {
                          notYetAvailableColumnsIds.add(columnId);
                      }
                  }
              }
              return false;
          });
      }
focal_method.class_method_signature: ReorderStepsUtils.isStepOrderInvalid(List<AppendStep> appendSteps)
focal_method.full_signature:  boolean isStepOrderInvalid(List<AppendStep> appendSteps)
focal_method.identifier: isStepOrderInvalid
focal_method.invocations: collect flatMap stream stream getCreatedColumns getDiff toSet noneMatch stream getActions getParameters get getKey equals getDisplayName get getParameters getKey extractColumnsId get removeAll getCreatedColumns getDiff contains equalsIgnoreCase getName add
focal_method.parameters: (List<AppendStep> appendSteps)
focal_method.return: boolean
focal_method.signature: boolean isStepOrderInvalid(List<AppendStep> appendSteps)