Source:
protected void makeRegistration() { Project project = new Project(Preferences.getInstance().getUserid()); ProjectSliderPage sliderPage; ProjectRegistrationPage projectPage = null; if (getPreviousPage() instanceof ProjectRegistrationPage) { projectPage = (ProjectRegistrationPage) getPreviousPage(); } else if (getPreviousPage() instanceof ProjectSliderPage) { sliderPage = (ProjectSliderPage) getPreviousPage(); projectPage = (ProjectRegistrationPage) getPreviousPage() .getPreviousPage(); project.productionPercentage = sliderPage.percentageProductionSlider .getSelection(); project.useJunitOnlyForUnitTesting = sliderPage .usesJunitForUnitTestingOnly(); project.followTestDrivenDesign = sliderPage.usesTestDrivenDesing(); } project.belongToASingleSofware = !projectPage.noSingleProjectButton .getSelection(); project.name = projectPage.projectNameInput.getText(); project.website = projectPage.projectWebsite.getText(); project.usesJunit = projectPage.usesJunit(); project.usesOtherTestingFrameworks = projectPage .usesOtherTestingFrameworks(); project.usesOtherTestingForms = projectPage.usesOtherTestingForms(); windowTitle = "Registration Summary"; try { id = new JsonTransferer().registerNewProject(project); } catch (ServerCommunicationException exception) { successfulRegistration = false; messageTitle = "Problem creating new project!"; messageBody = exception.getMessage(); messageBody += "\nAre you connected to the internet, and is port 80 open?"; messageBody += "\nPlease contact us via www.testroots.org. \nWe'll troubleshoot the issue!"; WatchDogLogger.getInstance().logSevere(exception); return; } successfulRegistration = true; ((RegistrationWizard) getWizard()).setProjectId(id); messageTitle = "New project registered!"; messageBody = "Your new project id is registered: "; }

Target:
protected void makeRegistration() { Project project = new Project(Preferences.getInstance().getUserid()); ProjectSliderPage sliderPage; ProjectRegistrationPage projectPage = null; if (getPreviousPage() instanceof ProjectRegistrationPage) { projectPage = (ProjectRegistrationPage) getPreviousPage(); } else if (getPreviousPage() instanceof ProjectSliderPage) { sliderPage = (ProjectSliderPage) getPreviousPage(); projectPage = (ProjectRegistrationPage) getPreviousPage() .getPreviousPage(); project.productionPercentage = sliderPage.percentageProductionSlider .getSelection(); project.useJunitOnlyForUnitTesting = sliderPage .usesJunitForUnitTestingOnly(); project.followTestDrivenDesign = sliderPage.usesTestDrivenDesing(); } project.belongToASingleSofware = !projectPage.noSingleProjectButton .getSelection(); project.name = projectPage.projectNameInput.getText(); project.website = projectPage.projectWebsite.getText(); project.usesJunit = projectPage.usesJunit(); project.usesOtherTestingFrameworks = projectPage .usesOtherTestingFrameworks(); project.usesOtherTestingForms = projectPage.usesOtherTestingForms(); windowTitle = "Registration Summary"; try { id = new JsonTransferer().registerNewProject(project); } catch (ServerCommunicationException exception) { successfulRegistration = false; messageTitle = "Problem creating new project!"; messageBody = exception.getMessage(); messageBody += "\nAre you connected to the internet, and is port 80 open?"; messageBody += "\nPlease contact us via www.testroots.org. \nWe'll troubleshoot the issue!"; WatchDogLogger.getInstance().logSevere(exception); return; } successfulRegistration = true; ((RegistrationWizardBase) getWizard()).setProjectId(id); messageTitle = "New project registered!"; messageBody = "Your new project id is registered: "; }