	private void onChangeComboBoxRecipient() {
		UserData recipientUserData = (UserData) emailForm.getPanelDraftPage().getComboBoxRecipient().getSelectedItem();
		List<Object> parameters = new ArrayList<>();
		if (recipientUserData != null) {
			parameters.add(recipientUserData);
			if (LogInEvent.getWorker() != null) {
				parameters.add(LogInEvent.getWorker().getLogin());
				((DraftTableModel) emailForm.getPanelDraftPage().getDraftTable().getModel()) //
						.reloadData(
								Query.TabOutboxPageEventQuery.DISTINCT_DRAFT_MESSAGE_BY_RECIPIENT_USER_DATA_AND_SENDER_LOGIN
										.getValue(),
								parameters);
			} else {
				((DraftTableModel) emailForm.getPanelDraftPage().getDraftTable().getModel()) //
						.reloadData(
								Query.TabOutboxPageEventQuery.DISTINCT_DRAFT_MESSAGE_BY_RECIPIENT_USER_DATA.getValue(),
								parameters);
			}
		} else {
			if (LogInEvent.getWorker() != null) {
				parameters.add(LogInEvent.getWorker().getLogin());
				((DraftTableModel) emailForm.getPanelDraftPage().getDraftTable().getModel()) //
						.reloadData(Query.TabOutboxPageEventQuery.DRAFT_MESSAGE_BY_SENDER_LOGIN.getValue(), parameters);
			} else {
				((DraftTableModel) emailForm.getPanelDraftPage().getDraftTable().getModel()) //
						.reloadData();
			}
		}
	}

	private void onChangeComboBoxRecipient() {
		UserData recipientUserData = (UserData) emailForm.getPanelDraftPage().getComboBoxRecipient().getSelectedItem();
		List<Object> parameters = new ArrayList<Object>();
		if (recipientUserData != null) {
			parameters.add(recipientUserData);
			if (LogInEvent.getWorker() != null) {
				parameters.add(LogInEvent.getWorker().getLogin());
				((DraftTableModel) emailForm.getPanelDraftPage().getDraftTable().getModel()) //
						.reloadData(
								Query.TabOutboxPageEventQuery.DISTINCT_DRAFT_MESSAGE_BY_RECIPIENT_USER_DATA_AND_SENDER_LOGIN
										.getValue(),
								parameters);
			} else {
				((DraftTableModel) emailForm.getPanelDraftPage().getDraftTable().getModel()) //
						.reloadData(
								Query.TabOutboxPageEventQuery.DISTINCT_DRAFT_MESSAGE_BY_RECIPIENT_USER_DATA.getValue(),
								parameters);
			}
		} else {
			if (LogInEvent.getWorker() != null) {
				parameters.add(LogInEvent.getWorker().getLogin());
				((DraftTableModel) emailForm.getPanelDraftPage().getDraftTable().getModel()) //
						.reloadData(Query.TabOutboxPageEventQuery.DRAFT_MESSAGE_BY_SENDER_LOGIN.getValue(), parameters);
			} else {
				((DraftTableModel) emailForm.getPanelDraftPage().getDraftTable().getModel()) //
						.reloadData();
			}
		}
	}

Replace Generic With Diamond ArrayList<Object> with ArrayList<> in method private onChangeComboBoxRecipient() : void from class com.javafee.elibrary.core.emailform.TabDraftPageEvent


	private void reloadOutboxTable() {
		if (LogInEvent.getWorker() != null) {
			List<Object> parameters = new ArrayList<>();
			parameters.add(LogInEvent.getWorker().getLogin());
			((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
					.reloadData(Query.TabOutboxPageEventQuery.MESSAGE_BY_SENDER_LOGIN.getValue(), parameters);
		} else {
			((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
					.reloadData();
		}
	}

	private void reloadOutboxTable() {
		if (LogInEvent.getWorker() != null) {
			List<Object> parameters = new ArrayList<Object>();
			parameters.add(LogInEvent.getWorker().getLogin());
			((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
					.reloadData(Query.TabOutboxPageEventQuery.MESSAGE_BY_SENDER_LOGIN.getValue(), parameters);
		} else {
			((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
					.reloadData();
		}
	}

Replace Generic With Diamond ArrayList<Object> with ArrayList<> in method private reloadOutboxTable() : void from class com.javafee.elibrary.core.emailform.TabOutboxPageEvent


	private void onChangeChckShowOnlySystemCorrespondence() {
		if (emailForm.getPanelOutboxPage().getCheckShowOnlySystemCorrespondence().isSelected()) {
			List<Object> parameters = new ArrayList<>();
			MessageType messageType = Common
					.findMessageTypeByName(Constants.DATA_BASE_MESSAGE_TYPE_SYS_MESSAGE).get();
			parameters.add(messageType);
			((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
					.reloadData(Query.TabOutboxPageEventQuery.MESSAGE_BY_MESSAGE_TYPE.getValue(), parameters);
		} else {
			onChangeComboBoxRecipient();
		}
	}

	private void onChangeChckShowOnlySystemCorrespondence() {
		if (emailForm.getPanelOutboxPage().getCheckShowOnlySystemCorrespondence().isSelected()) {
			List<Object> parameters = new ArrayList<Object>();
			MessageType messageType = Common
					.findMessageTypeByName(Constants.DATA_BASE_MESSAGE_TYPE_SYS_MESSAGE).get();
			parameters.add(messageType);
			((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
					.reloadData(Query.TabOutboxPageEventQuery.MESSAGE_BY_MESSAGE_TYPE.getValue(), parameters);
		} else {
			onChangeComboBoxRecipient();
		}
	}

Replace Generic With Diamond ArrayList<Object> with ArrayList<> in method private onChangeChckShowOnlySystemCorrespondence() : void from class com.javafee.elibrary.core.emailform.TabOutboxPageEvent


	private void onChangeComboBoxRecipient() {
		UserData recipientUserData = (UserData) emailForm.getPanelOutboxPage().getComboBoxRecipient().getSelectedItem();
		List<Object> parameters = new ArrayList<>();
		if (recipientUserData != null) {
			parameters.add(recipientUserData);
			if (LogInEvent.getWorker() != null) {
				parameters.add(LogInEvent.getWorker().getLogin());
				((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
						.reloadData(
								Query.TabOutboxPageEventQuery.DISTINCT_MESSAGE_BY_RECIPIENT_USER_DATA_AND_SENDER_LOGIN
										.getValue(),
								parameters);
			} else {
				((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
						.reloadData(Query.TabOutboxPageEventQuery.DISTINCT_MESSAGE_BY_RECIPIENT_USER_DATA.getValue(),
								parameters);
			}
		} else {
			if (LogInEvent.getWorker() != null) {
				parameters.add(LogInEvent.getWorker().getLogin());
				((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
						.reloadData(Query.TabOutboxPageEventQuery.MESSAGE_BY_SENDER_LOGIN.getValue(), parameters);
			} else
				((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
						.reloadData();
		}
	}

	private void onChangeComboBoxRecipient() {
		UserData recipientUserData = (UserData) emailForm.getPanelOutboxPage().getComboBoxRecipient().getSelectedItem();
		List<Object> parameters = new ArrayList<Object>();
		if (recipientUserData != null) {
			parameters.add(recipientUserData);
			if (LogInEvent.getWorker() != null) {
				parameters.add(LogInEvent.getWorker().getLogin());
				((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
						.reloadData(
								Query.TabOutboxPageEventQuery.DISTINCT_MESSAGE_BY_RECIPIENT_USER_DATA_AND_SENDER_LOGIN
										.getValue(),
								parameters);
			} else {
				((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
						.reloadData(Query.TabOutboxPageEventQuery.DISTINCT_MESSAGE_BY_RECIPIENT_USER_DATA.getValue(),
								parameters);
			}
		} else {
			if (LogInEvent.getWorker() != null) {
				parameters.add(LogInEvent.getWorker().getLogin());
				((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
						.reloadData(Query.TabOutboxPageEventQuery.MESSAGE_BY_SENDER_LOGIN.getValue(), parameters);
			} else
				((OutboxTableModel) emailForm.getPanelOutboxPage().getOutboxTable().getModel()) //
						.reloadData();
		}
	}

Replace Generic With Diamond ArrayList<Object> with ArrayList<> in method private onChangeComboBoxRecipient() : void from class com.javafee.elibrary.core.emailform.TabOutboxPageEvent


	private MainSplashScreen(String filename, final Frame f, int waitTime) {
		super(f);
		JLabel pictureLabel = new CustomJLabel(new ImageIcon(filename));
		getContentPane().add(pictureLabel, BorderLayout.CENTER);
		pack();
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		Dimension labelSize = pictureLabel.getPreferredSize();
		setLocation(screenSize.width / 2 - (labelSize.width / 2), screenSize.height / 2 - (labelSize.height / 2));

		addMouseListener(new MouseAdapter() {
			@Override
			public void mousePressed(MouseEvent e) {
				setVisible(false);
				dispose();
			}
		});

		final int pause = waitTime;
		final Runnable closerRunner = () -> {
			setVisible(false);
			f.setVisible(true);
			dispose();
		};

		Runnable waitRunner = () -> {
			try {
				setVisible(true);
				SystemProperties.getInstance().initializeSystem();
				Thread.sleep(pause);
				SwingUtilities.invokeAndWait(closerRunner);
			} catch (InvocationTargetException | InterruptedException e) {
				e.printStackTrace();
			}
		};

		setVisible(true);
		Thread splashThread = new Thread(waitRunner, "SplashThread");
		splashThread.start();
	}

	private MainSplashScreen(String filename, final Frame f, int waitTime) {
		super(f);
		JLabel pictureLabel = new JLabel(new ImageIcon(filename));
		getContentPane().add(pictureLabel, BorderLayout.CENTER);
		pack();
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		Dimension labelSize = pictureLabel.getPreferredSize();
		setLocation(screenSize.width / 2 - (labelSize.width / 2), screenSize.height / 2 - (labelSize.height / 2));

		addMouseListener(new MouseAdapter() {
			@Override
			public void mousePressed(MouseEvent e) {
				setVisible(false);
				dispose();
			}
		});

		final int pause = waitTime;
		final Runnable closerRunner = new Runnable() {
			@Override
			public void run() {
				setVisible(false);
				f.setVisible(true);
				dispose();
			}
		};

		Runnable waitRunner = new Runnable() {
			@Override
			public void run() {
				try {
					setVisible(true);
					SystemProperties.getInstance().initializeSystem();
					Thread.sleep(pause);
					SwingUtilities.invokeAndWait(closerRunner);
				} catch (InvocationTargetException | InterruptedException e) {
					e.printStackTrace();
				}
			}
		};

		setVisible(true);
		Thread splashThread = new Thread(waitRunner, "SplashThread");
		splashThread.start();
	}

Replace Anonymous With Lambda com.javafee.startform.MainSplashScreen.MainSplashScreen.waitRunner.new Runnable with () -> {trysetVisible(true); in method private MainSplashScreen(filename String, f Frame, waitTime int) from class com.javafee.startform.MainSplashScreen


	public static void setLookAndFeel() {
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
			e.printStackTrace();
		}
	}

	public static void setLookAndFeel() {
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		} catch (UnsupportedLookAndFeelException e) {
			e.printStackTrace();
		}
	}

Merge Catch [catch(ClassNotFoundException e), catch(InstantiationException e), catch(IllegalAccessException e), catch(UnsupportedLookAndFeelException e)] to catch(ClassNotFoundException|InstantiationException|IllegalAccessException|UnsupportedLookAndFeelException e) in method public setLookAndFeel() : void from class com.javafee.common.Utils


	public static void main(String[] args) {
		SwingUtilities.invokeLater(() -> {
			try {
				Actions actions = new Actions();
				actions.control();
			} catch (Exception e) {
				e.printStackTrace();
			}
		});
	}

	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			@Override
			public void run() {
				try {
					Actions actions = new Actions();
					actions.control();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

Replace Anonymous With Lambda com.javafee.main.Library.main.invokeLater.new Runnable with () -> {tryActions actions=new Actions(); in method public main(args String[]) : void from class com.javafee.main.Library


			@Override
			public void run() {
				try {
					setVisible(true);
					SystemProperties.getInstance().initializeSystem();
					Thread.sleep(pause);
					SwingUtilities.invokeAndWait(closerRunner);
				} catch (InvocationTargetException | InterruptedException e) {
					e.printStackTrace();
				}
			}

			@Override
			public void run() {
				try {
					SystemProperties.getInstance().initializeSystem();
					Thread.sleep(pause);
					SwingUtilities.invokeAndWait(closerRunner);
				} catch (InvocationTargetException e) {
					e.printStackTrace();
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}

Merge Catch [catch(InvocationTargetException e), catch(InterruptedException e)] to catch(InvocationTargetException|InterruptedException e) in method public run() : void from class com.javafee.startform.MainSplashScreen.MainSplashScreen.waitRunner.new Runnable


    public static Model readPom(List<MavenProject> reactorProjects) throws MojoExecutionException {
        MavenProject rootProject = getRootProject(reactorProjects);
        File pomFile = rootProject.getFile();

        FileReader fileReader = null;

        try {
            fileReader = new FileReader(pomFile);
            MavenXpp3Reader m = new MavenXpp3Reader();
            Model model = m.read(fileReader);
            return model;
        } catch (FileNotFoundException ex) {
            throw new MojoExecutionException("POM " + pomFile.getAbsolutePath() + " could not be parsed.", ex);
        } catch (IOException | XmlPullParserException ex) {
            throw new MojoExecutionException("POM " + pomFile.getAbsolutePath() + " could not be parsed.", ex);
        } finally {
            if (null != fileReader) {
                try {
                    fileReader.close();
                } catch (IOException ex) {
                }
            }
        }
    }

    public static Model readPom(List<MavenProject> reactorProjects) throws MojoExecutionException {
        MavenProject rootProject = getRootProject(reactorProjects);
        File pomFile = rootProject.getFile();

        FileReader fileReader = null;

        try {
            fileReader = new FileReader(pomFile);
            MavenXpp3Reader m = new MavenXpp3Reader();
            Model model = m.read(fileReader);
            return model;
        } catch (FileNotFoundException ex) {
            throw new MojoExecutionException("POM " + pomFile.getAbsolutePath() + " could not be parsed.", ex);
        } catch (IOException ex) {
            throw new MojoExecutionException("POM " + pomFile.getAbsolutePath() + " could not be parsed.", ex);
        } catch (XmlPullParserException ex) {
            throw new MojoExecutionException("POM " + pomFile.getAbsolutePath() + " could not be parsed.", ex);
        } finally {
            if (null != fileReader) {
                try {
                    fileReader.close();
                } catch (IOException ex) {
                }
            }
        }
    }

Merge Catch [catch(IOException ex), catch(XmlPullParserException ex)] to catch(IOException|XmlPullParserException ex) in method public readPom(reactorProjects List<MavenProject>) : Model from class com.dkirrane.maven.plugins.ggitflow.util.MavenUtil


    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        super.execute();
        getLog().debug("Finishing feature");

        String prefix = getFeatureBranchPrefix();
        List<String> featureBranches = getGitflowInit().gitLocalFeatureBranches();
        if (null == featureBranches || featureBranches.isEmpty()) {
            throw new MojoFailureException("No local feature branches exist!");
        }

        if (StringUtils.isBlank(featureName)) {
            String featureBranch = promptForExistingFeatureBranch(prefix, featureBranches);
            featureName = trimFeatureName(featureBranch);
        } else {
            featureName = trimFeatureName(featureName);
            if (!getGitflowInit().gitLocalBranchExists(prefix + featureName)) {
                throw new MojoFailureException("No local feature branch named '" + prefix + featureName + "' exists!");
            }
        }

        getLog().info("Finishing feature '" + featureName + "'");

        if (enableFeatureVersions) {
            /* Switch to develop branch and get its current version */
            getGitflowInit().executeLocal("git checkout " + getGitflowInit().getDevelopBranch());
            reloadReactorProjects();
            String developVersion = project.getVersion();
            getLog().debug("develop version = " + developVersion);

            /* Switch to feature branch and get its current version */
            getGitflowInit().executeLocal("git checkout " + prefix + featureName);
            reloadReactorProjects();
            String featureVersion = project.getVersion();
            getLog().debug("feature version = " + featureVersion);

            setVersion(developVersion, pushFeatureFinish, prefix + featureName);
        }

        if (skipBuild == false) {
            ImmutableList.Builder<String> additionalArgs = new ImmutableList.Builder<>();
            additionalArgs.addAll(DEFAULT_INSTALL_ARGS);
            if (skipTests) {
                additionalArgs.add("-DskipTests=true");
            }
            runGoals("clean install", additionalArgs.build());
        } else {
            getLog().debug("Skipping mvn install for feature " + featureName);
        }

        GitflowFeature gitflowFeature = new GitflowFeature();
        gitflowFeature.setInit(getGitflowInit());
        gitflowFeature.setMsgPrefix(getMsgPrefix());
        gitflowFeature.setMsgSuffix(getMsgSuffix());
        gitflowFeature.setPush(pushFeatureBranch);
        gitflowFeature.setSquash(squash);
        gitflowFeature.setKeepLocal(keepLocal);
        gitflowFeature.setKeepRemote(keepRemote);
        gitflowFeature.setIsRebase(isRebase);
        gitflowFeature.setIsInteractive(isInteractive);

        try {
            gitflowFeature.finish(featureName);
        } catch (GitflowException ge) {
            throw new MojoFailureException(ge.getMessage());
        } catch (GitflowMergeConflictException gmce) {
            throw new MojoFailureException(gmce.getMessage());
        }
    }

    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        super.execute();
        getLog().debug("Finishing feature");

        String prefix = getFeatureBranchPrefix();
        List<String> featureBranches = getGitflowInit().gitLocalFeatureBranches();
        if (null == featureBranches || featureBranches.isEmpty()) {
            throw new MojoFailureException("No local feature branches exist!");
        }

        if (StringUtils.isBlank(featureName)) {
            String featureBranch = promptForExistingFeatureBranch(prefix, featureBranches);
            featureName = trimFeatureName(featureBranch);
        } else {
            featureName = trimFeatureName(featureName);
            if (!getGitflowInit().gitLocalBranchExists(prefix + featureName)) {
                throw new MojoFailureException("No local feature branch named '" + prefix + featureName + "' exists!");
            }
        }

        getLog().info("Finishing feature '" + featureName + "'");

        if (enableFeatureVersions) {
            /* Switch to develop branch and get its current version */
            getGitflowInit().executeLocal("git checkout " + getGitflowInit().getDevelopBranch());
            reloadReactorProjects();
            String developVersion = project.getVersion();
            getLog().debug("develop version = " + developVersion);

            /* Switch to feature branch and get its current version */
            getGitflowInit().executeLocal("git checkout " + prefix + featureName);
            reloadReactorProjects();
            String featureVersion = project.getVersion();
            getLog().debug("feature version = " + featureVersion);

            setVersion(developVersion, pushFeatureFinish, prefix + featureName);
        }

        if (skipBuild == false) {
            ImmutableList.Builder<String> additionalArgs = new ImmutableList.Builder<String>();
            additionalArgs.addAll(DEFAULT_INSTALL_ARGS);
            if (skipTests) {
                additionalArgs.add("-DskipTests=true");
            }
            runGoals("clean install", additionalArgs.build());
        } else {
            getLog().debug("Skipping mvn install for feature " + featureName);
        }

        GitflowFeature gitflowFeature = new GitflowFeature();
        gitflowFeature.setInit(getGitflowInit());
        gitflowFeature.setMsgPrefix(getMsgPrefix());
        gitflowFeature.setMsgSuffix(getMsgSuffix());
        gitflowFeature.setPush(pushFeatureBranch);
        gitflowFeature.setSquash(squash);
        gitflowFeature.setKeepLocal(keepLocal);
        gitflowFeature.setKeepRemote(keepRemote);
        gitflowFeature.setIsRebase(isRebase);
        gitflowFeature.setIsInteractive(isInteractive);

        try {
            gitflowFeature.finish(featureName);
        } catch (GitflowException ge) {
            throw new MojoFailureException(ge.getMessage());
        } catch (GitflowMergeConflictException gmce) {
            throw new MojoFailureException(gmce.getMessage());
        }
    }

Replace Generic With Diamond ImmutableList.Builder<String> with ImmutableList.Builder<> in method public execute() : void from class com.dkirrane.maven.plugins.ggitflow.FeatureFinishMojo


    @RequestMapping(value = "/user/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public ResponseEntity<UserDTO> getUserById(@PathVariable("id") Integer id) {
        if (id == null) {
            return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
        }
        User user = this.userService.getById(id);
        System.out.println(user);

        return new ResponseEntity<>(this.userDtoMapper.toDTO(user), HttpStatus.OK);
    }

    @RequestMapping(value = "/user/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public ResponseEntity<UserDTO> getUserById(@PathVariable("id") Integer id) {
        if (id == null) {
            return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
        }
        User user = this.userService.getById(id);
        System.out.println(user);

        return new ResponseEntity<UserDTO>(this.userDtoMapper.toDTO(user), HttpStatus.OK);
    }

Replace Generic With Diamond ResponseEntity<UserDTO> with ResponseEntity<> in method public getUserById(id Integer) : ResponseEntity<UserDTO> from class itmo.com.overlook.hotel.controllers.UserController


            public void keyPressed(KeyEvent e) {
                if (e.getKeyCode() == KeyEvent.VK_PAGE_UP) {
                    maxHistory.set((int) ((double) maxHistory.get() * 2.0));
                } else if (e.getKeyCode() == KeyEvent.VK_PAGE_DOWN) {
                    maxHistory.set((int) ((double) maxHistory.get() * 0.5));
                } else if (e.getKeyCode() == KeyEvent.VK_DELETE) {
                    final int histSize = maxHistory.get();
                    maxHistory.set(1);
                    new Thread(() -> {
                        try {
                            Thread.sleep(100);
                        } catch (InterruptedException e1) {
                        }
                        maxHistory.set(histSize);
                    }).start();
                }
            }

            public void keyPressed(KeyEvent e) {
                if (e.getKeyCode() == KeyEvent.VK_PAGE_UP) {
                    maxHistory.set((int) ((double) maxHistory.get() * 2.0));
                } else if (e.getKeyCode() == KeyEvent.VK_PAGE_DOWN) {
                    maxHistory.set((int) ((double) maxHistory.get() * 0.5));
                } else if (e.getKeyCode() == KeyEvent.VK_DELETE) {
                    final int histSize = maxHistory.get();
                    maxHistory.set(1);
                    new Thread(new Runnable() {
                        public void run() {
                            try {
                                Thread.sleep(100);
                            } catch (InterruptedException e1) {
                            }
                            maxHistory.set(histSize);
                        }
                    }).start();
                }
            }

Replace Anonymous With Lambda com.originblue.gui.LDGUI.display.addKeyListener.new KeyListener.keyPressed.start.new Thread.new Runnable with () -> {tryThread.sleep(100); in method public keyPressed(e KeyEvent) : void from class com.originblue.gui.LDGUI.display.addKeyListener.new KeyListener


    public void lightItUpStrategy(final LDConstants.OrderSide side, final BigDecimal amount) {
        new Thread(() -> {
            while(true) {
                Queue<LDFIXOrder> orders = new LinkedList<LDFIXOrder>();
                strategyRunning.set(true);
                for (int i = 0; i < 500; i++) {
                    if (!strategyRunning.get())
                        break;
                    int offset = ThreadLocalRandom.current().nextInt(0, 11);
//                    int offset = 1 + (i % 30);
                    LDFIXOrder order = new LDFIXOrder(side);
                    BigDecimal bbp = orderbook.getBestBid().getPrice();
                    BigDecimal bap = orderbook.getBestAsk().getPrice();

                    BigDecimal price;
                    if (side == LDConstants.OrderSide.SELL) {
                        price = bap.add(MIN_PRICEDIFF.multiply(BigDecimal.valueOf(offset)));
                    } else {
                        price = bbp.subtract(MIN_PRICEDIFF.multiply(BigDecimal.valueOf(offset)));
                    }
                    order.setPrice(price);
                    order.setSize(amount);
                    fixSession.submitFIXOrder(order, TRADINGPAIR);
                    try {
                        Thread.sleep(35);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    if (!orders.isEmpty() && i > 10) {
                        fixSession.cancelFIXOrder(orders.remove(), TRADINGPAIR, false, true);
                    }
                    orders.add(order);
                    try {
                        Thread.sleep(35);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
                while (!orders.isEmpty()) {
                    fixSession.cancelFIXOrder(orders.remove(), TRADINGPAIR, true, true);
                    try {
                        Thread.sleep(65);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        }).start();

    }

    public void lightItUpStrategy(final LDConstants.OrderSide side, final BigDecimal amount) {
        new Thread(new Runnable() {
            public void run() {
                while(true) {
                    Queue<LDFIXOrder> orders = new LinkedList<LDFIXOrder>();
                    strategyRunning.set(true);
                    for (int i = 0; i < 500; i++) {
                        if (!strategyRunning.get())
                            break;
                        // int offset = ThreadLocalRandom.current().nextInt(0, 11);
                        int offset = 1 + (i % 30);
                        LDFIXOrder order = new LDFIXOrder(side);
                        BigDecimal bbp = orderbook.getBestBid().getPrice();
                        BigDecimal bap = orderbook.getBestAsk().getPrice();

                        BigDecimal price;
                        if (side == LDConstants.OrderSide.SELL) {
                            price = bap.add(MIN_PRICEDIFF.multiply(BigDecimal.valueOf(offset)));
                        } else {
                            price = bbp.subtract(MIN_PRICEDIFF.multiply(BigDecimal.valueOf(offset)));
                        }
                        order.setPrice(price);
                        order.setSize(amount);
                        fixSession.submitFIXOrder(order, TRADINGPAIR);
                        try {
                            Thread.sleep(35);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                        if (!orders.isEmpty()) {
                            fixSession.cancelFIXOrder(orders.remove(), TRADINGPAIR, false, true);
                        }
                        orders.add(order);
                        try {
                            Thread.sleep(35);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                    }
                    while (!orders.isEmpty()) {
                        fixSession.cancelFIXOrder(orders.remove(), TRADINGPAIR, true, true);
                        try {
                            Thread.sleep(65);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                    }
                }
            }
        }).start();

    }

Replace Anonymous With Lambda com.originblue.gui.LDGUI.lightItUpStrategy.start.new Thread.new Runnable with () -> {while(true){Queue<LDFIXOrder> orders=new LinkedList<LDFIXOrder>(); in method public lightItUpStrategy(side LDConstants.OrderSide, amount BigDecimal) : void from class com.originblue.gui.LDGUI


    public void rapidFireStrategy(final LDConstants.OrderSide side, final BigDecimal amount) {
        new Thread(() -> {
            Queue<LDFIXOrder> orders = new LinkedList<LDFIXOrder>();
            for (int i = 0; i < 500; i++) {
                LDFIXOrder order = defaultStrategyRunner(side, amount, false);
                try {
                    Thread.sleep(77);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                if(!orders.isEmpty()) {
                    fixSession.cancelFIXOrder(orders.remove(), TRADINGPAIR, false, true);
                }
                orders.add(order);
                try {
                    Thread.sleep(70);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
            while (!orders.isEmpty()) {
                fixSession.cancelFIXOrder(orders.remove(), TRADINGPAIR,false, true);
            }
        }).start();

    }

    public void rapidFireStrategy(final LDConstants.OrderSide side, final BigDecimal amount) {
        new Thread(new Runnable() {
            public void run() {
                Queue<LDFIXOrder> orders = new LinkedList<LDFIXOrder>();
                for (int i = 0; i < 500; i++) {
                    LDFIXOrder order = defaultStrategyRunner(side, amount, false);
                    try {
                        Thread.sleep(77);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    if(!orders.isEmpty()) {
                        fixSession.cancelFIXOrder(orders.remove(), TRADINGPAIR, false, true);
                    }
                    orders.add(order);
                    try {
                        Thread.sleep(70);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
                while (!orders.isEmpty()) {
                    fixSession.cancelFIXOrder(orders.remove(), TRADINGPAIR,false, true);
                }
            }
        }).start();

    }

Replace Anonymous With Lambda com.originblue.gui.LDGUI.rapidFireStrategy.start.new Thread.new Runnable with () -> {Queue<LDFIXOrder> orders=new LinkedList<LDFIXOrder>(); in method public rapidFireStrategy(side LDConstants.OrderSide, amount BigDecimal) : void from class com.originblue.gui.LDGUI


    private void defaultStrategy(final LDConstants.OrderSide side, final BigDecimal amount) {
        new Thread(() -> {
            LDFIXOrder order = defaultStrategyRunner(side, amount, true);

            // TODO: Invoke later on GUI thread
            orderStack.push(order);
            tableModel.insertRow(0, new Object[]{order.getSide(), order.getSize(), order.getPrice()});
        }).start();
    }

    private void defaultStrategy(final LDConstants.OrderSide side, final BigDecimal amount) {
        new Thread(new Runnable() {
            public void run() {
                LDFIXOrder order = defaultStrategyRunner(side, amount, true);

                // TODO: Invoke later on GUI thread
                orderStack.push(order);
                tableModel.insertRow(0, new Object[]{order.getSide(), order.getSize(), order.getPrice()});
            }
        }).start();
    }

Replace Anonymous With Lambda com.originblue.gui.LDGUI.defaultStrategy.start.new Thread.new Runnable with () -> {LDFIXOrder order=defaultStrategyRunner(side,amount,true); in method private defaultStrategy(side LDConstants.OrderSide, amount BigDecimal) : void from class com.originblue.gui.LDGUI


    public LDGUI(LDFIXSession fixSession, LDOrderbook orderbook, LDRestMetadataProvider metaProvider) {
        initialize();
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (ClassNotFoundException | InstantiationException | UnsupportedLookAndFeelException | IllegalAccessException e) {
            e.printStackTrace();
        }

        this.strategyRunning = new AtomicBoolean(false);
        this.metaProvider = metaProvider;
        this.frmNodaxTradingUi.setTitle("LoDax Trading UI");
        maxHistory = new AtomicInteger(3000);
        changing = new Semaphore(1);
        datasets = new HashMap<String, LDDataset>();
        chart = new XYChart(200, 200);
        chart.setTitle("Live Data");
        chart.setXAxisTitle("Time");
        chart.setYAxisTitle("Data");
        chart.getStyler().setMarkerSize(0);

        panelMiddle = new JPanel();
        graphPanel = new LDChartPanel(chart);
        this.panelMiddle.setPreferredSize(new Dimension(640, 480));
        this.frmNodaxTradingUi.getContentPane().add(panelMiddle, BorderLayout.CENTER);
        this.panelMiddle.setLayout(new CardLayout(0, 0));

        this.clearPriceFields();
        this.fixSession = fixSession;
        this.orderbook = orderbook;
        orderStack = new Stack<LDFIXOrder>();
        cancelledOrderStack = new Stack<LDFIXOrder>();
    }

    public LDGUI(LDFIXSession fixSession, LDOrderbook orderbook, LDRestMetadataProvider metaProvider) {
        initialize();
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (UnsupportedLookAndFeelException e) {
            e.printStackTrace();
        }

        this.strategyRunning = new AtomicBoolean(false);
        this.metaProvider = metaProvider;
        this.frmNodaxTradingUi.setTitle("LoDax Trading UI");
        maxHistory = new AtomicInteger(3000);
        changing = new Semaphore(1);
        datasets = new HashMap<String, LDDataset>();
        chart = new XYChart(200, 200);
        chart.setTitle("Live Data");
        chart.setXAxisTitle("Time");
        chart.setYAxisTitle("Data");
        chart.getStyler().setMarkerSize(0);

        panelMiddle = new JPanel();
        graphPanel = new LDChartPanel(chart);
        this.panelMiddle.setPreferredSize(new Dimension(640, 480));
        this.frmNodaxTradingUi.getContentPane().add(panelMiddle, BorderLayout.CENTER);
        this.panelMiddle.setLayout(new CardLayout(0, 0));

        this.clearPriceFields();
        this.fixSession = fixSession;
        this.orderbook = orderbook;
        orderStack = new Stack<LDFIXOrder>();
        cancelledOrderStack = new Stack<LDFIXOrder>();
    }

Merge Catch [catch(ClassNotFoundException e), catch(InstantiationException e), catch(IllegalAccessException e), catch(UnsupportedLookAndFeelException e)] to catch(ClassNotFoundException|InstantiationException|UnsupportedLookAndFeelException|IllegalAccessException e) in method public LDGUI(fixSession LDFIXSession, orderbook LDOrderbook, metaProvider LDRestMetadataProvider) from class com.originblue.gui.LDGUI


    private void initialize() {
        this.frmNodaxTradingUi = new JFrame();
        this.frmNodaxTradingUi.setAlwaysOnTop(true);
        this.frmNodaxTradingUi.setTitle("LoDax Trading UI");
        this.frmNodaxTradingUi.setBounds(100, 100, 643, 688);
        this.frmNodaxTradingUi.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        panelTop = new JPanel();
        this.panelTop.setPreferredSize(new Dimension(10, 120));
        this.frmNodaxTradingUi.getContentPane().add(panelTop, BorderLayout.NORTH);
        this.panelTop.setLayout(new BorderLayout(0, 0));

        this.panel = new JPanel();
        this.panel.setPreferredSize(new Dimension(300, 10));
        this.panelTop.add(this.panel, BorderLayout.WEST);
        this.panel.setLayout(null);

        this.lblNewLabel = new JLabel(LDConstants.PRIMARY_FIAT + " Balance");
        this.lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 14));
        this.lblNewLabel.setBounds(27, 25, 101, 14);
        this.panel.add(this.lblNewLabel);

        this.lblBalala = new JLabel(PRIMARY_CRYPTO + " Balance");
        this.lblBalala.setFont(new Font("Tahoma", Font.BOLD, 14));
        this.lblBalala.setBounds(194, 25, 108, 14);
        this.panel.add(this.lblBalala);

        this.lblUSDBalance = new JLabel("0.00000");
        this.lblUSDBalance.setFont(new Font("Tahoma", Font.PLAIN, 17));
        this.lblUSDBalance.setBounds(37, 50, 115, 14);
        this.panel.add(this.lblUSDBalance);

        this.lblUSDHold = new JLabel("0.00000");
        this.lblUSDHold.setBounds(37, 68, 130, 14);
        this.panel.add(this.lblUSDHold);

        this.lblBTCHold = new JLabel("0.00000");
        this.lblBTCHold.setBounds(204, 68, 130, 14);
        this.panel.add(this.lblBTCHold);

        this.lblBTCBalance = new JLabel("0.00000");
        this.lblBTCBalance.setFont(new Font("Tahoma", Font.PLAIN, 17));
        this.lblBTCBalance.setBounds(204, 50, 130, 14);
        this.panel.add(this.lblBTCBalance);

        this.panel_1 = new JPanel();
        this.panel_1.setPreferredSize(new Dimension(220, 10));
        this.panelTop.add(this.panel_1, BorderLayout.EAST);
        this.panel_1.setLayout(null);

        this.lblWssT = new JLabel("WS Latency:");
        this.lblWssT.setFont(new Font("Tahoma", Font.BOLD, 14));
        this.lblWssT.setBounds(10, 27, 108, 14);
        this.panel_1.add(this.lblWssT);

        this.lblFix = new JLabel("0.00000");
        this.lblFix.setFont(new Font("Tahoma", Font.PLAIN, 17));
        this.lblFix.setBounds(121, 52, 75, 14);
        this.panel_1.add(this.lblFix);

        this.lblFFAP = new JLabel("FIX API:");
        this.lblFFAP.setFont(new Font("Tahoma", Font.BOLD, 14));
        this.lblFFAP.setBounds(10, 52, 101, 14);
        this.panel_1.add(this.lblFFAP);

        this.lblWs = new JLabel("0.00000");
        this.lblWs.setFont(new Font("Tahoma", Font.PLAIN, 17));
        this.lblWs.setBounds(121, 26, 75, 14);
        this.panel_1.add(this.lblWs);

        this.btnLogout = new JButton("Logout");
        this.btnLogout.addActionListener(e -> {
            if (fixSession != null) {
                try {
                    fixSession.sendLogout();
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
        });
        btnLogout.setBounds(10, 77, 171, 23);
        this.panel_1.add(btnLogout);

        panelBottom = new JPanel();
        this.panelBottom.setPreferredSize(new Dimension(10, 200));
        this.panelBottom.setBounds(new Rectangle(0, 0, 0, 200));
        this.frmNodaxTradingUi.getContentPane().add(panelBottom, BorderLayout.SOUTH);
        this.panelBottom.setLayout(new BorderLayout(0, 0));

        final JPanel panel_3 = new JPanel();
        panel_3.setPreferredSize(new Dimension(300, 10));
        this.panelBottom.add(panel_3, BorderLayout.WEST);
        panel_3.setLayout(null);

        final JLabel lblBtcAmount = new JLabel(PRIMARY_CRYPTO +" Amount:");
        lblBtcAmount.setBounds(23, 23, 86, 14);
        panel_3.add(lblBtcAmount);

        this.txtBTCAmount = new JTextField();
        this.txtBTCAmount.setHorizontalAlignment(SwingConstants.CENTER);
        this.txtBTCAmount.setText("0.0001");
        this.txtBTCAmount.setBounds(100, 20, 86, 20);
        panel_3.add(this.txtBTCAmount);
        this.txtBTCAmount.setColumns(10);

        btnBuy = new JButton("(B)uy");
        this.btnBuy.addActionListener(e -> buyInvoked());
        btnBuy.setBounds(196, 19, 89, 23);
        panel_3.add(btnBuy);

        btnSell = new JButton("(S)ell");
        btnSell.addActionListener(arg0 -> sellInvoked());
        btnSell.setBounds(196, 47, 89, 23);
        panel_3.add(btnSell);

        btnCancel = new JButton("(C)ancel");
        this.btnCancel.addActionListener(arg0 -> cancelInvoked());
        btnCancel.setBounds(23, 47, 166, 23);
        panel_3.add(btnCancel);

        lblBestAsk = new JLabel("0.00000");
        lblBestAsk.setFont(new Font("Tahoma", Font.PLAIN, 16));
        lblBestAsk.setBounds(146, 100, 96, 14);
        panel_3.add(lblBestAsk);

        final JLabel lblasd = new JLabel("Best Ask:");
        lblasd.setFont(new Font("Tahoma", Font.PLAIN, 17));
        lblasd.setBounds(34, 100, 75, 14);
        panel_3.add(lblasd);

        final JLabel lblTasd = new JLabel("Last Trade:");
        lblTasd.setFont(new Font("Tahoma", Font.PLAIN, 17));
        lblTasd.setBounds(34, 125, 96, 14);
        panel_3.add(lblTasd);

        final JLabel lblBB = new JLabel("Best Bid:");
        lblBB.setFont(new Font("Tahoma", Font.PLAIN, 17));
        lblBB.setBounds(34, 150, 75, 14);
        panel_3.add(lblBB);

        lblLastTrade = new JLabel("0.00000");
        lblLastTrade.setFont(new Font("Tahoma", Font.PLAIN, 16));
        lblLastTrade.setBounds(146, 128, 96, 14);
        panel_3.add(lblLastTrade);

        lblBestBid = new JLabel("0.00000");
        lblBestBid.setFont(new Font("Tahoma", Font.PLAIN, 16));
        lblBestBid.setBounds(146, 153, 96, 14);
        panel_3.add(lblBestBid);

        String[] columns = new String[] {
                "Type", "Size", "Price"
        };
        Object[][] data = new Object[][] {};
        tableModel = new DefaultTableModel(data, columns) {
            @Override
            public boolean isCellEditable(int row, int column) {
                //all cells false
                return false;
            }
        };

        this.tblOrders = new JTable();
        this.tblOrders.setModel(tableModel);
        this.panelBottom.add(new JScrollPane(this.tblOrders));
        this.tblOrders.setMinimumSize(new Dimension(250, 200));
        this.tblOrders.setPreferredSize(new Dimension(325, 200));
    }

    private void initialize() {
        this.frmNodaxTradingUi = new JFrame();
        this.frmNodaxTradingUi.setAlwaysOnTop(true);
        this.frmNodaxTradingUi.setTitle("LoDax Trading UI");
        this.frmNodaxTradingUi.setBounds(100, 100, 643, 688);
        this.frmNodaxTradingUi.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        panelTop = new JPanel();
        this.panelTop.setPreferredSize(new Dimension(10, 120));
        this.frmNodaxTradingUi.getContentPane().add(panelTop, BorderLayout.NORTH);
        this.panelTop.setLayout(new BorderLayout(0, 0));

        this.panel = new JPanel();
        this.panel.setPreferredSize(new Dimension(300, 10));
        this.panelTop.add(this.panel, BorderLayout.WEST);
        this.panel.setLayout(null);

        this.lblNewLabel = new JLabel(LDConstants.PRIMARY_FIAT + " Balance");
        this.lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 14));
        this.lblNewLabel.setBounds(27, 25, 101, 14);
        this.panel.add(this.lblNewLabel);

        this.lblBalala = new JLabel(PRIMARY_CRYPTO + " Balance");
        this.lblBalala.setFont(new Font("Tahoma", Font.BOLD, 14));
        this.lblBalala.setBounds(194, 25, 108, 14);
        this.panel.add(this.lblBalala);

        this.lblUSDBalance = new JLabel("0.00000");
        this.lblUSDBalance.setFont(new Font("Tahoma", Font.PLAIN, 17));
        this.lblUSDBalance.setBounds(37, 50, 115, 14);
        this.panel.add(this.lblUSDBalance);

        this.lblUSDHold = new JLabel("0.00000");
        this.lblUSDHold.setBounds(37, 68, 130, 14);
        this.panel.add(this.lblUSDHold);

        this.lblBTCHold = new JLabel("0.00000");
        this.lblBTCHold.setBounds(204, 68, 130, 14);
        this.panel.add(this.lblBTCHold);

        this.lblBTCBalance = new JLabel("0.00000");
        this.lblBTCBalance.setFont(new Font("Tahoma", Font.PLAIN, 17));
        this.lblBTCBalance.setBounds(204, 50, 130, 14);
        this.panel.add(this.lblBTCBalance);

        this.panel_1 = new JPanel();
        this.panel_1.setPreferredSize(new Dimension(220, 10));
        this.panelTop.add(this.panel_1, BorderLayout.EAST);
        this.panel_1.setLayout(null);

        this.lblWssT = new JLabel("WS Latency:");
        this.lblWssT.setFont(new Font("Tahoma", Font.BOLD, 14));
        this.lblWssT.setBounds(10, 27, 108, 14);
        this.panel_1.add(this.lblWssT);

        this.lblFix = new JLabel("0.00000");
        this.lblFix.setFont(new Font("Tahoma", Font.PLAIN, 17));
        this.lblFix.setBounds(121, 52, 75, 14);
        this.panel_1.add(this.lblFix);

        this.lblFFAP = new JLabel("FIX API:");
        this.lblFFAP.setFont(new Font("Tahoma", Font.BOLD, 14));
        this.lblFFAP.setBounds(10, 52, 101, 14);
        this.panel_1.add(this.lblFFAP);

        this.lblWs = new JLabel("0.00000");
        this.lblWs.setFont(new Font("Tahoma", Font.PLAIN, 17));
        this.lblWs.setBounds(121, 26, 75, 14);
        this.panel_1.add(this.lblWs);

        this.btnLogout = new JButton("Logout");
        this.btnLogout.addActionListener(new ActionListener() {
        	public void actionPerformed(ActionEvent e) {
        	    if (fixSession != null) {
                    try {
                        fixSession.sendLogout();
                    } catch (IOException e1) {
                        e1.printStackTrace();
                    }
                }
        	}
        });
        btnLogout.setBounds(10, 77, 171, 23);
        this.panel_1.add(btnLogout);

        panelBottom = new JPanel();
        this.panelBottom.setPreferredSize(new Dimension(10, 200));
        this.panelBottom.setBounds(new Rectangle(0, 0, 0, 200));
        this.frmNodaxTradingUi.getContentPane().add(panelBottom, BorderLayout.SOUTH);
        this.panelBottom.setLayout(new BorderLayout(0, 0));

        final JPanel panel_3 = new JPanel();
        panel_3.setPreferredSize(new Dimension(300, 10));
        this.panelBottom.add(panel_3, BorderLayout.WEST);
        panel_3.setLayout(null);

        final JLabel lblBtcAmount = new JLabel(PRIMARY_CRYPTO +" Amount:");
        lblBtcAmount.setBounds(23, 23, 86, 14);
        panel_3.add(lblBtcAmount);

        this.txtBTCAmount = new JTextField();
        this.txtBTCAmount.setHorizontalAlignment(SwingConstants.CENTER);
        this.txtBTCAmount.setText("0.0001");
        this.txtBTCAmount.setBounds(100, 20, 86, 20);
        panel_3.add(this.txtBTCAmount);
        this.txtBTCAmount.setColumns(10);

        btnBuy = new JButton("(B)uy");
        this.btnBuy.addActionListener(e -> buyInvoked());
        btnBuy.setBounds(196, 19, 89, 23);
        panel_3.add(btnBuy);

        btnSell = new JButton("(S)ell");
        btnSell.addActionListener(arg0 -> sellInvoked());
        btnSell.setBounds(196, 47, 89, 23);
        panel_3.add(btnSell);

        btnCancel = new JButton("(C)ancel");
        this.btnCancel.addActionListener(arg0 -> cancelInvoked());
        btnCancel.setBounds(23, 47, 166, 23);
        panel_3.add(btnCancel);

        lblBestAsk = new JLabel("0.00000");
        lblBestAsk.setFont(new Font("Tahoma", Font.PLAIN, 16));
        lblBestAsk.setBounds(146, 100, 96, 14);
        panel_3.add(lblBestAsk);

        final JLabel lblasd = new JLabel("Best Ask:");
        lblasd.setFont(new Font("Tahoma", Font.PLAIN, 17));
        lblasd.setBounds(34, 100, 75, 14);
        panel_3.add(lblasd);

        final JLabel lblTasd = new JLabel("Last Trade:");
        lblTasd.setFont(new Font("Tahoma", Font.PLAIN, 17));
        lblTasd.setBounds(34, 125, 96, 14);
        panel_3.add(lblTasd);

        final JLabel lblBB = new JLabel("Best Bid:");
        lblBB.setFont(new Font("Tahoma", Font.PLAIN, 17));
        lblBB.setBounds(34, 150, 75, 14);
        panel_3.add(lblBB);

        lblLastTrade = new JLabel("0.00000");
        lblLastTrade.setFont(new Font("Tahoma", Font.PLAIN, 16));
        lblLastTrade.setBounds(146, 128, 96, 14);
        panel_3.add(lblLastTrade);

        lblBestBid = new JLabel("0.00000");
        lblBestBid.setFont(new Font("Tahoma", Font.PLAIN, 16));
        lblBestBid.setBounds(146, 153, 96, 14);
        panel_3.add(lblBestBid);

        String[] columns = new String[] {
                "Type", "Size", "Price"
        };
        Object[][] data = new Object[][] {};
        tableModel = new DefaultTableModel(data, columns) {
            @Override
            public boolean isCellEditable(int row, int column) {
                //all cells false
                return false;
            }
        };

        this.tblOrders = new JTable();
        this.tblOrders.setModel(tableModel);
        this.panelBottom.add(new JScrollPane(this.tblOrders));
        this.tblOrders.setMinimumSize(new Dimension(250, 200));
        this.tblOrders.setPreferredSize(new Dimension(325, 200));
    }

Replace Anonymous With Lambda com.originblue.gui.LDGUI.initialize.addActionListener.new ActionListener with e -> {if(fixSession != null){tryfixSession.sendLogout(); in method private initialize() : void from class com.originblue.gui.LDGUI


    public void init(final int checkIntervalMillis) {
        running.set(true);
        new Thread(() -> {
            while (running.get()) {
                updateAccounts();
                try {
                    Thread.sleep(checkIntervalMillis);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }).start();
    }

    public void init(final int checkIntervalMillis) {
        new Thread(new Runnable() {
            public void run() {
                while (true) {
                    updateAccounts();
                    try {
                        Thread.sleep(checkIntervalMillis);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        }).start();
    }

Replace Anonymous With Lambda com.originblue.rest.LDRestMetadataProvider.init.start.new Thread.new Runnable with () -> {while(running.get()){updateAccounts(); in method public init(checkIntervalMillis int) : void from class com.originblue.rest.LDRestMetadataProvider


    /**
     * Asynchronous read chunk operation, callback based.
     */
    private static final void readBytes(
        AsynchronousFileChannel asyncFile,
        long position, // current read or write position in file
        byte[] data,   // buffer for current producing line
        int size,
        ObjIntConsumer<Throwable> completed)
    {
        if (completed == null)
            throw new InvalidParameterException("callback can't be null!");
        if (size > data.length)
            size = data.length;
        if (size ==0) {
            completed.accept(null, 0);
            return;
        }
        ByteBuffer buf = ByteBuffer.wrap(data, 0, size);
        CompletionHandler<Integer,Object> readCompleted =
            new CompletionHandler<>() {
                @Override
                public void completed(Integer result, Object attachment) {
                    completed.accept(null, result);
                }
                @Override
                public void failed(Throwable exc, Object attachment) {
                    completed.accept(exc, 0);
                }
            };
        asyncFile.read(buf, position, null, readCompleted);
    }

    /**
     * Asynchronous read chunk operation, callback based.
     */
    private static final void readBytes(
        AsynchronousFileChannel asyncFile,
        long position,
        byte[] data,
        int ofs,
        int size,
        ObjIntConsumer<Throwable> completed)
    {
        if (completed == null)
            throw new InvalidParameterException("callback can't be null!");
        if (size + ofs > data.length)
            size = data.length - ofs;
        if (size ==0) {
            completed.accept(null, 0);
            return;
        }
        ByteBuffer buf = ByteBuffer.wrap(data, ofs, size);
        CompletionHandler<Integer,Object> readCompleted =
                new CompletionHandler<Integer,Object>() {
                    @Override
                    public void completed(Integer result, Object attachment) {
                        completed.accept(null, result);
                    }
                    @Override
                    public void failed(Throwable exc, Object attachment) {
                        completed.accept(exc, 0);
                    }
                };
        asyncFile.read(buf, position, null, readCompleted);
    }

Replace Generic With Diamond CompletionHandler<Integer,Object> with CompletionHandler<> in method private readBytes(asyncFile AsynchronousFileChannel, position long, data byte[], size int, completed ObjIntConsumer<Throwable>) : void from class org.javaync.io.AbstractAsyncFileReaderLines


    private static void writeLinesSync(String path, List<String> lines) throws IOException {
        try (FileWriter writer = new FileWriter(path)) {
            String data = lines.stream().collect(joining("\n"));
            writer.write(data);
        }
    }

    private static void write(FileWriter writer, String line) {
        try {
            writer.write(line);
            writer.write(lineSeparator());
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }

Try With Resources try(FileWriter writer=new FileWriter(path)) in method private writeLinesSync(path String, lines List<String>) : void from class org.javasync.io.test.AsyncFileReaderTest


    public void testCorrelate() {
        StreamsBuilder builder = new StreamsBuilder();
        KStream<String, Message> stream = Topology.createStream(builder);

        Topology.correlate(Topology.translate(Topology.filterKnown(stream)));

        try (TopologyTestDriver driver = new TopologyTestDriver(builder.build(), Topology.config)) {
            sendMessages(driver, testMessages);

            try (KeyValueIterator iterator = driver.getWindowStore("PT10S-Store").fetch("85", (1557125670789L - 25000L), (1557125670789L + 100000L))) {
                Message expected = new Message() {
                    {
                        setTime(1557125670789L);
                        setType("GER");
                        setName("85");
                        setLongitude(-92);
                        setLatitude(-30);
                        setContent(new String[]{"106", "39", "55"});
                    }
                };
                Message message = (Message) ((KeyValue) iterator.next()).value;
                assert (!iterator.hasNext());

                assertEquals(expected, message);
            }

            // Fetch from empty windows
            try (KeyValueIterator iterator2 = driver.getWindowStore("PT10S-Store").fetch("Unknown-Key", 0L, 10000L)) {
                assert (!iterator2.hasNext());
            }
        }
    }

    public void testCorrelate() {
        StreamsBuilder builder = new StreamsBuilder();
        KStream<String, Message> stream = Topology.createStream(builder);

        String storeName = "PT10S-Store";
        Topology.correlate(Topology.translate(Topology.filterKnown(stream)));

        TopologyTestDriver driver = new TopologyTestDriver(builder.build(), Topology.config);

        try {
            sendMessages(driver, testMessages);

            // Slice data

            KeyValueIterator iterator = driver.getWindowStore("PT10S-Store").fetch("85", (1557125670789L - 25000L), (1557125670789L + 100000L));

            try {
                Message expected = new Message() {
                    {
                        setTime(1557125670789L);
                        setType("GER");
                        setName("85");
                        setLongitude(-92);
                        setLatitude(-30);
                        setContent(new String[]{"106", "39", "55"});
                    }
                };
                Message message = (Message) ((KeyValue) iterator.next()).value;
                assert (!iterator.hasNext());

                assertEquals(expected, message);
            } finally {
                iterator.close();
            }

            // Fetch from empty windows

            KeyValueIterator iterator2 = driver.getWindowStore("PT10S-Store").fetch("Unknown-Key", 0L, 10000L);

            try {
                assert (!iterator2.hasNext());
            } finally {
                iterator2.close();
            }
        } finally {
            driver.close();
        }
    }

Try With Resources try(TopologyTestDriver driver=new TopologyTestDriver(builder.build(),Topology.config)) in method public testCorrelate() : void from class numbers.TopologyTest


    public static KStream<String, Message> filterKnown(KStream<String, Message> stream) {
        return stream.filter((key, message) -> {
            if (message.getType() != null) {
                return Translator.numberIndex.containsKey(message.getType());
            } else {
                return false;
            }
        });
    }

    public static KStream<String, Message> filterRecognized(KStream<String, Message> stream) {
        return stream.filter(new Predicate<String, Message>() {
            @Override
            public boolean test(String key, Message value) {
                if (value.type != null) {
                    return Translator.numberIndex.containsKey(value.type);
                } else {
                    return false;
                }
            }
        });
    }

Replace Anonymous With Lambda numbers.Topology.filterRecognized.filter.new Predicate<String,Message> with (key, message) -> {if(message.getType() != null){return Translator.numberIndex.containsKey(message.getType()); in method public filterKnown(stream KStream<String,Message>) : KStream<String,Message> from class numbers.Topology


	/**
	 * distributes uploaded item to system defined
	 *
	 * @param hostSystem  object contains host system information
	 * @param session     an established SSH session
	 * @param source      source file
	 * @param destination destination file
	 * @return status uploaded file
	 */
	public static HostSystem pushUpload(HostSystem hostSystem, Session session, String source, String destination) {

		hostSystem.setStatusCd(HostSystem.SUCCESS_STATUS);
		Channel channel = null;
		ChannelSftp c = null;

		try (FileInputStream file = new FileInputStream(source)) {
			channel = session.openChannel("sftp");
			channel.setInputStream(System.in);
			channel.setOutputStream(System.out);
			channel.connect(CHANNEL_TIMEOUT);

			c = (ChannelSftp) channel;
			destination = destination.replaceAll("~\\/|~", "");

			c.put(file, destination);

		} catch (Exception e) {
			log.info(e.toString(), e);
			hostSystem.setErrorMsg(e.getMessage());
			hostSystem.setStatusCd(HostSystem.GENERIC_FAIL_STATUS);
		}
		//exit
		if (c != null) {
			c.exit();
		}
		//disconnect
		if (channel != null) {
			channel.disconnect();
		}

		return hostSystem;

	}

	/**
	 * distributes uploaded item to system defined
	 *
	 * @param hostSystem  object contains host system information
	 * @param session     an established SSH session
	 * @param source      source file
	 * @param destination destination file
	 * @return status uploaded file
	 */
	public static HostSystem pushUpload(HostSystem hostSystem, Session session, String source, String destination) {

		hostSystem.setStatusCd(HostSystem.SUCCESS_STATUS);
		Channel channel = null;
		ChannelSftp c = null;

		try {

			channel = session.openChannel("sftp");
			channel.setInputStream(System.in);
			channel.setOutputStream(System.out);
			channel.connect(CHANNEL_TIMEOUT);

			c = (ChannelSftp) channel;
			destination = destination.replaceAll("~\\/|~", "");

			//get file input stream
			FileInputStream file = new FileInputStream(source);
			c.put(file, destination);
			file.close();

		} catch (Exception e) {
			log.info(e.toString(), e);
			hostSystem.setErrorMsg(e.getMessage());
			hostSystem.setStatusCd(HostSystem.GENERIC_FAIL_STATUS);
		}
		//exit
		if (c != null) {
			c.exit();
		}
		//disconnect
		if (channel != null) {
			channel.disconnect();
		}

		return hostSystem;

	}

Try With Resources try(FileInputStream file=new FileInputStream(source)) in method public pushUpload(hostSystem HostSystem, session Session, source String, destination String) : HostSystem from class com.keybox.manage.util.SSHUtil


    @Action(value = "/admin/qrImage")
    public String qrImage() {

        String username = UserDB.getUser(AuthUtil.getUserId(servletRequest.getSession())).getUsername();

        String secret = AuthUtil.getOTPSecret(servletRequest.getSession());

        AuthUtil.setOTPSecret(servletRequest.getSession(), null);

        try {

            String qrCodeText = "otpauth://totp/KeyBox%20%28" + URLEncoder.encode(servletRequest.getHeader("host").replaceAll("\\:.*$",""), "utf-8") + "%29:" + username + "?secret=" + secret;

            QRCodeWriter qrWriter = new QRCodeWriter();

            Hashtable<EncodeHintType, String> hints = new Hashtable<>();
            hints.put(EncodeHintType.CHARACTER_SET, "UTF-8");

            BitMatrix matrix = qrWriter.encode(qrCodeText, BarcodeFormat.QR_CODE, QR_IMAGE_WIDTH, QR_IMAGE_HEIGHT, hints);
            servletResponse.setContentType("image/png");

            BufferedImage image = new BufferedImage(QR_IMAGE_WIDTH, QR_IMAGE_HEIGHT, BufferedImage.TYPE_INT_RGB);

            Graphics2D graphics = (Graphics2D) image.getGraphics();
            graphics.setColor(Color.WHITE);
            graphics.fillRect(0, 0, QR_IMAGE_WIDTH, QR_IMAGE_HEIGHT);
            graphics.setColor(Color.BLACK);

            for (int x = 0; x < QR_IMAGE_WIDTH; x++) {
                for (int y = 0; y < QR_IMAGE_HEIGHT; y++) {
                    if (matrix.get(x, y)) {
                        graphics.fillRect(x, y, 1, 1);
                    }
                }
            }
            ImageIO.write(image, "png", servletResponse.getOutputStream());

            servletResponse.getOutputStream().flush();
            servletResponse.getOutputStream().close();

        } catch (Exception ex) {
            log.error(ex.toString(), ex);
        }

        return null;

    }

    @Action(value = "/admin/qrImage")
    public String qrImage() {

        String username = UserDB.getUser(AuthUtil.getUserId(servletRequest.getSession())).getUsername();

        String secret = AuthUtil.getOTPSecret(servletRequest.getSession());

        AuthUtil.setOTPSecret(servletRequest.getSession(), null);

        try {

            String qrCodeText = "otpauth://totp/KeyBox%20%28" + URLEncoder.encode(servletRequest.getHeader("host").replaceAll("\\:.*$",""), "utf-8") + "%29:" + username + "?secret=" + secret;

            QRCodeWriter qrWriter = new QRCodeWriter();

            Hashtable<EncodeHintType, String> hints = new Hashtable<EncodeHintType, String>();
            hints.put(EncodeHintType.CHARACTER_SET, "UTF-8");

            BitMatrix matrix = qrWriter.encode(qrCodeText, BarcodeFormat.QR_CODE, QR_IMAGE_WIDTH, QR_IMAGE_HEIGHT, hints);
            servletResponse.setContentType("image/png");

            BufferedImage image = new BufferedImage(QR_IMAGE_WIDTH, QR_IMAGE_HEIGHT, BufferedImage.TYPE_INT_RGB);

            Graphics2D graphics = (Graphics2D) image.getGraphics();
            graphics.setColor(Color.WHITE);
            graphics.fillRect(0, 0, QR_IMAGE_WIDTH, QR_IMAGE_HEIGHT);
            graphics.setColor(Color.BLACK);

            for (int x = 0; x < QR_IMAGE_WIDTH; x++) {
                for (int y = 0; y < QR_IMAGE_HEIGHT; y++) {
                    if (matrix.get(x, y)) {
                        graphics.fillRect(x, y, 1, 1);
                    }
                }
            }
            ImageIO.write(image, "png", servletResponse.getOutputStream());

            servletResponse.getOutputStream().flush();
            servletResponse.getOutputStream().close();

        } catch (Exception ex) {
            log.error(ex.toString(), ex);
        }

        return null;

    }

Replace Generic With Diamond Hashtable<EncodeHintType,String> with Hashtable<> in method public qrImage() : String from class com.keybox.manage.action.OTPAction


    /**
     * method to do order by based on the sorted set object for profiles
     * @return list of profiles
     */
    public static SortedSet getProfileSet(SortedSet sortedSet) {

        ArrayList<Profile> profileList = new ArrayList<>();

        String orderBy = "";
        if (sortedSet.getOrderByField() != null && !sortedSet.getOrderByField().trim().equals("")) {
            orderBy = "order by " + sortedSet.getOrderByField() + " " + sortedSet.getOrderByDirection();
        }
        String sql = "select * from  profiles " + orderBy;

        Connection con = null;
        try {
            con = DBUtils.getConn();
            PreparedStatement stmt = con.prepareStatement(sql);
            ResultSet rs = stmt.executeQuery();

            while (rs.next()) {
                Profile profile = new Profile();
                profile.setId(rs.getLong("id"));
                profile.setNm(rs.getString("nm"));
                profile.setDesc(rs.getString("desc"));
                profileList.add(profile);

            }
            DBUtils.closeRs(rs);
            DBUtils.closeStmt(stmt);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }
        DBUtils.closeConn(con);

        sortedSet.setItemList(profileList);
        return sortedSet;
    }

    /**
     * method to do order by based on the sorted set object for profiles
     * @return list of profiles
     */
    public static SortedSet getProfileSet(SortedSet sortedSet) {

        ArrayList<Profile> profileList = new ArrayList<Profile>();

        String orderBy = "";
        if (sortedSet.getOrderByField() != null && !sortedSet.getOrderByField().trim().equals("")) {
            orderBy = "order by " + sortedSet.getOrderByField() + " " + sortedSet.getOrderByDirection();
        }
        String sql = "select * from  profiles " + orderBy;

        Connection con = null;
        try {
            con = DBUtils.getConn();
            PreparedStatement stmt = con.prepareStatement(sql);
            ResultSet rs = stmt.executeQuery();

            while (rs.next()) {
                Profile profile = new Profile();
                profile.setId(rs.getLong("id"));
                profile.setNm(rs.getString("nm"));
                profile.setDesc(rs.getString("desc"));
                profileList.add(profile);

            }
            DBUtils.closeRs(rs);
            DBUtils.closeStmt(stmt);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }
        DBUtils.closeConn(con);

        sortedSet.setItemList(profileList);
        return sortedSet;
    }

Replace Generic With Diamond ArrayList<Profile> with ArrayList<> in method public getProfileSet(sortedSet SortedSet) : SortedSet from class com.keybox.manage.db.ProfileDB


    /**
     * returns all profile information
     *
     * @return list of profiles
     */
    public static List<Profile> getAllProfiles() {

        ArrayList<Profile> profileList = new ArrayList<>();
        Connection con = null;
        try {
            con = DBUtils.getConn();
            PreparedStatement stmt = con.prepareStatement("select * from  profiles order by nm asc");
            ResultSet rs = stmt.executeQuery();

            while (rs.next()) {
                Profile profile = new Profile();
                profile.setId(rs.getLong("id"));
                profile.setNm(rs.getString("nm"));
                profile.setDesc(rs.getString("desc"));
                profileList.add(profile);

            }
            DBUtils.closeRs(rs);
            DBUtils.closeStmt(stmt);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }
        DBUtils.closeConn(con);

        return profileList;
    }

    /**
     * returns all profile information
     *
     * @return list of profiles
     */
    public static List<Profile> getAllProfiles() {

        ArrayList<Profile> profileList = new ArrayList<Profile>();
        Connection con = null;
        try {
            con = DBUtils.getConn();
            PreparedStatement stmt = con.prepareStatement("select * from  profiles order by nm asc");
            ResultSet rs = stmt.executeQuery();

            while (rs.next()) {
                Profile profile = new Profile();
                profile.setId(rs.getLong("id"));
                profile.setNm(rs.getString("nm"));
                profile.setDesc(rs.getString("desc"));
                profileList.add(profile);

            }
            DBUtils.closeRs(rs);
            DBUtils.closeStmt(stmt);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }
        DBUtils.closeConn(con);

        return profileList;
    }

Replace Generic With Diamond ArrayList<Profile> with ArrayList<> in method public getAllProfiles() : List<Profile> from class com.keybox.manage.db.ProfileDB


	/**
	 * returns a list of systems for a given profile
	 *
	 * @param con       DB connection
	 * @param profileId profile id
	 * @return list of host systems
	 */
	public static List<HostSystem> getSystemsByProfile(Connection con, Long profileId) {

		List<HostSystem> hostSystemList = new ArrayList<>();

		try {
			PreparedStatement stmt = con.prepareStatement("select * from  system s, system_map m where s.id=m.system_id and m.profile_id=? order by display_nm asc");
			stmt.setLong(1, profileId);
			ResultSet rs = stmt.executeQuery();

			while (rs.next()) {
				HostSystem hostSystem = new HostSystem();
				hostSystem.setId(rs.getLong("id"));
				hostSystem.setDisplayNm(rs.getString("display_nm"));
				hostSystem.setUser(rs.getString("user"));
				hostSystem.setHost(rs.getString("host"));
				hostSystem.setPort(rs.getInt("port"));
				hostSystem.setAuthorizedKeys(rs.getString("authorized_keys"));
				hostSystemList.add(hostSystem);
			}
			DBUtils.closeRs(rs);
			DBUtils.closeStmt(stmt);

		} catch (Exception e) {
			log.error(e.toString(), e);
		}

		return hostSystemList;
	}

	/**
	 * returns a list of systems for a given profile
	 *
	 * @param con       DB connection
	 * @param profileId profile id
	 * @return list of host systems
	 */
	public static List<HostSystem> getSystemsByProfile(Connection con, Long profileId) {

		List<HostSystem> hostSystemList = new ArrayList<HostSystem>();

		try {
			PreparedStatement stmt = con.prepareStatement("select * from  system s, system_map m where s.id=m.system_id and m.profile_id=? order by display_nm asc");
			stmt.setLong(1, profileId);
			ResultSet rs = stmt.executeQuery();

			while (rs.next()) {
				HostSystem hostSystem = new HostSystem();
				hostSystem.setId(rs.getLong("id"));
				hostSystem.setDisplayNm(rs.getString("display_nm"));
				hostSystem.setUser(rs.getString("user"));
				hostSystem.setHost(rs.getString("host"));
				hostSystem.setPort(rs.getInt("port"));
				hostSystem.setAuthorizedKeys(rs.getString("authorized_keys"));
				hostSystemList.add(hostSystem);
			}
			DBUtils.closeRs(rs);
			DBUtils.closeStmt(stmt);

		} catch (Exception e) {
			log.error(e.toString(), e);
		}

		return hostSystemList;
	}

Replace Generic With Diamond ArrayList<HostSystem> with ArrayList<> in method public getSystemsByProfile(con Connection, profileId Long) : List<HostSystem> from class com.keybox.manage.db.ProfileSystemsDB


	/**
	 * returns a list of systems for a given profile
	 *
	 * @param profileId profile id
	 * @return list of host systems
	 */
	public static List<HostSystem> getSystemsByProfile(Long profileId) {

		List<HostSystem> hostSystemList = new ArrayList<>();

		Connection con = null;

		try {
			con=DBUtils.getConn();
			hostSystemList=getSystemsByProfile(con,profileId);

		} catch (Exception e) {
			log.error(e.toString(), e);
		}
		DBUtils.closeConn(con);

		return hostSystemList;
	}

	/**
	 * returns a list of systems for a given profile
	 *
	 * @param profileId profile id
	 * @return list of host systems
	 */
	public static List<HostSystem> getSystemsByProfile(Long profileId) {

		List<HostSystem> hostSystemList = new ArrayList<HostSystem>();

		Connection con = null;

		try {
			con=DBUtils.getConn();
			hostSystemList=getSystemsByProfile(con,profileId);

		} catch (Exception e) {
			log.error(e.toString(), e);
		}
		DBUtils.closeConn(con);

		return hostSystemList;
	}

Replace Generic With Diamond ArrayList<HostSystem> with ArrayList<> in method public getSystemsByProfile(profileId Long) : List<HostSystem> from class com.keybox.manage.db.ProfileSystemsDB


	/**
	 * returns a list of system ids for a given profile
	 *
	 * @param con       DB con
	 * @param profileId profile id
	 * @return list of host systems
	 */
	public static List<Long> getSystemIdsByProfile(Connection con, Long profileId) {

		List<Long> systemIdList = new ArrayList<>();

		try {
			PreparedStatement stmt = con.prepareStatement("select * from  system s, system_map m where s.id=m.system_id and m.profile_id=? order by display_nm asc");
			stmt.setLong(1, profileId);
			ResultSet rs = stmt.executeQuery();

			while (rs.next()) {
				systemIdList.add(rs.getLong("id"));
			}
			DBUtils.closeRs(rs);
			DBUtils.closeStmt(stmt);

		} catch (Exception e) {
			log.error(e.toString(), e);
		}

		return systemIdList;
	}

	/**
	 * returns a list of system ids for a given profile
	 *
	 * @param con       DB con
	 * @param profileId profile id
	 * @return list of host systems
	 */
	public static List<Long> getSystemIdsByProfile(Connection con, Long profileId) {

		List<Long> systemIdList = new ArrayList<Long>();

		try {
			PreparedStatement stmt = con.prepareStatement("select * from  system s, system_map m where s.id=m.system_id and m.profile_id=? order by display_nm asc");
			stmt.setLong(1, profileId);
			ResultSet rs = stmt.executeQuery();

			while (rs.next()) {
				systemIdList.add(rs.getLong("id"));
			}
			DBUtils.closeRs(rs);
			DBUtils.closeStmt(stmt);

		} catch (Exception e) {
			log.error(e.toString(), e);
		}

		return systemIdList;
	}

Replace Generic With Diamond ArrayList<Long> with ArrayList<> in method public getSystemIdsByProfile(con Connection, profileId Long) : List<Long> from class com.keybox.manage.db.ProfileSystemsDB


	/**
	 * returns a list of system ids for a given profile
	 *
	 * @param profileId profile id
	 * @return list of host systems
	 */
	public static List<Long> getSystemIdsByProfile(Long profileId) {

		List<Long> systemIdList = new ArrayList<>();

		Connection con = null;

		try {
			con = DBUtils.getConn();
			systemIdList = getSystemIdsByProfile(con, profileId);

		} catch (Exception e) {
			log.error(e.toString(), e);
		}
		DBUtils.closeConn(con);

		return systemIdList;
	}

	/**
	 * returns a list of system ids for a given profile
	 *
	 * @param profileId profile id
	 * @return list of host systems
	 */
	public static List<Long> getSystemIdsByProfile(Long profileId) {

		List<Long> systemIdList = new ArrayList<Long>();

		Connection con = null;

		try {
			con = DBUtils.getConn();
			systemIdList = getSystemIdsByProfile(con, profileId);

		} catch (Exception e) {
			log.error(e.toString(), e);
		}
		DBUtils.closeConn(con);

		return systemIdList;
	}

Replace Generic With Diamond ArrayList<Long> with ArrayList<> in method public getSystemIdsByProfile(profileId Long) : List<Long> from class com.keybox.manage.db.ProfileSystemsDB


	/**
	 * returns a list of system ids for a given profile
	 *
	 * @param con       DB con
	 * @param profileId profile id
	 * @param userId user id
	 * @return list of host systems
	 */
	public static List<Long> getSystemIdsByProfile(Connection con, Long profileId, Long userId) {

		List<Long> systemIdList = new ArrayList<>();

		try {
			PreparedStatement stmt = con.prepareStatement("select sm.system_id from  system_map sm, user_map um where um.profile_id=sm.profile_id and sm.profile_id=? and um.user_id=?");
			stmt.setLong(1, profileId);
			stmt.setLong(2, userId);
			ResultSet rs = stmt.executeQuery();

			while (rs.next()) {
				systemIdList.add(rs.getLong("system_id"));
			}
			DBUtils.closeRs(rs);
			DBUtils.closeStmt(stmt);

		} catch (Exception e) {
			log.error(e.toString(), e);
		}

		return systemIdList;
	}

	/**
	 * returns a list of system ids for a given profile
	 *
	 * @param con       DB con
	 * @param profileId profile id
	 * @param userId user id
	 * @return list of host systems
	 */
	public static List<Long> getSystemIdsByProfile(Connection con, Long profileId, Long userId) {

		List<Long> systemIdList = new ArrayList<Long>();

		try {
			PreparedStatement stmt = con.prepareStatement("select sm.system_id from  system_map sm, user_map um where um.profile_id=sm.profile_id and sm.profile_id=? and um.user_id=?");
			stmt.setLong(1, profileId);
			stmt.setLong(2, userId);
			ResultSet rs = stmt.executeQuery();

			while (rs.next()) {
				systemIdList.add(rs.getLong("system_id"));
			}
			DBUtils.closeRs(rs);
			DBUtils.closeStmt(stmt);

		} catch (Exception e) {
			log.error(e.toString(), e);
		}

		return systemIdList;
	}

Replace Generic With Diamond ArrayList<Long> with ArrayList<> in method public getSystemIdsByProfile(con Connection, profileId Long, userId Long) : List<Long> from class com.keybox.manage.db.ProfileSystemsDB


	/**
	 * returns a list of system ids for a given profile
	 *
	 * @param profileId profile id
	 * @param userId user id
	 * @return list of host systems
	 */
	public static List<Long> getSystemIdsByProfile(Long profileId, Long userId) {

		List<Long> systemIdList = new ArrayList<>();

		Connection con = null;

		try {
			con = DBUtils.getConn();
			systemIdList = getSystemIdsByProfile(con, profileId, userId);

		} catch (Exception e) {
			log.error(e.toString(), e);
		}
		DBUtils.closeConn(con);

		return systemIdList;
	}

	/**
	 * returns a list of system ids for a given profile
	 *
	 * @param profileId profile id
	 * @param userId user id
	 * @return list of host systems
	 */
	public static List<Long> getSystemIdsByProfile(Long profileId, Long userId) {

		List<Long> systemIdList = new ArrayList<Long>();

		Connection con = null;

		try {
			con = DBUtils.getConn();
			systemIdList = getSystemIdsByProfile(con, profileId, userId);

		} catch (Exception e) {
			log.error(e.toString(), e);
		}
		DBUtils.closeConn(con);

		return systemIdList;
	}

Replace Generic With Diamond ArrayList<Long> with ArrayList<> in method public getSystemIdsByProfile(profileId Long, userId Long) : List<Long> from class com.keybox.manage.db.ProfileSystemsDB


    /**
     * returns public keys based on sort order defined
     *
     * @param sortedSet object that defines sort order
     * @return sorted script list
     */
    public static SortedSet getPublicKeySet(SortedSet sortedSet) {

        ArrayList<PublicKey> publicKeysList = new ArrayList<>();

        String orderBy = "";
        if (sortedSet.getOrderByField() != null && !sortedSet.getOrderByField().trim().equals("")) {
            orderBy = " order by " + sortedSet.getOrderByField() + " " + sortedSet.getOrderByDirection();
        }
        String sql = "select p.*, u.username from public_keys p, users u where u.id=p.user_id  ";

        sql+= StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_USER_ID)) ? " and p.user_id=? " : "";
        sql+= StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_PROFILE_ID)) ? " and p.profile_id=? " : "";
        sql+= StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_ENABLED)) ? " and p.enabled=? " : " and p.enabled=true";
        sql=sql+orderBy;

        Connection con = null;
        try {
            con = DBUtils.getConn();
            PreparedStatement stmt = con.prepareStatement(sql);
            int i=1;
            //set filters in prepared statement
            if(StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_USER_ID))){
                stmt.setLong(i++, Long.valueOf(sortedSet.getFilterMap().get(FILTER_BY_USER_ID)));
            }
            if(StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_PROFILE_ID))){
                stmt.setLong(i++, Long.valueOf(sortedSet.getFilterMap().get(FILTER_BY_PROFILE_ID)));
            }
            if(StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_ENABLED))){
                stmt.setBoolean(i++, Boolean.valueOf(sortedSet.getFilterMap().get(FILTER_BY_ENABLED)));
            }
            ResultSet rs = stmt.executeQuery();

            while (rs.next()) {
                PublicKey publicKey = new PublicKey();
                publicKey.setId(rs.getLong("id"));
                publicKey.setKeyNm(rs.getString("key_nm"));
                publicKey.setPublicKey(rs.getString("public_key"));
                publicKey.setProfile(ProfileDB.getProfile(con, rs.getLong("profile_id")));
                publicKey.setType(SSHUtil.getKeyType(publicKey.getPublicKey()));
                publicKey.setFingerprint(SSHUtil.getFingerprint(publicKey.getPublicKey()));
                publicKey.setCreateDt(rs.getTimestamp("create_dt"));
                publicKey.setUsername(rs.getString("username"));
                publicKey.setUserId(rs.getLong("user_id"));
                publicKey.setEnabled(rs.getBoolean("enabled"));
                publicKeysList.add(publicKey);

            }
            DBUtils.closeRs(rs);
            DBUtils.closeStmt(stmt);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }
        DBUtils.closeConn(con);

        sortedSet.setItemList(publicKeysList);
        return sortedSet;
    }

    /**
     * returns public keys based on sort order defined
     *
     * @param sortedSet object that defines sort order
     * @return sorted script list
     */
    public static SortedSet getPublicKeySet(SortedSet sortedSet) {

        ArrayList<PublicKey> publicKeysList = new ArrayList<PublicKey>();

        String orderBy = "";
        if (sortedSet.getOrderByField() != null && !sortedSet.getOrderByField().trim().equals("")) {
            orderBy = " order by " + sortedSet.getOrderByField() + " " + sortedSet.getOrderByDirection();
        }
        String sql = "select p.*, u.username from public_keys p, users u where u.id=p.user_id  ";

        sql+= StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_USER_ID)) ? " and p.user_id=? " : "";
        sql+= StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_PROFILE_ID)) ? " and p.profile_id=? " : "";
        sql+= StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_ENABLED)) ? " and p.enabled=? " : " and p.enabled=true";
        sql=sql+orderBy;

        Connection con = null;
        try {
            con = DBUtils.getConn();
            PreparedStatement stmt = con.prepareStatement(sql);
            int i=1;
            //set filters in prepared statement
            if(StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_USER_ID))){
                stmt.setLong(i++, Long.valueOf(sortedSet.getFilterMap().get(FILTER_BY_USER_ID)));
            }
            if(StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_PROFILE_ID))){
                stmt.setLong(i++, Long.valueOf(sortedSet.getFilterMap().get(FILTER_BY_PROFILE_ID)));
            }
            if(StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_ENABLED))){
                stmt.setBoolean(i++, Boolean.valueOf(sortedSet.getFilterMap().get(FILTER_BY_ENABLED)));
            }
            ResultSet rs = stmt.executeQuery();

            while (rs.next()) {
                PublicKey publicKey = new PublicKey();
                publicKey.setId(rs.getLong("id"));
                publicKey.setKeyNm(rs.getString("key_nm"));
                publicKey.setPublicKey(rs.getString("public_key"));
                publicKey.setProfile(ProfileDB.getProfile(con, rs.getLong("profile_id")));
                publicKey.setType(SSHUtil.getKeyType(publicKey.getPublicKey()));
                publicKey.setFingerprint(SSHUtil.getFingerprint(publicKey.getPublicKey()));
                publicKey.setCreateDt(rs.getTimestamp("create_dt"));
                publicKey.setUsername(rs.getString("username"));
                publicKey.setUserId(rs.getLong("user_id"));
                publicKey.setEnabled(rs.getBoolean("enabled"));
                publicKeysList.add(publicKey);

            }
            DBUtils.closeRs(rs);
            DBUtils.closeStmt(stmt);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }
        DBUtils.closeConn(con);

        sortedSet.setItemList(publicKeysList);
        return sortedSet;
    }

Replace Generic With Diamond ArrayList<PublicKey> with ArrayList<> in method public getPublicKeySet(sortedSet SortedSet) : SortedSet from class com.keybox.manage.db.PublicKeyDB


    /**
     * returns public keys based on sort order defined
     *
     * @param sortedSet object that defines sort order
     * @param userId user id
     * @return sorted script list
     */
    public static SortedSet getPublicKeySet(SortedSet sortedSet, Long userId) {

        ArrayList<PublicKey> publicKeysList = new ArrayList<>();

        String orderBy = "";
        if (sortedSet.getOrderByField() != null && !sortedSet.getOrderByField().trim().equals("")) {
            orderBy = "order by " + sortedSet.getOrderByField() + " " + sortedSet.getOrderByDirection();
        }
        String sql = "select * from public_keys where user_id = ? and enabled=true " + orderBy;

        Connection con = null;
        try {
            con = DBUtils.getConn();
            PreparedStatement stmt = con.prepareStatement(sql);
            stmt.setLong(1, userId);
            ResultSet rs = stmt.executeQuery();

            while (rs.next()) {
                PublicKey publicKey = new PublicKey();
                publicKey.setId(rs.getLong("id"));
                publicKey.setKeyNm(rs.getString("key_nm"));
                publicKey.setPublicKey(rs.getString("public_key"));
                publicKey.setProfile(ProfileDB.getProfile(con, rs.getLong("profile_id")));
                publicKey.setType(SSHUtil.getKeyType(publicKey.getPublicKey()));
                publicKey.setFingerprint(SSHUtil.getFingerprint(publicKey.getPublicKey()));
                publicKey.setCreateDt(rs.getTimestamp("create_dt"));
                publicKeysList.add(publicKey);

            }
            DBUtils.closeRs(rs);
            DBUtils.closeStmt(stmt);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }
        DBUtils.closeConn(con);

        sortedSet.setItemList(publicKeysList);
        return sortedSet;
    }

    /**
     * returns public keys based on sort order defined
     *
     * @param sortedSet object that defines sort order
     * @param userId user id
     * @return sorted script list
     */
    public static SortedSet getPublicKeySet(SortedSet sortedSet, Long userId) {

        ArrayList<PublicKey> publicKeysList = new ArrayList<PublicKey>();

        String orderBy = "";
        if (sortedSet.getOrderByField() != null && !sortedSet.getOrderByField().trim().equals("")) {
            orderBy = "order by " + sortedSet.getOrderByField() + " " + sortedSet.getOrderByDirection();
        }
        String sql = "select * from public_keys where user_id = ? and enabled=true " + orderBy;

        Connection con = null;
        try {
            con = DBUtils.getConn();
            PreparedStatement stmt = con.prepareStatement(sql);
            stmt.setLong(1, userId);
            ResultSet rs = stmt.executeQuery();

            while (rs.next()) {
                PublicKey publicKey = new PublicKey();
                publicKey.setId(rs.getLong("id"));
                publicKey.setKeyNm(rs.getString("key_nm"));
                publicKey.setPublicKey(rs.getString("public_key"));
                publicKey.setProfile(ProfileDB.getProfile(con, rs.getLong("profile_id")));
                publicKey.setType(SSHUtil.getKeyType(publicKey.getPublicKey()));
                publicKey.setFingerprint(SSHUtil.getFingerprint(publicKey.getPublicKey()));
                publicKey.setCreateDt(rs.getTimestamp("create_dt"));
                publicKeysList.add(publicKey);

            }
            DBUtils.closeRs(rs);
            DBUtils.closeStmt(stmt);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }
        DBUtils.closeConn(con);

        sortedSet.setItemList(publicKeysList);
        return sortedSet;
    }

Replace Generic With Diamond ArrayList<PublicKey> with ArrayList<> in method public getPublicKeySet(sortedSet SortedSet, userId Long) : SortedSet from class com.keybox.manage.db.PublicKeyDB


    public static List<String> getPublicKeysForSystem(Long systemId) {

        Connection con = null;
        List<String> publicKeyList = new ArrayList<>();
        try {
            con = DBUtils.getConn();

            publicKeyList = getPublicKeysForSystem(con, systemId);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }
        DBUtils.closeConn(con);

        return publicKeyList;

    }

    public static List<String> getPublicKeysForSystem(Long systemId) {

        Connection con = null;
        List<String> publicKeyList = new ArrayList<String>();
        try {
            con = DBUtils.getConn();

            publicKeyList = getPublicKeysForSystem(con, systemId);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }
        DBUtils.closeConn(con);

        return publicKeyList;

    }

Replace Generic With Diamond ArrayList<String> with ArrayList<> in method public getPublicKeysForSystem(systemId Long) : List<String> from class com.keybox.manage.db.PublicKeyDB


    public static List<String> getPublicKeysForSystem(Connection con, Long systemId) {
        List<String> publicKeyList = new ArrayList<>();

        if(systemId==null){
            systemId=-99L;
        }
        try {
            PreparedStatement stmt = con.prepareStatement("select * from public_keys where (profile_id is null or profile_id in (select profile_id from system_map where system_id=?)) and enabled=true");
            stmt.setLong(1, systemId);
            ResultSet rs = stmt.executeQuery();
            while (rs.next()) {
                publicKeyList.add(rs.getString("public_key"));
            }
            DBUtils.closeStmt(stmt);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }

        return publicKeyList;

    }

    public static List<String> getPublicKeysForSystem(Connection con, Long systemId) {
        List<String> publicKeyList = new ArrayList<String>();

        if(systemId==null){
            systemId=-99L;
        }
        try {
            PreparedStatement stmt = con.prepareStatement("select * from public_keys where (profile_id is null or profile_id in (select profile_id from system_map where system_id=?)) and enabled=true");
            stmt.setLong(1, systemId);
            ResultSet rs = stmt.executeQuery();
            while (rs.next()) {
                publicKeyList.add(rs.getString("public_key"));
            }
            DBUtils.closeStmt(stmt);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }

        return publicKeyList;

    }

Replace Generic With Diamond ArrayList<String> with ArrayList<> in method public getPublicKeysForSystem(con Connection, systemId Long) : List<String> from class com.keybox.manage.db.PublicKeyDB


    /**
     * returns scripts based on sort order defined
     * @param sortedSet object that defines sort order
     * @param userId user id
     * @return sorted script list
     */
    public static SortedSet getScriptSet(SortedSet sortedSet, Long userId) {

        ArrayList<Script> scriptList = new ArrayList<>();

        String orderBy = "";
        if (sortedSet.getOrderByField() != null && !sortedSet.getOrderByField().trim().equals("")) {
            orderBy = "order by " + sortedSet.getOrderByField() + " " + sortedSet.getOrderByDirection();
        }
        String sql = "select * from scripts where user_id=? " + orderBy;

        Connection con = null;
        try {
            con = DBUtils.getConn();
            PreparedStatement stmt = con.prepareStatement(sql);
            stmt.setLong(1, userId);
            ResultSet rs = stmt.executeQuery();

            while (rs.next()) {
                Script script = new Script();
                script.setId(rs.getLong("id"));
                script.setDisplayNm(rs.getString("display_nm"));
                script.setScript(rs.getString("script"));

                scriptList.add(script);

            }
            DBUtils.closeRs(rs);
            DBUtils.closeStmt(stmt);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }
        DBUtils.closeConn(con);

        sortedSet.setItemList(scriptList);
        return sortedSet;
    }

    /**
     * returns scripts based on sort order defined
     * @param sortedSet object that defines sort order
     * @param userId user id
     * @return sorted script list
     */
    public static SortedSet getScriptSet(SortedSet sortedSet, Long userId) {

        ArrayList<Script> scriptList = new ArrayList<Script>();

        String orderBy = "";
        if (sortedSet.getOrderByField() != null && !sortedSet.getOrderByField().trim().equals("")) {
            orderBy = "order by " + sortedSet.getOrderByField() + " " + sortedSet.getOrderByDirection();
        }
        String sql = "select * from scripts where user_id=? " + orderBy;

        Connection con = null;
        try {
            con = DBUtils.getConn();
            PreparedStatement stmt = con.prepareStatement(sql);
            stmt.setLong(1, userId);
            ResultSet rs = stmt.executeQuery();

            while (rs.next()) {
                Script script = new Script();
                script.setId(rs.getLong("id"));
                script.setDisplayNm(rs.getString("display_nm"));
                script.setScript(rs.getString("script"));

                scriptList.add(script);

            }
            DBUtils.closeRs(rs);
            DBUtils.closeStmt(stmt);

        } catch (Exception e) {
            log.error(e.toString(), e);
        }
        DBUtils.closeConn(con);

        sortedSet.setItemList(scriptList);
        return sortedSet;
    }

Replace Generic With Diamond ArrayList<Script> with ArrayList<> in method public getScriptSet(sortedSet SortedSet, userId Long) : SortedSet from class com.keybox.manage.db.ScriptDB