Dataset Viewer
Auto-converted to Parquet Duplicate
file_id
stringlengths
4
9
content
stringlengths
146
15.9k
repo
stringlengths
9
113
path
stringlengths
6
76
token_length
int64
34
3.46k
original_comment
stringlengths
14
2.81k
comment_type
stringclasses
2 values
detected_lang
stringclasses
1 value
excluded
bool
1 class
file-tokens-Qwen/Qwen2-7B
int64
30
3.35k
comment-tokens-Qwen/Qwen2-7B
int64
3
624
file-tokens-bigcode/starcoder2-7b
int64
34
3.46k
comment-tokens-bigcode/starcoder2-7b
int64
3
696
file-tokens-google/codegemma-7b
int64
36
3.76k
comment-tokens-google/codegemma-7b
int64
3
684
file-tokens-ibm-granite/granite-8b-code-base
int64
34
3.46k
comment-tokens-ibm-granite/granite-8b-code-base
int64
3
696
file-tokens-meta-llama/CodeLlama-7b-hf
int64
36
4.12k
comment-tokens-meta-llama/CodeLlama-7b-hf
int64
3
749
excluded-based-on-tokenizer-Qwen/Qwen2-7B
bool
2 classes
excluded-based-on-tokenizer-bigcode/starcoder2-7b
bool
2 classes
excluded-based-on-tokenizer-google/codegemma-7b
bool
2 classes
excluded-based-on-tokenizer-ibm-granite/granite-8b-code-base
bool
2 classes
excluded-based-on-tokenizer-meta-llama/CodeLlama-7b-hf
bool
2 classes
include-for-inference
bool
2 classes
60_1
/*Write a program to find the shortest path between vertices using bellman-ford algorithm.*/ //bellman ford algorithm for shortest distance from a source node to all the remaining nodes import java.util.*; public class BellmanFord { private static int N; private static int[][] graph; public static void ...
saadhussain01306/computer_net_lab
3.bellman_ford.java
777
//bellman ford algorithm for shortest distance from a source node to all the remaining nodes
line_comment
en
false
717
17
777
18
812
17
777
18
856
18
false
false
false
false
false
true
294_12
package _2017._09._assignments.projectgo.template.v2; //imports import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.BorderPane; import javafx.stage.Stage; //class defnition f public class Go extends Application { // private fields private BorderPane bp_layout; private Go...
JosephCheevers/GO
Go.java
469
// set a title, size and the stack pane as the root of the scene graph
line_comment
en
false
407
17
469
17
464
17
469
17
530
18
false
false
false
false
false
true
909_0
import java.util.Scanner; import java.text.DecimalFormat; /** * Calculate Pi * @date 19 August 2014 * @author Nefari0uss * * This program will request the approximate number of calculations to run in calculating π. * The final result will be displayed on the console. Assumption is that the user inputs an in...
Nefari0uss/calculate-pi
Pi.java
542
/** * Calculate Pi * @date 19 August 2014 * @author Nefari0uss * * This program will request the approximate number of calculations to run in calculating π. * The final result will be displayed on the console. Assumption is that the user inputs an int. * * * Uses the Gottfried Leibniz formula for calcul...
block_comment
en
false
459
138
542
143
535
137
542
143
602
153
false
false
false
false
false
true
1566_0
//2-Given sides of a triangle, check whether the triangle is equilateral, isosceles or scalene. Find it's area import java.util.Scanner; public class Triangle { public static void main(String[] args) { int a, b, c; double p, area; Scanner sc = new Scanner(System.in); System.out.prin...
KadeejaSahlaPV/java
2.java
293
//2-Given sides of a triangle, check whether the triangle is equilateral, isosceles or scalene. Find it's area
line_comment
en
false
264
29
293
30
310
27
293
30
331
33
false
false
false
false
false
true
1946_5
/****************************************************************************** * Compilation: javac UF.java * Execution: java UF < input.txt * Dependencies: StdIn.java StdOut.java * Data files: http://algs4.cs.princeton.edu/15uf/tinyUF.txt * http://algs4.cs.princeton.edu/15uf/mediumUF.txt...
dud3/princeton-algs4
UF.java
1,263
/** * Returns the component identifier for the component containing site {@code p}. * * @param p the integer representing one site * @return the component identifier for the component containing site {@code p} * @throws IndexOutOfBoundsException unless {@code 0 <= p < n} */
block_comment
en
false
1,188
64
1,263
63
1,367
70
1,263
63
1,445
73
false
false
false
false
false
true
5737_3
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Babies do not produce cookies for their player but instead take away * cookies from the other player. * every second. * * @author Patrick Hu * @version November 2022 */ public class Baby extends Building { private boolea...
edzhuang/cookie-clicker-simulation
Baby.java
610
/** * @param player The player who has purchased a Baby */
block_comment
en
false
541
17
610
18
605
18
610
18
688
18
false
false
false
false
false
true
5838_7
import java.util.*; /** * Implementation of the Farmer Wolf Goat Cabbage problem. * * This code was created by Joshua Bates and is his copyright. */ public class FWGC implements Problem { private boolean[] river=new boolean[4]; private int cost; /** * Constructor to create a new FWGC * Cost is...
BatesJosh/Artficial-Intelligence-Problem-Assignment
FWGC.java
1,392
/** * Checks valid successors, and returns all possible successors. * @return */
block_comment
en
false
1,276
20
1,392
21
1,561
22
1,392
21
1,757
25
false
false
false
false
false
true
6881_7
import java.util.ArrayList; import java.util.List; // Basic user interface which defines the basic methods required in the system public interface User { String getuserName(); String getPassword(); String getContact(); List<Event> getBookedEvents(); List<Booking> getBookings(); boolea...
Jainil2004/LocalEventManagementAndBookingSystem
User.java
1,039
// method which prints all the booking details about the bookings made by the user.
line_comment
en
false
961
18
1,039
19
1,185
17
1,039
19
1,272
19
false
false
false
false
false
true
10415_12
package billingsystem; import java.util.ArrayList; import javafx.scene.control.Label; /** * * @author Jason Li * @version 1.0 * @since 19.12.2016 * * * * The Class Table. */ public class Table extends Label implements java.io.Serializable { /** The tbl name. */ private String tblName; /** The peop...
kishanrajput23/Java-Projects-Collections
Billing-system/src/billingsystem/Table.java
732
/** * Gets the number of people at the table. * * @return people - Number of people */
block_comment
en
false
615
26
732
25
775
29
732
25
837
30
false
false
false
false
false
true
10518_0
import java.util.ArrayList; public class Cube extends Traceable { /* A Cube is cube centered at the origin, extending from -1 to +1 on * each axis * * Note: there is a bug in local_intersect so it sometimes does not work * correctly, but this should not give you a problem. */ public String toString() {...
daviddang415/Ray_Tracer
Cube.java
964
/* A Cube is cube centered at the origin, extending from -1 to +1 on * each axis * * Note: there is a bug in local_intersect so it sometimes does not work * correctly, but this should not give you a problem. */
block_comment
en
false
825
61
964
58
964
64
964
58
1,184
66
false
false
false
false
false
true
11161_0
import javax.swing.*; import javax.swing.border.Border; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.FileWriter; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Iterator; import java.util.TreeSet; impo...
asroilf/MovieDBMS
GUI.java
2,703
/** * This class represents a Graphical User Interface (GUI) for the local movie database. * Users can view, add, and manage movies in the database through this interface. * The GUI includes options for sorting and filtering movies by different criteria. * * @author Asliddin * @version 6.0 */
block_comment
en
false
2,362
68
2,703
73
2,903
71
2,703
73
3,310
76
false
false
false
false
false
true
12566_1
//check if a linkedlist is palindrome or not class LL { node head; class node { int data; node next; node(int data) { this.data = data; this.next = null; } } /* * steps: * 1. find middle of LL * 2. reverse 2nd half * 3. ...
GAGANDASH002/Java-DSA
q4.java
510
/* * steps: * 1. find middle of LL * 2. reverse 2nd half * 3. check 1st and 2nd half */
block_comment
en
false
461
43
510
40
568
45
510
40
601
45
false
false
false
false
false
true
13150_9
package LumberYard; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardOpenOption; import java.time.Instant; import java.time.ZoneId; import java.time.format.DateTimeFormatter; /** * LumberYard Log class. */ public class Log{ private static final DateTimeFormatter TIMESTAMP_FORMATTE...
YoungGopher/LumberYard
Log.java
1,600
/** * Get the name of the log. * * @return the name */
block_comment
en
false
1,349
21
1,600
20
1,669
24
1,600
20
1,878
24
false
false
false
false
false
true
14639_1
/* Copyright 2010 Brian Mock * * This file is part of visint. * * visint is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. *...
wavebeem/visint
Debug.java
356
/** * This program controls printing debugging output (or not!). * @author Brian Mock */
block_comment
en
false
317
20
356
23
360
21
356
23
403
22
false
false
false
false
false
true
16462_0
import java.util.ArrayList; import java.io.*; public class Driver { private static ArrayList<Student> studentList; private static ArrayList<String> schoolList; public ArrayList<Student> getStudentList() { return this.studentList; } public void setStudentList(ArrayList<Student> studentList) { this.stude...
mattspahr/CSV-to-Tab
Driver.java
630
/* Reads data from the csv file and creates a Student and stores it in the list. */
block_comment
en
false
545
25
630
25
669
27
630
25
813
30
false
false
false
false
false
true
16477_5
/* Prompts a frame that asks the user for their personal information and inputs it into a list to be accessed from again at a later time. Primarily asks for their first and last name, school name, what type of school they are in, and what quarter or semester they are in currently. Depending on their answers, different...
rooseveltcs/personal-secretary
Asking.java
1,925
/*Shows the introduction text to the user. Primarily is instructions and information to the user*/
block_comment
en
false
1,743
19
1,925
20
2,098
18
1,925
20
2,340
20
false
false
false
false
false
true
16947_10
import java.util.*; public class SRT { private ArrayList<Process> processes; private ArrayList<Process> queue; private Process shortest; private ArrayList<Process> completed; private static int QUANTA_MAX = 99; private static int NUMBER_OF_PROCESSES_TO_MAKE = 30; private int quanta; private double...
devstudent123/Scheduling-Algorithms
SRT.java
1,363
// If the shortest process is done (execution time remaining == 0)
line_comment
en
false
1,199
16
1,363
16
1,383
15
1,363
16
1,787
16
false
false
false
false
false
true
18261_5
public class oop { public static void main(String[] args) { Pen p1= new Pen();// create a pen obj called p1 p1.size=5; System.out.println("Pen Size: "+p1.size); p1.color="Yellow"; System.out.println("Pen Color: "+p1.color); p1.setColor("Red"); //using setter ...
tanXnyx/java_dsa
oop.java
511
//outside of this object, hence we need a method for setting it
line_comment
en
false
468
15
511
15
541
15
511
15
579
16
false
false
false
false
false
true
19027_11
/* Copyright (C) 2004 Geoffrey Alan Washburn This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed...
sangaani/Lab2
Maze.java
1,225
/** * Find out the cardinal direction a {@link Client} is facing. * @param client The {@link Client} being queried. * @return The orientation of the specific {@link Client} as a {@link Direction}. */
block_comment
en
false
1,175
51
1,228
51
1,281
55
1,225
51
1,426
57
false
false
false
false
false
true
20117_71
/* */ import javafx.event.ActionEvent; /* */ import javafx.geometry.Pos; /* */ import javafx.scene.Node; /* */ import javafx.scene.Parent; /* */ import javafx.scene.Scene; /* */ import javafx.scene.control.Button; /* */ import javafx.scene.control.Label; /* */ import javafx.scene.layout....
KavitaDoobay/RockPaperScissors
score.java
1,498
//This class shows the final window with the overall streaks and how many rounds have been won by each player
line_comment
en
false
1,381
22
1,498
23
1,466
21
1,498
23
1,541
23
false
false
false
false
false
true
20619_9
/** * Models a simple Car for the game Racer. * * @author Joe Finney (joe@comp.lancs.ac.uk) */ public class Car { public static String CAR_COLOUR = "#FF0000"; public static String WHEEL_COLOUR = "#404040"; private Rectangle[] parts = new Rectangle[7]; private double xPosition; private double yP...
finneyj/Racer
Car.java
1,126
/** * Determines if this car is touching the given RoadSegment. * * @param s The segment of road to test against. * @return true of this car is touching the given road segment, false otherwise. */
block_comment
en
false
1,061
49
1,126
51
1,199
54
1,126
51
1,305
59
false
false
false
false
false
true
21019_2
import java.util.*; public class Hotel { public static void main(String[] args) { // ["+1A", "+3E", "-1A", "+4F", "+1A", "-3E"] String[] books1 = { "+1A", "+3E", "-1A", "+4F", "+1A", "-3E" }; String[] books2 = {"+1A","+3F","+2B"}; String[] books3 = {"+1E", "-1E", "+1E", "-1E", "+1E", "-1E", "+1E", ...
ruoyangqiu/Leetcode
Hotel.java
701
// I use all the time to figure why my code give a null pointer exception.
line_comment
en
false
615
17
701
17
703
17
701
17
828
17
false
false
false
false
false
true
22558_12
package posix; /** Read and write memory reachable through a C ptr. Memory access is bounds checked to keep it within the size of region addressed by the C ptr. Only classes within the posix package can create CPtr objects, and the use of this class is completely safe at present. This is because we ...
delonnewman/java-posix
CPtr.java
1,503
/** Return the offset of a nested struct. The members must have already been added to the nested struct so that it will have the proper size and alignment. */
block_comment
en
false
1,414
36
1,503
37
1,592
38
1,503
37
1,698
39
false
false
false
false
false
true
24100_9
/** * @author Alena Fisher */ import java.util.ArrayList; public class Coach { // Creating instance variables private String name; private String title; private String department; private String officeLocation; private String phoneNumber; private String email; public C...
AlenaFisher/CS234
S3/Coach.java
606
/** * This method receives 'name' as an explicit parameter and assigns it to the instance variable */
block_comment
en
false
576
23
606
22
727
25
606
22
777
27
false
false
false
false
false
true
24927_5
// 1 dist, 1 exe build in the package ReleaseTemplate.release("community") { distribution("standard").from { exe = Launch4jExeTemplate.exe { from = "/release/standard/exe" } companionFiles = "/release/standard/companion" } } // or could we do dist ? ReleaseTemplate.release("community") { dist { exe = Lau...
alessandroscarlatti/launch4j-gradle-plugin
syntax-demo.java
1,337
// we can translate the release name from either camel case or snake case.
line_comment
en
false
1,167
15
1,337
15
1,312
15
1,337
15
1,569
17
false
false
false
false
false
true
25044_13
import java.util.Random; /** * A Deck of 52 Cards which can be dealt and shuffled * * Some functions could be made much faster with some extra memory. * I invite anyone to do so ;-) * * <P>Source Code: <A HREF="http://www.cs.ualberta.ca/~davidson/poker/src/poker/Deck.java">Deck.java</A><P> * * @...
lukassaul/kelly-poker
Deck.java
1,429
/** * Obtain the number of cards left in the deck */
block_comment
en
false
1,190
15
1,433
15
1,510
17
1,429
14
1,725
19
false
false
false
false
false
true
25245_0
//write a program to calculate the area of square & rectangle overloading the area method. class p6 { void area(int l) { System.out.println("Area of square=> "+(l*l)); } void area(int l,int b) { System.out.println("Area of Rectangle=> "+(l*b)); } public sta...
Rutvik5o/Practice-Programming
p6.java
128
//write a program to calculate the area of square & rectangle overloading the area method.
line_comment
en
false
109
19
128
19
151
17
128
19
155
18
false
false
false
false
false
true
25670_6
/* * class Customer defines a registered customer. It keeps track of the customer's name and address. * A unique id is generated when when a new customer is created. * * Implement the Comparable interface and compare two customers based on name */ public class Customer implements Comparable<Customer> ...
jenniferchung14/E-Commerce-System-Simulator
Customer.java
912
/** Gets the name of the customer. * @return the name of the customer. */
block_comment
en
false
785
20
912
22
980
22
912
22
1,059
23
false
false
false
false
false
true
26033_2
import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.temporal.TemporalField; import java.util.concurrent.Exchanger; import java.util.ArrayList; import java.util.Calendar; import ja...
c00291296/java-forum
ForumDB.java
2,715
/* * Adds a new subforum to the forum * * @param name the name of the subforum to be added */
block_comment
en
false
2,458
32
2,715
29
3,029
34
2,715
29
3,268
35
false
false
false
false
false
true
27718_2
// https://www.hackerearth.com/practice/data-structures/disjoint-data-strutures/basics-of-disjoint-data-structures/practice-problems/algorithm/marriage-problem/editorial/ /* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Mai...
maiquynhtruong/algorithms-and-problems
marriage-problem.java
699
/* Name of the class has to be "Main" only if the class is public. */
block_comment
en
false
561
19
699
19
692
19
699
19
807
19
false
false
false
false
false
true
29683_0
public class House implements Cloneable, Comparable<House> { private int id; private double area; private java.util.Date whenBuilt; public House(int id, double area) { this.id = id; this.area = area; whenBuilt = new java.util.Date(); } public int getId() { return id; } public do...
rdejong/LiangJava
House.java
234
/** Override the protected clone method defined in the Object class, and strengthen its accessibility */
block_comment
en
false
223
19
234
20
276
20
234
20
297
23
false
false
false
false
false
true
36167_11
/** * Represents a job for an elevator, containing information about the destination floor, pickup floor, timestamp, button pressed, and any faults. * @authors Sami Mnif, Muaadh Ali, Jalal Mourad, Jordan Bayne */ import java.io.Serializable; public class Job implements Serializable { private String timeStamp; ...
Samimnif/SYSC3303-Elevator-Sim
Job.java
677
/** * Gets the fault status of the job. * * @return the fault status */
block_comment
en
false
644
23
677
22
734
26
677
22
842
27
false
false
false
false
false
true
37469_36
/** * Represents time - hours:minutes. * @author Michal Danishevsky * @vertion 20.04.2020 */ public class Time1{ private int _hour; private int _minute; final int MAXIMUM_MINUTES=60; final int MINIMUM_MINUTES=0; final int MAXIMUM_HOURS=24; final int MINIMUM_HOURS=0; /** * Constru...
mich153/Railway-Station
Time1.java
1,583
/** * Calculates the difference (in minutes) between two times. * Assumption: this time is after other time * @param other The time to check the difference * @return The difference in minute */
block_comment
en
false
1,606
49
1,583
46
1,724
51
1,583
46
1,985
52
false
false
false
false
false
true
41189_2
package main; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; import utilities.DBConnection; import java.sql.*; import java.util.Locale; /** This is the Main class of my application. * * <p><b> * * The javadoc...
Rasbandit/wgu-c195
src/main/Main.java
393
/** <b> * The javadocs folder is located in the Project primary folder. * </b> * * <p> * This method calls for and establishes the database connection. * </p> * @param args The arguments. * @throws SQLException The exception that will be thrown in an error. */
block_comment
en
false
330
73
393
73
403
80
393
73
459
85
false
false
false
false
false
true
41375_3
import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Deck { private List<Card> deck = new ArrayList<>(); private final String WILD = Main.getWildCard(); private final String WILD_PLUS_4 = Main.getWildPlus4(); private String[] colorsAssortment = {"blue", "green...
CoderJ01/uno-card-game
Deck.java
727
/* remove the bottom card before starting the game this will be the first card in the discard pile */
block_comment
en
false
659
24
727
22
782
24
727
22
868
26
false
false
false
false
false
true
41546_1
import java.text.DecimalFormat; public class bmi{ public static void main (String[] args) { float weight, height; double bmi; try { weight = Float.parseFloat(args[0]); height = Float.parseFloat(args[1]); } catch (Exception e) { Syst...
Trudelutten/Task-Day-2
bmi.java
702
//If the user likely have entered the wronge height in meters since he is taller then 3 meters
line_comment
en
false
645
23
702
24
738
24
702
24
791
25
false
false
false
false
false
true
42579_2
/** * Properties and methods for moons. */ public class Moon extends SolarObject { private double dist_offset; private Planet planet; /** * Setting up the moon object. * * @param ss the solar system the planet will be added to * @param dist distance between the moon and th...
gabrielchl/java-solar-system-model
Moon.java
376
/** * Triggers the moon to move 1 step foward */
block_comment
en
false
337
17
376
17
395
17
376
17
406
20
false
false
false
false
false
true
43191_3
import java.util.*; public class ifelse { public static void main(String[]argu){ Scanner sc = new Scanner(System.in); // Question to check weather the he is adult or under age System.out.print("Age: "); int ag= sc.nextInt(); if (ag>18){ System.out.println("You a...
RiteshSharmaop/Java
ifelse.java
480
// insted of writing lots of if else or nested if else we use else if
line_comment
en
false
414
17
480
17
521
17
480
17
556
17
false
false
false
false
false
true
43653_24
/** * This is the Craps Game main file in this class. Responsible for most game functions. * * @author TJ Zimmerman * @version 1.01 */ public class Craps { /**Makes objects for each of the two dice. */ public GVdie d1, d2; /**Initializes and sets the return point of the game to * negative o...
zimmertr/Craps
Craps.java
1,579
/** * While it wasn't required, I felt like adding a reset method * anyway as it would be very simple and would certainly * enhance the game. */
block_comment
en
false
1,545
38
1,579
36
1,817
43
1,579
36
1,937
44
false
false
false
false
false
true
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
5