Program: 120777
Project: 120777
Buggy source:
public String generateComponentCodeWithRows(String nodeName,IAloneProcessNodeConfigurer nodeConfigurer){
  StringBuffer componentsCode=new StringBuffer();
  if (process == null) {
    throw new NullPointerException();
  }
 else {
    INode nodeToConfigure=extractNodeFromProcess(nodeName);
    if (nodeToConfigure != null) {
      if (nodeConfigurer != null) {
        nodeConfigurer.configure(nodeToConfigure);
      }
      Vector headerArgument=new Vector(2);
      headerArgument.add(process);
      headerArgument.add(VersionUtils.getVersion());
      headerArgument.add("String_Node_Str");
      this.checkingSyntax=true;
      try {
        componentsCode.append(generateTypedComponentCode(EInternalTemplate.HEADER,headerArgument));
        componentsCode.append(generateTypedComponentCode(EInternalTemplate.HEADER_ADDITIONAL,headerArgument));
        for (        NodesSubTree subTree : processTree.getSubTrees()) {
          INode subTreeNode=subTree.getNode(nodeName);
          componentsCode.append(generateTypedComponentCode(EInternalTemplate.SUBPROCESS_HEADER,subTree));
          if (subTreeNode != null) {
            if (!subTree.isMergeSubTree()) {
              componentsCode.append(generateComponentsCode(subTree,subTree.getRootNode(),ECodePart.BEGIN,null));
              componentsCode.append(generateComponentsCode(subTree,subTree.getRootNode(),ECodePart.MAIN,null));
              componentsCode.append(generateTypedComponentCode(EInternalTemplate.PART_ENDMAIN,subTree.getRootNode()));
              componentsCode.append(generateComponentsCode(subTree,subTree.getRootNode(),ECodePart.END,null));
            }
 else {
              componentsCode.append(generateComponentsCode(subTree,subTree.getMergeNode(),ECodePart.BEGIN,null));
              List<INode> sortedMergeBranchStarts=subTree.getSortedMergeBranchStarts();
              for (              INode startNode : sortedMergeBranchStarts) {
                componentsCode.append(generateComponentsCode(subTree,startNode,ECodePart.BEGIN,null));
                componentsCode.append(generateComponentsCode(subTree,startNode,ECodePart.MAIN,null));
                componentsCode.append(generateComponentsCode(subTree,startNode,ECodePart.END,null));
              }
              componentsCode.append(generateTypedComponentCode(EInternalTemplate.PART_ENDMAIN,subTree.getRootNode()));
              componentsCode.append(generateComponentsCode(subTree,subTree.getMergeNode(),ECodePart.END,null));
            }
          }
          componentsCode.append(generateTypedComponentCode(EInternalTemplate.SUBPROCESS_FOOTER,subTree));
        }
        Vector footerArgument=new Vector(2);
        footerArgument.add(process);
        footerArgument.add(processTree.getRootNodes());
        componentsCode.append(generateTypedComponentCode(EInternalTemplate.FOOTER,footerArgument));
        componentsCode.append(generateTypedComponentCode(EInternalTemplate.PROCESSINFO,componentsCode.length()));
      }
 catch (      CodeGeneratorException ce) {
        ExceptionHandler.process(ce);
        componentsCode=new StringBuffer();
      }
    }
 else {
      throw new TypeNotPresentException(Messages.getString("String_Node_Str"),null);
    }
  }
  return componentsCode.toString();
}

Fixed version (ground truth):
@Override public String generateComponentCodeWithRows(String nodeName,IAloneProcessNodeConfigurer nodeConfigurer){
  StringBuffer componentsCode=new StringBuffer();
  if (process == null) {
    throw new NullPointerException();
  }
 else {
    INode nodeToConfigure=extractNodeFromProcess(nodeName);
    if (nodeToConfigure != null) {
      if (nodeConfigurer != null) {
        nodeConfigurer.configure(nodeToConfigure);
      }
      Vector headerArgument=new Vector(2);
      headerArgument.add(process);
      headerArgument.add(VersionUtils.getVersion());
      headerArgument.add("String_Node_Str");
      this.checkingSyntax=true;
      try {
        componentsCode.append(generateTypedComponentCode(EInternalTemplate.HEADER,headerArgument));
        componentsCode.append(generateTypedComponentCode(EInternalTemplate.HEADER_ADDITIONAL,headerArgument));
        for (        NodesSubTree subTree : processTree.getSubTrees()) {
          INode subTreeNode=subTree.getNode(nodeName);
          componentsCode.append(generateTypedComponentCode(EInternalTemplate.SUBPROCESS_HEADER,subTree));
          if (subTreeNode != null) {
            if (!subTree.isMergeSubTree()) {
              componentsCode.append(generateComponentsCode(subTree,subTree.getRootNode(),ECodePart.BEGIN,null));
              componentsCode.append(generateComponentsCode(subTree,subTree.getRootNode(),ECodePart.MAIN,null));
              componentsCode.append(generateTypedComponentCode(EInternalTemplate.PART_ENDMAIN,subTree.getRootNode()));
              componentsCode.append(generateComponentsCode(subTree,subTree.getRootNode(),ECodePart.END,null));
            }
 else {
              componentsCode.append(generateComponentsCode(subTree,subTree.getMergeNode(),ECodePart.BEGIN,null));
              List<INode> sortedMergeBranchStarts=subTree.getSortedMergeBranchStarts();
              for (              INode startNode : sortedMergeBranchStarts) {
                componentsCode.append(generateComponentsCode(subTree,startNode,ECodePart.BEGIN,null));
                componentsCode.append(generateComponentsCode(subTree,startNode,ECodePart.MAIN,null));
                componentsCode.append(generateComponentsCode(subTree,startNode,ECodePart.END,null));
              }
              componentsCode.append(generateTypedComponentCode(EInternalTemplate.PART_ENDMAIN,subTree.getRootNode()));
              componentsCode.append(generateComponentsCode(subTree,subTree.getMergeNode(),ECodePart.END,null));
            }
          }
          componentsCode.append(generateTypedComponentCode(EInternalTemplate.SUBPROCESS_FOOTER,subTree));
        }
        Vector footerArgument=new Vector(2);
        footerArgument.add(process);
        footerArgument.add(processTree.getRootNodes());
        componentsCode.append(generateTypedComponentCode(EInternalTemplate.FOOTER,footerArgument));
        componentsCode.append(generateTypedComponentCode(EInternalTemplate.PROCESSINFO,componentsCode.length()));
      }
 catch (      CodeGeneratorException ce) {
        ExceptionHandler.process(ce);
        componentsCode=new StringBuffer();
      }
    }
 else {
      throw new TypeNotPresentException(Messages.getString("String_Node_Str"),null);
    }
  }
  return componentsCode.toString();
}