Program: 55584
Project: 55584
Buggy source:
@Override public boolean callWithNextKey(MatchStub matchFunction,Collector collector) throws Exception {
  final OutputCollector oc=(OutputCollector)collector;
  if (this.hashJoin.nextRecord()) {
    final HashJoin.HashBucketIterator buildSideIterator=this.hashJoin.getBuildSideIterator();
    PactRecord probeRecord=this.hashJoin.getCurrentProbeRecord();
    PactRecord nextBuildSidePair=this.nextBuildSideObject;
    if (buildSideIterator.next(nextBuildSidePair)) {
      PactRecord tmpPair=new PactRecord();
      if (buildSideIterator.next(tmpPair)) {
        probeRecord.copyTo(this.probeCopy);
        long r1=nextBuildSidePair.getBinaryLength();
        long r2=probeRecord.getBinaryLength();
        matchFunction.match(nextBuildSidePair,probeRecord,collector);
        this.environment.reportPACTDataStatistics(r1 + r2,oc.getCollectedPactRecordsInBytes());
        probeRecord=new PactRecord();
        this.probeCopy.copyTo(probeRecord);
        r1=tmpPair.getBinaryLength();
        r2=probeRecord.getBinaryLength();
        matchFunction.match(tmpPair,probeRecord,collector);
        this.environment.reportPACTDataStatistics(r1 + r2,oc.getCollectedPactRecordsInBytes());
        tmpPair=new PactRecord();
        while (this.running && buildSideIterator.next(tmpPair)) {
          probeRecord=new PactRecord();
          this.probeCopy.copyTo(probeRecord);
          r1=tmpPair.getBinaryLength();
          r2=probeRecord.getBinaryLength();
          matchFunction.match(tmpPair,probeRecord,collector);
          this.environment.reportPACTDataStatistics(r1 + r2,oc.getCollectedPactRecordsInBytes());
          tmpPair=new PactRecord();
        }
        this.nextBuildSideObject=tmpPair;
      }
 else {
        this.nextBuildSideObject=tmpPair;
        final long r1=nextBuildSidePair.getBinaryLength();
        final long r2=probeRecord.getBinaryLength();
        matchFunction.match(nextBuildSidePair,probeRecord,collector);
        this.environment.reportPACTDataStatistics(r1 + r2,oc.getCollectedPactRecordsInBytes());
      }
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean callWithNextKey(MatchStub matchFunction,Collector collector) throws Exception {
  if (this.hashJoin.nextRecord()) {
    final HashJoin.HashBucketIterator buildSideIterator=this.hashJoin.getBuildSideIterator();
    PactRecord probeRecord=this.hashJoin.getCurrentProbeRecord();
    PactRecord nextBuildSidePair=this.nextBuildSideObject;
    if (buildSideIterator.next(nextBuildSidePair)) {
      PactRecord tmpPair=new PactRecord();
      if (buildSideIterator.next(tmpPair)) {
        probeRecord.copyTo(this.probeCopy);
        long r1=nextBuildSidePair.getBinaryLength();
        long r2=probeRecord.getBinaryLength();
        matchFunction.match(nextBuildSidePair,probeRecord,collector);
        this.environment.reportPACTDataStatistics(r1 + r2,collector.getCollectedPactRecordsInBytes());
        probeRecord=new PactRecord();
        this.probeCopy.copyTo(probeRecord);
        r1=tmpPair.getBinaryLength();
        r2=probeRecord.getBinaryLength();
        matchFunction.match(tmpPair,probeRecord,collector);
        this.environment.reportPACTDataStatistics(r1 + r2,collector.getCollectedPactRecordsInBytes());
        tmpPair=new PactRecord();
        while (this.running && buildSideIterator.next(tmpPair)) {
          probeRecord=new PactRecord();
          this.probeCopy.copyTo(probeRecord);
          r1=tmpPair.getBinaryLength();
          r2=probeRecord.getBinaryLength();
          matchFunction.match(tmpPair,probeRecord,collector);
          this.environment.reportPACTDataStatistics(r1 + r2,collector.getCollectedPactRecordsInBytes());
          tmpPair=new PactRecord();
        }
        this.nextBuildSideObject=tmpPair;
      }
 else {
        this.nextBuildSideObject=tmpPair;
        final long r1=nextBuildSidePair.getBinaryLength();
        final long r2=probeRecord.getBinaryLength();
        matchFunction.match(nextBuildSidePair,probeRecord,collector);
        this.environment.reportPACTDataStatistics(r1 + r2,collector.getCollectedPactRecordsInBytes());
      }
    }
    return true;
  }
 else {
    return false;
  }
}