Program: 118673
Project: 118673
Buggy source:
protected StringBuffer getProfileArgs(){
  StringBuffer profileBuffer=new StringBuffer();
  profileBuffer.append(TalendMavenConstants.PREFIX_PROFILE);
  profileBuffer.append(SPACE);
  addArg(profileBuffer,true,true,TalendMavenConstants.PROFILE_DEFAULT_SETTING);
  addArg(profileBuffer,isOptionChoosed(ExportChoice.needSourceCode),TalendMavenConstants.PROFILE_INCLUDE_JAVA_SOURCES);
  boolean isBinaries=isOptionChoosed(ExportChoice.binaries);
  addArg(profileBuffer,!isBinaries,TalendMavenConstants.PROFILE_INCLUDE_MAVEN_RESOURCES);
  addArg(profileBuffer,isOptionChoosed(ExportChoice.needJobItem),TalendMavenConstants.PROFILE_INCLUDE_ITEMS);
  addArg(profileBuffer,isOptionChoosed(ExportChoice.includeLibs),TalendMavenConstants.PROFILE_INCLUDE_LIBS);
  addArg(profileBuffer,isBinaries,TalendMavenConstants.PROFILE_INCLUDE_BINARIES);
  addArg(profileBuffer,isLog4jEnable() && isBinaries,TalendMavenConstants.PROFILE_INCLUDE_RUNNING_LOG4J);
  addArg(profileBuffer,isLog4jEnable() && !isBinaries,TalendMavenConstants.PROFILE_INCLUDE_LOG4J);
  addArg(profileBuffer,isBinaries && isOptionChoosed(ExportChoice.needContext),TalendMavenConstants.PROFILE_INCLUDE_CONTEXTS,ProcessUtils.isHDInsight());
  addArg(profileBuffer,isOptionChoosed(ExportChoice.includeTestSource),TalendMavenConstants.PROFILE_INCLUDE_TEST_SOURCES);
  addArg(profileBuffer,isOptionChoosed(ExportChoice.executeTests),TalendMavenConstants.PROFILE_INCLUDE_TEST_REPORTS);
  addArg(profileBuffer,needXmlMappings(),TalendMavenConstants.PROFILE_INCLUDE_XMLMAPPINGS);
  addArg(profileBuffer,needXmlMappings() && isBinaries,TalendMavenConstants.PROFILE_INCLUDE_RUNNING_XMLMAPPINGS);
  if (needRules()) {
    addArg(profileBuffer,true,TalendMavenConstants.PROFILE_INCLUDE_RULES);
  }
  if (needPigUDFs()) {
    addArg(profileBuffer,isBinaries,TalendMavenConstants.PROFILE_INCLUDE_PIGUDFS_BINARIES);
    addArg(profileBuffer,!isBinaries,TalendMavenConstants.PROFILE_INCLUDE_PIGUDFS_JAVA_SOURCES);
  }
  return profileBuffer;
}

Fixed version (ground truth):
protected StringBuffer getProfileArgs(){
  StringBuffer profileBuffer=new StringBuffer();
  profileBuffer.append(TalendMavenConstants.PREFIX_PROFILE);
  profileBuffer.append(SPACE);
  addArg(profileBuffer,true,true,TalendMavenConstants.PROFILE_DEFAULT_SETTING);
  addArg(profileBuffer,isOptionChoosed(ExportChoice.needSourceCode),TalendMavenConstants.PROFILE_INCLUDE_JAVA_SOURCES);
  boolean isBinaries=isOptionChoosed(ExportChoice.binaries);
  addArg(profileBuffer,!isBinaries,TalendMavenConstants.PROFILE_INCLUDE_MAVEN_RESOURCES);
  addArg(profileBuffer,isOptionChoosed(ExportChoice.needJobItem) || itemDependencies,TalendMavenConstants.PROFILE_INCLUDE_ITEMS);
  addArg(profileBuffer,isOptionChoosed(ExportChoice.includeLibs),TalendMavenConstants.PROFILE_INCLUDE_LIBS);
  addArg(profileBuffer,isBinaries,TalendMavenConstants.PROFILE_INCLUDE_BINARIES);
  addArg(profileBuffer,isLog4jEnable() && isBinaries,TalendMavenConstants.PROFILE_INCLUDE_RUNNING_LOG4J);
  addArg(profileBuffer,isLog4jEnable() && !isBinaries,TalendMavenConstants.PROFILE_INCLUDE_LOG4J);
  addArg(profileBuffer,isBinaries && isOptionChoosed(ExportChoice.needContext),TalendMavenConstants.PROFILE_INCLUDE_CONTEXTS,ProcessUtils.isHDInsight());
  addArg(profileBuffer,isOptionChoosed(ExportChoice.includeTestSource),TalendMavenConstants.PROFILE_INCLUDE_TEST_SOURCES);
  addArg(profileBuffer,isOptionChoosed(ExportChoice.executeTests),TalendMavenConstants.PROFILE_INCLUDE_TEST_REPORTS);
  addArg(profileBuffer,needXmlMappings(),TalendMavenConstants.PROFILE_INCLUDE_XMLMAPPINGS);
  addArg(profileBuffer,needXmlMappings() && isBinaries,TalendMavenConstants.PROFILE_INCLUDE_RUNNING_XMLMAPPINGS);
  if (needRules()) {
    addArg(profileBuffer,true,TalendMavenConstants.PROFILE_INCLUDE_RULES);
  }
  if (needPigUDFs()) {
    addArg(profileBuffer,isBinaries,TalendMavenConstants.PROFILE_INCLUDE_PIGUDFS_BINARIES);
    addArg(profileBuffer,!isBinaries,TalendMavenConstants.PROFILE_INCLUDE_PIGUDFS_JAVA_SOURCES);
  }
  return profileBuffer;
}