Program: 118855
Project: 118855
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);
  if (isLog4jEnable()) {
    addArg(profileBuffer,isBinaries,TalendMavenConstants.PROFILE_INCLUDE_RUNNING_LOG4J);
    addArg(profileBuffer,!isBinaries,TalendMavenConstants.PROFILE_INCLUDE_LOG4J);
  }
  addArg(profileBuffer,isBinaries && isOptionChoosed(ExportChoice.needContext),TalendMavenConstants.PROFILE_INCLUDE_CONTEXTS,isHDInsight());
  addArg(profileBuffer,isOptionChoosed(ExportChoice.includeTestSource),TalendMavenConstants.PROFILE_INCLUDE_TEST_SOURCES);
  addArg(profileBuffer,isOptionChoosed(ExportChoice.executeTests),TalendMavenConstants.PROFILE_INCLUDE_TEST_REPORTS);
  if (needXmlMappings()) {
    addArg(profileBuffer,true,TalendMavenConstants.PROFILE_INCLUDE_XMLMAPPINGS);
    addArg(profileBuffer,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),TalendMavenConstants.PROFILE_INCLUDE_ITEMS);
  addArg(profileBuffer,isOptionChoosed(ExportChoice.includeLibs),TalendMavenConstants.PROFILE_INCLUDE_LIBS);
  addArg(profileBuffer,isBinaries,TalendMavenConstants.PROFILE_INCLUDE_BINARIES);
  if (isLog4jEnable()) {
    addArg(profileBuffer,isBinaries,TalendMavenConstants.PROFILE_INCLUDE_RUNNING_LOG4J);
    addArg(profileBuffer,!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);
  if (needXmlMappings()) {
    addArg(profileBuffer,true,TalendMavenConstants.PROFILE_INCLUDE_XMLMAPPINGS);
    addArg(profileBuffer,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;
}