Program: 108834
Project: 108834
Buggy source:
/** 
 * Reads the configuration from the file
 * @param prefix
 * @param output
 * @param map
 * @param zip
 * @throws IOException
 * @throws ClassNotFoundException
 * @throws SAXException
 */
private void readConfiguration(final String prefix,final boolean output,final Map<String,ARXNode> map,final ZipFile zip) throws IOException, ClassNotFoundException, SAXException {
  final ZipEntry entry=zip.getEntry(prefix + "String_Node_Str");
  if (entry == null) {
    return;
  }
  final ObjectInputStream oos=new ObjectInputStream(zip.getInputStream(entry));
  final ModelConfiguration config=(ModelConfiguration)oos.readObject();
  oos.close();
  if (!output) {
    readInput(config,zip);
    model.setInputConfig(config);
  }
 else {
    config.setInput(model.getInputConfig().getInput());
    model.setOutputConfig(config);
  }
  readDefinition(config,prefix,zip);
  if (output) {
    final String suppressionString=model.getSuppressionString();
    final int historySize=model.getHistorySize();
    final double snapshotSizeSnapshot=model.getSnapshotSizeSnapshot();
    final double snapshotSizeDataset=model.getSnapshotSizeDataset();
    final boolean removeOutliers=model.getOutputConfig().isRemoveOutliers();
    final Metric<?> metric=config.getMetric();
    final long time=model.getTime();
    final ARXNode optimalNode;
    final ARXNode outputNode;
    if (model.getOptimalNodeAsString() != null) {
      optimalNode=map.get(model.getOptimalNodeAsString());
    }
 else {
      optimalNode=null;
    }
    if (model.getOutputNodeAsString() != null) {
      outputNode=map.get(model.getOutputNodeAsString());
    }
 else {
      outputNode=null;
    }
    model.setSelectedNode(outputNode);
    model.setResult(new ARXResult(config.getInput().getHandle(),config.getInput().getDefinition(),lattice,removeOutliers,suppressionString,historySize,snapshotSizeSnapshot,snapshotSizeDataset,metric,model.getOutputConfig().getConfig(),optimalNode,time));
    final ARXAnonymizer f=new ARXAnonymizer();
    model.setAnonymizer(f);
    f.setRemoveOutliers(removeOutliers);
    f.setSuppressionString(suppressionString);
    f.setHistorySize(historySize);
    f.setMaximumSnapshotSizeSnapshot(snapshotSizeSnapshot);
    f.setMaximumSnapshotSizeDataset(snapshotSizeDataset);
  }
}

Fixed version (ground truth):
/** 
 * Reads the configuration from the file
 * @param prefix
 * @param output
 * @param map
 * @param zip
 * @throws IOException
 * @throws ClassNotFoundException
 * @throws SAXException
 */
private void readConfiguration(final String prefix,final boolean output,final Map<String,ARXNode> map,final ZipFile zip) throws IOException, ClassNotFoundException, SAXException {
  final ZipEntry entry=zip.getEntry(prefix + "String_Node_Str");
  if (entry == null) {
    return;
  }
  final ObjectInputStream oos=new ObjectInputStream(zip.getInputStream(entry));
  final ModelConfiguration config=(ModelConfiguration)oos.readObject();
  oos.close();
  if (!output) {
    readInput(config,zip);
    model.setInputConfig(config);
  }
 else {
    config.setInput(model.getInputConfig().getInput());
    model.setOutputConfig(config);
  }
  readDefinition(config,prefix,zip);
  if (output) {
    final String suppressionString=model.getSuppressionString();
    final int historySize=model.getHistorySize();
    final double snapshotSizeSnapshot=model.getSnapshotSizeSnapshot();
    final double snapshotSizeDataset=model.getSnapshotSizeDataset();
    final boolean removeOutliers=model.getOutputConfig().isRemoveOutliers();
    final Metric<?> metric=config.getMetric();
    final long time=model.getTime();
    final ARXNode optimalNode;
    final ARXNode outputNode;
    if (model.getOptimalNodeAsString() != null) {
      optimalNode=map.get(model.getOptimalNodeAsString());
    }
 else {
      optimalNode=null;
    }
    if (model.getOutputNodeAsString() != null) {
      outputNode=map.get(model.getOutputNodeAsString());
    }
 else {
      outputNode=null;
    }
    model.setSelectedNode(outputNode);
    model.setResult(new ARXResult(config.getInput().getHandle(),config.getInput().getHandle().getDefinition(),lattice,removeOutliers,suppressionString,historySize,snapshotSizeSnapshot,snapshotSizeDataset,metric,model.getOutputConfig().getConfig(),optimalNode,time));
    final ARXAnonymizer f=new ARXAnonymizer();
    model.setAnonymizer(f);
    f.setRemoveOutliers(removeOutliers);
    f.setSuppressionString(suppressionString);
    f.setHistorySize(historySize);
    f.setMaximumSnapshotSizeSnapshot(snapshotSizeSnapshot);
    f.setMaximumSnapshotSizeDataset(snapshotSizeDataset);
  }
}