text
stringlengths
14
410k
label
int32
0
9
private void ensureXrefEntriesCapacity(int size) { if (xrefEntries == null || xrefEntries.length < size) { final PDFXrefEntry[] newXrefEntries = new PDFXrefEntry[size]; if (xrefEntries != null) { System.arraycopy(xrefEntries, 0, newXrefEntries, 0, xrefEntries.length); ...
3
public static BigInteger combination(BigInteger poolI, BigInteger chooseI) { if(poolI.compareTo(BigInteger.ZERO)<0||chooseI.compareTo(BigInteger.ZERO)<0){ throw new ArithmeticException("Cannot take combinations of negative numbers"); } if(poolI.compareTo(chooseI)<0){ return BigInteger.ZERO; } if(cho...
8
public void share (CompNumb p); // Деление
2
public Transition(String transition, State next, int pointer){ String params[] = transition.split("->"); this.right = params[1].split(" "); this.next = null; if(this.right.length > pointer){ this.next = next; this.reduction = -1; } else{ this.reduction = getReductionId(); } }
1
@Override protected void readAll(List<Address> members, String clustername, Responses responses) { try { List<String> objects = swiftClient.listObjects(container); for(String object: objects) { List<PingData> list=null; byte[] bytes = swiftClient.readO...
8
public int getResult(){ int returnValue = 7, c = this._qtdConsumo; int aux =0; if(c>11){ aux = (c<30)?c:30; returnValue += ((aux-11)+1)*1; }//END IF if(c>31){ aux = (c<100)?c:100; returnValue += ((aux-31)+1)*2; }//END IF if(c>101){ returnValue += ((c-101)+1)*5; }//END IF return returnVa...
5
public ComboBoxListener(JComboBox box, Preference pref) { setComboBox(box); setPreference(pref); }
0
private String sqlTypeToJavaType(int columnType) { if (columnType == java.sql.Types.INTEGER) { return "int"; } else if (columnType == java.sql.Types.VARCHAR || columnType == java.sql.Types.CHAR) { return "String"; } else if (columnType == java.sql.Types.TIMESTAMP) { ...
8
public static void retofinv_draw_foreground(osd_bitmap bitmap) { int x, y, offs; int sx, sy, tile, palette, flipx, flipy; for (x = 0; x < 32; x++) { for (y = 30; y <= 31; y++) { offs = y * 32 + x; sx = ((62 - y) + 3) << 3; sy = (31 - ...
9
public int generateX(int i, int j) { double mu = 0.0; mu += _parameters.visibleBias(j); for (int jj = 0; jj < _parameters.numHiddenNodes(); jj++) { mu += _parameters.weight(j, jj) * generatedHiddens[i][jj]; } mu = MathUtilities.sigmoid(mu); if (random.nextDouble() >= 1 - mu) { return 1; } else { ...
2
public static void paint(Ocean sea) { if (sea != null) { int width = sea.width(); int height = sea.height(); /* Draw the ocean. */ for (int x = 0; x < width + 2; x++) { System.out.print("-"); } System.out.println(); for (int y = 0; y < height; y++) { System...
7
private String getTabReplacement(int x) { int align = 0; switch(this) { case CONVERT_TO_ONE_SPACE: return " "; case CONVERT_TO_FOUR_SPACES: return " "; case CONVERT_TO_EIGHT_SPACES: return " "; case...
6
public void run(){ while(true){ synchronized(this.doc){ //For each game under the games_available node, check to see if all the player ready states are true. //If they are all true, move the game to the games_active node. if(((Element)this.doc.getElementsByTagName("games_available").item(0)).getChildNo...
6
public void update() { speed = potentialSpeed; setWanDirCommand(commandLeft, commandRight, commandUp, commandDown); if(commandC4) placeC4(); if(cacheraufond) canard.play(); //if(cacheraufond) bouftou.play(3, 1); if(commandTrap) placeTrap(); if(commandBomb) placeBomb(); if(!unde...
8
protected String getClasspath() throws MojoExecutionException { try { final List classpath = new ArrayList(); // Loading self dependencies final List scopesToUse = new ArrayList(); scopesToUse.add(Artifact.SCOPE_COMPILE); scopesToUse.add(Ar...
6
protected boolean readBool(InputStream in) throws IOException { int i = readInt(in); if( !(i==1 || i==0) ) throw new RuntimeException("Not a bool: " + i); return i == 1; }
2
public static final void helloWorldExample() { try { CycConstant planetInSolarSystem = (CycConstant) DefaultCycObject.fromCompactExternalId("Mx4rWIie-jN6EduAAADggVbxzQ", access); CycList planets = access.getAllInstances(planetInSolarSystem); for (Object planet : planets) { System.out.print...
2
private String readUrl(final String url) { try { String inputLine, output = ""; BufferedReader reader = new BufferedReader(new InputStreamReader(new URL(url).openStream())); while ((inputLine = reader.readLine()) != null) { output += inputLine; } reader.close(); return output; } catch (I...
2
private int neighborHasBomb(int neighbor_x, int neighbor_y) { // checks a neighboring square for a bomb. If it doesn't have a bomb or // doesn't exist // it returns 0. Otherwise it returns 1 if (neighbor_x < 0 || neighbor_x > 9 || neighbor_y < 0 || neighbor_y > 9) return 0; if (field[neighbor_x][neighb...
5
public void MenuRun() throws Address_Table.TableException, Orders_Table.TableException, Items_Table.TableException { data_load = new DataLoad(); data_load.load_data(); repeat_choice = false; while(repeat_choice == false) { print_menu(); try { BufferedReader brin = new B...
9
private String changeCharacterAtPosition(int pos, String str, String rep) { String alteredString = str.substring(0, pos) + rep + str.substring(pos + 1, str.length()); return alteredString; }
0
private static void printUsage(Command command) { if (command == Command.UNKNOWN) { StringBuilder sb = new StringBuilder(); sb.append("Usage: StaffUtill <command> <arguments> ") .append("\n") .append("command: arguments :") .appen...
6
private void generateCharDimensions() { Graphics2D g2 = (new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB)).createGraphics(); g2.setFont(font); for (int i = 0; i < characterDimensions.length; i++) { characterDimensions[i] = font.layoutGlyphVector(g2.getFontRenderContext(), S...
2
@RequestMapping(value="/{tripID}/deleteTravelTrip", method=RequestMethod.GET) public String deleteTravelTrip(@PathVariable("tripID") String tripID, Model model){ travelTripService.delete(Integer.parseInt(tripID)); model.addAttribute("travelTripList", travelTripService.findAll()); ...
0
public static void setPlayersNickname( String p, String nick ) throws SQLException { if ( isPlayerOnline( p ) ) { getPlayer( p ).setNickname( nick ); getPlayer( p ).updateDisplayName(); getPlayer( p ).updatePlayer(); } if ( nick == null ) { SQLMana...
2
public Tile getTileByIntExp(int t_i) { if (t_i < 0) return null; else if (t_i < 4) return _t.get(new BoardCoordinate(3 + t_i, t_i, -3)); else if (t_i < 9) return _t.get(new BoardCoordinate(t_i - 2, t_i - 4, -2)); else if (t_i < 15) return _t.get(new BoardCoordinate(t_i - 8, t_i - 9, -1)); else if (t_i < 22) r...
8
protected void execute() {}
0
@Override public List<Car> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String,String> filters) { List<Car> data = new ArrayList<Car>(); //filter for(Car car : datasource) { boolean match = true; for(Iterator<String> it = ...
9
public static void main( String[] args ) { // Create game window... JFrame app = new JFrame(); app.setIgnoreRepaint( true ); app.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); // Create canvas for painting... Canvas canvas = new Canvas(); canvas.setIgnoreRepa...
6
public boolean wordContainsLettersInOrder(final LetterGen letGen, final String word) { final char[] a = word.toCharArray(); final char[] test = new char[a.length]; for(int i=0; i < a.length; i++){ test[i] = Character.toLowerCase(a[i]); } int i = 0; char temp = Character.toLowerCase(letGen.getLetter1()); w...
7
private void resize() { width = getSkinnable().getWidth(); height = getSkinnable().getHeight(); if (width > 0 && height > 0) { if (aspectRatio * width > height) { width = 1 / (aspectRatio / height); } else if (1 / (aspectRatio / height) > width) { ...
5
@Override public void draw(Graphics g, Display d, int bottomPixelX, int bottomPixelY, boolean drawHealth){ double percentMoved = count * 0.25; // Tile coordinates of The Dude (x,y) double x, y; if(attacking == null) { x = this.oldX + (this.x - this.oldX) * percentMoved; y = this.oldY + (this.y - thi...
7
private static String ConvierteTodo(String s, Tipo t) { StringBuilder resultado = new StringBuilder(); int cuenta = s.length(); int cuentamillones = 0; while (cuenta > 0) { int inicio = (cuenta - 6 >= 0) ? (cuenta - 6) : 0; int longitud = (6 > cuenta) ? cuenta : 6...
8
@Override public int commit() { int allNew = 0; writeLock.lock(); try { for (int i = 0; i < 256; ++i) { allNew += files[i].getNewKeys(); files[i].commit(); } } finally { writeLock.unlock(); } return ...
1
public final boolean wasStarted() { return myServerSocket != null && myThread != null; }
1
private static <T> T getSingleDefault(T[] params, T default_value) { //assert params.length == 1; T value = default_value; if (params != null && params.length > 0) value = params[0]; return value; }
2
public void Asearch(Point startPoint, Point goalPoint){ String start = startPoint.x + " " + startPoint.y + " " + "0"; String goal = goalPoint.x + " " + goalPoint.y; target = goal; openset.add...
8
public Link(long from_id, long to_id, int length, int lsiclass, int maxspeed) { this.from_id = from_id; this.to_id = to_id; this.length = length; int lsiSpeed = 0; try { lsiSpeed = LSISpeed.getSpeedById(lsiclass); } catch (Exception e) { System.out...
3
protected static Ptg calcTrend( Ptg[] operands ) throws CalculationException { if( operands.length < 1 ) { return new PtgErr( PtgErr.ERROR_VALUE ); } // KSC: THIS FUNCTION DOES NOT WORK AS EXPECTED: TODO: FIX! if( true ) { return new PtgErr( PtgErr.ERROR_VALUE ); } // Ptg[] forecast = new Ptg[3]; ...
5
public void update() { renders.clear(); stringRenders.clear(); String playerId = session.getCurrentPlayerId(); if (startTimer > 0) { startTimer--; if (startTimer > 60) { StringRender string = new StringRen...
9
public ListNode detectCycle(ListNode head){ ListNode fast = head; ListNode slow = head; if(head == null || (head != null && head.next == null)){ return null; } while(fast != null && fast.next != null){ fast = fast.next.next; slow = slow.next; if(fast == slow){ break; } } if(fa...
9
@Override public void awardPoints(int amount) { points += amount; }
0
public void deleteRoad(Point p1,Point p2){ Circle tmp1 = new Circle(p1); Circle tmp2 = new Circle(p2); int r1=-2,r2=-2; for (int i=0;i<pnts.length;i++) if (tmp1.equals(pnts[i])) r1 = i; for (int i=0;i<pnts.length;i++) if (tmp2.equals(pnts[i...
8
public void moveVolatile() { int count = volatileFlowGrid.getCount(); double waterDensityFloor = waterDensityGrid.getWaterDensityFloor(); double carbondioxideDensityFloor = carbondioxideDensityGrid.getCarbondioxideDensityFloor(); double sodiumDensityFloor = sodiumDensityGrid.getSodiu...
8
public ListNode mergeTwoLists(ListNode l1, ListNode l2) { if (l1 == null) { return l2; } else if (l2 == null) { return l1; } ListNode root = new ListNode(0); ListNode cur = root; while (l1 != null && l2 != null) { if (l1.val > l2.val)...
6
public static List<Pair<Task,Recurrence>> getAllTasksForUser(int userId,int categoryId, CompletionType completionType,long startDateMilliseconds) { String queryString = "SELECT * from public.\"Task\" INNER JOIN public.\"Recurrence\" ON public.\"Task\".\"ID\" = public.\"Recurrence\".\"TaskID\" WHERE \"UserID\" =...
7
public static String join(String separator, List<String> strings) { StringBuilder appendable = new StringBuilder(); if (strings != null && strings.size() > 0) { appendable.append(strings.get(0)); for (int i = 1; i < strings.size(); i++) { appendable.append(separator).append(strings.get(i)); } } ret...
3
private String filter(String str) { StringBuffer sb = new StringBuffer(); int i=0; while (str.charAt(i) == ' ') i++; if (isTag(str.charAt(i))){ sb.append(str.charAt(i)); i++; } else sb.append('+'); boolean zero = true; while (i < str.length()) { if (isDegit(str.charAt(i))) { if (!zero ...
6
@Override public void windowIconified(WindowEvent arg0) { }
0
public void reparseChunkPrimitives(RandomAccessFile raff) throws IOException { if ((this.primitives == null) || (this.primitives.size() == 0)) { //nothing to do! return; } Primitive p = primitives.get(0).getPrimitive(); long oldsize = this.getDataEndPosition() - this.getDataStartPosition(); long pos =...
9
public static String selectOne(final String title, final String[] optionNames, final String[] optionValues, final int defaultOption) { if (optionNames.length != optionValues.length) { throw new IllegalArgumentException("option names and values must have same length"); } ConsoleMenu....
4
@Override public void execute(VGDLSprite sprite1, VGDLSprite sprite2, Game game) { ArrayList<Integer> subtypes = game.getSubTypes(itype); for (Integer i: subtypes) { Iterator<VGDLSprite> spriteIt = game.getSpriteGroup(i); if (spriteIt != null) while (spriteIt.hasNext()) {...
4
public static int getJstatItem(List<JstatItem> jstatItemList, long timeStampMS) { if (jstatItemList == null) return -1; int beforeIndex = 0; int afterIndex = jstatItemList.size() - 1; for (int i = 0; i < jstatItemList.size(); i++) { JstatItem item = jstatItemList.get(i); if (item.getTimeStampMS() == ...
4
public HashMap<String, Boolean> convertStringToHash2(String args) { HashMap<String, Boolean> pl = new HashMap<String, Boolean>(); if (args.equals(null) || args.length() < 1) return pl; String[] sp = args.split(","); try { for (int i = 0; i < sp.length; i++) { String a = String.valueOf(sp[i].split(":")[0]...
4
public int getTwoDegrees(String performer1, String performer2) throws SQLException { LinkedList<String> select = new LinkedList<String>(); select.add("Performers"); LinkedList<String> from = new LinkedList<String>(); from.add("Videos"); LinkedList<Pair<String, String>> whereClaus...
8
private Gridspot findAdj(Gridspot a, Gridspot from) { if ( getG(a.getXIndex()-1,a.getYIndex()).getColor() == a.getColor() && getG(a.getXIndex()-1,a.getYIndex()) != from ) { return getG(a.getXIndex()-1,a.getYIndex()); } else if ( getG(a.getXIndex()+1,a.getYIndex()).getColor() == a.getColor() && getG(a.getXIn...
8
public void run() { try { boolean running = true; while (running) { try { String line = null; while ((line = _breader.readLine()) != null) { try { _bot.handleLine(line); ...
9
private static void traverseDOT(Node n, BufferedWriter out) throws IOException { if (n.parent != null) { out.write(Integer.toString(n.nodeNum)); out.write(" -> "); out.write(Integer.toString(n.parent.nodeNum) + ";"); } for (Node child : n.children) { traverseDOT(child, out); } }
2
public ScoreDialog() { this.setTitle("Score - Jeu du Taquin"); this.setSize(500,350); this.setLocationRelativeTo(null); this.setResizable(false); this.setAlwaysOnTop(true); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); this.setIconImage(new ImageIcon("essources/Icons/icon.png").getImage()); ...
1
public void testToStandardSeconds_months() { Period test = Period.months(1); try { test.toStandardSeconds(); fail(); } catch (UnsupportedOperationException ex) {} test = Period.months(-1); try { test.toStandardSeconds(); fa...
2
private void parseRangeNodes(Collection<ParameterNode> nodes) throws Exception { param_ranges = new HashMap<>(); for (ParameterNode p : nodes) { if (!p.isGroup()) { continue; } ParameterGroup g = (ParameterGroup) p; String value_name = g.getChild("valuename").getValueAsString(); float ...
6
public ResourceManager(GraphicsConfiguration gc) { this.gc = gc; loadTileImages(); loadCreatureSprites(); loadPowerUpSprites(); }
0
public Messenger connect(String host, int port) { if (mMessenger == null) { Socket socket = new Socket(); try { socket.bind(null); socket.connect(new InetSocketAddress(host, port)); mMessenger = new Messenger(socket, mNotifyDisconnection); mMessenger.start(); } catch (IOException e) { try...
3
public char readChar() throws IOException { mark(DEFAULT_READ_LIMIT); int cfaslOpcode = read(); if (cfaslOpcode == CFASL_CHARACTER) { return (char) read(); } reset(); throw new RuntimeException("Expected a char but received opCode=" + cfaslOpcode); }
1
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) { e.getCause().printStackTrace(); e.getChannel().close(); }
0
private void btnSaveKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_btnSaveKeyPressed if (evt.getKeyCode() == 39) { btnClear.grabFocus(); } else if (evt.getKeyCode() == 38) { jPasswordField1.grabFocus(); } if (evt.getKeyChar() == evt.VK_ENTER) { btnSave.doClick(); ...
3
public void grabVideos(Collection<Integer, String> currentCollection) { videos.clear(); playingVideoKeys.clear(); //Iterator through the HashMap Iterator it = currentCollection.getMedia().entrySet().iterator(); while (it.hasNext()) { //Contains the key and the filePath to the video Map...
3
public void TouchedByItem(Item item) { Item newItem = null; if (item.editable) { if (item.getClass().toString().endsWith("Sensor")) { Item newTarget = (Item) target.clone(); if (item.getClass().toString().endsWith("ContactSensor")) { newIte...
5
public static LinkedList<BasicBlock> enumerateLeafFirst(Function F){ Hashtable<BasicBlock, HashSet<BasicBlock>> targets = enumerateTargets(F); Hashtable<BasicBlock, HashSet<BasicBlock>> sources = enumerateSources(F); LinkedList<BasicBlock> ordering = new LinkedList<BasicBlock>(); LinkedList<BasicBlock> queue = ...
8
static public void main(String[] args) { if(args.length == 0) { showHelp(); return; } boolean result = false; try { if(args[0].compareToIgnoreCase("-version") == 0) result = showVersion(); else if(args.length == 2 && args[...
8
public DIR turn(int d){ switch (this){ case N: if(d==0)return DIR.O; else return DIR.L; case S: if(d==0)return DIR.L; else return DIR.O; case L: if(d==0)return DIR.N; else retu...
8
public synchronized void run(){ try { InputStream inputStream = cashSocket.getInputStream(); ObjectInputStream objectInputStream = new ObjectInputStream( inputStream); OutputStream outputStream = cashSocket.getOutputStream(); ObjectOutputStream objectOutputStream = new ObjectOutputStream( outpu...
2
public void decryptFile(File read, File write) { InputStream filein = null; InputStream in = null; OutputStream fileOut = null; try { cipher.init(Cipher.DECRYPT_MODE, getSecretKeySpec(encryptKey)); filein = new FileInputStream(read); fileOut = new File...
5
@Override public void setEmail(String email) { super.setEmail(email); }
0
public void setMinute(int m){ //checks to see if the integer we passed through //for minute is greater than or equal to zero but less //than 60 and if the requirements are met the value stays the same //but if they aren't, the value is set to zero. minute = ((m >= 0 && m<60) ? m : 0); }
2
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final PresentationItem other = (PresentationItem) obj; if (this.position != other.position) { retur...
6
private void insertionSort(double[] input, int lo, int hi) { // Insertion sort for (int i = lo + 1; i < hi; i++) { for (int j = i; j > lo && Helper.less(input, j, j-1); j--) { Helper.exch(input, j, j-1); } } }
3
public boolean verifyInventory(int productId, int inventoryChange) { try { Connection conn = openConnection(); Statement stat = conn.createStatement(); ResultSet rs = stat.executeQuery("select inventory from " + DB_PRODUCT_TABLE + " where rowid = " + productId + ";"); inventoryChange += rs.getInt("i...
2
private void setTextQuest(TextQuest quest, ArrayList answerList) { quest.setQuestAnswer(answerList); }
0
public static void Gaussian(DMatrix points , Matrix mu, Matrix sig, Matrix max){ Matrix temp; temp = new Matrix(points.dimension(), 1); for(int i = 0; i < points.samplenum(); i++){ boolean checker = true; while(checker){ for(int j = 0; j < points.dimension();j++){ temp.set(j, 0, Math.random()); ...
3
public Year getYearStored() { return yearStored; }
0
protected TableModel createModel(Transition transition) { final FSATransition t = (FSATransition) transition; return new AbstractTableModel() { public Object getValueAt(int row, int column) { return s; } public void setValueAt(Object o, int r, int c) { s = (String) o; } public boolean isCel...
0
public void Analyze( double[] data ) { int length = data.length; n_max = 0; double[] cumSum = getCumulative_Sum(data); //Seems OK // for( int i = 0; i < cumSum.length; i++ ) // { // System.out.println( cumSum[i]); // } //System.out.println("ind = " + ind + "\n"); x_density[0] = 0; delta...
8
@Override public void mark(int boardPosition, Cell[] cellBoard, int rows, int columns) throws IllegalMark { //Find the row. int boardPositionRow = boardPosition / columns; //Find the column. int boardPositionColumn = boardPosition % columns; //Posit...
3
public double[][] getMatrix() { return matrix; }
0
public void mutate(){ nets=SpeciationNeuralNetwork.sort(nets); while(nets.size()<maxAllowed) // add individuals if there are too few nets.add(nets.get(0).copyAndMutate()); while(nets.size()>maxAllowed&&nets.size()>0) // remove individuals if there are too many nets.remove...
7
@Override public void pause() throws Exception { try { endpoint.pause(); } catch (Exception ex) { log.error(sm.getString("http11protocol.endpoint.pauseerror"), ex); throw ex; } canDestroy = false; // Wait for a while until all the processors are idle RequestInfo[] states = cHandler.global.getReque...
7
* The statement before which to add stmt. */ public void addStmtBefore(final Stmt stmt, final Stmt before) { if (Tree.DEBUG) { System.out.println("insert: " + stmt + " before " + before); } final ListIterator iter = stmts.listIterator(); while (iter.hasNext()) { final Stmt s = (Stmt) iter....
3
public void run() { try { this.ds = createDatagramSocket(); this.shutdown = false; } catch (final SocketException se) { return; } catch (final UnknownHostException uhe) { return; } final byte[] receiveData = new byte[SyslogConstants.SYSLOG_BUFFER_SIZE]; while(!this.shutdown) { try { fin...
5
public static String nullToString(Object inString) { return (inString == null || "null".equalsIgnoreCase(inString.toString().trim())) ? "" : inString.toString(); }
2
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } ValueObject other = (ValueObject) obj; if (firstName == null) { if (...
9
public void setPizzaBuilder(PizzaBuilder pb) { pizzaBuilder = pb; }
0
public Matrix transpose() { Matrix mat = new Matrix(getHeight(), getWidth()); for (int x = 0; x < getWidth(); x++) { for (int y = 0; y < getHeight(); y++) { mat.data[y][x] = data[x][y]; } } return mat; }
2
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 Key delMax() { if (N == 0) throw new RuntimeException("Priority Queue Underflow"); Key max = pq[1]; // exch(pq, 1, N); pq[1] = pq[N]; // half exchange pq[N--] = null; sink(1); // resize if (N == pq.length / 4) pq = resize(pq, pq.length / 2); // keep track of min if (N == 0) minIn...
3
public static boolean visibleArgumentP(Stella_Object self) { if (self == null) { return (true); } if (Surrogate.subtypeOfP(Stella_Object.safePrimaryType(self), Logic.SGT_LOGIC_PROPOSITION)) { { Proposition self000 = ((Proposition)(self)); if ((self000.kind == Logic.KWD_ISA) && ...
7
public void paint(Graphics g){ g.drawImage(this.upgrade.getIcon(), 0, 0, null); if(upgrade.isUsed()){ g.setColor(Color.red); }else{ g.setColor(Color.black); } g.drawString(this.upgrade.getName(), 8, 18); }
1
public String getBallColor() { return this.ballColor; }
0
private Object getLastElement(final Collection c) { final Iterator itr = c.iterator(); Object lastElement = itr.next(); while (itr.hasNext()) { lastElement = itr.next(); } return lastElement; }
1
public void setTabu(S source, T target, int expireAfter) { /* Pre-checks */ if (expireAfter < 0) { return; } if (expireAfter > maxExpTime) { throw new IllegalArgumentException("expiration time not in [0.." + maxExpTime + "]"); } if ( source == nu...
8