Program: 50950
Project: 50950
Buggy source:
public String check(){
  S_LOGGER.debug("String_Node_Str");
  StringBuilder sb=new StringBuilder();
  try {
    Properties sysProps=System.getProperties();
    S_LOGGER.debug("String_Node_Str" + PHRESCO_FILE_SERVER_PORT_NO + "String_Node_Str"+ sysProps.getProperty(PHRESCO_FILE_SERVER_PORT_NO));
    String phrescoFileServerNumber=sysProps.getProperty(PHRESCO_FILE_SERVER_PORT_NO);
    FrameworkConfiguration frameworkConfig=PhrescoFrameworkFactory.getFrameworkConfig();
    ProjectAdministrator administrator=PhrescoFrameworkFactory.getProjectAdministrator();
    Project project=administrator.getProject(projectCode);
    String technology=project.getProjectInfo().getTechnology().getId();
    if (TechnologyTypes.IPHONES.contains(technology)) {
      StringBuilder codeValidatePath=new StringBuilder(Utility.getProjectHome());
      codeValidatePath.append(projectCode);
      codeValidatePath.append(File.separatorChar);
      codeValidatePath.append(DO_NOT_CHECKIN_DIR);
      codeValidatePath.append(File.separatorChar);
      codeValidatePath.append(STATIC_ANALYSIS_REPORT);
      codeValidatePath.append(File.separatorChar);
      codeValidatePath.append(INDEX_HTML);
      File indexPath=new File(codeValidatePath.toString());
      if (indexPath.isFile() && StringUtils.isNotEmpty(phrescoFileServerNumber)) {
        sb.append(HTTP_PROTOCOL);
        sb.append(PROTOCOL_POSTFIX);
        sb.append(LOCALHOST);
        sb.append(COLON);
        sb.append(phrescoFileServerNumber);
        sb.append(FORWARD_SLASH);
        sb.append(projectCode);
        sb.append(FORWARD_SLASH);
        sb.append(DO_NOT_CHECKIN_DIR);
        sb.append(FORWARD_SLASH);
        sb.append(STATIC_ANALYSIS_REPORT);
        sb.append(FORWARD_SLASH);
        sb.append(INDEX_HTML);
      }
 else {
        getHttpRequest().setAttribute(REQ_ERROR,getText(FAILURE_CODE_REVIEW));
      }
    }
 else {
      String serverUrl="String_Node_Str";
      if (StringUtils.isNotEmpty(frameworkConfig.getSonarUrl())) {
        serverUrl=frameworkConfig.getSonarUrl();
      }
 else {
        serverUrl=getHttpRequest().getRequestURL().toString();
        StringBuilder tobeRemoved=new StringBuilder();
        tobeRemoved.append(getHttpRequest().getContextPath());
        tobeRemoved.append(getHttpRequest().getServletPath());
        Pattern pattern=Pattern.compile(tobeRemoved.toString());
        Matcher matcher=pattern.matcher(serverUrl);
        serverUrl=matcher.replaceAll("String_Node_Str");
      }
      StringBuilder builder=new StringBuilder(Utility.getProjectHome());
      builder.append(projectCode);
      builder.append(File.separatorChar);
      builder.append(POM_XML);
      File pomPath=new File(builder.toString());
      PomProcessor processor=new PomProcessor(pomPath);
      String groupId=processor.getModel().getGroupId();
      String artifactId=processor.getModel().getArtifactId();
      sb.append(serverUrl);
      sb.append(frameworkConfig.getSonarReportPath());
      sb.append(groupId);
      sb.append(COLON);
      sb.append(artifactId);
      if (StringUtils.isNotEmpty(report) && !SOURCE_DIR.equals(report)) {
        sb.append(COLON);
        sb.append(report);
      }
      try {
        URL sonarURL=new URL(sb.toString());
        HttpURLConnection connection=(HttpURLConnection)sonarURL.openConnection();
        int responseCode=connection.getResponseCode();
        S_LOGGER.info("String_Node_Str" + responseCode);
        S_LOGGER.debug("String_Node_Str" + responseCode);
        if (responseCode != 200) {
          getHttpRequest().setAttribute(REQ_ERROR,getText(FAILURE_CODE_REVIEW));
          S_LOGGER.debug("String_Node_Str" + APP_CODE);
          return APP_CODE;
        }
      }
 catch (      Exception e) {
        S_LOGGER.error("String_Node_Str" + FrameworkUtil.getStackTraceAsString(e));
        new LogErrorReport(e,"String_Node_Str");
        getHttpRequest().setAttribute(REQ_ERROR,getText(FAILURE_CODE_REVIEW));
        return APP_CODE;
      }
    }
  }
 catch (  Exception e) {
    S_LOGGER.error("String_Node_Str" + FrameworkUtil.getStackTraceAsString(e));
  }
  getHttpRequest().setAttribute(REQ_PROJECT_CODE,projectCode);
  getHttpRequest().setAttribute(REQ_SONAR_PATH,sb.toString());
  return APP_CODE;
}

Fixed version (ground truth):
public String check(){
  S_LOGGER.debug("String_Node_Str");
  StringBuilder sb=new StringBuilder();
  String technology=null;
  try {
    Properties sysProps=System.getProperties();
    S_LOGGER.debug("String_Node_Str" + PHRESCO_FILE_SERVER_PORT_NO + "String_Node_Str"+ sysProps.getProperty(PHRESCO_FILE_SERVER_PORT_NO));
    String phrescoFileServerNumber=sysProps.getProperty(PHRESCO_FILE_SERVER_PORT_NO);
    FrameworkConfiguration frameworkConfig=PhrescoFrameworkFactory.getFrameworkConfig();
    ProjectAdministrator administrator=PhrescoFrameworkFactory.getProjectAdministrator();
    Project project=administrator.getProject(projectCode);
    technology=project.getProjectInfo().getTechnology().getId();
    if (TechnologyTypes.IPHONES.contains(technology)) {
      StringBuilder codeValidatePath=new StringBuilder(Utility.getProjectHome());
      codeValidatePath.append(projectCode);
      codeValidatePath.append(File.separatorChar);
      codeValidatePath.append(DO_NOT_CHECKIN_DIR);
      codeValidatePath.append(File.separatorChar);
      codeValidatePath.append(STATIC_ANALYSIS_REPORT);
      codeValidatePath.append(File.separatorChar);
      codeValidatePath.append(INDEX_HTML);
      File indexPath=new File(codeValidatePath.toString());
      if (indexPath.isFile() && StringUtils.isNotEmpty(phrescoFileServerNumber)) {
        sb.append(HTTP_PROTOCOL);
        sb.append(PROTOCOL_POSTFIX);
        sb.append(LOCALHOST);
        sb.append(COLON);
        sb.append(phrescoFileServerNumber);
        sb.append(FORWARD_SLASH);
        sb.append(projectCode);
        sb.append(FORWARD_SLASH);
        sb.append(DO_NOT_CHECKIN_DIR);
        sb.append(FORWARD_SLASH);
        sb.append(STATIC_ANALYSIS_REPORT);
        sb.append(FORWARD_SLASH);
        sb.append(INDEX_HTML);
      }
 else {
        getHttpRequest().setAttribute(REQ_ERROR,getText(FAILURE_CODE_REVIEW));
      }
    }
 else {
      String serverUrl="String_Node_Str";
      if (StringUtils.isNotEmpty(frameworkConfig.getSonarUrl())) {
        serverUrl=frameworkConfig.getSonarUrl();
      }
 else {
        serverUrl=getHttpRequest().getRequestURL().toString();
        StringBuilder tobeRemoved=new StringBuilder();
        tobeRemoved.append(getHttpRequest().getContextPath());
        tobeRemoved.append(getHttpRequest().getServletPath());
        Pattern pattern=Pattern.compile(tobeRemoved.toString());
        Matcher matcher=pattern.matcher(serverUrl);
        serverUrl=matcher.replaceAll("String_Node_Str");
      }
      StringBuilder builder=new StringBuilder(Utility.getProjectHome());
      builder.append(projectCode);
      builder.append(File.separatorChar);
      builder.append(POM_XML);
      File pomPath=new File(builder.toString());
      PomProcessor processor=new PomProcessor(pomPath);
      String groupId=processor.getModel().getGroupId();
      String artifactId=processor.getModel().getArtifactId();
      sb.append(serverUrl);
      sb.append(frameworkConfig.getSonarReportPath());
      sb.append(groupId);
      sb.append(COLON);
      sb.append(artifactId);
      if (StringUtils.isNotEmpty(report) && !SOURCE_DIR.equals(report)) {
        sb.append(COLON);
        sb.append(report);
      }
      try {
        URL sonarURL=new URL(sb.toString());
        HttpURLConnection connection=(HttpURLConnection)sonarURL.openConnection();
        int responseCode=connection.getResponseCode();
        S_LOGGER.info("String_Node_Str" + responseCode);
        S_LOGGER.debug("String_Node_Str" + responseCode);
        if (responseCode != 200) {
          getHttpRequest().setAttribute(REQ_ERROR,getText(FAILURE_CODE_REVIEW));
          S_LOGGER.debug("String_Node_Str" + APP_CODE);
          return APP_CODE;
        }
      }
 catch (      Exception e) {
        S_LOGGER.error("String_Node_Str" + FrameworkUtil.getStackTraceAsString(e));
        new LogErrorReport(e,"String_Node_Str");
        getHttpRequest().setAttribute(REQ_ERROR,getText(FAILURE_CODE_REVIEW));
        return APP_CODE;
      }
    }
  }
 catch (  Exception e) {
    S_LOGGER.error("String_Node_Str" + FrameworkUtil.getStackTraceAsString(e));
  }
  getHttpRequest().setAttribute(REQ_PROJECT_CODE,projectCode);
  getHttpRequest().setAttribute(REQ_TECHNOLOGY,technology);
  getHttpRequest().setAttribute(REQ_SONAR_PATH,sb.toString());
  return APP_CODE;
}