#vulnerable code 
                             @Override
	public void paintComponent(Graphics g) {
		Graphics2D g2d = (Graphics2D) g;
		if (getWidth() > 0 && getHeight() > 0) {
			if (_match != null) {
				zoomToMatch();
				paintSubScreen(g2d);
				paintMatch(g2d);
			} else {
				paintPatternOnly(g2d);
			}
			paintRulers(g2d);
			paintTarget(g2d);
			synchronized (this) {
				if (_finding) {
					paintLoading(g2d);
				}
			}
		}
	} 
                            #location 12 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                             @Override
	public void paintComponent(Graphics g) {
		Graphics2D g2d = (Graphics2D) g;
		if (getWidth() > 0 && getHeight() > 0) {
			if (_match != null) {
				zoomToMatch();
				paintSubScreen(g2d);
				paintMatch(g2d);
			} else {
				paintPatternOnly(g2d);
			}
//			paintRulers(g2d);
			paintTarget(g2d);
			synchronized (this) {
				if (_finding) {
					paintLoading(g2d);
				}
			}
		}
	}