Program: 126201
Project: 126201
Buggy source:
/** 
 * Clean the pom_xxx.xml and assembly_xxx.xml and target folder, also clean the module and dependencies.
 */
public void cleanMavenFiles(IProgressMonitor monitor) throws Exception {
  final String routinesPomFileName=PomUtil.getPomFileName(TalendMavenConstants.DEFAULT_ROUTINES_ARTIFACT_ID);
  File[] pomFiles=codeProject.getProject().getLocation().toFile().listFiles(new FilenameFilter(){
    @Override public boolean accept(    File dir,    String name){
      return name.startsWith(TalendMavenConstants.POM_NAME + '_') && name.endsWith(TalendMavenConstants.XML_EXT) && !name.equals(routinesPomFileName);
    }
  }
);
  deleteFiles(pomFiles);
  IFolder assembliesFolder=codeProject.getAssembliesFolder();
  if (assembliesFolder != null && assembliesFolder.exists()) {
    File[] assembliesFiles=assembliesFolder.getLocation().toFile().listFiles(new FilenameFilter(){
      @Override public boolean accept(      File dir,      String name){
        return name.startsWith(TalendMavenConstants.ASSEMBLY_NAME + '_') && name.endsWith(TalendMavenConstants.XML_EXT);
      }
    }
);
    deleteFiles(assembliesFiles);
  }
  FilesUtils.deleteFile(codeProject.getOutputFolder().getParent().getLocation().toFile(),true);
  syncRoutinesPom(true);
  ProjectPomManager projectManager=new ProjectPomManager(codeProject.getProject());
  projectManager.update(monitor,null);
  final Map<String,Object> argumentsMap=new HashMap<String,Object>();
  argumentsMap.put(ITalendProcessJavaProject.ARG_GOAL,TalendMavenConstants.GOAL_COMPILE);
  codeProject.buildModules(monitor,null,argumentsMap);
}

Fixed version (ground truth):
/** 
 * Clean the pom_xxx.xml and assembly_xxx.xml and target folder, also clean the module and dependencies.
 */
public void cleanMavenFiles(IProgressMonitor monitor) throws Exception {
  final String routinesPomFileName=PomUtil.getPomFileName(TalendMavenConstants.DEFAULT_ROUTINES_ARTIFACT_ID);
  File[] pomFiles=codeProject.getProject().getLocation().toFile().listFiles(new FilenameFilter(){
    @Override public boolean accept(    File dir,    String name){
      return name.startsWith(TalendMavenConstants.POM_NAME + '_') && name.endsWith(TalendMavenConstants.XML_EXT) && !name.equals(routinesPomFileName);
    }
  }
);
  deleteFiles(pomFiles);
  IFolder assembliesFolder=codeProject.getAssembliesFolder();
  if (assembliesFolder != null && assembliesFolder.exists()) {
    File[] assembliesFiles=assembliesFolder.getLocation().toFile().listFiles(new FilenameFilter(){
      @Override public boolean accept(      File dir,      String name){
        return name.startsWith(TalendMavenConstants.ASSEMBLY_NAME + '_') && name.endsWith(TalendMavenConstants.XML_EXT);
      }
    }
);
    deleteFiles(assembliesFiles);
  }
  FilesUtils.deleteFile(codeProject.getOutputFolder().getParent().getLocation().toFile(),true);
  syncRoutinesPom(true);
  ProjectPomManager projectManager=new ProjectPomManager(codeProject.getProject());
  projectManager.update(monitor,null);
  final Map<String,Object> argumentsMap=new HashMap<String,Object>();
  argumentsMap.put(TalendProcessArgumentConstant.ARG_GOAL,TalendMavenConstants.GOAL_COMPILE);
  codeProject.buildModules(monitor,null,argumentsMap);
}