{"id":16547443,"url":"https://github.com/sjednac/coffea","last_synced_at":"2025-10-12T07:23:09.543Z","repository":{"id":11288415,"uuid":"13699628","full_name":"sjednac/coffea","owner":"sjednac","description":"Static dependency analyzer for Java bytecode.","archived":false,"fork":false,"pushed_at":"2017-01-03T15:05:31.000Z","size":512,"stargazers_count":16,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-12T07:23:06.182Z","etag":null,"topics":["code-analysis","dependency-analysis","java","jvm","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Unknwon/com","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjednac.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-19T10:50:26.000Z","updated_at":"2025-03-03T08:56:38.000Z","dependencies_parsed_at":"2022-07-14T02:20:29.636Z","dependency_job_id":null,"html_url":"https://github.com/sjednac/coffea","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sjednac/coffea","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjednac%2Fcoffea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjednac%2Fcoffea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjednac%2Fcoffea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjednac%2Fcoffea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjednac","download_url":"https://codeload.github.com/sjednac/coffea/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjednac%2Fcoffea/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010651,"owners_count":26084784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-analysis","dependency-analysis","java","jvm","python"],"created_at":"2024-10-11T19:14:26.428Z","updated_at":"2025-10-12T07:23:09.527Z","avatar_url":"https://github.com/sjednac.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"******\nCoffea\n******\n\nCoffea is a command line tool and Python library for analyzing **static dependences** in **Java** bytecode. Features:\n\n* Class processing handled entirely in Python (i.e. no JVM dependency and no class loader issues) \n* Recursive processing of directories (e.g. exploded deployments) and basic archive formats (jar, war and ear)   \n* Package or class based dependency models\n* Node weight based on actual code size (i.e. bytecode size)\n* Node filters and mappers for basic noise reduction (eg. removing certain packages from the model or folding several packages into one node)\n* Basic graph visualisation using *matplotlib*\n* Exporting to common graph formats using standard *networkx* facilities (eg. dot, gml or graphml)\n\nUsage\n=====\n\nRun the command-line tool (use ``coffea -h`` for a complete list of options)::\n\n    $ coffea -i \u003cdirectory|jar|war|ear|class\u003e\n\nExample\n=======\n\nModelling `JBoss AS 7.x \u003chttp://www.jboss.org/jbossas\u003e`_ internal dependency structure:: \n\n    $ coffea -p -i /opt/jboss-7.2.0.GA/modules/ -Ip org.jboss. -Mrp org.jboss. -Mep 0 -El logging\n\nInteractive mode equivalent::\n    \n    \u003e\u003e\u003e from coffea.builder import Builder\n    \u003e\u003e\u003e from coffea.analyzer import Plotter\n    \u003e\u003e\u003e from coffea.model import NodeIdFilter, NodeIdMapper\n    \u003e\u003e\u003e b = Builder()\n    \u003e\u003e\u003e b.model.node_filters.append(NodeIdFilter(lambda it: it.startswith('org.jboss.')))\n    \u003e\u003e\u003e b.model.node_filters.append(NodeIdMapper(lambda it: it.replace('org.jboss.', '')))\n    \u003e\u003e\u003e b.model.node_filters.append(NodeIdMapper(lambda it: it.split('.')[0]))\n    \u003e\u003e\u003e b.model.node_filters.append(NodeIdFilter(lambda it: it not in ['logging']))\n    \u003e\u003e\u003e b.append('/opt/jboss-7.2.0.GA/modules/')\n    No handlers could be found for logger \"scanner\"\n    \u003e\u003e\u003e print len(b.model.nodes)\n    48\n    \u003e\u003e\u003e p = Plotter(b.model)\n    \u003e\u003e\u003e p.plot()\n    \n    [Displays an interactive view of the dependency model]\n    \n    \u003e\u003e\u003e p.plot(filename='/tmp/jboss7_module_dependencies.png')\n\nOutput:\n\n.. image:: examples/output/jboss_as_7.png\n    :alt: JBoss 7.x internal dependencies\n    :width: 40pt\n    \nUnit testing\n============\n\nYou can run the test suite directly from the command line::\n\n    $ python -m unittest discover\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjednac%2Fcoffea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjednac%2Fcoffea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjednac%2Fcoffea/lists"}