test_class.declarator: configDirectory = new File(System.getProperty("user.home") + "/.winery")
test_class.modifier: private static final
test_class.original_string: private static final File configDirectory = new File(System.getProperty("user.home") + "/.winery");
test_class.type: File
test_class.var_name: configDirectory
test_class.declarator: configFile = new File(configDirectory + "/winery.yml")
test_class.modifier: private static final
test_class.original_string: private static final File configFile = new File(configDirectory + "/winery.yml");
test_class.type: File
test_class.var_name: configFile
test_class.file: org.eclipse.winery.common/src/test/java/org/eclipse/winery/common/configuration/EnvironmentTest.java
test_class.identifier: EnvironmentTest
test_case.body: @Test
      public void testSave() {
          YAMLConfiguration configuration = Environment.getInstance().getConfiguration();
          configuration.setProperty("ui.features.foo", false);
          configuration.setProperty("ui.features.bar", true);
          configuration.setProperty("ui.endpoints.quaz", "");
          Environment.getInstance().save();
          Environment.getInstance().setConfiguration(null);
          configuration = Environment.getInstance().getConfiguration();
          assertFalse(configuration.getBoolean("ui.features.foo"));
          assertTrue(configuration.getBoolean("ui.features.bar"));
          assertEquals(configuration.getString("ui.endpoints.quaz"), "");
      }
test_case.class_method_signature: EnvironmentTest.testSave()
test_case.full_signature: @Test public void testSave()
test_case.identifier: testSave
test_case.invocations: getConfiguration getInstance setProperty setProperty setProperty save getInstance setConfiguration getInstance getConfiguration getInstance assertFalse getBoolean assertTrue getBoolean assertEquals getString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSave()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(Environment.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(Environment.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: DEFAULT_CONFIG_NAME = "winery.yml"
focal_class.modifier: private static final
focal_class.original_string: private static final String DEFAULT_CONFIG_NAME = "winery.yml";
focal_class.type: String
focal_class.var_name: DEFAULT_CONFIG_NAME
focal_class.declarator: TEST_CONFIG_NAME = "wineryTest.yml"
focal_class.modifier: private static final
focal_class.original_string: private static final String TEST_CONFIG_NAME = "wineryTest.yml";
focal_class.type: String
focal_class.var_name: TEST_CONFIG_NAME
focal_class.declarator: DEFAULT_CONFIG_DIRECTORY = new File(System.getProperty("user.home"), ".winery")
focal_class.modifier: private static final
focal_class.original_string: private static final File DEFAULT_CONFIG_DIRECTORY = new File(System.getProperty("user.home"), ".winery");
focal_class.type: File
focal_class.var_name: DEFAULT_CONFIG_DIRECTORY
focal_class.declarator: DEFAULT_CONFIG_FILE = new File(DEFAULT_CONFIG_DIRECTORY, DEFAULT_CONFIG_NAME)
focal_class.modifier: private static final
focal_class.original_string: private static final File DEFAULT_CONFIG_FILE = new File(DEFAULT_CONFIG_DIRECTORY, DEFAULT_CONFIG_NAME);
focal_class.type: File
focal_class.var_name: DEFAULT_CONFIG_FILE
focal_class.declarator: LINUX_CONFIG_FILE = new File("/opt/winery/.winery", DEFAULT_CONFIG_NAME)
focal_class.modifier: private static final
focal_class.original_string: private static final File LINUX_CONFIG_FILE = new File("/opt/winery/.winery", DEFAULT_CONFIG_NAME);
focal_class.type: File
focal_class.var_name: LINUX_CONFIG_FILE
focal_class.declarator: instance
focal_class.modifier: private static
focal_class.original_string: private static Environment instance;
focal_class.type: Environment
focal_class.var_name: instance
focal_class.declarator: configFile
focal_class.modifier: private
focal_class.original_string: private File configFile;
focal_class.type: File
focal_class.var_name: configFile
focal_class.declarator: lastChange
focal_class.modifier: private
focal_class.original_string: private FileTime lastChange;
focal_class.type: FileTime
focal_class.var_name: lastChange
focal_class.declarator: config
focal_class.modifier: private
focal_class.original_string: private YAMLConfiguration config;
focal_class.type: YAMLConfiguration
focal_class.var_name: config
focal_class.file: org.eclipse.winery.common/src/main/java/org/eclipse/winery/common/configuration/Environment.java
focal_class.identifier: Environment
focal_class.class_method_signature: Environment.Environment()
focal_class.full_signature: private  Environment()
focal_class.identifier: Environment
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  Environment()
focal_class.class_method_signature: Environment.getInstance()
focal_class.full_signature: protected static Environment getInstance()
focal_class.identifier: getInstance
focal_class.modifiers: protected static
focal_class.parameters: ()
focal_class.return: Environment
focal_class.signature: Environment getInstance()
focal_class.class_method_signature: Environment.getConfigDirectory()
focal_class.full_signature: public File getConfigDirectory()
focal_class.identifier: getConfigDirectory
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: File
focal_class.signature: File getConfigDirectory()
focal_class.class_method_signature: Environment.getDefaultConfigInputStream()
focal_class.full_signature: static InputStream getDefaultConfigInputStream()
focal_class.identifier: getDefaultConfigInputStream
focal_class.modifiers: static
focal_class.parameters: ()
focal_class.return: InputStream
focal_class.signature: InputStream getDefaultConfigInputStream()
focal_class.class_method_signature: Environment.getTestConfigInputStream()
focal_class.full_signature: static InputStream getTestConfigInputStream()
focal_class.identifier: getTestConfigInputStream
focal_class.modifiers: static
focal_class.parameters: ()
focal_class.return: InputStream
focal_class.signature: InputStream getTestConfigInputStream()
focal_class.class_method_signature: Environment.getConfiguration()
focal_class.full_signature: protected YAMLConfiguration getConfiguration()
focal_class.identifier: getConfiguration
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: YAMLConfiguration
focal_class.signature: YAMLConfiguration getConfiguration()
focal_class.class_method_signature: Environment.setConfiguration(YAMLConfiguration configuration)
focal_class.full_signature: protected void setConfiguration(YAMLConfiguration configuration)
focal_class.identifier: setConfiguration
focal_class.modifiers: protected
focal_class.parameters: (YAMLConfiguration configuration)
focal_class.return: void
focal_class.signature: void setConfiguration(YAMLConfiguration configuration)
focal_class.class_method_signature: Environment.checkConfigurationForUpdate()
focal_class.full_signature:  boolean checkConfigurationForUpdate()
focal_class.identifier: checkConfigurationForUpdate
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean checkConfigurationForUpdate()
focal_class.class_method_signature: Environment.getConfigFromFile()
focal_class.full_signature: private void getConfigFromFile()
focal_class.identifier: getConfigFromFile
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void getConfigFromFile()
focal_class.class_method_signature: Environment.copyDefaultConfigFile()
focal_class.full_signature: private void copyDefaultConfigFile()
focal_class.identifier: copyDefaultConfigFile
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void copyDefaultConfigFile()
focal_class.class_method_signature: Environment.reloadAccountabilityConfiguration(InputStream defaultConfigInputStream)
focal_class.full_signature:  void reloadAccountabilityConfiguration(InputStream defaultConfigInputStream)
focal_class.identifier: reloadAccountabilityConfiguration
focal_class.parameters: (InputStream defaultConfigInputStream)
focal_class.return: void
focal_class.signature: void reloadAccountabilityConfiguration(InputStream defaultConfigInputStream)
focal_class.class_method_signature: Environment.save()
focal_class.full_signature: protected void save()
focal_class.identifier: save
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void save()
focal_class.class_method_signature: Environment.updateConfig()
focal_class.full_signature:  void updateConfig()
focal_class.identifier: updateConfig
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void updateConfig()
focal_method.body: protected void save() {
          if (configFile != null) {
              try (FileWriter writer = new FileWriter(configFile)) {
                  this.getConfiguration().write(writer);
              } catch (Exception e) {
                  LOGGER.warn("Error saving the config file: {}", e.getMessage(), e);
              }
          }
      }
focal_method.class_method_signature: Environment.save()
focal_method.full_signature: protected void save()
focal_method.identifier: save
focal_method.invocations: write getConfiguration warn getMessage
focal_method.modifiers: protected
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void save()