nus-yam/ex-repair huggingface dataset:
Program: 99592
Project: 99592
Buggy source:
@Test public void testDoneRatioIsLoaded(){
  Issue issue17319=issuesMap.get(17319);
  Integer expectedDoneRatio17319=60;
  assertEquals("String_Node_Str",expectedDoneRatio17319,issue17319.getDoneRatio());
  Issue issue17318=issuesMap.get(17318);
  Integer expectedDoneRatio17318=33;
  assertEquals("String_Node_Str",expectedDoneRatio17318,issue17318.getDoneRatio());
  Issue issue17481=issuesMap.get(17481);
  Integer expectedDoneRatio17481=0;
  assertEquals("String_Node_Str",expectedDoneRatio17481,issue17481.getDoneRatio());
}

Fixed version (ground truth):
@Test public void testDoneRatioIsLoaded(){
  Issue issue67=issuesMap.get(67);
  Integer expectedDoneRatio67=20;
  assertEquals("String_Node_Str",expectedDoneRatio67,issue67.getDoneRatio());
  Issue issue65=issuesMap.get(65);
  Integer expectedDoneRatio65=80;
  assertEquals("String_Node_Str",expectedDoneRatio65,issue65.getDoneRatio());
  Issue issue55=issuesMap.get(55);
  Integer expectedDoneRatio55=0;
  assertEquals("String_Node_Str",expectedDoneRatio55,issue55.getDoneRatio());
}
Program: 99593
Project: 99593
Buggy source:
@Test public void testProject1(){
  Issue issue17611=issuesMap.get(17611);
  Integer expectedProjectId=9579;
  String expectedProjectName="String_Node_Str";
  Project actualProect=issue17611.getProject();
  assertNotNull("String_Node_Str",actualProect);
  assertEquals("String_Node_Str",expectedProjectId,actualProect.getId());
  assertEquals("String_Node_Str",expectedProjectName,actualProect.getName());
}

Fixed version (ground truth):
@Test public void testProject1(){
  Issue issue67=issuesMap.get(67);
  Integer expectedProjectId=25;
  String expectedProjectName="String_Node_Str";
  Project actualProect=issue67.getProject();
  assertNotNull("String_Node_Str",actualProect);
  assertEquals("String_Node_Str",expectedProjectId,actualProect.getId());
  assertEquals("String_Node_Str",expectedProjectName,actualProect.getName());
}
Program: 99594
Project: 99594
Buggy source:
@Test public void testParentId(){
  Integer childId=18156;
  Integer parentIdExpected=18154;
  Issue child=issuesMap.get(childId);
  assertNotNull("String_Node_Str" + childId + "String_Node_Str",child);
  assertNotNull("String_Node_Str" + childId + "String_Node_Str",child.getParentId());
  Integer actualParentId=child.getParentId();
  assertEquals("String_Node_Str" + childId + "String_Node_Str"+ parentIdExpected,parentIdExpected,actualParentId);
  Issue parent=issuesMap.get(actualParentId);
  assertNotNull("String_Node_Str" + parentIdExpected + "String_Node_Str",parent);
  assertEquals("String_Node_Str" + parentIdExpected + "String_Node_Str",parentIdExpected,parent.getId());
}

Fixed version (ground truth):
@Test public void testParentId(){
  Integer childId=67;
  Integer parentIdExpected=66;
  Issue child=issuesMap.get(childId);
  assertNotNull("String_Node_Str" + childId + "String_Node_Str",child);
  assertNotNull("String_Node_Str" + childId + "String_Node_Str",child.getParentId());
  Integer actualParentId=child.getParentId();
  assertEquals("String_Node_Str" + childId + "String_Node_Str"+ parentIdExpected,parentIdExpected,actualParentId);
  Issue parent=issuesMap.get(actualParentId);
  assertNotNull("String_Node_Str" + parentIdExpected + "String_Node_Str",parent);
  assertEquals("String_Node_Str" + parentIdExpected + "String_Node_Str",parentIdExpected,parent.getId());
}
Program: 99595
Project: 99595
Buggy source:
@Before public void setup() throws Exception {
  String str=MyIOUtils.getResourceAsString(FILE_1_ISSUES_XML_FILE_NAME);
  this.issuesList=RedmineXMLParser.parseIssuesFromXML(str);
  RedmineIssuesMap loader=new RedmineIssuesMap(issuesList);
  issuesMap=loader.getIssuesMap();
}

Fixed version (ground truth):
@Before public void setup() throws Exception {
  String str=MyIOUtils.getResourceAsString(REDMINE_1_1_FILE_1_ISSUES_XML_FILE_NAME);
  this.issuesList=RedmineXMLParser.parseIssuesFromXML(str);
  RedmineIssuesMap loader=new RedmineIssuesMap(issuesList);
  issuesMap=loader.getIssuesMap();
}
Program: 99596
Project: 99596
Buggy source:
@Test public void testAssignee(){
  Issue issue=issuesMap.get(18156);
  String assigneeNameExpected="String_Node_Str";
  Integer assigneeIdExpected=19640;
  User assignee=issue.getAssignee();
  assertNotNull("String_Node_Str",assignee);
  assertEquals("String_Node_Str",assigneeNameExpected,assignee.getFullName());
  assertEquals("String_Node_Str",assigneeIdExpected,assignee.getId());
}

Fixed version (ground truth):
@Test public void testAssignee(){
  Issue issue=issuesMap.get(68);
  String assigneeNameExpected="String_Node_Str";
  Integer assigneeIdExpected=1;
  User assignee=issue.getAssignee();
  assertNotNull("String_Node_Str",assignee);
  assertEquals("String_Node_Str",assigneeNameExpected,assignee.getFullName());
  assertEquals("String_Node_Str",assigneeIdExpected,assignee.getId());
}
Program: 99597
Project: 99597
Buggy source:
@Test public void testPriorityTextIsLoaded(){
  Issue issue=issuesMap.get(18156);
  assertEquals("String_Node_Str","String_Node_Str",issue.getPriorityText());
}

Fixed version (ground truth):
@Test public void testPriorityTextIsLoaded(){
  Issue issue=issuesMap.get(39);
  assertEquals("String_Node_Str","String_Node_Str",issue.getPriorityText());
}
Program: 99598
Project: 99598
Buggy source:
@Test public void testNullParentId(){
  Integer childId=17318;
  Issue child=issuesMap.get(childId);
  assertEquals("String_Node_Str" + childId + "String_Node_Str",null,child.getParentId());
}

Fixed version (ground truth):
@Test public void testNullParentId(){
  Integer childId=66;
  Issue child=issuesMap.get(childId);
  assertEquals("String_Node_Str" + childId + "String_Node_Str",null,child.getParentId());
}
Program: 99599
Project: 99599
Buggy source:
public static Issue parseIssueFromXML(String xml) throws RuntimeException {
  Unmarshaller unmarshaller=RedmineXMLParser.getUnmarshaller(RedmineXMLParser.MAPPING_ISSUES,Issue.class);
  Issue issue=null;
  StringReader reader=null;
  try {
    System.err.println(xml);
    reader=new StringReader(xml);
    issue=(Issue)unmarshaller.unmarshal(reader);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    if (reader != null) {
      reader.close();
    }
  }
  return issue;
}

Fixed version (ground truth):
public static Issue parseIssueFromXML(String xml) throws RuntimeException {
  verifyStartsAsXML(xml);
  Unmarshaller unmarshaller=RedmineXMLParser.getUnmarshaller(RedmineXMLParser.MAPPING_ISSUES,Issue.class);
  Issue issue=null;
  StringReader reader=null;
  try {
    System.err.println(xml);
    reader=new StringReader(xml);
    issue=(Issue)unmarshaller.unmarshal(reader);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    if (reader != null) {
      reader.close();
    }
  }
  return issue;
}
Program: 99600
Project: 99600
Buggy source:
public Issue createIssue(String projectKey,Issue issue) throws IOException, AuthenticationException {
  String query=getCreateIssueURI();
  HttpPost httpPost=new HttpPost(query);
  if (trialMode) {
  }
  String xmlBody=getIssueXML(projectKey,issue);
  setEntity(httpPost,xmlBody);
  return sendRequestExpectResponse(httpPost);
}

Fixed version (ground truth):
public Issue createIssue(String projectKey,Issue issue) throws IOException, AuthenticationException {
  String query=getCreateIssueURI();
  HttpPost httpPost=new HttpPost(query);
  String xmlBody=getIssueXML(projectKey,issue);
  setEntity(httpPost,xmlBody);
  return sendRequestExpectResponse(httpPost);
}
Program: 99601
Project: 99601
Buggy source:
/** 
 * sample: http://demo.redmine.org/projects/ace/issues.xml?query_id=302
 */
private URL buildGetIssuesByQueryURL(String projectKey,String queryId){
  String charset="String_Node_Str";
  URL url=null;
  try {
    String query=String.format("String_Node_Str",URLEncoder.encode(projectKey,charset),URLEncoder.encode(queryId,charset));
    if ((apiAccessKey != null) && (!apiAccessKey.isEmpty())) {
      query+=String.format("String_Node_Str",URLEncoder.encode(apiAccessKey,charset));
    }
    url=new URL(host + query);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
  return url;
}

Fixed version (ground truth):
/** 
 * sample: http://demo.redmine.org/projects/ace/issues.xml?query_id=302
 */
private URL buildGetIssuesByQueryURL(String projectKey,String queryId,int offsetIssuesNum){
  String charset="String_Node_Str";
  URL url=null;
  try {
    String query=String.format("String_Node_Str",URLEncoder.encode(projectKey,charset),URLEncoder.encode(queryId,charset));
    query+="String_Node_Str" + offsetIssuesNum;
    query+="String_Node_Str" + tasksPerPage;
    if ((apiAccessKey != null) && (!apiAccessKey.isEmpty())) {
      query+=String.format("String_Node_Str",URLEncoder.encode(apiAccessKey,charset));
    }
    url=new URL(host + query);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
  return url;
}
Program: 99602
Project: 99602
Buggy source:
public List<Issue> getIssues(String projectKey,String queryId) throws IOException, AuthenticationException {
  URL url=buildGetIssuesByQueryURL(projectKey,queryId);
  WebConnector c=new WebConnector();
  StringBuffer response=c.loadData(url);
  System.err.println(response);
  List<Issue> foundIssues=parseIssuesFromXML(response.toString());
  return foundIssues;
}

Fixed version (ground truth):
public List<Issue> getIssues(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  int offsetIssuesNum=0;
  int totalIssuesFoundOnServer=-1;
  int loaded=-1;
  do {
    URL url=buildGetIssuesByQueryURL(projectKey,queryId,offsetIssuesNum);
    StringBuffer responseXML=c.loadData(url);
    System.err.println(responseXML);
    totalIssuesFoundOnServer=parseIssuesTotalCount(responseXML.toString());
    List<Issue> foundIssues=parseIssuesFromXML(responseXML.toString());
    loaded=foundIssues.size();
    System.err.println("String_Node_Str" + totalIssuesFoundOnServer + "String_Node_Str"+ loaded);
    allTasks.addAll(foundIssues);
    offsetIssuesNum+=loaded;
  }
 while (offsetIssuesNum < totalIssuesFoundOnServer);
  return allTasks;
}
Program: 99603
Project: 99603
Buggy source:
public static String getQueryId(){
  return properties.getProperty("String_Node_Str");
}

Fixed version (ground truth):
public static Integer getQueryId(){
  String s=properties.getProperty("String_Node_Str");
  return Integer.parseInt(s);
}
Program: 99604
Project: 99604
Buggy source:
@Test public void testGetIssues(){
  try {
    Issue issueToCreate=new Issue();
    issueToCreate.setSubject("String_Node_Str" + new Date());
    Issue newIssue=mgr.createIssue(PROJECT_KEY,issueToCreate);
    String queryIdIssuesCreatedLast2Days=Config.getQueryId();
    List<Issue> issues=mgr.getIssues(PROJECT_KEY,queryIdIssuesCreatedLast2Days);
    System.out.println("String_Node_Str" + issues.size() + "String_Node_Str"+ queryIdIssuesCreatedLast2Days);
    assertTrue(issues.size() > 0);
    boolean found=false;
    for (    Issue issue : issues) {
      if (issue.getId().equals(newIssue.getId())) {
        found=true;
        break;
      }
    }
    if (!found) {
      fail("String_Node_Str" + queryIdIssuesCreatedLast2Days + "String_Node_Str");
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    fail(e.getMessage());
  }
}

Fixed version (ground truth):
@Test public void testGetIssues(){
  try {
    Issue issueToCreate=new Issue();
    issueToCreate.setSubject("String_Node_Str" + new Date());
    Issue newIssue=mgr.createIssue(PROJECT_KEY,issueToCreate);
    Integer queryIdIssuesCreatedLast2Days=Config.getQueryId();
    List<Issue> issues=mgr.getIssues(PROJECT_KEY,queryIdIssuesCreatedLast2Days);
    System.out.println("String_Node_Str" + issues.size() + "String_Node_Str"+ queryIdIssuesCreatedLast2Days);
    assertTrue(issues.size() > 0);
    boolean found=false;
    for (    Issue issue : issues) {
      if (issue.getId().equals(newIssue.getId())) {
        found=true;
        break;
      }
    }
    if (!found) {
      fail("String_Node_Str" + queryIdIssuesCreatedLast2Days + "String_Node_Str");
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    fail(e.getMessage());
  }
}
Program: 99605
Project: 99605
Buggy source:
private List<Issue> getIssuesV104(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  int loaded=-1;
  int pageNum=1;
  int loadedOnPreviousStep;
  boolean readMore=false;
  do {
    loadedOnPreviousStep=loaded;
    URL url=buildGetIssuesByQueryURLRedmine104(projectKey,queryId,pageNum);
    StringBuffer responseXML=c.loadData(url);
    System.err.println(responseXML);
    List<Issue> foundIssues=parseIssuesFromXML(responseXML.toString());
    loaded=foundIssues.size();
    allTasks.addAll(foundIssues);
    readMore=false;
    if ((pageNum == 1) && loaded == tasksPerPage) {
      readMore=true;
    }
 else     if (loaded == loadedOnPreviousStep) {
      readMore=true;
    }
    pageNum++;
  }
 while (readMore);
  return allTasks;
}

Fixed version (ground truth):
private List<Issue> getIssuesV104(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  final int FIRST_REDMINE_PAGE=1;
  int pageNum=FIRST_REDMINE_PAGE;
  StringBuffer firstPage=null;
  do {
    URL url=buildGetIssuesByQueryURLRedmine104(projectKey,queryId,pageNum);
    StringBuffer responseXML=c.loadData(url);
    String responseXmlString=responseXML.toString();
    System.err.println(responseXmlString);
    if (pageNum == FIRST_REDMINE_PAGE) {
      firstPage=responseXML;
    }
 else {
      if (firstPage.toString().equals(responseXmlString)) {
        break;
      }
    }
    List<Issue> foundIssues=parseIssuesFromXML(responseXmlString);
    allTasks.addAll(foundIssues);
    pageNum++;
  }
 while (true);
  return allTasks;
}
Program: 99606
Project: 99606
Buggy source:
public List<Issue> getIssuesTrunk(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  int offsetIssuesNum=0;
  int totalIssuesFoundOnServer=UNKNOWN;
  int loaded=-1;
  do {
    URL url=buildGetIssuesByQueryURL(projectKey,queryId,offsetIssuesNum);
    StringBuffer responseXML=c.loadData(url);
    totalIssuesFoundOnServer=parseIssuesTotalCount(responseXML.toString());
    List<Issue> foundIssues=parseIssuesFromXML(responseXML.toString());
    loaded=foundIssues.size();
    allTasks.addAll(foundIssues);
    offsetIssuesNum+=loaded;
    if (totalIssuesFoundOnServer == UNKNOWN) {
      totalIssuesFoundOnServer=loaded;
    }
  }
 while (offsetIssuesNum < totalIssuesFoundOnServer);
  return allTasks;
}

Fixed version (ground truth):
private List<Issue> getIssuesTrunk(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  int offsetIssuesNum=0;
  int totalIssuesFoundOnServer=UNKNOWN;
  int loaded=-1;
  do {
    URL url=buildGetIssuesByQueryURL(projectKey,queryId,offsetIssuesNum);
    StringBuffer responseXML=c.loadData(url);
    totalIssuesFoundOnServer=parseIssuesTotalCount(responseXML.toString());
    List<Issue> foundIssues=parseIssuesFromXML(responseXML.toString());
    loaded=foundIssues.size();
    allTasks.addAll(foundIssues);
    offsetIssuesNum+=loaded;
    if (totalIssuesFoundOnServer == UNKNOWN) {
      totalIssuesFoundOnServer=loaded;
    }
  }
 while (offsetIssuesNum < totalIssuesFoundOnServer);
  return allTasks;
}
Program: 99607
Project: 99607
Buggy source:
public List<Issue> getIssuesV104(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  int loaded=-1;
  int pageNum=1;
  do {
    URL url=buildGetIssuesByQueryURLRedmine104(projectKey,queryId,pageNum);
    StringBuffer responseXML=c.loadData(url);
    System.err.println(responseXML);
    List<Issue> foundIssues=parseIssuesFromXML(responseXML.toString());
    loaded=foundIssues.size();
    allTasks.addAll(foundIssues);
    pageNum++;
  }
 while (loaded == 25);
  return allTasks;
}

Fixed version (ground truth):
private List<Issue> getIssuesV104(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  int loaded=-1;
  int pageNum=1;
  int loadedOnPreviousStep;
  do {
    loadedOnPreviousStep=loaded;
    URL url=buildGetIssuesByQueryURLRedmine104(projectKey,queryId,pageNum);
    StringBuffer responseXML=c.loadData(url);
    System.err.println(responseXML);
    List<Issue> foundIssues=parseIssuesFromXML(responseXML.toString());
    loaded=foundIssues.size();
    allTasks.addAll(foundIssues);
    pageNum++;
  }
 while (loaded >= loadedOnPreviousStep);
  return allTasks;
}
Program: 99608
Project: 99608
Buggy source:
public List<Issue> getIssues(String projectKey,String queryId) throws IOException, AuthenticationException {
  if (mode.equals(REDMINE_VERSION.TRUNK)) {
    return getIssuesTrunk(projectKey,queryId);
  }
 else   if (mode.equals(REDMINE_VERSION.V104)) {
    return getIssuesV104(projectKey,queryId);
  }
  throw new RuntimeException("String_Node_Str" + mode);
}

Fixed version (ground truth):
public List<Issue> getIssues(String projectKey,String queryId) throws IOException, AuthenticationException {
  return getIssuesV104(projectKey,queryId);
}
Program: 99609
Project: 99609
Buggy source:
private List<Issue> getIssuesV104(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  int loaded=-1;
  int pageNum=1;
  int loadedOnPreviousStep;
  boolean readMore=false;
  do {
    loadedOnPreviousStep=loaded;
    URL url=buildGetIssuesByQueryURLRedmine104(projectKey,queryId,pageNum);
    StringBuffer responseXML=c.loadData(url);
    System.err.println(responseXML);
    List<Issue> foundIssues=parseIssuesFromXML(responseXML.toString());
    loaded=foundIssues.size();
    allTasks.addAll(foundIssues);
    readMore=false;
    if ((pageNum == 1) && loaded == tasksPerPage) {
      readMore=true;
    }
 else     if (loaded == loadedOnPreviousStep) {
      readMore=true;
    }
    pageNum++;
  }
 while (readMore);
  return allTasks;
}

Fixed version (ground truth):
private List<Issue> getIssuesV104(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  final int FIRST_REDMINE_PAGE=1;
  int pageNum=FIRST_REDMINE_PAGE;
  StringBuffer firstPage=null;
  do {
    URL url=buildGetIssuesByQueryURLRedmine104(projectKey,queryId,pageNum);
    StringBuffer responseXML=c.loadData(url);
    String responseXmlString=responseXML.toString();
    System.err.println(responseXmlString);
    if (pageNum == FIRST_REDMINE_PAGE) {
      firstPage=responseXML;
    }
 else {
      if (firstPage.toString().equals(responseXmlString)) {
        break;
      }
    }
    List<Issue> foundIssues=parseIssuesFromXML(responseXmlString);
    allTasks.addAll(foundIssues);
    pageNum++;
  }
 while (true);
  return allTasks;
}
Program: 99610
Project: 99610
Buggy source:
public List<Issue> getIssuesTrunk(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  int offsetIssuesNum=0;
  int totalIssuesFoundOnServer=UNKNOWN;
  int loaded=-1;
  do {
    URL url=buildGetIssuesByQueryURL(projectKey,queryId,offsetIssuesNum);
    StringBuffer responseXML=c.loadData(url);
    totalIssuesFoundOnServer=parseIssuesTotalCount(responseXML.toString());
    List<Issue> foundIssues=parseIssuesFromXML(responseXML.toString());
    loaded=foundIssues.size();
    allTasks.addAll(foundIssues);
    offsetIssuesNum+=loaded;
    if (totalIssuesFoundOnServer == UNKNOWN) {
      totalIssuesFoundOnServer=loaded;
    }
  }
 while (offsetIssuesNum < totalIssuesFoundOnServer);
  return allTasks;
}

Fixed version (ground truth):
private List<Issue> getIssuesTrunk(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  int offsetIssuesNum=0;
  int totalIssuesFoundOnServer=UNKNOWN;
  int loaded=-1;
  do {
    URL url=buildGetIssuesByQueryURL(projectKey,queryId,offsetIssuesNum);
    StringBuffer responseXML=c.loadData(url);
    totalIssuesFoundOnServer=parseIssuesTotalCount(responseXML.toString());
    List<Issue> foundIssues=parseIssuesFromXML(responseXML.toString());
    loaded=foundIssues.size();
    allTasks.addAll(foundIssues);
    offsetIssuesNum+=loaded;
    if (totalIssuesFoundOnServer == UNKNOWN) {
      totalIssuesFoundOnServer=loaded;
    }
  }
 while (offsetIssuesNum < totalIssuesFoundOnServer);
  return allTasks;
}
Program: 99611
Project: 99611
Buggy source:
public List<Issue> getIssuesV104(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  int loaded=-1;
  int pageNum=1;
  do {
    URL url=buildGetIssuesByQueryURLRedmine104(projectKey,queryId,pageNum);
    StringBuffer responseXML=c.loadData(url);
    System.err.println(responseXML);
    List<Issue> foundIssues=parseIssuesFromXML(responseXML.toString());
    loaded=foundIssues.size();
    allTasks.addAll(foundIssues);
    pageNum++;
  }
 while (loaded == 25);
  return allTasks;
}

Fixed version (ground truth):
private List<Issue> getIssuesV104(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  int loaded=-1;
  int pageNum=1;
  int loadedOnPreviousStep;
  do {
    loadedOnPreviousStep=loaded;
    URL url=buildGetIssuesByQueryURLRedmine104(projectKey,queryId,pageNum);
    StringBuffer responseXML=c.loadData(url);
    System.err.println(responseXML);
    List<Issue> foundIssues=parseIssuesFromXML(responseXML.toString());
    loaded=foundIssues.size();
    allTasks.addAll(foundIssues);
    pageNum++;
  }
 while (loaded >= loadedOnPreviousStep);
  return allTasks;
}
Program: 99612
Project: 99612
Buggy source:
public List<Issue> getIssues(String projectKey,String queryId) throws IOException, AuthenticationException {
  if (mode.equals(REDMINE_VERSION.TRUNK)) {
    return getIssuesTrunk(projectKey,queryId);
  }
 else   if (mode.equals(REDMINE_VERSION.V104)) {
    return getIssuesV104(projectKey,queryId);
  }
  throw new RuntimeException("String_Node_Str" + mode);
}

Fixed version (ground truth):
public List<Issue> getIssues(String projectKey,String queryId) throws IOException, AuthenticationException {
  return getIssuesV104(projectKey,queryId);
}
Program: 99613
Project: 99613
Buggy source:
public Issue createIssue(String projectKey,Issue issue) throws IOException, AuthenticationException {
  String query=getCreateIssueURI();
  HttpPost httpPost=new HttpPost(query);
  if (trialMode) {
  }
  String xmlBody=getIssueXML(projectKey,issue);
  setEntity(httpPost,xmlBody);
  return sendRequestExpectResponse(httpPost);
}

Fixed version (ground truth):
public Issue createIssue(String projectKey,Issue issue) throws IOException, AuthenticationException {
  String query=getCreateIssueURI();
  HttpPost httpPost=new HttpPost(query);
  String xmlBody=getIssueXML(projectKey,issue);
  setEntity(httpPost,xmlBody);
  return sendRequestExpectResponse(httpPost);
}
Program: 99614
Project: 99614
Buggy source:
/** 
 * sample: http://demo.redmine.org/projects/ace/issues.xml?query_id=302
 */
private URL buildGetIssuesByQueryURL(String projectKey,String queryId){
  String charset="String_Node_Str";
  URL url=null;
  try {
    String query=String.format("String_Node_Str",URLEncoder.encode(projectKey,charset),URLEncoder.encode(queryId,charset));
    if ((apiAccessKey != null) && (!apiAccessKey.isEmpty())) {
      query+=String.format("String_Node_Str",URLEncoder.encode(apiAccessKey,charset));
    }
    url=new URL(host + query);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
  return url;
}

Fixed version (ground truth):
/** 
 * sample: http://demo.redmine.org/projects/ace/issues.xml?query_id=302
 */
private URL buildGetIssuesByQueryURL(String projectKey,String queryId,int offsetIssuesNum){
  String charset="String_Node_Str";
  URL url=null;
  try {
    String query=String.format("String_Node_Str",URLEncoder.encode(projectKey,charset),URLEncoder.encode(queryId,charset));
    query+="String_Node_Str" + offsetIssuesNum;
    query+="String_Node_Str" + tasksPerPage;
    if ((apiAccessKey != null) && (!apiAccessKey.isEmpty())) {
      query+=String.format("String_Node_Str",URLEncoder.encode(apiAccessKey,charset));
    }
    url=new URL(host + query);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
  return url;
}
Program: 99615
Project: 99615
Buggy source:
public List<Issue> getIssues(String projectKey,String queryId) throws IOException, AuthenticationException {
  URL url=buildGetIssuesByQueryURL(projectKey,queryId);
  WebConnector c=new WebConnector();
  StringBuffer response=c.loadData(url);
  System.err.println(response);
  List<Issue> foundIssues=parseIssuesFromXML(response.toString());
  return foundIssues;
}

Fixed version (ground truth):
public List<Issue> getIssues(String projectKey,String queryId) throws IOException, AuthenticationException {
  WebConnector c=new WebConnector();
  List<Issue> allTasks=new ArrayList<Issue>();
  int offsetIssuesNum=0;
  int totalIssuesFoundOnServer=-1;
  int loaded=-1;
  do {
    URL url=buildGetIssuesByQueryURL(projectKey,queryId,offsetIssuesNum);
    StringBuffer responseXML=c.loadData(url);
    System.err.println(responseXML);
    totalIssuesFoundOnServer=parseIssuesTotalCount(responseXML.toString());
    List<Issue> foundIssues=parseIssuesFromXML(responseXML.toString());
    loaded=foundIssues.size();
    System.err.println("String_Node_Str" + totalIssuesFoundOnServer + "String_Node_Str"+ loaded);
    allTasks.addAll(foundIssues);
    offsetIssuesNum+=loaded;
  }
 while (offsetIssuesNum < totalIssuesFoundOnServer);
  return allTasks;
}
Program: 99617
Project: 99617
Buggy source:
@Override public IMethod getMethod(Selector selector){
  try {
    computeMethodMapIfNeeded();
  }
 catch (  InvalidClassFileException e1) {
    e1.printStackTrace();
    Assertions.UNREACHABLE();
  }
  IMethod result=methodMap.get(selector);
  if (result != null) {
    return result;
  }
  if (inheritCache != null) {
    result=inheritCache.get(selector);
    if (result != null) {
      return result;
    }
  }
  if (!selector.equals(MethodReference.clinitSelector) && !selector.equals(MethodReference.initSelector)) {
    IClass superclass=getSuperclass();
    if (superclass != null) {
      IMethod inherit=superclass.getMethod(selector);
      if (inherit != null) {
        if (inheritCache == null) {
          inheritCache=new BimodalMap<>(5);
        }
        inheritCache.put(selector,inherit);
        return inherit;
      }
    }
  }
  for (  IClass iface : getAllImplementedInterfaces()) {
    for (    IMethod m : iface.getDeclaredMethods()) {
      if (!m.isAbstract() && m.getSelector().equals(selector)) {
        if (inheritCache == null) {
          inheritCache=new BimodalMap<>(5);
        }
        inheritCache.put(selector,m);
        return m;
      }
    }
  }
  if (inheritCache == null) {
    inheritCache=new BimodalMap<>(5);
  }
  inheritCache.put(selector,null);
  return null;
}

Fixed version (ground truth):
@Override public IMethod getMethod(Selector selector){
  try {
    computeMethodMapIfNeeded();
  }
 catch (  InvalidClassFileException e1) {
    e1.printStackTrace();
    Assertions.UNREACHABLE();
  }
  IMethod result=methodMap.get(selector);
  if (result != null) {
    return result;
  }
  if (inheritCache != null) {
    result=inheritCache.get(selector);
    if (result != null) {
      return result;
    }
  }
  if (!selector.equals(MethodReference.clinitSelector) && !selector.getName().equals(MethodReference.initAtom)) {
    IClass superclass=getSuperclass();
    if (superclass != null) {
      IMethod inherit=superclass.getMethod(selector);
      if (inherit != null) {
        if (inheritCache == null) {
          inheritCache=new BimodalMap<>(5);
        }
        inheritCache.put(selector,inherit);
        return inherit;
      }
    }
  }
  for (  IClass iface : getAllImplementedInterfaces()) {
    for (    IMethod m : iface.getDeclaredMethods()) {
      if (!m.isAbstract() && m.getSelector().equals(selector)) {
        if (inheritCache == null) {
          inheritCache=new BimodalMap<>(5);
        }
        inheritCache.put(selector,m);
        return m;
      }
    }
  }
  if (inheritCache == null) {
    inheritCache=new BimodalMap<>(5);
  }
  inheritCache.put(selector,null);
  return null;
}
Program: 99619
Project: 99619
Buggy source:
/** 
 * Return the Set of (ModuleEntry) source files found in a module.
 * @param M the module
 * @return the Set of source files in the module
 * @throws IOException
 */
private Set<ModuleEntry> getSourceFiles(Module M) throws IOException {
  if (DEBUG_LEVEL > 0) {
    System.err.println("String_Node_Str" + M);
  }
  HashSet<ModuleEntry> result=HashSetFactory.make();
  for (Iterator it=M.getEntries(); it.hasNext(); ) {
    ModuleEntry entry=(ModuleEntry)it.next();
    if (DEBUG_LEVEL > 0) {
      System.err.println("String_Node_Str" + entry);
    }
    if (entry.isSourceFile()) {
      if (DEBUG_LEVEL > 0) {
        System.err.println("String_Node_Str" + entry);
      }
      result.add(entry);
    }
 else     if (entry.isModuleFile()) {
      result.addAll(getSourceFiles(entry.asModule()));
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Return the Set of (ModuleEntry) source files found in a module.
 * @param M the module
 * @return the Set of source files in the module
 * @throws IOException
 */
@SuppressWarnings("String_Node_Str") private Set<ModuleEntry> getSourceFiles(Module M) throws IOException {
  if (DEBUG_LEVEL > 0) {
    System.err.println("String_Node_Str" + M);
  }
  HashSet<ModuleEntry> result=HashSetFactory.make();
  for (Iterator it=M.getEntries(); it.hasNext(); ) {
    ModuleEntry entry=(ModuleEntry)it.next();
    if (DEBUG_LEVEL > 0) {
      System.err.println("String_Node_Str" + entry);
    }
    if (entry.isSourceFile()) {
      if (DEBUG_LEVEL > 0) {
        System.err.println("String_Node_Str" + entry);
      }
      result.add(entry);
    }
 else     if (entry.isModuleFile()) {
      result.addAll(getSourceFiles(entry.asModule()));
    }
  }
  return result;
}
Program: 99620
Project: 99620
Buggy source:
@Override public IClass lookupClass(TypeName className){
  if (className == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (DEBUG_LEVEL > 1) {
    System.err.println(this + "String_Node_Str" + className);
  }
  if (className.isArrayType()) {
    return arrayClassLoader.lookupClass(className,this,cha);
  }
  IClassLoader parent=getParent();
  if (parent != null) {
    IClass result=parent.lookupClass(className);
    if (result != null) {
      return result;
    }
  }
  IClass result=loadedClasses.get(className);
  return result;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public IClass lookupClass(TypeName className){
  if (className == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (DEBUG_LEVEL > 1) {
    System.err.println(this + "String_Node_Str" + className);
  }
  if (className.isArrayType()) {
    return arrayClassLoader.lookupClass(className,this,cha);
  }
  IClassLoader parent=getParent();
  if (parent != null) {
    IClass result=parent.lookupClass(className);
    if (result != null) {
      return result;
    }
  }
  IClass result=loadedClasses.get(className);
  return result;
}
Program: 99621
Project: 99621
Buggy source:
@Override public void removeAll(Collection<IClass> toRemove){
  if (toRemove == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (Iterator<IClass> it=toRemove.iterator(); it.hasNext(); ) {
    IClass klass=it.next();
    if (DEBUG_LEVEL > 0) {
      System.err.println("String_Node_Str" + klass.getName());
    }
    loadedClasses.remove(klass.getName());
    sourceMap.remove(klass.getName());
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void removeAll(Collection<IClass> toRemove){
  if (toRemove == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (Iterator<IClass> it=toRemove.iterator(); it.hasNext(); ) {
    IClass klass=it.next();
    if (DEBUG_LEVEL > 0) {
      System.err.println("String_Node_Str" + klass.getName());
    }
    loadedClasses.remove(klass.getName());
    sourceMap.remove(klass.getName());
  }
}
Program: 99622
Project: 99622
Buggy source:
/** 
 * Return the Set of (ModuleEntry) class files found in a module.
 * @param M the module
 * @return the Set of class Files in the module
 * @throws IOException
 */
private Set<ModuleEntry> getClassFiles(Module M) throws IOException {
  if (DEBUG_LEVEL > 0) {
    System.err.println("String_Node_Str" + M);
  }
  HashSet<ModuleEntry> result=HashSetFactory.make();
  for (Iterator it=M.getEntries(); it.hasNext(); ) {
    ModuleEntry entry=(ModuleEntry)it.next();
    if (DEBUG_LEVEL > 0) {
      System.err.println("String_Node_Str" + entry);
    }
    if (entry.isClassFile()) {
      if (DEBUG_LEVEL > 0) {
        System.err.println("String_Node_Str" + entry);
      }
      result.add(entry);
    }
 else     if (entry.isModuleFile()) {
      Set<ModuleEntry> s=getClassFiles(entry.asModule());
      removeClassFiles(s,result);
      result.addAll(s);
    }
 else {
      if (DEBUG_LEVEL > 0) {
        System.err.println("String_Node_Str" + entry);
      }
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Return the Set of (ModuleEntry) class files found in a module.
 * @param M the module
 * @return the Set of class Files in the module
 * @throws IOException
 */
@SuppressWarnings("String_Node_Str") private Set<ModuleEntry> getClassFiles(Module M) throws IOException {
  if (DEBUG_LEVEL > 0) {
    System.err.println("String_Node_Str" + M);
  }
  HashSet<ModuleEntry> result=HashSetFactory.make();
  for (Iterator it=M.getEntries(); it.hasNext(); ) {
    ModuleEntry entry=(ModuleEntry)it.next();
    if (DEBUG_LEVEL > 0) {
      System.err.println("String_Node_Str" + entry);
    }
    if (entry.isClassFile()) {
      if (DEBUG_LEVEL > 0) {
        System.err.println("String_Node_Str" + entry);
      }
      result.add(entry);
    }
 else     if (entry.isModuleFile()) {
      Set<ModuleEntry> s=getClassFiles(entry.asModule());
      removeClassFiles(s,result);
      result.addAll(s);
    }
 else {
      if (DEBUG_LEVEL > 0) {
        System.err.println("String_Node_Str" + entry);
      }
    }
  }
  return result;
}
Program: 99623
Project: 99623
Buggy source:
/** 
 * @param loader class loader reference identifying this loader
 * @param parent parent loader for delegation
 * @param exclusions set of classes to exclude from loading
 */
public ClassLoaderImpl(ClassLoaderReference loader,ArrayClassLoader arrayClassLoader,IClassLoader parent,SetOfClasses exclusions,IClassHierarchy cha){
  if (loader == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.arrayClassLoader=arrayClassLoader;
  this.parent=parent;
  this.loader=loader;
  this.exclusions=exclusions;
  this.cha=cha;
  if (DEBUG_LEVEL > 0) {
    System.err.println("String_Node_Str" + loader);
  }
}

Fixed version (ground truth):
/** 
 * @param loader class loader reference identifying this loader
 * @param parent parent loader for delegation
 * @param exclusions set of classes to exclude from loading
 */
@SuppressWarnings("String_Node_Str") public ClassLoaderImpl(ClassLoaderReference loader,ArrayClassLoader arrayClassLoader,IClassLoader parent,SetOfClasses exclusions,IClassHierarchy cha){
  if (loader == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.arrayClassLoader=arrayClassLoader;
  this.parent=parent;
  this.loader=loader;
  this.exclusions=exclusions;
  this.cha=cha;
  if (DEBUG_LEVEL > 0) {
    System.err.println("String_Node_Str" + loader);
  }
}
Program: 99624
Project: 99624
Buggy source:
/** 
 * Initialize internal data structures
 * @throws IllegalArgumentException if modules is null
 */
@Override public void init(List<Module> modules) throws IOException {
  if (modules == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Set<ModuleEntry> classModuleEntries=HashSetFactory.make();
  Set<ModuleEntry> sourceModuleEntries=HashSetFactory.make();
  for (Iterator<Module> it=modules.iterator(); it.hasNext(); ) {
    Module archive=it.next();
    if (DEBUG_LEVEL > 0) {
      System.err.println("String_Node_Str" + archive);
    }
    if (OPTIMIZE_JAR_FILE_IO && archive instanceof JarFileModule) {
      getJarFileContents((JarFileModule)archive);
    }
    Set<ModuleEntry> classFiles=getClassFiles(archive);
    removeClassFiles(classFiles,classModuleEntries);
    Set<ModuleEntry> sourceFiles=getSourceFiles(archive);
    Map<String,Object> allClassAndSourceFileContents=null;
    if (OPTIMIZE_JAR_FILE_IO) {
    }
    loadAllClasses(classFiles,allClassAndSourceFileContents);
    loadAllSources(sourceFiles);
    for (Iterator<ModuleEntry> it2=classFiles.iterator(); it2.hasNext(); ) {
      ModuleEntry file=it2.next();
      classModuleEntries.add(file);
    }
    for (Iterator<ModuleEntry> it2=sourceFiles.iterator(); it2.hasNext(); ) {
      ModuleEntry file=it2.next();
      sourceModuleEntries.add(file);
    }
  }
}

Fixed version (ground truth):
/** 
 * Initialize internal data structures
 * @throws IllegalArgumentException if modules is null
 */
@SuppressWarnings("String_Node_Str") @Override public void init(List<Module> modules) throws IOException {
  if (modules == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Set<ModuleEntry> classModuleEntries=HashSetFactory.make();
  Set<ModuleEntry> sourceModuleEntries=HashSetFactory.make();
  for (Iterator<Module> it=modules.iterator(); it.hasNext(); ) {
    Module archive=it.next();
    if (DEBUG_LEVEL > 0) {
      System.err.println("String_Node_Str" + archive);
    }
    if (OPTIMIZE_JAR_FILE_IO && archive instanceof JarFileModule) {
      getJarFileContents((JarFileModule)archive);
    }
    Set<ModuleEntry> classFiles=getClassFiles(archive);
    removeClassFiles(classFiles,classModuleEntries);
    Set<ModuleEntry> sourceFiles=getSourceFiles(archive);
    Map<String,Object> allClassAndSourceFileContents=null;
    if (OPTIMIZE_JAR_FILE_IO) {
    }
    loadAllClasses(classFiles,allClassAndSourceFileContents);
    loadAllSources(sourceFiles);
    for (Iterator<ModuleEntry> it2=classFiles.iterator(); it2.hasNext(); ) {
      ModuleEntry file=it2.next();
      classModuleEntries.add(file);
    }
    for (Iterator<ModuleEntry> it2=sourceFiles.iterator(); it2.hasNext(); ) {
      ModuleEntry file=it2.next();
      sourceModuleEntries.add(file);
    }
  }
}
Program: 99625
Project: 99625
Buggy source:
/** 
 * Set up mapping from type name to Module Entry
 */
protected void loadAllSources(Set<ModuleEntry> sourceModules){
  for (Iterator<ModuleEntry> it=sourceModules.iterator(); it.hasNext(); ) {
    ModuleEntry entry=it.next();
    String className=entry.getClassName().replace('.','/');
    className=className.replace(File.separatorChar,'/');
    className="String_Node_Str" + ((className.startsWith("String_Node_Str")) ? className.substring(1) : className);
    TypeName T=TypeName.string2TypeName(className);
    boolean success=false;
    if (loadedClasses.get(T) != null) {
      if (DEBUG_LEVEL > 0) {
        System.err.println("String_Node_Str" + T + "String_Node_Str"+ entry.getName());
      }
      sourceMap.put(T,entry);
      success=true;
    }
 else {
      while (className.indexOf('/') > 0) {
        className="String_Node_Str" + className.substring(className.indexOf('/') + 1,className.length());
        TypeName T2=TypeName.string2TypeName(className);
        if (loadedClasses.get(T2) != null) {
          if (DEBUG_LEVEL > 0) {
            System.err.println("String_Node_Str" + T2 + "String_Node_Str"+ entry.getName());
          }
          sourceMap.put(T2,entry);
          success=true;
          break;
        }
      }
    }
    if (success == false) {
      if (DEBUG_LEVEL > 0) {
        System.err.println("String_Node_Str" + T + "String_Node_Str"+ entry.getName());
      }
      sourceMap.put(T,entry);
    }
  }
}

Fixed version (ground truth):
/** 
 * Set up mapping from type name to Module Entry
 */
@SuppressWarnings("String_Node_Str") protected void loadAllSources(Set<ModuleEntry> sourceModules){
  for (Iterator<ModuleEntry> it=sourceModules.iterator(); it.hasNext(); ) {
    ModuleEntry entry=it.next();
    String className=entry.getClassName().replace('.','/');
    className=className.replace(File.separatorChar,'/');
    className="String_Node_Str" + ((className.startsWith("String_Node_Str")) ? className.substring(1) : className);
    TypeName T=TypeName.string2TypeName(className);
    boolean success=false;
    if (loadedClasses.get(T) != null) {
      if (DEBUG_LEVEL > 0) {
        System.err.println("String_Node_Str" + T + "String_Node_Str"+ entry.getName());
      }
      sourceMap.put(T,entry);
      success=true;
    }
 else {
      while (className.indexOf('/') > 0) {
        className="String_Node_Str" + className.substring(className.indexOf('/') + 1,className.length());
        TypeName T2=TypeName.string2TypeName(className);
        if (loadedClasses.get(T2) != null) {
          if (DEBUG_LEVEL > 0) {
            System.err.println("String_Node_Str" + T2 + "String_Node_Str"+ entry.getName());
          }
          sourceMap.put(T2,entry);
          success=true;
          break;
        }
      }
    }
    if (success == false) {
      if (DEBUG_LEVEL > 0) {
        System.err.println("String_Node_Str" + T + "String_Node_Str"+ entry.getName());
      }
      sourceMap.put(T,entry);
    }
  }
}
Program: 99627
Project: 99627
Buggy source:
/** 
 * get the "called" (sic) nodes for a return site; i.e., the exit nodes that flow directly to this return site.
 * @see com.ibm.wala.dataflow.IFDS.ISupergraph#getCalledNodes(java.lang.Object)
 */
@Override public Iterator<T> getCalledNodes(T ret){
  if (DEBUG_LEVEL > 1) {
    System.err.println(getClass() + "String_Node_Str" + ret);
    System.err.println("String_Node_Str" + Iterator2Collection.toSet(new FilterIterator<Object>(getSuccNodes(ret),exitFilter)));
  }
  return new FilterIterator<T>(getSuccNodes(ret),exitFilter);
}

Fixed version (ground truth):
/** 
 * get the "called" (sic) nodes for a return site; i.e., the exit nodes that flow directly to this return site.
 * @see com.ibm.wala.dataflow.IFDS.ISupergraph#getCalledNodes(java.lang.Object)
 */
@SuppressWarnings("String_Node_Str") @Override public Iterator<T> getCalledNodes(T ret){
  if (DEBUG_LEVEL > 1) {
    System.err.println(getClass() + "String_Node_Str" + ret);
    System.err.println("String_Node_Str" + Iterator2Collection.toSet(new FilterIterator<Object>(getSuccNodes(ret),exitFilter)));
  }
  return new FilterIterator<T>(getSuccNodes(ret),exitFilter);
}
Program: 99628
Project: 99628
Buggy source:
/** 
 * Record that we've discovered a call edge <c,d1> -> <s_p, d2>
 * @param c global number identifying the call site node
 * @param d1 source fact at the call edge
 * @param d2 result fact (result of the call flow function)
 */
public void addCallEdge(int c,int d1,int d2){
  if (TabulationSolver.DEBUG_LEVEL > 0) {
    System.err.println("String_Node_Str" + c + "String_Node_Str"+ d1+ "String_Node_Str"+ d2);
  }
  if (d1 == d2) {
    BimodalMutableIntSet s=(BimodalMutableIntSet)identityEdges.get(d1);
    if (s == null) {
      s=new BimodalMutableIntSet();
      identityEdges.set(d1,s);
    }
    s.add(c);
  }
 else {
    IBinaryNaturalRelation R=edges.get(d2);
    if (R == null) {
      R=new BasicNaturalRelation(new byte[]{BasicNaturalRelation.TWO_LEVEL},BasicNaturalRelation.TWO_LEVEL);
      edges.set(d2,R);
    }
    R.add(c,d1);
  }
}

Fixed version (ground truth):
/** 
 * Record that we've discovered a call edge <c,d1> -> <s_p, d2>
 * @param c global number identifying the call site node
 * @param d1 source fact at the call edge
 * @param d2 result fact (result of the call flow function)
 */
@SuppressWarnings("String_Node_Str") public void addCallEdge(int c,int d1,int d2){
  if (TabulationSolver.DEBUG_LEVEL > 0) {
    System.err.println("String_Node_Str" + c + "String_Node_Str"+ d1+ "String_Node_Str"+ d2);
  }
  if (d1 == d2) {
    BimodalMutableIntSet s=(BimodalMutableIntSet)identityEdges.get(d1);
    if (s == null) {
      s=new BimodalMutableIntSet();
      identityEdges.set(d1,s);
    }
    s.add(c);
  }
 else {
    IBinaryNaturalRelation R=edges.get(d2);
    if (R == null) {
      R=new BasicNaturalRelation(new byte[]{BasicNaturalRelation.TWO_LEVEL},BasicNaturalRelation.TWO_LEVEL);
      edges.set(d2,R);
    }
    R.add(c,d1);
  }
}
Program: 99629
Project: 99629
Buggy source:
/** 
 * @param c
 * @param d2
 * @return set of d1 s.t. {@literal <c, d1> -> <s_p, d2>} was recorded as call flow, or null if none found.
 */
public IntSet getCallFlowSources(int c,int d2){
  if (c < 0) {
    throw new IllegalArgumentException("String_Node_Str" + c);
  }
  if (d2 < 0) {
    throw new IllegalArgumentException("String_Node_Str" + d2);
  }
  IntSet s=identityEdges.get(d2);
  IBinaryNaturalRelation R=edges.get(d2);
  IntSet result=null;
  if (R == null) {
    if (s != null) {
      result=s.contains(c) ? SparseIntSet.singleton(d2) : null;
    }
  }
 else {
    if (s == null) {
      result=R.getRelated(c);
    }
 else {
      if (s.contains(c)) {
        if (R.getRelated(c) == null) {
          result=SparseIntSet.singleton(d2);
        }
 else {
          result=MutableSparseIntSet.make(R.getRelated(c));
          ((MutableSparseIntSet)result).add(d2);
        }
      }
 else {
        result=R.getRelated(c);
      }
    }
  }
  if (TabulationSolver.DEBUG_LEVEL > 0) {
    System.err.println("String_Node_Str" + c + "String_Node_Str"+ d2+ "String_Node_Str"+ result);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @param c
 * @param d2
 * @return set of d1 s.t. {@literal <c, d1> -> <s_p, d2>} was recorded as call flow, or null if none found.
 */
@SuppressWarnings("String_Node_Str") public IntSet getCallFlowSources(int c,int d2){
  if (c < 0) {
    throw new IllegalArgumentException("String_Node_Str" + c);
  }
  if (d2 < 0) {
    throw new IllegalArgumentException("String_Node_Str" + d2);
  }
  IntSet s=identityEdges.get(d2);
  IBinaryNaturalRelation R=edges.get(d2);
  IntSet result=null;
  if (R == null) {
    if (s != null) {
      result=s.contains(c) ? SparseIntSet.singleton(d2) : null;
    }
  }
 else {
    if (s == null) {
      result=R.getRelated(c);
    }
 else {
      if (s.contains(c)) {
        if (R.getRelated(c) == null) {
          result=SparseIntSet.singleton(d2);
        }
 else {
          result=MutableSparseIntSet.make(R.getRelated(c));
          ((MutableSparseIntSet)result).add(d2);
        }
      }
 else {
        result=R.getRelated(c);
      }
    }
  }
  if (TabulationSolver.DEBUG_LEVEL > 0) {
    System.err.println("String_Node_Str" + c + "String_Node_Str"+ d2+ "String_Node_Str"+ result);
  }
  return result;
}