nus-yam/ex-repair huggingface dataset:
Program: 145129
Project: 145129
Buggy source:
/** 
 * convert the data object returned by the xpath expression into an IAnswerData suitable for storage in the FormInstance
 */
private static IAnswerData wrapData(Object val,int dataType){
  if ((val instanceof String && ((String)val).length() == 0) || (val instanceof Double && ((Double)val).isNaN())) {
    return null;
  }
  if (Constants.DATATYPE_BOOLEAN == dataType || val instanceof Boolean) {
    boolean b;
    if (val instanceof Boolean) {
      b=((Boolean)val).booleanValue();
    }
 else     if (val instanceof Double) {
      Double d=(Double)val;
      b=Math.abs(d.doubleValue()) > 1.0e-12 && !Double.isNaN(d);
    }
 else     if (val instanceof String) {
      String s=(String)val;
      b=s.length() > 0;
    }
 else {
      throw new RuntimeException("String_Node_Str");
    }
    return new BooleanData(b);
  }
 else   if (val instanceof Double) {
    double d=((Double)val).doubleValue();
    boolean isIntegral=Math.abs(d - (int)d) < 1.0e-9;
    if (Constants.DATATYPE_INTEGER == dataType || isIntegral) {
      return new IntegerData((int)d);
    }
 else {
      return new DecimalData(d);
    }
  }
 else   if (val instanceof String) {
    return new StringData((String)val);
  }
 else   if (val instanceof Date) {
    return new DateData((Date)val);
  }
 else {
    throw new RuntimeException("String_Node_Str" + val.getClass().getName());
  }
}

Fixed version (ground truth):
/** 
 * convert the data object returned by the xpath expression into an IAnswerData suitable for storage in the FormInstance
 */
private static IAnswerData wrapData(Object val,int dataType){
  if ((val instanceof String && ((String)val).length() == 0) || (val instanceof Double && ((Double)val).isNaN())) {
    return null;
  }
  if (Constants.DATATYPE_BOOLEAN == dataType || val instanceof Boolean) {
    boolean b;
    if (val instanceof Boolean) {
      b=((Boolean)val).booleanValue();
    }
 else     if (val instanceof Double) {
      Double d=(Double)val;
      b=Math.abs(d.doubleValue()) > 1.0e-12 && !Double.isNaN(d);
    }
 else     if (val instanceof String) {
      String s=(String)val;
      b=s.length() > 0;
    }
 else {
      throw new RuntimeException("String_Node_Str");
    }
    return new BooleanData(b);
  }
 else   if (val instanceof Double) {
    double d=((Double)val).doubleValue();
    boolean isIntegral=Math.abs(d - (int)d) < 1.0e-9;
    if (Constants.DATATYPE_INTEGER == dataType || isIntegral) {
      return new IntegerData((int)d);
    }
 else {
      return new DecimalData(d);
    }
  }
 else   if (val instanceof String) {
    return new StringData((String)val);
  }
 else   if (val instanceof Date) {
    return (dataType == Constants.DATATYPE_DATE_TIME ? new DateTimeData((Date)val) : new DateData((Date)val));
  }
 else {
    throw new RuntimeException("String_Node_Str" + val.getClass().getName());
  }
}
Program: 145130
Project: 145130
Buggy source:
public void setValue(Object o){
  if (o == null) {
    throw new NullPointerException("String_Node_Str");
  }
  d=new Date(((Date)o).getTime());
}

Fixed version (ground truth):
public void setValue(Object o){
  if (o == null) {
    throw new NullPointerException("String_Node_Str");
  }
  d=DateUtils.roundDate((Date)o);
}
Program: 145131
Project: 145131
Buggy source:
/** 
 * @return
 */
private String getCurrentDisplay(){
  return Localization.get("String_Node_Str",new String[]{String.valueOf(currentid),String.valueOf(ids.size()),String.valueOf(currentid + 1),String.valueOf(ids.size())});
}

Fixed version (ground truth):
/** 
 * @return
 */
private String getCurrentDisplay(){
  return Localization.get("String_Node_Str",new String[]{String.valueOf(currentid + 1),String.valueOf(ids.size()),String.valueOf(currentid),String.valueOf(ids.size())});
}
Program: 145132
Project: 145132
Buggy source:
private void parseRegistration(TreeElement head) throws MalformedUserModelException, StorageFullException {
  String username=getString(getChild(head,"String_Node_Str"),head);
  String password=getString(getChild(head,"String_Node_Str"),head);
  String uuid=getString(getChild(head,"String_Node_Str"),head);
  User u=getUserFromStorage(uuid);
  if (!u.getPassword().equals(password)) {
    u.setPassword(password);
  }
  if (u == null) {
    u=new User(username,password,uuid);
  }
  TreeElement data=getChild(head,"String_Node_Str");
  for (int i=0; i < data.getNumChildren(); ++i) {
    TreeElement datum=data.getChildAt(i);
    if (!datum.isRelevant()) {
      continue;
    }
    String keyName=datum.getAttributeValue(null,"String_Node_Str");
    if (keyName == null) {
      throw new MalformedUserModelException("String_Node_Str" + username + "String_Node_Str");
    }
    u.setProperty(keyName,getString(datum,data));
  }
  storage().write(u);
  user=u;
}

Fixed version (ground truth):
private void parseRegistration(TreeElement head) throws MalformedUserModelException, StorageFullException {
  String username=getString(getChild(head,"String_Node_Str"),head);
  String password=getString(getChild(head,"String_Node_Str"),head);
  String uuid=getString(getChild(head,"String_Node_Str"),head);
  User u=getUserFromStorage(uuid);
  if (u == null) {
    u=new User(username,password,uuid);
  }
 else {
    if (!u.getPassword().equals(password)) {
      u.setPassword(password);
    }
  }
  TreeElement data=getChild(head,"String_Node_Str");
  for (int i=0; i < data.getNumChildren(); ++i) {
    TreeElement datum=data.getChildAt(i);
    if (!datum.isRelevant()) {
      continue;
    }
    String keyName=datum.getAttributeValue(null,"String_Node_Str");
    if (keyName == null) {
      throw new MalformedUserModelException("String_Node_Str" + username + "String_Node_Str");
    }
    u.setProperty(keyName,getString(datum,data));
  }
  storage().write(u);
  user=u;
}
Program: 145133
Project: 145133
Buggy source:
private static String formatDateColloquial(DateFields f){
  return intPad(f.day,2) + "String_Node_Str" + intPad(f.month,2)+ "String_Node_Str"+ (new Integer(f.year)).toString().substring(2,4);
}

Fixed version (ground truth):
private static String formatDateColloquial(DateFields f){
  String year=new Integer(f.year).toString();
  if (year.length() == 4) {
    year=year.substring(2,4);
  }
  return intPad(f.day,2) + "String_Node_Str" + intPad(f.month,2)+ "String_Node_Str"+ year;
}
Program: 145134
Project: 145134
Buggy source:
private void parseRegistration(TreeElement head) throws MalformedUserModelException, StorageFullException {
  String username=getString(getChild(head,"String_Node_Str"),head);
  String password=getString(getChild(head,"String_Node_Str"),head);
  String uuid=getString(getChild(head,"String_Node_Str"),head);
  User u=getUserFromStorage(uuid);
  if (!u.getPassword().equals(password)) {
    u.setPassword(password);
  }
  if (u == null) {
    u=new User(username,password,uuid);
  }
  TreeElement data=getChild(head,"String_Node_Str");
  for (int i=0; i < data.getNumChildren(); ++i) {
    TreeElement datum=data.getChildAt(i);
    if (!datum.isRelevant()) {
      continue;
    }
    String keyName=datum.getAttributeValue(null,"String_Node_Str");
    if (keyName == null) {
      throw new MalformedUserModelException("String_Node_Str" + username + "String_Node_Str");
    }
    u.setProperty(keyName,getString(datum,data));
  }
  storage().write(u);
  user=u;
}

Fixed version (ground truth):
private void parseRegistration(TreeElement head) throws MalformedUserModelException, StorageFullException {
  String username=getString(getChild(head,"String_Node_Str"),head);
  String password=getString(getChild(head,"String_Node_Str"),head);
  String uuid=getString(getChild(head,"String_Node_Str"),head);
  User u=getUserFromStorage(uuid);
  if (u == null) {
    u=new User(username,password,uuid);
  }
 else {
    if (!u.getPassword().equals(password)) {
      u.setPassword(password);
    }
  }
  TreeElement data=getChild(head,"String_Node_Str");
  for (int i=0; i < data.getNumChildren(); ++i) {
    TreeElement datum=data.getChildAt(i);
    if (!datum.isRelevant()) {
      continue;
    }
    String keyName=datum.getAttributeValue(null,"String_Node_Str");
    if (keyName == null) {
      throw new MalformedUserModelException("String_Node_Str" + username + "String_Node_Str");
    }
    u.setProperty(keyName,getString(datum,data));
  }
  storage().write(u);
  user=u;
}
Program: 145135
Project: 145135
Buggy source:
private static String formatDateColloquial(DateFields f){
  return intPad(f.day,2) + "String_Node_Str" + intPad(f.month,2)+ "String_Node_Str"+ (new Integer(f.year)).toString().substring(2,4);
}

Fixed version (ground truth):
private static String formatDateColloquial(DateFields f){
  String year=new Integer(f.year).toString();
  if (year.length() == 4) {
    year=year.substring(2,4);
  }
  return intPad(f.day,2) + "String_Node_Str" + intPad(f.month,2)+ "String_Node_Str"+ year;
}
Program: 145136
Project: 145136
Buggy source:
private void parseRegistration(TreeElement head) throws MalformedUserModelException, StorageFullException {
  String username=getString(getChild(head,"String_Node_Str"),head);
  String password=getString(getChild(head,"String_Node_Str"),head);
  String uuid=getString(getChild(head,"String_Node_Str"),head);
  User u=getUserFromStorage(uuid);
  if (u == null) {
    u=new User(username,password,uuid);
  }
  TreeElement data=getChild(head,"String_Node_Str");
  for (int i=0; i < data.getNumChildren(); ++i) {
    TreeElement datum=data.getChildAt(i);
    if (!datum.isRelevant()) {
      continue;
    }
    String keyName=datum.getAttributeValue(null,"String_Node_Str");
    if (keyName == null) {
      throw new MalformedUserModelException("String_Node_Str" + username + "String_Node_Str");
    }
    u.setProperty(keyName,getString(datum,data));
  }
  storage().write(u);
  user=u;
}

Fixed version (ground truth):
private void parseRegistration(TreeElement head) throws MalformedUserModelException, StorageFullException {
  String username=getString(getChild(head,"String_Node_Str"),head);
  String password=getString(getChild(head,"String_Node_Str"),head);
  String uuid=getString(getChild(head,"String_Node_Str"),head);
  User u=getUserFromStorage(uuid);
  if (!u.getPassword().equals(password)) {
    u.setPassword(password);
  }
  if (u == null) {
    u=new User(username,password,uuid);
  }
  TreeElement data=getChild(head,"String_Node_Str");
  for (int i=0; i < data.getNumChildren(); ++i) {
    TreeElement datum=data.getChildAt(i);
    if (!datum.isRelevant()) {
      continue;
    }
    String keyName=datum.getAttributeValue(null,"String_Node_Str");
    if (keyName == null) {
      throw new MalformedUserModelException("String_Node_Str" + username + "String_Node_Str");
    }
    u.setProperty(keyName,getString(datum,data));
  }
  storage().write(u);
  user=u;
}
Program: 145138
Project: 145138
Buggy source:
private void setUpCommands(){
  backCommand=new Command(Localization.get("String_Node_Str"),Command.BACK,2);
  exitNoSaveCommand=new Command(Localization.get("String_Node_Str"),Command.EXIT,4);
  exitSaveCommand=new Command(Localization.get("String_Node_Str"),Command.SCREEN,4);
  saveCommand=new Command(Localization.get("String_Node_Str"),Command.SCREEN,4);
  if (multiLingual) {
    languageSubMenu=new Command(Localization.get("String_Node_Str"),Command.SCREEN,2);
    populateLanguages();
  }
  if (!model.isReadOnlyMode()) {
    addCommand(backCommand);
  }
  addCommand(exitNoSaveCommand);
  if (languageSubMenu != null) {
    addCommand(languageSubMenu);
    for (int i=0; i < languageCommands.length; i++)     addSubCommand(languageCommands[i],languageSubMenu);
  }
  setCommandListener(this);
}

Fixed version (ground truth):
private void setUpCommands(){
  backCommand=new Command(Localization.get("String_Node_Str"),Command.BACK,2);
  exitNoSaveCommand=new Command(Localization.get("String_Node_Str"),Command.EXIT,4);
  exitSaveCommand=new Command(Localization.get("String_Node_Str"),Command.SCREEN,4);
  saveCommand=new Command(Localization.get("String_Node_Str"),Command.SCREEN,4);
  if (multiLingual) {
    languageSubMenu=new Command(Localization.get("String_Node_Str"),Command.SCREEN,2);
    populateLanguages();
  }
  addBackCommand();
  if (!model.isReadOnlyMode()) {
  }
  addCommand(exitNoSaveCommand);
  if (languageSubMenu != null) {
    addCommand(languageSubMenu);
    for (int i=0; i < languageCommands.length; i++)     addSubCommand(languageCommands[i],languageSubMenu);
  }
  setCommandListener(this);
}
Program: 145139
Project: 145139
Buggy source:
public void _commandAction(Command command,Displayable s){
  System.out.println("String_Node_Str");
  if (command == backCommand) {
    System.out.println("String_Node_Str");
    step(controller.stepToPreviousEvent());
  }
 else   if (command == exitNoSaveCommand) {
    controller.abort();
  }
 else   if (command == exitSaveCommand) {
    commitAndSave();
  }
 else   if (command == saveCommand) {
    commitAndSave();
  }
 else   if (command.getLabel() == Constants.ACTIVITY_TYPE_GET_IMAGES) {
    suspendActivity(FormEntryTransitions.MEDIA_IMAGE);
  }
 else   if (command.getLabel() == Constants.ACTIVITY_TYPE_GET_AUDIO) {
    suspendActivity(FormEntryTransitions.MEDIA_AUDIO);
  }
 else   if (command.getLabel() == "String_Node_Str") {
    doCapture();
  }
 else   if (command.getLabel() == "String_Node_Str") {
    backFromCamera();
  }
 else   if (command.getLabel().equals(CollapsedWidget.UPDATE_TEXT)) {
    System.out.println("String_Node_Str");
  }
 else {
    String language=null;
    if (multiLingual) {
      for (int i=0; i < languageCommands.length; i++) {
        if (command == languageCommands[i]) {
          language=localeCommandMap[i];
        }
      }
    }
    if (language != null) {
      controller.setLanguage(language);
    }
 else {
      System.err.println("String_Node_Str" + command.getLabel() + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public void _commandAction(Command command,Displayable s){
  System.out.println("String_Node_Str");
  if (command == backCommand) {
    step(controller.stepToPreviousEvent());
  }
 else   if (command == exitNoSaveCommand) {
    controller.abort();
  }
 else   if (command == exitSaveCommand) {
    commitAndSave();
  }
 else   if (command == saveCommand) {
    commitAndSave();
  }
 else   if (command.getLabel() == Constants.ACTIVITY_TYPE_GET_IMAGES) {
    suspendActivity(FormEntryTransitions.MEDIA_IMAGE);
  }
 else   if (command.getLabel() == Constants.ACTIVITY_TYPE_GET_AUDIO) {
    suspendActivity(FormEntryTransitions.MEDIA_AUDIO);
  }
 else   if (command.getLabel() == "String_Node_Str") {
    doCapture();
  }
 else   if (command.getLabel() == "String_Node_Str") {
    backFromCamera();
  }
 else   if (command.getLabel().equals(CollapsedWidget.UPDATE_TEXT)) {
    System.out.println("String_Node_Str");
  }
 else {
    String language=null;
    if (multiLingual) {
      for (int i=0; i < languageCommands.length; i++) {
        if (command == languageCommands[i]) {
          language=localeCommandMap[i];
        }
      }
    }
    if (language != null) {
      controller.setLanguage(language);
    }
 else {
      System.err.println("String_Node_Str" + command.getLabel() + "String_Node_Str");
    }
  }
}
Program: 145140
Project: 145140
Buggy source:
public Object getSortKey(String fieldKey){
  if (fieldKey.equals("String_Node_Str")) {
    return new Integer(this.getRecordID());
  }
 else {
    try {
      return getShortFields()[Integer.valueOf(fieldKey).intValue()];
    }
 catch (    NumberFormatException nfe) {
      nfe.printStackTrace();
      throw new RuntimeException("String_Node_Str" + fieldKey);
    }
  }
}

Fixed version (ground truth):
public Object getSortKey(String fieldKey){
  if (fieldKey.equals("String_Node_Str")) {
    return new Integer(this.getRecordID());
  }
 else {
    try {
      return getShortFields()[Integer.valueOf(fieldKey).intValue() - 1];
    }
 catch (    NumberFormatException nfe) {
      nfe.printStackTrace();
      throw new RuntimeException("String_Node_Str" + fieldKey);
    }
  }
}
Program: 145141
Project: 145141
Buggy source:
protected String getFormOrDefault(String textID,String form){
  String t=null;
  if (textID == null) {
    return this.getText(null,null);
  }
  try {
    t=getText(textID,form);
  }
 catch (  NoLocalizedTextException nlte) {
    System.out.println("String_Node_Str" + form + "String_Node_Str"+ textID+ "String_Node_Str");
    t=getDefaultText(textID);
  }
  return t;
}

Fixed version (ground truth):
protected String getFormOrDefault(String textID,String form){
  String t=null;
  if (textID == null) {
    return this.getText(null,null);
  }
  try {
    t=getText(textID,form);
  }
 catch (  NoLocalizedTextException nlte) {
    System.out.println("String_Node_Str" + form + "String_Node_Str"+ textID+ "String_Node_Str");
    t=getDefaultText(textID);
  }
catch (  IllegalArgumentException iae) {
    System.out.println("String_Node_Str" + textID + "String_Node_Str");
    t=getDefaultText(textID);
  }
  return t;
}
Program: 145142
Project: 145142
Buggy source:
/** 
 * Convenience method Get shortText form of text for THIS element (if available) 
 * @return shortText form 
 */
public String getShortText(){
  return getFormOrDefault(getTextID(),TEXT_FORM_SHORT);
}

Fixed version (ground truth):
/** 
 * Convenience method System.out.println("Warning, Short text form requested for ["+textID+"] but doesn't exist. (Falling back to Default form)."); t = getDefaultText(textID); }catch(IllegalArgumentException iae){ Get shortText form of text for THIS element (if available) 
 * @return shortText form 
 */
public String getShortText(){
  return getFormOrDefault(getTextID(),TEXT_FORM_SHORT);
}
Program: 145144
Project: 145144
Buggy source:
private static void listQuestion(FormDef f,QuestionDef q,FormEntryController fec,int indent,StringBuffer sb){
  FormEntryModel femodel=fec.getModel();
  TreeElement instanceNode=getInstanceNode(f.getInstance(),q.getBind());
  String caption="String_Node_Str";
  FormEntryPrompt fep=femodel.getQuestionPrompt();
  caption=getAppropriateTextForm(fep,fep.getTextID());
  int type=instanceNode.dataType;
  if (q.getControlType() != Constants.CONTROL_TRIGGER) {
    println(sb,indent,"String_Node_Str" + caption + "String_Node_Str");
    println(sb,indent + 1,"String_Node_Str" + printType(type));
  }
 else {
    println(sb,indent,"String_Node_Str" + caption + "String_Node_Str");
  }
  if (q.getControlType() == Constants.CONTROL_SELECT_ONE || q.getControlType() == Constants.CONTROL_SELECT_MULTI) {
    printChoices(f,q,fec,indent + 1,sb);
  }
  printProperty("String_Node_Str",f,instanceNode,indent + 1,sb);
  printProperty("String_Node_Str",f,instanceNode,indent + 1,sb);
  printProperty("String_Node_Str",f,instanceNode,indent + 1,sb);
  String defaultValue=printDefault(instanceNode);
  if (defaultValue != null) {
    println(sb,indent + 1,"String_Node_Str" + defaultValue);
  }
  if (instanceNode.getConstraint() != null) {
    println(sb,indent + 1,"String_Node_Str" + printCondition(instanceNode.getConstraint().constraint));
  }
  println(sb);
}

Fixed version (ground truth):
private static void listQuestion(FormDef f,QuestionDef q,FormEntryController fec,int indent,StringBuffer sb){
  FormEntryModel femodel=fec.getModel();
  TreeElement instanceNode=getInstanceNode(f.getInstance(),q.getBind());
  String caption="String_Node_Str";
  FormEntryPrompt fep=femodel.getQuestionPrompt();
  caption=fep.getLongText();
  int type=instanceNode.dataType;
  if (q.getControlType() != Constants.CONTROL_TRIGGER) {
    println(sb,indent,"String_Node_Str" + caption + "String_Node_Str");
    println(sb,indent + 1,"String_Node_Str" + printType(type));
  }
 else {
    println(sb,indent,"String_Node_Str" + caption + "String_Node_Str");
  }
  if (q.getControlType() == Constants.CONTROL_SELECT_ONE || q.getControlType() == Constants.CONTROL_SELECT_MULTI) {
    printChoices(f,q,fec,indent + 1,sb);
  }
  printProperty("String_Node_Str",f,instanceNode,indent + 1,sb);
  printProperty("String_Node_Str",f,instanceNode,indent + 1,sb);
  printProperty("String_Node_Str",f,instanceNode,indent + 1,sb);
  String defaultValue=printDefault(instanceNode);
  if (defaultValue != null) {
    println(sb,indent + 1,"String_Node_Str" + defaultValue);
  }
  if (instanceNode.getConstraint() != null) {
    println(sb,indent + 1,"String_Node_Str" + printCondition(instanceNode.getConstraint().constraint));
  }
  println(sb);
}
Program: 145145
Project: 145145
Buggy source:
/** 
 * Get the Itext for a specific SelectChoice and specific itext form
 * @param s
 * @param form
 * @return
 */
public String getSelectChoiceText(SelectChoice sel,String form){
  return getText(sel.getTextID(),form);
}

Fixed version (ground truth):
/** 
 * Get the Itext for a specific SelectChoice and specific itext form, returns null if the form requested is not available for the select choice
 * @param s
 * @param form
 * @return
 */
public String getSelectChoiceText(SelectChoice sel,String form){
  if (getSelectTextForms(sel).contains(form)) {
    return getText(sel.getTextID(),form);
  }
 else {
    return null;
  }
}
Program: 145146
Project: 145146
Buggy source:
public XPathNodeset eval(FormInstance m,EvaluationContext evalContext){
  TreeReference genericRef=getReference();
  if (m.getTemplatePath(genericRef) == null) {
    throw new XPathTypeMismatchException("String_Node_Str" + genericRef.toString() + "String_Node_Str");
  }
  TreeReference ref=genericRef.contextualize(evalContext.getContextRef());
  Vector<TreeReference> nodesetRefs=m.expandReference(ref);
  for (int i=0; i < nodesetRefs.size(); i++) {
    if (!m.resolveReference((TreeReference)nodesetRefs.elementAt(i)).isRelevant()) {
      nodesetRefs.removeElementAt(i);
      i--;
    }
  }
  return new XPathNodeset(nodesetRefs,m,evalContext);
}

Fixed version (ground truth):
public XPathNodeset eval(FormInstance m,EvaluationContext evalContext){
  TreeReference genericRef=getReference();
  if (genericRef.isAbsolute() && m.getTemplatePath(genericRef) == null) {
    throw new XPathTypeMismatchException("String_Node_Str" + genericRef.toString() + "String_Node_Str");
  }
  TreeReference ref=genericRef.contextualize(evalContext.getContextRef());
  Vector<TreeReference> nodesetRefs=m.expandReference(ref);
  for (int i=0; i < nodesetRefs.size(); i++) {
    if (!m.resolveReference((TreeReference)nodesetRefs.elementAt(i)).isRelevant()) {
      nodesetRefs.removeElementAt(i);
      i--;
    }
  }
  return new XPathNodeset(nodesetRefs,m,evalContext);
}
Program: 145147
Project: 145147
Buggy source:
/** 
 * get value of attribute with namespace:name' in the vector
 * @param index
 * @return String
 */
public String getAttributeValue(String namespace,String name){
  return getAttributeValue(getAttribute(namespace,name));
}

Fixed version (ground truth):
/** 
 * get value of attribute with namespace:name' in the vector
 * @param index
 * @return String
 */
public String getAttributeValue(String namespace,String name){
  TreeElement element=getAttribute(namespace,name);
  return element == null ? null : getAttributeValue(element);
}
Program: 145148
Project: 145148
Buggy source:
/** 
 * Sets the given attribute; a value of null removes the attribute
 */
public void setAttribute(String namespace,String name,String value){
  if (namespace == null)   namespace="String_Node_Str";
  for (int i=attributes.size() - 1; i >= 0; i--) {
    TreeElement attribut=attributes.elementAt(i);
    if (attribut.name.equals(name) && namespace == null || namespace.equals(attribut.namespace)) {
      if (value == null) {
        attributes.removeElementAt(i);
      }
 else {
        attribut.setValue(new UncastData(value));
      }
      return;
    }
  }
  TreeElement attr=TreeElement.constructAttributeElement(namespace,name);
  attr.setValue(new UncastData(value));
  attr.setParent(this);
  attributes.addElement(attr);
}

Fixed version (ground truth):
/** 
 * Sets the given attribute; a value of null removes the attribute
 */
public void setAttribute(String namespace,String name,String value){
  for (int i=attributes.size() - 1; i >= 0; i--) {
    TreeElement attribut=attributes.elementAt(i);
    if (attribut.name.equals(name) && (namespace == null || namespace.equals(attribut.namespace))) {
      if (value == null) {
        attributes.removeElementAt(i);
      }
 else {
        attribut.setValue(new UncastData(value));
      }
      return;
    }
  }
  if (namespace == null) {
    namespace="String_Node_Str";
  }
  TreeElement attr=TreeElement.constructAttributeElement(namespace,name);
  attr.setValue(new UncastData(value));
  attr.setParent(this);
  attributes.addElement(attr);
}
Program: 145149
Project: 145149
Buggy source:
/** 
 * Retrieves the TreeElement representing the attribute at the provided namespace and name, or null if none exists. If 'null' is provided for the namespace, it will match the first attribute with the matching name.
 * @param index
 * @return TreeElement
 */
public TreeElement getAttribute(String namespace,String name){
  for (  TreeElement attribute : attributes) {
    if (attribute.getName().equals(name) && namespace == null || namespace.equals(attribute)) {
      return attribute;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Retrieves the TreeElement representing the attribute at the provided namespace and name, or null if none exists. If 'null' is provided for the namespace, it will match the first attribute with the matching name.
 * @param index
 * @return TreeElement
 */
public TreeElement getAttribute(String namespace,String name){
  for (  TreeElement attribute : attributes) {
    if (attribute.getName().equals(name) && (namespace == null || namespace.equals(attribute.namespace))) {
      return attribute;
    }
  }
  return null;
}
Program: 145150
Project: 145150
Buggy source:
/** 
 * true if the answer to this question yields xml tree data, not a simple string value
 */
public boolean isComplex(){
  return (dynamicChoices != null && dynamicChoices.copyMode);
}

Fixed version (ground truth):
/** 
 * true if the answer to this question yields xml tree data, not a simple string value
 */
public boolean isComplex(){
  System.out.println("String_Node_Str" + dynamicChoices);
  if (dynamicChoices != null)   System.out.println("String_Node_Str" + dynamicChoices.copyMode);
  return (dynamicChoices != null && dynamicChoices.copyMode);
}
Program: 145151
Project: 145151
Buggy source:
/** 
 * Attempts to save the answer at the specified FormIndex into the datamodel.
 * @param index
 * @param data
 * @return OK if save was successful, error if a constraint was violated.
 */
public int answerQuestion(FormIndex index,IAnswerData data){
  QuestionDef q=model.getQuestionPrompt(index).getQuestion();
  if (model.getEvent() != FormEntryController.EVENT_QUESTION) {
    throw new RuntimeException("String_Node_Str");
  }
  TreeElement element=model.getTreeElement(index);
  boolean complexQuestion=q.isComplex();
  if (element.required && data == null) {
    return ANSWER_REQUIRED_BUT_EMPTY;
  }
 else   if (!complexQuestion && !model.getForm().evaluateConstraint(index.getReference(),data)) {
    throw new RuntimeException("String_Node_Str");
  }
 else   if (!complexQuestion) {
    commitAnswer(element,index,data);
    return ANSWER_OK;
  }
 else {
    try {
      model.getForm().copyItemsetAnswer(q,element,data);
    }
 catch (    InvalidReferenceException ire) {
      ire.printStackTrace();
      throw new RuntimeException("String_Node_Str" + ire.getMessage());
    }
    return ANSWER_OK;
  }
}

Fixed version (ground truth):
/** 
 * Attempts to save the answer at the specified FormIndex into the datamodel.
 * @param index
 * @param data
 * @return OK if save was successful, error if a constraint was violated.
 */
public int answerQuestion(FormIndex index,IAnswerData data){
  QuestionDef q=model.getQuestionPrompt(index).getQuestion();
  if (model.getEvent() != FormEntryController.EVENT_QUESTION) {
    throw new RuntimeException("String_Node_Str");
  }
  TreeElement element=model.getTreeElement(index);
  boolean complexQuestion=q.isComplex();
  if (element.required && data == null) {
    return ANSWER_REQUIRED_BUT_EMPTY;
  }
 else   if (!complexQuestion && !model.getForm().evaluateConstraint(index.getReference(),data)) {
    return ANSWER_CONSTRAINT_VIOLATED;
  }
 else   if (!complexQuestion) {
    commitAnswer(element,index,data);
    return ANSWER_OK;
  }
 else   if (complexQuestion) {
    throw new RuntimeException("String_Node_Str");
  }
 else {
    try {
      model.getForm().copyItemsetAnswer(q,element,data);
    }
 catch (    InvalidReferenceException ire) {
      ire.printStackTrace();
      throw new RuntimeException("String_Node_Str" + ire.getMessage());
    }
    return ANSWER_OK;
  }
}
Program: 145152
Project: 145152
Buggy source:
private static String getLabel(Element e,FormDef f){
  boolean outputFound=false;
  boolean otherStuffFound=false;
  Vector outputs=new Vector();
  for (int i=0; i < e.getChildCount(); i++) {
    if (e.getType(i) != Node.TEXT) {
      if (e.getType(i) == Node.ELEMENT && "String_Node_Str".equals(e.getElement(i).getName())) {
        outputFound=true;
        outputs.addElement(new Integer(i));
      }
 else {
        otherStuffFound=true;
      }
    }
  }
  if (outputFound && !otherStuffFound) {
    StringBuffer sb=new StringBuffer();
    for (int i=0; i < outputs.size() + 1; i++) {
      int ixStart=(i == 0 ? 0 : ((Integer)outputs.elementAt(i - 1)).intValue() + 1);
      if (ixStart < e.getChildCount()) {
        String piece=getXMLText(e,ixStart,false);
        if (piece != null) {
          sb.append(piece);
        }
      }
      if (i < outputs.size()) {
        int ix=((Integer)outputs.elementAt(i)).intValue();
        sb.append("String_Node_Str" + parseOutput(e.getElement(ix),f) + "String_Node_Str");
      }
    }
    return sb.toString().trim();
  }
 else {
    return getXMLText(e,true);
  }
}

Fixed version (ground truth):
private static String getLabel(Element e,FormDef f){
  if (e.getChildCount() == 0)   return null;
  recurseForOutput(e,f);
  StringBuffer sb=new StringBuffer();
  for (int i=0; i < e.getChildCount(); i++) {
    if (e.getType(i) != Node.TEXT && !(e.getChild(i) instanceof String)) {
      Object b=e.getChild(i);
      if (b instanceof String)       System.out.println("String_Node_Str");
      sb.append(XFormSerializer.elementToString((Element)b));
    }
 else {
      sb.append(e.getText(i));
    }
  }
  String s=sb.toString().trim();
  return s;
}
Program: 145153
Project: 145153
Buggy source:
public DummyReference(){
}

Fixed version (ground truth):
public DummyReference(){
  super();
}
Program: 145154
Project: 145154
Buggy source:
public Externalizable getRecordForValue(String fieldName,Object value) throws NoSuchElementException, InvalidIndexException {
  return indexedStorage().getRecordForValue(fieldName,value);
}

Fixed version (ground truth):
public Externalizable getRecordForValue(String fieldName,Object value) throws NoSuchElementException, InvalidIndexException {
  return ((SerializationWrapper)indexedStorage().getRecordForValue(fieldName,value)).getData();
}
Program: 145155
Project: 145155
Buggy source:
public void readExternal(DataInputStream in,PrototypeFactory pf) throws IOException, DeserializationException {
  contentType=ExtUtil.nullIfEmpty(ExtUtil.readString(in));
  status=(int)ExtUtil.readNumeric(in);
  if (status == TransportMessageStatus.QUEUED) {
    status=TransportMessageStatus.CACHED;
  }
  failureReason=ExtUtil.readString(in);
  failureCount=(int)ExtUtil.readNumeric(in);
  failureCount=0;
  queueIdentifier=ExtUtil.readString(in);
  created=ExtUtil.readDate(in);
  created=created.getTime() == 0 ? null : created;
  sent=ExtUtil.readDate(in);
  sent=sent.getTime() == 0 ? null : sent;
  queuingDeadline=ExtUtil.readNumeric(in);
  recordId=(int)ExtUtil.readNumeric(in);
}

Fixed version (ground truth):
public void readExternal(DataInputStream in,PrototypeFactory pf) throws IOException, DeserializationException {
  contentType=ExtUtil.nullIfEmpty(ExtUtil.readString(in));
  status=(int)ExtUtil.readNumeric(in);
  failureReason=ExtUtil.readString(in);
  failureCount=(int)ExtUtil.readNumeric(in);
  failureCount=0;
  queueIdentifier=ExtUtil.readString(in);
  created=ExtUtil.readDate(in);
  created=created.getTime() == 0 ? null : created;
  sent=ExtUtil.readDate(in);
  sent=sent.getTime() == 0 ? null : sent;
  queuingDeadline=ExtUtil.readNumeric(in);
  recordId=(int)ExtUtil.readNumeric(in);
  if (status == TransportMessageStatus.QUEUED && queuingDeadline < new Date().getTime()) {
    status=TransportMessageStatus.CACHED;
  }
}
Program: 145156
Project: 145156
Buggy source:
public void sendData(){
  initDisplay();
  if (this.message == null)   throw new RuntimeException("String_Node_Str");
  try {
    System.out.println("String_Node_Str" + this.message.getCacheIdentifier());
    SenderThread thread=TransportService.send(message);
    thread.addListener(observer);
  }
 catch (  TransportException e) {
    e.printStackTrace();
    if (observer != null) {
      observer.receiveError(e.getMessage());
    }
  }
}

Fixed version (ground truth):
public void sendData(){
  FormTransportSubmitStatusScreen screen=createDisplay();
  if (this.message == null)   throw new RuntimeException("String_Node_Str");
  try {
    System.out.println("String_Node_Str" + this.message.getCacheIdentifier());
    SenderThread thread=TransportService.send(message);
    screen.reinit(this.message.getCacheIdentifier());
    thread.addListener(observer);
  }
 catch (  TransportException e) {
    e.printStackTrace();
    if (observer != null) {
      observer.receiveError(e.getMessage());
    }
  }
}
Program: 145157
Project: 145157
Buggy source:
public void reinit(String cacheId){
  setCacheId(cacheId);
  this.okCommand=new Command(Localization.get("String_Node_Str"),Command.OK,1);
  this.msg=new StringItem(null,Localization.get("String_Node_Str"));
  addCommand(this.okCommand);
  append(new Spacer(80,0));
  append(this.msg);
  initTimer();
}

Fixed version (ground truth):
public void reinit(String cacheId){
  setCacheId(cacheId);
  this.okCommand=new Command(Localization.get("String_Node_Str"),Command.OK,1);
  addCommand(this.okCommand);
  initTimer();
}
Program: 145158
Project: 145158
Buggy source:
public FormTransportSubmitStatusScreen(CommandListener listener,TransportResponseProcessor responder){
  super(Localization.get("String_Node_Str"));
  setCommandListener(listener);
  this.responder=responder;
}

Fixed version (ground truth):
public FormTransportSubmitStatusScreen(CommandListener listener,TransportResponseProcessor responder){
  super(Localization.get("String_Node_Str"));
  setCommandListener(listener);
  this.responder=responder;
  this.msg=new StringItem(null,Localization.get("String_Node_Str"));
  append(new Spacer(80,0));
  append(this.msg);
}
Program: 145159
Project: 145159
Buggy source:
/** 
 * @param status
 */
public void updateStatus(TransportMessage transportMessage){
  this.counter+=REFRESH_INTERVAL;
  int status=transportMessage.getStatus();
  if (status != TransportMessageStatus.QUEUED)   this.timer.cancel();
  String message;
switch (status) {
case TransportMessageStatus.QUEUED:
    message=(this.counter < TIMEOUT ? Localization.get("String_Node_Str") : Localization.get("String_Node_Str"));
  break;
case TransportMessageStatus.SENT:
message=getResponseMessage(transportMessage);
break;
case TransportMessageStatus.CACHED:
message=Localization.get("String_Node_Str");
break;
default :
message=Localization.get("String_Node_Str");
break;
}
this.msg.setText(message);
}

Fixed version (ground truth):
/** 
 * @param status
 */
public void updateStatus(TransportMessage transportMessage){
  this.counter+=REFRESH_INTERVAL;
  int status=transportMessage.getStatus();
  if (status != TransportMessageStatus.QUEUED) {
    this.timer.cancel();
  }
  String message;
switch (status) {
case TransportMessageStatus.QUEUED:
    message=(this.counter < TIMEOUT ? Localization.get("String_Node_Str") : Localization.get("String_Node_Str"));
  break;
case TransportMessageStatus.SENT:
message=getResponseMessage(transportMessage);
break;
case TransportMessageStatus.CACHED:
message=Localization.get("String_Node_Str");
break;
default :
message=Localization.get("String_Node_Str");
break;
}
this.msg.setText(message);
}
Program: 145160
Project: 145160
Buggy source:
public void refreshWidget(FormEntryPrompt fep,int changeFlags){
  prompt.setText(fep.getShortText());
  IAnswerData data=fep.getAnswerValue();
  if (data != null) {
    answer.setText(data.getDisplayText());
  }
}

Fixed version (ground truth):
public void refreshWidget(FormEntryPrompt fep,int changeFlags){
  prompt.setText(WidgetUtil.getAppropriateTextForm(fep,fep.getTextID()));
  IAnswerData data=fep.getAnswerValue();
  if (data != null) {
    answer.setText(data.getDisplayText());
  }
}
Program: 145161
Project: 145161
Buggy source:
public void refreshWidget(FormEntryPrompt fep,int changeFlags){
  ImageItem imItem=getImageItem(fep);
  if (imItem != null)   c.add(imItem);
  String caption;
  if (fep.getAvailableTextFormTypes(fep.getTextID()).contains("String_Node_Str")) {
    caption=fep.getLongText();
  }
 else   if (fep.getAvailableTextFormTypes(fep.getTextID()).contains("String_Node_Str")) {
    caption=fep.getShortText();
  }
 else {
    caption=fep.getDefaultText();
  }
  prompt.setText(caption);
  updateWidget(fep);
  IAnswerData data=fep.getAnswerValue();
  if (data != null && changeFlags == FormElementStateListener.CHANGE_INIT) {
    setWidgetValue(data.getValue());
  }
}

Fixed version (ground truth):
public void refreshWidget(FormEntryPrompt fep,int changeFlags){
  ImageItem imItem=getImageItem(fep);
  if (imItem != null)   c.add(imItem);
  prompt.setText(WidgetUtil.getAppropriateTextForm(fep,fep.getTextID()));
  updateWidget(fep);
  IAnswerData data=fep.getAnswerValue();
  if (data != null && changeFlags == FormElementStateListener.CHANGE_INIT) {
    setWidgetValue(data.getValue());
  }
}
Program: 145162
Project: 145162
Buggy source:
public void refreshWidget(FormEntryPrompt prompt,int changeFlags){
  String caption=prompt.getLongText();
  if (multiplicity != -1) {
    caption+="String_Node_Str" + multiplicity;
  }
  label.setText(caption);
}

Fixed version (ground truth):
public void refreshWidget(FormEntryPrompt prompt,int changeFlags){
  String caption=WidgetUtil.getAppropriateTextForm(prompt,prompt.getTextID());
  if (multiplicity != -1) {
    caption+="String_Node_Str" + multiplicity;
  }
  label.setText(caption);
}
Program: 145163
Project: 145163
Buggy source:
public void refreshWidget(FormEntryPrompt fep,int changeFlags){
  prompt.setText(fep.getLongText());
}

Fixed version (ground truth):
public void refreshWidget(FormEntryPrompt fep,int changeFlags){
  prompt.setText(WidgetUtil.getAppropriateTextForm(fep,fep.getTextID()));
}
Program: 145164
Project: 145164
Buggy source:
/** 
 * @param status
 */
public void handleInvalidUser(int status,CommandListener listener){
  String s=Localization.get("String_Node_Str");
  if (status == UserValidator.USER_EXISTS) {
    s+="String_Node_Str" + Localization.get("String_Node_Str",new String[]{this.view.getUsername()});
  }
  if (status == UserValidator.USERORPASSWD_MISSING) {
    s+="String_Node_Str" + Localization.get("String_Node_Str");
  }
  if (status == UserValidator.MISMATCHED_PASSWORDS) {
    s+="String_Node_Str" + Localization.get("String_Node_Str");
  }
  J2MEDisplay.showError("String_Node_Str",s);
}

Fixed version (ground truth):
/** 
 * @param status
 */
public void handleInvalidUser(int status,CommandListener listener){
  String s=Localization.get("String_Node_Str");
  if (status == UserValidator.USER_EXISTS) {
    s+="String_Node_Str" + Localization.get("String_Node_Str",new String[]{this.view.getUsername()});
  }
  if (status == UserValidator.USERORPASSWD_MISSING) {
    s+="String_Node_Str" + Localization.get("String_Node_Str");
  }
  if (status == UserValidator.MISMATCHED_PASSWORDS) {
    s+="String_Node_Str" + Localization.get("String_Node_Str");
  }
  J2MEDisplay.showError(null,s);
}
Program: 145165
Project: 145165
Buggy source:
public String[] getHeaders(boolean detailed){
  Text[] text;
  text=shortDetail.getHeaders();
  String[] output=new String[text.length];
  for (int i=0; i < output.length; ++i) {
    output[i]=text[i].evaluate(instance);
  }
  return output;
}

Fixed version (ground truth):
public String[] getHeaders(boolean detailed){
  Text[] text;
  if (!detailed) {
    text=shortDetail.getHeaders();
  }
 else {
    text=longDetail.getHeaders();
  }
  String[] output=new String[text.length];
  for (int i=0; i < output.length; ++i) {
    output[i]=text[i].evaluate(instance);
  }
  return output;
}
Program: 145166
Project: 145166
Buggy source:
public String[] getLongFields(E e){
  Text[] text=shortDetail.getTemplates();
  String[] output=new String[text.length];
  for (int i=0; i < output.length; ++i) {
    output[i]=text[i].evaluate(instance);
  }
  return output;
}

Fixed version (ground truth):
public String[] getLongFields(E e){
  loader.prepare(e);
  FormInstance specificInstance=loader.loadInstance(longDetail.getInstance());
  Text[] text=longDetail.getTemplates();
  String[] output=new String[text.length];
  for (int i=0; i < output.length; ++i) {
    output[i]=text[i].evaluate(specificInstance);
  }
  return output;
}
Program: 145167
Project: 145167
Buggy source:
public void prepare(PatientReferral r){
  this.r=r;
  this.c=null;
}

Fixed version (ground truth):
public void prepare(PatientReferral r){
  this.r=r;
  preloader=new PatientReferralPreloader(r);
  this.c=null;
}
Program: 145168
Project: 145168
Buggy source:
protected Object resolveReferenceData(String reference,String key){
  String refType=references.get(reference).toLowerCase();
  if (refType.equals("String_Node_Str")) {
  }
 else   if (refType.equals("String_Node_Str")) {
    return getCase().getProperty(key);
  }
  return null;
}

Fixed version (ground truth):
protected Object resolveReferenceData(String reference,String key){
  String refType=references.get(reference).toLowerCase();
  if (refType.equals("String_Node_Str")) {
    return preloader.handlePreload(key);
  }
 else   if (refType.equals("String_Node_Str")) {
    return getCase().getProperty(key);
  }
  return null;
}
Program: 145169
Project: 145169
Buggy source:
public String evaluate(FormInstance context){
switch (type) {
case TEXT_TYPE_FLAT:
    return argument;
case TEXT_TYPE_LOCALE:
  String id=argument;
if (argument == null) {
  id=arguments.get("String_Node_Str").evaluate(context);
}
return Localization.get(id);
case TEXT_TYPE_XPATH:
try {
XPathExpression expression=XPathParseTool.parseXPath(argument);
EvaluationContext temp=new EvaluationContext(new EvaluationContext(),context.getRoot().getRef());
return (String)expression.eval(context,temp);
}
 catch (XPathSyntaxException e) {
e.printStackTrace();
}
return argument;
case TEXT_TYPE_COMPOSITE:
String ret="String_Node_Str";
for (Enumeration en=arguments.elements(); en.hasMoreElements(); ) {
ret+=((Text)en.nextElement()).evaluate() + "String_Node_Str";
}
return ret;
default :
return argument;
}
}

Fixed version (ground truth):
public String evaluate(FormInstance context){
switch (type) {
case TEXT_TYPE_FLAT:
    return argument;
case TEXT_TYPE_LOCALE:
  String id=argument;
if (argument.equals("String_Node_Str")) {
  id=arguments.get("String_Node_Str").evaluate(context);
}
return Localization.get(id);
case TEXT_TYPE_XPATH:
try {
XPathExpression expression=XPathParseTool.parseXPath(argument);
EvaluationContext temp=new EvaluationContext(new EvaluationContext(),context.getRoot().getRef());
for (Enumeration en=arguments.keys(); en.hasMoreElements(); ) {
String key=(String)en.nextElement();
temp.setVariable(key,arguments.get(key));
}
return (String)expression.eval(context,temp);
}
 catch (XPathSyntaxException e) {
e.printStackTrace();
}
return argument;
case TEXT_TYPE_COMPOSITE:
String ret="String_Node_Str";
for (Enumeration en=arguments.elements(); en.hasMoreElements(); ) {
ret+=((Text)en.nextElement()).evaluate() + "String_Node_Str";
}
return ret;
default :
return argument;
}
}
Program: 145170
Project: 145170
Buggy source:
public void writeExternal(DataOutputStream out) throws IOException {
  ExtUtil.writeString(out,id);
  ExtUtil.write(out,title);
  ExtUtil.write(out,filter);
  ExtUtil.write(out,context);
  ExtUtil.write(out,new ExtWrapList(headers));
  ExtUtil.write(out,new ExtWrapList(templates));
}

Fixed version (ground truth):
public void writeExternal(DataOutputStream out) throws IOException {
  ExtUtil.writeString(out,id);
  ExtUtil.write(out,title);
  ExtUtil.write(out,filter);
  ExtUtil.write(out,context);
  ExtUtil.write(out,new ExtWrapList(headers));
  ExtUtil.write(out,new ExtWrapList(templates));
  ExtUtil.writeInts(out,headerHints);
  ExtUtil.writeInts(out,templateHints);
}
Program: 145171
Project: 145171
Buggy source:
public void readExternal(DataInputStream in,PrototypeFactory pf) throws IOException, DeserializationException {
  id=ExtUtil.readString(in);
  title=(Text)ExtUtil.read(in,Text.class,pf);
  filter=(Filter)ExtUtil.read(in,Filter.class,pf);
  context=(FormInstance)ExtUtil.read(in,FormInstance.class,pf);
  headers=(Vector<Text>)ExtUtil.read(in,new ExtWrapList(Text.class),pf);
  templates=(Vector<Text>)ExtUtil.read(in,new ExtWrapList(Text.class),pf);
}

Fixed version (ground truth):
public void readExternal(DataInputStream in,PrototypeFactory pf) throws IOException, DeserializationException {
  id=ExtUtil.readString(in);
  title=(Text)ExtUtil.read(in,Text.class,pf);
  filter=(Filter)ExtUtil.read(in,Filter.class,pf);
  context=(FormInstance)ExtUtil.read(in,FormInstance.class,pf);
  headers=(Vector<Text>)ExtUtil.read(in,new ExtWrapList(Text.class),pf);
  templates=(Vector<Text>)ExtUtil.read(in,new ExtWrapList(Text.class),pf);
  headerHints=(int[])ExtUtil.readInts(in);
  templateHints=(int[])ExtUtil.readInts(in);
}
Program: 145172
Project: 145172
Buggy source:
public Detail(String id,Text title,FormInstance context,Vector<Text> headers,Vector<Text> templates,Filter filter){
  this.id=id;
  this.title=title;
  this.context=context;
  this.headers=headers;
  this.templates=templates;
  this.filter=filter;
}

Fixed version (ground truth):
public Detail(String id,Text title,FormInstance context,Vector<Text> headers,Vector<Text> templates,Filter filter,int[] headerHints,int[] templateHints){
  this.id=id;
  this.title=title;
  this.context=context;
  this.headers=headers;
  this.templates=templates;
  this.filter=filter;
  this.headerHints=headerHints;
  this.templateHints=templateHints;
}