#vulnerable code 
                                private void setTotalAndPreUsed(GCEvent event, StartElement startEl) {
        long total = NumberParser.parseInt(getAttributeValue(startEl, "total"));
        event.setTotal(toKiloBytes(total));
        event.setPreUsed(toKiloBytes(total - NumberParser.parseInt(getAttributeValue(startEl, "free"))));
    } 
                            #location 2 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                private void setTotalAndPreUsed(GCEvent event, StartElement startEl) {
        long total = NumberParser.parseLong(getAttributeValue(startEl, "total"));
        event.setTotal(toKiloBytes(total));
        event.setPreUsed(toKiloBytes(total - NumberParser.parseLong(getAttributeValue(startEl, "free"))));
    }