Even though programming languages are called "languages", (computational) linguists and computer scientists do seldom look at programming languages from a linguistic perspective. The concept of Naturalistic Programming [1,2] invites such joint effort, and this talk seeks to contribute to it.
The talk introduces work on transferring a cognitive model of the resolution of indirect anaphors  to a compiler of an extension  of the Java programming language. An indirect anaphor refers to a referent that is not mentioned in the text but is instead related to an explicitly mentioned referent via world knowledge. Indirect anaphors are suited for integration into object-oriented programming languages, because the latter are used to model partial world knowledge.
It is explained how indirect anaphors are anchored in source code and how coreference is handled. Occurrences of referential ambiguity in the current implementation are shown and proposals are made for reducing ambiguity in future versions of the implementation.