    public TranslationDialog(final Root root, Container frame , String name,  ExtractStrings es ) {
        super(root, name );
        initComponents();

        setBaseLanguage("de");

        ClassName = name;

        jLTitle.setText(getTitle(name));

        if( es == null )
            es = new ExtractStrings(frame);

        Set<String> strings = es.getStrings();

        panel.setLayout(new GridLayout2(0,5));

        for( String s : strings )
        {
            if( MLUtil.shouldBeTranslated(s))
            {
                final JTextField tf = new JTextField(s);

                tf.setEditable(false);
                tf.setFocusable(false);

                panel.add(tf);
                left_cols.add(tf);

                JButton copy = new JButton();
                copy.setBorderPainted(false);
                copy.setContentAreaFilled(false);
                copy.setMargin(new Insets(0, 0, 0, 0));
                copy.setToolTipText(MlM("Text kopieren"));

                copy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/at/redeye/FrameWork/base/resources/icons/next.png")));

                panel.add(copy);

                JButton edit = new JButton();
                edit.setBorderPainted(false);
                edit.setContentAreaFilled(false);
                edit.setMargin(new Insets(0, 0, 0, 0));
                edit.setToolTipText(MlM("Text mehrzeilig editieren"));

                edit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/at/redeye/FrameWork/base/resources/icons/edit.png")));

                panel.add(edit);

                String res = root.MlM(s);

                JButton wizard = null;

                if( res.equals(s) )
                {
                    panel.add( new JLabel() );
                } else {
                    wizard = new JButton();
                    wizard.setBorderPainted(false);
                    wizard.setContentAreaFilled(false);
                    wizard.setMargin(new Insets(0, 0, 0, 0));
                    wizard.setToolTipText(res);
                    wizard.setIcon(new javax.swing.ImageIcon(getClass().getResource("/at/redeye/FrameWork/base/resources/icons/wizard.gif")));

                    panel.add(wizard);
                }

                final NoticeIfChangedTextField editField = new NoticeIfChangedTextField();
                right_cols.add(editField);

                copy.addActionListener(e -> editField.setText(tf.getText()));

                if( wizard != null )
                {
                    wizard.addActionListener(e -> editField.setText(root.MlM(tf.getText())));
                }

                editField.setColumns(40);

                final JFrame base = this;

                edit.addActionListener(e -> {

                    final MultiLineInputDialog dialog = new MultiLineInputDialog(base, root);

                    final MultiLineInput mli = dialog.getMli();
                    mli.setSaveActionListener(() -> {
                        editField.setText(mli.getText());
                        dialog.dispose();
                    });

                    mli.setCloseActionListener(dialog::dispose);

                    mli.setText(tf.getText());

                    String editedText =  editField.getText().trim();
                    if( !editedText.isEmpty() )
                        mli.setTransText(editedText);

                    // Adjust dialogs placement on screen
                    Dimension dialog_dim = dialog.getPreferredSize();

                    Rectangle rect = base.getBounds();
                    rect.x += rect.width / 2;
                    rect.y += rect.height / 2;
                    rect.x -= dialog_dim.height / 2;
                    rect.y -= dialog_dim.width / 2;
                    rect.height = dialog_dim.height;
                    rect.width = dialog_dim.width;

                    dialog.setBounds(rect);
                    dialog.setVisible(true);
                    dialog.toFront();
                });

                panel.add( editField );

                SimpleEntry<String,StringBuffer> pair = new SimpleEntry<>(s, new StringBuffer());

                this.bindVar( editField, pair.getValue() );

                fields.add(editField);

                data.add( pair );
            }
        }

        Locale def_locale = Locale.getDefault();

        String last_language = root.getSetup().getLocalConfig(TRANS_LAST_LANGUAGE, def_locale.getLanguage() );
        String last_country = root.getSetup().getLocalConfig(TRANS_LAST_COUNTRY, def_locale.getCountry() );

        language.removeAllItems();

        Set<String> languages = new TreeSet<>();

        for( Locale l :  Locale.getAvailableLocales() )
        {
            languages.add(l.getLanguage());
        }

        for( String s : languages )
        {
            language.addItem(s);

            if( s.equals(last_language) )
            {
                language.setSelectedItem(s);
            }
        }

        country.removeAllItems();

        Set<String> countries = new TreeSet<>();

        for( Locale l :  Locale.getAvailableLocales() )
        {
            countries.add(l.getCountry());
        }

        for( String s : countries )
        {
            country.addItem(s);

            if( s.equals(last_country) )
            {
                country.setSelectedItem(s);
            }
        }

        String last_col_left = root.getSetup().getLocalConfig(TRANS_LAST_LEFT_COLCOUNT, "40");
        String last_col_right = root.getSetup().getLocalConfig(TRANS_LAST_RIGHT_COLCOUNT, "40");

        int left = 40;
        int right = 40;

        try {
            left = Integer.parseInt(last_col_left);
        } catch( NumberFormatException ex ) {
            logger.error("Invalid Number: " + last_col_left);
        }

        try {
            right = Integer.parseInt(last_col_right);
        } catch( NumberFormatException ex ) {
            logger.error("Invalid Number: " + last_col_right);
        }

        colsLeft.setValue(left);
        colsRight.setValue(right);

        adjustScrollingSpeed(jScrollPane1);

        registerHelpWin(() -> invokeDialogUnique(new HelpWin(root, "/at/redeye/FrameWork/base/translation/resources/Help", "TranslationDialog")));
    }

    public TranslationDialog(final Root root, Container frame , String name,  ExtractStrings es ) {
        super(root, name );
        initComponents();

        setBaseLanguage("de");

        ClassName = name;

        jLTitle.setText(getTitle(name));

        if( es == null )
            es = new ExtractStrings(frame);

        Set<String> strings = es.getStrings();

        panel.setLayout(new GridLayout2(0,5));

        for( String s : strings )
        {
            if( MLUtil.shouldBeTranslated(s))
            {
                final JTextField tf = new JTextField(s);

                tf.setEditable(false);
                tf.setFocusable(false);

                panel.add(tf);
                left_cols.add(tf);

                JButton copy = new JButton();
                copy.setBorderPainted(false);
                copy.setContentAreaFilled(false);
                copy.setMargin(new Insets(0, 0, 0, 0));
                copy.setToolTipText(MlM("Text kopieren"));

                copy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/at/redeye/FrameWork/base/resources/icons/next.png")));

                panel.add(copy);

                JButton edit = new JButton();
                edit.setBorderPainted(false);
                edit.setContentAreaFilled(false);
                edit.setMargin(new Insets(0, 0, 0, 0));
                edit.setToolTipText(MlM("Text mehrzeilig editieren"));

                edit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/at/redeye/FrameWork/base/resources/icons/edit.png")));

                panel.add(edit);

                String res = root.MlM(s);

                JButton wizard = null;

                if( res.equals(s) )
                {
                    panel.add( new JLabel() );
                } else {
                    wizard = new JButton();
                    wizard.setBorderPainted(false);
                    wizard.setContentAreaFilled(false);
                    wizard.setMargin(new Insets(0, 0, 0, 0));
                    wizard.setToolTipText(res);
                    wizard.setIcon(new javax.swing.ImageIcon(getClass().getResource("/at/redeye/FrameWork/base/resources/icons/wizard.gif")));

                    panel.add(wizard);
                }

                final NoticeIfChangedTextField editField = new NoticeIfChangedTextField();
                right_cols.add(editField);

                copy.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        editField.setText(tf.getText());
                    }
                });

                if( wizard != null )
                {
                    wizard.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                            editField.setText(root.MlM(tf.getText()));
                        }
                    });
                }

                editField.setColumns(40);

                final JFrame base = this;

                edit.addActionListener(new ActionListener() {

                    @Override
                    public void actionPerformed(ActionEvent e) {

                        final MultiLineInputDialog dialog = new MultiLineInputDialog(base, root);

                        final MultiLineInput mli = dialog.getMli();
                        mli.setSaveActionListener(new Runnable() {
                            public void run()
                            {
                                editField.setText(mli.getText());
                                dialog.dispose();
                            }
                        });

                        mli.setCloseActionListener(dialog::dispose);

                        mli.setText(tf.getText());

                        String editedText =  editField.getText().trim();
                        if( !editedText.isEmpty() )
                            mli.setTransText(editedText);

                        // Adjust dialogs placement on screen
                        Dimension dialog_dim = dialog.getPreferredSize();

                        Rectangle rect = base.getBounds();
                        rect.x += rect.width / 2;
                        rect.y += rect.height / 2;
                        rect.x -= dialog_dim.height / 2;
                        rect.y -= dialog_dim.width / 2;
                        rect.height = dialog_dim.height;
                        rect.width = dialog_dim.width;

                        dialog.setBounds(rect);
                        dialog.setVisible(true);
                        dialog.toFront();
                    }
                });

                panel.add( editField );

                SimpleEntry<String,StringBuffer> pair = new SimpleEntry<>(s, new StringBuffer());

                this.bindVar( editField, pair.getValue() );

                fields.add(editField);

                data.add( pair );
            }
        }

        Locale def_locale = Locale.getDefault();

        String last_language = root.getSetup().getLocalConfig(TRANS_LAST_LANGUAGE, def_locale.getLanguage() );
        String last_country = root.getSetup().getLocalConfig(TRANS_LAST_COUNTRY, def_locale.getCountry() );

        language.removeAllItems();

        Set<String> languages = new TreeSet<>();

        for( Locale l :  Locale.getAvailableLocales() )
        {
            languages.add(l.getLanguage());
        }

        for( String s : languages )
        {
            language.addItem(s);

            if( s.equals(last_language) )
            {
                language.setSelectedItem(s);
            }
        }

        country.removeAllItems();

        Set<String> countries = new TreeSet<>();

        for( Locale l :  Locale.getAvailableLocales() )
        {
            countries.add(l.getCountry());
        }

        for( String s : countries )
        {
            country.addItem(s);

            if( s.equals(last_country) )
            {
                country.setSelectedItem(s);
            }
        }

        String last_col_left = root.getSetup().getLocalConfig(TRANS_LAST_LEFT_COLCOUNT, "40");
        String last_col_right = root.getSetup().getLocalConfig(TRANS_LAST_RIGHT_COLCOUNT, "40");

        int left = 40;
        int right = 40;

        try {
            left = Integer.parseInt(last_col_left);
        } catch( NumberFormatException ex ) {
            logger.error("Invalid Number: " + last_col_left);
        }

        try {
            right = Integer.parseInt(last_col_right);
        } catch( NumberFormatException ex ) {
            logger.error("Invalid Number: " + last_col_right);
        }

        colsLeft.setValue(left);
        colsRight.setValue(right);

        adjustScrollingSpeed(jScrollPane1);

        registerHelpWin(new Runnable() {

            public void run() {
                invokeDialogUnique(new HelpWin(root, "/at/redeye/FrameWork/base/translation/resources/Help", "TranslationDialog"));
            }
        });
    }

Replace Anonymous With Lambda at.redeye.FrameWork.base.translation.TranslationDialog.TranslationDialog.addActionListener.new ActionListener with e -> {final MultiLineInputDialog dialog=new MultiLineInputDialog(base,root); in method public TranslationDialog(root Root, frame Container, name String, es ExtractStrings) from class at.redeye.FrameWork.base.translation.TranslationDialog


    private void languageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_languageActionPerformed

        if( force_undo_language || canClose() )
        {
            prev_lang_index = language.getSelectedIndex();
            force_undo_language = false;
            updateLocale();
        }
        else
        {
            if (prev_lang_index != -1)
            {
                java.awt.EventQueue.invokeLater(() -> {
                    force_undo_language = true;
                    language.setSelectedIndex(prev_lang_index);
                });
            }
        }
    }//GEN-LAST:event_languageActionPerformed

    private void languageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_languageActionPerformed

        if( force_undo_language || canClose() )
        {
            prev_lang_index = language.getSelectedIndex();
            force_undo_language = false;
            updateLocale();
        }
        else
        {
            if (prev_lang_index != -1)
            {
                java.awt.EventQueue.invokeLater(new Runnable() {

                    @Override
                    public void run() {
                        force_undo_language = true;
                        language.setSelectedIndex(prev_lang_index);
                    }
                });
            }
        }
    }//GEN-LAST:event_languageActionPerformed

Replace Anonymous With Lambda at.redeye.FrameWork.base.translation.TranslationDialog.languageActionPerformed.invokeLater.new Runnable with () -> {force_undo_language=true; in method private languageActionPerformed(evt ActionEvent) : void from class at.redeye.FrameWork.base.translation.TranslationDialog


    private void countryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_countryActionPerformed

        if( force_undo_country || canClose() )
        {
            prev_country_index = country.getSelectedIndex();
            force_undo_country = false;
            updateLocale();
        }
        else
        {
            if( prev_country_index != -1 )
            {
                java.awt.EventQueue.invokeLater(() -> {
                    force_undo_country = true;
                    country.setSelectedIndex(prev_country_index);
                });
            }
        }

    }//GEN-LAST:event_countryActionPerformed

    private void countryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_countryActionPerformed

        if( force_undo_country || canClose() )
        {
            prev_country_index = country.getSelectedIndex();
            force_undo_country = false;
            updateLocale();
        }
        else
        {
            if( prev_country_index != -1 )
            {
                java.awt.EventQueue.invokeLater( new Runnable(){

                @Override
                public void run()
                {
                    force_undo_country = true;
                    country.setSelectedIndex(prev_country_index);
                }
                });
            }
        }

    }//GEN-LAST:event_countryActionPerformed

Replace Anonymous With Lambda at.redeye.FrameWork.base.translation.TranslationDialog.countryActionPerformed.invokeLater.new Runnable with () -> {force_undo_country=true; in method private countryActionPerformed(evt ActionEvent) : void from class at.redeye.FrameWork.base.translation.TranslationDialog


    /**
    * @param args the command line arguments
    */
    public static void main(String[] args) {
        java.awt.EventQueue.invokeLater(() -> new TestFrame().setVisible(true));
    }

    /**
    * @param args the command line arguments
    */
    public static void main(String[] args) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TestFrame().setVisible(true);
            }
        });
    }

Replace Anonymous With Lambda at.redeye.FrameWork.widgets.calendar.TestFrame.main.invokeLater.new Runnable with () -> new TestFrame().setVisible(true) in method public main(args String[]) : void from class at.redeye.FrameWork.widgets.calendar.TestFrame


    /**
    * @param args the command line arguments
    */
    public static void main(String[] args) {
        java.awt.EventQueue.invokeLater(() -> new TestAutoCompleteCombo().setVisible(true));
    }

    /**
    * @param args the command line arguments
    */
    public static void main(String[] args) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TestAutoCompleteCombo().setVisible(true);
            }
        });
    }

Replace Anonymous With Lambda at.redeye.FrameWork.widgets.test.TestAutoCompleteCombo.main.invokeLater.new Runnable with () -> new TestAutoCompleteCombo().setVisible(true) in method public main(args String[]) : void from class at.redeye.FrameWork.widgets.test.TestAutoCompleteCombo


    /**
     * Creates new form SingleWin
     */
    public SingleWin(Root root, final String file_name )
    {
        super(root, file_name != null ? (root.MlM(root.getAppTitle()) + ": " + file_name) : root.getAppTitle() );
        initComponents();

        last_path = root.getSetup().getLocalConfig("LastPath","");

        viewerPanel.setRoot(root, this);
        viewerPanel.setopenNewMailInterface(this);

        if( file_name == null )
        {
            viewerPanel.getHeaderPane().setText(MlM("Drag a msg file into this window") );
        } else {
            EventQueue.invokeLater(() -> {
                jMNav.setEnabled(file_name.toLowerCase().endsWith(".msg"));
                viewerPanel.parse(file_name);
            });
        }

        registerActionKeyListener(KeyStroke.getKeyStroke(KeyEvent.VK_N,0), () -> {
            if( jMNav.isEnabled() )
                jMNavActionPerformed(null);
        });

        new EditorDropTarget(this,viewerPanel.getHeaderPane());
        new EditorDropTarget(this,viewerPanel.getBodyPane());
    }

    /**
     * Creates new form SingleWin
     */
    public SingleWin(Root root, final String file_name )
    {
        super(root, file_name != null ? (root.MlM(root.getAppTitle()) + ": " + file_name) : root.getAppTitle() );
        initComponents();

        last_path = root.getSetup().getLocalConfig("LastPath","");

        viewerPanel.setRoot(root, this);
        viewerPanel.setopenNewMailInterface(this);

        if( file_name == null )
        {
            viewerPanel.getHeaderPane().setText(MlM("Drag a msg file into this window") );
        } else {
            EventQueue.invokeLater(() -> {
                jMNav.setEnabled(file_name.toLowerCase().endsWith(".msg"));
                viewerPanel.parse(file_name);
            });
        }

        registerActionKeyListener(KeyStroke.getKeyStroke(KeyEvent.VK_N,0), new Runnable() {

            @Override
            public void run() {
                if( jMNav.isEnabled() )
                    jMNavActionPerformed(null);
            }
        });

        new EditorDropTarget(this,viewerPanel.getHeaderPane());
        new EditorDropTarget(this,viewerPanel.getBodyPane());
    }

Replace Anonymous With Lambda net.sourceforge.MSGViewer.SingleWin.SingleWin.registerActionKeyListener.new Runnable with () -> {if(jMNav.isEnabled())jMNavActionPerformed(null); in method public SingleWin(root Root, file_name String) from class net.sourceforge.MSGViewer.SingleWin


    final void reload() {

        setting_show_size = StringUtils.isYes(root.getSetup().getLocalConfig(SETTING_SHOW_SIZE,"true") );

         EventQueue.invokeLater(() -> new AutoMBox(MSGNavigator.class.getName()) {
             @Override
             public void do_stuff() throws Exception {
                 parse(file);
             }
         });
    }

    final void reload() {

        setting_show_size = StringUtils.isYes(root.getSetup().getLocalConfig(SETTING_SHOW_SIZE,"true") );

         EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new AutoMBox(MSGNavigator.class.getName()) {

                    @Override
                    public void do_stuff() throws Exception {
                        parse(file);
                    }
                };

            }
        });
    }

Replace Anonymous With Lambda net.sourceforge.MSGViewer.MSGNavigator.MSGNavigator.reload.invokeLater.new Runnable with () -> new AutoMBox(MSGNavigator.class.getName()){ in method package reload() : void from class net.sourceforge.MSGViewer.MSGNavigator.MSGNavigator


    private void write(File content, byte[] data) {
        wating_thread_pool_counter++;

        thread_pool.execute(() -> {
            try (FileOutputStream fout = new FileOutputStream(content)) {
                fout.write(data);
            } catch( IOException ex ) {
                logger.error(ex,ex);
            }

            wating_thread_pool_counter--;
        });
    }

    private void write(File content, byte[] data) {
        wating_thread_pool_counter++;

        thread_pool.execute(new Runnable() {

            @Override
            public void run() {

                try (FileOutputStream fout = new FileOutputStream(content)) {
                    fout.write(data);
                } catch( IOException ex ) {
                    logger.error(ex,ex);
                }

                wating_thread_pool_counter--;
            }
        });
    }

Replace Anonymous With Lambda net.sourceforge.MSGViewer.ViewerPanel.write.execute.new Runnable with () -> {try(FileOutputStream fout=new FileOutputStream(content))fout.write(data); in method private write(content File, data byte[]) : void from class net.sourceforge.MSGViewer.ViewerPanel


	protected void initCommon(boolean do_not_inform_root) {
		translation_helper = new TranslationHelper(root, parent, this);
		parent.setTitle(MlM(title));

		root.loadMlM4Class(this, "de");

		if (!do_not_inform_root)
			root.informWindowOpened(parent);

		if (logger.isDebugEnabled()) {
			logger.debug(title);
		}

		parent.addWindowListener(new java.awt.event.WindowAdapter() {

			@Override
			public void windowClosing(java.awt.event.WindowEvent e) {
				if (parent.canClose()) {
					parent.close();
				}
			}
		});

		String id = parent.getUniqueDialogIdentifier("SetToLastXYPos");

		int x = Integer.parseInt(root.getSetup().getLocalConfig(
				id.concat(Setup.WindowX), String.valueOf(default_pos_x += 30)));
		int y = Integer.parseInt(root.getSetup().getLocalConfig(
				id.concat(Setup.WindowY), String.valueOf(default_pos_y += 30)));
		int w = Integer.parseInt(root.getSetup().getLocalConfig(
				id.concat(Setup.WindowWidth), "0"));
		int h = Integer.parseInt(root.getSetup().getLocalConfig(
				id.concat(Setup.WindowHeight), "0"));

		// Dimension dim = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
		Dimension dim = getVirtualScreenSize();
		//java.awt.Toolkit.getDefaultToolkit()
		// java.awt.GraphicsDevice

		Point mouse_point = MouseInfo.getPointerInfo().getLocation();

		if (x < mouse_point.x && x + w > mouse_point.x) {
			// alter Wert is super, den lassen wir so
                } else if( Math.abs( x + w -  mouse_point.x ) < w ) {
                        // alter Wert is super, den lassen wir so
		} else {
			x = mouse_point.x - 100;
		}

		if (y < mouse_point.y && y + h > mouse_point.y) {
			// alter Wert is super, den lassen wir so
                } else if( Math.abs( y + h -  mouse_point.y ) < h ) {
                        // alter Wert is super, den lassen wir so
		} else {
			y = mouse_point.y - 100;
		}

		if (dim.getWidth() < x + parent.getWidth())
			x = 100;

		if (dim.getHeight() < y + parent.getHeight())
			y = 100;

		if (x < 0)
			x = 100;

		if (y < 0)
			y = 100;

		logger.info("setting bounds to: " + x + "x" + y);
		parent.setBounds(x, y, 0, 0);
		logger.info("position now: " + parent.getX() + "x" + parent.getY());

		if (w > 0 && h > 0 && parent.openWithLastWidthAndHeight()) {
			logger.info(String.format("x (%d) + w (%d) = %d dim.Width: %d", x,
					w, x + w, (int) dim.getWidth()));

			if (x + w > dim.getWidth()) {
				logger.info("reducing with");
				w = (int) dim.getWidth() - x;
			}

			logger.info(String.format("y (%d) + h (%d) = %d dim.Height: %d", y,
					h, y + h, (int) dim.getHeight()));

			if (y + h > dim.getHeight()) {
				logger.info("reducing height");
				h = (int) dim.getHeight() - y;
			}

			logger.info("set size to: " + w + "x" + h);
			parent.setPreferredSize(new Dimension(w, h));
		}

		registerActionKeyListener(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
				() -> {
							if (parent.canClose()) {
								parent.close();
							}
						});
		loadStuff();
	}

	protected void initCommon(boolean do_not_inform_root) {
		translation_helper = new TranslationHelper(root, parent, this);
		parent.setTitle(MlM(title));

		root.loadMlM4Class(this, "de");

		if (!do_not_inform_root)
			root.informWindowOpened(parent);

		if (logger.isDebugEnabled()) {
			logger.debug(title);
		}

		parent.addWindowListener(new java.awt.event.WindowAdapter() {

			@Override
			public void windowClosing(java.awt.event.WindowEvent e) {
				if (parent.canClose()) {
					parent.close();
				}
			}
		});

		String id = parent.getUniqueDialogIdentifier("SetToLastXYPos");

		int x = Integer.parseInt(root.getSetup().getLocalConfig(
				id.concat(Setup.WindowX), String.valueOf(default_pos_x += 30)));
		int y = Integer.parseInt(root.getSetup().getLocalConfig(
				id.concat(Setup.WindowY), String.valueOf(default_pos_y += 30)));
		int w = Integer.parseInt(root.getSetup().getLocalConfig(
				id.concat(Setup.WindowWidth), "0"));
		int h = Integer.parseInt(root.getSetup().getLocalConfig(
				id.concat(Setup.WindowHeight), "0"));

		// Dimension dim = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
		Dimension dim = getVirtualScreenSize();
		//java.awt.Toolkit.getDefaultToolkit()
		// java.awt.GraphicsDevice

		Point mouse_point = MouseInfo.getPointerInfo().getLocation();

		if (x < mouse_point.x && x + w > mouse_point.x) {
			// alter Wert is super, den lassen wir so
                } else if( Math.abs( x + w -  mouse_point.x ) < w ) {
                        // alter Wert is super, den lassen wir so
		} else {
			x = mouse_point.x - 100;
		}

		if (y < mouse_point.y && y + h > mouse_point.y) {
			// alter Wert is super, den lassen wir so
                } else if( Math.abs( y + h -  mouse_point.y ) < h ) {
                        // alter Wert is super, den lassen wir so
		} else {
			y = mouse_point.y - 100;
		}

		if (dim.getWidth() < x + parent.getWidth())
			x = 100;

		if (dim.getHeight() < y + parent.getHeight())
			y = 100;

		if (x < 0)
			x = 100;

		if (y < 0)
			y = 100;

		logger.info("setting bounds to: " + x + "x" + y);
		parent.setBounds(x, y, 0, 0);
		logger.info("position now: " + parent.getX() + "x" + parent.getY());

		if (w > 0 && h > 0 && parent.openWithLastWidthAndHeight()) {
			logger.info(String.format("x (%d) + w (%d) = %d dim.Width: %d", x,
					w, x + w, (int) dim.getWidth()));

			if (x + w > dim.getWidth()) {
				logger.info("reducing with");
				w = (int) dim.getWidth() - x;
			}

			logger.info(String.format("y (%d) + h (%d) = %d dim.Height: %d", y,
					h, y + h, (int) dim.getHeight()));

			if (y + h > dim.getHeight()) {
				logger.info("reducing height");
				h = (int) dim.getHeight() - y;
			}

			logger.info("set size to: " + w + "x" + h);
			parent.setPreferredSize(new Dimension(w, h));
		}

		registerActionKeyListener(
				KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), new Runnable() {

            @Override
					public void run() {
						if (parent.canClose()) {
							parent.close();
						}
					}
				});

		loadStuff();
	}

Replace Anonymous With Lambda at.redeye.FrameWork.base.BaseDialogBaseHelper.initCommon.registerActionKeyListener.new Runnable with () -> {if(parent.canClose()){parent.close(); in method protected initCommon(do_not_inform_root boolean) : void from class at.redeye.FrameWork.base.BaseDialogBaseHelper


	public void registerOnCloseListener(Runnable runnable) {
		if (runnable == null)
			return;

		if (onCloseListeners == null)
			onCloseListeners = new LinkedList<>();

		onCloseListeners.add(runnable);
	}

	public void registerOnCloseListener(Runnable runnable) {
		if (runnable == null)
			return;

		if (onCloseListeners == null)
			onCloseListeners = new LinkedList<Runnable>();

		onCloseListeners.add(runnable);
	}

Replace Generic With Diamond LinkedList<Runnable> with LinkedList<> in method public registerOnCloseListener(runnable Runnable) : void from class at.redeye.FrameWork.base.BaseDialogBaseHelper


    @Override
    public void registerPlugin( Plugin plugin )
    {
        if( plugins == null )
            plugins = new ArrayList<>();
        else
        {
            for( Plugin p : plugins )
            {
                // already registered
                if( p.getName().equals(plugin.getName()) )
                    return;
            }
        }

        if( plugin.isAvailable() )
        {
            try {
                plugin.initPlugin(this);
                plugins.add(plugin);
            } catch( AccessControlException ex ) {
                logger.error(ex,ex);
            }
        }
    }

    @Override
    public void registerPlugin( Plugin plugin )
    {
        if( plugins == null )
            plugins = new ArrayList<Plugin>();
        else
        {
            for( Plugin p : plugins )
            {
                // already registered
                if( p.getName().equals(plugin.getName()) )
                    return;
            }
        }

        if( plugin.isAvailable() )
        {
            try {
                plugin.initPlugin(this);
                plugins.add(plugin);
            } catch( AccessControlException ex ) {
                logger.error(ex,ex);
            }
        }
    }

Replace Generic With Diamond ArrayList<Plugin> with ArrayList<> in method public registerPlugin(plugin Plugin) : void from class at.redeye.FrameWork.base.LocalRoot


        @Override
        public Vector<String> getPossibleValues() {

            Vector<String> res = new Vector<>();

            for( CURRENCY val : CURRENCY.values() )
                res.add(val.toString());

            return res;
        }

        @Override
        public Vector<String> getPossibleValues() {

            Vector<String> res = new Vector<String>();

            for( CURRENCY val : CURRENCY.values() )
                res.add(val.toString());

            return res;
        }

Replace Generic With Diamond Vector<String> with Vector<> in method public getPossibleValues() : Vector<String> from class at.redeye.FrameWork.base.bindtypes.CurrencyEnumHandler


        @Override
        public Vector<String> getPossibleValues() {
           Vector<String> res = new Vector<>();

           res.add( "X" );
           res.add( " " );

           return res;
        }

        @Override
        public Vector<String> getPossibleValues() {
           Vector<String> res = new Vector<String>();

           res.add( "X" );
           res.add( " " );

           return res;
        }

Replace Generic With Diamond Vector<String> with Vector<> in method public getPossibleValues() : Vector<String> from class at.redeye.FrameWork.base.bindtypes.DBFlagInteger.FlagIntegerHandler


        @Override
        public List<String> getPossibleValues() {
            List<String> res = new ArrayList<>();

            for( FLAGTYPES t : FLAGTYPES.values() )
                res.add( t.toString() );

            return res;
        }

        @Override
        public List<String> getPossibleValues() {
            List<String> res = new ArrayList<String>();

            for( FLAGTYPES t : FLAGTYPES.values() )
                res.add( t.toString() );

            return res;
        }

Replace Generic With Diamond ArrayList<String> with ArrayList<> in method public getPossibleValues() : List<String> from class at.redeye.FrameWork.base.bindtypes.DBFlagJaNein.FlagEnumHandler


		@Override
		public Vector<String> getPossibleValues() {
			Vector<String> res = new Vector<>();

			for (SqlQuery.Pair p : pairs)
				res.add(p.text);

			return res;
		}

		@Override
		public Vector<String> getPossibleValues() {
			Vector<String> res = new Vector<String>();

			for (SqlQuery.Pair p : pairs)
				res.add(p.text);

			return res;
		}

Replace Generic With Diamond Vector<String> with Vector<> in method public getPossibleValues() : Vector<String> from class at.redeye.FrameWork.base.bindtypes.DBSqlAsInteger.SqlAsIntegerHandler


	public void add(DBValue value, Integer version) {
		element_by_name.put(value.getName(), value);
		elements_with_version.add(new SimpleEntry<>(version,
				value));

		if (this.version == null)
			this.version = version;
		else if (version > this.version)
			this.version = version;
	}

	public void add(DBValue value, Integer version) {
		element_by_name.put(value.getName(), value);
		elements_with_version.add(new SimpleEntry<Integer, DBValue>(version,
				value));

		if (this.version == null)
			this.version = version;
		else if (version > this.version)
			this.version = version;
	}

Replace Generic With Diamond SimpleEntry<Integer,DBValue> with SimpleEntry<> in method public add(value DBValue, version Integer) : void from class at.redeye.FrameWork.base.bindtypes.DBStrukt


	protected HashMap<String, Object> getHashMapAndData(String prefix) {
		HashMap<String, Object> colls = new HashMap<>();

		for (int i = 0; i < elements_with_version.size(); i++) {
			DBValue val = elements_with_version.get(i).getValue();
			colls.put(prefix + val.getName(), val.getValue());
		}

		for (int i = 0; i < sub_strukts.size(); i++) {
			DBStrukt strukt = sub_strukts.get(i);

			HashMap<String, Object> sub_colls = strukt.getHashMapAndData(prefix
					+ strukt.getName() + "_");

			Set<String> keys = sub_colls.keySet();

			for (String s : keys) {
				colls.put(s, sub_colls.get(s));
			}
		}

		return colls;
	}

	protected HashMap<String, Object> getHashMapAndData(String prefix) {
		HashMap<String, Object> colls = new HashMap<String, Object>();

		for (int i = 0; i < elements_with_version.size(); i++) {
			DBValue val = elements_with_version.get(i).getValue();
			colls.put(prefix + val.getName(), val.getValue());
		}

		for (int i = 0; i < sub_strukts.size(); i++) {
			DBStrukt strukt = sub_strukts.get(i);

			HashMap<String, Object> sub_colls = strukt.getHashMapAndData(prefix
					+ strukt.getName() + "_");

			Set<String> keys = sub_colls.keySet();

			for (String s : keys) {
				colls.put(s, sub_colls.get(s));
			}
		}

		return colls;
	}

Replace Generic With Diamond HashMap<String,Object> with HashMap<> in method protected getHashMapAndData(prefix String) : HashMap<String,Object> from class at.redeye.FrameWork.base.bindtypes.DBStrukt


	public ArrayList<DBValue> getAllValues() {
		ArrayList<DBValue> values = new ArrayList<>();

		for (int i = 0; i < elements_with_version.size(); i++) {
			DBValue val = elements_with_version.get(i).getValue();

			values.add(val);
		}

		for (int i = 0; i < sub_strukts.size(); i++) {
			DBStrukt strukt = sub_strukts.get(i);

			values.addAll(strukt.getAllValues());
		}

		return values;
	}

	public ArrayList<DBValue> getAllValues() {
		ArrayList<DBValue> values = new ArrayList<DBValue>();

		for (int i = 0; i < elements_with_version.size(); i++) {
			DBValue val = elements_with_version.get(i).getValue();

			values.add(val);
		}

		for (int i = 0; i < sub_strukts.size(); i++) {
			DBStrukt strukt = sub_strukts.get(i);

			values.addAll(strukt.getAllValues());
		}

		return values;
	}

Replace Generic With Diamond ArrayList<DBValue> with ArrayList<> in method public getAllValues() : ArrayList<DBValue> from class at.redeye.FrameWork.base.bindtypes.DBStrukt


	protected ArrayList<String> getAllNames(String prefix) {
		ArrayList<String> values = new ArrayList<>();

		for (int i = 0; i < elements_with_version.size(); i++) {
			DBValue val = elements_with_version.get(i).getValue();

			if (val.getTitle().isEmpty())
				values.add(prefix + val.getName());
			else
				values.add(prefix + val.getTitle());
		}

		for (int i = 0; i < sub_strukts.size(); i++) {
			DBStrukt strukt = sub_strukts.get(i);

			if (strukt.getTitle().isEmpty())
				values.addAll(strukt.getAllNames(strukt.getName() + " "));
			else
				values.addAll(strukt.getAllNames(strukt.getTitle() + " "));
		}

		return values;
	}

	protected ArrayList<String> getAllNames(String prefix) {
		ArrayList<String> values = new ArrayList<String>();

		for (int i = 0; i < elements_with_version.size(); i++) {
			DBValue val = elements_with_version.get(i).getValue();

			if (val.getTitle().isEmpty())
				values.add(prefix + val.getName());
			else
				values.add(prefix + val.getTitle());
		}

		for (int i = 0; i < sub_strukts.size(); i++) {
			DBStrukt strukt = sub_strukts.get(i);

			if (strukt.getTitle().isEmpty())
				values.addAll(strukt.getAllNames(strukt.getName() + " "));
			else
				values.addAll(strukt.getAllNames(strukt.getTitle() + " "));
		}

		return values;
	}

Replace Generic With Diamond ArrayList<String> with ArrayList<> in method protected getAllNames(prefix String) : ArrayList<String> from class at.redeye.FrameWork.base.bindtypes.DBStrukt


    public void initDb() {
/*
        if( root.getDBConnection() != null )
        {
            try {

                Transaction trans = root.getDBConnection().getNewTransaction();
                Set<String> keys = GlobalConfigDefinitions.entries.keySet();
                for (String key : keys) {
                    DBConfig prm = root.getSetup().getConfig(key);
                    if (prm == null) {
                        prm = GlobalConfigDefinitions.get(key);
                        prm.hist.setAnHist("ModuleLauncher");
                        if (trans.insertValues(prm) != 1) {
                            logger.error("Failed to insert PRM <" + prm.getConfigName().toString() + ">\n");
                        }
                        trans.commit();
                        logger.info("PRM <" + prm.getConfigName().toString() + "> successfully inserted!");
                    } else {
                        logger.debug("PRM <" + prm.getConfigName().toString() + "> already exists in database!");
                    }
                }
                trans.rollback();
                root.getDBConnection().closeTransaction(trans);
            } catch (SQLException se) {
                logger.error("SQL-Error: " + se.getMessage());
            } catch (WrongBindFileFormatException we) {
                logger.error("Bind-Error: " + we.getMessage());
            } catch (UnsupportedDBDataTypeException ute) {
                logger.error("Wrong binding: " + ute.getMessage());
            } catch (IOException ioe) {
                logger.error("I/O error: " + ioe.getMessage());
            }
        }
*/

        Set<String> keys = LocalConfigDefinitions.entries.keySet();

        TreeMap<String, DBConfig> vals = new TreeMap<>();

        for (String key : keys) {
            vals.put(key, LocalConfigDefinitions.get(key));
        }

        for (String key : keys) {
            DBConfig c = (DBConfig) vals.get(key).getCopy();
            root.getSetup().setLocalConfig(c.getConfigName(), c.getConfigValue(), true);
        }

        root.saveSetup();
    }

    public void initDb() {
/*
        if( root.getDBConnection() != null )
        {
            try {

                Transaction trans = root.getDBConnection().getNewTransaction();
                Set<String> keys = GlobalConfigDefinitions.entries.keySet();
                for (String key : keys) {
                    DBConfig prm = root.getSetup().getConfig(key);
                    if (prm == null) {
                        prm = GlobalConfigDefinitions.get(key);
                        prm.hist.setAnHist("ModuleLauncher");
                        if (trans.insertValues(prm) != 1) {
                            logger.error("Failed to insert PRM <" + prm.getConfigName().toString() + ">\n");
                        }
                        trans.commit();
                        logger.info("PRM <" + prm.getConfigName().toString() + "> successfully inserted!");
                    } else {
                        logger.debug("PRM <" + prm.getConfigName().toString() + "> already exists in database!");
                    }
                }
                trans.rollback();
                root.getDBConnection().closeTransaction(trans);
            } catch (SQLException se) {
                logger.error("SQL-Error: " + se.getMessage());
            } catch (WrongBindFileFormatException we) {
                logger.error("Bind-Error: " + we.getMessage());
            } catch (UnsupportedDBDataTypeException ute) {
                logger.error("Wrong binding: " + ute.getMessage());
            } catch (IOException ioe) {
                logger.error("I/O error: " + ioe.getMessage());
            }
        }
*/

        Set<String> keys = LocalConfigDefinitions.entries.keySet();

        TreeMap<String, DBConfig> vals = new TreeMap<String, DBConfig>();

        for (String key : keys) {
            vals.put(key, LocalConfigDefinitions.get(key));
        }

        for (String key : keys) {
            DBConfig c = (DBConfig) vals.get(key).getCopy();
            root.getSetup().setLocalConfig(c.getConfigName(), c.getConfigValue(), true);
        }

        root.saveSetup();
    }

Replace Generic With Diamond TreeMap<String,DBConfig> with TreeMap<> in method public initDb() : void from class at.redeye.FrameWork.base.prm.impl.PrmDBInit


    private void feed_table() {

        values.clear();
        tm.clear();

        TreeMap<String, DBConfig> vals = new TreeMap<>();

        Set<String> keys = LocalConfigDefinitions.entries.keySet();

        for (String key : keys) {
            vals.put(key, LocalConfigDefinitions.get(key));
        }

        for (String key : keys) {

            DBConfig c = (DBConfig) vals.get(key).getCopy();

            String val = root.getSetup().getLocalConfig(c.getConfigName(), c.getConfigValue());

            c.descr.loadFromCopy(MlM(c.descr.getValue()));

            c.setConfigValue(val);
            tm.add(c);
            values.add(c);
        }

    }

    private void feed_table() {

        values.clear();
        tm.clear();

        TreeMap<String, DBConfig> vals = new TreeMap<String, DBConfig>();

        Set<String> keys = LocalConfigDefinitions.entries.keySet();

        for (String key : keys) {
            vals.put(key, LocalConfigDefinitions.get(key));
        }

        for (String key : keys) {

            DBConfig c = (DBConfig) vals.get(key).getCopy();

            String val = root.getSetup().getLocalConfig(c.getConfigName(), c.getConfigValue());

            c.descr.loadFromCopy(MlM(c.descr.getValue()));

            c.setConfigValue(val);
            tm.add(c);
            values.add(c);
        }

    }

Replace Generic With Diamond TreeMap<String,DBConfig> with TreeMap<> in method private feed_table() : void from class at.redeye.FrameWork.base.prm.impl.gui.LocalConfig


    @Override
    public List<String> getNames() {

        List<String> res = new ArrayList<>();

        if (Setup.is_win_system())
        {
            String LIB_NAME = LIB_NAME_BASE + "w32.dll";
            if (!System.getProperty("os.arch").equals("x86")) {
                LIB_NAME = LIB_NAME_BASE + System.getProperty("os.arch") + ".dll";
            }

            res.add(LIB_NAME);
        }

        return res;
    }

    @Override
    public List<String> getNames() {

        List<String> res = new ArrayList<String>();

        if (Setup.is_win_system())
        {
            String LIB_NAME = LIB_NAME_BASE + "w32.dll";
            if (!System.getProperty("os.arch").equals("x86")) {
                LIB_NAME = LIB_NAME_BASE + System.getProperty("os.arch") + ".dll";
            }

            res.add(LIB_NAME);
        }

        return res;
    }

Replace Generic With Diamond ArrayList<String> with ArrayList<> in method public getNames() : List<String> from class at.redeye.FrameWork.base.proxy.ProxyVoleDLL


    public SimpleProxySelector( String host, int port )
    {
        super();

        Proxy proxy = new Proxy(Proxy.Type.HTTP, InetSocketAddress.createUnresolved(host, port));
        proxy_list.add(proxy);

        if( no_proxy_list == null )
        {
            no_proxy_list = new ArrayList<>();
            no_proxy_list.add(Proxy.NO_PROXY);
        }

    }

    public SimpleProxySelector( String host, int port )
    {
        super();

        Proxy proxy = new Proxy(Proxy.Type.HTTP, InetSocketAddress.createUnresolved(host, port));
        proxy_list.add(proxy);

        if( no_proxy_list == null )
        {
            no_proxy_list = new ArrayList<Proxy>();
            no_proxy_list.add(Proxy.NO_PROXY);
        }

    }

Replace Generic With Diamond ArrayList<Proxy> with ArrayList<> in method public SimpleProxySelector(host String, port int) from class at.redeye.FrameWork.base.proxy.SimpleProxySelector


    public Vector<String> getAllOfCollSorted(int col)
    {
        Vector<String> all = new Vector<>();

        TableValidator validator = null;
        Coll coll = null;

        if( col >= 0 && col < colls.size() )
        {
            coll = colls.get(col);
            validator = coll.validator;
        }

        if( !coll.getDoAutocompleteForAllOfThisColl() )
            return all;

        for( int i = 0; i < rows.size(); i++ )
        {
            if( rows.get(i).size() > col && col > 0 )
            {
                Object obj = rows.get(i).get(col);

                if( validator != null )
                {
                    all.add(validator.formatData(obj));
                }
                else
                {
                    all.add(obj.toString());
                }
            }
        }

        if( coll.additional_autocomplete_values != null )
        {
            for( Object obj : coll.additional_autocomplete_values )
            {
                if( validator != null )
                    all.add(validator.formatData(obj));
                else
                    all.add(obj.toString());
            }
        }

        Collections.sort(all);

        // System.out.println( "HEEEEEEEEERE ");
        /*
        for( int i = 0; i < all.size(); i++ )
        {
            System.out.println("xx: " + all.get(i));
        }
        */
        return all;
    }

    public Vector<String> getAllOfCollSorted(int col)
    {
        Vector<String> all = new Vector<String>();

        TableValidator validator = null;
        Coll coll = null;

        if( col >= 0 && col < colls.size() )
        {
            coll = colls.get(col);
            validator = coll.validator;
        }

        if( !coll.getDoAutocompleteForAllOfThisColl() )
            return all;

        for( int i = 0; i < rows.size(); i++ )
        {
            if( rows.get(i).size() > col && col > 0 )
            {
                Object obj = rows.get(i).get(col);

                if( validator != null )
                {
                    all.add(validator.formatData(obj));
                }
                else
                {
                    all.add(obj.toString());
                }
            }
        }

        if( coll.additional_autocomplete_values != null )
        {
            for( Object obj : coll.additional_autocomplete_values )
            {
                if( validator != null )
                    all.add(validator.formatData(obj));
                else
                    all.add(obj.toString());
            }
        }

        Collections.sort(all);

        // System.out.println( "HEEEEEEEEERE ");
        /*
        for( int i = 0; i < all.size(); i++ )
        {
            System.out.println("xx: " + all.get(i));
        }
        */
        return all;
    }

Replace Generic With Diamond Vector<String> with Vector<> in method public getAllOfCollSorted(col int) : Vector<String> from class at.redeye.FrameWork.base.tablemanipulator.TableDesign


    public TableManipulator( Root root, JTable table, TableDesign tabledesign )
    {
        this.tabledesign = tabledesign;
        this.table = table;
        this.model = new NormalTableModel(tabledesign);
        this.root = root;
        table.setModel(model);
        table.setDefaultRenderer(Object.class, new NormalCellRenderer(root, this.tabledesign));
        row_header = new RowHeader( table, this::checkRowHeaderLimit);

        editor_stopper = new TableEditorStopper(table);

        readShowHeaderLimit();
        addCloseListener();
    }

    public TableManipulator( Root root, JTable table, TableDesign tabledesign )
    {
        this.tabledesign = tabledesign;
        this.table = table;
        this.model = new NormalTableModel(tabledesign);
        this.root = root;
        table.setModel(model);
        table.setDefaultRenderer(Object.class, new NormalCellRenderer(root, this.tabledesign));
        row_header = new RowHeader( table,  new Runnable() {

            @Override
            public void run() {
                checkRowHeaderLimit();
            }
        } );

        editor_stopper = new TableEditorStopper(table);

        readShowHeaderLimit();
        addCloseListener();
    }

Replace Anonymous With Lambda at.redeye.FrameWork.base.tablemanipulator.TableManipulator.TableManipulator.new RowHeader.new Runnable with this::checkRowHeaderLimit in method public TableManipulator(root Root, table JTable, tabledesign TableDesign) from class at.redeye.FrameWork.base.tablemanipulator.TableManipulator


    private boolean already_loaded( String name, String locale, String impl_language )
    {
        String key = name + locale + impl_language;

        if( loaded_object_files == null )
             loaded_object_files = new LinkedList<>();

        if( loaded_object_files.contains(key) )
             return true;

        loaded_object_files.add(key);

        return false;
    }

    private boolean already_loaded( String name, String locale, String impl_language )
    {
        String key = name + locale + impl_language;

        if( loaded_object_files == null )
             loaded_object_files = new LinkedList<String>();

        if( loaded_object_files.contains(key) )
             return true;

        loaded_object_files.add(key);

        return false;
    }

Replace Generic With Diamond LinkedList<String> with LinkedList<> in method private already_loaded(name String, locale String, impl_language String) : boolean from class at.redeye.FrameWork.base.translation.MLHelper


	public static List<String> split_str(StringBuilder s, String c) {

		List<String> res = new ArrayList<>();

		int start = 0;
		do {
			int pos = s.indexOf(c, start);

			if (pos < 0) {
				res.add(s.substring(start));
				break;
			}

			res.add(s.substring(start, pos));

			start = pos + 1;

		} while (start > 0);

		return res;
	}

	public static List<String> split_str(StringBuilder s, String c) {

		List<String> res = new ArrayList<String>();

		int start = 0;
		do {
			int pos = s.indexOf(c, start);

			if (pos < 0) {
				res.add(s.substring(start));
				break;
			}

			res.add(s.substring(start, pos));

			start = pos + 1;

		} while (start > 0);

		return res;
	}

Replace Generic With Diamond ArrayList<String> with ArrayList<> in method public split_str(s StringBuilder, c String) : List<String> from class at.redeye.FrameWork.utilities.StringUtils


	private void initComponents() {

		jScrollPane1 = new javax.swing.JScrollPane();
		jHelp = new javax.swing.JEditorPane();
		jBClose = new javax.swing.JButton();

		setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

		jHelp.setContentType("text/html");
		jHelp.setEditable(false);
		jScrollPane1.setViewportView(jHelp);

		jBClose.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/at/redeye/FrameWork/base/resources/icons/fileclose.gif"))); // NOI18N
		jBClose.setText("Schließen");
		jBClose.addActionListener(this::jBCloseActionPerformed);

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout.setHorizontalGroup(layout
				.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
				.addGroup(
						layout.createSequentialGroup()
								.addContainerGap()
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.LEADING)
												.addComponent(
														jScrollPane1,
														javax.swing.GroupLayout.DEFAULT_SIZE,
														721, Short.MAX_VALUE)
												.addComponent(
														jBClose,
														javax.swing.GroupLayout.Alignment.TRAILING))
								.addContainerGap()));
		layout.setVerticalGroup(layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addGroup(
				javax.swing.GroupLayout.Alignment.TRAILING,
				layout.createSequentialGroup()
						.addContainerGap()
						.addComponent(jScrollPane1,
								javax.swing.GroupLayout.DEFAULT_SIZE, 469,
								Short.MAX_VALUE).addGap(12, 12, 12)
						.addComponent(jBClose).addContainerGap()));

		pack();
	}//</editor-fold>//GEN-END:initComponents

	private void initComponents() {

		jScrollPane1 = new javax.swing.JScrollPane();
		jHelp = new javax.swing.JEditorPane();
		jBClose = new javax.swing.JButton();

		setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

		jHelp.setContentType("text/html");
		jHelp.setEditable(false);
		jScrollPane1.setViewportView(jHelp);

		jBClose.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/at/redeye/FrameWork/base/resources/icons/fileclose.gif"))); // NOI18N
		jBClose.setText("Schließen");
		jBClose.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				jBCloseActionPerformed(evt);
			}
		});

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout.setHorizontalGroup(layout
				.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
				.addGroup(
						layout.createSequentialGroup()
								.addContainerGap()
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.LEADING)
												.addComponent(
														jScrollPane1,
														javax.swing.GroupLayout.DEFAULT_SIZE,
														721, Short.MAX_VALUE)
												.addComponent(
														jBClose,
														javax.swing.GroupLayout.Alignment.TRAILING))
								.addContainerGap()));
		layout.setVerticalGroup(layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addGroup(
				javax.swing.GroupLayout.Alignment.TRAILING,
				layout.createSequentialGroup()
						.addContainerGap()
						.addComponent(jScrollPane1,
								javax.swing.GroupLayout.DEFAULT_SIZE, 469,
								Short.MAX_VALUE).addGap(12, 12, 12)
						.addComponent(jBClose).addContainerGap()));

		pack();
	}//</editor-fold>//GEN-END:initComponents

Replace Anonymous With Lambda at.redeye.FrameWork.widgets.helpwindow.HelpWin.initComponents.addActionListener.new java.awt.event.ActionListener with this::jBCloseActionPerformed in method private initComponents() : void from class at.redeye.FrameWork.widgets.helpwindow.HelpWin


    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jHelp = new javax.swing.JEditorPane();
        jBClose = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jHelp.setContentType("text/html");
        jHelp.setEditable(false);
        jScrollPane1.setViewportView(jHelp);

        jBClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/at/redeye/FrameWork/base/resources/icons/fileclose.gif"))); // NOI18N
        jBClose.setText("Schließen");
        jBClose.addActionListener(this::jBCloseActionPerformed);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 721, Short.MAX_VALUE)
                    .addComponent(jBClose, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 469, Short.MAX_VALUE)
                .addGap(12, 12, 12)
                .addComponent(jBClose)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jHelp = new javax.swing.JEditorPane();
        jBClose = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jHelp.setContentType("text/html");
        jHelp.setEditable(false);
        jScrollPane1.setViewportView(jHelp);

        jBClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/at/redeye/FrameWork/base/resources/icons/fileclose.gif"))); // NOI18N
        jBClose.setText("Schließen");
        jBClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCloseActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 721, Short.MAX_VALUE)
                    .addComponent(jBClose, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 469, Short.MAX_VALUE)
                .addGap(12, 12, 12)
                .addComponent(jBClose)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

Replace Anonymous With Lambda at.redeye.FrameWork.widgets.helpwindow.HelpWinModal.initComponents.addActionListener.new java.awt.event.ActionListener with this::jBCloseActionPerformed in method private initComponents() : void from class at.redeye.FrameWork.widgets.helpwindow.HelpWinModal


    /** Creates new form TestAutoCompleteCombo */
    public TestAutoCompleteCombo() {
        initComponents();

        AutoCompleteCombo ac = (AutoCompleteCombo) combo;
        AutoCompleteTextField tf = (AutoCompleteTextField) textfield;

        Vector<String> test = new Vector<>();

        test.add("aha");
        test.add("aho");
        test.add("foobar");
        test.add("jesasna");
        test.add("verzwickt");

        ac.set_items(test);
        tf.set_items(test);
    }

    /** Creates new form TestAutoCompleteCombo */
    public TestAutoCompleteCombo() {
        initComponents();

        AutoCompleteCombo ac = (AutoCompleteCombo) combo;
        AutoCompleteTextField tf = (AutoCompleteTextField) textfield;

        Vector<String> test = new Vector<String>();

        test.add("aha");
        test.add("aho");
        test.add("foobar");
        test.add("jesasna");
        test.add("verzwickt");

        ac.set_items(test);
        tf.set_items(test);
    }

Replace Generic With Diamond Vector<String> with Vector<> in method public TestAutoCompleteCombo() from class at.redeye.FrameWork.widgets.test.TestAutoCompleteCombo


void parse_int(final String file_name) throws IOException, FileNotFoundException, Exception
    {
        cleanUp();

        wating_thread_pool_counter = 0;

        File file = new File(file_name);

        if( !file.exists() )
            throw new FileNotFoundException( parent.MlM( String.format("File %s not found",file_name)) );

        message = parser_factory.parseMessage(file);

        final StringBuilder sb = new StringBuilder();

        sb.append("");
        sb.append("");

        sb.append("");
        if( message.getSubject() != null )
            sb.append(message.getSubject());
        sb.append("");
        sb.append("
");

        logger.info("Message From:" + message.getFromName() + "\n To:" + message.getToName() + "\n Email: " + message.getFromEmail());

        if (message.getFromEmail() == null && message.getFromName() == null) {
        } else if (message.getFromEmail() == null) {
            sb.append(parent.MlM("From: "));
            sb.append(message.getFromName());
        } else if (message.getFromName() == null) {
            sb.append("");
            sb.append(message.getFromEmail());
        } else {

            sb.append("");
            sb.append(message.getFromName());
        }

        if( message.getFromEmail() != null && message.getFromEmail().contains("@") )
        {
            sb.append(" [");
            sb.append(message.getFromEmail());
            sb.append("]");
        }

        sb.append("");

        sb.append("
");

        if( message.getDate() != null )
        {
            sb.append(parent.MlM("Date: "));
            sb.append(DateFormat.getDateTimeInstance().format(message.getDate()));
            sb.append("
");
        }

        if( !message.getRecipients().isEmpty() )
        {
            sb.append(parent.MlM("To: "));
            sb.append(message.getRecipients().stream().map(ViewerPanel::asMailto).collect(toList()));
        }

        sb.append("
");

        List<Attachment> attachments = message.getAttachments();

        final int max_width = Integer.parseInt(root.getSetup().getLocalConfig(AppConfigDefinitions.IconSize));
        final int max_height = max_width;

        for( Attachment att : attachments )
        {
            if( att instanceof FileAttachment)
            {
                final FileAttachment fatt = (FileAttachment) att;

                File content = helper.getTempFile(fatt);

                sb.append("");

                String mime_type = fatt.getMimeTag();

                logger.info(" " + mime_type);

                if( mime_type != null && ViewerHelper.is_image_mime_type(mime_type) && fatt.getSize() < 1024*1024*2 )
                {
                    File contentIcon = new File(content.getAbsolutePath() + "-small.jpg");
                    if (!content.exists()) {

                        write(content, fatt.getData());

                        wating_thread_pool_counter++;

                        thread_pool.execute(() -> {
                            try {

                                ImageIcon icon = ImageUtils.loadScaledImageIcon(fatt.getData(),
                                        fatt.toString(),
                                        max_width, max_height );

                                BufferedImage bi = new BufferedImage(icon.getIconWidth(),icon.getIconHeight(),
                                        BufferedImage.TYPE_INT_RGB);

                                Graphics2D g2 = bi.createGraphics();
                                g2.drawImage(icon.getImage(), 0, 0, null);
                                g2.dispose();

                                ImageIO.write(bi, "jpg", contentIcon);

                            } catch( IOException ex ) {
                                logger.error(ex,ex);
                            }

                            wating_thread_pool_counter--;
                        });
                    }

                    System.out.println(contentIcon);
                    sb.append(" ");
                }

                if( ViewerHelper.is_mail_message(fatt.getFilename(), fatt.getMimeTag() ) ) {
                    if (!content.exists())
                    {
                        write(content, fatt.getData());
                    }

                    sb.append("");
                }

                sb.append(fatt);
                sb.append(" ");

            } else if( att instanceof MsgAttachment) {

                MsgAttachment msgAtt = (MsgAttachment) att;
                final Message msg = msgAtt.getMessage();

                File sub_file = helper.getTempFile(msgAtt);

                thread_pool.execute(() -> {
                    new AutoMBox(file_name) {

                        @Override
                        public void do_stuff() throws Exception {

                            MessageParserFactory factory = new MessageParserFactory();
                            factory.saveMessage(msg, sub_file);

                        }
                    };
                });

                sb.append("");

                sb.append("");

                sb.append(msg.getSubject());

                sb.append("   ");
            } else {
                logger.error("unknown Attachment: " + att + " " + att.getClass().getName() );
            }
        }

        sb.append("");
        header.setContentType("text/html");

        if( wating_thread_pool_counter > 0 )
        {
            updateBody(); // do something different now

            new AutoMBox(file_name) {

                @Override
                public void do_stuff() throws Exception {
                    thread_pool.shutdown();

                    if( wating_thread_pool_counter > 0 ) {
                        thread_pool.awaitTermination(1, TimeUnit.DAYS);
                    }
                }
            };

            header.setText(sb.toString());
            header.setCaretPosition(0);

        } else {

            header.setText(sb.toString());
            header.setCaretPosition(0);

            updateBody();
        }
    }

void parse_int(final String file_name) throws IOException, FileNotFoundException, Exception
    {
        cleanUp();

        wating_thread_pool_counter = 0;

        File file = new File(file_name);

        if( !file.exists() )
            throw new FileNotFoundException( parent.MlM( String.format("File %s not found",file_name)) );

        message = parser_factory.parseMessage(file);

        final StringBuilder sb = new StringBuilder();

        sb.append("");
        sb.append("");

        sb.append("");
        if( message.getSubject() != null )
            sb.append(message.getSubject());
        sb.append("");
        sb.append("
");

        logger.info("Message From:" + message.getFromName() + "\n To:" + message.getToName() + "\n Email: " + message.getFromEmail());

        if (message.getFromEmail() == null && message.getFromName() == null) {
        } else if (message.getFromEmail() == null) {
            sb.append(parent.MlM("From: ") + message.getFromName());
        } else if (message.getFromName() == null) {
            sb.append("");
            sb.append(message.getFromEmail());
        } else {

            sb.append("");
            sb.append(message.getFromName());
        }

        if( message.getFromEmail() != null && message.getFromEmail().contains("@") )
        {
            sb.append(" [");
            sb.append(message.getFromEmail());
            sb.append("]");
        }

        sb.append("");

        sb.append("
");

        if( message.getDate() != null )
        {
            sb.append(parent.MlM("Date: "));
            sb.append(DateFormat.getDateTimeInstance().format(message.getDate()));
            sb.append("
");
        }

        if( !message.getRecipients().isEmpty() )
        {
            sb.append(parent.MlM("To: "));
            sb.append(message.getRecipients().stream().map(ViewerPanel::asMailto).collect(toList()));
        }

        sb.append("
");

        List<Attachment> attachments = message.getAttachments();

        final int max_width = Integer.parseInt(root.getSetup().getLocalConfig(AppConfigDefinitions.IconSize));
        final int max_height = max_width;

        for( Attachment att : attachments )
        {
            if( att instanceof FileAttachment)
            {
                final FileAttachment fatt = (FileAttachment) att;

                File content = helper.getTempFile(fatt);

                sb.append("");

                String mime_type = fatt.getMimeTag();

                logger.info(" " + mime_type);

                if( mime_type != null && ViewerHelper.is_image_mime_type(mime_type) && fatt.getSize() < 1024*1024*2 )
                {
                    File contentIcon = new File(content.getAbsolutePath() + "-small.jpg");
                    if (!content.exists()) {

                        write(content, fatt.getData());

                        wating_thread_pool_counter++;

                        thread_pool.execute(new Runnable() {

                            @Override
                            public void run() {

                                try {

                                    ImageIcon icon = ImageUtils.loadScaledImageIcon(fatt.getData(),
                                                                fatt.toString(),
                                                                max_width, max_height );

                                    BufferedImage bi = new BufferedImage(icon.getIconWidth(),icon.getIconHeight(),
                                                            BufferedImage.TYPE_INT_RGB);

                                    Graphics2D g2 = bi.createGraphics();
                                    g2.drawImage(icon.getImage(), 0, 0, null);
                                    g2.dispose();

                                    ImageIO.write(bi, "jpg", contentIcon);

                                } catch( IOException ex ) {
                                    logger.error(ex,ex);
                                }

                                wating_thread_pool_counter--;
                            }
                        });
                    }

                    System.out.println(contentIcon);
                    sb.append(" ");
                }

                if( ViewerHelper.is_mail_message(fatt.getFilename(), fatt.getMimeTag() ) ) {
                    if (!content.exists())
                    {
                        write(content, fatt.getData());
                    }

                    sb.append("");
                }

                sb.append(fatt);
                sb.append(" ");

            } else if( att instanceof MsgAttachment) {

                MsgAttachment msgAtt = (MsgAttachment) att;
                final Message msg = msgAtt.getMessage();

                File sub_file = helper.getTempFile(msgAtt);

                thread_pool.execute(new Runnable() {

                    @Override
                    public void run() {

                        new AutoMBox(file_name) {

                            @Override
                            public void do_stuff() throws Exception {

                                MessageParserFactory factory = new MessageParserFactory();
                                factory.saveMessage(msg, sub_file);

                            }
                        };
                    }

                });

                sb.append("");

                sb.append("");

                sb.append(msg.getSubject());

                sb.append("   ");
            } else {
                logger.error("unknown Attachment: " + att + " " + att.getClass().getName() );
            }
        }

        sb.append("");
        header.setContentType("text/html");

        if( wating_thread_pool_counter > 0 )
        {
            updateBody(); // do something different now

            new AutoMBox(file_name) {

                @Override
                public void do_stuff() throws Exception {
                    thread_pool.shutdown();

                    if( wating_thread_pool_counter > 0 ) {
                        thread_pool.awaitTermination(1, TimeUnit.DAYS);
                    }
                }
            };

            header.setText(sb.toString());
            header.setCaretPosition(0);

        } else {

            header.setText(sb.toString());
            header.setCaretPosition(0);

            updateBody();
        }
    }

Replace Anonymous With Lambda net.sourceforge.MSGViewer.ViewerPanel.parse_int.execute.new Runnable with () -> {tryImageIcon icon=ImageUtils.loadScaledImageIcon(fatt.getData(),fatt.toString(),max_width,max_height); in method package parse_int(file_name String) : void from class net.sourceforge.MSGViewer.ViewerPanel


                                @Override
                                public void run() {

                                    try (FileOutputStream fout = new FileOutputStream(content)) {
                                        fout.write(fatt.getData());
                                    } catch( IOException ex ) {
                                        logger.error(ex,ex);
                                    }

                                    wating_thread_pool_counter--;
                                }

                                @Override
                                public void run() {

                                    try {
                                        FileOutputStream fout = new FileOutputStream(content);
                                        fout.write(fatt.getData());
                                        fout.close();

                                    } catch( IOException ex ) {
                                        logger.error(ex,ex);
                                    }

                                    wating_thread_pool_counter--;
                                }

Try With Resources try(FileOutputStream fout=new FileOutputStream(content)) in method public run() : void from class net.sourceforge.MSGViewer.ViewerPanel.parse_int.execute.new Runnable


    private void saveMBoxFile(Message msg, File file) throws Exception
    {
        if( mbox_writer == null ) {
            mbox_writer = new MBoxWriterViaJavaMail();
        }

        try (OutputStream stream = new FileOutputStream(file)) {
            mbox_writer.write(msg, stream);
        } catch( Exception ex ) {
            mbox_writer.close();
            throw ex;
        }
    }

    private void saveMBoxFile(Message msg, File file) throws Exception
    {
        if( mbox_writer == null )
            mbox_writer = new MBoxWriterViaJavaMail();

        try {
            mbox_writer.write(msg, new FileOutputStream(file));
        } catch( Exception ex ) {
            mbox_writer.close();
            throw ex;
        }
    }

Try With Resources try(OutputStream stream=new FileOutputStream(file)) in method private saveMBoxFile(msg Message, file File) : void from class net.sourceforge.MSGViewer.factory.MessageParserFactory


    private void saveEMLFile(Message msg, File file) throws Exception
    {
        if( eml_writer == null ) {
            eml_writer = new EMLWriterViaJavaMail();
        }

        try (OutputStream stream = new FileOutputStream(file)) {
            eml_writer.write(msg, stream);
        } catch( Exception ex ) {
            eml_writer.close();
            throw ex;
        }
    }

    private void saveEMLFile(Message msg, File file) throws Exception
    {
        if( eml_writer == null )
            eml_writer = new EMLWriterViaJavaMail();

        try {
            eml_writer.write(msg, new FileOutputStream(file));
        } catch( Exception ex ) {
            eml_writer.close();
            throw ex;
        }
    }

Try With Resources try(OutputStream stream=new FileOutputStream(file)) in method private saveEMLFile(msg Message, file File) : void from class net.sourceforge.MSGViewer.factory.MessageParserFactory


	private String formatHeader() {
		List<String> header = new ArrayList<>();
		header.add("link_id");
		header.add("length_m");
		header.add("freespeed_ms");

		timeHeaders = new TreeSet<>();
		for (LinkStatsItem link : links) {
			for (Integer i : link.timeDependantSpeed.keySet()) {
				timeHeaders.add(i);
			}
		}

		for (Integer timeHead : timeHeaders) {
			header.add("avgspeed_ms_at_H" + (timeHead / 3600) + "M" + ((timeHead % 3600) / 60));
		}

		return String.join(delimiter, header);
	}

	private String formatHeader() {
		List<String> header = new ArrayList<>();
		header.add("link_id");
		header.add("length_m");
		header.add("freespeed_ms");

		timeHeaders = new TreeSet<Integer>();
		for (LinkStatsItem link : links) {
			for (Integer i : link.timeDependantSpeed.keySet()) {
				timeHeaders.add(i);
			}
		}

		for (Integer timeHead : timeHeaders) {
			header.add("avgspeed_ms_at_H" + (timeHead / 3600) + "M" + ((timeHead % 3600) / 60));
		}

		return String.join(delimiter, header);
	}

Replace Generic With Diamond TreeSet<Integer> with TreeSet<> in method private formatHeader() : String from class net.bhl.matsim.uam.analysis.traffic.CSVLinkStatsWriter


	public static void main(final String[] args) throws IOException {
		File folder = Paths.get(args[0]).toFile();

		String[] ext = {"gz", "xml"};
		Collection<File> potentialFiles = FileUtils.listFiles(folder, ext, true);

		String[] ecl = {"csv"};
		Collection<File> alreadyExistingFiles = FileUtils.listFiles(folder, ecl, true);
		Collection<String> alreadyExistingFileNames = new HashSet<>();
		for (File f : alreadyExistingFiles) {
			alreadyExistingFileNames.add(f.getAbsolutePath());
		}

		for (File f : potentialFiles) {
			if (!f.getName().contains(eventfile) || alreadyExistingFileNames.contains(f.getAbsolutePath() + fileending))
				continue;

			System.err.println("Working on: " + f.getAbsolutePath());
			String network = f.getAbsolutePath().replace(eventfile, networkfile);
			ConvertLinkStatsFromEvents.extract(network, f.getAbsolutePath(), f.getAbsolutePath() + fileending);
		}

		System.err.println("done.");
	}

	public static void main(final String[] args) throws IOException {
		File folder = Paths.get(args[0]).toFile();

		String[] ext = {"gz", "xml"};
		Collection<File> potentialFiles = FileUtils.listFiles(folder, ext, true);

		String[] ecl = {"csv"};
		Collection<File> alreadyExistingFiles = FileUtils.listFiles(folder, ecl, true);
		Collection<String> alreadyExistingFileNames = new HashSet<String>();
		for (File f : alreadyExistingFiles) {
			alreadyExistingFileNames.add(f.getAbsolutePath());
		}

		for (File f : potentialFiles) {
			if (!f.getName().contains(eventfile) || alreadyExistingFileNames.contains(f.getAbsolutePath() + fileending))
				continue;

			System.err.println("Working on: " + f.getAbsolutePath());
			String network = f.getAbsolutePath().replace(eventfile, networkfile);
			ConvertLinkStatsFromEvents.extract(network, f.getAbsolutePath(), f.getAbsolutePath() + fileending);
		}

		System.err.println("done.");
	}

Replace Generic With Diamond HashSet<String> with HashSet<> in method public main(args String[]) : void from class net.bhl.matsim.uam.analysis.traffic.run.BatchConvertLinkStatsFromEvents


	public static void main(final String[] args) throws IOException {
		File folder = Paths.get(args[0]).toFile();

		String[] ext = {"gz", "xml"};
		Collection<File> potentialFiles = FileUtils.listFiles(folder, ext, true);

		String[] ecl = {"csv"};
		Collection<File> alreadyExistingFiles = FileUtils.listFiles(folder, ecl, true);
		Collection<String> alreadyExistingFileNames = new HashSet<>();
		for (File f : alreadyExistingFiles) {
			alreadyExistingFileNames.add(f.getAbsolutePath());
		}

		for (File f : potentialFiles) {
			if (!f.getName().contains(eventfile)
					|| alreadyExistingFileNames.contains(f.getAbsolutePath() + "_transit.csv"))
				continue;

			System.err.println("Working on: " + f.getAbsolutePath());
			String network = f.getAbsolutePath().replace(eventfile, networkfile);
			ConvertTransitTripsFromEvents.extract(network, f.getAbsolutePath(), f.getAbsolutePath() + "_transit.csv");
		}

		System.err.println("done.");
	}

	public static void main(final String[] args) throws IOException {
		File folder = Paths.get(args[0]).toFile();

		String[] ext = {"gz", "xml"};
		Collection<File> potentialFiles = FileUtils.listFiles(folder, ext, true);

		String[] ecl = {"csv"};
		Collection<File> alreadyExistingFiles = FileUtils.listFiles(folder, ecl, true);
		Collection<String> alreadyExistingFileNames = new HashSet<String>();
		for (File f : alreadyExistingFiles) {
			alreadyExistingFileNames.add(f.getAbsolutePath());
		}

		for (File f : potentialFiles) {
			if (!f.getName().contains(eventfile)
					|| alreadyExistingFileNames.contains(f.getAbsolutePath() + "_transit.csv"))
				continue;

			System.err.println("Working on: " + f.getAbsolutePath());
			String network = f.getAbsolutePath().replace(eventfile, networkfile);
			ConvertTransitTripsFromEvents.extract(network, f.getAbsolutePath(), f.getAbsolutePath() + "_transit.csv");
		}

		System.err.println("done.");
	}

Replace Generic With Diamond HashSet<String> with HashSet<> in method public main(args String[]) : void from class net.bhl.matsim.uam.analysis.transit.run.BatchConvertTransitTripsFromEvents


	public String convert(String inputEPSGCode, String outputEPSGCode, long timeMultiplier) {
		Coordinate convertedSource = null;

		CoordinateReferenceSystem crsIn = null;
		CoordinateReferenceSystem crsOut = null;
		try {
			crsIn = MGC.getCRS(inputEPSGCode); // EPSG:code crsOut =
			MGC.getCRS(outputEPSGCode); // EPSG:code
			MathTransform transform = CRS.findMathTransform(crsIn, crsOut);
			Coordinate source = new Coordinate(location.getX(), location.getY());
			convertedSource = JTS.transform(source, null, transform);

		} catch (IllegalArgumentException e) {
			System.err.println("Old geotools version is not compatible with Java 9");
			e.printStackTrace();
			System.exit(1);
		} catch (FactoryException | TransformException e) {
			e.printStackTrace();
		}

        return "[" + convertedSource.x + "," + convertedSource.y + "," + ((time - timeShift) * timeMultiplier) + "]";
	}

	public String convert(String inputEPSGCode, String outputEPSGCode, long timeMultiplier) {
		Coordinate convertedSource = null;

		CoordinateReferenceSystem crsIn = null;
		CoordinateReferenceSystem crsOut = null;
		try {
			crsIn = MGC.getCRS(inputEPSGCode); // EPSG:code crsOut =
			MGC.getCRS(outputEPSGCode); // EPSG:code
			MathTransform transform = CRS.findMathTransform(crsIn, crsOut);
			Coordinate source = new Coordinate(location.getX(), location.getY());
			convertedSource = JTS.transform(source, null, transform);

		} catch (IllegalArgumentException e) {
			System.err.println("Old geotools version is not compatible with Java 9");
			e.printStackTrace();
			System.exit(1);
		} catch (FactoryException e) {
			e.printStackTrace();
		} catch (TransformException e) {
			e.printStackTrace();
		}

		return "[" + convertedSource.x + "," + convertedSource.y + "," + ((time - timeShift) * timeMultiplier) + "]";
	}

Merge Catch [catch(FactoryException e), catch(TransformException e)] to catch(FactoryException|TransformException e) in method public convert(inputEPSGCode String, outputEPSGCode String, timeMultiplier long) : String from class net.bhl.matsim.uam.analysis.trips.DeckGLTripItem


	public DeckGLTripListener(Network network, long minTime, long maxTime) {
		this.deckGLTrips = new HashMap<>();
		this.network = network;
		this.minTime = minTime;
		this.maxTime = maxTime;
	}

	public DeckGLTripListener(Network network, long minTime, long maxTime) {
		this.deckGLTrips = new HashMap<Id<Vehicle>, List<DeckGLTripItem>>();
		this.network = network;
		this.minTime = minTime;
		this.maxTime = maxTime;
	}

Replace Generic With Diamond HashMap<Id<Vehicle>,List<DeckGLTripItem>> with HashMap<> in method public DeckGLTripListener(network Network, minTime long, maxTime long) from class net.bhl.matsim.uam.analysis.trips.listeners.DeckGLTripListener


	public static void main(final String[] args) throws IOException {
		File folder = Paths.get(args[0]).toFile();

		String[] ext = {"gz", "xml"};
		Collection<File> potentialFiles = FileUtils.listFiles(folder, ext, true);

		String[] ecl = {"csv"};
		Collection<File> alreadyExistingFiles = FileUtils.listFiles(folder, ecl, true);
		Collection<String> alreadyExistingFileNames = new HashSet<>();
		for (File f : alreadyExistingFiles) {
			alreadyExistingFileNames.add(f.getAbsolutePath());
		}

		for (File f : potentialFiles) {
			if (!f.getName().contains(eventfile) || alreadyExistingFileNames.contains(f.getAbsolutePath() + ".csv"))
				continue;

			System.err.println("Working on: " + f.getAbsolutePath());
			String network = f.getAbsolutePath().replace(eventfile, networkfile);
			ConvertTripsFromEvents.extract(network, f.getAbsolutePath(), f.getAbsolutePath() + ".csv");
		}

		System.err.println("done.");
	}

	public static void main(final String[] args) throws IOException {
		File folder = Paths.get(args[0]).toFile();

		String[] ext = {"gz", "xml"};
		Collection<File> potentialFiles = FileUtils.listFiles(folder, ext, true);

		String[] ecl = {"csv"};
		Collection<File> alreadyExistingFiles = FileUtils.listFiles(folder, ecl, true);
		Collection<String> alreadyExistingFileNames = new HashSet<String>();
		for (File f : alreadyExistingFiles) {
			alreadyExistingFileNames.add(f.getAbsolutePath());
		}

		for (File f : potentialFiles) {
			if (!f.getName().contains(eventfile) || alreadyExistingFileNames.contains(f.getAbsolutePath() + ".csv"))
				continue;

			System.err.println("Working on: " + f.getAbsolutePath());
			String network = f.getAbsolutePath().replace(eventfile, networkfile);
			ConvertTripsFromEvents.extract(network, f.getAbsolutePath(), f.getAbsolutePath() + ".csv");
		}

		System.err.println("done.");
	}

Replace Generic With Diamond HashSet<String> with HashSet<> in method public main(args String[]) : void from class net.bhl.matsim.uam.analysis.trips.run.BatchConvertTripsFromEvents


	public static void main(final String[] args) throws IOException {
		File folder = Paths.get(args[0]).toFile();

		String[] ext = {"gz", "xml"};
		Collection<File> potentialFiles = FileUtils.listFiles(folder, ext, true);

		String[] ecl = {"csv"};
		Collection<File> alreadyExistingFiles = FileUtils.listFiles(folder, ecl, true);
		Collection<String> alreadyExistingFileNames = new HashSet<>();
		for (File f : alreadyExistingFiles) {
			alreadyExistingFileNames.add(f.getAbsolutePath());
		}

		for (File f : potentialFiles) {
			if (!f.getName().contains(eventfile) || alreadyExistingFileNames.contains(f.getAbsolutePath() + ".csv"))
				continue;

			System.err.println("Working on: " + f.getAbsolutePath());
			String network = f.getAbsolutePath().replace(eventfile, networkfile);
			ConvertTripsFromPopulation.extract(network, f.getAbsolutePath(), f.getAbsolutePath() + ".csv");
		}

		System.err.println("done.");
	}

	public static void main(final String[] args) throws IOException {
		File folder = Paths.get(args[0]).toFile();

		String[] ext = {"gz", "xml"};
		Collection<File> potentialFiles = FileUtils.listFiles(folder, ext, true);

		String[] ecl = {"csv"};
		Collection<File> alreadyExistingFiles = FileUtils.listFiles(folder, ecl, true);
		Collection<String> alreadyExistingFileNames = new HashSet<String>();
		for (File f : alreadyExistingFiles) {
			alreadyExistingFileNames.add(f.getAbsolutePath());
		}

		for (File f : potentialFiles) {
			if (!f.getName().contains(eventfile) || alreadyExistingFileNames.contains(f.getAbsolutePath() + ".csv"))
				continue;

			System.err.println("Working on: " + f.getAbsolutePath());
			String network = f.getAbsolutePath().replace(eventfile, networkfile);
			ConvertTripsFromPopulation.extract(network, f.getAbsolutePath(), f.getAbsolutePath() + ".csv");
		}

		System.err.println("done.");
	}

Replace Generic With Diamond HashSet<String> with HashSet<> in method public main(args String[]) : void from class net.bhl.matsim.uam.analysis.trips.run.BatchConvertTripsFromPopulation


	public CSVUAMDemandWriter(Collection<UAMDemandItem> uamData, String delimiter) {
		this.uamData = new HashSet<>(uamData);
		this.delimiter = delimiter;
	}

	public CSVUAMDemandWriter(Collection<UAMDemandItem> uamData, String delimiter) {
		this.uamData = new HashSet<UAMDemandItem>(uamData);
		this.delimiter = delimiter;
	}

Replace Generic With Diamond HashSet<UAMDemandItem> with HashSet<> in method public CSVUAMDemandWriter(uamData Collection<UAMDemandItem>, delimiter String) from class net.bhl.matsim.uam.analysis.uamdemand.CSVUAMDemandWriter


	public static void main(final String[] args) throws IOException {
		File folder = Paths.get(args[0]).toFile();

		String[] ext = {"gz", "xml"};
		Collection<File> potentialFiles = FileUtils.listFiles(folder, ext, true);

		String[] ecl = {"csv"};
		Collection<File> alreadyExistingFiles = FileUtils.listFiles(folder, ecl, true);
		Collection<String> alreadyExistingFileNames = new HashSet<>();
		for (File f : alreadyExistingFiles) {
			alreadyExistingFileNames.add(f.getAbsolutePath());
		}

		for (File f : potentialFiles) {
			if (!f.getName().contains(vehiclefile)
					|| alreadyExistingFileNames.contains(f.getAbsolutePath() + "_demand.csv"))
				continue;

			System.err.println("Working on: " + f.getAbsolutePath());
			String network = f.getAbsolutePath().replace(vehiclefile, networkfile);
			String events = f.getAbsolutePath().replace(vehiclefile, eventfile);
			ConvertUAMDemandFromEvents.extract(network, events, f.getAbsolutePath(),
					f.getAbsolutePath() + "_demand.csv");
		}

		System.err.println("done.");
	}

	public static void main(final String[] args) throws IOException {
		File folder = Paths.get(args[0]).toFile();

		String[] ext = {"gz", "xml"};
		Collection<File> potentialFiles = FileUtils.listFiles(folder, ext, true);

		String[] ecl = {"csv"};
		Collection<File> alreadyExistingFiles = FileUtils.listFiles(folder, ecl, true);
		Collection<String> alreadyExistingFileNames = new HashSet<String>();
		for (File f : alreadyExistingFiles) {
			alreadyExistingFileNames.add(f.getAbsolutePath());
		}

		for (File f : potentialFiles) {
			if (!f.getName().contains(vehiclefile)
					|| alreadyExistingFileNames.contains(f.getAbsolutePath() + "_demand.csv"))
				continue;

			System.err.println("Working on: " + f.getAbsolutePath());
			String network = f.getAbsolutePath().replace(vehiclefile, networkfile);
			String events = f.getAbsolutePath().replace(vehiclefile, eventfile);
			ConvertUAMDemandFromEvents.extract(network, events, f.getAbsolutePath(),
					f.getAbsolutePath() + "_demand.csv");
		}

		System.err.println("done.");
	}

Replace Generic With Diamond HashSet<String> with HashSet<> in method public main(args String[]) : void from class net.bhl.matsim.uam.analysis.uamdemand.run.BatchConvertUAMDemandFromEvents


	public CSVUAMStationWriter(Collection<UAMStationItem> uamStations, String delimiter) {
		this.uamStations = new HashSet<>(uamStations);
		this.delimiter = delimiter;
	}

	public CSVUAMStationWriter(Collection<UAMStationItem> uamStations, String delimiter) {
		this.uamStations = new HashSet<UAMStationItem>(uamStations);
		this.delimiter = delimiter;
	}

Replace Generic With Diamond HashSet<UAMStationItem> with HashSet<> in method public CSVUAMStationWriter(uamStations Collection<UAMStationItem>, delimiter String) from class net.bhl.matsim.uam.analysis.uamstations.CSVUAMStationWriter


	public static void main(final String[] args) throws IOException {
		File folder = Paths.get(args[0]).toFile();

		String[] ext = {"gz", "xml"};
		Collection<File> potentialFiles = FileUtils.listFiles(folder, ext, true);

		String[] ecl = {"csv"};
		Collection<File> alreadyExistingFiles = FileUtils.listFiles(folder, ecl, true);
		Collection<String> alreadyExistingFileNames = new HashSet<>();
		for (File f : alreadyExistingFiles) {
			alreadyExistingFileNames.add(f.getAbsolutePath());
		}

		for (File f : potentialFiles) {
			if (!f.getName().contains(vehiclefile)
					|| alreadyExistingFileNames.contains(f.getAbsolutePath() + "_stations.csv"))
				continue;

			System.err.println("Working on: " + f.getAbsolutePath());
			String network = f.getAbsolutePath().replace(vehiclefile, networkfile);
			ConvertUAMStationsFromUAMVehicles.extract(network, f.getAbsolutePath(),
					f.getAbsolutePath() + "_stations.csv");
		}

		System.err.println("done.");
	}

	public static void main(final String[] args) throws IOException {
		File folder = Paths.get(args[0]).toFile();

		String[] ext = {"gz", "xml"};
		Collection<File> potentialFiles = FileUtils.listFiles(folder, ext, true);

		String[] ecl = {"csv"};
		Collection<File> alreadyExistingFiles = FileUtils.listFiles(folder, ecl, true);
		Collection<String> alreadyExistingFileNames = new HashSet<String>();
		for (File f : alreadyExistingFiles) {
			alreadyExistingFileNames.add(f.getAbsolutePath());
		}

		for (File f : potentialFiles) {
			if (!f.getName().contains(vehiclefile)
					|| alreadyExistingFileNames.contains(f.getAbsolutePath() + "_stations.csv"))
				continue;

			System.err.println("Working on: " + f.getAbsolutePath());
			String network = f.getAbsolutePath().replace(vehiclefile, networkfile);
			ConvertUAMStationsFromUAMVehicles.extract(network, f.getAbsolutePath(),
					f.getAbsolutePath() + "_stations.csv");
		}

		System.err.println("done.");
	}

Replace Generic With Diamond HashSet<String> with HashSet<> in method public main(args String[]) : void from class net.bhl.matsim.uam.analysis.uamstations.run.BatchConvertUAMStationsFromUAMVehicles


	@Override
	public List<? extends PlanElement> calcRoute(Facility fromFacility, Facility toFacility, double departureTime,
												 Person person) {
		PopulationFactory populationFactory = scenario.getPopulation().getFactory();
		RouteFactories routeFactory = populationFactory.getRouteFactories();
		final List<PlanElement> trip = new ArrayList<>();

		Link originLink = this.carNetwork.getLinks().get(fromFacility.getLinkId());

		Link destinationLink = this.carNetwork.getLinks().get(toFacility.getLinkId());

		Path path = plcpccar.calcLeastCostPath(originLink.getToNode(), destinationLink.getFromNode(), departureTime,
				person, null);

		Route route = routeFactory.createRoute(Route.class, originLink.getId(), destinationLink.getId());

		route.setTravelTime(path.travelCost);
		double distance = 0.0;
		for (Link link : path.links) {
			distance += link.getLength();
		}
		route.setDistance(distance);
		final Leg teleportationleg = populationFactory.createLeg("taxi");
		teleportationleg.setTravelTime(path.travelCost);
		teleportationleg.setRoute(route);
		trip.add(teleportationleg);

		return trip;
	}

	@Override
	public List<? extends PlanElement> calcRoute(Facility fromFacility, Facility toFacility, double departureTime,
												 Person person) {
		PopulationFactory populationFactory = scenario.getPopulation().getFactory();
		RouteFactories routeFactory = populationFactory.getRouteFactories();
		final List<PlanElement> trip = new ArrayList<PlanElement>();

		Link originLink = this.carNetwork.getLinks().get(fromFacility.getLinkId());

		Link destinationLink = this.carNetwork.getLinks().get(toFacility.getLinkId());

		Path path = plcpccar.calcLeastCostPath(originLink.getToNode(), destinationLink.getFromNode(), departureTime,
				person, null);

		Route route = routeFactory.createRoute(Route.class, originLink.getId(), destinationLink.getId());

		route.setTravelTime(path.travelCost);
		double distance = 0.0;
		for (Link link : path.links) {
			distance += link.getLength();
		}
		route.setDistance(distance);
		final Leg teleportationleg = populationFactory.createLeg("taxi");
		teleportationleg.setTravelTime(path.travelCost);
		teleportationleg.setRoute(route);
		trip.add(teleportationleg);

		return trip;
	}

Replace Generic With Diamond ArrayList<PlanElement> with ArrayList<> in method public calcRoute(fromFacility Facility, toFacility Facility, departureTime double, person Person) : List<? extends PlanElement> from class net.bhl.matsim.uam.router.TaxiRoutingModule