private CFValue changeLockAnnoToTop(Receiver r,CFValue currentValue){
  if (currentValue == null) {
    Set<AnnotationMirror> set=AnnotationUtils.createAnnotationSet();
    set.add(atypeFactory.GUARDEDBYUNKNOWN);
    set.add(atypeFactory.LOCKPOSSIBLYHELD);
    return analysis.createAbstractValue(set,r.getType());
  }
  QualifierHierarchy hierarchy=atypeFactory.getQualifierHierarchy();
  Set<AnnotationMirror> currentSet=currentValue.getAnnotations();
  AnnotationMirror gb=hierarchy.findAnnotationInHierarchy(currentSet,atypeFactory.GUARDEDBYUNKNOWN);
  Set<AnnotationMirror> newSet=AnnotationUtils.createAnnotationSet();
  newSet.add(atypeFactory.LOCKPOSSIBLYHELD);
  if (gb != null) {
    newSet.add(gb);
  }
  return analysis.createAbstractValue(newSet,currentValue.getUnderlyingType());
}

private CFValue changeLockAnnoToTop ( Receiver r , CFValue currentValue ) { if ( currentValue == null ) { Set < AnnotationMirror > set = AnnotationUtils . createAnnotationSet ( ) ; set . add ( atypeFactory . GUARDEDBYUNKNOWN ) ; set . add ( atypeFactory . LOCKPOSSIBLYHELD ) ; return analysis . createAbstractValue ( set , r . getType ( ) ) ; } QualifierHierarchy hierarchy = atypeFactory . getQualifierHierarchy ( ) ; Set < AnnotationMirror > currentSet = currentValue . getAnnotations ( ) ; AnnotationMirror gb = hierarchy . findAnnotationInHierarchy ( currentSet , atypeFactory . GUARDEDBYUNKNOWN ) ; Set < AnnotationMirror > newSet = AnnotationUtils . createAnnotationSet ( ) ; newSet . add ( atypeFactory . LOCKPOSSIBLYHELD ) ; if ( gb != null ) { newSet . add ( gb ) ; } return analysis . createAbstractValue ( newSet , currentValue . getUnderlyingType ( ) ) ; }
makes a new cfvalue with the same annotations as currentvalue except that the annotation in the lockpossiblyheld hierarchy is set to lockpossiblyheld . if currentvalue is null , then a new value is created where the annotation set is lockpossiblyheld and guardedbyunknown
