Program: 107791
Project: 107791
Buggy source:
/** 
 * Initializes the configuration.
 * @param manager
 */
protected void initialize(DataManager manager){
  if (criteria.isEmpty()) {
    throw new RuntimeException("String_Node_Str");
  }
  this.requirements=0x0;
  for (  PrivacyCriterion c : criteria) {
    this.requirements|=c.getRequirements();
  }
  if (manager.getDataAnalyzed().getArray() != null && !manager.getDataAnalyzed().isEmpty()) {
    this.requirements|=ARXConfiguration.REQUIREMENT_DISTRIBUTION;
  }
  for (  PrivacyCriterion c : criteria) {
    c.initialize(manager,this);
  }
  int dataLength=0;
  if (this.getSubset() != null) {
    dataLength=getSubset().getArray().length;
  }
 else {
    dataLength=manager.getDataGeneralized().getDataLength();
  }
  if (this.isPrivacyModelSpecified(EDDifferentialPrivacy.class)) {
    absMaxOutliers=(int)dataLength;
  }
 else {
    absMaxOutliers=(int)Math.floor(this.relMaxOutliers * (double)dataLength);
  }
  List<PrivacyCriterion> list=new ArrayList<PrivacyCriterion>();
  if (this.isPrivacyModelSpecified(DPresence.class)) {
    list.add(this.getPrivacyModel(DPresence.class));
  }
  if (this.isPrivacyModelSpecified(KMap.class)) {
    list.add(this.getPrivacyModel(KMap.class));
  }
  if (this.isPrivacyModelSpecified(DDisclosurePrivacy.class)) {
    list.addAll(this.getPrivacyModels(DDisclosurePrivacy.class));
  }
  if (this.isPrivacyModelSpecified(BasicBLikeness.class)) {
    list.addAll(this.getPrivacyModels(BasicBLikeness.class));
  }
  if (this.isPrivacyModelSpecified(EnhancedBLikeness.class)) {
    list.addAll(this.getPrivacyModels(EnhancedBLikeness.class));
  }
  if (this.isPrivacyModelSpecified(LDiversity.class)) {
    list.addAll(this.getPrivacyModels(LDiversity.class));
  }
  if (this.isPrivacyModelSpecified(TCloseness.class)) {
    list.addAll(this.getPrivacyModels(TCloseness.class));
  }
  if (this.isPrivacyModelSpecified(ProfitabilityProsecutor.class)) {
    list.addAll(this.getPrivacyModels(ProfitabilityProsecutor.class));
  }
  if (this.isPrivacyModelSpecified(ProfitabilityProsecutorNoAttack.class)) {
    list.addAll(this.getPrivacyModels(ProfitabilityProsecutorNoAttack.class));
  }
  if (this.isPrivacyModelSpecified(ProfitabilityJournalist.class)) {
    list.addAll(this.getPrivacyModels(ProfitabilityJournalist.class));
  }
  if (this.isPrivacyModelSpecified(ProfitabilityJournalistNoAttack.class)) {
    list.addAll(this.getPrivacyModels(ProfitabilityJournalistNoAttack.class));
  }
  this.aCriteria=list.toArray(new PrivacyCriterion[0]);
  this.bCriteria=new SampleBasedCriterion[0];
  if (this.isPrivacyModelSpecified(SampleBasedCriterion.class)) {
    this.bCriteria=this.getPrivacyModels(SampleBasedCriterion.class).toArray(new SampleBasedCriterion[0]);
  }
  this.snapshotLength=2;
  if (this.requires(REQUIREMENT_DISTRIBUTION)) {
    this.snapshotLength+=2 * manager.getAggregationInformation().getHotThreshold();
  }
  if (this.requires(REQUIREMENT_SECONDARY_COUNTER)) {
    this.snapshotLength+=1;
  }
}

Fixed version (ground truth):
/** 
 * Initializes the configuration.
 * @param manager
 */
protected void initialize(DataManager manager){
  if (criteria.isEmpty()) {
    throw new RuntimeException("String_Node_Str");
  }
  this.requirements=0x0;
  for (  PrivacyCriterion c : criteria) {
    this.requirements|=c.getRequirements();
  }
  if (manager.getDataAnalyzed().getArray() != null && !manager.getDataAnalyzed().isEmpty()) {
    this.requirements|=ARXConfiguration.REQUIREMENT_DISTRIBUTION;
  }
  for (  PrivacyCriterion c : criteria) {
    c.initialize(manager,this);
  }
  if (this.getSubset() != null) {
    numOutputRecords=getSubset().getArray().length;
  }
 else {
    numOutputRecords=manager.getDataGeneralized().getDataLength();
  }
  if (this.isPrivacyModelSpecified(EDDifferentialPrivacy.class)) {
    absMaxOutliers=(int)numOutputRecords;
  }
 else {
    absMaxOutliers=(int)Math.floor(this.relMaxOutliers * (double)numOutputRecords);
  }
  List<PrivacyCriterion> list=new ArrayList<PrivacyCriterion>();
  if (this.isPrivacyModelSpecified(DPresence.class)) {
    list.add(this.getPrivacyModel(DPresence.class));
  }
  if (this.isPrivacyModelSpecified(KMap.class)) {
    list.add(this.getPrivacyModel(KMap.class));
  }
  if (this.isPrivacyModelSpecified(DDisclosurePrivacy.class)) {
    list.addAll(this.getPrivacyModels(DDisclosurePrivacy.class));
  }
  if (this.isPrivacyModelSpecified(BasicBLikeness.class)) {
    list.addAll(this.getPrivacyModels(BasicBLikeness.class));
  }
  if (this.isPrivacyModelSpecified(EnhancedBLikeness.class)) {
    list.addAll(this.getPrivacyModels(EnhancedBLikeness.class));
  }
  if (this.isPrivacyModelSpecified(LDiversity.class)) {
    list.addAll(this.getPrivacyModels(LDiversity.class));
  }
  if (this.isPrivacyModelSpecified(TCloseness.class)) {
    list.addAll(this.getPrivacyModels(TCloseness.class));
  }
  if (this.isPrivacyModelSpecified(ProfitabilityProsecutor.class)) {
    list.addAll(this.getPrivacyModels(ProfitabilityProsecutor.class));
  }
  if (this.isPrivacyModelSpecified(ProfitabilityProsecutorNoAttack.class)) {
    list.addAll(this.getPrivacyModels(ProfitabilityProsecutorNoAttack.class));
  }
  if (this.isPrivacyModelSpecified(ProfitabilityJournalist.class)) {
    list.addAll(this.getPrivacyModels(ProfitabilityJournalist.class));
  }
  if (this.isPrivacyModelSpecified(ProfitabilityJournalistNoAttack.class)) {
    list.addAll(this.getPrivacyModels(ProfitabilityJournalistNoAttack.class));
  }
  this.aCriteria=list.toArray(new PrivacyCriterion[0]);
  this.bCriteria=new SampleBasedCriterion[0];
  if (this.isPrivacyModelSpecified(SampleBasedCriterion.class)) {
    this.bCriteria=this.getPrivacyModels(SampleBasedCriterion.class).toArray(new SampleBasedCriterion[0]);
  }
  this.snapshotLength=2;
  if (this.requires(REQUIREMENT_DISTRIBUTION)) {
    this.snapshotLength+=2 * manager.getAggregationInformation().getHotThreshold();
  }
  if (this.requires(REQUIREMENT_SECONDARY_COUNTER)) {
    this.snapshotLength+=1;
  }
}