nus-yam/ex-repair huggingface dataset:
Program: 40993
Project: 40993
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean handle(TemplatePlanContext templateContext){
  AbstractNodeTemplate nodeTemplate=templateContext.getNodeTemplate();
  if (nodeTemplate == null) {
    return false;
  }
  if (Utils.isSupportedVMNodeType(nodeTemplate.getType().getId())) {
    return true;
  }
  if (Utils.isSupportedInfrastructureNodeType(nodeTemplate.getType().getId())) {
    return true;
  }
  if (Utils.isSupportedCloudProviderNodeType(nodeTemplate.getType().getId())) {
    if (nodeTemplate.getType().getId().equals(Types.openStackLiberty12NodeType) | nodeTemplate.getType().getId().equals(Types.vmWareVsphere55NodeType)) {
      return this.handler.handleWithCloudProviderInterface(templateContext,nodeTemplate);
    }
 else {
      return this.handler.handle(templateContext,nodeTemplate);
    }
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean handle(TemplatePlanContext templateContext){
  AbstractNodeTemplate nodeTemplate=templateContext.getNodeTemplate();
  if (nodeTemplate == null) {
    return false;
  }
  LOG.debug("String_Node_Str" + nodeTemplate.getId() + "String_Node_Str");
  if (Utils.isSupportedCloudProviderNodeType(nodeTemplate.getType().getId())) {
    return true;
  }
  if (Utils.isSupportedVMNodeType(nodeTemplate.getType().getId()) | Utils.isSupportedInfrastructureNodeType(nodeTemplate.getType().getId())) {
    for (    AbstractRelationshipTemplate relation : nodeTemplate.getOutgoingRelations()) {
      if (Utils.isSupportedCloudProviderNodeType(relation.getTarget().getType().getId())) {
        if (relation.getTarget().getType().getId().equals(Types.openStackLiberty12NodeType) | relation.getTarget().getType().getId().equals(Types.vmWareVsphere55NodeType)) {
          return this.handler.handleWithCloudProviderInterface(templateContext,nodeTemplate);
        }
 else {
          return this.handler.handle(templateContext,nodeTemplate);
        }
      }
    }
    return true;
  }
  return false;
}
Program: 40995
Project: 40995
Buggy source:
/** 
 * Search from the given NodeTemplate for an Ubuntu NodeTemplate
 * @param nodeTemplate an AbstractNodeTemplate
 * @return an Ubuntu NodeTemplate, may be null
 */
private AbstractNodeTemplate findUbuntuNode(AbstractNodeTemplate nodeTemplate){
  for (  AbstractRelationshipTemplate relationTemplate : nodeTemplate.getIngoingRelations()) {
    if (org.opentosca.model.tosca.conventions.Utils.isSupportedInfrastructureNodeType(relationTemplate.getSource().getType().getId())) {
      return relationTemplate.getSource();
    }
    for (    AbstractRelationshipTemplate relationTemplate2 : relationTemplate.getSource().getIngoingRelations()) {
      if (org.opentosca.model.tosca.conventions.Utils.isSupportedInfrastructureNodeType(relationTemplate2.getSource().getType().getId())) {
        return relationTemplate2.getSource();
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Search from the given NodeTemplate for an Ubuntu NodeTemplate
 * @param nodeTemplate an AbstractNodeTemplate
 * @return an Ubuntu NodeTemplate, may be null
 */
private AbstractNodeTemplate findUbuntuNode(AbstractNodeTemplate nodeTemplate){
  if (org.opentosca.model.tosca.conventions.Utils.isSupportedInfrastructureNodeType(nodeTemplate.getType().getId())) {
    return nodeTemplate;
  }
  for (  AbstractRelationshipTemplate relationTemplate : nodeTemplate.getIngoingRelations()) {
    if (org.opentosca.model.tosca.conventions.Utils.isSupportedInfrastructureNodeType(relationTemplate.getSource().getType().getId())) {
      return relationTemplate.getSource();
    }
    for (    AbstractRelationshipTemplate relationTemplate2 : relationTemplate.getSource().getIngoingRelations()) {
      if (org.opentosca.model.tosca.conventions.Utils.isSupportedInfrastructureNodeType(relationTemplate2.getSource().getType().getId())) {
        return relationTemplate2.getSource();
      }
    }
  }
  return null;
}
Program: 40996
Project: 40996
Buggy source:
/** 
 * Creates a string representing an ubuntu image id on a cloud provider
 * @param nodeType a QName of an Ubuntu ImplicitImage NodeType
 * @return a String containing an ubuntuImageId, if given QName is notpresenting an Ubuntu image then null
 */
private String createUbuntuImageStringFromNodeType(QName nodeType){
  if (!PluginUtils.isSupportedUbuntuVMNodeType(nodeType)) {
    return null;
  }
  String localName=nodeType.getLocalPart();
  String[] dotSplit=localName.split("String_Node_Str");
  if (dotSplit.length != 2) {
    return null;
  }
  String[] leftDashSplit=dotSplit[0].split("String_Node_Str");
  String[] rightDashSplit=dotSplit[1].split("String_Node_Str");
  if (leftDashSplit.length != 2 && rightDashSplit.length != 2) {
    return null;
  }
  if (!leftDashSplit[0].equals("String_Node_Str")) {
    return null;
  }
  int majorVers;
  try {
    majorVers=Integer.parseInt(leftDashSplit[1]);
  }
 catch (  NumberFormatException e) {
    return null;
  }
  if (!rightDashSplit[1].equals("String_Node_Str")) {
    return null;
  }
  int minorVers;
  try {
    minorVers=Integer.parseInt(rightDashSplit[0]);
  }
 catch (  NumberFormatException e) {
    return null;
  }
  String ubuntuAMIId="String_Node_Str" + majorVers + "String_Node_Str"+ minorVers+ "String_Node_Str";
  return ubuntuAMIId;
}

Fixed version (ground truth):
/** 
 * Creates a string representing an ubuntu image id on a cloud provider
 * @param nodeType a QName of an Ubuntu ImplicitImage NodeType
 * @return a String containing an ubuntuImageId, if given QName is notpresenting an Ubuntu image then null
 */
private String createUbuntuImageStringFromNodeType(QName nodeType){
  if (!PluginUtils.isSupportedUbuntuVMNodeType(nodeType)) {
    return null;
  }
  String localName=nodeType.getLocalPart();
  String[] dotSplit=localName.split("String_Node_Str");
  if (dotSplit.length != 2) {
    return null;
  }
  String[] leftDashSplit=dotSplit[0].split("String_Node_Str");
  String[] rightDashSplit=dotSplit[1].split("String_Node_Str");
  if (leftDashSplit.length != 2 && rightDashSplit.length != 2) {
    return null;
  }
  if (!leftDashSplit[0].equals("String_Node_Str")) {
    return null;
  }
  int majorVers;
  try {
    majorVers=Integer.parseInt(leftDashSplit[1]);
  }
 catch (  NumberFormatException e) {
    return null;
  }
  if (!rightDashSplit[1].equals("String_Node_Str")) {
    return null;
  }
  int minorVers;
  String minorVersString;
  try {
    minorVers=Integer.parseInt(rightDashSplit[0]);
    minorVersString=String.valueOf(minorVers).trim();
    if (minorVersString.length() != 2) {
      minorVersString="String_Node_Str" + minorVersString;
    }
  }
 catch (  NumberFormatException e) {
    return null;
  }
  String ubuntuAMIId="String_Node_Str" + majorVers + "String_Node_Str"+ minorVersString+ "String_Node_Str";
  return ubuntuAMIId;
}
Program: 40997
Project: 40997
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean handle(TemplatePlanContext templateContext){
  AbstractNodeTemplate nodeTemplate=templateContext.getNodeTemplate();
  if (nodeTemplate == null) {
    return false;
  }
  if (PluginUtils.isSupportedVMNodeType(nodeTemplate.getType().getId())) {
    return true;
  }
  if (PluginUtils.isSupportedUbuntuVMNodeType(nodeTemplate.getType().getId())) {
    return true;
  }
  if (PluginUtils.isSupportedCloudProviderNodeType(nodeTemplate.getType().getId())) {
    return this.handler.handle(templateContext,nodeTemplate);
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean handle(TemplatePlanContext templateContext){
  AbstractNodeTemplate nodeTemplate=templateContext.getNodeTemplate();
  if (nodeTemplate == null) {
    return false;
  }
  if (PluginUtils.isSupportedVMNodeType(nodeTemplate.getType().getId())) {
    return true;
  }
  if (PluginUtils.isSupportedUbuntuVMNodeType(nodeTemplate.getType().getId())) {
    return true;
  }
  if (PluginUtils.isSupportedCloudProviderNodeType(nodeTemplate.getType().getId())) {
    if (nodeTemplate.getType().getId().equals(Types.openStackLiberty12NodeType)) {
      return this.handler.handleOpenStackLiberty12WithUbuntu1404(templateContext,nodeTemplate);
    }
 else {
      return this.handler.handle(templateContext,nodeTemplate);
    }
  }
 else {
    return false;
  }
}
Program: 40998
Project: 40998
Buggy source:
/** 
 * Creates a string representing an ubuntu image id on a cloud provider
 * @param nodeType a QName of an Ubuntu ImplicitImage NodeType
 * @return a String containing an ubuntuImageId, if given QName is notpresenting an Ubuntu image then null
 */
private String createUbuntuImageStringFromNodeType(QName nodeType){
  if (!PluginUtils.isSupportedUbuntuVMNodeType(nodeType)) {
    return null;
  }
  String localName=nodeType.getLocalPart();
  String[] dotSplit=localName.split("String_Node_Str");
  if (dotSplit.length != 2) {
    return null;
  }
  String[] leftDashSplit=dotSplit[0].split("String_Node_Str");
  String[] rightDashSplit=dotSplit[1].split("String_Node_Str");
  if (leftDashSplit.length != 2 && rightDashSplit.length != 2) {
    return null;
  }
  if (!leftDashSplit[0].equals("String_Node_Str")) {
    return null;
  }
  int majorVers;
  try {
    majorVers=Integer.parseInt(leftDashSplit[1]);
  }
 catch (  NumberFormatException e) {
    return null;
  }
  if (!rightDashSplit[1].equals("String_Node_Str")) {
    return null;
  }
  int minorVers;
  String minorVersString;
  try {
    minorVers=Integer.parseInt(rightDashSplit[0]);
    minorVersString=String.valueOf(minorVers).trim();
    if (minorVersString.length() != 2) {
      minorVersString="String_Node_Str" + minorVersString;
    }
  }
 catch (  NumberFormatException e) {
    return null;
  }
  String ubuntuAMIId="String_Node_Str" + majorVers + "String_Node_Str"+ minorVersString+ "String_Node_Str";
  return ubuntuAMIId;
}

Fixed version (ground truth):
/** 
 * Creates a string representing an ubuntu image id on a cloud provider
 * @param nodeType a QName of an Ubuntu ImplicitImage NodeType
 * @return a String containing an ubuntuImageId, if given QName is notpresenting an Ubuntu image then null
 */
private String createUbuntuImageStringFromNodeType(QName nodeType){
  if (!PluginUtils.isSupportedUbuntuVMNodeType(nodeType)) {
    return null;
  }
  String localName=nodeType.getLocalPart();
  String[] dotSplit=localName.split("String_Node_Str");
  if (dotSplit.length != 2) {
    return null;
  }
  String[] leftDashSplit=dotSplit[0].split("String_Node_Str");
  String[] rightDashSplit=dotSplit[1].split("String_Node_Str");
  if (leftDashSplit.length != 2 && rightDashSplit.length != 2) {
    return null;
  }
  if (!leftDashSplit[0].equals("String_Node_Str")) {
    return null;
  }
  int majorVers;
  try {
    majorVers=Integer.parseInt(leftDashSplit[1]);
  }
 catch (  NumberFormatException e) {
    return null;
  }
  if (!rightDashSplit[1].equals("String_Node_Str") & !rightDashSplit[1].equals("String_Node_Str")) {
    return null;
  }
  int minorVers;
  String minorVersString;
  try {
    minorVers=Integer.parseInt(rightDashSplit[0]);
    minorVersString=String.valueOf(minorVers).trim();
    if (minorVersString.length() != 2) {
      minorVersString="String_Node_Str" + minorVersString;
    }
  }
 catch (  NumberFormatException e) {
    return null;
  }
  String ubuntuAMIId="String_Node_Str" + majorVers + "String_Node_Str"+ minorVersString+ "String_Node_Str";
  return ubuntuAMIId;
}
Program: 41003
Project: 41003
Buggy source:
/** 
 * Checks whether this Plugin can handle deploying artifacts of the given artfiactType to a given InfrastructureNode of the given infrastructureNodeType
 * @param scriptArtifactType a QName denoting an scriptArtifactType
 * @param infrastructureNodeType a QName denoting an infrastructureNodeType
 * @return a Boolean. True if given pair of QName's denotes a pair whichthis plugin can handle
 */
private boolean isSupportedDeploymentPair(QName artifactType,QName infrastructureNodeType){
  boolean isSupportedInfrastructureNode=false;
  isSupportedInfrastructureNode|=PluginUtils.isSupportedUbuntuVMNodeType(infrastructureNodeType);
  isSupportedInfrastructureNode|=infrastructureNodeType.equals(Utils.externalResourceNodeType);
  if (!isSupportedInfrastructureNode) {
    return false;
  }
  boolean isSupportedArtifactType=false;
  if (this.archiveArtifactType.equals(artifactType)) {
    isSupportedArtifactType|=true;
  }
  if (this.scriptArtifactType.equals(artifactType)) {
    isSupportedArtifactType|=true;
  }
  if (this.warArtifactType.equals(artifactType)) {
    isSupportedArtifactType|=true;
  }
  if (this.bpelArchiveArtifactType.equals(artifactType)) {
    isSupportedArtifactType|=true;
  }
  if (this.sqlArtifactType.equals(artifactType)) {
    isSupportedArtifactType|=true;
  }
  return isSupportedArtifactType;
}

Fixed version (ground truth):
/** 
 * Checks whether this Plugin can handle deploying artifacts of the given artfiactType to a given InfrastructureNode of the given infrastructureNodeType
 * @param scriptArtifactType a QName denoting an scriptArtifactType
 * @param infrastructureNodeType a QName denoting an infrastructureNodeType
 * @param isDA indicates whether this check is on an IA or DA with the given artifactType
 * @return a Boolean. True if given pair of QName's denotes a pair whichthis plugin can handle
 */
private boolean isSupportedDeploymentPair(QName artifactType,QName infrastructureNodeType,boolean isDA){
  if (!isDA && this.warArtifactType.equals(artifactType) && infrastructureNodeType.equals(new QName("String_Node_Str","String_Node_Str"))) {
    return true;
  }
  boolean isSupportedArtifactType=false;
  if (this.archiveArtifactType.equals(artifactType)) {
    isSupportedArtifactType|=true;
  }
  if (this.scriptArtifactType.equals(artifactType)) {
    isSupportedArtifactType|=true;
  }
  if (this.bpelArchiveArtifactType.equals(artifactType)) {
    isSupportedArtifactType|=true;
  }
  if (this.warArtifactType.equals(artifactType)) {
    isSupportedArtifactType|=true;
  }
  if (this.sqlArtifactType.equals(artifactType)) {
    isSupportedArtifactType|=true;
  }
  if (!PluginUtils.isSupportedUbuntuVMNodeType(infrastructureNodeType)) {
    return false;
  }
  return isSupportedArtifactType;
}
Program: 41004
Project: 41004
Buggy source:
@Override public boolean canHandle(AbstractImplementationArtifact ia,AbstractNodeType infrastructureNodeType){
  QName type=ia.getArtifactType();
  PrePhasePlugin.LOG.debug("String_Node_Str" + type.toString() + "String_Node_Str"+ infrastructureNodeType.getId().toString()+ "String_Node_Str");
  return this.isSupportedDeploymentPair(type,infrastructureNodeType.getId());
}

Fixed version (ground truth):
@Override public boolean canHandle(AbstractImplementationArtifact ia,AbstractNodeType infrastructureNodeType){
  QName type=ia.getArtifactType();
  PrePhasePlugin.LOG.debug("String_Node_Str" + type.toString() + "String_Node_Str"+ infrastructureNodeType.getId().toString()+ "String_Node_Str");
  return this.isSupportedDeploymentPair(type,infrastructureNodeType.getId(),false);
}
Program: 41010
Project: 41010
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  DeploymentArtifactImpl other=(DeploymentArtifactImpl)obj;
  if (artifact == null) {
    if (other.artifact != null)     return false;
  }
 else   if (!artifact.equals(other.artifact))   return false;
  if (def == null) {
    if (other.def != null)     return false;
  }
 else   if (!def.equals(other.def))   return false;
  if (!other.getArtifactType().toString().equals(this.getArtifactType().toString())) {
    return false;
  }
  if (!this.getName().equals(other.getName())) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  DeploymentArtifactImpl other=(DeploymentArtifactImpl)obj;
  if (artifact == null) {
    if (other.artifact != null)     return false;
  }
 else   if (!artifact.equals(other.artifact))   return false;
  if (def == null) {
    if (other.def != null)     return false;
  }
 else   if (!def.equals(other.def))   return false;
  if (!other.getArtifactType().equals(this.getArtifactType())) {
    return false;
  }
  if (!this.getName().equals(other.getName())) {
    return false;
  }
  return true;
}
Program: 41011
Project: 41011
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public List<AbstractNodeTypeImplementation> getImplementations(){
  List<AbstractNodeTypeImplementation> impls=new ArrayList<AbstractNodeTypeImplementation>();
  List<AbstractNodeTypeImplementation> foundImpls=this.findNodeTypeImpls(this.definitions);
  for (  AbstractNodeTypeImplementation impl : foundImpls) {
    if (impl == null) {
      NodeTemplateImpl.LOG.debug("String_Node_Str");
    }
    if (impl.getNodeType() == null) {
      NodeTemplateImpl.LOG.debug("String_Node_Str");
    }
    if (this.nodeTemplate == null) {
      NodeTemplateImpl.LOG.debug("String_Node_Str");
    }
    if (this.nodeTemplate.getType() == null) {
      NodeTemplateImpl.LOG.debug("String_Node_Str");
    }
    NodeTemplateImpl.LOG.debug("String_Node_Str" + impl.getName() + "String_Node_Str"+ this.nodeTemplate.getId());
    if (impl.getNodeType().getId().toString().equals(this.nodeTemplate.getType().toString())) {
      NodeTemplateImpl.LOG.debug("String_Node_Str" + this.nodeTemplate.getId() + "String_Node_Str"+ impl.getName());
      impls.add(impl);
    }
  }
  return impls;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public List<AbstractNodeTypeImplementation> getImplementations(){
  List<AbstractNodeTypeImplementation> impls=new ArrayList<AbstractNodeTypeImplementation>();
  List<AbstractNodeTypeImplementation> foundImpls=this.findNodeTypeImpls(this.definitions);
  for (  AbstractNodeTypeImplementation impl : foundImpls) {
    if (impl == null) {
      NodeTemplateImpl.LOG.debug("String_Node_Str");
    }
    if (impl.getNodeType() == null) {
      NodeTemplateImpl.LOG.debug("String_Node_Str");
    }
    if (this.nodeTemplate == null) {
      NodeTemplateImpl.LOG.debug("String_Node_Str");
    }
    if (this.nodeTemplate.getType() == null) {
      NodeTemplateImpl.LOG.debug("String_Node_Str");
    }
    NodeTemplateImpl.LOG.debug("String_Node_Str" + impl.getName() + "String_Node_Str"+ this.nodeTemplate.getId());
    if (impl.getNodeType().getId().equals(this.nodeTemplate.getType())) {
      NodeTemplateImpl.LOG.debug("String_Node_Str" + this.nodeTemplate.getId() + "String_Node_Str"+ impl.getName());
      impls.add(impl);
    }
  }
  return impls;
}
Program: 41012
Project: 41012
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public AbstractNodeType getType(){
  if (this.nodeTemplate == null) {
    NodeTemplateImpl.LOG.debug("String_Node_Str");
  }
  if (this.nodeTemplate.getType() == null) {
    NodeTemplateImpl.LOG.debug("String_Node_Str");
  }
  for (  AbstractNodeType nodeType : this.definitions.getAllNodeTypes()) {
    if (nodeType.getId().toString().equals(this.nodeTemplate.getType().toString())) {
      return nodeType;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public AbstractNodeType getType(){
  if (this.nodeTemplate == null) {
    NodeTemplateImpl.LOG.debug("String_Node_Str");
  }
  if (this.nodeTemplate.getType() == null) {
    NodeTemplateImpl.LOG.debug("String_Node_Str");
  }
  for (  AbstractNodeType nodeType : this.definitions.getAllNodeTypes()) {
    if (nodeType.getId().equals(this.nodeTemplate.getType())) {
      return nodeType;
    }
  }
  return null;
}
Program: 41013
Project: 41013
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public AbstractNodeType getTypeRef(){
  if (this.nodeType.getDerivedFrom() != null) {
    for (    AbstractNodeType nodeType : this.definitions.getAllNodeTypes()) {
      if (nodeType.getId().toString().equals(this.nodeType.getDerivedFrom().getTypeRef().toString())) {
        return nodeType;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public AbstractNodeType getTypeRef(){
  if (this.nodeType.getDerivedFrom() != null) {
    for (    AbstractNodeType nodeType : this.definitions.getAllNodeTypes()) {
      if (nodeType.getId().equals(this.nodeType.getDerivedFrom().getTypeRef())) {
        return nodeType;
      }
    }
  }
  return null;
}
Program: 41014
Project: 41014
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public QName getId(){
  String namespace;
  if ((this.getTargetNamespace() != null) && !this.getTargetNamespace().equals("String_Node_Str")) {
    namespace=this.getTargetNamespace();
  }
 else {
    namespace=this.definitions.getTargetNamespace();
  }
  return new QName("String_Node_Str" + namespace + "String_Node_Str"+ this.getName());
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public QName getId(){
  String namespace;
  if ((this.getTargetNamespace() != null) && !this.getTargetNamespace().equals("String_Node_Str")) {
    namespace=this.getTargetNamespace();
  }
 else {
    namespace=this.definitions.getTargetNamespace();
  }
  return new QName(namespace,this.getName());
}
Program: 41015
Project: 41015
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public AbstractNodeType getNodeType(){
  if (this.nodeTypeImpl.getNodeType() == null) {
    NodeTypeImplementationImpl.LOG.error("String_Node_Str","String_Node_Str" + this.getTargetNamespace() + "String_Node_Str"+ this.getName());
  }
  for (  AbstractNodeType nodeType : this.definitions.getAllNodeTypes()) {
    if (nodeType.getId().toString().equals(this.nodeTypeImpl.getNodeType().toString())) {
      return nodeType;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public AbstractNodeType getNodeType(){
  if (this.nodeTypeImpl.getNodeType() == null) {
    NodeTypeImplementationImpl.LOG.error("String_Node_Str","String_Node_Str" + this.getTargetNamespace() + "String_Node_Str"+ this.getName());
  }
  for (  AbstractNodeType nodeType : this.definitions.getAllNodeTypes()) {
    if (nodeType.getId().equals(this.nodeTypeImpl.getNodeType())) {
      return nodeType;
    }
  }
  return null;
}
Program: 41016
Project: 41016
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public List<AbstractRelationshipTypeImplementation> getImplementations(){
  List<AbstractRelationshipTypeImplementation> impls=new ArrayList<AbstractRelationshipTypeImplementation>();
  for (  AbstractRelationshipTypeImplementation impl : this.findRelationshipTypeImpls(this.definitions)) {
    if (impl.getRelationshipType().getId().equals(this.relationshipTemplate.getType().getLocalPart())) {
      impls.add(impl);
    }
  }
  return impls;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public List<AbstractRelationshipTypeImplementation> getImplementations(){
  List<AbstractRelationshipTypeImplementation> impls=new ArrayList<AbstractRelationshipTypeImplementation>();
  for (  AbstractRelationshipTypeImplementation impl : this.findRelationshipTypeImpls(this.definitions)) {
    if (impl.getRelationshipType().getId().equals(this.relationshipTemplate.getType())) {
      impls.add(impl);
    }
  }
  return impls;
}
Program: 41017
Project: 41017
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public AbstractRelationshipType getReferencedType(){
  if (this.getTypeRef() != null) {
    for (    AbstractRelationshipType relation : this.definitions.getAllRelationshipTypes()) {
      if (relation.getId().toString().equals(this.getTypeRef().toString())) {
        return relation;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public AbstractRelationshipType getReferencedType(){
  if (this.getTypeRef() != null) {
    for (    AbstractRelationshipType relation : this.definitions.getAllRelationshipTypes()) {
      if (relation.getId().equals(this.getTypeRef())) {
        return relation;
      }
    }
  }
  return null;
}
Program: 41018
Project: 41018
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public AbstractRelationshipType getRelationshipType(){
  for (  AbstractRelationshipType relation : this.defs.getAllRelationshipTypes()) {
    if (relation.getId().toString().equals(this.relationshipTypeImpl.getRelationshipType().toString())) {
      return relation;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public AbstractRelationshipType getRelationshipType(){
  for (  AbstractRelationshipType relation : this.defs.getAllRelationshipTypes()) {
    if (relation.getId().equals(this.relationshipTypeImpl.getRelationshipType())) {
      return relation;
    }
  }
  return null;
}
Program: 41019
Project: 41019
Buggy source:
/** 
 * Returns a RelationshipType for the given QName. This method looks trough the whole Definitions space, which means the search looks trough the imported Definitions of this Definitions.
 * @param relationshipTypeId a QName
 * @return an AbstractRelationshipType, if nothing was found null
 */
public AbstractRelationshipType getRelationshipType(QName relationshipTypeId){
  for (  AbstractRelationshipType relationshipType : this.getRelationshipTypes()) {
    if (relationshipType.getId().toString().equals(relationshipTypeId.toString())) {
      return relationshipType;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns a RelationshipType for the given QName. This method looks trough the whole Definitions space, which means the search looks trough the imported Definitions of this Definitions.
 * @param relationshipTypeId a QName
 * @return an AbstractRelationshipType, if nothing was found null
 */
public AbstractRelationshipType getRelationshipType(QName relationshipTypeId){
  for (  AbstractRelationshipType relationshipType : this.getRelationshipTypes()) {
    if (relationshipType.getId().equals(relationshipTypeId)) {
      return relationshipType;
    }
  }
  return null;
}
Program: 41020
Project: 41020
Buggy source:
/** 
 * Returns a NodeType for the given QName, This method looks trough the whole Definitions space, which means the search looks trough the imported Definitions of this Definitions
 * @param nodeTypeId a QName
 * @return an AbstractNodeType, if nothing was found null
 */
public AbstractNodeType getNodeType(QName nodeTypeId){
  for (  AbstractNodeType nodeType : this.getNodeTypes()) {
    if (nodeType.getId().toString().equals(nodeTypeId.toString())) {
      return nodeType;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns a NodeType for the given QName, This method looks trough the whole Definitions space, which means the search looks trough the imported Definitions of this Definitions
 * @param nodeTypeId a QName
 * @return an AbstractNodeType, if nothing was found null
 */
public AbstractNodeType getNodeType(QName nodeTypeId){
  for (  AbstractNodeType nodeType : this.getNodeTypes()) {
    if (nodeType.getId().equals(nodeTypeId)) {
      return nodeType;
    }
  }
  return null;
}
Program: 41021
Project: 41021
Buggy source:
/** 
 * Checks whether the given Node is an ubuntu nodeType that can be handled by the set of plugins used by the PlanBuilder.
 * @param nodeType a QName denoting some nodeType
 * @return a boolean. True if the given nodeType is an ubuntu nodeType
 */
public static boolean isSupportedUbuntuVMNodeType(QName nodeType){
  if (nodeType.toString().equals(Types.ubuntuNodeType.toString())) {
    return true;
  }
  String nodeTypeNS=nodeType.getNamespaceURI();
  String nodeTypeLN=nodeType.getLocalPart();
  if (nodeTypeNS.equals("String_Node_Str") && PluginUtils.isProperUbuntuLocalName(nodeTypeLN)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks whether the given Node is an ubuntu nodeType that can be handled by the set of plugins used by the PlanBuilder.
 * @param nodeType a QName denoting some nodeType
 * @return a boolean. True if the given nodeType is an ubuntu nodeType
 */
public static boolean isSupportedUbuntuVMNodeType(QName nodeType){
  if (nodeType.equals(Types.ubuntuNodeType)) {
    return true;
  }
  String nodeTypeNS=nodeType.getNamespaceURI();
  String nodeTypeLN=nodeType.getLocalPart();
  if (nodeTypeNS.equals("String_Node_Str") && PluginUtils.isProperUbuntuLocalName(nodeTypeLN)) {
    return true;
  }
  return false;
}
Program: 41022
Project: 41022
Buggy source:
/** 
 * Checks whether the given NodeType is a cloud provider nodeType that can be handled by the set of plugins used by the PlanBuilder.
 * @param nodeType a QName denoting some nodeType
 * @return a boolean. True if the given nodeType is a cloud providernodeType
 */
public static boolean isSupportedCloudProviderNodeType(QName nodeType){
  if (nodeType.toString().equals(Types.ec2NodeType.toString()) | nodeType.toString().equals(Types.openStackNodeType.toString())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks whether the given NodeType is a cloud provider nodeType that can be handled by the set of plugins used by the PlanBuilder.
 * @param nodeType a QName denoting some nodeType
 * @return a boolean. True if the given nodeType is a cloud providernodeType
 */
public static boolean isSupportedCloudProviderNodeType(QName nodeType){
  if (nodeType.equals(Types.ec2NodeType) | nodeType.equals(Types.openStackNodeType)) {
    return true;
  }
  return false;
}
Program: 41023
Project: 41023
Buggy source:
/** 
 * Checks whether the given Node is a virtual machine nodeType that can by handled by the set of plugins used by the PlanBuilder
 * @param nodeType a QName denoting some nodeType
 * @return a boolean. True if given nodeType is a virtual machine nodeType
 */
public static boolean isSupportedVMNodeType(QName nodeType){
  if (nodeType.toString().equals(Types.vmNodeType.toString())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks whether the given Node is a virtual machine nodeType that can by handled by the set of plugins used by the PlanBuilder
 * @param nodeType a QName denoting some nodeType
 * @return a boolean. True if given nodeType is a virtual machine nodeType
 */
public static boolean isSupportedVMNodeType(QName nodeType){
  if (nodeType.equals(Types.vmNodeType)) {
    return true;
  }
  return false;
}
Program: 41024
Project: 41024
Buggy source:
private boolean isZipArtifact(AbstractDeploymentArtifact artifact){
  if (artifact.getArtifactType().toString().equals(this.zipArtifactType.toString())) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
private boolean isZipArtifact(AbstractDeploymentArtifact artifact){
  if (artifact.getArtifactType().equals(this.zipArtifactType)) {
    return true;
  }
 else {
    return false;
  }
}
Program: 41025
Project: 41025
Buggy source:
private AbstractArtifactReference fetchPhpAppDA(List<AbstractDeploymentArtifact> das){
  for (  AbstractDeploymentArtifact da : das) {
    if (da.getArtifactType().toString().equals(this.zipArtifactType.toString())) {
      for (      AbstractArtifactReference ref : da.getArtifactRef().getArtifactReferences()) {
        if (ref.getReference().endsWith("String_Node_Str")) {
          return ref;
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private AbstractArtifactReference fetchPhpAppDA(List<AbstractDeploymentArtifact> das){
  for (  AbstractDeploymentArtifact da : das) {
    if (da.getArtifactType().equals(this.zipArtifactType)) {
      for (      AbstractArtifactReference ref : da.getArtifactRef().getArtifactReferences()) {
        if (ref.getReference().endsWith("String_Node_Str")) {
          return ref;
        }
      }
    }
  }
  return null;
}
Program: 41026
Project: 41026
Buggy source:
/** 
 * Checks whether this Plugin can handle deploying artifacts of the given artfiactType to a given InfrastructureNode of the given infrastructureNodeType
 * @param scriptArtifactType a QName denoting an scriptArtifactType
 * @param infrastructureNodeType a QName denoting an infrastructureNodeType
 * @return a Boolean. True if given pair of QName's denotes a pair whichthis plugin can handle
 */
private boolean isSupportedDeploymentPair(QName artifactType,QName infrastructureNodeType){
  if (!PluginUtils.isSupportedUbuntuVMNodeType(infrastructureNodeType)) {
    return false;
  }
  boolean isSupportedArtifactType=false;
  if (this.archiveArtifactType.toString().equals(artifactType.toString())) {
    isSupportedArtifactType|=true;
  }
  if (this.scriptArtifactType.toString().equals(artifactType.toString())) {
    isSupportedArtifactType|=true;
  }
  if (this.warArtifactType.toString().equals(artifactType.toString())) {
    isSupportedArtifactType|=true;
  }
  return isSupportedArtifactType;
}

Fixed version (ground truth):
/** 
 * Checks whether this Plugin can handle deploying artifacts of the given artfiactType to a given InfrastructureNode of the given infrastructureNodeType
 * @param scriptArtifactType a QName denoting an scriptArtifactType
 * @param infrastructureNodeType a QName denoting an infrastructureNodeType
 * @return a Boolean. True if given pair of QName's denotes a pair whichthis plugin can handle
 */
private boolean isSupportedDeploymentPair(QName artifactType,QName infrastructureNodeType){
  if (!PluginUtils.isSupportedUbuntuVMNodeType(infrastructureNodeType)) {
    return false;
  }
  boolean isSupportedArtifactType=false;
  if (this.archiveArtifactType.equals(artifactType)) {
    isSupportedArtifactType|=true;
  }
  if (this.scriptArtifactType.equals(artifactType)) {
    isSupportedArtifactType|=true;
  }
  if (this.warArtifactType.equals(artifactType)) {
    isSupportedArtifactType|=true;
  }
  return isSupportedArtifactType;
}
Program: 41027
Project: 41027
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean canHandle(QName artifactType){
  return artifactType.toString().equals(this.baseTypeScriptArtifact.toString());
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean canHandle(QName artifactType){
  return artifactType.equals(this.baseTypeScriptArtifact);
}
Program: 41028
Project: 41028
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean canHandle(QName artifactType){
  return artifactType.toString().equals(this.openTOSCAWar.toString());
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean canHandle(QName artifactType){
  return artifactType.equals(this.openTOSCAWar);
}
Program: 41029
Project: 41029
Buggy source:
/** 
 * Checks whether the given QName represents a Apache Web Server NodeType compatible with this plugin
 * @param nodeTypeId a QName denoting a TOSCA NodeType
 * @return true iff the given QName is a NodeType this plugin can handle
 */
public static boolean isApacheNodeTypeCompatible(QName nodeTypeId){
  if (nodeTypeId.toString().equals(Plugin.apacheNodeType.toString())) {
    return true;
  }
  if (nodeTypeId.toString().equals(Plugin.apacheNodeTypeTOSCASpecificType.toString())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks whether the given QName represents a Apache Web Server NodeType compatible with this plugin
 * @param nodeTypeId a QName denoting a TOSCA NodeType
 * @return true iff the given QName is a NodeType this plugin can handle
 */
public static boolean isApacheNodeTypeCompatible(QName nodeTypeId){
  if (nodeTypeId.equals(Plugin.apacheNodeType)) {
    return true;
  }
  if (nodeTypeId.equals(Plugin.apacheNodeTypeTOSCASpecificType)) {
    return true;
  }
  return false;
}
Program: 41030
Project: 41030
Buggy source:
public static boolean isSqlScriptArtifact(AbstractDeploymentArtifact da){
  if (da.getArtifactType().toString().equals(Constants.sqlScriptArtifactType.toString())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean isSqlScriptArtifact(AbstractDeploymentArtifact da){
  if (da.getArtifactType().equals(Constants.sqlScriptArtifactType)) {
    return true;
  }
  return false;
}
Program: 41031
Project: 41031
Buggy source:
/** 
 * Checks whether the given QName represents a MySQL Server NodeType understood by this plugin
 * @param nodeTypeId a QName
 * @return true iff the QName represents a MySQL NodeType
 */
public static boolean isCompatibleMySQLServerNodeType(QName nodeTypeId){
  return Plugin.mySqlServerNodeType.toString().equals(nodeTypeId.toString());
}

Fixed version (ground truth):
/** 
 * Checks whether the given QName represents a MySQL Server NodeType understood by this plugin
 * @param nodeTypeId a QName
 * @return true iff the QName represents a MySQL NodeType
 */
public static boolean isCompatibleMySQLServerNodeType(QName nodeTypeId){
  return Plugin.mySqlServerNodeType.equals(nodeTypeId);
}
Program: 41032
Project: 41032
Buggy source:
/** 
 * Checks whether the given QName is accepted as an ApacheWebServer Node
 * @param nodeTypeId a QName
 * @return true iff the QName represents an ApacheWebServer
 */
private boolean isApacheWebServerNodeTypeCompatible(QName nodeTypeId){
  if (nodeTypeId.toString().equals(this.apacheNodeType.toString())) {
    return true;
  }
  if (nodeTypeId.toString().equals(this.apacheNodeTypeTOSCASpecificType.toString())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks whether the given QName is accepted as an ApacheWebServer Node
 * @param nodeTypeId a QName
 * @return true iff the QName represents an ApacheWebServer
 */
private boolean isApacheWebServerNodeTypeCompatible(QName nodeTypeId){
  if (nodeTypeId.equals(this.apacheNodeType)) {
    return true;
  }
  if (nodeTypeId.equals(this.apacheNodeTypeTOSCASpecificType)) {
    return true;
  }
  return false;
}
Program: 41033
Project: 41033
Buggy source:
/** 
 * Checks whether the given QName is accepted as an PhpModule Node
 * @param nodeTypeId a QName
 * @return true iff the QName represents an PhpModule
 */
private boolean isPhpModuleNodeTypeCompatible(QName nodeTypeId){
  if (nodeTypeId.toString().equals(this.phpModule.toString())) {
    return true;
  }
  if (nodeTypeId.toString().equals(this.phpModuleTOSCASpecificType.toString())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks whether the given QName is accepted as an PhpModule Node
 * @param nodeTypeId a QName
 * @return true iff the QName represents an PhpModule
 */
private boolean isPhpModuleNodeTypeCompatible(QName nodeTypeId){
  if (nodeTypeId.equals(this.phpModule)) {
    return true;
  }
  if (nodeTypeId.equals(this.phpModuleTOSCASpecificType)) {
    return true;
  }
  return false;
}
Program: 41034
Project: 41034
Buggy source:
private boolean isCompatiblePhpAppNodeType(AbstractNodeType nodeType){
  if (nodeType.getId().toString().equals(this.phpApp.toString())) {
    return true;
  }
  if (nodeType.getId().toString().equals(this.phpAppNodeTypePlanBuilder.toString())) {
    return true;
  }
  QName test=nodeType.getId();
  List<QName> typesInHierarchy=Utils.getNodeTypeHierarchy(nodeType);
  for (  QName hierarchyType : typesInHierarchy) {
    if (hierarchyType.toString().equals(this.phpApp.toString()) | hierarchyType.toString().equals(this.phpAppNodeTypePlanBuilder.toString())) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean isCompatiblePhpAppNodeType(AbstractNodeType nodeType){
  if (nodeType.getId().equals(this.phpApp)) {
    return true;
  }
  if (nodeType.getId().equals(this.phpAppNodeTypePlanBuilder)) {
    return true;
  }
  QName test=nodeType.getId();
  List<QName> typesInHierarchy=Utils.getNodeTypeHierarchy(nodeType);
  for (  QName hierarchyType : typesInHierarchy) {
    if (hierarchyType.equals(this.phpApp) | hierarchyType.equals(this.phpAppNodeTypePlanBuilder)) {
      return true;
    }
  }
  return false;
}
Program: 41035
Project: 41035
Buggy source:
private boolean hasZipArtfiactReference(AbstractDeploymentArtifact da){
  if (da.getArtifactType().toString().equals(this.zipArtifactType.toString())) {
    for (    AbstractArtifactReference ref : da.getArtifactRef().getArtifactReferences()) {
      if (ref.getReference().endsWith("String_Node_Str")) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean hasZipArtfiactReference(AbstractDeploymentArtifact da){
  if (da.getArtifactType().equals(this.zipArtifactType)) {
    for (    AbstractArtifactReference ref : da.getArtifactRef().getArtifactReferences()) {
      if (ref.getReference().endsWith("String_Node_Str")) {
        return true;
      }
    }
  }
  return false;
}
Program: 41036
Project: 41036
Buggy source:
private boolean isCompatiblePhpModuleNodeType(QName nodeTypeId){
  if (nodeTypeId.toString().equals(this.phpModule.toString())) {
    return true;
  }
  if (nodeTypeId.toString().equals(this.phpModuleNodeTypeTOSCASpecificType.toString())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean isCompatiblePhpModuleNodeType(QName nodeTypeId){
  if (nodeTypeId.equals(this.phpModule)) {
    return true;
  }
  if (nodeTypeId.equals(this.phpModuleNodeTypeTOSCASpecificType)) {
    return true;
  }
  return false;
}
Program: 41037
Project: 41037
Buggy source:
private boolean isCompatibleApacheWebServerNodeType(QName nodeTypeId){
  if (nodeTypeId.toString().equals(this.apacheWebServer.toString())) {
    return true;
  }
  if (nodeTypeId.toString().equals(this.apacheWebServerNodeTypeTOSCASpecificType.toString())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean isCompatibleApacheWebServerNodeType(QName nodeTypeId){
  if (nodeTypeId.equals(this.apacheWebServer)) {
    return true;
  }
  if (nodeTypeId.equals(this.apacheWebServerNodeTypeTOSCASpecificType)) {
    return true;
  }
  return false;
}
Program: 41038
Project: 41038
Buggy source:
private boolean isZipArtifact(AbstractDeploymentArtifact artifact){
  if (artifact.getArtifactType().toString().equals(this.zipArtifactType.toString())) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
private boolean isZipArtifact(AbstractDeploymentArtifact artifact){
  if (artifact.getArtifactType().equals(this.zipArtifactType)) {
    return true;
  }
 else {
    return false;
  }
}
Program: 41039
Project: 41039
Buggy source:
private boolean isZipArtifact(AbstractDeploymentArtifact artifact){
  if (artifact.getArtifactType().toString().equals(this.zipArtifactType.toString())) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
private boolean isZipArtifact(AbstractDeploymentArtifact artifact){
  if (artifact.getArtifactType().equals(this.zipArtifactType)) {
    return true;
  }
 else {
    return false;
  }
}
Program: 41040
Project: 41040
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public QName getId(){
  String namespace;
  if ((this.getTargetNamespace() != null) && !this.getTargetNamespace().equals("String_Node_Str")) {
    namespace=this.getTargetNamespace();
  }
 else {
    namespace=this.definitions.getTargetNamespace();
  }
  QName id=new QName("String_Node_Str" + namespace + "String_Node_Str"+ this.relationshipType.getName());
  return id;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public QName getId(){
  String namespace;
  if ((this.getTargetNamespace() != null) && !this.getTargetNamespace().equals("String_Node_Str")) {
    namespace=this.getTargetNamespace();
  }
 else {
    namespace=this.definitions.getTargetNamespace();
  }
  QName id=new QName(namespace,this.relationshipType.getName());
  return id;
}
Program: 41041
Project: 41041
Buggy source:
public void _endpoint_show_wsdl(CommandInterpreter commandInterpreter){
  this.em.getTransaction().begin();
  Query query=this.em.createQuery("String_Node_Str");
  @SuppressWarnings("String_Node_Str") List<WSDLEndpoint> queryResults=query.getResultList();
  for (  WSDLEndpoint e : queryResults) {
    commandInterpreter.println("String_Node_Str" + e.getCSARId());
    commandInterpreter.println("String_Node_Str" + e.getPortType().toString());
    commandInterpreter.println("String_Node_Str" + (e.getPlanId() == null ? "String_Node_Str" : e.getPlanId().toString()));
    commandInterpreter.println("String_Node_Str" + (e.getNodeTypeImplementation() == null ? "String_Node_Str" : e.getNodeTypeImplementation().toString()));
    commandInterpreter.println("String_Node_Str" + (e.getIaName() == null ? "String_Node_Str" : e.getIaName()));
    commandInterpreter.println("String_Node_Str" + e.getURI().toString());
    commandInterpreter.println("String_Node_Str");
  }
  this.em.getTransaction().commit();
}

Fixed version (ground truth):
public void _endpoint_show_wsdl(CommandInterpreter commandInterpreter){
  this.em.getTransaction().begin();
  Query query=this.em.createQuery("String_Node_Str");
  @SuppressWarnings("String_Node_Str") List<WSDLEndpoint> queryResults=query.getResultList();
  for (  WSDLEndpoint e : queryResults) {
    commandInterpreter.println("String_Node_Str" + e.getCSARId());
    if (e.getPortType() != null) {
      commandInterpreter.println("String_Node_Str" + e.getPortType().toString());
    }
    commandInterpreter.println("String_Node_Str" + (e.getPlanId() == null ? "String_Node_Str" : e.getPlanId().toString()));
    commandInterpreter.println("String_Node_Str" + (e.getNodeTypeImplementation() == null ? "String_Node_Str" : e.getNodeTypeImplementation().toString()));
    commandInterpreter.println("String_Node_Str" + (e.getIaName() == null ? "String_Node_Str" : e.getIaName()));
    commandInterpreter.println("String_Node_Str" + e.getURI().toString());
    commandInterpreter.println("String_Node_Str");
  }
  this.em.getTransaction().commit();
}
Program: 41042
Project: 41042
Buggy source:
/** 
 * Checks whether the given Node is a virtual machine nodeType that can by handled by the set of plugins used by the PlanBuilder
 * @param nodeType a QName denoting some nodeType
 * @return a boolean. True if given nodeType is a virtual machine nodeType
 */
public static boolean isSupportedVMNodeType(QName nodeType){
  if (nodeType.toString().equals(Types.vmNodeType)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks whether the given Node is a virtual machine nodeType that can by handled by the set of plugins used by the PlanBuilder
 * @param nodeType a QName denoting some nodeType
 * @return a boolean. True if given nodeType is a virtual machine nodeType
 */
public static boolean isSupportedVMNodeType(QName nodeType){
  if (nodeType.toString().equals(Types.vmNodeType.toString())) {
    return true;
  }
  return false;
}
Program: 41043
Project: 41043
Buggy source:
/** 
 * Generates BuildPlans for ServiceTemplates which don't have a BuildPlan defined inside the given Definitions document
 * @param defs an AbstractDefinitions
 * @param csarName the FileName of the CSAR the given Definitions iscontained in
 * @return a List of BuildPlans
 */
protected List<BuildPlan> buildPlans(AbstractDefinitions defs,String csarName){
  PlanBuilder planBuilder=new PlanBuilder();
  return planBuilder.buildPlans(csarName,defs);
}

Fixed version (ground truth):
/** 
 * Generates BuildPlans for ServiceTemplates, which haven't a BuildPlan defined, inside the given Definitions document
 * @param defs an AbstractDefinitions
 * @param csarName the FileName of the CSAR the given Definitions iscontained in
 * @return a List of BuildPlans
 */
public List<BuildPlan> buildPlans(AbstractDefinitions defs,String csarName){
  PlanBuilder planBuilder=new PlanBuilder();
  return planBuilder.buildPlans(csarName,defs);
}