Program: 10368
Project: 10368
Buggy source:
/** 
 * Creates a   {@code ContractAnnotationModel} froman  {@code AnnotationMirror}.
 * @param parent the target of the annotation
 * @param annotation the annotation
 * @param primary whether this is a primary contract annotation
 * @param owner the owner of this annotation
 * @return the contract model of this annotation
 */
@Requires({"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}) @Ensures("String_Node_Str") protected ContractAnnotationModel createContractModel(Element parent,AnnotationMirror annotation,boolean primary,ClassName owner){
  ContractAnnotationModel model=createBlankContractModel(parent,annotation,primary,owner);
  List<Long> lineNumbers=null;
  if (rootLineNumberIterator == null) {
    lineNumbers=getLineNumbers(parent,annotation);
  }
  AnnotationValue lastAnnotationValue=null;
  for (  AnnotationValue annotationValue : annotation.getElementValues().values()) {
    @SuppressWarnings("String_Node_Str") List<? extends AnnotationValue> values=(List<? extends AnnotationValue>)annotationValue.getValue();
    Iterator<? extends AnnotationValue> iterValue=values.iterator();
    Iterator<Long> iterLineNumber;
    if (rootLineNumberIterator != null) {
      iterLineNumber=rootLineNumberIterator;
    }
 else {
      iterLineNumber=lineNumbers.iterator();
    }
    while (iterValue.hasNext()) {
      String value=(String)iterValue.next().getValue();
      Long lineNumber=iterLineNumber.hasNext() ? iterLineNumber.next() : null;
      model.addValue(value,lineNumber);
    }
    lastAnnotationValue=annotationValue;
  }
  AnnotationSourceInfo sourceInfo=new AnnotationSourceInfo(parent,annotation,lastAnnotationValue,model.getValues());
  model.setSourceInfo(sourceInfo);
  return model;
}

Fixed version (ground truth):
/** 
 * Creates a   {@code ContractAnnotationModel} froman  {@code AnnotationMirror}.
 * @param parent the target of the annotation
 * @param annotation the annotation
 * @param primary whether this is a primary contract annotation
 * @param owner the owner of this annotation
 * @return the contract model of this annotation, or {@code null} ifthe annotation contains no contract (no or empty value)
 */
@Requires({"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}) protected ContractAnnotationModel createContractModel(Element parent,AnnotationMirror annotation,boolean primary,ClassName owner){
  ContractAnnotationModel model=createBlankContractModel(parent,annotation,primary,owner);
  List<Long> lineNumbers=null;
  if (rootLineNumberIterator == null) {
    lineNumbers=getLineNumbers(parent,annotation);
  }
  AnnotationValue lastAnnotationValue=null;
  for (  AnnotationValue annotationValue : annotation.getElementValues().values()) {
    @SuppressWarnings("String_Node_Str") List<? extends AnnotationValue> values=(List<? extends AnnotationValue>)annotationValue.getValue();
    Iterator<? extends AnnotationValue> iterValue=values.iterator();
    Iterator<Long> iterLineNumber;
    if (rootLineNumberIterator != null) {
      iterLineNumber=rootLineNumberIterator;
    }
 else {
      iterLineNumber=lineNumbers.iterator();
    }
    while (iterValue.hasNext()) {
      String value=(String)iterValue.next().getValue();
      Long lineNumber=iterLineNumber.hasNext() ? iterLineNumber.next() : null;
      model.addValue(value,lineNumber);
    }
    lastAnnotationValue=annotationValue;
  }
  if (model.getValues().isEmpty()) {
    diagnosticManager.warning("String_Node_Str",null,0,0,0,parent,annotation,lastAnnotationValue);
    return null;
  }
  AnnotationSourceInfo sourceInfo=new AnnotationSourceInfo(parent,annotation,lastAnnotationValue,model.getValues());
  model.setSourceInfo(sourceInfo);
  return model;
}