Program: 108329
Project: 108329
Buggy source:
/** 
 * Reads the lattice from several files
 * @param zip
 * @return
 * @throws IOException
 * @throws ClassNotFoundException
 * @throws SAXException
 */
@SuppressWarnings({"String_Node_Str"}) private Map<String,ARXNode> readLattice(final ZipFile zip) throws IOException, ClassNotFoundException, SAXException {
  ZipEntry entry=zip.getEntry("String_Node_Str");
  if (entry == null) {
    return null;
  }
  final Map<Integer,InformationLoss<?>> max;
  final Map<Integer,InformationLoss<?>> min;
  ObjectInputStream oos=new ObjectInputStream(zip.getInputStream(entry));
  min=(Map<Integer,InformationLoss<?>>)oos.readObject();
  max=(Map<Integer,InformationLoss<?>>)oos.readObject();
  oos.close();
  entry=zip.getEntry("String_Node_Str");
  if (entry == null) {
    throw new IOException(Resources.getMessage("String_Node_Str"));
  }
  final Map<Integer,Map<Integer,Object>> attrs;
  oos=new ObjectInputStream(zip.getInputStream(entry));
  attrs=(Map<Integer,Map<Integer,Object>>)oos.readObject();
  oos.close();
  entry=zip.getEntry("String_Node_Str");
  if (entry == null) {
    throw new IOException(Resources.getMessage("String_Node_Str"));
  }
  oos=new ObjectInputStream(zip.getInputStream(entry));
  lattice=(ARXLattice)oos.readObject();
  final Map<String,Integer> headermap=(Map<String,Integer>)oos.readObject();
  oos.close();
  final Map<Integer,List<ARXNode>> levels=new HashMap<Integer,List<ARXNode>>();
  entry=zip.getEntry("String_Node_Str");
  if (entry == null) {
    throw new IOException(Resources.getMessage("String_Node_Str"));
  }
  final Map<Integer,ARXNode> map=new HashMap<Integer,ARXNode>();
  XMLReader xmlReader=XMLReaderFactory.createXMLReader();
  InputSource inputSource=new InputSource(zip.getInputStream(entry));
  xmlReader.setContentHandler(new XMLHandler(){
    private int level=0;
    private int id=0;
    private int[] transformation;
    private Anonymity anonymity;
    private boolean checked;
    @Override protected boolean end(    final String uri,    final String localName,    final String qName) throws SAXException {
      if (vocabulary.isLattice(localName) || vocabulary.isLevel(localName) || vocabulary.isPredecessors(localName)|| vocabulary.isSuccessors(localName)|| vocabulary.isInfoloss(localName)|| vocabulary.isMax2(localName)|| vocabulary.isMin2(localName)) {
        return true;
      }
 else       if (vocabulary.isNode2(localName)) {
        final ARXNode node=lattice.new ARXNode();
        node.access().setAnonymity(anonymity);
        node.access().setChecked(checked);
        node.access().setTransformation(transformation);
        node.access().setMaximumInformationLoss(max.get(id));
        node.access().setMinimumInformationLoss(min.get(id));
        node.access().setAttributes(attrs.get(id));
        node.access().setHeadermap(headermap);
        levels.get(level).add(node);
        map.put(id,node);
        return true;
      }
 else       if (vocabulary.isTransformation(localName)) {
        transformation=readTransformation(payload);
        return true;
      }
 else       if (vocabulary.isAnonymity(localName)) {
        anonymity=Anonymity.valueOf(payload);
        return true;
      }
 else       if (vocabulary.isChecked(localName)) {
        checked=Boolean.valueOf(payload);
        return true;
      }
 else {
        return false;
      }
    }
    @Override protected boolean start(    final String uri,    final String localName,    final String qName,    final Attributes attributes) throws SAXException {
      if (vocabulary.isLattice(localName)) {
        return true;
      }
 else       if (vocabulary.isLevel(localName)) {
        level=Integer.valueOf(attributes.getValue(vocabulary.getDepth()));
        if (!levels.containsKey(level)) {
          levels.put(level,new ArrayList<ARXNode>());
        }
        return true;
      }
 else       if (vocabulary.isNode2(localName)) {
        id=Integer.valueOf(attributes.getValue(vocabulary.getId()));
        return true;
      }
 else       if (vocabulary.isTransformation(localName) || vocabulary.isAnonymity(localName) || vocabulary.isChecked(localName)|| vocabulary.isPredecessors(localName)|| vocabulary.isSuccessors(localName)|| vocabulary.isInfoloss(localName)|| vocabulary.isMax2(localName)|| vocabulary.isMin2(localName)) {
        return true;
      }
 else {
        return false;
      }
    }
  }
);
  xmlReader.parse(inputSource);
  entry=zip.getEntry("String_Node_Str");
  xmlReader=XMLReaderFactory.createXMLReader();
  inputSource=new InputSource(zip.getInputStream(entry));
  xmlReader.setContentHandler(new XMLHandler(){
    private int id;
    private final List<ARXNode> predecessors=new ArrayList<ARXNode>();
    private final List<ARXNode> successors=new ArrayList<ARXNode>();
    @Override protected boolean end(    final String uri,    final String localName,    final String qName) throws SAXException {
      if (vocabulary.isLattice(localName)) {
        return true;
      }
 else       if (vocabulary.isLevel(localName)) {
        return true;
      }
 else       if (vocabulary.isNode2(localName)) {
        map.get(id).access().setPredecessors(predecessors.toArray(new ARXNode[predecessors.size()]));
        map.get(id).access().setSuccessors(successors.toArray(new ARXNode[successors.size()]));
        return true;
      }
 else       if (vocabulary.isTransformation(localName) || vocabulary.isAnonymity(localName) || vocabulary.isChecked(localName)|| vocabulary.isInfoloss(localName)|| vocabulary.isMax2(localName)|| vocabulary.isMin2(localName)) {
        return true;
      }
 else       if (vocabulary.isPredecessors(localName)) {
        final String[] a=payload.trim().split("String_Node_Str");
        for (        final String s : a) {
          final String b=s.trim();
          if (!b.equals("String_Node_Str")) {
            predecessors.add(map.get(Integer.valueOf(b)));
          }
        }
        return true;
      }
 else       if (vocabulary.isSuccessors(localName)) {
        final String[] a=payload.trim().split("String_Node_Str");
        for (        final String s : a) {
          final String b=s.trim();
          if (!b.equals("String_Node_Str")) {
            successors.add(map.get(Integer.valueOf(b)));
          }
        }
        return true;
      }
 else       if (vocabulary.isAttribute(localName)) {
        return true;
      }
 else {
        return false;
      }
    }
    @Override protected boolean start(    final String uri,    final String localName,    final String qName,    final Attributes attributes) throws SAXException {
      if (vocabulary.isNode2(localName)) {
        id=Integer.valueOf(attributes.getValue(vocabulary.getId()));
        successors.clear();
        predecessors.clear();
        return true;
      }
 else       if (vocabulary.isTransformation(localName) || vocabulary.isLattice(localName) || vocabulary.isLevel(localName)|| vocabulary.isAnonymity(localName)|| vocabulary.isChecked(localName)|| vocabulary.isPredecessors(localName)|| vocabulary.isSuccessors(localName)|| vocabulary.isAttribute(localName)|| vocabulary.isInfoloss(localName)|| vocabulary.isMax2(localName)|| vocabulary.isMin2(localName)) {
        return true;
      }
 else {
        return false;
      }
    }
  }
);
  xmlReader.parse(inputSource);
  int bottomLevel=Integer.MAX_VALUE;
  final ARXNode[][] llevels=new ARXNode[levels.size()][];
  for (  final Entry<Integer,List<ARXNode>> e : levels.entrySet()) {
    llevels[e.getKey()]=e.getValue().toArray(new ARXNode[]{});
    if (!e.getValue().isEmpty()) {
      bottomLevel=Math.min(e.getKey(),bottomLevel);
    }
  }
  lattice.access().setLevels(llevels);
  lattice.access().setBottom(llevels[bottomLevel][0]);
  lattice.access().setTop(llevels[llevels.length - 1][0]);
  final Map<String,ARXNode> result=new HashMap<String,ARXNode>();
  for (  final List<ARXNode> e : levels.values()) {
    for (    final ARXNode node : e) {
      result.put(Arrays.toString(node.getTransformation()),node);
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Reads the lattice from several files
 * @param zip
 * @return
 * @throws IOException
 * @throws ClassNotFoundException
 * @throws SAXException
 */
@SuppressWarnings({"String_Node_Str"}) private Map<String,ARXNode> readLattice(final ZipFile zip) throws IOException, ClassNotFoundException, SAXException {
  ZipEntry entry=zip.getEntry("String_Node_Str");
  if (entry == null) {
    return null;
  }
  final Map<Integer,InformationLoss<?>> max;
  final Map<Integer,InformationLoss<?>> min;
  ObjectInputStream oos=new ObjectInputStream(zip.getInputStream(entry));
  min=(Map<Integer,InformationLoss<?>>)oos.readObject();
  max=(Map<Integer,InformationLoss<?>>)oos.readObject();
  oos.close();
  final int[] minMax=readMinMax(zip);
  ARXLattice.DESERIALIZATION_CONTEXT_MIN_LEVEL=minMax[0];
  ARXLattice.DESERIALIZATION_CONTEXT_MAX_LEVEL=minMax[1];
  entry=zip.getEntry("String_Node_Str");
  if (entry == null) {
    throw new IOException(Resources.getMessage("String_Node_Str"));
  }
  final Map<Integer,Map<Integer,Object>> attrs;
  oos=new ObjectInputStream(zip.getInputStream(entry));
  attrs=(Map<Integer,Map<Integer,Object>>)oos.readObject();
  oos.close();
  entry=zip.getEntry("String_Node_Str");
  if (entry == null) {
    throw new IOException(Resources.getMessage("String_Node_Str"));
  }
  oos=new ObjectInputStream(zip.getInputStream(entry));
  lattice=(ARXLattice)oos.readObject();
  final Map<String,Integer> headermap=(Map<String,Integer>)oos.readObject();
  oos.close();
  final Map<Integer,List<ARXNode>> levels=new HashMap<Integer,List<ARXNode>>();
  entry=zip.getEntry("String_Node_Str");
  if (entry == null) {
    throw new IOException(Resources.getMessage("String_Node_Str"));
  }
  final Map<Integer,ARXNode> map=new HashMap<Integer,ARXNode>();
  XMLReader xmlReader=XMLReaderFactory.createXMLReader();
  InputSource inputSource=new InputSource(zip.getInputStream(entry));
  xmlReader.setContentHandler(new XMLHandler(){
    private int level=0;
    private int id=0;
    private int[] transformation;
    private Anonymity anonymity;
    private boolean checked;
    @Override protected boolean end(    final String uri,    final String localName,    final String qName) throws SAXException {
      if (vocabulary.isLattice(localName) || vocabulary.isLevel(localName) || vocabulary.isPredecessors(localName)|| vocabulary.isSuccessors(localName)|| vocabulary.isInfoloss(localName)|| vocabulary.isMax2(localName)|| vocabulary.isMin2(localName)) {
        return true;
      }
 else       if (vocabulary.isNode2(localName)) {
        final ARXNode node=lattice.new ARXNode();
        node.access().setAnonymity(anonymity);
        node.access().setChecked(checked);
        node.access().setTransformation(transformation);
        node.access().setMaximumInformationLoss(max.get(id));
        node.access().setMinimumInformationLoss(min.get(id));
        node.access().setAttributes(attrs.get(id));
        node.access().setHeadermap(headermap);
        levels.get(level).add(node);
        map.put(id,node);
        return true;
      }
 else       if (vocabulary.isTransformation(localName)) {
        transformation=readTransformation(payload);
        return true;
      }
 else       if (vocabulary.isAnonymity(localName)) {
        anonymity=Anonymity.valueOf(payload);
        return true;
      }
 else       if (vocabulary.isChecked(localName)) {
        checked=Boolean.valueOf(payload);
        return true;
      }
 else {
        return false;
      }
    }
    @Override protected boolean start(    final String uri,    final String localName,    final String qName,    final Attributes attributes) throws SAXException {
      if (vocabulary.isLattice(localName)) {
        return true;
      }
 else       if (vocabulary.isLevel(localName)) {
        level=Integer.valueOf(attributes.getValue(vocabulary.getDepth()));
        if (!levels.containsKey(level)) {
          levels.put(level,new ArrayList<ARXNode>());
        }
        return true;
      }
 else       if (vocabulary.isNode2(localName)) {
        id=Integer.valueOf(attributes.getValue(vocabulary.getId()));
        return true;
      }
 else       if (vocabulary.isTransformation(localName) || vocabulary.isAnonymity(localName) || vocabulary.isChecked(localName)|| vocabulary.isPredecessors(localName)|| vocabulary.isSuccessors(localName)|| vocabulary.isInfoloss(localName)|| vocabulary.isMax2(localName)|| vocabulary.isMin2(localName)) {
        return true;
      }
 else {
        return false;
      }
    }
  }
);
  xmlReader.parse(inputSource);
  entry=zip.getEntry("String_Node_Str");
  xmlReader=XMLReaderFactory.createXMLReader();
  inputSource=new InputSource(zip.getInputStream(entry));
  xmlReader.setContentHandler(new XMLHandler(){
    private int id;
    private final List<ARXNode> predecessors=new ArrayList<ARXNode>();
    private final List<ARXNode> successors=new ArrayList<ARXNode>();
    @Override protected boolean end(    final String uri,    final String localName,    final String qName) throws SAXException {
      if (vocabulary.isLattice(localName)) {
        return true;
      }
 else       if (vocabulary.isLevel(localName)) {
        return true;
      }
 else       if (vocabulary.isNode2(localName)) {
        map.get(id).access().setPredecessors(predecessors.toArray(new ARXNode[predecessors.size()]));
        map.get(id).access().setSuccessors(successors.toArray(new ARXNode[successors.size()]));
        return true;
      }
 else       if (vocabulary.isTransformation(localName) || vocabulary.isAnonymity(localName) || vocabulary.isChecked(localName)|| vocabulary.isInfoloss(localName)|| vocabulary.isMax2(localName)|| vocabulary.isMin2(localName)) {
        return true;
      }
 else       if (vocabulary.isPredecessors(localName)) {
        final String[] a=payload.trim().split("String_Node_Str");
        for (        final String s : a) {
          final String b=s.trim();
          if (!b.equals("String_Node_Str")) {
            predecessors.add(map.get(Integer.valueOf(b)));
          }
        }
        return true;
      }
 else       if (vocabulary.isSuccessors(localName)) {
        final String[] a=payload.trim().split("String_Node_Str");
        for (        final String s : a) {
          final String b=s.trim();
          if (!b.equals("String_Node_Str")) {
            successors.add(map.get(Integer.valueOf(b)));
          }
        }
        return true;
      }
 else       if (vocabulary.isAttribute(localName)) {
        return true;
      }
 else {
        return false;
      }
    }
    @Override protected boolean start(    final String uri,    final String localName,    final String qName,    final Attributes attributes) throws SAXException {
      if (vocabulary.isNode2(localName)) {
        id=Integer.valueOf(attributes.getValue(vocabulary.getId()));
        successors.clear();
        predecessors.clear();
        return true;
      }
 else       if (vocabulary.isTransformation(localName) || vocabulary.isLattice(localName) || vocabulary.isLevel(localName)|| vocabulary.isAnonymity(localName)|| vocabulary.isChecked(localName)|| vocabulary.isPredecessors(localName)|| vocabulary.isSuccessors(localName)|| vocabulary.isAttribute(localName)|| vocabulary.isInfoloss(localName)|| vocabulary.isMax2(localName)|| vocabulary.isMin2(localName)) {
        return true;
      }
 else {
        return false;
      }
    }
  }
);
  xmlReader.parse(inputSource);
  int bottomLevel=Integer.MAX_VALUE;
  final ARXNode[][] llevels=new ARXNode[levels.size()][];
  for (  final Entry<Integer,List<ARXNode>> e : levels.entrySet()) {
    llevels[e.getKey()]=e.getValue().toArray(new ARXNode[]{});
    if (!e.getValue().isEmpty()) {
      bottomLevel=Math.min(e.getKey(),bottomLevel);
    }
  }
  lattice.access().setLevels(llevels);
  lattice.access().setBottom(llevels[bottomLevel][0]);
  lattice.access().setTop(llevels[llevels.length - 1][0]);
  final Map<String,ARXNode> result=new HashMap<String,ARXNode>();
  for (  final List<ARXNode> e : levels.values()) {
    for (    final ARXNode node : e) {
      result.put(Arrays.toString(node.getTransformation()),node);
    }
  }
  return result;
}