output: #fixed code
                                  @Nonnull
      public byte[] predictSerCodegen(boolean compress) throws HiveException {
          try {
              if (compress) {
                  return ObjectUtils.toCompressedBytes(_root);
              } else {
                  return ObjectUtils.toBytes(_root);
              }
          } catch (IOException ioe) {
              throw new HiveException("IOException cause while serializing DecisionTree object", ioe);
          } catch (Exception e) {
              throw new HiveException("Exception cause while serializing DecisionTree object", e);
          }
      }
input: #vulnerable code 
                                  @Nonnull
      public byte[] predictSerCodegen(boolean compress) throws HiveException {
          FastMultiByteArrayOutputStream bos = new FastMultiByteArrayOutputStream();
          OutputStream wrapped = compress ? new DeflaterOutputStream(bos) : bos;
          ObjectOutputStream oos = null;
          try {
              oos = new ObjectOutputStream(wrapped);
              _root.writeExternal(oos);
              oos.flush();
          } catch (IOException ioe) {
              throw new HiveException("IOException cause while serializing DecisionTree object", ioe);
          } catch (Exception e) {
              throw new HiveException("Exception cause while serializing DecisionTree object", e);
          } finally {
              IOUtils.closeQuietly(oos);
          }
          return bos.toByteArray_clear();
      } 
                              #location 15 
                              #vulnerability type RESOURCE_LEAK