#vulnerable code 
                             @Override
	public void stop() {
		while (buffer.size() > 0) {
			buffer.poll().recycle();
		}
		super.stop();
	} 
                            #location 4 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Override
	public void stop() {
		while (buffer.size() > 0) {
			Frame frame = buffer.poll();
			if(frame != null) {
			    frame.recycle();
			}
		}
		super.stop();
	}