Program: 132542
Project: 132542
Buggy source:
/** 
 * Evaluate any task properties.  Put values into propVals.
 * @param context
 * @param fc
 * @param propVals
 * @param renames
 * @throws UserException
 * @returns true if a wait statement was opened
 */
private boolean evalCallProperties(Context context,FnID id,FunctionCall fc,TaskProps propVals,Map<String,String> renames) throws UserException {
  if (fc.annotations().isEmpty()) {
    return false;
  }
  List<Pair<TaskPropKey,Var>> propFutures=new ArrayList<Pair<TaskPropKey,Var>>();
  List<Var> waitVars=new ArrayList<Var>();
  Var locationVar=null;
  for (  TaskPropKey ann : fc.annotations().keySet()) {
    checkCallAnnotation(context,id,fc,ann);
    SwiftAST expr=fc.annotations().get(ann);
    Type exprType=TypeChecker.findExprType(context,expr);
    Type concreteType=TaskProp.checkFrontendType(context,ann,exprType);
    Var future=exprWalker.eval(context,expr,concreteType,false,renames);
    waitVars.add(future);
    propFutures.add(Pair.create(ann,future));
  }
  if (fc.location() != null) {
    checkCanTarget(context,id);
    locationVar=exprWalker.eval(context,fc.location(),Types.F_LOCATION,false,renames);
    waitVars.add(locationVar);
  }
  backend.startWaitStatement(context.constructName("String_Node_Str"),VarRepr.backendVars(waitVars),WaitMode.WAIT_ONLY,false,false,ExecTarget.nonDispatchedControl());
  for (  Pair<TaskPropKey,Var> x : propFutures) {
    Var value=exprWalker.retrieveToVar(context,x.val2);
    propVals.put(x.val1,value.asArg());
  }
  if (locationVar != null) {
    populateFromLocationStruct(context,locationVar,propVals);
  }
  if (fc.softLocationOverride()) {
    propVals.put(TaskPropKey.LOC_STRICTNESS,TaskProps.LOC_STRICTNESS_SOFT_ARG);
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Evaluate any task properties.  Put values into propVals.
 * @param context
 * @param fc
 * @param propVals
 * @param renames
 * @throws UserException
 * @returns true if a wait statement was opened
 */
private boolean evalCallProperties(Context context,FnID id,FunctionCall fc,TaskProps propVals,Map<String,String> renames) throws UserException {
  List<Pair<TaskPropKey,Var>> propFutures=new ArrayList<Pair<TaskPropKey,Var>>();
  List<Var> waitVars=new ArrayList<Var>();
  Var locationVar=null;
  for (  TaskPropKey ann : fc.annotations().keySet()) {
    checkCallAnnotation(context,id,fc,ann);
    SwiftAST expr=fc.annotations().get(ann);
    Type exprType=TypeChecker.findExprType(context,expr);
    Type concreteType=TaskProp.checkFrontendType(context,ann,exprType);
    Var future=exprWalker.eval(context,expr,concreteType,false,renames);
    waitVars.add(future);
    propFutures.add(Pair.create(ann,future));
  }
  if (fc.location() != null) {
    checkCanTarget(context,id);
    locationVar=exprWalker.eval(context,fc.location(),Types.F_LOCATION,false,renames);
    waitVars.add(locationVar);
  }
  if (waitVars.isEmpty()) {
    return false;
  }
  backend.startWaitStatement(context.constructName("String_Node_Str"),VarRepr.backendVars(waitVars),WaitMode.WAIT_ONLY,false,false,ExecTarget.nonDispatchedControl());
  for (  Pair<TaskPropKey,Var> x : propFutures) {
    Var value=exprWalker.retrieveToVar(context,x.val2);
    propVals.put(x.val1,value.asArg());
  }
  if (locationVar != null) {
    populateFromLocationStruct(context,locationVar,propVals);
  }
  if (fc.softLocationOverride()) {
    propVals.put(TaskPropKey.LOC_STRICTNESS,TaskProps.LOC_STRICTNESS_SOFT_ARG);
  }
  return true;
}