nus-yam/ex-repair huggingface dataset:
Program: 28689
Project: 28689
Buggy source:
private void validate(ConfigBeanProxy check,String key,String... arguments) throws ValidationFailureException {
  if (check == null) {
    report.setMessage(MessageFormat.format(rb.getString(key),arguments));
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    throw new ValidationFailureException();
  }
}

Fixed version (ground truth):
private void validate(ConfigBeanProxy check,String key,String... arguments) throws ValidationFailureException {
  if ((check == null) && (report != null)) {
    report.setMessage(MessageFormat.format(rb.getString(key),arguments));
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    throw new ValidationFailureException();
  }
}
Program: 28690
Project: 28690
Buggy source:
private void validate(ConfigBeanProxy check,String key,String defaultFormat,String... arguments) throws ValidationFailureException {
  if (check == null) {
    report.setMessage(MessageFormat.format(rb.getString(key),arguments));
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    throw new ValidationFailureException();
  }
}

Fixed version (ground truth):
private void validate(ConfigBeanProxy check,String key,String... arguments) throws ValidationFailureException {
  if ((check == null) && (report != null)) {
    report.setMessage(MessageFormat.format(rb.getString(key),arguments));
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    throw new ValidationFailureException();
  }
}
Program: 28691
Project: 28691
Buggy source:
private void cleanUp(String name) throws TransactionFailure {
  boolean found=false;
  for (  NetworkListener candidate : networkConfig.getNetworkListeners().getNetworkListener()) {
    found|=candidate.getProtocol().equals(name);
  }
  if (!found) {
    ConfigSupport.apply(new DeleteProtocol(name),networkConfig.getProtocols());
  }
}

Fixed version (ground truth):
private void cleanUp(String name) throws TransactionFailure {
  boolean found=false;
  if (networkConfig != null) {
    for (    NetworkListener candidate : networkConfig.getNetworkListeners().getNetworkListener()) {
      found|=candidate.getProtocol().equals(name);
    }
    if (!found) {
      ConfigSupport.apply(new DeleteProtocol(name),networkConfig.getProtocols());
    }
  }
}
Program: 28692
Project: 28692
Buggy source:
private boolean exists(){
  return networkConfig.getNetworkListener(listenerId) != null;
}

Fixed version (ground truth):
private boolean exists(){
  if (networkConfig != null) {
    return networkConfig.getNetworkListener(listenerId) != null;
  }
 else {
    return false;
  }
}
Program: 28693
Project: 28693
Buggy source:
private ProtocolChain getChain(ProtocolChainInstanceHandler handler) throws TransactionFailure {
  ProtocolChain chain=handler.getProtocolChain();
  if (chain == null) {
    report.setMessage(MessageFormat.format(rb.getString(NOT_FOUND),"String_Node_Str",handler.getParent(Protocol.class).getName()));
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
  }
  return chain;
}

Fixed version (ground truth):
private ProtocolChain getChain(ProtocolChainInstanceHandler handler) throws TransactionFailure {
  ProtocolChain chain=handler.getProtocolChain();
  if ((chain == null) && (report != null)) {
    report.setMessage(MessageFormat.format(rb.getString(NOT_FOUND),"String_Node_Str",handler.getParent(Protocol.class).getName()));
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
  }
  return chain;
}
Program: 28694
Project: 28694
Buggy source:
private ProtocolChainInstanceHandler getHandler(Protocol protocol) throws TransactionFailure {
  ProtocolChainInstanceHandler handler=protocol.getProtocolChainInstanceHandler();
  if (handler == null) {
    report.setMessage(MessageFormat.format(rb.getString(NOT_FOUND),"String_Node_Str",protocol.getName()));
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
  }
  return handler;
}

Fixed version (ground truth):
private ProtocolChainInstanceHandler getHandler(Protocol protocol) throws TransactionFailure {
  ProtocolChainInstanceHandler handler=protocol.getProtocolChainInstanceHandler();
  if ((handler == null) && (report != null)) {
    report.setMessage(MessageFormat.format(rb.getString(NOT_FOUND),"String_Node_Str",protocol.getName()));
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
  }
  return handler;
}
Program: 28695
Project: 28695
Buggy source:
private void validate(ConfigBeanProxy check,String key,String... arguments) throws ValidationFailureException {
  if (check == null) {
    report.setMessage(MessageFormat.format(rb.getString(key),arguments));
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    throw new ValidationFailureException();
  }
}

Fixed version (ground truth):
private void validate(ConfigBeanProxy check,String key,String... arguments) throws ValidationFailureException {
  if ((check == null) && (report != null)) {
    report.setMessage(MessageFormat.format(rb.getString(key),arguments));
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    throw new ValidationFailureException();
  }
}
Program: 28696
Project: 28696
Buggy source:
private void validate(ConfigBeanProxy check,String key,String... arguments) throws ValidationFailureException {
  if (check == null) {
    report.setMessage(MessageFormat.format(rb.getString(key),arguments));
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    throw new ValidationFailureException();
  }
}

Fixed version (ground truth):
private void validate(ConfigBeanProxy check,String key,String... arguments) throws ValidationFailureException {
  if ((check == null) && (report != null)) {
    report.setMessage(MessageFormat.format(rb.getString(key),arguments));
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    throw new ValidationFailureException();
  }
}
Program: 28697
Project: 28697
Buggy source:
private boolean exists(){
  if (vsid == null)   return false;
  List<VirtualServer> list=httpService.getVirtualServer();
  for (  VirtualServer vs : list) {
    String currId=vs.getId();
    if (currId != null && currId.equals(vsid))     return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean exists(){
  if ((vsid == null) || (httpService == null))   return false;
  List<VirtualServer> list=httpService.getVirtualServer();
  for (  VirtualServer vs : list) {
    String currId=vs.getId();
    if (currId != null && currId.equals(vsid))     return true;
  }
  return false;
}
Program: 28698
Project: 28698
Buggy source:
private String getReferencingListener(){
  List<NetworkListener> list=networkConfig.getNetworkListeners().getNetworkListener();
  for (  NetworkListener listener : list) {
    String virtualServer=listener.findHttpProtocol().getHttp().getDefaultVirtualServer();
    if (virtualServer != null && virtualServer.equals(vsid)) {
      return listener.getName();
    }
  }
  return null;
}

Fixed version (ground truth):
private String getReferencingListener(){
  if (networkConfig != null) {
    List<NetworkListener> list=networkConfig.getNetworkListeners().getNetworkListener();
    for (    NetworkListener listener : list) {
      String virtualServer=listener.findHttpProtocol().getHttp().getDefaultVirtualServer();
      if (virtualServer != null && virtualServer.equals(vsid)) {
        return listener.getName();
      }
    }
  }
  return null;
}
Program: 28699
Project: 28699
Buggy source:
@Override public void persist(Object obj){
  JobInfo jobInfo=(JobInfo)obj;
  File file=jobInfo.getJobsFile();
synchronized (file) {
    jobInfos=jobManager.getCompletedJobs();
    if (jobInfos == null)     jobInfos=new JobInfos();
    try {
      JAXBContext jaxbContext=JAXBContext.newInstance(JobInfos.class);
      jaxbMarshaller=jaxbContext.createMarshaller();
      jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,true);
      jobInfos.getJobInfoList().add(jobInfo);
      jaxbMarshaller.marshal(jobInfos,file);
      jobManager.purgeJob(jobInfo.jobId);
    }
 catch (    JAXBException e) {
      throw new RuntimeException(adminStrings.getLocalString("String_Node_Str","String_Node_Str",jobInfo.jobId,e.getLocalizedMessage()),e);
    }
  }
}

Fixed version (ground truth):
@Override public void persist(Object obj){
  JobInfo jobInfo=(JobInfo)obj;
  jobInfos=jobManager.getCompletedJobs();
  doPersist(jobInfos,jobInfo);
}
Program: 28700
Project: 28700
Buggy source:
/** 
 * This will create a new job with the name of command and a new unused id for the job
 * @param scope The scope of the command or null if there is no scope
 * @param name  The name of the command
 * @return   a newly created job
 */
@Override public Job createJob(String id,String scope,String name,Subject subject,boolean isManagedJob){
  AdminCommandInstanceImpl job=null;
  if (isManagedJob) {
    job=new AdminCommandInstanceImpl(id,name,scope,subject,true);
    job.setJobsFile(getJobsFile());
  }
 else {
    job=new AdminCommandInstanceImpl(name,scope,subject,false);
  }
  return job;
}

Fixed version (ground truth):
/** 
 * This will create a new job with the name of command and a new unused id for the job
 * @param scope The scope of the command or null if there is no scope
 * @param name  The name of the command
 * @return   a newly created job
 */
@Override public Job createJob(String id,String scope,String name,Subject subject,boolean isManagedJob){
  AdminCommandInstanceImpl job=null;
  if (isManagedJob) {
    job=new AdminCommandInstanceImpl(id,name,scope,subject,true);
    job.setJobsFile(jobManagerService.jobsFile);
  }
 else {
    job=new AdminCommandInstanceImpl(name,scope,subject,false);
  }
  return job;
}
Program: 28701
Project: 28701
Buggy source:
/** 
 * This method looks for the completed jobs and purges a job which is marked with the jobId
 * @param jobId the job to purge
 * @return  the new list of completed jobs
 */
@Override public JobInfos purgeCompletedJobForId(String jobId){
synchronized (jobsFile) {
    CopyOnWriteArrayList<JobInfo> jobList=new CopyOnWriteArrayList<JobInfo>();
    if (getCompletedJobs() != null)     jobList.addAll(getCompletedJobs().getJobInfoList());
    for (    JobInfo jobInfo : jobList) {
      if (jobInfo.jobId.equals(jobId)) {
        jobList.remove(jobInfo);
      }
    }
    JobInfos jobInfos=new JobInfos();
    try {
      if (jaxbContext == null)       jaxbContext=JAXBContext.newInstance(JobInfos.class);
      jobInfos.setJobInfoList(jobList);
      Marshaller jaxbMarshaller=jaxbContext.createMarshaller();
      jaxbMarshaller.marshal(jobInfos,jobsFile);
    }
 catch (    JAXBException e) {
      throw new RuntimeException(adminStrings.getLocalString("String_Node_Str","String_Node_Str",jobId,e.getLocalizedMessage()),e);
    }
    return jobInfos;
  }
}

Fixed version (ground truth):
/** 
 * This method looks for the completed jobs and purges a job which is marked with the jobId
 * @param jobId the job to purge
 * @return  the new list of completed jobs
 */
@Override public JobInfos purgeCompletedJobForId(String jobId){
  JobInfos completedJobInfos=getCompletedJobs();
synchronized (jobsFile) {
    CopyOnWriteArrayList<JobInfo> jobList=new CopyOnWriteArrayList<JobInfo>();
    if (completedJobInfos != null) {
      jobList.addAll(completedJobInfos.getJobInfoList());
      for (      JobInfo jobInfo : jobList) {
        if (jobInfo.jobId.equals(jobId)) {
          jobList.remove(jobInfo);
        }
      }
    }
    JobInfos jobInfos=new JobInfos();
    try {
      if (jaxbContext == null)       jaxbContext=JAXBContext.newInstance(JobInfos.class);
      jobInfos.setJobInfoList(jobList);
      Marshaller jaxbMarshaller=jaxbContext.createMarshaller();
      jaxbMarshaller.marshal(jobInfos,jobsFile);
    }
 catch (    JAXBException e) {
      throw new RuntimeException(adminStrings.getLocalString("String_Node_Str","String_Node_Str",jobId,e.getLocalizedMessage()),e);
    }
    return jobInfos;
  }
}
Program: 28702
Project: 28702
Buggy source:
/** 
 * Gets the value of the threadLifetimeSeconds property.
 * @return possible object is {@link String }
 */
@Attribute(defaultValue="String_Node_Str" + Integer.MAX_VALUE,dataType=Integer.class) String getTaskQueueCapacity();

Fixed version (ground truth):
/** 
 * Gets the value of the threadLifetimeSeconds property.
 * @return possible object is {@link String }
 */
@Attribute(defaultValue="String_Node_Str" + Integer.MAX_VALUE,dataType=Integer.class) @Min(value=0) String getTaskQueueCapacity();
Program: 28703
Project: 28703
Buggy source:
/** 
 * Gets the value of the corePoolSize property.
 * @return possible object is {@link String }
 */
@Attribute(defaultValue="String_Node_Str",dataType=Integer.class) String getCorePoolSize();

Fixed version (ground truth):
/** 
 * Gets the value of the corePoolSize property.
 * @return possible object is {@link String }
 */
@Attribute(defaultValue="String_Node_Str",dataType=Integer.class) @Min(value=0) String getCorePoolSize();
Program: 28704
Project: 28704
Buggy source:
/** 
 * Gets the value of the hungAfterSeconds property.
 * @return possible object is{@link String }
 */
@Attribute(defaultValue="String_Node_Str",dataType=Integer.class) String getHungAfterSeconds();

Fixed version (ground truth):
/** 
 * Gets the value of the hungAfterSeconds property.
 * @return possible object is{@link String }
 */
@Attribute(defaultValue="String_Node_Str",dataType=Integer.class) @Min(value=0) String getHungAfterSeconds();
Program: 28705
Project: 28705
Buggy source:
/** 
 * Gets the value of the maximumPoolSize property.
 * @return possible object is {@link String }
 */
@Attribute(defaultValue="String_Node_Str" + Integer.MAX_VALUE,dataType=Integer.class) String getMaximumPoolSize();

Fixed version (ground truth):
/** 
 * Gets the value of the maximumPoolSize property.
 * @return possible object is {@link String }
 */
@Attribute(defaultValue="String_Node_Str" + Integer.MAX_VALUE,dataType=Integer.class) @Min(value=0) String getMaximumPoolSize();
Program: 28706
Project: 28706
Buggy source:
/** 
 * Gets the value of the threadLifetimeSeconds property.
 * @return possible object is {@link String }
 */
@Attribute(defaultValue="String_Node_Str",dataType=Integer.class) String getThreadLifetimeSeconds();

Fixed version (ground truth):
/** 
 * Gets the value of the threadLifetimeSeconds property.
 * @return possible object is {@link String }
 */
@Attribute(defaultValue="String_Node_Str",dataType=Integer.class) @Min(value=0) String getThreadLifetimeSeconds();
Program: 28707
Project: 28707
Buggy source:
/** 
 * Gets the value of the threadPriority property.
 * @return possible object is{@link String }
 */
@Attribute(defaultValue="String_Node_Str" + Thread.NORM_PRIORITY,dataType=Integer.class) String getThreadPriority();

Fixed version (ground truth):
/** 
 * Gets the value of the threadPriority property.
 * @return possible object is{@link String }
 */
@Attribute(defaultValue="String_Node_Str" + Thread.NORM_PRIORITY,dataType=Integer.class) @Min(value=0) String getThreadPriority();
Program: 28708
Project: 28708
Buggy source:
/** 
 * Gets the value of the keepAlivesSeconds property.
 * @return possible object is {@link String }
 */
@Attribute(defaultValue="String_Node_Str",dataType=Integer.class) String getKeepAliveSeconds();

Fixed version (ground truth):
/** 
 * Gets the value of the keepAlivesSeconds property.
 * @return possible object is {@link String }
 */
@Attribute(defaultValue="String_Node_Str",dataType=Integer.class) @Min(value=0) String getKeepAliveSeconds();
Program: 28709
Project: 28709
Buggy source:
/** 
 * Gets the value of the threadPriority property.
 * @return possible object is{@link String }
 */
@Attribute(defaultValue="String_Node_Str" + Thread.NORM_PRIORITY,dataType=Integer.class) String getThreadPriority();

Fixed version (ground truth):
/** 
 * Gets the value of the threadPriority property.
 * @return possible object is{@link String }
 */
@Attribute(defaultValue="String_Node_Str" + Thread.NORM_PRIORITY,dataType=Integer.class) @Min(value=0) String getThreadPriority();
Program: 28711
Project: 28711
Buggy source:
private int update(Collection<Jar> jars){
  for (  Jar jar : jars) {
    final Jar existingJar=getBundleJar(jar);
    if (jar.isNewer(existingJar)) {
      Bundle bundle=getBundle(existingJar);
      if (bundle == null) {
        logger.log(Level.WARNING,LogFacade.CANT_UPDATE_ALREADY_INSTALLED,new Object[]{bundle});
        continue;
      }
      try {
        if (isFrameworkExtensionBundle(bundle)) {
          setSystemBundleUpdationRequired(true);
        }
        bundle.update();
        noOfUpdatedBundles++;
        logger.log(Level.INFO,LogFacade.BUNDLE_UPDATED,new Object[]{bundle.getBundleId(),jar.getPath()});
      }
 catch (      Exception e) {
        LogFacade.log(logger,Level.WARNING,LogFacade.UPDATE_FAILED,e,jar.getPath());
      }
    }
  }
  return noOfUpdatedBundles;
}

Fixed version (ground truth):
private int update(Collection<Jar> jars){
  for (  Jar jar : jars) {
    final Jar existingJar=getBundleJar(jar);
    if (jar.isNewer(existingJar)) {
      Bundle bundle=getBundle(existingJar);
      if (bundle == null) {
        logger.log(Level.WARNING,LogFacade.CANT_UPDATE_ALREADY_INSTALLED,new Object[]{existingJar.getPath()});
        continue;
      }
      try {
        if (isFrameworkExtensionBundle(bundle)) {
          setSystemBundleUpdationRequired(true);
        }
        bundle.update();
        noOfUpdatedBundles++;
        logger.log(Level.INFO,LogFacade.BUNDLE_UPDATED,new Object[]{bundle.getBundleId(),jar.getPath()});
      }
 catch (      Exception e) {
        LogFacade.log(logger,Level.WARNING,LogFacade.UPDATE_FAILED,e,jar.getPath());
      }
    }
  }
  return noOfUpdatedBundles;
}
Program: 28712
Project: 28712
Buggy source:
protected int uninstall(List<Jar> bundles){
  for (  Jar jar : bundles) {
    Bundle bundle=getBundle(jar);
    if (bundle == null) {
      logger.log(Level.WARNING,LogFacade.BUNDLE_ALREADY_UNINSTALED,new Object[]{bundle});
      continue;
    }
    try {
      if (isFrameworkExtensionBundle(bundle)) {
        setSystemBundleUpdationRequired(true);
      }
      bundle.uninstall();
      noOfUninstalledBundles++;
      removeBundle(jar);
      logger.log(Level.INFO,LogFacade.UNINSTALLED_BUNDLE,new Object[]{bundle.getBundleId(),jar.getPath()});
    }
 catch (    Exception e) {
      LogFacade.log(logger,Level.WARNING,LogFacade.BUNDLE_UNINSTALL_FAILED,e,jar.getPath());
    }
  }
  return noOfUninstalledBundles;
}

Fixed version (ground truth):
protected int uninstall(List<Jar> bundles){
  for (  Jar jar : bundles) {
    Bundle bundle=getBundle(jar);
    if (bundle == null) {
      logger.log(Level.WARNING,LogFacade.BUNDLE_ALREADY_UNINSTALED,new Object[]{jar.getPath()});
      continue;
    }
    try {
      if (isFrameworkExtensionBundle(bundle)) {
        setSystemBundleUpdationRequired(true);
      }
      bundle.uninstall();
      noOfUninstalledBundles++;
      removeBundle(jar);
      logger.log(Level.INFO,LogFacade.UNINSTALLED_BUNDLE,new Object[]{bundle.getBundleId(),jar.getPath()});
    }
 catch (    Exception e) {
      LogFacade.log(logger,Level.WARNING,LogFacade.BUNDLE_UNINSTALL_FAILED,e,jar.getPath());
    }
  }
  return noOfUninstalledBundles;
}
Program: 28713
Project: 28713
Buggy source:
/** 
 * Creates a new instance of an ApplicationInfo
 * @param events
 * @param source the archive for this application
 * @param name name of the application
 */
public ApplicationInfo(final Events events,ReadableArchive source,String name){
  super(events,name,new LinkedHashSet<EngineRef>(),null);
  this.source=source;
  appServiceLocator=ServiceLocatorFactory.getInstance().create(APP_SERVICE_LOCATOR_PREFIX + name);
}

Fixed version (ground truth):
/** 
 * Creates a new instance of an ApplicationInfo
 * @param events
 * @param source the archive for this application
 * @param name name of the application
 */
public ApplicationInfo(final Events events,ReadableArchive source,String name){
  super(events,name,new LinkedHashSet<EngineRef>(),null);
  this.source=source;
}
Program: 28715
Project: 28715
Buggy source:
public void clean(ExtendedDeploymentContext context) throws Exception {
  super.clean(context);
  for (  ModuleInfo info : reversedModules) {
    info.clean(getSubContext(info,context));
    info=null;
  }
  if (appClassLoader != null) {
    try {
      appServiceLocator.preDestroy(appClassLoader);
    }
 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();
    }
  }
  ServiceLocatorFactory.getInstance().destroy(appServiceLocator);
  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 {
  super.clean(context);
  for (  ModuleInfo info : reversedModules) {
    info.clean(getSubContext(info,context));
    info=null;
  }
  if (appClassLoader != null) {
    try {
      appServiceLocator.preDestroy(appClassLoader);
    }
 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();
    }
  }
  disposeServiceLocator();
  if (events != null) {
    events.send(new EventListener.Event<DeploymentContext>(Deployment.APPLICATION_CLEANED,context),false);
  }
}
Program: 28718
Project: 28718
Buggy source:
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class,required=true)}) public static void isConfigName(HandlerContext handlerCtx){
  String configName=(String)handlerCtx.getInputValue("String_Node_Str");
  List config=TargetUtil.getConfig();
  if (!config.contains(configName)) {
    GuiUtil.handleError(handlerCtx,GuiUtil.getMessage("String_Node_Str"));
    return;
  }
}

Fixed version (ground truth):
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class,required=true)}) public static void isConfigName(HandlerContext handlerCtx){
  String configName=(String)handlerCtx.getInputValue("String_Node_Str");
  List config=TargetUtil.getConfigs();
  if (!config.contains(configName)) {
    GuiUtil.handleError(handlerCtx,GuiUtil.getMessage("String_Node_Str"));
    return;
  }
}
Program: 28719
Project: 28719
Buggy source:
public static Collection<BindableResource> getResourcesOfPool(Resources resources,String connectionPoolName){
  Set<BindableResource> resourcesReferringPool=new HashSet<BindableResource>();
  ResourcePool pool=(ResourcePool)getResourceByName(resources,ResourcePool.class,connectionPoolName);
  if (pool != null) {
    Collection<BindableResource> bindableResources=resources.getResources(BindableResource.class);
    for (    BindableResource resource : bindableResources) {
      if (ConnectorResource.class.isAssignableFrom(resource.getClass())) {
        if ((((ConnectorResource)resource).getPoolName()).equals(connectionPoolName)) {
          resourcesReferringPool.add(resource);
        }
      }
    }
  }
  return resourcesReferringPool;
}

Fixed version (ground truth):
public static Collection<BindableResource> getResourcesOfPool(Resources resources,String connectionPoolName){
  Set<BindableResource> resourcesReferringPool=new HashSet<BindableResource>();
  ResourcePool pool=(ResourcePool)getResourceByName(resources,ResourcePool.class,connectionPoolName);
  if (pool != null) {
    Collection<BindableResource> bindableResources=resources.getResources(BindableResource.class);
    for (    BindableResource resource : bindableResources) {
      if (ResourcePoolReference.class.isAssignableFrom(resource.getClass())) {
        if ((((ResourcePoolReference)resource).getPoolName()).equals(connectionPoolName)) {
          resourcesReferringPool.add(resource);
        }
      }
    }
  }
  return resourcesReferringPool;
}
Program: 28724
Project: 28724
Buggy source:
protected void calculateHeaders(){
  String[] headers=getTerseHeaders();
  if (outputHeaderList != null) {
    headers=outputHeaderList.split("String_Node_Str");
    if (headers.length == 0)     headers=getTerseHeaders();
  }
 else   if (useLongFormat)   headers=getSupportedHeaders();
  Set<String> validHeaders=new HashSet<String>();
  for (  String h : getSupportedHeaders())   validHeaders.add(h.toLowerCase(Locale.US));
  for (int i=0; i < headers.length; i++) {
    if (!validHeaders.contains(headers[i].toLowerCase(Locale.US))) {
      throw new IllegalArgumentException("String_Node_Str" + headers[i]);
    }
    headers[i]=headers[i].toLowerCase(Locale.US);
  }
  outputHeaders=headers;
  displayHeaders=new String[outputHeaders.length];
  for (int index=0; index < displayHeaders.length; index++)   displayHeaders[index]=isHeaderRequired() ? outputHeaders[index].toUpperCase() : "String_Node_Str";
}

Fixed version (ground truth):
protected void calculateHeaders(){
  String[] headers=getTerseHeaders();
  if (outputHeaderList != null) {
    headers=outputHeaderList.split("String_Node_Str");
    if (headers.length == 0)     headers=getTerseHeaders();
  }
 else   if (useLongFormat)   headers=getSupportedHeaders();
  Set<String> validHeaders=new HashSet<String>();
  for (  String h : getSupportedHeaders())   validHeaders.add(h.toLowerCase(Locale.US));
  for (int i=0; i < headers.length; i++) {
    if (!validHeaders.contains(headers[i].toLowerCase(Locale.US))) {
      throw new IllegalArgumentException("String_Node_Str" + headers[i]);
    }
    headers[i]=headers[i].toLowerCase(Locale.US);
  }
  outputHeaders=headers;
  displayHeaders=new String[outputHeaders.length];
  for (int index=0; index < displayHeaders.length; index++)   displayHeaders[index]=isHeaderRequired() ? outputHeaders[index].toUpperCase(Locale.US) : "String_Node_Str";
}
Program: 28725
Project: 28725
Buggy source:
private String getFullWmicResult(String alias,String verb,String property){
  StringBuilder res=new StringBuilder();
  BufferedReader in=null;
  BufferedWriter bw=null;
  try {
    ProcessBuilder pb=new ProcessBuilder("String_Node_Str","String_Node_Str","String_Node_Str",alias,verb,property);
    Process p=pb.start();
    bw=new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
    bw.write(13);
    bw.flush();
    p.waitFor();
    if (p.exitValue() == 0) {
      in=new BufferedReader(new InputStreamReader(p.getInputStream()));
      String line=null;
      while ((line=in.readLine()) != null) {
        line=line.trim();
        if (line.length() == 0) {
          continue;
        }
        if (line.toLowerCase(Locale.US).indexOf(property.toLowerCase()) != -1) {
          continue;
        }
        res.append(line).append("String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
  }
 finally {
    if (in != null) {
      try {
        in.close();
      }
 catch (      IOException e) {
      }
    }
    if (bw != null) {
      try {
        bw.close();
      }
 catch (      IOException e) {
      }
    }
  }
  return res.toString();
}

Fixed version (ground truth):
private String getFullWmicResult(String alias,String verb,String property){
  StringBuilder res=new StringBuilder();
  BufferedReader in=null;
  BufferedWriter bw=null;
  try {
    ProcessBuilder pb=new ProcessBuilder("String_Node_Str","String_Node_Str","String_Node_Str",alias,verb,property);
    Process p=pb.start();
    bw=new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
    bw.write(13);
    bw.flush();
    p.waitFor();
    if (p.exitValue() == 0) {
      in=new BufferedReader(new InputStreamReader(p.getInputStream()));
      String line=null;
      while ((line=in.readLine()) != null) {
        line=line.trim();
        if (line.length() == 0) {
          continue;
        }
        if (line.toLowerCase(Locale.US).indexOf(property.toLowerCase(Locale.US)) != -1) {
          continue;
        }
        res.append(line).append("String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
  }
 finally {
    if (in != null) {
      try {
        in.close();
      }
 catch (      IOException e) {
      }
    }
    if (bw != null) {
      try {
        bw.close();
      }
 catch (      IOException e) {
      }
    }
  }
  return res.toString();
}
Program: 28726
Project: 28726
Buggy source:
@Override public void run(){
  asyncContext.isStartAsyncInScope.set(Boolean.TRUE);
  Request origRequest=asyncContext.getOriginalRequest();
  origRequest.setAttribute(Globals.DISPATCHER_TYPE_ATTR,DispatcherType.ASYNC);
  origRequest.setAsyncStarted(false);
  int startAsyncCurrent=asyncContext.startAsyncCounter.get();
  try {
    dispatcher.dispatch(asyncContext.getRequest(),asyncContext.getResponse(),DispatcherType.ASYNC);
    if (asyncContext.startAsyncCounter.compareAndSet(startAsyncCurrent,startAsyncCurrent)) {
      asyncContext.complete();
    }
 else {
      origRequest.setAsyncTimeout(asyncContext.getTimeout());
    }
  }
 catch (  Throwable t) {
    asyncContext.notifyAsyncListeners(AsyncEventType.ERROR,t);
    origRequest.errorDispatchAndComplete(t);
  }
 finally {
    asyncContext.isStartAsyncInScope.set(Boolean.FALSE);
  }
}

Fixed version (ground truth):
@Override public ClassLoader run(){
  return Thread.currentThread().getContextClassLoader();
}
Program: 28727
Project: 28727
Buggy source:
@Override public void start(Runnable run){
  pool.execute(run);
}

Fixed version (ground truth):
@Override public void start(Runnable run){
  ClassLoader oldCL=null;
  if (Globals.IS_SECURITY_ENABLED) {
    PrivilegedAction<ClassLoader> pa=new PrivilegedGetTccl();
    oldCL=AccessController.doPrivileged(pa);
  }
 else {
    oldCL=Thread.currentThread().getContextClassLoader();
  }
  try {
    ClassLoader newCL=origRequest.getContext().getLoader().getClassLoader();
    if (Globals.IS_SECURITY_ENABLED) {
      PrivilegedAction<Void> pa=new PrivilegedSetTccl(newCL);
      AccessController.doPrivileged(pa);
    }
 else {
      Thread.currentThread().setContextClassLoader(newCL);
    }
    pool.execute(run);
  }
  finally {
    if (Globals.IS_SECURITY_ENABLED) {
      PrivilegedAction<Void> pa=new PrivilegedSetTccl(oldCL);
      AccessController.doPrivileged(pa);
    }
 else {
      Thread.currentThread().setContextClassLoader(oldCL);
    }
  }
}
Program: 28728
Project: 28728
Buggy source:
void notifyAsyncListeners(AsyncEventType asyncEventType,Throwable t){
  LinkedList<AsyncListenerContext> clone;
synchronized (asyncListenerContexts) {
    if (asyncListenerContexts.isEmpty()) {
      return;
    }
    clone=new LinkedList<AsyncListenerContext>(asyncListenerContexts);
    if (asyncEventType.equals(AsyncEventType.START_ASYNC)) {
      asyncListenerContexts.clear();
    }
  }
  for (  AsyncListenerContext asyncListenerContext : clone) {
    AsyncListener asyncListener=asyncListenerContext.getAsyncListener();
    AsyncEvent asyncEvent=new AsyncEvent(this,asyncListenerContext.getRequest(),asyncListenerContext.getResponse(),t);
    try {
switch (asyncEventType) {
case COMPLETE:
        asyncListener.onComplete(asyncEvent);
      break;
case TIMEOUT:
    asyncListener.onTimeout(asyncEvent);
  break;
case ERROR:
asyncListener.onError(asyncEvent);
break;
case START_ASYNC:
asyncListener.onStartAsync(asyncEvent);
break;
default :
break;
}
}
 catch (Throwable throwable) {
log.log(Level.WARNING,ERROR_INVOKE_ASYNCLISTENER,throwable);
}
}
}

Fixed version (ground truth):
void notifyAsyncListeners(AsyncEventType asyncEventType,Throwable t){
  LinkedList<AsyncListenerContext> clone;
synchronized (asyncListenerContexts) {
    if (asyncListenerContexts.isEmpty()) {
      return;
    }
    clone=new LinkedList<AsyncListenerContext>(asyncListenerContexts);
    if (asyncEventType.equals(AsyncEventType.START_ASYNC)) {
      asyncListenerContexts.clear();
    }
  }
  ClassLoader oldCL;
  if (Globals.IS_SECURITY_ENABLED) {
    PrivilegedAction<ClassLoader> pa=new PrivilegedGetTccl();
    oldCL=AccessController.doPrivileged(pa);
  }
 else {
    oldCL=Thread.currentThread().getContextClassLoader();
  }
  try {
    ClassLoader newCL=origRequest.getContext().getLoader().getClassLoader();
    if (Globals.IS_SECURITY_ENABLED) {
      PrivilegedAction<Void> pa=new PrivilegedSetTccl(newCL);
      AccessController.doPrivileged(pa);
    }
 else {
      Thread.currentThread().setContextClassLoader(newCL);
    }
    for (    AsyncListenerContext asyncListenerContext : clone) {
      AsyncListener asyncListener=asyncListenerContext.getAsyncListener();
      AsyncEvent asyncEvent=new AsyncEvent(this,asyncListenerContext.getRequest(),asyncListenerContext.getResponse(),t);
      try {
switch (asyncEventType) {
case COMPLETE:
          asyncListener.onComplete(asyncEvent);
        break;
case TIMEOUT:
      asyncListener.onTimeout(asyncEvent);
    break;
case ERROR:
  asyncListener.onError(asyncEvent);
break;
case START_ASYNC:
asyncListener.onStartAsync(asyncEvent);
break;
default :
break;
}
}
 catch (Throwable throwable) {
log.log(Level.WARNING,ERROR_INVOKE_ASYNCLISTENER,throwable);
}
}
}
  finally {
if (Globals.IS_SECURITY_ENABLED) {
PrivilegedAction<Void> pa=new PrivilegedSetTccl(oldCL);
AccessController.doPrivileged(pa);
}
 else {
Thread.currentThread().setContextClassLoader(oldCL);
}
}
}
Program: 28729
Project: 28729
Buggy source:
public static Job constructJobModel(Map<String,Object> jobMap){
  if (jobMap == null) {
    return null;
  }
  Job model=CompositeUtil.instance().getModel(Job.class);
  model.setJobId((String)jobMap.get(ListJobsCommand.ID));
  model.setJobName((String)jobMap.get(ListJobsCommand.NAME));
  model.setExecutionDate(jobMap.get(ListJobsCommand.DATE).toString());
  model.setJobState(jobMap.get(ListJobsCommand.STATE).toString());
  model.setExitCode((String)jobMap.get(ListJobsCommand.CODE));
  model.setMessage((String)jobMap.get(ListJobsCommand.MESSAGE));
  model.setUser((String)jobMap.get(ListJobsCommand.USER));
  return model;
}

Fixed version (ground truth):
public static Job constructJobModel(Map<String,Object> jobMap){
  if (jobMap == null) {
    return null;
  }
  Job model=CompositeUtil.instance().getModel(Job.class);
  model.setJobId((String)jobMap.get(ListJobsCommand.ID));
  model.setJobName((String)jobMap.get(ListJobsCommand.NAME));
  model.setExecutionDate(jobMap.get(ListJobsCommand.DATE).toString());
  model.setCompletionDate(jobMap.get(ListJobsCommand.COMPLETION_DATE).toString());
  model.setJobState(jobMap.get(ListJobsCommand.STATE).toString());
  model.setExitCode((String)jobMap.get(ListJobsCommand.CODE));
  model.setMessage((String)jobMap.get(ListJobsCommand.MESSAGE));
  model.setUser((String)jobMap.get(ListJobsCommand.USER));
  return model;
}
Program: 28730
Project: 28730
Buggy source:
@Override public void complete(ActionReport report,Payload.Outbound outbound){
  if (commandProgress != null && report != null && report.getActionExitCode() == ExitCode.SUCCESS) {
    commandProgress.complete();
  }
  this.payload=outbound;
  JobPersistence jobPersistenceService=null;
  if (isManagedJob) {
    if (scope != null) {
      jobPersistenceService=Globals.getDefaultHabitat().getService(JobPersistence.class,scope + "String_Node_Str");
    }
 else {
      jobPersistenceService=Globals.getDefaultHabitat().getService(JobPersistenceService.class);
    }
    List<String> userList=SubjectUtil.getUsernamesFromSubject(subject);
    jobPersistenceService.persist(new JobInfo(id,commandName,executionDate,report.getActionExitCode().name(),userList.get(0),report.getMessage(),getJobsFile(),State.COMPLETED.name()));
  }
  complete(report);
}

Fixed version (ground truth):
@Override public void complete(ActionReport report,Payload.Outbound outbound){
  if (commandProgress != null && report != null && report.getActionExitCode() == ExitCode.SUCCESS) {
    commandProgress.complete();
  }
  this.payload=outbound;
  this.completionDate=System.currentTimeMillis();
  JobPersistence jobPersistenceService=null;
  if (isManagedJob) {
    if (scope != null) {
      jobPersistenceService=Globals.getDefaultHabitat().getService(JobPersistence.class,scope + "String_Node_Str");
    }
 else {
      jobPersistenceService=Globals.getDefaultHabitat().getService(JobPersistenceService.class);
    }
    List<String> userList=SubjectUtil.getUsernamesFromSubject(subject);
    jobPersistenceService.persist(new JobInfo(id,commandName,executionDate,report.getActionExitCode().name(),userList.get(0),report.getMessage(),getJobsFile(),State.COMPLETED.name(),completionDate));
  }
  complete(report);
}
Program: 28733
Project: 28733
Buggy source:
public void deleteResourceRef(String jndiName,String target) throws TransactionFailure {
  if (target.equals(DOMAIN)) {
    return;
  }
  if (domain.getConfigNamed(target) != null) {
    return;
  }
  Server server=configBeansUtilities.getServerNamed(target);
  if (server != null) {
    if (server.isResourceRefExists(jndiName)) {
      server.deleteResourceRef(jndiName);
    }
  }
 else {
    Cluster cluster=domain.getClusterNamed(target);
    if (cluster != null) {
      if (cluster.isResourceRefExists(jndiName)) {
        cluster.deleteResourceRef(jndiName);
        Target tgt=targetProvider.get();
        List<Server> instances=tgt.getInstances(target);
        for (        Server svr : instances) {
          if (svr.isResourceRefExists(jndiName)) {
            svr.deleteResourceRef(jndiName);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public void deleteResourceRef(String jndiName,String target) throws TransactionFailure {
  if (target.equals(DOMAIN)) {
    return;
  }
  Config config=domain.getConfigNamed(target);
  if (config != null) {
    config.deleteResourceRef(jndiName);
  }
 else {
    Server server=configBeansUtilities.getServerNamed(target);
    if (server != null) {
      if (server.isResourceRefExists(jndiName)) {
        server.deleteResourceRef(jndiName);
      }
    }
 else {
      Cluster cluster=domain.getClusterNamed(target);
      if (cluster != null) {
        if (cluster.isResourceRefExists(jndiName)) {
          cluster.deleteResourceRef(jndiName);
          Target tgt=targetProvider.get();
          List<Server> instances=tgt.getInstances(target);
          for (          Server svr : instances) {
            if (svr.isResourceRefExists(jndiName)) {
              svr.deleteResourceRef(jndiName);
            }
          }
        }
      }
    }
  }
}
Program: 28734
Project: 28734
Buggy source:
/** 
 * Return a String Id for a numericId of a threadpool managed by the threadpool manager
 */
public String getThreadPoolStringId(int numericIdForThreadpool){
  String id=(String)indexToIdTable.get(new Integer(numericIdForThreadpool));
  return ((id == null) ? defaultID : id);
}

Fixed version (ground truth):
/** 
 * Return a String Id for a numericId of a threadpool managed by the threadpool manager
 */
public String getThreadPoolStringId(int numericIdForThreadpool){
  String id=(String)indexToIdTable.get(Integer.valueOf(numericIdForThreadpool));
  return ((id == null) ? defaultID : id);
}
Program: 28735
Project: 28735
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();
    IIOPSSLUtil sslUtil=null;
    if (Globals.getDefaultHabitat() != null) {
      sslUtil=Globals.getDefaultHabitat().getService(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();
    IIOPSSLUtil sslUtil=null;
    if (Globals.getDefaultHabitat() != null) {
      sslUtil=Globals.getDefaultHabitat().getService(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: 28736
Project: 28736
Buggy source:
private Object getStub(java.io.ObjectInputStream istream,Class stubClass) throws IOException, ClassNotFoundException {
  Object obj=istream.readObject();
  if (StubAdapter.isStub(obj)) {
    try {
      Delegate delegate=StubAdapter.getDelegate(obj);
    }
 catch (    org.omg.CORBA.BAD_OPERATION bo) {
      ORB orb=null;
      try {
        orb=(ORB)new InitialContext().lookup("String_Node_Str");
      }
 catch (      NamingException ne) {
        throw new IOException("String_Node_Str",ne);
      }
      StubAdapter.connect(obj,(com.sun.corba.ee.spi.orb.ORB)orb);
    }
  }
 else {
    throw new IOException("String_Node_Str" + stubClass.getName() + "String_Node_Str"+ obj.getClass().getName());
  }
  Object stub=PortableRemoteObject.narrow(obj,stubClass);
  return stub;
}

Fixed version (ground truth):
private Object getStub(java.io.ObjectInputStream istream,Class stubClass) throws IOException, ClassNotFoundException {
  Object obj=istream.readObject();
  if (StubAdapter.isStub(obj)) {
    try {
      StubAdapter.getDelegate(obj);
    }
 catch (    org.omg.CORBA.BAD_OPERATION bo) {
      ORB orb=null;
      try {
        orb=(ORB)new InitialContext().lookup("String_Node_Str");
      }
 catch (      NamingException ne) {
        throw new IOException("String_Node_Str",ne);
      }
      StubAdapter.connect(obj,(com.sun.corba.ee.spi.orb.ORB)orb);
    }
  }
 else {
    throw new IOException("String_Node_Str" + stubClass.getName() + "String_Node_Str"+ obj.getClass().getName());
  }
  Object stub=PortableRemoteObject.narrow(obj,stubClass);
  return stub;
}
Program: 28737
Project: 28737
Buggy source:
protected void calculateHeaders(){
  String[] headers=getTerseHeaders();
  if (outputHeaderList != null) {
    headers=outputHeaderList.split("String_Node_Str");
    if (headers.length == 0)     headers=getTerseHeaders();
  }
 else   if (useLongFormat)   headers=getSupportedHeaders();
  Set<String> validHeaders=new HashSet<String>();
  for (  String h : getSupportedHeaders())   validHeaders.add(h.toLowerCase());
  for (int i=0; i < headers.length; i++) {
    if (!validHeaders.contains(headers[i].toLowerCase())) {
      throw new IllegalArgumentException("String_Node_Str" + headers[i]);
    }
    headers[i]=headers[i].toLowerCase();
  }
  outputHeaders=headers;
  displayHeaders=new String[outputHeaders.length];
  for (int index=0; index < displayHeaders.length; index++)   displayHeaders[index]=isHeaderRequired() ? outputHeaders[index].toUpperCase() : "String_Node_Str";
}

Fixed version (ground truth):
protected void calculateHeaders(){
  String[] headers=getTerseHeaders();
  if (outputHeaderList != null) {
    headers=outputHeaderList.split("String_Node_Str");
    if (headers.length == 0)     headers=getTerseHeaders();
  }
 else   if (useLongFormat)   headers=getSupportedHeaders();
  Set<String> validHeaders=new HashSet<String>();
  for (  String h : getSupportedHeaders())   validHeaders.add(h.toLowerCase(Locale.US));
  for (int i=0; i < headers.length; i++) {
    if (!validHeaders.contains(headers[i].toLowerCase(Locale.US))) {
      throw new IllegalArgumentException("String_Node_Str" + headers[i]);
    }
    headers[i]=headers[i].toLowerCase(Locale.US);
  }
  outputHeaders=headers;
  displayHeaders=new String[outputHeaders.length];
  for (int index=0; index < displayHeaders.length; index++)   displayHeaders[index]=isHeaderRequired() ? outputHeaders[index].toUpperCase() : "String_Node_Str";
}
Program: 28738
Project: 28738
Buggy source:
protected String getInjectionMethodPropertyName(Method method,AnnotationInfo ainfo) throws AnnotationProcessorException {
  String methodName=method.getName();
  String propertyName=null;
  if ((methodName.length() > 3) && methodName.startsWith("String_Node_Str")) {
    propertyName=methodName.substring(3,4).toLowerCase() + methodName.substring(4);
  }
 else {
    throw new AnnotationProcessorException(localStrings.getLocalString("String_Node_Str","String_Node_Str"),ainfo);
  }
  return propertyName;
}

Fixed version (ground truth):
protected String getInjectionMethodPropertyName(Method method,AnnotationInfo ainfo) throws AnnotationProcessorException {
  String methodName=method.getName();
  String propertyName=null;
  if ((methodName.length() > 3) && methodName.startsWith("String_Node_Str")) {
    propertyName=methodName.substring(3,4).toLowerCase(Locale.US) + methodName.substring(4);
  }
 else {
    throw new AnnotationProcessorException(localStrings.getLocalString("String_Node_Str","String_Node_Str"),ainfo);
  }
  return propertyName;
}
Program: 28740
Project: 28740
Buggy source:
public Vector getPossibleCmpCmrFields(ClassLoader cl,String className) throws ClassNotFoundException {
  Vector fieldDescriptors=new Vector();
  Class theClass=cl.loadClass(className);
  Method[] methods=theClass.getMethods();
  for (int mIndex=0; mIndex < methods.length; mIndex++) {
    Method next=methods[mIndex];
    String nextName=next.getName();
    int nextModifiers=next.getModifiers();
    if (Modifier.isAbstract(nextModifiers)) {
      if (nextName.startsWith("String_Node_Str") && nextName.length() > 3) {
        String field=nextName.substring(3,4).toLowerCase() + nextName.substring(4);
        fieldDescriptors.add(new FieldDescriptor(field));
      }
    }
  }
  return fieldDescriptors;
}

Fixed version (ground truth):
public Vector getPossibleCmpCmrFields(ClassLoader cl,String className) throws ClassNotFoundException {
  Vector fieldDescriptors=new Vector();
  Class theClass=cl.loadClass(className);
  Method[] methods=theClass.getMethods();
  for (int mIndex=0; mIndex < methods.length; mIndex++) {
    Method next=methods[mIndex];
    String nextName=next.getName();
    int nextModifiers=next.getModifiers();
    if (Modifier.isAbstract(nextModifiers)) {
      if (nextName.startsWith("String_Node_Str") && nextName.length() > 3) {
        String field=nextName.substring(3,4).toLowerCase(Locale.US) + nextName.substring(4);
        fieldDescriptors.add(new FieldDescriptor(field));
      }
    }
  }
  return fieldDescriptors;
}