text stringlengths 14 410k | label int32 0 9 |
|---|---|
private SimpleJsonState readJsonObject(SimpleJsonTokenizer x) {
Map<String, SimpleJsonState> elements = new LinkedHashMap<String, SimpleJsonState>();
SimpleJsonState res = new SimpleJsonState(elements);
char c;
String key;
if ( x.nextClean() != '{' ) {
throw x.synta... | 9 |
public void saveScoreStats()
{
File file = new File("Scores.txt");
boolean flag = false;
FileWriter writer;
ArrayList<String> scoreData = new ArrayList<String>();
ListIterator<String> iterator;
try
{
Scanner s = new Scanner(file);
while(s.hasNextLine())
{
scoreData.add(s.nextLine());
... | 7 |
public void visitPhiStmt(final PhiStmt stmt) {
if (stmt instanceof PhiCatchStmt) {
visitPhiCatchStmt((PhiCatchStmt) stmt);
} else if (stmt instanceof PhiJoinStmt) {
visitPhiJoinStmt((PhiJoinStmt) stmt);
/*
* else if (stmt instanceof PhiReturnStmt)
* visitPhiReturnStmt((PhiReturnStmt) stmt);
*/
... | 2 |
public boolean exactlySameAs(PhoneNumber other) {
if (other == null) {
return false;
}
if (this == other) {
return true;
}
return (countryCode_ == other.countryCode_ && nationalNumber_ == other.nationalNumber_ &&
extension_.equals(other.extension_) && italianLeadi... | 9 |
public static void main(String[] args) throws Exception {
if(args.length < 2) {
System.out.print("Usage : bdecoder -f <file> \n"
+ " : bdecoder -s <string1> [string2] ...\n");
return;
}
String argument;
if(args[0].equals("-f")) {
argument = args[1];
File... | 8 |
@Override
protected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex )
{
int width = tabPane.getWidth();
int height = tabPane.getHeight();
Insets insets = tabPane.getInsets();
int x = insets.left;
int y = insets.top;
int w = width - ins... | 8 |
@Before
public void setUp()throws Exception{
//first courier
firstCourier.put("slug","india-post-int");
firstCourier.put("name","India Post International");
firstCourier.put("phone","+91 1800 11 2011");
firstCourier.put("other_name","भारतीय डाक, Speed Post & eMO, EMS, IPS We... | 4 |
public boolean isBlocking()
{
if ( channel instanceof SocketChannel )
return ( (SocketChannel) channel ).isBlocking();
else if ( channel instanceof WrappedByteChannel )
return ( (WrappedByteChannel) channel ).isBlocking();
return false;
} | 2 |
public Env(EnvParams ep) throws Exception{
super();
int PAGE_SIZE=10;
int cur_page_offset=0;
instances=new ArrayList<CompositeInstance>();
logger= Logger.getLogger("driver");
locator(ep);
if(locator==null)
throw new Exception(this.error);
Compo... | 3 |
public TinyELStatement parseFor() {
accept(TinyELToken.FOR);
accept(TinyELToken.LPAREN);
String type = exprParser.type();
String varName = exprParser.name().toString();
if (lexer.token() == TinyELToken.COLON) {
lexer.nextToken();
TinyELForEachStatement stmt = new TinyELForEachStatement();
stmt.setT... | 6 |
public static void main(String[] args) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
Octopart.setApiKey("566cc7d2");
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
FileDialog filepicker = new FileDialog((java.awt... | 9 |
public static String format(String line){
String formattedLine = line;
if (line.subSequence(0, 1).equals("/")){
String[] words = line.split("\\s+");
words[0] = words[0].substring(1,words[0].length()).toUpperCase();
formattedLine = new String();
for (String word: words){
formattedLine += word + " ";
... | 2 |
public int run(String [] args) throws Exception {
Job job = new Job(getConf());
job.setJarByClass(MapReduce.class);
job.setJobName("LogAnalyser");
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(IntWritable.class);
job.setMapperClass(Map.class);
job.setCombinerClass(Reduc... | 1 |
public void deletePollingScheme(String objectName) {
String objectPath;
Folder schemeFolder;
objectPath = "/PollingSchemes/" + objectName;
try {
schemeFolder = (Folder) session.getObjectByPath(objectPath);
ItemIterable<CmisObject> children = schemeFolder.getChildr... | 3 |
public void eventListner(String message) {
Message messageObj = GameApiJsonHelper.getMessageObject(message);
if (messageObj instanceof UpdateUI) {
game.sendUpdateUI((UpdateUI) messageObj);
} else if (messageObj instanceof VerifyMove) {
game.sendVerifyMove((VerifyMove) messageObj);
... | 2 |
public ArrayList<String> traerListaCargos(){
conn = Conector.conectorBd();
String sql = "select descripcion from usuario";
try {
pst = conn.prepareStatement(sql);
ArrayList<String> ls = new ArrayList<String>();
rs = pst.executeQu... | 2 |
public String processInput(String input) {
stringParts = input.split(" ");
try {
cmdPart = stringParts[0];
} catch (NullPointerException e) {
System.out.println("Error: found no Command");
}
if (cmdPart.equals("!login")) {
return logginUser();
}
if (cmdPart.equals("!logout")) {
return... | 6 |
public static void main(String[] args) throws IOException {
int port = 4444;
String localhost = "localhost";
// create a new serversocketchannel. The channel is unbound.
ServerSocketChannel channel = ServerSocketChannel.open();
// bind the channel to an address. The channel starts listening to
// incoming... | 9 |
@Override
public void run() {
Scanner keyboard = new Scanner(System.in);
System.out.println("Welcome to the Smart Parking Lot "
+ "administrative control panel. (type h for help)");
while (true) {
String input = keyboard.nextLine();
if (input.equalsIgnoreCase("h")) {
System.out.println("... | 8 |
public void save() {
StringBuilder data = new StringBuilder();
data.append("-" + nameText.getText() + "-" + System.getProperty("line.separator"));
if(meleeButton.isSelected()) {
data.append("<THRUST>" + System.getProperty("line.separator"));
data.append(thrustPanel.save());
data.append("<CRUSH>" + System... | 9 |
@Transactional
public void deleteById(Integer id) {
tasksDao.setDeletedById(id, true);
} | 0 |
public void setUserinfo(String p_userinfo) throws MalformedURIException {
if (p_userinfo == null) {
m_userinfo = null;
}
else {
if (m_host == null) {
throw new MalformedURIException(
Messages.getString("URI.userinfoCannotBeSetWhenHostIsNull")); //$NON-NLS-1$
}
/... | 9 |
public void readPublisher(){
while(true){
Publisher publisher = new Publisher();
publisher.setName(read("Name"));
publisher.setCountryCode(read("Country code"));
publisher.setPostCode(read("Post code"));
publishers.add(publisher);
String ye... | 3 |
public boolean sqlEjecutar(String sql){
try {
int resultado = stmt.executeUpdate(sql);
if (resultado == 0) return false;
return true;
} catch (SQLException ex) {
//Log.rutea("Error Ejecutar " +ex.getMessage() + "\n" + sql);
return false;
... | 2 |
public int slideChar() {
AlignWin win = curAli.randWin(2);
AlignCol col1 = win.first, col2 = win.last;
int[] inds1 = col1.inds, inds2 = col2.inds;
int s = 0; // slidables
for(int i = 0; i < inds1.length; i++)
if(inds1[i] >= 0 ^ inds2[i] >= 0)
rows[s++] = i;
if(s > 0) {
// choose a random slidable
... | 9 |
public void setFont(Font font) {
if (days != null) {
for (int i = 0; i < 49; i++) {
days[i].setFont(font);
}
}
if (weeks != null) {
for (int i = 0; i < 7; i++) {
weeks[i].setFont(font);
}
}
} | 4 |
private String createColumnListString() {
ClassInspect inspector = getClassInspector();
List<Field> annotatedFields = inspector.findAllAnnotatedFields(Column.class);
int columnCount = 0;
StringBuilder columnBuilder = new StringBuilder();
StringBuilder valueBuilder = new StringBuilder();
columnBuilder.append... | 4 |
public Set<Coordinate> findThreatenedSquares(Color color) {
Set<Coordinate> threatenedSquaresSet = new LinkedHashSet<Coordinate>();
for (int col = 0; col < NUMBER_OF_COLS; col++) {
for (int row = 0; row < NUMBER_OF_ROWS; row++) {
Piece currPiece = pieces[col][row];
if (currPiece.isNone())
continue;
... | 4 |
public void runScene() throws InterruptedException {
while (!this.finished) {
Display.update();
if (Display.isCloseRequested()) {
this.finished = true;
} else if (Display.isActive()) {
Display.sync(FRAMERATE);
this.traitementsLo... | 3 |
public JLabel getjLabel4() {
return jLabel4;
} | 0 |
public List<BeerResponse> getBeers() {
return beers;
} | 0 |
private void moveRandomDirection() {
while (true) {
int move = (int) (Math.random() * 4);
switch (move) {
case 0:
if (up()) {
return;
}
break;
case 1:
i... | 9 |
public String getLineStyle()
{
switch(magnitude)
{
case HIGH:
return HIGH_SIZE;
case MEDIUM:
return MEDIUM_SIZE;
case LOW:
return LOW_SIZE;
default:
return "";
}
} | 3 |
public CheckSum(File file) throws Exception{
super(file);
} | 0 |
@Override
public Exception getException() {
return exception;
} | 0 |
public void show() {
StringBuffer report = new StringBuffer();
for(Slot<String> s : theDraft.copy()) {
report.append(s.pickId);
report.append(" ");
if (Slot.BasicStates.USED.equals(s.state)) {
report.append(s.player);
} else {
... | 2 |
private void onFullnessChanged(double oldVolume) {
for(IFullnessChangedObserver fo: fullnessObservers) {
fo.fullnessChangedHandler(this, oldVolume);
}
} | 1 |
private static final double getResolution(final int port) {
return (double) port < 4 ? 1023 : 63;
} | 1 |
public synchronized Exception getException() {
Exception e = exception;
for (ConnectionProcessor pipe : pipes) {
if (e == null) {
e = pipe.getException();
}
if (e != null) return e;
}
return e;
} | 3 |
Item newLong(final long value) {
key.set(value);
Item result = get(key);
if (result == null) {
pool.putByte(LONG).putLong(value);
result = new Item(index, key);
put(result);
index += 2;
}
return result;
} | 1 |
@Override
public double[] getAmountVariableValues() {
double[] amountVariables = new double[periods.length];
for (int i = 0; i < amountVariables.length; i++){
amountVariables[i] = periods[i].amount;
}
return amountVariables;
} | 1 |
public void close () {
Connection[] connections = this.connections;
if (INFO && connections.length > 0) info("kryonet", "Closing server connections...");
for (int i = 0, n = connections.length; i < n; i++)
connections[i].close();
connections = new Connection[0];
ServerSocketChannel serverChannel = this.se... | 9 |
private void createVirtualNodesAndEdges() {
int idCounter = 1;
for(LayoutNode v : graph.getAllVertices()) {
if(v.getId() >= idCounter) {
idCounter = v.getId() + 1;
}
}
LayoutNodeFactory vertexFactory = new LayoutNodeFactory(idCounter);
Set<LayoutEdge> edges = graph.getAllEdges();
for (LayoutEdge e... | 9 |
private void addSnapshotImage(Component parent, ImageIcon image, String filename, boolean inputDescription,
String pageAddress) {
if (editor == null)
editor = new SnapshotEditor(this);
String s = Modeler.getInternationalText("TakeSnapshot");
if (editor.showInputDialog(JOptionPane.getFrameForComponent(parent... | 9 |
public static void main(String[] args) throws IOException, ParserConfigurationException, SAXException {
// Folder containing the Zargo UML files
File f = new File("models/");
File[] fileArray = f.listFiles();
// File for saving the statistics for the processed models
File summary = new File("result/zargo-xmi... | 8 |
@After
public void tearDown() throws Exception {
pool.shutdown();
pool.awaitTermination(100, TimeUnit.SECONDS);
final Xpp3Dom results = xmlRunListener.getResults();
assertAllTestCasesHaveRequiredElements(results);
assertEquals(700, results.getChildCount());
assertEqua... | 0 |
public static void removeReservation(int productID, int memberID){
try {
if(conn == null || conn.isClosed()){
conn = DatabaseConnection.getConnection();
}
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try{
conn.setAutoCommit(... | 4 |
public void populate(String games) {
//TODO
System.out.println("lobby: games = " + games);
if(!games.equals(input)){
System.out.println("repopulating");
System.out.println(games);
System.out.println(input);
input = games;
int pos = 0;
int i;
gameNumID.clear();
ArrayList<String> listDat... | 9 |
protected void fetchLegendItems() {
this.items.clear();
RectangleEdge p = getPosition();
if (RectangleEdge.isTopOrBottom(p)) {
this.items.setArrangement(this.hLayout);
}
else {
this.items.setArrangement(this.vLayout);
}
if (this.sortOrder.... | 8 |
private int find_K(int A[], int startA, int B[], int startB, int k)
{
if(A.length ==0 || A.length <= startA) return B[startB+k-1];
if(B.length ==0 || B.length <= startB) return A[startA+k-1];
if(k==1)
{
if(A[startA]<B[startB])
return A[startA];
else
... | 9 |
* @param superclass
* @return boolean
*/
public static boolean subclassOfP(Stella_Class subclass, Stella_Class superclass) {
if (subclass == superclass) {
return (true);
}
{ TaxonomyNode subnode = subclass.classTaxonomyNode;
TaxonomyNode supernode = superclass.classTaxonomyNode;
in... | 7 |
public void adjustListPosition(int val){
//Checks for positive or negative value
if(val == 1)
{
//Checking if at end of list
if(listPosition == listImages.size()-1){
listPosition = 0;
} else {
listPosition += val;
}
// Checking if on far right of screen
if(positionOnScreen == 4... | 5 |
@Override
public void rotateZPlus() {
if(orientation == Z) return;
orientation = (orientation == X ? Y : X);
for(int i = 0; i < others.length; i++) {
IntPoint p = others[i];
others[i] = new IntPoint(-p.getY(), p.getX(), p.getZ());
}
} | 3 |
@After
public void tearDown() {
} | 0 |
public static HashMap<String, Double> getOneWayAnovaPValues(ENode root) throws Exception
{
HashMap<String, Double> returnMap = new HashMap<String, Double>();
HashMap<Float, List<ENode>> map = ReadCluster.getMapByLevel(root);
System.out.println(map.size());
for( Float f : map.keySet())
{
File outFile = ... | 6 |
private void tuplaaKoko(){
Siirto[] uusi = new Siirto[keko.length*2];
for (int i = 0; i < keko.length; i++){
uusi[i] = keko[i];
}
this.keko = uusi;
} | 1 |
public void setDateModified(String dateModified) {this.dateModified = dateModified;} | 0 |
public double weightedStandardError_of_ComplexModuli() {
boolean hold = Stat.nFactorOptionS;
if (nFactorReset) {
if (nFactorOptionI) {
Stat.nFactorOptionS = true;
} else {
Stat.nFactorOptionS = false;
}
}
boolean hold2 = Stat.nEffOptionS;
if (nEffReset) {
if (nEffOptionI) {
Stat.nEffOp... | 7 |
@Override
public void send(String n, String m) {
try {
m_server.pushMessage(new Send(n, m));
} catch (RemoteException e) {
e.printStackTrace();
} catch(InterruptedException e){
e.printStackTrace();
}
} | 2 |
public void setValueB(Value value) {
if(!opcode.isBasic())
throw new IllegalArgumentException("Can not setValueB on non-basic opcode");
this.valueB = value;
} | 1 |
private void jTextField1KeyTyped(java.awt.event.KeyEvent evt) {
int tamaño = this.jTextField1.getText().length();
if (tamaño >= 12) {
evt.consume();
}
} | 1 |
public void chessPieceRedirection(int originLetter, int originNum, int newLetter, int newNum)
{
System.out.println();
String chessPiece = b.checkBoard(originNum, originLetter);
if(chessPiece.equalsIgnoreCase("r"))
{
RookMovement rook = new RookMovement(chessPiece, b);
rook.checkMove(originLetter, originN... | 5 |
public LinkedList<Integer> stackDFS(Digraph G, int source) {
if (G.bag.length < source) { // If length of bag is lesser than source, source can't exist
return null;
}
boolean[] visited = new boolean[G.V()]; // Create boolean array to flag visited ve... | 6 |
public Configuration[] getConfigurations() {
return (Configuration[]) configurationToButtonMap.keySet().toArray(
new Configuration[0]);
} | 0 |
private List<Symbol> removeEpsilon(List<Symbol> alphabet) {
List<Symbol> results = alphabet;
for(Symbol result : results){
if(result.mathValue("epsilon")){
results.remove(result);
break;
}
}
return results;
} | 2 |
private void calculateAnchors(){
//get rack and print it
int[] tmpRack = rack.getCards();
//analyze the rack to find the anchor points
//if the card in slot "i" fits roughly the flat, maximal spread distribution, it is an anchor
int slotLow = 1, slotHigh;
for (int i = 1; i <= rack_size; i++){
slotHig... | 7 |
private AcctsRecTransRec parseDeleteTransaction() {
String mastID;
AcctsRecTransRec result;
if (tokens.length > 1) {
mastID = tokens[1];
if (tokens.length == 2)
{ result = new AcctsRecDeleteTransRec(mastID); }
else {
result = new AcctsRecIllFormedT... | 2 |
private static ArrayList<Line> readLineInfo(Scanner input, HashMap<String, BusStop> busStops) throws Exception
{
String temp, lineNo;
int period;
Time start, last;
lines = new ArrayList<Line>();
input.useDelimiter("[:=<>,\\s]+");
while (input.hasNext())
{
temp = input.next();
if (temp.compareTo("li... | 9 |
public void event() {
System.out.println("DELETE 버튼 이벤트 발생!");
Iterator<Information> it = list.iterator();
Information i;
int count = 0;
try {
while (it.hasNext()) {
i = it.next();
if (i.getName().equals(name_tf.getText()) // 이름으로 삭제
&& id_tf.getText().equals("")) {
list.remove(count);
... | 8 |
public void addButton(Container c, String title, ActionListener listener)
{
JButton button = new JButton(title);
c.add(button);
button.addActionListener(listener);
} | 0 |
public void end(Integer statusCode){
this.setStatus(Call.CALL_ENDED);
if (getPastStatus()==Call.CALL_INITIALIZED){
try {
initialRequest.createResponse(statusCode).send();
} catch (IOException ex) {
ex.printStackTrace();
}
}
... | 9 |
int alloc(int len) {
if (hp+len+1 > size) { // Check for space in the heap.
garbageCollect(); // Invoke garbage collector.
if (hp+len+1 > size) { // And then retest for space in heap.
fatal("Out of memory!");
}
}
int result = hp-size;
for (heap[hp++]=len; len>0;... | 3 |
private double _value(final Interval<Double> region,
final Function<Double, Double> function, final double firstGuess,
final int iteration, final DoubleAbsolute criterion) {
if (this.getMaximumIterations() < iteration)
throw new MaximumIterationsException(iteration);
... | 6 |
public void addNeighbor(Region ar) {
this.neighbors.add(ar);
} | 0 |
public void startUpload() throws InterruptedException
{
Random random = new Random();
uploadWindow.statusLabel.setText("Loading image...");
System.out.println(filePath);
BufferedImage image = getBufferedImage(filePath);
if (image == null) {
uploadWindow.statusLabel.setText("An error occured!");
uplo... | 6 |
public Operator<Boolean> getOperator() {
return operator;
} | 0 |
void NewickPrintBinaryTree( PrintStream out ) throws Exception
{
NumberFormat nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits( DOUBLE_PRECISION );
edge e, f;
node rootchild;
e = root.leftEdge;
rootchild = e.head;
out.write('(');
f = rootchild.leftEdge;
if ( null != f )
{
NewickPr... | 3 |
public static void main(String[] args) throws Exception
{
if (args.length < 1) {
System.err.println(
"usage: java PKCS12Import {pkcs12file} [newjksfile]");
System.exit(1);
}
File fileIn = new File(args[0]);
File fileOut;
if (args.length > 1) {
... | 8 |
@Override
public synchronized void mouseMoved(MouseEvent e) {
Point mousePoint = e.getPoint();
// Test all objects to see if the mouse position is within the bounds of
// the eventable object. If it is, add their event to the
// waitingEventsMouseOver list. We must also add it to the list of
// currentMouseO... | 6 |
public synchronized Entity operateEntityList(int op, int index, Entity e){
switch(op){
case 0 :
playerList.add(e);
return null;
case 1 :
return playerList.get(index);
case 2 :
playerList.remove(index);
return null;
default :
return null;
}
} | 3 |
public List<TravelDataBean> getarticleList(int start, int end, int area) throws Exception{
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
List<TravelDataBean> articleList = null;
String sql = "";
try{
conn = getConnection();
/*추천지수 불러오는sql*/
sql = "update travel set r... | 9 |
@Override
public final boolean equals(Object o) {
if ((o != null) && (o instanceof IPNetwork)) {
IPNetwork net = (IPNetwork)o;
return (net != null) && address.equals(net.address) && mask.equals(net.mask) && (BITS == net.BITS);
}
return false;
} | 5 |
public void mergeBreakedStack(VariableStack stack) {
if (breakedStack != null)
breakedStack.merge(stack);
else
breakedStack = stack;
} | 1 |
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((this.content == null) ? 0 : this.content.hashCode());
result = prime * result + ((this.mime == null) ? 0 : this.mime.hashCode());
result = prime * result + ((this.reference == null) ? 0 : this.reference.hashCo... | 5 |
public void histogramme(ShortPixmap img) {
short[] histogramme = new short[256];
for (int i=0; i<=img.width; i++) {
for (int j=0; j<=img.height; i++ ) {
//int k = img.
//histogramme[k]++;
}
}
} | 2 |
public static Database getInstance() throws Exception {
if(Database.db == null)
throw new Exception("No database initialized.");
else
return Database.db;
} | 1 |
@Override
public void execute() {
for(int i = 0; i<rockArray.length; i++){
EfficientMiner.operation = "Looking for ores";
rockArray[i] = SceneEntities.getAt(ORES_TILES[i]);
if(rockArray[i].getId() == ORES[i])
if(rockArray[i].isOnScreen()){
rockArray[i].interact("Mine");
EfficientMiner.operatio... | 4 |
private void getNumMappedFlagstat(String flagstatPattern, String dirName) throws IOException{
numMapped = new HashMap<String, Integer>();
TextFile flagstat;
File dir = new File(dirName);
for (File ch : dir.listFiles()) {
if (ch.isDirectory()){
for (File child ... | 4 |
public boolean[][] fillIn(int[] order, boolean[][] bAdjacencyMatrix) {
int nNodes = bAdjacencyMatrix.length;
int[] inverseOrder = new int[nNodes];
for (int iNode = 0; iNode < nNodes; iNode++) {
inverseOrder[order[iNode]] = iNode;
}
// consult nodes in reverse order
for (int i = nNodes - 1; i >= 0; i--) {... | 9 |
private void updateTypeMenu()
{
if(specificType != null)
{
panel.remove(specificType);
}
if(playerType.equals(AI))
{
specificType = new JComboBox<String>(AIList.getNames());
}
else
{
specificType = new JComboBox<String>(GUIList.getNames());
}
panel.add(specificType);
... | 4 |
public Photograph(String[] photograph) {
if (photograph == null) {
photograph = new String[]{};
}
this.pic = photograph;
} | 1 |
public static ArrayList<BasicNode> GetPath(LevelEntity[][] level, BasicNode start,BasicNode goal){
int[][] temp = {{ 1,-1},
{ 1,-2},
{ 2,-2},
{ 2,-3},
{ 3,-3},
{ 3,-4},
{ 4,-4},
{ 5,-3},
{ 6,-3},
{ 7,-3},
{ 8,-2},
{ 8,-1}};
int[][] temp2 = {{ 1,-1},
{ 1,... | 8 |
public static void main(String[] args)
{
System.out.println("Starting failure example 1...");
try
{
if (args.length < 1)
{
System.out.println("Usage: java ResFailureEx01 network_ex01.txt");
return;
}
/////////... | 3 |
private TreeModel generateLoggerTreeModel() {
myLogger.fine("Erzeuge Tree-Model mit allen Loggern");
// Das Tree-Model mitsamt Root-Knoten anlegen
TreeNodeObject tno = new TreeNodeObject("Alle Logger");
DefaultMutableTreeNode root = new DefaultMutableTreeNode(tno);
DefaultTreeMo... | 7 |
@Override
public void updatePlayersList(Players players) {
playersInGame.removeAllElements();
for (Player player : players.getPlayers()) {
playersInGame.addElement(player.getName() + " " + "(" + player.getRole() + ")");
}
} | 1 |
public void update(final Observable model, Object ignored) {
if (_disposed)
throw new IllegalStateException();
// Redraw the window
SwingUtilities.invokeLater(new Runnable() {
public void run() {
// _content.repaint() causes a call to _content.paint(g)
// where g is an... | 2 |
@Override
public void buildDough() { pizza.setDough("cross"); } | 0 |
@Override
public void mouseExited(MouseEvent e) {
unprocessedEvents.add(e);
mouse = new Point2D.Double(-1, -1);
} | 0 |
@Test
public void EnsureNothingIsRemovedWhenNoLeadingTrailingSlashes() {
String path = "x/y";
String newpath = Path.trimSlashes(path);
assertEquals("x/y", newpath);
} | 0 |
public static Tile CONCRETE() {
if (random.nextInt(100) == 0) {
return WASTELAND_GROUND1;
} else if (random.nextInt(100) == 0) {
return WASTELAND_GROUND2;
} else if (random.nextInt(100) == 0) {
return WASTELAND_GROUND3;
} else if (random.nextInt(100) == 0) {
return WASTELAND_GROUND4;
} else if ... | 6 |
Subsets and Splits
SQL Console for giganticode/java-cmpx-v1
The query retrieves a limited number of text entries within a specific length range, providing basic filtering but minimal analytical insight.