Program: 50948
Project: 50948
Buggy source:
public String createAndroidProfile() throws IOException {
  S_LOGGER.debug("String_Node_Str");
  boolean hasSigning=false;
  try {
    StringBuilder builder=new StringBuilder(Utility.getProjectHome());
    builder.append(projectCode);
    builder.append(File.separatorChar);
    builder.append(POM_XML);
    File pomPath=new File(builder.toString());
    AndroidPomProcessor processor=new AndroidPomProcessor(pomPath);
    hasSigning=processor.hasSigning();
    String profileId=PROFILE_ID;
    String defaultGoal=GOAL_INSTALL;
    Plugin plugin=new Plugin();
    plugin.setGroupId(ANDROID_PROFILE_PLUGIN_GROUP_ID);
    plugin.setArtifactId(ANDROID_PROFILE_PLUGIN_ARTIFACT_ID);
    plugin.setVersion(ANDROID_PROFILE_PLUGIN_VERSION);
    PluginExecution execution=new PluginExecution();
    execution.setId(ANDROID_EXECUTION_ID);
    Goals goal=new Goals();
    goal.getGoal().add(GOAL_SIGN);
    execution.setGoals(goal);
    execution.setPhase(PHASE_PACKAGE);
    execution.setInherited(TRUE);
    AndroidProfile androidProfile=new AndroidProfile();
    androidProfile.setKeystore(keystore);
    androidProfile.setStorepass(storepass);
    androidProfile.setKeypass(keypass);
    androidProfile.setAlias(alias);
    androidProfile.setVerbose(true);
    androidProfile.setVerify(true);
    DocumentBuilderFactory dbfac=DocumentBuilderFactory.newInstance();
    DocumentBuilder docBuilder=dbfac.newDocumentBuilder();
    Document doc=docBuilder.newDocument();
    List<Element> executionConfig=new ArrayList<Element>();
    executionConfig.add(doc.createElement(ELEMENT_ARCHIVE_DIR));
    Element removeExistSignature=doc.createElement(ELEMENT_REMOVE_EXIST_SIGN);
    Element includeElement=doc.createElement(ELEMENT_INCLUDES);
    Element doNotCheckInBuildInclude=doc.createElement(ELEMENT_INCLUDE);
    doNotCheckInBuildInclude.setTextContent(ELEMENT_BUILD);
    Element doNotCheckinTargetInclude=doc.createElement(ELEMENT_INCLUDE);
    doNotCheckinTargetInclude.setTextContent(ELEMENT_TARGET);
    includeElement.appendChild(doNotCheckInBuildInclude);
    includeElement.appendChild(doNotCheckinTargetInclude);
    executionConfig.add(includeElement);
    removeExistSignature.setTextContent(TRUE);
    executionConfig.add(removeExistSignature);
    Element verbos=doc.createElement(ELEMENT_VERBOS);
    verbos.setTextContent(TRUE);
    executionConfig.add(verbos);
    Element verify=doc.createElement(ELEMENT_VERIFY);
    verbos.setTextContent(TRUE);
    executionConfig.add(verify);
    Configuration configValues=new Configuration();
    configValues.getAny().addAll(executionConfig);
    execution.setConfiguration(configValues);
    List<Element> additionalConfigs=new ArrayList<Element>();
    processor.setProfile(profileId,false,defaultGoal,plugin,androidProfile,execution,null,additionalConfigs);
    processor.save();
    profileCreationStatus=true;
    if (hasSigning) {
      profileCreationMessage=getText(PROFILE_UPDATE_SUCCESS);
    }
 else {
      profileCreationMessage=getText(PROFILE_CREATE_SUCCESS);
    }
  }
 catch (  Exception e) {
    S_LOGGER.error("String_Node_Str" + FrameworkUtil.getStackTraceAsString(e));
    profileCreationStatus=false;
    if (hasSigning) {
      profileCreationMessage=getText(PROFILE_UPDATE_ERROR);
    }
 else {
      profileCreationMessage=getText(PROFILE_CREATE_ERROR);
    }
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String createAndroidProfile() throws IOException {
  S_LOGGER.debug("String_Node_Str");
  boolean hasSigning=false;
  try {
    StringBuilder builder=new StringBuilder(Utility.getProjectHome());
    builder.append(projectCode);
    builder.append(File.separatorChar);
    builder.append(POM_XML);
    File pomPath=new File(builder.toString());
    AndroidPomProcessor processor=new AndroidPomProcessor(pomPath);
    hasSigning=processor.hasSigning();
    String profileId=PROFILE_ID;
    String defaultGoal=GOAL_INSTALL;
    Plugin plugin=new Plugin();
    plugin.setGroupId(ANDROID_PROFILE_PLUGIN_GROUP_ID);
    plugin.setArtifactId(ANDROID_PROFILE_PLUGIN_ARTIFACT_ID);
    plugin.setVersion(ANDROID_PROFILE_PLUGIN_VERSION);
    PluginExecution execution=new PluginExecution();
    execution.setId(ANDROID_EXECUTION_ID);
    Goals goal=new Goals();
    goal.getGoal().add(GOAL_SIGN);
    execution.setGoals(goal);
    execution.setPhase(PHASE_PACKAGE);
    execution.setInherited(TRUE);
    AndroidProfile androidProfile=new AndroidProfile();
    androidProfile.setKeystore(keystore);
    androidProfile.setStorepass(storepass);
    androidProfile.setKeypass(keypass);
    androidProfile.setAlias(alias);
    androidProfile.setVerbose(true);
    androidProfile.setVerify(true);
    DocumentBuilderFactory dbfac=DocumentBuilderFactory.newInstance();
    DocumentBuilder docBuilder=dbfac.newDocumentBuilder();
    Document doc=docBuilder.newDocument();
    List<Element> executionConfig=new ArrayList<Element>();
    executionConfig.add(doc.createElement(ELEMENT_ARCHIVE_DIR));
    Element removeExistSignature=doc.createElement(ELEMENT_REMOVE_EXIST_SIGN);
    Element includeElement=doc.createElement(ELEMENT_INCLUDES);
    Element doNotCheckInBuildInclude=doc.createElement(ELEMENT_INCLUDE);
    doNotCheckInBuildInclude.setTextContent(ELEMENT_BUILD);
    Element doNotCheckinTargetInclude=doc.createElement(ELEMENT_INCLUDE);
    doNotCheckinTargetInclude.setTextContent(ELEMENT_TARGET);
    includeElement.appendChild(doNotCheckInBuildInclude);
    includeElement.appendChild(doNotCheckinTargetInclude);
    executionConfig.add(includeElement);
    removeExistSignature.setTextContent(TRUE);
    executionConfig.add(removeExistSignature);
    Element verbos=doc.createElement(ELEMENT_VERBOS);
    verbos.setTextContent(TRUE);
    executionConfig.add(verbos);
    Element verify=doc.createElement(ELEMENT_VERIFY);
    verbos.setTextContent(TRUE);
    executionConfig.add(verify);
    Configuration configValues=new Configuration();
    configValues.getAny().addAll(executionConfig);
    execution.setConfiguration(configValues);
    List<Element> additionalConfigs=new ArrayList<Element>();
    processor.setProfile(profileId,defaultGoal,plugin,androidProfile,execution,null,additionalConfigs);
    processor.save();
    profileCreationStatus=true;
    if (hasSigning) {
      profileCreationMessage=getText(PROFILE_UPDATE_SUCCESS);
    }
 else {
      profileCreationMessage=getText(PROFILE_CREATE_SUCCESS);
    }
  }
 catch (  Exception e) {
    S_LOGGER.error("String_Node_Str" + FrameworkUtil.getStackTraceAsString(e));
    profileCreationStatus=false;
    if (hasSigning) {
      profileCreationMessage=getText(PROFILE_UPDATE_ERROR);
    }
 else {
      profileCreationMessage=getText(PROFILE_CREATE_ERROR);
    }
  }
  return SUCCESS;
}