public static boolean createNewInspection(@NotNull Configuration configuration,
                                            @NotNull Project project,
                                            @NotNull InspectionProfileImpl profile) {
    final SSBasedInspection inspection = SSBasedInspection.getStructuralSearchInspection(profile);
    if (!ApplicationManager.getApplication().isUnitTestMode()) {
      InspectionMetaDataDialog dialog = inspection.createMetaDataDialog(project, profile.getDisplayName(), null);
      if (configuration instanceof ReplaceConfiguration) {
        dialog.showCleanupOption(false);
      }
      if (!dialog.showAndGet()) return false;
      configuration.setOrder(0); // reset
      configuration.setName(dialog.getName());
      configuration.setDescription(dialog.getDescription());
      configuration.setProblemDescriptor(dialog.getProblemDescriptor());
      configuration.setSuppressId(dialog.getSuppressId());
    }
    configuration.setUuid(null);
    inspection.addConfiguration(configuration);
    addInspectionToProfile(project, profile, configuration);
    if (profile instanceof InspectionProfileModifiableModel) {
      ((InspectionProfileModifiableModel)profile).setModified(true);
    }
    CustomInspectionActions.fireProfileChanged(profile);
    return true;
  }
public static boolean createNewInspection(@NotNull Configuration configuration,
                                            @NotNull Project project,
                                            @NotNull InspectionProfileImpl profile)