#vulnerable code 
                             public void readFrom(DataInputStream dis) throws IOException {
		System.out.println("Available:" + dis.available());
		headerSize = dis.readInt();
		keySize = dis.readInt();
		valueSize = dis.readInt();
		headerInBytes = new byte[headerSize];
		dis.read(headerInBytes);
		
		
		ByteArrayInputStream bis = new ByteArrayInputStream(headerInBytes);
		DataInputStream dis2 = new DataInputStream(bis);
		this.operation = ClusterOperation.create(dis2.readInt());
		this.blockId = dis2.readInt();
		this.threadId = dis2.readInt();
		this.lockCount = dis2.readInt();
		this.timeout = dis2.readLong();
		this.txnId = dis2.readLong();
		this.longValue = dis2.readLong();
		this.recordId = dis2.readLong();
		this.version = dis2.readLong();
		this.callId = (int) dis2.readLong();
		this.client = dis2.readByte()==1;
		this.responseType = dis2.readByte();
		int nameLength = dis2.readInt();
		byte[] b = new byte[nameLength];
		dis2.read(b);
		this.name = new String(b);
		this.lockAddressIsNull = dis2.readBoolean();
		key = new byte[keySize];
		dis.read(key);
		value = new byte[valueSize];
		dis.read(value);
	} 
                            #location 28 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                             public void readFrom(DataInputStream dis) throws IOException {
		headerSize = dis.readInt();
		keySize = dis.readInt();
		valueSize = dis.readInt();
		headerInBytes = new byte[headerSize];
		dis.read(headerInBytes);
		
		
		ByteArrayInputStream bis = new ByteArrayInputStream(headerInBytes);
		DataInputStream dis2 = new DataInputStream(bis);
		this.operation = ClusterOperation.create(dis2.readInt());
		this.blockId = dis2.readInt();
		this.threadId = dis2.readInt();
		this.lockCount = dis2.readInt();
		this.timeout = dis2.readLong();
		this.txnId = dis2.readLong();
		this.longValue = dis2.readLong();
		this.recordId = dis2.readLong();
		this.version = dis2.readLong();
		this.callId = (int) dis2.readLong();
		this.client = dis2.readByte()==1;
		this.responseType = dis2.readByte();
		int nameLength = dis2.readInt();
		byte[] b = new byte[nameLength];
		dis2.read(b);
		this.name = new String(b);
		this.lockAddressIsNull = dis2.readBoolean();
	    indexCount = dis2.readByte();
        for (int i=0; i<indexCount ; i++) {
            indexes[i] = dis2.readLong();
            indexTypes[i] = dis2.readByte();
        }
		
		
		key = new byte[keySize];
		dis.read(key);
		value = new byte[valueSize];
		dis.read(value);
	}