StringBuffer buf = new StringBuffer(); buf.append("EDGE("); buf.append(id); buf.append(") type "); buf.append(edgeTypeToString(type)); buf.append(" from block "); buf.append(source.getId()); buf.append(" to block "); buf.append(dest.getId()); InstructionHandle src = source.getLastInstruction(); InstructionHandle dst = dest.getFirstInstruction(); String exInfo = " -> "; if (dst == null && dest.isExceptionThrower()) { dst = dest.getExceptionThrower(); exInfo = " => ";
StringBuffer buf = new StringBuffer(); buf.append("EDGE("); buf.append(id); buf.append(") type "); buf.append(edgeTypeToString(type)); buf.append(" from block "); buf.append(source.getId()); buf.append(" to block "); buf.append(dest.getId()); InstructionHandle sourceInstruction = source.getLastInstruction(); InstructionHandle targetInstruction = dest.getFirstInstruction(); String exInfo = " -> "; if (targetInstruction == null && dest.isExceptionThrower()) { targetInstruction = dest.getExceptionThrower(); exInfo = " => "; } if (sourceInstruction != null && targetInstruction != null) { buf.append(" [bytecode "); buf.append(sourceInstruction.getPosition()); buf.append(exInfo); buf.append(targetInstruction.getPosition()); buf.append(']'); } else if (source.isExceptionThrower()) { if (type == FALL_THROUGH_EDGE) buf.append(" [successful check]"); else { buf.append(" [failed check for "); buf.append(source.getExceptionThrower().getPosition()); if (targetInstruction != null) { buf.append(" to "); buf.append(targetInstruction.getPosition()); } buf.append(']'); } } return buf.toString();
    public String toString() {	StringBuffer buf = new StringBuffer();	buf.append("EDGE(");	buf.append(id);	buf.append(") type ");	buf.append(edgeTypeToString(type));	buf.append(" from block ");	buf.append(source.getId());	buf.append(" to block ");	buf.append(dest.getId());	InstructionHandle src = source.getLastInstruction();	InstructionHandle dst = dest.getFirstInstruction();	String exInfo = " -> ";	if (dst == null && dest.isExceptionThrower()) {	    dst = dest.getExceptionThrower();	    exInfo = " => ";	}	if (src != null && dst != null) {	    buf.append(" [bytecode ");	    buf.append(src.getPosition());	    buf.append(exInfo);	    buf.append(dst.getPosition());	    buf.append(']');	} else if (source.isExceptionThrower()) {	    if (type == FALL_THROUGH_EDGE)	    	buf.append(" [successful check]");	    else {		buf.append(" [failed check for ");		buf.append(source.getExceptionThrower().getPosition());		if (dst != null) {		    buf.append(" to ");		    buf.append(dst.getPosition());		}		buf.append(']');	    }	}/* else if (source.isExceptionThrower()) {	    buf.append(" [src is thrower for ");	    buf.append(source.getExceptionThrower().getPosition());	    buf.append(']');	}*/	return buf.toString();    }