Program: 10305
Project: 10305
Buggy source:
private String sendAndReceiveSPARQL(String sparql) throws IOException {
  StringBuilder answer=new StringBuilder();
  HttpURLConnection connection;
  SpecificSparqlEndpoint se=configuration.getSparqlEndpoint();
  connection=(HttpURLConnection)se.getURL().openConnection();
  connection.setDoOutput(true);
  connection.addRequestProperty("String_Node_Str",se.getHost());
  connection.addRequestProperty("String_Node_Str","String_Node_Str");
  connection.addRequestProperty("String_Node_Str","String_Node_Str");
  connection.addRequestProperty("String_Node_Str","String_Node_Str");
  connection.addRequestProperty("String_Node_Str","String_Node_Str");
  connection.addRequestProperty("String_Node_Str","String_Node_Str");
  OutputStream os=connection.getOutputStream();
  OutputStreamWriter osw=new OutputStreamWriter(os);
  Set<String> s=se.getParameters().keySet();
  Iterator<String> it=s.iterator();
  String FullURI="String_Node_Str";
  while (it.hasNext()) {
    String element=(String)it.next();
    FullURI+="String_Node_Str" + URLEncoder.encode(element,"String_Node_Str") + "String_Node_Str"+ URLEncoder.encode(se.getParameters().get(element),"String_Node_Str")+ "String_Node_Str";
  }
  FullURI+="String_Node_Str" + se.getHasQueryParameter() + "String_Node_Str"+ URLEncoder.encode(sparql,"String_Node_Str");
  osw.write(FullURI);
  osw.close();
  InputStream is=connection.getInputStream();
  InputStreamReader isr=new InputStreamReader(is,"String_Node_Str");
  BufferedReader br=new BufferedReader(isr);
  String line;
  do {
    line=br.readLine();
    if (line != null)     answer.append(line);
  }
 while (line != null);
  br.close();
  return answer.toString();
}

Fixed version (ground truth):
private String sendAndReceiveSPARQL(String sparql) throws IOException {
  StringBuilder answer=new StringBuilder();
  HttpURLConnection connection;
  SpecificSparqlEndpoint se=configuration.getSparqlEndpoint();
  connection=(HttpURLConnection)se.getURL().openConnection();
  connection.setDoOutput(true);
  connection.addRequestProperty("String_Node_Str",se.getHost());
  connection.addRequestProperty("String_Node_Str","String_Node_Str");
  connection.addRequestProperty("String_Node_Str","String_Node_Str");
  connection.addRequestProperty("String_Node_Str","String_Node_Str");
  connection.addRequestProperty("String_Node_Str","String_Node_Str");
  connection.addRequestProperty("String_Node_Str","String_Node_Str");
  OutputStream os=connection.getOutputStream();
  OutputStreamWriter osw=new OutputStreamWriter(os);
  Set<String> s=se.getParameters().keySet();
  Iterator<String> it=s.iterator();
  String FullURI="String_Node_Str";
  while (it.hasNext()) {
    String element=it.next();
    FullURI+="String_Node_Str" + URLEncoder.encode(element,"String_Node_Str") + "String_Node_Str"+ URLEncoder.encode(se.getParameters().get(element),"String_Node_Str")+ "String_Node_Str";
  }
  FullURI+="String_Node_Str" + se.getHasQueryParameter() + "String_Node_Str"+ URLEncoder.encode(sparql,"String_Node_Str");
  osw.write(FullURI);
  osw.close();
  InputStream is=connection.getInputStream();
  InputStreamReader isr=new InputStreamReader(is,"String_Node_Str");
  BufferedReader br=new BufferedReader(isr);
  String line;
  do {
    line=br.readLine();
    if (line != null)     answer.append(line);
  }
 while (line != null);
  br.close();
  return answer.toString();
}