nus-yam/ex-repair huggingface dataset:
Program: 30133
Project: 30133
Buggy source:
@Override public void init(FilterConfig filterConfig) throws ServletException {
  Enumeration<String> paramNames=filterConfig.getInitParameterNames();
  while (paramNames.hasMoreElements()) {
    String paramName=paramNames.nextElement();
    if (!IntrospectionUtils.setProperty(this,paramName,filterConfig.getInitParameter(paramName))) {
      getLogger().warning(sm.getString("String_Node_Str",paramName,this.getClass().getName()));
    }
  }
}

Fixed version (ground truth):
@Override public void init(FilterConfig filterConfig) throws ServletException {
  Enumeration<String> paramNames=filterConfig.getInitParameterNames();
  while (paramNames.hasMoreElements()) {
    String paramName=paramNames.nextElement();
    if (!IntrospectionUtils.setProperty(this,paramName,filterConfig.getInitParameter(paramName))) {
      String msg=sm.getString("String_Node_Str",paramName,this.getClass().getName());
      if (isConfigProblemFatal()) {
        throw new ServletException(msg);
      }
 else {
        getLogger().warning(msg);
      }
    }
  }
}
Program: 30135
Project: 30135
Buggy source:
public Object run(){
  thisInstance.flush();
  thisInstance.close();
  try {
    if (!absoluteFile.exists()) {
      File creatingDeletedLogFile=new File(absoluteFile.getAbsolutePath());
      creatingDeletedLogFile.createNewFile();
      absoluteFile=creatingDeletedLogFile;
    }
    File oldFile=absoluteFile;
    StringBuffer renamedFileName=new StringBuffer(absoluteFile + "String_Node_Str");
    logRotateDateFormatter.format(new Date(),renamedFileName,new FieldPosition(0));
    File rotatedFile=new File(renamedFileName.toString());
    boolean renameSuccess=oldFile.renameTo(rotatedFile);
    if (!renameSuccess) {
      FileUtils.copy(absoluteFile,rotatedFile);
      File freshServerLogFile=getLogFileName();
      FileOutputStream fo=new FileOutputStream(freshServerLogFile);
      fo.close();
    }
    openFile(getLogFileName());
    absoluteFile=getLogFileName();
    if (dayBasedFileRotation) {
      LogRotationTimer.getInstance().restartTimerForDayBasedRotation();
    }
 else {
      LogRotationTimer.getInstance().restartTimer();
    }
    cleanUpHistoryLogFiles();
  }
 catch (  IOException ix) {
    publish(new LogRecord(Level.SEVERE,"String_Node_Str" + ix.getMessage()));
  }
  return null;
}

Fixed version (ground truth):
public Object run(){
  thisInstance.flush();
  thisInstance.close();
  try {
    if (!absoluteFile.exists()) {
      File creatingDeletedLogFile=new File(absoluteFile.getAbsolutePath());
      creatingDeletedLogFile.createNewFile();
      absoluteFile=creatingDeletedLogFile;
    }
    File oldFile=absoluteFile;
    StringBuffer renamedFileName=new StringBuffer(absoluteFile + "String_Node_Str");
    logRotateDateFormatter.format(new Date(),renamedFileName,new FieldPosition(0));
    File rotatedFile=new File(renamedFileName.toString());
    boolean renameSuccess=oldFile.renameTo(rotatedFile);
    FileOutputStream oldFileFO=new FileOutputStream(oldFile);
    oldFileFO.close();
    if (!renameSuccess) {
      FileUtils.copy(absoluteFile,rotatedFile);
      File freshServerLogFile=getLogFileName();
      FileOutputStream fo=new FileOutputStream(freshServerLogFile);
      fo.close();
    }
    openFile(getLogFileName());
    absoluteFile=getLogFileName();
    if (dayBasedFileRotation) {
      LogRotationTimer.getInstance().restartTimerForDayBasedRotation();
    }
 else {
      LogRotationTimer.getInstance().restartTimer();
    }
    cleanUpHistoryLogFiles();
  }
 catch (  IOException ix) {
    publish(new LogRecord(Level.SEVERE,"String_Node_Str" + ix.getMessage()));
  }
  return null;
}
Program: 30136
Project: 30136
Buggy source:
MeteredStream(OutputStream out,long written){
  this.out=out;
  this.written=written;
}

Fixed version (ground truth):
MeteredStream(OutputStream out,long written){
  this.out=out;
  this.written=written;
  isOpen=true;
}
Program: 30137
Project: 30137
Buggy source:
public void close() throws IOException {
  out.close();
}

Fixed version (ground truth):
public void close() throws IOException {
  if (isOpen) {
    isOpen=false;
    flush();
    out.close();
  }
}
Program: 30138
Project: 30138
Buggy source:
public void process(ReadableArchive archiveFile,T bundleDesc,ClassLoader classLoader,Parser parser) throws IOException {
  File file=new File(archiveFile.getURI());
  if (parser != null) {
    classParser=parser;
  }
 else {
    ParsingContext.Builder builder=new ParsingContext.Builder();
    builder.logger(logger);
    ParsingContext pc=builder.build();
    classParser=new Parser(pc);
  }
  process(file,bundleDesc,classLoader);
  completeProcess(bundleDesc,archiveFile);
  calculateResults();
}

Fixed version (ground truth):
public void process(ReadableArchive archiveFile,T bundleDesc,ClassLoader classLoader,Parser parser) throws IOException {
  File file=new File(archiveFile.getURI());
  setParser(parser);
  process(file,bundleDesc,classLoader);
  completeProcess(bundleDesc,archiveFile);
  calculateResults();
}
Program: 30139
Project: 30139
Buggy source:
/** 
 * This add all classes in given jarFile to be scanned.
 * @param jarURI
 */
protected void addScanURI(final URI jarURI){
  scannedURI.add(jarURI);
  JarInputStream jis=null;
  try {
    final InputStream jarInputStream=jarURI.toURL().openStream();
    jis=new JarInputStream(jarInputStream);
    JarEntry je;
    while ((je=jis.getNextJarEntry()) != null) {
      if (je.getName().endsWith("String_Node_Str")) {
        if (processAllClasses) {
          addEntry(je);
        }
 else {
          final ByteArrayOutputStream baos=new ByteArrayOutputStream();
          int bytesRead;
          final byte[] buffer=new byte[je.getSize() > -1 ? (int)je.getSize() : DEFAULT_ENTRY_BUFFER_SIZE];
          while ((bytesRead=jis.read(buffer)) != -1) {
            baos.write(buffer,0,bytesRead);
          }
          if (classFile.containsAnnotation(baos.toByteArray())) {
            addEntry(je);
          }
        }
      }
    }
  }
 catch (  Exception ex) {
    logger.log(Level.WARNING,ex.getMessage() + "String_Node_Str" + jarURI.toASCIIString(),ex);
  }
 finally {
    if (jis != null) {
      try {
        jis.close();
      }
 catch (      Exception ex) {
        logger.log(Level.WARNING,jarURI.toASCIIString(),ex);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * This add all classes in given jarFile to be scanned.
 * @param jarURI
 */
protected void addScanURI(final URI jarURI) throws IOException {
  addScanJar(new File(jarURI));
}
Program: 30140
Project: 30140
Buggy source:
/** 
 * This will include all class in directory to be scanned. param directory
 */
protected void addScanDirectory(File directory) throws IOException {
  scannedURI.add(directory.toURI());
  if (processAllClasses) {
    initScanDirectory(directory,directory);
  }
 else {
    classParser.parse(directory,null);
  }
}

Fixed version (ground truth):
/** 
 * This will include all class in directory to be scanned. param directory
 */
protected void addScanDirectory(File directory) throws IOException {
  scannedURI.add(directory.toURI());
  if (needScanAnnotation) {
    classParser.parse(directory,null);
  }
}
Program: 30141
Project: 30141
Buggy source:
/** 
 * This add all classes in given jarFile to be scanned.
 * @param jarFile
 */
protected void addScanJar(File jarFile) throws IOException {
  try {
    if (!jarFile.exists()) {
      return;
    }
    scannedURI.add(jarFile.toURI());
    if (processAllClasses) {
      JarFile jf=null;
      try {
        jf=new JarFile(jarFile);
        Enumeration<JarEntry> entriesEnum=jf.entries();
        while (entriesEnum.hasMoreElements()) {
          JarEntry je=entriesEnum.nextElement();
          if (je.getName().endsWith("String_Node_Str")) {
            addEntry(je);
          }
        }
      }
  finally {
        if (jf != null)         jf.close();
      }
    }
 else {
      classParser.parse(jarFile,null);
    }
  }
 catch (  ZipException ze) {
    logger.log(Level.WARNING,ze.getMessage() + "String_Node_Str" + jarFile.getPath());
  }
}

Fixed version (ground truth):
/** 
 * This add all classes in given jarFile to be scanned.
 * @param jarFile
 */
protected void addScanJar(File jarFile) throws IOException {
  try {
    if (!jarFile.exists()) {
      return;
    }
    scannedURI.add(jarFile.toURI());
    if (needScanAnnotation) {
      classParser.parse(jarFile,null);
    }
  }
 catch (  ZipException ze) {
    logger.log(Level.WARNING,ze.getMessage() + "String_Node_Str" + jarFile.getPath());
  }
}
Program: 30144
Project: 30144
Buggy source:
private ExecutorService createExecutorService(){
  Runtime runtime=Runtime.getRuntime();
  int nrOfProcessors=runtime.availableProcessors();
  return Executors.newFixedThreadPool(nrOfProcessors,new ThreadFactory(){
    @Override public Thread newThread(    Runnable r){
      Thread t=new Thread(r);
      t.setName("String_Node_Str");
      t.setDaemon(true);
      return t;
    }
  }
);
}

Fixed version (ground truth):
private ExecutorService createExecutorService(){
  Runtime runtime=Runtime.getRuntime();
  int nrOfProcessors=runtime.availableProcessors();
  return Executors.newFixedThreadPool(nrOfProcessors,new ThreadFactory(){
    @Override public Thread newThread(    Runnable r){
      Thread t=new Thread(r);
      t.setName("String_Node_Str");
      t.setContextClassLoader(getClass().getClassLoader());
      t.setDaemon(true);
      return t;
    }
  }
);
}
Program: 30145
Project: 30145
Buggy source:
@Override public Thread newThread(Runnable r){
  Thread t=new Thread(r);
  t.setName("String_Node_Str");
  t.setDaemon(true);
  return t;
}

Fixed version (ground truth):
@Override public Thread newThread(Runnable r){
  Thread t=new Thread(r);
  t.setName("String_Node_Str");
  t.setContextClassLoader(getClass().getClassLoader());
  t.setDaemon(true);
  return t;
}
Program: 30146
Project: 30146
Buggy source:
public void executeInitSql(Properties dbProps,String sqlFile){
  try {
    System.out.println("String_Node_Str" + sqlFile);
    Project project=new Project();
    project.init();
    SQLExec task=new SQLExec();
    SQLExec.OnError error=new SQLExec.OnError();
    error.setValue("String_Node_Str");
    task.setDriver("String_Node_Str");
    String url="String_Node_Str" + dbProps.getProperty("String_Node_Str") + "String_Node_Str"+ dbProps.getProperty("String_Node_Str")+ "String_Node_Str"+ dbProps.getProperty(DatabaseProvisioner.DATABASENAME)+ "String_Node_Str";
    task.setUrl(url);
    task.setUserid(dbProps.getProperty(DatabaseProvisioner.USER));
    task.setPassword(dbProps.getProperty(DatabaseProvisioner.PASSWORD));
    task.setSrc(new File(sqlFile));
    task.setOnerror(error);
    String derbyClient=new File(System.getProperty("String_Node_Str")).getParent() + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str"+ File.separator+ "String_Node_Str";
    Path path=new Path(project,derbyClient);
    path.addJavaRuntime();
    task.setClasspath(path);
    task.setProject(project);
    task.setAutocommit(true);
    task.execute();
    System.out.println("String_Node_Str" + sqlFile);
  }
 catch (  Exception ex) {
    logger.log(Level.WARNING,"String_Node_Str" + sqlFile + "String_Node_Str"+ ex);
  }
}

Fixed version (ground truth):
public void executeInitSql(Properties dbProps,String sqlFile){
  try {
    System.out.println("String_Node_Str" + sqlFile);
    Project project=new Project();
    project.init();
    SQLExec task=new SQLExec();
    SQLExec.OnError error=new SQLExec.OnError();
    error.setValue("String_Node_Str");
    task.setDriver("String_Node_Str");
    String url="String_Node_Str" + dbProps.getProperty("String_Node_Str") + "String_Node_Str"+ dbProps.getProperty("String_Node_Str")+ "String_Node_Str"+ dbProps.getProperty(DatabaseProvisioner.DATABASENAME)+ "String_Node_Str";
    task.setUrl(url);
    task.setUserid(dbProps.getProperty(DatabaseProvisioner.USER));
    task.setPassword(dbProps.getProperty(DatabaseProvisioner.PASSWORD));
    task.setSrc(new File(sqlFile));
    task.setOnerror(error);
    Path path=new Path(project,clh.getCommonClassPath());
    path.addJavaRuntime();
    task.setClasspath(path);
    task.setProject(project);
    task.setAutocommit(true);
    task.execute();
    System.out.println("String_Node_Str" + sqlFile);
  }
 catch (  Exception ex) {
    logger.log(Level.WARNING,"String_Node_Str" + sqlFile + "String_Node_Str"+ ex);
  }
}
Program: 30150
Project: 30150
Buggy source:
@Override public List<SocketInfo> extract(IOR ior){
  List<SocketInfo> socketInfo=null;
  try {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,"String_Node_Str",baseMsg);
    }
    IIOPProfileTemplate iiopProfileTemplate=(IIOPProfileTemplate)ior.getProfile().getTaggedProfileTemplate();
    IIOPAddress primary=iiopProfileTemplate.getPrimaryAddress();
    String host=primary.getHost().toLowerCase();
    IIOPSSLUtil sslUtil=null;
    if (Globals.getDefaultHabitat() != null) {
      sslUtil=Globals.getDefaultHabitat().getComponent(IIOPSSLUtil.class);
      socketInfo=(List<SocketInfo>)sslUtil.getSSLPortsAsSocketInfo(ior);
    }
    if (socketInfo == null) {
      if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,"String_Node_Str",baseMsg);
      }
    }
 else {
      if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,"String_Node_Str",baseMsg);
      }
    }
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,"String_Node_Str",baseMsg);
    }
  }
 catch (  Exception ex) {
    _logger.log(Level.WARNING,"String_Node_Str",ex);
  }
 finally {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,"String_Node_Str",new Object[]{baseMsg,socketInfo});
    }
  }
  return socketInfo;
}

Fixed version (ground truth):
@Override public List<SocketInfo> extract(IOR ior){
  List<SocketInfo> socketInfo=null;
  try {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,"String_Node_Str",baseMsg);
    }
    IIOPProfileTemplate iiopProfileTemplate=(IIOPProfileTemplate)ior.getProfile().getTaggedProfileTemplate();
    IIOPAddress primary=iiopProfileTemplate.getPrimaryAddress();
    IIOPSSLUtil sslUtil=null;
    if (Globals.getDefaultHabitat() != null) {
      sslUtil=Globals.getDefaultHabitat().getComponent(IIOPSSLUtil.class);
      socketInfo=(List<SocketInfo>)sslUtil.getSSLPortsAsSocketInfo(ior);
    }
    if (socketInfo == null) {
      if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,"String_Node_Str",baseMsg);
      }
    }
 else {
      if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,"String_Node_Str",baseMsg);
      }
    }
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,"String_Node_Str",baseMsg);
    }
  }
 catch (  Exception ex) {
    _logger.log(Level.WARNING,"String_Node_Str",ex);
  }
 finally {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,"String_Node_Str",new Object[]{baseMsg,socketInfo});
    }
  }
  return socketInfo;
}
Program: 30152
Project: 30152
Buggy source:
/** 
 * This add all classes in given jarFile to be scanned.
 * @param jarURI
 */
protected void addScanURI(final URI jarURI){
  scannedURI.add(jarURI);
  JarInputStream jis=null;
  try {
    final InputStream jarInputStream=jarURI.toURL().openStream();
    if (jarInputStream == null) {
      return;
    }
    jis=new JarInputStream(jarInputStream);
    JarEntry je;
    while ((je=jis.getNextJarEntry()) != null) {
      if (je.getName().endsWith("String_Node_Str")) {
        if (processAllClasses) {
          addEntry(je);
        }
 else {
          final ByteArrayOutputStream baos=new ByteArrayOutputStream();
          int bytesRead;
          final byte[] buffer=new byte[je.getSize() > -1 ? (int)je.getSize() : DEFAULT_ENTRY_BUFFER_SIZE];
          while ((bytesRead=jis.read(buffer)) != -1) {
            baos.write(buffer,0,bytesRead);
          }
          if (classFile.containsAnnotation(baos.toByteArray())) {
            addEntry(je);
          }
        }
      }
    }
  }
 catch (  Exception ex) {
    logger.log(Level.WARNING,ex.getMessage() + "String_Node_Str" + jarURI.toASCIIString(),ex);
  }
 finally {
    if (jis != null) {
      try {
        jis.close();
      }
 catch (      Exception ex) {
        logger.log(Level.WARNING,jarURI.toASCIIString(),ex);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * This add all classes in given jarFile to be scanned.
 * @param jarURI
 */
protected void addScanURI(final URI jarURI){
  scannedURI.add(jarURI);
  JarInputStream jis=null;
  try {
    final InputStream jarInputStream=jarURI.toURL().openStream();
    jis=new JarInputStream(jarInputStream);
    JarEntry je;
    while ((je=jis.getNextJarEntry()) != null) {
      if (je.getName().endsWith("String_Node_Str")) {
        if (processAllClasses) {
          addEntry(je);
        }
 else {
          final ByteArrayOutputStream baos=new ByteArrayOutputStream();
          int bytesRead;
          final byte[] buffer=new byte[je.getSize() > -1 ? (int)je.getSize() : DEFAULT_ENTRY_BUFFER_SIZE];
          while ((bytesRead=jis.read(buffer)) != -1) {
            baos.write(buffer,0,bytesRead);
          }
          if (classFile.containsAnnotation(baos.toByteArray())) {
            addEntry(je);
          }
        }
      }
    }
  }
 catch (  Exception ex) {
    logger.log(Level.WARNING,ex.getMessage() + "String_Node_Str" + jarURI.toASCIIString(),ex);
  }
 finally {
    if (jis != null) {
      try {
        jis.close();
      }
 catch (      Exception ex) {
        logger.log(Level.WARNING,jarURI.toASCIIString(),ex);
      }
    }
  }
}
Program: 30153
Project: 30153
Buggy source:
private T readDeploymentDescriptors(ReadableArchive descriptorArchive,ReadableArchive contentArchive,Application app) throws IOException, SAXParseException {
  T descriptor=readStandardDeploymentDescriptor(descriptorArchive);
  if (descriptor instanceof BundleDescriptor) {
    ((BundleDescriptor)descriptor).setApplication(app);
  }
  ModuleDescriptor newModule=createModuleDescriptor(descriptor);
  newModule.setArchiveUri(contentArchive.getURI().getSchemeSpecificPart());
  return readRestDeploymentDescriptors(descriptor,descriptorArchive,contentArchive,app);
}

Fixed version (ground truth):
/** 
 * Read the standard deployment descriptors (can contained in one or many file) and return the corresponding initialized descriptor instance. By default, the standard deployment descriptors are all contained in the xml file characterized with the path returned by
 * @return the initialized descriptor
 */
private T readDeploymentDescriptors(ReadableArchive descriptorArchive,ReadableArchive contentArchive,Application app) throws IOException, SAXParseException {
  T descriptor=readStandardDeploymentDescriptor(descriptorArchive);
  if (descriptor instanceof BundleDescriptor) {
    ((BundleDescriptor)descriptor).setApplication(app);
  }
  ModuleDescriptor newModule=createModuleDescriptor(descriptor);
  newModule.setArchiveUri(contentArchive.getURI().getSchemeSpecificPart());
  return readRestDeploymentDescriptors(descriptor,descriptorArchive,contentArchive,app);
}
Program: 30154
Project: 30154
Buggy source:
/** 
 * Reads persistence.xml from spec defined pu roots of an ear. Spec defined pu roots are - (1)Non component jars in root of ear (2)jars in lib of ear
 */
@Override public Object open(Archivist main,ReadableArchive earArchive,final RootDeploymentDescriptor descriptor) throws IOException, SAXParseException {
  if (logger.isLoggable(Level.FINE)) {
    logger.logp(Level.FINE,"String_Node_Str","String_Node_Str","String_Node_Str",earArchive.getURI());
  }
  Map<String,ReadableArchive> probablePersitenceArchives=new HashMap<String,ReadableArchive>();
  try {
    final Application app=Application.class.cast(descriptor);
    EARBasedPersistenceHelper.addLibraryAndTopLevelCandidates(earArchive,app,true,probablePersitenceArchives);
    for (    Map.Entry<String,ReadableArchive> pathToArchiveEntry : probablePersitenceArchives.entrySet()) {
      readPersistenceDeploymentDescriptor(main,pathToArchiveEntry.getValue(),pathToArchiveEntry.getKey(),descriptor);
    }
  }
  finally {
    for (    Archive subArchive : probablePersitenceArchives.values()) {
      subArchive.close();
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Reads persistence.xml from spec defined pu roots of an ear. Spec defined pu roots are - (1)Non component jars in root of ear (2)jars in lib of ear
 */
@Override public Object open(Archivist main,ReadableArchive earArchive,final RootDeploymentDescriptor descriptor) throws IOException, SAXParseException {
  if (logger.isLoggable(Level.FINE)) {
    logger.logp(Level.FINE,"String_Node_Str","String_Node_Str","String_Node_Str",earArchive.getURI());
  }
  Map<String,ReadableArchive> probablePersitenceArchives=new HashMap<String,ReadableArchive>();
  try {
    if (!(descriptor instanceof Application)) {
      return null;
    }
    final Application app=Application.class.cast(descriptor);
    EARBasedPersistenceHelper.addLibraryAndTopLevelCandidates(earArchive,app,true,probablePersitenceArchives);
    for (    Map.Entry<String,ReadableArchive> pathToArchiveEntry : probablePersitenceArchives.entrySet()) {
      readPersistenceDeploymentDescriptor(main,pathToArchiveEntry.getValue(),pathToArchiveEntry.getKey(),descriptor);
    }
  }
  finally {
    for (    Archive subArchive : probablePersitenceArchives.values()) {
      subArchive.close();
    }
  }
  return null;
}
Program: 30155
Project: 30155
Buggy source:
public void execute(AdminCommandContext context){
  final ActionReport report=context.getActionReport();
  final Logger logger=context.getLogger();
  File libDir=env.getLibPath();
  if (type.equals("String_Node_Str")) {
    libDir=new File(libDir,"String_Node_Str");
  }
 else   if (type.equals("String_Node_Str")) {
    libDir=new File(libDir,"String_Node_Str");
  }
  ActionReport.MessagePart part=report.getTopMessagePart();
  for (  File libFile : FileUtils.listFiles(libDir)) {
    if (libFile.isFile()) {
      ActionReport.MessagePart childPart=part.addChild();
      childPart.setMessage(libFile.getName());
    }
  }
}

Fixed version (ground truth):
public void execute(AdminCommandContext context){
  final ActionReport report=context.getActionReport();
  File libDir=env.getLibPath();
  if (type.equals("String_Node_Str")) {
    libDir=new File(libDir,"String_Node_Str");
  }
 else   if (type.equals("String_Node_Str")) {
    libDir=new File(libDir,"String_Node_Str");
  }
  ActionReport.MessagePart part=report.getTopMessagePart();
  for (  File libFile : FileUtils.listFiles(libDir)) {
    if (libFile.isFile()) {
      ActionReport.MessagePart childPart=part.addChild();
      childPart.setMessage(libFile.getName());
    }
  }
}
Program: 30156
Project: 30156
Buggy source:
public void execute(AdminCommandContext context){
  final ActionReport report=context.getActionReport();
  final Logger logger=context.getLogger();
  File libDir=env.getLibPath();
  if (type.equals("String_Node_Str")) {
    libDir=new File(libDir,"String_Node_Str");
  }
 else   if (type.equals("String_Node_Str")) {
    libDir=new File(libDir,"String_Node_Str");
  }
  String msg="String_Node_Str";
  for (  String libraryName : names) {
    File libraryFile=new File(libDir,libraryName);
    if (libraryFile.exists()) {
      FileUtils.deleteFile(libraryFile);
    }
 else {
      msg+=localStrings.getLocalString("String_Node_Str","String_Node_Str",libraryFile.getAbsolutePath());
    }
  }
  if (msg.length() > 0) {
    logger.log(Level.WARNING,msg);
    report.setActionExitCode(ActionReport.ExitCode.WARNING);
    report.setMessage(msg);
  }
}

Fixed version (ground truth):
public void execute(AdminCommandContext context){
  final ActionReport report=context.getActionReport();
  final Logger logger=context.getLogger();
  File libDir=env.getLibPath();
  if (type.equals("String_Node_Str")) {
    libDir=new File(libDir,"String_Node_Str");
  }
 else   if (type.equals("String_Node_Str")) {
    libDir=new File(libDir,"String_Node_Str");
  }
  StringBuffer msg=new StringBuffer();
  for (  String libraryName : names) {
    File libraryFile=new File(libDir,libraryName);
    if (libraryFile.exists()) {
      FileUtils.deleteFile(libraryFile);
    }
 else {
      msg.append(localStrings.getLocalString("String_Node_Str","String_Node_Str",libraryFile.getAbsolutePath()));
    }
  }
  if (msg.length() > 0) {
    logger.log(Level.WARNING,msg.toString());
    report.setActionExitCode(ActionReport.ExitCode.WARNING);
    report.setMessage(msg.toString());
  }
}
Program: 30157
Project: 30157
Buggy source:
private List<URI> getURIs(DeploymentContext context){
  List<URI> uris=new ArrayList<URI>();
  uris.add(context.getSource().getURI());
  try {
    File f=new File(context.getSource().getURI());
    if (f.exists() && f.isDirectory()) {
      uris.add(new URI(context.getSource().getURI().toString() + "String_Node_Str"));
    }
    if (context instanceof ExtendedDeploymentContext) {
      if (((ExtendedDeploymentContext)context).getParentContext() == null) {
        List<URL> moduleLibraries=DeploymentUtils.getModuleLibraryJars(context);
        for (        URL url : moduleLibraries) {
          uris.add(url.toURI());
        }
      }
 else {
        ApplicationInfoProvider appInfoProvider=habitat.getComponent(ApplicationInfoProvider.class);
        if (appInfoProvider != null) {
          List<URL> libraryJars=appInfoProvider.getLibraryJars(context);
          for (          URL url : libraryJars) {
            uris.add(url.toURI());
          }
        }
      }
    }
  }
 catch (  Exception e) {
    context.getLogger().log(Level.WARNING,e.getMessage(),e);
  }
  return uris;
}

Fixed version (ground truth):
private List<URI> getURIs(DeploymentContext context){
  List<URI> uris=new ArrayList<URI>();
  uris.add(context.getSource().getURI());
  try {
    File f=new File(context.getSource().getURI());
    if (f.exists() && f.isDirectory()) {
      uris.add(new URI(context.getSource().getURI().toString() + "String_Node_Str"));
    }
    if (context instanceof ExtendedDeploymentContext) {
      if (((ExtendedDeploymentContext)context).getParentContext() == null) {
        List<URL> moduleLibraries=DeploymentUtils.getModuleLibraryJars(context);
        for (        URL url : moduleLibraries) {
          uris.add(Util.toURI(url));
        }
      }
 else {
        ApplicationInfoProvider appInfoProvider=habitat.getComponent(ApplicationInfoProvider.class);
        if (appInfoProvider != null) {
          List<URL> libraryJars=appInfoProvider.getLibraryJars(context);
          for (          URL url : libraryJars) {
            uris.add(Util.toURI(url));
          }
        }
      }
    }
  }
 catch (  Exception e) {
    context.getLogger().log(Level.WARNING,e.getMessage(),e);
  }
  return uris;
}
Program: 30158
Project: 30158
Buggy source:
private void processGeneratedContent(final File generatedContentParam,final ExtendedDeploymentContext deploymentContext,final Logger logger) throws IOException {
  if (generatedContentParam == null) {
    return;
  }
  final File baseDir=deploymentContext.getScratchDir("String_Node_Str").getParentFile().getParentFile();
  baseDir.mkdirs();
  final URI baseURI=baseDir.toURI();
  final ZipFile zipFile=new ZipFile(generatedContentParam);
  for (Enumeration<? extends ZipEntry> entries=zipFile.entries(); entries.hasMoreElements(); ) {
    final ZipEntry zipEntry=entries.nextElement();
    final URI outputFileURI=baseURI.resolve(zipEntry.getName());
    final File outputFile=new File(outputFileURI);
    if (zipEntry.isDirectory()) {
      outputFile.mkdirs();
    }
 else {
      final FileOutputStream os=new FileOutputStream(outputFile);
      FileUtils.copy(zipFile.getInputStream(zipEntry),os,zipEntry.getSize());
    }
  }
}

Fixed version (ground truth):
private void processGeneratedContent(final File generatedContentParam,final ExtendedDeploymentContext deploymentContext,final Logger logger) throws IOException {
  if (generatedContentParam == null) {
    return;
  }
  final File baseDir=deploymentContext.getScratchDir("String_Node_Str").getParentFile().getParentFile();
  baseDir.mkdirs();
  final URI baseURI=baseDir.toURI();
  final ZipFile zipFile=new ZipFile(generatedContentParam);
  for (Enumeration<? extends ZipEntry> entries=zipFile.entries(); entries.hasMoreElements(); ) {
    final ZipEntry zipEntry=entries.nextElement();
    final URI outputFileURI=Util.resolve(baseURI,zipEntry.getName());
    final File outputFile=new File(outputFileURI);
    if (zipEntry.isDirectory()) {
      outputFile.mkdirs();
    }
 else {
      final FileOutputStream os=new FileOutputStream(outputFile);
      FileUtils.copy(zipFile.getInputStream(zipEntry),os,zipEntry.getSize());
    }
  }
}
Program: 30161
Project: 30161
Buggy source:
public void unload(ExtendedDeploymentContext context){
  Logger logger=context.getLogger();
  if (!isLoaded) {
    logger.fine("String_Node_Str");
    return;
  }
  ClassLoader currentClassLoader=Thread.currentThread().getContextClassLoader();
  try {
    Thread.currentThread().setContextClassLoader(appClassLoader);
    context.setClassLoader(appClassLoader);
    super.unload(context);
    for (    ModuleInfo module : getModuleInfos()) {
      module.unload(getSubContext(module,context));
    }
    isLoaded=false;
    if (events != null) {
      events.send(new Event<ApplicationInfo>(Deployment.APPLICATION_UNLOADED,this),false);
    }
    try {
      PreDestroy.class.cast(appClassLoader).preDestroy();
    }
 catch (    Exception e) {
    }
    appClassLoader=null;
    for (    ModuleInfo module : getModuleInfos()) {
      if (module.getClassLoaders() != null) {
        for (        ClassLoader cloader : module.getClassLoaders()) {
          try {
            PreDestroy.class.cast(cloader).preDestroy();
          }
 catch (          Exception e) {
          }
        }
        module.cleanClassLoaders();
      }
    }
  }
  finally {
    Thread.currentThread().setContextClassLoader(currentClassLoader);
    context.setClassLoader(null);
  }
}

Fixed version (ground truth):
public void unload(ExtendedDeploymentContext context){
  Logger logger=context.getLogger();
  if (!isLoaded) {
    logger.fine("String_Node_Str");
    return;
  }
  ClassLoader currentClassLoader=Thread.currentThread().getContextClassLoader();
  try {
    Thread.currentThread().setContextClassLoader(appClassLoader);
    context.setClassLoader(appClassLoader);
    super.unload(context);
    for (    ModuleInfo module : reversedModules) {
      module.unload(getSubContext(module,context));
    }
    isLoaded=false;
    if (events != null) {
      events.send(new Event<ApplicationInfo>(Deployment.APPLICATION_UNLOADED,this),false);
    }
    try {
      PreDestroy.class.cast(appClassLoader).preDestroy();
    }
 catch (    Exception e) {
    }
    appClassLoader=null;
    for (    ModuleInfo module : getModuleInfos()) {
      if (module.getClassLoaders() != null) {
        for (        ClassLoader cloader : module.getClassLoaders()) {
          try {
            PreDestroy.class.cast(cloader).preDestroy();
          }
 catch (          Exception e) {
          }
        }
        module.cleanClassLoaders();
      }
    }
  }
  finally {
    Thread.currentThread().setContextClassLoader(currentClassLoader);
    context.setClassLoader(null);
  }
}
Program: 30162
Project: 30162
Buggy source:
public boolean suspend(Logger logger){
  boolean isSuccess=super.suspend(logger);
  for (  ModuleInfo module : modules) {
    if (!module.suspend(logger)) {
      isSuccess=false;
    }
  }
  return isSuccess;
}

Fixed version (ground truth):
public boolean suspend(Logger logger){
  boolean isSuccess=super.suspend(logger);
  for (  ModuleInfo module : reversedModules) {
    if (!module.suspend(logger)) {
      isSuccess=false;
    }
  }
  return isSuccess;
}
Program: 30163
Project: 30163
Buggy source:
public void clean(ExtendedDeploymentContext context) throws Exception {
  if (appClassLoader != null) {
    try {
      PreDestroy.class.cast(appClassLoader).preDestroy();
    }
 catch (    Exception e) {
    }
    appClassLoader=null;
  }
  super.clean(context);
  for (  ModuleInfo info : modules) {
    info.clean(getSubContext(info,context));
    info=null;
  }
  if (events != null) {
    events.send(new EventListener.Event<DeploymentContext>(Deployment.APPLICATION_CLEANED,context),false);
  }
}

Fixed version (ground truth):
public void clean(ExtendedDeploymentContext context) throws Exception {
  if (appClassLoader != null) {
    try {
      PreDestroy.class.cast(appClassLoader).preDestroy();
    }
 catch (    Exception e) {
    }
    appClassLoader=null;
  }
  super.clean(context);
  for (  ModuleInfo info : reversedModules) {
    info.clean(getSubContext(info,context));
    info=null;
  }
  if (events != null) {
    events.send(new EventListener.Event<DeploymentContext>(Deployment.APPLICATION_CLEANED,context),false);
  }
}
Program: 30164
Project: 30164
Buggy source:
public void addModule(ModuleInfo info){
  modules.add(info);
}

Fixed version (ground truth):
public void addModule(ModuleInfo info){
  modules.add(info);
  reversedModules.addFirst(info);
}
Program: 30165
Project: 30165
Buggy source:
public void stop(ExtendedDeploymentContext context,Logger logger){
  ClassLoader currentClassLoader=Thread.currentThread().getContextClassLoader();
  try {
    Thread.currentThread().setContextClassLoader(appClassLoader);
    context.setClassLoader(appClassLoader);
    super.stop(context,logger);
    for (    ModuleInfo module : getModuleInfos()) {
      module.stop(getSubContext(module,context),logger);
    }
    if (events != null) {
      events.send(new Event<ApplicationInfo>(Deployment.APPLICATION_STOPPED,this),false);
    }
  }
  finally {
    Thread.currentThread().setContextClassLoader(currentClassLoader);
  }
}

Fixed version (ground truth):
public void stop(ExtendedDeploymentContext context,Logger logger){
  ClassLoader currentClassLoader=Thread.currentThread().getContextClassLoader();
  try {
    Thread.currentThread().setContextClassLoader(appClassLoader);
    context.setClassLoader(appClassLoader);
    super.stop(context,logger);
    for (    ModuleInfo module : reversedModules) {
      module.stop(getSubContext(module,context),logger);
    }
    if (events != null) {
      events.send(new Event<ApplicationInfo>(Deployment.APPLICATION_STOPPED,this),false);
    }
  }
  finally {
    Thread.currentThread().setContextClassLoader(currentClassLoader);
  }
}
Program: 30167
Project: 30167
Buggy source:
public void postConstruct(){
  for (  Config config : configs.getConfig()) {
    currentConfig=config;
    try {
      final NetworkConfig networkConfig=currentConfig.getNetworkConfig();
      if (networkConfig == null) {
        createFromScratch();
      }
      normalizeThreadPools();
      if (currentConfig.getHttpService() != null) {
        promoteHttpServiceProperties(currentConfig.getHttpService());
        promoteVirtualServerProperties(currentConfig.getHttpService());
      }
 else {
        Logger.getAnonymousLogger().log(Level.WARNING,String.format("String_Node_Str",currentConfig.getName()));
      }
      promoteSystemProperties();
      addAsadminProtocol(currentConfig.getNetworkConfig());
    }
 catch (    TransactionFailure tf) {
      Logger.getAnonymousLogger().log(Level.SEVERE,"String_Node_Str",tf);
      throw new RuntimeException(tf);
    }
  }
}

Fixed version (ground truth):
public void postConstruct(){
  for (  Config config : configs.getConfig()) {
    currentConfig=config;
    try {
      final NetworkConfig networkConfig=currentConfig.getNetworkConfig();
      if (networkConfig == null) {
        createFromScratch();
      }
      normalizeThreadPools();
      if (currentConfig.getHttpService() != null) {
        promoteHttpServiceProperties(currentConfig.getHttpService());
        promoteVirtualServerProperties(currentConfig.getHttpService());
      }
 else {
        logger.log(Level.WARNING,"String_Node_Str",new String[]{currentConfig.getName()});
      }
      promoteSystemProperties();
      addAsadminProtocol(currentConfig.getNetworkConfig());
    }
 catch (    TransactionFailure tf) {
      logger.log(Level.SEVERE,"String_Node_Str",tf);
      throw new RuntimeException(tf);
    }
  }
}
Program: 30169
Project: 30169
Buggy source:
public <V>V loadMetaData(Class<V> type,DeploymentContext dc){
  WebBundleDescriptor wbd=dc.getModuleMetaData(WebBundleDescriptor.class);
  if (wbd.isStandalone()) {
    DeployCommandParameters params=dc.getCommandParameters(DeployCommandParameters.class);
    String contextRoot=params.contextroot;
    if (contextRoot == null) {
      contextRoot=wbd.getContextRoot();
      if ("String_Node_Str".equals(contextRoot))       contextRoot=null;
    }
    if (contextRoot == null) {
      contextRoot=params.previousContextRoot;
    }
    if (contextRoot == null)     contextRoot=wbd.getModuleDescriptor().getModuleName();
    if (contextRoot == null)     contextRoot=dc.getSource().getName();
    if (!contextRoot.startsWith("String_Node_Str")) {
      contextRoot="String_Node_Str" + contextRoot;
    }
    wbd.setContextRoot(contextRoot);
    wbd.setName(params.name());
    dc.getAppProps().setProperty(ServerTags.CONTEXT_ROOT,contextRoot);
  }
  return null;
}

Fixed version (ground truth):
public <V>V loadMetaData(Class<V> type,DeploymentContext dc){
  WebBundleDescriptor wbd=dc.getModuleMetaData(WebBundleDescriptor.class);
  if (wbd.isStandalone()) {
    DeployCommandParameters params=dc.getCommandParameters(DeployCommandParameters.class);
    String contextRoot=params.contextroot;
    if (contextRoot == null) {
      contextRoot=wbd.getContextRoot();
      if ("String_Node_Str".equals(contextRoot))       contextRoot=null;
    }
    if (contextRoot == null) {
      contextRoot=params.previousContextRoot;
    }
    if (contextRoot == null)     contextRoot=dc.getOriginalSource().getName();
    if (!contextRoot.startsWith("String_Node_Str")) {
      contextRoot="String_Node_Str" + contextRoot;
    }
    wbd.setContextRoot(contextRoot);
    wbd.setName(params.name());
    dc.getAppProps().setProperty(ServerTags.CONTEXT_ROOT,contextRoot);
  }
  return null;
}
Program: 30170
Project: 30170
Buggy source:
public boolean hasMore() throws NamingException {
  return hasMoreElements();
}

Fixed version (ground truth):
@Override public boolean hasMore() throws NamingException {
  return hasMoreElements();
}
Program: 30171
Project: 30171
Buggy source:
public boolean hasMoreElements(){
  return names.hasNext();
}

Fixed version (ground truth):
@Override public boolean hasMoreElements(){
  return names.hasNext();
}
Program: 30172
Project: 30172
Buggy source:
public Object next() throws NamingException {
  return nextElement();
}

Fixed version (ground truth):
@Override public Object next() throws NamingException {
  return nextElement();
}
Program: 30173
Project: 30173
Buggy source:
public void close() throws NamingException {
  throw new OperationNotSupportedException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void close(){
}
Program: 30174
Project: 30174
Buggy source:
public Object nextElement(){
  if (names.hasNext()) {
    try {
      String name=(String)names.next();
      return new Binding(name,nm.lookup(name));
    }
 catch (    Exception ex) {
      throw new RuntimeException("String_Node_Str" + ex);
    }
  }
 else   return null;
}

Fixed version (ground truth):
@Override public Object nextElement(){
  if (names.hasNext()) {
    try {
      String name=(String)names.next();
      return new Binding(name,nm.lookup(name));
    }
 catch (    Exception ex) {
      throw new RuntimeException("String_Node_Str" + ex);
    }
  }
 else   return null;
}
Program: 30176
Project: 30176
Buggy source:
public void generateOptionalLocalInterface(Class ejbClass,String intfClassName) throws Exception {
  if (protectionDomain == null) {
    protectionDomain=ejbClass.getProtectionDomain();
  }
  ClassWriter cw=new ClassWriter(INTF_FLAGS);
  ClassVisitor tv=cw;
  String intfInternalName=intfClassName.replace('.','/');
  tv.visit(V1_1,ACC_PUBLIC + ACC_ABSTRACT + ACC_INTERFACE,intfInternalName,null,Type.getType(Object.class).getInternalName(),(new String[]{Type.getType(Serializable.class).getInternalName()}));
  Set<java.lang.reflect.Method> allMethods=new HashSet<java.lang.reflect.Method>();
  for (Class clz=ejbClass; clz != Object.class; clz=clz.getSuperclass()) {
    java.lang.reflect.Method[] beanMethods=clz.getDeclaredMethods();
    for (    java.lang.reflect.Method m : beanMethods) {
      int mod=m.getModifiers();
      if ((Modifier.isPublic(mod)) && (!Modifier.isStatic(mod)) && (!Modifier.isAbstract(mod))&& (!Modifier.isFinal(mod))) {
        if (!hasSameSignatureAsExisting(m,allMethods)) {
          generateInterfaceMethod(tv,m);
          allMethods.add(m);
        }
      }
    }
  }
  tv.visitEnd();
  byte[] classData=cw.toByteArray();
  classMap.put(intfClassName,classData);
}

Fixed version (ground truth):
public void generateOptionalLocalInterface(Class ejbClass,String intfClassName) throws Exception {
  if (protectionDomain == null) {
    protectionDomain=ejbClass.getProtectionDomain();
  }
  ClassWriter cw=new ClassWriter(INTF_FLAGS);
  ClassVisitor tv=cw;
  String intfInternalName=intfClassName.replace('.','/');
  tv.visit(V1_1,ACC_PUBLIC + ACC_ABSTRACT + ACC_INTERFACE,intfInternalName,null,Type.getType(Object.class).getInternalName(),(new String[]{Type.getType(Serializable.class).getInternalName()}));
  for (  java.lang.reflect.Method m : ejbClass.getMethods()) {
    if (qualifiedAsBeanMethod(m)) {
      generateInterfaceMethod(tv,m);
    }
  }
  tv.visitEnd();
  byte[] classData=cw.toByteArray();
  classMap.put(intfClassName,classData);
}
Program: 30178
Project: 30178
Buggy source:
public NamingEnumeration list(String name) throws NamingException {
  ArrayList list=listNames(name);
  return new NamePairsEnum(this,list.iterator());
}

Fixed version (ground truth):
public NamingEnumeration<NameClassPair> list(String name) throws NamingException {
  ArrayList list=listNames(name);
  return new BindingsIterator<NameClassPair>(this,list.iterator(),true);
}
Program: 30179
Project: 30179
Buggy source:
@Override public Object next() throws NamingException {
  return nextElement();
}

Fixed version (ground truth):
@Override public T next() throws NamingException {
  return nextElement();
}
Program: 30180
Project: 30180
Buggy source:
BindingsIterator(GlassfishNamingManagerImpl nm,Iterator names){
  this.nm=nm;
  this.names=names;
}

Fixed version (ground truth):
BindingsIterator(GlassfishNamingManagerImpl nm,Iterator names,boolean producesNamesOnly){
  this.nm=nm;
  this.names=names;
  this.producesNamesOnly=producesNamesOnly;
}
Program: 30181
Project: 30181
Buggy source:
public NamingEnumeration listBindings(String name) throws NamingException {
  ArrayList list=listNames(name);
  return new BindingsIterator(this,list.iterator());
}

Fixed version (ground truth):
public NamingEnumeration<Binding> listBindings(String name) throws NamingException {
  ArrayList list=listNames(name);
  return new BindingsIterator<Binding>(this,list.iterator(),false);
}
Program: 30182
Project: 30182
Buggy source:
@Override public Object nextElement(){
  if (names.hasNext()) {
    try {
      String name=(String)names.next();
      return new Binding(name,nm.lookup(name));
    }
 catch (    Exception ex) {
      throw new RuntimeException("String_Node_Str" + ex);
    }
  }
 else   return null;
}

Fixed version (ground truth):
@Override public T nextElement(){
  if (names.hasNext()) {
    try {
      String name=(String)names.next();
      Object obj=nm.lookup(name);
      return producesNamesOnly ? (T)(new NameClassPair(name,getClass().getName())) : (T)(new Binding(name,obj));
    }
 catch (    RuntimeException ex) {
      throw ex;
    }
catch (    Exception ex) {
      throw new RuntimeException(ex);
    }
  }
 else {
    return null;
  }
}
Program: 30183
Project: 30183
Buggy source:
/** 
 * Lookup a name in either the cosnaming or serial context.
 * @return the object that is being looked up.
 * @throws NamingException if there is a naming exception.
 */
public Object lookup(Name name) throws NamingException {
  return lookup(name.toString());
}

Fixed version (ground truth):
/** 
 * Lookup a name in either the cosnaming or serial context.
 * @return the object that is being looked up.
 * @throws NamingException if there is a naming exception.
 */
@Override public Object lookup(Name name) throws NamingException {
  return lookup(name.toString());
}
Program: 30184
Project: 30184
Buggy source:
/** 
 * Return the name parser for the specified name.
 * @return the NameParser instance.
 * @throws NamingException if there is an exception.
 */
public NameParser getNameParser(Name name) throws NamingException {
  return getNameParser(name.toString());
}

Fixed version (ground truth):
/** 
 * Return the name parser for the specified name.
 * @return the NameParser instance.
 * @throws NamingException if there is an exception.
 */
@Override public NameParser getNameParser(Name name) throws NamingException {
  return getNameParser(name.toString());
}
Program: 30185
Project: 30185
Buggy source:
public Name composeName(Name name,Name prefix) throws NamingException {
  Name result=(Name)(prefix.clone());
  result.addAll(name);
  return result;
}

Fixed version (ground truth):
@Override public Name composeName(Name name,Name prefix) throws NamingException {
  Name result=(Name)(prefix.clone());
  result.addAll(name);
  return result;
}
Program: 30186
Project: 30186
Buggy source:
/** 
 * Get the context's environment.
 */
public Hashtable getEnvironment() throws NamingException {
  if (myEnv == null) {
    myEnv=new Hashtable(3,0.75f);
  }
  return myEnv;
}

Fixed version (ground truth):
/** 
 * Get the context's environment.
 */
@Override public Hashtable getEnvironment() throws NamingException {
  if (myEnv == null) {
    myEnv=new Hashtable(3,0.75f);
  }
  return myEnv;
}
Program: 30187
Project: 30187
Buggy source:
/** 
 * Lists the contents of a context or subcontext. The operation is delegated to the serial context.
 * @return an enumeration of the contents of the context.
 * @throws NamingException if there is a naming exception.
 */
public NamingEnumeration list(Name name) throws NamingException {
  return list(name.toString());
}

Fixed version (ground truth):
/** 
 * Lists the contents of a context or subcontext. The operation is delegated to the serial context.
 * @return an enumeration of the contents of the context.
 * @throws NamingException if there is a naming exception.
 */
@Override public NamingEnumeration<NameClassPair> list(Name name) throws NamingException {
  return list(name.toString());
}
Program: 30188
Project: 30188
Buggy source:
/** 
 * Lists the bindings of a context or subcontext. The operation is delegated to the serial context.
 * @return an enumeration of the bindings of the context.
 * @throws NamingException if there is a naming exception.
 */
public NamingEnumeration listBindings(Name name) throws NamingException {
  return listBindings(name.toString());
}

Fixed version (ground truth):
/** 
 * Lists the bindings of a context or subcontext. The operation is delegated to the serial context.
 * @return an enumeration of the bindings of the context.
 * @throws NamingException if there is a naming exception.
 */
@Override public NamingEnumeration<Binding> listBindings(Name name) throws NamingException {
  return listBindings(name.toString());
}
Program: 30189
Project: 30189
Buggy source:
/** 
 * This context does not treat links specially. A lookup operation is performed.
 */
public Object lookupLink(Name name) throws NamingException {
  return lookupLink(name.toString());
}

Fixed version (ground truth):
/** 
 * This context does not treat links specially. A lookup operation is performed.
 */
@Override public Object lookupLink(Name name) throws NamingException {
  return lookupLink(name.toString());
}
Program: 30190
Project: 30190
Buggy source:
/** 
 * Bind an object in the namespace. Binds the reference to the actual object in either the cosnaming or serial context.
 * @throws NamingException if there is a naming exception.
 */
public void bind(Name name,Object obj) throws NamingException {
  throw new NamingException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Bind an object in the namespace. Binds the reference to the actual object in either the cosnaming or serial context.
 * @throws NamingException if there is a naming exception.
 */
@Override public void bind(Name name,Object obj) throws NamingException {
  throw new NamingException("String_Node_Str");
}