Gets the resolved bundle identifier from a project.
Resolves the variable set in INFO.plist, if any (simple case)

@param {*} projectObject
424372
function getBundleIdentifier (projectObject) {
    var packageName = projectObject.getPackageName();
    var bundleIdentifier = packageName;

    var variables = packageName.match(/\$\((\w+)\)/); // match $(VARIABLE), if any
    if (variables && variables.length >= 2) {
        bundleIdentifier = projectObject.xcode.getBuildProperty(variables[1]);
    }

    return bundleIdentifier;
}
62202
function getFileIONameReadLen(bundle) {
		debugCWD('in getFileIONameReadLen');
		var defered = q.defer();
		self.iRead('FILE_IO_NAME_READ_LEN')
		.then(function(res) {
			debugCWD('in getFileIONameReadLen res', res);
			bundle.FILE_IO_NAME_READ_LEN = res.val;
			defered.resolve(bundle);
		}, function(err) {
			debugCWD('in getFileIONameReadLen err', err);
			bundle.isError = true;
			bundle.errorStep = 'getFileIONameReadLen';
			bundle.error = modbusMap.getErrorInfo(err);
			bundle.errorCode = err;
			defered.reject(bundle);
		});
		return defered.promise;
	}
718149
function resolveEntry() {
  const supportEntrySuffixs = ['js', 'jsx', 'ts', 'tsx']

  for (const suffix of supportEntrySuffixs) {
    const path = resolveProjectPath(`src/main.${suffix}`)
    if (fs.existsSync(path)) {
      return path
    }
  }
}
1323117
function Connect(project, env, bundle) {

    var self = this;
    var reserved = [ 'framework' ];
    self.task = 'connect';//important for later in config init
    self.env = env;

    //this.init = this.onInitialize = function (cb) {
    //    if (self.initialized == undefined) {
    //        self.initialized = true;
    //        if (typeof(cb) != 'undefined' && typeof(cb) == 'function') {
    //            cb(init)
    //        } else {
    //            init()
    //        }
    //    }
    //
    //    return self
    //}
    //
    //var init = function() {
    //    if ( reserved.indexOf(bundle) > -1 ) {
    //        console.log('[ '+bundle+' ] is a reserved name. Please, try something else.');
    //        process.exit(1)
    //    }
    //    self.root = getPath('root');
    //
    //    try {
    //        self.project = project;
    //        self.projectData = require(project);
    //
    //        if ( !fs.existsSync(env) ) {
    //            fs.writeFileSync(env, '{}')
    //        }
    //        self.envData = require(env);
    //
    //        self.bundle = bundle;
    //
    //        console.info('removing ', bundle);
    //
    //        // TODO - Prompt if user want to erase related releases if exist
    //        var projectObj = require(self.project);
    //        var linkPath = new _(_(self.root +'/'+ projectObj.bundles[self.bundle].release.link));
    //        if ( fs.existsSync(linkPath.toString()) ) {
    //            linkPath.rm(function onLinkDeleted(err) {
    //                if (err) {
    //                    console.error(err.stack||err.message);
    //                    process.exit(1)
    //                } else {
    //                    deleteBundle()
    //                }
    //            })
    //        } else {
    //            deleteBundle()
    //        }
    //
    //    } catch (err) {
    //        console.error(err.stack);
    //        process.exit(1)
    //    }
    //}
    //
    //var deleteSources = function() {
    //    if (fs.existsSync(_(self.root+'/src/'+self.bundle))) {
    //
    //        var bundlePath = new _(self.root+'/src/'+self.bundle);
    //        bundlePath.rm( function bundleRemoved (err) {
    //            if (err) {
    //                console.log(err.stack);
    //                process.exit(1)
    //            }
    //            console.log('Bundle [ '+bundle+' ] has been removed from your project with success.');
    //            self.emit('delete#complete', err)
    //        })
    //    } else {
    //        console.log('Bundle [ '+bundle+' ] has been removed from your project with success.');
    //        self.emit('delete#complete', err)
    //    }
    //}
    //
    //var deleteBundle = function() {
    //
    //    var config = new Config({
    //        env             : process.env.NODE_ENV,
    //        executionPath   : self.root,
    //        startingApp     : self.bundle,
    //        ginaPath       : GINA_PATH,
    //        task            : self.task
    //    });
    //
    //    config.onReady( function onConfigReady(err, obj) {
    //
    //        self.conf = obj.conf[bundle][process.env.NODE_ENV];
    //
    //        removeFromLogs( function logsRemoved (err) {
    //            if (err) {
    //                console.error(err.stack);
    //                process.exit(1)
    //            }
    //            cleanFile( function logsRemoved (err) {
    //                if (err) {
    //                    console.error(err.stack);
    //                    process.exit(1)
    //                }
    //
    //                if (
    //                    typeof(self.conf['releases'] != undefined)
    //                    && fs.existsSync(_(self.conf.releases +'/'+ bundle))
    //                ) {
    //                    var relPath = new _(self.conf.releases +'/'+ bundle);
    //                    relPath.rm( function bundleRemoved (err) {
    //                        if (err) {
    //                            console.log(err.stack);
    //                            process.exit(1)
    //                        }
    //                        console.log('Bundle release for [ '+bundle+' ] has been removed from your project with success.');
    //                        deleteSources()
    //                    })
    //                } else {
    //                    // deleting soruces
    //                    deleteSources()
    //                }
    //            })
    //        })
    //    })//EO config.onReady
    //}
    //
    //var cleanFile = function(callback) {
    //    try {
    //        if ( typeof(self.envData[self.bundle]) != 'undefined' ) {
    //            delete(self.envData[self.bundle]);
    //            fs.writeFileSync(self.env, JSON.stringify(self.envData, null, 4))
    //        }
    //        if ( typeof(self.projectData.bundles[self.bundle]) != 'undefined' ) {
    //            delete(self.projectData.bundles[self.bundle]);
    //            fs.writeFileSync(self.project, JSON.stringify(self.projectData, null, 4))
    //        }
    //        callback()
    //    } catch (err) {
    //        callback(err)
    //    }
    //}
    //
    //var removeFromLogs = function(callback) {
    //    var logsPath = _(self.root+'/logs/'+self.bundle);
    //
    //    if ( fs.existsSync(logsPath) ) {
    //        logsPath = new _(self.root+'/logs/'+self.bundle);
    //        logsPath.rm( function logsRemoved (err) {
    //            callback(err)
    //        })
    //    } else {
    //        callback()
    //    }
    //}
    //
    //this.onComplete = function(callback) {
    //    self.once('delete#complete', function(err) {
    //        callback(err)
    //    })
    //    return self
    //}
}
921796
function resolveLinkVariablesObject (link, record) {
    // do substitution on href if defined
    if (typeof link.href === 'string') {
        link.href = resolveVariables(link.href, record)
    }
    // do substitution on title if defined
    if (typeof link.title === 'string') {
        link.title = resolveVariables(link.title, record)
    }
}
321240
def getAppRefByBundleId(cls, bundleId):
        
        ra = AppKit.NSRunningApplication
        # return value (apps) is always an array. if there is a match it will
        # have an item, otherwise it won't.
        apps = ra.runningApplicationsWithBundleIdentifier_(bundleId)
        if len(apps) == 0:
            raise ValueError(('Specified bundle ID not found in '
                            'running apps: %s' % bundleId))
        pid = apps[0].processIdentifier()
        return cls.getAppRefByPid(pid)
187134
function createProjectObject (projectPath, projectName) {
    var locations = {
        root: projectPath,
        pbxproj: path.join(projectPath, projectName + '.xcodeproj', 'project.pbxproj')
    };

    return projectFile.parse(locations);
}
998427
function resolvePath(filepath) {
  filepath = filepath.replace(RE_TRAILING, '');
  const cwd = process.cwd();
  const npmPackage = filepath.includes('node_modules');

  // Find nearest node_modules directory
  if (npmPackage) {
    const parts = filepath.split(path.sep);
    let idx = parts.lastIndexOf('node_modules');

    if (idx < parts.length - 1) idx += 2;
    // Handle scoped
    if (parts[idx - 1].charAt(0) == '@') idx++;

    const dir = parts.slice(0, idx).join(path.sep);

    // Installed packages must have manifest, otherwise continue
    if (exists(path.join(dir, 'package.json'))) return dir;
  }

  // Find nearest directory with node_modules subdirectory
  if (filepath.includes(cwd)) {
    let depth = maxFileSystemDepth;
    let dir = filepath;
    let parent = '';

    while (true) {
      parent = path.dirname(dir);
      // Stop if we hit max file system depth or root
      // Convert to lowercase to fix problems on Windows
      if (!--depth || parent.toLowerCase() === dir.toLowerCase()) {
        break;
      }

      // Stop at nearest directory with node_modules or cwd
      if (dir == cwd || exists(path.resolve(dir, 'node_modules'))) return dir;

      // Walk
      dir = parent;
    }
  }

  // Return project directory if file isn't a project file
  return cwd;
}
1240143
public CompilationUnitDeclaration resolve(
            ICompilationUnit sourceUnit,
            boolean verifyMethods,
            boolean analyzeCode,
            boolean generateCode) {

        return resolve(
            null,
            sourceUnit,
            verifyMethods,
            analyzeCode,
            generateCode);
    }
270345
function resolveGlobal(moduleName: string): ?string {
  const modulePath = path.join(getGlobalPath(), moduleName);
  return pathExists(modulePath) ? modulePath : null;
}
678777
function library(argv, config, args) {
  if (!isValidPackageName(args.name)) {
    return Promise.reject(
      args.name + ' is not a valid name for a project. Please use a valid ' +
      'identifier name (alphanumeric).'
    );
  }

  const root = process.cwd();
  const libraries = path.resolve(root, 'Libraries');
  const libraryDest = path.resolve(libraries, args.name);
  const source = path.resolve('node_modules', 'react-native', 'Libraries', 'Sample');

  if (!fs.existsSync(libraries)) {
    fs.mkdir(libraries);
  }

  if (fs.existsSync(libraryDest)) {
    return Promise.reject(`Library already exists in ${libraryDest}`);
  }

  walk(source).forEach(f => {
    if (f.indexOf('project.xcworkspace') !== -1 ||
        f.indexOf('.xcodeproj/xcuserdata') !== -1) {
      return;
    }

    const dest = f.replace(/Sample/g, args.name).replace(/^_/, '.');
    copyAndReplace(
      path.resolve(source, f),
      path.resolve(libraryDest, dest),
      {'Sample': args.name}
    );
  });

  console.log('Created library in', libraryDest);
  console.log('Next Steps:');
  console.log('   Link your library in Xcode:');
  console.log(
    '   https://facebook.github.io/react-native/docs/' +
    'linking-libraries-ios.html#content\n'
  );
}
580543
public String getResolved() {
    if (Coordination_Type.featOkTst && ((Coordination_Type)jcasType).casFeat_resolved == null)
      jcasType.jcas.throwFeatMissing("resolved", "de.julielab.jules.types.Coordination");
    return jcasType.ll_cas.ll_getStringValue(addr, ((Coordination_Type)jcasType).casFeatCode_resolved);}
721126
function getOldProjectName(projectDir) {
  var files = [];
  try {
    files = fs.readdirSync(projectDir);
  } catch (err) {
    return '';
  }

  var projectFile = '';
  files.forEach(function(fileName) {
    if (path.extname(fileName) === '.xcodeproj') {
      projectFile = path.basename(fileName, '.xcodeproj');
    }
  });

  return projectFile;
}
1357174
function getProjectName() {
  if (projectName === undefined) {
    var configXmlHelper = new ConfigXmlHelper(context);
    projectName = configXmlHelper.getProjectName();
  }

  return projectName;
}
772374
function deleteProjectWithId(projectId) {
	return fetchProject(projectId)
	.then(deleteProject)
	.catch((error) => {
		console.trace(error);
		throw error;
	});
}
1345976
function resolve(val, i, isPath) {
			val = val.replace('~', '');
			return Promise.resolve(System.normalize(val))
					.then(function(normalized) {
						return System.locate({name: normalized, metadata: {}});
					})
					.then(function(address) {
						if (isPath) {
							options.includePaths.push(
									path.resolve(address.replace('file:', '').replace('.js', ''))
							);
						} else {
							var originalRelativePath      = path.relative(
									path.dirname(file.path),
									path.resolve(address.replace('file:', '').replace('.js', ''))
							);
							var originalRelativePathArray = originalRelativePath.split(path.sep);

							replacements[i] = path.posix?
									path.posix.join.apply(this, originalRelativePathArray):
									path.normalize(originalRelativePath).replace(/\\/g, '/').replace('//', '/');
						}
					});
		}
782233
function resolveDependencies(binds, obj) {
                var slotset = context[context.length - 1];
                for (var _key3 in injections) {
                    if (binds && injections[_key3] in binds) {
                        obj[_key3] = binds[injections[_key3]];
                        continue;
                    }

                    var slot = slotset[injections[_key3]];
                    var policy = slot.getViable(_key3, tags[_key3], multiple[_key3]);
                    if (!multiple[_key3]) obj[_key3] = policy([]);else {
                        var out = obj[_key3] = [];
                        for (var _i2 = 0; _i2 < policy.length; ++_i2) {
                            out[_i2] = policy[_i2]([]);
                        }
                    }
                }
            }