Program: 4548
Project: 4548
Buggy source:
/** 
 * Get the operation details for the specified EndPointField over a given time range depending on the direction specified. Operation details in the "incoming" direction consists of consists of the datasets and their fields (  {@link DatasetField}) that this field originates from, as well as the programs and operations that generated this field from those origins. In outgoing direction, it consists of the datasets and their fields (  {@link DatasetField}) that were computed from this field, along with the programs and operations that performed the computation. When direction is specified as 'both', incoming as well as outgoing operations are returned.
 * @param direction the direction in which operations need to be computed
 * @param endPointField the EndPointField for which operations to be returned
 * @param start start time (inclusive) in milliseconds
 * @param end end time (exclusive) in milliseconds
 * @return the FieldLineageDetails instance
 */
FieldLineageDetails getOperationDetails(Constants.FieldLineage.Direction direction,EndPointField endPointField,long start,long end){
  List<ProgramFieldOperationInfo> incoming=null;
  List<ProgramFieldOperationInfo> outgoing=null;
  if (direction == Constants.FieldLineage.Direction.INCOMING || direction == Constants.FieldLineage.Direction.BOTH) {
    Set<ProgramRunOperations> incomingOperations=fieldLineageReader.getIncomingOperations(endPointField,start,end);
    incoming=processOperations(incomingOperations);
  }
  if (direction == Constants.FieldLineage.Direction.OUTGOING || direction == Constants.FieldLineage.Direction.BOTH) {
    Set<ProgramRunOperations> outgoingOperations=fieldLineageReader.getOutgoingOperations(endPointField,start,end);
    outgoing=processOperations(outgoingOperations);
  }
  return new FieldLineageDetails(incoming,outgoing);
}

Fixed version (ground truth):
/** 
 * Get the operation details for the specified EndPointField over a given time range depending on the direction specified. Operation details in the "incoming" direction consists of consists of the datasets and their fields (  {@link DatasetField}) that this field originates from, as well as the programs and operations that generated this field from those origins. In outgoing direction, it consists of the datasets and their fields (  {@link DatasetField}) that were computed from this field, along with the programs and operations that performed the computation. When direction is specified as 'both', incoming as well as outgoing operations are returned.
 * @param direction the direction in which operations need to be computed
 * @param endPointField the EndPointField for which operations to be returned
 * @param start start time (inclusive) in milliseconds
 * @param end end time (exclusive) in milliseconds
 * @return the FieldLineageDetails instance
 */
FieldLineageDetails getOperationDetails(Constants.FieldLineage.Direction direction,EndPointField endPointField,long start,long end){
  List<ProgramFieldOperationInfo> incoming=null;
  List<ProgramFieldOperationInfo> outgoing=null;
  if (direction == Constants.FieldLineage.Direction.INCOMING || direction == Constants.FieldLineage.Direction.BOTH) {
    List<ProgramRunOperations> incomingOperations=fieldLineageReader.getIncomingOperations(endPointField,start,end);
    incoming=processOperations(incomingOperations);
  }
  if (direction == Constants.FieldLineage.Direction.OUTGOING || direction == Constants.FieldLineage.Direction.BOTH) {
    List<ProgramRunOperations> outgoingOperations=fieldLineageReader.getOutgoingOperations(endPointField,start,end);
    outgoing=processOperations(outgoingOperations);
  }
  return new FieldLineageDetails(incoming,outgoing);
}