Parse packages.config or csproj file

@param getDependenciesFromReferenceTag - flag to indicate weather to get dependencies form reference tag or not
@return Set of DependencyInfos
346409
public Set<DependencyInfo> parsePackagesConfigFile(boolean getDependenciesFromReferenceTag, String nugetDependencyFile) {
        Persister persister = new Persister();
        Set<DependencyInfo> dependencies = new HashSet<>();
        try {
            // case of packages.config file
            if (this.nugetConfigFileType == NugetConfigFileType.CONFIG_FILE_TYPE) {
                NugetPackages packages = persister.read(NugetPackages.class, xml);
                if (!getDependenciesFromReferenceTag) {
                    dependencies.addAll(collectDependenciesFromNugetConfig(packages, nugetDependencyFile));
                }
                // case of csproj file
            } else {
                NugetCsprojPackages csprojPackages = persister.read(NugetCsprojPackages.class, xml);
                NugetPackages packages = getNugetPackagesFromCsproj(csprojPackages);
                if (!getDependenciesFromReferenceTag) {
                    dependencies.addAll(collectDependenciesFromNugetConfig(packages, nugetDependencyFile));
                }
                dependencies.addAll(getDependenciesFromReferencesTag(csprojPackages));
            }
            dependencies.stream().forEach(dependencyInfo -> dependencyInfo.setSystemPath(this.xml.getPath()));
        } catch (Exception e) {
            logger.warn("Unable to parse suspected Nuget package configuration file {}", xml, e.getMessage());
        }
        return dependencies;
    }
1184016
public static String getESIDependencies(Enumeration e1, Enumeration e2) {
      if ((e1 == null || !e1.hasMoreElements()))
         if ((e2 == null || !e2.hasMoreElements()))
            return null;
      StringBuffer sb = new StringBuffer("dependencies=\"");
      if (e1 != null)
         while (e1.hasMoreElements()) {
            sb.append(" ");
            sb.append((String) e1.nextElement());
         }
      if (e2 != null)
         while (e2.hasMoreElements()) {
            sb.append(" ");
            sb.append((String) e2.nextElement());
         }
      //don't append a trailing double quote, since we have to add the cache id later
      return sb.toString();
   }
1192872
public String prettyDependencies() {
        StringBuilder b = new StringBuilder();
        b.append(id()).append('\n');
        for (Iterator<Script> ite = dependencies.iterator(); ite.hasNext(); ) {
            Script n = ite.next();
            prettyDependencies(b, !ite.hasNext(), 0, n);
        }
        return b.toString();
    }
639894
public List<TypedDependency> typedDependenciesCollapsed(boolean includeExtras) {
    List<TypedDependency> tdl = typedDependencies(includeExtras);
    collapseDependencies(tdl, false);
    return tdl;
  }
293266
private <T> List<Object> getDependents(T extension) {
    return new ArrayList<>(evaluateAnnotatedClasses(extension, DependedUpon.class));
  }
568975
public List<DependencyStructure> getAllDependencies() {
    List<DependencyStructure> deps = Lists.newArrayList();
    if (!isTerminal()) {
      deps.addAll(left.getAllDependencies());
      deps.addAll(right.getAllDependencies());
    }
    deps.addAll(dependencies);
    return deps;
  }
642328
def dependencies( scopes = nil)
      if scopes
        unless scopes.is_a? Array
           scopes = [scopes]
        end
      end
          
      if Naether.platform == 'java'
        if scopes.nil?
          deps = @project.getDependenciesNotation()
        else
          deps = @project.getDependenciesNotation( scopes )
        end
        
      elsif scopes
        list = Naether::Java.convert_to_java_list( scopes )

        deps = @project._invoke('getDependenciesNotation', 'Ljava.util.List;', list)
      else
        deps = @project.getDependenciesNotation()
      end

      
      Naether::Java.convert_to_ruby_array( deps, true )
    end
1357282
@Override
    public Collection<DependencyInfo> parse(File file) {
        BufferedReader br = null;
        FileReader fr = null;
        Collection<DependencyInfo> dependencyInfos = new LinkedList<>();
        try {
            fr = new FileReader(file.getAbsoluteFile());
            br = new BufferedReader(fr);
            String line = null;
            Package packageInfo = new Package();
            // Create Alpine package - package-version-architecture.apk
            while ((line = br.readLine()) != null) {
                if (!line.isEmpty()) {
                    if (packageInfo.getPackageName() == null || packageInfo.getVersion() == null || packageInfo.getArchitecture() == null) {
                        String[] lineSplit = line.split(Constants.COLON);
                        String dependencyParameter = lineSplit[1].trim();
                        switch (lineSplit[0]) {
                            case PACKAGE:
                                packageInfo.setPackageName(dependencyParameter);
                                break;
                            case VERSION:
                                packageInfo.setVersion(dependencyParameter);
                                break;
                            case ARCHITECTURE:
                                packageInfo.setArchitecture(dependencyParameter);
                                break;
                            default:
                                break;
                        }
                    }
                } else {
                    DependencyInfo dependencyInfo = createDependencyInfo(packageInfo);
                    packageInfo = new Package();
                    dependencyInfos.add(dependencyInfo);
                }
            }
        } catch (Exception e) {
            logger.error(e.getMessage());
            logger.debug("{}", e.getStackTrace());
        } finally {
            closeStream(br, fr);
        }
        return dependencyInfos;
    }
235631
public Set<ClassModel> getAllClassDependencies() {
		HashSet<ClassModel> result = new HashSet<>();

		for (ModuleModel module : allModuleDependencies) {
			for (ClassModel clazz : module.classes) {
				ClassModel.getAllClassDependencies(result, clazz);
			}
		}

		return result;
	}
903515
private static Set<DependencyDescriptor> getDependenciesTransitively(String scope, ResolvedDependency parent) {
        Stack<ResolvedDependency> stack = new Stack<>();
        stack.push(parent);
        Set<DependencyDescriptor> dependencies = new HashSet<>();
        while (!stack.empty()) {
            ResolvedDependency rd = stack.pop();
            // Skip the parent's artifacts.
            if (rd != parent) {
                rd.getModuleArtifacts().forEach(a -> dependencies.add(asDescriptor(scope, a)));
            }
            rd.getChildren().forEach(d -> {
                if (!stack.contains(d)) {
                    stack.add(d);
                }
            });
        }
        return dependencies;
    }
163949
public Set<SourceFile> getDependencies() {

		Set<SourceFile> sourceFiles = new TreeSet<SourceFile>();

		// Include all of the standard dependencies.
		for (Template t : dependencies.values()) {
			sourceFiles.add(t.sourceFile);
		}

		// Add the files that were looked-up but not found as well as the files
		// included via the file_contents() function.
		sourceFiles.addAll(otherDependencies);

		return Collections.unmodifiableSet(sourceFiles);
	}
690306
function fetchUnmetDependencies() {
        var runAgain = false;
        for (var id in dependencyMap) {
            _.forEach(dependencyMap[id], function (depId) {
                if (!dependencyMap[depId] && !injectedMap[depId]) {
                    try {
                        loadExternalModule(id, depId);
                    } catch (err) {
                        throw new Error('Error loading dependency ' + depId + ' for ' + id + ': ' + err.message);
                    }

                    runAgain = true;
                }
            });
        }

        if (runAgain) { //continue until all we don't have any more unmet dependencies
            fetchUnmetDependencies();
        }
    }
227093
public DependencyId[] getDependencyIds(){
		DependencyId[] depIds = new DependencyId[configEntry.dependencyIds.length];
		for ( int i=0; i<configEntry.dependencyIds.length; i++ ){
			depIds[i] = new DependencyId(configEntry.dependencyIds[i]);
		}
		return depIds;
	}
9802
function getDependencies(component, Prism) {
    // Cast require to an Array
    const deps = [].concat(component.require || []);

    if (Prism) {
        return deps.filter(
            dep =>
                // Remove dependencies that are already loaded
                !Prism.languages[dep]
        );
    }
    return deps;
}
1191651
function extractDependencyIds(options) {
  const dependencies = [];

  function extract(items) {
    // Invalid if not Array
    if (Array.isArray(items)) {
      items.reduce((dependencies, item) => {
        // Items can be Array with depedency as first param
        const dep = Array.isArray(item) ? item[0] : item;

        // Only gather string references, not functions/modules
        if ('string' == typeof dep) dependencies.push(dep);
        return dependencies;
      }, dependencies);
    }
  }

  if (options.plugins) extract(options.plugins);
  if (options.presets) extract(options.presets);

  return dependencies;
}
1330109
function getAllDependencies() {
    var folder = './' + getBowerFolder();
    var bowerDependencies = fs.readdirSync(folder, {encoding: 'utf8'});

    var dependencyInfos = [];
    bowerDependencies.forEach(function(dirname) {
        var filepath = nodePath.resolve(cwd, folder, dirname, '.bower.json');
        if (fs.existsSync(filepath)) {
            var dependencyInfo = getDependency(filepath);
            dependencyInfo.dirName = dirname;
            dependencyInfos.push(dependencyInfo);
        }
    });

    return dependencyInfos;
}
1259832
def get_dependencies(self):
        
        s = super(SWFTimelineContainer, self).get_dependencies()
        for dt in self.all_tags_of_type(DefinitionTag):
            s.update(dt.get_dependencies())
        return s