text
stringlengths
14
410k
label
int32
0
9
public Wave46EliteLorelei(){ super(); MobBuilder m = super.mobBuilder; for(int i = 0; i < 4000; i++){ if(i % 5 == 0) add(m.buildMob(MobID.JYNX)); else if(i % 4 == 0) add(m.buildMob(MobID.LAPRAS)); else if(i % 3 == 0) add(m.buildMob(MobID.CLOYSTER)); else if(i % 2 == 0) add(m.buildMob(M...
5
public void openFile() { System.out.println("manager.openFile() CALLED"); JFileChooser fc = new JFileChooser(); fc.setFileFilter(new FileNameExtensionFilter("mp3 files", "mp3")); int answer = fc.showOpenDialog(null); if (answer == JFileChooser.APPROVE_OPTION && fc.getSelectedFile().getName().endsWith(".m...
5
static void terminateBits(int numDataBytes, BitArray bits) throws WriterException { int capacity = numDataBytes << 3; if (bits.getSize() > capacity) { throw new WriterException("data bits cannot fit in the QR Code" + bits.getSize() + " > " + capacity); } for (int i = 0; i < 4 && bits.get...
8
private List <Movement> listPositionsToMove(Player player, Grid grid){ Position pos = player.getPosition(); List <Movement> possibleMovements = new ArrayList<Movement>(); if (canMoveToPosition(player, grid, new Position(pos.getxCoordinate(), pos.getyCoordinate()-1))) possibleMovements.add(Movement.UP); if (c...
8
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { conn = DatabaseConnection.getConnection(); String user = req.getParameter("user"); String pass=""; try { pass = stringToHash(req.getParameter("password")); } catch (NoSuchAlgorithmException e1)...
4
public void openPrayMenu(final Player p, final God g, final Shrine s) { //Adding the player for statistics if not already registered AGPlayer agp = getAGPlayer(p.getName()); if(agp == null) agp = addAGPlayer(p.getName()); if(agp.isPraying()) { Messenger.sendMessage(p, Message.alreadyPraying); return; ...
4
protected Class<?> resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException { // ClassLoader latestLoader = latestUserDefinedLoader(); ClassLoader latestLoader = loader; ClassLoader nonPublicLoader = null; boolean hasNonPublicInterface = false; // define proxy in class loader of non-p...
7
private void loadMap(String filename) throws IOException { ArrayList lines = new ArrayList(); int width = 0; int height = 0; BufferedReader reader = new BufferedReader(new FileReader(filename)); while(true){ String line = reader.readLine(); if(line==null){ reader.close(); break; } if(!line...
6
public String[] getInputStrings() { return inputStrings; }
0
public static Set<PosixFilePermission> byteToPerms(byte[] b) { Set<PosixFilePermission> result = EnumSet.noneOf(PosixFilePermission.class); // @formatter:off if ((b[0] & 1)!=0) result.add(OWNER_READ); if ((b[0] & 2)!=0) result.add(OWNER_WRITE); if ((b[0] & 4)!=0) result.add(OWNER_EXECUTE); if (...
9
@Override public boolean isEmpty() { if(root == null){ return true; } return false; }
1
public void stop() { if (running) { try { server.stop(); } catch (Exception e) { e.printStackTrace(); } running = false; } }
2
@Override public boolean preConditionIsTrue() { message = myAgent.receive(mt); if(message != null) { if(message.getContent().equals("A")) { brand = Brand.A; } else { brand = Brand.B; } beer = agent.getRefrigerator().getBeer( brand ); if(beer != null && beer.getState() == BeerState...
4
public InputStream getInputStream() { InputStream in = this.classLoader.getResourceAsStream(this.path); if (in != null) { return in; } try { return new FileInputStream(this.path); } catch (FileNotFoundException e) { return null; } }
2
private byte[] get_img_stream(File dot, String type) { File img; byte[] img_stream = null; try { img = File.createTempFile("graph_", "."+type, new File(GraphViz.TEMP_DIR)); Runtime rt = Runtime.getRuntime(); // patch by Mike Chenault String[] args = {D...
4
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 void setDiscountPercent(int discountPercent) { this.discountPercent = discountPercent; }
0
@Override public boolean equals( Object o ) { if( o == this ) { return true; } if( !( o instanceof LongSet ) ) { return false; } LongSet m = (LongSet)o; if( m.size() != size() ) { return false; } try { ...
7
public static Injector getInjector() { return injector; }
0
private void dbInit() { // Initialize connection pool String driver, url, user, pass; if (plugin.getConfig().getBoolean("mysql.enabled")) { // MySQL dbms = DBMS.MySQL; ConfigurationSection cs = plugin.getConfig().getConfigurationSection("mysql"); String host = cs.getString("host"); int port = cs.ge...
5
public int getUnnotedItem(int ItemID) { int NewID = ItemID - 1; String NotedName = ""; for (int i = 0; i < Config.ITEM_LIMIT; i++) { if (Server.itemHandler.ItemList[i] != null) { if (Server.itemHandler.ItemList[i].itemId == ItemID) { NotedName = Server.itemHandler.ItemList[i].itemName; } } } ...
7
public Filter and( Filter other ) { return new And( this, other ); }
0
public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String line = ""; StringBuilder out = new StringBuilder(); int nCase = 1; while ((line = in.readLine()) != null && line.length() != 0) { int depth = Integer.parseInt(line.tr...
7
public void setValue(RNG rng, VoxelStack stack, int x, int y, int z) { if (x >= minX && x <= maxX && y >= minY && y <= maxY && z >= minZ && z <= maxZ) determineValue(rng,stack,x,y,z); for (TreeNodeArea tna: subAreas) { tna.setValue(rng, stack, x, y, z); } }
7
public void render() { BufferStrategy bs = getBufferStrategy(); if (bs == null) { createBufferStrategy(3); return; } clear(); draw(); Graphics g = bs.getDrawGraphics(); g.setColor(Color.BLACK); g.fillRect(0, 0, getWidth(), getHeight()); if (getWidth() / getHeight() > width / height) { g.dra...
4
public boolean hasNext() { int tmp = vsize.length - 1; while (tmp >=0 && this.start[tmp] + this.chunkStep[tmp] >= this.vsize[tmp]) { tmp--; } if (tmp < 0) { return false; } return true; }
3
public double useHeuristic(Board b ) { int counter = 0; for(int i = 0; i < 4; i++){ for(int j = 0; j < 4; j++){ if (b.boardState[i][j] == 0) counter++; } } return adjust(counter); }
3
private void jButtonSuivantActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSuivantActionPerformed ((CtrlVisiteur)controleur).visiteurSuivant(); }//GEN-LAST:event_jButtonSuivantActionPerformed
0
public boolean SetupPasswordCallback(OTCaller passwordCaller, OTCallback passwordCallback) throws LoadingOpenTransactionsFailure { if (!isPasswordImageSet) { throw new LoadingOpenTransactionsFailure(LoadErrorType.PASSWORD_IMAGE_NOT_SET, "Must Set Password Image First!"); } if (isPas...
5
public int getCalibrationDataSize() { if (calibrationType == MEAN) { return 1; } else { return calibrationDataSize; } }
1
public boolean checkBuildRadiusPermissions(Location location, Player player, String direction){ World world = location.getWorld(); int x = location.getBlockX(); int y = location.getBlockY(); int z = location.getBlockZ(); if(wg != null){ //loop through cuboid area (19x19x6) to check if player is making ...
5
public static void flatten4(TreeNode root) { if(root == null ){ return; } Stack<TreeNode> toVisit= new Stack<TreeNode>(); TreeNode prev = null; toVisit.push(root); while(!toVisit.isEmpty()){ TreeNode cur = toVisit.pop(); if(cur.right != null) toVisit.push(cur.right)...
5
private ExtractedCommand extractCommands(String s) throws ValidationException { Option<?> c = null; String arg = null; if (s.startsWith("--")) { s = s.substring(2); int i = s.indexOf('='); if (i > -1) { arg = s.substring(i + 1); s = s.substring(0, i); } c = options.get(s); if (c == nu...
8
public boolean type(char k, java.awt.event.KeyEvent ev) { if (k == 10) { if ((cur != null) && cur.enter()) wdgmsg("login", cur.data()); return (true); } return (super.type(k, ev)); }
3
public String getRoomName(){ if (roomInitial == 'S') roomName = "Study"; else if (roomInitial == 'L') roomName = "Library"; else if (roomInitial == 'R') roomName = "Billiard Room"; else if (roomInitial == 'C') roomName = "Conservatory"; else if (roomInitial == 'B') roomName = "Ballroom"; else...
9
private boolean encased(String s) { int countP = 0; // count of parentheses, 1 for every '(', -1 for every ')' int matchedP = -1; // index where the parentheses end up matching if(s.startsWith(NEGATIVE+"")) { // if it starts with a negative sign, ignore the negative s = s.substring(1); } if(s.contains...
9
public void searchByName() { String sSql = ""; sSql += "Select kisiAdiSoyAdi,mekanID,soruID,cevapID from hareketler where kisiAdiSoyadi = '"; if (txArama.getText().trim().equals("")) { JOptionPane.showMessageDialog(rootPane, "Aranacak Kişi Seçilmedi !"); } else { ...
8
public void moveJump(Jump jump) { if (this.jump != null) throw new AssertError("overriding with moveJump()"); this.jump = jump; if (jump != null) { jump.prev.jump = null; jump.prev = this; } }
2
public Geometric(double p) throws ParameterException { if (p < 0 || p > 1) { throw new ParameterException("Geometric parameter 0 <= p <= 1."); } else { this.p = p; } }
2
public void runSimulation() throws VehicleException, SimulationException, IOException { this.log.initialEntry(this.carPark,this.sim); for (int time=0; time<=Constants.CLOSING_TIME; time++) { //queue elements exceed max waiting time if (!this.carPark.queueEmpty()) { this.carPark.archiveQueueFailures(time);...
5
public final void op(String channel, String nick) { this.setMode(channel, "+o " + nick); }
0
public boolean submitBipolarQuesion(BipolarQuestion bipolarQuestion) { Element bipolarQuestionE; boolean flag = false; for (Iterator i = root.elementIterator("bipolarQuestion"); i.hasNext();) { bipolarQuestionE = (Element)i.next(); if (bipolarQuestionE.element("id").getText().equals(bipolarQuestion.getId())...
4
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Order other = (Order) obj; if (this.orderNum != other.orderNum && (this.orderNum == null || !this.orderNu...
7
static final void method3459(Class348_Sub34 class348_sub34, int i, int i_0_, int i_1_, int i_2_) { anInt4330++; long l = (long) (i_0_ << -1072233266 | i << 1409307868 | i_1_); Class348_Sub37 class348_sub37 = (Class348_Sub37) Class130.aClass356_1895.get(l); if (class348_sub37 == null) { class348_sub37...
5
static void testLow() { Scanner in = new Scanner(System.in); Board b = Board.readBoard(in); ArrayList<Integer> nextPiece = new ArrayList<Integer>(); while(in.hasNextInt()) nextPiece.add(in.nextInt()); Searcher s; for (int i = 6; i <9; i++){ for(int j= 1; j < i; j++){ s = new Jogger(new LinearW...
3
private void initGameView() { myGameSWT = new GameSWT(display, myGame); if (!myGameSWT.isDisposed()) { myGameControls = myGameSWT.getControls(); initGameViewListeners(); myGameSWT.start(); } else { reloadSettings(); } }
1
public Serie buscarSerieSeguida(String titulo) throws Exception{ for (Serie serie : seguidas) { if (serie.obtenerTitulo().equals(titulo)) return serie; } throw new Exception("El usuario no sigue la serie seleccionada."); }
2
public static void inorderTreeWalk(Node node){ if(node != null){ inorderTreeWalk(node.left); System.out.print(node.key+" "); inorderTreeWalk(node.right); } }
1
private void checkNotEmptyClass( String testString, boolean needsError, boolean ownMessage) { Set<ConstraintViolation<Object>> constraintViolations; Object notEmptyClass...
2
public void move(int x, int y) throws ImpossibleMoveException { if ((x >= tailleX) || (x < 0) || (y >= tailleY) || (y < 0)) { throw new ImpossibleMoveException("Cette case n'existe pas"); } else if (labyr[x][y].canMoveToCase() && ((x == posX + 1) || (x == posX - 1)) && ((y == posY + 1) || (...
9
public boolean updateR(NodeFunction f, NodeVariable x, PostService postservice) { NodeVariable variable = null; //System.out.println("Sono nell'updateR per la variabile "+x.getId()); LinkedList<MessageQ> qmessages = new LinkedList<MessageQ>(); // R from other functions f' to v ...
6
private static void test_pack(TestCase t) { // Print the name of the function to the log pw.printf("\nTesting %s:\n", t.name); // Run each test for this test case int score = 0; for (int i = 0; i < t.tests.length; i += 5) { int exp = (Integer) t.tests[i]; int arg1 = (Integer) t.tests[i + 1]; int ar...
2
public String getModuleName() { return moduleName; }
0
public void setSystemRelation(ElementSystem e1, ElementSystem e2, SystemRelation r) { if (e1 == null || e2 == null) throw new NullPointerException("The ElementSystem is null."); if (r == null) throw new NullPointerException("The ElementSystem relation is null."); if (r ==...
6
public int getSelectedIndex(Object component) { String classname = getClass(component); if (("combobox".equals(classname)) || ("tabbedpane".equals(classname))) { return getInteger(component, "selected", ("combobox".equals(classname)) ? -1 : 0); } if (("list".equals(classname)) || ("table".equals(classna...
9
public RSS() { try { showMsgsCount = Integer.valueOf( config.getValue(configKeyCount) ).byteValue(); } catch(NumberFormatException e) { showMsgsCount = 5; } addFeeds(); checkFeeds(); setPeriodicUpdate(60000); }
1
@Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { if((mob.numFollowers()>0)||(mob.isMonster())) { mob.tell(L("You cannot have any followers when calling a familiar.")); return false; } if(!super.invoke(mob,commands,givenTarget,auto,asLeve...
9
private static ArrayList<Comment> crawlComment(String storeID) throws IOException { ArrayList<Comment> comments = new ArrayList<Comment>(); String baseUrl = "http://www.dianping.com/shop/" + storeID + "/review_all?"; int page = 1; boolean flag = true; while (flag) { String url = baseUrl + "pageno=" + page;...
6
public void render(){ if (!life.isStarted()) life.start(); //square.render(); }
1
public void mousePressed(MouseEvent me){ if (me.getButton() == MouseEvent.BUTTON1) { if (typeAction.equals(Constantes.ADD_ENT)) { DictionnaireTable data = mcdComponent.getData(); data.addObserver(mcdComponent.addEntite(me.getX(), me.getY())); ...
3
public void setFormat(String format) { this.format = format; if (format != null && type.equals("date")){ dateFormatter = new SimpleDateFormat(format); dateFormatter.setTimeZone(TimeZone.getTimeZone("GMT+1")); } }
2
public void setEmail(String email) { this.email = email; }
0
public String toString() { if (this == Couleur.BLANC) return "B "; return "N "; }
1
private void _parseFile() throws ReaderException { ConfigurationManager.logger.log("parsing", 5); JSONParser parser = new JSONParser(); try { _readFile(); this.read_time = getConfigFile().lastModified(); this.json_obj = parser.parse(new FileReader(getConfigFile())); } catch (IOException e) { Conf...
2
public static void initialize(){ try { coinSprites.clear(); coinSprites.add(ImageIO.read(Entity.class.getClassLoader().getResourceAsStream("images/coin1.png"))); coinSprites.add(ImageIO.read(Entity.class.getClassLoader().getResourceAsStream("images/coin2.png"))); coinSprites.add(ImageIO.read(Entity.class....
1
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession sesionOk = request.getSession(); if (sesionOk.getAttribute("usuario") != null) { response.setContentType("text/html;charset=UTF-8"); ...
6
public LinkedList<String>getPopularPerformers(Date startDate, Date endDate, int amount) throws SQLException { PreparedStatement statement = connection.prepareStatement( "SELECT ISBN, SUM(Amount) FROM Orders WHERE Date>=? AND Date<=? GROUP BY ISBN"); statement.setString(1, sqlDate.format(...
8
private boolean check(Block next) { if (next != null) { return next.thenPre == this || next.elsePre == this || next.normalPre == this || next.loopBack == this; } return true; }
4
@Override public void cleanup( BSPPeer<NullWritable, NullWritable, NullWritable, NullWritable, JobMessage> peer) throws IOException { if (peer.getPeerIndex() == 0) { JobMessage result = peer.getCurrentMessage(); while (result != null) { int peerInd = result.getSender(); Matrix block = res...
7
public RetrievalMethodType createRetrievalMethodType() { return new RetrievalMethodType(); }
0
public void visitIntInsn(final int opcode, final int operand) { buf.setLength(0); buf.append("mv.visitIntInsn(") .append(OPCODES[opcode]) .append(", ") .append(opcode == Opcodes.NEWARRAY ? TYPES[operand] : In...
1
public SimpleRunCPE(String args[]) throws Exception { mStartTime = System.currentTimeMillis(); // check command line args if (args.length < 1) { printUsageMessage(); System.exit(1); } // parse CPE descriptor System.out.println("Parsing CPE Descriptor"); CpeDescription cpeDesc =...
4
private void updatePositions(long elapsed) { // calculate new speed headSpeed += headAcceleration * (float)elapsed; if (headSpeed < MIN_SPEED) headSpeed = MIN_SPEED; // calculate change in position and update head position Vector2D deltaPos = (direction).mult(headSpeed * (float...
6
public static void main(String args[]) { // Select Saxon XPath implementation (necessary in case there // are other XPath libraries in classpath). System.setProperty("javax.xml.xpath.XPathFactory", "net.sf.saxon.xpath.XPathFactoryImpl"); Configuration config = new Configuration(); // Configuration parameters can...
5
public void test_set_RP_int_intarray_int() { BaseDateTimeField field = new MockPreciseDateTimeField(); int[] values = new int[] {10, 20, 30, 40}; int[] expected = new int[] {10, 20, 30, 40}; int[] result = field.set(new TimeOfDay(), 2, values, 30); assertEquals(true, Arrays.equal...
2
public float UtoTextureSpace(float _u) { if(texture != null) { return (widthRatio * _u); } else { System.err.print("RoyalFlush: Texture2D.UtoTextureSpace - No texture has been loaded.\n"); return _u; } }
1
private void initializeGrid() { endSim = false; gridInitialized = true; //Clear list of colony ants and bala ants activeAnts.clear(); balaAnts.clear(); //Initializes the turn counter to 0 and resets the time turn = 0; time = "Turn: 0 Day: 0 Year: 0 "; simGUI.setTime(time); // Sets up node...
7
public Vector<ServerHandleConnect> getServerHandleConnectList() { return serverHandleConnectList; }
0
public int maxCoins(int[] nums) { if (nums == null || nums.length == 0) return 1; if (nums.length == 1) return nums[0]; cache.clear(); return (int) search(nums); }
3
private void splitRoot(){ if (this.root instanceof Leaf){ Leaf newLeaf= ((Leaf)this.root).split(null); //splits the root Vector<Link> newElement= new Vector<Link>(); newElement.add(((Leaf)this.root).getLast()); Vector<Object> newPointers= new Vector<Object>(); newPointers.add(this.root); newPointers...
3
private InputStream locateResource(String name) { name += getExtension(); String file=""; if( isOSX()) { file="/native/osx/" + name; }else if( isWindows()) { if( is64Bit()){ file="/native/windows/x86_64/" + name; }else { file="/native/windows/x86_32/" + name; } }else if( isLinux()) { i...
6
@Override public void run(int interfaceId, int componentId) { if (stage == -1) { stage = 0; sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE, "Do you want to trade?", "Hello, shorty.", "Why don't you ever restock ores and bars?"); }else if (stage == 0) { if(componentId == 2) { stage = 2; ...
7
public static String urlPathEncode(String part) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < part.length(); i++) { char c = part.charAt(i); String valid = "./:-_?=;@&%#"; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || valid.indexOf(c) > -1) ...
9
public void Remove(int index) { if (index > length - 1 || isEmpty() || index < 0) { return; } if (index == 0) { head = head.getNext(); length--; } else if (index == length - 1) { Node node = new Node(); node = head; for (int i = 1; i < length; i++) { node = node.getNext(); if (i =...
9
* @param xxx * @param yyy * @param zzz */ public void renderVine(int textureId, int xxx, int yyy, int zzz, int blockOffset) { float x = xxx + this.x*16; float z = zzz + this.z*16; float y = yyy; byte data = getData(xxx, yyy, zzz); boolean rendered = false; if ((data & 1) == 1) { // So...
7
@RequestMapping(value = "/room-event/{id}", method = RequestMethod.GET) public ModelAndView speakerPage( final HttpServletRequest request, final HttpServletResponse response, @PathVariable(value = "id") final String idStr ) throws IOException { ModelAndView modelAndVi...
1
private Move makeFirstMoves(){ Move center1 = new Move(3, 3); Move center2 = new Move(3, 4); Move center3 = new Move(4, 3); Move center4 = new Move(4, 4); if(LegalMoves.isLegal(bd, center1, myColor)){ return center1; } if(LegalMoves.isLegal(bd, center2, myColor)){ return center...
4
public void perm(ArrayList<ArrayList<Integer>> resArr, ArrayList<Integer> res, int[] num, int[] cnt) { int n = num.length; int i = 0; for (i = 0; i < n; i++) { if (cnt[i] > 0) break; } if (i == n) { resArr.add((ArrayList<Integer>) res.clone()); return; } for (; i < n; i++) { if (cnt[i] ...
5
public int getY() { return y; }
0
private void tabEstoqueStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_tabEstoqueStateChanged // TODO add your handling code here: int tabIndex = tabEstoque.getSelectedIndex(); Conexao dbCon = new Conexao(); //Método usado para atualizar as tabelas, quando o usuario ...
7
public void visitChildren(final TreeVisitor visitor) { if (!visitor.prune()) { visitForceChildren(visitor); } }
1
public void physicsTick(PhysicsSpace space, float f) { //get all overlapping objects and apply impulse to them for (Iterator<PhysicsCollisionObject> it = ghostObject.getOverlappingObjects().iterator(); it.hasNext();) { PhysicsCollisionObject physicsCollisionObject = it.next(); ...
3
@Override public void keyPressed(KeyEvent e) { switch (e.getKeyCode()) { case KeyEvent.VK_W: keys[0] = true; break; case KeyEvent.VK_S: keys[1] = true; break; case KeyEvent.VK_I: keys[2] = true; break; case KeyEvent.VK_K: keys[3] = true; break; default: break; } ...
4
public Tile getTile(int x, int y){ if (x < Standards.CHUNK_SIZE && x >= 0){ if (y < Standards.CHUNK_SIZE && y >= 0){ return contents[x][y]; } } return null; }
4
public static void sendFileRes ( Socket sckIn , String strId , boolean blnRes ) throws Exception { if ( strId != null && strId.length() > 0 ) { EzimDtxSemantics.initByteArrays(); String strRes = blnRes ? EzimDtxFileSemantics.OK : EzimDtxFileSemantics.NG; OutputStream osTmp = sck...
3
public BinType getBinType(String type) { if ("string".equalsIgnoreCase(type)){ return BinType.STRING; } else if ("integer".equalsIgnoreCase(type)){ return BinType.INTEGER; } else if ("blob".equalsIgnoreCase(type)){ return BinType.BLOB; } else if ("list".equalsIgnoreCase(type)){ return BinType.LIST; ...
7
public void sort(int start, int end) { if (end - start <= 1) { return; } int middle = (start + end) / 2; Thread th = new Thread(new MergeSort(array, start, middle)); th.start(); sort(middle, end); try { th.join(); } catch...
2
private void addTestFruits() { int maxCount; double random; Machine m; BufferMachine bm; Iterator<Machine> i = productionLine.iterator(); while (i.hasNext()) { m = i.next(); if (m instanceof BufferMachine) bm = (BufferMachine)m; else continue; if (m instanceof HoldingBay) maxCount = 49; e...
7
public Production(String lhs, String rhs) { if(lhs == null) lhs = ""; if(rhs == null) rhs = ""; myLHS = lhs; myRHS = rhs; }
2
@Deprecated public Class<? extends APacket>[] getPackageClasses() { //noinspection unchecked return (Class<? extends APacket>[])classes.toArray(); }
2