private static List<ExceptionHandler> findHandlers(final InstructionBlock tryBlock, final Collection<ExceptionHandler> handlers) { List<ExceptionHandler> result = null; for (final ExceptionHandler handler : handlers) { if (handler.getTryBlock().equals(tryBlock)) { if (result == null) { result = new ArrayList<>(); } result.add(handler); } } if (result == null) { return Collections.emptyList(); } Collections.sort( result, new Comparator<ExceptionHandler>() { @Override public int compare(@NotNull final ExceptionHandler o1, @NotNull final ExceptionHandler o2) { return Integer.compare( o1.getHandlerBlock().getFirstInstruction().getOffset(), o2.getHandlerBlock().getFirstInstruction().getOffset() ); } } ); return result; }
private static List<ExceptionHandler> findHandlers(final InstructionBlock tryBlock, final Collection<ExceptionHandler> handlers) { List<ExceptionHandler> result = null; for (final ExceptionHandler handler : handlers) { if (handler.getTryBlock().equals(tryBlock)) { if (result == null) { result = new ArrayList<>(); } result.add(handler); } } if (result == null) { return Collections.emptyList(); } Collections.sort( result, new Comparator<ExceptionHandler>() { @Override public int compare(@NotNull final ExceptionHandler o1, @NotNull final ExceptionHandler o2) { return Integer.compare( o1.getHandlerBlock().getFirstInstruction().getOffset(), o2.getHandlerBlock().getFirstInstruction().getOffset() ); } } ); return result; }
private static List<ExceptionHandler> findHandlers(final InstructionBlock tryBlock, final Collection<ExceptionHandler> handlers) { List<ExceptionHandler> result = null; for (final ExceptionHandler handler : handlers) { if (handler.getTryBlock().equals(tryBlock)) { if (result == null) { result = new ArrayList<>(); } result.add(handler); } } if (result == null) { return Collections.emptyList(); } Collections.sort( result, new Comparator<ExceptionHandler>() { @Override public int compare(@NotNull final ExceptionHandler o1, @NotNull final ExceptionHandler o2) { return Integer.compare( o1.getHandlerBlock().getFirstInstruction().getOffset(), o2.getHandlerBlock().getFirstInstruction().getOffset() ); } } ); return result; }
private static List<ExceptionHandler> findDuplicateHandlers(final ExceptionHandler handler, final Collection<ExceptionHandler> handlers) { final List<ExceptionHandler> result = new ArrayList<>(); for (final ExceptionHandler other : handlers) { if (other.getHandlerBlock().equals(handler.getHandlerBlock())) { if (handler.isFinally()) { if (other.isFinally()) { result.add(other); } } else if (other.isCatch() && MetadataHelper.isSameType(other.getCatchType(), handler.getCatchType())) { result.add(other); } } } Collections.sort( result, new Comparator<ExceptionHandler>() { @Override public int compare(@NotNull final ExceptionHandler o1, @NotNull final ExceptionHandler o2) { return Integer.compare( o1.getTryBlock().getFirstInstruction().getOffset(), o2.getTryBlock().getFirstInstruction().getOffset() ); } } ); return result; }
final ExceptionHandler otherHandler = handlers.get(j); if (otherHandler.getTryBlock().equals(handler.getTryBlock())) { terminals.add(findHandlerNode(_cfg, otherHandler));
private static List<ExceptionHandler> findDuplicateHandlers(final ExceptionHandler handler, final Collection<ExceptionHandler> handlers) { final List<ExceptionHandler> result = new ArrayList<>(); for (final ExceptionHandler other : handlers) { if (other.getHandlerBlock().equals(handler.getHandlerBlock())) { if (handler.isFinally()) { if (other.isFinally()) { result.add(other); } } else if (other.isCatch() && MetadataHelper.isSameType(other.getCatchType(), handler.getCatchType())) { result.add(other); } } } Collections.sort( result, new Comparator<ExceptionHandler>() { @Override public int compare(@NotNull final ExceptionHandler o1, @NotNull final ExceptionHandler o2) { return Integer.compare( o1.getTryBlock().getFirstInstruction().getOffset(), o2.getTryBlock().getFirstInstruction().getOffset() ); } } ); return result; }
private static List<ExceptionHandler> findDuplicateHandlers(final ExceptionHandler handler, final Collection<ExceptionHandler> handlers) { final List<ExceptionHandler> result = new ArrayList<>(); for (final ExceptionHandler other : handlers) { if (other.getHandlerBlock().equals(handler.getHandlerBlock())) { if (handler.isFinally()) { if (other.isFinally()) { result.add(other); } } else if (other.isCatch() && MetadataHelper.isSameType(other.getCatchType(), handler.getCatchType())) { result.add(other); } } } Collections.sort( result, new Comparator<ExceptionHandler>() { @Override public int compare(@NotNull final ExceptionHandler o1, @NotNull final ExceptionHandler o2) { return Integer.compare( o1.getTryBlock().getFirstInstruction().getOffset(), o2.getTryBlock().getFirstInstruction().getOffset() ); } } ); return result; }
final ExceptionHandler otherHandler = handlers.get(j); if (otherHandler.getTryBlock().equals(handler.getTryBlock())) { terminals.add(findHandlerNode(_cfg, otherHandler));
final ExceptionHandler otherHandler = handlers.get(j); if (otherHandler.getTryBlock().equals(handler.getTryBlock())) { terminals.add(findHandlerNode(_cfg, otherHandler));
private static ExceptionHandler findFirstHandler(final InstructionBlock tryBlock, final Collection<ExceptionHandler> handlers) { ExceptionHandler result = null; for (final ExceptionHandler handler : handlers) { if (handler.getTryBlock().equals(tryBlock) && (result == null || handler.getHandlerBlock().getFirstInstruction().getOffset() < result.getHandlerBlock().getFirstInstruction().getOffset())) { result = handler; } } return result; }
private static ExceptionHandler findFirstHandler(final InstructionBlock tryBlock, final Collection<ExceptionHandler> handlers) { ExceptionHandler result = null; for (final ExceptionHandler handler : handlers) { if (handler.getTryBlock().equals(tryBlock) && (result == null || handler.getHandlerBlock().getFirstInstruction().getOffset() < result.getHandlerBlock().getFirstInstruction().getOffset())) { result = handler; } } return result; }
private static ExceptionHandler findFirstHandler(final InstructionBlock tryBlock, final Collection<ExceptionHandler> handlers) { ExceptionHandler result = null; for (final ExceptionHandler handler : handlers) { if (handler.getTryBlock().equals(tryBlock) && (result == null || handler.getHandlerBlock().getFirstInstruction().getOffset() < result.getHandlerBlock().getFirstInstruction().getOffset())) { result = handler; } } return result; }
e.getHandlerBlock().equals(handler.getHandlerBlock())) { other.getHandlerBlock().equals(handlerBlock) && tryBlock.contains(other.getTryBlock()) && tryBlock.getLastInstruction() == other.getTryBlock().getLastInstruction()) { sibling.getTryBlock().equals(handlerBlock) && sibling.getHandlerBlock().equals(innermostHandler.getHandlerBlock())) {
e.getHandlerBlock().equals(handler.getHandlerBlock())) { other.getHandlerBlock().equals(handlerBlock) && tryBlock.contains(other.getTryBlock()) && tryBlock.getLastInstruction() == other.getTryBlock().getLastInstruction()) { sibling.getTryBlock().equals(handlerBlock) && sibling.getHandlerBlock().equals(innermostHandler.getHandlerBlock())) {
final ExceptionHandler next = handlers.get(i + 1); if (current.getHandlerBlock().equals(next.getHandlerBlock())) { final Instruction lastInCurrent = current.getTryBlock().getLastInstruction(); final Instruction firstInNext = next.getTryBlock().getFirstInstruction();
final ExceptionHandler next = handlers.get(i + 1); if (current.getHandlerBlock().equals(next.getHandlerBlock())) { final Instruction lastInCurrent = current.getTryBlock().getLastInstruction(); final Instruction firstInNext = next.getTryBlock().getFirstInstruction();
final ExceptionHandler next = handlers.get(i + 1); if (current.getHandlerBlock().equals(next.getHandlerBlock())) { final Instruction lastInCurrent = current.getTryBlock().getLastInstruction(); final Instruction firstInNext = next.getTryBlock().getFirstInstruction();
if (other.getTryBlock().equals(innermostHandler.getTryBlock())) { final ControlFlowNode handlerNode = firstOrDefault( _nodes,
if (other.getTryBlock().equals(innermostHandler.getTryBlock())) { final ControlFlowNode handlerNode = firstOrDefault( _nodes,
if (other.getTryBlock().equals(innermostHandler.getTryBlock())) { final ControlFlowNode handlerNode = firstOrDefault( _nodes,