nus-yam/ex-repair huggingface dataset:
Program: 9589
Project: 9589
Buggy source:
public EclipseTypeMunger build(ClassScope classScope){
  EclipseFactory world=EclipseFactory.fromScopeLookupEnvironment(classScope);
  resolveOnType(classScope);
  if (ignoreFurtherInvestigation)   return null;
  binding=classScope.referenceContext.binding.resolveTypesFor(binding);
  ResolvedMember sig=new ResolvedMember(Member.METHOD,EclipseFactory.fromBinding(onTypeBinding),declaredModifiers,EclipseFactory.fromBinding(binding.returnType),new String(declaredSelector),EclipseFactory.fromBindings(binding.parameters));
  sig.setCheckedExceptions(world.fromEclipse(binding.thrownExceptions));
  NewMethodTypeMunger myMunger=new NewMethodTypeMunger(sig,null);
  setMunger(myMunger);
  ResolvedTypeX aspectType=world.fromEclipse(classScope.referenceContext.binding);
  ResolvedMember me=myMunger.getDispatchMethod(aspectType);
  this.selector=binding.selector=me.getName().toCharArray();
  return new EclipseTypeMunger(world,myMunger,aspectType,this);
}

Fixed version (ground truth):
public EclipseTypeMunger build(ClassScope classScope){
  EclipseFactory world=EclipseFactory.fromScopeLookupEnvironment(classScope);
  resolveOnType(classScope);
  if (ignoreFurtherInvestigation)   return null;
  binding=classScope.referenceContext.binding.resolveTypesFor(binding);
  ResolvedMember sig=new ResolvedMember(Member.METHOD,EclipseFactory.fromBinding(onTypeBinding),declaredModifiers,EclipseFactory.fromBinding(binding.returnType),new String(declaredSelector),EclipseFactory.fromBindings(binding.parameters),world.fromEclipse(binding.thrownExceptions));
  NewMethodTypeMunger myMunger=new NewMethodTypeMunger(sig,null);
  setMunger(myMunger);
  ResolvedTypeX aspectType=world.fromEclipse(classScope.referenceContext.binding);
  ResolvedMember me=myMunger.getDispatchMethod(aspectType);
  this.selector=binding.selector=me.getName().toCharArray();
  return new EclipseTypeMunger(world,myMunger,aspectType,this);
}
Program: 9592
Project: 9592
Buggy source:
public void mouseClicked(MouseEvent e){
  if (e.getClickCount() >= 1) {
    int index=list.locationToIndex(e.getPoint());
    if (listModel.getSize() >= index && index != -1) {
      CompilerMessage cm=(CompilerMessage)listModel.getElementAt(index);
      if ((null != cm) && (null != cm.message)) {
        displayMessage(cm.message);
      }
    }
  }
}

Fixed version (ground truth):
public void mouseClicked(MouseEvent e){
  if (e.getClickCount() >= 1) {
    int index=list.locationToIndex(e.getPoint());
    if (listModel.getSize() >= index && index != -1) {
      IMessage message=(IMessage)listModel.getElementAt(index);
      Ajde.getDefault().getEditorAdapter().showSourceLine(message.getISourceLocation(),true);
    }
  }
}
Program: 9593
Project: 9593
Buggy source:
public void addSourcelineTask(IMessage message){
  listModel.addElement(new CompilerMessage(message));
  if (!hasWarning && IMessage.WARNING.isSameOrLessThan(message.getKind())) {
    hasWarning=true;
  }
  BrowserManager.getDefault().showMessages();
}

Fixed version (ground truth):
public void addSourcelineTask(String message,ISourceLocation sourceLocation,IMessage.Kind kind){
  listModel.addElement(new Message(message,kind,null,sourceLocation));
  checkIfWarning(kind);
}
Program: 9594
Project: 9594
Buggy source:
public CompilerMessagesPanel(){
  try {
    jbInit();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  list.setModel(listModel);
  MouseListener mouseListener=new MouseAdapter(){
    public void mouseClicked(    MouseEvent e){
      if (e.getClickCount() >= 1) {
        int index=list.locationToIndex(e.getPoint());
        if (listModel.getSize() >= index && index != -1) {
          CompilerMessage cm=(CompilerMessage)listModel.getElementAt(index);
          if ((null != cm) && (null != cm.message)) {
            displayMessage(cm.message);
          }
        }
      }
    }
  }
;
  list.addMouseListener(mouseListener);
  list.setCellRenderer(new CompilerMessagesCellRenderer());
}

Fixed version (ground truth):
public CompilerMessagesPanel(){
  try {
    jbInit();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  list.setModel(listModel);
  MouseListener mouseListener=new MouseAdapter(){
    public void mouseClicked(    MouseEvent e){
      if (e.getClickCount() >= 1) {
        int index=list.locationToIndex(e.getPoint());
        if (listModel.getSize() >= index && index != -1) {
          IMessage message=(IMessage)listModel.getElementAt(index);
          Ajde.getDefault().getEditorAdapter().showSourceLine(message.getISourceLocation(),true);
        }
      }
    }
  }
;
  list.addMouseListener(mouseListener);
  list.setCellRenderer(new CompilerMessagesCellRenderer());
}
Program: 9595
Project: 9595
Buggy source:
public void addProjectTask(String message,IMessage.Kind kind){
  IMessage m=new Message(message,kind,null,null);
  listModel.addElement(new CompilerMessage(m));
  if (!hasWarning && IMessage.WARNING.isSameOrLessThan(kind)) {
    hasWarning=true;
  }
  BrowserManager.getDefault().showMessages();
}

Fixed version (ground truth):
public void addProjectTask(String message,IMessage.Kind kind){
  listModel.addElement(new Message(message,kind,null,null));
  checkIfWarning(kind);
}
Program: 9596
Project: 9596
Buggy source:
public void clearTasks(){
  listModel.clear();
}

Fixed version (ground truth):
public void clearTasks(){
  listModel.clear();
  hasWarning=false;
}
Program: 9598
Project: 9598
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.INFO;
  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(AjdeUIManager.getDefault().getIconRegistry().getWarningIcon());
  }
 else   if (IMessage.ERROR.isSameOrLessThan(kind)) {
    setIcon(AjdeUIManager.getDefault().getIconRegistry().getErrorIcon());
  }
 else {
    setIcon(null);
  }
  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().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(AjdeUIManager.getDefault().getIconRegistry().getWarningIcon());
  }
 else   if (IMessage.ERROR.isSameOrLessThan(kind)) {
    setIcon(AjdeUIManager.getDefault().getIconRegistry().getErrorIcon());
  }
 else {
    setIcon(null);
  }
  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: 9599
Project: 9599
Buggy source:
/** 
 * init only on initial batch compile? no file-specific options 
 */
private void initBcelWorld(IMessageHandler handler) throws IOException {
  bcelWorld=new BcelWorld(buildConfig.getClasspath(),handler);
  bcelWorld.setXnoInline(buildConfig.isXnoInline());
  bcelWeaver=new BcelWeaver(bcelWorld);
  for (Iterator i=buildConfig.getAspectpath().iterator(); i.hasNext(); ) {
    File f=(File)i.next();
    bcelWeaver.addLibraryJarFile(f);
  }
  String lintMode=buildConfig.getLintMode();
  if (buildConfig.getLintMode().equals(AjBuildConfig.AJLINT_DEFAULT)) {
    bcelWorld.getLint().loadDefaultProperties();
  }
 else {
    bcelWorld.getLint().setAll(buildConfig.getLintMode());
  }
  if (buildConfig.getLintSpecFile() != null) {
    bcelWorld.getLint().setFromProperties(buildConfig.getLintSpecFile());
  }
  for (Iterator i=buildConfig.getInJars().iterator(); i.hasNext(); ) {
    File inJar=(File)i.next();
    bcelWeaver.addJarFile(inJar,buildConfig.getOutputDir());
  }
  bcelWorld.resolve("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * init only on initial batch compile? no file-specific options 
 */
private void initBcelWorld(IMessageHandler handler) throws IOException {
  bcelWorld=new BcelWorld(buildConfig.getClasspath(),handler);
  bcelWorld.setXnoInline(buildConfig.isXnoInline());
  bcelWeaver=new BcelWeaver(bcelWorld);
  for (Iterator i=buildConfig.getAspectpath().iterator(); i.hasNext(); ) {
    File f=(File)i.next();
    bcelWeaver.addLibraryJarFile(f);
  }
  String lintMode=buildConfig.getLintMode();
  if (buildConfig.getLintMode().equals(AjBuildConfig.AJLINT_DEFAULT)) {
    bcelWorld.getLint().loadDefaultProperties();
  }
 else {
    bcelWorld.getLint().setAll(buildConfig.getLintMode());
  }
  if (buildConfig.getLintSpecFile() != null) {
    bcelWorld.getLint().setFromProperties(buildConfig.getLintSpecFile());
  }
  for (Iterator i=buildConfig.getInJars().iterator(); i.hasNext(); ) {
    File inJar=(File)i.next();
    bcelWeaver.addJarFile(inJar,buildConfig.getOutputDir());
  }
  if (buildConfig.getSourcePathResources() != null) {
    for (Iterator i=buildConfig.getSourcePathResources().keySet().iterator(); i.hasNext(); ) {
      String resource=(String)i.next();
      bcelWeaver.addResource(resource,(File)buildConfig.getSourcePathResources().get(resource),buildConfig.getOutputDir());
    }
  }
  bcelWorld.resolve("String_Node_Str");
}
Program: 9600
Project: 9600
Buggy source:
/** 
 * Adds all class files in the jar
 */
public void addJarFile(File inFile,File outDir) throws IOException {
  needToReweaveWorld=true;
  ZipInputStream inStream=new ZipInputStream(new FileInputStream(inFile));
  while (true) {
    ZipEntry entry=inStream.getNextEntry();
    if (entry == null)     break;
    if (entry.isDirectory() || !entry.getName().endsWith("String_Node_Str")) {
      continue;
    }
    byte[] bytes=FileUtil.readAsByteArray(inStream);
    String filename=entry.getName();
    UnwovenClassFile classFile=new UnwovenClassFile(new File(outDir,filename).getAbsolutePath(),bytes);
    inStream.closeEntry();
    this.addClassFile(classFile);
  }
  inStream.close();
}

Fixed version (ground truth):
/** 
 * Adds all class files in the jar
 */
public void addJarFile(File inFile,File outDir) throws IOException {
  needToReweaveWorld=true;
  ZipInputStream inStream=new ZipInputStream(new FileInputStream(inFile));
  while (true) {
    ZipEntry entry=inStream.getNextEntry();
    if (entry == null)     break;
    byte[] bytes=FileUtil.readAsByteArray(inStream);
    String filename=entry.getName();
    if (filename.endsWith("String_Node_Str")) {
      UnwovenClassFile classFile=new UnwovenClassFile(new File(outDir,filename).getAbsolutePath(),bytes);
      this.addClassFile(classFile);
    }
 else     if (!entry.isDirectory()) {
      UnwovenClassFile resourceFile=new UnwovenClassFile(filename,bytes);
      addResource(resourceFile);
    }
    inStream.closeEntry();
  }
  inStream.close();
}
Program: 9601
Project: 9601
Buggy source:
public void dumpUnwoven() throws IOException {
  Collection filesToDump=new HashSet(sourceJavaClasses.values());
  for (Iterator i=filesToDump.iterator(); i.hasNext(); ) {
    UnwovenClassFile classFile=(UnwovenClassFile)i.next();
    dumpUnchanged(classFile);
  }
}

Fixed version (ground truth):
public void dumpUnwoven() throws IOException {
  Collection filesToDump=new HashSet(sourceJavaClasses.values());
  for (Iterator i=filesToDump.iterator(); i.hasNext(); ) {
    UnwovenClassFile classFile=(UnwovenClassFile)i.next();
    dumpUnchanged(classFile);
  }
  dumpResourcesToOutPath();
}
Program: 9602
Project: 9602
Buggy source:
/** 
 * Should be addOrReplace
 */
public void addClassFile(UnwovenClassFile classFile){
  addedClasses.add(classFile);
  sourceJavaClasses.put(classFile.getClassName(),classFile);
  world.addSourceObjectType(classFile.getJavaClass());
}

Fixed version (ground truth):
/** 
 * Should be addOrReplace
 */
public void addClassFile(UnwovenClassFile classFile){
  addedClasses.add(classFile);
  if (null != sourceJavaClasses.put(classFile.getClassName(),classFile)) {
  }
  world.addSourceObjectType(classFile.getJavaClass());
}
Program: 9604
Project: 9604
Buggy source:
public void postParse(TypeDeclaration typeDec){
  if (arguments == null)   arguments=new Argument[0];
  this.declaredModifiers=modifiers;
  this.declaredName=new String(selector);
  selector=CharOperation.concat(mangledPrefix,'$',selector,'$',Integer.toHexString(sourceStart).toCharArray());
  if (pointcutDesignator == null)   return;
  pointcutDesignator.postParse(typeDec,this);
}

Fixed version (ground truth):
public void postParse(TypeDeclaration typeDec){
  if (arguments == null)   arguments=new Argument[0];
  this.declaredModifiers=modifiers;
  this.declaredName=new String(selector);
  selector=CharOperation.concat(mangledPrefix,'$',selector,'$',Integer.toHexString(sourceStart).toCharArray());
  if (Modifier.isAbstract(this.declaredModifiers) && !(typeDec instanceof AspectDeclaration)) {
    typeDec.scope.problemReporter().signalError(sourceStart,sourceEnd,"String_Node_Str" + new String(declaredName) + "String_Node_Str");
    ignoreFurtherInvestigation=true;
    return;
  }
  if (pointcutDesignator != null) {
    pointcutDesignator.postParse(typeDec,this);
  }
}
Program: 9605
Project: 9605
Buggy source:
public void resolveStatements(){
  if (isAbstract()) {
    this.modifiers|=AccSemicolonBody;
  }
  if (binding == null || ignoreFurtherInvestigation)   return;
  if (Modifier.isAbstract(this.declaredModifiers) && (pointcutDesignator != null)) {
    scope.problemReporter().signalError(sourceStart,sourceEnd,"String_Node_Str");
  }
  if (pointcutDesignator != null) {
    pointcutDesignator.finishResolveTypes(this,this.binding,arguments.length,scope.enclosingSourceType());
  }
  super.resolveStatements();
}

Fixed version (ground truth):
public void resolveStatements(){
  if (isAbstract()) {
    this.modifiers|=AccSemicolonBody;
  }
  if (binding == null || ignoreFurtherInvestigation)   return;
  if (Modifier.isAbstract(this.declaredModifiers) && (pointcutDesignator != null)) {
    scope.problemReporter().signalError(sourceStart,sourceEnd,"String_Node_Str");
    ignoreFurtherInvestigation=true;
    return;
  }
  if (pointcutDesignator != null) {
    pointcutDesignator.finishResolveTypes(this,this.binding,arguments.length,scope.enclosingSourceType());
  }
  super.resolveStatements();
}
Program: 9606
Project: 9606
Buggy source:
/** 
 * @throw BuildException if options conflict
 */
protected void verifyOptions(){
  if (fork && isInIncrementalMode() && !isInIncrementalFileMode()) {
    String m="String_Node_Str";
    throw new BuildException(m);
  }
}

Fixed version (ground truth):
/** 
 * @throw BuildException if options conflict
 */
protected void verifyOptions(){
  StringBuffer sb=new StringBuffer();
  if (fork && isInIncrementalMode() && !isInIncrementalFileMode()) {
    sb.append("String_Node_Str");
  }
  if ((null == outjar) && (DEFAULT_DESTDIR == destDir)) {
    final String REQ="String_Node_Str";
    if (copyInjars) {
      sb.append("String_Node_Str");
      sb.append(REQ);
    }
    if (null != sourceRootCopyFilter) {
      sb.append("String_Node_Str");
      sb.append(REQ);
    }
  }
  if (0 < sb.length()) {
    throw new BuildException(sb.toString());
  }
}
Program: 9609
Project: 9609
Buggy source:
String[] makeCommand(){
  ArrayList result=new ArrayList();
  if (0 < ignored.size()) {
    for (Iterator iter=ignored.iterator(); iter.hasNext(); ) {
      log("String_Node_Str" + iter.next(),Project.MSG_INFO);
    }
  }
  if ((null != outjar) && !outjarFixedup) {
    if (copyInjars || (null != sourceRootCopyFilter)) {
      String path=outjar.getAbsolutePath();
      int len=FileUtil.zipSuffixLength(path);
      if (len < 1) {
        log("String_Node_Str" + path);
      }
 else {
        path=path.substring(0,path.length() - len) + "String_Node_Str";
        tmpOutjar=new File(path);
      }
    }
    if (null == tmpOutjar) {
      cmd.addFlagged("String_Node_Str",outjar.getAbsolutePath());
    }
 else {
      cmd.addFlagged("String_Node_Str",tmpOutjar.getAbsolutePath());
    }
    outjarFixedup=true;
  }
  result.addAll(cmd.extractArguments());
  addListArgs(result);
  return (String[])result.toArray(new String[0]);
}

Fixed version (ground truth):
String[] makeCommand(){
  ArrayList result=new ArrayList();
  if (0 < ignored.size()) {
    for (Iterator iter=ignored.iterator(); iter.hasNext(); ) {
      log("String_Node_Str" + iter.next(),Project.MSG_INFO);
    }
  }
  if ((null != outjar) && !outjarFixedup) {
    if (copyInjars || (null != sourceRootCopyFilter)) {
      String path=outjar.getAbsolutePath();
      int len=FileUtil.zipSuffixLength(path);
      if (len < 1) {
        log("String_Node_Str" + path);
      }
 else {
        path=path.substring(0,path.length() - len) + "String_Node_Str";
        tmpOutjar=new File(path);
      }
    }
    if (null == tmpOutjar) {
      cmd.addFlagged("String_Node_Str",outjar.getAbsolutePath());
    }
 else {
      cmd.addFlagged("String_Node_Str",tmpOutjar.getAbsolutePath());
    }
    outjarFixedup=true;
  }
  result.addAll(cmd.extractArguments());
  addListArgs(result);
  String[] command=(String[])result.toArray(new String[0]);
  if (null != commandEditor) {
    command=commandEditor.editCommand(command);
  }
 else   if (null != COMMAND_EDITOR) {
    command=COMMAND_EDITOR.editCommand(command);
  }
  return command;
}
Program: 9610
Project: 9610
Buggy source:
protected AjcTask getTask(String input){
  AjcTask task=new AjcTask();
  Project p=new Project();
  task.setProject(p);
  task.setDestdir(getTempDir());
  if (NOFILE.equals(input)) {
  }
 else   if (input.endsWith("String_Node_Str")) {
    if (-1 != input.indexOf("String_Node_Str")) {
      throw new IllegalArgumentException("String_Node_Str" + input);
    }
 else     if (null == testdataDir) {
      throw new Error("String_Node_Str");
    }
 else {
      String path=testdataDir + File.separator + input;
      task.setArgfiles(new Path(task.getProject(),path));
    }
  }
 else   if ((input.endsWith("String_Node_Str") || input.endsWith("String_Node_Str"))) {
    FilenameSelector fns=new FilenameSelector();
    fns.setName(input);
    task.addFilename(fns);
  }
 else {
    File dir=new File(input);
    if (dir.canRead() && dir.isDirectory()) {
      task.setSourceRoots(new Path(task.getProject(),input));
    }
  }
  task.setClasspath(new Path(p,"String_Node_Str"));
  task.setVerbose(true);
  return task;
}

Fixed version (ground truth):
protected AjcTask getTask(String input,File destDir){
  AjcTask task=new AjcTask();
  Project p=new Project();
  task.setProject(p);
  if (null != destDir) {
    task.setDestdir(destDir);
  }
  if (NOFILE.equals(input)) {
  }
 else   if (input.endsWith("String_Node_Str")) {
    if (-1 != input.indexOf("String_Node_Str")) {
      throw new IllegalArgumentException("String_Node_Str" + input);
    }
 else     if (null == testdataDir) {
      throw new Error("String_Node_Str");
    }
 else {
      String path=testdataDir + File.separator + input;
      task.setArgfiles(new Path(task.getProject(),path));
    }
  }
 else   if ((input.endsWith("String_Node_Str") || input.endsWith("String_Node_Str"))) {
    FilenameSelector fns=new FilenameSelector();
    fns.setName(input);
    task.addFilename(fns);
  }
 else {
    File dir=new File(input);
    if (dir.canRead() && dir.isDirectory()) {
      task.setSourceRoots(new Path(task.getProject(),input));
    }
  }
  task.setClasspath(new Path(p,"String_Node_Str"));
  return task;
}
Program: 9613
Project: 9613
Buggy source:
public void openFile(String filePath){
  try {
    if (filePath.endsWith("String_Node_Str")) {
      AjdeUIManager.getDefault().getBuildConfigEditor().openFile(filePath);
      topFrame.setEditorPanel(AjdeUIManager.getDefault().getBuildConfigEditor());
    }
 else     if (filePath.endsWith("String_Node_Str") || filePath.endsWith("String_Node_Str")) {
      Ajde.getDefault().getEditorManager().showSourceLine(filePath,0,false);
    }
 else {
      Ajde.getDefault().getErrorHandler().handleError("String_Node_Str" + filePath + "String_Node_Str");
    }
  }
 catch (  IOException ioe) {
    Ajde.getDefault().getErrorHandler().handleError("String_Node_Str" + filePath,ioe);
  }
catch (  InvalidResourceException ire) {
    Ajde.getDefault().getErrorHandler().handleError("String_Node_Str" + filePath,ire);
  }
  browserProjectProperties.setLastOpenSourceFilePath(filePath);
}

Fixed version (ground truth):
public void openFile(String filePath){
  try {
    if (filePath.endsWith("String_Node_Str")) {
      AjdeUIManager.getDefault().getBuildConfigEditor().openFile(filePath);
      topFrame.setEditorPanel(AjdeUIManager.getDefault().getBuildConfigEditor());
    }
 else     if (filePath.endsWith("String_Node_Str") || filePath.endsWith("String_Node_Str")) {
      editorManager.showSourceLine(filePath,0,false);
    }
 else {
      Ajde.getDefault().getErrorHandler().handleError("String_Node_Str" + filePath + "String_Node_Str");
    }
  }
 catch (  IOException ioe) {
    Ajde.getDefault().getErrorHandler().handleError("String_Node_Str" + filePath,ioe);
  }
catch (  InvalidResourceException ire) {
    Ajde.getDefault().getErrorHandler().handleError("String_Node_Str" + filePath,ire);
  }
  browserProjectProperties.setLastOpenSourceFilePath(filePath);
}
Program: 9614
Project: 9614
Buggy source:
public void saveAll(){
  Ajde.getDefault().getEditorManager().saveContents();
}

Fixed version (ground truth):
public void saveAll(){
  editorManager.saveContents();
}
Program: 9615
Project: 9615
Buggy source:
/** 
 * called when user double-clicks on a message.
 */
protected void displayMessage(IMessage message){
  ISourceLocation loc=message.getISourceLocation();
  Ajde.getDefault().getEditorManager().showSourceLine(loc,true);
  Throwable thrown=message.getThrown();
  if (null != thrown) {
    Ajde.getDefault().getErrorHandler().handleError(message.getMessage(),thrown);
  }
}

Fixed version (ground truth):
/** 
 * called when user double-clicks on a message.
 */
protected void displayMessage(IMessage message){
  ISourceLocation loc=message.getISourceLocation();
  BrowserManager.getDefault().getEditorManager().showSourceLine(loc,true);
  Throwable thrown=message.getThrown();
  if (null != thrown) {
    Ajde.getDefault().getErrorHandler().handleError(message.getMessage(),thrown);
  }
}
Program: 9616
Project: 9616
Buggy source:
void save_button_actionPerformed(ActionEvent e){
  Ajde.getDefault().getEditorManager().saveContents();
}

Fixed version (ground truth):
void save_button_actionPerformed(ActionEvent e){
  BrowserManager.getDefault().getEditorManager().saveContents();
}
Program: 9617
Project: 9617
Buggy source:
void jMenuItem1_actionPerformed(ActionEvent e){
  Ajde.getDefault().getEditorManager().saveContents();
}

Fixed version (ground truth):
void jMenuItem1_actionPerformed(ActionEvent e){
  BrowserManager.getDefault().getEditorManager().saveContents();
}
Program: 9618
Project: 9618
Buggy source:
public void resolve(ClassScope upperScope){
  if (ignoreFurtherInvestigation)   return;
  ClassScope newParent=new InterTypeScope(upperScope,onTypeBinding);
  scope.parent=newParent;
  this.scope.isStatic=Modifier.isStatic(declaredModifiers);
  super.resolve(newParent);
  fixSuperCallsInBody();
}

Fixed version (ground truth):
public void resolve(ClassScope upperScope){
  if (ignoreFurtherInvestigation)   return;
  ClassScope newParent=new InterTypeScope(upperScope,onTypeBinding);
  scope.parent=newParent;
  this.scope.isStatic=Modifier.isStatic(declaredModifiers);
  fixSuperCallsForInterfaceContext(upperScope);
  if (ignoreFurtherInvestigation)   return;
  super.resolve(newParent);
  fixSuperCallsInBody();
}
Program: 9619
Project: 9619
Buggy source:
/** 
 * Generate AjBuildConfig from the local configFile parameter plus global project and build options. Errors signalled using signal... methods.
 * @param configFile
 * @return null if invalid configuration, corresponding AjBuildConfig otherwise
 */
public AjBuildConfig genBuildConfig(String configFile){
  init();
  File config=new File(configFile);
  if (!config.exists()) {
    signalError("String_Node_Str" + configFile + "String_Node_Str");
    return null;
  }
  String[] args=new String[]{"String_Node_Str" + config.getAbsolutePath()};
  CountingMessageHandler counter=CountingMessageHandler.makeCountingMessageHandler(messageHandler);
  AjBuildConfig local=AjdtCommand.genBuildConfig(args,counter);
  if (counter.hasErrors()) {
    return null;
  }
  local.setConfigFile(config);
  AjBuildConfig global=new AjBuildConfig();
  BuildOptionsAdapter buildOptions=Ajde.getDefault().getBuildManager().getBuildOptions();
  if (!configureBuildOptions(global,buildOptions,counter)) {
    return null;
  }
  ProjectPropertiesAdapter projectOptions=Ajde.getDefault().getProjectProperties();
  configureProjectOptions(global,projectOptions);
  local.installGlobals(global);
  String errs=local.configErrors();
  if (null != errs) {
    MessageUtil.error(counter,errs);
    return null;
  }
  local.setGenerateModelMode(true);
  return fixupBuildConfig(local,global,buildOptions,projectOptions);
}

Fixed version (ground truth):
/** 
 * Generate AjBuildConfig from the local configFile parameter plus global project and build options. Errors signalled using signal... methods.
 * @param configFile
 * @return null if invalid configuration, corresponding AjBuildConfig otherwise
 */
public AjBuildConfig genBuildConfig(String configFile){
  init();
  File config=new File(configFile);
  if (!config.exists()) {
    signalError("String_Node_Str" + configFile + "String_Node_Str");
    return null;
  }
  String[] args=new String[]{"String_Node_Str" + config.getAbsolutePath()};
  CountingMessageHandler counter=CountingMessageHandler.makeCountingMessageHandler(messageHandler);
  BuildArgParser parser=new BuildArgParser();
  AjBuildConfig local=parser.genBuildConfig(args,counter,false);
  if (counter.hasErrors()) {
    return null;
  }
  local.setConfigFile(config);
  AjBuildConfig global=new AjBuildConfig();
  BuildOptionsAdapter buildOptions=Ajde.getDefault().getBuildManager().getBuildOptions();
  if (!configureBuildOptions(global,buildOptions,counter)) {
    return null;
  }
  ProjectPropertiesAdapter projectOptions=Ajde.getDefault().getProjectProperties();
  configureProjectOptions(global,projectOptions);
  local.installGlobals(global);
  String errs=local.configErrors();
  if (null != errs) {
    MessageUtil.error(counter,errs);
    return null;
  }
  local.setGenerateModelMode(true);
  return fixupBuildConfig(local,global,buildOptions,projectOptions);
}
Program: 9622
Project: 9622
Buggy source:
public MethodBinding getPrivilegedAccessMethod(MethodBinding baseMethod,AstNode location){
  if (baseMethod.alwaysNeedsAccessMethod())   return baseMethod;
  ResolvedMember key=inAspect.factory.makeResolvedMember(baseMethod);
  if (accessors.containsKey(key))   return (MethodBinding)accessors.get(key);
  MethodBinding ret;
  if (baseMethod.isConstructor()) {
    ret=baseMethod;
  }
 else {
    ret=inAspect.factory.makeMethodBinding(AjcMemberMaker.privilegedAccessMethodForMethod(inAspect.typeX,key));
  }
  checkWeaveAccess(key.getDeclaringType(),location);
  accessors.put(key,ret);
  return ret;
}

Fixed version (ground truth):
public MethodBinding getPrivilegedAccessMethod(MethodBinding baseMethod,AstNode location){
  if (baseMethod.alwaysNeedsAccessMethod())   return baseMethod;
  ResolvedMember key=EclipseFactory.makeResolvedMember(baseMethod);
  if (accessors.containsKey(key))   return (MethodBinding)accessors.get(key);
  MethodBinding ret;
  if (baseMethod.isConstructor()) {
    ret=new MethodBinding(baseMethod,baseMethod.declaringClass);
    ret.modifiers=AstUtil.makePublic(ret.modifiers);
  }
 else {
    ret=inAspect.factory.makeMethodBinding(AjcMemberMaker.privilegedAccessMethodForMethod(inAspect.typeX,key));
  }
  checkWeaveAccess(key.getDeclaringType(),location);
  accessors.put(key,ret);
  return ret;
}
Program: 9623
Project: 9623
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.INFO;
  if (value instanceof CompilerMessage) {
    CompilerMessage cm=(CompilerMessage)value;
    label=cm.message.getMessage();
    if (LangUtil.isEmpty(label)) {
      label=cm.message.toString();
    }
    kind=cm.message.getKind();
    Throwable thrown=cm.message.getThrown();
    if (null != thrown) {
      detail=LangUtil.renderException(thrown);
    }
  }
 else   if (null != value) {
    label=value.toString();
  }
  setText(label);
  if (kind.equals(IMessage.WARNING)) {
    setIcon(AjdeUIManager.getDefault().getIconRegistry().getWarningIcon());
  }
 else   if (IMessage.ERROR.isSameOrLessThan(kind)) {
    setIcon(AjdeUIManager.getDefault().getIconRegistry().getErrorIcon());
  }
 else {
    setIcon(null);
  }
  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.INFO;
  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(AjdeUIManager.getDefault().getIconRegistry().getWarningIcon());
  }
 else   if (IMessage.ERROR.isSameOrLessThan(kind)) {
    setIcon(AjdeUIManager.getDefault().getIconRegistry().getErrorIcon());
  }
 else {
    setIcon(null);
  }
  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: 9624
Project: 9624
Buggy source:
/** 
 * Compile using ajc per settings.
 * @exception BuildException if the compilation has problemsor if there were compiler errors and failonerror is true.
 */
public void execute() throws BuildException {
  if (executing) {
    throw new IllegalStateException("String_Node_Str");
  }
 else {
    executing=true;
  }
  try {
    String[] args=makeCommand();
    if (verbose || listFileArgs) {
      log("String_Node_Str" + Arrays.asList(args),Project.MSG_VERBOSE);
    }
    if (!fork) {
      executeInSameVM(args);
    }
 else {
      executeInOtherVM(args);
    }
  }
 catch (  BuildException e) {
    throw e;
  }
catch (  Throwable x) {
    System.err.println(Main.renderExceptionForUser(x));
    throw new BuildException("String_Node_Str" + LangUtil.unqualifiedClassName(x) + "String_Node_Str");
  }
 finally {
    executing=false;
    if (null != tmpOutjar) {
      tmpOutjar.delete();
    }
  }
}

Fixed version (ground truth):
/** 
 * Compile using ajc per settings.
 * @exception BuildException if the compilation has problemsor if there were compiler errors and failonerror is true.
 */
public void execute() throws BuildException {
  if (executing) {
    throw new IllegalStateException("String_Node_Str");
  }
 else {
    executing=true;
  }
  verifyOptions();
  try {
    String[] args=makeCommand();
    if (verbose || listFileArgs) {
      log("String_Node_Str" + Arrays.asList(args),Project.MSG_VERBOSE);
    }
    if (!fork) {
      executeInSameVM(args);
    }
 else {
      executeInOtherVM(args);
    }
  }
 catch (  BuildException e) {
    throw e;
  }
catch (  Throwable x) {
    System.err.println(Main.renderExceptionForUser(x));
    throw new BuildException("String_Node_Str" + LangUtil.unqualifiedClassName(x) + "String_Node_Str");
  }
 finally {
    executing=false;
    if (null != tmpOutjar) {
      tmpOutjar.delete();
    }
  }
}
Program: 9625
Project: 9625
Buggy source:
/** 
 * to use this same Task more than once (testing) 
 */
public void reset(){
  adapterArguments=null;
  adapterFiles=new ArrayList();
  argfiles=null;
  executing=false;
  aspectpath=null;
  bootclasspath=null;
  classpath=null;
  cmd=new GuardedCommand();
  cmdLength=0;
  copyInjars=false;
  destDir=DEFAULT_DESTDIR;
  executing=false;
  executingInOtherVM=false;
  extdirs=null;
  failonerror=false;
  forkclasspath=null;
  inIncrementalMode=false;
  inIncrementalFileMode=false;
  ignored=new ArrayList();
  injars=null;
  listFileArgs=false;
  maxMem=null;
  messageHolder=null;
  outjar=null;
  sourceRootCopyFilter=null;
  sourceRoots=null;
  srcdir=null;
  tmpOutjar=null;
  verbose=false;
}

Fixed version (ground truth):
/** 
 * to use this same Task more than once (testing) 
 */
public void reset(){
  adapterArguments=null;
  adapterFiles=new ArrayList();
  argfiles=null;
  executing=false;
  aspectpath=null;
  bootclasspath=null;
  classpath=null;
  cmd=new GuardedCommand();
  copyInjars=false;
  destDir=DEFAULT_DESTDIR;
  executing=false;
  executingInOtherVM=false;
  extdirs=null;
  failonerror=true;
  forkclasspath=null;
  inIncrementalMode=false;
  inIncrementalFileMode=false;
  ignored=new ArrayList();
  injars=null;
  listFileArgs=false;
  maxMem=null;
  messageHolder=null;
  outjar=null;
  sourceRootCopyFilter=null;
  sourceRoots=null;
  srcdir=null;
  tmpOutjar=null;
  verbose=false;
}
Program: 9627
Project: 9627
Buggy source:
/** 
 * Find aspectjtools.jar in the system classpath. Accept <code>aspectj{-}tools{...}.jar</code> mainly to support build systems using maven-style  re-naming  (e.g., <code>aspectj-tools-1.1.0.jar</code>.
 * @return readable File for aspectjtools.jar, or null if not found.
 */
public static File findAspectjtoolsJar(){
  final Path classpath=Path.systemClasspath;
  final String[] paths=classpath.list();
  final String prefix="String_Node_Str";
  final String infix="String_Node_Str";
  final String altInfix="String_Node_Str";
  final String suffix="String_Node_Str";
  final int prefixLength=prefix.length();
  final int minLength=prefixLength + infix.length() + suffix.length();
  for (int i=0; i < paths.length; i++) {
    String path=paths[i];
    if (!paths[i].endsWith(suffix)) {
      continue;
    }
    int loc=path.lastIndexOf(prefix);
    if ((-1 != loc) && ((loc + minLength) <= path.length())) {
      String rest=path.substring(loc + prefixLength);
      if (-1 != rest.indexOf(File.pathSeparator)) {
        continue;
      }
      if (rest.startsWith(infix) || rest.startsWith(altInfix)) {
        File result=new File(path);
        if (result.canRead() && result.isFile()) {
          return result;
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Find aspectjtools.jar on the task or system classpath. Accept <code>aspectj{-}tools{...}.jar</code> mainly to support build systems using maven-style  re-naming  (e.g., <code>aspectj-tools-1.1.0.jar</code>. Note that we search the task classpath first,  though an entry on the system classpath would be loaded first, because it seems more correct as the more specific one.
 * @return readable File for aspectjtools.jar, or null if not found.
 */
public static File findAspectjtoolsJar(){
  File result=null;
  ClassLoader loader=AjcTask.class.getClassLoader();
  if (loader instanceof AntClassLoader) {
    AntClassLoader taskLoader=(AntClassLoader)loader;
    String cp=taskLoader.getClasspath();
    String[] cps=LangUtil.splitClasspath(cp);
    for (int i=0; (i < cps.length) && (null == result); i++) {
      result=isAspectjtoolsjar(cps[i]);
    }
  }
  if (null == result) {
    final Path classpath=Path.systemClasspath;
    final String[] paths=classpath.list();
    for (int i=0; (i < paths.length) && (null == result); i++) {
      result=isAspectjtoolsjar(paths[i]);
    }
  }
  return (null == result ? null : result.getAbsoluteFile());
}
Program: 9628
Project: 9628
Buggy source:
public void setIncremental(boolean incremental){
  cmd.addFlag("String_Node_Str",incremental);
  inIncrementalMode=true;
}

Fixed version (ground truth):
public void setIncremental(boolean incremental){
  cmd.addFlag("String_Node_Str",incremental);
  inIncrementalMode=incremental;
}
Program: 9629
Project: 9629
Buggy source:
public void testCompileErrorList(){
  AjcTask task=getTask("String_Node_Str");
  runTest(task,NO_EXCEPTION,MessageHolderChecker.ONE_ERROR);
}

Fixed version (ground truth):
public void testCompileErrorList(){
  AjcTask task=getTask("String_Node_Str");
  task.setFailonerror(false);
  runTest(task,NO_EXCEPTION,MessageHolderChecker.ONE_ERROR);
}
Program: 9630
Project: 9630
Buggy source:
public void testCompileErrorFile(){
  AjcTask task=getTask("String_Node_Str");
  runTest(task,NO_EXCEPTION,MessageHolderChecker.ONE_ERROR);
}

Fixed version (ground truth):
public void testCompileErrorFile(){
  AjcTask task=getTask("String_Node_Str");
  task.setFailonerror(false);
  runTest(task,NO_EXCEPTION,MessageHolderChecker.ONE_ERROR);
}
Program: 9631
Project: 9631
Buggy source:
public void testCompileWarningFile(){
  AjcTask task=getTask("String_Node_Str");
  runTest(task,NO_EXCEPTION,MessageHolderChecker.ONE_WARNING);
}

Fixed version (ground truth):
public void testCompileWarningFile(){
  AjcTask task=getTask("String_Node_Str");
  task.setFailonerror(false);
  runTest(task,NO_EXCEPTION,MessageHolderChecker.ONE_WARNING);
}
Program: 9632
Project: 9632
Buggy source:
public void testNoSuchFile(){
  AjcTask task=getTask("String_Node_Str");
  runTest(task,NO_EXCEPTION,MessageHolderChecker.ONE_ERROR_ONE_ABORT);
}

Fixed version (ground truth):
public void testNoSuchFile(){
  AjcTask task=getTask("String_Node_Str");
  task.setFailonerror(false);
  runTest(task,NO_EXCEPTION,MessageHolderChecker.ONE_ERROR_ONE_ABORT);
}
Program: 9633
Project: 9633
Buggy source:
public void testFindAspectjtoolsJar(){
  File toolsJar=AjcTask.findAspectjtoolsJar();
}

Fixed version (ground truth):
public void testFindAspectjtoolsJar(){
  File toolsJar=AjcTask.findAspectjtoolsJar();
  if (null != toolsJar) {
    assertNull("String_Node_Str" + toolsJar,toolsJar);
  }
}
Program: 9634
Project: 9634
Buggy source:
public void testNoSuchFileList(){
  AjcTask task=getTask("String_Node_Str");
  runTest(task,NO_EXCEPTION,MessageHolderChecker.ONE_ERROR_ONE_ABORT);
}

Fixed version (ground truth):
public void testNoSuchFileList(){
  AjcTask task=getTask("String_Node_Str");
  task.setFailonerror(false);
  runTest(task,NO_EXCEPTION,MessageHolderChecker.ONE_ERROR_ONE_ABORT);
}
Program: 9635
Project: 9635
Buggy source:
public void testNoFile(){
  AjcTask task=getTask(NOFILE);
  runTest(task,NO_EXCEPTION,MessageHolderChecker.ONE_ERROR_ONE_ABORT);
}

Fixed version (ground truth):
public void testNoFile(){
  AjcTask task=getTask(NOFILE);
  task.setFailonerror(false);
  runTest(task,NO_EXCEPTION,MessageHolderChecker.ONE_ERROR_ONE_ABORT);
}
Program: 9636
Project: 9636
Buggy source:
public void outputClassFiles(CompilationResult unitResult){
  if (unitResult == null)   return;
  String sourceFileName=new String(unitResult.fileName);
  if (!(unitResult.hasErrors() && !proceedOnError())) {
    List unwovenClassFiles=new ArrayList();
    Enumeration classFiles=unitResult.compiledTypes.elements();
    while (classFiles.hasMoreElements()) {
      ClassFile classFile=(ClassFile)classFiles.nextElement();
      String filename=new String(classFile.fileName());
      filename=filename.replace('/',File.separatorChar) + "String_Node_Str";
      File destinationPath=buildConfig.getOutputDir();
      if (destinationPath == null) {
        destinationPath=new File(extractDestinationPathFromSourceFile(unitResult));
      }
      filename=new File(destinationPath,filename).getPath();
      unwovenClassFiles.add(new UnwovenClassFile(filename,classFile.getBytes()));
    }
    state.noteClassesFromFile(unitResult,sourceFileName,unwovenClassFiles);
  }
 else {
    state.noteClassesFromFile(null,sourceFileName,Collections.EMPTY_LIST);
  }
}

Fixed version (ground truth):
public void outputClassFiles(CompilationResult unitResult){
  if (unitResult == null)   return;
  String sourceFileName=new String(unitResult.fileName);
  if (!(unitResult.hasErrors() && !proceedOnError())) {
    List unwovenClassFiles=new ArrayList();
    Enumeration classFiles=unitResult.compiledTypes.elements();
    while (classFiles.hasMoreElements()) {
      ClassFile classFile=(ClassFile)classFiles.nextElement();
      String filename=new String(classFile.fileName());
      filename=filename.replace('/',File.separatorChar) + "String_Node_Str";
      File destinationPath=buildConfig.getOutputDir();
      if (destinationPath == null) {
        filename=new File(filename).getName();
        filename=new File(extractDestinationPathFromSourceFile(unitResult),filename).getPath();
      }
 else {
        filename=new File(destinationPath,filename).getPath();
      }
      unwovenClassFiles.add(new UnwovenClassFile(filename,classFile.getBytes()));
    }
    state.noteClassesFromFile(unitResult,sourceFileName,unwovenClassFiles);
  }
 else {
    state.noteClassesFromFile(null,sourceFileName,Collections.EMPTY_LIST);
  }
}
Program: 9637
Project: 9637
Buggy source:
/** 
 * returns -1 if no source line attribute 
 */
public static int getSourceLine(InstructionHandle ih){
  if (ih == null)   return -1;
  InstructionTargeter[] ts=ih.getTargeters();
  if (ts != null) {
    for (int j=ts.length - 1; j >= 0; j--) {
      InstructionTargeter t=ts[j];
      if (t instanceof LineNumberTag) {
        return ((LineNumberTag)t).getLineNumber();
      }
    }
  }
  return getSourceLine(ih.getNext());
}

Fixed version (ground truth):
/** 
 * returns -1 if no source line attribute 
 */
public static int getSourceLine(InstructionHandle ih){
  int lookahead=0;
  while (lookahead++ < 100) {
    if (ih == null)     return -1;
    InstructionTargeter[] ts=ih.getTargeters();
    if (ts != null) {
      for (int j=ts.length - 1; j >= 0; j--) {
        InstructionTargeter t=ts[j];
        if (t instanceof LineNumberTag) {
          return ((LineNumberTag)t).getLineNumber();
        }
      }
    }
    ih=ih.getNext();
  }
  return -1;
}
Program: 9639
Project: 9639
Buggy source:
public Path createBootclasspath(){
  if (classpath == null) {
    classpath=new Path(project);
  }
  return classpath.createPath();
}

Fixed version (ground truth):
public Path createBootclasspath(){
  if (bootclasspath == null) {
    bootclasspath=new Path(project);
  }
  return bootclasspath.createPath();
}
Program: 9640
Project: 9640
Buggy source:
public Path createClasspath(){
  if (bootclasspath == null) {
    bootclasspath=new Path(project);
  }
  return bootclasspath.createPath();
}

Fixed version (ground truth):
public Path createClasspath(){
  if (classpath == null) {
    classpath=new Path(project);
  }
  return classpath.createPath();
}
Program: 9641
Project: 9641
Buggy source:
/** 
 * Compile using ajc per settings.
 * @exception BuildException if the compilation has problemsor if there were compiler errors and failonerror is true.
 */
public void execute() throws BuildException {
  if (executing) {
    throw new IllegalStateException("String_Node_Str");
  }
 else {
    executing=true;
  }
  try {
    if (0 < ignored.size()) {
      for (Iterator iter=ignored.iterator(); iter.hasNext(); ) {
        log("String_Node_Str" + iter.next(),Project.MSG_INFO);
      }
    }
    if (null != outjar) {
      if (copyInjars || (null != sourceRootCopyFilter)) {
        String path=outjar.getAbsolutePath();
        int len=FileUtil.zipSuffixLength(path);
        if (len < 1) {
          log("String_Node_Str" + path);
        }
 else {
          path=path.substring(0,path.length() - len) + "String_Node_Str";
          tmpOutjar=new File(path);
        }
      }
      if (null == tmpOutjar) {
        cmd.addFlagged("String_Node_Str",outjar.getAbsolutePath());
      }
 else {
        cmd.addFlagged("String_Node_Str",tmpOutjar.getAbsolutePath());
      }
    }
    addListArgs();
    if (verbose || listFileArgs) {
      String[] args=cmd.extractArguments();
      log("String_Node_Str" + Arrays.asList(args),Project.MSG_VERBOSE);
    }
    if (!fork) {
      executeInSameVM();
    }
 else {
      executeInOtherVM();
    }
  }
 catch (  BuildException e) {
    throw e;
  }
catch (  Throwable x) {
    System.err.println(Main.renderExceptionForUser(x));
    throw new BuildException("String_Node_Str" + LangUtil.unqualifiedClassName(x) + "String_Node_Str");
  }
 finally {
    executing=false;
    if (null != tmpOutjar) {
      tmpOutjar.delete();
    }
  }
}

Fixed version (ground truth):
/** 
 * Compile using ajc per settings.
 * @exception BuildException if the compilation has problemsor if there were compiler errors and failonerror is true.
 */
public void execute() throws BuildException {
  if (executing) {
    throw new IllegalStateException("String_Node_Str");
  }
 else {
    executing=true;
  }
  try {
    boolean copyArgs=false;
    setupCommand(copyArgs);
    if (verbose || listFileArgs) {
      String[] args=cmd.extractArguments();
      log("String_Node_Str" + Arrays.asList(args),Project.MSG_VERBOSE);
    }
    if (!fork) {
      executeInSameVM();
    }
 else {
      executeInOtherVM();
    }
  }
 catch (  BuildException e) {
    throw e;
  }
catch (  Throwable x) {
    System.err.println(Main.renderExceptionForUser(x));
    throw new BuildException("String_Node_Str" + LangUtil.unqualifiedClassName(x) + "String_Node_Str");
  }
 finally {
    executing=false;
    if (null != tmpOutjar) {
      tmpOutjar.delete();
    }
  }
}
Program: 9642
Project: 9642
Buggy source:
public LazyClassGen(BcelObjectType myType){
  myGen=new ClassGen(myType.getJavaClass());
  constantPoolGen=myGen.getConstantPool();
  fact=new InstructionFactory(constantPoolGen);
  this.myType=myType;
  Method[] methods=myGen.getMethods();
  for (int i=0; i < methods.length; i++) {
    addMethodGen(new LazyMethodGen(methods[i],this));
  }
}

Fixed version (ground truth):
public LazyClassGen(BcelObjectType myType){
  myGen=new ClassGen(myType.getJavaClass());
  constantPoolGen=myGen.getConstantPool();
  fact=new InstructionFactory(myGen,constantPoolGen);
  this.myType=myType;
  Method[] methods=myGen.getMethods();
  for (int i=0; i < methods.length; i++) {
    addMethodGen(new LazyMethodGen(methods[i],this));
  }
}