ExternalSystemRunConfiguration () { ConfigurationFactory configurationFactory = getFactory(); if (configurationFactory == null) { return null; } final Element element = new Element("toClone"); try { writeExternal(element); RunConfiguration clone = configurationFactory.createTemplateConfiguration(getProject()); ExternalSystemRunConfiguration configuration = (ExternalSystemRunConfiguration)clone; configuration.setName(getName()); configuration.readExternal(element); configuration.initializeSettings(); return configuration; } catch (InvalidDataException | WriteExternalException e) { LOG.error(e); return null; } }