text
stringlengths
14
410k
label
int32
0
9
public boolean registraEquipo(HttpServletRequest request, HttpServletResponse response) throws IOException { ConexionBD bd = new ConexionBD(); request.setCharacterEncoding("UTF-8"); String activoFijo = (String) request.getParameter("activoFijo"); int actFijo = (activoFijo.equals("")) ? 0...
2
public void addChatGuiListener(ChatGuiListener listener) { chatGuiListener.add(listener); }
0
public T pop() { int length = size(); if (length == 0) { throw new EmptyStackException(); } return remove(length - 1); }
1
private void process_bmpcache2(RdpPacket_Localised data, int flags, boolean compressed) throws RdesktopException, IOException { Bitmap bitmap; int y; int cache_id, cache_idx_low, width, height, Bpp; int cache_idx, bufsize; byte[] bmpdata, bitmap_id; bitmap_id...
9
private KeyEventHandler() { registeredListeningObjects = new SynchronisedGameQueue<IKeyboardEventable>(); waitingEventLists = new ConcurrentHashMap<KeyEventType, Collection<EventHolder>>(); for (KeyEventType eventType : KeyEventType.values()) { waitingEventLists.put(eventType, Collections.synchronizedList(new...
1
public Animation getAnimationLeft(){ if(dead){ return death; } if (type == Type.CAT){ return catAnimLeftWalking; } else { return dogAnimLeftWalking; } }
2
public static String stripLeading(final String string, final char ch) { //// Preconditons if (string == null) throw new InvalidParameterException("string cannot be null"); int index = 0; final int string_length = string.length(); if (string_length == 0) return string; while (tru...
5
public static byte[] decodeBase64(byte[] base64Data) { // RFC 2045 requires that we discard ALL non-Base64 characters base64Data = discardNonBase64(base64Data); // handle the edge case, so we don't have to worry about it later if (base64Data.length == 0) { return new byte[0]...
8
public void actionPerformed (ActionEvent e) { if (e.getSource() instanceof JButton) { //make new jframe asking "are you sure" //if yes, client.disconnect //if no, kill jframe and do nothing JOptionPane sure = new JOptionPane ("Exit audiochat", JOptionP...
3
private static void doCrypt(String in, String out, String pass, boolean encrypt, String encoding) throws IOException, InvalidEncodingException { Cryptographer crypt = new CBCCryptographer(); CryptographerHandler bm = new CryptographerHandler(crypt); verbosePrint("Using "+bm.getCryptoMode()); ...
9
@Override public void run() { arr_data = History.showHistory(); data = new Object[arr_data.size()][]; for (int i = 0; i < arr_data.size(); i++) { data[i] = arr_data.get(i).Array(); } this.fireTableDataChanged(); }
1
private static String maskPassword(String proxyString) { String retVal = proxyString; if (proxyString != null && !"".equals(proxyString.trim())) { boolean hasSchemeDefined = proxyString.contains("http:") || proxyString.contains("https:"); boolean hasProtocolDefined = proxyString....
8
public void shootArrow(char x) { if (running) { if (x == 'A' || x == 'D') { if (hunterLocation.y == wumpusLocation.y) { hitWumpus = true; } } else if (x == 'W' || x == 'S') { if (hunterLocation.x == wumpusLocation.x) { hitWumpus = true; } } hitSelf = true; updateCurrentState()...
7
public Ticket in(Car car) { if(isFull()) { throw new ParkException("停车场已满,不能停车了。"); } int num = this.parkBoyList.size(); if(this.park != null) { num += 1; } Random random = new Random(); while(true) { int i = random.nextInt(num); if(i == 0 && !this.park.isFull()) { return park.in(car); ...
7
public TextFieldListener(JTextField field, Preference pref) { setTextField(field); setPreference(pref); }
0
private void Load(String file) { BufferedReader reader; try { reader = new BufferedReader(new FileReader(file)); String line = null; while ((line = reader.readLine()) != null) { if (!line.equalsIgnoreCase("")) { String[] p = line.split(" "); Waypoint w = new Waypoint(Integer.valueO...
6
private List<String> GetZipNames(String projectName){ String zipArray=""; List<String> zipNames=new ArrayList<String>(); @SuppressWarnings("unchecked") List<HierarchicalConfiguration> appList = SystemConfig.getInstance().configurationsAt("apps.app"); for (Iterator<HierarchicalConfiguration> iterator = appList...
3
public void drawNewPoints() { if (imageGfx == null) { imageGfx = image.getGraphics(); } if (activeTool == Tool.ERASER) { imageGfx.setColor(Color.white); } else { if (color == null) imageGfx.setColor(Color.black); else imageGfx.setColor(color); } for (Point p : pointsToDraw) { imageGfx.fillOva...
4
public int getX() { return this.x; }
0
@Override public void handleEvent(Event event) { if (event.getType() == EventType.END_ACTION) endActionUpdate(); else if (event.getType() == EventType.END_EFFECT) if (isValidEndEffectEvent(event)) removeEffect(); }
3
public boolean moveDown() { // Block invalid moves if (!canMoveDown) return false; boolean result = false; for (int j = 0; j < dim; j++) { for (int i = dim-2; i >= 0; i--) { // Can skip the bottom most row // Skip empty tiles if (isTileEmpty(i, j)) continue; // Stepping in...
8
public JustShoot() { // addSequential(new Command() { // public void initialize() { // new SetColor(new Color(0,0,255)).start(); // } // protected void execute() {} // protected boolean isFinished() { // return true; // } // ...
0
@Override public short[] getTerrainData(int px, int pz, int sx, int sz) { short[] res = base.getTerrainData(px, pz, sx, sz); for (int x = 0; x < sx; x++) for (int z = 0; z < sz; z++) { int y; int d = depth; boolean paint = ...
9
public static void saveLifestone(String bWorld, int bX, int bY, int bZ) throws SQLException {// Block // block // String bWorld = block.getWorld().getName(); // int bX, bY, bZ; // bX = block.getX(); // bY = block.getY(); // bZ = block.getZ(); String table = "Lifestones"; Connecti...
5
private void close(Connection conn, PreparedStatement stmt, ResultSet rs) { if (rs != null) { try { rs.close(); } catch (Exception ex) { } } if (stmt != null) { try { stmt.close(); } catch (E...
6
public void load() { try { BufferedReader br = new BufferedReader(new FileReader("src/save.txt")); String line; while ((line = br.readLine()) != null) { if (line.equals("max")) { this.setMaxLevel(Integer.parseInt(br.readLine())); } if (line.equals("current")) { ...
8
public void optField() { Class<?> clazz; try { clazz = Class.forName("com.rock.reflect.User"); User u = (User) clazz.newInstance(); Field f = clazz.getDeclaredField("userName"); f.setAccessible(true);//设置为true后,可访问私有变量 System.out.println(f); f.set(u, "rock"); System.out.println(u.getUserName(...
6
public int getButton(int index) { try { if (buttonState[index]) return 255; else return 0; } catch (Exception e) { // this index doesn't exist, return 0; return 0; } }
2
private Reader[] open(String... f) throws FileNotFoundException { Reader[] r = new Reader[f.length]; for (int i = 0; i < r.length; i++) { r[i] = new FileReader(this.getClass().getResource(f[i]).getFile()); } return r; }
1
public Expression getValueBySlot(int slot) { slot--; // skip this parameter (not an outer value) for (int i = 0; i < headCount; i++) { if (slot == 0) { Expression expr = head[i]; if (i >= headMinCount) headMinCount = i; return expr; } slot -= head[i].getType().stackSize(); } return nul...
3
@Override public List<Integer> update(Criteria beans, Criteria criteria, GenericUpdateQuery updateGeneric, Connection conn) throws DaoQueryException { List paramList1 = new ArrayList<>(); List paramList2 = new ArrayList<>(); StringBuilder sb = new StringBuilder(UPDATE_QUERY); String ...
1
public String addBinary(String a, String b) { int aLast = a.length() - 1; int bLast = b.length() - 1; String result = ""; int carry = 0; while (aLast >= 0 || bLast >= 0) { int aNum = 0, bNum = 0; if(aLast >= 0) aNum = Character.getNumericValue(a.charAt(aLast)); if(bLast >= 0) bNum = Character.getNu...
6
public int CalculateOffset(int oldaddress,int newaddress){ //Calculates offset in case of labels int x=0; x=(newaddress-oldaddress)/2-1; return x; }
0
public static void loadProperties(String configPath) throws IOException { properties = new Properties(); String path = (configPath == null) ? Constants.PROP_FILENAME : configPath; try { properties.load(new FileInputStream(path)); validateProperties(); logger.info("config.properties file loaded.");...
2
public void mouseMove(MouseEvent e) { for(UIContent content : Contents) { content.contentMouseMove(e); } }
1
public static MoodleGroupUser[] getMembersFromGroupIds(long[] groupids) throws MoodleRestGroupException, UnsupportedEncodingException, MoodleRestException { Vector v=new Vector(); MoodleGroupUser user=null; StringBuilder data=new StringBuilder(); String functionCall=MoodleCallRestWebServ...
7
public void scrollCellToView(JTable table, int rowIndex, int vColIndex) { if (!(table.getParent() instanceof JViewport)) { return; } JViewport viewport = (JViewport) table.getParent(); Rectangle rect = table.getCellRect(rowIndex, vColIndex, true); Rectangle viewRect =...
9
@Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { boolean isWateryEnough = CMLib.flags().isWateryRoom(mob.location()); if(!isWateryEnough) { if(mob.location().resourceChoices().contains(Integer.valueOf(RawMaterial.RESOURCE_FISH))) isWateryE...
8
@Test(expected=IllegalArgumentException.class) public void testGcdInvalidInput() { // Integers must be non-negative int q = 1; int p = -5; BasicMath.gcd(p, q); }
0
public Client(){ }
0
public void startDataConnection(Client c, String device) { if ((activeClient != null) && (activeDevice != null)) { stopDataConnection(activeClient, activeDevice); } c.startDataConnection(device); activeClient = c; activeDevice = device; List<ClientChangedListener> copy = new ArrayList<ClientChangedListen...
3
public void mapSize() { carte = new Map(); JLabel labels[] = new JLabel[(19 * 49)]; String bufferMap = carte.lire("./ressources/map.txt"); for (int i = 0, j = 0; i < bufferMap.length(); i++) { if (bufferMap.charAt(i) != '\n') { colonne = i; } ...
2
public void drawWindow(RenderEngine renderEngine, FontRenderer fontRenderer) { if (!(this instanceof SceneScreen)) { if (this instanceof IRendersEventProvider) { IRendersEventProvider provider = (IRendersEventProvider) this; provider.preRenderScreen(renderEngine, font...
8
@Override public void paintComponent(Graphics G){ super.paintComponent(G); if(started){ //button building G.drawImage(BuildImages[0], 578, 0, null); G.drawImage(BuildImages[1], 578, 80, null); //G.drawImage(BuildImages[2], 578, 498, null); G.d...
5
public static void main(String[] args) { try { ConfigManager configManager = new ConfigManager(); Map<String, ConfigEntry> config = new HashMap<>(); if (!configManager.loadConfig(config)) { System.out.println("Invalid configuration file!"); ...
6
public int[] getComplexErrorCodes() { Map<String, String> allFields = getFields(); List<Integer> errorCodeList = new ArrayList<Integer>(); for (Entry<String, String> field : allFields.entrySet()) { String fieldKey = field.getKey(); if (fieldKey.startsWith("Errors.")) { int nextDot = fieldKey.indexOf('.'...
5
public String getPhone() { return Phone; }
0
public void run() { System.out.println("Enter Portal"); if(Util.WalkToAndClick("Enter", Util.portals)) { int time = 0; while(validate() && time <= 5000) { time += 50; Time.sleep(50); } } }
3
public Command(String _name, String _command, int _numParams, String _help) { this.name = _name; this.command = _command; this.numParameters = _numParams; this.helpMessage = _help; }
0
public static WordLocation parseWordLocation(String obj) { WordLocation wl = new WordLocation(); String data[] = obj.split("\n"); if( data.length != 2) return null; String tokens[] = data[0].split("[=]|[\\{]|[\\}]|[,]"); try { if(data[0].indexOf("WordLocat...
8
public void setInfo(String info) { // レコード情報設定 this.info = info; String[] tmp = info.split(";"); // 化合物名設定 this.name = tmp[0].trim(); // ソート用化合物名設定 this.sortName = tmp[0].trim(); // 付加情報設定 StringBuffer addition = new StringBuffer(); for (int i=0; i<tmp.length; i++) { if (i==0) { c...
4
public void actionPerformed(java.awt.event.ActionEvent event) { Object object = event.getSource(); if (object == JButton_Exit) JButtonExit_actionPerformed(event); else if (object == JButton_NewCCAccount) JButtonNewCCAC_actionPerformed(event); else if (object == JButton_GenBill) JButtonGenerate...
5
public String getTitle() { return title; }
0
public void addTreasureChest(TreasureChest chest) { if(possibleTreasures.contains(chest)) return; possibleTreasures.add(chest); }
1
@Test public void testRunStartServerInvalidSpot()throws Exception{ AccessControlServer server = new AccessControlServer(1930); server.start(); SpotStub spot = new SpotStub("999",1930); spot.start(); sleep(1000); String ans = ""; int x = 0; ...
3
int nextDescriptorOffset (int offset) { if (data.length < offset) return -1; offset += 0xff & data [offset]; if (data.length <= (offset + 2)) return -2; return offset; }
2
public void testLeapYearRulesConstructionInvalid() { // 1500 not leap in Gregorian, but is leap in Julian try { new DateMidnight(1500, 2, 30, GJChronology.getInstanceUTC()); fail(); } catch (IllegalFieldValueException ex) { // good } }
1
@Override public void run() { try{ _user = new ClientUDP(); _user.sendToServer(new MessageUDP(_CSName, _CSPort, Protocol.LIST + "\n")); System.out.println(">> Sent list"); _bufferUDP = _user.receiveFromServer(); _arguments = _bufferUDP.getMessage().split(" "); if(_arguments[0].equals(Protocol.LIST_...
7
public void setjLabelBilan(JLabel jLabelBilan) { this.jLabelBilan = jLabelBilan; }
0
public String getLyricsWebPage(String artistName,String songName){ try { if (artistName.equals(null) || artistName.equals("") || songName.equals(null) || songName.equals("")) return null; String url = buildUrl(artistName,songName); Document document = reader.read(url); // XMLUtil.writeToFile(d...
6
public void readParams() throws IOException { Set<String> allParams = paramsSet(); // Read normal non-multipart params. for (String name : allParams) { if (!mParent.isParameterSet(name)) { continue; } mParamTable.pu...
9
Photon emit(Atom atom) { Electron e = atom.getElectron(0); if (e == null) return null; ElectronicStructure es = model.getElement(atom.id).getElectronicStructure(); int m = es.indexOf(e.getEnergyLevel()); if (m == 0) return null; // electron already in the ground state if (!e.readyToGo(model.getModel...
7
public int unwrapInteger() { if (!isInteger) { //If not integer, return floatingPointOperand cast to int (fraction part lost) int castIntOperand = (int) floatingPointOperand; //Create temporary value so as not to overwrite true value return castIntOperand; } return intOperand; }
1
public Key keyOf(int i) { if (i < 0 || i >= NMAX) throw new IndexOutOfBoundsException(); if (!contains(i)) throw new NoSuchElementException("index is not in the priority queue"); else return keys[i]; }
3
@Override public boolean getOption(String opname){ if(opname == "Ages"){ return ages;} if(opname == "Fades"){ return fades;} if(opname == "Any"){return any;} if(opname == "All"){return all;} if(opname == "Mirror"){ return mirror;} return false;}
5
public final void update(Level level, int x, int y, int z, Random rand) { int var6 = level.getTile(x, y - 1, z); if(level.isLit(x, y, z) && (var6 == DIRT.id || var6 == GRASS.id)) { if(rand.nextInt(5) == 0) { level.setTileNoUpdate(x, y, z, 0); if(!level.maybeGrowTree(x, y, z)...
5
protected Constructor<? extends T> getCtor() { if(ctor == null) try { ctor = projectileType.getDeclaredConstructor(actor.Actor.class); } catch (SecurityException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.pr...
4
@Override public boolean okMessage(Environmental host, CMMsg msg) { if((msg.source()!=affected) &&((msg.target()==pocket)||(msg.tool()==pocket)) &&(CMath.bset(msg.sourceMajor(),CMMsg.MASK_HANDS) ||CMath.bset(msg.sourceMajor(),CMMsg.MASK_MOVE) ||CMath.bset(msg.sourceMajor(),CMMsg.MASK_DELICATE) ||...
7
public JSONObject getJSONObject(String key) throws JSONException { Object object = this.get(key); if (object instanceof JSONObject) { return (JSONObject) object; } throw new JSONException("JSONObject[" + quote(key) + "] is not a JSONObject."); }
1
public void reloadConfig() { if (configFile == null) { configFile = new File(master.getDataFolder(), configFileName); } config = YamlConfiguration.loadConfiguration(configFile); if (configFileName.equals("localization.yml")) { InputStream defDataConfigStream = master.getResource("localization.yml"); ...
5
static int getFactor(final double d, final int max) { if (d == 0) { return 0; } int factor = 0; do { final double scale = getDScale(factor); final double scaled = d * scale; if (scaled == (long) scaled) { return factor; } else { factor++; } } while (factor < max); return max; ...
3
public void testValidityOfRanks() { FiveEval fiveEval = new FiveEval(); System.out.println("testing ranks...\n"); for (int i = 6; i < 52; i++) { for (int j = 5; j < i; j++) { for (int k = 4; k < j; k++) { System.out.println("" + i + "_" + j + "_" + k + "\n"); for (int l = 3; l < k; l++) { f...
8
public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } }
1
final String _readValue_() throws IOException, IllegalArgumentException { final Reader source = this._reader_; final StringBuilder result = this._builder_; result.setLength(0); while (true) { int symbol = source.read(); switch (symbol) { case -1: case '\r': case '\n': return result.toStri...
5
public void listRoot() throws IOException { this.list("/"); }
0
public static boolean isHighScore(int score){ Integer scorez = 0; for(int i = 0; i < 5; i++){ scorez = Integer.parseInt(topScores[i][1]); if(score > scorez){ return true; } } return false; }
2
public Object nextValue() throws JSONException { char c = nextClean(); String s; switch (c) { case '"': case '\'': return nextString(c); case '{': back(); return new JSONObject(this); case '[': ...
8
public void mouseExited(MouseEvent paramMouseEvent) { if (ImageButton.this.Enabled) { if (ImageButton.this.MouseOverImage != null) { if ((ImageButton.this.On) && (ImageButton.this.OnImage != null)) ImageButton.this.rawSetImage(ImageButton.this.OnImage); else {...
5
private boolean winCheck() { String winner = Resolution.resolutionWinCheck(); if(winner.equals("X")){ JOptionPane.showMessageDialog(null, "X wins the game!", "Winner", 0); return true; } else if(winner.equals("O")){ JOptionPane.showMessageDialog(null, "O wins the game!", "Winner", 0); return true; ...
4
private void neuMalen(Graphics2D g) { g.setColor(Color.WHITE); g.scale(zoom, zoom); g.fillRect(0, 0, (int) (rahmen.getWidth() / zoom), (int) (rahmen.getHeight() / zoom)); g.setColor(Color.BLACK); try { for (Geo geo : statisch) { geo.zeichnen(g); } } catch (Exception ...
4
public static int findFloor(int[] input, int start, int end, int k) { if(k < input[start]){ return -1; } if(k > input[end]){ return input[end]; } int mid = (start +end)/2; if(input[mid]<=k && input[mid+1] > k){ return input[mid]; ...
7
private void deleteCard(){ int i; System.out.println("----------- Delete a Card -----------"); System.out.print("Enter the index of the card you want to delete (start at 0): "); i = sc.nextInt(); sc.nextLine(); if(i >= 0 && i <= this.deck.numberOfCards() - 1){ this.deck.deleteCard(i); System....
2
public ZFrame pop() { if (frames == null) frames = new ArrayDeque<ZFrame>(); try { return frames.pop(); } catch (NoSuchElementException e) { return null; } }
2
private String stackTraceString(Exception e){ StringWriter stackString = new StringWriter(); int depth = 0; for(StackTraceElement element : e.getStackTrace()){ stackString.write("\t"); for (int i = 0 ; i <= depth ; i++){ stackString.write(" "); } stackString.write(element.getClassName() + ":" + ...
3
public void setVerdes(int verdes) { this.verdes = verdes; }
0
static double[][] inverse(double[][] A){ double[][] B; double detA = det(A); if(A.length == 1){ B = new double[1][1]; B[0][0] = 1/detA; }else{ B = new double[A.length][A.length]; B = transpose(cofactor(A)); for(int i = 0; i < B.length; i++){ for(int j = 0; j < B.length; j++){ B[i][j] = B...
3
public void cambiarCasilla(Casilla casilla, int type){ if(type != 7 && type != 5 && type != 6) porcentajeObstaculos = (float) (porcentajeObstaculos + (100.0 / ((float) size_tablero_F * (float) size_tablero_C))); if( (type == 7 || type == 5 || type == 6) && casilla.get_type() != 7 && casilla.get_t...
9
@Override public void show_PortA(Integer value) { PIC_Logger.logger.info("Showing Port A"); int x=7; for(int i = 0; i < 8; i++){ if( (value & (int)Math.pow(2, i)) == (int)Math.pow(2, i)){ regA.setValueAt(1, 1, x+1); } else{ regA.setValueAt(0, 1, x+1); } x--; } }
2
void createChildWidgets() { /* Add common controls */ super.createChildWidgets(); /* Add TableEditors */ comboEditor = new TableEditor(table); nameEditor = new TableEditor(table); table.addMouseListener (new MouseAdapter() { public void mouseDown(MouseEvent e) { resetEditors(); index = table...
3
public List<String> anagrams(String[] strs) { List<String> result = new ArrayList<String>(); if (strs == null || strs.length == 0) return result; Map<String, List<String>> map = new HashMap<String, List<String>>(); for (String str : strs) { char[] strChars = str.toCharArray(); Arrays.sort(strChars); ...
6
private JPopupMenu getTabsPopupMenu() { JPopupMenu popup = new JPopupMenu("Tabs"); // Tabs -> Part JMenuItem menuItemPart = new JMenuItem("Part"); menuItemPart.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Component component = getSelectedCom...
7
private int validateInsert() { try { int receiptID; int upc; int quantity; if (returnID.getText().trim().length() != 0 && isNumeric(returnID.getText().trim())) { receiptID = Integer.valueOf(returnID.getText().trim()).intValue(); } else { return VALIDATIONERROR; } if (itemU...
9
public Boolean readBit() throws IOException{ if(buffer==-1) return null; if(bufferFilled==0){ buffer = in.read(); if(buffer==-1) return null; bufferFilled = 7; } else bufferFilled--; boolean ret = (buffer&128)>0; buffer<<=1; return ret; }
3
protected void buildIntervals(IntervalsBuilder<T> builder) { // go throug map and create intervals as numbers goes for (Iterator<Map.Entry<T, Boolean>> it = setMap.entrySet().iterator(); it.hasNext();) { Map.Entry<T, Boolean> object = it.next(); // start if (object.ge...
3
@EventHandler(priority = EventPriority.LOWEST) public void onEnchantAttempt(PrepareItemEnchantEvent e) { final World world = e.getEnchantBlock().getWorld(); for (String worldname : WorldSettings.worlds) { if (Settings.world || world.getName() == worldname) { if (Settings.totalenchant && !PermissionHan...
5
public byte[] CreateAnswerPacket(byte[] Qpacket,String adrr){ System.out.println("Le packet QUERY recu"); for(int i = 0;i < Qpacket.length;i++){ if(i%16 == 0){ System.out.println("\r"); } System.out.print(Integer.toHexString(Qpacket[i] & 0xff).toString() + " "); } System.out.println("\r");...
8
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final XML other = (XML) obj; if (this.document != other.document && (this.document == null || !this.document.eq...
5
public void unlockProgrammProcess() { try { programLocker.close(); new File(VCNConstants.LOCK_FILE_PATH).delete(); } catch (Exception e) { e.printStackTrace(); } System.out.println("Program lock released"); }
1
private boolean isFirst(){ //todo 2 regime if (gameRegime != TWO_PLAYERS_ONLINE_GAME_REGIME){ return true; } else { System.out.println("Are you first to play?"); ...
1
private void randomSolve() { Log.log("RandomSolve <Start>"); collectAreas(true); if ( !mAreas.isEmpty()) { double prop = 0; Area maxArea = null; for (Area area : mAreas) if ( !area.isToRemove() && (maxArea == null || area.getProbability() > prop)) { maxArea = area; prop = maxArea.get...
6