Program: 34439
Project: 34439
Buggy source:
public List<ICCLink> fetchICCLinks(String[] appNames){
  String params="String_Node_Str";
  String[] paramValues=new String[appNames.length * 2];
  paramValues[0]=paramValues[appNames.length]=appNames[0];
  for (int i=1; i < appNames.length; i++) {
    params+="String_Node_Str";
    paramValues[i]=paramValues[appNames.length + i]=appNames[i];
  }
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str" + params + "String_Node_Str"+ params+ "String_Node_Str";
  sql=sql + "String_Node_Str" + Constants.INTENT_MATCH_LEVEL+ "String_Node_Str";
  final String[] names=appNames;
  DBAdapter adapter=new DBAdapter(){
    @Override protected Object processResultSet(    ResultSet rs){
      List<ICCLink> links=new ArrayList<ICCLink>();
      try {
        while (rs.next()) {
          String fromSMString=rs.getString(1);
          int instruction=rs.getInt(2);
          String exitKind=rs.getString(3);
          String destinationC=rs.getString(5);
          List<Integer> instructions=fetchInstructions(fromSMString,names);
          ICCLink link=new ICCLink(fromSMString,instruction,exitKind,destinationC,instructions);
          links.add(link);
        }
      }
 catch (      SQLException e) {
        e.printStackTrace();
      }
      return links;
    }
  }
;
  List<ICCLink> links=null;
  try {
    links=(List<ICCLink>)adapter.executeQuery(sql,paramValues,Constants.DB_NAME);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  List<ICCLink> providerLinks=fetchProviderLinks(appNames);
  links.addAll(providerLinks);
  return links;
}

Fixed version (ground truth):
public List<ICCLink> fetchICCLinks(String[] appNames){
  String params="String_Node_Str";
  String[] paramValues=new String[appNames.length * 2];
  paramValues[0]=paramValues[appNames.length]=appNames[0];
  for (int i=1; i < appNames.length; i++) {
    params+="String_Node_Str";
    paramValues[i]=paramValues[appNames.length + i]=appNames[i];
  }
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str" + params + "String_Node_Str"+ params+ "String_Node_Str";
  sql=sql + "String_Node_Str" + Constants.INTENT_MATCH_LEVEL+ "String_Node_Str";
  final String[] names=appNames;
  DBAdapter adapter=new DBAdapter(){
    @Override protected Object processResultSet(    ResultSet rs){
      List<ICCLink> links=new ArrayList<ICCLink>();
      try {
        while (rs.next()) {
          String fromSMString=rs.getString(1);
          int instruction=rs.getInt(2);
          String exitKind=rs.getString(3);
          String destinationC=rs.getString(5);
          List<Integer> instructions=fetchInstructions(fromSMString,names);
          ICCLink link=new ICCLink(fromSMString,instruction,exitKind,destinationC,instructions);
          if (!UnreasonableLinksRemover.isUnreasonable(link)) {
            links.add(link);
          }
        }
      }
 catch (      SQLException e) {
        e.printStackTrace();
      }
      return links;
    }
  }
;
  List<ICCLink> links=null;
  try {
    links=(List<ICCLink>)adapter.executeQuery(sql,paramValues,Constants.DB_NAME);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  List<ICCLink> providerLinks=fetchProviderLinks(appNames);
  links.addAll(providerLinks);
  return links;
}