Program: 160767
Project: 160767
Buggy source:
/** 
 * if(true) ; else ; if(true) foo(); else bar();
 */
@Test public void testMinimalIfElementCreation() throws IOException, InvalidCSVFile {
  String nodeStr=nodeHeader;
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  String edgeStr=edgeHeader;
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  handle(nodeStr,edgeStr);
  ASTNode node=ast.getNodeById((long)4);
  ASTNode node2=ast.getNodeById((long)9);
  ASTNode node3=ast.getNodeById((long)13);
  ASTNode node4=ast.getNodeById((long)21);
  assertThat(node,instanceOf(PHPIfElement.class));
  assertEquals(2,node.getChildCount());
  assertNull(((PHPIfElement)node).getStatement());
  assertThat(node2,instanceOf(PHPIfElement.class));
  assertEquals(2,node2.getChildCount());
  assertNull(((PHPIfElement)node2).getCondition());
  assertNull(((PHPIfElement)node2).getStatement());
  assertThat(node3,instanceOf(PHPIfElement.class));
  assertEquals(2,node3.getChildCount());
  assertThat(((PHPIfElement)node3).getStatement(),not(instanceOf(CompoundStatement.class)));
  assertThat(((PHPIfElement)node3).getStatement(),instanceOf(ExpressionStatement.class));
  assertEquals(ast.getNodeById((long)17),((ExpressionStatement)((PHPIfElement)node3).getStatement()).getExpression());
  assertThat(node4,instanceOf(PHPIfElement.class));
  assertEquals(2,node4.getChildCount());
  assertNull(((PHPIfElement)node4).getCondition());
  assertThat(((PHPIfElement)node4).getStatement(),not(instanceOf(CompoundStatement.class)));
  assertThat(((PHPIfElement)node4).getStatement(),instanceOf(ExpressionStatement.class));
  assertEquals(ast.getNodeById((long)23),((ExpressionStatement)((PHPIfElement)node4).getStatement()).getExpression());
}

Fixed version (ground truth):
/** 
 * if(true) ; else ; if(true) foo(); else bar();
 */
@Test public void testMinimalIfElementCreation() throws IOException, InvalidCSVFile {
  String nodeStr=nodeHeader;
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  nodeStr+="String_Node_Str";
  String edgeStr=edgeHeader;
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  edgeStr+="String_Node_Str";
  handle(nodeStr,edgeStr);
  ASTNode node=ast.getNodeById((long)4);
  ASTNode node2=ast.getNodeById((long)9);
  ASTNode node3=ast.getNodeById((long)13);
  ASTNode node4=ast.getNodeById((long)21);
  assertThat(node,instanceOf(PHPIfElement.class));
  assertEquals(2,node.getChildCount());
  assertNull(((PHPIfElement)node).getStatement());
  assertThat(node2,instanceOf(PHPIfElement.class));
  assertEquals(2,node2.getChildCount());
  assertNull(((PHPIfElement)node2).getCondition());
  assertNull(((PHPIfElement)node2).getStatement());
  assertThat(node3,instanceOf(PHPIfElement.class));
  assertEquals(2,node3.getChildCount());
  assertThat(((PHPIfElement)node3).getStatement(),not(instanceOf(CompoundStatement.class)));
  assertThat(((PHPIfElement)node3).getStatement(),instanceOf(ExpressionStatement.class));
  assertEquals(ast.getNodeById((long)17),((ExpressionStatement)((PHPIfElement)node3).getStatement()).getExpression());
  assertEquals(Long.valueOf(17),((ExpressionStatement)((PHPIfElement)node3).getStatement()).getNodeId());
  assertThat(node4,instanceOf(PHPIfElement.class));
  assertEquals(2,node4.getChildCount());
  assertNull(((PHPIfElement)node4).getCondition());
  assertThat(((PHPIfElement)node4).getStatement(),not(instanceOf(CompoundStatement.class)));
  assertThat(((PHPIfElement)node4).getStatement(),instanceOf(ExpressionStatement.class));
  assertEquals(ast.getNodeById((long)23),((ExpressionStatement)((PHPIfElement)node4).getStatement()).getExpression());
  assertEquals(Long.valueOf(23),((ExpressionStatement)((PHPIfElement)node4).getStatement()).getNodeId());
}