Program: 5967
Project: 5967
Buggy source:
@Override public void execute(PaymentInfoMagcard payinfo){
  StringBuffer sb=new StringBuffer();
  try {
    sb.append("String_Node_Str");
    sb.append(m_sCommerceID);
    sb.append("String_Node_Str");
    sb.append(m_sCommercePassword);
    sb.append("String_Node_Str");
    NumberFormat formatter=new DecimalFormat("String_Node_Str");
    String amount=formatter.format(Math.abs(payinfo.getTotal()));
    sb.append(URLEncoder.encode(amount.replace(',','.'),"String_Node_Str"));
    if (3 == 4) {
      String a="String_Node_Str";
      String b="String_Node_Str";
      String c="String_Node_Str";
      sb.append("String_Node_Str" + URLEncoder.encode(a,"String_Node_Str"));
      sb.append("String_Node_Str" + URLEncoder.encode(b,"String_Node_Str"));
      sb.append("String_Node_Str" + URLEncoder.encode(c,"String_Node_Str"));
    }
 else {
      sb.append("String_Node_Str");
      sb.append(URLEncoder.encode(payinfo.getCardNumber(),"String_Node_Str"));
      sb.append("String_Node_Str");
      sb.append(payinfo.getExpirationDate());
      String[] cc_name=payinfo.getHolderName().split("String_Node_Str");
      sb.append("String_Node_Str");
      if (cc_name.length > 0) {
        sb.append(URLEncoder.encode(cc_name[0],"String_Node_Str"));
      }
      sb.append("String_Node_Str");
      if (cc_name.length > 1) {
        sb.append(URLEncoder.encode(cc_name[1],"String_Node_Str"));
      }
    }
    if (payinfo.getTotal() > 0.0) {
      sb.append("String_Node_Str");
      sb.append(OPERATIONVALIDATE);
    }
 else {
      sb.append("String_Node_Str");
      sb.append(OPERATIONREFUND);
      sb.append("String_Node_Str");
      sb.append(payinfo.getTransactionID());
    }
    URL url=new URL(ENDPOINTADDRESS);
    URLConnection connection=url.openConnection();
    connection.setDoOutput(true);
    connection.setUseCaches(false);
    connection.setAllowUserInteraction(false);
    connection.setRequestProperty("String_Node_Str","String_Node_Str");
    DataOutputStream out=new DataOutputStream(connection.getOutputStream());
    out.write(sb.toString().getBytes());
    out.flush();
    out.close();
    BufferedReader in=new BufferedReader(new InputStreamReader(connection.getInputStream()));
    String returned=in.readLine();
    payinfo.setReturnMessage(returned);
    in.close();
    if (returned == null) {
      payinfo.paymentError(AppLocal.getIntString("String_Node_Str"),"String_Node_Str");
    }
 else {
      Map props=new HashMap();
      StringTokenizer tk=new StringTokenizer(returned,"String_Node_Str");
      while (tk.hasMoreTokens()) {
        String sToken=tk.nextToken();
        int i=sToken.indexOf('=');
        if (i >= 0) {
          props.put(URLDecoder.decode(sToken.substring(0,i),"String_Node_Str"),URLDecoder.decode(sToken.substring(i + 1),"String_Node_Str"));
        }
 else {
          props.put(URLDecoder.decode(sToken,"String_Node_Str"),null);
        }
      }
      if ("String_Node_Str".equals(props.get("String_Node_Str"))) {
        payinfo.paymentOK((String)props.get("String_Node_Str"),(String)props.get("String_Node_Str"),returned);
      }
 else {
        payinfo.paymentError(AppLocal.getIntString("String_Node_Str"),(String)props.get("String_Node_Str"));
      }
    }
  }
 catch (  UnsupportedEncodingException eUE) {
    payinfo.paymentError(AppLocal.getIntString("String_Node_Str"),eUE.getMessage());
  }
catch (  MalformedURLException eMURL) {
    payinfo.paymentError(AppLocal.getIntString("String_Node_Str"),eMURL.getMessage());
  }
catch (  IOException e) {
    payinfo.paymentError(AppLocal.getIntString("String_Node_Str"),e.getMessage());
  }
}

Fixed version (ground truth):
@Override public void execute(PaymentInfoMagcard payinfo){
  StringBuffer sb=new StringBuffer();
  try {
    sb.append("String_Node_Str");
    sb.append(m_sCommerceID);
    sb.append("String_Node_Str");
    sb.append(m_sCommercePassword);
    sb.append("String_Node_Str");
    NumberFormat formatter=new DecimalFormat("String_Node_Str");
    String amount=formatter.format(Math.abs(payinfo.getTotal()));
    sb.append(URLEncoder.encode(amount.replace(',','.'),"String_Node_Str"));
    if (payinfo.getTrack1(true) == null) {
      sb.append("String_Node_Str");
      sb.append(URLEncoder.encode(payinfo.getCardNumber(),"String_Node_Str"));
      sb.append("String_Node_Str");
      sb.append(payinfo.getExpirationDate());
      String[] cc_name=payinfo.getHolderName().split("String_Node_Str");
      sb.append("String_Node_Str");
      if (cc_name.length > 0) {
        sb.append(URLEncoder.encode(cc_name[0],"String_Node_Str"));
      }
      sb.append("String_Node_Str");
      if (cc_name.length > 1) {
        sb.append(URLEncoder.encode(cc_name[1],"String_Node_Str"));
      }
    }
 else {
      sb.append("String_Node_Str" + URLEncoder.encode(payinfo.getTrack1(true),"String_Node_Str"));
      sb.append("String_Node_Str" + URLEncoder.encode(payinfo.getTrack2(true),"String_Node_Str"));
    }
    if (payinfo.getTotal() > 0.0) {
      sb.append("String_Node_Str");
      sb.append(OPERATIONVALIDATE);
    }
 else {
      sb.append("String_Node_Str");
      sb.append(OPERATIONREFUND);
      sb.append("String_Node_Str");
      sb.append(payinfo.getTransactionID());
    }
    URL url=new URL(ENDPOINTADDRESS);
    URLConnection connection=url.openConnection();
    connection.setDoOutput(true);
    connection.setUseCaches(false);
    connection.setAllowUserInteraction(false);
    connection.setRequestProperty("String_Node_Str","String_Node_Str");
    DataOutputStream out=new DataOutputStream(connection.getOutputStream());
    out.write(sb.toString().getBytes());
    out.flush();
    out.close();
    BufferedReader in=new BufferedReader(new InputStreamReader(connection.getInputStream()));
    String returned=in.readLine();
    payinfo.setReturnMessage(returned);
    in.close();
    if (returned == null) {
      payinfo.paymentError(AppLocal.getIntString("String_Node_Str"),"String_Node_Str");
    }
 else {
      Map props=new HashMap();
      StringTokenizer tk=new StringTokenizer(returned,"String_Node_Str");
      while (tk.hasMoreTokens()) {
        String sToken=tk.nextToken();
        int i=sToken.indexOf('=');
        if (i >= 0) {
          props.put(URLDecoder.decode(sToken.substring(0,i),"String_Node_Str"),URLDecoder.decode(sToken.substring(i + 1),"String_Node_Str"));
        }
 else {
          props.put(URLDecoder.decode(sToken,"String_Node_Str"),null);
        }
      }
      if ("String_Node_Str".equals(props.get("String_Node_Str"))) {
        payinfo.paymentOK((String)props.get("String_Node_Str"),(String)props.get("String_Node_Str"),returned);
      }
 else {
        payinfo.paymentError(AppLocal.getIntString("String_Node_Str"),(String)props.get("String_Node_Str"));
      }
    }
  }
 catch (  UnsupportedEncodingException eUE) {
    payinfo.paymentError(AppLocal.getIntString("String_Node_Str"),eUE.getMessage());
  }
catch (  MalformedURLException eMURL) {
    payinfo.paymentError(AppLocal.getIntString("String_Node_Str"),eMURL.getMessage());
  }
catch (  IOException e) {
    payinfo.paymentError(AppLocal.getIntString("String_Node_Str"),e.getMessage());
  }
}