nus-yam/ex-repair huggingface dataset:
Program: 53182
Project: 53182
Buggy source:
private boolean parseArgOutputVfsRepository(CommandLine commandLine){
  outputRepoName=commandLine.getOptionValue("String_Node_Str",DEFAULT_MIGRATION_FILE_SYSTEM);
  outputVfsRepository=new File(commandLine.getOptionValue("String_Node_Str","String_Node_Str"));
  forceOverwriteOutputVfsRepository=commandLine.hasOption("String_Node_Str");
  if (outputVfsRepository.exists()) {
    if (forceOverwriteOutputVfsRepository) {
      try {
        FileUtils.deleteDirectory(outputVfsRepository);
      }
 catch (      IOException e) {
        System.out.println("String_Node_Str" + outputVfsRepository.getAbsolutePath() + "String_Node_Str"+ e);
        return false;
      }
    }
 else {
      System.out.println("String_Node_Str" + outputVfsRepository.getAbsolutePath() + "String_Node_Str");
      return false;
    }
  }
  try {
    outputVfsRepository=outputVfsRepository.getCanonicalFile();
    FileUtils.forceMkdir(outputVfsRepository);
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str" + outputVfsRepository + "String_Node_Str"+ e);
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean parseArgOutputVfsRepository(CommandLine commandLine){
  outputRepoName=commandLine.getOptionValue("String_Node_Str",DEFAULT_MIGRATION_FILE_SYSTEM);
  outputVfsRepository=new File(commandLine.getOptionValue("String_Node_Str","String_Node_Str"));
  boolean forceOverwriteOutputVfsRepository=commandLine.hasOption("String_Node_Str");
  if (outputVfsRepository.exists()) {
    if (forceOverwriteOutputVfsRepository) {
      try {
        FileUtils.deleteDirectory(outputVfsRepository);
      }
 catch (      IOException e) {
        System.out.println("String_Node_Str" + outputVfsRepository.getAbsolutePath() + "String_Node_Str"+ e);
        return false;
      }
    }
 else {
      System.out.println("String_Node_Str" + outputVfsRepository.getAbsolutePath() + "String_Node_Str");
      return false;
    }
  }
  try {
    outputVfsRepository=outputVfsRepository.getCanonicalFile();
    FileUtils.forceMkdir(outputVfsRepository);
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str" + outputVfsRepository + "String_Node_Str"+ e);
    return false;
  }
  return true;
}
Program: 53183
Project: 53183
Buggy source:
public static String parseCdataSection(Node cdataNode){
  if (cdataNode != null && CDATA_SECTION.equalsIgnoreCase(cdataNode.getNodeName())) {
    return cdataNode.getTextContent();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public static String parseCdataSection(Node cdataParentNode){
  if (cdataParentNode == null)   return "String_Node_Str";
  StringBuilder sb=new StringBuilder();
  NodeList cdataParentNodeChildren=cdataParentNode.getChildNodes();
  if (cdataParentNodeChildren != null && cdataParentNodeChildren.getLength() > 0) {
    for (int i=0; i < cdataParentNodeChildren.getLength(); i++) {
      Node cdataNode=cdataParentNodeChildren.item(i);
      if (CDATA_SECTION.equalsIgnoreCase(cdataNode.getNodeName()))       sb.append(cdataNode.getTextContent());
 else       System.out.println("String_Node_Str" + cdataNode.getNodeName());
    }
  }
  return sb.toString();
}
Program: 53184
Project: 53184
Buggy source:
public static String formatCdataSection(String content){
  if (content.contains(CDATA_CLOSE))   throw new RuntimeException("String_Node_Str" + content);
  StringBuilder sb=new StringBuilder(CDATA_OPEN);
  sb.append(content).append(CDATA_CLOSE);
  return sb.toString();
}

Fixed version (ground truth):
public static String formatCdataSection(String content){
  StringBuilder sb=new StringBuilder(CDATA_OPEN);
  sb.append(escapeContent(content)).append(CDATA_CLOSE);
  return sb.toString();
}
Program: 53185
Project: 53185
Buggy source:
private XmlGenericAttributes parseGenericNodeContent(Node assetNode){
  NamedNodeMap assetAttribs=assetNode.getAttributes();
  Node commentNode=assetNode.getFirstChild();
  String checkinComment=ExportXmlUtils.parseCdataSection(commentNode.getFirstChild());
  return new XmlGenericAttributes(assetAttribs.getNamedItem(ASSET_NAME).getNodeValue(),assetAttribs.getNamedItem(ASSET_TYPE).getNodeValue(),assetAttribs.getNamedItem(ASSET_LAST_CONTRIBUTOR).getNodeValue(),checkinComment,new Date(Long.parseLong(assetAttribs.getNamedItem(ASSET_LAST_MODIFIED).getNodeValue(),10)));
}

Fixed version (ground truth):
private XmlGenericAttributes parseGenericNodeContent(Node assetNode){
  NamedNodeMap assetAttribs=assetNode.getAttributes();
  Node commentNode=assetNode.getFirstChild();
  String checkinComment=ExportXmlUtils.parseCdataSection(commentNode);
  return new XmlGenericAttributes(assetAttribs.getNamedItem(ASSET_NAME).getNodeValue(),assetAttribs.getNamedItem(ASSET_TYPE).getNodeValue(),assetAttribs.getNamedItem(ASSET_LAST_CONTRIBUTOR).getNodeValue(),checkinComment,new Date(Long.parseLong(assetAttribs.getNamedItem(ASSET_LAST_MODIFIED).getNodeValue(),10)));
}
Program: 53186
Project: 53186
Buggy source:
private String parsePackageHeaderInfo(Node headerInfoNode){
  NodeList headerNodeChildren=headerInfoNode.getChildNodes();
  if (headerNodeChildren.getLength() > 1)   throw new IllegalArgumentException("String_Node_Str" + MODULE_PACKAGEHEADER);
  return ExportXmlUtils.parseCdataSection(headerNodeChildren.item(0));
}

Fixed version (ground truth):
private String parsePackageHeaderInfo(Node headerInfoNode){
  if (!MODULE_PACKAGEHEADER.equalsIgnoreCase(headerInfoNode.getNodeName()))   throw new IllegalArgumentException("String_Node_Str" + MODULE_PACKAGEHEADER);
  return ExportXmlUtils.parseCdataSection(headerInfoNode);
}
Program: 53187
Project: 53187
Buggy source:
private String parseGlobals(Node globalsNode){
  NodeList globalsNodeChildren=globalsNode.getChildNodes();
  if (globalsNodeChildren.getLength() > 1)   throw new IllegalArgumentException("String_Node_Str" + MODULE_GLOBALS);
  return ExportXmlUtils.parseCdataSection(globalsNodeChildren.item(0));
}

Fixed version (ground truth):
private String parseGlobals(Node globalsNode){
  if (!MODULE_GLOBALS.equalsIgnoreCase(globalsNode.getNodeName()))   throw new IllegalArgumentException("String_Node_Str" + MODULE_GLOBALS);
  return ExportXmlUtils.parseCdataSection(globalsNode);
}
Program: 53188
Project: 53188
Buggy source:
private String parseCheckinComment(Node checkinCommentNode){
  NodeList checkinCommentNodeChildren=checkinCommentNode.getChildNodes();
  if (checkinCommentNodeChildren.getLength() > 1)   throw new IllegalArgumentException("String_Node_Str" + MODULE_CHECKIN_COMMENT);
  return ExportXmlUtils.parseCdataSection(checkinCommentNodeChildren.item(0));
}

Fixed version (ground truth):
private String parseCheckinComment(Node checkinCommentNode){
  if (!MODULE_CHECKIN_COMMENT.equalsIgnoreCase(checkinCommentNode.getNodeName()))   throw new IllegalArgumentException("String_Node_Str" + MODULE_CHECKIN_COMMENT);
  return ExportXmlUtils.parseCdataSection(checkinCommentNode);
}
Program: 53189
Project: 53189
Buggy source:
@Override public GuidedDecisionTree load(final Path path){
  try {
    final String content=ioService.readAllString(Paths.convert(path));
    final GuidedDecisionTree model=GuidedDecisionTreeXMLPersistence.getInstance().unmarshal(content);
    final TypeNode type=new TypeNodeImpl("String_Node_Str");
    final ConstraintNode c1=new ConstraintNodeImpl("String_Node_Str","String_Node_Str",new StringValue("String_Node_Str"));
    final ConstraintNode c2=new ConstraintNodeImpl("String_Node_Str","String_Node_Str",new StringValue("String_Node_Str"));
    final ConstraintNode c3=new ConstraintNodeImpl("String_Node_Str","String_Node_Str",new IntegerValue(20));
    final ConstraintNode c4=new ConstraintNodeImpl("String_Node_Str","String_Node_Str",new IntegerValue(30));
    model.setRoot(type);
    type.getChildren().add(c1);
    type.getChildren().add(c2);
    c1.getChildren().add(c3);
    c1.getChildren().add(c4);
    return model;
  }
 catch (  Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}

Fixed version (ground truth):
@Override public GuidedDecisionTree load(final Path path){
  try {
    final String content=ioService.readAllString(Paths.convert(path));
    final GuidedDecisionTree model=GuidedDecisionTreeXMLPersistence.getInstance().unmarshal(content);
    final TypeNode type=new TypeNodeImpl("String_Node_Str");
    final ConstraintNode c1=new ConstraintNodeImpl("String_Node_Str","String_Node_Str","String_Node_Str",new StringValue("String_Node_Str"));
    final ConstraintNode c2=new ConstraintNodeImpl("String_Node_Str","String_Node_Str","String_Node_Str",new StringValue("String_Node_Str"));
    final ConstraintNode c3=new ConstraintNodeImpl("String_Node_Str","String_Node_Str","String_Node_Str",new IntegerValue(20));
    final ConstraintNode c4=new ConstraintNodeImpl("String_Node_Str","String_Node_Str","String_Node_Str",new IntegerValue(30));
    model.setRoot(type);
    type.getChildren().add(c1);
    type.getChildren().add(c2);
    c1.getChildren().add(c3);
    c1.getChildren().add(c4);
    return model;
  }
 catch (  Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}
Program: 53190
Project: 53190
Buggy source:
public <U extends TestResultMessage>Event<U> select(TypeLiteral<U> subtype,Annotation... qualifiers){
  return null;
}

Fixed version (ground truth):
@Override public <U extends TestResultMessage>Event<U> select(Class<U> subtype,Annotation... qualifiers){
  return null;
}
Program: 53192
Project: 53192
Buggy source:
public void createProject(final String jobId,final String repositoryName,final String projectName){
  logger.info("String_Node_Str" + repositoryName + "String_Node_Str"+ projectName);
  JobResult result=new JobResult();
  result.setJobId(jobId);
  org.uberfire.java.nio.file.Path repositoryPath=getRepositoryRootPath(repositoryName);
  if (repositoryPath == null) {
    result.setStatus(JobStatus.RESOURCE_NOT_EXIST);
    result.setResult("String_Node_Str" + repositoryName + "String_Node_Str");
    jobResultEvent.fire(result);
    return;
  }
 else {
    POM pom=new POM();
    pom.getGav().setArtifactId(projectName);
    pom.getGav().setGroupId(projectName);
    pom.getGav().setVersion("String_Node_Str");
    try {
      Project project=projectService.newProject(makeRepository(Paths.convert(repositoryPath)),projectName,pom,"String_Node_Str");
    }
 catch (    org.uberfire.java.nio.file.FileAlreadyExistsException e) {
      result.setStatus(JobStatus.DUPLICATE_RESOURCE);
      result.setResult("String_Node_Str" + projectName + "String_Node_Str");
      jobResultEvent.fire(result);
      return;
    }
    result.setStatus(JobStatus.SUCCESS);
    jobResultEvent.fire(result);
  }
}

Fixed version (ground truth):
public void createProject(final String jobId,final String repositoryName,final String projectName){
  logger.info("String_Node_Str" + repositoryName + "String_Node_Str"+ projectName);
  JobResult result=new JobResult();
  result.setJobId(jobId);
  org.uberfire.java.nio.file.Path repositoryPath=getRepositoryRootPath(repositoryName);
  if (repositoryPath == null) {
    result.setStatus(JobStatus.RESOURCE_NOT_EXIST);
    result.setResult("String_Node_Str" + repositoryName + "String_Node_Str");
    jobResultEvent.fire(result);
    return;
  }
 else {
    POM pom=new POM();
    pom.getGav().setArtifactId(projectName);
    pom.getGav().setGroupId(projectName);
    pom.getGav().setVersion("String_Node_Str");
    try {
      projectService.newProject(makeRepository(Paths.convert(repositoryPath)),projectName,pom,"String_Node_Str");
    }
 catch (    org.uberfire.java.nio.file.FileAlreadyExistsException e) {
      result.setStatus(JobStatus.DUPLICATE_RESOURCE);
      result.setResult("String_Node_Str" + projectName + "String_Node_Str");
      jobResultEvent.fire(result);
      return;
    }
    result.setStatus(JobStatus.SUCCESS);
    jobResultEvent.fire(result);
  }
}
Program: 53194
Project: 53194
Buggy source:
@Override public List<ValidationMessage> validate(final Path path,final String content){
  try {
    return genericValidator.validate(path,new ByteArrayInputStream(content.getBytes()),FILTER_JAVA,FILTER_DRLS);
  }
 catch (  Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}

Fixed version (ground truth):
@Override public List<ValidationMessage> validate(final Path path,final String content){
  try {
    return genericValidator.validate(path,new ByteArrayInputStream(content.getBytes(Charsets.UTF_8)),FILTER_JAVA,FILTER_DRLS);
  }
 catch (  Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}
Program: 53195
Project: 53195
Buggy source:
public void addCellValue(final int row,final int column,final String value){
  final DTCellValue52 dcv=new DTCellValue52();
  try {
    dcv.setNumericValue(new Long(value));
  }
 catch (  NumberFormatException nfe) {
    final String message="String_Node_Str" + RuleSheetParserUtil.rc2name(row,column);
    this.conversionResult.addMessage(message,ConversionMessageType.WARNING);
  }
  this.values.add(dcv);
}

Fixed version (ground truth):
public void addCellValue(final int row,final int column,final String value){
  final DTCellValue52 dcv=new DTCellValue52();
  try {
    dcv.setNumericValue(Long.valueOf(value));
  }
 catch (  NumberFormatException nfe) {
    final String message="String_Node_Str" + RuleSheetParserUtil.rc2name(row,column);
    this.conversionResult.addMessage(message,ConversionMessageType.WARNING);
  }
  this.values.add(dcv);
}
Program: 53196
Project: 53196
Buggy source:
public void populateDecisionTable(final GuidedDecisionTable52 dtable){
  final AttributeCol52 column=new AttributeCol52();
  column.setAttribute(GuidedDecisionTable52.SALIENCE_ATTR);
  if (isSequential) {
    column.setUseRowNumber(true);
    column.setReverseOrder(true);
    final int maxRow=this.values.size();
    for (int iRow=0; iRow < maxRow; iRow++) {
      final DTCellValue52 dcv=this.values.get(iRow);
      dcv.setNumericValue(new Integer(maxRow - iRow));
    }
  }
  dtable.getAttributeCols().add(column);
  addColumnData(dtable,column);
}

Fixed version (ground truth):
public void populateDecisionTable(final GuidedDecisionTable52 dtable){
  final AttributeCol52 column=new AttributeCol52();
  column.setAttribute(GuidedDecisionTable52.SALIENCE_ATTR);
  if (isSequential) {
    column.setUseRowNumber(true);
    column.setReverseOrder(true);
    final int maxRow=this.values.size();
    for (int iRow=0; iRow < maxRow; iRow++) {
      final DTCellValue52 dcv=this.values.get(iRow);
      dcv.setNumericValue(Integer.valueOf(maxRow - iRow));
    }
  }
  dtable.getAttributeCols().add(column);
  addColumnData(dtable,column);
}
Program: 53197
Project: 53197
Buggy source:
public void addCellValue(final int row,final int column,final String content){
  String value=content;
  if (value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str")) {
    value=value.substring(1,value.lastIndexOf("String_Node_Str") - 1);
  }
  final DTCellValue52 dcv=new DTCellValue52();
  try {
    dcv.setNumericValue(new Integer(value));
  }
 catch (  NumberFormatException nfe) {
    final String message="String_Node_Str" + RuleSheetParserUtil.rc2name(row,column);
    this.conversionResult.addMessage(message,ConversionMessageType.WARNING);
  }
  this.values.add(dcv);
}

Fixed version (ground truth):
public void addCellValue(final int row,final int column,final String content){
  String value=content;
  if (value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str")) {
    value=value.substring(1,value.lastIndexOf("String_Node_Str") - 1);
  }
  final DTCellValue52 dcv=new DTCellValue52();
  try {
    dcv.setNumericValue(Integer.valueOf(value));
  }
 catch (  NumberFormatException nfe) {
    final String message="String_Node_Str" + RuleSheetParserUtil.rc2name(row,column);
    this.conversionResult.addMessage(message,ConversionMessageType.WARNING);
  }
  this.values.add(dcv);
}
Program: 53198
Project: 53198
Buggy source:
public void populateDecisionTable(final GuidedDecisionTable52 dtable){
  for (int iRow=0; iRow < this.values.size(); iRow++) {
    dtable.getData().add(new ArrayList<DTCellValue52>());
    final DTCellValue52 dcv=this.values.get(iRow);
    dcv.setNumericValue(new Integer(iRow + 1));
    dtable.getData().get(iRow).add(0,dcv);
  }
}

Fixed version (ground truth):
public void populateDecisionTable(final GuidedDecisionTable52 dtable){
  for (int iRow=0; iRow < this.values.size(); iRow++) {
    dtable.getData().add(new ArrayList<DTCellValue52>());
    final DTCellValue52 dcv=this.values.get(iRow);
    dcv.setNumericValue(Integer.valueOf(iRow + 1));
    dtable.getData().get(iRow).add(0,dcv);
  }
}
Program: 53200
Project: 53200
Buggy source:
@Override public List<ValidationMessage> validate(final Path path,final GlobalsModel content){
  try {
    return genericValidator.validate(path,new ByteArrayInputStream(GlobalsPersistence.getInstance().marshal(content).getBytes()),FILTER_JAVA);
  }
 catch (  Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}

Fixed version (ground truth):
@Override public List<ValidationMessage> validate(final Path path,final GlobalsModel content){
  try {
    return genericValidator.validate(path,new ByteArrayInputStream(GlobalsPersistence.getInstance().marshal(content).getBytes(Charsets.UTF_8)),FILTER_JAVA);
  }
 catch (  Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}
Program: 53201
Project: 53201
Buggy source:
@Override public List<ValidationMessage> validate(final Path path,final GuidedDecisionTable52 content){
  try {
    return genericValidator.validate(path,new ByteArrayInputStream(GuidedDTXMLPersistence.getInstance().marshal(content).getBytes()),FILTER_JAVA,FILTER_GLOBALS,FILTER_DSLS);
  }
 catch (  Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}

Fixed version (ground truth):
@Override public List<ValidationMessage> validate(final Path path,final GuidedDecisionTable52 content){
  try {
    return genericValidator.validate(path,new ByteArrayInputStream(GuidedDTXMLPersistence.getInstance().marshal(content).getBytes(Charsets.UTF_8)),FILTER_JAVA,FILTER_GLOBALS,FILTER_DSLS);
  }
 catch (  Exception e) {
    throw ExceptionUtilities.handleException(e);
  }
}
Program: 53203
Project: 53203
Buggy source:
public String getBoundFactType(String boundName){
  for (  CompositeColumn<?> cc : this.model.getConditions()) {
    if (cc instanceof Pattern52) {
      final Pattern52 p=(Pattern52)cc;
      if (p.isBound() && p.getBoundName().equals(boundName)) {
        return p.getFactType();
      }
    }
 else     if (cc instanceof BRLConditionColumn) {
      final BRLConditionColumn brl=(BRLConditionColumn)cc;
      for (      IPattern p : brl.getDefinition()) {
        if (p instanceof FactPattern) {
          FactPattern fp=(FactPattern)p;
          if (fp.isBound() && fp.getBoundName().equals(boundName)) {
            return fp.getFactType();
          }
        }
      }
    }
  }
  return new String();
}

Fixed version (ground truth):
public String getBoundFactType(String boundName){
  for (  CompositeColumn<?> cc : this.model.getConditions()) {
    if (cc instanceof Pattern52) {
      final Pattern52 p=(Pattern52)cc;
      if (p.isBound() && p.getBoundName().equals(boundName)) {
        return p.getFactType();
      }
    }
 else     if (cc instanceof BRLConditionColumn) {
      final BRLConditionColumn brl=(BRLConditionColumn)cc;
      for (      IPattern p : brl.getDefinition()) {
        if (p instanceof FactPattern) {
          FactPattern fp=(FactPattern)p;
          if (fp.isBound() && fp.getBoundName().equals(boundName)) {
            return fp.getFactType();
          }
        }
      }
    }
  }
  return "String_Node_Str";
}
Program: 53205
Project: 53205
Buggy source:
private AbstractRestrictedEntryTextBox makeNumericByteTextBox(final DTCellValue52 value){
  final AbstractRestrictedEntryTextBox tb=new NumericByteTextBox(allowEmptyValues);
  final Byte numericValue=(Byte)value.getNumericValue();
  tb.setValue(numericValue == null ? "String_Node_Str" : numericValue.toString());
  tb.setEnabled(!isReadOnly);
  if (!isReadOnly) {
    tb.addValueChangeHandler(new ValueChangeHandler<String>(){
      public void onValueChange(      ValueChangeEvent<String> event){
        try {
          value.setNumericValue(new Byte(event.getValue()));
        }
 catch (        NumberFormatException nfe) {
          if (allowEmptyValues) {
            value.setNumericValue((Byte)null);
            tb.setValue("String_Node_Str");
          }
 else {
            value.setNumericValue(new Byte("String_Node_Str"));
            tb.setValue("String_Node_Str");
          }
        }
      }
    }
);
  }
  return tb;
}

Fixed version (ground truth):
private AbstractRestrictedEntryTextBox makeNumericByteTextBox(final DTCellValue52 value){
  final AbstractRestrictedEntryTextBox tb=new NumericByteTextBox(allowEmptyValues);
  final Byte numericValue=(Byte)value.getNumericValue();
  tb.setValue(numericValue == null ? "String_Node_Str" : numericValue.toString());
  tb.setEnabled(!isReadOnly);
  if (!isReadOnly) {
    tb.addValueChangeHandler(new ValueChangeHandler<String>(){
      public void onValueChange(      ValueChangeEvent<String> event){
        try {
          value.setNumericValue(Byte.valueOf(event.getValue()));
        }
 catch (        NumberFormatException nfe) {
          if (allowEmptyValues) {
            value.setNumericValue((Byte)null);
            tb.setValue("String_Node_Str");
          }
 else {
            value.setNumericValue(Byte.valueOf("String_Node_Str"));
            tb.setValue("String_Node_Str");
          }
        }
      }
    }
);
  }
  return tb;
}
Program: 53206
Project: 53206
Buggy source:
private AbstractRestrictedEntryTextBox makeNumericIntegerTextBox(final DTCellValue52 value){
  final AbstractRestrictedEntryTextBox tb=new NumericIntegerTextBox(allowEmptyValues);
  final Integer numericValue=(Integer)value.getNumericValue();
  tb.setValue(numericValue == null ? "String_Node_Str" : numericValue.toString());
  tb.setEnabled(!isReadOnly);
  if (!isReadOnly) {
    tb.addValueChangeHandler(new ValueChangeHandler<String>(){
      public void onValueChange(      ValueChangeEvent<String> event){
        try {
          value.setNumericValue(new Integer(event.getValue()));
        }
 catch (        NumberFormatException nfe) {
          if (allowEmptyValues) {
            value.setNumericValue((Integer)null);
            tb.setValue("String_Node_Str");
          }
 else {
            value.setNumericValue(new Integer("String_Node_Str"));
            tb.setValue("String_Node_Str");
          }
        }
      }
    }
);
  }
  return tb;
}

Fixed version (ground truth):
private AbstractRestrictedEntryTextBox makeNumericIntegerTextBox(final DTCellValue52 value){
  final AbstractRestrictedEntryTextBox tb=new NumericIntegerTextBox(allowEmptyValues);
  final Integer numericValue=(Integer)value.getNumericValue();
  tb.setValue(numericValue == null ? "String_Node_Str" : numericValue.toString());
  tb.setEnabled(!isReadOnly);
  if (!isReadOnly) {
    tb.addValueChangeHandler(new ValueChangeHandler<String>(){
      public void onValueChange(      ValueChangeEvent<String> event){
        try {
          value.setNumericValue(Integer.valueOf(event.getValue()));
        }
 catch (        NumberFormatException nfe) {
          if (allowEmptyValues) {
            value.setNumericValue((Integer)null);
            tb.setValue("String_Node_Str");
          }
 else {
            value.setNumericValue(0);
            tb.setValue("String_Node_Str");
          }
        }
      }
    }
);
  }
  return tb;
}
Program: 53207
Project: 53207
Buggy source:
private AbstractRestrictedEntryTextBox makeNumericLongTextBox(final DTCellValue52 value){
  final AbstractRestrictedEntryTextBox tb=new NumericLongTextBox(allowEmptyValues);
  final Long numericValue=(Long)value.getNumericValue();
  tb.setValue(numericValue == null ? "String_Node_Str" : numericValue.toString());
  tb.setEnabled(!isReadOnly);
  if (!isReadOnly) {
    tb.addValueChangeHandler(new ValueChangeHandler<String>(){
      public void onValueChange(      ValueChangeEvent<String> event){
        try {
          value.setNumericValue(new Long(event.getValue()));
        }
 catch (        NumberFormatException nfe) {
          if (allowEmptyValues) {
            value.setNumericValue((Long)null);
            tb.setValue("String_Node_Str");
          }
 else {
            value.setNumericValue(new Long("String_Node_Str"));
            tb.setValue("String_Node_Str");
          }
        }
      }
    }
);
  }
  return tb;
}

Fixed version (ground truth):
private AbstractRestrictedEntryTextBox makeNumericLongTextBox(final DTCellValue52 value){
  final AbstractRestrictedEntryTextBox tb=new NumericLongTextBox(allowEmptyValues);
  final Long numericValue=(Long)value.getNumericValue();
  tb.setValue(numericValue == null ? "String_Node_Str" : numericValue.toString());
  tb.setEnabled(!isReadOnly);
  if (!isReadOnly) {
    tb.addValueChangeHandler(new ValueChangeHandler<String>(){
      public void onValueChange(      ValueChangeEvent<String> event){
        try {
          value.setNumericValue(Long.valueOf(event.getValue()));
        }
 catch (        NumberFormatException nfe) {
          if (allowEmptyValues) {
            value.setNumericValue((Long)null);
            tb.setValue("String_Node_Str");
          }
 else {
            value.setNumericValue(0L);
            tb.setValue("String_Node_Str");
          }
        }
      }
    }
);
  }
  return tb;
}
Program: 53208
Project: 53208
Buggy source:
private AbstractRestrictedEntryTextBox makeNumericShortTextBox(final DTCellValue52 value){
  final AbstractRestrictedEntryTextBox tb=new NumericShortTextBox(allowEmptyValues);
  final Short numericValue=(Short)value.getNumericValue();
  tb.setValue(numericValue == null ? "String_Node_Str" : numericValue.toString());
  tb.setEnabled(!isReadOnly);
  if (!isReadOnly) {
    tb.addValueChangeHandler(new ValueChangeHandler<String>(){
      public void onValueChange(      ValueChangeEvent<String> event){
        try {
          value.setNumericValue(new Short(event.getValue()));
        }
 catch (        NumberFormatException nfe) {
          if (allowEmptyValues) {
            value.setNumericValue((Short)null);
            tb.setValue("String_Node_Str");
          }
 else {
            value.setNumericValue(new Short("String_Node_Str"));
            tb.setValue("String_Node_Str");
          }
        }
      }
    }
);
  }
  return tb;
}

Fixed version (ground truth):
private AbstractRestrictedEntryTextBox makeNumericShortTextBox(final DTCellValue52 value){
  final AbstractRestrictedEntryTextBox tb=new NumericShortTextBox(allowEmptyValues);
  final Short numericValue=(Short)value.getNumericValue();
  tb.setValue(numericValue == null ? "String_Node_Str" : numericValue.toString());
  tb.setEnabled(!isReadOnly);
  if (!isReadOnly) {
    tb.addValueChangeHandler(new ValueChangeHandler<String>(){
      public void onValueChange(      ValueChangeEvent<String> event){
        try {
          value.setNumericValue(Short.valueOf(event.getValue()));
        }
 catch (        NumberFormatException nfe) {
          if (allowEmptyValues) {
            value.setNumericValue((Short)null);
            tb.setValue("String_Node_Str");
          }
 else {
            value.setNumericValue(Short.valueOf("String_Node_Str"));
            tb.setValue("String_Node_Str");
          }
        }
      }
    }
);
  }
  return tb;
}
Program: 53209
Project: 53209
Buggy source:
private static void assertIntegerDefaultValue(final DTCellValue52 dcv){
  if (dcv.getNumericValue() == null) {
    try {
      dcv.setNumericValue(new Integer(dcv.getStringValue()));
    }
 catch (    NumberFormatException nfe) {
      dcv.setNumericValue(new Integer("String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
private static void assertIntegerDefaultValue(final DTCellValue52 dcv){
  if (dcv.getNumericValue() == null) {
    try {
      dcv.setNumericValue(Integer.valueOf(dcv.getStringValue()));
    }
 catch (    NumberFormatException nfe) {
      dcv.setNumericValue(0);
    }
  }
}
Program: 53210
Project: 53210
Buggy source:
private static void assertLongDefaultValue(final DTCellValue52 dcv){
  if (dcv.getNumericValue() == null) {
    try {
      dcv.setNumericValue(new Long(dcv.getStringValue()));
    }
 catch (    NumberFormatException nfe) {
      dcv.setNumericValue(new Long("String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
private static void assertLongDefaultValue(final DTCellValue52 dcv){
  if (dcv.getNumericValue() == null) {
    try {
      dcv.setNumericValue(Long.valueOf(dcv.getStringValue()));
    }
 catch (    NumberFormatException nfe) {
      dcv.setNumericValue(0L);
    }
  }
}
Program: 53211
Project: 53211
Buggy source:
private static void assertBooleanDefaultValue(final DTCellValue52 dcv){
  if (dcv.getBooleanValue() == null) {
    dcv.setBooleanValue(new Boolean(dcv.getStringValue()));
  }
}

Fixed version (ground truth):
private static void assertBooleanDefaultValue(final DTCellValue52 dcv){
  if (dcv.getBooleanValue() == null) {
    dcv.setBooleanValue(Boolean.valueOf(dcv.getStringValue()));
  }
}
Program: 53213
Project: 53213
Buggy source:
private boolean parseArgOutputVfsRepository(CommandLine commandLine,HelpFormatter formatter,Options options){
  outputRepoName=commandLine.getOptionValue("String_Node_Str",DEFAULT_MIGRATION_FILE_SYSTEM);
  outputVfsRepository=new File(commandLine.getOptionValue("String_Node_Str","String_Node_Str"));
  forceOverwriteOutputVfsRepository=commandLine.hasOption("String_Node_Str");
  if (outputVfsRepository.exists()) {
    if (forceOverwriteOutputVfsRepository) {
      try {
        FileUtils.deleteDirectory(outputVfsRepository);
      }
 catch (      IOException e) {
        System.out.println("String_Node_Str" + outputVfsRepository.getAbsolutePath() + "String_Node_Str"+ e);
        return false;
      }
    }
 else {
      System.out.println("String_Node_Str" + outputVfsRepository.getAbsolutePath() + "String_Node_Str");
      return false;
    }
  }
  try {
    outputVfsRepository=outputVfsRepository.getCanonicalFile();
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str" + outputVfsRepository + "String_Node_Str"+ e);
    return false;
  }
  outputVfsRepository.mkdirs();
  return true;
}

Fixed version (ground truth):
private boolean parseArgOutputVfsRepository(CommandLine commandLine,HelpFormatter formatter,Options options){
  outputRepoName=commandLine.getOptionValue("String_Node_Str",DEFAULT_MIGRATION_FILE_SYSTEM);
  outputVfsRepository=new File(commandLine.getOptionValue("String_Node_Str","String_Node_Str"));
  forceOverwriteOutputVfsRepository=commandLine.hasOption("String_Node_Str");
  if (outputVfsRepository.exists()) {
    if (forceOverwriteOutputVfsRepository) {
      try {
        FileUtils.deleteDirectory(outputVfsRepository);
      }
 catch (      IOException e) {
        System.out.println("String_Node_Str" + outputVfsRepository.getAbsolutePath() + "String_Node_Str"+ e);
        return false;
      }
    }
 else {
      System.out.println("String_Node_Str" + outputVfsRepository.getAbsolutePath() + "String_Node_Str");
      return false;
    }
  }
  try {
    outputVfsRepository=outputVfsRepository.getCanonicalFile();
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str" + outputVfsRepository + "String_Node_Str"+ e);
    return false;
  }
  try {
    FileUtils.forceMkdir(outputVfsRepository);
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return true;
}
Program: 53214
Project: 53214
Buggy source:
public void migrateAssetHistory(Module jcrModule,String assetUUID) throws SerializationException {
  String currentVersionAssetName="String_Node_Str";
  try {
    Path previousVersionPath=null;
    TableDataResult history=jcrRepositoryAssetService.loadItemHistory(assetUUID);
    TableDataRow[] rows=history.data;
    Arrays.sort(rows,new Comparator<TableDataRow>(){
      public int compare(      TableDataRow r1,      TableDataRow r2){
        Integer v2=Integer.valueOf(r2.values[0]);
        Integer v1=Integer.valueOf(r1.values[0]);
        return v1.compareTo(v2);
      }
    }
);
    for (    TableDataRow row : rows) {
      String versionSnapshotUUID=row.id;
      AssetItem historicalAssetJCR=rulesRepository.loadAssetByUUID(versionSnapshotUUID);
      currentVersionAssetName=historicalAssetJCR.getName();
      previousVersionPath=migrate(jcrModule,historicalAssetJCR,previousVersionPath);
      logger.debug("String_Node_Str",historicalAssetJCR.getName(),historicalAssetJCR.getFormat(),historicalAssetJCR.getVersionNumber(),historicalAssetJCR.getCheckinComment(),historicalAssetJCR.getLastModified().getTime());
    }
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + currentVersionAssetName + "String_Node_Str"+ jcrModule.getName());
  }
}

Fixed version (ground truth):
public void migrateAssetHistory(Module jcrModule,String assetUUID) throws SerializationException {
  String currentVersionAssetName="String_Node_Str";
  try {
    Path previousVersionPath=null;
    TableDataResult history=jcrRepositoryAssetService.loadItemHistory(assetUUID);
    TableDataRow[] rows=history.data;
    Arrays.sort(rows,new Comparator<TableDataRow>(){
      public int compare(      TableDataRow r1,      TableDataRow r2){
        Integer v2=Integer.valueOf(r2.values[0]);
        Integer v1=Integer.valueOf(r1.values[0]);
        return v1.compareTo(v2);
      }
    }
);
    for (    TableDataRow row : rows) {
      String versionSnapshotUUID=row.id;
      AssetItem historicalAssetJCR=rulesRepository.loadAssetByUUID(versionSnapshotUUID);
      currentVersionAssetName=historicalAssetJCR.getName();
      previousVersionPath=migrate(jcrModule,historicalAssetJCR,previousVersionPath);
      logger.debug("String_Node_Str",historicalAssetJCR.getName(),historicalAssetJCR.getFormat(),historicalAssetJCR.getVersionNumber(),historicalAssetJCR.getCheckinComment(),historicalAssetJCR.getLastModified().getTime());
    }
  }
 catch (  RuntimeException e) {
    System.out.println("String_Node_Str" + currentVersionAssetName + "String_Node_Str"+ jcrModule.getName());
  }
}
Program: 53216
Project: 53216
Buggy source:
private void migrate(Module jcrModule){
  jcrModule.setName(migrationPathManager.normalizePackageName(jcrModule.getName()));
  String[] nameSplit=jcrModule.getName().split("String_Node_Str");
  String groupId=nameSplit[0];
  String artifactId=nameSplit[nameSplit.length - 1];
  for (int i=1; i < nameSplit.length - 1; i++) {
    groupId+="String_Node_Str" + nameSplit[i];
  }
  GAV gav=new GAV(groupId,artifactId,"String_Node_Str");
  POM pom=new POM(gav);
  Path modulePath=migrationPathManager.generateRootPath();
  projectService.newProject(makeRepository(modulePath),jcrModule.getName(),pom,"String_Node_Str");
}

Fixed version (ground truth):
private void migrate(Module jcrModule){
  jcrModule.setName(migrationPathManager.normalizePackageName(jcrModule.getName()));
  String[] nameSplit=jcrModule.getName().split("String_Node_Str");
  StringBuilder groupIdBuilder=new StringBuilder();
  groupIdBuilder.append(nameSplit[0]);
  for (int i=1; i < nameSplit.length - 1; i++) {
    groupIdBuilder.append("String_Node_Str");
    groupIdBuilder.append(nameSplit[i]);
  }
  String groupId=groupIdBuilder.toString();
  String artifactId=nameSplit[nameSplit.length - 1];
  GAV gav=new GAV(groupId,artifactId,"String_Node_Str");
  POM pom=new POM(gav);
  Path modulePath=migrationPathManager.generateRootPath();
  projectService.newProject(makeRepository(modulePath),jcrModule.getName(),pom,"String_Node_Str");
}
Program: 53219
Project: 53219
Buggy source:
/** 
 * Retrieves form jcrModule the categoryRules and deduce the rule to extend depending of the assetItem categories retrieve the rule name between ruleDelimiter
 * @param jcrModule module which has the category rule defined
 * @param jcrAssetItem asset with the categories, which can extend the rule
 * @param ruleDelimiter The delimiter used to contruct the return value
 * @return the rule to extend depending of the asset category and the category rules defined by package between ruleDelimiter
 */
public String getExtendedRuleFromCategoryRules(Module jcrModule,AssetItem jcrAssetItem,String ruleDelimiter){
  HashMap catRuleHashMap=new HashMap();
  String ruleName;
  if (jcrModule.getCatRules() != null && jcrModule.getCatRules().keySet() != null && jcrModule.getCatRules().keySet().size() > 0) {
    for (Iterator it=jcrModule.getCatRules().keySet().iterator(); it.hasNext(); ) {
      ruleName=(String)it.next();
      catRuleHashMap.put(jcrModule.getCatRules().get(ruleName),ruleName);
    }
  }
  List<org.drools.repository.CategoryItem> assetCategories=jcrAssetItem.getCategories();
  String extendCategories="String_Node_Str";
  int i=0;
  for (  CategoryItem categoryItem : assetCategories) {
    ruleName=(String)catRuleHashMap.get(categoryItem.getName());
    if (ruleName != null) {
      if (i != 0)       extendCategories+="String_Node_Str";
      extendCategories+=ruleDelimiter + ruleName + ruleDelimiter;
      i++;
    }
  }
  return extendCategories;
}

Fixed version (ground truth):
/** 
 * Retrieves form jcrModule the categoryRules and deduce the rule to extend depending of the assetItem categories retrieve the rule name between ruleDelimiter
 * @param jcrModule module which has the category rule defined
 * @param jcrAssetItem asset with the categories, which can extend the rule
 * @param ruleDelimiter The delimiter used to contruct the return value
 * @return the rule to extend depending of the asset category and the category rules defined by package between ruleDelimiter
 */
public String getExtendedRuleFromCategoryRules(Module jcrModule,AssetItem jcrAssetItem,String ruleDelimiter){
  HashMap catRuleHashMap=new HashMap();
  String ruleName;
  if (jcrModule.getCatRules() != null && jcrModule.getCatRules().keySet() != null && jcrModule.getCatRules().keySet().size() > 0) {
    for (Iterator it=jcrModule.getCatRules().keySet().iterator(); it.hasNext(); ) {
      ruleName=(String)it.next();
      catRuleHashMap.put(jcrModule.getCatRules().get(ruleName),ruleName);
    }
  }
  List<org.drools.repository.CategoryItem> assetCategories=jcrAssetItem.getCategories();
  StringBuilder extendCategoriesBuilder=new StringBuilder();
  int i=0;
  for (  CategoryItem categoryItem : assetCategories) {
    ruleName=(String)catRuleHashMap.get(categoryItem.getName());
    if (ruleName != null) {
      if (i != 0)       extendCategoriesBuilder.append("String_Node_Str");
      extendCategoriesBuilder.append(ruleDelimiter);
      extendCategoriesBuilder.append(ruleName);
      extendCategoriesBuilder.append(ruleDelimiter);
      i++;
    }
  }
  return extendCategoriesBuilder.toString();
}
Program: 53220
Project: 53220
Buggy source:
/** 
 * Constructs the extends expression, using the asset categories and the module categoryRules, and adds to the passed content. If passed content has an "extend" expression this function returns the same content with the extra extend added, If not, constructs another "extend" with the new rule and modify the content.
 * @param jcrModule module with the categoryRules
 * @param jcrAssetItem asset with the categories to decide the extend expression to add
 * @param content string to be completed with the necessary extend
 * @return the content passed with the extend expression if it's necessary.
 */
public String getExtendExpression(Module jcrModule,AssetItem jcrAssetItem,String content){
  String extendedRules=getExtendedRuleFromCategoryRules(jcrModule,jcrAssetItem,"String_Node_Str");
  if (extendedRules != null && extendedRules.trim().length() > 0) {
    String[] contentSplit=content.split("String_Node_Str");
    String ruleName=contentSplit[0];
    if (ruleName.indexOf("String_Node_Str") == -1) {
      contentSplit[0]+="String_Node_Str" + extendedRules;
    }
 else {
      contentSplit[0]+="String_Node_Str" + extendedRules;
    }
    String str="String_Node_Str";
    for (    String s : contentSplit) {
      str+=s + "String_Node_Str";
    }
    return str;
  }
  return content;
}

Fixed version (ground truth):
/** 
 * Constructs the extends expression, using the asset categories and the module categoryRules, and adds to the passed content. If passed content has an "extend" expression this function returns the same content with the extra extend added, If not, constructs another "extend" with the new rule and modify the content.
 * @param jcrModule module with the categoryRules
 * @param jcrAssetItem asset with the categories to decide the extend expression to add
 * @param content string to be completed with the necessary extend
 * @return the content passed with the extend expression if it's necessary.
 */
public String getExtendExpression(Module jcrModule,AssetItem jcrAssetItem,String content){
  String extendedRules=getExtendedRuleFromCategoryRules(jcrModule,jcrAssetItem,"String_Node_Str");
  if (extendedRules != null && extendedRules.trim().length() > 0) {
    String[] contentSplit=content.split("String_Node_Str");
    String ruleName=contentSplit[0];
    if (ruleName.indexOf("String_Node_Str") == -1) {
      contentSplit[0]+="String_Node_Str" + extendedRules;
    }
 else {
      contentSplit[0]+="String_Node_Str" + extendedRules;
    }
    StringBuilder contentWithExtendsBuilder=new StringBuilder();
    for (    String s : contentSplit) {
      contentWithExtendsBuilder.append(s);
      contentWithExtendsBuilder.append("String_Node_Str");
    }
    return contentWithExtendsBuilder.toString();
  }
  return content;
}
Program: 53221
Project: 53221
Buggy source:
private String getPackageName(Module jcrModule){
  String packageName=jcrModule.getName();
  int dotIndex=packageName.indexOf("String_Node_Str");
  return packageName;
}

Fixed version (ground truth):
private String getPackageName(Module jcrModule){
  String packageName=jcrModule.getName();
  return packageName;
}
Program: 53223
Project: 53223
Buggy source:
private boolean parseArgOutputVfsRepository(CommandLine commandLine,HelpFormatter formatter,Options options){
  outputRepoName=commandLine.getOptionValue("String_Node_Str",DEFAULT_MIGRATION_FILE_SYSTEM);
  outputVfsRepository=new File(commandLine.getOptionValue("String_Node_Str","String_Node_Str"));
  forceOverwriteOutputVfsRepository=commandLine.hasOption("String_Node_Str");
  if (outputVfsRepository.exists()) {
    if (forceOverwriteOutputVfsRepository) {
      try {
        FileUtils.deleteDirectory(outputVfsRepository);
      }
 catch (      IOException e) {
        System.out.println("String_Node_Str" + outputVfsRepository.getAbsolutePath() + "String_Node_Str"+ e);
        return false;
      }
    }
 else {
      System.out.println("String_Node_Str" + outputVfsRepository.getAbsolutePath() + "String_Node_Str");
      return false;
    }
  }
  try {
    outputVfsRepository=outputVfsRepository.getCanonicalFile();
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str" + outputVfsRepository + "String_Node_Str"+ e);
    return false;
  }
  outputVfsRepository.mkdirs();
  return true;
}

Fixed version (ground truth):
private boolean parseArgOutputVfsRepository(CommandLine commandLine,HelpFormatter formatter,Options options){
  outputRepoName=commandLine.getOptionValue("String_Node_Str",DEFAULT_MIGRATION_FILE_SYSTEM);
  outputVfsRepository=new File(commandLine.getOptionValue("String_Node_Str","String_Node_Str"));
  forceOverwriteOutputVfsRepository=commandLine.hasOption("String_Node_Str");
  if (outputVfsRepository.exists()) {
    if (forceOverwriteOutputVfsRepository) {
      try {
        FileUtils.deleteDirectory(outputVfsRepository);
      }
 catch (      IOException e) {
        System.out.println("String_Node_Str" + outputVfsRepository.getAbsolutePath() + "String_Node_Str"+ e);
        return false;
      }
    }
 else {
      System.out.println("String_Node_Str" + outputVfsRepository.getAbsolutePath() + "String_Node_Str");
      return false;
    }
  }
  try {
    outputVfsRepository=outputVfsRepository.getCanonicalFile();
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str" + outputVfsRepository + "String_Node_Str"+ e);
    return false;
  }
  try {
    FileUtils.forceMkdir(outputVfsRepository);
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return true;
}
Program: 53224
Project: 53224
Buggy source:
public void migrateAssetHistory(Module jcrModule,String assetUUID) throws SerializationException {
  String currentVersionAssetName="String_Node_Str";
  try {
    Path previousVersionPath=null;
    TableDataResult history=jcrRepositoryAssetService.loadItemHistory(assetUUID);
    TableDataRow[] rows=history.data;
    Arrays.sort(rows,new Comparator<TableDataRow>(){
      public int compare(      TableDataRow r1,      TableDataRow r2){
        Integer v2=Integer.valueOf(r2.values[0]);
        Integer v1=Integer.valueOf(r1.values[0]);
        return v1.compareTo(v2);
      }
    }
);
    for (    TableDataRow row : rows) {
      String versionSnapshotUUID=row.id;
      AssetItem historicalAssetJCR=rulesRepository.loadAssetByUUID(versionSnapshotUUID);
      currentVersionAssetName=historicalAssetJCR.getName();
      previousVersionPath=migrate(jcrModule,historicalAssetJCR,previousVersionPath);
      logger.debug("String_Node_Str",historicalAssetJCR.getName(),historicalAssetJCR.getFormat(),historicalAssetJCR.getVersionNumber(),historicalAssetJCR.getCheckinComment(),historicalAssetJCR.getLastModified().getTime());
    }
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + currentVersionAssetName + "String_Node_Str"+ jcrModule.getName());
  }
}

Fixed version (ground truth):
public void migrateAssetHistory(Module jcrModule,String assetUUID) throws SerializationException {
  String currentVersionAssetName="String_Node_Str";
  try {
    Path previousVersionPath=null;
    TableDataResult history=jcrRepositoryAssetService.loadItemHistory(assetUUID);
    TableDataRow[] rows=history.data;
    Arrays.sort(rows,new Comparator<TableDataRow>(){
      public int compare(      TableDataRow r1,      TableDataRow r2){
        Integer v2=Integer.valueOf(r2.values[0]);
        Integer v1=Integer.valueOf(r1.values[0]);
        return v1.compareTo(v2);
      }
    }
);
    for (    TableDataRow row : rows) {
      String versionSnapshotUUID=row.id;
      AssetItem historicalAssetJCR=rulesRepository.loadAssetByUUID(versionSnapshotUUID);
      currentVersionAssetName=historicalAssetJCR.getName();
      previousVersionPath=migrate(jcrModule,historicalAssetJCR,previousVersionPath);
      logger.debug("String_Node_Str",historicalAssetJCR.getName(),historicalAssetJCR.getFormat(),historicalAssetJCR.getVersionNumber(),historicalAssetJCR.getCheckinComment(),historicalAssetJCR.getLastModified().getTime());
    }
  }
 catch (  RuntimeException e) {
    System.out.println("String_Node_Str" + currentVersionAssetName + "String_Node_Str"+ jcrModule.getName());
  }
}
Program: 53226
Project: 53226
Buggy source:
private void migrate(Module jcrModule){
  jcrModule.setName(migrationPathManager.normalizePackageName(jcrModule.getName()));
  String[] nameSplit=jcrModule.getName().split("String_Node_Str");
  String groupId=nameSplit[0];
  String artifactId=nameSplit[nameSplit.length - 1];
  for (int i=1; i < nameSplit.length - 1; i++) {
    groupId+="String_Node_Str" + nameSplit[i];
  }
  GAV gav=new GAV(groupId,artifactId,"String_Node_Str");
  POM pom=new POM(gav);
  Path modulePath=migrationPathManager.generateRootPath();
  projectService.newProject(makeRepository(modulePath),jcrModule.getName(),pom,"String_Node_Str");
}

Fixed version (ground truth):
private void migrate(Module jcrModule){
  jcrModule.setName(migrationPathManager.normalizePackageName(jcrModule.getName()));
  String[] nameSplit=jcrModule.getName().split("String_Node_Str");
  StringBuilder groupIdBuilder=new StringBuilder();
  groupIdBuilder.append(nameSplit[0]);
  for (int i=1; i < nameSplit.length - 1; i++) {
    groupIdBuilder.append("String_Node_Str");
    groupIdBuilder.append(nameSplit[i]);
  }
  String groupId=groupIdBuilder.toString();
  String artifactId=nameSplit[nameSplit.length - 1];
  GAV gav=new GAV(groupId,artifactId,"String_Node_Str");
  POM pom=new POM(gav);
  Path modulePath=migrationPathManager.generateRootPath();
  projectService.newProject(makeRepository(modulePath),jcrModule.getName(),pom,"String_Node_Str");
}