nus-yam/ex-repair huggingface dataset:
Program: 44197
Project: 44197
Buggy source:
@Override public void parse(Element e,Context context) throws ClearCaseException {
  String name=e.getAttribute("String_Node_Str");
  String comment=e.getAttribute("String_Node_Str").length() > 0 ? e.getAttribute("String_Node_Str") : null;
  String model=e.getAttribute("String_Node_Str");
  PVob pvob=new PVob(Cool.filesep + getValue("String_Node_Str",e,context));
  String in=getValue("String_Node_Str",e,context).length() > 0 ? getValue("String_Node_Str",e,context) : null;
  List<Component> components=null;
  try {
    Element c=getFirstElement(e,"String_Node_Str");
    components=new ArrayList<Component>();
    for (    Element component : getElements(c)) {
      PVob cpvob=new PVob(Cool.filesep + getValue("String_Node_Str",component,context));
      components.add(Component.get(component.getAttribute("String_Node_Str"),cpvob));
    }
  }
 catch (  Exception e1) {
  }
  int policy=0;
  try {
    Element ps=getFirstElement(e,"String_Node_Str");
    for (    Element p : getElements(ps)) {
      policy+=Project.getPolicyValue(p.getTextContent());
    }
  }
 catch (  Exception e1) {
  }
  Project.create(name,in,pvob,policy,comment,model.length() > 0,components);
}

Fixed version (ground truth):
@Override public void parse(Element e,Context context) throws ClearCaseException {
  String name=e.getAttribute("String_Node_Str");
  String comment=e.getAttribute("String_Node_Str").length() > 0 ? e.getAttribute("String_Node_Str") : null;
  String model=e.getAttribute("String_Node_Str");
  PVob pvob=new PVob(Cool.filesep + getValue("String_Node_Str",e,context));
  String in=getValue("String_Node_Str",e,context).length() > 0 ? getValue("String_Node_Str",e,context) : null;
  List<Component> components=null;
  try {
    Element c=getFirstElement(e,"String_Node_Str");
    components=new ArrayList<Component>();
    for (    Element component : getElements(c)) {
      PVob cpvob=new PVob(Cool.filesep + getValue("String_Node_Str",component,context));
      components.add(Component.get(component.getAttribute("String_Node_Str"),cpvob));
    }
  }
 catch (  Exception e1) {
  }
  int policy=0;
  try {
    Element ps=getFirstElement(e,"String_Node_Str");
    for (    Element p : getElements(ps)) {
      policy+=Project.getPolicyValue(p.getTextContent());
    }
  }
 catch (  Exception e1) {
  }
  Project.create(name,in,pvob,policy,comment,model.length() == 0,components);
}
Program: 44199
Project: 44199
Buggy source:
/** 
 * Load the Baseline into memory from ClearCase.<br> This function is automatically called when needed by other functions.
 */
public void load() throws UCMException {
  logger.debug("String_Node_Str");
  String[] rs=context.loadBaseline(this);
  String c=(rs[1].matches("String_Node_Str") ? "String_Node_Str" : "String_Node_Str") + (rs[1].matches("String_Node_Str") ? rs[1] : rs[1] + "String_Node_Str" + this.pvob);
  logger.debug("String_Node_Str" + c);
  if (rs[2].trim().length() > 0) {
    String s=(rs[2].matches("String_Node_Str") ? "String_Node_Str" : "String_Node_Str") + (rs[2].matches("String_Node_Str") ? rs[2] : rs[2] + "String_Node_Str" + this.pvob);
    logger.debug("String_Node_Str" + s);
    this.stream=(Stream)UCMEntity.getEntity(s);
  }
 else {
    logger.warning("String_Node_Str");
  }
  this.component=(Component)UCMEntity.getEntity(c);
  this.plevel=Project.getPlevelFromString(rs[3]);
  this.user=rs[4];
  try {
    this.date=dateFormatter.parse(rs[5]);
  }
 catch (  ParseException e) {
    this.date=null;
  }
  this.labelStatus=getLabelStatusFromString(rs[6]);
  activities=new ArrayList<Activity>();
  this.loaded=true;
}

Fixed version (ground truth):
/** 
 * Load the Baseline into memory from ClearCase.<br> This function is automatically called when needed by other functions.
 */
public void load() throws UCMException {
  logger.debug("String_Node_Str");
  String[] rs=context.loadBaseline(this);
  String c=(rs[1].matches("String_Node_Str") ? "String_Node_Str" : "String_Node_Str") + (rs[1].matches("String_Node_Str") ? rs[1] : rs[1] + "String_Node_Str" + this.pvob);
  if (rs[2].trim().length() > 0) {
    String s=(rs[2].matches("String_Node_Str") ? "String_Node_Str" : "String_Node_Str") + (rs[2].matches("String_Node_Str") ? rs[2] : rs[2] + "String_Node_Str" + this.pvob);
    this.stream=(Stream)UCMEntity.getEntity(s);
  }
 else {
    logger.warning("String_Node_Str");
  }
  this.component=(Component)UCMEntity.getEntity(c);
  this.plevel=Project.getPlevelFromString(rs[3]);
  this.user=rs[4];
  try {
    this.date=dateFormatter.parse(rs[5]);
  }
 catch (  ParseException e) {
    logger.debug("String_Node_Str" + e.getMessage());
    this.date=null;
  }
  this.labelStatus=getLabelStatusFromString(rs[6]);
  activities=new ArrayList<Activity>();
  this.loaded=true;
}
Program: 44200
Project: 44200
Buggy source:
public String stringify() throws UCMException {
  if (!this.loaded) {
    load();
  }
  StringBuffer sb=new StringBuffer();
  sb.append(super.stringify());
  sb.append("String_Node_Str" + this.plevel + linesep);
  sb.append("String_Node_Str" + this.component.toString() + linesep);
  sb.append("String_Node_Str" + this.stream.toString() + linesep);
  return sb.toString();
}

Fixed version (ground truth):
public String stringify() throws UCMException {
  if (!this.loaded) {
    load();
  }
  StringBuffer sb=new StringBuffer();
  sb.append(super.stringify());
  sb.append("String_Node_Str" + this.plevel + linesep);
  sb.append("String_Node_Str" + this.component.toString() + linesep);
  sb.append("String_Node_Str" + this.stream.toString() + linesep);
  sb.append("String_Node_Str" + this.date.toString() + linesep);
  return sb.toString();
}
Program: 44201
Project: 44201
Buggy source:
/** 
 * Returns a string representation of the entity object
 * @return A String
 * @throws UCMException
 */
public String stringify() throws UCMException {
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str" + this.fqname + "String_Node_Str"+ linesep);
  sb.append("String_Node_Str" + this.shortname + linesep);
  if (!this.type.equals(ClearcaseEntityType.Version)) {
    sb.append("String_Node_Str" + this.pvob + linesep);
  }
  sb.append("String_Node_Str" + this.type + linesep);
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * Returns a string representation of the entity object
 * @return A String
 * @throws UCMException
 */
public String stringify() throws UCMException {
  StringBuffer sb=new StringBuffer();
  sb.append(this.fqname + "String_Node_Str" + linesep);
  sb.append("String_Node_Str" + this.shortname + linesep);
  if (!this.type.equals(ClearcaseEntityType.Version)) {
    sb.append("String_Node_Str" + this.pvob + linesep);
  }
  sb.append("String_Node_Str" + this.type + linesep);
  return sb.toString();
}
Program: 44204
Project: 44204
Buggy source:
public void loadStream(Stream stream) throws UCMException {
  logger.debug("String_Node_Str" + stream);
  List<String> data=null;
  String cmd="String_Node_Str" + stream;
  try {
    data=Cleartool.run(cmd).stdoutList;
  }
 catch (  AbnormalProcessTerminationException e) {
    if (e.getMessage().matches(rx_stream_load)) {
      throw new UCMException("String_Node_Str" + stream + "String_Node_Str",UCMType.LOAD_FAILED);
    }
 else {
      throw new UCMException(e.getMessage(),e.getMessage(),UCMType.LOAD_FAILED);
    }
  }
  logger.debug("String_Node_Str" + data);
  stream.setProject(UCMEntity.getProject(data.get(1)));
  try {
    stream.setDefaultTarget(UCMEntity.getStream(data.get(2)));
  }
 catch (  Exception e) {
    logger.debug("String_Node_Str");
  }
  if (data.get(3).length() > 0) {
    stream.setReadOnly(true);
  }
 else {
    stream.setReadOnly(false);
  }
  try {
    stream.setFoundationBaseline(UCMEntity.getBaseline(data.get(4)));
  }
 catch (  Exception e) {
    logger.warning("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
public void loadStream(Stream stream) throws UCMException {
  logger.debug("String_Node_Str" + stream);
  List<String> data=null;
  String cmd="String_Node_Str" + stream;
  try {
    data=Cleartool.run(cmd).stdoutList;
  }
 catch (  AbnormalProcessTerminationException e) {
    if (e.getMessage().matches(rx_stream_load)) {
      throw new UCMException("String_Node_Str" + stream + "String_Node_Str",UCMType.LOAD_FAILED);
    }
 else {
      throw new UCMException(e.getMessage(),e.getMessage(),UCMType.LOAD_FAILED);
    }
  }
  logger.debug("String_Node_Str" + data);
  stream.setProject(UCMEntity.getProject(data.get(1)));
  if (!data.get(2).trim().equals("String_Node_Str")) {
    try {
      stream.setDefaultTarget(UCMEntity.getStream(data.get(2)));
    }
 catch (    Exception e) {
      logger.debug("String_Node_Str");
    }
  }
  if (data.get(3).length() > 0) {
    stream.setReadOnly(true);
  }
 else {
    stream.setReadOnly(false);
  }
  try {
    stream.setFoundationBaseline(UCMEntity.getBaseline(data.get(4)));
  }
 catch (  Exception e) {
    logger.warning("String_Node_Str" + e.getMessage());
  }
}
Program: 44205
Project: 44205
Buggy source:
public void setOldVersion(boolean old){
  this.oldVersion=old;
}

Fixed version (ground truth):
@Deprecated public void setOldVersion(boolean old){
  this.oldVersion=old;
}
Program: 44206
Project: 44206
Buggy source:
void postProcess(){
  logger.trace_function();
  String fqname=this.fqname.matches("String_Node_Str") ? this.fqname : System.getProperty("String_Node_Str") + filesep + this.fqname;
  this.fqname=fqname;
  Matcher m=p_revision.matcher(this.fqname);
  if (m.find()) {
    this.revision=m.group(1);
  }
 else {
    this.revision="String_Node_Str";
  }
  String tmp=this.fqname;
  tmp=tmp.replaceFirst("String_Node_Str","String_Node_Str");
  tmp=tmp.replaceFirst("String_Node_Str","String_Node_Str");
  this.file=tmp;
  this.version=new File(tmp);
}

Fixed version (ground truth):
void postProcess(){
  logger.trace_function();
  String fqname=this.fqname.matches("String_Node_Str") ? this.fqname : System.getProperty("String_Node_Str") + filesep + this.fqname;
  this.fqname=fqname;
  Matcher m=p_revision.matcher(this.fqname);
  if (m.find()) {
    this.revision=m.group(1);
  }
 else {
    this.revision="String_Node_Str";
  }
  String tmp=this.fqname;
  tmp=tmp.replaceFirst("String_Node_Str","String_Node_Str");
  tmp=tmp.replaceFirst("String_Node_Str","String_Node_Str");
  this.file=tmp;
  Matcher ma=rx_findAddedElements.matcher(revision);
  while (ma.find()) {
    this.file+=filesep + ma.group(2);
  }
  this.version=new File(tmp);
}
Program: 44207
Project: 44207
Buggy source:
public boolean isOldVersion(){
  return oldVersion;
}

Fixed version (ground truth):
@Deprecated public boolean isOldVersion(){
  return oldVersion;
}
Program: 44208
Project: 44208
Buggy source:
public List<Activity> getBaselineDiff(Diffable d1,Diffable d2,boolean merge,File viewContext) throws UCMException {
  return parseActivityStrings(strategy.getBaselineDiff(d1,d2,merge,viewContext),viewContext.getAbsoluteFile().toString().length());
}

Fixed version (ground truth):
public List<Activity> getBaselineDiff(Diffable d1,Diffable d2,boolean merge,File viewContext) throws UCMException {
  List<String> lines=strategy.getBaselineDiff(d1,d2,merge,viewContext);
  return parseActivityStrings(lines,viewContext.getAbsoluteFile().toString().length());
}
Program: 44210
Project: 44210
Buggy source:
public void loadVersion(Version version) throws UCMException {
  try {
    String cmd="String_Node_Str" + version.getFullyQualifiedName() + "String_Node_Str";
    List<String> list=Cleartool.run(cmd).stdoutList;
    logger.debug("String_Node_Str" + list);
    version.setUser(list.get(0));
    logger.debug("String_Node_Str" + list.get(0));
    String vn=list.get(1);
    String ven=list.get(2);
    Matcher m=rx_extendedName.matcher(ven);
    logger.debug("String_Node_Str" + ven);
    if (m.find() && m.group(2) != null) {
      try {
        logger.debug("String_Node_Str" + m.group(0));
        logger.debug("String_Node_Str" + m.group(1));
        logger.debug("String_Node_Str" + m.group(2));
        logger.debug("String_Node_Str" + m.group(3));
        logger.debug("String_Node_Str" + m.group(4));
      }
 catch (      Exception e) {
      }
      version.setOldVersion(true);
      Matcher m2=rx_getFilename.matcher(m.group(2));
      String filename="String_Node_Str";
      if (m2.find()) {
        filename=m.group(1) + m2.group(1);
      }
 else {
        throw new UCMException("String_Node_Str");
      }
      version.setVersion(new File(filename));
      logger.debug("String_Node_Str" + filename);
    }
  }
 catch (  Exception e) {
    throw new UCMException("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
public void loadVersion(Version version) throws UCMException {
  try {
    String cmd="String_Node_Str" + version.getFullyQualifiedName() + "String_Node_Str";
    List<String> list=Cleartool.run(cmd).stdoutList;
    logger.debug("String_Node_Str" + list);
    version.setUser(list.get(0));
    logger.debug("String_Node_Str" + list.get(0));
    String vn=list.get(1);
    String ven=list.get(2);
    Matcher m=rx_extendedName.matcher(ven);
    logger.debug("String_Node_Str" + ven);
  }
 catch (  Exception e) {
    throw new UCMException("String_Node_Str" + e.getMessage());
  }
}
Program: 44211
Project: 44211
Buggy source:
public static PVob create(String name,String path,String comment) throws UCMException {
  context.createVob(name,true,path,comment);
  PVob pvob=new PVob(name);
  pvob.storageLocation=path;
  return pvob;
}

Fixed version (ground truth):
public static PVob create(String name,String path,String comment) throws UCMException {
  context.createVob(name,true,path,comment);
  System.out.println("String_Node_Str" + name);
  PVob pvob=new PVob(name);
  pvob.storageLocation=path;
  return pvob;
}
Program: 44212
Project: 44212
Buggy source:
public String getStorageLocation(){
  return this.storageLocation;
}

Fixed version (ground truth):
public String getStorageLocation() throws UCMException {
  if (storageLocation == null) {
    load();
  }
  return this.storageLocation;
}
Program: 44213
Project: 44213
Buggy source:
public void createVob(String vobname,boolean UCMProject,String path,String comment) throws UCMException {
  String cmd="String_Node_Str" + vobname + (UCMProject ? "String_Node_Str" : "String_Node_Str")+ (comment != null ? "String_Node_Str" + comment : "String_Node_Str")+ "String_Node_Str"+ (path != null ? path : "String_Node_Str");
  try {
    Cleartool.run(cmd);
  }
 catch (  Exception e) {
    throw new UCMException(e.getMessage(),UCMType.CREATION_FAILED);
  }
}

Fixed version (ground truth):
public void createVob(String vobname,boolean UCMProject,String path,String comment) throws UCMException {
  logger.info("String_Node_Str" + vobname);
  String cmd="String_Node_Str" + vobname + (UCMProject ? "String_Node_Str" : "String_Node_Str")+ (comment != null ? "String_Node_Str" + comment + "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ (path != null ? path : "String_Node_Str");
  try {
    Cleartool.run(cmd);
  }
 catch (  Exception e) {
    throw new UCMException(e.getMessage(),UCMType.CREATION_FAILED);
  }
}
Program: 44214
Project: 44214
Buggy source:
public Map<String,String> loadVob(Vob vob) throws UCMException {
  String cmd="String_Node_Str" + vob;
  Map<String,String> a=new HashMap<String,String>();
  try {
    CmdResult r=Cleartool.run(cmd);
    for (    String s : r.stdoutList) {
      if (s.contains("String_Node_Str")) {
        Matcher m=rx_vob_get_path.matcher(s);
        if (m.find()) {
          a.put("String_Node_Str",m.group(1));
        }
      }
    }
  }
 catch (  Exception e) {
    throw new UCMException("String_Node_Str" + e.getMessage());
  }
  return a;
}

Fixed version (ground truth):
public Map<String,String> loadVob(Vob vob) throws UCMException {
  logger.info("String_Node_Str" + vob);
  String cmd="String_Node_Str" + vob;
  Map<String,String> a=new HashMap<String,String>();
  try {
    CmdResult r=Cleartool.run(cmd);
    for (    String s : r.stdoutList) {
      if (s.contains("String_Node_Str")) {
        Matcher m=rx_vob_get_path.matcher(s);
        if (m.find()) {
          a.put("String_Node_Str",m.group(1));
        }
      }
    }
  }
 catch (  Exception e) {
    throw new UCMException("String_Node_Str" + e.getMessage());
  }
  return a;
}
Program: 44215
Project: 44215
Buggy source:
public void createComponent(String name,PVob pvob,String root,String comment) throws UCMException {
  String cmd="String_Node_Str" + (comment != null ? "String_Node_Str" + comment : "String_Node_Str") + (root != null ? "String_Node_Str" + root : "String_Node_Str")+ "String_Node_Str"+ name+ "String_Node_Str"+ pvob;
  try {
    Cleartool.run(cmd);
  }
 catch (  Exception e) {
    throw new UCMException(e.getMessage(),UCMType.CREATION_FAILED);
  }
}

Fixed version (ground truth):
public void createComponent(String name,PVob pvob,String root,String comment) throws UCMException {
  String cmd="String_Node_Str" + (comment != null ? "String_Node_Str" + comment + "String_Node_Str" : "String_Node_Str") + (root != null ? "String_Node_Str" + root : "String_Node_Str")+ "String_Node_Str"+ name+ "String_Node_Str"+ pvob;
  try {
    Cleartool.run(cmd);
  }
 catch (  Exception e) {
    throw new UCMException(e.getMessage(),UCMType.CREATION_FAILED);
  }
}
Program: 44216
Project: 44216
Buggy source:
public void createView(String tag,String path,boolean snapshotView) throws UCMException {
  String cmd="String_Node_Str" + tag + (snapshotView ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ (path != null ? path : "String_Node_Str");
  try {
    Cleartool.run(cmd);
  }
 catch (  Exception e) {
    throw new UCMException(e.getMessage(),UCMType.CREATION_FAILED);
  }
}

Fixed version (ground truth):
public void createView(String tag,String path,boolean snapshotView) throws UCMException {
  logger.info("String_Node_Str" + tag);
  String cmd="String_Node_Str" + tag + (snapshotView ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ (path != null ? path : "String_Node_Str");
  try {
    Cleartool.run(cmd);
  }
 catch (  Exception e) {
    throw new UCMException(e.getMessage(),UCMType.CREATION_FAILED);
  }
}
Program: 44217
Project: 44217
Buggy source:
public void mountVob(Vob vob) throws UCMException {
  String cmd="String_Node_Str" + vob;
  try {
    Cleartool.run(cmd);
  }
 catch (  Exception e) {
    throw new UCMException("String_Node_Str" + vob + "String_Node_Str"+ e.getMessage());
  }
}

Fixed version (ground truth):
public void mountVob(Vob vob) throws UCMException {
  logger.info("String_Node_Str" + vob);
  String cmd="String_Node_Str" + vob;
  try {
    Cleartool.run(cmd);
  }
 catch (  Exception e) {
    throw new UCMException("String_Node_Str" + vob + "String_Node_Str"+ e.getMessage());
  }
}
Program: 44218
Project: 44218
Buggy source:
public static void main(String[] args) throws UCMException {
  PVob pvob=PVob.create("String_Node_Str",null,"String_Node_Str");
  Vob vob=Vob.create("String_Node_Str",null,"String_Node_Str");
  vob.load();
  System.out.println("String_Node_Str" + vob.getStorageLocation());
  vob.mount();
  Component c=Component.create("String_Node_Str",pvob,null,"String_Node_Str");
  System.out.println("String_Node_Str" + c);
  DynamicView view=DynamicView.create("String_Node_Str",null);
}

Fixed version (ground truth):
public static void main(String[] args) throws UCMException {
  UCM.setContext(UCM.ContextType.CLEARTOOL);
  Logger logger=PraqmaLogger.getLogger(false);
  logger.subscribeAll();
  logger.setLocalLog(new File("String_Node_Str"));
  Cool.setLogger(logger);
  PVob pvob=PVob.create("String_Node_Str",null,"String_Node_Str");
  Vob vob=Vob.create("String_Node_Str",null,"String_Node_Str");
  vob.load();
  System.out.println("String_Node_Str" + vob.getStorageLocation());
  vob.mount();
  Component c=Component.create("String_Node_Str",pvob,null,"String_Node_Str");
  System.out.println("String_Node_Str" + c);
  DynamicView view=DynamicView.create("String_Node_Str",null);
}
Program: 44219
Project: 44219
Buggy source:
@Override public OperatingSystem getOS(){
  return null;
}

Fixed version (ground truth):
@Override public CommandLineInterface.OperatingSystem getOS(){
  return null;
}
Program: 44220
Project: 44220
Buggy source:
public void RegenerateViewDotDat(File dir,String viewtag) throws UCMException {
  logger.trace_function();
  logger.debug(dir + "String_Node_Str" + viewtag);
  File viewdat=new File(dir + File.separator + "String_Node_Str");
  if (viewdat.exists()) {
    throw new UCMException("String_Node_Str");
  }
  String cmd="String_Node_Str" + viewtag;
  String result=Cleartool.run(cmd).stdoutBuffer.toString();
  Matcher match=pattern_view_uuid.matcher(result);
  if (!match.find()) {
    logger.warning("String_Node_Str" + viewtag + "String_Node_Str");
    throw new UCMException("String_Node_Str" + viewtag + "String_Node_Str");
  }
  String uuid=match.group(1);
  cmd="String_Node_Str" + uuid;
  try {
    Cleartool.run(cmd);
  }
 catch (  AbnormalProcessTerminationException e) {
    throw new UCMException("String_Node_Str" + uuid + "String_Node_Str"+ viewtag);
  }
  if (dir.exists()) {
    logger.warning("String_Node_Str" + dir + "String_Node_Str");
  }
 else {
    dir.mkdirs();
  }
  try {
    FileOutputStream fos=new FileOutputStream(viewdat);
    fos.write(("String_Node_Str" + uuid).getBytes());
    fos.close();
  }
 catch (  IOException e) {
    throw new UCMException("String_Node_Str",UCMType.VIEW_ERROR);
  }
  cmd="String_Node_Str" + viewdat;
  Command.run(cmd);
}

Fixed version (ground truth):
public void RegenerateViewDotDat(File dir,String viewtag) throws UCMException {
  logger.trace_function();
  logger.debug(dir + "String_Node_Str" + viewtag);
  File viewdat=new File(dir + File.separator + "String_Node_Str");
  if (viewdat.exists()) {
    throw new UCMException("String_Node_Str");
  }
  String cmd="String_Node_Str" + viewtag;
  String result=Cleartool.run(cmd).stdoutBuffer.toString();
  System.out.println(result);
  Matcher match=pattern_view_uuid.matcher(result);
  if (!match.find()) {
    logger.warning("String_Node_Str" + viewtag + "String_Node_Str");
    throw new UCMException("String_Node_Str" + viewtag + "String_Node_Str");
  }
  String uuid=match.group(1);
  cmd="String_Node_Str" + uuid;
  try {
    Cleartool.run(cmd);
  }
 catch (  AbnormalProcessTerminationException e) {
    throw new UCMException("String_Node_Str" + uuid + "String_Node_Str"+ viewtag);
  }
  if (dir.exists()) {
    logger.warning("String_Node_Str" + dir + "String_Node_Str");
  }
 else {
    dir.mkdirs();
  }
  try {
    FileOutputStream fos=new FileOutputStream(viewdat);
    fos.write(("String_Node_Str" + uuid).getBytes());
    fos.close();
  }
 catch (  IOException e) {
    throw new UCMException("String_Node_Str",UCMType.VIEW_ERROR);
  }
  if (!viewdat.setReadOnly()) {
    logger.warning("String_Node_Str");
    throw new UCMException("String_Node_Str");
  }
}
Program: 44221
Project: 44221
Buggy source:
public List<HyperLink> getHlinks(UCMEntity entity,String hlinkType,File dir) throws UCMException {
  List<Tuple<String,String>> result=strategy.getHlinks(entity.GetFQName(),hlinkType,dir);
  List<HyperLink> hlinks=new ArrayList<HyperLink>();
  for (  Tuple<String,String> t : result) {
    HyperLink h=HyperLink.getHyperLink(t.t1,t.t2);
    hlinks.add(h);
  }
  return hlinks;
}

Fixed version (ground truth):
public List<HyperLink> getHlinks(UCMEntity entity,String hlinkType,File dir) throws UCMException {
  logger.debug("String_Node_Str" + entity.GetFQName());
  List<Tuple<String,String>> result=strategy.getHlinks(entity.GetFQName(),hlinkType,dir);
  List<HyperLink> hlinks=new ArrayList<HyperLink>();
  for (  Tuple<String,String> t : result) {
    HyperLink h=HyperLink.getHyperLink(t.t1,t.t2);
    hlinks.add(h);
  }
  return hlinks;
}
Program: 44222
Project: 44222
Buggy source:
public static int stampFromComponent(Component component,File dir,String major,String minor,String patch,String sequence,boolean ignoreErrors) throws UCMException {
  List<HyperLink> result=component.getHlinks(__BUILD_NUMBER_FILE,dir);
  if (result.size() == 0) {
    throw new UCMException("String_Node_Str");
  }
  int number=0;
  for (  HyperLink h : result) {
    String f=h.getValue().replaceFirst("String_Node_Str","String_Node_Str");
    File stampee=new File(f);
    try {
      number+=BuildNumber.stampIntoCode(stampee,major,minor,patch,sequence);
    }
 catch (    UCMException e) {
      if (!ignoreErrors) {
        throw e;
      }
    }
  }
  return number;
}

Fixed version (ground truth):
public static int stampFromComponent(Component component,File dir,String major,String minor,String patch,String sequence,boolean ignoreErrors) throws UCMException {
  List<HyperLink> result=component.getHlinks(__BUILD_NUMBER_FILE,dir);
  int number=0;
  for (  HyperLink h : result) {
    String f=h.getValue().replaceFirst("String_Node_Str","String_Node_Str");
    File stampee=new File(f);
    try {
      number+=BuildNumber.stampIntoCode(stampee,major,minor,patch,sequence);
    }
 catch (    UCMException e) {
      if (!ignoreErrors) {
        throw e;
      }
    }
  }
  return number;
}
Program: 44223
Project: 44223
Buggy source:
public ArrayList<Activity> GetBaselineDiff(SnapshotView view,Baseline baseline,Baseline other,boolean nmerge) throws UCMException {
  logger.debug("String_Node_Str");
  logger.log(view.GetViewtag());
  System.out.println("String_Node_Str");
  loggerj.debug("String_Node_Str");
  List<String> result=strategy.GetBaselineDiff(view.GetViewRoot(),baseline.GetFQName(),"String_Node_Str",nmerge,baseline.GetPvob());
  ArrayList<Activity> activities=new ArrayList<Activity>();
  int length=view.GetViewRoot().getAbsoluteFile().toString().length();
  System.out.println(view.GetViewRoot().getAbsoluteFile().toString());
  Activity current=null;
  for (  String s : result) {
    Matcher match=pattern_activity.matcher(s);
    if (match.find()) {
      current=UCMEntity.GetActivity(match.group(1),true);
      logger.debug("String_Node_Str" + current.GetShortname());
      System.out.println("String_Node_Str" + current.GetShortname());
      if (current.GetShortname().equals("String_Node_Str")) {
        logger.debug("String_Node_Str");
        current.SetSpecialCase(true);
      }
      activities.add(current);
      continue;
    }
    if (current == null) {
      logger.debug("String_Node_Str" + s);
      continue;
    }
    String f=s.trim();
    Version v=(Version)UCMEntity.GetEntity(f);
    v.SetSFile(v.GetFile().substring(length));
    current.changeset.versions.add(v);
  }
  return activities;
}

Fixed version (ground truth):
public ArrayList<Activity> GetBaselineDiff(SnapshotView view,Baseline baseline,Baseline other,boolean nmerge) throws UCMException {
  logger.log(view.GetViewtag());
  List<String> result=strategy.GetBaselineDiff(view.GetViewRoot(),baseline.GetFQName(),"String_Node_Str",nmerge,baseline.GetPvob());
  ArrayList<Activity> activities=new ArrayList<Activity>();
  int length=view.GetViewRoot().getAbsoluteFile().toString().length();
  System.out.println(view.GetViewRoot().getAbsoluteFile().toString());
  Activity current=null;
  for (  String s : result) {
    Matcher match=pattern_activity.matcher(s);
    if (match.find()) {
      current=UCMEntity.GetActivity(match.group(1),true);
      if (current.GetShortname().equals("String_Node_Str")) {
        logger.debug("String_Node_Str");
        current.SetSpecialCase(true);
      }
      activities.add(current);
      continue;
    }
    if (current == null) {
      logger.debug("String_Node_Str" + s);
      continue;
    }
    String f=s.trim();
    Version v=(Version)UCMEntity.GetEntity(f);
    v.SetSFile(v.GetFile().substring(length));
    current.changeset.versions.add(v);
  }
  return activities;
}
Program: 44224
Project: 44224
Buggy source:
public Map SwipeView(File viewroot,boolean excludeRoot){
  loggerj.debug("String_Node_Str");
  return strategy.SwipeView(viewroot,excludeRoot);
}

Fixed version (ground truth):
public Map SwipeView(File viewroot,boolean excludeRoot){
  return strategy.SwipeView(viewroot,excludeRoot);
}
Program: 44225
Project: 44225
Buggy source:
public void run(){
  try {
    InputStreamReader isr=new InputStreamReader(is);
    BufferedReader br=new BufferedReader(isr);
    String line=null;
    while ((line=br.readLine()) != null) {
      lres.add(line);
    }
    for (int i=0; i < lres.size() - 1; ++i) {
      sres.append(lres.get(i) + linesep);
    }
    sres.append(lres.get(lres.size() - 1));
synchronized (this) {
      notifyAll();
    }
  }
 catch (  IOException ioe) {
    ioe.printStackTrace();
  }
}

Fixed version (ground truth):
public void run(){
  try {
    InputStreamReader isr=new InputStreamReader(is);
    BufferedReader br=new BufferedReader(isr);
    String line=null;
    while ((line=br.readLine()) != null) {
      lres.add(line);
    }
    for (int i=0; i < lres.size() - 1; ++i) {
      sres.append(lres.get(i) + linesep);
    }
    if (lres.size() > 0) {
      sres.append(lres.get(lres.size() - 1));
    }
synchronized (this) {
      notifyAll();
    }
  }
 catch (  IOException ioe) {
    ioe.printStackTrace();
  }
}
Program: 44226
Project: 44226
Buggy source:
public void LoadActivity(Activity activity){
  String result=strategy.LoadActivity(activity.GetFQName());
  activity.SetUser(result);
}

Fixed version (ground truth):
public void LoadActivity(Activity activity){
  String result="String_Node_Str";
  if (activity.GetSpecialCase()) {
    result="String_Node_Str";
  }
 else {
    result=strategy.LoadActivity(activity.GetFQName());
  }
  activity.SetUser(result);
}
Program: 44227
Project: 44227
Buggy source:
public ArrayList<Activity> GetBaselineDiff(SnapshotView view,Baseline baseline,Baseline other,boolean nmerge) throws UCMException {
  List<String> result=strategy.GetBaselineDiff(view.GetViewRoot(),baseline.GetFQName(),"String_Node_Str",nmerge,baseline.GetPvob());
  ArrayList<Activity> activities=new ArrayList<Activity>();
  int length=view.GetViewRoot().getAbsoluteFile().toString().length();
  System.out.println(view.GetViewRoot().getAbsoluteFile().toString());
  Activity current=null;
  for (  String s : result) {
    Matcher match=pattern_activity.matcher(s);
    if (match.find()) {
      current=UCMEntity.GetActivity(match.group(1),true);
      activities.add(current);
      continue;
    }
    if (current == null) {
      logger.debug("String_Node_Str" + s);
      continue;
    }
    String f=s.trim();
    Version v=(Version)UCMEntity.GetEntity(f);
    v.SetSFile(v.GetFile().substring(length));
    current.changeset.versions.add(v);
  }
  return activities;
}

Fixed version (ground truth):
public ArrayList<Activity> GetBaselineDiff(SnapshotView view,Baseline baseline,Baseline other,boolean nmerge) throws UCMException {
  List<String> result=strategy.GetBaselineDiff(view.GetViewRoot(),baseline.GetFQName(),"String_Node_Str",nmerge,baseline.GetPvob());
  ArrayList<Activity> activities=new ArrayList<Activity>();
  int length=view.GetViewRoot().getAbsoluteFile().toString().length();
  System.out.println(view.GetViewRoot().getAbsoluteFile().toString());
  Activity current=null;
  for (  String s : result) {
    Matcher match=pattern_activity.matcher(s);
    if (match.find()) {
      current=UCMEntity.GetActivity(match.group(1),true);
      if (current.GetShortname().equals("String_Node_Str")) {
        current.SetSpecialCase(true);
      }
      activities.add(current);
      continue;
    }
    if (current == null) {
      logger.debug("String_Node_Str" + s);
      continue;
    }
    String f=s.trim();
    Version v=(Version)UCMEntity.GetEntity(f);
    v.SetSFile(v.GetFile().substring(length));
    current.changeset.versions.add(v);
  }
  return activities;
}
Program: 44228
Project: 44228
Buggy source:
@Override public List<Tuple<String,String>> GetTags(String fqname){
  logger.trace_function();
  logger.debug(fqname);
  String cmd="String_Node_Str" + __TAG_NAME + "String_Node_Str"+ fqname;
  CmdResult res=null;
  try {
    res=Cleartool.run(cmd);
  }
 catch (  AbnormalProcessTerminationException e) {
    Matcher match=pattern_tag_missing.matcher(res.errorBuffer);
    if (match.find()) {
      throw new UCMException("String_Node_Str" + match.group(1) + "String_Node_Str",UCMType.UNKNOWN_TAG);
    }
    throw e;
  }
  List<String> list=res.stdoutList;
  List<Tuple<String,String>> tags=new ArrayList<Tuple<String,String>>();
  if (list.size() > 2) {
    for (int i=2; i < list.size(); i++) {
      logger.debug("String_Node_Str" + i + "String_Node_Str"+ list.get(i));
      Matcher match=pattern_tags.matcher(list.get(i));
      if (match.find()) {
        tags.add(new Tuple<String,String>(match.group(1),match.group(2)));
      }
    }
  }
  return tags;
}

Fixed version (ground truth):
@Override public List<Tuple<String,String>> GetTags(String fqname){
  logger.trace_function();
  logger.debug(fqname);
  String cmd="String_Node_Str" + __TAG_NAME + "String_Node_Str"+ fqname;
  CmdResult res=null;
  try {
    res=Cleartool.run(cmd);
  }
 catch (  AbnormalProcessTerminationException e) {
    Matcher match=pattern_tag_missing.matcher(e.getMessage());
    if (match.find()) {
      throw new UCMException("String_Node_Str" + match.group(1) + "String_Node_Str",UCMType.UNKNOWN_TAG);
    }
    throw e;
  }
  List<String> list=res.stdoutList;
  List<Tuple<String,String>> tags=new ArrayList<Tuple<String,String>>();
  if (list.size() > 2) {
    for (int i=2; i < list.size(); i++) {
      logger.debug("String_Node_Str" + i + "String_Node_Str"+ list.get(i));
      Matcher match=pattern_tags.matcher(list.get(i));
      if (match.find()) {
        tags.add(new Tuple<String,String>(match.group(1),match.group(2)));
      }
    }
  }
  return tags;
}
Program: 44229
Project: 44229
Buggy source:
@Override public String NewTag(UCMEntity entity,String cgi){
  logger.trace_function();
  logger.debug(entity.GetFQName());
  String cmd="String_Node_Str" + cgi + "String_Node_Str"+ __TAG_NAME+ "String_Node_Str"+ entity.GetFQName();
  CmdResult res=null;
  try {
    res=Cleartool.run(cmd);
  }
 catch (  AbnormalProcessTerminationException e) {
    Matcher match=pattern_tag_missing.matcher(res.errorBuffer.toString());
    if (match.find()) {
      throw new UCMException("String_Node_Str" + match.group(1) + "String_Node_Str",UCMType.UNKNOWN_TAG);
    }
    throw e;
  }
  String tag=res.stdoutBuffer.toString();
  Matcher match=pattern_remove_verbose_tag.matcher(tag);
  if (!match.find()) {
    throw new UCMException("String_Node_Str",UCMType.TAG_CREATION_FAILED);
  }
  return match.group(1);
}

Fixed version (ground truth):
@Override public String NewTag(UCMEntity entity,String cgi){
  logger.trace_function();
  logger.debug(entity.GetFQName());
  String cmd="String_Node_Str" + cgi + "String_Node_Str"+ __TAG_NAME+ "String_Node_Str"+ entity.GetFQName();
  CmdResult res=null;
  try {
    res=Cleartool.run(cmd);
  }
 catch (  AbnormalProcessTerminationException e) {
    Matcher match=pattern_tag_missing.matcher(e.getMessage());
    if (match.find()) {
      throw new UCMException("String_Node_Str" + match.group(1) + "String_Node_Str",UCMType.UNKNOWN_TAG);
    }
    throw e;
  }
  String tag=res.stdoutBuffer.toString();
  Matcher match=pattern_remove_verbose_tag.matcher(tag);
  if (!match.find()) {
    throw new UCMException("String_Node_Str",UCMType.TAG_CREATION_FAILED);
  }
  return match.group(1);
}
Program: 44231
Project: 44231
Buggy source:
public static void main(String[] args){
  UCM.SetContext(UCM.ContextType.CLEARTOOL);
  String id=Calendar.getInstance().getTime().toString();
  String comp="String_Node_Str";
  String stre="String_Node_Str" + id + "String_Node_Str";
  String intstre="String_Node_Str";
  File root=new File("String_Node_Str");
  String tag="String_Node_Str" + id;
  if (args.length > 0) {
    comp=args[0];
    System.out.println("String_Node_Str" + comp);
  }
  if (args.length > 1) {
    stre=args[1];
    System.out.println("String_Node_Str" + stre);
  }
  if (args.length > 2) {
    intstre=args[1];
    System.out.println("String_Node_Str" + intstre);
  }
  if (args.length > 3) {
    tag=args[3];
    System.out.println("String_Node_Str" + tag);
  }
  root=new File(root,tag);
  root.mkdir();
  Stream integrationStream=UCMEntity.GetStream(intstre);
  Component co1=UCMEntity.GetComponent(comp);
  BaselineList bls=co1.GetBaselines(integrationStream,Project.Plevel.INITIAL);
  List<Baseline> rec_bls=integrationStream.GetRecommendedBaselines();
  Baseline bl=rec_bls.get(0);
  Stream developmentStream=Stream.Create(integrationStream,stre,false,bl);
  SnapshotView view=SnapshotView.Create(developmentStream,root,tag);
  developmentStream.Rebase(view,bl,true);
}

Fixed version (ground truth):
public static void main(String[] args){
  UCM.SetContext(UCM.ContextType.CLEARTOOL);
  String id=Calendar.getInstance().getTime().getTime() + "String_Node_Str";
  String comp="String_Node_Str";
  String stre="String_Node_Str" + id + "String_Node_Str";
  String intstre="String_Node_Str";
  File root=new File("String_Node_Str");
  String tag="String_Node_Str" + id;
  if (args.length > 0) {
    comp=args[0];
    System.out.println("String_Node_Str" + comp);
  }
  if (args.length > 1) {
    stre=args[1];
    System.out.println("String_Node_Str" + stre);
  }
  if (args.length > 2) {
    intstre=args[1];
    System.out.println("String_Node_Str" + intstre);
  }
  if (args.length > 3) {
    tag=args[3];
    System.out.println("String_Node_Str" + tag);
  }
  root=new File(root,tag);
  root.mkdir();
  Stream integrationStream=UCMEntity.GetStream(intstre);
  Component co1=UCMEntity.GetComponent(comp);
  BaselineList bls=co1.GetBaselines(integrationStream,Project.Plevel.INITIAL);
  List<Baseline> rec_bls=integrationStream.GetRecommendedBaselines();
  Baseline bl=rec_bls.get(0);
  Stream developmentStream=Stream.Create(integrationStream,stre,false,bl);
  SnapshotView view=SnapshotView.Create(developmentStream,root,tag);
  developmentStream.Rebase(view,bl,true);
}
Program: 44232
Project: 44232
Buggy source:
public boolean RebaseStream(String viewtag,String stream,String baseline,boolean complete){
  logger.debug("String_Node_Str" + viewtag);
  String cmd="String_Node_Str" + (complete ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ viewtag+ "String_Node_Str"+ stream+ "String_Node_Str"+ baseline;
  CmdResult res=Cleartool.run(cmd);
  System.out.println("String_Node_Str" + res.errorBuffer.toString());
  System.out.println("String_Node_Str" + res.stdoutBuffer.toString());
  if (res.errorBuffer.toString().matches("String_Node_Str")) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean RebaseStream(String viewtag,String stream,String baseline,boolean complete){
  logger.debug("String_Node_Str" + viewtag);
  String cmd="String_Node_Str" + (complete ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ viewtag+ "String_Node_Str"+ stream+ "String_Node_Str"+ baseline;
  CmdResult res=Cleartool.run(cmd);
  System.out.println("String_Node_Str" + res.errorBuffer.toString());
  System.out.println("String_Node_Str" + res.stdoutBuffer.toString());
  if (res.stdoutBuffer.toString().matches("String_Node_Str")) {
    return false;
  }
  return true;
}
Program: 44233
Project: 44233
Buggy source:
public static CmdResult run(String cmd) throws CommandLineException, AbnormalProcessTerminationException {
  return Command.run("String_Node_Str" + cmd);
}

Fixed version (ground truth):
public static CmdResult run(String cmd,File dir) throws CommandLineException, AbnormalProcessTerminationException {
  return Command.run("String_Node_Str" + cmd,dir);
}
Program: 44235
Project: 44235
Buggy source:
@Override public List<String> GetBaselineDiff(File dir,String baseline,String other,boolean nmerge){
  CheckViewContext(dir);
  String cmd="String_Node_Str" + baseline;
  try {
    return Cleartool.run(cmd,dir).stdoutList;
  }
 catch (  AbnormalProcessTerminationException e) {
    if (e.getMessage().equalsIgnoreCase("String_Node_Str")) {
      logger.log("String_Node_Str" + baseline + "String_Node_Str");
      List<String> result=new ArrayList<String>();
      List<String> vobs=ListVobs(dir);
      for (      String vob : vobs) {
        List<String> files=Cleartool.run("String_Node_Str" + vob,dir).stdoutList;
        for (int i=0; i < files.size(); i++) {
          if (!files.get(i).matches("String_Node_Str")) {
            result.add(files.get(i));
          }
        }
      }
      return result;
    }
    throw e;
  }
}

Fixed version (ground truth):
@Override public List<String> GetBaselineDiff(File dir,String baseline,String other,boolean nmerge){
}
Program: 44236
Project: 44236
Buggy source:
private static void NewDate(Calendar n){
  nowDate=n;
  File file=null;
  if (fw != null) {
    try {
      fw.close();
      out.close();
    }
 catch (    IOException e) {
      System.err.println("String_Node_Str");
    }
  }
  try {
    file=new File(path + "String_Node_Str" + logformat.format(nowDate.getTime())+ "String_Node_Str");
    fw=new FileWriter(file,append);
  }
 catch (  IOException e) {
    System.err.println("String_Node_Str" + path + "String_Node_Str");
    path="String_Node_Str";
    try {
      file=new File(path + "String_Node_Str" + logformat.format(nowDate.getTime())+ "String_Node_Str");
      fw=new FileWriter(file,append);
    }
 catch (    IOException e1) {
      System.err.println("String_Node_Str");
      System.exit(1);
    }
  }
  System.out.println("String_Node_Str" + file.getAbsolutePath());
  out=new BufferedWriter(fw);
}

Fixed version (ground truth):
private static void NewDate(Calendar n){
  nowDate=n;
  File file=null;
  if (fw != null) {
    try {
      fw.close();
      out.close();
    }
 catch (    IOException e) {
      System.err.println("String_Node_Str");
    }
  }
  try {
    file=new File(path + "String_Node_Str" + logformat.format(nowDate.getTime())+ "String_Node_Str");
    fw=new FileWriter(file,append);
  }
 catch (  IOException e) {
    System.err.println("String_Node_Str" + path + "String_Node_Str");
    try {
      file=new File("String_Node_Str" + logformat.format(nowDate.getTime()) + "String_Node_Str");
      fw=new FileWriter(file,append);
    }
 catch (    IOException e1) {
      System.err.println("String_Node_Str");
      System.exit(1);
    }
  }
  System.out.println("String_Node_Str" + file.getAbsolutePath());
  out=new BufferedWriter(fw);
}
Program: 44237
Project: 44237
Buggy source:
@Override public List<String> GetBaselineDiff(File dir,String baseline,String other,boolean nmerge){
}

Fixed version (ground truth):
@Override public List<String> GetBaselineDiff(File dir,String baseline,String other,boolean nmerge){
  CheckViewContext(dir);
  String cmd="String_Node_Str" + baseline;
  try {
    return Cleartool.run(cmd,dir).stdoutList;
  }
 catch (  AbnormalProcessTerminationException e) {
    if (e.getMessage().equalsIgnoreCase("String_Node_Str")) {
      logger.log("String_Node_Str" + baseline + "String_Node_Str");
      List<String> result=new ArrayList<String>();
      List<String> vobs=ListVobs(dir);
      for (      String vob : vobs) {
        List<String> files=Cleartool.run("String_Node_Str" + vob,dir).stdoutList;
        for (int i=0; i < files.size(); i++) {
          if (!files.get(i).matches("String_Node_Str")) {
            result.add(files.get(i));
          }
        }
      }
      return result;
    }
    throw e;
  }
}
Program: 44238
Project: 44238
Buggy source:
public static List<String> run(String cmd) throws CommandLineException, AbnormalProcessTerminationException {
  logger.trace_function();
  logger.debug("String_Node_Str" + cmd);
  String[] cmds=new String[3];
  cmds[0]="String_Node_Str";
  cmds[1]="String_Node_Str";
  cmds[2]=cmd;
  try {
    Process p=Runtime.getRuntime().exec(cmd);
    StreamGobbler output=new StreamGobbler(p.getInputStream());
    StreamGobbler errors=new StreamGobbler(p.getErrorStream());
    System.out.println("String_Node_Str");
    output.run();
    System.out.println("String_Node_Str");
    errors.run();
    int exitValue=p.waitFor();
    if (exitValue != 0) {
      logger.log("String_Node_Str" + output.sres.toString());
      throw new AbnormalProcessTerminationException("String_Node_Str" + output.sres.toString());
    }
    p.getErrorStream().close();
    p.getOutputStream().close();
    p.getInputStream().close();
    return output.lres;
  }
 catch (  IOException e) {
    logger.warning("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
    throw new CommandLineException("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
  }
catch (  InterruptedException e) {
    logger.warning("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
    throw new CommandLineException("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
  }
}

Fixed version (ground truth):
public static List<String> run(String cmd) throws CommandLineException, AbnormalProcessTerminationException {
  logger.trace_function();
  logger.debug("String_Node_Str" + cmd);
  String[] cmds=new String[3];
  cmds[0]="String_Node_Str";
  cmds[1]="String_Node_Str";
  cmds[2]=cmd;
  try {
    Process p=Runtime.getRuntime().exec(cmd);
    StreamGobbler output=new StreamGobbler(p.getInputStream());
    StreamGobbler errors=new StreamGobbler(p.getErrorStream());
    System.out.println("String_Node_Str");
    output.run();
    System.out.println("String_Node_Str");
    errors.run();
    int exitValue=p.waitFor();
    if (exitValue != 0) {
      logger.log("String_Node_Str" + output.sres.toString());
      throw new AbnormalProcessTerminationException("String_Node_Str" + errors.sres.toString());
    }
    p.getErrorStream().close();
    p.getOutputStream().close();
    p.getInputStream().close();
    return output.lres;
  }
 catch (  IOException e) {
    logger.warning("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
    throw new CommandLineException("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
  }
catch (  InterruptedException e) {
    logger.warning("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
    throw new CommandLineException("String_Node_Str" + cmd + "String_Node_Str"+ e.getMessage());
  }
}
Program: 44239
Project: 44239
Buggy source:
private static void NewDate(Calendar n){
  nowDate=n;
  if (fw != null) {
    try {
      fw.close();
      out.close();
    }
 catch (    IOException e) {
      System.err.println("String_Node_Str");
    }
  }
  try {
    fw=new FileWriter(path + "String_Node_Str" + logformat.format(nowDate.getTime())+ "String_Node_Str",append);
  }
 catch (  IOException e) {
    System.err.println("String_Node_Str" + path + "String_Node_Str");
    path="String_Node_Str";
    try {
      fw=new FileWriter(path + "String_Node_Str" + logformat.format(nowDate.getTime())+ "String_Node_Str",append);
    }
 catch (    IOException e1) {
      System.err.println("String_Node_Str");
      System.exit(1);
    }
  }
  out=new BufferedWriter(fw);
}

Fixed version (ground truth):
private static void NewDate(Calendar n){
  nowDate=n;
  String file="String_Node_Str";
  if (fw != null) {
    try {
      fw.close();
      out.close();
    }
 catch (    IOException e) {
      System.err.println("String_Node_Str");
    }
  }
  try {
    file="String_Node_Str" + logformat.format(nowDate.getTime()) + "String_Node_Str";
    fw=new FileWriter(path + file,append);
  }
 catch (  IOException e) {
    System.err.println("String_Node_Str" + path + "String_Node_Str");
    path="String_Node_Str";
    try {
      file="String_Node_Str" + logformat.format(nowDate.getTime()) + "String_Node_Str";
      fw=new FileWriter(path + file,append);
    }
 catch (    IOException e1) {
      System.err.println("String_Node_Str");
      System.exit(1);
    }
  }
  System.out.println("String_Node_Str" + path + file);
  out=new BufferedWriter(fw);
}
Program: 44240
Project: 44240
Buggy source:
public static HashMap<String,String> CGIToHash(String cgi){
  HashMap<String,String> hash=new HashMap<String,String>();
  logger.debug("String_Node_Str" + cgi);
  String[] entries=cgi.split("String_Node_Str");
  for (  String e : entries) {
    logger.debug("String_Node_Str" + e);
    String[] entry=e.split("String_Node_Str");
    hash.put(entry[0].trim(),entry[1].trim());
  }
  return hash;
}

Fixed version (ground truth):
public static HashMap<String,String> CGIToHash(String cgi){
  HashMap<String,String> hash=new HashMap<String,String>();
  logger.debug("String_Node_Str" + cgi);
  String[] entries=cgi.split("String_Node_Str");
  for (  String e : entries) {
    if (!e.contains("String_Node_Str"))     continue;
    String[] entry=e.split("String_Node_Str");
    hash.put(entry[0].trim(),entry[1].trim());
  }
  return hash;
}