Program: 59420
Project: 59420
Buggy source:
/** 
 * Given a reportFormat it generates/updates the JSPX showing the form with the generate report submit button.
 * @param report
 */
public void installMvcArtifacts(String report){
  String[] reportNameFormat=ReportMetadata.stripGvNixReportValue(report);
  PathResolver pathResolver=projectOperations.getPathResolver();
  String controllerPath=webScaffoldMetadata.getAnnotationValues().getPath();
  String destinationDirectory=pathResolver.getIdentifier(LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"),"String_Node_Str" + controllerPath);
  if (!fileManager.exists(destinationDirectory)) {
    fileManager.createDirectory(destinationDirectory);
  }
 else {
    File file=new File(destinationDirectory);
    Assert.isTrue(file.isDirectory(),destinationDirectory + "String_Node_Str");
  }
  Document document=getReportFormJsp(reportNameFormat[0],controllerPath);
  writeToDiskIfNecessary(pathResolver.getIdentifier(LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"),"String_Node_Str" + controllerPath + "String_Node_Str"+ reportNameFormat[0]+ "String_Node_Str"),document);
  Map<String,String> properties=new HashMap<String,String>();
  tilesOperations.addViewDefinition(controllerPath,LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"),controllerPath + "String_Node_Str" + reportNameFormat[0],TilesOperationsImpl.DEFAULT_TEMPLATE,"String_Node_Str" + controllerPath + "String_Node_Str"+ reportNameFormat[0]+ "String_Node_Str");
  menuOperations.addMenuItem(new JavaSymbolName(formbackingObject.getSimpleTypeName()),new JavaSymbolName(reportNameFormat[0] + "String_Node_Str"),"String_Node_Str" + formbackingObject.getSimpleTypeName().toLowerCase() + "String_Node_Str"+ reportNameFormat[0]+ "String_Node_Str","String_Node_Str" + controllerPath + "String_Node_Str"+ reportNameFormat[0]+ "String_Node_Str",MenuOperations.DEFAULT_MENU_ITEM_PREFIX,LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"));
  properties.put("String_Node_Str" + formbackingObject.getSimpleTypeName().toLowerCase() + "String_Node_Str"+ reportNameFormat[0]+ "String_Node_Str",new JavaSymbolName(formbackingObject.getSimpleTypeName()).getReadableSymbolName() + "String_Node_Str" + reportNameFormat[0]+ "String_Node_Str");
  properties.put("String_Node_Str" + formbackingObject.getSimpleTypeName().toLowerCase() + "String_Node_Str"+ reportNameFormat[0]+ "String_Node_Str",new JavaSymbolName(formbackingObject.getSimpleTypeName()).getReadableSymbolName() + "String_Node_Str" + reportNameFormat[0]+ "String_Node_Str");
  propFileOperations.addProperties(LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"),"String_Node_Str",properties,true,false);
}

Fixed version (ground truth):
/** 
 * Given a reportFormat it generates/updates the JSPX showing the form with the generate report submit button.
 * @param report
 */
public void installMvcArtifacts(String report){
  String[] reportNameFormat=ReportMetadata.stripGvNixReportValue(report);
  String controllerPath=webScaffoldMetadata.getAnnotationValues().getPath();
  String destinationDirectory=pathResolver.getIdentifier(LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"),"String_Node_Str" + controllerPath);
  if (!fileManager.exists(destinationDirectory)) {
    fileManager.createDirectory(destinationDirectory);
  }
 else {
    File file=new File(destinationDirectory);
    Assert.isTrue(file.isDirectory(),destinationDirectory + "String_Node_Str");
  }
  Document document=getReportFormJsp(reportNameFormat[0],controllerPath);
  writeToDiskIfNecessary(pathResolver.getIdentifier(LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"),"String_Node_Str" + controllerPath + "String_Node_Str"+ reportNameFormat[0]+ "String_Node_Str"),document);
  Map<String,String> properties=new HashMap<String,String>();
  tilesOperations.addViewDefinition(controllerPath,LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"),controllerPath + "String_Node_Str" + reportNameFormat[0],TilesOperationsImpl.DEFAULT_TEMPLATE,"String_Node_Str" + controllerPath + "String_Node_Str"+ reportNameFormat[0]+ "String_Node_Str");
  menuOperations.addMenuItem(new JavaSymbolName(formbackingObject.getSimpleTypeName()),new JavaSymbolName(reportNameFormat[0] + "String_Node_Str"),"String_Node_Str" + formbackingObject.getSimpleTypeName().toLowerCase() + "String_Node_Str"+ reportNameFormat[0]+ "String_Node_Str","String_Node_Str" + controllerPath + "String_Node_Str"+ reportNameFormat[0]+ "String_Node_Str",MenuOperations.DEFAULT_MENU_ITEM_PREFIX,LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"));
  properties.put("String_Node_Str" + formbackingObject.getSimpleTypeName().toLowerCase() + "String_Node_Str"+ reportNameFormat[0]+ "String_Node_Str",new JavaSymbolName(formbackingObject.getSimpleTypeName()).getReadableSymbolName() + "String_Node_Str" + reportNameFormat[0]+ "String_Node_Str");
  properties.put("String_Node_Str" + formbackingObject.getSimpleTypeName().toLowerCase() + "String_Node_Str"+ reportNameFormat[0]+ "String_Node_Str",new JavaSymbolName(formbackingObject.getSimpleTypeName()).getReadableSymbolName() + "String_Node_Str" + reportNameFormat[0]+ "String_Node_Str");
  propFileOperations.addProperties(LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"),"String_Node_Str",properties,true,false);
}