nus-yam/ex-repair huggingface dataset:
Program: 12839
Project: 12839
Buggy source:
/** 
 * Returns the set of members referenced by this object.
 * @return the set of members referenced by this object.
 */
public Set<TopLevel> getMembers(){
  Set<TopLevel> result=new HashSet<TopLevel>();
  for (  URI memberURI : members) {
    TopLevel member=sbolDocument.getTopLevel(memberURI);
    result.add(member);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Returns the set of members referenced by this object.
 * @return the set of members referenced by this object.
 */
public Set<TopLevel> getMembers(){
  Set<TopLevel> result=new HashSet<>();
  for (  URI memberURI : members) {
    TopLevel member=sbolDocument.getTopLevel(memberURI);
    result.add(member);
  }
  return result;
}
Program: 12840
Project: 12840
Buggy source:
/** 
 * Returns a comparable value for a qualifier. This method takes into account the ordering of known qualifiers then unknown qualifiers with lexical ordering. just returning an Integer with the index here is faster, but requires a lot of if/then/else to check for -1 or QUALIFIERS.size and then resort to lexical ordering. Most comparisons are decided by the first character, so this is still fast. If more characters are needed then it requires a lexical sort anyway.
 * @param qualifier
 * @return an equivalent value that can be used with lexical comparison
 */
public static String comparableQualifier(String qualifier){
  int i=_QUALIFIERS.indexOf(qualifier);
  return i == -1 ? (_QUALIFIERS.size() + "String_Node_Str" + qualifier) : String.valueOf(i);
}

Fixed version (ground truth):
/** 
 * Returns a comparable value for a qualifier. This method takes into account the ordering of known qualifiers then unknown qualifiers with lexical ordering. just returning an Integer with the index here is faster, but requires a lot of if/then/else to check for -1 or QUALIFIERS.size and then resort to lexical ordering. Most comparisons are decided by the first character, so this is still fast. If more characters are needed then it requires a lexical sort anyway.
 * @return an equivalent value that can be used with lexical comparison
 */
public static String comparableQualifier(String qualifier){
  int i=_QUALIFIERS.indexOf(qualifier);
  return i == -1 ? (_QUALIFIERS.size() + "String_Node_Str" + qualifier) : String.valueOf(i);
}
Program: 12842
Project: 12842
Buggy source:
/** 
 * Assume this Component object and all its descendants (children, grand children, etc) have compliant URI, and all given parameters have compliant forms. This method is called by   {@link ComponentDefinition#copy(String,String,String)}.
 * @param URIprefix
 * @param parentDisplayId
 * @param version
 */
void updateCompliantURI(String URIprefix,String parentDisplayId,String version){
  String thisObjDisplayId=extractDisplayId(this.getIdentity(),1);
  URI newIdentity=URI.create(URIprefix + '/' + parentDisplayId+ '/'+ thisObjDisplayId+ '/'+ version);
  if (!this.getMapsTos().isEmpty()) {
    for (    MapsTo mapsTo : this.getMapsTos()) {
      mapsTo.updateCompliantURI(URIprefix,parentDisplayId,thisObjDisplayId,version);
    }
  }
  this.setWasDerivedFrom(this.getIdentity());
  this.setIdentity(newIdentity);
}

Fixed version (ground truth):
/** 
 * Assume this Component object and all its descendants (children, grand children, etc) have compliant URI, and all given parameters have compliant forms. This method is called by   {@link ComponentDefinition#copy(String,String,String)}.
 */
void updateCompliantURI(String URIprefix,String parentDisplayId,String version){
  String thisObjDisplayId=extractDisplayId(this.getIdentity(),1);
  URI newIdentity=URI.create(URIprefix + '/' + parentDisplayId+ '/'+ thisObjDisplayId+ '/'+ version);
  if (!this.getMapsTos().isEmpty()) {
    for (    MapsTo mapsTo : this.getMapsTos()) {
      mapsTo.updateCompliantURI(URIprefix,parentDisplayId,thisObjDisplayId,version);
    }
  }
  this.setWasDerivedFrom(this.getIdentity());
  this.setIdentity(newIdentity);
}
Program: 12843
Project: 12843
Buggy source:
private static ComponentDefinition get_pLac(SBOLDocument SBOL2Doc_test){
  Sequence temp=get_pLacSeq(SBOL2Doc_test);
  return createComponentDefinitionData(SBOL2Doc_test,getSetPropertyURI("String_Node_Str"),getSetPropertyURI("String_Node_Str"),getData("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),get_pLacSeq(SBOL2Doc_test),null,null,null);
}

Fixed version (ground truth):
private static ComponentDefinition get_pLac(SBOLDocument SBOL2Doc_test){
  return createComponentDefinitionData(SBOL2Doc_test,getSetPropertyURI("String_Node_Str"),getSetPropertyURI("String_Node_Str"),getData("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),get_pLacSeq(SBOL2Doc_test),null,null,null);
}
Program: 12844
Project: 12844
Buggy source:
private static Model createModelData(SBOLDocument doc,List<String> modeldata,Set<URI> roles,URI source,URI language,URI framework){
  URI identity=getURI(modeldata.get(0));
  URI persistentIdentity=getURI(modeldata.get(1));
  String version=modeldata.get(2);
  String displayId=modeldata.get(3);
  String name=modeldata.get(4);
  String description=modeldata.get(5);
  Model model=doc.createModel(identity,source,language,framework,roles);
  setCommonTopLevelData(model,identity,persistentIdentity,version,displayId,name,description);
  return model;
}

Fixed version (ground truth):
private static Model createModelData(SBOLDocument doc,List<String> modeldata,Set<URI> roles,URI source,URI language,URI framework){
  URI identity=getURI(modeldata.get(0));
  URI persistentIdentity=getURI(modeldata.get(1));
  String version=modeldata.get(2);
  String displayId=modeldata.get(3);
  String name=modeldata.get(4);
  String description=modeldata.get(5);
  Model model=doc.createModel(identity,source,language,framework,roles);
  if (model == null) {
    model=doc.getModel(identity);
  }
 else {
    setCommonTopLevelData(model,identity,persistentIdentity,version,displayId,name,description);
  }
  return model;
}
Program: 12845
Project: 12845
Buggy source:
private static ComponentDefinition createComponentDefinitionData(SBOLDocument SBOL2Doc_test,Set<URI> type,Set<URI> roles,List<String> componentData,Sequence structureData,List<Component> structureInstantiationData,List<SequenceAnnotation> structureAnnotationData,List<SequenceConstraint> structureConstraintData){
  URI identity=getURI(componentData.get(0));
  URI persistentIdentity=getURI(componentData.get(1));
  String version=componentData.get(2);
  String displayId=componentData.get(3);
  String name=componentData.get(4);
  String description=componentData.get(5);
  ComponentDefinition c=SBOL2Doc_test.createComponentDefinition(identity,type);
  c.setRoles(roles);
  setCommonTopLevelData(c,identity,persistentIdentity,version,displayId,name,description);
  if (structureData != null)   c.setSequence(structureData.getIdentity());
  if (structureInstantiationData != null) {
    if (structureAnnotationData != null && structureConstraintData == null)     c.setSequenceAnnotations(structureAnnotationData);
 else     if (structureConstraintData != null)     c.setSequenceConstraints(structureConstraintData);
  }
  return c;
}

Fixed version (ground truth):
private static ComponentDefinition createComponentDefinitionData(SBOLDocument SBOL2Doc_test,Set<URI> type,Set<URI> roles,List<String> componentData,Sequence structureData,List<Component> structureInstantiationData,List<SequenceAnnotation> structureAnnotationData,List<SequenceConstraint> structureConstraintData){
  URI identity=getURI(componentData.get(0));
  URI persistentIdentity=getURI(componentData.get(1));
  String version=componentData.get(2);
  String displayId=componentData.get(3);
  String name=componentData.get(4);
  String description=componentData.get(5);
  ComponentDefinition c=SBOL2Doc_test.createComponentDefinition(identity,type);
  if (c == null) {
    c=SBOL2Doc_test.getComponentDefinition(identity);
  }
 else {
    c.setRoles(roles);
    setCommonTopLevelData(c,identity,persistentIdentity,version,displayId,name,description);
  }
  if (structureData != null)   c.setSequence(structureData.getIdentity());
  if (structureInstantiationData != null) {
    if (structureAnnotationData != null && structureConstraintData == null)     c.setSequenceAnnotations(structureAnnotationData);
 else     if (structureConstraintData != null)     c.setSequenceConstraints(structureConstraintData);
  }
  return c;
}
Program: 12846
Project: 12846
Buggy source:
private static ModuleDefinition createModuleDefinitionData(SBOLDocument SBOL2Doc_test,Set<URI> type,Set<URI> roles,List<String> module_data,List<FunctionalComponent> functionalInstantiation_data,List<Interaction> interactionData,List<Module> moduleInstantiation_data,Set<URI> model_data,List<Annotation> annotations){
  URI identity=getURI(module_data.get(0));
  URI persistentIdentity=getURI(module_data.get(1));
  String version=module_data.get(2);
  String displayId=module_data.get(3);
  String name=module_data.get(4);
  String description=module_data.get(5);
  ModuleDefinition m=SBOL2Doc_test.createModuleDefinition(identity,roles);
  setCommonTopLevelData(m,identity,persistentIdentity,version,displayId,name,description);
  if (annotations != null)   m.setAnnotations(annotations);
  if (functionalInstantiation_data != null)   m.setFunctionalComponents(functionalInstantiation_data);
  if (interactionData != null)   m.setInteractions(interactionData);
  if (moduleInstantiation_data != null)   m.setModules(moduleInstantiation_data);
  if (model_data != null)   m.setModels(model_data);
  return m;
}

Fixed version (ground truth):
private static ModuleDefinition createModuleDefinitionData(SBOLDocument SBOL2Doc_test,Set<URI> type,Set<URI> roles,List<String> module_data,List<FunctionalComponent> functionalInstantiation_data,List<Interaction> interactionData,List<Module> moduleInstantiation_data,Set<URI> model_data,List<Annotation> annotations){
  URI identity=getURI(module_data.get(0));
  URI persistentIdentity=getURI(module_data.get(1));
  String version=module_data.get(2);
  String displayId=module_data.get(3);
  String name=module_data.get(4);
  String description=module_data.get(5);
  ModuleDefinition m=SBOL2Doc_test.createModuleDefinition(identity,roles);
  if (m == null) {
    m=SBOL2Doc_test.getModuleDefinition(identity);
  }
 else {
    setCommonTopLevelData(m,identity,persistentIdentity,version,displayId,name,description);
    if (annotations != null)     m.setAnnotations(annotations);
    if (functionalInstantiation_data != null)     m.setFunctionalComponents(functionalInstantiation_data);
    if (interactionData != null)     m.setInteractions(interactionData);
    if (moduleInstantiation_data != null)     m.setModules(moduleInstantiation_data);
    if (model_data != null)     m.setModels(model_data);
  }
  return m;
}
Program: 12847
Project: 12847
Buggy source:
private static Sequence createSequenceData(SBOLDocument SBOL2Doc_test,List<String> structureData,URI encoding){
  URI identity=getURI(structureData.get(0));
  URI persistentIdentity=getURI(structureData.get(1));
  String version=structureData.get(2);
  String displayId=structureData.get(3);
  String name=structureData.get(4);
  String description=structureData.get(5);
  String element=structureData.get(6);
  Sequence structure=SBOL2Doc_test.createSequence(identity,element,encoding);
  setCommonTopLevelData(structure,identity,persistentIdentity,version,displayId,name,description);
  return structure;
}

Fixed version (ground truth):
private static Sequence createSequenceData(SBOLDocument SBOL2Doc_test,List<String> structureData,URI encoding){
  URI identity=getURI(structureData.get(0));
  URI persistentIdentity=getURI(structureData.get(1));
  String version=structureData.get(2);
  String displayId=structureData.get(3);
  String name=structureData.get(4);
  String description=structureData.get(5);
  String element=structureData.get(6);
  Sequence structure=SBOL2Doc_test.createSequence(identity,element,encoding);
  if (structure == null) {
    structure=SBOL2Doc_test.getSequence(identity);
  }
 else {
    setCommonTopLevelData(structure,identity,persistentIdentity,version,displayId,name,description);
  }
  return structure;
}
Program: 12848
Project: 12848
Buggy source:
private static Model createModelData(SBOLDocument doc,List<String> modeldata,Set<URI> roles,URI source,URI language,URI framework){
  URI identity=getURI(modeldata.get(0));
  URI persistentIdentity=getURI(modeldata.get(1));
  String version=modeldata.get(2);
  String displayId=modeldata.get(3);
  String name=modeldata.get(4);
  String description=modeldata.get(5);
  Model model=doc.createModel(identity,source,language,framework,roles);
  setCommonTopLevelData(model,identity,persistentIdentity,version,displayId,name,description);
  return model;
}

Fixed version (ground truth):
private static Model createModelData(SBOLDocument doc,List<String> modeldata,Set<URI> roles,URI source,URI language,URI framework){
  URI identity=getURI(modeldata.get(0));
  URI persistentIdentity=getURI(modeldata.get(1));
  String version=modeldata.get(2);
  String displayId=modeldata.get(3);
  String name=modeldata.get(4);
  String description=modeldata.get(5);
  Model model=doc.createModel(identity,source,language,framework,roles);
  if (model == null) {
    model=doc.getModel(identity);
  }
 else {
    setCommonTopLevelData(model,identity,persistentIdentity,version,displayId,name,description);
  }
  return model;
}
Program: 12849
Project: 12849
Buggy source:
private static ComponentDefinition createComponentDefinitionData(SBOLDocument SBOL2Doc_test,Set<URI> type,Set<URI> roles,List<String> componentData,Sequence structureData,List<Component> structureInstantiationData,List<SequenceAnnotation> structureAnnotationData,List<SequenceConstraint> structureConstraintData){
  URI identity=getURI(componentData.get(0));
  URI persistentIdentity=getURI(componentData.get(1));
  String version=componentData.get(2);
  String displayId=componentData.get(3);
  String name=componentData.get(4);
  String description=componentData.get(5);
  ComponentDefinition c=SBOL2Doc_test.createComponentDefinition(identity,type,roles);
  setCommonTopLevelData(c,identity,persistentIdentity,version,displayId,name,description);
  if (structureData != null)   c.setSequence(structureData.getIdentity());
  if (structureInstantiationData != null) {
    c.setComponents(structureInstantiationData);
    if (structureAnnotationData != null && structureConstraintData == null)     c.setSequenceAnnotations(structureAnnotationData);
 else     if (structureConstraintData != null)     c.setSequenceConstraints(structureConstraintData);
  }
  return c;
}

Fixed version (ground truth):
private static ComponentDefinition createComponentDefinitionData(SBOLDocument SBOL2Doc_test,Set<URI> type,Set<URI> roles,List<String> componentData,Sequence structureData,List<Component> structureInstantiationData,List<SequenceAnnotation> structureAnnotationData,List<SequenceConstraint> structureConstraintData){
  URI identity=getURI(componentData.get(0));
  URI persistentIdentity=getURI(componentData.get(1));
  String version=componentData.get(2);
  String displayId=componentData.get(3);
  String name=componentData.get(4);
  String description=componentData.get(5);
  ComponentDefinition c=SBOL2Doc_test.createComponentDefinition(identity,type,roles);
  if (c == null) {
    c=SBOL2Doc_test.getComponentDefinition(identity);
  }
 else {
    setCommonTopLevelData(c,identity,persistentIdentity,version,displayId,name,description);
    if (structureData != null)     c.setSequence(structureData.getIdentity());
    if (structureInstantiationData != null) {
      c.setComponents(structureInstantiationData);
      if (structureAnnotationData != null && structureConstraintData == null)       c.setSequenceAnnotations(structureAnnotationData);
 else       if (structureConstraintData != null)       c.setSequenceConstraints(structureConstraintData);
    }
  }
  return c;
}
Program: 12850
Project: 12850
Buggy source:
private static ModuleDefinition createModuleDefinitionData(SBOLDocument SBOL2Doc_test,Set<URI> type,Set<URI> roles,List<String> module_data,List<FunctionalComponent> functionalInstantiation_data,List<Interaction> interactionData,List<Module> moduleInstantiation_data,Set<URI> model_data,List<Annotation> annotations){
  URI identity=getURI(module_data.get(0));
  URI persistentIdentity=getURI(module_data.get(1));
  String version=module_data.get(2);
  String displayId=module_data.get(3);
  String name=module_data.get(4);
  String description=module_data.get(5);
  ModuleDefinition m=SBOL2Doc_test.createModuleDefinition(identity,roles);
  setCommonTopLevelData(m,identity,persistentIdentity,version,displayId,name,description);
  if (annotations != null)   m.setAnnotations(annotations);
  if (functionalInstantiation_data != null)   m.setFunctionalComponents(functionalInstantiation_data);
  if (interactionData != null)   m.setInteractions(interactionData);
  if (moduleInstantiation_data != null)   m.setModules(moduleInstantiation_data);
  if (model_data != null)   m.setModels(model_data);
  return m;
}

Fixed version (ground truth):
private static ModuleDefinition createModuleDefinitionData(SBOLDocument SBOL2Doc_test,Set<URI> type,Set<URI> roles,List<String> module_data,List<FunctionalComponent> functionalInstantiation_data,List<Interaction> interactionData,List<Module> moduleInstantiation_data,Set<URI> model_data,List<Annotation> annotations){
  URI identity=getURI(module_data.get(0));
  URI persistentIdentity=getURI(module_data.get(1));
  String version=module_data.get(2);
  String displayId=module_data.get(3);
  String name=module_data.get(4);
  String description=module_data.get(5);
  ModuleDefinition m=SBOL2Doc_test.createModuleDefinition(identity,roles);
  if (m == null) {
    m=SBOL2Doc_test.getModuleDefinition(identity);
  }
 else {
    setCommonTopLevelData(m,identity,persistentIdentity,version,displayId,name,description);
    if (annotations != null)     m.setAnnotations(annotations);
    if (functionalInstantiation_data != null)     m.setFunctionalComponents(functionalInstantiation_data);
    if (interactionData != null)     m.setInteractions(interactionData);
    if (moduleInstantiation_data != null)     m.setModules(moduleInstantiation_data);
    if (model_data != null)     m.setModels(model_data);
  }
  return m;
}
Program: 12853
Project: 12853
Buggy source:
public static SBOLDocument createDocument(TopLevel... contents){
  SBOLDocument document=new SBOLDocument();
  for (  TopLevel topLevel : contents) {
    if (topLevel instanceof Collection) {
      document.addCollection((Collection)topLevel);
    }
 else     if (topLevel instanceof ModuleDefinition) {
      document.addModuleDefinition((ModuleDefinition)topLevel);
    }
 else     if (topLevel instanceof Model) {
      document.addModel((Model)topLevel);
    }
 else     if (topLevel instanceof ComponentDefinition) {
      document.addComponentDefinition((ComponentDefinition)topLevel);
    }
 else     if (topLevel instanceof Sequence) {
      document.addSequence((Sequence)topLevel);
    }
 else     if (topLevel instanceof GenericTopLevel) {
      document.addGenericTopLevel((GenericTopLevel)topLevel);
      document.addNameSpaceBinding(URI.create("String_Node_Str"),"String_Node_Str");
    }
  }
  return document;
}

Fixed version (ground truth):
public static SBOLDocument createDocument(TopLevel... contents){
  SBOLDocument document=new SBOLDocument();
  document.addNameSpaceBinding(URI.create("String_Node_Str"),"String_Node_Str");
  for (  TopLevel topLevel : contents) {
    if (topLevel instanceof Collection) {
      document.addCollection((Collection)topLevel);
    }
 else     if (topLevel instanceof ModuleDefinition) {
      document.addModuleDefinition((ModuleDefinition)topLevel);
    }
 else     if (topLevel instanceof Model) {
      document.addModel((Model)topLevel);
    }
 else     if (topLevel instanceof ComponentDefinition) {
      document.addComponentDefinition((ComponentDefinition)topLevel);
    }
 else     if (topLevel instanceof Sequence) {
      document.addSequence((Sequence)topLevel);
    }
 else     if (topLevel instanceof GenericTopLevel) {
      document.addGenericTopLevel((GenericTopLevel)topLevel);
      document.addNameSpaceBinding(URI.create("String_Node_Str"),"String_Node_Str");
    }
  }
  return document;
}
Program: 12854
Project: 12854
Buggy source:
private static List<NestedDocument> getParticipations(List<Participation> participations){
  List<NestedDocument> nestedDoc=new ArrayList<NestedDocument>();
  for (  Participation p : participations) {
    List<NamedProperty<QName>> list=new ArrayList<NamedProperty<QName>>();
    list.add(NamedProperty(Sbol2Terms.Identified.identity,p.getIdentity()));
    if (p.getRoles() != null)     for (    URI r : p.getRoles())     list.add(NamedProperty(Sbol2Terms.Participation.role,r));
    if (p.getParticipant() != null)     list.add(NamedProperty(Sbol2Terms.Participation.hasParticipant,p.getParticipant()));
    nestedDoc.add(NestedDocument(Sbol2Terms.Participation.Participation,p.getIdentity(),NamedProperties(list)));
  }
  return nestedDoc;
}

Fixed version (ground truth):
private static List<NestedDocument> getParticipations(List<Participation> participations){
  List<NestedDocument> nestedDoc=new ArrayList<NestedDocument>();
  for (  Participation p : participations) {
    List<NamedProperty<QName>> list=new ArrayList<NamedProperty<QName>>();
    if (p.getRoles() != null)     for (    URI r : p.getRoles())     list.add(NamedProperty(Sbol2Terms.Participation.role,r));
    if (p.getParticipant() != null)     list.add(NamedProperty(Sbol2Terms.Participation.hasParticipant,p.getParticipant()));
    nestedDoc.add(NestedDocument(Sbol2Terms.Participation.Participation,p.getIdentity(),NamedProperties(list)));
  }
  return nestedDoc;
}
Program: 12855
Project: 12855
Buggy source:
private static void getCommonDocumentedData(List<NamedProperty<QName>> list,Documented d){
  getCommonIdentifiedData(list,d);
  if (d.getDisplayId() != null)   list.add(NamedProperty(Sbol2Terms.Documented.displayId,d.getDisplayId()));
  if (d.getName() != null)   list.add(NamedProperty(Sbol2Terms.Documented.name,d.getName()));
  if (d.getDescription() != null)   list.add(NamedProperty(Sbol2Terms.Documented.description,d.getDescription()));
}

Fixed version (ground truth):
private static void getCommonDocumentedData(List<NamedProperty<QName>> list,Documented d){
  getCommonIdentifiedData(list,d);
  if (d.getName() != null)   list.add(NamedProperty(Sbol2Terms.Documented.name,d.getName()));
  if (d.getDescription() != null)   list.add(NamedProperty(Sbol2Terms.Documented.description,d.getDescription()));
}
Program: 12856
Project: 12856
Buggy source:
private static void write(Writer stream,DocumentRoot<QName> document) throws Exception {
  XMLStreamWriter xmlWriter=new IndentingXMLStreamWriter(XMLOutputFactory.newInstance().createXMLStreamWriter(stream));
  RdfIo rdfIo=new RdfIo();
  rdfIo.createIoWriter(xmlWriter).write(document);
  xmlWriter.flush();
  xmlWriter.close();
}

Fixed version (ground truth):
/** 
 * Serializes a given SBOLDocument and outputs the data from the serialization to the given output stream
 * @param doc
 * @param out
 */
public static void write(SBOLDocument doc,OutputStream out){
  List<TopLevelDocument<QName>> topLevelDoc=new ArrayList<TopLevelDocument<QName>>();
  formatCollections(doc.getCollections(),topLevelDoc);
  formatModules(doc.getModules(),topLevelDoc);
  formatModels(doc.getModels(),topLevelDoc);
  formatComponents(doc.getComponents(),topLevelDoc);
  formatStructures(doc.getStructures(),topLevelDoc);
  try {
    writeRdf(new OutputStreamWriter(out),DocumentRoot(TopLevelDocuments(topLevelDoc)));
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 12857
Project: 12857
Buggy source:
private static void getCommonIdentifiedData(List<NamedProperty<QName>> list,Identified t){
  if (t.getPersistentIdentity() != null)   list.add(NamedProperty(Sbol2Terms.Documented.persistentIdentity,t.getPersistentIdentity()));
  if (t.getVersion() != null)   list.add(NamedProperty(Sbol2Terms.Documented.version,t.getVersion()));
  if (t.getTimeStamp() != null)   list.add(NamedProperty(Sbol2Terms.Documented.timeStamp,t.getTimeStamp().toString()));
}

Fixed version (ground truth):
private static void getCommonIdentifiedData(List<NamedProperty<QName>> list,Identified t){
  if (t.getTimeStamp() != null)   list.add(NamedProperty(Sbol2Terms.Documented.timeStamp,t.getTimeStamp().toString()));
}
Program: 12858
Project: 12858
Buggy source:
/** 
 * Returns the list of structuralAnnotation instances owned by this instance. 
 * @return the list of structuralAnnotation instances owned by this instance.
 */
public List<Annotation> getAnnotations(){
  return (List<Annotation>)annotations.values();
}

Fixed version (ground truth):
/** 
 * Returns the list of structuralAnnotation instances owned by this instance. 
 * @return the list of structuralAnnotation instances owned by this instance.
 */
public List<Annotation> getAnnotations(){
  return new ArrayList<Annotation>(annotations.values());
}
Program: 12859
Project: 12859
Buggy source:
/** 
 * Merge the two entities. The result should contain all the data in the two inputs. If the data is incompattible, raise an exception.
 * @param e1    the first entity
 * @param e2    the second entity
 * @return      a merge of the two
 */
public E merge(E e1,E e2);

Fixed version (ground truth):
@Override public E merge(E e1,E e2) throws MergerException {
  if (e1 == null)   return e2;
  if (e2 == null)   return e1;
  return delegate.merge(e1,e2);
}
Program: 12860
Project: 12860
Buggy source:
/** 
 * Resolve the ID or return null.
 * @param id    the identifier
 * @return      the resolution of the identifier, or null if it could not be resolved
 */
public E resolve(ID id);

Fixed version (ground truth):
/** 
 * Resolve the ID or return null.
 * @param id    the identifier
 * @return      the resolution of the identifier, or null if it could not be resolved
 */
public E resolve(ID id) throws MergerException ;
Program: 12861
Project: 12861
Buggy source:
/** 
 * Calls the appropriate visit function from the   {@link SBOLVisitor} class.
 */
public void accept(SBOLVisitor visitor);

Fixed version (ground truth):
/** 
 * Calls the appropriate visit function from the   {@link SBOLVisitor} class.
 * @param visitor the visitor to accept
 * @throws T if the visitor throws T
 */
public <T extends Throwable>void accept(SBOLVisitor<T> visitor) throws T ;
Program: 12862
Project: 12862
Buggy source:
public void visit(SequenceAnnotation annotation);

Fixed version (ground truth):
public void visit(SequenceAnnotation annotation) throws T ;
Program: 12863
Project: 12863
Buggy source:
protected <A>A nullSafeIdentical(A a1,A a2,String fieldName){
  return nullSafeMerge(a1,a2,fieldName,new MergeIdentical<A>());
}

Fixed version (ground truth):
protected <A>A nullSafeIdentical(A a1,A a2,String fieldName) throws MergerException {
  return nullSafeMerge(a1,a2,fieldName,new MergeIdentical<A>());
}
Program: 12864
Project: 12864
Buggy source:
protected <A,C extends Collection<A>>C nullSafeCollectionMerge(C c1,C c2,String fieldName,C empty,Merger<A> merger){
  OUTER:   for (  A a1 : c1) {
    for (    A a2 : c2) {
      if (a1.equals(a2)) {
        empty.add(merger.merge(a1,a2));
        continue OUTER;
      }
    }
    empty.add(a1);
  }
  for (  A a2 : c2) {
    if (!c1.contains(a2)) {
      empty.add(a2);
    }
  }
  return empty;
}

Fixed version (ground truth):
protected <A,C extends Collection<A>>C nullSafeCollectionMerge(C c1,C c2,String fieldName,C empty,Merger<A> merger) throws MergerException {
  OUTER:   for (  A a1 : c1) {
    for (    A a2 : c2) {
      if (a1.equals(a2)) {
        empty.add(merger.merge(a1,a2));
        continue OUTER;
      }
    }
    empty.add(a1);
  }
  for (  A a2 : c2) {
    if (!c1.contains(a2)) {
      empty.add(a2);
    }
  }
  return empty;
}
Program: 12865
Project: 12865
Buggy source:
protected <A>A nullSafeMerge(A a1,A a2,String fieldName,Merger<A> merger){
  if (a1 != null && a2 != null) {
    try {
      return merger.merge(a1,a2);
    }
 catch (    IllegalArgumentException iae) {
      throw new IllegalArgumentException("String_Node_Str" + fieldName,iae);
    }
  }
 else   if (a1 != null) {
    return a1;
  }
 else {
    return a2;
  }
}

Fixed version (ground truth):
protected <A>A nullSafeMerge(A a1,A a2,String fieldName,Merger<A> merger) throws MergerException {
  if (a1 != null && a2 != null) {
    try {
      return merger.merge(a1,a2);
    }
 catch (    IllegalArgumentException iae) {
      throw new IllegalArgumentException("String_Node_Str" + fieldName,iae);
    }
  }
 else   if (a1 != null) {
    return a1;
  }
 else {
    return a2;
  }
}
Program: 12866
Project: 12866
Buggy source:
@Override public E resolve(ID id){
  E found=null;
  for (  Resolver<E,ID> r : resolvers) {
    E e=r.resolve(id);
    if (e != null) {
      if (stopSearching(id,e)) {
        return e;
      }
 else       if (found == null) {
        found=e;
      }
 else {
        found=getMerger().merge(found,e);
      }
    }
  }
  return found;
}

Fixed version (ground truth):
@Override public E resolve(ID id) throws MergerException {
  E found=null;
  for (  Resolver<E,ID> r : resolvers) {
    E e=r.resolve(id);
    if (e != null) {
      if (stopSearching(id,e)) {
        return e;
      }
 else       if (found == null) {
        found=e;
      }
 else {
        found=getMerger().merge(found,e);
      }
    }
  }
  return found;
}
Program: 12867
Project: 12867
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void accept(SBOLVisitor visitor){
  visitor.visit(this);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public <T extends Throwable>void accept(SBOLVisitor<T> visitor) throws T {
  visitor.visit(this);
}
Program: 12868
Project: 12868
Buggy source:
@Override public Collection merge(Collection e1,Collection e2){
  CollectionImpl m=new CollectionImpl();
  m.setDescription(nullSafeIdentical(e1.getDescription(),e2.getDescription(),"String_Node_Str"));
  m.setDisplayId(nullSafeIdentical(e1.getDisplayId(),e2.getDisplayId(),"String_Node_Str"));
  m.setName(nullSafeIdentical(e1.getName(),e2.getName(),"String_Node_Str"));
  m.setURI(nullSafeIdentical(e1.getURI(),e2.getURI(),"String_Node_Str"));
  componentMerger=new MergeIdentical<DnaComponent>();
  java.util.Collection<DnaComponent> dc=nullSafeCollectionMerge(e1.getComponents(),e2.getComponents(),"String_Node_Str",new ArrayList<DnaComponent>(),componentMerger);
  for (  DnaComponent c : dc) {
    m.addComponent(c);
  }
  return m;
}

Fixed version (ground truth):
@Override public Collection merge(Collection e1,Collection e2) throws MergerException {
  CollectionImpl m=new CollectionImpl();
  m.setDescription(nullSafeIdentical(e1.getDescription(),e2.getDescription(),"String_Node_Str"));
  m.setDisplayId(nullSafeIdentical(e1.getDisplayId(),e2.getDisplayId(),"String_Node_Str"));
  m.setName(nullSafeIdentical(e1.getName(),e2.getName(),"String_Node_Str"));
  m.setURI(nullSafeIdentical(e1.getURI(),e2.getURI(),"String_Node_Str"));
  java.util.Collection<DnaComponent> dc=nullSafeCollectionMerge(e1.getComponents(),e2.getComponents(),"String_Node_Str",new ArrayList<DnaComponent>(),getComponentMerger());
  for (  DnaComponent c : dc) {
    m.addComponent(c);
  }
  return m;
}
Program: 12869
Project: 12869
Buggy source:
public CollectionMerger(Merger<DnaComponent> componentMerger){
  this.componentMerger=componentMerger;
}

Fixed version (ground truth):
public CollectionMerger(){
}
Program: 12870
Project: 12870
Buggy source:
public Merger<DnaComponent> getComponentMerger(){
  return componentMerger;
}

Fixed version (ground truth):
public abstract Merger<DnaComponent> getComponentMerger();
Program: 12871
Project: 12871
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void accept(SBOLVisitor visitor){
  visitor.visit(this);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public <T extends Throwable>void accept(SBOLVisitor<T> visitor) throws T {
  visitor.visit(this);
}
Program: 12872
Project: 12872
Buggy source:
public DnaComponentMerger(Merger<DnaSequence> dnaSequenceMerger,Merger<SequenceAnnotation> annotationMerger){
  this.dnaSequenceMerger=dnaSequenceMerger;
  this.annotationMerger=annotationMerger;
}

Fixed version (ground truth):
public DnaComponentMerger(){
}
Program: 12873
Project: 12873
Buggy source:
public Merger<DnaSequence> getDnaSequenceMerger(){
  return dnaSequenceMerger;
}

Fixed version (ground truth):
public abstract Merger<DnaSequence> getDnaSequenceMerger();
Program: 12874
Project: 12874
Buggy source:
public Merger<SequenceAnnotation> getAnnotationMerger(){
  return annotationMerger;
}

Fixed version (ground truth):
public abstract Merger<SequenceAnnotation> getAnnotationMerger();
Program: 12875
Project: 12875
Buggy source:
@Override public DnaComponent merge(DnaComponent e1,DnaComponent e2){
  DnaComponentImpl m=new DnaComponentImpl();
  m.setDescription(nullSafeIdentical(e1.getDescription(),e2.getDescription(),"String_Node_Str"));
  m.setDisplayId(nullSafeIdentical(e1.getDisplayId(),e2.getDisplayId(),"String_Node_Str"));
  m.setDnaSequence(nullSafeMerge(e1.getDnaSequence(),e2.getDnaSequence(),"String_Node_Str",dnaSequenceMerger));
  m.setName(nullSafeIdentical(e1.getName(),e2.getName(),"String_Node_Str"));
  m.setURI(nullSafeIdentical(e1.getURI(),e2.getURI(),"String_Node_Str"));
  java.util.Collection<SequenceAnnotation> ac=nullSafeCollectionMerge(e1.getAnnotations(),e2.getAnnotations(),"String_Node_Str",new ArrayList<SequenceAnnotation>(),annotationMerger);
  for (  SequenceAnnotation a : ac) {
    m.addAnnotation(a);
  }
  java.util.Collection<URI> tp=nullSafeCollectionMerge(e1.getTypes(),e2.getTypes(),"String_Node_Str",new ArrayList<URI>(),identicalUri);
  for (  URI t : tp) {
    m.addType(t);
  }
  return m;
}

Fixed version (ground truth):
@Override public DnaComponent merge(DnaComponent e1,DnaComponent e2) throws MergerException {
  DnaComponentImpl m=new DnaComponentImpl();
  m.setDescription(nullSafeIdentical(e1.getDescription(),e2.getDescription(),"String_Node_Str"));
  m.setDisplayId(nullSafeIdentical(e1.getDisplayId(),e2.getDisplayId(),"String_Node_Str"));
  m.setDnaSequence(nullSafeMerge(e1.getDnaSequence(),e2.getDnaSequence(),"String_Node_Str",getDnaSequenceMerger()));
  m.setName(nullSafeIdentical(e1.getName(),e2.getName(),"String_Node_Str"));
  m.setURI(nullSafeIdentical(e1.getURI(),e2.getURI(),"String_Node_Str"));
  java.util.Collection<SequenceAnnotation> ac=nullSafeCollectionMerge(e1.getAnnotations(),e2.getAnnotations(),"String_Node_Str",new ArrayList<SequenceAnnotation>(),getAnnotationMerger());
  for (  SequenceAnnotation a : ac) {
    m.addAnnotation(a);
  }
  java.util.Collection<URI> tp=nullSafeCollectionMerge(e1.getTypes(),e2.getTypes(),"String_Node_Str",new ArrayList<URI>(),identicalUri);
  for (  URI t : tp) {
    m.addType(t);
  }
  return m;
}
Program: 12876
Project: 12876
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void accept(SBOLVisitor visitor){
  visitor.visit(this);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public <T extends Throwable>void accept(SBOLVisitor<T> visitor) throws T {
  visitor.visit(this);
}
Program: 12877
Project: 12877
Buggy source:
@Override public DnaSequence merge(DnaSequence e1,DnaSequence e2){
  DnaSequenceImpl m=new DnaSequenceImpl();
  m.setURI(nullSafeIdentical(e1.getURI(),e2.getURI(),"String_Node_Str"));
  m.setNucleotides(nullSafeIdentical(e1.getNucleotides(),e2.getNucleotides(),"String_Node_Str"));
  return m;
}

Fixed version (ground truth):
@Override public DnaSequence merge(DnaSequence e1,DnaSequence e2) throws MergerException {
  DnaSequenceImpl m=new DnaSequenceImpl();
  m.setURI(nullSafeIdentical(e1.getURI(),e2.getURI(),"String_Node_Str"));
  m.setNucleotides(nullSafeIdentical(e1.getNucleotides(),e2.getNucleotides(),"String_Node_Str"));
  return m;
}
Program: 12878
Project: 12878
Buggy source:
@Override public E merge(E e1,E e2){
  if (e1.equals(e2)) {
    return e1;
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public E merge(E e1,E e2) throws MergerException {
  if (e1.equals(e2)) {
    return e1;
  }
 else {
    throw new MergerException(String.format("String_Node_Str",e1,e2));
  }
}
Program: 12879
Project: 12879
Buggy source:
public Iterator<Item> findByColor(String cat,Collection<String> features,CIELabColor color,double dist,int minPrice,int maxPrice){
  Vector<Iterator<Item>> iters=new Vector<Iterator<Item>>();
  Collection<ItemFinder> categories;
  if ((cat != "String_Node_Str") && (cat != null)) {
    categories=categoryMap.itemFinders(cat);
  }
 else {
    categories=categoryMap.values();
  }
  for (  ItemFinder f : categories) {
    iters.add(f.findItemsWithFeaturesAndColor(features,color,dist,minPrice,maxPrice));
  }
  return new CombinedIterator(iters);
}

Fixed version (ground truth):
public Iterator<Item> findByColor(String cat,Collection<String> features,CIELabColor color,double dist,int minPrice,int maxPrice){
  if (dist < 0) {
    color=null;
  }
  Vector<Iterator<Item>> iters=new Vector<Iterator<Item>>();
  Collection<ItemFinder> categories;
  if ((cat != "String_Node_Str") && (cat != null)) {
    categories=categoryMap.itemFinders(cat);
  }
 else {
    categories=categoryMap.values();
  }
  for (  ItemFinder f : categories) {
    iters.add(f.findItemsWithFeaturesAndColor(features,color,dist,minPrice,maxPrice));
  }
  return new CombinedIterator(iters);
}
Program: 12880
Project: 12880
Buggy source:
public Iterator<Item> findItemsWithFeatures(Collection<String> features,int minPrice,int maxPrice){
  if (features == null || features.size() == 0)   return items.iterator();
  features=new Vector<String>(features);
  int minSize=Integer.MAX_VALUE;
  ItemFinder bestFinder=this;
  String bestFeature=null;
  for (  String f : features) {
    Feature feature=Feature.getFeature(f);
    ItemFinder finder=featureIndex.get(feature);
    if ((finder != null) && (finder.size() < minSize)) {
      bestFinder=finder;
      minSize=bestFinder.size();
      bestFeature=f;
    }
  }
  if (bestFinder == this) {
    return new FeaturesFilterIterator(items.iterator(),features);
  }
  features.remove(bestFeature);
  return bestFinder.findItemsWithFeatures(features,minPrice,maxPrice);
}

Fixed version (ground truth):
public Iterator<Item> findItemsWithFeatures(Collection<String> features,int minPrice,int maxPrice){
  if (features == null || features.size() == 0)   return items.iterator();
  features=new Vector<String>(features);
  int minSize=Integer.MAX_VALUE;
  ItemFinder bestFinder=this;
  String bestFeature=null;
  for (  String f : features) {
    Feature feature=Feature.getFeature(f);
    ItemFinder finder=featureIndex.get(feature);
    if ((finder != null) && (finder.size() < minSize)) {
      bestFinder=finder;
      minSize=bestFinder.size();
      bestFeature=f;
    }
  }
  if (bestFinder == this) {
    Iterator<Item> iterator=items.iterator();
    if (minPrice > 0 || maxPrice < Integer.MAX_VALUE) {
      iterator=new CostFilterIterator(iterator,minPrice,maxPrice);
    }
    return new FeaturesFilterIterator(iterator,features);
  }
  features.remove(bestFeature);
  return bestFinder.findItemsWithFeatures(features,minPrice,maxPrice);
}
Program: 12881
Project: 12881
Buggy source:
public List<String> find(String category_name,List<String> features,byte red,byte green,byte blue,double colorDist,int cost_min,int cost_max,int page) throws TException {
  Vector<String> result=new Vector<String>(pageSize);
  int count=0;
  Iterator<Item> iter;
  if (colorDist >= 0) {
    iter=index.findByColor(category_name,features,CIELabColor.CIELabFromRGB(red,green,blue),colorDist,cost_min,cost_max);
  }
 else {
    iter=index.find(category_name,features,cost_min,cost_max);
  }
  while (iter.hasNext()) {
    Item item=iter.next();
    if (count >= page * pageSize) {
      result.add(item.id);
    }
    if (count >= (page + 1) * pageSize) {
      break;
    }
    count+=1;
  }
  return result;
}

Fixed version (ground truth):
public List<String> find(String category_name,List<String> features,byte red,byte green,byte blue,double colorDist,int cost_min,int cost_max,int page) throws TException {
  Vector<String> result=new Vector<String>(pageSize);
  int count=0;
  Iterator<Item> iter;
  if (colorDist > 0) {
    iter=index.findByColor(category_name,features,CIELabColor.CIELabFromRGB(red,green,blue),colorDist,cost_min,cost_max);
  }
 else {
    iter=index.find(category_name,features,cost_min,cost_max);
  }
  while (iter.hasNext()) {
    Item item=iter.next();
    if (count >= page * pageSize) {
      result.add(item.id);
    }
    if (count >= (page + 1) * pageSize) {
      break;
    }
    count+=1;
  }
  return result;
}
Program: 12882
Project: 12882
Buggy source:
public static void main(String[] args){
  Vector<Item> items=new Vector<Item>();
  for (int i=0; i < 10; i++) {
    Vector<String> f=new Vector<String>();
    f.add("String_Node_Str");
    if (i % 2 == 0)     f.add("String_Node_Str");
    if (i % 3 == 0)     items.add(new Item("String_Node_Str" + i,"String_Node_Str",f,i,null,0));
    if (i % 3 == 1)     items.add(new Item("String_Node_Str" + i,"String_Node_Str",f,i,null,0));
    if (i % 3 == 2)     items.add(new Item("String_Node_Str" + i,"String_Node_Str",f,i,null,0));
  }
  HoboIndex idx=new HoboIndex(items);
  Vector<String> f=new Vector<String>();
  f.add("String_Node_Str");
  f.add("String_Node_Str");
  for (Iterator<Item> i=idx.find("String_Node_Str",f,0,Integer.MAX_VALUE); i.hasNext(); ) {
    Item item=(Item)i.next();
    System.out.println(item.id + "String_Node_Str" + item.category+ "String_Node_Str"+ item.quality);
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  Vector<Item> items=new Vector<Item>();
  for (int i=0; i < 10; i++) {
    Vector<String> f=new Vector<String>();
    f.add("String_Node_Str");
    if (i % 2 == 0)     f.add("String_Node_Str");
    if (i % 3 == 0)     items.add(new Item("String_Node_Str" + i,"String_Node_Str",f,i,null,i));
    if (i % 3 == 1)     items.add(new Item("String_Node_Str" + i,"String_Node_Str",f,i,null,i));
    if (i % 3 == 2)     items.add(new Item("String_Node_Str" + i,"String_Node_Str",f,i,null,i));
  }
  HoboIndex idx=new HoboIndex(items);
  Vector<String> f=new Vector<String>();
  f.add("String_Node_Str");
  f.add("String_Node_Str");
  for (Iterator<Item> i=idx.find("String_Node_Str",f,0,Integer.MAX_VALUE); i.hasNext(); ) {
    Item item=(Item)i.next();
    System.out.println(item.id + "String_Node_Str" + item.category+ "String_Node_Str"+ item.quality+ "String_Node_Str"+ item.cost);
  }
}
Program: 12883
Project: 12883
Buggy source:
public Iterator<Item> findItemsWithFeatures(Collection<String> features,int minPrice,int maxPrice){
  if (features == null || features.size() == 0)   return items.iterator();
  Iterator<Item> iterator=items.iterator();
  if (minPrice > 0 && maxPrice < Integer.MAX_VALUE) {
    iterator=new CostFilterIterator(iterator,minPrice,maxPrice);
  }
  return new FeaturesFilterIterator(iterator,features);
}

Fixed version (ground truth):
public Iterator<Item> findItemsWithFeatures(Collection<String> features,int minPrice,int maxPrice){
  if (features == null || features.size() == 0)   return items.iterator();
  Iterator<Item> iterator=items.iterator();
  if (minPrice > 0 || maxPrice < Integer.MAX_VALUE) {
    iterator=new CostFilterIterator(iterator,minPrice,maxPrice);
  }
  return new FeaturesFilterIterator(iterator,features);
}
Program: 12884
Project: 12884
Buggy source:
public boolean predicate(Item item){
  return item.cost > min && item.cost <= max;
}

Fixed version (ground truth):
public boolean predicate(Item item){
  return item.cost >= min && item.cost <= max;
}
Program: 12885
Project: 12885
Buggy source:
public void handlePacket(byte[] bytes,int d){
  if (last != null && d != last_demod && Arrays.equals(last,bytes)) {
    dup_count++;
    if (last_demod == 0)     d0_count--;
 else     d6_count--;
    both_count++;
  }
 else {
    packet_count++;
    if (d == 0)     d0_count++;
 else     d6_count++;
    last_demod=d;
    last=Arrays.copyOf(bytes,bytes.length);
    if (h != null)     h.handlePacket(bytes);
  }
}

Fixed version (ground truth):
public void handlePacket(byte[] bytes,int d){
  if (last != null && d != last_demod && java.util.Arrays.equals(last,bytes)) {
    dup_count++;
    if (last_demod == 0)     d0_count--;
 else     d6_count--;
    both_count++;
  }
 else {
    packet_count++;
    if (d == 0)     d0_count++;
 else     d6_count++;
    last_demod=d;
    last=Arrays.copyOf(bytes,bytes.length);
    if (h != null)     h.handlePacket(bytes);
  }
}
Program: 12886
Project: 12886
Buggy source:
public static String[] copyOfRange(String[] src,int from,int to){
  String[] dest=new String[to - from];
  System.arraycopy(src,from,dest,0,to - from);
  return dest;
}

Fixed version (ground truth):
public static String[] copyOfRange(String[] src,int from,int to){
  String[] dest=new String[to - from];
  int len=to - from;
  if (len > src.length)   len=src.length - from;
  System.arraycopy(src,from,dest,0,len);
  return dest;
}
Program: 12887
Project: 12887
Buggy source:
@Override public InputStream getInputStream() throws IOException {
  if (isClosed)   throw new IOException("String_Node_Str");
  if (outputstream != null && outputstream.getBuffer().length != 0) {
    return new BookInputStream(outputstream);
  }
  return new BookInputStream(book,binarymode);
}

Fixed version (ground truth):
@Override public BookInputStream getInputStream() throws IOException {
  if (isClosed)   throw new IOException("String_Node_Str");
  if (outputstream != null && outputstream.getBuffer().length != 0) {
    return new BookInputStream(outputstream);
  }
  return new BookInputStream(book,binarymode);
}
Program: 12888
Project: 12888
Buggy source:
/** 
 * Creates a return address from a ticket
 * @param inv the inventory containing the ticket
 * @return the return address
 */
@SuppressWarnings("String_Node_Str") public final static <T extends Address>T getAddress(Inventory inv){
  int slot;
  if ((slot=Ticket.getTicketslot(inv)) != -1)   return (T)new ReturnAddressBook(new Ticket(BookFile.getFrom(inv,slot,false,ByteCart.myPlugin.getConfig().getString("String_Node_Str")),Conf.NETWORK),Parameter.RETURN);
  return null;
}

Fixed version (ground truth):
/** 
 * Creates a return address from a ticket
 * @param inv the inventory containing the ticket
 * @return the return address
 */
@SuppressWarnings("String_Node_Str") public final static <T extends Address>T getAddress(Inventory inv){
  int slot;
  if ((slot=Ticket.getTicketslot(inv)) != -1)   return (T)new ReturnAddressBook(new Ticket(BookFile.getFrom(inv,slot,false,"String_Node_Str"),Conf.NETWORK),Parameter.RETURN);
  return null;
}
Program: 12889
Project: 12889
Buggy source:
@EventHandler(ignoreCancelled=true) public void onPlayerInteractEntity(PlayerInteractEntityEvent event){
  Entity entity;
  Inventory inv;
  if (event.getPlayer().equals(Player) && ((entity=event.getRightClicked()) instanceof InventoryHolder)) {
    this.Execute.SetParam(inv=((InventoryHolder)entity).getInventory());
    this.Execute.run();
    event.setCancelled(true);
    if (isUpdater) {
      StorageMinecart v=(StorageMinecart)inv.getHolder();
      UpdaterCreateEvent e=new UpdaterCreateEvent(v.getEntityId(),v.getLocation());
      ByteCart.myPlugin.getServer().getPluginManager().callEvent(e);
    }
  }
  PlayerInteractEntityEvent.getHandlerList().unregister(this);
}

Fixed version (ground truth):
@EventHandler(ignoreCancelled=false) public void onPlayerInteractEntity(PlayerInteractEntityEvent event){
  Entity entity;
  Inventory inv;
  if (event.getPlayer().equals(Player) && ((entity=event.getRightClicked()) instanceof InventoryHolder)) {
    this.Execute.SetParam(inv=((InventoryHolder)entity).getInventory());
    this.Execute.run();
    event.setCancelled(true);
    if (isUpdater) {
      StorageMinecart v=(StorageMinecart)inv.getHolder();
      UpdaterCreateEvent e=new UpdaterCreateEvent(v.getEntityId(),v.getLocation());
      ByteCart.myPlugin.getServer().getPluginManager().callEvent(e);
    }
  }
  PlayerInteractEntityEvent.getHandlerList().unregister(this);
}