#vulnerable code 
                                public Run getPreviousFinishedBuildOfSameBranch(BuildListener listener) {
        return new DynamicBuildRepository().getPreviousFinishedBuildOfSameBranch(this, getCurrentBranch().toString());
    } 
                            #location 2 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                public Run getPreviousFinishedBuildOfSameBranch(BuildListener listener) {
        return SetupConfig.get().getDynamicBuildRepository()
                .getPreviousFinishedBuildOfSameBranch(this, getCurrentBranch().toString());
    }