Language: Java
Label: vulnerable
CWE: CWE-502 \u2014 Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.

Code:
	public ExitRoute readExitRoute(World world) throws IOException {
		IRouter destination = readIRouter(world);
		IRouter root = readIRouter(world);
		ForgeDirection exitOri = readForgeDirection();
		ForgeDirection insertOri = readForgeDirection();
		EnumSet<PipeRoutingConnectionType> connectionDetails = readEnumSet(PipeRoutingConnectionType.class);
		double distanceToDestination = localBuffer.readDouble();
		double destinationDistanceToRoot = localBuffer.readDouble();
		int blockDistance = localBuffer.readInt();
		List<DoubleCoordinates> positions = readArrayList(LPDataInput::readLPPosition);
		ExitRoute e = new ExitRoute(root, destination, exitOri, insertOri, destinationDistanceToRoot, connectionDetails, blockDistance);
		e.distanceToDestination = distanceToDestination;
		e.debug.filterPosition = positions;
		e.debug.toStringNetwork = readUTF();
		e.debug.isNewlyAddedCanidate = localBuffer.readBoolean();
		e.debug.isTraced = localBuffer.readBoolean();
		e.debug.index = localBuffer.readInt();
		return e;
	}