Dollar symbol

An Anonymous source sends us some Java code they found in source control, with really special variable naming conventions. I can only assume this came from a plucky startup hoping to attract venture capital.


import java.util.*;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

public class Array implements ActionListener, MouseMotionListener, MouseListener  {
        int $$_, _$$, $$$,$_$;
        JFrame $$$__$$$ = new JFrame();
        boolean draw = true;
        JButton $$1 = new JButton("Line"), $$2 = new JButton("Rectangle"), $$3 = new JButton("Clear");
        ArrayList $$$$$$$$$$ = new ArrayList<>();

        JPanel aa$$aa = new JPanel(), _$$_$_ = new JPanel(), $0$0$ = new JPanel() {
                @Override
                public void paintComponent(Graphics g) {
                        super.paintComponent(g);

                        for (Shape i : $$$$$$$$$$)
                        {
                                if (i.$s$ == true) {
                                        g.setColor(Color.green);
                                        g.drawLine(i.$$_,i._$$,i.$$$,i.$_$);
                                }
                                else {
                                        g.setColor(Color.red);
                                        g.fillPolygon(new int[] {i.$$_,i.$$_,i.$$$,i.$$$}, new int[] {i._$$,i.$_$,i.$_$,i._$$}, 4);
                                }
                        }
                        if (draw) {
                                g.setColor(Color.green);
                                g.drawLine($$_,_$$,$$$,$_$);
                        }
                        else {
                                g.setColor(Color.red);
                                g.fillPolygon(new int[] {$$_,$$_,$$$,$$$}, new int[] {_$$,$_$,$_$,_$$}, 4);
                        }
                }
        };

        public Array () {
                aa$$aa.setLayout(new BoxLayout(aa$$aa, BoxLayout.Y_AXIS));

                _$$_$_.add($$1);
                $$1.addActionListener(this);
                _$$_$_.add($$2);
                $$2.addActionListener(this);
                _$$_$_.add($$3);
                $$3.addActionListener(this);
                

                $0$0$.setPreferredSize(new Dimension(200, 200));
                aa$$aa.add($0$0$);
                $0$0$.addMouseListener(this);
                $0$0$.addMouseMotionListener(this);
                aa$$aa.add(_$$_$_);

                $$$__$$$.add(aa$$aa);
                $$$__$$$.setSize(new Dimension(400, 400));
                $$$__$$$.setVisible(true);
                $$$__$$$.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        }


        public static void main(String[] args) {
                new Array();
        }

        public void actionPerformed(ActionEvent e) {
                if (e.getSource() == $$1) {
                        draw = true;
                } else if (e.getSource() == $$2) {
                        draw = false;
                } else if (e.getSource() == $$3) {
                        $$$$$$$$$$.clear();
                }
                $$_ = 0; 
                _$$ = 0; 
                $$$ = 0; 
                $_$ = 0;
                $$$__$$$.repaint();
        }

        public void mousePressed(MouseEvent e) {
                $$_ = e.getX();
                _$$ = e.getY();
                $0$0$.repaint();
    }

    public void mouseReleased(MouseEvent e) {
         $$$ = e.getX();
         $_$ = e.getY();
         $$$$$$$$$$.add(new Shape($$_,_$$,$$$,$_$, draw));
         $$_=0;
         _$$=0;
         $_$=0;
         $_$=0;
         $$$__$$$.repaint();
    }

    public void mouseEntered(MouseEvent e) {
         $$$__$$$.repaint();
    }

    public void mouseExited(MouseEvent e) {
         $$$__$$$.repaint();
    }

    public void mouseClicked(MouseEvent e) {
         $$$__$$$.repaint();
    }

    public void mouseMoved(MouseEvent e) {
         $$$__$$$.repaint();
    }

    public void mouseDragged(MouseEvent e) {
         $$$ = e.getX();
         $_$ = e.getY();
         $$$__$$$.repaint();
    }

    class Shape {
         int $$_,_$$,$$$,$_$;
         boolean $s$;
         Shape(int xx, int yy, int x$, int y$, boolean tp) {
                 $$_ = xx;
                 _$$ = yy;
                 $$$ = x$;
                 $_$ = y$;
                 $s$ = tp;
         }

         public String toString() {
                 return ""+$$_+" "+_$$+" "+$$$+" "+$_$;
         }
    }
}

[Advertisement] Infrastructure as Code built from the start with first-class Windows functionality and an intuitive, visual user interface. Download Otter today!