Program: 12168
Project: 12168
Buggy source:
public Set<CFGNode> getImmediatelyNestedNodesInFalseControlFlow(){
  Set<CFGNode> nestedNodes=new LinkedHashSet<CFGNode>();
  AbstractStatement abstractStatement=getStatement();
  if (abstractStatement instanceof CompositeStatementObject) {
    Set<AbstractStatement> nestedStatements=new LinkedHashSet<AbstractStatement>();
    CompositeStatementObject composite=(CompositeStatementObject)abstractStatement;
    List<AbstractStatement> statements=composite.getStatements();
    if (statements.size() == 2) {
      AbstractStatement falseControlFlowStatement=statements.get(1);
      if (falseControlFlowStatement.getStatement() instanceof Block) {
        CompositeStatementObject blockStatement=(CompositeStatementObject)falseControlFlowStatement;
        nestedStatements.addAll(blockStatement.getStatements());
      }
 else       nestedStatements.add(falseControlFlowStatement);
      List<BasicBlock> nestedBasicBlocks=getNestedBasicBlocks();
      nestedBasicBlocks.add(0,getBasicBlock());
      for (      BasicBlock nestedBlock : nestedBasicBlocks) {
        List<CFGNode> nodes=nestedBlock.getAllNodes();
        for (        CFGNode node : nodes) {
          if (nestedStatements.contains(node.getStatement())) {
            nestedNodes.add(node);
          }
        }
      }
    }
  }
  return nestedNodes;
}

Fixed version (ground truth):
public Set<CFGNode> getImmediatelyNestedNodesInFalseControlFlow(){
  Set<CFGNode> nestedNodes=new LinkedHashSet<CFGNode>();
  AbstractStatement abstractStatement=getStatement();
  if (abstractStatement instanceof CompositeStatementObject) {
    Set<AbstractStatement> nestedStatements=new LinkedHashSet<AbstractStatement>();
    CompositeStatementObject composite=(CompositeStatementObject)abstractStatement;
    List<AbstractStatement> statements=composite.getStatements();
    if (statements.size() == 2) {
      AbstractStatement falseControlFlowStatement=statements.get(1);
      if (falseControlFlowStatement.getStatement() instanceof Block) {
        CompositeStatementObject blockStatement=(CompositeStatementObject)falseControlFlowStatement;
        for (        AbstractStatement statementInsideBlock : blockStatement.getStatements()) {
          if (statementInsideBlock.getStatement() instanceof TryStatement) {
            CompositeStatementObject tryStatement=(CompositeStatementObject)statementInsideBlock;
            processTryStatement(nestedStatements,tryStatement);
          }
 else           nestedStatements.add(statementInsideBlock);
        }
      }
 else       if (falseControlFlowStatement.getStatement() instanceof TryStatement) {
        CompositeStatementObject tryStatement=(CompositeStatementObject)falseControlFlowStatement;
        processTryStatement(nestedStatements,tryStatement);
      }
 else       nestedStatements.add(falseControlFlowStatement);
      List<BasicBlock> nestedBasicBlocks=getNestedBasicBlocks();
      nestedBasicBlocks.add(0,getBasicBlock());
      for (      BasicBlock nestedBlock : nestedBasicBlocks) {
        List<CFGNode> nodes=nestedBlock.getAllNodes();
        for (        CFGNode node : nodes) {
          if (nestedStatements.contains(node.getStatement())) {
            nestedNodes.add(node);
          }
        }
      }
    }
  }
  return nestedNodes;
}