nus-yam/ex-repair huggingface dataset:
Program: 89986
Project: 89986
Buggy source:
/** 
 * Checks whether a directory is one of the known bitarchive directories.
 * @param theDir The dir to check
 * @return true If it is a valid archive directory; otherwise returns false.
 * @throws IOFailure if theDir or one of the valid archive directoriesdoes not exist
 * @throws ArgumentNotValid if theDir is null
 */
protected boolean isBitarchiveDirectory(File theDir){
  ArgumentNotValid.checkNotNull(theDir,"String_Node_Str");
  try {
    theDir=theDir.getCanonicalFile();
    for (Iterator<File> i=archivePaths.iterator(); i.hasNext(); ) {
      File knowndir=i.next();
      if (knowndir.getCanonicalFile().equals(theDir)) {
        return true;
      }
    }
    return false;
  }
 catch (  IOException e) {
    final String errMsg="String_Node_Str";
    log.warn(errMsg,e);
    throw new IOFailure(errMsg,e);
  }
}

Fixed version (ground truth):
/** 
 * Checks whether a directory is one of the known bitarchive directories.
 * @param theDir The dir to check
 * @return true If it is a valid archive directory; otherwise returns false.
 * @throws IOFailure if theDir or one of the valid archive directoriesdoes not exist
 * @throws ArgumentNotValid if theDir is null
 */
protected boolean isBitarchiveDirectory(File theDir){
  ArgumentNotValid.checkNotNull(theDir,"String_Node_Str");
  try {
    theDir=theDir.getCanonicalFile();
    for (    File knowndir : archivePaths) {
      if (knowndir.getCanonicalFile().equals(theDir)) {
        return true;
      }
    }
    return false;
  }
 catch (  IOException e) {
    final String errMsg="String_Node_Str";
    log.warn(errMsg,e);
    throw new IOFailure(errMsg,e);
  }
}
Program: 89987
Project: 89987
Buggy source:
/** 
 * Returns a temporary place for the the file to be stored.
 * @param arcFileName The simple name (i.e. no dirs) of the ARC file.
 * @param requestedSize How large the file is in bytes.
 * @return The path where the arcFile should go.
 * @throws ArgumentNotValid If arcFileName is null or empty, or requestedSize is negative.
 * @throws IOFailure if there is no more room left to store this file ofsize=requestedSize
 */
public File getTemporaryPath(String arcFileName,long requestedSize) throws ArgumentNotValid, IOFailure {
  ArgumentNotValid.checkNotNullOrEmpty(arcFileName,"String_Node_Str");
  ArgumentNotValid.checkNotNegative(requestedSize,"String_Node_Str");
  for (Iterator<File> it=archivePaths.iterator(); it.hasNext(); ) {
    File dir=it.next();
    long bytesFreeInDir=FileUtils.getBytesFree(dir);
    if (checkArchiveDir(dir) && (bytesFreeInDir > minSpaceLeft + requestedSize)) {
      File filedir=new File(dir,Constants.TEMPORARY_DIRECTORY_NAME);
      return new File(filedir,arcFileName);
    }
 else {
      log.warn("String_Node_Str" + dir.getAbsolutePath() + "String_Node_Str"+ arcFileName+ "String_Node_Str"+ requestedSize+ "String_Node_Str"+ bytesFreeInDir+ "String_Node_Str");
    }
  }
  String errMsg="String_Node_Str" + arcFileName + "String_Node_Str"+ requestedSize;
  log.fatal(errMsg);
  throw new IOFailure(errMsg);
}

Fixed version (ground truth):
/** 
 * Returns a temporary place for the the file to be stored.
 * @param arcFileName The simple name (i.e. no dirs) of the ARC file.
 * @param requestedSize How large the file is in bytes.
 * @return The path where the arcFile should go.
 * @throws ArgumentNotValid If arcFileName is null or empty, or requestedSize is negative.
 * @throws IOFailure if there is no more room left to store this file ofsize=requestedSize
 */
public File getTemporaryPath(String arcFileName,long requestedSize) throws ArgumentNotValid, IOFailure {
  ArgumentNotValid.checkNotNullOrEmpty(arcFileName,"String_Node_Str");
  ArgumentNotValid.checkNotNegative(requestedSize,"String_Node_Str");
  for (  File dir : archivePaths) {
    long bytesFreeInDir=FileUtils.getBytesFree(dir);
    if (checkArchiveDir(dir) && (bytesFreeInDir > minSpaceLeft) && (bytesFreeInDir - requestedSize > minSpaceRequired)) {
      File filedir=new File(dir,Constants.TEMPORARY_DIRECTORY_NAME);
      return new File(filedir,arcFileName);
    }
 else {
      log.debug("String_Node_Str" + dir.getAbsolutePath() + "String_Node_Str"+ arcFileName+ "String_Node_Str"+ requestedSize+ "String_Node_Str"+ bytesFreeInDir+ "String_Node_Str");
    }
  }
  String errMsg="String_Node_Str" + arcFileName + "String_Node_Str"+ requestedSize;
  log.error(errMsg);
  throw new IOFailure(errMsg);
}
Program: 89988
Project: 89988
Buggy source:
/** 
 * Get a tree view of a part of the settings. Note: settings read with this mechanism do not support overriding with system properties!
 * @param path Dotted path to a unique element in the tree.
 * @return The part of the setting structure below the element given.
 */
public static StringTree<String> getTree(String path){
  for (  SimpleXml settingsXml : fileSettingsXmlList) {
    if (settingsXml.hasKey(path)) {
      return settingsXml.getTree(path);
    }
  }
  for (  SimpleXml settingsXml : defaultClasspathSettingsXmlList) {
    if (settingsXml.hasKey(path)) {
      return settingsXml.getTree(path);
    }
  }
  throw new UnknownID("String_Node_Str" + path + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Get a tree view of a part of the settings. Note: settings read with this mechanism do not support overriding with system properties!
 * @param path Dotted path to a unique element in the tree.
 * @return The part of the setting structure below the element given.
 */
public static StringTree<String> getTree(String path){
  for (  SimpleXml settingsXml : getFileSettingsXmlList()) {
    if (settingsXml.hasKey(path)) {
      return settingsXml.getTree(path);
    }
  }
  for (  SimpleXml settingsXml : getDefaultClasspathSettingsXmlList()) {
    if (settingsXml.hasKey(path)) {
      return settingsXml.getTree(path);
    }
  }
  throw new UnknownID("String_Node_Str" + path + "String_Node_Str");
}
Program: 89990
Project: 89990
Buggy source:
/** 
 * Gets a setting. The search order for a given setting is as follows: First it is checked, if the argument key is set as a System property. If yes, return this value. If no, we continue the search. Secondly, we check, if the setting is in one of the loaded settings xml files. If the value is there, it is returned. If no, we continue the search. Finally, we check if the setting is in one of default settings  files from classpath. If the value is there, it is returned. Otherwise an UnknownId exception is thrown. Note: The retrieved value can be the empty string
 * @param key name of the setting to retrieve
 * @return the retrieved value
 * @throws ArgumentNotValid if key is null or the empty string
 * @throws UnknownID        if no setting loaded matches key
 */
public static String get(String key) throws UnknownID, IOFailure, ArgumentNotValid {
  ArgumentNotValid.checkNotNullOrEmpty(key,"String_Node_Str");
  String val=System.getProperty(key);
  if (val != null) {
    return val;
  }
  for (  SimpleXml settingsXml : fileSettingsXmlList) {
    if (settingsXml.hasKey(key)) {
      return settingsXml.getString(key);
    }
  }
  for (  SimpleXml settingsXml : defaultClasspathSettingsXmlList) {
    if (settingsXml.hasKey(key)) {
      return settingsXml.getString(key);
    }
  }
  throw new UnknownID("String_Node_Str" + key + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Gets a setting. The search order for a given setting is as follows: First it is checked, if the argument key is set as a System property. If yes, return this value. If no, we continue the search. Secondly, we check, if the setting is in one of the loaded settings xml files. If the value is there, it is returned. If no, we continue the search. Finally, we check if the setting is in one of default settings  files from classpath. If the value is there, it is returned. Otherwise an UnknownId exception is thrown. Note: The retrieved value can be the empty string
 * @param key name of the setting to retrieve
 * @return the retrieved value
 * @throws ArgumentNotValid if key is null or the empty string
 * @throws UnknownID        if no setting loaded matches key
 */
public static String get(String key) throws UnknownID, IOFailure, ArgumentNotValid {
  ArgumentNotValid.checkNotNullOrEmpty(key,"String_Node_Str");
  String val=System.getProperty(key);
  if (val != null) {
    return val;
  }
  for (  SimpleXml settingsXml : getFileSettingsXmlList()) {
    if (settingsXml.hasKey(key)) {
      return settingsXml.getString(key);
    }
  }
  for (  SimpleXml settingsXml : getDefaultClasspathSettingsXmlList()) {
    if (settingsXml.hasKey(key)) {
      return settingsXml.getString(key);
    }
  }
  throw new UnknownID("String_Node_Str" + key + "String_Node_Str");
}
Program: 89991
Project: 89991
Buggy source:
/** 
 * Generate a MetadataEntry from a list of job ids for duplicate reduction.
 * @param jobIDsForDuplicateReduction the list of jobids (possibly empty)
 * @param origHarvestDefinitionID
 * @param harvestNum
 * @param jobId
 * @return null, if the list is empty,otherwise returns a MetadataEntry from the list of jobids.
 */
public static MetadataEntry makeDuplicateReductionMetadataEntry(List<Long> jobIDsForDuplicateReduction,Long origHarvestDefinitionID,int harvestNum,Long jobId){
  ArgumentNotValid.checkNotNull(jobIDsForDuplicateReduction,"String_Node_Str");
  ArgumentNotValid.checkNotNull(origHarvestDefinitionID,"String_Node_Str");
  ArgumentNotValid.checkNotNegative(harvestNum,"String_Node_Str");
  ArgumentNotValid.checkNotNull(jobId,"String_Node_Str");
  if (jobIDsForDuplicateReduction.isEmpty()) {
    return null;
  }
  String metadataUrl=String.format(DUPLICATEREDUCTION_METADATA_URL,origHarvestDefinitionID,harvestNum,jobId);
  return new MetadataEntry(metadataUrl,MIMETYPE_TEXT_PLAIN,StringUtils.conjoin("String_Node_Str",jobIDsForDuplicateReduction));
}

Fixed version (ground truth):
/** 
 * Generate a MetadataEntry from a list of job ids for duplicate reduction.
 * @param jobIDsForDuplicateReduction the list of jobids (possibly empty)
 * @param origHarvestDefinitionID The harvestdefinition that is behind the job with the given jobId
 * @param harvestNum The number of the harvest that the job with the givenjobid belongs to
 * @param jobId The id of the Job, which this metadata belongs to
 * @return null, if the list is empty,otherwise returns a MetadataEntry from the list of jobids.
 */
public static MetadataEntry makeDuplicateReductionMetadataEntry(List<Long> jobIDsForDuplicateReduction,Long origHarvestDefinitionID,int harvestNum,Long jobId){
  ArgumentNotValid.checkNotNull(jobIDsForDuplicateReduction,"String_Node_Str");
  ArgumentNotValid.checkNotNull(origHarvestDefinitionID,"String_Node_Str");
  ArgumentNotValid.checkNotNegative(harvestNum,"String_Node_Str");
  ArgumentNotValid.checkNotNull(jobId,"String_Node_Str");
  if (jobIDsForDuplicateReduction.isEmpty()) {
    return null;
  }
  String metadataUrl=String.format(DUPLICATEREDUCTION_METADATA_URL,origHarvestDefinitionID,harvestNum,jobId);
  return new MetadataEntry(metadataUrl,MIMETYPE_TEXT_PLAIN,StringUtils.conjoin("String_Node_Str",jobIDsForDuplicateReduction));
}
Program: 89992
Project: 89992
Buggy source:
/** 
 * Method needed to serializable an object of this class.
 * @param s the given ObjectOutputStream
 * @throws ClassNotFoundException
 * @throws IOException
 */
private void writeObject(ObjectOutputStream s) throws ClassNotFoundException, IOException {
  s.defaultWriteObject();
}

Fixed version (ground truth):
/** 
 * Method needed to serializable an object of this class.
 * @param s the given ObjectOutputStream
 * @throws IOException If an I/O error occurred while writing to theoutputstream
 */
private void writeObject(ObjectOutputStream s) throws IOException {
  s.defaultWriteObject();
}
Program: 89994
Project: 89994
Buggy source:
private void setURL(String url){
  if (isURLValid(url)) {
    this.url=url;
  }
 else {
    throw new ArgumentNotValid("String_Node_Str" + url);
  }
}

Fixed version (ground truth):
/** 
 * Set the url for this object.
 * @param url a given URL
 * @throws ArgumentNotValid if the URL is not valid
 */
private void setURL(String url){
  if (isURLValid(url)) {
    this.url=url;
  }
 else {
    throw new ArgumentNotValid("String_Node_Str" + url);
  }
}
Program: 89995
Project: 89995
Buggy source:
/** 
 * Method needed to de-serializable an object of this class.
 * @param s the given ObjectInputStream
 * @throws ClassNotFoundException
 * @throws IOException
 */
private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {
  s.defaultReadObject();
}

Fixed version (ground truth):
/** 
 * Method needed to de-serializable an object of this class.
 * @param s the given ObjectInputStream
 * @throws ClassNotFoundException If the class of the serialized objectcould not be found
 * @throws IOException If an I/O error occurred while reading the serializedobject
 */
private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {
  s.defaultReadObject();
}
Program: 89996
Project: 89996
Buggy source:
private void setMimetype(String mimetype){
  if (isMimetypeValid(mimetype)) {
    this.mimeType=mimetype;
  }
 else {
    throw new ArgumentNotValid("String_Node_Str" + mimetype);
  }
}

Fixed version (ground truth):
/** 
 * Set the mimetype for this object.
 * @param mimetype a given mimetype
 * @throws ArgumentNotValid if the mimetype is not valid
 */
private void setMimetype(String mimetype){
  if (isMimetypeValid(mimetype)) {
    this.mimeType=mimetype;
  }
 else {
    throw new ArgumentNotValid("String_Node_Str" + mimetype);
  }
}
Program: 89997
Project: 89997
Buggy source:
public void setUp(){
  aRealURL="String_Node_Str" + "String_Node_Str";
  aRealMimetype="String_Node_Str";
  realData="String_Node_Str" + "String_Node_Str";
  anEmptyURL="String_Node_Str";
  anEmptyMimetype="String_Node_Str";
  emptyData="String_Node_Str";
}

Fixed version (ground truth):
public void setUp(){
  aRealURL="String_Node_Str" + "String_Node_Str";
  aRealMimetype="String_Node_Str";
  realData="String_Node_Str" + "String_Node_Str";
  anEmptyURL="String_Node_Str";
  anEmptyMimetype="String_Node_Str";
  emptyData="String_Node_Str";
  anInvalidUrl="String_Node_Str";
  anInvalidMimetype="String_Node_Str";
}
Program: 89998
Project: 89998
Buggy source:
public void testMetadataEntry(){
  try {
    new MetadataEntry(aNullURL,aRealMimetype,realData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
  try {
    new MetadataEntry(anEmptyURL,aRealMimetype,realData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
  try {
    new MetadataEntry(aRealURL,aNullMimetype,realData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
  try {
    new MetadataEntry(aRealURL,anEmptyMimetype,realData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
  try {
    new MetadataEntry(aRealURL,aRealMimetype,nullData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
  try {
    new MetadataEntry(aRealURL,aRealMimetype,emptyData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
  try {
    new MetadataEntry(aRealURL,aRealMimetype,realData);
  }
 catch (  ArgumentNotValid e) {
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
public void testMetadataEntry(){
  try {
    new MetadataEntry(aNullURL,aRealMimetype,realData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
  try {
    new MetadataEntry(anEmptyURL,aRealMimetype,realData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
  try {
    new MetadataEntry(aRealURL,aNullMimetype,realData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
  try {
    new MetadataEntry(aRealURL,anEmptyMimetype,realData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
  try {
    new MetadataEntry(aRealURL,aRealMimetype,nullData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
  try {
    new MetadataEntry(aRealURL,aRealMimetype,emptyData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
  try {
    new MetadataEntry(aRealURL,aRealMimetype,realData);
  }
 catch (  ArgumentNotValid e) {
    fail("String_Node_Str");
  }
  try {
    new MetadataEntry(anInvalidUrl,aRealMimetype,realData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
  try {
    new MetadataEntry(aRealURL,anInvalidMimetype,realData);
    fail("String_Node_Str");
  }
 catch (  ArgumentNotValid e) {
  }
}
Program: 89999
Project: 89999
Buggy source:
/** 
 * Look up a given URI and return the contents as an InputStream.
 * @param uri The URI to find in the archive.  If the URI does notmatch any entries in the archive, IOFailure is thrown.
 * @return An InputStream Containing all the data in the entry, ornull if the entry was not found
 * @throws IOFailure If the ARC file was found in the Lucene index but notin the bit archive, or if some other failure happened while finding the file.
 */
public InputStream lookup(URI uri){
  ArgumentNotValid.checkNotNull(uri,"String_Node_Str");
  ARCKey key=luceneLookup(uri.getScheme() + "String_Node_Str" + uri.getSchemeSpecificPart());
  if (key == null) {
    return null;
  }
 else {
    final BitarchiveRecord bitarchiveRecord=arcRepositoryClient.get(key.getFile().getName(),key.getOffset());
    if (bitarchiveRecord == null) {
      String message="String_Node_Str" + key.getFile().getName() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
      log.debug(message);
      throw new IOFailure(message);
    }
    return bitarchiveRecord.getData();
  }
}

Fixed version (ground truth):
/** 
 * Look up a given URI and return the contents as an InputStream.
 * @param uri The URI to find in the archive.  If the URI does notmatch any entries in the archive, IOFailure is thrown.
 * @return An InputStream Containing all the data in the entry, ornull if the entry was not found
 * @throws IOFailure If the ARC file was found in the Lucene index but notin the bit archive, or if some other failure happened while finding the file.
 */
public InputStream lookup(URI uri){
  ArgumentNotValid.checkNotNull(uri,"String_Node_Str");
  ARCKey key=luceneLookup(uri.getScheme() + "String_Node_Str" + uri.getSchemeSpecificPart());
  if (key == null) {
    key=luceneLookup(uri.getScheme() + "String_Node_Str" + uri.getRawSchemeSpecificPart());
  }
  if (key == null) {
    return null;
  }
 else {
    final BitarchiveRecord bitarchiveRecord=arcRepositoryClient.get(key.getFile().getName(),key.getOffset());
    if (bitarchiveRecord == null) {
      String message="String_Node_Str" + key.getFile().getName() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
      log.debug(message);
      throw new IOFailure(message);
    }
    return bitarchiveRecord.getData();
  }
}
Program: 90000
Project: 90000
Buggy source:
public CrawlLogIndexCache(String name,boolean blacklist,String mimeFilter){
  super(name,new CrawlLogDataCache());
  useBlacklist=blacklist;
  this.mimeFilter=mimeFilter;
}

Fixed version (ground truth):
/** 
 * Constructor for the CrawlLogIndexCache class.
 * @param name The name of the CrawlLogIndexCache
 * @param blacklist Shall the mimefilter be considered a blacklist or a whitelist?
 * @param mimeFilter A regular expression for the mimetypes toexclude/include
 */
public CrawlLogIndexCache(String name,boolean blacklist,String mimeFilter){
  super(name,new CrawlLogDataCache());
  useBlacklist=blacklist;
  this.mimeFilter=mimeFilter;
}
Program: 90001
Project: 90001
Buggy source:
/** 
 * Combine a number of crawl.log files into one Lucene index.  This index is placed as gzip files under the directory returned by getCacheFile().
 * @param rawfiles The map from job ID into crawl.log contents. Nonull values are allowed in this map.
 * @param askedJobIds The set of jobIds actually needed
 */
protected void combine(Map<Long,File> rawfiles){
  File resultFile=getCacheFile(rawfiles.keySet());
  String indexLocation=resultFile.getAbsolutePath() + "String_Node_Str";
  try {
    String indexingMode=DigestIndexer.MODE_BOTH;
    boolean includeNormalizedURL=false;
    boolean includeTimestamp=true;
    boolean includeEtag=true;
    boolean addToExistingIndex=false;
    DigestIndexer indexer=new DigestIndexer(indexLocation,indexingMode,includeNormalizedURL,includeTimestamp,includeEtag,addToExistingIndex);
    for (    Map.Entry<Long,File> entry : rawfiles.entrySet()) {
      indexFile(entry.getKey(),entry.getValue(),indexer);
    }
    indexer.close(OPTIMIZE_INDEX);
    ZipUtils.gzipFiles(new File(indexLocation),resultFile);
  }
 catch (  IOException e) {
    throw new IOFailure("String_Node_Str" + resultFile.getAbsolutePath(),e);
  }
 finally {
    FileUtils.removeRecursively(new File(indexLocation));
  }
}

Fixed version (ground truth):
/** 
 * Combine a number of crawl.log files into one Lucene index.  This index is placed as gzip files under the directory returned by getCacheFile().
 * @param rawfiles The map from job ID into crawl.log contents. Nonull values are allowed in this map.
 */
protected void combine(Map<Long,File> rawfiles){
  File resultFile=getCacheFile(rawfiles.keySet());
  String indexLocation=resultFile.getAbsolutePath() + "String_Node_Str";
  try {
    String indexingMode=DigestIndexer.MODE_BOTH;
    boolean includeNormalizedURL=false;
    boolean includeTimestamp=true;
    boolean includeEtag=true;
    boolean addToExistingIndex=false;
    DigestIndexer indexer=new DigestIndexer(indexLocation,indexingMode,includeNormalizedURL,includeTimestamp,includeEtag,addToExistingIndex);
    for (    Map.Entry<Long,File> entry : rawfiles.entrySet()) {
      indexFile(entry.getKey(),entry.getValue(),indexer);
    }
    indexer.close(OPTIMIZE_INDEX);
    ZipUtils.gzipFiles(new File(indexLocation),resultFile);
  }
 catch (  IOException e) {
    throw new IOFailure("String_Node_Str" + resultFile.getAbsolutePath(),e);
  }
 finally {
    FileUtils.removeRecursively(new File(indexLocation));
  }
}
Program: 90002
Project: 90002
Buggy source:
/** 
 * Get an index for the given list of job IDs. The resulting file contains a suitably sorted list. This method should always be safe for asynchronous calling. This method may use a cached version of the file.
 * @param jobIDs Set of job IDs to generate index for.
 * @return An index, consisting of a file and the set this is an index for.This file must not be modified or deleted, since it is part of the cache of data.
 */
public Index<Set<Long>> getIndex(Set<Long> jobIDs);

Fixed version (ground truth):
/** 
 * Get an index for the given list of job IDs. The resulting file contains a suitably sorted list. This method should always be safe for asynchronous calling. This method may use a cached version of the file.
 * @param jobIDs Set of job IDs to generate index for.
 * @return An index, consisting of a file and the set this is an index for.This file must not be modified or deleted, since it is part of the cache of data.
 */
Index<Set<Long>> getIndex(Set<Long> jobIDs);
Program: 90003
Project: 90003
Buggy source:
/** 
 * Lookup and return the Class with the given className.
 * @param className The name of the class to lookup
 * @throws ClassNotFoundException If the class could not be found
 * @return the Class with the given className.
 * @Overrides ClassLoader.findClass()
 */
public Class findClass(String className) throws ClassNotFoundException {
  ArgumentNotValid.checkNotNullOrEmpty(className,"String_Node_Str");
  String realClassName=className.replace(JAVA_PACKAGE_SEPARATOR,DIRECTOR_SEPARATOR) + "String_Node_Str";
  if (binaryData.isEmpty()) {
    log.warn("String_Node_Str" + className + "String_Node_Str");
  }
  if (binaryData.containsKey(realClassName)) {
    final byte[] bytes=binaryData.get(realClassName);
    return defineClass(className,bytes,0,bytes.length);
  }
 else {
    return super.findClass(className);
  }
}

Fixed version (ground truth):
/** 
 * Lookup and return the Class with the given className. This method overrides the ClassLoader.findClass method.
 * @param className The name of the class to lookup
 * @throws ClassNotFoundException If the class could not be found
 * @return the Class with the given className.
 */
public Class findClass(String className) throws ClassNotFoundException {
  ArgumentNotValid.checkNotNullOrEmpty(className,"String_Node_Str");
  String realClassName=className.replace(JAVA_PACKAGE_SEPARATOR,DIRECTOR_SEPARATOR) + "String_Node_Str";
  if (binaryData.isEmpty()) {
    log.warn("String_Node_Str" + className + "String_Node_Str");
  }
  if (binaryData.containsKey(realClassName)) {
    final byte[] bytes=binaryData.get(realClassName);
    return defineClass(className,bytes,0,bytes.length);
  }
 else {
    return super.findClass(className);
  }
}
Program: 90005
Project: 90005
Buggy source:
/** 
 * @see {@link HeritrixController#getQueuedUriCount()}
 */
public long getQueuedUriCount(){
  return myController.getFrontier().queuedUriCount();
}

Fixed version (ground truth):
/** 
 * @see HeritrixController#getQueuedUriCount() 
 */
public long getQueuedUriCount(){
  return myController.getFrontier().queuedUriCount();
}
Program: 90006
Project: 90006
Buggy source:
/** 
 * Sets the value of crawlIsEnded to false
 */
public SimpleCrawlStatusListener(){
  crawlIsEnded.set(false);
}

Fixed version (ground truth):
/** 
 * Sets the value of crawlIsEnded to false.
 */
public SimpleCrawlStatusListener(){
  crawlIsEnded.set(false);
}
Program: 90007
Project: 90007
Buggy source:
/** 
 * Check if the crawl has ended, either because Heritrix finished of its own, or because we terminated it.
 * @return True if the crawl has ended, either because Heritrix finishedor because we terminated it. Otherwise we return false.
 * @See {@link HeritrixController#crawlIsEnded()}
 */
public synchronized boolean crawlIsEnded(){
  if (processHasExited()) {
    return true;
  }
  TabularData jobs=(TabularData)executeHeritrixCommand(COMPLETED_JOBS_COMMAND);
  if (jobs != null && jobs.size() > 0) {
    for (    CompositeData value : (Collection<CompositeData>)jobs.values()) {
      String thisJobID=value.get(JmxUtils.NAME) + "String_Node_Str" + value.get(UID_PROPERTY);
      if (thisJobID.equals(jobName)) {
        return true;
      }
    }
  }
  String status=(String)getCrawlJobAttribute(STATUS_ATTRIBUTE);
  return status == null || status.equals(FINISHED_STATUS) || status.equals(ILLEGAL_STATUS);
}

Fixed version (ground truth):
/** 
 * Check if the crawl has ended, either because Heritrix finished of its own, or because we terminated it.
 * @return True if the crawl has ended, either because Heritrix finishedor because we terminated it. Otherwise we return false.
 * @see HeritrixController#crawlIsEnded()
 */
public synchronized boolean crawlIsEnded(){
  if (processHasExited()) {
    return true;
  }
  TabularData jobs=(TabularData)executeHeritrixCommand(COMPLETED_JOBS_COMMAND);
  if (jobs != null && jobs.size() > 0) {
    for (    CompositeData value : (Collection<CompositeData>)jobs.values()) {
      String thisJobID=value.get(JmxUtils.NAME) + "String_Node_Str" + value.get(UID_PROPERTY);
      if (thisJobID.equals(jobName)) {
        return true;
      }
    }
  }
  String status=(String)getCrawlJobAttribute(STATUS_ATTRIBUTE);
  return status == null || status.equals(FINISHED_STATUS) || status.equals(ILLEGAL_STATUS);
}
Program: 90008
Project: 90008
Buggy source:
/** 
 * Get the name to use for logging on to Heritrix' JMX with full control. The name cannot be set by the user.
 * @return Name to use when connecting to Heritrix JMX
 */
private String getJMXAdminName(){
  String jmxUsername=Settings.get(HarvesterSettings.HERITRIX_JMX_USERNAME);
  log.debug("String_Node_Str" + "String_Node_Str" + jmxUsername + "String_Node_Str");
  return jmxUsername;
}

Fixed version (ground truth):
/** 
 * Get the name to use for logging on to Heritrix' JMX with full control. The name cannot be set by the user.
 * @return Name to use when connecting to Heritrix JMX
 */
private String getJMXAdminName(){
  String jmxUsername=Settings.get(HarvesterSettings.HERITRIX_JMX_USERNAME);
  log.debug("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + jmxUsername + "String_Node_Str");
  return jmxUsername;
}
Program: 90011
Project: 90011
Buggy source:
/** 
 * Combine parts of an index into one big index.
 * @param filesFound A map of IDs and the files caching their content.
 * @param filesRequired The Set of IDS required by the caller.
 */
protected void combine(Map<Long,File> filesFound,Set<Long> filesRequired){
  File resultFile=getCacheFile(filesFound.keySet());
  concatenateFiles(filesFound.values(),resultFile);
  sortFile(resultFile);
}

Fixed version (ground truth):
/** 
 * Combine parts of an index into one big index.
 * @param filesFound A map of IDs and the files caching their content.
 */
protected void combine(Map<Long,File> filesFound){
  File resultFile=getCacheFile(filesFound.keySet());
  concatenateFiles(filesFound.values(),resultFile);
  sortFile(resultFile);
}
Program: 90012
Project: 90012
Buggy source:
/** 
 * This is called when an appropriate file for the ids in question has not been found.  It is expected to do the actual operations necessary to get the data.  At the outset, the file for the given IDs is expected to be not present.
 * @param ids The set of identifiers for which we want the correspondingdata
 * @return The set of IDs, or subset if data fetching failed for some IDs.If some IDs failed, the file is not filled, though some data may be cached at a lower level.
 */
protected Set<T> cacheData(Set<T> ids){
  Map<T,File> filesFound=prepareCombine(ids);
  File resultFile=getCacheFile(ids);
  if (filesFound.size() == ids.size()) {
    combine(filesFound,ids);
  }
 else {
    FileUtils.remove(resultFile);
  }
  return filesFound.keySet();
}

Fixed version (ground truth):
/** 
 * This is called when an appropriate file for the ids in question has not been found.  It is expected to do the actual operations necessary to get the data.  At the outset, the file for the given IDs is expected to be not present.
 * @param ids The set of identifiers for which we want the correspondingdata
 * @return The set of IDs, or subset if data fetching failed for some IDs.If some IDs failed, the file is not filled, though some data may be cached at a lower level.
 */
protected Set<T> cacheData(Set<T> ids){
  Map<T,File> filesFound=prepareCombine(ids);
  File resultFile=getCacheFile(ids);
  if (filesFound.size() == ids.size()) {
    combine(filesFound);
  }
 else {
    FileUtils.remove(resultFile);
  }
  return filesFound.keySet();
}
Program: 90013
Project: 90013
Buggy source:
/** 
 * Combine a set of files found in the raw data cache to form our kind of file.
 * @param filesFound The files that were found for the IDs in the rawdata cache.  The map must not contain any null values.
 * @param filesRequired The set of IDs required
 */
protected abstract void combine(Map<T,File> filesFound,Set<T> filesRequired);

Fixed version (ground truth):
/** 
 * Combine a set of files found in the raw data cache to form our kind of file.
 * @param filesFound The files that were found for the IDs in the rawdata cache.  The map must not contain any null values.
 */
protected abstract void combine(Map<T,File> filesFound);
Program: 90014
Project: 90014
Buggy source:
/** 
 * Combine a number of crawl.log files into one Lucene index.  This index is placed as gzip files under the directory returned by getCacheFile().
 * @param rawfiles The map from job ID into crawl.log contents. Nonull values are allowed in this map.
 * @param askedJobIds The set of jobIds actually needed
 */
protected void combine(Map<Long,File> rawfiles,Set<Long> askedJobIds){
  File resultFile=getCacheFile(askedJobIds);
  String indexLocation=resultFile.getAbsolutePath() + "String_Node_Str";
  try {
    String indexingMode=DigestIndexer.MODE_BOTH;
    boolean includeNormalizedURL=false;
    boolean includeTimestamp=true;
    boolean includeEtag=true;
    boolean addToExistingIndex=false;
    DigestIndexer indexer=new DigestIndexer(indexLocation,indexingMode,includeNormalizedURL,includeTimestamp,includeEtag,addToExistingIndex);
    for (    Map.Entry<Long,File> entry : rawfiles.entrySet()) {
      indexFile(entry.getKey(),entry.getValue(),indexer);
    }
    indexer.close(OPTIMIZE_INDEX);
    ZipUtils.gzipFiles(new File(indexLocation),resultFile);
  }
 catch (  IOException e) {
    throw new IOFailure("String_Node_Str" + resultFile.getAbsolutePath(),e);
  }
 finally {
    FileUtils.removeRecursively(new File(indexLocation));
  }
}

Fixed version (ground truth):
/** 
 * Combine a number of crawl.log files into one Lucene index.  This index is placed as gzip files under the directory returned by getCacheFile().
 * @param rawfiles The map from job ID into crawl.log contents. Nonull values are allowed in this map.
 * @param askedJobIds The set of jobIds actually needed
 */
protected void combine(Map<Long,File> rawfiles){
  File resultFile=getCacheFile(rawfiles.keySet());
  String indexLocation=resultFile.getAbsolutePath() + "String_Node_Str";
  try {
    String indexingMode=DigestIndexer.MODE_BOTH;
    boolean includeNormalizedURL=false;
    boolean includeTimestamp=true;
    boolean includeEtag=true;
    boolean addToExistingIndex=false;
    DigestIndexer indexer=new DigestIndexer(indexLocation,indexingMode,includeNormalizedURL,includeTimestamp,includeEtag,addToExistingIndex);
    for (    Map.Entry<Long,File> entry : rawfiles.entrySet()) {
      indexFile(entry.getKey(),entry.getValue(),indexer);
    }
    indexer.close(OPTIMIZE_INDEX);
    ZipUtils.gzipFiles(new File(indexLocation),resultFile);
  }
 catch (  IOException e) {
    throw new IOFailure("String_Node_Str" + resultFile.getAbsolutePath(),e);
  }
 finally {
    FileUtils.removeRecursively(new File(indexLocation));
  }
}
Program: 90016
Project: 90016
Buggy source:
public void testCombine() throws Exception {
  CDXIndexCache cache=new CDXIndexCache();
  Map<Long,File> files=new HashMap<Long,File>();
  files.put(4L,TestInfo.METADATA_FILE_4);
  files.put(3L,TestInfo.METADATA_FILE_3);
  Set<Long> requiredSet=new HashSet<Long>();
  requiredSet.add(3L);
  requiredSet.add(4L);
  cache.combine(files,requiredSet);
  File cacheFile=cache.getCacheFile(files.keySet());
  FileAsserts.assertFileNumberOfLines("String_Node_Str",cacheFile,(int)FileUtils.countLines(TestInfo.METADATA_FILE_3) + (int)FileUtils.countLines(TestInfo.METADATA_FILE_4));
  FileAsserts.assertFileContains("String_Node_Str","String_Node_Str",cacheFile);
}

Fixed version (ground truth):
public void testCombine() throws Exception {
  CDXIndexCache cache=new CDXIndexCache();
  Map<Long,File> files=new HashMap<Long,File>();
  files.put(4L,TestInfo.METADATA_FILE_4);
  files.put(3L,TestInfo.METADATA_FILE_3);
  Set<Long> requiredSet=new HashSet<Long>();
  requiredSet.add(3L);
  requiredSet.add(4L);
  cache.combine(files);
  File cacheFile=cache.getCacheFile(files.keySet());
  FileAsserts.assertFileNumberOfLines("String_Node_Str",cacheFile,(int)FileUtils.countLines(TestInfo.METADATA_FILE_3) + (int)FileUtils.countLines(TestInfo.METADATA_FILE_4));
  FileAsserts.assertFileContains("String_Node_Str","String_Node_Str",cacheFile);
}
Program: 90018
Project: 90018
Buggy source:
protected void combine(Map<Integer,File> filesFound,Set<Integer> requiredSet){
  File resultFile=getCacheFile(filesFound.keySet());
  combined.clear();
  combined.putAll(filesFound);
  try {
    resultFile.createNewFile();
  }
 catch (  IOException e) {
    throw new IOFailure("String_Node_Str",e);
  }
}

Fixed version (ground truth):
protected void combine(Map<Integer,File> filesFound){
  File resultFile=getCacheFile(filesFound.keySet());
  combined.clear();
  combined.putAll(filesFound);
  try {
    resultFile.createNewFile();
  }
 catch (  IOException e) {
    throw new IOFailure("String_Node_Str",e);
  }
}
Program: 90020
Project: 90020
Buggy source:
/** 
 * Combine parts of an index into one big index.
 * @param filesFound A map of IDs and the files caching their content.
 */
protected void combine(Map<Long,File> filesFound){
  File resultFile=getCacheFile(filesFound.keySet());
  concatenateFiles(filesFound.values(),resultFile);
  sortFile(resultFile);
}

Fixed version (ground truth):
/** 
 * Combine parts of an index into one big index.
 * @param filesFound A map of IDs and the files caching their content.
 */
protected void combine(Map<Long,File> filesFound,Set<Long> filesRequired){
  File resultFile=getCacheFile(filesFound.keySet());
  concatenateFiles(filesFound.values(),resultFile);
  sortFile(resultFile);
}
Program: 90021
Project: 90021
Buggy source:
/** 
 * This is called when an appropriate file for the ids in question has not been found.  It is expected to do the actual operations necessary to get the data.  At the outset, the file for the given IDs is expected to be not present.
 * @param ids
 * @return The set of IDs, or subset if data fetching failed for some IDs.If some IDs failed, the file is not filled, though some data may be cached at a lower level.
 */
protected Set<T> cacheData(Set<T> ids){
  Map<T,File> filesFound=prepareCombine(ids);
  File resultFile=getCacheFile(ids);
  if (filesFound.size() == ids.size()) {
    combine(filesFound);
  }
 else {
    FileUtils.remove(resultFile);
  }
  return filesFound.keySet();
}

Fixed version (ground truth):
/** 
 * This is called when an appropriate file for the ids in question has not been found.  It is expected to do the actual operations necessary to get the data.  At the outset, the file for the given IDs is expected to be not present.
 * @param ids
 * @return The set of IDs, or subset if data fetching failed for some IDs.If some IDs failed, the file is not filled, though some data may be cached at a lower level.
 */
protected Set<T> cacheData(Set<T> ids){
  Map<T,File> filesFound=prepareCombine(ids);
  File resultFile=getCacheFile(ids);
  if (filesFound.size() == ids.size()) {
    combine(filesFound,ids);
  }
 else {
    FileUtils.remove(resultFile);
  }
  return filesFound.keySet();
}
Program: 90022
Project: 90022
Buggy source:
/** 
 * Combine a set of files found in the raw data cache to form our kind of file.
 * @param filesFound The files that were found for the IDs in the rawdata cache.  The map must not contain any null values.
 */
protected abstract void combine(Map<T,File> filesFound);

Fixed version (ground truth):
/** 
 * Combine a set of files found in the raw data cache to form our kind of file.
 * @param filesFound The files that were found for the IDs in the rawdata cache.  The map must not contain any null values.
 * @param filesRequired The set of IDs required
 */
protected abstract void combine(Map<T,File> filesFound,Set<T> filesRequired);
Program: 90023
Project: 90023
Buggy source:
/** 
 * Prepare data for combining.  This class overrides prepareCombine to make sure that CDX data is available.
 * @param IDs Set of IDs that will be combined.
 * @return Map of ID->File of data to combine for the IDs where we couldfind data.
 */
protected Map<Long,File> prepareCombine(Set<Long> IDs){
  log.info("String_Node_Str" + getCacheDir().getName() + "String_Node_Str"+ IDs);
  Map<Long,File> returnMap=super.prepareCombine(IDs);
  Set<Long> missing=new HashSet<Long>();
  for (  Long ID : returnMap.keySet()) {
    Long cached=cdxcache.cache(ID);
    if (cached == null) {
      missing.add(ID);
    }
  }
  for (  Long ID : missing) {
    returnMap.remove(ID);
  }
  return returnMap;
}

Fixed version (ground truth):
/** 
 * Prepare data for combining.  This class overrides prepareCombine to make sure that CDX data is available.
 * @param IDs Set of IDs that will be combined.
 * @return Map of ID->File of data to combine for the IDs where we couldfind data.
 */
protected Map<Long,File> prepareCombine(Set<Long> IDs){
  log.info("String_Node_Str" + getCacheDir().getName() + "String_Node_Str"+ IDs);
  Map<Long,File> returnMap=super.prepareCombine(IDs);
  Set<Long> missing=new HashSet<Long>();
  for (  Long ID : returnMap.keySet()) {
    Long cached=cdxcache.cache(ID);
    if (cached == null) {
      missing.add(ID);
    }
  }
  log.info("String_Node_Str" + missing);
  for (  Long ID : missing) {
    returnMap.remove(ID);
  }
  return returnMap;
}
Program: 90024
Project: 90024
Buggy source:
/** 
 * Combine a number of crawl.log files into one Lucene index.  This index is placed as gzip files under the directory returned by getCacheFile().
 * @param rawfiles The map from job ID into crawl.log contents.  Nonull values are allowed in this map.
 */
protected void combine(Map<Long,File> rawfiles){
  File resultFile=getCacheFile(rawfiles.keySet());
  String indexLocation=resultFile.getAbsolutePath() + "String_Node_Str";
  try {
    String indexingMode=DigestIndexer.MODE_BOTH;
    boolean includeNormalizedURL=false;
    boolean includeTimestamp=true;
    boolean includeEtag=true;
    boolean addToExistingIndex=false;
    DigestIndexer indexer=new DigestIndexer(indexLocation,indexingMode,includeNormalizedURL,includeTimestamp,includeEtag,addToExistingIndex);
    for (    Map.Entry<Long,File> entry : rawfiles.entrySet()) {
      indexFile(entry.getKey(),entry.getValue(),indexer);
    }
    indexer.close(OPTIMIZE_INDEX);
    ZipUtils.gzipFiles(new File(indexLocation),resultFile);
  }
 catch (  IOException e) {
    throw new IOFailure("String_Node_Str" + resultFile,e);
  }
 finally {
    FileUtils.removeRecursively(new File(indexLocation));
  }
}

Fixed version (ground truth):
/** 
 * Combine a number of crawl.log files into one Lucene index.  This index is placed as gzip files under the directory returned by getCacheFile().
 * @param rawfiles The map from job ID into crawl.log contents. Nonull values are allowed in this map.
 * @param askedJobIds The set of jobIds actually needed
 */
protected void combine(Map<Long,File> rawfiles,Set<Long> askedJobIds){
  File resultFile=getCacheFile(askedJobIds);
  String indexLocation=resultFile.getAbsolutePath() + "String_Node_Str";
  try {
    String indexingMode=DigestIndexer.MODE_BOTH;
    boolean includeNormalizedURL=false;
    boolean includeTimestamp=true;
    boolean includeEtag=true;
    boolean addToExistingIndex=false;
    DigestIndexer indexer=new DigestIndexer(indexLocation,indexingMode,includeNormalizedURL,includeTimestamp,includeEtag,addToExistingIndex);
    for (    Map.Entry<Long,File> entry : rawfiles.entrySet()) {
      indexFile(entry.getKey(),entry.getValue(),indexer);
    }
    indexer.close(OPTIMIZE_INDEX);
    ZipUtils.gzipFiles(new File(indexLocation),resultFile);
  }
 catch (  IOException e) {
    throw new IOFailure("String_Node_Str" + resultFile,e);
  }
 finally {
    FileUtils.removeRecursively(new File(indexLocation));
  }
}
Program: 90025
Project: 90025
Buggy source:
public void testCombine() throws Exception {
  CDXIndexCache cache=new CDXIndexCache();
  Map<Long,File> files=new HashMap<Long,File>();
  files.put(4L,TestInfo.METADATA_FILE_4);
  files.put(3L,TestInfo.METADATA_FILE_3);
  cache.combine(files);
  File cacheFile=cache.getCacheFile(files.keySet());
  FileAsserts.assertFileNumberOfLines("String_Node_Str",cacheFile,(int)FileUtils.countLines(TestInfo.METADATA_FILE_3) + (int)FileUtils.countLines(TestInfo.METADATA_FILE_4));
  FileAsserts.assertFileContains("String_Node_Str","String_Node_Str",cacheFile);
}

Fixed version (ground truth):
public void testCombine() throws Exception {
  CDXIndexCache cache=new CDXIndexCache();
  Map<Long,File> files=new HashMap<Long,File>();
  files.put(4L,TestInfo.METADATA_FILE_4);
  files.put(3L,TestInfo.METADATA_FILE_3);
  Set<Long> requiredSet=new HashSet<Long>();
  requiredSet.add(3L);
  requiredSet.add(4L);
  cache.combine(files,requiredSet);
  File cacheFile=cache.getCacheFile(files.keySet());
  FileAsserts.assertFileNumberOfLines("String_Node_Str",cacheFile,(int)FileUtils.countLines(TestInfo.METADATA_FILE_3) + (int)FileUtils.countLines(TestInfo.METADATA_FILE_4));
  FileAsserts.assertFileContains("String_Node_Str","String_Node_Str",cacheFile);
}
Program: 90027
Project: 90027
Buggy source:
protected void combine(Map<Integer,File> filesFound){
  File resultFile=getCacheFile(filesFound.keySet());
  combined.clear();
  combined.putAll(filesFound);
  try {
    resultFile.createNewFile();
  }
 catch (  IOException e) {
    throw new IOFailure("String_Node_Str",e);
  }
}

Fixed version (ground truth):
protected void combine(Map<Integer,File> filesFound,Set<Integer> requiredSet){
  File resultFile=getCacheFile(filesFound.keySet());
  combined.clear();
  combined.putAll(filesFound);
  try {
    resultFile.createNewFile();
  }
 catch (  IOException e) {
    throw new IOFailure("String_Node_Str",e);
  }
}
Program: 90029
Project: 90029
Buggy source:
/** 
 * Creates the jmxremote.password file, based on the settings.
 * @param directory The local directory for this machine 
 */
protected void createJmxRemoteAccessFile(File directory){
  ArgumentNotValid.checkNotNull(directory,"String_Node_Str");
  File jmxFile=new File(directory,Constants.JMX_ACCESS_FILE_NAME);
  try {
    PrintWriter jw=new PrintWriter(jmxFile);
    try {
      jw.print(ScriptConstants.JMXREMOTE_ACCESS_HEADER);
      StringBuilder logins=new StringBuilder();
      logins.append(getMonitorUsername());
      jw.print(logins.toString());
    }
  finally {
      jw.close();
    }
  }
 catch (  IOException e) {
    String msg="String_Node_Str" + e;
    log.trace(msg);
    throw new IOFailure(msg);
  }
catch (  Exception e) {
    String msg="String_Node_Str" + e;
    log.trace(msg);
    System.out.println(msg);
  }
}

Fixed version (ground truth):
/** 
 * Creates the jmxremote.password file, based on the settings.
 * @param directory The local directory for this machine 
 */
protected void createJmxRemoteAccessFile(File directory){
  ArgumentNotValid.checkNotNull(directory,"String_Node_Str");
  File jmxFile=new File(directory,Constants.JMX_ACCESS_FILE_NAME);
  try {
    PrintWriter jw=new PrintWriter(jmxFile);
    try {
      jw.print(ScriptConstants.JMXREMOTE_ACCESS_HEADER);
      StringBuilder logins=new StringBuilder();
      logins.append(getMonitorUsername());
      logins.append(getHeritrixUsername());
      jw.print(logins.toString());
    }
  finally {
      jw.close();
    }
  }
 catch (  IOException e) {
    String msg="String_Node_Str" + e;
    log.trace(msg);
    throw new IOFailure(msg);
  }
catch (  Exception e) {
    String msg="String_Node_Str" + e;
    log.trace(msg);
    System.out.println(msg);
  }
}