Program: 62685
Project: 62685
Buggy source:
protected void buildOpenMergeRequests(GitLabPushTrigger trigger,Integer projectId,String projectRef){
  try {
    GitLab api=new GitLab();
    List<GitlabMergeRequest> mergeRequests=api.instance().getOpenMergeRequests(projectId);
    for (    org.gitlab.api.models.GitlabMergeRequest mr : mergeRequests) {
      if (projectRef.endsWith(mr.getSourceBranch()) || (trigger.getTriggerOpenMergeRequestOnPush().equals("String_Node_Str") && projectRef.endsWith(mr.getTargetBranch()))) {
        if (trigger.getCiSkip() && mr.getDescription().contains("String_Node_Str")) {
          LOGGER.log(Level.INFO,"String_Node_Str" + mr.getTitle() + "String_Node_Str");
          continue;
        }
        GitlabBranch branch=api.instance().getBranch(api.instance().getProject(projectId),mr.getSourceBranch());
        LastCommit lastCommit=new LastCommit();
        lastCommit.setId(branch.getCommit().getId());
        lastCommit.setMessage(branch.getCommit().getMessage());
        lastCommit.setUrl(GitlabProject.URL + "String_Node_Str" + projectId+ "String_Node_Str"+ GitlabCommit.URL+ "String_Node_Str"+ branch.getCommit().getId());
        LOGGER.log(Level.FINE,"String_Node_Str" + mr.toString() + "String_Node_Str"+ mr.getSourceBranch()+ "String_Node_Str"+ mr.getTargetBranch()+ "String_Node_Str"+ mr.getState()+ "String_Node_Str"+ (mr.getAssignee() != null ? mr.getAssignee().getName() : "String_Node_Str")+ "String_Node_Str"+ (mr.getAuthor() != null ? mr.getAuthor().getName() : "String_Node_Str")+ "String_Node_Str"+ mr.getId()+ "String_Node_Str"+ mr.getIid()+ "String_Node_Str"+ lastCommit.getId()+ "String_Node_Str");
        GitLabMergeRequest newReq=new GitLabMergeRequest();
        newReq.setObject_kind("String_Node_Str");
        newReq.setObjectAttribute(new ObjectAttributes());
        if (mr.getAssignee() != null)         newReq.getObjectAttribute().setAssignee(mr.getAssignee());
        if (mr.getAuthor() != null)         newReq.getObjectAttribute().setAuthor(mr.getAuthor());
        newReq.getObjectAttribute().setDescription(mr.getDescription());
        newReq.getObjectAttribute().setId(mr.getId());
        newReq.getObjectAttribute().setIid(mr.getIid());
        newReq.getObjectAttribute().setMergeStatus(mr.getState());
        newReq.getObjectAttribute().setSourceBranch(mr.getSourceBranch());
        newReq.getObjectAttribute().setSourceProjectId(mr.getSourceProjectId());
        newReq.getObjectAttribute().setTargetBranch(mr.getTargetBranch());
        newReq.getObjectAttribute().setTargetProjectId(projectId);
        newReq.getObjectAttribute().setTitle(mr.getTitle());
        newReq.getObjectAttribute().setLastCommit(lastCommit);
        Authentication old=SecurityContextHolder.getContext().getAuthentication();
        SecurityContextHolder.getContext().setAuthentication(ACL.SYSTEM);
        try {
          trigger.onPost(newReq);
        }
  finally {
          SecurityContextHolder.getContext().setAuthentication(old);
        }
      }
    }
  }
 catch (  Exception e) {
    LOGGER.warning("String_Node_Str" + e.getMessage());
    e.printStackTrace();
  }
}

Fixed version (ground truth):
protected void buildOpenMergeRequests(GitLabPushTrigger trigger,Integer projectId,String projectRef){
  try {
    GitLab api=new GitLab();
    List<GitlabMergeRequest> mergeRequests=api.instance().getOpenMergeRequests(projectId);
    for (    org.gitlab.api.models.GitlabMergeRequest mr : mergeRequests) {
      if (projectRef.endsWith(mr.getSourceBranch()) || (trigger.getTriggerOpenMergeRequestOnPush().equals("String_Node_Str") && projectRef.endsWith(mr.getTargetBranch()))) {
        if (trigger.getCiSkip() && mr.getDescription().contains("String_Node_Str")) {
          LOGGER.log(Level.INFO,"String_Node_Str" + mr.getTitle() + "String_Node_Str");
          continue;
        }
        Integer srcProjectId=projectId;
        if (!projectRef.endsWith(mr.getSourceBranch())) {
          srcProjectId=mr.getSourceProjectId();
        }
        GitlabBranch branch=api.instance().getBranch(api.instance().getProject(srcProjectId),mr.getSourceBranch());
        LastCommit lastCommit=new LastCommit();
        lastCommit.setId(branch.getCommit().getId());
        lastCommit.setMessage(branch.getCommit().getMessage());
        lastCommit.setUrl(GitlabProject.URL + "String_Node_Str" + srcProjectId+ "String_Node_Str"+ GitlabCommit.URL+ "String_Node_Str"+ branch.getCommit().getId());
        LOGGER.log(Level.FINE,"String_Node_Str" + mr.toString() + "String_Node_Str"+ mr.getSourceBranch()+ "String_Node_Str"+ mr.getTargetBranch()+ "String_Node_Str"+ mr.getState()+ "String_Node_Str"+ (mr.getAssignee() != null ? mr.getAssignee().getName() : "String_Node_Str")+ "String_Node_Str"+ (mr.getAuthor() != null ? mr.getAuthor().getName() : "String_Node_Str")+ "String_Node_Str"+ mr.getId()+ "String_Node_Str"+ mr.getIid()+ "String_Node_Str"+ lastCommit.getId()+ "String_Node_Str");
        GitLabMergeRequest newReq=new GitLabMergeRequest();
        newReq.setObject_kind("String_Node_Str");
        newReq.setObjectAttribute(new ObjectAttributes());
        if (mr.getAssignee() != null)         newReq.getObjectAttribute().setAssignee(mr.getAssignee());
        if (mr.getAuthor() != null)         newReq.getObjectAttribute().setAuthor(mr.getAuthor());
        newReq.getObjectAttribute().setDescription(mr.getDescription());
        newReq.getObjectAttribute().setId(mr.getId());
        newReq.getObjectAttribute().setIid(mr.getIid());
        newReq.getObjectAttribute().setMergeStatus(mr.getState());
        newReq.getObjectAttribute().setSourceBranch(mr.getSourceBranch());
        newReq.getObjectAttribute().setSourceProjectId(mr.getSourceProjectId());
        newReq.getObjectAttribute().setTargetBranch(mr.getTargetBranch());
        newReq.getObjectAttribute().setTargetProjectId(projectId);
        newReq.getObjectAttribute().setTitle(mr.getTitle());
        newReq.getObjectAttribute().setLastCommit(lastCommit);
        Authentication old=SecurityContextHolder.getContext().getAuthentication();
        SecurityContextHolder.getContext().setAuthentication(ACL.SYSTEM);
        try {
          trigger.onPost(newReq);
        }
  finally {
          SecurityContextHolder.getContext().setAuthentication(old);
        }
      }
    }
  }
 catch (  Exception e) {
    LOGGER.warning("String_Node_Str" + e.getMessage());
    e.printStackTrace();
  }
}