<commit_before>cmake_minimum_required(VERSION 2.8.8)

# Clear the contents of the file
file(WRITE "${RSP_FILENAME}.tmp" "")

file(GLOB vtk_java_files "${VTK_BINARY_DIR}/java/vtk/*.java")
file(GLOB vtk_java_rendering_files "${VTK_BINARY_DIR}/java/vtk/rendering/*.java")
file(GLOB vtk_java_rendering_awt_files "${VTK_BINARY_DIR}/java/vtk/rendering/awt/*.java")
file(GLOB vtk_java_sample_files "${VTK_BINARY_DIR}/java/vtk/sample/*.java")

foreach( java_file IN LISTS vtk_java_files vtk_java_rendering_files
                            vtk_java_rendering_awt_files vtk_java_sample_files)
  file(APPEND "${RSP_FILENAME}.tmp" "${java_file}\n")
endforeach()

if(VTK_JAVA_SWT_COMPONENT)
  file(GLOB vtk_java_swt_files "${VTK_BINARY_DIR}/java/vtk/rendering/swt/*.java")
  foreach( java_file IN LISTS vtk_java_swt_files )
    file(APPEND "${RSP_FILENAME}.tmp" "${java_file}\n")
  endforeach()
endif()

if(VTK_JAVA_JOGL_COMPONENT)
  file(GLOB vtk_java_jogl_files "${VTK_BINARY_DIR}/java/vtk/rendering/jogl/*.java")
  list(APPEND vtk_java_jogl_files "${VTK_BINARY_DIR}/java/vtk/sample/rendering/JoglConeRendering.java")
  foreach( java_file IN LISTS vtk_java_jogl_files )
    file(APPEND "${RSP_FILENAME}.tmp" "${java_file}\n")
  endforeach()
endif()

configure_file("${RSP_FILENAME}.tmp" "${RSP_FILENAME}" COPYONLY)

file(REMOVE "${RSP_FILENAME}.tmp")<commit_msg>java: refactor out writing paths to the file<commit_after>cmake_minimum_required(VERSION 2.8.8)

file(GLOB vtk_java_files "${VTK_BINARY_DIR}/java/vtk/*.java")
file(GLOB vtk_java_rendering_files "${VTK_BINARY_DIR}/java/vtk/rendering/*.java")
file(GLOB vtk_java_rendering_awt_files "${VTK_BINARY_DIR}/java/vtk/rendering/awt/*.java")
file(GLOB vtk_java_sample_files "${VTK_BINARY_DIR}/java/vtk/sample/*.java")

set(all_vtk_java_files vtk_java_rendering_files vtk_java_rendering_awt_files vtk_java_sample_files)

if(VTK_JAVA_SWT_COMPONENT)
  file(GLOB vtk_java_swt_files "${VTK_BINARY_DIR}/java/vtk/rendering/swt/*.java")
  list(APPEND all_vtk_java_files vtk_java_swt_files)
endif()

if(VTK_JAVA_JOGL_COMPONENT)
  file(GLOB vtk_java_jogl_files "${VTK_BINARY_DIR}/java/vtk/rendering/jogl/*.java")
  list(APPEND vtk_java_jogl_files "${VTK_BINARY_DIR}/java/vtk/sample/rendering/JoglConeRendering.java")
  list(APPEND all_vtk_java_files vtk_java_jogl_files)
endif()

set(CMAKE_CONFIGURABLE_FILE_CONTENT)
foreach( java_file IN LISTS ${all_vtk_java_files} )
  set(CMAKE_CONFIGURABLE_FILE_CONTENT "${CMAKE_CONFIGURABLE_FILE_CONTENT}${java_file}\n")
endforeach()

configure_file(
  "${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
  "${RSP_FILENAME}"
  @ONLY)
{'fraction_non_alphanumeric': 0.13274336283185842, 'fraction_numerical': 0.002308580223162755, 'mean_word_length': 7.469055374592834, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5818752', 'n_tokens_mistral': 1103, 'n_tokens_neox': 1054, 'n_words': 126}