#vulnerable code 
                                private JPanel getFormattedMessagePanel(String message){
        JPanel labelsPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
        labelsPanel.setBackground(AppThemeColor.TRANSPARENT);

        String itemName = StringUtils.substringBetween(message, "to buy your ", " listed for");
        if(itemName == null){
            itemName = StringUtils.substringBetween(message, "to buy your ", " for my");
        }
        itemLabel = new ExLabel(itemName);
        itemLabel.setForeground(AppThemeColor.TEXT_IMPORTANT);
        labelsPanel.add(itemLabel);

        ExLabel secondPart = new ExLabel("listed for ");
        secondPart.setForeground(AppThemeColor.TEXT_MESSAGE);
        labelsPanel.add(secondPart);

        String price = StringUtils.substringBetween(message, "listed for ", " in ");
        if(price == null){
            price = StringUtils.substringBetween(message, "for my ", " in ");
        }
        String[] split = price.split(" ");
        ExLabel currencyLabel = null;
        BufferedImage buttonIcon = null;
        try {
            switch (split[1]) {
                case "chaos": {
                    buttonIcon = ImageIO.read(getClass().getClassLoader().getResource("Chaos_Orb.png"));
                    BufferedImage icon = Scalr.resize(buttonIcon, 20);
                    currencyLabel = new ExLabel(new ImageIcon(icon));
                    break;
                }
                case "exalted": {
                    buttonIcon = ImageIO.read(getClass().getClassLoader().getResource("Exalted_Orb.png"));
                    BufferedImage icon = Scalr.resize(buttonIcon, 20);
                    currencyLabel = new ExLabel(new ImageIcon(icon));
                    break;
                }
                default:
                    currencyLabel = new ExLabel(split[1]);
                    currencyLabel.setForeground(AppThemeColor.TEXT_MESSAGE);
                    break;
            }
        } catch (IOException e) {
            e.printStackTrace();
        }

        ExLabel priceLabel = new ExLabel(split[0]);
        priceLabel.setForeground(AppThemeColor.TEXT_MESSAGE);
        labelsPanel.add(priceLabel);
        labelsPanel.add(currencyLabel);

        String offer = StringUtils.substringAfterLast(message, "in Breach"); //todo
        String tabName = StringUtils.substringBetween(message, "(stash tab ", "; position:");
        if(tabName !=null ){
            offer = StringUtils.substringAfter(message, ")");
        }
        ExLabel offerLabel = new ExLabel(offer);
        offerLabel.setForeground(AppThemeColor.TEXT_MESSAGE);
        labelsPanel.add(offerLabel);

        return labelsPanel;
    } 
                            #location 21 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                private JPanel getFormattedMessagePanel(String message){
        JPanel labelsPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
        labelsPanel.setBackground(AppThemeColor.TRANSPARENT);

        String itemName = StringUtils.substringBetween(message, "to buy your ", " listed for");
        if(itemName == null){
            itemName = StringUtils.substringBetween(message, "to buy your ", " for my");
        }
        itemLabel = new ExLabel(itemName);
        itemLabel.setForeground(AppThemeColor.TEXT_IMPORTANT);
        labelsPanel.add(itemLabel);

        ExLabel secondPart = new ExLabel("listed for ");
        secondPart.setForeground(AppThemeColor.TEXT_MESSAGE);
        labelsPanel.add(secondPart);

        String price = StringUtils.substringBetween(message, "listed for ", " in ");
        if(price == null){
            price = StringUtils.substringBetween(message, "for my ", " in ");
        }
        if(price != null) {
            String[] split = price.split(" ");
            ExLabel currencyLabel = null;
            BufferedImage buttonIcon = null;
            try {
                switch (split[1]) {
                    case "chaos": {
                        buttonIcon = ImageIO.read(getClass().getClassLoader().getResource("Chaos_Orb.png"));
                        BufferedImage icon = Scalr.resize(buttonIcon, 20);
                        currencyLabel = new ExLabel(new ImageIcon(icon));
                        break;
                    }
                    case "exalted": {
                        buttonIcon = ImageIO.read(getClass().getClassLoader().getResource("Exalted_Orb.png"));
                        BufferedImage icon = Scalr.resize(buttonIcon, 20);
                        currencyLabel = new ExLabel(new ImageIcon(icon));
                        break;
                    }
                    case "fusing": {
                        buttonIcon = ImageIO.read(getClass().getClassLoader().getResource("Orb_of_Fusing.png"));
                        BufferedImage icon = Scalr.resize(buttonIcon, 20);
                        currencyLabel = new ExLabel(new ImageIcon(icon));
                        break;
                    }
                    case "vaal": {
                        buttonIcon = ImageIO.read(getClass().getClassLoader().getResource("Vaal_Orb.png"));
                        BufferedImage icon = Scalr.resize(buttonIcon, 20);
                        currencyLabel = new ExLabel(new ImageIcon(icon));
                        break;
                    }
                    default:
                        currencyLabel = new ExLabel(split[1]);
                        currencyLabel.setForeground(AppThemeColor.TEXT_MESSAGE);
                        break;
                }
            } catch (IOException e) {
                e.printStackTrace();
            }


            ExLabel priceLabel = new ExLabel(split[0]);
            priceLabel.setForeground(AppThemeColor.TEXT_MESSAGE);
            labelsPanel.add(priceLabel);
            labelsPanel.add(currencyLabel);
        }

        String offer = StringUtils.substringAfterLast(message, "in Breach"); //todo
        String tabName = StringUtils.substringBetween(message, "(stash tab ", "; position:");
        if(tabName !=null ){
            offer = StringUtils.substringAfter(message, ")");
        }
        ExLabel offerLabel = new ExLabel(offer);
        offerLabel.setForeground(AppThemeColor.TEXT_MESSAGE);
        labelsPanel.add(offerLabel);
        if(offer.length() > 1){
            Dimension rectSize = new Dimension();
            rectSize.setSize(350, 130);
            this.setMaximumSize(rectSize);
            this.setMinimumSize(rectSize);
            this.setPreferredSize(rectSize);
        }

        return labelsPanel;
    }