Retrieve offset introduce by the navigation bar.

@return bottom offset due to navigation bar.
774697
private int getNavigationBarOffset() {
        int result = 0;
        Resources resources = mHoldingActivity.getResources();
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            int resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android");
            if (resourceId > 0) {
                result = resources.getDimensionPixelSize(resourceId);
            }
        }
        return result;
    }
1041391
private int getOffsetY(int rowStartOffset, FontMetrics fontMetrics)
    throws BadLocationException {
    // Get the bounding rectangle of the row

    Rectangle r = component.modelToView(rowStartOffset);
    int lineHeight = fontMetrics.getHeight();
    int y = r.y + r.height;
    int descent = 0;

    // The text needs to be positioned above the bottom of the bounding
    // rectangle based on the descent of the font(s) contained on the row.

    if (r.height == lineHeight) // default font is being used
    {
      descent = fontMetrics.getDescent();
    } else // We need to check all the attributes for font changes
    {
      if (fonts == null)
        fonts = new HashMap<>();

      Element root = component.getDocument().getDefaultRootElement();
      int index = root.getElementIndex(rowStartOffset);
      Element line = root.getElement(index);

      for (int i = 0; i < line.getElementCount(); i++) {
        Element child = line.getElement(i);
        AttributeSet as = child.getAttributes();
        String fontFamily = (String) as.getAttribute(StyleConstants.FontFamily);
        Integer fontSize = (Integer) as.getAttribute(StyleConstants.FontSize);
        String key = fontFamily + fontSize;

        FontMetrics fm = fonts.get(key);

        if (fm == null) {
          Font font = new Font(fontFamily, Font.PLAIN, fontSize);
          fm = component.getFontMetrics(font);
          fonts.put(key, fm);
        }

        descent = Math.max(descent, fm.getDescent());
      }
    }

    return y - descent;
  }
468394
public function getOffset()
    {
        $this->assertSeekable();
        $ret = ftell($this->stream);
        if (false === $ret) {
            throw new RuntimeException('Cannot get offset of stream');
        }
        
        return $ret;
    }
449115
synchronized PageWrapper getRootPage() {
        return this.pageByOffset.values().stream()
                                .filter(page -> page.getParent() == null)
                                .findFirst().orElse(null);
    }
716706
private PositionInfo getPositionInfo(List<CmsJspNavElement> navigation, int index) {

        if ((index < 0) || (index >= navigation.size())) {
            return new PositionInfo(false, -1);
        }
        float navPos = navigation.get(index).getNavPosition();
        return new PositionInfo(true, navPos);
    }
997783
public function getOffset(){
		if(!empty($this->offset)){
			return $this->offset;
			}
		if($this->type==PTYPE_GET){
			$this->offset=$this->getPage()*$this->getLimit();	
			}
		return $this->offset;
		}
71855
private static int getPreviousPageOffset(final int offset, final int limit) {
        return hasFullPreviousPage(offset, limit) ? getPreviousFullPageOffset(offset, limit) : getFirstPageOffset();
    }
1136358
@Override
    public Long getTrackingPoint() {
        if (underlyingDataBuffer() != this)
            return underlyingDataBuffer() == null ? trackingPoint : underlyingDataBuffer().getTrackingPoint();
        return trackingPoint;
    }
1129976
public int getSize() {
        int ret = 0;
        MethodState state = firstPointer;
        while (state != null) {
            ret++;
            state = state.getNext();
        }
        return ret;
    }
153628
def get_offset
      platform = ChromedriverScreenshot::Platforms.platform
      offset_x = @x - platform.window_x
      offset_y = @y - platform.window_y
      [offset_x, offset_y]
    end
864210
public int getInsertOffset(XtendTypeDeclaration container) {
		if (container.getMembers().isEmpty()) {
			final ICompositeNode node = NodeModelUtils.findActualNodeFor(container);
			final ILeafNode openingBraceNode = IterableExtensions.findFirst(node.getLeafNodes(),
					lnode -> "{".equals(lnode.getText())); //$NON-NLS-1$
			if (openingBraceNode != null) {
				return openingBraceNode.getOffset() + 1;
			}
			return node.getEndOffset();
		}
		final EObject lastFeature = IterableExtensions.last(container.getMembers());
		final ICompositeNode node = NodeModelUtils.findActualNodeFor(lastFeature);
		return node.getEndOffset();
	}
896640
public static int findVerticalOffset(JRDesignBand band) {
		int finalHeight = 0;
		if (band != null) {
			for (JRChild jrChild : band.getChildren()) {
				JRDesignElement element = (JRDesignElement) jrChild;
				int currentHeight = element.getY() + element.getHeight();
				if (currentHeight > finalHeight) finalHeight = currentHeight;
			}
			return finalHeight;
		}
		return finalHeight;
	}
670080
private double getStartAngle() {
        ScaleDirection scaleDirection = gauge.getScaleDirection();
        Pos            knobPosition   = gauge.getKnobPosition();
        switch(knobPosition) {
            case BOTTOM_LEFT : return ScaleDirection.CLOCKWISE == scaleDirection ? 180 : 90;
            case TOP_LEFT    : return ScaleDirection.CLOCKWISE == scaleDirection ?  90 : 0;
            case TOP_RIGHT   : return ScaleDirection.CLOCKWISE == scaleDirection ?   0 : 270;
            case BOTTOM_RIGHT:
            default          : return ScaleDirection.CLOCKWISE == scaleDirection ? 270 : 180;
        }
    }
515126
public Integer getEnd() {
    if (mtasPositionType.equals(POSITION_RANGE)
        || mtasPositionType.equals(POSITION_SET)) {
      return mtasPositionEnd;
    } else if (mtasPositionType.equals(POSITION_SINGLE)) {
      return mtasPositionStart;
    } else {
      return null;
    }
  }
1308250
public Footer getFooter() {
        List<Footer> list = this.getDescendants(Footer.class);
        if (list.size() > 0) {
            return list.get(0);
        } else {
            return null;
        }
    }
668332
private void obtainNavigationBackground() {
        try {
            setNavigationBackgroundColor(ThemeUtil.getColor(this, R.attr.navigationBackground));
        } catch (NotFoundException e) {
            int resourceId = ThemeUtil.getResId(this, R.attr.navigationBackground, -1);

            if (resourceId != -1) {
                setNavigationBackground(resourceId);
            } else {
                setNavigationBackground(null);
            }
        }
    }
1227474
protected int getDepth() {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getDepth");

    int depth;

    synchronized (barrier) {
       depth = queue.size();
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getDepth", depth);
    return depth;
  }