nus-yam/ex-repair huggingface dataset:
Program: 97025
Project: 97025
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isOfType(AtsArtifactTypes.Task) && !aArtifact.isHistorical() && !presentationType.matches(GENERALIZED_EDIT,PRODUCE_ATTRIBUTE)) {
    return PRESENTATION_SUBTYPE_MATCH;
  }
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isOfType(AtsArtifactTypes.Task) && !aArtifact.isHistorical() && !presentationType.matches(GENERALIZED_EDIT,PRODUCE_ATTRIBUTE)) {
    return PRESENTATION_SUBTYPE_MATCH;
  }
  return NO_MATCH;
}
Program: 97026
Project: 97026
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isOfType(AtsArtifactTypes.RuleDefinition) && presentationType != GENERALIZED_EDIT) {
    return PRESENTATION_SUBTYPE_MATCH;
  }
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isOfType(AtsArtifactTypes.RuleDefinition) && presentationType != GENERALIZED_EDIT) {
    return PRESENTATION_SUBTYPE_MATCH;
  }
  return NO_MATCH;
}
Program: 97027
Project: 97027
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isOfType(AtsArtifactTypes.WorkDefinition) && presentationType != GENERALIZED_EDIT) {
    return PRESENTATION_SUBTYPE_MATCH;
  }
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isOfType(AtsArtifactTypes.WorkDefinition) && presentationType != GENERALIZED_EDIT) {
    return PRESENTATION_SUBTYPE_MATCH;
  }
  return NO_MATCH;
}
Program: 97028
Project: 97028
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isOfType(AtsArtifactTypes.WorkDefinition) && presentationType != GENERALIZED_EDIT) {
    return PRESENTATION_SUBTYPE_MATCH;
  }
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isOfType(AtsArtifactTypes.WorkDefinition) && presentationType != GENERALIZED_EDIT) {
    return PRESENTATION_SUBTYPE_MATCH;
  }
  return NO_MATCH;
}
Program: 97029
Project: 97029
Buggy source:
@Override public void addMenuCommandDefinitions(ArrayList<MenuCmdDef> commands,Artifact artifact){
  commands.add(new MenuCmdDef(CommandGroup.EDIT,SPECIALIZED_EDIT,"String_Node_Str",AtsImage.GLOBE));
}

Fixed version (ground truth):
@Override public void addMenuCommandDefinitions(ArrayList<MenuCmdDef> commands,Artifact artifact){
  commands.add(new MenuCmdDef(CommandGroup.EDIT,SPECIALIZED_EDIT,"String_Node_Str",AtsImage.GLOBE,OPEN_OPTION,Option_WORLD_EDITOR));
}
Program: 97030
Project: 97030
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isHistorical() || presentationType.matches(GENERALIZED_EDIT,PRODUCE_ATTRIBUTE)) {
    return NO_MATCH;
  }
  if (aArtifact.isOfType(AtsArtifactTypes.AtsArtifact)) {
    return PRESENTATION_SUBTYPE_MATCH;
  }
  if (aArtifact.isOfType(CoreArtifactTypes.UniversalGroup)) {
    if (aArtifact.getRelatedArtifactsCount(CoreRelationTypes.Universal_Grouping__Members) == 0) {
      return NO_MATCH;
    }
    for (    Artifact childArt : aArtifact.getRelatedArtifacts(CoreRelationTypes.Universal_Grouping__Members)) {
      if (childArt.isOfType(AtsArtifactTypes.AtsArtifact)) {
        return PRESENTATION_SUBTYPE_MATCH;
      }
    }
  }
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isHistorical() || presentationType.matches(GENERALIZED_EDIT,PRODUCE_ATTRIBUTE)) {
    return NO_MATCH;
  }
  VariableMap options=new VariableMap();
  options.setValues(objects);
  if (aArtifact.isOfType(AtsArtifactTypes.AtsArtifact)) {
    if (Option_WORLD_EDITOR.equals(options.getString(OPEN_OPTION))) {
      return SPECIALIZED_KEY_MATCH;
    }
 else {
      return PRESENTATION_SUBTYPE_MATCH;
    }
  }
  if (aArtifact.isOfType(CoreArtifactTypes.UniversalGroup)) {
    if (aArtifact.getRelatedArtifactsCount(CoreRelationTypes.Universal_Grouping__Members) == 0) {
      return NO_MATCH;
    }
    for (    Artifact childArt : aArtifact.getRelatedArtifacts(CoreRelationTypes.Universal_Grouping__Members)) {
      if (childArt.isOfType(AtsArtifactTypes.AtsArtifact)) {
        return PRESENTATION_SUBTYPE_MATCH;
      }
    }
  }
  return NO_MATCH;
}
Program: 97031
Project: 97031
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (!presentationType.matches(GENERALIZED_EDIT,PRODUCE_ATTRIBUTE) && !aArtifact.isHistorical()) {
    if (aArtifact.isOfType(getArtifactTypeMatches())) {
      return ARTIFACT_TYPE_MATCH;
    }
  }
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (!presentationType.matches(GENERALIZED_EDIT,PRODUCE_ATTRIBUTE) && !aArtifact.isHistorical()) {
    if (aArtifact.isOfType(getArtifactTypeMatches())) {
      return ARTIFACT_TYPE_MATCH;
    }
  }
  return NO_MATCH;
}
Program: 97032
Project: 97032
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  int rating=IRenderer.NO_MATCH;
  if (artifact.getArtifactType().inheritsFrom(CoreArtifactTypes.ModelDiagram)) {
    if (presentationType.matches(RENDER_AS_HUMAN_READABLE_TEXT,PREVIEW,DEFAULT_OPEN,SPECIALIZED_EDIT)) {
      rating=IRenderer.PRESENTATION_SUBTYPE_MATCH;
    }
  }
  return rating;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  int rating=IRenderer.NO_MATCH;
  if (artifact.getArtifactType().inheritsFrom(CoreArtifactTypes.ModelDiagram)) {
    if (presentationType.matches(RENDER_AS_HUMAN_READABLE_TEXT,PREVIEW,DEFAULT_OPEN,SPECIALIZED_EDIT)) {
      rating=IRenderer.PRESENTATION_SUBTYPE_MATCH;
    }
  }
  return rating;
}
Program: 97033
Project: 97033
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  if (presentationType.matches(GENERALIZED_EDIT,GENERAL_REQUESTED,PRODUCE_ATTRIBUTE)) {
    return PRESENTATION_TYPE;
  }
  if (presentationType.matches(SPECIALIZED_EDIT,DEFAULT_OPEN)) {
    return GENERAL_MATCH;
  }
  if (presentationType.matches(PREVIEW,RENDER_AS_HUMAN_READABLE_TEXT)) {
    return BASE_MATCH;
  }
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... options) throws OseeCoreException {
  if (presentationType.matches(GENERALIZED_EDIT,GENERAL_REQUESTED,PRODUCE_ATTRIBUTE)) {
    return PRESENTATION_TYPE;
  }
  if (presentationType.matches(SPECIALIZED_EDIT,DEFAULT_OPEN)) {
    return GENERAL_MATCH;
  }
  if (presentationType.matches(PREVIEW,RENDER_AS_HUMAN_READABLE_TEXT)) {
    return BASE_MATCH;
  }
  return NO_MATCH;
}
Program: 97034
Project: 97034
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  int toReturn=NO_MATCH;
  if (aArtifact.isAttributeTypeValid(CoreAttributeTypes.HTMLContent)) {
    if (presentationType.matches(PresentationType.PREVIEW,PresentationType.DIFF)) {
      toReturn=PRESENTATION_SUBTYPE_MATCH;
    }
  }
  return toReturn;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  int toReturn=NO_MATCH;
  if (aArtifact.isAttributeTypeValid(CoreAttributeTypes.HTMLContent)) {
    if (presentationType.matches(PresentationType.PREVIEW,PresentationType.DIFF)) {
      toReturn=PRESENTATION_SUBTYPE_MATCH;
    }
  }
  return toReturn;
}
Program: 97035
Project: 97035
Buggy source:
public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException ;

Fixed version (ground truth):
public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException ;
Program: 97036
Project: 97036
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  int toReturn=NO_MATCH;
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isOfType(CoreArtifactTypes.TestCase)) {
    if (presentationType.matches(PresentationType.SPECIALIZED_EDIT,PresentationType.DEFAULT_OPEN)) {
      toReturn=PRESENTATION_SUBTYPE_MATCH;
    }
  }
  return toReturn;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  int toReturn=NO_MATCH;
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isOfType(CoreArtifactTypes.TestCase)) {
    if (presentationType.matches(PresentationType.SPECIALIZED_EDIT,PresentationType.DEFAULT_OPEN)) {
      toReturn=PRESENTATION_SUBTYPE_MATCH;
    }
  }
  return toReturn;
}
Program: 97037
Project: 97037
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isAttributeTypeValid(CoreAttributeTypes.NativeContent)) {
    if (presentationType.matches(SPECIALIZED_EDIT,PREVIEW,DEFAULT_OPEN)) {
      return PRESENTATION_SUBTYPE_MATCH;
    }
  }
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isAttributeTypeValid(CoreAttributeTypes.NativeContent)) {
    if (presentationType.matches(SPECIALIZED_EDIT,PREVIEW,DEFAULT_OPEN)) {
      return PRESENTATION_SUBTYPE_MATCH;
    }
  }
  return NO_MATCH;
}
Program: 97038
Project: 97038
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact){
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects){
  return NO_MATCH;
}
Program: 97039
Project: 97039
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isAttributeTypeValid(CoreAttributeTypes.PlainTextContent)) {
    if (presentationType.matches(SPECIALIZED_EDIT,PREVIEW,DEFAULT_OPEN,PRODUCE_ATTRIBUTE,DIFF)) {
      return PRESENTATION_SUBTYPE_MATCH;
    }
  }
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (aArtifact.isAttributeTypeValid(CoreAttributeTypes.PlainTextContent)) {
    if (presentationType.matches(SPECIALIZED_EDIT,PREVIEW,DEFAULT_OPEN,PRODUCE_ATTRIBUTE,DIFF)) {
      return PRESENTATION_SUBTYPE_MATCH;
    }
  }
  return NO_MATCH;
}
Program: 97040
Project: 97040
Buggy source:
private static IRenderer getBestRendererPrototype(PresentationType presentationType,Artifact artifact) throws OseeCoreException {
  if (presentationType == DEFAULT_OPEN && UserManager.getBooleanSetting(UserManager.DOUBLE_CLICK_SETTING_KEY_ART_EDIT)) {
    presentationType=GENERAL_REQUESTED;
  }
  IRenderer bestRendererPrototype=null;
  int bestRating=IRenderer.NO_MATCH;
  ensurePopulated();
  for (  IRenderer renderer : renderers) {
    int rating=renderer.getApplicabilityRating(presentationType,artifact);
    if (rating > bestRating) {
      bestRendererPrototype=renderer;
      bestRating=rating;
    }
  }
  if (bestRendererPrototype == null) {
    throw new OseeStateException("String_Node_Str",presentationType,artifact);
  }
  return bestRendererPrototype;
}

Fixed version (ground truth):
private static IRenderer getBestRendererPrototype(PresentationType presentationType,Artifact artifact,Object... options) throws OseeCoreException {
  if (presentationType == DEFAULT_OPEN && UserManager.getBooleanSetting(UserManager.DOUBLE_CLICK_SETTING_KEY_ART_EDIT)) {
    presentationType=GENERAL_REQUESTED;
  }
  IRenderer bestRendererPrototype=null;
  int bestRating=IRenderer.NO_MATCH;
  ensurePopulated();
  for (  IRenderer renderer : renderers) {
    int rating=renderer.getApplicabilityRating(presentationType,artifact,options);
    if (rating > bestRating) {
      bestRendererPrototype=renderer;
      bestRating=rating;
    }
  }
  if (bestRendererPrototype == null) {
    throw new OseeStateException("String_Node_Str",presentationType,artifact);
  }
  return bestRendererPrototype;
}
Program: 97041
Project: 97041
Buggy source:
public static IRenderer getBestRenderer(PresentationType presentationType,Artifact artifact,Object... options) throws OseeCoreException {
  IRenderer bestRenderer=getBestRendererPrototype(presentationType,artifact).newInstance();
  bestRenderer.setOptions(options);
  return bestRenderer;
}

Fixed version (ground truth):
public static IRenderer getBestRenderer(PresentationType presentationType,Artifact artifact,Object... options) throws OseeCoreException {
  IRenderer bestRenderer=getBestRendererPrototype(presentationType,artifact,options).newInstance();
  bestRenderer.setOptions(options);
  return bestRenderer;
}
Program: 97042
Project: 97042
Buggy source:
public static HashCollection<IRenderer,Artifact> createRenderMap(PresentationType presentationType,Collection<Artifact> artifacts,Object... options) throws OseeCoreException {
  HashCollection<IRenderer,Artifact> prototypeRendererArtifactMap=new HashCollection<IRenderer,Artifact>(false,LinkedList.class);
  for (  Artifact artifact : artifacts) {
    IRenderer renderer=getBestRendererPrototype(presentationType,artifact);
    prototypeRendererArtifactMap.put(renderer,artifact);
  }
  HashCollection<IRenderer,Artifact> rendererArtifactMap=new HashCollection<IRenderer,Artifact>(false,LinkedList.class);
  for (  IRenderer prototypeRenderer : prototypeRendererArtifactMap.keySet()) {
    IRenderer renderer=prototypeRenderer.newInstance();
    renderer.setOptions(options);
    rendererArtifactMap.put(renderer,prototypeRendererArtifactMap.getValues(prototypeRenderer));
  }
  return rendererArtifactMap;
}

Fixed version (ground truth):
public static HashCollection<IRenderer,Artifact> createRenderMap(PresentationType presentationType,Collection<Artifact> artifacts,Object... options) throws OseeCoreException {
  HashCollection<IRenderer,Artifact> prototypeRendererArtifactMap=new HashCollection<IRenderer,Artifact>(false,LinkedList.class);
  for (  Artifact artifact : artifacts) {
    IRenderer renderer=getBestRendererPrototype(presentationType,artifact,options);
    prototypeRendererArtifactMap.put(renderer,artifact);
  }
  HashCollection<IRenderer,Artifact> rendererArtifactMap=new HashCollection<IRenderer,Artifact>(false,LinkedList.class);
  for (  IRenderer prototypeRenderer : prototypeRendererArtifactMap.keySet()) {
    IRenderer renderer=prototypeRenderer.newInstance();
    renderer.setOptions(options);
    rendererArtifactMap.put(renderer,prototypeRendererArtifactMap.getValues(prototypeRenderer));
  }
  return rendererArtifactMap;
}
Program: 97043
Project: 97043
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  if (artifact.getArtifactType().inheritsFrom(CoreArtifactTypes.TestInformationSheet) && presentationType.matches(DEFAULT_OPEN,PREVIEW)) {
    return SPECIALIZED_MATCH;
  }
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  if (artifact.getArtifactType().inheritsFrom(CoreArtifactTypes.TestInformationSheet) && presentationType.matches(DEFAULT_OPEN,PREVIEW)) {
    return SPECIALIZED_MATCH;
  }
  return NO_MATCH;
}
Program: 97044
Project: 97044
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (!presentationType.matches(GENERALIZED_EDIT,GENERAL_REQUESTED,PRODUCE_ATTRIBUTE) && aArtifact.isAttributeTypeValid(ContentUrl)) {
    return SUBTYPE_TYPE_MATCH;
  }
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (!presentationType.matches(GENERALIZED_EDIT,GENERAL_REQUESTED,PRODUCE_ATTRIBUTE) && aArtifact.isAttributeTypeValid(ContentUrl)) {
    return SUBTYPE_TYPE_MATCH;
  }
  return NO_MATCH;
}
Program: 97045
Project: 97045
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (!presentationType.matches(GENERALIZED_EDIT,GENERAL_REQUESTED,PRODUCE_ATTRIBUTE) && aArtifact.isAttributeTypeValid(WholeWordContent)) {
    return PRESENTATION_SUBTYPE_MATCH;
  }
  return NO_MATCH;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  Artifact aArtifact=artifact.getFullArtifact();
  if (!presentationType.matches(GENERALIZED_EDIT,GENERAL_REQUESTED,PRODUCE_ATTRIBUTE) && aArtifact.isAttributeTypeValid(WholeWordContent)) {
    return PRESENTATION_SUBTYPE_MATCH;
  }
  return NO_MATCH;
}
Program: 97046
Project: 97046
Buggy source:
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact) throws OseeCoreException {
  int rating=NO_MATCH;
  Artifact aArtifact=artifact.getFullArtifact();
  if (!presentationType.matches(PresentationType.GENERALIZED_EDIT,PresentationType.GENERAL_REQUESTED)) {
    if (aArtifact.isAttributeTypeValid(CoreAttributeTypes.WordTemplateContent)) {
      rating=PRESENTATION_SUBTYPE_MATCH;
    }
 else     if (presentationType.matches(PresentationType.PREVIEW,PresentationType.DIFF)) {
      rating=BASE_MATCH;
    }
  }
  return rating;
}

Fixed version (ground truth):
@Override public int getApplicabilityRating(PresentationType presentationType,IArtifact artifact,Object... objects) throws OseeCoreException {
  int rating=NO_MATCH;
  Artifact aArtifact=artifact.getFullArtifact();
  if (!presentationType.matches(PresentationType.GENERALIZED_EDIT,PresentationType.GENERAL_REQUESTED)) {
    if (aArtifact.isAttributeTypeValid(CoreAttributeTypes.WordTemplateContent)) {
      rating=PRESENTATION_SUBTYPE_MATCH;
    }
 else     if (presentationType.matches(PresentationType.PREVIEW,PresentationType.DIFF)) {
      rating=BASE_MATCH;
    }
  }
  return rating;
}
Program: 97047
Project: 97047
Buggy source:
@Override public void addMenuCommandDefinitions(ArrayList<MenuCmdDef> commands,Artifact artifact){
  commands.add(new MenuCmdDef(CommandGroup.EDIT,GENERALIZED_EDIT,"String_Node_Str",FrameworkImage.ARTIFACT_EDITOR));
  commands.add(new MenuCmdDef(CommandGroup.EDIT,GENERALIZED_EDIT,"String_Node_Str",FrameworkImage.ARTIFACT_MASS_EDITOR,OPEN_OPTION,OPEN_IN_TABLE_EDITOR));
  commands.add(new MenuCmdDef(CommandGroup.SHOW,GENERALIZED_EDIT,"String_Node_Str",FrameworkImage.ARTIFACT_EXPLORER,OPEN_OPTION,OPEN_IN_EXPLORER));
  commands.add(new MenuCmdDef(CommandGroup.SHOW,GENERALIZED_EDIT,"String_Node_Str",FrameworkImage.DB_ICON_BLUE,OPEN_OPTION,OPEN_IN_HISTORY));
  commands.add(new MenuCmdDef(CommandGroup.SHOW,GENERALIZED_EDIT,"String_Node_Str",FrameworkImage.SKYWALKER,OPEN_OPTION,OPEN_IN_GRAPH));
}

Fixed version (ground truth):
@Override public void addMenuCommandDefinitions(ArrayList<MenuCmdDef> commands,Artifact artifact){
  commands.add(new MenuCmdDef(CommandGroup.SHOW,GENERALIZED_EDIT,"String_Node_Str",FrameworkImage.ARTIFACT_EDITOR));
  commands.add(new MenuCmdDef(CommandGroup.EDIT,GENERALIZED_EDIT,"String_Node_Str",FrameworkImage.ARTIFACT_MASS_EDITOR,OPEN_OPTION,OPEN_IN_TABLE_EDITOR));
  commands.add(new MenuCmdDef(CommandGroup.SHOW,GENERALIZED_EDIT,"String_Node_Str",FrameworkImage.ARTIFACT_EXPLORER,OPEN_OPTION,OPEN_IN_EXPLORER));
  commands.add(new MenuCmdDef(CommandGroup.SHOW,GENERALIZED_EDIT,"String_Node_Str",FrameworkImage.DB_ICON_BLUE,OPEN_OPTION,OPEN_IN_HISTORY));
  commands.add(new MenuCmdDef(CommandGroup.SHOW,GENERALIZED_EDIT,"String_Node_Str",FrameworkImage.SKYWALKER,OPEN_OPTION,OPEN_IN_GRAPH));
}
Program: 97048
Project: 97048
Buggy source:
@Override public void toXml(XMLStreamWriter writer) throws XMLStreamException {
  writer.writeStartElement(getLevel().getName());
  writeLocationCheckLocationLoggingOn(writer);
  writeMessage(writer);
  writer.writeEndElement();
}

Fixed version (ground truth):
@Override public void toXml(XMLStreamWriter writer) throws XMLStreamException {
  writer.writeStartElement("String_Node_Str");
  writer.writeAttribute("String_Node_Str",getLevel().getName());
  writeMessage(writer);
  writeLocationCheckLocationLoggingOn(writer);
  writer.writeEndElement();
}
Program: 97049
Project: 97049
Buggy source:
@Override public void run(){
  ByteBuffer buffer=ByteBuffer.allocate(DATA_SIZE);
  DatagramChannel channel=null;
  try {
    while (run) {
      try {
        channel=DatagramChannel.open();
        channel.socket().setReuseAddress(true);
        channel.socket().bind(address);
        channel.socket().setSoTimeout(UDP_TIMEOUT);
        channel.socket().setReceiveBufferSize(ONE_MEG);
        channel.configureBlocking(true);
        while (run) {
          buffer.clear();
          channel.receive(buffer);
          buffer.flip();
          processBuffer(buffer);
        }
      }
 catch (      BindException ex) {
        if (debugOutput) {
          OseeLog.log(logger,Level.FINEST,ex);
        }
        channel.close();
        Thread.sleep(1000);
      }
    }
  }
 catch (  InterruptedIOException ex) {
    Thread.interrupted();
    if (run && debugOutput) {
      OseeLog.log(logger,Level.WARNING,"String_Node_Str",ex);
    }
  }
catch (  ClosedByInterruptException ie) {
    Thread.interrupted();
    if (run && debugOutput) {
      OseeLog.log(logger,Level.WARNING,"String_Node_Str",ie);
    }
  }
catch (  Throwable t) {
    throw new OTEException(t);
  }
 finally {
    try {
      if (channel != null) {
        channel.close();
      }
    }
 catch (    IOException ex) {
      if (debugOutput) {
        ex.printStackTrace();
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  ByteBuffer buffer=ByteBuffer.allocate(DATA_SIZE);
  DatagramChannel channel=null;
  try {
    while (run) {
      try {
        channel=DatagramChannel.open();
        channel.socket().setReuseAddress(true);
        channel.socket().bind(address);
        channel.socket().setSoTimeout(UDP_TIMEOUT);
        channel.socket().setReceiveBufferSize(ONE_MEG);
        channel.configureBlocking(true);
        while (run) {
          try {
            buffer.clear();
            channel.receive(buffer);
            buffer.flip();
            processBuffer(buffer);
          }
 catch (          Throwable th) {
            th.printStackTrace();
          }
        }
      }
 catch (      BindException ex) {
        if (debugOutput) {
          OseeLog.log(logger,Level.FINEST,ex);
        }
        channel.close();
        Thread.sleep(1000);
      }
    }
  }
 catch (  InterruptedIOException ex) {
    Thread.interrupted();
    if (run && debugOutput) {
      OseeLog.log(logger,Level.WARNING,"String_Node_Str",ex);
    }
  }
catch (  ClosedByInterruptException ie) {
    Thread.interrupted();
    if (run && debugOutput) {
      OseeLog.log(logger,Level.WARNING,"String_Node_Str",ie);
    }
  }
catch (  Throwable t) {
    throw new OTEException(t);
  }
 finally {
    try {
      if (channel != null) {
        channel.close();
      }
    }
 catch (    IOException ex) {
      if (debugOutput) {
        ex.printStackTrace();
      }
    }
  }
}
Program: 97050
Project: 97050
Buggy source:
public boolean isSortByTransaction(){
  CustomizeData generateCustDataFromTable=xHistoryViewer.getXViewer().getCustomizeMgr().generateCustDataFromTable();
  return generateCustDataFromTable.getSortingData().getSortingIds().contains(HistoryXViewerFactory.transaction.getId());
}

Fixed version (ground truth):
public boolean isSortByTransaction(){
  return xHistoryViewer.getXViewer().getCustomizeMgr().getCurrentCustomizeData().getSortingData().getSortingIds().contains(HistoryXViewerFactory.transaction.getId());
}
Program: 97051
Project: 97051
Buggy source:
@GET @Produces(MediaType.TEXT_HTML) public String getAsHtml() throws OseeCoreException {
  IOseeBranch branch=TokenFactory.createBranch(branchUuid,"String_Node_Str");
  QueryFactory factory=OrcsApplication.getOrcsApi().getQueryFactory();
  ResultSet<ArtifactReadable> arts=factory.fromBranch(branch).andGuid(artifactUuid).getResults();
  HtmlWriter writer=new HtmlWriter(uriInfo);
  return writer.toHtml(arts);
}

Fixed version (ground truth):
@GET @Produces(MediaType.TEXT_HTML) public String getAsHtml() throws OseeCoreException {
  IOseeBranch branch=TokenFactory.createBranch(branchUuid,"String_Node_Str");
  QueryFactory factory=OrcsApplication.getOrcsApi().getQueryFactory();
  ResultSet<ArtifactReadable> arts=factory.fromBranch(branch).andUuid(artifactUuid).getResults();
  HtmlWriter writer=new HtmlWriter(uriInfo);
  return writer.toHtml(arts);
}
Program: 97052
Project: 97052
Buggy source:
public ArtifactResource(UriInfo uriInfo,Request request,Long branchUuid,String artifactUuid){
  this.uriInfo=uriInfo;
  this.request=request;
  this.branchUuid=branchUuid;
  this.artifactUuid=artifactUuid;
}

Fixed version (ground truth):
public ArtifactResource(UriInfo uriInfo,Request request,Long branchUuid,Long artifactUuid){
  this.uriInfo=uriInfo;
  this.request=request;
  this.branchUuid=branchUuid;
  this.artifactUuid=artifactUuid;
}
Program: 97053
Project: 97053
Buggy source:
@Path("String_Node_Str") public ArtifactResource getArtifact(@PathParam("String_Node_Str") String artifactUuid){
  return new ArtifactResource(uriInfo,request,branchUuid,artifactUuid);
}

Fixed version (ground truth):
@Path("String_Node_Str") public ArtifactResource getArtifact(@PathParam("String_Node_Str") Long artifactUuid){
  return new ArtifactResource(uriInfo,request,branchUuid,artifactUuid);
}
Program: 97054
Project: 97054
Buggy source:
public AttributeResource(UriInfo uriInfo,Request request,Long branchUuid,String artifactUuid,int attributeId,int transactionId){
  this.uriInfo=uriInfo;
  this.request=request;
  this.branchUuid=branchUuid;
  this.artifactUuid=artifactUuid;
  this.attrId=attributeId;
  this.transactionId=transactionId;
}

Fixed version (ground truth):
public AttributeResource(UriInfo uriInfo,Request request,Long branchUuid,Long artifactUuid,int attributeId,int transactionId){
  this.uriInfo=uriInfo;
  this.request=request;
  this.branchUuid=branchUuid;
  this.artifactUuid=artifactUuid;
  this.attrId=attributeId;
  this.transactionId=transactionId;
}
Program: 97055
Project: 97055
Buggy source:
@GET @Produces(MediaType.TEXT_PLAIN) public String getAsText() throws OseeCoreException {
  IOseeBranch branch=TokenFactory.createBranch(branchUuid,"String_Node_Str");
  QueryFactory factory=OrcsApplication.getOrcsApi().getQueryFactory();
  QueryBuilder queryBuilder=factory.fromBranch(branch).andGuid(artifactUuid);
  if (transactionId > 0) {
    queryBuilder.fromTransaction(transactionId);
  }
  ArtifactReadable exactlyOne=queryBuilder.getResults().getExactlyOne();
  Optional<? extends AttributeReadable<Object>> item=Iterables.tryFind(exactlyOne.getAttributes(),new Predicate<AttributeReadable<Object>>(){
    @Override public boolean apply(    AttributeReadable<Object> attribute){
      return attribute.getLocalId() == attrId;
    }
  }
);
  String toReturn="String_Node_Str";
  if (item.isPresent()) {
    Object value=item.get().getValue();
    if (value != null) {
      toReturn=value.toString();
    }
  }
  return toReturn;
}

Fixed version (ground truth):
@GET @Produces(MediaType.TEXT_PLAIN) public String getAsText() throws OseeCoreException {
  IOseeBranch branch=TokenFactory.createBranch(branchUuid,"String_Node_Str");
  QueryFactory factory=OrcsApplication.getOrcsApi().getQueryFactory();
  QueryBuilder queryBuilder=factory.fromBranch(branch).andUuid(artifactUuid);
  if (transactionId > 0) {
    queryBuilder.fromTransaction(transactionId);
  }
  ArtifactReadable exactlyOne=queryBuilder.getResults().getExactlyOne();
  Optional<? extends AttributeReadable<Object>> item=Iterables.tryFind(exactlyOne.getAttributes(),new Predicate<AttributeReadable<Object>>(){
    @Override public boolean apply(    AttributeReadable<Object> attribute){
      return attribute.getLocalId() == attrId;
    }
  }
);
  String toReturn="String_Node_Str";
  if (item.isPresent()) {
    Object value=item.get().getValue();
    if (value != null) {
      toReturn=value.toString();
    }
  }
  return toReturn;
}
Program: 97056
Project: 97056
Buggy source:
@GET @Produces(MediaType.TEXT_HTML) public String getAllAttributes() throws OseeCoreException {
  IOseeBranch branch=TokenFactory.createBranch(branchUuid,"String_Node_Str");
  QueryFactory factory=OrcsApplication.getOrcsApi().getQueryFactory();
  ArtifactReadable artifact=factory.fromBranch(branch).andGuid(artifactUuid).getResults().getExactlyOne();
  HtmlWriter writer=new HtmlWriter(uriInfo);
  return writer.toHtml(artifact.getAttributes());
}

Fixed version (ground truth):
@GET @Produces(MediaType.TEXT_HTML) public String getAllAttributes() throws OseeCoreException {
  IOseeBranch branch=TokenFactory.createBranch(branchUuid,"String_Node_Str");
  QueryFactory factory=OrcsApplication.getOrcsApi().getQueryFactory();
  ArtifactReadable artifact=factory.fromBranch(branch).andUuid(artifactUuid).getResults().getExactlyOne();
  HtmlWriter writer=new HtmlWriter(uriInfo);
  return writer.toHtml(artifact.getAttributes());
}
Program: 97057
Project: 97057
Buggy source:
public AttributesResource(UriInfo uriInfo,Request request,Long branchUuid,String artifactUuid){
  this.uriInfo=uriInfo;
  this.request=request;
  this.branchUuid=branchUuid;
  this.artifactUuid=artifactUuid;
}

Fixed version (ground truth):
public AttributesResource(UriInfo uriInfo,Request request,Long branchUuid,Long artifactUuid){
  this.uriInfo=uriInfo;
  this.request=request;
  this.branchUuid=branchUuid;
  this.artifactUuid=artifactUuid;
}
Program: 97058
Project: 97058
Buggy source:
public Map<String,Object> toData(TransactionReadable txRecord) throws OseeCoreException {
  Map<String,Object> data=new LinkedHashMap<>();
  data.put("String_Node_Str",txRecord.getLocalId());
  data.put("String_Node_Str",txRecord.getTxType());
  data.put("String_Node_Str",txRecord.getDate());
  data.put("String_Node_Str",txRecord.getComment());
  data.put("String_Node_Str",txRecord.getAuthorId());
  IOseeBranch branch=getBranchFromUuid(txRecord.getBranchId());
  URI uri;
  if (isAtEndOfPath(uriInfo.getPath(),"String_Node_Str")) {
    uri=uriInfo.getAbsolutePathBuilder().path("String_Node_Str").build(branch.getUuid());
  }
 else {
    uri=uriInfo.getAbsolutePathBuilder().path("String_Node_Str").build(branch.getUuid());
  }
  data.put("String_Node_Str",asLink(uri.toASCIIString(),branch.getName()));
  return data;
}

Fixed version (ground truth):
public Map<String,Object> toData(TransactionReadable txRecord) throws OseeCoreException {
  Map<String,Object> data=new LinkedHashMap<>();
  data.put("String_Node_Str",txRecord.getLocalId());
  data.put("String_Node_Str",txRecord.getTxType());
  data.put("String_Node_Str",txRecord.getDate());
  data.put("String_Node_Str",txRecord.getComment());
  data.put("String_Node_Str",txRecord.getAuthorId());
  IOseeBranch branch=getBranchFromUuid(txRecord.getBranchId());
  URI uri;
  if (isAtEndOfPath(uriInfo.getPath(),"String_Node_Str")) {
    uri=uriInfo.getAbsolutePathBuilder().path("String_Node_Str").build(branch.getUuid());
  }
 else {
    uri=uriInfo.getAbsolutePathBuilder().path("String_Node_Str").build(branch.getUuid());
  }
  data.put("String_Node_Str",asLink(uri.getPath(),branch.getName()));
  return data;
}
Program: 97059
Project: 97059
Buggy source:
public static ArtifactTypeSearch getPrimitive(String storageString){
  IArtifactType type=TokenFactory.createArtifactType(Long.parseLong(storageString),"String_Node_Str");
  return new ArtifactTypeSearch(type);
}

Fixed version (ground truth):
public static ArtifactTypeSearch getPrimitive(String storageString){
  ArrayList<IArtifactType> artifactTypes=new ArrayList<>();
  for (  String artifactTypeId : storageString.split("String_Node_Str")) {
    artifactTypes.add(TokenFactory.createArtifactType(Long.parseLong(artifactTypeId),"String_Node_Str"));
  }
  return new ArtifactTypeSearch(artifactTypes);
}
Program: 97060
Project: 97060
Buggy source:
@Override public String getStorageString(){
  return artifactType.getGuid().toString();
}

Fixed version (ground truth):
@Override public String getStorageString(){
  StringBuilder storageString=new StringBuilder();
  for (  IArtifactType a : artifactTypes) {
    storageString.append(a.getGuid().toString());
    storageString.append("String_Node_Str");
  }
  storageString.deleteCharAt(storageString.length() - 1);
  return storageString.toString();
}
Program: 97061
Project: 97061
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + artifactType;
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + artifactTypes.toString();
}
Program: 97062
Project: 97062
Buggy source:
@Override public void addToQuery(QueryBuilderArtifact builder){
  builder.andIsOfType(artifactType);
}

Fixed version (ground truth):
@Override public void addToQuery(QueryBuilderArtifact builder){
  builder.andIsOfType(artifactTypes);
}
Program: 97063
Project: 97063
Buggy source:
public ArtifactTypeSearch(IArtifactType type){
  super();
  this.artifactType=type;
}

Fixed version (ground truth):
public ArtifactTypeSearch(List<IArtifactType> artifactTypes){
  super();
  this.artifactTypes=artifactTypes;
}
Program: 97064
Project: 97064
Buggy source:
@Override public void addFilterTo(FilterTableViewer filterViewer){
  for (  String type : searchTypeList.getList().getSelection()) {
    IArtifactType artType=(IArtifactType)searchTypeList.getData(type);
    ISearchPrimitive primitive=new ArtifactTypeSearch(artType);
    filterViewer.addItem(primitive,getFilterName(),type,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void addFilterTo(FilterTableViewer filterViewer){
  List<?> artifactTypesObj=searchTypeList.getStructuredSelection().toList();
  List<IArtifactType> artifactTypes=Collections.castAll(artifactTypesObj);
  ISearchPrimitive primitive=new ArtifactTypeSearch(artifactTypes);
  filterViewer.addItem(primitive,getFilterName(),artifactTypes.toString(),"String_Node_Str");
}
Program: 97065
Project: 97065
Buggy source:
/** 
 * @param task - if null, returned WorkDefinition will be proposed; else returned will be actual
 */
private IWorkDefinitionMatch getWorkDefinitionForTask(IAtsTeamWorkflow teamWf,IAtsTask task) throws OseeCoreException {
  IWorkDefinitionMatch match=new WorkDefinitionMatch();
  for (  ITeamWorkflowProvider provider : TeamWorkflowProviders.getTeamWorkflowProviders()) {
    String workFlowDefId=provider.getRelatedTaskWorkflowDefinitionId(teamWf);
    if (Strings.isValid(workFlowDefId)) {
      match=getWorkDefinition(workFlowDefId);
      match.addTrace((String.format("String_Node_Str",provider.getClass().getSimpleName(),workFlowDefId)));
      break;
    }
  }
  if (!match.isMatched() && task != null) {
    match=getWorkDefinitionFromArtifactsAttributeValue(task);
  }
  if (!match.isMatched()) {
    IWorkDefinitionMatch match2=getTaskWorkDefinitionFromArtifactsAttributeValue(teamWf);
    if (match2.isMatched()) {
      match2.addTrace(String.format("String_Node_Str",teamWf));
      match=match2;
    }
  }
  if (!match.isMatched()) {
    match=getTaskWorkDefinitionFromArtifactsAttributeValue(teamWf.getTeamDefinition());
  }
  if (!match.isMatched()) {
    match=getWorkDefinition(TaskWorkflowDefinitionId);
    match.addTrace("String_Node_Str");
  }
  return match;
}

Fixed version (ground truth):
/** 
 * @param task - if null, returned WorkDefinition will be proposed; else returned will be actual
 */
private IWorkDefinitionMatch getWorkDefinitionForTask(IAtsTeamWorkflow teamWf,IAtsTask task) throws OseeCoreException {
  IWorkDefinitionMatch match=task == null ? new WorkDefinitionMatch() : getWorkDefinitionFromArtifactsAttributeValue(task);
  if (!match.isMatched() && task != null) {
    for (    ITeamWorkflowProvider provider : TeamWorkflowProviders.getTeamWorkflowProviders()) {
      String workFlowDefId=provider.getRelatedTaskWorkflowDefinitionId(teamWf);
      attributeResolver.getSoleAttributeValue(task.getStoreObject(),AtsAttributeTypes.WorkflowDefinition,null);
      if (Strings.isValid(workFlowDefId)) {
        match=getWorkDefinition(workFlowDefId);
        match.addTrace((String.format("String_Node_Str",provider.getClass().getSimpleName(),workFlowDefId)));
        break;
      }
    }
  }
  if (!match.isMatched()) {
    IWorkDefinitionMatch match2=getTaskWorkDefinitionFromArtifactsAttributeValue(teamWf);
    if (match2.isMatched()) {
      match2.addTrace(String.format("String_Node_Str",teamWf));
      match=match2;
    }
  }
  if (!match.isMatched()) {
    match=getTaskWorkDefinitionFromArtifactsAttributeValue(teamWf.getTeamDefinition());
  }
  if (!match.isMatched()) {
    match=getWorkDefinition(TaskWorkflowDefinitionId);
    match.addTrace("String_Node_Str");
  }
  return match;
}
Program: 97066
Project: 97066
Buggy source:
private void add(Collection<TaskArtifact> newTasks){
  this.taskArts.addAll(newTasks);
  if (Widgets.isAccessible(getTaskXViewer().getControl())) {
    if (getTaskXViewer().getInput() != this.taskArts) {
      getTaskXViewer().setInputXViewer(this.taskArts);
    }
    Displays.ensureInDisplayThread(new Runnable(){
      @Override public void run(){
        taskXViewer.refresh();
      }
    }
);
  }
}

Fixed version (ground truth):
private void add(Collection<TaskArtifact> newTasks){
  this.taskArts.addAll(newTasks);
  if (Widgets.isAccessible(getTaskXViewer().getControl())) {
    if (getTaskXViewer().getInput() != this.taskArts) {
      getTaskXViewer().setInputXViewer(this.taskArts);
    }
    Displays.ensureInDisplayThread(new Runnable(){
      @Override public void run(){
        taskXViewer.refresh(taskXViewer.getInput());
      }
    }
);
  }
}
Program: 97067
Project: 97067
Buggy source:
@POST @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response createInsertionActivity(@PathParam("String_Node_Str") long programUuid,@PathParam("String_Node_Str") long insertionUuid,JaxNewInsertionActivity newActivity) throws Exception {
  ArtifactReadable insertion=atsServer.getArtifactByUuid(insertionUuid);
  if (insertion == null) {
    throw new OseeCoreException("String_Node_Str");
  }
  if (!insertion.isOfType(AtsArtifactTypes.Insertion)) {
    throw new OseeCoreException("String_Node_Str");
  }
  ResultSet<?> results=atsServer.getQuery().andUuid(newActivity.getUuid()).getResults();
  if (results.size() != 0) {
    throw new OseeStateException("String_Node_Str",newActivity.getUuid());
  }
  IAtsInsertionActivity created=atsServer.getConfigItemFactory().createInsertionActivity(insertion,newActivity);
  return getResponse(created);
}

Fixed version (ground truth):
@POST @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response createInsertionActivity(@PathParam("String_Node_Str") long programUuid,@PathParam("String_Node_Str") long insertionUuid,JaxInsertionActivity newActivity) throws Exception {
  ArtifactReadable insertion=atsServer.getArtifactByUuid(insertionUuid);
  if (insertion == null) {
    throw new OseeCoreException("String_Node_Str");
  }
  if (!insertion.isOfType(AtsArtifactTypes.Insertion)) {
    throw new OseeCoreException("String_Node_Str");
  }
  ResultSet<?> results=atsServer.getQuery().andUuid(newActivity.getUuid()).getResults();
  if (results.size() != 0) {
    throw new OseeStateException("String_Node_Str",newActivity.getUuid());
  }
  IAtsInsertionActivity created=atsServer.getConfigItemFactory().createInsertionActivity(insertion,newActivity);
  return getResponse(created);
}
Program: 97068
Project: 97068
Buggy source:
@POST @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response createInsertion(@PathParam("String_Node_Str") long programUuid,JaxNewInsertion newInsertion) throws Exception {
  ArtifactReadable programArt=atsServer.getArtifactByUuid(programUuid);
  if (programArt == null) {
    throw new OseeCoreException("String_Node_Str");
  }
  if (!programArt.isOfType(AtsArtifactTypes.Program)) {
    throw new OseeCoreException("String_Node_Str");
  }
  ResultSet<?> results=atsServer.getQuery().andUuid(newInsertion.getUuid()).getResults();
  if (results.size() != 0) {
    throw new OseeStateException("String_Node_Str",newInsertion.getUuid());
  }
  IAtsInsertion created=atsServer.getConfigItemFactory().createInsertion(programArt,newInsertion);
  return getResponse(created);
}

Fixed version (ground truth):
@POST @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response createInsertion(@PathParam("String_Node_Str") long programUuid,JaxInsertion newInsertion) throws Exception {
  ArtifactReadable programArt=atsServer.getArtifactByUuid(programUuid);
  if (programArt == null) {
    throw new OseeCoreException("String_Node_Str");
  }
  if (!programArt.isOfType(AtsArtifactTypes.Program)) {
    throw new OseeCoreException("String_Node_Str");
  }
  ResultSet<?> results=atsServer.getQuery().andUuid(newInsertion.getUuid()).getResults();
  if (results.size() != 0) {
    throw new OseeStateException("String_Node_Str",newInsertion.getUuid());
  }
  IAtsInsertion created=atsServer.getConfigItemFactory().createInsertion(programArt,newInsertion);
  return getResponse(created);
}
Program: 97069
Project: 97069
Buggy source:
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateInsertion(@PathParam("String_Node_Str") long programUuid,JaxNewInsertion insertion){
  ArtifactReadable insertionArt=atsServer.getArtifactByUuid(insertion.getUuid());
  if (insertionArt == null) {
    throw new OseeCoreException("String_Node_Str");
  }
  if (!insertionArt.isOfType(AtsArtifactTypes.Insertion)) {
    throw new OseeCoreException("String_Node_Str");
  }
  Response response=null;
  if (!insertionArt.getName().equals(insertion.getName())) {
    IAtsConfigObject updated=atsServer.getConfigItemFactory().updateInsertion(insertion);
    response=Response.ok().entity(updated).build();
  }
 else {
    response=Response.notModified().build();
  }
  return response;
}

Fixed version (ground truth):
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateInsertion(@PathParam("String_Node_Str") long programUuid,JaxInsertion insertion){
  ArtifactReadable insertionArt=atsServer.getArtifactByUuid(insertion.getUuid());
  if (insertionArt == null) {
    throw new OseeCoreException("String_Node_Str");
  }
  if (!insertionArt.isOfType(AtsArtifactTypes.Insertion)) {
    throw new OseeCoreException("String_Node_Str");
  }
  Response response=null;
  if (!insertionArt.getName().equals(insertion.getName())) {
    IAtsConfigObject updated=atsServer.getConfigItemFactory().updateInsertion(insertion);
    response=Response.ok().entity(updated).build();
  }
 else {
    response=Response.notModified().build();
  }
  return response;
}
Program: 97070
Project: 97070
Buggy source:
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateInsertionActivity(@PathParam("String_Node_Str") long programUuid,@PathParam("String_Node_Str") long insertionUuid,JaxNewInsertionActivity newActivity) throws Exception {
  ArtifactReadable insertionActivityArt=atsServer.getArtifactByUuid(newActivity.getUuid());
  if (insertionActivityArt == null) {
    throw new OseeCoreException("String_Node_Str");
  }
  if (!insertionActivityArt.isOfType(AtsArtifactTypes.InsertionActivity)) {
    throw new OseeCoreException("String_Node_Str");
  }
  Response response=null;
  if (!insertionActivityArt.getName().equals(newActivity.getName())) {
    IAtsConfigObject updated=atsServer.getConfigItemFactory().updateInsertionActivity(newActivity);
    response=Response.ok().entity(updated).build();
  }
 else {
    response=Response.notModified().build();
  }
  return response;
}

Fixed version (ground truth):
@PUT @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateInsertionActivity(@PathParam("String_Node_Str") long programUuid,@PathParam("String_Node_Str") long insertionUuid,JaxInsertionActivity newActivity) throws Exception {
  ArtifactReadable insertionActivityArt=atsServer.getArtifactByUuid(newActivity.getUuid());
  if (insertionActivityArt == null) {
    throw new OseeCoreException("String_Node_Str");
  }
  if (!insertionActivityArt.isOfType(AtsArtifactTypes.InsertionActivity)) {
    throw new OseeCoreException("String_Node_Str");
  }
  Response response=null;
  if (!insertionActivityArt.getName().equals(newActivity.getName())) {
    IAtsConfigObject updated=atsServer.getConfigItemFactory().updateInsertionActivity(newActivity);
    response=Response.ok().entity(updated).build();
  }
 else {
    response=Response.notModified().build();
  }
  return response;
}
Program: 97071
Project: 97071
Buggy source:
String getAtsId(IAtsAction action);

Fixed version (ground truth):
String getAtsId(IAtsObject atsObject);
Program: 97072
Project: 97072
Buggy source:
public final String toStringWithId(){
  return String.format("String_Node_Str",getSafeName(),getUuid());
}

Fixed version (ground truth):
@Override public final String toStringWithId(){
  return String.format("String_Node_Str",getSafeName(),getUuid());
}
Program: 97074
Project: 97074
Buggy source:
public void cache(IAtsConfigObject configObject){
  configObjects.add(configObject);
  cacheById(configObject.getUuid(),configObject);
}

Fixed version (ground truth):
public void cache(IAtsConfigObject configObject){
  Conditions.checkNotNull(configObject,"String_Node_Str");
  configObjects.add(configObject);
  cacheById(configObject.getUuid(),configObject);
}