Program: 9690
Project: 9690
Buggy source:
private void internalBuild(CompilationUnitDeclaration unit,StructureModel structureModel){
  currCompilationResult=unit.compilationResult();
  File file=new File(new String(unit.getFileName()));
  ISourceLocation sourceLocation=new SourceLocation(file,1);
  ProgramElementNode cuNode=new ProgramElementNode(new String(file.getName()),ProgramElementNode.Kind.FILE_JAVA,sourceLocation,0,"String_Node_Str",new ArrayList());
  ImportReference currentPackage=unit.currentPackage;
  if (currentPackage != null) {
    StringBuffer nameBuffer=new StringBuffer();
    for (int i=0; i < currentPackage.getImportName().length; i++) {
      nameBuffer.append(new String(currentPackage.getImportName()[i]));
      if (i < currentPackage.getImportName().length - 1)       nameBuffer.append('.');
    }
    String pkgName=nameBuffer.toString();
    boolean found=false;
    ProgramElementNode pkgNode=null;
    for (Iterator it=StructureModelManager.INSTANCE.getStructureModel().getRoot().getChildren().iterator(); it.hasNext(); ) {
      ProgramElementNode currNode=(ProgramElementNode)it.next();
      if (currNode.getName().equals(pkgName))       pkgNode=currNode;
    }
    if (pkgNode == null) {
      pkgNode=new ProgramElementNode(pkgName,ProgramElementNode.Kind.PACKAGE,new ArrayList());
      StructureModelManager.INSTANCE.getStructureModel().getRoot().addChild(pkgNode);
    }
    pkgNode.addChild(cuNode);
  }
 else {
    StructureModelManager.INSTANCE.getStructureModel().getRoot().addChild(cuNode);
  }
  stack.push(cuNode);
  unit.traverse(this,unit.scope);
  StructureModelManager.INSTANCE.getStructureModel().getFileMap().put(file.getAbsolutePath().replace('\\','/'),cuNode);
}

Fixed version (ground truth):
private void internalBuild(CompilationUnitDeclaration unit,StructureModel structureModel){
  currCompilationResult=unit.compilationResult();
  File file=new File(new String(unit.getFileName()));
  ISourceLocation sourceLocation=new SourceLocation(file,1);
  ProgramElementNode cuNode=new ProgramElementNode(new String(file.getName()),ProgramElementNode.Kind.FILE_JAVA,sourceLocation,0,"String_Node_Str",new ArrayList());
  ImportReference currentPackage=unit.currentPackage;
  if (currentPackage != null) {
    StringBuffer nameBuffer=new StringBuffer();
    for (int i=0; i < currentPackage.getImportName().length; i++) {
      nameBuffer.append(new String(currentPackage.getImportName()[i]));
      if (i < currentPackage.getImportName().length - 1)       nameBuffer.append('.');
    }
    String pkgName=nameBuffer.toString();
    boolean found=false;
    ProgramElementNode pkgNode=null;
    for (Iterator it=StructureModelManager.INSTANCE.getStructureModel().getRoot().getChildren().iterator(); it.hasNext(); ) {
      ProgramElementNode currNode=(ProgramElementNode)it.next();
      if (currNode.getName().equals(pkgName))       pkgNode=currNode;
    }
    if (pkgNode == null) {
      pkgNode=new ProgramElementNode(pkgName,ProgramElementNode.Kind.PACKAGE,new ArrayList());
      StructureModelManager.INSTANCE.getStructureModel().getRoot().addChild(pkgNode);
    }
    pkgNode.addChild(cuNode);
  }
 else {
    StructureModelManager.INSTANCE.getStructureModel().getRoot().addChild(cuNode);
  }
  stack.push(cuNode);
  unit.traverse(this,unit.scope);
  try {
    StructureModelManager.INSTANCE.getStructureModel().getFileMap().put(file.getCanonicalPath(),cuNode);
  }
 catch (  IOException ioe) {
  }
}