nus-yam/ex-repair huggingface dataset:
Program: 28355
Project: 28355
Buggy source:
/** 
 * Sync an individual file.  Return true if the file changed. The file is named by mt.name, relative to base.  The name used in the response will be relative to root.  In case the file is a directory, tell the payload to include it recursively, and replace the entire contents of the directory in case any files were removed.
 */
private boolean syncFile(URI root,File base,ModTime mt,Payload.Outbound payload) throws URISyntaxException {
  File f=fileOf(base,mt.name);
  if (!f.exists())   return false;
  if (mt.time != 0 && f.lastModified() == mt.time)   return false;
  if (logger.isLoggable(Level.FINEST))   logger.finest("String_Node_Str" + mt.name + "String_Node_Str"+ f.lastModified());
  try {
    if (mt.time == 0)     logger.fine("String_Node_Str" + f + "String_Node_Str");
 else     logger.fine("String_Node_Str" + f + "String_Node_Str");
    payload.requestFileReplacement("String_Node_Str",root.relativize(f.toURI()),"String_Node_Str",null,f,true);
  }
 catch (  IOException ioex) {
    logger.fine("String_Node_Str" + f);
    logger.fine(ioex.toString());
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Sync an individual file.  Return true if the file changed. The file is named by mt.name, relative to base.  The name used in the response will be relative to root.  In case the file is a directory, tell the payload to include it recursively, and replace the entire contents of the directory in case any files were removed.
 */
private boolean syncFile(URI root,File base,ModTime mt,Payload.Outbound payload) throws URISyntaxException {
  File f=fileOf(base,mt.name);
  if (!f.exists())   return false;
  if (mt.time != 0 && f.lastModified() == mt.time)   return false;
  if (logger.isLoggable(Level.FINEST))   logger.finest("String_Node_Str" + mt.name + "String_Node_Str"+ f.lastModified());
  try {
    if (logger.isLoggable(Level.FINE))     logger.fine("String_Node_Str" + f + (mt.time == 0 ? "String_Node_Str" : "String_Node_Str"));
    payload.requestFileReplacement("String_Node_Str",root.relativize(f.toURI()),"String_Node_Str",null,f,true);
  }
 catch (  IOException ioex) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine("String_Node_Str" + f);
      logger.fine(ioex.toString());
    }
  }
  return true;
}
Program: 28356
Project: 28356
Buggy source:
/** 
 * Get the applications that should be available to the specified server instance.
 */
private Map<String,Application> getApps(Server server){
  Map<String,Application> apps=new HashMap<String,Application>();
  if (applications == null)   return apps;
  for (  ApplicationRef ref : server.getApplicationRef()) {
    Application app=applications.getApplication(ref.getRef());
    if (app != null) {
      logger.finest("String_Node_Str" + app.getName());
      if (Boolean.parseBoolean(app.getDirectoryDeployed()))       logger.finest("String_Node_Str" + "String_Node_Str" + app.getName());
 else       apps.put(VersioningUtils.getRepositoryName(app.getName()),app);
    }
  }
  return apps;
}

Fixed version (ground truth):
/** 
 * Get the applications that should be available to the specified server instance.
 */
private Map<String,Application> getApps(Server server){
  Map<String,Application> apps=new HashMap<String,Application>();
  if (applications == null)   return apps;
  for (  ApplicationRef ref : server.getApplicationRef()) {
    Application app=applications.getApplication(ref.getRef());
    if (app != null) {
      if (logger.isLoggable(Level.FINEST))       logger.finest("String_Node_Str" + app.getName());
      if (Boolean.parseBoolean(app.getDirectoryDeployed())) {
        if (logger.isLoggable(Level.FINEST))         logger.finest("String_Node_Str" + "String_Node_Str" + app.getName());
      }
 else       apps.put(VersioningUtils.getRepositoryName(app.getName()),app);
    }
  }
  return apps;
}
Program: 28357
Project: 28357
Buggy source:
/** 
 * Synchronize the config-specific directory. The directory for the instance is in the instance-config-specific config directory, which is in the main config directory. The instance-config-specific config directory is named <config-name>.
 */
private void synchronizeConfigSpecificDir(Payload.Outbound payload,Server server,SyncRequest sr) throws URISyntaxException {
  String configDirName=server.getConfigRef();
  File configDir=env.getConfigDirPath();
  File configSpecificDir=new File(configDir,configDirName);
  logger.finest("String_Node_Str" + "String_Node_Str" + configSpecificDir);
  if (!configSpecificDir.exists()) {
    logger.fine("String_Node_Str" + "String_Node_Str" + configSpecificDir);
    return;
  }
  List<String> fileSet=new ArrayList<String>();
  getFileNames(configSpecificDir,configDir,null,fileSet,SyncLevel.DIRECTORY);
  synchronizeDirectory(payload,server,sr,configDir,fileSet);
}

Fixed version (ground truth):
/** 
 * Synchronize the config-specific directory. The directory for the instance is in the instance-config-specific config directory, which is in the main config directory. The instance-config-specific config directory is named <config-name>.
 */
private void synchronizeConfigSpecificDir(Payload.Outbound payload,Server server,SyncRequest sr) throws URISyntaxException {
  String configDirName=server.getConfigRef();
  File configDir=env.getConfigDirPath();
  File configSpecificDir=new File(configDir,configDirName);
  if (logger.isLoggable(Level.FINEST))   logger.finest("String_Node_Str" + "String_Node_Str" + configSpecificDir);
  if (!configSpecificDir.exists()) {
    if (logger.isLoggable(Level.FINE))     logger.fine("String_Node_Str" + "String_Node_Str" + configSpecificDir);
    return;
  }
  List<String> fileSet=new ArrayList<String>();
  getFileNames(configSpecificDir,configDir,null,fileSet,SyncLevel.DIRECTORY);
  synchronizeDirectory(payload,server,sr,configDir,fileSet);
}
Program: 28358
Project: 28358
Buggy source:
/** 
 * Handle a single syncrhonization request for the given server by adding the needed files to the payload.
 */
public void synchronize(Server server,SyncRequest sr,Payload.Outbound payload,ActionReport report,Logger logger){
  this.logger=logger;
  try {
    logger.fine("String_Node_Str" + "String_Node_Str" + server.getName() + "String_Node_Str"+ sr.dir);
    if (sr.dir.equals("String_Node_Str"))     synchronizeConfig(payload,server,sr);
 else     if (sr.dir.equals("String_Node_Str"))     synchronizeApplications(payload,server,sr);
 else     if (sr.dir.equals("String_Node_Str"))     synchronizeLib(payload,server,sr);
 else     if (sr.dir.equals("String_Node_Str"))     synchronizeDocroot(payload,server,sr);
 else     if (sr.dir.equals("String_Node_Str"))     synchronizeConfigSpecificDir(payload,server,sr);
 else {
      report.setActionExitCode(ExitCode.FAILURE);
      report.setMessage(strings.getLocalString("String_Node_Str","String_Node_Str",sr.dir));
      return;
    }
    report.setActionExitCode(ExitCode.SUCCESS);
  }
 catch (  URISyntaxException ex) {
    logger.fine("String_Node_Str");
    logger.fine(ex.toString());
    report.setActionExitCode(ExitCode.FAILURE);
    report.setMessage(strings.getLocalString("String_Node_Str","String_Node_Str"));
    report.setFailureCause(ex);
  }
}

Fixed version (ground truth):
/** 
 * Handle a single syncrhonization request for the given server by adding the needed files to the payload.
 */
public void synchronize(Server server,SyncRequest sr,Payload.Outbound payload,ActionReport report,Logger logger){
  this.logger=logger;
  try {
    if (logger.isLoggable(Level.FINE))     logger.fine("String_Node_Str" + "String_Node_Str" + server.getName() + "String_Node_Str"+ sr.dir);
    if (sr.dir.equals("String_Node_Str"))     synchronizeConfig(payload,server,sr);
 else     if (sr.dir.equals("String_Node_Str"))     synchronizeApplications(payload,server,sr);
 else     if (sr.dir.equals("String_Node_Str"))     synchronizeLib(payload,server,sr);
 else     if (sr.dir.equals("String_Node_Str"))     synchronizeDocroot(payload,server,sr);
 else     if (sr.dir.equals("String_Node_Str"))     synchronizeConfigSpecificDir(payload,server,sr);
 else {
      report.setActionExitCode(ExitCode.FAILURE);
      report.setMessage(strings.getLocalString("String_Node_Str","String_Node_Str",sr.dir));
      return;
    }
    report.setActionExitCode(ExitCode.SUCCESS);
  }
 catch (  URISyntaxException ex) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine("String_Node_Str");
      logger.fine(ex.toString());
    }
    report.setActionExitCode(ExitCode.FAILURE);
    report.setMessage(strings.getLocalString("String_Node_Str","String_Node_Str"));
    report.setFailureCause(ex);
  }
}
Program: 28359
Project: 28359
Buggy source:
private String killInstance(AdminCommandContext context){
  String msg=initializeInstance();
  if (msg != null)   return msg;
  String nodeName=instance.getNodeRef();
  Node node=nodes.getNode(nodeName);
  NodeUtils nodeUtils=new NodeUtils(habitat,logger);
  ArrayList<String> command=new ArrayList<String>();
  command.add("String_Node_Str");
  command.add("String_Node_Str");
  command.add(instanceName);
  String humanCommand=makeCommandHuman(command);
  String firstErrorMessage=Strings.get("String_Node_Str",instanceName,nodeName,humanCommand);
  logger.fine("String_Node_Str" + humanCommand + "String_Node_Str"+ nodeName);
  nodeUtils.runAdminCommandOnNode(node,command,context,firstErrorMessage,humanCommand,null);
  ActionReport killreport=context.getActionReport();
  if (killreport.getActionExitCode() != ActionReport.ExitCode.SUCCESS) {
    return killreport.getMessage();
  }
  return null;
}

Fixed version (ground truth):
private String killInstance(AdminCommandContext context){
  String msg=initializeInstance();
  if (msg != null)   return msg;
  String nodeName=instance.getNodeRef();
  Node node=nodes.getNode(nodeName);
  NodeUtils nodeUtils=new NodeUtils(habitat,logger);
  ArrayList<String> command=new ArrayList<String>();
  command.add("String_Node_Str");
  command.add("String_Node_Str");
  command.add(instanceName);
  String humanCommand=makeCommandHuman(command);
  String firstErrorMessage=Strings.get("String_Node_Str",instanceName,nodeName,humanCommand);
  if (logger.isLoggable(Level.FINE))   logger.fine("String_Node_Str" + humanCommand + "String_Node_Str"+ nodeName);
  nodeUtils.runAdminCommandOnNode(node,command,context,firstErrorMessage,humanCommand,null);
  ActionReport killreport=context.getActionReport();
  if (killreport.getActionExitCode() != ActionReport.ExitCode.SUCCESS) {
    return killreport.getMessage();
  }
  return null;
}
Program: 28360
Project: 28360
Buggy source:
/** 
 * This method is used to extract URI of jar entries that match a given pattern.
 * @param uri
 * @param pattern
 */
public static List<String> getJarEntries(URI uri,Pattern pattern){
  List<String> results=new ArrayList<String>();
  File file=null;
  try {
    file=new File(uri);
  }
 catch (  Exception ex) {
  }
  if (file == null || file.isDirectory()) {
    return results;
  }
  String fileName=file.getName();
  if (fileName != null && fileName.endsWith("String_Node_Str")) {
    JarFile jarFile=null;
    try {
      jarFile=new JarFile(new File(uri));
      Enumeration<JarEntry> entries=jarFile.entries();
      while (entries.hasMoreElements()) {
        JarEntry entry=(JarEntry)entries.nextElement();
        String entryName=entry.getName();
        if (pattern.matcher(entryName).matches()) {
          results.add(entryName);
        }
      }
    }
 catch (    Exception ex) {
      if (logger.isLoggable(Level.WARNING)) {
        logger.log(Level.WARNING,CULoggerInfo.getString(CULoggerInfo.exceptionJarOpen,fileName),ex);
      }
      throw new RuntimeException(ex);
    }
 finally {
      if (jarFile != null) {
        try {
          jarFile.close();
        }
 catch (        Throwable t) {
        }
      }
    }
  }
  return results;
}

Fixed version (ground truth):
/** 
 * This method is used to extract URI of jar entries that match a given pattern.
 * @param uri
 * @param pattern
 */
public static List<String> getJarEntries(URI uri,Pattern pattern){
  List<String> results=new ArrayList<String>();
  File file=null;
  try {
    file=new File(uri);
  }
 catch (  Exception ex) {
  }
  if (file == null || file.isDirectory()) {
    return results;
  }
  String fileName=file.getName();
  if (fileName.endsWith("String_Node_Str")) {
    JarFile jarFile=null;
    try {
      jarFile=new JarFile(new File(uri));
      Enumeration<JarEntry> entries=jarFile.entries();
      while (entries.hasMoreElements()) {
        JarEntry entry=(JarEntry)entries.nextElement();
        String entryName=entry.getName();
        if (pattern.matcher(entryName).matches()) {
          results.add(entryName);
        }
      }
    }
 catch (    Exception ex) {
      if (logger.isLoggable(Level.WARNING)) {
        logger.log(Level.WARNING,CULoggerInfo.getString(CULoggerInfo.exceptionJarOpen,fileName),ex);
      }
      throw new RuntimeException(ex);
    }
 finally {
      if (jarFile != null) {
        try {
          jarFile.close();
        }
 catch (        Throwable t) {
        }
      }
    }
  }
  return results;
}
Program: 28362
Project: 28362
Buggy source:
@Override protected void postAnnotationProcess(WebBundleDescriptorImpl descriptor,ReadableArchive archive) throws IOException {
  super.postAnnotationProcess(descriptor,archive);
  List<WebFragmentDescriptor> wfList=readStandardFragments(descriptor,archive);
  if (isProcessAnnotation(descriptor)) {
    Map<ExtensionsArchivist,RootDeploymentDescriptor> localExtensions=new HashMap<ExtensionsArchivist,RootDeploymentDescriptor>();
    for (    WebFragmentDescriptor wfDesc : wfList) {
      super.readAnnotations(archive,wfDesc,localExtensions);
    }
    ModuleScanner scanner=getScanner();
    if (scanner instanceof WarScanner) {
      ((WarScanner)scanner).setScanOtherLibraries(true);
      readAnnotations(archive,descriptor,localExtensions,scanner);
    }
  }
  WebFragmentDescriptor mergedWebFragment=null;
  for (  WebFragmentDescriptor wf : wfList) {
    if (mergedWebFragment == null) {
      mergedWebFragment=wf;
    }
 else {
      mergedWebFragment.addWebBundleDescriptor(wf);
    }
  }
  if (mergedWebFragment != null) {
    descriptor.addWebBundleDescriptor(mergedWebFragment);
  }
  WebBundleDescriptorImpl defaultWebBundleDescriptor=getPlainDefaultWebXmlBundleDescriptor();
  if (defaultWebBundleDescriptor != null) {
    descriptor.addDefaultWebBundleDescriptor(defaultWebBundleDescriptor);
  }
}

Fixed version (ground truth):
@Override protected void postAnnotationProcess(WebBundleDescriptorImpl descriptor,ReadableArchive archive) throws IOException {
  super.postAnnotationProcess(descriptor,archive);
  List<WebFragmentDescriptor> wfList=readStandardFragments(descriptor,archive);
  if (isProcessAnnotation(descriptor)) {
    Map<ExtensionsArchivist,RootDeploymentDescriptor> localExtensions=new HashMap<ExtensionsArchivist,RootDeploymentDescriptor>();
    for (    WebFragmentDescriptor wfDesc : wfList) {
      super.readAnnotations(archive,wfDesc,localExtensions);
    }
    ModuleScanner scanner=getScanner();
    if (scanner instanceof WarScanner) {
      ((WarScanner)scanner).setScanOtherLibraries(true);
      readAnnotations(archive,descriptor,localExtensions,scanner);
    }
  }
  WebFragmentDescriptor mergedWebFragment=null;
  for (  WebFragmentDescriptor wf : wfList) {
    if (mergedWebFragment == null) {
      mergedWebFragment=wf;
    }
 else {
      mergedWebFragment.addWebBundleDescriptor(wf);
    }
  }
  if (mergedWebFragment != null) {
    descriptor.addWebBundleDescriptor(mergedWebFragment);
  }
  WebBundleDescriptorImpl defaultWebBundleDescriptor=getPlainDefaultWebXmlBundleDescriptor();
  descriptor.addDefaultWebBundleDescriptor(defaultWebBundleDescriptor);
}
Program: 28364
Project: 28364
Buggy source:
/** 
 * <p> This handler filters out AdminObjects from a list-jms-resources, only return Connection Factories.
 */
@Handler(id="String_Node_Str") public static List filterAdminObjects(HandlerContext context){
  List result=new ArrayList();
  try {
    FilterTreeEvent event=(FilterTreeEvent)context.getEventObject();
    List<String> jmsResources=event.getChildObjects();
    if (jmsResources == null || jmsResources.size() <= 0) {
      return result;
    }
    List adminObjs=new ArrayList();
    Map responseMap=RestUtil.restRequest(GuiUtil.getSessionValue("String_Node_Str") + "String_Node_Str",null,"String_Node_Str",null,false);
    Map<String,Object> extraPropsMap=(Map<String,Object>)((Map<String,Object>)responseMap.get("String_Node_Str")).get("String_Node_Str");
    if (extraPropsMap != null) {
      Map<String,Object> childRes=(Map<String,Object>)extraPropsMap.get("String_Node_Str");
      if (childRes != null) {
        adminObjs=new ArrayList(childRes.keySet());
      }
    }
    for (    String oneJms : jmsResources) {
      if (!adminObjs.contains(oneJms)) {
        result.add(oneJms);
      }
    }
  }
 catch (  Exception ex) {
    GuiUtil.getLogger().warning("String_Node_Str");
  }
  return result;
}

Fixed version (ground truth):
/** 
 * <p> This handler filters out AdminObjects from a list-jms-resources, only return Connection Factories.
 */
@Handler(id="String_Node_Str") public static List filterAdminObjects(HandlerContext context){
  List result=new ArrayList();
  FilterTreeEvent event=null;
  try {
    if (context.getEventObject() instanceof FilterTreeEvent) {
      event=(FilterTreeEvent)context.getEventObject();
    }
 else {
      return result;
    }
    List<String> jmsResources=event.getChildObjects();
    if (jmsResources == null || jmsResources.size() <= 0) {
      return result;
    }
    List adminObjs=new ArrayList();
    Map responseMap=RestUtil.restRequest(GuiUtil.getSessionValue("String_Node_Str") + "String_Node_Str",null,"String_Node_Str",null,false);
    Map<String,Object> extraPropsMap=(Map<String,Object>)((Map<String,Object>)responseMap.get("String_Node_Str")).get("String_Node_Str");
    if (extraPropsMap != null) {
      Map<String,Object> childRes=(Map<String,Object>)extraPropsMap.get("String_Node_Str");
      if (childRes != null) {
        adminObjs=new ArrayList(childRes.keySet());
      }
    }
    for (    String oneJms : jmsResources) {
      if (!adminObjs.contains(oneJms)) {
        result.add(oneJms);
      }
    }
  }
 catch (  Exception ex) {
    GuiUtil.getLogger().warning("String_Node_Str");
  }
  return result;
}
Program: 28366
Project: 28366
Buggy source:
static private void removeFromDefaultWebModule(String undeployedAppName,List<String> targets){
  String prefix=GuiUtil.getSessionValue("String_Node_Str") + "String_Node_Str";
  Map attrsMap=new HashMap();
  attrsMap.put("String_Node_Str","String_Node_Str");
  for (  String oneTarget : targets) {
    try {
      String endpoint=TargetUtil.getTargetEndpoint(oneTarget);
      String configName=(String)RestUtil.getEntityAttrs(endpoint,"String_Node_Str").get("String_Node_Str");
      String encodedConfigName=URLEncoder.encode(configName,"String_Node_Str");
      String vsEndpoint=prefix + encodedConfigName + "String_Node_Str";
      Map vsMap=RestUtil.getChildMap(vsEndpoint);
      if (vsMap != null && vsMap.size() > 0) {
        List<String> vsList=new ArrayList(vsMap.keySet());
        for (        String oneVs : vsList) {
          String oneEndpoint=vsEndpoint + "String_Node_Str" + oneVs;
          String defWebModule=(String)RestUtil.getEntityAttrs(oneEndpoint,"String_Node_Str").get("String_Node_Str");
          if (GuiUtil.isEmpty(defWebModule)) {
            continue;
          }
          int index=defWebModule.indexOf("String_Node_Str");
          if (index != -1) {
            defWebModule=defWebModule.substring(0,index);
          }
          if (undeployedAppName.equals(defWebModule)) {
            RestUtil.restRequest(oneEndpoint,attrsMap,"String_Node_Str",null,false);
          }
        }
      }
    }
 catch (    Exception ex) {
    }
  }
}

Fixed version (ground truth):
static private void removeFromDefaultWebModule(String undeployedAppName,List<String> targets){
  String prefix=GuiUtil.getSessionValue("String_Node_Str") + "String_Node_Str";
  Map attrsMap=new HashMap();
  attrsMap.put("String_Node_Str","String_Node_Str");
  for (  String oneTarget : targets) {
    try {
      String endpoint=TargetUtil.getTargetEndpoint(oneTarget);
      String configName=(String)RestUtil.getEntityAttrs(endpoint,"String_Node_Str").get("String_Node_Str");
      String encodedConfigName=URLEncoder.encode(configName,"String_Node_Str");
      String vsEndpoint=prefix + encodedConfigName + "String_Node_Str";
      Map vsMap=RestUtil.getChildMap(vsEndpoint);
      if (vsMap.size() > 0) {
        List<String> vsList=new ArrayList(vsMap.keySet());
        for (        String oneVs : vsList) {
          String oneEndpoint=vsEndpoint + "String_Node_Str" + oneVs;
          String defWebModule=(String)RestUtil.getEntityAttrs(oneEndpoint,"String_Node_Str").get("String_Node_Str");
          if (GuiUtil.isEmpty(defWebModule)) {
            continue;
          }
          int index=defWebModule.indexOf("String_Node_Str");
          if (index != -1) {
            defWebModule=defWebModule.substring(0,index);
          }
          if (undeployedAppName.equals(defWebModule)) {
            RestUtil.restRequest(oneEndpoint,attrsMap,"String_Node_Str",null,false);
          }
        }
      }
    }
 catch (    Exception ex) {
    }
  }
}
Program: 28367
Project: 28367
Buggy source:
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=List.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,defaultValue="String_Node_Str")},output={@HandlerOutput(name="String_Node_Str",type=List.class),@HandlerOutput(name="String_Node_Str",type=String[].class)}) public static void getListBoxOptions(HandlerContext handlerCtx){
  String selectedCommaString=(String)handlerCtx.getInputValue("String_Node_Str");
  List<String> availableList=(List)handlerCtx.getInputValue("String_Node_Str");
  String addEmptyFirstChoice=(String)handlerCtx.getInputValue("String_Node_Str");
  String[] selectedOptions=null;
  if ("String_Node_Str".equals(addEmptyFirstChoice)) {
    if (availableList == null) {
      availableList=new ArrayList();
    }
    availableList.add(0,"String_Node_Str");
  }
  if (availableList != null && (availableList.size() > 0)) {
    selectedOptions=GuiUtil.stringToArray(selectedCommaString,"String_Node_Str");
    if (selectedOptions != null && !(selectedOptions.length > 0)) {
      selectedOptions=new String[]{availableList.get(0)};
    }
  }
  handlerCtx.setOutputValue("String_Node_Str",availableList);
  handlerCtx.setOutputValue("String_Node_Str",selectedOptions);
}

Fixed version (ground truth):
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=List.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,required=true),@HandlerInput(name="String_Node_Str",type=String.class,defaultValue="String_Node_Str")},output={@HandlerOutput(name="String_Node_Str",type=List.class),@HandlerOutput(name="String_Node_Str",type=String[].class)}) public static void getListBoxOptions(HandlerContext handlerCtx){
  String selectedCommaString=(String)handlerCtx.getInputValue("String_Node_Str");
  List<String> availableList=(List)handlerCtx.getInputValue("String_Node_Str");
  String addEmptyFirstChoice=(String)handlerCtx.getInputValue("String_Node_Str");
  String[] selectedOptions=null;
  if ("String_Node_Str".equals(addEmptyFirstChoice)) {
    if (availableList == null) {
      availableList=new ArrayList();
    }
    availableList.add(0,"String_Node_Str");
  }
  if (availableList != null && (availableList.size() > 0)) {
    selectedOptions=GuiUtil.stringToArray(selectedCommaString,"String_Node_Str");
    if (!(selectedOptions.length > 0)) {
      selectedOptions=new String[]{availableList.get(0)};
    }
  }
  handlerCtx.setOutputValue("String_Node_Str",availableList);
  handlerCtx.setOutputValue("String_Node_Str",selectedOptions);
}
Program: 28370
Project: 28370
Buggy source:
public static Image getUpdateCenterImage(String ucDir,boolean force){
  Image image=null;
  try {
    image=new Image(new File(ucDir));
    if (force || (GuiUtil.getSessionValue(CATALOG_REFRESHED) == null)) {
      if (image != null) {
        image.refreshCatalogs();
        GuiUtil.setSessionValue(CATALOG_REFRESHED,"String_Node_Str");
      }
    }
  }
 catch (  Exception ex) {
    if (force && (image == null)) {
      GuiUtil.getLogger().warning(GuiUtil.getMessage(BUNDLE,"String_Node_Str",new String[]{ucDir}));
    }
  }
  return image;
}

Fixed version (ground truth):
public static Image getUpdateCenterImage(String ucDir,boolean force){
  Image image=null;
  try {
    image=new Image(new File(ucDir));
    if (force || (GuiUtil.getSessionValue(CATALOG_REFRESHED) == null)) {
      image.refreshCatalogs();
      GuiUtil.setSessionValue(CATALOG_REFRESHED,"String_Node_Str");
    }
  }
 catch (  Exception ex) {
    if (force && (image == null)) {
      GuiUtil.getLogger().warning(GuiUtil.getMessage(BUNDLE,"String_Node_Str",new String[]{ucDir}));
    }
  }
  return image;
}
Program: 28371
Project: 28371
Buggy source:
public static Properties parseAsEnv(File installRoot){
  Properties asenvProps=new Properties();
  File configDir=new File(installRoot,"String_Node_Str");
  File asenv=getAsEnvConf(configDir);
  if (!asenv.exists()) {
    logger.fine(asenv.getAbsolutePath() + "String_Node_Str");
    return asenvProps;
  }
  LineNumberReader lnReader=null;
  try {
    lnReader=new LineNumberReader(new FileReader(asenv));
    String line=lnReader.readLine();
    Pattern p=Pattern.compile("String_Node_Str");
    while (line != null) {
      Matcher m=p.matcher(line);
      if (m.matches()) {
        File f=new File(m.group(2));
        if (!f.isAbsolute()) {
          f=new File(configDir,m.group(2));
          if (f.exists()) {
            asenvProps.put(m.group(1),f.getAbsolutePath());
          }
 else {
            asenvProps.put(m.group(1),m.group(2));
          }
        }
 else {
          asenvProps.put(m.group(1),m.group(2));
        }
      }
      line=lnReader.readLine();
    }
  }
 catch (  IOException ioe) {
    throw new RuntimeException("String_Node_Str",ioe);
  }
 finally {
    try {
      if (lnReader != null)       lnReader.close();
    }
 catch (    IOException ioe) {
    }
  }
  return asenvProps;
}

Fixed version (ground truth):
public static Properties parseAsEnv(File installRoot){
  Properties asenvProps=new Properties();
  File configDir=new File(installRoot,"String_Node_Str");
  File asenv=getAsEnvConf(configDir);
  if (!asenv.exists()) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine(asenv.getAbsolutePath() + "String_Node_Str");
    }
    return asenvProps;
  }
  LineNumberReader lnReader=null;
  try {
    lnReader=new LineNumberReader(new FileReader(asenv));
    String line=lnReader.readLine();
    Pattern p=Pattern.compile("String_Node_Str");
    while (line != null) {
      Matcher m=p.matcher(line);
      if (m.matches()) {
        File f=new File(m.group(2));
        if (!f.isAbsolute()) {
          f=new File(configDir,m.group(2));
          if (f.exists()) {
            asenvProps.put(m.group(1),f.getAbsolutePath());
          }
 else {
            asenvProps.put(m.group(1),m.group(2));
          }
        }
 else {
          asenvProps.put(m.group(1),m.group(2));
        }
      }
      line=lnReader.readLine();
    }
  }
 catch (  IOException ioe) {
    throw new RuntimeException("String_Node_Str",ioe);
  }
 finally {
    try {
      if (lnReader != null)       lnReader.close();
    }
 catch (    IOException ioe) {
    }
  }
  return asenvProps;
}
Program: 28372
Project: 28372
Buggy source:
/** 
 * Adds JDK tools.jar to classpath.
 */
void addJDKToolsJar(){
  File jdkToolsJar=Util.getJDKToolsJar();
  try {
    cpb.addJar(jdkToolsJar);
  }
 catch (  IOException ioe) {
    logger.fine("String_Node_Str" + jdkToolsJar);
  }
}

Fixed version (ground truth):
/** 
 * Adds JDK tools.jar to classpath.
 */
void addJDKToolsJar(){
  File jdkToolsJar=Util.getJDKToolsJar();
  try {
    cpb.addJar(jdkToolsJar);
  }
 catch (  IOException ioe) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine("String_Node_Str" + jdkToolsJar);
    }
  }
}
Program: 28373
Project: 28373
Buggy source:
public static synchronized void initialize(ClassLoader cl){
  if (Instance != null) {
    logger.finer("String_Node_Str" + getInstance());
  }
  Instance=new SingleHK2Factory(cl);
  logger.finer("String_Node_Str" + getInstance());
}

Fixed version (ground truth):
public static synchronized void initialize(ClassLoader cl){
  if (Instance != null) {
    if (logger.isLoggable(Level.FINER)) {
      logger.finer("String_Node_Str" + getInstance());
    }
  }
  Instance=new SingleHK2Factory(cl);
  if (logger.isLoggable(Level.FINER)) {
    logger.finer("String_Node_Str" + getInstance());
  }
}
Program: 28374
Project: 28374
Buggy source:
@Override public synchronized void shutdown() throws GlassFishException {
  for (  Object gf : gfMap.values()) {
    try {
      ((GlassFish)gf).dispose();
    }
 catch (    IllegalStateException ex) {
    }
  }
  gfMap.clear();
  try {
    shutdownInternal();
  }
 catch (  GlassFishException ex) {
    logger.info(ex.getMessage());
  }
}

Fixed version (ground truth):
@Override public synchronized void shutdown() throws GlassFishException {
  for (  Object gf : gfMap.values()) {
    try {
      ((GlassFish)gf).dispose();
    }
 catch (    IllegalStateException ex) {
    }
  }
  gfMap.clear();
  try {
    shutdownInternal();
  }
 catch (  GlassFishException ex) {
    logger.log(Level.WARNING,LogFacade.CAUGHT_EXCEPTION,ex.getMessage());
  }
}
Program: 28375
Project: 28375
Buggy source:
private List<URL> getModuleJarURLs(String installRoot){
  if (installRoot == null) {
    return new ArrayList();
  }
  JarFile jarfile=null;
  try {
    jarfile=new JarFile(Which.jarFile(getClass()));
    String mainClassName=jarfile.getManifest().getMainAttributes().getValue("String_Node_Str");
    if (UberMain.class.getName().equals(mainClassName)) {
      return new ArrayList();
    }
  }
 catch (  Exception ex) {
    logger.warning(ex.getMessage());
  }
 finally {
    if (jarfile != null) {
      try {
        jarfile.close();
      }
 catch (      IOException ex) {
      }
    }
  }
  File modulesDir=new File(installRoot,"String_Node_Str");
  final File autostartModulesDir=new File(modulesDir,"String_Node_Str");
  final List<URL> moduleJarURLs=new ArrayList<URL>();
  modulesDir.listFiles(new FileFilter(){
    public boolean accept(    File pathname){
      if (pathname.isDirectory() && !pathname.equals(autostartModulesDir)) {
        pathname.listFiles(this);
      }
 else       if (pathname.getName().endsWith(JAR_EXT) && !moduleExcludes.contains(pathname.getName())) {
        try {
          moduleJarURLs.add(pathname.toURI().toURL());
        }
 catch (        Exception ex) {
          logger.warning(ex.getMessage());
        }
      }
      return false;
    }
  }
);
  return moduleJarURLs;
}

Fixed version (ground truth):
private List<URL> getModuleJarURLs(String installRoot){
  if (installRoot == null) {
    return new ArrayList();
  }
  JarFile jarfile=null;
  try {
    jarfile=new JarFile(Which.jarFile(getClass()));
    String mainClassName=jarfile.getManifest().getMainAttributes().getValue("String_Node_Str");
    if (UberMain.class.getName().equals(mainClassName)) {
      return new ArrayList();
    }
  }
 catch (  Exception ex) {
    logger.log(Level.WARNING,LogFacade.CAUGHT_EXCEPTION,ex);
  }
 finally {
    if (jarfile != null) {
      try {
        jarfile.close();
      }
 catch (      IOException ex) {
      }
    }
  }
  File modulesDir=new File(installRoot,"String_Node_Str");
  final File autostartModulesDir=new File(modulesDir,"String_Node_Str");
  final List<URL> moduleJarURLs=new ArrayList<URL>();
  modulesDir.listFiles(new FileFilter(){
    public boolean accept(    File pathname){
      if (pathname.isDirectory() && !pathname.equals(autostartModulesDir)) {
        pathname.listFiles(this);
      }
 else       if (pathname.getName().endsWith(JAR_EXT) && !moduleExcludes.contains(pathname.getName())) {
        try {
          moduleJarURLs.add(pathname.toURI().toURL());
        }
 catch (        Exception ex) {
          logger.log(Level.WARNING,LogFacade.CAUGHT_EXCEPTION,ex);
        }
      }
      return false;
    }
  }
);
  return moduleJarURLs;
}
Program: 28376
Project: 28376
Buggy source:
public boolean accept(File pathname){
  if (pathname.isDirectory() && !pathname.equals(autostartModulesDir)) {
    pathname.listFiles(this);
  }
 else   if (pathname.getName().endsWith(JAR_EXT) && !moduleExcludes.contains(pathname.getName())) {
    try {
      moduleJarURLs.add(pathname.toURI().toURL());
    }
 catch (    Exception ex) {
      logger.warning(ex.getMessage());
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean accept(File pathname){
  if (pathname.isDirectory() && !pathname.equals(autostartModulesDir)) {
    pathname.listFiles(this);
  }
 else   if (pathname.getName().endsWith(JAR_EXT) && !moduleExcludes.contains(pathname.getName())) {
    try {
      moduleJarURLs.add(pathname.toURI().toURL());
    }
 catch (    Exception ex) {
      logger.log(Level.WARNING,LogFacade.CAUGHT_EXCEPTION,ex);
    }
  }
  return false;
}
Program: 28377
Project: 28377
Buggy source:
public void setName(String value){
  name=value;
}

Fixed version (ground truth):
@Override public void setName(String value){
  name=value;
}
Program: 28378
Project: 28378
Buggy source:
public String getName(){
  return name;
}

Fixed version (ground truth):
@Override public String getName(){
  return name;
}
Program: 28379
Project: 28379
Buggy source:
public String getTransport(){
  return transport;
}

Fixed version (ground truth):
@Override public String getTransport(){
  return transport;
}
Program: 28380
Project: 28380
Buggy source:
public void setJkEnabled(String value){
  jkEnabled=value;
}

Fixed version (ground truth):
@Override public void setJkEnabled(String value){
  jkEnabled=value;
}
Program: 28381
Project: 28381
Buggy source:
public void setProtocol(String value){
  protocol=value;
}

Fixed version (ground truth):
@Override public void setProtocol(String value){
  protocol=value;
}
Program: 28382
Project: 28382
Buggy source:
public String findHttpProtocolName(){
  return null;
}

Fixed version (ground truth):
@Override public String findHttpProtocolName(){
  return null;
}
Program: 28383
Project: 28383
Buggy source:
public void setThreadPool(String value){
  pool=value;
}

Fixed version (ground truth):
@Override public void setThreadPool(String value){
  pool=value;
}
Program: 28384
Project: 28384
Buggy source:
public void setJkConfigurationFile(String jkConfigurationFile){
  this.jkConfigurationFile=jkConfigurationFile;
}

Fixed version (ground truth):
@Override public void setJkConfigurationFile(String jkConfigurationFile){
  this.jkConfigurationFile=jkConfigurationFile;
}
Program: 28385
Project: 28385
Buggy source:
public void setPort(String value){
  port=value;
}

Fixed version (ground truth):
@Override public void setPort(String value){
  port=value;
}
Program: 28386
Project: 28386
Buggy source:
public String getEnabled(){
  return enabled;
}

Fixed version (ground truth):
@Override public String getEnabled(){
  return enabled;
}
Program: 28387
Project: 28387
Buggy source:
public String getAddress(){
  return address;
}

Fixed version (ground truth):
@Override public String getAddress(){
  return address;
}
Program: 28388
Project: 28388
Buggy source:
public String getThreadPool(){
  return pool;
}

Fixed version (ground truth):
@Override public String getThreadPool(){
  return pool;
}
Program: 28389
Project: 28389
Buggy source:
public void setTransport(String value){
  transport=value;
}

Fixed version (ground truth):
@Override public void setTransport(String value){
  transport=value;
}
Program: 28390
Project: 28390
Buggy source:
public String getJkEnabled(){
  return jkEnabled;
}

Fixed version (ground truth):
@Override public String getJkEnabled(){
  return jkEnabled;
}
Program: 28391
Project: 28391
Buggy source:
public Property getProperty(String name){
  if (name == null)   return null;
  for (  Property property : properties) {
    if (name.equals(property.getName())) {
      return property;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Property getProperty(String name){
  if (name == null)   return null;
  for (  Property property : properties) {
    if (name.equals(property.getName())) {
      return property;
    }
  }
  return null;
}
Program: 28392
Project: 28392
Buggy source:
public void setAddress(String value){
  address=value;
}

Fixed version (ground truth):
@Override public void setAddress(String value){
  address=value;
}
Program: 28393
Project: 28393
Buggy source:
public String getJkConfigurationFile(){
  return jkConfigurationFile;
}

Fixed version (ground truth):
@Override public String getJkConfigurationFile(){
  return jkConfigurationFile;
}
Program: 28394
Project: 28394
Buggy source:
public String getProtocol(){
  return protocol;
}

Fixed version (ground truth):
@Override public String getProtocol(){
  return protocol;
}
Program: 28395
Project: 28395
Buggy source:
public void setEnabled(String enabled){
  this.enabled=enabled;
}

Fixed version (ground truth):
@Override public void setEnabled(String enabled){
  this.enabled=enabled;
}
Program: 28396
Project: 28396
Buggy source:
public String getPort(){
  return port;
}

Fixed version (ground truth):
@Override public String getPort(){
  return port;
}
Program: 28397
Project: 28397
Buggy source:
public String getPropertyValue(String name,String defaultValue){
  final Property property=getProperty(name);
  if (property != null) {
    return property.getValue();
  }
  return defaultValue;
}

Fixed version (ground truth):
@Override public String getPropertyValue(String name,String defaultValue){
  final Property property=getProperty(name);
  if (property != null) {
    return property.getValue();
  }
  return defaultValue;
}
Program: 28398
Project: 28398
Buggy source:
public GlassfishNetworkListener(GrizzlyService grizzlyService,Logger logger){
  this.grizzlyService=grizzlyService;
  this.logger=logger;
}

Fixed version (ground truth):
public GlassfishNetworkListener(final GrizzlyService grizzlyService,final NetworkListener networkListener,final Logger logger){
  this.grizzlyService=grizzlyService;
  this.networkListener=networkListener;
  this.logger=logger;
}
Program: 28399
Project: 28399
Buggy source:
protected GrizzlyListener createGrizzlyListener(final NetworkListener networkListener){
  if ("String_Node_Str".equals(networkListener.getProtocol())) {
    return createServiceInitializerListener();
  }
 else {
    return createGlassfishListener();
  }
}

Fixed version (ground truth):
protected GrizzlyListener createGrizzlyListener(final NetworkListener networkListener){
  if (GrizzlyService.isLightWeightListener(networkListener)) {
    return createServiceInitializerListener(networkListener);
  }
 else {
    return createGlassfishListener(networkListener);
  }
}
Program: 28400
Project: 28400
Buggy source:
protected GrizzlyListener createGlassfishListener(){
  return new GlassfishNetworkListener(grizzlyService,logger);
}

Fixed version (ground truth):
protected GrizzlyListener createGlassfishListener(final NetworkListener networkListener){
  return new GlassfishNetworkListener(grizzlyService,networkListener,logger);
}
Program: 28401
Project: 28401
Buggy source:
protected GrizzlyListener createServiceInitializerListener(){
  return new ServiceInitializerListener(grizzlyService,logger);
}

Fixed version (ground truth):
protected GrizzlyListener createServiceInitializerListener(final NetworkListener networkListener){
  return new ServiceInitializerListener(grizzlyService,networkListener,logger);
}
Program: 28404
Project: 28404
Buggy source:
public ServiceInitializerListener(final GrizzlyService grizzlyService,final Logger logger){
  this.grizzlyService=grizzlyService;
  this.logger=logger;
}

Fixed version (ground truth):
public ServiceInitializerListener(final GrizzlyService grizzlyService,final NetworkListener networkListener,final Logger logger){
  this.grizzlyService=grizzlyService;
  this.networkListener=networkListener;
  this.logger=logger;
}
Program: 28405
Project: 28405
Buggy source:
private Response executeSseCommand(CommandName commandName,Payload.Inbound inbound,ParameterMap params,String modelETag,Cookie jSessionId) throws WebApplicationException {
  if (RestLogging.restLogger.isLoggable(Level.FINEST)) {
    RestLogging.restLogger.log(Level.FINEST,"String_Node_Str",commandName);
  }
  CommandModel model=getCommandModel(commandName);
  checkCommandModelETag(model,modelETag);
  final CommandRunner.CommandInvocation commandInvocation=getCommandRunner().getCommandInvocation(commandName.getScope(),commandName.getName(),new PropsFileActionReporter(),getSubject(),params.containsKey("String_Node_Str"));
  if (inbound != null) {
    commandInvocation.inbound(inbound);
  }
  commandInvocation.outbound(new RestPayloadImpl.Outbound(false)).managedJob().parameters(params);
  ResponseBuilder rb=Response.status(HttpURLConnection.HTTP_OK);
  if (isSingleInstanceCommand(model)) {
    rb.cookie(getJSessionCookie(jSessionId));
  }
  rb.entity(SseCommandHelper.invokeAsync(commandInvocation,null));
  return rb.build();
}

Fixed version (ground truth):
private Response executeSseCommand(CommandName commandName,Payload.Inbound inbound,ParameterMap params,String modelETag,Cookie jSessionId) throws WebApplicationException {
  if (RestLogging.restLogger.isLoggable(Level.FINEST)) {
    RestLogging.restLogger.log(Level.FINEST,"String_Node_Str",commandName);
  }
  CommandModel model=getCommandModel(commandName);
  checkCommandModelETag(model,modelETag);
  boolean notifyOption=false;
  if (params != null) {
    notifyOption=params.containsKey("String_Node_Str");
  }
  final CommandRunner.CommandInvocation commandInvocation=getCommandRunner().getCommandInvocation(commandName.getScope(),commandName.getName(),new PropsFileActionReporter(),getSubject(),notifyOption);
  if (inbound != null) {
    commandInvocation.inbound(inbound);
  }
  commandInvocation.outbound(new RestPayloadImpl.Outbound(false)).managedJob().parameters(params);
  ResponseBuilder rb=Response.status(HttpURLConnection.HTTP_OK);
  if (isSingleInstanceCommand(model)) {
    rb.cookie(getJSessionCookie(jSessionId));
  }
  rb.entity(SseCommandHelper.invokeAsync(commandInvocation,null));
  return rb.build();
}
Program: 28407
Project: 28407
Buggy source:
/** 
 * Return an <code>Enumeration</code> of <code>String</code> objects containing the names of the objects bound to this session.
 * @exception IllegalStateException if this method is called on aninvalidated session
 */
public Enumeration<String> getAttributeNames(){
  if (!isValid())   throw new IllegalStateException("String_Node_Str" + rb.getString(SESSION_INVALIDATED_EXCEPTION));
synchronized (attributes) {
    return (new Enumerator<String>(attributes.keySet(),true));
  }
}

Fixed version (ground truth):
/** 
 * Return an <code>Enumeration</code> of <code>String</code> objects containing the names of the objects bound to this session.
 * @exception IllegalStateException if this method is called on aninvalidated session
 */
public Enumeration<String> getAttributeNames(){
  if (!isValid())   throw new IllegalStateException("String_Node_Str" + rb.getString(SESSION_INVALIDATED_EXCEPTION));
  return (new Enumerator<String>(attributes.keySet(),true));
}
Program: 28408
Project: 28408
Buggy source:
/** 
 * @return a string describing the values I hold
 */
public void print(StringBuffer toStringBuffer){
  toStringBuffer.append("String_Node_Str").append(getLocale()).append("String_Node_Str").append(locale);
}

Fixed version (ground truth):
/** 
 * @return a string describing the values I hold
 */
public void print(StringBuffer toStringBuffer){
  toStringBuffer.append("String_Node_Str").append(getLocale()).append("String_Node_Str").append(getEncoding());
}
Program: 28409
Project: 28409
Buggy source:
public LocaleEncodingMappingListDescriptor getLocaleEncodingMappingListDescriptor(){
  return localeEncodingMappingDesc;
}

Fixed version (ground truth):
public LocaleEncodingMappingListDescriptor getLocaleEncodingMappingListDescriptor(){
  return localeEncodingMappingListDesc;
}
Program: 28410
Project: 28410
Buggy source:
public void setLocaleEncodingMappingListDescriptor(LocaleEncodingMappingListDescriptor lemDesc){
  localeEncodingMappingDesc=lemDesc;
}

Fixed version (ground truth):
public void setLocaleEncodingMappingListDescriptor(LocaleEncodingMappingListDescriptor lemListDesc){
  localeEncodingMappingListDesc=lemListDesc;
}
Program: 28413
Project: 28413
Buggy source:
@Override public String toString(){
  StringBuilder result=new StringBuilder();
  result.append(jobId);
  if (ext == ExtensionType.ATTACHMENT) {
    result.append("String_Node_Str").append(StringUtils.nvl(attachmentId));
  }
  result.append(EXTENSIONS.get(ext));
  return result.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  if (cachedFileName == null) {
    StringBuilder result=new StringBuilder();
    result.append(jobId);
    if (ext == ExtensionType.ATTACHMENT) {
      result.append("String_Node_Str");
      if (attachmentId == null) {
        result.append("String_Node_Str");
      }
 else       if (!attachmentId.isEmpty()) {
        try {
          MessageDigest md=MessageDigest.getInstance("String_Node_Str");
          byte[] thedigest=md.digest(attachmentId.getBytes("String_Node_Str"));
          for (int i=0; i < thedigest.length; i++) {
            result.append(Integer.toString((thedigest[i] & 0xff) + 0x100,16).substring(1));
          }
        }
 catch (        Exception ex) {
          result.append(attachmentId);
        }
      }
    }
    result.append(EXTENSIONS.get(ext));
    cachedFileName=result.toString();
  }
  return cachedFileName;
}
Program: 28414
Project: 28414
Buggy source:
public CheckpointFilename(File file) throws IOException {
  this.parentDir=file.getParentFile();
  String name=file.getName();
  int ind=name.lastIndexOf('.');
  if (ind <= 0) {
    throw new IOException(strings.getLocalString("String_Node_Str","String_Node_Str",file.getName()));
  }
  String extensionStr=name.substring(ind);
  ExtensionType extension=null;
  for (  Map.Entry<ExtensionType,String> entry : EXTENSIONS.entrySet()) {
    if (extensionStr.equals(entry.getValue())) {
      extension=entry.getKey();
      break;
    }
  }
  if (extension == null) {
    throw new IOException(strings.getLocalString("String_Node_Str","String_Node_Str",file.getName()));
  }
  this.ext=extension;
  name=name.substring(0,ind);
  if (this.ext == ExtensionType.ATTACHMENT) {
    ind=name.indexOf('-');
    if (ind < 0) {
      throw new IOException(strings.getLocalString("String_Node_Str","String_Node_Str",file.getName()));
    }
    this.jobId=name.substring(0,ind);
    this.attachmentId=name.substring(ind + 1);
  }
 else {
    this.jobId=name;
  }
}

Fixed version (ground truth):
public CheckpointFilename(File file) throws IOException {
  this.parentDir=file.getParentFile();
  String name=file.getName();
  this.cachedFileName=name;
  int ind=name.lastIndexOf('.');
  if (ind <= 0) {
    throw new IOException(strings.getLocalString("String_Node_Str","String_Node_Str",file.getName()));
  }
  String extensionStr=name.substring(ind);
  ExtensionType extension=null;
  for (  Map.Entry<ExtensionType,String> entry : EXTENSIONS.entrySet()) {
    if (extensionStr.equals(entry.getValue())) {
      extension=entry.getKey();
      break;
    }
  }
  if (extension == null) {
    throw new IOException(strings.getLocalString("String_Node_Str","String_Node_Str",file.getName()));
  }
  this.ext=extension;
  name=name.substring(0,ind);
  if (this.ext == ExtensionType.ATTACHMENT) {
    ind=name.indexOf('-');
    if (ind < 0) {
      throw new IOException(strings.getLocalString("String_Node_Str","String_Node_Str",file.getName()));
    }
    this.jobId=name.substring(0,ind);
    this.attachmentId=name.substring(ind + 1);
  }
 else {
    this.jobId=name;
  }
}
Program: 28415
Project: 28415
Buggy source:
private String doubleToString(double val){
  return (new Double(val)).toString();
}

Fixed version (ground truth):
private String doubleToString(double val){
  return Double.toHexString(val);
}
Program: 28416
Project: 28416
Buggy source:
private String booleanToString(boolean val){
  return (new Boolean(val)).toString();
}

Fixed version (ground truth):
private String booleanToString(boolean val){
  return Boolean.toString(val);
}