nus-yam/ex-repair huggingface dataset:
Program: 9167
Project: 9167
Buggy source:
protected void setUp() throws Exception {
  super.setUp();
  initialiseProject("String_Node_Str");
  handler=(TestMessageHandler)getCompiler().getMessageHandler();
  compilerConfig=(TestCompilerConfiguration)getCompiler().getCompilerConfiguration();
  compilerConfig.setProjectSourceFiles(getSourceFileList(files));
  doBuild();
  manager=AsmManager.getDefault();
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  super.setUp();
  initialiseProject("String_Node_Str");
  compilerConfig=(TestCompilerConfiguration)getCompiler().getCompilerConfiguration();
  compilerConfig.setProjectSourceFiles(getSourceFileList(files));
  doBuild();
  manager=AsmManager.getDefault();
}
Program: 9168
Project: 9168
Buggy source:
public void testRootForSourceFile() throws IOException {
  File testFile=openFile("String_Node_Str" + File.separator + "String_Node_Str");
  IProgramElement node=manager.getHierarchy().findElementForSourceFile(testFile.getAbsolutePath());
  assertTrue("String_Node_Str",node != null);
  IProgramElement pNode=(IProgramElement)node;
  String child=((IProgramElement)pNode.getChildren().get(1)).getName();
  assertTrue("String_Node_Str" + child,child.equals("String_Node_Str"));
}

Fixed version (ground truth):
public void testRootForSourceFile() throws IOException {
  File testFile=openFile("String_Node_Str" + File.separator + "String_Node_Str");
  IProgramElement node=manager.getHierarchy().findElementForSourceFile(testFile.getAbsolutePath());
  assertTrue("String_Node_Str",node != null);
  String child=((IProgramElement)node.getChildren().get(1)).getName();
  assertTrue("String_Node_Str" + child,child.equals("String_Node_Str"));
}
Program: 9169
Project: 9169
Buggy source:
protected void tearDown() throws Exception {
  super.tearDown();
  handler=null;
  compilerConfig=null;
  manager=null;
}

Fixed version (ground truth):
protected void tearDown() throws Exception {
  super.tearDown();
  compilerConfig=null;
  manager=null;
}
Program: 9171
Project: 9171
Buggy source:
protected void doStartSuite(File suite){
  super.doStartSuite(suite);
  this.suite=suite;
  numTests=0;
  numFails=0;
  junitOutput=new StringBuffer();
}

Fixed version (ground truth):
protected void doStartSuite(File suite){
  super.doStartSuite(suite);
  numTests=0;
  numFails=0;
  junitOutput=new StringBuffer();
}
Program: 9172
Project: 9172
Buggy source:
private SpecTests(AjctestsAdapter ajctestsAdapter,AjcTest.Spec[] tests){
  mAjctestsAdapter=ajctestsAdapter;
  Map map=new HashMap();
  for (int i=0; i < tests.length; i++) {
    map.put(tests[i].getDescription(),tests[i]);
  }
  ;
  mDescriptionToAjcTestSpec=Collections.unmodifiableMap(map);
}

Fixed version (ground truth):
private SpecTests(AjctestsAdapter ajctestsAdapter,AjcTest.Spec[] tests){
  mAjctestsAdapter=ajctestsAdapter;
  Map map=new HashMap();
  for (int i=0; i < tests.length; i++) {
    map.put(tests[i].getDescription(),tests[i]);
  }
  mDescriptionToAjcTestSpec=Collections.unmodifiableMap(map);
}
Program: 9173
Project: 9173
Buggy source:
/** 
 * Factory to make and populate suite
 * @param suitePath the String path to a harness suite file
 * @param options the String[] options to use when creating tests
 * @return AjctestJUnitSuite populated with tests
 */
public static AjctestsAdapter make(String suitePath,String[] options){
  AjctestsAdapter result=new AjctestsAdapter(suitePath,options);
  AjcTest.Spec[] tests=AjcTest.Suite.getTests(result.getSpec());
  if (VERBOSE) {
    log("String_Node_Str" + tests.length + "String_Node_Str"+ suitePath);
  }
  for (int i=0; i < tests.length; i++) {
    AjcTest.Spec ajcTest=(AjcTest.Spec)tests[i];
    result.addTest(new AjcTestSpecAsTest(ajcTest,result));
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Factory to make and populate suite
 * @param suitePath the String path to a harness suite file
 * @param options the String[] options to use when creating tests
 * @return AjctestJUnitSuite populated with tests
 */
public static AjctestsAdapter make(String suitePath,String[] options){
  AjctestsAdapter result=new AjctestsAdapter(suitePath,options);
  AjcTest.Spec[] tests=AjcTest.Suite.getTests(result.getSpec());
  if (VERBOSE) {
    log("String_Node_Str" + tests.length + "String_Node_Str"+ suitePath);
  }
  for (int i=0; i < tests.length; i++) {
    AjcTest.Spec ajcTest=tests[i];
    result.addTest(new AjcTestSpecAsTest(ajcTest,result));
  }
  return result;
}
Program: 9174
Project: 9174
Buggy source:
/** 
 * Report results as error, failure, or success (ignored), differently if result is null
 * @param description the String description of the result
 * @param isError if true, report as failure
 * @param isFailure if true and not isError, report as failure
 * @param test the Test case
 * @param result the TestResult sink - ignored if null
 * @return 0
 */
private static int reportResultToJUnit(String description,boolean isError,boolean isFailure,Test test,TestResult result){
  if (null != result) {
    if (isError) {
      result.addError(test,new AssertionFailedError(description));
    }
 else     if (isFailure) {
      result.addFailure(test,new AssertionFailedError(description));
    }
  }
 else {
    if (isError) {
      String m=safeTestName(test) + "String_Node_Str" + description;
      throw new Error(m);
    }
 else     if (isFailure) {
      String m=safeTestName(test) + "String_Node_Str" + description;
      throw new AssertionFailedError(description);
    }
  }
  return 0;
}

Fixed version (ground truth):
/** 
 * Report results as error, failure, or success (ignored), differently if result is null
 * @param description the String description of the result
 * @param isError if true, report as failure
 * @param isFailure if true and not isError, report as failure
 * @param test the Test case
 * @param result the TestResult sink - ignored if null
 * @return 0
 */
private static int reportResultToJUnit(String description,boolean isError,boolean isFailure,Test test,TestResult result){
  if (null != result) {
    if (isError) {
      result.addError(test,new AssertionFailedError(description));
    }
 else     if (isFailure) {
      result.addFailure(test,new AssertionFailedError(description));
    }
  }
 else {
    if (isError) {
      String m=safeTestName(test) + "String_Node_Str" + description;
      throw new Error(m);
    }
 else     if (isFailure) {
      throw new AssertionFailedError(description);
    }
  }
  return 0;
}
Program: 9175
Project: 9175
Buggy source:
protected UnresolvedType parameterize(UnresolvedType aType,Map typeVariableMap,boolean inParameterizedType,World w){
  if (aType instanceof TypeVariableReference) {
    String variableName=((TypeVariableReference)aType).getTypeVariable().getName();
    if (!typeVariableMap.containsKey(variableName)) {
      return aType;
    }
    return (UnresolvedType)typeVariableMap.get(variableName);
  }
 else   if (aType.isParameterizedType()) {
    if (inParameterizedType) {
      if (aType instanceof UnresolvedType) {
        if (w != null)         aType=aType.resolve(w);
 else {
          aType=aType.resolve(((ResolvedType)getDeclaringType()).getWorld());
        }
      }
      return aType.parameterize(typeVariableMap);
    }
 else {
      return aType.getRawType();
    }
  }
 else   if (aType.isArray()) {
    int dims=1;
    String sig=aType.getSignature();
    while (sig.charAt(dims) == '[')     dims++;
    UnresolvedType componentSig=UnresolvedType.forSignature(sig.substring(dims));
    UnresolvedType arrayType=ResolvedType.makeArray(parameterize(componentSig,typeVariableMap,inParameterizedType),dims);
    return arrayType;
  }
  return aType;
}

Fixed version (ground truth):
protected UnresolvedType parameterize(UnresolvedType aType,Map typeVariableMap,boolean inParameterizedType,World w){
  if (aType instanceof TypeVariableReference) {
    String variableName=((TypeVariableReference)aType).getTypeVariable().getName();
    if (!typeVariableMap.containsKey(variableName)) {
      return aType;
    }
    return (UnresolvedType)typeVariableMap.get(variableName);
  }
 else   if (aType.isParameterizedType()) {
    if (inParameterizedType) {
      if (w != null)       aType=aType.resolve(w);
 else {
        aType=aType.resolve(((ResolvedType)getDeclaringType()).getWorld());
      }
      return aType.parameterize(typeVariableMap);
    }
 else {
      return aType.getRawType();
    }
  }
 else   if (aType.isArray()) {
    int dims=1;
    String sig=aType.getSignature();
    while (sig.charAt(dims) == '[')     dims++;
    UnresolvedType componentSig=UnresolvedType.forSignature(sig.substring(dims));
    UnresolvedType arrayType=ResolvedType.makeArray(parameterize(componentSig,typeVariableMap,inParameterizedType),dims);
    return arrayType;
  }
  return aType;
}
Program: 9176
Project: 9176
Buggy source:
/** 
 * Replace occurrences of type variables in the signature with values contained in the map.  The map is of the form A=String,B=Integer and so a signature List<A> Foo.m(B i) {} would become List<String> Foo.m(Integer i) {}
 */
public ResolvedMember parameterizedWith(Map m,World w){
  declaringType=declaringType.resolve(w);
  if (declaringType.isRawType())   declaringType=((ResolvedType)declaringType).getGenericType();
  TypeVariable[] typeVariables=getDeclaringType().getTypeVariables();
  UnresolvedType parameterizedReturnType=parameterize(getGenericReturnType(),m,true,w);
  UnresolvedType[] parameterizedParameterTypes=new UnresolvedType[getGenericParameterTypes().length];
  UnresolvedType[] genericParameterTypes=getGenericParameterTypes();
  for (int i=0; i < parameterizedParameterTypes.length; i++) {
    parameterizedParameterTypes[i]=parameterize(genericParameterTypes[i],m,true,w);
  }
  ResolvedMemberImpl ret=new ResolvedMemberImpl(getKind(),declaringType,getModifiers(),parameterizedReturnType,getName(),parameterizedParameterTypes,getExceptions(),this);
  ret.setTypeVariables(getTypeVariables());
  ret.setSourceContext(getSourceContext());
  ret.setPosition(getStart(),getEnd());
  ret.setParameterNames(getParameterNames());
  return ret;
}

Fixed version (ground truth):
/** 
 * Replace occurrences of type variables in the signature with values contained in the map.  The map is of the form A=String,B=Integer and so a signature List<A> Foo.m(B i) {} would become List<String> Foo.m(Integer i) {}
 */
public ResolvedMember parameterizedWith(Map m,World w){
  declaringType=declaringType.resolve(w);
  if (declaringType.isRawType())   declaringType=((ResolvedType)declaringType).getGenericType();
  UnresolvedType parameterizedReturnType=parameterize(getGenericReturnType(),m,true,w);
  UnresolvedType[] parameterizedParameterTypes=new UnresolvedType[getGenericParameterTypes().length];
  UnresolvedType[] genericParameterTypes=getGenericParameterTypes();
  for (int i=0; i < parameterizedParameterTypes.length; i++) {
    parameterizedParameterTypes[i]=parameterize(genericParameterTypes[i],m,true,w);
  }
  ResolvedMemberImpl ret=new ResolvedMemberImpl(getKind(),declaringType,getModifiers(),parameterizedReturnType,getName(),parameterizedParameterTypes,getExceptions(),this);
  ret.setTypeVariables(getTypeVariables());
  ret.setSourceContext(getSourceContext());
  ret.setPosition(getStart(),getEnd());
  ret.setParameterNames(getParameterNames());
  return ret;
}
Program: 9179
Project: 9179
Buggy source:
private void checkTX(UnresolvedType tx,boolean shouldBeParameterized,int numberOfTypeParameters){
  assertTrue("String_Node_Str" + shouldBeParameterized,tx.isParameterizedType() == shouldBeParameterized);
  if (numberOfTypeParameters == 0) {
    UnresolvedType[] params=tx.getTypeParameters();
    assertTrue("String_Node_Str" + params.length,params == null || params.length == 0);
  }
 else {
    assertTrue("String_Node_Str" + numberOfTypeParameters,tx.getTypeParameters().length == numberOfTypeParameters);
  }
}

Fixed version (ground truth):
private void checkTX(UnresolvedType tx,boolean shouldBeParameterized,int numberOfTypeParameters){
  assertTrue("String_Node_Str" + shouldBeParameterized,tx.isParameterizedType() == shouldBeParameterized);
  if (numberOfTypeParameters == 0) {
    UnresolvedType[] params=tx.getTypeParameters();
    assertTrue("String_Node_Str" + params.length,params.length == 0);
  }
 else {
    assertTrue("String_Node_Str" + numberOfTypeParameters,tx.getTypeParameters().length == numberOfTypeParameters);
  }
}
Program: 9180
Project: 9180
Buggy source:
public void testParseBadPattern(){
  PatternParser p=new PatternParser("String_Node_Str");
  try {
    AnnotationTypePattern bad=p.maybeParseAnnotationPattern();
    fail("String_Node_Str");
  }
 catch (  ParserException pEx) {
    assertEquals("String_Node_Str",pEx.getMessage());
  }
}

Fixed version (ground truth):
public void testParseBadPattern(){
  PatternParser p=new PatternParser("String_Node_Str");
  try {
    p.maybeParseAnnotationPattern();
    fail("String_Node_Str");
  }
 catch (  ParserException pEx) {
    assertEquals("String_Node_Str",pEx.getMessage());
  }
}
Program: 9181
Project: 9181
Buggy source:
/** 
 * If the provided configFile is the same as the id for the last compiler then returns that, otherwise clears the state for the saved compiler and creates a new one for the provided configFile
 * @param configFile
 * @return the AjCompiler with the id of the given configFile
 */
public AjCompiler getCompilerForConfigFile(String configFile){
  if (configFile == null)   return null;
  if ((compiler == null || !compiler.getId().equals(configFile)) && configFile != null) {
    if (compiler != null) {
      compiler.clearLastState();
    }
    getMessageHandler().reset();
    compiler=new AjCompiler(configFile,getCompilerConfig(),getBuildProgressMonitor(),getMessageHandler());
  }
  return compiler;
}

Fixed version (ground truth):
/** 
 * If the provided configFile is the same as the id for the last compiler then returns that, otherwise clears the state for the saved compiler and creates a new one for the provided configFile
 * @param configFile
 * @return the AjCompiler with the id of the given configFile
 */
public AjCompiler getCompilerForConfigFile(String configFile){
  if (configFile == null)   return null;
  if ((compiler == null || !compiler.getId().equals(configFile))) {
    if (compiler != null) {
      compiler.clearLastState();
    }
    getMessageHandler().reset();
    compiler=new AjCompiler(configFile,getCompilerConfig(),getBuildProgressMonitor(),getMessageHandler());
  }
  return compiler;
}
Program: 9183
Project: 9183
Buggy source:
public void doCompleting(Throwable thrown,int result){
  LangUtil.ProcessController.Thrown any=getThrown();
  if (!any.thrown && (null == thrown) && (0 == result)) {
    return;
  }
  String context=props.mainClass + "String_Node_Str" + command+ "String_Node_Str";
  if (null != thrown) {
    String m="String_Node_Str" + context;
    uiBuildMsgHandler.handleMessage(new Message(m,IMessage.ERROR,thrown,null));
  }
 else   if (0 != result) {
    String m="String_Node_Str" + context;
    uiBuildMsgHandler.handleMessage(new Message(m,IMessage.ERROR,thrown,null));
  }
  if (null != any.fromInPipe) {
    String m="String_Node_Str" + context;
    uiBuildMsgHandler.handleMessage(new Message(m,IMessage.ERROR,thrown,null));
  }
  if (null != any.fromOutPipe) {
    String m="String_Node_Str" + context;
    uiBuildMsgHandler.handleMessage(new Message(m,IMessage.ERROR,thrown,null));
  }
  if (null != any.fromErrPipe) {
    String m="String_Node_Str" + context;
    uiBuildMsgHandler.handleMessage(new Message(m,IMessage.ERROR,thrown,null));
  }
}

Fixed version (ground truth):
public void doCompleting(Throwable thrown,int result){
  LangUtil.ProcessController.Thrown any=getThrown();
  if (!any.thrown && (null == thrown) && (0 == result)) {
    return;
  }
  String context=props.mainClass + "String_Node_Str" + command+ "String_Node_Str";
  if (null != thrown) {
    String m="String_Node_Str" + context;
    uiBuildMsgHandler.handleMessage(new Message(m,IMessage.ERROR,thrown,null));
  }
 else   if (0 != result) {
    String m="String_Node_Str" + context;
    uiBuildMsgHandler.handleMessage(new Message(m,IMessage.ERROR,null,null));
  }
  if (null != any.fromInPipe) {
    String m="String_Node_Str" + context;
    uiBuildMsgHandler.handleMessage(new Message(m,IMessage.ERROR,thrown,null));
  }
  if (null != any.fromOutPipe) {
    String m="String_Node_Str" + context;
    uiBuildMsgHandler.handleMessage(new Message(m,IMessage.ERROR,thrown,null));
  }
  if (null != any.fromErrPipe) {
    String m="String_Node_Str" + context;
    uiBuildMsgHandler.handleMessage(new Message(m,IMessage.ERROR,thrown,null));
  }
}
Program: 9184
Project: 9184
Buggy source:
public BuildConfigModel buildModel(String configFilePath){
  File configFile=new File(configFilePath);
  String rootPath=configFile.getParent();
  String configFileName=configFile.getName();
  BuildConfigModel model=new BuildConfigModel(configFilePath);
  List configFiles=new ArrayList();
  List importedFiles=new ArrayList();
  List badEntries=null;
  try {
    LstBuildConfigFileParser configParser=new LstBuildConfigFileParser(configFilePath);
    configParser.parseConfigFile(new File(configFilePath));
    configFiles=configParser.getFiles();
    importedFiles=configParser.getImportedFiles();
    badEntries=configParser.getProblemEntries();
  }
 catch (  ConfigParser.ParseException pe) {
    IMessage message=new Message(pe.getMessage(),IMessage.ERROR,pe,new SourceLocation(pe.getFile(),pe.getLine(),1));
    Ajde.getDefault().getMessageHandler().handleMessage(message);
  }
  List relativePaths=relativizeFilePaths(configFiles,rootPath);
  BuildConfigNode root=new BuildConfigNode(configFileName,BuildConfigNode.Kind.FILE_LST,rootPath);
  buildDirTree(root,rootPath,importedFiles,configFileName);
  model.setRoot(root);
  addFilesToDirTree(model,relativePaths,badEntries);
  pruneEmptyDirs(root);
  sortModel((BuildConfigNode)model.getRoot(),ALPHABETICAL_COMPARATOR);
  addProblemEntries(root,badEntries);
  return model;
}

Fixed version (ground truth):
public BuildConfigModel buildModel(String configFilePath){
  File configFile=new File(configFilePath);
  String rootPath=configFile.getParent();
  String configFileName=configFile.getName();
  BuildConfigModel model=new BuildConfigModel(configFilePath);
  List configFiles=new ArrayList();
  List importedFiles=new ArrayList();
  List badEntries=null;
  try {
    LstBuildConfigFileParser configParser=new LstBuildConfigFileParser(configFilePath);
    configParser.parseConfigFile(new File(configFilePath));
    configFiles=configParser.getFiles();
    importedFiles=configParser.getImportedFiles();
    badEntries=configParser.getProblemEntries();
  }
 catch (  ConfigParser.ParseException pe) {
    IMessage message=new Message(pe.getMessage(),IMessage.ERROR,pe,new SourceLocation(pe.getFile(),pe.getLine(),1));
    Ajde.getDefault().getMessageHandler().handleMessage(message);
  }
  List relativePaths=relativizeFilePaths(configFiles,rootPath);
  BuildConfigNode root=new BuildConfigNode(configFileName,BuildConfigNode.Kind.FILE_LST,rootPath);
  buildDirTree(root,rootPath,importedFiles,configFileName);
  model.setRoot(root);
  addFilesToDirTree(model,relativePaths,badEntries);
  pruneEmptyDirs(root);
  sortModel(model.getRoot(),ALPHABETICAL_COMPARATOR);
  addProblemEntries(root,badEntries);
  return model;
}
Program: 9185
Project: 9185
Buggy source:
/** 
 * @return	null if the kind could not be resolved
 */
protected AbstractIcon getStructureIcon(IProgramElement.Kind kind,IProgramElement.Accessibility accessibility){
  return getStructureIcon(kind,IProgramElement.Accessibility.PUBLIC);
}

Fixed version (ground truth):
/** 
 * @return	null if the kind could not be resolved
 */
protected abstract AbstractIcon getStructureIcon(IProgramElement.Kind kind,IProgramElement.Accessibility accessibility);
Program: 9186
Project: 9186
Buggy source:
private boolean matches(BuildConfigNode node,String sourceFilePath,int lineNumber){
  try {
    return node != null && node.getSourceLocation() != null && node.getSourceLocation().getSourceFile().getCanonicalPath().equals(sourceFilePath) && ((node.getSourceLocation().getLine() <= lineNumber && node.getSourceLocation().getEndLine() >= lineNumber) || (lineNumber <= 1 && node instanceof BuildConfigNode));
  }
 catch (  IOException ioe) {
    return false;
  }
}

Fixed version (ground truth):
private boolean matches(BuildConfigNode node,String sourceFilePath,int lineNumber){
  try {
    return node != null && node.getSourceLocation() != null && node.getSourceLocation().getSourceFile().getCanonicalPath().equals(sourceFilePath) && ((node.getSourceLocation().getLine() <= lineNumber && node.getSourceLocation().getEndLine() >= lineNumber) || (lineNumber <= 1));
  }
 catch (  IOException ioe) {
    return false;
  }
}
Program: 9187
Project: 9187
Buggy source:
public List getActiveNodes(BuildConfigNode.Kind kind){
  List nodes=new ArrayList();
  getActiveNodesHelper((BuildConfigNode)getRoot(),kind,nodes);
  return nodes;
}

Fixed version (ground truth):
public List getActiveNodes(BuildConfigNode.Kind kind){
  List nodes=new ArrayList();
  getActiveNodesHelper(root,kind,nodes);
  return nodes;
}
Program: 9188
Project: 9188
Buggy source:
/** 
 * @param path	java.io.File.separator delimited path
 * @return corresponding node if the path is found, the root otherwise
 */
public BuildConfigNode getNodeForPath(String path){
  BuildConfigNode upPathMatch=searchUpPaths(path);
  if (upPathMatch != null && upPathMatch != root) {
    return upPathMatch;
  }
 else {
    StringTokenizer st=new StringTokenizer(path,"String_Node_Str");
    BuildConfigNode node=(BuildConfigNode)root;
    return getNodeForPathHelper(st,node);
  }
}

Fixed version (ground truth):
/** 
 * @param path	java.io.File.separator delimited path
 * @return corresponding node if the path is found, the root otherwise
 */
public BuildConfigNode getNodeForPath(String path){
  BuildConfigNode upPathMatch=searchUpPaths(path);
  if (upPathMatch != null && upPathMatch != root) {
    return upPathMatch;
  }
 else {
    StringTokenizer st=new StringTokenizer(path,"String_Node_Str");
    return getNodeForPathHelper(st,root);
  }
}
Program: 9189
Project: 9189
Buggy source:
/** 
 * Comparison is string-name based only.
 */
public int compareTo(Object o) throws ClassCastException {
  if (this == o) {
    return 0;
  }
 else {
    BuildConfigNode sn=(BuildConfigNode)o;
    return this.getName().compareTo(sn.getName());
  }
}

Fixed version (ground truth):
/** 
 * Comparison is string-name based only.
 */
public int compareTo(Object o) throws ClassCastException {
  if (o instanceof BuildConfigNode) {
    BuildConfigNode sn=(BuildConfigNode)o;
    return this.getName().compareTo(sn.getName());
  }
  return -1;
}
Program: 9190
Project: 9190
Buggy source:
private List findMatchesHelper(IProgramElement node,String pattern,IProgramElement.Kind kind,List matches){
  if (node != null && node.getName().indexOf(pattern) != -1) {
    if (kind == null || node.getKind().equals(kind)) {
      matches.add(node);
    }
  }
  if (node != null && node.getChildren() != null) {
    for (Iterator it=node.getChildren().iterator(); it.hasNext(); ) {
      IProgramElement nextNode=(IProgramElement)it.next();
      if (nextNode instanceof IProgramElement) {
        findMatchesHelper((IProgramElement)nextNode,pattern,kind,matches);
      }
    }
  }
  return matches;
}

Fixed version (ground truth):
private List findMatchesHelper(IProgramElement node,String pattern,IProgramElement.Kind kind,List matches){
  if (node != null && node.getName().indexOf(pattern) != -1) {
    if (kind == null || node.getKind().equals(kind)) {
      matches.add(node);
    }
  }
  if (node != null && node.getChildren() != null) {
    for (Iterator it=node.getChildren().iterator(); it.hasNext(); ) {
      IProgramElement nextNode=(IProgramElement)it.next();
      if (nextNode != null) {
        findMatchesHelper(nextNode,pattern,kind,matches);
      }
    }
  }
  return matches;
}
Program: 9191
Project: 9191
Buggy source:
/** 
 * @param pattern		case-sensitive substring of node name
 * @return 	null if a corresponding node was not found
 */
public List findMatches(String pattern,IProgramElement.Kind kind){
  List matches=new ArrayList();
  IHierarchy model=AsmManager.getDefault().getHierarchy();
  if (model.equals(IHierarchy.NO_STRUCTURE)) {
    return null;
  }
 else {
    return findMatchesHelper((IProgramElement)model.getRoot(),pattern,kind,matches);
  }
}

Fixed version (ground truth):
/** 
 * @param pattern		case-sensitive substring of node name
 * @return 	null if a corresponding node was not found
 */
public List findMatches(String pattern,IProgramElement.Kind kind){
  List matches=new ArrayList();
  IHierarchy model=AsmManager.getDefault().getHierarchy();
  if (model.getRoot().equals(IHierarchy.NO_STRUCTURE)) {
    return null;
  }
 else {
    return findMatchesHelper(model.getRoot(),pattern,kind,matches);
  }
}
Program: 9192
Project: 9192
Buggy source:
/** 
 * @return		the view node corresponding to the active ProgramElementNode or null
 */
public IStructureViewNode getActiveNode(){
  if (activeNode != null && activeNode.getStructureNode() instanceof IProgramElement) {
    return activeNode;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * @return		the view node corresponding to the active ProgramElementNode or null
 */
public IStructureViewNode getActiveNode(){
  if (activeNode != null && activeNode.getStructureNode() != null) {
    return activeNode;
  }
 else {
    return null;
  }
}
Program: 9194
Project: 9194
Buggy source:
public int compare(Object o1,Object o2){
  IProgramElement sv1=((IStructureViewNode)o1).getStructureNode();
  IProgramElement sv2=((IStructureViewNode)o2).getStructureNode();
  if (sv1 instanceof IProgramElement && sv2 instanceof IProgramElement) {
    IProgramElement p1=(IProgramElement)sv1;
    IProgramElement p2=(IProgramElement)sv2;
    if (p2.getKind() == IProgramElement.Kind.IMPORT_REFERENCE)     return 1;
    if (p1.getKind() == IProgramElement.Kind.IMPORT_REFERENCE)     return -1;
    if (p1.getSourceLocation() == null || p2.getSourceLocation() == null) {
      return 0;
    }
 else     if (p1.getSourceLocation().getLine() < p2.getSourceLocation().getLine()) {
      return -1;
    }
 else {
      return 1;
    }
  }
 else {
    return 0;
  }
}

Fixed version (ground truth):
public int compare(Object o1,Object o2){
  IProgramElement sv1=((IStructureViewNode)o1).getStructureNode();
  IProgramElement sv2=((IStructureViewNode)o2).getStructureNode();
  if (sv1 != null && sv2 != null) {
    if (sv2.getKind() == IProgramElement.Kind.IMPORT_REFERENCE)     return 1;
    if (sv1.getKind() == IProgramElement.Kind.IMPORT_REFERENCE)     return -1;
    if (sv1.getSourceLocation() == null || sv2.getSourceLocation() == null) {
      return 0;
    }
 else     if (sv1.getSourceLocation().getLine() < sv2.getSourceLocation().getLine()) {
      return -1;
    }
 else {
      return 1;
    }
  }
 else {
    return 0;
  }
}
Program: 9195
Project: 9195
Buggy source:
private boolean acceptNode(IProgramElement node,StructureViewProperties properties){
  if (node instanceof IProgramElement) {
    IProgramElement pNode=(IProgramElement)node;
    if (!acceptGranularity(pNode.getKind(),properties.getGranularity())) {
      return false;
    }
 else     if (pNode.getKind().isMember()) {
      if (properties.getFilteredMemberAccessibility().contains(pNode.getAccessibility())) {
        return false;
      }
      if (properties.getFilteredMemberKinds().contains(pNode.getKind())) {
        return false;
      }
      for (Iterator it=pNode.getModifiers().iterator(); it.hasNext(); ) {
        if (properties.getFilteredMemberModifiers().contains(it.next())) {
          return false;
        }
      }
    }
  }
 else {
    return true;
  }
  return true;
}

Fixed version (ground truth):
private boolean acceptNode(IProgramElement node,StructureViewProperties properties){
  if (node != null) {
    IProgramElement pNode=node;
    if (!acceptGranularity(pNode.getKind(),properties.getGranularity())) {
      return false;
    }
 else     if (pNode.getKind().isMember()) {
      if (properties.getFilteredMemberAccessibility().contains(pNode.getAccessibility())) {
        return false;
      }
      if (properties.getFilteredMemberKinds().contains(pNode.getKind())) {
        return false;
      }
      for (Iterator it=pNode.getModifiers().iterator(); it.hasNext(); ) {
        if (properties.getFilteredMemberModifiers().contains(it.next())) {
          return false;
        }
      }
    }
  }
  return true;
}
Program: 9196
Project: 9196
Buggy source:
public void updateView(StructureView structureView){
  if (structureView instanceof GlobalStructureView) {
    treeManager.updateTree((GlobalStructureView)structureView);
  }
}

Fixed version (ground truth):
public void updateView(StructureView structureView){
  if (structureView instanceof GlobalStructureView) {
    treeManager.updateTree(structureView);
  }
}
Program: 9197
Project: 9197
Buggy source:
public void singleClickNavigation(MouseEvent e){
  SwingTreeViewNode treeNode=(SwingTreeViewNode)tree.getLastSelectedPathComponent();
  if (treeNode != null && !e.isControlDown() && !e.isShiftDown() && e.getModifiers() != 4) {
    IProgramElement currNode=(IProgramElement)treeNode.getUserObject();
    if (currNode instanceof IProgramElement && !e.isControlDown() && !e.isShiftDown()&& e.getModifiers() != 4) {
    }
  }
}

Fixed version (ground truth):
public void singleClickNavigation(MouseEvent e){
  SwingTreeViewNode treeNode=(SwingTreeViewNode)tree.getLastSelectedPathComponent();
  if (treeNode != null && !e.isControlDown() && !e.isShiftDown() && e.getModifiers() != 4) {
    IProgramElement currNode=(IProgramElement)treeNode.getUserObject();
    if (currNode != null && !e.isControlDown() && !e.isShiftDown() && e.getModifiers() != 4) {
    }
  }
}
Program: 9198
Project: 9198
Buggy source:
public void doubleClickNavigation(MouseEvent e){
  SwingTreeViewNode treeNode=(SwingTreeViewNode)tree.getLastSelectedPathComponent();
  if (treeNode != null) {
    IProgramElement currNode=(IProgramElement)treeNode.getUserObject();
    if (currNode instanceof IProgramElement && !e.isControlDown() && !e.isShiftDown()&& e.getModifiers() != 4) {
    }
  }
}

Fixed version (ground truth):
public void doubleClickNavigation(MouseEvent e){
  SwingTreeViewNode treeNode=(SwingTreeViewNode)tree.getLastSelectedPathComponent();
  if (treeNode != null) {
    IProgramElement currNode=(IProgramElement)treeNode.getUserObject();
    if (currNode != null && !e.isControlDown() && !e.isShiftDown() && e.getModifiers() != 4) {
    }
  }
}
Program: 9199
Project: 9199
Buggy source:
public Component getListCellRendererComponent(JList list,Object value,int index,boolean isSelected,boolean cellHasFocus){
  String label="String_Node_Str";
  String detail=null;
  IMessage.Kind kind=IMessage.ERROR;
  if (value instanceof IMessage) {
    IMessage cm=(IMessage)value;
    label=cm.getMessage();
    if (LangUtil.isEmpty(label)) {
      label=cm.getMessage().toString();
    }
    kind=cm.getKind();
    Throwable thrown=cm.getThrown();
    if (null != thrown) {
      detail=LangUtil.renderException(thrown);
    }
  }
 else   if (null != value) {
    label=value.toString();
  }
  setText(label);
  if (kind.equals(IMessage.WARNING)) {
    setIcon(Ajde.getDefault().getIconRegistry().getWarningIcon());
  }
 else   if (IMessage.ERROR.isSameOrLessThan(kind)) {
    setIcon(Ajde.getDefault().getIconRegistry().getErrorIcon());
  }
 else {
    setIcon(Ajde.getDefault().getIconRegistry().getInfoIcon());
  }
  if (isSelected) {
    setBackground(list.getSelectionBackground());
    setForeground(list.getSelectionForeground());
  }
 else {
    setBackground(list.getBackground());
    setForeground(list.getForeground());
  }
  setEnabled(list.isEnabled());
  setFont(list.getFont());
  setOpaque(true);
  if (null != detail) {
    setToolTipText(detail);
  }
  return this;
}

Fixed version (ground truth):
public Component getListCellRendererComponent(JList list,Object value,int index,boolean isSelected,boolean cellHasFocus){
  String label="String_Node_Str";
  String detail=null;
  IMessage.Kind kind=IMessage.ERROR;
  if (value instanceof IMessage) {
    IMessage cm=(IMessage)value;
    label=cm.getMessage();
    if (LangUtil.isEmpty(label)) {
      label=cm.getMessage();
    }
    kind=cm.getKind();
    Throwable thrown=cm.getThrown();
    if (null != thrown) {
      detail=LangUtil.renderException(thrown);
    }
  }
 else   if (null != value) {
    label=value.toString();
  }
  setText(label);
  if (kind.equals(IMessage.WARNING)) {
    setIcon(Ajde.getDefault().getIconRegistry().getWarningIcon());
  }
 else   if (IMessage.ERROR.isSameOrLessThan(kind)) {
    setIcon(Ajde.getDefault().getIconRegistry().getErrorIcon());
  }
 else {
    setIcon(Ajde.getDefault().getIconRegistry().getInfoIcon());
  }
  if (isSelected) {
    setBackground(list.getSelectionBackground());
    setForeground(list.getSelectionForeground());
  }
 else {
    setBackground(list.getBackground());
    setForeground(list.getForeground());
  }
  setEnabled(list.isEnabled());
  setFont(list.getFont());
  setOpaque(true);
  if (null != detail) {
    setToolTipText(detail);
  }
  return this;
}
Program: 9200
Project: 9200
Buggy source:
private void highlightNode(SwingTreeViewNode parent,IProgramElement node){
  for (int i=0; i < parent.getChildCount(); i++) {
    SwingTreeViewNode currNode=(SwingTreeViewNode)parent.getChildAt(i);
    IProgramElement sNode=(IProgramElement)currNode.getStructureNode();
    if (sNode != null && sNode.equals(node) && currNode.getKind() != IStructureViewNode.Kind.LINK) {
      TreePath path=new TreePath(currNode.getPath());
      structureTree.setSelectionPath(path);
      int currRow=structureTree.getRowForPath(path);
      structureTree.expandRow(currRow);
      structureTree.scrollRowToVisible(currRow);
    }
 else {
      highlightNode(currNode,node);
    }
  }
}

Fixed version (ground truth):
private void highlightNode(SwingTreeViewNode parent,IProgramElement node){
  for (int i=0; i < parent.getChildCount(); i++) {
    SwingTreeViewNode currNode=(SwingTreeViewNode)parent.getChildAt(i);
    IProgramElement sNode=currNode.getStructureNode();
    if (sNode != null && sNode.equals(node) && currNode.getKind() != IStructureViewNode.Kind.LINK) {
      TreePath path=new TreePath(currNode.getPath());
      structureTree.setSelectionPath(path);
      int currRow=structureTree.getRowForPath(path);
      structureTree.expandRow(currRow);
      structureTree.scrollRowToVisible(currRow);
    }
 else {
      highlightNode(currNode,node);
    }
  }
}
Program: 9201
Project: 9201
Buggy source:
public void highlightActiveNode(){
  if (currentView.getActiveNode() == null)   return;
  IProgramElement node=currentView.getActiveNode().getStructureNode();
  if (node instanceof IProgramElement) {
    treeManager.highlightNode((IProgramElement)node);
  }
}

Fixed version (ground truth):
public void highlightActiveNode(){
  if (currentView.getActiveNode() == null)   return;
  IProgramElement node=currentView.getActiveNode().getStructureNode();
  if (node != null) {
    treeManager.highlightNode(node);
  }
}
Program: 9202
Project: 9202
Buggy source:
public void setActiveNode(IStructureViewNode node,int lineOffset){
  if (node == null)   return;
  IProgramElement pNode=(IProgramElement)node.getStructureNode();
  treeManager.highlightNode(pNode);
  if (pNode.getSourceLocation() != null) {
    Ajde.getDefault().getEditorAdapter().showSourceLine(pNode.getSourceLocation().getSourceFile().getAbsolutePath(),pNode.getSourceLocation().getLine() + lineOffset,true);
  }
}

Fixed version (ground truth):
public void setActiveNode(IStructureViewNode node,int lineOffset){
  if (node == null)   return;
  IProgramElement pNode=node.getStructureNode();
  treeManager.highlightNode(pNode);
  if (pNode.getSourceLocation() != null) {
    Ajde.getDefault().getEditorAdapter().showSourceLine(pNode.getSourceLocation().getSourceFile().getAbsolutePath(),pNode.getSourceLocation().getLine() + lineOffset,true);
  }
}
Program: 9203
Project: 9203
Buggy source:
public void openFile(String configFile) throws IOException, InvalidResourceException {
  try {
    if (configFile == null) {
      Message msg=new Message("String_Node_Str",IMessage.ERROR,null,null);
      Ajde.getDefault().getMessageHandler().handleMessage(msg);
      return;
    }
    jbInit();
    jLabel1.setText("String_Node_Str" + configFile);
    model=Ajde.getDefault().getBuildConfigManager().buildModel(configFile);
    root=buildTree((BuildConfigNode)model.getRoot());
    buildConfig_tree.setModel(new DefaultTreeModel(root));
    buildConfig_tree.addMouseListener(new ConfigFileMouseAdapter(buildConfig_tree));
    buildConfig_tree.setCellRenderer(new ConfigTreeCellRenderer());
    for (int j=0; j < buildConfig_tree.getRowCount(); j++) {
      buildConfig_tree.expandPath(buildConfig_tree.getPathForRow(j));
    }
  }
 catch (  Exception e) {
    Message msg=new Message("String_Node_Str",IMessage.ERROR,e,null);
    Ajde.getDefault().getMessageHandler().handleMessage(msg);
  }
}

Fixed version (ground truth):
public void openFile(String configFile) throws IOException, InvalidResourceException {
  try {
    if (configFile == null) {
      Message msg=new Message("String_Node_Str",IMessage.ERROR,null,null);
      Ajde.getDefault().getMessageHandler().handleMessage(msg);
      return;
    }
    jbInit();
    jLabel1.setText("String_Node_Str" + configFile);
    model=Ajde.getDefault().getBuildConfigManager().buildModel(configFile);
    root=buildTree(model.getRoot());
    buildConfig_tree.setModel(new DefaultTreeModel(root));
    buildConfig_tree.addMouseListener(new ConfigFileMouseAdapter(buildConfig_tree));
    buildConfig_tree.setCellRenderer(new ConfigTreeCellRenderer());
    for (int j=0; j < buildConfig_tree.getRowCount(); j++) {
      buildConfig_tree.expandPath(buildConfig_tree.getPathForRow(j));
    }
  }
 catch (  Exception e) {
    Message msg=new Message("String_Node_Str",IMessage.ERROR,e,null);
    Ajde.getDefault().getMessageHandler().handleMessage(msg);
  }
}
Program: 9206
Project: 9206
Buggy source:
public void afterProcessing(CompilationUnitDeclaration unit,int unitIndex){
  CompilationAndWeavingContext.leavingPhase(processingToken);
  eWorld.finishedCompilationUnit(unit);
  InterimCompilationResult intRes=new InterimCompilationResult(unit.compilationResult,outputFileNameProvider);
  if (unit.compilationResult.hasErrors())   reportedErrors=true;
  if (intermediateResultsRequestor != null) {
    intermediateResultsRequestor.acceptResult(intRes);
  }
  if (isXTerminateAfterCompilation || (reportedErrors && !proceedOnError)) {
    acceptResult(unit.compilationResult);
  }
 else {
    queueForWeaving(intRes);
  }
}

Fixed version (ground truth):
public void afterProcessing(CompilationUnitDeclaration unit,int unitIndex){
  CompilationAndWeavingContext.leavingPhase(processingToken);
  eWorld.finishedCompilationUnit(unit);
  InterimCompilationResult intRes=new InterimCompilationResult(unit.compilationResult,outputFileNameProvider);
  if (unit.compilationResult.hasErrors())   reportedErrors=true;
  if (intermediateResultsRequestor != null) {
    intermediateResultsRequestor.acceptResult(intRes);
  }
  if (unit.compilationResult.hasErrors() || (isXTerminateAfterCompilation || (reportedErrors && !proceedOnError))) {
    acceptResult(unit.compilationResult);
  }
 else {
    queueForWeaving(intRes);
  }
}
Program: 9209
Project: 9209
Buggy source:
public void acceptResult(CompilationResult unitResult){
  if (!((unitResult.hasErrors() && !continueWhenErrors) && !proceedOnError())) {
    Collection classFiles=unitResult.compiledTypes.values();
    boolean shouldAddAspectName=(buildConfig.getOutxmlName() != null);
    for (Iterator iter=classFiles.iterator(); iter.hasNext(); ) {
      ClassFile classFile=(ClassFile)iter.next();
      String filename=new String(classFile.fileName());
      String classname=filename.replace('/','.');
      filename=filename.replace('/',File.separatorChar) + "String_Node_Str";
      try {
        if (buildConfig.getOutputJar() == null) {
          writeDirectoryEntry(unitResult,classFile,filename);
        }
 else {
          writeZipEntry(classFile,filename);
        }
        if (shouldAddAspectName)         addAspectName(classname,unitResult.getFileName());
      }
 catch (      IOException ex) {
        IMessage message=EclipseAdapterUtils.makeErrorMessage(new String(unitResult.fileName),CANT_WRITE_RESULT,ex);
        handler.handleMessage(message);
      }
    }
    unitResult.compiledTypes.clear();
  }
  if (unitResult.hasProblems() || unitResult.hasTasks()) {
    IProblem[] problems=unitResult.getAllProblems();
    for (int i=0; i < problems.length; i++) {
      IMessage message=EclipseAdapterUtils.makeMessage(unitResult.compilationUnit,problems[i],getBcelWorld());
      handler.handleMessage(message);
    }
  }
}

Fixed version (ground truth):
public void acceptResult(CompilationResult unitResult){
  if (!unitResult.hasErrors() || proceedOnError()) {
    Collection classFiles=unitResult.compiledTypes.values();
    boolean shouldAddAspectName=(buildConfig.getOutxmlName() != null);
    for (Iterator iter=classFiles.iterator(); iter.hasNext(); ) {
      ClassFile classFile=(ClassFile)iter.next();
      String filename=new String(classFile.fileName());
      String classname=filename.replace('/','.');
      filename=filename.replace('/',File.separatorChar) + "String_Node_Str";
      try {
        if (buildConfig.getOutputJar() == null) {
          writeDirectoryEntry(unitResult,classFile,filename);
        }
 else {
          writeZipEntry(classFile,filename);
        }
        if (shouldAddAspectName)         addAspectName(classname,unitResult.getFileName());
      }
 catch (      IOException ex) {
        IMessage message=EclipseAdapterUtils.makeErrorMessage(new String(unitResult.fileName),CANT_WRITE_RESULT,ex);
        handler.handleMessage(message);
      }
    }
    unitResult.compiledTypes.clear();
  }
  if (unitResult.hasProblems() || unitResult.hasTasks()) {
    IProblem[] problems=unitResult.getAllProblems();
    for (int i=0; i < problems.length; i++) {
      IMessage message=EclipseAdapterUtils.makeMessage(unitResult.compilationUnit,problems[i],getBcelWorld());
      handler.handleMessage(message);
    }
  }
}
Program: 9210
Project: 9210
Buggy source:
/** 
 * Compile C1.java that defines C.class then compile C2.java which contains another version of C.class but also contains errors.  Because -proceedOnError is not supplied, the .class file should not be touched when compiling C2.java.
 */
public void testNoProceedOnError() throws IOException {
  try {
    AjBuildManager.continueWhenErrors=false;
    checkCompile("String_Node_Str",NO_ERRORS);
    File f=new File(getSandboxName(),"String_Node_Str");
    long oldmodtime=f.lastModified();
    pause(2);
    checkCompile("String_Node_Str",new int[]{1});
    f=new File(getSandboxName(),"String_Node_Str");
    long newmodtime=f.lastModified();
    assertTrue("String_Node_Str" + new Date(oldmodtime).toString() + "String_Node_Str"+ new Date(newmodtime).toString()+ "String_Node_Str",oldmodtime == newmodtime);
  }
  finally {
    AjBuildManager.continueWhenErrors=true;
  }
}

Fixed version (ground truth):
/** 
 * Compile C1.java that defines C.class then compile C2.java which contains another version of C.class but also contains errors.  Because -proceedOnError is not supplied, the .class file should not be touched when compiling C2.java.
 */
public void testNoProceedOnError() throws IOException {
  checkCompile("String_Node_Str",NO_ERRORS);
  File f=new File(getSandboxName(),"String_Node_Str");
  long oldmodtime=f.lastModified();
  pause(2);
  checkCompile("String_Node_Str",new int[]{1});
  f=new File(getSandboxName(),"String_Node_Str");
  long newmodtime=f.lastModified();
  assertTrue("String_Node_Str" + new Date(oldmodtime).toString() + "String_Node_Str"+ new Date(newmodtime).toString()+ "String_Node_Str",oldmodtime == newmodtime);
}
Program: 9211
Project: 9211
Buggy source:
/** 
 * Generate a new AjBuildConfig from the compiler configuration associated with this AjdeCoreBuildManager
 * @return null if invalid configuration, corresponding AjBuildConfig otherwise
 */
public AjBuildConfig genAjBuildConfig(){
  File configFile=new File(compiler.getId());
  String[] args=null;
  if (configFile.exists() && configFile.isFile()) {
    args=new String[]{"String_Node_Str" + configFile.getAbsolutePath()};
  }
 else {
    List l=compiler.getCompilerConfiguration().getProjectSourceFiles();
    if (l == null)     return null;
    args=new String[l.size()];
    int counter=0;
    for (Iterator iter=l.iterator(); iter.hasNext(); ) {
      String element=(String)iter.next();
      args[counter]=element;
      counter++;
    }
  }
  CountingMessageHandler handler=CountingMessageHandler.makeCountingMessageHandler(msgHandlerAdapter);
  BuildArgParser parser=new BuildArgParser(handler);
  AjBuildConfig config=new AjBuildConfig();
  parser.populateBuildConfig(config,args,false,configFile);
  configureCompilerOptions(config);
  ISourceLocation location=null;
  if (config.getConfigFile() != null) {
    location=new SourceLocation(config.getConfigFile(),0);
  }
  String message=parser.getOtherMessages(true);
  if (null != message) {
    IMessage m=new Message(message,IMessage.ERROR,null,location);
    handler.handleMessage(m);
  }
  config.setGenerateModelMode(true);
  config.setIncrementalMode(true);
  return config;
}

Fixed version (ground truth):
/** 
 * Generate a new AjBuildConfig from the compiler configuration associated with this AjdeCoreBuildManager
 * @return null if invalid configuration, corresponding AjBuildConfig otherwise
 */
public AjBuildConfig genAjBuildConfig(){
  File configFile=new File(compiler.getId());
  String[] args=null;
  if (configFile.exists() && configFile.isFile()) {
    args=new String[]{"String_Node_Str" + configFile.getAbsolutePath()};
  }
 else {
    List l=compiler.getCompilerConfiguration().getProjectSourceFiles();
    if (l == null)     return null;
    args=new String[l.size()];
    int counter=0;
    for (Iterator iter=l.iterator(); iter.hasNext(); ) {
      String element=(String)iter.next();
      args[counter]=element;
      counter++;
    }
  }
  CountingMessageHandler handler=CountingMessageHandler.makeCountingMessageHandler(msgHandlerAdapter);
  BuildArgParser parser=new BuildArgParser(handler);
  AjBuildConfig config=new AjBuildConfig();
  parser.populateBuildConfig(config,args,false,configFile);
  configureCompilerOptions(config);
  ISourceLocation location=null;
  if (config.getConfigFile() != null) {
    location=new SourceLocation(config.getConfigFile(),0);
  }
  String message=parser.getOtherMessages(true);
  if (null != message) {
    IMessage m=new Message(message,IMessage.ERROR,null,location);
    handler.handleMessage(m);
  }
  config.setGenerateModelMode(true);
  config.setIncrementalMode(true);
  config.setProceedOnError(true);
  return config;
}