Dataset Viewer
Auto-converted to Parquet Duplicate
target
int64
func
string
idx
string
func_name_
string
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private void updateSecureSessionFlag() { try { ServletContext context = Jenkins.getInstance().servletContext; Method m; try { ...
0+train++CVE-2014-9635+vul.pkl
JenkinsLocationConfiguration.updateSecureSessionFlag
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private void showUsingTemplate( final VariableHost exporter, final String uri, final String namespace, final boolean includeDo...
0+train++CVE-2020-36634+vul.pkl
ViewExportedVariablesServlet.showUsingTemplate
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private String buildIndex(final List<Variable> varList) { final SetMultimap<String, Integer> uniGram = buildNGramIndex(varList, 1); final SetMultimap<String, ...
1+train++CVE-2020-36634+vul.pkl
ViewExportedVariablesServlet.buildIndex
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private SetMultimap<String, Integer> buildNGramIndex(final List<Variable> varList, final int n) { final TreeMultimap<String, Integer> uniGram = TreeMultimap.create();...
2+train++CVE-2020-36634+vul.pkl
ViewExportedVariablesServlet.buildNGramIndex
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public boolean isValid(Object value, ConstraintValidatorContext context) { final ViolationCollector collector = new ViolationCollector(context); context.disab...
0+train++CVE-2020-11002+vul.pkl
SelfValidatingValidator.isValid
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void addViolation(String propertyName, String message) { violationOccurred = true; String messageTemplate = escapeEl(message); context.buildCon...
1+train++CVE-2020-11002+vul.pkl
ViolationCollector.addViolation
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ViolationCollector(ConstraintValidatorContext context) { this.context = context; } // Code End //To assist with your evaluation, here is some contextual ...
2+train++CVE-2020-11002+vul.pkl
ViolationCollector.ViolationCollector
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void addViolation(String propertyName, Integer index, String message) { violationOccurred = true; String messageTemplate = escapeEl(message); c...
3+train++CVE-2020-11002+vul.pkl
ViolationCollector.addViolation
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ConstraintValidatorContext getContext() { return context; } // Code End //To assist with your evaluation, here is some contextual information. Use the co...
4+train++CVE-2020-11002+vul.pkl
ViolationCollector.getContext
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void addViolation(String message) { violationOccurred = true; String messageTemplate = escapeEl(message); context.buildConstraintViolationWithT...
5+train++CVE-2020-11002+vul.pkl
ViolationCollector.addViolation
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void addViolation(String propertyName, String key, String message) { violationOccurred = true; String messageTemplate = escapeEl(message); cont...
6+train++CVE-2020-11002+vul.pkl
ViolationCollector.addViolation
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private String escapeEl(@Nullable String s) { if (s == null || s.isEmpty()) { return s; } final Matcher m = ESCAPE_PATTERN.matcher(s); ...
7+train++CVE-2020-11002+vul.pkl
ViolationCollector.escapeEl
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void violationMessagesAreEscaped() { assertThat(ConstraintViolations.format(validator.validate(new InjectionExample()))).containsExactly( " ${'...
8+train++CVE-2020-11002+vul.pkl
SelfValidationTest.violationMessagesAreEscaped
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public String getShortDescription() { if(note != null) { return Messages.Cause_RemoteCause_ShortDescriptionWithNote(addr, note); }...
0+train++CVE-2014-2067+vul.pkl
Cause.RemoteCause.getShortDescription
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private void initializeVelocity() { if (velocityEngine == null) { velocityEngine = new VelocityEngine(); Properties props = new Properties(); props.setProperty(Ru...
0+train++CVE-2022-23612+vul.pkl
StartupFilter.initializeVelocity
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public final void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (skipFilter((HttpServletRequ...
1+train++CVE-2022-23612+vul.pkl
StartupFilter.doFilter
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ModelAndView recover(HttpServletRequest request, HttpServletResponse response) throws Exception { Map<String, Object> map = new HashMap<String, Object>(); ...
0+train++CVE-2019-10908+vul.pkl
RecoverController.recover
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (request instanceof Ht...
0+train++CVE-2014-0086+vul.pkl
PushHandlerFilter.doFilter
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void addStudentNote(String studentID, int teacherID, String note, boolean isPositive, String date) { try { stmt = c.createS...
0+train++CVE-2015-10047+vul.pkl
DBManager.addStudentNote
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void addStudentAbsence(String studentID, int lessonID) { try { stmt = c.createStatement(); stmt.exe...
1+train++CVE-2015-10047+vul.pkl
DBManager.addStudentAbsence
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void changeTeacherPassword(int id,String password){ try { stmt = c.createStatement(); ResultSet rs ...
2+train++CVE-2015-10047+vul.pkl
DBManager.changeTeacherPassword
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<Pair<String,String> > getAllStudents() { ArrayList<Pair<String,String> > students = new ArrayList<Pair<String,String> >(); ...
3+train++CVE-2015-10047+vul.pkl
DBManager.getAllStudents
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public User signIn(String login, String password) { //w parze pierwszy argument to string drugi boolean //i true jesli to uczen, false jes...
4+train++CVE-2015-10047+vul.pkl
DBManager.signIn
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void addTeacherUser(String login, String password, int teacherID) { try { stmt = c.createStatement(); ...
5+train++CVE-2015-10047+vul.pkl
DBManager.addTeacherUser
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<Pair<Integer,String> > getTeachersWithoutUser() { ArrayList<Pair<Integer,String> > teachers = new ArrayList<Pair<Integer,String> >(); ...
6+train++CVE-2015-10047+vul.pkl
DBManager.getTeachersWithoutUser
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void addStudent(String name, String lastname, String pesel, int phoneNumber, int classID) { try { stmt = c.createStatement(...
9+train++CVE-2015-10047+vul.pkl
DBManager.addStudent
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<Pair<Integer,String> > getAllClasses(){ ArrayList<Pair<Integer,String> > classes = new ArrayList<Pair<Integer,String> >(); ...
10+train++CVE-2015-10047+vul.pkl
DBManager.getAllClasses
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<Pair<Integer,String> > getStudentSubjects(String studentID) { ArrayList<Pair<Integer,String> > subjects = new ArrayList<Pair<Integer,Stri...
11+train++CVE-2015-10047+vul.pkl
DBManager.getStudentSubjects
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<Pair<String,String> > getStudentsWithoutUser() { ArrayList<Pair<String,String> > students = new ArrayList<Pair<String,String> >(); ...
12+train++CVE-2015-10047+vul.pkl
DBManager.getStudentsWithoutUser
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void yearEnd() { try { stmt = c.createStatement(); stmt.executeUpdate("UPDATE przedmioty SET aktywn...
13+train++CVE-2015-10047+vul.pkl
DBManager.yearEnd
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<Pair<Integer,String> > getTeachersWithoutClass() { ArrayList<Pair<Integer,String> > teachers = new ArrayList<Pair<Integer,String> >(); ...
14+train++CVE-2015-10047+vul.pkl
DBManager.getTeachersWithoutClass
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<ArrayList<String> > getTeacherSchedule(int id){ ArrayList<ArrayList<String> > shedule = new ArrayList<ArrayList<String>>(); ...
15+train++CVE-2015-10047+vul.pkl
DBManager.getTeacherSchedule
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void addSubject(String name, int classID, int teacherID) { try { stmt = c.createStatement(); stmt.e...
16+train++CVE-2015-10047+vul.pkl
DBManager.addSubject
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<Pair<Integer,String> > getTeacherSubjects(int teacherID) { ArrayList<Pair<Integer,String> > subjects = new ArrayList<Pair<Integer,String>...
17+train++CVE-2015-10047+vul.pkl
DBManager.getTeacherSubjects
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void addStudentGrade(int subjectID, String studentID, int gradeValue, int activityID, String topic) { try { stmt = c.create...
18+train++CVE-2015-10047+vul.pkl
DBManager.addStudentGrade
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<Pair<String,String> > getSubjectStudents(int subjectID) { ArrayList<Pair<String,String> > students = new ArrayList<Pair<String,String> >(...
19+train++CVE-2015-10047+vul.pkl
DBManager.getSubjectStudents
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void addTeacher(String name, String lastname) { try { stmt = c.createStatement(); stmt.executeUpdat...
20+train++CVE-2015-10047+vul.pkl
DBManager.addTeacher
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<String> getStudentAbsences(String studentID, String fromData, String toData) { ArrayList<String> absences = new ArrayList<String>(); ...
21+train++CVE-2015-10047+vul.pkl
DBManager.getStudentAbsences
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<String> getStudentNotes(String studentID, String fromData, String toData) { ArrayList<String> notes = new ArrayList<String>(); ...
22+train++CVE-2015-10047+vul.pkl
DBManager.getStudentNotes
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<Pair<String,String> > getAllStudentsByAdmin() { ArrayList<Pair<String,String> > students = new ArrayList<Pair<String,String> >(); ...
23+train++CVE-2015-10047+vul.pkl
DBManager.getAllStudentsByAdmin
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void deactivateStudent(String studentID) { try { stmt = c.createStatement(); stmt.executeUpdate("UP...
24+train++CVE-2015-10047+vul.pkl
DBManager.deactivateStudent
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void addStudentUser(String login, String password, String pesel) { try { stmt = c.createStatement(); ...
25+train++CVE-2015-10047+vul.pkl
DBManager.addStudentUser
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<Pair<String,String> > getStudentsByLesson(int lessonID){ ArrayList<Pair<String,String> > students = new ArrayList<Pair<String,String> >()...
26+train++CVE-2015-10047+vul.pkl
DBManager.getStudentsByLesson
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public static void main(String args[]) { DBManager dbManager = new DBManager(); //String a = "to ja a to nie ja"; ...
27+train++CVE-2015-10047+vul.pkl
DBManager.main
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<String> getStudentGrades(String studentID, int subjectID) { ArrayList<String> grades = new ArrayList<String>(); try { ...
28+train++CVE-2015-10047+vul.pkl
DBManager.getStudentGrades
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<Pair<Integer, String>> getAllTeachers() { ArrayList<Pair<Integer, String>> teachers = new ArrayList<Pair<Integer, String>>(); ...
29+train++CVE-2015-10047+vul.pkl
DBManager.getAllTeachers
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public int addCompletedLesson(String data, int teacherID, int lessonID, String topic) { int i=-1; try { stmt = c.c...
30+train++CVE-2015-10047+vul.pkl
DBManager.addCompletedLesson
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<Pair<Integer,String> > getLessonsByDate(String data){ ArrayList<Pair<Integer,String> > lessons = new ArrayList<Pair<Integer,String> >(); ...
31+train++CVE-2015-10047+vul.pkl
DBManager.getLessonsByDate
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void changeStudentPassword(String pesel,String password){ try { stmt = c.createStatement(); ResultS...
32+train++CVE-2015-10047+vul.pkl
DBManager.changeStudentPassword
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public ArrayList<Pair<Integer,String> > getActivities(){ ArrayList<Pair<Integer,String> > activities = new ArrayList<Pair<Integer,String> >(); ...
34+train++CVE-2015-10047+vul.pkl
DBManager.getActivities
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start void testEq0() throws Exception { this.context.setDoc(this.xwiki.getDocument( new DocumentReference("xwiki", "]] {{noscript/}}", "InvitationCommon"),...
0+train++CVE-2023-37914+vul.pkl
InvitationCommonPageTest.testEq0
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start void testEq1ConfigClassExistsConfigMapTooSmall() throws Exception { // Create an InvitationCommon file. XWikiDocument doc = this.xwiki .getDoc...
1+train++CVE-2023-37914+vul.pkl
InvitationCommonPageTest.testEq1ConfigClassExistsConfigMapTooSmall
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start void testEq1ConfigClassIsNew() throws Exception { String spaceName = "<script>console.log</script>]]{{noscript/}}"; DocumentReference invitationCommonRefe...
2+train++CVE-2023-37914+vul.pkl
InvitationCommonPageTest.testEq1ConfigClassIsNew
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start void displayMessageVelocityMacro() throws Exception { loadPage(new DocumentReference("xwiki", "Invitation", "InvitationCommon")); DocumentReference invita...
3+train++CVE-2023-37914+vul.pkl
InvitationCommonPageTest.displayMessageVelocityMacro
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start void testEq1ConfigClassExistsNewInvitationConfig() throws Exception { // Create an InvitationCommon file. XWikiDocument doc = this.xwiki.getDocument( ...
4+train++CVE-2023-37914+vul.pkl
InvitationCommonPageTest.testEq1ConfigClassExistsNewInvitationConfig
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start void testEq1ConfigClassExistsInvalidFromAddress() throws Exception { // Create an InvitationCommon file. DocumentReference documentReference = ...
5+train++CVE-2023-37914+vul.pkl
InvitationCommonPageTest.testEq1ConfigClassExistsInvalidFromAddress
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start void escapeInfoMessageInternalDocumentParameter() throws Exception { XWikiDocument invitationGuestActionsDocument = loadPage(INVITATION_CONFIG_DOCUMENT_REFERENCE)...
6+train++CVE-2023-37914+vul.pkl
InvitationConfigPageTest.escapeInfoMessageInternalDocumentParameter
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private String getSkinResourcePath(String resource) { String skinFolder = getSkinFolder(); String resourcePath = skinFolder + resource; // Preven...
0+train++CVE-2022-29253+vul.pkl
AbstractResourceSkin.getSkinResourcePath
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private Template getClassloaderTemplate(String suffixPath, String templateName) { return getClassloaderTemplate(Thread.currentThread().getContextClassLoader(), su...
1+train++CVE-2022-29253+vul.pkl
InternalTemplateManager.getClassloaderTemplate
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private Template getClassloaderTemplate(ClassLoader classloader, String suffixPath, String templateName) { String templatePath = suffixPath + templateName; ...
2+train++CVE-2022-29253+vul.pkl
InternalTemplateManager.getClassloaderTemplate
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private AuthnRequestParseResult parseRequest(byte[] xmlBytes) throws SAMLException { String xml = new String(xmlBytes, StandardCharsets.UTF_8); if (logger.isDebugEnable...
0+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.parseRequest
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private ZonedDateTime toZonedDateTime(XMLGregorianCalendar instant) { if (instant == null) { return null; } return instant.toGregorianCalendar().toZonedDateT...
2+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.toZonedDateTime
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private Certificate toCertificate(KeyDescriptorType keyDescriptorType) { try { List<Object> keyData = keyDescriptorType.getKeyInfo().getContent(); for (Object k...
3+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.toCertificate
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private <T> T unmarshallFromDocument(Document document, Class<T> type) throws SAMLException { try { JAXBContext context = JAXBContext.newInstance(type); Unmarsh...
4+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.unmarshallFromDocument
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private ZonedDateTime convertToZonedDateTime(XMLGregorianCalendar cal) { return cal != null ? cal.toGregorianCalendar().toZonedDateTime() : null; } // Code End //To ass...
5+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.convertToZonedDateTime
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private String deflateAndEncode(byte[] result) { Deflater deflater = new Deflater(Deflater.DEFLATED, true); deflater.setInput(result); deflater.finish(); byte[]...
6+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.deflateAndEncode
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private String marshallToString(Document document) throws TransformerException { StringWriter sw = new StringWriter(); TransformerFactory tf = TransformerFactory.newIns...
7+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.marshallToString
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private String attributeToString(Object attribute) { if (attribute == null) { return null; } if (attribute instanceof Number) { return attribute.toStri...
8+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.attributeToString
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private <T> byte[] marshallToBytes(JAXBElement<T> object, Class<T> type) throws SAMLException { try { JAXBContext context = JAXBContext.newInstance(type); Marsh...
9+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.marshallToBytes
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private Document parseFromBytes(byte[] bytes) throws SAMLException { DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); documentBuild...
10+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.parseFromBytes
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private XMLGregorianCalendar toXMLGregorianCalendar(ZonedDateTime instant) { if (instant == null) { return null; } return new XMLGregorianCalendarImpl(Gregor...
11+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.toXMLGregorianCalendar
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public MetaData parseMetaData(String metaDataXML) throws SAMLException { Document document = parseFromBytes(metaDataXML.getBytes(StandardCharsets.UTF_8)); EntityDescrip...
12+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.parseMetaData
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private <T> Document marshallToDocument(JAXBElement<T> object, Class<T> type) throws SAMLException { try { JAXBContext context = JAXBContext.newInstance(type); ...
14+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.marshallToDocument
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private byte[] decodeAndInflate(String encodedRequest) throws SAMLException { byte[] bytes = Base64.getMimeDecoder().decode(encodedRequest); Inflater inflater = new Inf...
15+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.decodeAndInflate
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private String buildRedirectAuthnRequest(AuthnRequestType authnRequest, String relayState, boolean sign, PrivateKey key, Algorithm al...
16+train++CVE-2021-27736+vul.pkl
DefaultSAMLv2Service.buildRedirectAuthnRequest
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public List<Cliente> buscarFuncionarioEmail(String email) throws SQLException, ClassNotFoundException { Connection con = null; PreparedStatement stmt = null...
0+train++CVE-2015-10061+vul.pkl
ClienteDAO.buscarFuncionarioEmail
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public List<Cliente> buscarClienteEmail(String email) throws SQLException, ClassNotFoundException { Connection con = null; PreparedStatement stmt = null; ...
1+train++CVE-2015-10061+vul.pkl
ClienteDAO.buscarClienteEmail
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public List<Cliente> buscarFuncionarioNome(String nome) throws SQLException, ClassNotFoundException { Connection con = null; PreparedStatement stmt = null; ...
2+train++CVE-2015-10061+vul.pkl
ClienteDAO.buscarFuncionarioNome
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public List<Cliente> buscarClienteCPF(String cpf) throws SQLException, ClassNotFoundException { Connection con = null; PreparedStatement stmt = null; ...
3+train++CVE-2015-10061+vul.pkl
ClienteDAO.buscarClienteCPF
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public List<Cliente> buscarFuncionarioCPF(String cpf) throws SQLException, ClassNotFoundException { Connection con = null; PreparedStatement stmt = null; ...
4+train++CVE-2015-10061+vul.pkl
ClienteDAO.buscarFuncionarioCPF
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public List<Cliente> buscarClienteNome(String nome) throws SQLException, ClassNotFoundException { Connection con = null; PreparedStatement stmt = null; ...
5+train++CVE-2015-10061+vul.pkl
ClienteDAO.buscarClienteNome
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public User getUser() { return user; } // Code End //To assist with your evaluation, here is some contextual information. Use the contextual informa...
0+train++CVE-2017-2603+vul.pkl
OfflineCause.UserCause.getUser
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public UserCause(User user, String message) { super(hudson.slaves.Messages._SlaveComputer_DisconnectedBy( user!=null ? user.getId() : Jenk...
1+train++CVE-2017-2603+vul.pkl
OfflineCause.UserCause.UserCause
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private Block tranform(XDOM xdom, Block block) throws RenderingException { TransformationContext transformationContext = new TransformationContext(xdo...
0+train++CVE-2023-26471+vul.pkl
DefaultBlockAsyncRenderer.tranform
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start void executeOk() throws Exception { MacroBlock macroBlock = new MacroBlock("context", Collections.<String, String>emptyMap(), false); MetaData metadata = ...
1+train++CVE-2023-26471+vul.pkl
ContextMacroTest.executeOk
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start void handleForgotUsername() throws Exception { WikiReference wikiReference = new WikiReference("bar"); AuthenticationResourceReference resourceReference =...
0+train++CVE-2023-29506+vul.pkl
AuthenticationResourceReferenceHandlerTest.handleForgotUsername
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start void handleResetPassword() throws Exception { WikiReference wikiReference = new WikiReference("foo"); AuthenticationResourceReference resourceReference = ...
1+train++CVE-2023-29506+vul.pkl
AuthenticationResourceReferenceHandlerTest.handleResetPassword
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String encoding = request.getHeader("Accept-Enc...
0+train++CVE-2014-0121+vul.pkl
TerminalServlet.doPost
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start gogo.Terminal_ctor = function(div, width, height) { var query0 = "w=" + width + "&h=" + height; var query1 = query0 + "&k="; var buf = ""; var timeout; var error_...
1+train++CVE-2014-0121+vul.pkl
gogo.Terminal_ctor
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start gogo.Terminal = function(div, width, height) { return new this.Terminal_ctor(div, width, height); } // Code End //To assist with your evaluation, here is some contextual inf...
2+train++CVE-2014-0121+vul.pkl
gogo.Terminal
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start link: function(scope, element, attrs) { var width = 120; var height = 39; var div = $('<div class="terminal">A</div>').css({ p...
3+train++CVE-2014-0121+vul.pkl
link
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException { HttpServletRequest ...
4+train++CVE-2014-0121+vul.pkl
AuthenticationFilter.doFilter
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start private String getLocalePrefix(FacesContext context) { String localePrefix = null; localePrefix = context.getExternalContext().getRequestParameterMa...
0+train++CVE-2018-14371+vul.pkl
ResourceManager.getLocalePrefix
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start protected ResourceResponse newResourceResponse(Attributes attributes) { PageParameters params = attributes.getParameters(); Long projectId = params.get(PARAM_PROJECT).toLon...
0+train++CVE-2022-39207+vul.pkl
ArtifactResource.newResourceResponse
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start protected IBaseResource addCommonParams(HttpServletRequest theServletRequest, final HomeRequest theRequest, final ModelMap theModel) { final String serverId = theRequest.getSe...
0+train++CVE-2019-12741+vul.pkl
BaseController.addCommonParams
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public static Result changeUserInfo() { String userId = session(Application.USER_ID); DynamicForm requestData = Form.form().bindFromRequest(); String weight = requestData....
0+train++CVE-2015-10034+vul.pkl
AccountController.changeUserInfo
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public static Result changePassword() { DynamicForm requestData = Form.form().bindFromRequest(); String oldPassword = requestData.get("oldPassword"); String newPassword = ...
1+train++CVE-2015-10034+vul.pkl
AccountController.changePassword
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public static Result editAccountSettings() { User user = UsersDao.get().getById(session(USER_ID)); //TODO change session to userId return ok(account.render(user)); ...
2+train++CVE-2015-10034+vul.pkl
Application.editAccountSettings
1
If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'. //The function being analyzed is: //Code Start public static Result showUser(int foreignerId) { int userId = Integer.parseInt(session("user_id")); User user = UsersDao.get().getById(foreignerId + ""); boolean isYourFri...
3+train++CVE-2015-10034+vul.pkl
UsersController.showUser
End of preview. Expand in Data Studio

YAML Metadata Warning:The task_categories "code-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other

RepoVul Dataset

Repo-level Vulnerability Detection Dataset for Fine-tuning Lightweight LLMs

Dataset Description

RepoVul is a comprehensive dataset for repository-level vulnerability detection. This subset contains training, validation, and test data for fine-tuning lightweight Large Language Models (LLMs) on vulnerability detection tasks.

Key Features

  • Task: Binary classification (vulnerable vs non-vulnerable code)
  • Languages: Java and Python
  • Format: Instruction-tuning prompt format
  • Labels: 0 (non-vulnerable) or 1 (vulnerable)
  • Context: Includes repository-level context with function call graphs

Data Format

Each example contains:

{
  "target": 1,  // 1 = vulnerable, 0 = non-vulnerable
  "func": "If the following code snippet has any vulnerabilities...",  // Prompt with code and context
  "idx": "0+train++CVE-2014-9635+vul.pkl",  // CVE mapping identifier
  "func_name_": "function_name"  // Function name
}

Field Descriptions

  • target: Vulnerability label (1 = vulnerable, 0 = non-vulnerable)
  • func: The complete prompt including instruction, code snippet, and repository context
  • idx: Identifier used to map the function back to its CVE and repository
    • Format: {index}+{split}+{project_info}+{CVE_ID}+{label}.pkl
    • Purpose: This field identifies which CVE and whole repository this function belongs to
    • Important: Since multiple CVEs may share the same repository, we aggregate unique functions as test samples to avoid duplicate predictions. The idx field allows mapping predictions back to the original CVE/repository level results
  • func_name_: The name of the function being analyzed

Prompt Structure

The func field includes:

  1. Instruction: "If the following code snippet has any vulnerabilities..."
  2. Code Snippet: The target function to analyze
  3. Context Information:
    • File location
    • Functions that call this function (callers)
    • Functions called by this function (callees)

Dataset Splits

Java Data

Split File Size Examples
Train train.jsonl 53 MB ~200K
Validation valid.jsonl 6.6 MB ~25K
Test test.jsonl 220 MB ~800K

Python Data

Split File Size Examples
Train train_python.jsonl 22 MB ~80K
Validation valid_python.jsonl 2.4 MB ~9K
Test test_python.jsonl 94 MB ~350K

Example Usage

Java Dataset

import json

# Load Java training data
with open('train.jsonl', 'r') as f:
    for line in f:
        example = json.loads(line)
        print(f"Label: {example['target']}")
        print(f"Function: {example['func_name_']}")
        print(f"Prompt: {example['func'][:200]}...")
        break

Python Dataset

import json

# Load Python training data
with open('train_python.jsonl', 'r') as f:
    for line in f:
        example = json.loads(line)
        print(f"Label: {example['target']}")
        print(f"Function: {example['func_name_']}")
        print(f"Prompt: {example['func'][:200]}...")
        break

Mapping Predictions to CVE/Repository Level

Since multiple CVEs may share the same repository, predictions should be aggregated using the idx field:

import json
from collections import defaultdict

# Load test data and make predictions
predictions = {}  # function_name -> prediction
cve_mapping = defaultdict(list)  # cve_id -> list of function predictions

with open('test.jsonl', 'r') as f:
    for line in f:
        example = json.loads(line)

        # Your model makes prediction here
        pred = model.predict(example['func'])
        predictions[example['func_name_']] = pred

        # Parse idx to extract CVE ID
        # Format: "0+test+CVE-2011-4367+vul.pkl"
        parts = example['idx'].split('+')
        if len(parts) >= 4:
            cve_id = parts[2]  # Extract CVE ID
            cve_mapping[cve_id].append(pred)

# Aggregate predictions at CVE level
cve_results = {}
for cve_id, preds in cve_mapping.items():
    # Aggregate by majority vote or averaging
    cve_results[cve_id] = sum(preds) / len(preds)

print(f"CVE-level results: {cve_results}")

Use Cases

  • Fine-tuning: Train lightweight LLMs (CodeBERT, GraphCodeBERT, etc.)
  • Vulnerability Detection: Binary classification of code vulnerabilities
  • Code Analysis: Repository-level vulnerability prediction
  • Benchmarking: Evaluate model performance on vulnerability detection

Supported Vulnerability Types

The dataset covers various CWE categories including:

  • CWE-79: Cross-site Scripting (XSS)
  • CWE-89: SQL Injection
  • CWE-119: Buffer Errors
  • CWE-200: Information Exposure
  • CWE-352: Cross-Site Request Forgery (CSRF)
  • CWE-770: Allocation of Resources Without Limits
  • CWE-20: Improper Input Validation
  • And many more...

Sample Data

Java Example (Vulnerable)

private void updateSecureSessionFlag() {
    try {
        ServletContext context = Jenkins.getInstance().servletContext;
        Method m;
        try {
            m = context.getClass().getMethod("getSessionCookieConfig");
        } catch (NoSuchMethodException x) {
            LOGGER.log(Level.FINE, "Failed to set secure cookie flag", x);
            return;
        }
        Object sessionCookieConfig = m.invoke(context);

        Class scc = Class.forName("javax.servlet.SessionCookieConfig");
        Method setHttpOnly = scc.getMethod("setHttpOnly",boolean.class);
        setHttpOnly.invoke(sessionCookieConfig,true);

        Method setSecure = scc.getMethod("setSecure",boolean.class);
        boolean v = fixNull(jenkinsUrl).startsWith("https");
        setSecure.invoke(sessionCookieConfig,v);
    } catch (Exception e) {
        LOGGER.log(Level.WARNING, "Failed to set secure cookie flag", e);
    }
}

CVE: CVE-2014-9635 Label: Vulnerable

Python Example (Vulnerable)

def handle_get(self) -> bool:
    if self.do_log:
        logmsg = "%-4s %s @%s" % (self.mode, self.req, self.uname)

        if "range" in self.headers:
            try:
                rval = self.headers["range"].split("=", 1)[1]
            except:
                rval = self.headers["range"]

            logmsg += " [\033[36m" + rval + "\033[0m]"

        self.log(logmsg)

    # "embedded" resources
    if self.vpath.startswith(".cpr"):
        if self.vpath.startswith(".cpr/ico/"):
            return self.tx_ico(self.vpath.split("/")[-1], exact=True)

        # ... more code ...

CVE: CVE-2023-37474 Label: Vulnerable

License

This dataset is released under the MIT License.

Downloads last month
21