nus-yam/ex-repair huggingface dataset:
Program: 109935
Project: 109935
Buggy source:
public Survey parse() throws MalformedURLException, SurveyException {
  Map<String,ArrayList<CSVEntry>> lexemes=csvLexer.entries;
  Survey survey=new Survey();
  survey.encoding=csvLexer.encoding;
  survey.source=csvLexer.filename;
  survey.sourceName=new File(csvLexer.filename).getName().split("String_Node_Str")[0];
  for (  String key : lexemes.keySet())   CSVEntry.sort(lexemes.get(key));
  ArrayList<Question> questions=unifyQuestions();
  survey.questions=questions;
  if (lexemes.containsKey(Survey.BLOCK)) {
    ArrayList<Block> blocks=initializeBlocks();
    unifyBlocks(lexemes.get(Survey.BLOCK),blocks,lexemes.get(Survey.QUESTION),questions);
    survey.blocks=blocks;
  }
 else   survey.blocks=new ArrayList<Block>();
  Collections.sort(survey.blocks);
  unifyBranching(survey);
  survey.correlationMap=this.correlationMap;
  return survey;
}

Fixed version (ground truth):
public Survey parse() throws MalformedURLException, SurveyException {
  Map<String,ArrayList<CSVEntry>> lexemes=csvLexer.entries;
  Survey survey=new Survey();
  survey.encoding=csvLexer.encoding;
  survey.source=csvLexer.filename;
  survey.sourceName=new File(csvLexer.filename).getName().split("String_Node_Str")[0];
  for (  String key : lexemes.keySet())   CSVEntry.sort(lexemes.get(key));
  ArrayList<Question> questions=unifyQuestions();
  survey.questions=questions;
  if (lexemes.containsKey(Survey.BLOCK)) {
    ArrayList<Block> blocks=initializeBlocks();
    unifyBlocks(lexemes.get(Survey.BLOCK),blocks,lexemes.get(Survey.QUESTION),questions);
    survey.blocks=blocks;
  }
 else   survey.blocks=new ArrayList<Block>();
  Collections.sort(survey.blocks);
  int startingIndex=0;
  for (  Block b : survey.blocks) {
    System.out.println(b.strId + "String_Node_Str" + b.index);
    Block.propagateQuestionIndices(b,0);
    startingIndex+=b.blockSize();
  }
  Collections.sort(survey.questions);
  for (  Question q : survey.questions)   System.out.print("String_Node_Str" + q.index);
  System.out.println();
  unifyBranching(survey);
  survey.correlationMap=this.correlationMap;
  return survey;
}
Program: 109936
Project: 109936
Buggy source:
protected static void shuffleRandomizedBlocks(List<Block> blockCollection){
  List<Integer> indices=new ArrayList<Integer>();
  for (  Block b : blockCollection)   indices.add(b.index);
  Collections.shuffle(indices,Question.rng);
  for (int i=0; i < blockCollection.size(); i++)   blockCollection.get(i).index=indices.get(i);
  for (  Block b : blockCollection)   propagateIndices(b);
}

Fixed version (ground truth):
protected static void shuffleRandomizedBlocks(List<Block> blockCollection){
  List<Integer> indices=new ArrayList<Integer>();
  for (  Block b : blockCollection)   indices.add(b.index);
  Collections.shuffle(indices,Question.rng);
  for (int i=0; i < blockCollection.size(); i++)   blockCollection.get(i).index=indices.get(i);
  for (  Block b : blockCollection)   propagateBlockIndices(b);
}
Program: 109937
Project: 109937
Buggy source:
public void sort() throws SurveyException {
  System.out.println("String_Node_Str");
  Collections.sort(questions);
  Collections.sort(subBlocks);
  int base=questions.get(0).index, j=0;
}

Fixed version (ground truth):
public void sort() throws SurveyException {
  System.out.println("String_Node_Str");
  Collections.sort(questions);
  Collections.sort(subBlocks);
  int base=questions.get(0).index, j=0;
  for (int i=1; i < questions.size(); i++) {
    int thisIndex=questions.get(i).index;
    if (i + base != thisIndex)     if (subBlocks != null)     for (    Block b : subBlocks.subList(j,subBlocks.size())) {
      j+=1;
      int jumpIndex=i + base + b.blockSize();
      if (jumpIndex == thisIndex)       break;
 else       if (jumpIndex > thisIndex)       throw new BlockContiguityException(questions.get(i - 1),questions.get(i),this,this.getClass().getEnclosingMethod());
    }
 else     throw new BlockContiguityException(questions.get(i - 1),questions.get(i),this,this.getClass().getEnclosingMethod());
  }
}
Program: 109938
Project: 109938
Buggy source:
public void randomize() throws SurveyException {
  sort();
  Question[] qs=questions.toArray(new Question[questions.size()]);
  for (int i=qs.length; i > 0; i--) {
    int j=Question.rng.nextInt(i);
    int k=qs[j].index;
    qs[j].index=qs[i - 1].index;
    qs[i - 1].index=k;
  }
  for (  Question q : qs)   q.randomize();
  List<Block> randomizedBlocks=new LinkedList<Block>();
  for (  Block b : this.subBlocks)   if (b.randomize)   randomizedBlocks.add(b);
  shuffleRandomizedBlocks(randomizedBlocks);
  sort();
  if (subBlocks != null)   for (  Block b : subBlocks)   b.randomize();
}

Fixed version (ground truth):
public void randomize() throws SurveyException {
  sort();
  List<Block> randomizedBlocks=new LinkedList<Block>();
  shuffleRandomizedBlocks(randomizedBlocks);
  for (  Block b : this.subBlocks)   if (b.randomize)   randomizedBlocks.add(b);
  sort();
  Question[] qs=questions.toArray(new Question[questions.size()]);
  for (int i=qs.length; i > 0; i--) {
    int j=Question.rng.nextInt(i);
    int k=qs[j].index;
    qs[j].index=qs[i - 1].index;
    qs[i - 1].index=k;
  }
  for (  Question q : qs)   q.randomize();
  if (subBlocks != null)   for (  Block b : subBlocks)   b.randomize();
  sort();
}
Program: 109939
Project: 109939
Buggy source:
public void sort() throws SurveyException {
  Collections.sort(questions);
  Collections.sort(subBlocks);
  int base=questions.get(0).index, j=0;
}

Fixed version (ground truth):
public void sort() throws SurveyException {
  System.out.println("String_Node_Str");
  Collections.sort(questions);
  Collections.sort(subBlocks);
  int base=questions.get(0).index, j=0;
}
Program: 109940
Project: 109940
Buggy source:
public void randomize() throws SurveyException {
  sort();
  Question[] qs=questions.toArray(new Question[questions.size()]);
  for (int i=qs.length; i > 0; i--) {
    int j=Question.rng.nextInt(i);
    int k=qs[j].index;
    qs[j].index=qs[i - 1].index;
    qs[i - 1].index=k;
  }
  for (  Question q : qs)   q.randomize();
  List<Block> randomizedBlocks=new LinkedList<Block>();
  for (  Block b : this.subBlocks)   if (b.randomize)   randomizedBlocks.add(b);
  shuffleRandomizedBlocks(randomizedBlocks);
  sort();
  if (branchQ != null) {
    Question lastQuestion=questions.get(questions.size() - 1);
    int lastIndex=lastQuestion.index;
    lastQuestion.index=branchQ.index;
    branchQ.index=lastIndex;
    sort();
  }
  if (subBlocks != null)   for (  Block b : subBlocks)   b.randomize();
}

Fixed version (ground truth):
public void randomize() throws SurveyException {
  sort();
  Question[] qs=questions.toArray(new Question[questions.size()]);
  for (int i=qs.length; i > 0; i--) {
    int j=Question.rng.nextInt(i);
    int k=qs[j].index;
    qs[j].index=qs[i - 1].index;
    qs[i - 1].index=k;
  }
  for (  Question q : qs)   q.randomize();
  List<Block> randomizedBlocks=new LinkedList<Block>();
  for (  Block b : this.subBlocks)   if (b.randomize)   randomizedBlocks.add(b);
  shuffleRandomizedBlocks(randomizedBlocks);
  sort();
  if (subBlocks != null)   for (  Block b : subBlocks)   b.randomize();
}
Program: 109941
Project: 109941
Buggy source:
public void randomize() throws SurveyException {
  Component[] opts=getOptListByIndex();
  if (randomize)   if (ordered && rng.nextFloat() > 0.5) {
    for (int i=0; i < opts.length; i++)     opts[i].index=opts.length - 1 - i;
  }
 else   if (!ordered) {
    for (int i=opts.length; i > 0; i--) {
      int j=rng.nextInt(i);
      int temp=opts[j].index;
      opts[j].index=opts[i - 1].index;
      opts[i - 1].index=temp;
    }
  }
}

Fixed version (ground truth):
public void randomize() throws SurveyException {
  assert(randomize);
  Component[] opts=getOptListByIndex();
  if (randomize)   if (ordered && rng.nextFloat() > 0.5) {
    for (int i=0; i < opts.length; i++)     opts[i].index=opts.length - 1 - i;
  }
 else   if (!ordered) {
    for (int i=opts.length; i > 0; i--) {
      int j=rng.nextInt(i);
      int temp=opts[j].index;
      opts[j].index=opts[i - 1].index;
      opts[i - 1].index=temp;
    }
  }
}
Program: 109942
Project: 109942
Buggy source:
public synchronized Map<String,Integer> randomize() throws SurveyException {
  if (blocks != null)   for (  Block b : blocks)   b.randomize();
 else {
    Collections.shuffle(questions,Question.rng);
    int i=0;
    for (    Question q : questions) {
      q.randomize();
      q.index=i;
      i++;
    }
  }
  Map<String,Integer> orderSeen=new HashMap<String,Integer>();
  for (  Question q : this.getQuestionsByIndex()) {
    orderSeen.put(q.quid,q.index);
    for (    Component c : q.getOptListByIndex())     orderSeen.put(c.getCid(),c.index);
  }
  return orderSeen;
}

Fixed version (ground truth):
public synchronized void randomize() throws SurveyException {
  if (!(blocks == null || blocks.isEmpty())) {
    System.out.println("String_Node_Str");
    for (    Block b : blocks)     b.randomize();
  }
 else {
    System.out.println("String_Node_Str");
    Collections.shuffle(questions,Question.rng);
    int i=0;
    for (    Question q : questions) {
      q.randomize();
      q.index=i;
      i++;
    }
  }
}
Program: 109943
Project: 109943
Buggy source:
@Override public int compareTo(Object o){
  return this.index - ((SurveyObj)o).index;
}

Fixed version (ground truth):
@Override public int compareTo(SurveyObj o){
  System.out.println("String_Node_Str");
  return this.index - o.index;
}
Program: 109944
Project: 109944
Buggy source:
public static String registerNewHitType(Record record){
  int waittime=1;
synchronized (service) {
    while (true) {
      try {
        String keywords=(String)record.parameters.getProperty("String_Node_Str");
        String description="String_Node_Str";
        QualificationType qualificationType=service.createQualificationType(record.survey.sid + gensym.next(),keywords,description,QualificationTypeStatus.Active,new Long(Integer.MAX_VALUE),null,null,null,true,0);
        assert(qualificationType != null);
        record.qualificationType=qualificationType;
        QualificationRequirement qr=answerOnce(record);
        String hitTypeId=service.registerHITType(maxAutoApproveDelay,Long.parseLong(MturkLibrary.props.getProperty("String_Node_Str")),Double.parseDouble((String)MturkLibrary.props.get("String_Node_Str")),(String)MturkLibrary.props.getProperty("String_Node_Str"),(String)MturkLibrary.props.getProperty("String_Node_Str"),(String)MturkLibrary.props.getProperty("String_Node_Str"),new QualificationRequirement[]{qr});
        record.hitTypeId=hitTypeId;
        LOGGER.info(String.format("String_Node_Str",qualificationType.getQualificationTypeId()));
        return hitTypeId;
      }
 catch (      InternalServiceException ise) {
        LOGGER.warn(ise);
        if (overTime("String_Node_Str",waittime))         throw new RuntimeException("String_Node_Str");
        chill(waittime);
        waittime*=2;
      }
    }
  }
}

Fixed version (ground truth):
public static String registerNewHitType(Record record){
  int waittime=1;
synchronized (service) {
    while (true) {
      try {
        String keywords=(String)record.parameters.getProperty("String_Node_Str");
        String description="String_Node_Str";
        QualificationType qualificationType=service.createQualificationType(record.survey.sid + gensym.next() + MturkLibrary.TIME,keywords,description,QualificationTypeStatus.Active,new Long(Integer.MAX_VALUE),null,null,null,true,0);
        assert(qualificationType != null);
        record.qualificationType=qualificationType;
        QualificationRequirement qr=answerOnce(record);
        String hitTypeId=service.registerHITType(maxAutoApproveDelay,Long.parseLong(MturkLibrary.props.getProperty("String_Node_Str")),Double.parseDouble((String)MturkLibrary.props.get("String_Node_Str")),(String)MturkLibrary.props.getProperty("String_Node_Str"),(String)MturkLibrary.props.getProperty("String_Node_Str"),(String)MturkLibrary.props.getProperty("String_Node_Str"),new QualificationRequirement[]{qr});
        record.hitTypeId=hitTypeId;
        LOGGER.info(String.format("String_Node_Str",qualificationType.getQualificationTypeId()));
        return hitTypeId;
      }
 catch (      InternalServiceException ise) {
        LOGGER.warn(ise);
        if (overTime("String_Node_Str",waittime))         throw new RuntimeException("String_Node_Str");
        chill(waittime);
        waittime*=2;
      }
    }
  }
}
Program: 109945
Project: 109945
Buggy source:
public static void run(final Survey survey,final BoxedBool interrupt) throws SurveyException, ServiceException, IOException, ParseException {
  final Properties params=(Properties)MturkLibrary.props.clone();
  do {
    if (!interrupt.getInterrupt() && SurveyPoster.postMore(survey)) {
      Map<String,Integer> orderSeen=survey.randomize();
      List<HIT> hits;
      hits=SurveyPoster.postSurvey(survey,orderSeen);
      System.out.println("String_Node_Str" + hits.size());
      ResponseManager.chill(2);
    }
    ResponseManager.chill(2);
  }
 while (stillLive(survey,interrupt) && !interrupt.getInterrupt());
  ResponseManager.chill(10);
  Record record=ResponseManager.getRecord(survey);
synchronized (record) {
    for (    HIT hit : ResponseManager.listAvailableHITsForRecord(ResponseManager.getRecord(survey)))     ResponseManager.expireHIT(hit);
    ResponseManager.removeQualification(record);
  }
  interrupt.setInterrupt(true);
}

Fixed version (ground truth):
public static void run(final Survey survey,final BoxedBool interrupt) throws SurveyException, ServiceException, IOException, ParseException {
  final Properties params=(Properties)MturkLibrary.props.clone();
  do {
    if (!interrupt.getInterrupt() && SurveyPoster.postMore(survey)) {
      survey.randomize();
      List<HIT> hits;
      hits=SurveyPoster.postSurvey(survey);
      System.out.println("String_Node_Str" + hits.size());
      ResponseManager.chill(2);
    }
    ResponseManager.chill(2);
  }
 while (stillLive(survey,interrupt) && !interrupt.getInterrupt());
  ResponseManager.chill(10);
  Record record=ResponseManager.getRecord(survey);
synchronized (record) {
    for (    HIT hit : ResponseManager.listAvailableHITsForRecord(ResponseManager.getRecord(survey)))     ResponseManager.expireHIT(hit);
    ResponseManager.removeQualification(record);
  }
  interrupt.setInterrupt(true);
}
Program: 109947
Project: 109947
Buggy source:
private void unifyBranching(Survey survey) throws SurveyException {
  ArrayList<CSVEntry> branches=lexemes.get(Survey.BRANCH);
  if (!(branches == null || branches.isEmpty())) {
    for (    CSVEntry entry : branches) {
      if (!(entry == null || entry.contents == null || entry.contents.equals("String_Node_Str"))) {
        CSVEntry matchingOption=lexemes.get(Survey.OPTIONS).get(branches.indexOf(entry));
        Question question=null;
        for (        Question q : survey.questions) {
          if (q.sourceLineNos.contains(Integer.valueOf(entry.lineNo))) {
            question=q;
            break;
          }
        }
        if (question == null) {
          SurveyException e=new SyntaxException(String.format("String_Node_Str",entry.contents,entry.lineNo),this,this.getClass().getEnclosingMethod());
          LOGGER.warn(e);
          throw e;
        }
        if (question.block.branchQ != null) {
          if (!question.quid.equals(question.block.branchQ.quid)) {
            SurveyException e=new BranchException(String.format("String_Node_Str",entry.contents),this,this.getClass().getEnclosingMethod());
            LOGGER.warn(e);
            throw e;
          }
        }
 else         question.block.branchQ=question;
        Component c=question.getOptByData(matchingOption.contents);
        Block b=allBlockLookUp.get(entry.contents);
        if (b == null) {
          SurveyException e=new SyntaxException(String.format("String_Node_Str",entry.contents,entry.lineNo),this,this.getClass().getEnclosingMethod());
          LOGGER.warn(e);
          throw e;
        }
        question.branchMap.put(c,b);
      }
    }
  }
}

Fixed version (ground truth):
private void unifyBranching(Survey survey) throws SurveyException {
  ArrayList<CSVEntry> branches=lexemes.get(Survey.BRANCH);
  if (!(branches == null || branches.isEmpty())) {
    for (    CSVEntry entry : branches) {
      if (!(entry == null || entry.contents == null || entry.contents.equals("String_Node_Str"))) {
        Question question=survey.getQuestionByLineNo(entry.lineNo);
        if (question.block.branchQ != null) {
          if (!question.quid.equals(question.block.branchQ.quid)) {
            SurveyException e=new BranchException(String.format("String_Node_Str",entry.contents),this,this.getClass().getEnclosingMethod());
            LOGGER.warn(e);
            throw e;
          }
        }
 else         question.block.branchQ=question;
        CSVEntry option=lexemes.get(Survey.OPTIONS).get(branches.indexOf(entry));
        Component c=question.getOptById(Component.makeComponentId(option.lineNo,option.colNo));
        Block b=allBlockLookUp.get(entry.contents);
        if (b == null) {
          SurveyException e=new SyntaxException(String.format("String_Node_Str",entry.contents,entry.lineNo),this,this.getClass().getEnclosingMethod());
          LOGGER.warn(e);
          throw e;
        }
        question.branchMap.put(c,b);
      }
    }
  }
}
Program: 109949
Project: 109949
Buggy source:
public Component(int row,int col){
  this.cid=String.format("String_Node_Str",row,col);
}

Fixed version (ground truth):
public Component(int row,int col){
  this.cid=makeComponentId(row,col);
}
Program: 109950
Project: 109950
Buggy source:
public Question(int row,int col){
  this.quid=String.format("String_Node_Str",row,col);
}

Fixed version (ground truth):
public Question(int row,int col){
  this.quid=makeQuestionId(row,col);
}
Program: 109951
Project: 109951
Buggy source:
public Component getOptById(String oid) throws SurveyException {
  for (  Component c : options.values()) {
    if (c.getCid().equals(oid))     return c;
  }
  throw new OptionNotFoundException(oid,this.quid);
}

Fixed version (ground truth):
public Component getOptById(String oid) throws SurveyException {
  if (options.containsKey(oid))   return options.get(oid);
  throw new OptionNotFoundException(oid,this.quid);
}
Program: 109952
Project: 109952
Buggy source:
public QuestionNotFoundException(String quid,String sid){
  super(String.format("String_Node_Str",quid,sid));
}

Fixed version (ground truth):
public QuestionNotFoundException(int i){
  super(String.format("String_Node_Str",i));
}
Program: 109954
Project: 109954
Buggy source:
public CSVLexer(String sep,String filename) throws IOException, SurveyException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
  this(sep,filename,"String_Node_Str");
}

Fixed version (ground truth):
public CSVLexer(String filename,String sep) throws IOException, SurveyException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
  this(filename,sep,"String_Node_Str");
}
Program: 109956
Project: 109956
Buggy source:
protected static void addResponses(Survey survey,String hitid) throws SurveyException, IOException {
  boolean success=false;
  Record r=manager.get(survey);
  List<SurveyResponse> responses=r.responses;
  List<SurveyResponse> botResponses=r.botResponses;
  QC qc=r.qc;
  List<SurveyResponse> validResponsesToAdd=new ArrayList<SurveyResponse>();
  List<SurveyResponse> randomResponsesToAdd=new ArrayList<SurveyResponse>();
  while (!success) {
    try {
      Assignment[] assignments=getAllAssignmentsForHIT(hitid);
      for (      Assignment a : assignments) {
        if (a.getAssignmentStatus().equals(AssignmentStatus.Submitted)) {
          SurveyResponse sr=parseResponse(a,survey);
          if (QCAction.addAsValidResponse(qc.assess(sr),a,sr))           validResponsesToAdd.add(sr);
 else           randomResponsesToAdd.add(sr);
        }
      }
      responses.addAll(validResponsesToAdd);
      botResponses.addAll(randomResponsesToAdd);
      success=true;
    }
 catch (    ServiceException se) {
      LOGGER.warn("String_Node_Str" + se);
    }
  }
}

Fixed version (ground truth):
protected static void addResponses(Survey survey,String hitid) throws SurveyException, IOException {
  boolean success=false;
  Record r=manager.get(survey);
  List<SurveyResponse> responses=r.responses;
  List<SurveyResponse> botResponses=r.botResponses;
  QC qc=r.qc;
  List<SurveyResponse> validResponsesToAdd=new ArrayList<SurveyResponse>();
  List<SurveyResponse> randomResponsesToAdd=new ArrayList<SurveyResponse>();
  while (!success) {
    try {
      Assignment[] assignments=getAllAssignmentsForHIT(hitid);
      for (      Assignment a : assignments) {
        if (a.getAssignmentStatus().equals(AssignmentStatus.Submitted)) {
          SurveyResponse sr=parseResponse(a,survey);
          if (QCAction.addAsValidResponse(qc.assess(sr),a,r))           validResponsesToAdd.add(sr);
 else           randomResponsesToAdd.add(sr);
        }
      }
      responses.addAll(validResponsesToAdd);
      botResponses.addAll(randomResponsesToAdd);
      success=true;
    }
 catch (    ServiceException se) {
      LOGGER.warn("String_Node_Str" + se);
    }
  }
}
Program: 109957
Project: 109957
Buggy source:
public static String createHIT(String title,String description,String keywords,String xml,double reward,long assignmentDuration,long maxAutoApproveDelay,long lifetime,QualificationType qualificationType){
  int waittime=1;
synchronized (service) {
    while (true) {
      try {
        QualificationRequirement qr=new QualificationRequirement(qualificationType.getQualificationTypeId(),null,null,null,true);
        HIT hitid=service.createHIT(null,title,description,keywords,xml,reward,assignmentDuration,maxAutoApproveDelay,lifetime,1,"String_Node_Str",new QualificationRequirement[]{qr},null);
        return hitid.getHITId();
      }
 catch (      InternalServiceException ise) {
        LOGGER.info(ise);
        chill(waittime);
        waittime=waittime * 2;
      }
    }
  }
}

Fixed version (ground truth):
public static String createHIT(String title,String description,String keywords,String xml,double reward,long assignmentDuration,long maxAutoApproveDelay,long lifetime,QualificationType qualificationType) throws ParseException {
  int waittime=1;
synchronized (service) {
    while (true) {
      try {
        QualificationRequirement qr=new QualificationRequirement(qualificationType.getQualificationTypeId(),Comparator.fromString("String_Node_Str"),null,null,true);
        HIT hitid=service.createHIT(null,title,description,keywords,xml,reward,assignmentDuration,maxAutoApproveDelay,lifetime,1,"String_Node_Str",new QualificationRequirement[]{qr},null);
        return hitid.getHITId();
      }
 catch (      InternalServiceException ise) {
        LOGGER.info(ise);
        chill(waittime);
        waittime=waittime * 2;
      }
    }
  }
}
Program: 109958
Project: 109958
Buggy source:
private static void extendHIT(String hitd,Integer maxAssignmentsIncrement,Long expirationIncrementInSeconds){
  while (true) {
    try {
      service.extendHIT(hitd,maxAssignmentsIncrement,expirationIncrementInSeconds);
      return;
    }
 catch (    InternalServiceException ise) {
      chill(2);
    }
  }
}

Fixed version (ground truth):
private static void extendHIT(String hitd,Integer maxAssignmentsIncrement,Long expirationIncrementInSeconds){
  int waitTime=1;
  while (true) {
    try {
      service.extendHIT(hitd,maxAssignmentsIncrement,expirationIncrementInSeconds);
      return;
    }
 catch (    InternalServiceException ise) {
      chill(waitTime);
      waitTime=2 * waitTime;
    }
  }
}
Program: 109959
Project: 109959
Buggy source:
/** 
 * Writes survey back to its file (in case any changes have been made to its contents) and saves the parameters file. Also stores the file information for later loading.
 * @param survey
 */
private static void saveJob(Survey survey,Library.JobStatus status) throws SurveyException, IOException {
  String surveyString=survey.toFileString();
  String fileName=Library.STATEDATADIR + Library.fileSep + survey.sourceName+ "String_Node_Str";
  String paramsFileName=Library.STATEDATADIR + Library.fileSep + survey.sourceName+ "String_Node_Str";
  BufferedWriter csvWriter=new BufferedWriter(new FileWriter(fileName));
  csvWriter.write(surveyString);
  csvWriter.close();
  Record r=ResponseManager.manager.get(survey);
synchronized (r) {
    r.parameters.store(new BufferedWriter(new FileWriter(paramsFileName)),"String_Node_Str");
    Library.writeJobInfo(fileName,paramsFileName,status);
  }
}

Fixed version (ground truth):
/** 
 * Writes survey back to its file (in case any changes have been made to its contents) and saves the parameters file. Also stores the file information for later loading.
 * @param survey
 */
public static void saveJob(Survey survey,Library.JobStatus status) throws SurveyException, IOException {
  String surveyString=survey.toFileString();
  String fileName=Library.STATEDATADIR + Library.fileSep + survey.sourceName+ "String_Node_Str";
  String paramsFileName=Library.STATEDATADIR + Library.fileSep + survey.sourceName+ "String_Node_Str";
  BufferedWriter csvWriter=new BufferedWriter(new FileWriter(fileName));
  csvWriter.write(surveyString);
  csvWriter.close();
  Record r=ResponseManager.manager.get(survey);
synchronized (r) {
    r.parameters.store(new BufferedWriter(new FileWriter(paramsFileName)),"String_Node_Str");
    Library.writeJobInfo(fileName,paramsFileName,status);
  }
}
Program: 109961
Project: 109961
Buggy source:
@Test public void testRenew() throws IOException, SurveyException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
}

Fixed version (ground truth):
@Test public void testRenew() throws IOException, SurveyException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, ParseException {
  Tuple2<Survey,List<HIT>> stuff=sendSurvey();
  Survey survey=stuff._1();
  List<HIT> hits=stuff._2();
  for (  HIT hit : hits)   ResponseManager.expireHIT(hit);
  for (  HIT hit : hits)   if (ResponseManager.renewIfExpired(hit.getHITId(),ResponseManager.getRecord(survey).parameters))   continue;
 else   throw new RuntimeException("String_Node_Str");
  for (  HIT hit : hits)   ResponseManager.expireHIT(hit);
}
Program: 109962
Project: 109962
Buggy source:
private Tuple2<Survey,List> sendSurvey() throws IOException, SurveyException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
  SurveyPoster.init();
  MturkLibrary.props.setProperty("String_Node_Str","String_Node_Str");
  MturkLibrary.props.setProperty("String_Node_Str","String_Node_Str");
  SurveyPoster.updateProperties();
  CSVParser parser=new CSVParser(new CSVLexer((String)tests[1]._2(),(String)tests[1]._1()));
  Survey survey=parser.parse();
  List<HIT> hits=SurveyPoster.postSurvey(survey,new HashMap<String,Integer>());
  return new Tuple2<Survey,List>(survey,hits);
}

Fixed version (ground truth):
private Tuple2<Survey,List<HIT>> sendSurvey() throws IOException, SurveyException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, ParseException {
  SurveyPoster.init();
  MturkLibrary.props.setProperty("String_Node_Str","String_Node_Str");
  MturkLibrary.props.setProperty("String_Node_Str","String_Node_Str");
  SurveyPoster.updateProperties();
  CSVParser parser=new CSVParser(new CSVLexer((String)tests[1]._2(),(String)tests[1]._1()));
  Survey survey=parser.parse();
  List<HIT> hits=SurveyPoster.postSurvey(survey,new HashMap<String,Integer>());
  return new Tuple2<Survey,List<HIT>>(survey,hits);
}
Program: 109963
Project: 109963
Buggy source:
@Test public void testRecordCopy() throws IOException, SurveyException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
}

Fixed version (ground truth):
@Test public void testRecordCopy() throws IOException, SurveyException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, ParseException {
}
Program: 109964
Project: 109964
Buggy source:
private void openPreviewHTML(){
  if (Experiment.csvLabel != null) {
    String csv=(String)Experiment.csvLabel.getSelectedItem();
    String htmlFileName="String_Node_Str";
    try {
      Survey survey;
      if (cachedSurveys.containsKey(csv)) {
        Experiment.loadParameters();
        SurveyPoster.updateProperties();
        survey=cachedSurveys.get(csv);
      }
 else {
        survey=Experiment.makeSurvey();
        cachedSurveys.put(csv,survey);
      }
      HTML.spitHTMLToFile(HTML.getHTMLString(survey),survey);
      htmlFileName=ResponseManager.getRecord(survey).htmlFileName;
      Desktop.getDesktop().browse(new URI("String_Node_Str" + htmlFileName));
    }
 catch (    IOException io) {
      Experiment.updateStatusLabel(String.format("String_Node_Str",htmlFileName));
      SurveyMan.LOGGER.fatal(io);
    }
catch (    SurveyException se) {
      Experiment.updateStatusLabel(se.getMessage());
      cachedSurveys.remove(csv);
      SurveyMan.LOGGER.warn(se);
    }
catch (    URISyntaxException uri) {
      SurveyMan.LOGGER.fatal(uri);
    }
  }
}

Fixed version (ground truth):
private void openPreviewHTML(){
  if (Experiment.csvLabel != null) {
    String csv=(String)Experiment.csvLabel.getSelectedItem();
    String htmlFileName="String_Node_Str";
    try {
      Survey survey;
      if (cachedSurveys.containsKey(csv)) {
        Experiment.loadParameters();
        SurveyPoster.updateProperties();
        survey=cachedSurveys.get(csv);
      }
 else {
        survey=Experiment.makeSurvey();
        cachedSurveys.put(csv,survey);
      }
      HTML.spitHTMLToFile(HTML.getHTMLString(survey),survey);
      htmlFileName=ResponseManager.getRecord(survey).htmlFileName;
      Desktop.getDesktop().browse(new URI(new File(htmlFileName).getCanonicalPath()));
    }
 catch (    IOException io) {
      Experiment.updateStatusLabel(String.format("String_Node_Str",htmlFileName));
      SurveyMan.LOGGER.fatal(io);
    }
catch (    SurveyException se) {
      Experiment.updateStatusLabel(se.getMessage());
      cachedSurveys.remove(csv);
      SurveyMan.LOGGER.warn(se);
    }
catch (    URISyntaxException uri) {
      SurveyMan.LOGGER.fatal(uri);
    }
  }
}
Program: 109965
Project: 109965
Buggy source:
protected static void addResponses(Survey survey,String hitid) throws SurveyException, IOException {
  List<SurveyResponse> responses=getRecord(survey).responses;
  boolean success=false;
  ArrayList<SurveyResponse> responsesToAdd=new ArrayList<SurveyResponse>();
  while (!success) {
    try {
      Assignment[] assignments=service.getAllAssignmentsForHIT(hitid);
      System.out.println(assignments.length);
      for (      Assignment a : assignments) {
        SurveyResponse sr=parseResponse(a,survey);
        if (QCAction.addAsValidResponse(QC.assess(sr),a))         responsesToAdd.add(sr);
        System.out.println("String_Node_Str" + responses.size());
        responses.addAll(responsesToAdd);
        System.out.println("String_Node_Str" + responses.size());
      }
      success=true;
    }
 catch (    ServiceException se) {
      LOGGER.warn("String_Node_Str" + se);
    }
  }
}

Fixed version (ground truth):
protected static void addResponses(Survey survey,String hitid) throws SurveyException, IOException {
  List<SurveyResponse> responses=manager.get(survey).responses;
  boolean success=false;
  ArrayList<SurveyResponse> responsesToAdd=new ArrayList<SurveyResponse>();
  while (!success) {
    try {
      Assignment[] assignments=getAssignments(hitid);
      System.out.println("String_Node_Str" + assignments.length);
      for (      Assignment a : assignments) {
        SurveyResponse sr=parseResponse(a,survey);
        if (QCAction.addAsValidResponse(QC.assess(sr),a))         responsesToAdd.add(sr);
        System.out.println("String_Node_Str" + responses.size());
        responses.addAll(responsesToAdd);
        System.out.println("String_Node_Str" + responses.size());
      }
      success=true;
    }
 catch (    ServiceException se) {
      LOGGER.warn("String_Node_Str" + se);
    }
  }
}
Program: 109966
Project: 109966
Buggy source:
public static Thread makeWriter(Survey survey){
  return new Thread(){
    @Override public void run(){
      while (!interrupt) {
        for (        Entry<Survey,Record> entry : ResponseManager.manager.entrySet()) {
          System.out.println("String_Node_Str");
          writeResponses(entry.getKey(),entry.getValue());
        }
        try {
          Thread.sleep(writeInterval);
        }
 catch (        InterruptedException ex) {
          LOGGER.info(ex);
        }
      }
    }
  }
;
}

Fixed version (ground truth):
public static Thread makeWriter(Survey survey){
  return new Thread(){
    @Override public void run(){
      while (!interrupt) {
        for (        Entry<Survey,Record> entry : ResponseManager.manager.entrySet()) {
          System.out.println("String_Node_Str" + entry.getValue().outputFileName);
          writeResponses(entry.getKey(),entry.getValue());
        }
        try {
          Thread.sleep(writeInterval);
        }
 catch (        InterruptedException ex) {
          LOGGER.info(ex);
        }
      }
    }
  }
;
}
Program: 109967
Project: 109967
Buggy source:
public static void writeResponses(Survey survey,Record record){
synchronized (record) {
    for (    SurveyResponse r : record.responses) {
      if (!r.recorded) {
        BufferedWriter bw=null;
        try {
          String sep="String_Node_Str";
          File f=new File(record.outputFileName);
          bw=new BufferedWriter(new FileWriter(f,true));
          if (!f.exists() || f.length() == 0)           bw.write(SurveyResponse.outputHeaders(survey,sep));
          for (          SurveyResponse sr : record.responses) {
            LOGGER.info("String_Node_Str" + sr.recorded);
            if (!sr.recorded) {
              bw.write(sr.toString(survey,sep));
              sr.recorded=true;
            }
          }
          bw.close();
        }
 catch (        IOException ex) {
          LOGGER.warn(ex);
        }
 finally {
          try {
            bw.close();
          }
 catch (          IOException ex) {
            LOGGER.warn(ex);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public static void writeResponses(Survey survey,Record record){
synchronized (record) {
    for (    SurveyResponse r : record.responses) {
      if (!r.recorded) {
        BufferedWriter bw=null;
        System.out.println("String_Node_Str" + r.srid);
        try {
          String sep="String_Node_Str";
          File f=new File(record.outputFileName);
          bw=new BufferedWriter(new FileWriter(f,true));
          if (!f.exists() || f.length() == 0)           bw.write(SurveyResponse.outputHeaders(survey,sep));
          for (          SurveyResponse sr : record.responses) {
            LOGGER.info("String_Node_Str" + sr.recorded);
            if (!sr.recorded) {
              bw.write(sr.toString(survey,sep));
              sr.recorded=true;
            }
          }
          bw.close();
        }
 catch (        IOException ex) {
          LOGGER.warn(ex);
        }
 finally {
          try {
            bw.close();
          }
 catch (          IOException ex) {
            LOGGER.warn(ex);
          }
        }
      }
    }
  }
}
Program: 109968
Project: 109968
Buggy source:
public static void main(String[] args) throws IOException, SurveyException {
  SurveyPoster.init();
  if (args.length != 3) {
    System.err.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    System.exit(-1);
  }
  if (Boolean.parseBoolean(args[2]))   ResponseManager.expireOldHITs();
  String file=args[0];
  String sep=args[1];
  while (true) {
    try {
      Survey survey=CSVParser.parse(file,sep);
      Thread writer=makeWriter(survey);
      Thread responder=makeResponseGetter(survey);
      writer.start();
      responder.start();
      Runner.run(survey);
      System.exit(1);
    }
 catch (    InsufficientFundsException ife) {
      System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
      int i=0;
      while (i != 1 && i != 2) {
        System.out.println("String_Node_Str");
        i=new Scanner(System.in).nextInt();
        if (i == 2)         System.exit(1);
      }
    }
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws IOException, SurveyException {
  SurveyPoster.init();
  if (args.length != 3) {
    System.err.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    System.exit(-1);
  }
  if (Boolean.parseBoolean(args[2]))   ResponseManager.expireOldHITs();
  String file=args[0];
  String sep=args[1];
  while (true) {
    try {
      Survey survey=CSVParser.parse(file,sep);
      Thread writer=makeWriter(survey);
      Thread responder=makeResponseGetter(survey);
      writer.start();
      responder.start();
      Runner.run(survey);
      interrupt=true;
      System.exit(1);
    }
 catch (    InsufficientFundsException ife) {
      System.out.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
      int i=0;
      while (i != 1 && i != 2) {
        System.out.println("String_Node_Str");
        i=new Scanner(System.in).nextInt();
        if (i == 2)         System.exit(1);
      }
    }
  }
}
Program: 109969
Project: 109969
Buggy source:
public static Thread makeResponseGetter(final Survey survey){
  return new Thread(){
    @Override public void run(){
      boolean done=false;
      while (!done) {
        try {
          while (stillLive(survey)) {
            Record record=ResponseManager.getRecord(survey);
            for (            HIT hit : record.getAllHITs()) {
              String hitid=hit.getHITId();
              if (ResponseManager.hasResponse(hitid)) {
                ResponseManager.addResponses(survey,hitid);
                System.out.println("String_Node_Str" + hitid);
              }
              try {
                Thread.sleep(1000);
              }
 catch (              InterruptedException e) {
                LOGGER.info(e);
              }
            }
          }
          done=true;
        }
 catch (        Exception e) {
          LOGGER.warn(e);
        }
      }
    }
  }
;
}

Fixed version (ground truth):
public static Thread makeResponseGetter(final Survey survey){
  return new Thread(){
    @Override public void run(){
      while (true) {
        System.out.println("String_Node_Str");
        try {
          while (stillLive(survey) && !interrupt) {
            Record record=ResponseManager.getRecord(survey);
            for (            HIT hit : record.getAllHITs()) {
              String hitid=hit.getHITId();
              if (ResponseManager.hasResponse(hitid)) {
                ResponseManager.addResponses(survey,hitid);
                System.out.println(String.format("String_Node_Str",SurveyPoster.makeHITURL(hit),record.responses.size()));
              }
              try {
                Thread.sleep(1000);
              }
 catch (              InterruptedException e) {
                LOGGER.info(e);
              }
            }
          }
        }
 catch (        Exception e) {
          LOGGER.warn(e);
          try {
            Thread.sleep(1000);
          }
 catch (          InterruptedException e1) {
          }
        }
      }
    }
  }
;
}
Program: 109970
Project: 109970
Buggy source:
private void selectCSVFile(){
  JButton selectCSV=(JButton)componentMap.get("String_Node_Str");
  JComboBox csvLabel=(JComboBox)componentMap.get("String_Node_Str");
  if (fc.showOpenDialog(selectCSV) == JFileChooser.APPROVE_OPTION) {
    for (int i=0; i < csvLabel.getItemCount(); i++)     if (((String)csvLabel.getItemAt(i)).equals(filename.string)) {
      csvLabel.setSelectedItem(filename.string);
      return;
    }
    csvLabel.addItem(filename.string);
    csvLabel.setSelectedItem(filename.string);
  }
}

Fixed version (ground truth):
private void selectCSVFile(){
  if (fc.showOpenDialog(Experiment.selectCSV) == JFileChooser.APPROVE_OPTION) {
    for (int i=0; i < Experiment.csvLabel.getItemCount(); i++)     if (((String)Experiment.csvLabel.getItemAt(i)).equals(filename.string)) {
      Experiment.csvLabel.setSelectedItem(filename.string);
      return;
    }
    Experiment.csvLabel.addItem(filename.string);
    Experiment.csvLabel.setSelectedItem(filename.string);
  }
}
Program: 109971
Project: 109971
Buggy source:
private void loadSplashPage(){
  JButton splashLoaderButton=(JButton)componentMap.get("String_Node_Str");
  JComboBox splashLoadOpt=(JComboBox)componentMap.get("String_Node_Str");
  JTextArea splashPage=(JTextArea)componentMap.get("String_Node_Str");
  fc.showOpenDialog(splashLoaderButton);
  if (filename.string != null) {
    if (splashLoadOpt.getSelectedIndex() == 0)     splashPage.setText(filename.string);
 else {
      try {
        splashPage.setText(Slurpie.slurp(filename.string));
      }
 catch (      IOException e) {
        SurveyMan.LOGGER.fatal(e);
      }
    }
  }
}

Fixed version (ground truth):
private void loadSplashPage(){
  fc.showOpenDialog(Experiment.splashLoaderButton);
  if (filename.string != null) {
    if (Experiment.splashLoadOpt.getSelectedIndex() == 0)     Experiment.splashPage.setText(filename.string);
 else {
      try {
        Experiment.splashPage.setText(Slurpie.slurp(filename.string));
      }
 catch (      IOException e) {
        SurveyMan.LOGGER.fatal(e);
      }
    }
  }
}
Program: 109972
Project: 109972
Buggy source:
private void viewResults(){
  JComboBox csvLabel=(JComboBox)componentMap.get("String_Node_Str");
  if (csvLabel != null) {
    String csv=(String)csvLabel.getSelectedItem();
    System.out.println(csv);
    Survey survey=cachedSurveys.get(csv);
    if (survey != null) {
      try {
        ResponseManager.Record record=ResponseManager.getRecord(survey);
        if (record != null) {
          Experiment.updateStatusLabel("String_Node_Str" + record.outputFileName);
          Experiment.updateStatusLabel(Slurpie.slurp(record.outputFileName));
        }
      }
 catch (      IOException io) {
        SurveyMan.LOGGER.warn(io);
        Experiment.updateStatusLabel(io.getMessage());
      }
    }
  }
}

Fixed version (ground truth):
private void viewResults(){
  if (Experiment.csvLabel != null) {
    String csv=(String)Experiment.csvLabel.getSelectedItem();
    System.out.println(csv);
    Survey survey=cachedSurveys.get(csv);
    if (survey != null) {
      try {
        ResponseManager.Record record=ResponseManager.getRecord(survey);
        if (record != null) {
          Experiment.updateStatusLabel("String_Node_Str" + record.outputFileName);
          Experiment.updateStatusLabel(Slurpie.slurp(record.outputFileName));
        }
      }
 catch (      IOException io) {
        SurveyMan.LOGGER.warn(io);
        Experiment.updateStatusLabel(io.getMessage());
      }
    }
  }
}
Program: 109974
Project: 109974
Buggy source:
private void openPreviewHTML(){
  JComboBox csvLabel=(JComboBox)componentMap.get("String_Node_Str");
  if (csvLabel != null) {
    String csv=(String)csvLabel.getSelectedItem();
    try {
      Survey survey;
      if (cachedSurveys.containsKey(csv)) {
        Experiment.loadParameters();
        SurveyPoster.updateProperties();
        survey=cachedSurveys.get(csv);
      }
 else {
        survey=Experiment.makeSurvey();
        cachedSurveys.put(csv,survey);
      }
      HTMLGenerator.spitHTMLToFile(HTMLGenerator.getHTMLString(survey),survey);
      Desktop.getDesktop().browse(new URI("String_Node_Str" + HTMLGenerator.htmlFileName));
    }
 catch (    IOException io) {
      Experiment.updateStatusLabel(String.format("String_Node_Str",HTMLGenerator.htmlFileName));
      SurveyMan.LOGGER.fatal(io);
    }
catch (    SurveyException se) {
      Experiment.updateStatusLabel(se.getMessage());
      cachedSurveys.remove(csv);
      SurveyMan.LOGGER.warn(se);
    }
catch (    URISyntaxException uri) {
      SurveyMan.LOGGER.fatal(uri);
    }
  }
}

Fixed version (ground truth):
private void openPreviewHTML(){
  if (Experiment.csvLabel != null) {
    String csv=(String)Experiment.csvLabel.getSelectedItem();
    try {
      Survey survey;
      if (cachedSurveys.containsKey(csv)) {
        Experiment.loadParameters();
        SurveyPoster.updateProperties();
        survey=cachedSurveys.get(csv);
      }
 else {
        survey=Experiment.makeSurvey();
        cachedSurveys.put(csv,survey);
      }
      HTMLGenerator.spitHTMLToFile(HTMLGenerator.getHTMLString(survey),survey);
      Desktop.getDesktop().browse(new URI("String_Node_Str" + HTMLGenerator.htmlFileName));
    }
 catch (    IOException io) {
      Experiment.updateStatusLabel(String.format("String_Node_Str",HTMLGenerator.htmlFileName));
      SurveyMan.LOGGER.fatal(io);
    }
catch (    SurveyException se) {
      Experiment.updateStatusLabel(se.getMessage());
      cachedSurveys.remove(csv);
      SurveyMan.LOGGER.warn(se);
    }
catch (    URISyntaxException uri) {
      SurveyMan.LOGGER.fatal(uri);
    }
  }
}
Program: 109975
Project: 109975
Buggy source:
private void previewCSV(){
  JComboBox csvLabel=(JComboBox)componentMap.get("String_Node_Str");
  if (csvLabel != null) {
    try {
      Experiment.updateStatusLabel(Slurpie.slurp(((String)csvLabel.getSelectedItem()),previewSize).substring(0,previewSize) + "String_Node_Str");
    }
 catch (    IOException io) {
      SurveyMan.LOGGER.warn(io);
      Experiment.updateStatusLabel(io.getMessage());
    }
  }
}

Fixed version (ground truth):
private void previewCSV(){
  if (Experiment.csvLabel != null) {
    try {
      Experiment.updateStatusLabel(Slurpie.slurp(((String)Experiment.csvLabel.getSelectedItem()),previewSize).substring(0,previewSize) + "String_Node_Str");
    }
 catch (    IOException io) {
      SurveyMan.LOGGER.warn(io);
      Experiment.updateStatusLabel(io.getMessage());
    }
  }
}
Program: 109976
Project: 109976
Buggy source:
private static void setActionListeners(){
  ExperimentAction splashAction=new ExperimentAction(ExperimentActions.LOAD_SPLASH);
  splashAction.registerComponent("String_Node_Str",splashLoaderButton);
  splashAction.registerComponent("String_Node_Str",splashLoadOpt);
  splashAction.registerComponent("String_Node_Str",splashPage);
  splashLoaderButton.addActionListener(splashAction);
  ExperimentAction csvAction=new ExperimentAction(ExperimentActions.SELECT_CSV);
  csvAction.registerComponent("String_Node_Str",selectCSV);
  csvAction.registerComponent("String_Node_Str",csvLabel);
  selectCSV.addActionListener(csvAction);
  previewCSV.addActionListener(new ExperimentAction(ExperimentActions.PREVIEW_CSV));
  viewResults.addActionListener(new ExperimentAction(ExperimentActions.VIEW_RESULTS));
  send.addActionListener(new ExperimentAction(ExperimentActions.SEND_SURVEY));
  previewHTML.addActionListener(new ExperimentAction(ExperimentActions.PREVIEW_HIT));
  dumpParams.addActionListener(new ExperimentAction(ExperimentActions.DUMP_PARAMS));
  viewHIT.addActionListener(new ExperimentAction(ExperimentActions.VIEW_HIT));
}

Fixed version (ground truth):
private static void setActionListeners(){
  splashLoaderButton.addActionListener(new ExperimentAction(ExperimentActions.LOAD_SPLASH));
  selectCSV.addActionListener(new ExperimentAction(ExperimentActions.SELECT_CSV));
  previewCSV.addActionListener(new ExperimentAction(ExperimentActions.PREVIEW_CSV));
  viewResults.addActionListener(new ExperimentAction(ExperimentActions.VIEW_RESULTS));
  send.addActionListener(new ExperimentAction(ExperimentActions.SEND_SURVEY));
  previewHTML.addActionListener(new ExperimentAction(ExperimentActions.PREVIEW_HIT));
  dumpParams.addActionListener(new ExperimentAction(ExperimentActions.DUMP_PARAMS));
  viewHIT.addActionListener(new ExperimentAction(ExperimentActions.VIEW_HIT));
}