Program: 111216
Project: 111216
Buggy source:
@Test public void testComputeSharedSecretWithWycheproofTestVectors() throws Exception {
  JSONObject json=WycheproofTestUtil.readJson("String_Node_Str");
  int errors=0;
  JSONArray testGroups=json.getJSONArray("String_Node_Str");
  for (int i=0; i < testGroups.length(); i++) {
    JSONObject group=testGroups.getJSONObject(i);
    JSONArray tests=group.getJSONArray("String_Node_Str");
    for (int j=0; j < tests.length(); j++) {
      JSONObject testcase=tests.getJSONObject(j);
      if (WycheproofTestUtil.checkFlags(testcase,"String_Node_Str")) {
        System.out.println("String_Node_Str");
        continue;
      }
      String tcId=String.format("String_Node_Str",testcase.getInt("String_Node_Str"),testcase.getString("String_Node_Str"));
      String result=testcase.getString("String_Node_Str");
      String hexPubKey=testcase.getString("String_Node_Str");
      String expectedSharedSecret=testcase.getString("String_Node_Str");
      String curve=testcase.getString("String_Node_Str");
      String hexPrivKey=testcase.getString("String_Node_Str");
      if (hexPrivKey.length() % 2 == 1) {
        hexPrivKey="String_Node_Str" + hexPrivKey;
      }
      KeyFactory kf=EngineFactory.KEY_FACTORY.getInstance("String_Node_Str");
      try {
        EllipticCurves.CurveType curveType=WycheproofTestUtil.getCurveType(curve);
        ECPrivateKey privKey=EllipticCurves.getEcPrivateKey(curveType,Hex.decode(hexPrivKey));
        ECPublicKey pubKey;
        try {
          X509EncodedKeySpec x509keySpec=new X509EncodedKeySpec(Hex.decode(hexPubKey));
          pubKey=(ECPublicKey)kf.generatePublic(x509keySpec);
        }
 catch (        java.lang.RuntimeException ex) {
          continue;
        }
        String sharedSecret=Hex.encode(EllipticCurves.computeSharedSecret(privKey,pubKey));
        if (result.equals("String_Node_Str")) {
          if (expectedSharedSecret.equals(sharedSecret) && WycheproofTestUtil.checkFlags(testcase,"String_Node_Str","String_Node_Str","String_Node_Str")) {
            System.out.println(tcId + "String_Node_Str");
          }
 else {
            System.out.println("String_Node_Str" + tcId + "String_Node_Str"+ sharedSecret);
            errors++;
          }
        }
 else         if (!expectedSharedSecret.equals(sharedSecret)) {
          System.out.println("String_Node_Str" + tcId + "String_Node_Str"+ sharedSecret+ "String_Node_Str"+ expectedSharedSecret);
          errors++;
        }
      }
 catch (      NoSuchAlgorithmException ex) {
        if (result.equals("String_Node_Str")) {
          continue;
        }
      }
catch (      GeneralSecurityException ex) {
        if (result.equals("String_Node_Str")) {
          System.out.println("String_Node_Str" + tcId + "String_Node_Str"+ ex.toString());
          ex.printStackTrace();
          errors++;
        }
      }
catch (      Exception ex) {
        System.out.println("String_Node_Str" + tcId + "String_Node_Str"+ ex.toString());
        ex.printStackTrace();
        errors++;
      }
    }
  }
  assertEquals(0,errors);
}

Fixed version (ground truth):
@Test public void testComputeSharedSecretWithWycheproofTestVectors() throws Exception {
  JSONObject json=WycheproofTestUtil.readJson("String_Node_Str");
  int errors=0;
  JSONArray testGroups=json.getJSONArray("String_Node_Str");
  for (int i=0; i < testGroups.length(); i++) {
    JSONObject group=testGroups.getJSONObject(i);
    JSONArray tests=group.getJSONArray("String_Node_Str");
    for (int j=0; j < tests.length(); j++) {
      JSONObject testcase=tests.getJSONObject(j);
      if (WycheproofTestUtil.checkFlags(testcase,"String_Node_Str")) {
        System.out.println("String_Node_Str");
        continue;
      }
      String tcId=String.format("String_Node_Str",testcase.getInt("String_Node_Str"),testcase.getString("String_Node_Str"));
      String result=testcase.getString("String_Node_Str");
      String hexPubKey=testcase.getString("String_Node_Str");
      String expectedSharedSecret=testcase.getString("String_Node_Str");
      String curve=testcase.getString("String_Node_Str");
      String hexPrivKey=testcase.getString("String_Node_Str");
      if (hexPrivKey.length() % 2 == 1) {
        hexPrivKey="String_Node_Str" + hexPrivKey;
      }
      KeyFactory kf=EngineFactory.KEY_FACTORY.getInstance("String_Node_Str");
      try {
        EllipticCurves.CurveType curveType=WycheproofTestUtil.getCurveType(curve);
        ECPrivateKey privKey=EllipticCurves.getEcPrivateKey(curveType,Hex.decode(hexPrivKey));
        ECPublicKey pubKey;
        try {
          X509EncodedKeySpec x509keySpec=new X509EncodedKeySpec(Hex.decode(hexPubKey));
          pubKey=(ECPublicKey)kf.generatePublic(x509keySpec);
          System.out.println("String_Node_Str" + hexPubKey);
          System.out.println("String_Node_Str" + Hex.encode(pubKey.getEncoded()));
        }
 catch (        java.lang.RuntimeException ex) {
          System.out.println("String_Node_Str" + ex);
          continue;
        }
        String sharedSecret=Hex.encode(EllipticCurves.computeSharedSecret(privKey,pubKey));
        if (result.equals("String_Node_Str")) {
          if (expectedSharedSecret.equals(sharedSecret) && WycheproofTestUtil.checkFlags(testcase,"String_Node_Str","String_Node_Str","String_Node_Str")) {
            System.out.println(tcId + "String_Node_Str");
          }
 else {
            System.out.println("String_Node_Str" + tcId + "String_Node_Str"+ sharedSecret);
            errors++;
          }
        }
 else         if (!expectedSharedSecret.equals(sharedSecret)) {
          System.out.println("String_Node_Str" + tcId + "String_Node_Str"+ sharedSecret+ "String_Node_Str"+ expectedSharedSecret);
          errors++;
        }
      }
 catch (      NoSuchAlgorithmException ex) {
        System.out.println(tcId + "String_Node_Str" + ex);
        if (result.equals("String_Node_Str")) {
          continue;
        }
      }
catch (      GeneralSecurityException ex) {
        System.out.println(tcId + "String_Node_Str" + ex.toString());
        if (result.equals("String_Node_Str")) {
          System.out.println("String_Node_Str" + tcId + "String_Node_Str"+ ex.toString());
          ex.printStackTrace();
          errors++;
        }
      }
catch (      Exception ex) {
        System.out.println("String_Node_Str" + tcId + "String_Node_Str"+ ex.toString());
        ex.printStackTrace();
        errors++;
      }
    }
  }
  assertEquals(0,errors);
}