Program: 132783
Project: 132783
Buggy source:
@Override public List<Alias> getAliases(){
switch (this.op) {
case STRUCT_CREATE_ALIAS:
    return Alias.makeStructAliases2(getInput(0).getVar(),getInputsTail(1),getOutput(0),AliasTransform.IDENTITY);
case STRUCT_INIT_FIELDS:
{
    Out<List<List<String>>> fieldPaths=new Out<List<List<String>>>();
    Out<List<Arg>> fieldVals=new Out<List<Arg>>();
    List<Alias> aliases=new ArrayList<Alias>();
    unpackStructInitArgs(fieldPaths,null,fieldVals);
    assert(fieldPaths.val.size() == fieldVals.val.size());
    for (int i=0; i < fieldPaths.val.size(); i++) {
      List<String> fieldPath=fieldPaths.val.get(i);
      Arg fieldVal=fieldVals.val.get(i);
      if (fieldVal.isVar()) {
        aliases.addAll(Alias.makeStructAliases(getOutput(0),fieldPath,fieldVal.getVar(),AliasTransform.RETRIEVE));
      }
    }
    return aliases;
  }
case STRUCT_RETRIEVE_SUB:
return Alias.makeStructAliases2(getInput(0).getVar(),getInputsTail(2),getOutput(0),AliasTransform.RETRIEVE);
case STRUCT_STORE_SUB:
return Alias.makeStructAliases2(getOutput(0),getInputsTail(1),getInput(0).getVar(),AliasTransform.RETRIEVE);
case STRUCT_COPY_OUT:
return Alias.makeStructAliases2(getInput(0).getVar(),getInputsTail(1),getOutput(0),AliasTransform.COPY);
case STRUCT_COPY_IN:
return Alias.makeStructAliases2(getOutput(0),getInputsTail(1),getInput(0).getVar(),AliasTransform.COPY);
case STORE_REF:
{
Var ref=getOutput(0);
Var val=getInput(0).getVar();
return new Alias(ref,Collections.<String>emptyList(),AliasTransform.RETRIEVE,val).asList();
}
case LOAD_REF:
{
Var val=getOutput(0);
Var ref=getInput(0).getVar();
return new Alias(ref,Collections.<String>emptyList(),AliasTransform.RETRIEVE,val).asList();
}
case COPY_REF:
{
Var ref1=getOutput(0);
Var ref2=getInput(0).getVar();
return Arrays.asList(new Alias(ref1,Collections.<String>emptyList(),AliasTransform.COPY,ref2),new Alias(ref2,Collections.<String>emptyList(),AliasTransform.COPY,ref1));
}
case GET_FILENAME_ALIAS:
{
return new Alias(getInput(0).getVar(),Alias.FILENAME_PATH,AliasTransform.IDENTITY,getOutput(0)).asList();
}
default :
break;
}
return Alias.NONE;
}

Fixed version (ground truth):
@Override public List<Alias> getAliases(){
switch (this.op) {
case STRUCT_CREATE_ALIAS:
    return Alias.makeStructAliases2(getInput(0).getVar(),getInputsTail(1),getOutput(0),AliasTransform.IDENTITY);
case STRUCT_INIT_FIELDS:
{
    Out<List<List<String>>> fieldPaths=new Out<List<List<String>>>();
    Out<List<Arg>> fieldVals=new Out<List<Arg>>();
    List<Alias> aliases=new ArrayList<Alias>();
    unpackStructInitArgs(fieldPaths,null,fieldVals);
    assert(fieldPaths.val.size() == fieldVals.val.size());
    for (int i=0; i < fieldPaths.val.size(); i++) {
      List<String> fieldPath=fieldPaths.val.get(i);
      Arg fieldVal=fieldVals.val.get(i);
      if (fieldVal.isVar()) {
        aliases.addAll(Alias.makeStructAliases(getOutput(0),fieldPath,fieldVal.getVar(),AliasTransform.RETRIEVE));
      }
    }
    return aliases;
  }
case STRUCT_RETRIEVE_SUB:
return Alias.makeStructAliases2(getInput(0).getVar(),getInputsTail(2),getOutput(0),AliasTransform.RETRIEVE);
case STRUCT_STORE_SUB:
if (getInput(0).isVar()) {
return Alias.makeStructAliases2(getOutput(0),getInputsTail(1),getInput(0).getVar(),AliasTransform.RETRIEVE);
}
break;
case STRUCT_COPY_OUT:
return Alias.makeStructAliases2(getInput(0).getVar(),getInputsTail(1),getOutput(0),AliasTransform.COPY);
case STRUCT_COPY_IN:
return Alias.makeStructAliases2(getOutput(0),getInputsTail(1),getInput(0).getVar(),AliasTransform.COPY);
case STORE_REF:
{
Var ref=getOutput(0);
Var val=getInput(0).getVar();
return new Alias(ref,Collections.<String>emptyList(),AliasTransform.RETRIEVE,val).asList();
}
case LOAD_REF:
{
Var val=getOutput(0);
Var ref=getInput(0).getVar();
return new Alias(ref,Collections.<String>emptyList(),AliasTransform.RETRIEVE,val).asList();
}
case COPY_REF:
{
Var ref1=getOutput(0);
Var ref2=getInput(0).getVar();
return Arrays.asList(new Alias(ref1,Collections.<String>emptyList(),AliasTransform.COPY,ref2),new Alias(ref2,Collections.<String>emptyList(),AliasTransform.COPY,ref1));
}
case GET_FILENAME_ALIAS:
{
return new Alias(getInput(0).getVar(),Alias.FILENAME_PATH,AliasTransform.IDENTITY,getOutput(0)).asList();
}
default :
break;
}
return Alias.NONE;
}