nus-yam/ex-repair huggingface dataset:
Program: 29673
Project: 29673
Buggy source:
private void createConnectorResource(ConnectorResource connectorResource,ResourceInfo resourceInfo,PoolInfo poolInfo) throws ConnectorRuntimeException {
  if (ResourcesUtil.createInstance().isEnabled(connectorResource,resourceInfo)) {
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,"String_Node_Str",resourceInfo);
    }
    runtime.createConnectorResource(resourceInfo,poolInfo,null);
    if (_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,"String_Node_Str",resourceInfo);
    }
  }
 else {
    _logger.log(Level.INFO,"String_Node_Str",new Object[]{connectorResource.getJndiName(),ConnectorConstants.RES_TYPE_CR});
  }
}

Fixed version (ground truth):
private void createConnectorResource(ConnectorResource connectorResource,ResourceInfo resourceInfo,PoolInfo poolInfo) throws ConnectorRuntimeException {
  if (_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE,"String_Node_Str",resourceInfo);
  }
  runtime.createConnectorResource(resourceInfo,poolInfo,null);
  if (_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE,"String_Node_Str",resourceInfo);
  }
}
Program: 29674
Project: 29674
Buggy source:
private void deleteConnectorResource(ConnectorResource connectorResource,ResourceInfo resourceInfo) throws Exception {
  if (ResourcesUtil.createInstance().isEnabled(connectorResource,resourceInfo)) {
    runtime.deleteConnectorResource(resourceInfo);
    checkAndDeletePool(connectorResource);
  }
 else {
    _logger.log(Level.FINEST,"String_Node_Str",new Object[]{connectorResource.getJndiName(),ConnectorConstants.RES_TYPE_CR});
  }
}

Fixed version (ground truth):
private void deleteConnectorResource(ConnectorResource connectorResource,ResourceInfo resourceInfo) throws Exception {
  runtime.deleteConnectorResource(resourceInfo);
  checkAndDeletePool(connectorResource);
}
Program: 29676
Project: 29676
Buggy source:
/** 
 * This method setups the in/outDir and classpath and invoke JSPCompiler.
 * @param dc - DeploymentContext to get command parameters andsource directory and compile jsp directory.
 * @throws DeploymentException if JSPCompiler is unsuccessful.
 */
void runJSPC(final DeploymentContext dc) throws DeploymentException {
  final WebBundleDescriptor wbd=dc.getModuleMetaData(WebBundleDescriptor.class);
  try {
    final File outDir=dc.getScratchDir(env.kCompileJspDirName);
    final File inDir=dc.getSourceDir();
    com.sun.enterprise.deployment.runtime.web.ClassLoader clBean=wbd.getSunDescriptor().getClassLoader();
    StringBuilder classpath=new StringBuilder(super.getCommonClassPath());
    classpath.append(File.pathSeparatorChar);
    classpath.append(ASClassLoaderUtil.getModuleClassPath(sc.getDefaultServices(),wbd.getApplication().getName(),dc.getCommandParameters(DeployCommandParameters.class).libraries));
    JSPCompiler.compile(inDir,outDir,wbd,classpath.toString(),sc);
  }
 catch (  DeploymentException de) {
    String msg=rb.getString("String_Node_Str");
    msg=MessageFormat.format(msg,wbd.getApplication().getName());
    logger.log(Level.SEVERE,msg,de);
    throw de;
  }
}

Fixed version (ground truth):
/** 
 * This method setups the in/outDir and classpath and invoke JSPCompiler.
 * @param dc - DeploymentContext to get command parameters andsource directory and compile jsp directory.
 * @throws DeploymentException if JSPCompiler is unsuccessful.
 */
void runJSPC(final DeploymentContext dc) throws DeploymentException {
  final WebBundleDescriptor wbd=dc.getModuleMetaData(WebBundleDescriptor.class);
  try {
    final File outDir=dc.getScratchDir(env.kCompileJspDirName);
    final File inDir=dc.getSourceDir();
    StringBuilder classpath=new StringBuilder(super.getCommonClassPath());
    classpath.append(File.pathSeparatorChar);
    classpath.append(ASClassLoaderUtil.getModuleClassPath(sc.getDefaultServices(),wbd.getApplication().getName(),dc.getCommandParameters(DeployCommandParameters.class).libraries));
    JSPCompiler.compile(inDir,outDir,wbd,classpath.toString(),sc);
  }
 catch (  DeploymentException de) {
    String msg=rb.getString("String_Node_Str");
    msg=MessageFormat.format(msg,wbd.getApplication().getName());
    logger.log(Level.SEVERE,msg,de);
    throw de;
  }
}
Program: 29677
Project: 29677
Buggy source:
private BackingStore<String,? extends Storeable> getStoreableBackingStore(){
  ReplicationManagerBase<? extends Storeable> mgr=(ReplicationManagerBase<? extends Storeable>)this.getManager();
  return getStoreableReplicationManager().getBackingStore();
}

Fixed version (ground truth):
private BackingStore<String,? extends Storeable> getStoreableBackingStore(){
  return getStoreableReplicationManager().getBackingStore();
}
Program: 29678
Project: 29678
Buggy source:
protected void configureLoaderAttributes(WebappClassLoader cloader,WebXmlParser webXmlParser,File base){
  boolean delegate=webXmlParser.isDelegate();
  cloader.setDelegate(delegate);
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("String_Node_Str" + webXmlParser.getBase() + "String_Node_Str"+ delegate);
  }
  String extraClassPath=webXmlParser.getExtraClassPath();
  if (extraClassPath != null) {
    String[] pathElements=extraClassPath.split("String_Node_Str");
    if (pathElements != null) {
      for (      String path : pathElements) {
        path=path.replace("String_Node_Str","String_Node_Str");
        if (logger.isLoggable(Level.FINE)) {
          logger.fine("String_Node_Str" + webXmlParser.getBase() + "String_Node_Str"+ path+ "String_Node_Str");
        }
        try {
          URL url=new URL(path);
          cloader.addRepository(path);
        }
 catch (        MalformedURLException mue1) {
          File file=new File(path);
          if (!file.isAbsolute()) {
            file=new File(base.getPath(),path);
          }
          try {
            URL url=file.toURI().toURL();
            cloader.addRepository(url.toString());
          }
 catch (          MalformedURLException mue2) {
            String msg=rb.getString("String_Node_Str");
            Object[] params={path};
            msg=MessageFormat.format(msg,params);
            logger.log(Level.SEVERE,msg,mue2);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
protected void configureLoaderAttributes(WebappClassLoader cloader,WebXmlParser webXmlParser,File base){
  boolean delegate=webXmlParser.isDelegate();
  cloader.setDelegate(delegate);
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("String_Node_Str" + base + "String_Node_Str"+ delegate);
  }
  String extraClassPath=webXmlParser.getExtraClassPath();
  if (extraClassPath != null) {
    String[] pathElements=extraClassPath.split("String_Node_Str");
    if (pathElements != null) {
      for (      String path : pathElements) {
        path=path.replace("String_Node_Str","String_Node_Str");
        if (logger.isLoggable(Level.FINE)) {
          logger.fine("String_Node_Str" + base + "String_Node_Str"+ path+ "String_Node_Str");
        }
        try {
          URL url=new URL(path);
          cloader.addRepository(path);
        }
 catch (        MalformedURLException mue1) {
          File file=new File(path);
          if (!file.isAbsolute()) {
            file=new File(base.getPath(),path);
          }
          try {
            URL url=file.toURI().toURL();
            cloader.addRepository(url.toString());
          }
 catch (          MalformedURLException mue2) {
            String msg=rb.getString("String_Node_Str");
            Object[] params={path};
            msg=MessageFormat.format(msg,params);
            logger.log(Level.SEVERE,msg,mue2);
          }
        }
      }
    }
  }
}
Program: 29679
Project: 29679
Buggy source:
/** 
 * Loads any currently active sessions that were previously unloaded to file
 * @exception ClassNotFoundException if a serialized class cannot befound during the reload
 * @exception IOException if a read error occurs
 */
private void doLoadFromFile() throws ClassNotFoundException, IOException {
  if (log.isLoggable(Level.FINE)) {
    log.fine("String_Node_Str");
  }
  File file=file();
  if (file == null || !file.exists() || file.length() == 0) {
    return;
  }
  if (log.isLoggable(Level.FINE)) {
    log.fine(sm.getString("String_Node_Str",pathname));
  }
  FileInputStream fis=null;
  try {
    fis=new FileInputStream(file.getAbsolutePath());
    readSessions(fis);
    if (log.isLoggable(Level.FINE)) {
      log.fine("String_Node_Str");
    }
  }
 catch (  FileNotFoundException e) {
    if (log.isLoggable(Level.FINE)) {
      log.fine("String_Node_Str");
    }
  }
 finally {
    try {
      if (fis != null) {
        fis.close();
      }
    }
 catch (    IOException f) {
    }
    file.delete();
  }
}

Fixed version (ground truth):
/** 
 * Loads any currently active sessions that were previously unloaded to file
 * @exception ClassNotFoundException if a serialized class cannot befound during the reload
 * @exception IOException if a read error occurs
 */
private void doLoadFromFile() throws ClassNotFoundException, IOException {
  if (log.isLoggable(Level.FINE)) {
    log.fine("String_Node_Str");
  }
  File file=file();
  if (file == null || !file.exists() || file.length() == 0) {
    return;
  }
  if (log.isLoggable(Level.FINE)) {
    log.fine(sm.getString("String_Node_Str",pathname));
  }
  FileInputStream fis=null;
  try {
    fis=new FileInputStream(file.getAbsolutePath());
    readSessions(fis);
    if (log.isLoggable(Level.FINE)) {
      log.fine("String_Node_Str");
    }
  }
 catch (  FileNotFoundException e) {
    if (log.isLoggable(Level.FINE)) {
      log.fine("String_Node_Str");
    }
  }
 finally {
    try {
      if (fis != null) {
        fis.close();
      }
    }
 catch (    IOException f) {
    }
    if (!file.delete() && log.isLoggable(Level.FINE)) {
      log.fine("String_Node_Str" + file);
    }
  }
}
Program: 29680
Project: 29680
Buggy source:
public void stopServer(){
  if (server == null) {
    Digester digester=createStopDigester();
    digester.setClassLoader(Thread.currentThread().getContextClassLoader());
    File file=configFile();
    try {
      InputSource is=new InputSource("String_Node_Str" + file.getAbsolutePath());
      FileInputStream fis=new FileInputStream(file);
      is.setByteStream(fis);
      digester.push(this);
      digester.parse(is);
      fis.close();
    }
 catch (    Exception e) {
      log.log(Level.SEVERE,"String_Node_Str",e);
      System.exit(1);
    }
  }
  try {
    Socket socket=new Socket("String_Node_Str",server.getPort());
    OutputStream stream=socket.getOutputStream();
    String shutdown=server.getShutdown();
    for (int i=0; i < shutdown.length(); i++)     stream.write(shutdown.charAt(i));
    stream.flush();
    stream.close();
    socket.close();
  }
 catch (  IOException e) {
    log.log(Level.SEVERE,"String_Node_Str",e);
    System.exit(1);
  }
}

Fixed version (ground truth):
public void stopServer(){
  if (server == null) {
    Digester digester=createStopDigester();
    digester.setClassLoader(Thread.currentThread().getContextClassLoader());
    File file=configFile();
    FileInputStream fis=null;
    try {
      InputSource is=new InputSource("String_Node_Str" + file.getAbsolutePath());
      fis=new FileInputStream(file);
      is.setByteStream(fis);
      digester.push(this);
      digester.parse(is);
      fis.close();
    }
 catch (    Exception e) {
      log.log(Level.SEVERE,"String_Node_Str",e);
      System.exit(1);
    }
 finally {
      try {
        if (fis != null) {
          fis.close();
        }
      }
 catch (      IOException ioe) {
      }
    }
  }
  try {
    Socket socket=new Socket("String_Node_Str",server.getPort());
    OutputStream stream=socket.getOutputStream();
    String shutdown=server.getShutdown();
    for (int i=0; i < shutdown.length(); i++)     stream.write(shutdown.charAt(i));
    stream.flush();
    stream.close();
    socket.close();
  }
 catch (  IOException e) {
    log.log(Level.SEVERE,"String_Node_Str",e);
    System.exit(1);
  }
}
Program: 29681
Project: 29681
Buggy source:
/** 
 * Register context.
 */
private void registerContext(StandardContext context) throws Exception {
  if (context == null) {
    throw new Exception("String_Node_Str" + context);
  }
  ObjectName objectName=context.getJmxName();
  if (objectName == null) {
    return;
  }
  String name=objectName.getKeyProperty("String_Node_Str");
  String hostName=null;
  String contextName=null;
  if (name.startsWith("String_Node_Str")) {
    name=name.substring(2);
  }
  int slash=name.indexOf("String_Node_Str");
  if (slash != -1) {
    hostName=name.substring(0,slash);
    contextName=name.substring(slash);
    contextName=RequestUtil.urlDecode(contextName,"String_Node_Str");
  }
 else {
    return;
  }
  if (contextName.equals("String_Node_Str")) {
    contextName="String_Node_Str";
  }
  String msg=rb.getString("String_Node_Str");
  msg=MessageFormat.format(msg,contextName);
  if (logger.isLoggable(Level.FINE)) {
    logger.fine(msg);
  }
  javax.naming.Context resources=context.findStaticResources();
  String[] welcomeFiles=context.getWelcomeFiles();
  mapper.addContext(hostName,contextName,context,welcomeFiles,resources,context.getAlternateDocBases());
}

Fixed version (ground truth):
/** 
 * Register context.
 */
private void registerContext(StandardContext context) throws Exception {
  ObjectName objectName=context.getJmxName();
  if (objectName == null) {
    return;
  }
  String name=objectName.getKeyProperty("String_Node_Str");
  String hostName=null;
  String contextName=null;
  if (name.startsWith("String_Node_Str")) {
    name=name.substring(2);
  }
  int slash=name.indexOf("String_Node_Str");
  if (slash != -1) {
    hostName=name.substring(0,slash);
    contextName=name.substring(slash);
    contextName=RequestUtil.urlDecode(contextName,"String_Node_Str");
  }
 else {
    return;
  }
  if (contextName.equals("String_Node_Str")) {
    contextName="String_Node_Str";
  }
  String msg=rb.getString("String_Node_Str");
  msg=MessageFormat.format(msg,contextName);
  if (logger.isLoggable(Level.FINE)) {
    logger.fine(msg);
  }
  javax.naming.Context resources=context.findStaticResources();
  String[] welcomeFiles=context.getWelcomeFiles();
  mapper.addContext(hostName,contextName,context,welcomeFiles,resources,context.getAlternateDocBases());
}
Program: 29682
Project: 29682
Buggy source:
/** 
 * Register wrapper.
 */
private void registerWrapper(StandardWrapper wrapper) throws Exception {
  if (wrapper == null) {
    throw new Exception("String_Node_Str" + wrapper);
  }
  ObjectName objectName=wrapper.getJmxName();
  if (objectName == null) {
    return;
  }
  String wrapperName=objectName.getKeyProperty("String_Node_Str");
  String name=objectName.getKeyProperty("String_Node_Str");
  String hostName=null;
  String contextName=null;
  if (name.startsWith("String_Node_Str")) {
    name=name.substring(2);
  }
  int slash=name.indexOf("String_Node_Str");
  if (slash != -1) {
    hostName=name.substring(0,slash);
    contextName=name.substring(slash);
    contextName=RequestUtil.urlDecode(contextName,"String_Node_Str");
  }
 else {
    return;
  }
  if (contextName.equals("String_Node_Str")) {
    contextName="String_Node_Str";
  }
  String msg=rb.getString("String_Node_Str");
  msg=MessageFormat.format(msg,wrapperName,contextName);
  if (logger.isLoggable(Level.FINE)) {
    logger.fine(msg);
  }
  String[] mappings=wrapper.findMappings();
  for (int i=0; i < mappings.length; i++) {
    boolean jspWildCard=(wrapperName.equals("String_Node_Str") && mappings[i].endsWith("String_Node_Str"));
    mapper.addWrapper(hostName,contextName,mappings[i],wrapper,jspWildCard,wrapperName,true);
  }
}

Fixed version (ground truth):
/** 
 * Register wrapper.
 */
private void registerWrapper(StandardWrapper wrapper) throws Exception {
  ObjectName objectName=wrapper.getJmxName();
  if (objectName == null) {
    return;
  }
  String wrapperName=objectName.getKeyProperty("String_Node_Str");
  String name=objectName.getKeyProperty("String_Node_Str");
  String hostName=null;
  String contextName=null;
  if (name.startsWith("String_Node_Str")) {
    name=name.substring(2);
  }
  int slash=name.indexOf("String_Node_Str");
  if (slash != -1) {
    hostName=name.substring(0,slash);
    contextName=name.substring(slash);
    contextName=RequestUtil.urlDecode(contextName,"String_Node_Str");
  }
 else {
    return;
  }
  if (contextName.equals("String_Node_Str")) {
    contextName="String_Node_Str";
  }
  String msg=rb.getString("String_Node_Str");
  msg=MessageFormat.format(msg,wrapperName,contextName);
  if (logger.isLoggable(Level.FINE)) {
    logger.fine(msg);
  }
  String[] mappings=wrapper.findMappings();
  for (int i=0; i < mappings.length; i++) {
    boolean jspWildCard=(wrapperName.equals("String_Node_Str") && mappings[i].endsWith("String_Node_Str"));
    mapper.addWrapper(hostName,contextName,mappings[i],wrapper,jspWildCard,wrapperName,true);
  }
}
Program: 29683
Project: 29683
Buggy source:
/** 
 * Register host.
 */
public void registerHost(StandardHost host) throws Exception {
  if (host == null) {
    throw new Exception("String_Node_Str" + host);
  }
  if (host.getJmxName() == null) {
    return;
  }
  String name=host.getName();
  String[] nlNames=host.getNetworkListenerNames();
  boolean nameMatch=false;
  if (nlNames != null) {
    for (    String nlName : nlNames) {
      if (nlName.equals(this.networkListenerName)) {
        nameMatch=true;
        break;
      }
    }
  }
  if (!nameMatch) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine("String_Node_Str" + networkListenerName + "String_Node_Str"+ "String_Node_Str"+ name+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    }
    return;
  }
  virtualServerListenerNames.put(host.getJmxName(),nlNames);
  String[] aliases=host.findAliases();
  mapper.addHost(name,aliases,host);
}

Fixed version (ground truth):
/** 
 * Register host.
 */
public void registerHost(StandardHost host) throws Exception {
  if (host.getJmxName() == null) {
    return;
  }
  String name=host.getName();
  String[] nlNames=host.getNetworkListenerNames();
  boolean nameMatch=false;
  if (nlNames != null) {
    for (    String nlName : nlNames) {
      if (nlName.equals(this.networkListenerName)) {
        nameMatch=true;
        break;
      }
    }
  }
  if (!nameMatch) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine("String_Node_Str" + networkListenerName + "String_Node_Str"+ "String_Node_Str"+ name+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    }
    return;
  }
  virtualServerListenerNames.put(host.getJmxName(),nlNames);
  String[] aliases=host.findAliases();
  mapper.addHost(name,aliases,host);
}
Program: 29685
Project: 29685
Buggy source:
@Override public void start() throws LifecycleException {
  super.start();
  if (this.domain != null) {
    if (!"String_Node_Str".equals(getName())) {
      mapper.removeContext(getDefaultHost(),"String_Node_Str");
      mapper.removeHost(getDefaultHost());
    }
    mapperListener.setDomain(domain);
    mapperListener.setNetworkListenerName(this.getName());
    mapperListener.setDefaultHost(getDefaultHost());
    mapperListener.setInstanceName(getInstanceName());
    mapperListener.init();
    getService().getBroadcaster().addNotificationListener(mapperListener,mapperListener,null);
    Notification notification=new Notification("String_Node_Str",this.getObjectName(),0);
    getService().getBroadcaster().sendNotification(notification);
    try {
      ObjectName mapperOname=createObjectName(this.domain,"String_Node_Str");
    }
 catch (    Exception ex) {
      log.log(Level.SEVERE,sm.getString("String_Node_Str"),ex);
    }
  }
  if (grizzlyMonitor != null) {
    grizzlyMonitor.initConfig();
    grizzlyMonitor.registerMonitoringLevelEvents();
  }
}

Fixed version (ground truth):
@Override public void start() throws LifecycleException {
  super.start();
  if (this.domain != null) {
    if (!"String_Node_Str".equals(getName())) {
      mapper.removeContext(getDefaultHost(),"String_Node_Str");
      mapper.removeHost(getDefaultHost());
    }
    mapperListener.setDomain(domain);
    mapperListener.setNetworkListenerName(this.getName());
    mapperListener.setDefaultHost(getDefaultHost());
    mapperListener.setInstanceName(getInstanceName());
    mapperListener.init();
    getService().getBroadcaster().addNotificationListener(mapperListener,mapperListener,null);
    Notification notification=new Notification("String_Node_Str",this.getObjectName(),0);
    getService().getBroadcaster().sendNotification(notification);
  }
  if (grizzlyMonitor != null) {
    grizzlyMonitor.initConfig();
    grizzlyMonitor.registerMonitoringLevelEvents();
  }
}
Program: 29686
Project: 29686
Buggy source:
@Override public ClassLoader getClassLoader(final ClassLoader parent,DeploymentContext context){
  ASURLClassLoader cloader=AccessController.doPrivileged(new PrivilegedAction<ASURLClassLoader>(){
    @Override public ASURLClassLoader run(){
      return new ASURLClassLoader(parent);
    }
  }
);
  try {
    cloader.addURL(context.getSource().getURI().toURL());
  }
 catch (  MalformedURLException e) {
    throw new RuntimeException(e);
  }
  return cloader;
}

Fixed version (ground truth):
@Override public ClassLoader getClassLoader(final ClassLoader parent,DeploymentContext context){
  ASURLClassLoader cloader=AccessController.doPrivileged(new PrivilegedAction<ASURLClassLoader>(){
    @Override public ASURLClassLoader run(){
      return new ASURLClassLoader(parent);
    }
  }
);
  try {
    cloader.addURL(context.getSource().getURI().toURL());
    for (    URL url : getManifestLibraries(context)) {
      cloader.addURL(url);
    }
  }
 catch (  MalformedURLException e) {
    throw new RuntimeException(e);
  }
  return cloader;
}
Program: 29687
Project: 29687
Buggy source:
/** 
 * Starts this web module.
 */
@Override public synchronized void start() throws LifecycleException {
  List<Object> orderingList=null;
  boolean hasOthers=false;
  Map<String,String> webFragmentMap=Collections.emptyMap();
  if (webBundleDescriptor != null) {
    AbsoluteOrderingDescriptor aod=webBundleDescriptor.getAbsoluteOrderingDescriptor();
    if (aod != null) {
      orderingList=aod.getOrdering();
      hasOthers=aod.hasOthers();
    }
    webFragmentMap=webBundleDescriptor.getJarNameToWebFragmentNameMap();
  }
  Iterable<ServletContainerInitializer> allInitializers=ServletContainerInitializerUtil.getServletContainerInitializers(webFragmentMap,orderingList,hasOthers,wmInfo.getAppClassLoader());
  setServletContainerInitializerInterestList(allInitializers);
  DeploymentContext dc=getWebModuleConfig().getDeploymentContext();
  if (dc != null) {
    directoryDeployed=Boolean.valueOf(dc.getAppProps().getProperty(ServerTags.DIRECTORY_DEPLOYED));
  }
  showArchivedRealPathEnabled=getWebBundleDescriptor().isShowArchivedRealPathEnabled();
  super.start();
  configureValves();
  configureCatalinaProperties();
  webModuleStartedEvent();
  if (directoryListing) {
    setDirectoryListing(directoryListing);
  }
  hasStarted=true;
}

Fixed version (ground truth):
/** 
 * Starts this web module.
 */
@Override public synchronized void start() throws LifecycleException {
  List<Object> orderingList=null;
  boolean hasOthers=false;
  Map<String,String> webFragmentMap=Collections.emptyMap();
  if (webBundleDescriptor != null) {
    AbsoluteOrderingDescriptor aod=webBundleDescriptor.getAbsoluteOrderingDescriptor();
    if (aod != null) {
      orderingList=aod.getOrdering();
      hasOthers=aod.hasOthers();
    }
    webFragmentMap=webBundleDescriptor.getJarNameToWebFragmentNameMap();
  }
  Iterable<ServletContainerInitializer> allInitializers=ServletContainerInitializerUtil.getServletContainerInitializers(webFragmentMap,orderingList,hasOthers,wmInfo.getAppClassLoader());
  setServletContainerInitializerInterestList(allInitializers);
  DeploymentContext dc=getWebModuleConfig().getDeploymentContext();
  if (dc != null) {
    directoryDeployed=Boolean.valueOf(dc.getAppProps().getProperty(ServerTags.DIRECTORY_DEPLOYED));
  }
  if (webBundleDescriptor != null) {
    showArchivedRealPathEnabled=webBundleDescriptor.isShowArchivedRealPathEnabled();
  }
  super.start();
  configureValves();
  configureCatalinaProperties();
  webModuleStartedEvent();
  if (directoryListing) {
    setDirectoryListing(directoryListing);
  }
  hasStarted=true;
}
Program: 29689
Project: 29689
Buggy source:
/** 
 * @return the descriptor instance to associate with this XMLNode
 */
public Object getDescriptor(){
  return descriptor;
}

Fixed version (ground truth):
/** 
 * @return the descriptor instance to associate with this XMLNode
 */
public EjbReference getDescriptor(){
  return descriptor;
}
Program: 29691
Project: 29691
Buggy source:
private void checkAgainstBeanConstraints(AdminCommand component,String cname){
  if (beanValidator == null) {
    ClassLoader cl=System.getSecurityManager() == null ? Thread.currentThread().getContextClassLoader() : AccessController.doPrivileged(new PrivilegedAction<ClassLoader>(){
      @Override public ClassLoader run(){
        return Thread.currentThread().getContextClassLoader();
      }
    }
);
    try {
      Thread.currentThread().setContextClassLoader(null);
      ValidatorFactory validatorFactory=Validation.buildDefaultValidatorFactory();
      ValidatorContext validatorContext=validatorFactory.usingContext();
      validatorContext.messageInterpolator(new MessageInterpolatorImpl());
      beanValidator=validatorContext.getValidator();
    }
  finally {
      Thread.currentThread().setContextClassLoader(cl);
    }
  }
  Set<ConstraintViolation<AdminCommand>> constraintViolations=beanValidator.validate(component);
  if (constraintViolations == null || constraintViolations.isEmpty())   return;
  StringBuilder msg=new StringBuilder(adminStrings.getLocalString("String_Node_Str","String_Node_Str",cname));
  boolean addc=false;
  String violationMsg=adminStrings.getLocalString("String_Node_Str","String_Node_Str");
  for (  ConstraintViolation cv : constraintViolations) {
    if (addc)     msg.append("String_Node_Str");
    msg.append(MessageFormat.format(violationMsg,cv.getMessage(),cv.getPropertyPath()));
    addc=true;
  }
  throw new UnacceptableValueException(msg.toString());
}

Fixed version (ground truth):
private void checkAgainstBeanConstraints(AdminCommand component,String cname){
  initBeanValidator();
  Set<ConstraintViolation<AdminCommand>> constraintViolations=beanValidator.validate(component);
  if (constraintViolations == null || constraintViolations.isEmpty()) {
    return;
  }
  StringBuilder msg=new StringBuilder(adminStrings.getLocalString("String_Node_Str","String_Node_Str",cname));
  boolean addc=false;
  String violationMsg=adminStrings.getLocalString("String_Node_Str","String_Node_Str");
  for (  ConstraintViolation cv : constraintViolations) {
    if (addc) {
      msg.append("String_Node_Str");
    }
    msg.append(MessageFormat.format(violationMsg,cv.getMessage(),cv.getPropertyPath()));
    addc=true;
  }
  throw new UnacceptableValueException(msg.toString());
}
Program: 29692
Project: 29692
Buggy source:
public NameCommandClassPair(String name,Class<? extends AdminCommand> clazz){
  this.name=name;
  this.clazz=clazz;
  hash=79 * hash + (this.name != null ? this.name.hashCode() : 0);
  hash=79 * hash + (this.clazz != null ? this.clazz.hashCode() : 0);
}

Fixed version (ground truth):
public NameCommandClassPair(String name,Class<? extends AdminCommand> clazz){
  this.name=name;
  this.clazz=clazz;
  hash=3;
  hash=67 * hash + (this.name != null ? this.name.hashCode() : 0);
  hash=67 * hash + (this.clazz != null ? this.clazz.hashCode() : 0);
}
Program: 29693
Project: 29693
Buggy source:
@Override public void execute(AdminCommand command){
  CommandRunnerImpl.this.doCommand(this,command,subject);
  ActionReport r=report;
}

Fixed version (ground truth):
@Override public void execute(AdminCommand command){
  CommandRunnerImpl.this.doCommand(this,command,subject);
}
Program: 29694
Project: 29694
Buggy source:
/** 
 * @return a sub archive giving the name 
 */
public ReadableArchive getSubArchive(String name) throws java.io.IOException {
  if (jarFile == null) {
    return null;
  }
  DeploymentPlanArchive dpArchive=new DeploymentPlanArchive();
  dpArchive.jarFile=new JarFile(new File(uri));
  try {
    dpArchive.uri=new URI("String_Node_Str",uri.getSchemeSpecificPart() + File.separator + name,null);
  }
 catch (  URISyntaxException e) {
  }
  dpArchive.subArchiveUri=name;
  dpArchive.elements=elements;
  return dpArchive;
}

Fixed version (ground truth):
/** 
 * @return a sub archive giving the name 
 */
public ReadableArchive getSubArchive(String name) throws java.io.IOException {
  if (jarFile == null) {
    return null;
  }
  DeploymentPlanArchive dpArchive=new DeploymentPlanArchive();
  dpArchive.jarFile=new JarFile(new File(uri));
  try {
    if (uri != null) {
      dpArchive.uri=new URI("String_Node_Str",uri.getSchemeSpecificPart() + File.separator + name,null);
    }
  }
 catch (  URISyntaxException e) {
  }
  dpArchive.subArchiveUri=name;
  dpArchive.elements=elements;
  return dpArchive;
}
Program: 29695
Project: 29695
Buggy source:
public void visit(int version,int access,String name,String signature,String superName,String[] interfaces){
  this.className=name;
}

Fixed version (ground truth):
public void visit(int version,int access,String name,String signature,String superName,String[] interfaces){
}
Program: 29696
Project: 29696
Buggy source:
/** 
 * copy all contents of a jar file to a new jar file except for all the deployment descriptors files
 * @param in  jar file
 * @param out jar file
 * @param ignoreList vector of entry name to not copy from to source jar file
 */
protected void copyJarElements(ReadableArchive in,WritableArchive out,Vector ignoreList) throws IOException {
  Enumeration entries=in.entries();
  if (entries != null) {
    for (; entries.hasMoreElements(); ) {
      String anEntry=(String)entries.nextElement();
      if (ignoreList == null || !ignoreList.contains(anEntry)) {
        InputStream is=in.getEntry(anEntry);
        OutputStream os=out.putNextEntry(anEntry);
        ArchivistUtils.copyWithoutClose(is,os);
        is.close();
        out.closeEntry();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * copy all contents of a jar file to a new jar file except for all the deployment descriptors files
 * @param in  jar file
 * @param out jar file
 * @param ignoreList vector of entry name to not copy from to source jar file
 */
protected void copyJarElements(ReadableArchive in,WritableArchive out,Vector ignoreList) throws IOException {
  Enumeration entries=in.entries();
  if (entries != null) {
    for (; entries.hasMoreElements(); ) {
      String anEntry=(String)entries.nextElement();
      if (ignoreList == null || !ignoreList.contains(anEntry)) {
        InputStream is=in.getEntry(anEntry);
        if (is != null) {
          OutputStream os=out.putNextEntry(anEntry);
          ArchivistUtils.copyWithoutClose(is,os);
          is.close();
        }
        out.closeEntry();
      }
    }
  }
}
Program: 29697
Project: 29697
Buggy source:
/** 
 * write the necessary attributes for the root node of this DDs document
 */
protected void addBundleNodeAttributes(Element bundleNode,RootDeploymentDescriptor descriptor){
  String schemaLocation;
  if (descriptor instanceof ConnectorDescriptor) {
    bundleNode.setAttributeNS("String_Node_Str","String_Node_Str",TagNames.J2EE_NAMESPACE);
    schemaLocation=TagNames.J2EE_NAMESPACE + "String_Node_Str" + getSchemaURL();
  }
 else {
    bundleNode.setAttributeNS("String_Node_Str","String_Node_Str",TagNames.JAVAEE_NAMESPACE);
    schemaLocation=TagNames.JAVAEE_NAMESPACE + "String_Node_Str" + getSchemaURL();
  }
  bundleNode.setAttributeNS("String_Node_Str","String_Node_Str",W3C_XML_SCHEMA_INSTANCE);
  addNamespaceDeclaration(bundleNode,descriptor);
  String clientSchemaLocation=descriptor.getSchemaLocation();
  if (clientSchemaLocation != null) {
    schemaLocation=schemaLocation + "String_Node_Str" + clientSchemaLocation;
  }
  bundleNode.setAttributeNS(W3C_XML_SCHEMA_INSTANCE,SCHEMA_LOCATION_TAG,schemaLocation);
  bundleNode.setAttribute(TagNames.VERSION,getSpecVersion());
  if (descriptor instanceof BundleDescriptor && !(descriptor instanceof Application)) {
    BundleDescriptor bundleDesc=(BundleDescriptor)descriptor;
    if (!bundleDesc.isDDWithNoAnnotationAllowed() && !(bundleDesc.getManagedBeans().size() > 0)) {
      bundleNode.setAttribute(TagNames.METADATA_COMPLETE,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * write the necessary attributes for the root node of this DDs document
 */
protected void addBundleNodeAttributes(Element bundleNode,RootDeploymentDescriptor descriptor){
  String schemaLocation;
  bundleNode.setAttributeNS("String_Node_Str","String_Node_Str",TagNames.JAVAEE_NAMESPACE);
  schemaLocation=TagNames.JAVAEE_NAMESPACE + "String_Node_Str" + getSchemaURL();
  bundleNode.setAttributeNS("String_Node_Str","String_Node_Str",W3C_XML_SCHEMA_INSTANCE);
  addNamespaceDeclaration(bundleNode,descriptor);
  String clientSchemaLocation=descriptor.getSchemaLocation();
  if (clientSchemaLocation != null) {
    schemaLocation=schemaLocation + "String_Node_Str" + clientSchemaLocation;
  }
  bundleNode.setAttributeNS(W3C_XML_SCHEMA_INSTANCE,SCHEMA_LOCATION_TAG,schemaLocation);
  bundleNode.setAttribute(TagNames.VERSION,getSpecVersion());
  if (descriptor instanceof BundleDescriptor && !(descriptor instanceof Application)) {
    BundleDescriptor bundleDesc=(BundleDescriptor)descriptor;
    if (!bundleDesc.isDDWithNoAnnotationAllowed() && !(bundleDesc.getManagedBeans().size() > 0)) {
      bundleNode.setAttribute(TagNames.METADATA_COMPLETE,"String_Node_Str");
    }
  }
}
Program: 29698
Project: 29698
Buggy source:
/** 
 * @return the schema URL
 */
protected String getSchemaURL(){
  return TagNames.J2EE_NAMESPACE + "String_Node_Str" + getSystemID();
}

Fixed version (ground truth):
/** 
 * @return the schema URL
 */
protected String getSchemaURL(){
  return TagNames.JAVAEE_NAMESPACE + "String_Node_Str" + getSystemID();
}
Program: 29699
Project: 29699
Buggy source:
private <T extends Sniffer>List<T> getApplicableSniffers(List<URI> uris,Types types,Collection<T> sniffers,boolean checkPath){
  if (sniffers == null || sniffers.isEmpty()) {
    return Collections.emptyList();
  }
  List<T> result=new ArrayList<T>();
  for (  T sniffer : sniffers) {
    Class<? extends Annotation>[] annotations=sniffer.getAnnotationTypes();
    if (annotations == null)     continue;
    for (    Class<? extends Annotation> annotationType : annotations) {
      Type type=types.getBy(annotationType.getName());
      if (type instanceof AnnotationType) {
        Collection<AnnotatedElement> elements=((AnnotationType)type).allAnnotatedTypes();
        for (        AnnotatedElement element : elements) {
          if (checkPath) {
            Type t=(element instanceof Member ? ((Member)element).getDeclaringType() : (Type)element);
            if (t.wasDefinedIn(uris)) {
              result.add(sniffer);
              break;
            }
          }
 else {
            result.add(sniffer);
            break;
          }
        }
      }
    }
  }
  return result;
}

Fixed version (ground truth):
private <T extends Sniffer>List<T> getApplicableSniffers(List<URI> uris,Types types,Collection<T> sniffers,boolean checkPath){
  if (sniffers == null || sniffers.isEmpty()) {
    return Collections.emptyList();
  }
  List<T> result=new ArrayList<T>();
  for (  T sniffer : sniffers) {
    Class<? extends Annotation>[] annotations=sniffer.getAnnotationTypes();
    if (annotations == null)     continue;
    for (    Class<? extends Annotation> annotationType : annotations) {
      if (types != null) {
        Type type=types.getBy(annotationType.getName());
        if (type instanceof AnnotationType) {
          Collection<AnnotatedElement> elements=((AnnotationType)type).allAnnotatedTypes();
          for (          AnnotatedElement element : elements) {
            if (checkPath) {
              Type t=(element instanceof Member ? ((Member)element).getDeclaringType() : (Type)element);
              if (t.wasDefinedIn(uris)) {
                result.add(sniffer);
                break;
              }
            }
 else {
              result.add(sniffer);
              break;
            }
          }
        }
      }
    }
  }
  return result;
}
Program: 29700
Project: 29700
Buggy source:
public Object create(Context ctx) throws NamingException {
  Object result=null;
  if (ejbRefMgr == null) {
synchronized (this) {
      if (ejbRefMgr == null) {
        ejbRefMgr=habitat.getByContract(EjbNamingReferenceManager.class);
        cacheable=new Boolean(ejbRefMgr.isEjbReferenceCacheable(ejbRef));
      }
    }
  }
  if (ejbRefMgr != null) {
    if ((cacheable != null) && (cacheable.booleanValue() == true)) {
      if (cachedResult != null) {
        result=cachedResult;
      }
 else {
        result=cachedResult=ejbRefMgr.resolveEjbReference(ejbRef,ctx);
      }
    }
 else {
      result=ejbRefMgr.resolveEjbReference(ejbRef,ctx);
    }
  }
  if (result == null) {
    throw new NameNotFoundException("String_Node_Str" + ejbRef.getName() + "String_Node_Str"+ ejbRef);
  }
  return result;
}

Fixed version (ground truth):
public Object create(Context ctx) throws NamingException {
  Object result=null;
  if (ejbRefMgr == null) {
synchronized (this) {
      if (ejbRefMgr == null) {
        ejbRefMgr=habitat.getByContract(EjbNamingReferenceManager.class);
        cacheable=ejbRefMgr.isEjbReferenceCacheable(ejbRef);
      }
    }
  }
  if (ejbRefMgr != null) {
    if ((cacheable != null) && (cacheable.booleanValue() == true)) {
      if (cachedResult != null) {
        result=cachedResult;
      }
 else {
        result=cachedResult=ejbRefMgr.resolveEjbReference(ejbRef,ctx);
      }
    }
 else {
      result=ejbRefMgr.resolveEjbReference(ejbRef,ctx);
    }
  }
  if (result == null) {
    throw new NameNotFoundException("String_Node_Str" + ejbRef.getName() + "String_Node_Str"+ ejbRef);
  }
  return result;
}
Program: 29701
Project: 29701
Buggy source:
public boolean touchStore(){
  if (cookieStoreFile.lastModified() + CACHE_WRITE_DELTA > System.currentTimeMillis()) {
    return false;
  }
  cookieStoreFile.setLastModified(System.currentTimeMillis());
  return true;
}

Fixed version (ground truth):
public boolean touchStore(){
  if (cookieStoreFile.lastModified() + CACHE_WRITE_DELTA > System.currentTimeMillis()) {
    return false;
  }
  boolean ignore=cookieStoreFile.setLastModified(System.currentTimeMillis());
  return true;
}
Program: 29702
Project: 29702
Buggy source:
private void addCookieHeaders(final URLConnection urlConnection){
  long modifiedTime=sessionCache.lastModified();
  if (modifiedTime == 0) {
    return;
  }
  ((CookieManager)CookieHandler.getDefault()).getCookieStore().removeAll();
  cookieManager=new CookieManager(new ClientCookieStore(new CookieManager().getCookieStore(),sessionCache),CookiePolicy.ACCEPT_ALL);
  try {
    ((ClientCookieStore)cookieManager.getCookieStore()).load();
  }
 catch (  IOException e) {
    logger.log(Level.FINE,"String_Node_Str",e.toString());
    return;
  }
  if (isSessionCookieExpired(cookieManager,modifiedTime)) {
    logger.fine("String_Node_Str");
    if (!sessionCache.delete()) {
      logger.fine("String_Node_Str");
    }
    return;
  }
  StringBuilder sb=new StringBuilder("String_Node_Str");
  boolean hasCookies=false;
  for (  HttpCookie cookie : cookieManager.getCookieStore().getCookies()) {
    hasCookies=true;
    sb.append("String_Node_Str").append(cookie.toString());
  }
  if (hasCookies) {
    urlConnection.setRequestProperty(COOKIE_HEADER,sb.toString());
  }
}

Fixed version (ground truth):
private void addCookieHeaders(final URLConnection urlConnection){
  long modifiedTime=sessionCache.lastModified();
  if (modifiedTime == 0) {
    return;
  }
  ((CookieManager)CookieHandler.getDefault()).getCookieStore().removeAll();
  cookieManager=new CookieManager(new ClientCookieStore(new CookieManager().getCookieStore(),sessionCache),CookiePolicy.ACCEPT_ALL);
  try {
    ((ClientCookieStore)cookieManager.getCookieStore()).load();
  }
 catch (  IOException e) {
    logger.log(Level.FINE,"String_Node_Str",e.toString());
    return;
  }
  if (isSessionCookieExpired(cookieManager,modifiedTime)) {
    logger.fine("String_Node_Str");
    if (!sessionCache.delete()) {
      logger.fine("String_Node_Str");
    }
    return;
  }
  StringBuilder sb=new StringBuilder("String_Node_Str");
  boolean hasCookies=false;
  for (  HttpCookie cookie : cookieManager.getCookieStore().getCookies()) {
    hasCookies=true;
    sb.append("String_Node_Str").append(cookie.getName()).append("String_Node_Str").append(cookie.getValue());
  }
  if (hasCookies) {
    urlConnection.setRequestProperty(COOKIE_HEADER,sb.toString());
  }
}
Program: 29703
Project: 29703
Buggy source:
/** 
 * Register wrapper.
 */
private void registerWrapper(StandardWrapper wrapper) throws Exception {
  ObjectName objectName=wrapper.getJmxName();
  if (wrapper == null) {
    throw new Exception("String_Node_Str" + objectName);
  }
  String wrapperName=objectName.getKeyProperty("String_Node_Str");
  String name=objectName.getKeyProperty("String_Node_Str");
  String hostName=null;
  String contextName=null;
  if (name.startsWith("String_Node_Str")) {
    name=name.substring(2);
  }
  int slash=name.indexOf("String_Node_Str");
  if (slash != -1) {
    hostName=name.substring(0,slash);
    contextName=name.substring(slash);
    contextName=RequestUtil.urlDecode(contextName,"String_Node_Str");
  }
 else {
    return;
  }
  if (contextName.equals("String_Node_Str")) {
    contextName="String_Node_Str";
  }
  String msg=rb.getString("String_Node_Str");
  msg=MessageFormat.format(msg,wrapperName,contextName);
  if (logger.isLoggable(Level.FINE)) {
    logger.fine(msg);
  }
  String[] mappings=wrapper.findMappings();
  for (int i=0; i < mappings.length; i++) {
    boolean jspWildCard=(wrapperName.equals("String_Node_Str") && mappings[i].endsWith("String_Node_Str"));
    mapper.addWrapper(hostName,contextName,mappings[i],wrapper,jspWildCard,wrapperName,true);
  }
}

Fixed version (ground truth):
/** 
 * Register wrapper.
 */
private void registerWrapper(StandardWrapper wrapper) throws Exception {
  if (wrapper == null) {
    throw new Exception("String_Node_Str" + wrapper);
  }
  ObjectName objectName=wrapper.getJmxName();
  if (objectName == null) {
    return;
  }
  String wrapperName=objectName.getKeyProperty("String_Node_Str");
  String name=objectName.getKeyProperty("String_Node_Str");
  String hostName=null;
  String contextName=null;
  if (name.startsWith("String_Node_Str")) {
    name=name.substring(2);
  }
  int slash=name.indexOf("String_Node_Str");
  if (slash != -1) {
    hostName=name.substring(0,slash);
    contextName=name.substring(slash);
    contextName=RequestUtil.urlDecode(contextName,"String_Node_Str");
  }
 else {
    return;
  }
  if (contextName.equals("String_Node_Str")) {
    contextName="String_Node_Str";
  }
  String msg=rb.getString("String_Node_Str");
  msg=MessageFormat.format(msg,wrapperName,contextName);
  if (logger.isLoggable(Level.FINE)) {
    logger.fine(msg);
  }
  String[] mappings=wrapper.findMappings();
  for (int i=0; i < mappings.length; i++) {
    boolean jspWildCard=(wrapperName.equals("String_Node_Str") && mappings[i].endsWith("String_Node_Str"));
    mapper.addWrapper(hostName,contextName,mappings[i],wrapper,jspWildCard,wrapperName,true);
  }
}
Program: 29704
Project: 29704
Buggy source:
protected static void setDefaultValue(MethodVisitor method,String className,String fieldName,Class<?> fieldClass,String defaultValue){
  final String type=getInternalTypeString(fieldClass);
  Object value=defaultValue;
  if (fieldClass.isPrimitive()) {
switch (Primitive.getPrimitive(type)) {
case SHORT:
      value=Short.valueOf(defaultValue);
    break;
case LONG:
  value=Long.valueOf(defaultValue);
break;
case INT:
value=Integer.valueOf(defaultValue);
break;
case FLOAT:
value=Float.valueOf(defaultValue);
break;
case DOUBLE:
value=Double.valueOf(defaultValue);
break;
case BYTE:
value=Byte.valueOf(defaultValue);
break;
case BOOLEAN:
value=Boolean.valueOf(defaultValue);
break;
}
method.visitVarInsn(ALOAD,0);
method.visitLdcInsn(value);
method.visitFieldInsn(PUTFIELD,getInternalName(className),fieldName,type);
}
 else {
if (!fieldClass.equals(String.class)) {
method.visitVarInsn(ALOAD,0);
final String internalName=getInternalName(fieldClass.getName());
method.visitTypeInsn(NEW,internalName);
method.visitInsn(DUP);
method.visitLdcInsn(defaultValue);
method.visitMethodInsn(INVOKESPECIAL,internalName,"String_Node_Str","String_Node_Str");
method.visitFieldInsn(PUTFIELD,getInternalName(className),fieldName,type);
}
 else {
method.visitVarInsn(ALOAD,0);
method.visitLdcInsn(value);
method.visitFieldInsn(PUTFIELD,getInternalName(className),fieldName,type);
}
}
}

Fixed version (ground truth):
protected static void setDefaultValue(MethodVisitor method,String className,String fieldName,Class<?> fieldClass,String defaultValue){
  final String type=getInternalTypeString(fieldClass);
  Object value=defaultValue;
  fieldName=getPropertyName(fieldName);
  if (fieldClass.isPrimitive()) {
switch (Primitive.getPrimitive(type)) {
case SHORT:
      value=Short.valueOf(defaultValue);
    break;
case LONG:
  value=Long.valueOf(defaultValue);
break;
case INT:
value=Integer.valueOf(defaultValue);
break;
case FLOAT:
value=Float.valueOf(defaultValue);
break;
case DOUBLE:
value=Double.valueOf(defaultValue);
break;
case BYTE:
value=Byte.valueOf(defaultValue);
break;
case BOOLEAN:
value=Boolean.valueOf(defaultValue);
break;
}
method.visitVarInsn(ALOAD,0);
method.visitLdcInsn(value);
method.visitFieldInsn(PUTFIELD,getInternalName(className),fieldName,type);
}
 else {
if (!fieldClass.equals(String.class)) {
method.visitVarInsn(ALOAD,0);
final String internalName=getInternalName(fieldClass.getName());
method.visitTypeInsn(NEW,internalName);
method.visitInsn(DUP);
method.visitLdcInsn(defaultValue);
method.visitMethodInsn(INVOKESPECIAL,internalName,"String_Node_Str","String_Node_Str");
method.visitFieldInsn(PUTFIELD,getInternalName(className),fieldName,type);
}
 else {
method.visitVarInsn(ALOAD,0);
method.visitLdcInsn(value);
method.visitFieldInsn(PUTFIELD,getInternalName(className),fieldName,type);
}
}
}
Program: 29705
Project: 29705
Buggy source:
/** 
 * Create getters and setters for the given field
 */
protected static void createGettersAndSetters(ClassWriter cw,Class c,String className,String name,Class<?> type){
  String internalType=getInternalTypeString(type);
  className=getInternalName(className);
  MethodVisitor getter=cw.visitMethod(ACC_PUBLIC,"String_Node_Str" + name,"String_Node_Str" + internalType,null,null);
  getter.visitCode();
  getter.visitVarInsn(ALOAD,0);
  getter.visitFieldInsn(GETFIELD,className,name,internalType);
  getter.visitInsn(type.isPrimitive() ? Primitive.getPrimitive(internalType).getReturnOpcode() : ARETURN);
  getter.visitMaxs(0,0);
  getter.visitEnd();
  MethodVisitor setter=cw.visitMethod(ACC_PUBLIC,"String_Node_Str" + name,"String_Node_Str" + internalType + "String_Node_Str",null,null);
  setter.visitCode();
  setter.visitVarInsn(ALOAD,0);
  setter.visitVarInsn(type.isPrimitive() ? Primitive.getPrimitive(internalType).getSetOpCode() : ALOAD,1);
  setter.visitFieldInsn(PUTFIELD,className,name,internalType);
  setter.visitInsn(RETURN);
  setter.visitMaxs(0,0);
  setter.visitEnd();
}

Fixed version (ground truth):
/** 
 * Create getters and setters for the given field
 */
protected static void createGettersAndSetters(ClassWriter cw,Class c,String className,String name,Class<?> type){
  String internalType=getInternalTypeString(type);
  className=getInternalName(className);
  MethodVisitor getter=cw.visitMethod(ACC_PUBLIC,"String_Node_Str" + name,"String_Node_Str" + internalType,null,null);
  getter.visitCode();
  getter.visitVarInsn(ALOAD,0);
  getter.visitFieldInsn(GETFIELD,className,getPropertyName(name),internalType);
  getter.visitInsn(type.isPrimitive() ? Primitive.getPrimitive(internalType).getReturnOpcode() : ARETURN);
  getter.visitMaxs(0,0);
  getter.visitEnd();
  MethodVisitor setter=cw.visitMethod(ACC_PUBLIC,"String_Node_Str" + name,"String_Node_Str" + internalType + "String_Node_Str",null,null);
  setter.visitCode();
  setter.visitVarInsn(ALOAD,0);
  setter.visitVarInsn(type.isPrimitive() ? Primitive.getPrimitive(internalType).getSetOpCode() : ALOAD,1);
  setter.visitFieldInsn(PUTFIELD,className,getPropertyName(name),internalType);
  setter.visitInsn(RETURN);
  setter.visitMaxs(0,0);
  setter.visitEnd();
}