text
stringlengths
14
410k
label
int32
0
9
public int getMsgType() { return MsgType; }
0
private void FireSale ( int j, Housedata tAISYOUHOUSE, List<HPAdata> iFurnitureList, HPAdata taisyouHPA, int k, int l, ReadFile RF ) { //ϋvx̒Ⴂ𓊂肵܂ if ( j >= 2 ) { //_uĂƂ̂ݓ\bh int Dur = Integer.MAX_VALUE; //ϋvxp̃L[ int II = Integer.MAX_VALUE; //Lpi for ( int i = 0; i < getdoubleList().size(); i++ ) { if (...
5
public static void writeString(byte[] data, int offset, int length, String string) { if(data.length < offset + length) { throw new IllegalArgumentException("Not enough space for writing a String at " + offset + " of length " + length); } for(int i = 0; i < length; i++) { ...
3
public State evalGame() { // don't show anything, just return the final state // shameless code copying... // Actually play the game // as long as there are empty squares while (s.getnEmpty() > 0) { Move m; // ask the right player to make a move if (s.whoseTurn().equals("red")) m = red.chooseMo...
4
public void increment() { count++; if (count > maxPublCount) maxPublCount = count; }
1
public void nodeLeft(String gs) { maintenance = true; System.out.println("Node down! Overlay repair in progres.."); /*String tmp = this.getUrl() + " Known clusters: "; for (String s : resourceManagerLoad.keySet()) { tmp += s + ", "; } logger.info(tmp);*/ for (String s : resourceManagerLoad.keySet())...
6
public static Date DateParse(String str){ if(MyStringUtil.isBlank(str)){ return null; } try{ return format.parse(str); }catch(Exception e){ e.printStackTrace(); } return null; }
2
public SeleksiPegawaiView(SingleFrameApplication app) { super(app); initComponents(); // status bar initialization - message timeout, idle icon and busy animation, etc ResourceMap resourceMap = getResourceMap(); int messageTimeout = resourceMap.getInteger("StatusBar.messageTime...
7
@Override public void actionPerformed(ActionEvent e) { switch(e.getActionCommand()){ case RUN: Application.mediator.parseLSA(); LSAmatrix m = Application.mediator.matrix; Application.mediator.writeInfo(m.toString()); break; ...
8
public void setExit(String direction, Room neighbor, boolean blockedUntilOpened) { if(direction == "north") northBlocked = blockedUntilOpened; if(direction == "south") southBlocked = blockedUntilOpened; if(direction == "east") eastBlocked = blockedUntilOpened; if(direction == "west")...
6
void parseLoopParameters(String[] fields) throws Exception { fieldCount = 0; for (int i = 0; i < fields.length; i++) propertyReferenced[i] = false; propertyCount = fields.length; while (true) { String str = tokenizer.peekToken(); if (str == null) { fieldCount = 0; brea...
7
public void paste(World world, int x, int y, int z) { if(valid) { for(int xPos = x; xPos < x+width; x++) { for(int zPos = z; zPos < z+length; z++) { for(int yPos = y; yPos < y+height; yPos++) { populator.setBlockWithData(world, xPos, yPos, zPos, materialList[structure[x][y][z]], mater...
5
public static boolean checkForBust(Dealer dealer, Player player) { int playerScore = player.getDefaultScore(); int dealerScore = dealer.getDefaultScore(); // Both busted. if(playerScore > twentyOne && dealerScore > twentyOne) { System.out.println("Both have busted hands, so tie!"); tieSituation(player)...
4
private void reInit() { // fix/normalize url if possible String newURL = AbstractPage.fixURLString(null, textFieldURL.getText()); //TODO: add normalization to path, creation of non-existing dirs request and such. String newDir = textFieldDirectory.getText(); if (newURL == null) { // fix failed, resto...
7
@Test public void testLargeAmountOfNumbers(){ for(int i = 0; i < 2000; i++){ int input = (int)(Math.random()*100)*i; int output = HashUtilities.shortHash(input); int expected = input % 1000; assertEquals(output, expected); } }
1
public Event getEvent(String s) { if (s.length() == 3 && Info.isInteger(s)) { return fetchEvent(Integer.parseInt(s)); } return fetchEvent(s); }
2
public ListNode deleteDuplicates(ListNode head) { if (head == null) { return null; } if (head.next == null) { return head; } ListNode itr = head; ListNode itrNext = head; ListNode itrPrev = head; // {1,1} // {1,1,1,1} //1 1 2 while (itr.next != null) { itrNext = itr.next; itrPrev = itr...
7
public void addBlock(String mat, BlockData blockData) { String name = mat ; if( blockData == null ) { blockData = new BlockData(this) ; } // Register the MBean ObjectName oName ; try { oName = new ObjectName("org.dkhenry.minejmx:type=BlockData,name="+name); if( mbs.isRegistered(oName) ) { mbs.u...
8
@Override public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException { // gestion de la souris Input input = gc.getInput(); sourisX = input.getMouseX(); sourisY = input.getMouseY(); // parcours les items des options, pour voir si on est dessus for (int i = 0; i < itemMor...
7
public boolean isSelectedWidth() { for(int i=0;i<markers;i++) { if(marker[i].isSelectedWidth()) { return true; } } return false; }
2
public String toString() { String arrayString = ""; Occurrence temp = head; while (head != null) { arrayString = head.getDocName() + " " + head.getTermFrequency() + "; " + arrayString; head = head.next; } head = temp; return arrayString; }
1
public void setStock(int stock) { this.stock = stock; }
0
@Override public void actionPerformed(ActionEvent a) { if(a.getSource() == TypeSel){ Clear(); switch(TypeSel.getSelectedIndex()){ case posCartLine: initCartesianLine(); break; case posVecLine: initVectorLine(); break; case posCartPlane: initCartesian(); break; case posVecPla...
5
public void removeKey(String c) { synchronized(keychain) { keychain.remove(c); numKeys--; } }
0
private MobileIdNameQuery<Npc> getAncestor() { return ctx.npcs.select().select(new Filter<Npc>() { @Override public boolean accept(Npc npc) { if (Arrays.binarySearch(ANCESTOR_IDS, npc.id()) >= 0) { final Actor interacting = npc.interacting(); return (interacting == null || !npc.inCombat() || (inte...
5
public static List<String> getLocalIPs() { Enumeration<NetworkInterface> interfaces; try { interfaces = NetworkInterface.getNetworkInterfaces(); } catch (SocketException e) { return null; } List<String> ips = new ArrayList<String>(); while(interfaces.hasMoreElements()) { NetworkInterface curren...
5
public int count(String key) { if(key.equals(Defines.CURRENCY_NAME)){ return rangs; } int count = 0; for(Item i : items){ if(key.equals(i.getName())){ count++; } } return count; }
3
@SuppressWarnings("static-access") @EventHandler(priority = EventPriority.HIGH) public void onMobDamage (EntityDamageByEntityEvent event) { Entity entity = event.getEntity(); Entity damager = event.getDamager(); if (entity instanceof Player) { if (damager instanceof Wolf) { ...
3
public Point3 neg(){ x = -x; y = -y; z = -z; return this; }
0
public ConnectedComponents(Graph<?> G) { this.initId = 0; this.id = new ListOrderedMap<>(); this.marked = new ListOrderedMap<>(); for (Object x : G.getAllVertices()) { this.marked.put(x, false); } for (Object x : marked.keySet()) { if (!this....
4
public static List<String> readLines(InputStream in, Charset cs) throws IOException { List<String> result = new ArrayList<String>(); cs = cs != null ? cs : Charset.defaultCharset(); BufferedReader lineReader = new BufferedReader(new InputStreamReader(in, cs)); try { for (String line; ((line = lineReader.read...
2
private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed // TODO add your handling code here: liceu.Administrator admin = new liceu.Administrator(); try { admin.addMaterie(materieDeAdaugat.getText()); } catch (IOException...
5
public test() { // TODO Auto-generated constructor stub }
0
public void setWidth(int w){ width = w; }
0
public boolean canPlaceSettlement(VertexLocation vertLoc) { //TESTING BUILDING ROAD, SETTLEMENT, CITY // clientModel.getServerModel().getPlayers().get(0).setBrick(5); // clientModel.getServerModel().getPlayers().get(0).setWood(5); // clientModel.getServerModel().getPlayers().get(0).setWheat(5); // clientModel.get...
2
public void removeNonUserRecords() throws SQLException { Collection<User> users = User.getUsers(); Collection<Integer> recordNumbers = GetRecords.create().getRecordNumbers(); Collection<Integer> toBeDeleted = new LinkedList<Integer>(); for (Integer recNumber : recordNumbers) { ...
5
@Override public final boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CommandKey)) { return false; } CommandKey other = (CommandKey) obj; if (main == null) { if (other.main != null) { ...
9
public String readLine() throws Exception { int thisCode; char thisChar; String finalLine=""; // If our position is less than zero already, we are at the beginning // with nothing to return. if ( this.position < 0 ) { return null; } for(;;) {...
9
static final public Map<String,Object> propMapOf(Object... objs) { HashMap<String, Object> m = new HashMap<>(); for (int i = 0; i < objs.length; i += 2) { //String key = objs[i].toString(); Object keyObj = objs[i]; String key = (keyObj instanceof String)?(String)keyObj:keyObj.toString(); if (i + 1 < ob...
3
private Spatial drawRingRopes() { //TODO: Refactor this shit into a loop Cylinder rope1 = new Cylinder(5, 5, 0.15f, 28, true); Quaternion deg90 = new Quaternion(); deg90.fromAngleAxis(FastMath.PI / 2, new Vector3f(0f, 1f, 0f)); Node ropesNode = new Node("ropes"); //left ...
4
public static void main(String[] args) { String inputFileName = null; String outputFileName = null; IParser parser = null; INode root = null; // Root of the parse tree. StringBuilder builder = null; FileOutputStream stream = null; OutputStreamWriter writer = null; try { try { if (args.length <...
6
@Override public void removeItems(Collection<String> items) { try { fTPConnector.deleteFiles(items); items.removeAll(items); } catch (IOException ioe) { throw new RuntimeException(ioe); } }
1
private static int[][] convertTo2D(BufferedImage image) { final byte[] pixels = ((DataBufferByte) image.getRaster().getDataBuffer()).getData(); final int width = image.getWidth(); final int height = image.getHeight(); final boolean hasAlphaChannel = image.getAlphaRaster() != null; int[][] result = new int[h...
5
public static void unwrap(final String sourcePdfFile) throws FileNotFoundException, IOException { if (StringUtils.isBlank(sourcePdfFile)) { throw new IllegalArgumentException(); } Path sourcePath = Paths.get(sourcePdfFile); if (Files.exists(sourcePath)) {...
5
public Report callProbLogicEval_Module(Report report, String parameters, boolean onlyLocalHypotheses,int [] selectedItens ){ int countSelected=0; int numberOftotalPOs = this.getNumberOfProofObligations(); for (int numberPo = 1; numberPo <= numberOftotalPOs; numberPo++) { if( countSelected<selectedIten...
5
public static boolean justificationEqlP(Justification just1, Justification just2) { return ((just1 == just2) || ((just1.inferenceRule == just2.inferenceRule) && ((just1.reversePolarityP == just2.reversePolarityP) && ((((!(just1.inferenceRule == Logic.KWD_PRIMITIVE_STRATEGY)) && (!...
6
public SimpleCommand request_next_move(boolean last_valid) { SimpleCommand c = new SimpleCommand(); if(next_move % 5 ==0) { //go forward, plow left c.a = true; c.b = true; c.plow_left = true; if(next_move % 10 == 0) c.plow_left = false; c.plow_straight = false; } else if(next_move % 5 ==1)...
7
@Test public void testForSmoke() throws Exception { final List<String> messages=new ArrayList<String>(); //WebSocket ws=new WebSocket("ws://echo.websocket.org"); //ws.addRequestHeader("Origin", "http://websocket.org"); WebSocket ws=new WebSocket("ws://localhost:4080/echoserver"); ws.addRequestHeader("Orig...
5
@Override public void recieveEvent(Event event) { if (event.getEventType() == EventType.INPUT && !event.isHandled()) { String input = (String) event.getData(); for(String trigger : triggers) { if(input.startsWith(trigger)) { emit(...
4
public static void main(String[] args) { ArrayList<Integer> list = new ArrayList<Integer>(); for (int i = 0; i < 100; i++) { list.add((int)(Math.random() * 50)); } for (Integer value : list) { System.out.println(value); } ArrayList<Integer> elderPe...
5
@Override protected void paintComponent(Graphics g){ super.paintComponent(g); setBackground(Color.BLACK); PaintTiles(g); g.setColor(Color.WHITE); if (status==GameStatus.SHOTHIT) g.drawString("You got 'em! YAAAY!", 120, 480); else if (status==GameStatus.SHOTMISSED) g.drawString("I'm gonna die down her...
2
public DefaultListModel<String> buildItemList() { DefaultListModel<String> listModel = new DefaultListModel<String>(); for(int x = 0; x<itemDatabase.size(); x++) { String[] temp = itemDatabase.get(x).split(";"); if(temp[0].startsWith("1")) listModel.addElement(temp[0] + ": " + temp[1]); } return li...
2
public void run() { // get line and buffer from ThreadLocals SourceDataLine line = (SourceDataLine)localLine.get(); byte[] buffer = (byte[])localBuffer.get(); if (line == null || buffer == null) { // the line is unavailable return; ...
7
public Object getValueAt(int rowIndex, int columnIndex) { switch (columnIndex) {// parcour par colonne case 0://colonne id_Stock return Service.get(rowIndex).getId_sr(); case 1://colonne id_Stock return Service.get(rowIndex).getPrix_sr(); case...
4
public static MethodInvoker XMLToMethod(String _xmlString) { SAXBuilder sxb = new SAXBuilder(); try { InputStream stream = new ByteArrayInputStream(_xmlString.getBytes("UTF-8")); Document doc = sxb.build(stream); Element racine = doc.getRootElement(); String nomMethode = racine.getAttributeValu...
7
public List<Contato> listarContatos() { try { List<Contato> contatos = new ArrayList<Contato>(); PreparedStatement stmt = this.conexao.prepareStatement("select * from contato"); ResultSet rs = stmt.executeQuery(); while (rs.next()) { // criando o objeto Contato ...
2
@Override public void mouseDragged(float x, float y, MouseEvent e) { if (active == null) { // deligiere an moegliche untergruppen weiter for (PolygonGroup i : subGroupsToInform) { i.mouseDragged(x, y, e); } } if (active != null) { ...
5
public void addEdge(S2Point v0, S2Point v1) { // If xor_edges is true, we look for an existing edge in the opposite // direction. We either delete that edge or insert a new one. if (v0.equals(v1)) { return; } if (options.getXorEdges()) { Multiset<S2Point> candidates = edges.get(v1); ...
7
public void clearGyro(){ _gyro.reset(); }
0
@Override public void keyReleased(KeyEvent e) { int code = e.getKeyCode(); if (code > 0 && code < keys.length) { keys[code] = false; typed[code] = true; } }
2
private boolean checkForEnd(byte data[]) { if(data[0]==0&&data[1]==DATA) { int i; for(i = 4; i < data.length; i++) { if(data[i] == 0) { exitNext = true; return false; } } } else if(data[0]==0 && data[1]==ACK && exitNext) { return true; } else if(data[0]==0 && data[1]==5) { return ...
9
public static int redTicket( int a, int b, int c ) { if ( a == 2 && b == 2 && c == 2 ) { return 10; } if ( a == b && b == c ) { return 5; } if ( a != b && a != c ) { return 1; } return 0; }
7
protected void writeHWReg(Size size, int addr, int value) { int reg = addr - 0x2000; if(mmap[reg] == null) { mmap[reg] = new UnimplementedHardwareRegister(); Log.err(String.format("Write Memory Mapped register 0x%04x not implemented.", addr)); if (Settings.get(Settings.MEM_THROW_INVALID_ADDR).equals("tr...
5
public static void remove() { if (installed != null) { Toolkit.getDefaultToolkit().removeAWTEventListener(installed); } installed = null; }
1
private void parse(byte[] message) { String[] exploded = explodeMessage(message); function = Function.valueOf(exploded[0]); if(exploded.length > 1) uuid = exploded[1]; for (int i = 2; i < exploded.length; i++) { parameters.add(Integer.parseInt(exploded[i])); ...
2
private int getTypeAccordingToFillMethod(TextGrid grid){ if(size() == 0) return TYPE_OPEN; CellSet tempSet = copyCellSet(this); tempSet.translate( -this.getMinX() + 1, -this.getMinY() + 1); TextGrid subGrid = grid.getSubGrid(getMinX() - 1, getMinY() - 1, getWidth() + 3, getHeight() + 3); AbstractionGrid ab...
7
@Override public void run() { this.setPreferredSize(new Dimension(1024, 800)); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); luoKomponentit(this.getContentPane()); this.pack(); this.setVisible(true); }
0
public static String post(String adress,List<String> keys,List<String> values) throws IOException { String result = ""; OutputStreamWriter writer = null; BufferedReader reader = null; try { String data=""; if(keys != null && values != null) ...
9
@EventHandler public void onSignChangeEvent(SignChangeEvent event) { if (event.getLine(0).trim().equalsIgnoreCase("[filter]")) { BlockFace direction = plugin.getSignBack(event.getBlock()); if (direction == null || event.getBlock().getRelative(direction).getType() != Material.HOPPER...
3
private void permute2Rec(int level, List<Integer> num, List<List<Integer>> res){ if (level == num.size()) res.add(new ArrayList<Integer>(num)); for (int i = level; i < num.size(); ++i){ Collections.swap(num, i, level); permute2Rec(level + 1, num, res); Collections.sw...
2
@Test public void testMissingType() throws Exception { final Properties p = new Properties(); p.setProperty("type", "BOGUS"); final Properties[] configs = new Properties[]{p}; final FilterFactory ff = new FilterFactory(configs); try { final Filter[] filters = ff.g...
1
public void run() { // to loop until LOGOUT boolean keepGoing = true; while(keepGoing) { // read a String (which is an object) try { cm = (ChatMessage) sInput.readObject(); } catch (IOException e) { display(username + " Exception reading Streams: " + e); break; } catc...
7
public int getHP() { return hp; }
0
public VgerBibData getBibData() { VgerHoldingDataGenerator holdingGen; VgerItemDataGenerator itemGen; makeConnection(); bibData = new VgerBibData(); bibData = ( VgerBibData ) new JdbcTemplate( ds ).queryForObject( BIB_QUERY, ...
6
public FinishedJobRecord(String str) { StringTokenizer st = new StringTokenizer(str, ":"); int tokNumber = 0; while (st.hasMoreElements()) { tokNumber++; String val = st.nextToken(); // We only get what we need, fields which are not used by // p...
9
private void initGraphics() { startX = PREFERRED_WIDTH * 0.114; startY = PREFERRED_WIDTH * 0.112; stepX = PREFERRED_WIDTH * 0.072; stepY = PREFERRED_WIDTH * 0.08; font = Font.loadFont(getClass().getResourceAsStream("/eu/hansolo/enzo/fonts/din.otf"), PREFER...
5
public static ArrayList<Rating> getTestSet(String file) { ArrayList<Rating> testset = new ArrayList<Rating>(); InputStream fis = null; BufferedReader br; try { fis = new FileInputStream(file); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } br = new ...
3
@MCCommand(cmds = { "addOptions" }, op = true, usage = PORT_ADD_OPTIONS) public boolean portAddOptions(CommandSender sender, Port port, String[] args) { List<String> portOptions = new ArrayList<String>(); for (int i = 2; i < args.length; i++) { String op = args[i]; if (!Port.checkOption(op)) { send...
6
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://down...
6
public String getCardTypeString() { String ret = ""; switch (cardType) { case HERO_FRONT: ret = "Hero Front"; break; case HERO_BACK: ret = "Hero Back"; break; case HERO_CARD: ret = "Hero Card"; break; case VILLAIN_FRONT: ret = "Villain Character"; break; case VILLAIN_BACK: ret = "Vill...
8
public void nextFrame() { if (loopCount < 0) return; int n = images != null ? images.length : 0; if (n <= 1) return; if (gifDecoder == null) return; currentTime = System.currentTimeMillis(); if (previousFrameTime != 0L) { if (currentTime - previousFrameTime >= getDelayTime(frameCounter)) { ...
9
protected Point2D checkWallCollision(float newX, float newY) { float fromX = Math.min(getPosition().getX(), newX); float toX = Math.max(getPosition().getX() + getWidth(), newX + getWidth()); float fromY = Math.min(getPosition().getY(), newY); float toY = Math.max(getPosition().getY() + getHeight(), newY + ge...
8
public String the(String field) { String newField = "", number = ""; if(field.substring(0, 1).equals(" ")) { field.substring(1); } for(int i = 1; i <= field.length(); i++) { if(isNumber(field.substring(i - 1, i))) { ...
4
public boolean clicked() { if(key.isPressed() && !key.isHeld()) return true; else return false; }
2
private static void initialize(int size) { greatestFactor = new int[size]; // wheel factorization (sort of...) greatestFactor[1] = 1; for (Integer seed : seeds) { for (int i = seed; i < size; i += seed) { greatestFactor[i] = seed; } } ...
7
protected void generateInstructions(List<Instruction> instructions) { for (Instruction instruction : instructions) { m_currentInstruction = instruction.toString(); print(LABEL_PREFIX + m_instructionCounter++ + ": # " + m_currentInstruction); indent(); if (instruction instanceof Assign) { generateAssig...
7
public void initTable () { int[] fArray = {45,120,80,45,150,150,45,150,150,150,200,150,150,150,150,150,150}; for (int i=0; i<= table_fullticket.getColumnCount()-1; i++) { table_fullticket.getColumnModel().getColumn(i).setPreferredWidth(fArray[i]); } int [] cArray = {...
5
protected static Request createRequest(RequestType type) { switch(type) { case COMPARE_AND_SET: return new CompareAndSetRequest(); case ADD_AND_GET: return new AddAndGetRequest(); case UPDATE: return new UpdateRequest(); case G...
8
public void amountDecremented(int ID) { switch (ID) { case 0: case 1: case 2: case 3: bonusStats++; characterStr.updateMaxStats(characterStr.count + bonusStats, 18); characterInt.updateMaxStats(characterInt.count + bonusStats, 18); characterDex.updateMaxStats(characterDex.count + bonusStats, 18...
6
public void updatePrintField(){ ArrayList<LinkedList<Steinchen>> spielfeld = controller.getPlayground().getField(); for(int i = 0; i < 24; i++){ for(int j = 0; j < spielfeld.get(i).size(); j++){ if(spielfeld.get(i).get(j) != null){ print(spielfeld.get(i).get(j).getSteinchenID()); ...
3
public boolean offScreen() { return x + xMap + width < 0 || x + xMap - width > Game.WIDTH || y + yMap + height < 0 || y + yMap - height > Game.HEIGHT; }
3
public boolean listEntry(int value) { ListElement current = head; while (current != tail.next) { if (current.value == value) { return true; } } return false; }
2
public int getPrice() { int price; if (_shots > 0) { price = _price; } else { price = GameSettings.SOLD_OUT_PRICE; } return price; }
1
@Override public ClusteringOperation next() { byte opCode = this.opCodes.get(++opIndex); ClusteringOperation result = null; if (opCode == 0) { result = ClusteringOperation.newNextStepOp(); } else if (opCode == 1 || opCode == 2 || opCode == 3 || opCode == 4) { int arg0 = this....
9
private void vakautaKeko() { /* taulukon koko pitäisi teoriassa olla oikeasti: keon suurinasteisen puun aste +1 */ FibonacciSolmu[] A = new FibonacciSolmu[keonKoko]; FibonacciSolmu kasiteltava = min; kasiteltava = kasiteltava.getLeft(); int juurienMaara = 1; wh...
6
public static int countNeighbours(boolean [][] world, int col, int row){ int total = 0; total = getCell(world, col-1, row-1) ? total + 1 : total; total = getCell(world, col , row-1) ? total + 1 : total; total = getCell(world, col+1, row-1) ? total + 1 : total; total = getCell(world, col-1, row ) ? total + 1...
8
public synchronized void piece(int index, int begin, byte[] block, Peer peer) { RequestExtended request = null; Set<RequestExtended> pendingRequests = null; pendingRequests = peerPendingRequests.get(peer); if (pendingRequests != null){ for (RequestExtended re : pendi...
9
@Override public void buttonPerformed(String name) { if (name.equals("Choose Colour")) { Color temp = JColorChooser.showDialog(null, "Choose your line color", c); if (temp != null) { c = temp; } } else if (name.equals("Save")) { writeMap(); } else if (name.equals("Place Character")) { setChar ...
5
public static void loadSQLStatements(List<SQLStatement> sqlStatementsToLoad) { Connection connection = null; try { connection = ConnectionPoolUtils.getConnectionFromPool(); if (connection == null) { // just for testability: during normal execution we will never g...
6
private static void setFinder(Entry entry) { // Eat any exception we might encounter - if this fails it'll just revert to creating // a new JAXBContext each time. This is slow but works. try { Method method = entry.getClass().getDeclaredMethod("setFinder", JAXBContextFinder.class); ...
5