
The Abstraction Filtration Comparison (AFC) test is a court-recognized methodology used in software copyright litigation to determine whether one computer program has copied the non-literal elements of another — that is, whether protected structural, sequential, or organizational elements were reproduced even when no identical lines of code can be found.
Software development is a competitive business, and disputes over intellectual property arise with regularity when engineers move to companies that compete with their former employers. When such disputes reach litigation, expert witnesses are engaged to determine whether and to what extent one party copied proprietary source code from another.
In most cases, an expert begins by examining code for evidence of literal copying — using software analysis tools to determine whether portions of code from Program A were copied directly into Program B. But what happens when literal copying is absent, inconclusive, or deliberately obscured? That is where the AFC test becomes essential.
Understanding what the AFC test is, when it applies, and what it can reveal is critical knowledge for any attorney handling software copyright infringement matters.
What Is the AFC Test?
To prove copyright infringement, a plaintiff must demonstrate two things: that the alleged infringer had access to the copyrighted material, and that the allegedly infringing work is substantially similar to the protected work.
Expert witnesses are primarily employed to find evidence that supports or refutes allegations of substantial similarity.
There are two kinds of copying an expert may encounter: literal copying and non-literal copying.
Literal copying is relatively straightforward — the same text appears in both programs.
Non-literal copying is more nuanced. It involves the copying of protectable non-literal elements of a computer program, such as its “look-and-feel” or “structure, sequence, and organization,” without directly reproducing the underlying source code.
When evidence of literal copying is non-existent, inconclusive, or particularly weak, an expert can search for evidence of non-literal copying using the AFC test. The test always consists of three steps: Abstraction, Filtration, and Comparison.
Step 1: Abstraction
Abstraction incrementally pulls back from source code to compare the structure, sequence, and organization — or the look-and-feel — of two programs at different levels of generality and specificity. A useful analogy is zooming out from a detailed map. If source code represents specific houses on a street, abstraction involves zooming out to view the street’s location in a neighborhood, the neighborhood within a city, the city within a state, and so on.
The appropriate level of zoom varies from case to case. Two programs may appear completely different when viewed at the street level, and an expert may need to examine them at the state level to make a meaningful comparison. There is no one-size-fits-all approach — the right level of abstraction depends on the nature of the programs and the allegations at issue.
Different U.S. Circuits also conceptualize the abstraction step somewhat differently. The Ninth Circuit focuses on the software’s structure, sequence, and organization as well as user interfaces as the appropriate levels at which abstraction takes place. The Second Circuit places greater emphasis on parameter lists and services required. Despite these variations, the three-step structure of the test remains consistent across jurisdictions.
Step 2: Filtration
Filtration removes any non-protectable elements of code before comparison occurs. Non-protectable elements may include auto-generated code, open source components, or code that is otherwise unoriginal or not eligible for copyright protection. Because such code receives no copyright protection, finding similarities between two programs’ non-protectable elements would carry no legal weight and would not be appropriate to include in a substantial similarity analysis.
Once non-protectable elements are filtered out, what remains are the protectable parts of each program as viewed at the appropriate level of abstraction — ready for comparison.
Step 3: Comparison
Comparison evaluates the two programs at the appropriate level of abstraction, with all non-protectable elements filtered out. During this stage, an expert arrives at an opinion regarding substantial similarity between the two programs and, by extension, whether copying of non-literal elements has occurred.
While the appropriate abstraction level varies from case to case and circuit to circuit, AFC methodology is repeatable and defensible. Its value lies in its ability to uncover copying of non-literal elements that would not be apparent from a review of source code alone.
When to Apply the AFC Test
The AFC test is not a universal tool. Its applicability depends on the type of intellectual property claim at issue.
Copyright (Yes). The AFC test was expressly adopted for copyright matters in which one party contends that non-literal copying of computer software has occurred. An expert abstracts source code to the appropriate level, filters out non-protectable expression, and compares the remaining expressive elements of the filtered programs for substantial similarity. This is the paradigm use case for the AFC test.
Trade Secret (Conditionally). When an allegedly misappropriated trade secret involves computer software, an expert can follow abstraction-filtration-comparison methodology in a manner similar to a copyright matter. The abstraction step remains the same, but filtration removes elements not protectable as trade secrets — such as open source code — rather than elements unprotectable under copyright law. After filtration, an expert can compare the remaining elements against the allegedly misappropriated trade secrets. For matters involving the theft of proprietary software, DisputeSoft’s trade secret misappropriation practice provides this analysis as part of a broader expert engagement.
Patent (No). The AFC test is not applicable to patent litigation. Patent protections deal closely with explicit functionality, not with expression. The process of abstraction is not appropriate when reviewing patents, as any level of abstraction removes the specificity required for patent claim and specification comparison and analysis.
In short, the AFC test is an accepted method for determining whether indirect or non-literal copying has occurred in intellectual property matters involving copyrights and, in some circumstances, trade secrets. It is not used in patent matters.
What the AFC Test Reveals: A Practical Example
The true power of the AFC test lies in its ability to surface hidden similarities between programs that a literal code comparison would miss entirely. The following example illustrates how.
Setting the Scene
Company A creates a Java program for baking pies, named “Bake Pie,” and holds a registered copyright for it. Company B also creates a Java program for baking pies, named “Perfect Pie.” The “Perfect Pie” program was written by a former employee of Company A, and evidence indicates that the employee took a thumb drive containing the “Bake Pie” source code upon termination. Company A sues Company B and the former employee for copyright infringement, and code for both programs is produced for expert review.
When Literal Comparison Is Enough — and When It Isn’t
A software expert first determines whether literal copying occurred, typically by using text comparison software to compare the programs line by line.
Were an expert to use a text comparison software, like Beyond Compare1, to examine the “Bake Pie” and “Perfect Pie” programs, the result of such a comparison might look something like the screenshot below, with “Bake Pie” on the left and “Perfect Pie” on the right. Lines in white match exactly, while lines highlighted in red do not match.
Most of the programs’ lines match exactly, indicating that literal copying occurred. A situation in which literal copying occurred may not require an expert to perform the AFC test. But perhaps, instead of creating “Perfect Pie” in Java, the language used in “Bake Pie,” Company B creates it in the Visual Basic .NET language.
The below screenshot illustrates what happens when an expert compares the two programs using Beyond Compare.
One cannot immediately determine whether one program was copied from the other by merely looking at the literal code, as no text matches exactly, and the programs share only blank lines. This is a direct result of “Perfect Pie” being written in an entirely different programming language than “Bake Pie.”
However, these two programs still may be similar in other ways.
While the text comparison software indicates that “Perfect Pie” did not copy source code directly from “Bake Pie,” the two programs’ variable names, method names, and program sequence are suspiciously similar, raising the question of whether non-literal elements of “Perfect Pie” were copied from “Bake Pie.” How might an expert determine whether “Perfect Pie” exhibits similarity to “Bake Pie” with regard to structure, sequence, and organization?
In this example, assume that the employee in question had access to the original protected work of Company A. This fact allows us to analyze the two programs for evidence of non-literal copying. One method of conducting such an analysis is to apply the AFC test. For the purposes of this example, we abstract each program into simple modules, with a module for each function. Assume as well for this example that after applying various filters (e.g., legal doctrines, industry-specific requirements, etc.), we have concluded that nothing needs to be filtered out of the programs, as they contain only protectable code.
Now that the abstraction and filtration steps are complete, we can compare the programs; one way to do this is by examining the programs’ “control flow” through the modules.
The way a program gets from start to finish is referred to as its control flow. A computer program that needs to accomplish a specific task can do so using a variety of different control flow structures, and a programmer’s decision to design a program’s control flow one way instead of another may arguably be a protectable expression.
Examining control flow can reveal similarities in two programs’ structure, sequence and organization that may have remained hidden from other analyses. Below are two control flow diagrams, one for “Bake Pie” and one for “Perfect Pie,” with similarities in structure, sequence, and organization highlighted in yellow.
Although the “Perfect Pie” program contains three pies (Pecan, Banana, and Coconut) that “Bake Pie” does not, and the “Bake Pie” program contains one pie (Blueberry) that “Perfect Pie” does not, the diagrams show that the structure, sequence, and organization of “Perfect Pie” is very similar to that of “Bake Pie.” Both start in the same way, generate a person to create the pie, create the pie by getting user input, call the function to create the pie, and generate a pie as the end result.
Such similarity suggests that non-literal elements of “Perfect Pie” were copied from “Bake Pie.” Had “Perfect Pie” accomplished the same task as “Bake Pie” by ordering the steps of its control flow differently or by employing completely different procedures, the non-literal elements of the two programs may have been different enough to conclude that protected expression was not copied from the other.
The AFC test can reveal material similarities between programs that may have otherwise remained hidden.
Software experts use the process of abstracting programs into modules, filtering out non-protectable elements, and comparing the control flow of the programs to come to an opinion regarding whether two programs that differ literally are still substantially similar.
This is especially necessary when a party suspects that protected code was copied and translated into a different programming language or otherwise used as the basis for creating a competing program.
This is where software experts can be vital to potential software copyright infringement cases where the issue of protected code is in doubt.
The Role of a Software Expert Witness in AFC Analysis
Conducting a reliable AFC analysis requires more than familiarity with the test’s three steps.
An expert must understand how to select the appropriate level of abstraction for the programs and claims at issue, apply legally recognized filtration criteria correctly, and present comparison findings in a way that is technically rigorous and accessible to judges and juries.
DisputeSoft’s experts have conducted AFC analyses in complex software copyright and trade secret matters across a range of industries and programming environments. Our Code ACE™ service supports this work at scale, using industry-standard algorithms to identify similarities across programs containing thousands to millions of lines of code — providing a systematic foundation for the targeted manual review and expert analysis that AFC methodology requires.
If you are handling a software copyright or trade secret matter and need to assess whether non-literal copying occurred, contact DisputeSoft for a confidential case evaluation.
Frequently Asked Questions About an Abstraction Filtration Comparison Test
AFC stands for Abstraction, Filtration, and Comparison — the three sequential steps of the methodology. Each step builds on the previous one: abstraction identifies the appropriate level at which to compare two programs, filtration removes elements that are not legally protectable, and comparison evaluates the remaining protectable expression for substantial similarity.
The AFC test was developed by the U.S. Court of Appeals for the Second Circuit in its 1992 decision in Computer Associates International, Inc. v. Altai, Inc. It has since been widely adopted by federal courts across multiple circuits and recognized by courts in other countries including Canada and France.
Literal copying occurs when the actual source code or object code of one program is reproduced in another. Non-literal copying occurs when the structure, sequence, organization, or overall “look and feel” of a program is reproduced without copying the underlying code directly. The AFC test is specifically designed to detect non-literal copying.
Yes, conditionally. When the trade secret at issue involves computer software, an expert can apply AFC methodology with modified filtration criteria — removing elements that are not protectable as trade secrets rather than those that are unprotectable under copyright law. The test is not applicable to patent matters.
A literal, line-by-line code comparison between programs written in different languages will typically show no matches, even if one was copied from the other. The AFC test addresses this directly by analyzing structure, sequence, and organization at a level of abstraction above the source code itself — making it possible to identify copying that a text comparison would miss entirely.
The duration depends on the size and complexity of the programs involved, the number of claims at issue, and the volume of code produced in discovery. For large enterprise systems with millions of lines of code, DisputeSoft’s Code ACE™ service can programmatically process similarities at scale, significantly reducing the time required for targeted manual review.
Ideally, a software expert should be engaged as early as possible — including during pre-litigation evaluation — so that counsel can assess the strength of non-literal copying claims before filing or responding to a complaint. Early engagement also allows the expert to assist with discovery planning, including identifying which technical documents and source code artifacts are most relevant to the AFC analysis.





