Language: Java
Label: safe
CWE: CWE-74 \u2014 Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.

Code:
  public void setYRangeParams() throws Exception {
    assertPlotParam("yrange","[0:1]");
    assertPlotParam("yrange", "[:]");
    assertPlotParam("yrange", "[:0]");
    assertPlotParam("yrange", "[:42]");
    assertPlotParam("yrange", "[:-42]");
    assertPlotParam("yrange", "[:0.8]");
    assertPlotParam("yrange", "[:-0.8]");
    assertPlotParam("yrange", "[:42.4]");
    assertPlotParam("yrange", "[:-42.4]");
    assertPlotParam("yrange", "[:4e4]");
    assertPlotParam("yrange", "[:-4e4]");
    assertPlotParam("yrange", "[:4e-4]");
    assertPlotParam("yrange", "[:-4e-4]");
    assertPlotParam("yrange", "[:4.2e4]");
    assertPlotParam("yrange", "[:-4.2e4]");
    assertPlotParam("yrange", "[0:]");
    assertPlotParam("yrange", "[5:]");
    assertPlotParam("yrange", "[-5:]");
    assertPlotParam("yrange", "[0.5:]");
    assertPlotParam("yrange", "[-0.5:]");
    assertPlotParam("yrange", "[10.5:]");
    assertPlotParam("yrange", "[-10.5:]");
    assertPlotParam("yrange", "[10e5:]");
    assertPlotParam("yrange", "[-10e5:]");
    assertPlotParam("yrange", "[10e-5:]");
    assertPlotParam("yrange", "[-10e-5:]");
    assertPlotParam("yrange", "[10.1e-5:]");
    assertPlotParam("yrange", "[-10.1e-5:]");
    assertPlotParam("yrange", "[-10.1e-5:-10.1e-6]");
    assertInvalidPlotParam("yrange", "[33:system('touch /tmp/poc.txt')]");
    assertInvalidPlotParam("y2range", "[42:%0a[33:system('touch /tmp/poc.txt')]");
  }