Skip to content

java io: compound JDK I/O classes (FileInputStream, BufferedReader, InputStreamReader, ...) are not counted #4191

Closed

Description

@squid-protocol

Problem

Java's io rule matches whole JDK type names (File, InputStream, Reader, Writer, Files., …). Compound JDK I/O classes like these are a different token, so they go unmatched:

  • FileInputStream, FileOutputStream
  • BufferedReader, BufferedWriter
  • InputStreamReader, FileReader, FileWriter
  • PrintWriter, RandomAccessFile

Evidence

SENTINEL IDE's CardDemo Java port (noahlabsai/aws-mainframe-modernization-carddemo-JAVA @ 47af18641ee6) opens every file with

tcatbalReader = new BufferedReader(new InputStreamReader(new FileInputStream(tcatbalPath), StandardCharsets.UTF_8));

All 28 of its CardDemo program classes scan with arch_io = 0; the COBOL median is 4. The COBOL-vs-port I/O correlation therefore reads ρ ≈ −0.01, where the other structural readings for this port read 0.88–0.91.

Proposal

Extend the rule to the compound JDK I/O classes (constructor or type use), plus Files.newBufferedReader/Writer and NIO channels. Add valid and invalid cases to test_java_strict.py. Then re-measure the port-invariance I/O floor (#4167).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions