}
}
else if (stmt instanceof ConditionalBranch)
{
ConditionalBranch cond= (ConditionalBranch) stmt;
if (bytes.getIndex() == cond.getTargetIndex())
{
}
else
{
Node elseNode= graph.getOrCreateNode(bytes.getIndex());
Node ifNode;
if (cond.getTargetIndex() <= pc)
{
Node[] nodes= graph.getOrSplitNodeAt(cNode, cond.getTargetIndex());
cNode= nodes[0];
ifNode= nodes[1];
}
else
{
ifNode= graph.getOrCreateNode(cond.getTargetIndex());
}
BooleanExpression be= new BooleanExpression(cond.getExpression());
graph.addIfElseEdge(cNode, ifNode, elseNode, be);
expressionsToVariables(cNode, false);
cNode= null;
if (lastJump != null && tryStatements.size() > 0 && (cond.getBeginIndex() - 1 == lastJump.getEndIndex()))
whileTryProblemDetected= true;
for (TryStatement tryStatement : tryStatements)
{
boolean nextToTryBegining= tryStatement.getBeginIndex() - 1 == cond.getEndIndex();
boolean sameThanTryBegining= tryStatement.getBeginIndex() == cond.getBeginIndex();
// sameThanTryBegining= false; //TODO identificar si es un while!
if (nextToTryBegining || sameThanTryBegining)
whileTryProblemDetected= true;
}
if (!whileTryProblemDetected)
for (CodeException codeException : code.getExceptionTable())
{
boolean nextToTryBegining= codeException.getEndPC() == cond.getTargetIndex();
if (nextToTryBegining)
whileTryProblemDetected= true;
}
if (whileTryProblemDetected)