Return a global application index (not associated with a specific {@link ProjectModel}).
422139
public ApplicationReportIndexModel getOrCreateGlobalApplicationIndex()
    {
        GraphTraversal<Vertex, Vertex> pipeline = getGraphContext().getGraph().traversal().V();
        pipeline.has(WindupVertexFrame.TYPE_PROP, ApplicationReportModel.TYPE);
        pipeline.filter(it -> !it.get().edges(Direction.OUT, ApplicationReportIndexModel.APPLICATION_REPORT_INDEX_TO_PROJECT_MODEL).hasNext());

        final ApplicationReportIndexModel result = pipeline.hasNext() ? frame(pipeline.next()) : create();
        return result;
    }
328785
def _get_target_index(self):
        """"""
        return (self.index + self.source_window * (not self.overlapping) +
                self.offset)
1192410
public String getAppServerDefaultDeploymentDir() throws Exception {
        final String[] addressArr = { SUBSYSTEM, DEPLOYMENT_SCANNER, SCANNER, "default" };
        final Address address = Address.root().add(addressArr);
        final ModelNode resourceAttributes = readResource(address);

        if (resourceAttributes == null) {
            return null; // there is no default scanner
        }

        final String path = resourceAttributes.get("path").asString();
        String relativeTo = null;
        if (resourceAttributes.hasDefined("relative-to")) {
            relativeTo = resourceAttributes.get("relative-to").asString();
        }

        // path = the actual filesystem path to be scanned. Treated as an absolute path,
        //        unless 'relative-to' is specified, in which case value is treated as relative to that path.
        // relative-to = Reference to a filesystem path defined in the "paths" section of the server
        //               configuration, or one of the system properties specified on startup.
        //               NOTE: here we will assume that if specified, it is a system property name.

        if (relativeTo != null) {
            String syspropValue = System.getProperty(relativeTo);
            if (syspropValue == null) {
                throw new IllegalStateException("Cannot support relative-to that isn't a sysprop: " + relativeTo);
            }
            relativeTo = syspropValue;
        }

        final File dir = new File(relativeTo, path);
        return dir.getAbsolutePath();
    }
805166
public View getView(String id, int index){
		View viewToReturn = null;
		Context targetContext = instrumentation.getTargetContext(); 
		String packageName = targetContext.getPackageName(); 
		int viewId = targetContext.getResources().getIdentifier(id, "id", packageName);

		if(viewId != 0){
			viewToReturn = getView(viewId, index, TIMEOUT); 
		}
		
		if(viewToReturn == null){
			int androidViewId = targetContext.getResources().getIdentifier(id, "id", "android");
			if(androidViewId != 0){
				viewToReturn = getView(androidViewId, index, TIMEOUT);
			}
		}

		if(viewToReturn != null){
			return viewToReturn;
		}
		return getView(viewId, index); 
	}
775439
def _get_view_index(self, view):
        """"""
        name = view.__class__.__name__
        return len(self.list_views(name))
706011
public Collection<GlobalSecondaryIndex> globalSecondaryIndexes() {
        if (globalSecondaryIndexes.isEmpty()) {
            return null;
        }
        final Collection<GlobalSecondaryIndex> copies = new ArrayList<GlobalSecondaryIndex>(globalSecondaryIndexes.size());
        for (final String indexName : globalSecondaryIndexes.keySet()) {
            copies.add(globalSecondaryIndex(indexName));
        }
        return copies;
    }
1043316
@Override
    public Map<String, Object> getApplicationMap()
    {
        if (_applicationMap == null)
        {
            _applicationMap = new ApplicationMap(_servletContext);
        }
        return _applicationMap;
    }
1272804
public com.google.appengine.v1.Version getVersions(int index) {
    return versions_.get(index);
  }
794972
protected static IJavaProject[] getProjectSearchOrder(String projectName) {

		ArrayList<String> projectNames= new ArrayList<>();
		projectNames.add(projectName);

		int nextProject= 0;
		while (nextProject < projectNames.size()) {
			String nextProjectName= projectNames.get(nextProject);
			IJavaProject jproject= getJavaProject(nextProjectName);

			if (jproject != null) {
				try {
					String[] childProjectNames= jproject.getRequiredProjectNames();
					for (int i= 0; i < childProjectNames.length; i++) {
						if (!projectNames.contains(childProjectNames[i])) {
							projectNames.add(childProjectNames[i]);
						}
					}
				} catch (JavaModelException e) {
					JavaPlugin.log(e);
				}
			}
			nextProject+= 1;
		}

		ArrayList<IJavaProject> result= new ArrayList<>();
		for (int i= 0, size= projectNames.size(); i < size; i++) {
			String name= projectNames.get(i);
			IJavaProject project= getJavaProject(name);
			if (project != null)
				result.add(project);
		}

		return result.toArray(new IJavaProject[result.size()]);
	}
20893
protected CmsProject getOfflineIndexProject() {

        CmsProject result = null;
        for (I_CmsSearchIndex index : m_offlineIndexes) {
            try {
                result = m_adminCms.readProject(index.getProject());

                if (!result.isOnlineProject()) {
                    break;
                }
            } catch (Exception e) {
                // may be a missconfigured index, ignore
                LOG.error(e.getLocalizedMessage(), e);
            }
        }
        return result;
    }
1308409
public com.google.appengine.v1.Library getLibraries(int index) {
    return libraries_.get(index);
  }
394025
WComponent getChildAt(final int index) {
		ComponentModel model = getComponentModel();
		return model.getChildren().get(index);
	}
1162184
public com.google.appengine.v1.InboundServiceType getInboundServices(int index) {
    return inboundServices_converter_.convert(inboundServices_.get(index));
  }
111560
public com.google.appengine.v1.ServiceOrBuilder getServicesOrBuilder(
      int index) {
    return services_.get(index);
  }
191925
public com.google.iam.v1.BindingDeltaOrBuilder getBindingDeltasOrBuilder(
      int index) {
    return bindingDeltas_.get(index);
  }
731730
public Context getGlobal()
	{
		Context op = this;

		while (op.outer != null)
		{
			op = op.outer;
		}

		return op;
	}
1072642
function getGlobalThis() {
    return t.callExpression(
      t.sequenceExpression([t.valueToNode(0), t.identifier("eval")]),
      [t.valueToNode("this")]
    );
  }