nus-yam/ex-repair huggingface dataset:
Program: 109354
Project: 109354
Buggy source:
@Test public void testFindGoodParameterValues() throws Exception {
  Map<String,ParameterRange> propertyRanges=Maps.newHashMap();
  propertyRanges.put("String_Node_Str",new ParameterRange(0.0001,0.1));
  propertyRanges.put("String_Node_Str",new ParameterRange(10,40));
  Callable<Number> evaluator=new Callable<Number>(){
    @Override public Number call() throws IOException, TasteException, InterruptedException {
      PrecisionRecallEvaluator prEvaluator=new PrecisionRecallEvaluator();
      MyrrixIRStatistics stats=(MyrrixIRStatistics)prEvaluator.evaluate(new File("String_Node_Str"),0.9,0.5,null);
      return stats.getMeanAveragePrecision();
    }
  }
;
  ParameterOptimizer optimizer=new ParameterOptimizer(propertyRanges,evaluator);
  Map<String,Number> parameterValues=optimizer.findGoodParameterValues();
  log.info(parameterValues.toString());
  assertEquals(0.1,parameterValues.get("String_Node_Str").doubleValue());
  assertEquals(23,parameterValues.get("String_Node_Str").intValue());
}

Fixed version (ground truth):
@Test public void testFindGoodParameterValues() throws Exception {
  Map<String,ParameterRange> propertyRanges=Maps.newHashMap();
  propertyRanges.put("String_Node_Str",new ParameterRange(0.0001,0.1));
  propertyRanges.put("String_Node_Str",new ParameterRange(10,40));
  Callable<Number> evaluator=new Callable<Number>(){
    @Override public Number call() throws IOException, TasteException, InterruptedException {
      MyrrixIRStatistics stats=(MyrrixIRStatistics)new PrecisionRecallEvaluator().evaluate(new File("String_Node_Str"),0.9,0.5,null);
      return stats == null ? null : stats.getMeanAveragePrecision();
    }
  }
;
  ParameterOptimizer optimizer=new ParameterOptimizer(propertyRanges,evaluator);
  Map<String,Number> parameterValues=optimizer.findGoodParameterValues();
  log.info(String.valueOf(parameterValues));
  assertEquals(0.1,parameterValues.get("String_Node_Str").doubleValue());
  assertEquals(23,parameterValues.get("String_Node_Str").intValue());
}
Program: 109355
Project: 109355
Buggy source:
@Test public void testEval() throws Exception {
  PrecisionRecallEvaluator evaluator=new PrecisionRecallEvaluator();
  MyrrixIRStatistics stats=(MyrrixIRStatistics)evaluator.evaluate(new File("String_Node_Str"));
  log.info(stats.toString());
  assertTrue(stats.getPrecision() > 0.2);
  assertTrue(stats.getRecall() > 0.2);
  assertTrue(stats.getNormalizedDiscountedCumulativeGain() > 0.22);
  assertTrue(stats.getF1Measure() > 0.2);
  assertTrue(stats.getMeanAveragePrecision() > 0.125);
}

Fixed version (ground truth):
@Test public void testEval() throws Exception {
  MyrrixIRStatistics stats=(MyrrixIRStatistics)new PrecisionRecallEvaluator().evaluate(new File("String_Node_Str"));
  log.info(String.valueOf(stats));
  assertTrue(stats.getPrecision() > 0.2);
  assertTrue(stats.getRecall() > 0.2);
  assertTrue(stats.getNormalizedDiscountedCumulativeGain() > 0.22);
  assertTrue(stats.getF1Measure() > 0.2);
  assertTrue(stats.getMeanAveragePrecision() > 0.125);
}
Program: 109356
Project: 109356
Buggy source:
@Test public void testEval() throws Exception {
  PrecisionRecallEvaluator evaluator=new PrecisionRecallEvaluator();
  MyrrixIRStatistics stats=(MyrrixIRStatistics)evaluator.evaluate(new File("String_Node_Str"));
  log.info(stats.toString());
  assertTrue(stats.getPrecision() > 0.2);
  assertTrue(stats.getRecall() > 0.2);
  assertTrue(stats.getNormalizedDiscountedCumulativeGain() > 0.22);
  assertTrue(stats.getF1Measure() > 0.2);
  assertTrue(stats.getMeanAveragePrecision() > 0.125);
}

Fixed version (ground truth):
@Test public void testEval() throws Exception {
  MyrrixIRStatistics stats=(MyrrixIRStatistics)new PrecisionRecallEvaluator().evaluate(new File("String_Node_Str"));
  log.info(String.valueOf(stats));
  assertTrue(stats.getPrecision() > 0.2);
  assertTrue(stats.getRecall() > 0.2);
  assertTrue(stats.getNormalizedDiscountedCumulativeGain() > 0.22);
  assertTrue(stats.getF1Measure() > 0.2);
  assertTrue(stats.getMeanAveragePrecision() > 0.125);
}
Program: 109357
Project: 109357
Buggy source:
@Test public void testEval() throws Exception {
  ReconstructionEvaluator evaluator=new ReconstructionEvaluator();
  EvaluationResult stats=evaluator.evaluate(new File("String_Node_Str"));
  log.info(stats.toString());
  assertTrue(stats.getScore() < 0.41);
}

Fixed version (ground truth):
@Test public void testEval() throws Exception {
  EvaluationResult stats=new ReconstructionEvaluator().evaluate(new File("String_Node_Str"));
  log.info(String.valueOf(stats));
  assertTrue(stats.getScore() < 0.41);
}
Program: 109358
Project: 109358
Buggy source:
@Test public void testEval() throws Exception {
  PrecisionRecallEvaluator evaluator=new PrecisionRecallEvaluator();
  MyrrixIRStatistics stats=(MyrrixIRStatistics)evaluator.evaluate(new File("String_Node_Str"));
  log.info(stats.toString());
}

Fixed version (ground truth):
@Test public void testEval() throws Exception {
  MyrrixIRStatistics stats=(MyrrixIRStatistics)new PrecisionRecallEvaluator().evaluate(new File("String_Node_Str"));
  log.info(String.valueOf(stats));
}
Program: 109361
Project: 109361
Buggy source:
/** 
 * @return true iff the given file is a gzip-compressed file with no content; the file itself may notbe empty because it contains gzip headers and footers
 * @throw IOException if the file is not a gzip file or can't be read
 */
public static boolean isGZIPFileEmpty(File f) throws IOException {
  InputStream in=new GZIPInputStream(new FileInputStream(f));
  try {
    return in.read() == -1;
  }
  finally {
    Closeables.close(in,true);
  }
}

Fixed version (ground truth):
/** 
 * @return true iff the given file is a gzip-compressed file with no content; the file itself may notbe empty because it contains gzip headers and footers
 * @throws IOException if the file is not a gzip file or can't be read
 */
public static boolean isGZIPFileEmpty(File f) throws IOException {
  InputStream in=new GZIPInputStream(new FileInputStream(f));
  try {
    return in.read() == -1;
  }
  finally {
    Closeables.close(in,true);
  }
}
Program: 109362
Project: 109362
Buggy source:
/** 
 * @param userVectors user feature vector(s) for which recommendations are being made. This may or may notinfluence which items are returned.
 * @return a set of items most likely to be a good recommendation for the given users. These are returnedas item ID / vector pairs ( {@link FastByIDMap.MapEntry}). They are returned as an   {@link Iterator} --and not just one, but potentially many. If several are returned, then the caller will process the {@link Iterator}s in parallel for speed.
 */
Collection<Iterator<FastByIDMap.MapEntry<float[]>>> getCandidateIterator(float[][] userVectors);

Fixed version (ground truth):
/** 
 * @param userVectors user feature vector(s) for which recommendations are being made. This may or may notinfluence which items are returned.
 * @return a set of items most likely to be a good recommendation for the given users. These are returnedas item ID / vector pairs ( {@link FastByIDMap}'s   {@code MapEntry}). They are returned as an   {@link Iterator} --and not just one, but potentially many. If several are returned, then the caller will process the {@link Iterator}s in parallel for speed.
 */
Collection<Iterator<FastByIDMap.MapEntry<float[]>>> getCandidateIterator(float[][] userVectors);
Program: 109363
Project: 109363
Buggy source:
@Override public double rescore(LongPair itemIDs,double value){
  double result=value;
  for (  Rescorer<LongPair> rescorer : rescorers) {
    value=rescorer.rescore(itemIDs,value);
    if (Double.isNaN(value)) {
      return Double.NaN;
    }
  }
  return result;
}

Fixed version (ground truth):
@Override public double rescore(LongPair itemIDs,double value){
  for (  Rescorer<LongPair> rescorer : rescorers) {
    value=rescorer.rescore(itemIDs,value);
    if (Double.isNaN(value)) {
      return Double.NaN;
    }
  }
  return value;
}
Program: 109364
Project: 109364
Buggy source:
@Override public double rescore(long itemID,double value){
  double result=value;
  for (  IDRescorer rescorer : rescorers) {
    value=rescorer.rescore(itemID,value);
    if (Double.isNaN(value)) {
      return Double.NaN;
    }
  }
  return result;
}

Fixed version (ground truth):
@Override public double rescore(long itemID,double value){
  for (  IDRescorer rescorer : rescorers) {
    value=rescorer.rescore(itemID,value);
    if (Double.isNaN(value)) {
      return Double.NaN;
    }
  }
  return value;
}
Program: 109366
Project: 109366
Buggy source:
/** 
 * @param host Serving Layer host to communicate with. Defaults to {@link #DEFAULT_PORT}.
 */
public void setHost(String host){
  this.host=host;
}

Fixed version (ground truth):
/** 
 * @param host Serving Layer host to communicate with. Defaults to {@link #DEFAULT_PORT}.
 */
public void setHost(String host){
  Preconditions.checkArgument(host == null || (!host.startsWith("String_Node_Str") && !host.startsWith("String_Node_Str")),"String_Node_Str",host);
  this.host=host;
}
Program: 109367
Project: 109367
Buggy source:
@Override public RecommendedItem next(){
  FastByIDMap.MapEntry<float[]> entry=Yiterator.next();
  long itemID=entry.getKey();
  FastIDSet theKnownItemIDs=knownItemIDs;
  if (theKnownItemIDs != null) {
synchronized (theKnownItemIDs) {
      if (theKnownItemIDs.contains(itemID)) {
        return null;
      }
    }
  }
  IDRescorer rescorer=this.rescorer;
  boolean hasRescorer=rescorer != null;
  if (hasRescorer && rescorer.isFiltered(itemID)) {
    return null;
  }
  float[] itemFeatures=entry.getValue();
  double sum=0.0;
  int count=0;
  for (  float[] oneUserFeatures : features) {
    double dot=SimpleVectorMath.dot(itemFeatures,oneUserFeatures);
    if (hasRescorer) {
      dot=rescorer.rescore(itemID,dot);
    }
    sum+=dot;
    count++;
  }
  float result=(float)(sum / count);
  Preconditions.checkState(LangUtils.isFinite(result),"String_Node_Str");
  delegate.set(itemID,result);
  return delegate;
}

Fixed version (ground truth):
@Override public RecommendedItem next(){
  FastByIDMap.MapEntry<float[]> entry=Yiterator.next();
  long itemID=entry.getKey();
  FastIDSet theKnownItemIDs=knownItemIDs;
  if (theKnownItemIDs != null) {
synchronized (theKnownItemIDs) {
      if (theKnownItemIDs.contains(itemID)) {
        return null;
      }
    }
  }
  IDRescorer rescorer=this.rescorer;
  boolean hasRescorer=rescorer != null;
  if (hasRescorer && rescorer.isFiltered(itemID)) {
    return null;
  }
  float[] itemFeatures=entry.getValue();
  double sum=0.0;
  int count=0;
  for (  float[] oneUserFeatures : features) {
    double dot=SimpleVectorMath.dot(itemFeatures,oneUserFeatures);
    if (hasRescorer) {
      dot=rescorer.rescore(itemID,dot);
      if (!LangUtils.isFinite(dot)) {
        return null;
      }
    }
    sum+=dot;
    count++;
  }
  float result=(float)(sum / count);
  Preconditions.checkState(LangUtils.isFinite(result),"String_Node_Str");
  delegate.set(itemID,result);
  return delegate;
}
Program: 109368
Project: 109368
Buggy source:
/** 
 * Handle the change of the brush size
 * @param view the current brush view
 */
private void handleBrushSize(View view){
  float bSize=getResources().getInteger(R.integer.medium_size);
  if (view.getId() == R.id.small_brush) {
    bSize=getResources().getInteger(R.integer.small_size);
  }
 else   if (view.getId() == R.id.large_brush) {
    bSize=getResources().getInteger(R.integer.large_size);
  }
 else   if (view.getId() == R.id.largest_brush) {
    bSize=getResources().getInteger(R.integer.largest_size);
  }
  drawView.setErase(false);
  drawView.setBrushSize(bSize);
}

Fixed version (ground truth):
/** 
 * Handle the change of the brush size
 * @param view the current brush view
 */
public void handleBrushSize(View view){
  drawView.setErase(false);
switch (view.getId()) {
case R.id.small_brush:
    drawView.setBrushSize(getResources().getInteger(R.integer.small_size));
  break;
case R.id.large_brush:
drawView.setBrushSize(getResources().getInteger(R.integer.large_size));
break;
case R.id.largest_brush:
drawView.setBrushSize(getResources().getInteger(R.integer.largest_size));
break;
default :
drawView.setBrushSize(getResources().getInteger(R.integer.medium_size));
}
}
Program: 109369
Project: 109369
Buggy source:
private void handleColorPick(){
  drawView.setErase(false);
  drawView.setBrushSize(drawView.getLastBrushSize());
  openColorPickerDialog(false);
}

Fixed version (ground truth):
private void handleColorPick(){
  drawView.setErase(false);
  openColorPickerDialog(false);
}
Program: 109370
Project: 109370
Buggy source:
/** 
 * Handle the new button click
 */
private void openNewDrawingDialog(){
  MaterialDialog.Builder builder=new MaterialDialog.Builder(this);
  builder.title("String_Node_Str").callback(getMDCallback()).positiveText("String_Node_Str").negativeText("String_Node_Str").content(("String_Node_Str" + "String_Node_Str"));
  builder.show();
}

Fixed version (ground truth):
/** 
 * Handle the new button click
 */
private void openNewDrawingDialog(){
  MaterialDialog.Builder builder=new MaterialDialog.Builder(this);
  builder.title(R.string.action_new_drawing).callback(getMDCallback()).positiveText(R.string.action_ok).negativeText(R.string.action_cancel).content((R.string.action_new_q));
  builder.show();
}
Program: 109371
Project: 109371
Buggy source:
/** 
 * Handle the save button click
 */
private void openCreateJigsawDialog(){
  CharSequence levels[]=new CharSequence[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  MaterialDialog.Builder builder=new MaterialDialog.Builder(this).title("String_Node_Str").items(levels).itemsCallback(getMDListCallback());
  builder.show();
}

Fixed version (ground truth):
/** 
 * Handle the save button click
 */
private void openCreateJigsawDialog(){
  CharSequence levels[]=new CharSequence[]{"String_Node_Str","String_Node_Str","String_Node_Str"};
  MaterialDialog.Builder builder=new MaterialDialog.Builder(this).title(R.string.level_difficulty).items(levels).itemsCallback(getMDListCallback());
  builder.show();
}
Program: 109372
Project: 109372
Buggy source:
/** 
 * Set new brush size for drawing
 * @param newSize the new color
 */
public void setBrushSize(float newSize){
  brushSize=TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,newSize,getResources().getDisplayMetrics());
  drawPaint.setStrokeWidth(brushSize);
  lastBrushSize=brushSize;
}

Fixed version (ground truth):
/** 
 * Set new brush size for drawing
 * @param newSize the new color
 */
public void setBrushSize(float newSize){
  lastBrushSize=brushSize;
  brushSize=TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,newSize,getResources().getDisplayMetrics());
  drawPaint.setStrokeWidth(brushSize);
}
Program: 109376
Project: 109376
Buggy source:
@Override public void step(){
  if (isDone())   return;
  heuristic.prioritize(openSet);
  PathNode current=openSet.remove(0);
  if (complete == null && current.getLocation().equals(end)) {
    complete=reconstructPath(current);
    return;
  }
  calculate(current,false);
  heuristic.prioritize(openSetReverse);
  PathNode currentReverse=openSetReverse.remove(0);
  if (completeReverse == null && currentReverse.getLocation().equals(start))   completeReverse=reconstructPath(currentReverse);
 else   if (completeReverse == null)   calculate(currentReverse,true);
}

Fixed version (ground truth):
@Override public void step(){
  if (isDone())   return;
  PathNode current=heuristic.findNext(openSet);
  openSet.remove(current);
  if (complete == null && current.getLocation().equals(end)) {
    complete=reconstructPath(current);
    return;
  }
  calculate(current,false);
  if (completeReverse != null)   return;
  PathNode currentReverse=heuristic.findNext(openSetReverse);
  openSetReverse.remove(current);
  if (completeReverse == null && currentReverse.getLocation().equals(start))   completeReverse=reconstructPath(currentReverse);
 else   if (completeReverse == null)   calculate(currentReverse,true);
}
Program: 109377
Project: 109377
Buggy source:
@Override public synchronized void run(){
  MainPlayerEntity player=bot.getPlayer();
  if (player == null)   return;
  if (player.getDistanceTo(attackEntity) > 4) {
    BlockLocation location=new BlockLocation((int)attackEntity.getX(),(int)(attackEntity.getY() + 0.5),(int)attackEntity.getZ());
    World world=bot.getWorld();
    BlockLocation original=location;
    BlockLocation below=location.offset(0,-1,0);
    while (!BlockType.getById(world.getBlockIdAt(below)).isSolid() && !world.getPathFinder().getHeuristic().isClimbableBlock(below)) {
      location=below;
      below=below.offset(0,-1,0);
      if (original.getY() - location.getY() >= 5)       return;
    }
    bot.setActivity(new WalkActivity(bot,location,true));
    return;
  }
 else {
    if (attackCooldown > 0) {
      attackCooldown--;
      return;
    }
    ConnectionHandler connectionHandler=bot.getConnectionHandler();
    if (!bot.getTaskManager().getTaskFor(EatTask.class).isActive())     switchToBestSword();
    connectionHandler.sendPacket(new Packet18Animation(player.getId(),Animation.SWING_ARM));
    connectionHandler.sendPacket(new Packet7UseEntity(player.getId(),attackEntity.getId(),1));
    attackCooldown=5;
  }
}

Fixed version (ground truth):
@Override public synchronized void run(){
  MainPlayerEntity player=bot.getPlayer();
  if (player == null)   return;
  if (player.getDistanceTo(attackEntity) > 4) {
    BlockLocation location=new BlockLocation(attackEntity.getLocation());
    World world=bot.getWorld();
    BlockLocation original=location;
    BlockLocation below=location.offset(0,-1,0);
    while (!BlockType.getById(world.getBlockIdAt(below)).isSolid() && !world.getPathFinder().getHeuristic().isClimbableBlock(below)) {
      location=below;
      below=below.offset(0,-1,0);
      if (original.getY() - location.getY() >= 5)       return;
    }
    bot.setActivity(new WalkActivity(bot,location,true));
    return;
  }
 else {
    if (attackCooldown > 0) {
      attackCooldown--;
      return;
    }
    ConnectionHandler connectionHandler=bot.getConnectionHandler();
    if (!bot.getTaskManager().getTaskFor(EatTask.class).isActive())     switchToBestSword();
    connectionHandler.sendPacket(new Packet18Animation(player.getId(),Animation.SWING_ARM));
    connectionHandler.sendPacket(new Packet7UseEntity(player.getId(),attackEntity.getId(),1));
    attackCooldown=5;
  }
}
Program: 109379
Project: 109379
Buggy source:
@Override public void perform(GraphRewrite event,EvaluationContext context,JavaTypeReferenceModel payload){
  List<JavaClassModel> classes=payload.getFile().getJavaClasses();
  classes.forEach(classModel -> {
    GraphService<EjbMessageDrivenModel> ejbMessageDrivenService=new GraphService<>(event.getGraphContext(),EjbMessageDrivenModel.class);
    Iterable<EjbMessageDrivenModel> messageDrivenModels=ejbMessageDrivenService.findAllByProperty(EjbMessageDrivenModel.EJB_IMPLEMENTATION_CLASS,classModel.getClassName(),true);
    if (messageDrivenModels.iterator().hasNext())     return;
    EjbMessageDrivenModel messageDrivenModel=ejbMessageDrivenService.create();
    messageDrivenModel.setApplications(payload.getFile().getApplications());
    messageDrivenModel.setEjbClass(classModel);
  }
);
}

Fixed version (ground truth):
@Override public void perform(GraphRewrite event,EvaluationContext context,JavaTypeReferenceModel payload){
  List<JavaClassModel> classes=payload.getFile().getJavaClasses();
  classes.forEach(classModel -> {
    GraphService<EjbMessageDrivenModel> ejbMessageDrivenService=new GraphService<>(event.getGraphContext(),EjbMessageDrivenModel.class);
    Iterable<EjbMessageDrivenModel> messageDrivenModels=findByClass(event.getGraphContext(),EjbMessageDrivenModel.EJB_IMPLEMENTATION_CLASS,classModel,EjbMessageDrivenModel.class);
    if (messageDrivenModels.iterator().hasNext())     return;
    EjbMessageDrivenModel messageDrivenModel=ejbMessageDrivenService.create();
    messageDrivenModel.setApplications(payload.getFile().getApplications());
    messageDrivenModel.setEjbClass(classModel);
  }
);
}
Program: 109381
Project: 109381
Buggy source:
protected Map<ProjectModel,Map<String,Integer>> countFilesBySuffix(){
  Map<ProjectModel,Map<String,Integer>> result=new HashMap<>();
  Iterable<FileModel> files=this.getGraphContext().getQuery().type(FileModel.class).hasNot(FileModel.IS_DIRECTORY,true).vertices(FileModel.class);
  StreamSupport.stream(files.spliterator(),false).forEach((  FileModel file) -> {
    String suffix=StringUtils.substringAfterLast(file.getFileName(),"String_Node_Str");
    if (suffix.isEmpty()) {
      return;
    }
    ProjectModel projectModel=file.getProjectModel();
    ProjectModel rootProjectModel=projectModel.getRootProjectModel();
    Map<String,Integer> suffixToCount;
    if (rootProjectModel == null) {
      throw new RuntimeException("String_Node_Str");
    }
 else {
      if (!result.containsKey(rootProjectModel)) {
        result.put(rootProjectModel,new HashMap<>());
      }
      suffixToCount=result.get(rootProjectModel);
    }
    Integer val=suffixToCount.get(suffix);
    if (val == null) {
      suffixToCount.put(suffix,1);
    }
 else {
      suffixToCount.put(suffix,val + 1);
    }
  }
);
  return result;
}

Fixed version (ground truth):
public Map<ProjectModel,Map<String,Integer>> countFilesBySuffix(){
  Map<ProjectModel,Map<String,Integer>> result=new HashMap<>();
  Iterable<FileModel> files=this.getGraphContext().getQuery().type(FileModel.class).hasNot(FileModel.IS_DIRECTORY,true).vertices(FileModel.class);
  StreamSupport.stream(files.spliterator(),false).forEach((  FileModel file) -> {
    String suffix=StringUtils.substringAfterLast(file.getFileName(),"String_Node_Str");
    if (suffix.isEmpty() || file.isWindupGenerated()) {
      return;
    }
    ProjectModel projectModel=file.getProjectModel();
    ProjectModel rootProjectModel=projectModel.getRootProjectModel();
    Map<String,Integer> suffixToCount;
    if (rootProjectModel == null) {
      throw new RuntimeException("String_Node_Str");
    }
 else {
      if (!result.containsKey(rootProjectModel)) {
        result.put(rootProjectModel,new HashMap<>());
      }
      suffixToCount=result.get(rootProjectModel);
    }
    Integer val=suffixToCount.get(suffix);
    if (val == null) {
      suffixToCount.put(suffix,1);
    }
 else {
      suffixToCount.put(suffix,val + 1);
    }
  }
);
  return result;
}
Program: 109382
Project: 109382
Buggy source:
@Override public boolean belongsToProject(ProjectModel projectModel){
  return this.getClassFile().belongsToProject(projectModel);
}

Fixed version (ground truth):
@Override public boolean belongsToProject(ProjectModel projectModel){
  FileModel classFile=this.getClassFile();
  if (classFile == null) {
    String name=this.getClassName();
    String aPackage=this.getPackageName();
    Logger.getLogger(JavaClassModel.class.getName()).warning("String_Node_Str");
    return false;
  }
  return this.getClassFile().belongsToProject(projectModel);
}
Program: 109383
Project: 109383
Buggy source:
@Override public Iterable<ProjectModel> getRootProjectModels(){
  return this.getClassFile().getRootProjectModels();
}

Fixed version (ground truth):
@Override public Iterable<ProjectModel> getRootProjectModels(){
  FileModel classFile=this.getClassFile();
  if (classFile == null) {
    String name=this.getClassName();
    String aPackage=this.getPackageName();
    JavaSourceFileModel originalSource=this.getOriginalSource();
    Logger.getLogger(JavaClassModel.class.getName()).warning("String_Node_Str");
    return Collections.emptyList();
  }
  return this.getClassFile().getRootProjectModels();
}
Program: 109384
Project: 109384
Buggy source:
/** 
 * Associates a Set of ProjectModels with this index. This allows us to get from any Project Model to the associated index. NOTE: This should generally include the projectmodel and all child projects (flattened) to make searching easier.
 */
@Adjacency(label=APPLICATION_REPORT_INDEX_TO_PROJECT_MODEL,direction=Direction.OUT) public void addProjectModel(ProjectModel projectModel);

Fixed version (ground truth):
/** 
 * Associates a Set of ProjectModels with this index. This allows us to get from any Project Model to the associated index. NOTE: This should generally include the projectmodel and all child projects (flattened) to make searching easier.
 */
@Adjacency(label=APPLICATION_REPORT_INDEX_TO_PROJECT_MODEL,direction=Direction.OUT) void addProjectModel(ProjectModel projectModel);
Program: 109385
Project: 109385
Buggy source:
/** 
 * Adds a ReportModel that should be displayed in the index
 */
@Adjacency(label=APPLICATION_REPORT_INDEX_TO_REPORT_MODEL,direction=Direction.OUT) public void addApplicationReportModel(ApplicationReportModel reportModel);

Fixed version (ground truth):
/** 
 * Adds a ReportModel that should be displayed in the index
 */
@Adjacency(label=APPLICATION_REPORT_INDEX_TO_REPORT_MODEL,direction=Direction.OUT) void addApplicationReportModel(ApplicationReportModel reportModel);
Program: 109386
Project: 109386
Buggy source:
/** 
 * Get all ReportModels that should be displayed in the index
 */
@Adjacency(label=APPLICATION_REPORT_INDEX_TO_REPORT_MODEL,direction=Direction.OUT) public Iterable<ApplicationReportModel> getApplicationReportModels();

Fixed version (ground truth):
/** 
 * Get all ReportModels that should be displayed in the index
 */
@Adjacency(label=APPLICATION_REPORT_INDEX_TO_REPORT_MODEL,direction=Direction.OUT) Iterable<ApplicationReportModel> getApplicationReportModels();
Program: 109387
Project: 109387
Buggy source:
/** 
 * Associates a Set of ProjectModels with this index. This allows us to get from any Project Model to the associated index. NOTE: This should generally include the projectmodel and all child projects (flattened) to make searching easier.
 */
@Adjacency(label=APPLICATION_REPORT_INDEX_TO_PROJECT_MODEL,direction=Direction.OUT) public Iterable<ProjectModel> getProjectModels();

Fixed version (ground truth):
/** 
 * Associates a Set of ProjectModels with this index. This allows us to get from any Project Model to the associated index. NOTE: This should generally include the projectmodel and all child projects (flattened) to make searching easier.
 */
@Adjacency(label=APPLICATION_REPORT_INDEX_TO_PROJECT_MODEL,direction=Direction.OUT) Iterable<ProjectModel> getProjectModels();
Program: 109391
Project: 109391
Buggy source:
public void start(FramedGraph<EventGraph<TitanGraph>> graph){
  try (PrintWriter out=new PrintWriter("String_Node_Str")){
    String path=getClass().getResource("String_Node_Str").getPath();
    if (path.contains("String_Node_Str")) {
      path=path.split("String_Node_Str")[0];
    }
    if (path.contains("String_Node_Str")) {
      path=path.split("String_Node_Str")[1];
    }
    if (path.endsWith("String_Node_Str")) {
      File rexsterAddonDir=new File(path);
      new File(rexsterExtractDirectory).mkdirs();
      extractZipFile(rexsterAddonDir,rexsterExtractDirectory);
    }
 else {
      String substring=path.substring(0,path.length() - 8);
      rexsterExtractDirectory=substring;
    }
    out.println(createRexsterXmlFileString(configuration));
    out.flush();
    RexsterProperties properties=new RexsterProperties("String_Node_Str");
    configureScriptEngine(properties);
    rexsterServer=new HttpRexsterServer(properties);
    rexsterServer.start(new DefaultRexsterApplication("String_Node_Str",graph.getBaseGraph()));
    rexPro=new RexProRexsterServer(properties,true);
    rexPro.start(new DefaultRexsterApplication("String_Node_Str",graph));
    started=true;
  }
 catch (  FileNotFoundException e) {
    log.warning("String_Node_Str");
  }
catch (  Exception e) {
    log.warning("String_Node_Str");
  }
}

Fixed version (ground truth):
public void start(FramedGraph<EventGraph<TitanGraph>> graph){
  try (PrintWriter out=new PrintWriter("String_Node_Str")){
    String path=getClass().getResource("String_Node_Str").getPath();
    if (path.contains("String_Node_Str")) {
      path=path.split("String_Node_Str")[0];
    }
    if (path.contains("String_Node_Str")) {
      path=path.split("String_Node_Str")[1];
    }
    if (path.endsWith("String_Node_Str")) {
      File rexsterAddonDir=new File(path);
      new File(rexsterExtractDirectory).mkdirs();
      extractJarFile(rexsterAddonDir,rexsterExtractDirectory);
    }
 else {
      String substring=path.substring(0,path.length() - 8);
      rexsterExtractDirectory=substring;
    }
    out.println(createRexsterXmlFileString(configuration));
    out.flush();
    RexsterProperties properties=new RexsterProperties("String_Node_Str");
    configureScriptEngine(properties);
    rexsterServer=new HttpRexsterServer(properties);
    rexsterServer.start(new DefaultRexsterApplication("String_Node_Str",graph.getBaseGraph()));
    rexPro=new RexProRexsterServer(properties,true);
    rexPro.start(new DefaultRexsterApplication("String_Node_Str",graph));
    started=true;
  }
 catch (  Exception e) {
    log.severe("String_Node_Str" + e.getLocalizedMessage());
    e.printStackTrace();
  }
}
Program: 109392
Project: 109392
Buggy source:
@Override public Object exec(@SuppressWarnings("String_Node_Str") List arguments) throws TemplateModelException {
  ExecutionStatistics.get().begin(NAME);
  if (arguments.size() < 2) {
    throw new TemplateModelException("String_Node_Str");
  }
  StringModel projectModelTraversalArg=(StringModel)arguments.get(0);
  ProjectModelTraversal traversal=(ProjectModelTraversal)projectModelTraversalArg.getWrappedObject();
  TemplateBooleanModel recursiveBooleanModel=(TemplateBooleanModel)arguments.get(1);
  boolean recursive=recursiveBooleanModel.getAsBoolean();
  Set<String> includeTags=Collections.emptySet();
  if (arguments.size() >= 3) {
    includeTags=FreeMarkerUtil.simpleSequenceToSet((SimpleSequence)arguments.get(2));
  }
  Set<String> excludeTags=Collections.emptySet();
  if (arguments.size() >= 4) {
    excludeTags=FreeMarkerUtil.simpleSequenceToSet((SimpleSequence)arguments.get(3));
  }
  traversal.reset();
  Map<Severity,Integer> classificationEffortDetails=classificationService.getMigrationEffortBySeverity(traversal,includeTags,excludeTags,recursive);
  traversal.reset();
  Map<Severity,Integer> hintEffortDetails=inlineHintService.getMigrationEffortBySeverity(traversal,includeTags,excludeTags,recursive);
  Map<String,Integer> results=new HashMap<>(classificationEffortDetails.size() + hintEffortDetails.size());
  addAllIncidents(results,classificationEffortDetails);
  addAllIncidents(results,hintEffortDetails);
  ExecutionStatistics.get().end(NAME);
  return results;
}

Fixed version (ground truth):
@Override public Object exec(@SuppressWarnings("String_Node_Str") List arguments) throws TemplateModelException {
  ExecutionStatistics.get().begin(NAME);
  if (arguments.size() < 2) {
    throw new TemplateModelException("String_Node_Str");
  }
  StringModel projectModelTraversalArg=(StringModel)arguments.get(0);
  ProjectModelTraversal traversal=(ProjectModelTraversal)projectModelTraversalArg.getWrappedObject();
  TemplateBooleanModel recursiveBooleanModel=(TemplateBooleanModel)arguments.get(1);
  boolean recursive=recursiveBooleanModel.getAsBoolean();
  Set<String> includeTags=Collections.emptySet();
  if (arguments.size() >= 3) {
    includeTags=FreeMarkerUtil.simpleSequenceToSet((SimpleSequence)arguments.get(2));
  }
  Set<String> excludeTags=Collections.emptySet();
  if (arguments.size() >= 4) {
    excludeTags=FreeMarkerUtil.simpleSequenceToSet((SimpleSequence)arguments.get(3));
  }
  Map<Severity,Integer> classificationEffortDetails=classificationService.getMigrationEffortBySeverity(traversal,includeTags,excludeTags,recursive);
  Map<Severity,Integer> hintEffortDetails=inlineHintService.getMigrationEffortBySeverity(traversal,includeTags,excludeTags,recursive);
  Map<String,Integer> results=new HashMap<>(classificationEffortDetails.size() + hintEffortDetails.size());
  addAllIncidents(results,classificationEffortDetails);
  addAllIncidents(results,hintEffortDetails);
  ExecutionStatistics.get().end(NAME);
  return results;
}
Program: 109394
Project: 109394
Buggy source:
@Override public RuleProviderRegistry getRuleProviderRegistry(GraphContext graphContext){
  WindupConfigurationModel configurationModel=WindupConfigurationService.getConfigurationModel(graphContext);
  FileModel windupRulesPath=new FileService(graphContext).createByFilePath(PathUtil.getWindupRulesDir().toString());
  FileModel userRulesPath=new FileService(graphContext).createByFilePath(PathUtil.getUserRulesDir().toString());
  boolean pathAlreadyAdded=false;
  for (  FileModel existingRulePath : configurationModel.getUserRulesPaths()) {
    if (existingRulePath.equals(windupRulesPath))     pathAlreadyAdded=true;
  }
  if (!pathAlreadyAdded) {
    configurationModel.addUserRulesPath(windupRulesPath);
    configurationModel.addUserRulesPath(userRulesPath);
  }
  for (  Path additionalUserRulesPath : this.userRulesPaths) {
    FileModel additionalRulesFileModel=new FileService(graphContext).createByFilePath(additionalUserRulesPath.toString());
    configurationModel.addUserRulesPath(additionalRulesFileModel);
  }
  this.cachedRegistry=ruleLoader.loadConfiguration(graphContext,null);
  this.cacheRefreshTime=System.currentTimeMillis();
  return this.cachedRegistry;
}

Fixed version (ground truth):
@Override public RuleProviderRegistry getRuleProviderRegistry(GraphContext graphContext){
  initCaches(graphContext);
  return this.cachedRegistry;
}
Program: 109395
Project: 109395
Buggy source:
@Override public Set<String> getAvailableSourceTechnologies(){
  Set<String> sourceOptions=new HashSet<>();
  RuleProviderRegistry registry=getRuleProviderRegistry();
  if (registry == null)   return Collections.emptySet();
  for (  RuleProvider provider : registry.getProviders()) {
    for (    TechnologyReference technologyReference : provider.getMetadata().getSourceTechnologies()) {
      sourceOptions.add(technologyReference.getId());
    }
  }
  return sourceOptions;
}

Fixed version (ground truth):
@Override public Set<String> getAvailableSourceTechnologies(){
  Set<TechnologyReference> sourceOptions=new HashSet<>();
  RuleProviderRegistry registry=getRuleProviderRegistry();
  if (registry == null)   return Collections.emptySet();
  for (  RuleProvider provider : registry.getProviders()) {
    for (    TechnologyReference technologyReference : provider.getMetadata().getSourceTechnologies()) {
      sourceOptions.add(technologyReference);
    }
  }
  addTransformers(sourceOptions);
  return sourceOptions.stream().map(TechnologyReference::getId).collect(Collectors.toSet());
}
Program: 109396
Project: 109396
Buggy source:
@Override public Set<String> getAvailableTargetTechnologies(){
  Set<String> targetOptions=new HashSet<>();
  RuleProviderRegistry registry=getRuleProviderRegistry();
  if (registry == null)   return Collections.emptySet();
  for (  RuleProvider provider : registry.getProviders()) {
    for (    TechnologyReference technologyReference : provider.getMetadata().getTargetTechnologies()) {
      targetOptions.add(technologyReference.getId());
    }
  }
  return targetOptions;
}

Fixed version (ground truth):
@Override public Set<String> getAvailableTargetTechnologies(){
  Set<TechnologyReference> targetOptions=new HashSet<>();
  RuleProviderRegistry registry=getRuleProviderRegistry();
  if (registry == null)   return Collections.emptySet();
  for (  RuleProvider provider : registry.getProviders()) {
    for (    TechnologyReference technologyReference : provider.getMetadata().getTargetTechnologies()) {
      targetOptions.add(technologyReference);
    }
  }
  addTransformers(targetOptions);
  return targetOptions.stream().map(TechnologyReference::getId).collect(Collectors.toSet());
}
Program: 109397
Project: 109397
Buggy source:
/** 
 * Resets the state of this traversal, so it can be reused.
 */
public void reset(){
  this.traversalStrategy.reset();
}

Fixed version (ground truth):
/** 
 * Resets the internal state of this traversal, so it can be reused.
 */
public void reset(){
  this.traversalStrategy.reset();
}
Program: 109398
Project: 109398
Buggy source:
private Set<ProjectModel> addProjects(Set<ProjectModel> existingVertices,ProjectModelTraversal traversal){
  existingVertices.add(traversal.getCanonicalProject());
  for (  ProjectModelTraversal child : traversal.getChildren())   addProjects(existingVertices,child);
  return existingVertices;
}

Fixed version (ground truth):
private Set<ProjectModel> addProjects(Set<ProjectModel> existingVertices,ProjectModelTraversal traversal){
  TraversalState nodeTraversalState=traversal.getTraversalState();
  if (nodeTraversalState == TraversalState.ALL)   existingVertices.add(traversal.getCanonicalProject());
  if (nodeTraversalState != TraversalState.NONE) {
    for (    ProjectModelTraversal child : traversal.getChildren())     addProjects(existingVertices,child);
  }
  return existingVertices;
}
Program: 109399
Project: 109399
Buggy source:
@Override public Iterable<ProjectModelTraversal> getChildren(final ProjectModelTraversal traversal){
  ProjectModel canonicalProject=traversal.getCanonicalProject();
  Iterable<ProjectModelTraversal> defaultChildren=Iterables.transform(canonicalProject.getChildProjects(),new Function<ProjectModel,ProjectModelTraversal>(){
    @Override public ProjectModelTraversal apply(    ProjectModel input){
      return new ProjectModelTraversal(traversal,input,SharedLibsTraversalStrategy.this);
    }
  }
);
  return Iterables.filter(defaultChildren,new Predicate<ProjectModelTraversal>(){
    @Override public boolean apply(    ProjectModelTraversal input){
      final ProjectModel project=input.getCurrent();
      FileModel rootFile=project.getRootFileModel();
      LOG.info("String_Node_Str" + rootFile.getFilePath() + "String_Node_Str"+ rootFile);
      if (!(project instanceof DuplicateProjectModel))       return false;
      LOG.info("String_Node_Str");
      if (!(rootFile instanceof DuplicateArchiveModel))       return false;
      LOG.info("String_Node_Str");
      if (!ProjectService.SHARED_LIBS_UNIQUE_ID.equals(input.getCanonicalProject().getRootProjectModel().getUniqueID()))       return false;
      LOG.info("String_Node_Str");
      final boolean added=alreadySeenHashes.add(rootFile.getSHA1Hash());
      LOG.info("String_Node_Str" + added);
      return added;
    }
  }
);
}

Fixed version (ground truth):
@Override public Iterable<ProjectModelTraversal> getChildren(final ProjectModelTraversal traversal){
  ProjectModel canonicalProject=traversal.getCanonicalProject();
  Iterable<ProjectModelTraversal> defaultChildren=Iterables.transform(canonicalProject.getChildProjects(),new Function<ProjectModel,ProjectModelTraversal>(){
    @Override public ProjectModelTraversal apply(    ProjectModel input){
      return new ProjectModelTraversal(traversal,input,SharedLibsTraversalStrategy.this);
    }
  }
);
  return Iterables.filter(defaultChildren,new Predicate<ProjectModelTraversal>(){
    @Override public boolean apply(    ProjectModelTraversal input){
      ProjectModelTraversal.TraversalState traversalState=getTraversalState(input);
      return traversalState != ProjectModelTraversal.TraversalState.NONE;
    }
  }
);
}
Program: 109400
Project: 109400
Buggy source:
@Override public boolean apply(ProjectModelTraversal input){
  final ProjectModel project=input.getCurrent();
  FileModel rootFile=project.getRootFileModel();
  LOG.info("String_Node_Str" + rootFile.getFilePath() + "String_Node_Str"+ rootFile);
  if (!(project instanceof DuplicateProjectModel))   return false;
  LOG.info("String_Node_Str");
  if (!(rootFile instanceof DuplicateArchiveModel))   return false;
  LOG.info("String_Node_Str");
  if (!ProjectService.SHARED_LIBS_UNIQUE_ID.equals(input.getCanonicalProject().getRootProjectModel().getUniqueID()))   return false;
  LOG.info("String_Node_Str");
  final boolean added=alreadySeenHashes.add(rootFile.getSHA1Hash());
  LOG.info("String_Node_Str" + added);
  return added;
}

Fixed version (ground truth):
@Override public boolean apply(ProjectModelTraversal input){
  ProjectModelTraversal.TraversalState traversalState=getTraversalState(input);
  return traversalState != ProjectModelTraversal.TraversalState.NONE;
}
Program: 109401
Project: 109401
Buggy source:
@Override public void reset(){
  this.alreadySeenHashes=new HashSet<>();
}

Fixed version (ground truth):
@Override public void reset(){
}
Program: 109402
Project: 109402
Buggy source:
/** 
 * Resets the state of this strategy, so it can be reused. For instance, if the strategy is keeping some intermediate data like a set of visited projects etc.
 */
public void reset();

Fixed version (ground truth):
/** 
 * Resets the state of this strategy, so it can be reused. For instance, if the strategy is keeping some intermediate data like a set of visited projects etc.
 */
void reset();
Program: 109405
Project: 109405
Buggy source:
@Override public Object exec(@SuppressWarnings("String_Node_Str") List arguments) throws TemplateModelException {
  ExecutionStatistics.get().begin(NAME);
  if (arguments.size() < 2) {
    throw new TemplateModelException("String_Node_Str");
  }
  StringModel projectModelTraversalArg=(StringModel)arguments.get(0);
  ProjectModelTraversal traversal=(ProjectModelTraversal)projectModelTraversalArg.getWrappedObject();
  TemplateBooleanModel recursiveBooleanModel=(TemplateBooleanModel)arguments.get(1);
  boolean recursive=recursiveBooleanModel.getAsBoolean();
  Set<String> includeTags=Collections.emptySet();
  if (arguments.size() >= 3) {
    includeTags=FreeMarkerUtil.simpleSequenceToSet((SimpleSequence)arguments.get(2));
  }
  Set<String> excludeTags=Collections.emptySet();
  if (arguments.size() >= 4) {
    excludeTags=FreeMarkerUtil.simpleSequenceToSet((SimpleSequence)arguments.get(3));
  }
  traversal.reset();
  Map<Severity,Integer> classifEffortDetails=classificationService.getMigrationEffortBySeverity(traversal,includeTags,excludeTags,recursive);
  traversal.reset();
  Map<Severity,Integer> hintEffortDetails=inlineHintService.getMigrationEffortBySeverity(traversal,includeTags,excludeTags,recursive);
  Map<String,Integer> results=new HashMap<>(classifEffortDetails.size() + hintEffortDetails.size());
  addAllIncidents(results,classifEffortDetails);
  addAllIncidents(results,hintEffortDetails);
  ExecutionStatistics.get().end(NAME);
  return results;
}

Fixed version (ground truth):
@Override public Object exec(@SuppressWarnings("String_Node_Str") List arguments) throws TemplateModelException {
  ExecutionStatistics.get().begin(NAME);
  if (arguments.size() < 2) {
    throw new TemplateModelException("String_Node_Str");
  }
  StringModel projectModelTraversalArg=(StringModel)arguments.get(0);
  ProjectModelTraversal traversal=(ProjectModelTraversal)projectModelTraversalArg.getWrappedObject();
  TemplateBooleanModel recursiveBooleanModel=(TemplateBooleanModel)arguments.get(1);
  boolean recursive=recursiveBooleanModel.getAsBoolean();
  Set<String> includeTags=Collections.emptySet();
  if (arguments.size() >= 3) {
    includeTags=FreeMarkerUtil.simpleSequenceToSet((SimpleSequence)arguments.get(2));
  }
  Set<String> excludeTags=Collections.emptySet();
  if (arguments.size() >= 4) {
    excludeTags=FreeMarkerUtil.simpleSequenceToSet((SimpleSequence)arguments.get(3));
  }
  traversal.reset();
  Map<Severity,Integer> classificationEffortDetails=classificationService.getMigrationEffortBySeverity(traversal,includeTags,excludeTags,recursive);
  traversal.reset();
  Map<Severity,Integer> hintEffortDetails=inlineHintService.getMigrationEffortBySeverity(traversal,includeTags,excludeTags,recursive);
  Map<String,Integer> results=new HashMap<>(classificationEffortDetails.size() + hintEffortDetails.size());
  addAllIncidents(results,classificationEffortDetails);
  addAllIncidents(results,hintEffortDetails);
  ExecutionStatistics.get().end(NAME);
  return results;
}
Program: 109406
Project: 109406
Buggy source:
@Override public InputSource resolveEntity(String name,String publicId,String baseURI,String systemId) throws SAXException, IOException {
  URL url=baseURI != null ? new URL(new URL(baseURI),systemId) : new URL(systemId);
  URLConnection connection=url.openConnection();
  if (!(connection instanceof HttpURLConnection))   return new InputSource(connection.getInputStream());
  HttpURLConnection httpConnection=(HttpURLConnection)connection;
  int status=httpConnection.getResponseCode();
  if ((status != HttpURLConnection.HTTP_OK) && (status == HttpURLConnection.HTTP_MOVED_TEMP || status == HttpURLConnection.HTTP_MOVED_PERM || status == HttpURLConnection.HTTP_SEE_OTHER)) {
    String newUrl=httpConnection.getHeaderField("String_Node_Str");
    httpConnection=(HttpURLConnection)new URL(newUrl).openConnection();
  }
  InputSource inputSource=new InputSource(httpConnection.getInputStream());
  inputSource.setSystemId(url.toString());
  inputSource.setPublicId(publicId);
  return inputSource;
}

Fixed version (ground truth):
@Override public InputSource resolveEntity(String name,String publicId,String baseURI,String systemId) throws SAXException, IOException {
  URL url=baseURI != null ? new URL(new URL(baseURI),systemId) : new URL(systemId);
  URLConnection connection=url.openConnection();
  if (!(connection instanceof HttpURLConnection))   return new InputSource(connection.getInputStream());
  HttpURLConnection httpConnection=(HttpURLConnection)connection;
  int status=httpConnection.getResponseCode();
  for (int i=0; i < 4 && isRedirect(status); i++) {
    String newUrl=httpConnection.getHeaderField("String_Node_Str");
    httpConnection=(HttpURLConnection)new URL(newUrl).openConnection();
    status=httpConnection.getResponseCode();
  }
  InputSource inputSource=new InputSource(httpConnection.getInputStream());
  inputSource.setSystemId(url.toString());
  inputSource.setPublicId(publicId);
  return inputSource;
}
Program: 109408
Project: 109408
Buggy source:
private void validateReportIndex(GraphContext graphContext){
  Path mainReportPath=getReportIndex(graphContext,MAIN_APP_FILENAME);
  Assert.assertNotNull(mainReportPath);
  Path copyAppPath=getReportIndex(graphContext,COPY_EAR_FILENAME);
  Assert.assertNotNull(copyAppPath);
  Path sharedLibsPath=getReportIndex(graphContext,ProjectService.SHARED_LIBS_FILENAME);
  Assert.assertNotNull(sharedLibsPath);
  TestReportIndexReportUtil reportIndex=new TestReportIndexReportUtil();
  reportIndex.loadPage(mainReportPath);
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",0,0));
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",2,0));
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",0,0));
  reportIndex.loadPage(copyAppPath);
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",0,0));
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",2,0));
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",0,0));
  reportIndex.loadPage(sharedLibsPath);
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",2,6));
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",86,584));
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",0,0));
}

Fixed version (ground truth):
private void validateReportIndex(GraphContext graphContext){
  Path mainReportPath=getReportIndex(graphContext,MAIN_APP_FILENAME);
  Assert.assertNotNull(mainReportPath);
  Path copyAppPath=getReportIndex(graphContext,COPY_EAR_FILENAME);
  Assert.assertNotNull(copyAppPath);
  Path sharedLibsPath=getReportIndex(graphContext,ProjectService.SHARED_LIBS_FILENAME);
  Assert.assertNotNull(sharedLibsPath);
  TestReportIndexReportUtil reportIndex=new TestReportIndexReportUtil();
  reportIndex.loadPage(mainReportPath);
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",2,6));
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",88,584));
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",0,0));
  reportIndex.loadPage(copyAppPath);
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",2,6));
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",88,584));
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",0,0));
  reportIndex.loadPage(sharedLibsPath);
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",2,6));
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",86,584));
  Assert.assertTrue(reportIndex.checkIncidentByCategoryRow("String_Node_Str",0,0));
}