method_id
stringlengths
36
36
cyclomatic_complexity
int32
0
9
method_text
stringlengths
14
410k
b650b0e2-ca70-4258-86aa-7f5be9f6793a
9
public void run() { String descriptionText = this.noDescString; String shortUrl; String searchUrl = this.urlFormat.replaceAll("%%SEARCHTERMS%%", this.searchTerms); // try to be more clever on media wikis try { URL _searchUrl = new URL(searchUrl); S...
08c37a05-ea83-483c-ad35-f46a3a03f9df
6
public void createGameWindow() { f1 = new JFrame("Snake"); f1.setSize(675, 395); f1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLoo...
4f6ed749-be86-4ec5-81f3-909a4bbc1326
3
public static String getEnchantName(String name) { String newName = ""; for(EnchantNames enchant : EnchantNames.values()) { if(enchant.name().equalsIgnoreCase(name)) { newName = enchant.getName(); } } if(newName.equalsIgnoreCase("")) newName = name; return newName; ...
1d35da15-68c0-4e82-874d-a8903c1400c3
1
public void testWithField3() { Period test = new Period(0, 0, 0, 0, 5, 6, 7, 8, PeriodType.time()); try { test.withField(DurationFieldType.years(), 6); fail(); } catch (IllegalArgumentException ex) {} }
76dd9663-2db6-44ef-95ec-50ea773ce78b
5
public void setGridSize(int rows, int columns, boolean preserveData) { if (rows > 0 && columns > 0) { Color[][] newGrid = new Color[rows][columns]; if (preserveData) { int rowMax = Math.min(rows,this.rows); int colMax = Math.min(columns,this.columns); ...
06495487-ac03-4858-9bda-117f9405424c
6
public static void drawFilledRectangleAlpha(int colour, int y, int width, int height, int alpha, int x) { if (x < topX) { width -= topX - x; x = topX; } if (y < topY) { height -= topY - y; y = topY; } if (x + width > bottomX) width = bottomX - x; if (y + height > bottomY) height = botto...
0fca8b6b-9002-445b-b734-2cd0e23c6a56
6
public static boolean getNextCoordinate() { int nextR; int nextC; int i = 0; while (true) { i++; int r = previousCordinate.getR(); int c = previousCordinate.getC(); if (r + 1 > rowNum && c + 1 > cowNum) { nextR = 1; nextC = 1; } else if (c + 1 > cowNum) { nextR = r + 1; nextC = 1;...
8f7c370a-9786-46dc-8252-8100c67c4b2a
5
protected int readBlock() { blockSize = read(); int n = 0; if (blockSize > 0) { try { int count = 0; while (n < blockSize) { count = in.read(block, n, blockSize - n); if (count == -1) break; n += count; ...
98da77b5-222a-4c1d-bf16-408369e7fffd
2
public void run() { while(true) { rColor = (int)(255 * Math.random()); gColor = (int)(255 * Math.random()); bColor = (int)(255 * Math.random()); repaint(); try { thr.sleep(1000); } catch(InterruptedException ie) { stop(); } } }
608173aa-8155-46da-aab0-8b09235925e8
4
private void initMatrices() { this.size = graph.getVertexes().size(); this.trans = new MatrixArray(this.size, this.size, NULL_DOUBLE); this.dist = new MatrixArray(this.size, this.size); // the distance from each vertice to itself is zero. // the distance to all other vertices is initialized with INFINITY ...
93cd56ab-4969-46db-ab16-72244c4240b1
4
public void drawShakeText(int startHeight, String text, int effectSpeed, int y, int x, int color) { // method388 if (text == null) { return; } double bounceHeight = 7D - startHeight / 8D; if (bounceHeight < 0.0D) { bounceHeight = 0.0D; } x -= getANTextWidth(text) / 2; y -= trimHeight; for (int k1 ...
a2bd97f0-b032-46af-b96f-c0cee2db4130
8
public static void main(String[] ops) { try { // Create numeric attributes "length" and "weight" Attribute length = new Attribute("length"); Attribute weight = new Attribute("weight"); // Create date attribute "date" Attribute date = new Attribute("date", "yyyy-MM-dd HH:mm:ss"...
c12132ab-d5ef-40c8-b2d6-2f22015b21ab
7
private int getReduced1AfterReduce(ItemPair p, NonTerminal n) { IdShareableHashSet<NonTerminal> reduced1 = getReduced1(p); if (n.usedInRejectFilter || n.rejectedLiterals != null) { IdShareableHashSet<NonTerminal> newReduced = new IdShareableHashSet<NonTerminal>(); if (reduced1 != null) { newReduced.addAll...
ca98c5c9-0606-4573-8014-09cb871ace81
2
public void clearMembers() { if (ghostTeam != null) { for (OfflinePlayer player : getMembers()) { ghostTeam.removePlayer(player); } } }
a80eeafb-b614-495b-b5bb-e7c8a9f35045
3
public static void main(String[] args) { ArrayList<Integer> arr = new ArrayList<Integer>(); arr.add(1); arr.add(1); int running = 1; int result = 0; while(true) { if(arr.get(running-1) + arr.get(running) < 4000000) { arr.add(arr.get(running-1) + arr.get(running)); if(arr.get(runnin...
7682de14-7d6d-42b5-b137-d927d95a687c
0
public void incrementWins() { _wins += 1; }
fcdb1322-f1df-4c63-abb3-b3c83f8df563
2
public void fitAABB(AABB newAABB) { structure.remove(this); if (aabb.getWidth() == 0.0 && aabb.getHeight() == 0.0) { aabb = newAABB; } else { aabb = aabb.combine(newAABB); } structure.add(this); }
f6a8d71b-9fe0-467b-96e9-93bf050116ea
0
public boolean getObtained() { return this.obtained; }
074886c8-0103-4b64-8b56-e524379ea92b
4
public static void printInventoryIter( InventoryObject inventory ) { ArrayList<InventoryListObject> inventoryLists; Iterator<InventoryListObject> inventoryListObjects; InventoryListObject inventoryListObject; ArrayList<InventoryItemObject> inventoryItemLists; Iterator<InventoryItemObject...
6afb2746-7405-4707-b583-79ef895e469f
8
public DotPath getRacordIn(Rectangle2D rect, Line2D tangeante) { final Point2D in = tangeante.getP1(); final DotPath result = new DotPath(); Point2D inter = null; if (in.getX() > rect.getMinX() && in.getX() < rect.getMaxX()) { if (in.getY() < rect.getMinY()) { inter = new Point2D.Double(in.getX(), rec...
25a8f257-1d58-4f0e-b670-c4de312d5af8
3
public static void IfMap() { for (int i = 0; i < playerInventory.length; i++) { Item playerInventoryVariable = playerInventory[i]; if (playerInventoryVariable != null) { if (playerInventory[i].getId() == 0) { // playerInventoryVariable = true; map(); } } } System.out.println("You d...
522d9ee6-f50a-4f53-9282-620e73f8f18d
8
public static void main(String[] args) { Connection conn = null; PreparedStatement ps = null; ResultSet reSet = null; try { /* C3P0开源数据连接池 */ // ComboPooledDataSource dataSource = new ComboPooledDataSource(); // dataSource.setDriverClass("com.mysql.jdbc.Driver"); // dataSource.setJdbcUrl("jdbc:m...
8ef3137b-6674-4a41-9ad5-6224c8676102
2
public final void open() { library = new Library(); scheme = new Scheme(); signals = new SignalBundle(); display = Display.getDefault(); createContents(); configureFileDialogs(); shell.open(); shell.layout(); while ...
bcfda0a9-1a68-4977-8b75-784b4fbc55b9
5
public int maxProfit2(int[] prices) { if(prices == null || prices.length <= 1) return 0; int maxProfit = 0; int curMin = prices[0]; for(int i = 0; i < prices.length; ++i){ if(prices[i] - curMin > maxProfit){ maxProfit = prices[i] - curMin; } if(prices[i] < curMin){ curMin = prices[i]; } } ...
71ef5d63-99d1-4df0-a1a9-d2baffe8ba1b
1
public void setAway(boolean away) { this.away = away; if (away) { addIcon("pics/away.png", 20); } else { removeIcon("pics/away.png"); } }
1bd07083-43d9-42dd-aa67-f6e6ec62659e
4
public boolean temOcorrencia(byte v){ if(filhos.isEmpty()) return false; for(Contexto c : filhos){ if((!c.isEsc()) && c.getValor() == v){ return true; } } return false; }
326aea34-38b9-479e-b1ac-862071f8e7e1
4
@Override synchronized public double iterate(final int iterations, final double targeterror) { if (this.running) throw new NotAllowedWhileRunning(); this.abort = false; this.running = true; // this.preIterationsCheck(); // this.started(); // ...
915051b6-1ce8-4edd-a8f2-e75fd429df13
7
public Graph mstFib(Graph G) { int graphSizeFib = G.getSize(); int []parentFib = new int[graphSize]; int []key = new int[graphSize]; Graph result = new Graph(graphSizeFib); for(int index = 0; index < graphSize; index++) { parentFib[index] = -2; key[index] = 1001; } parentFib[root] = -1; ...
c866dc67-a8ec-4373-8460-0840497a222a
1
private static void stationDirLog() throws Exception{ try{ File myStationDir = new File(dayDir + "/Station"); myStationDir.mkdir(); stationLogDir = myStationDir.getAbsolutePath(); }catch(Exception e){ throw new Exception (e); } }
51951a00-2ad6-4393-8b17-bcd609a45829
5
public String getAttributeType(Symtab st) { String oaType = null; if (id1 != null) { SymtabEntry oaEntry = st.lookup(id1.toString()); oaType = oaEntry.getType(); } else oaType = oa.getAttributeType(st); if (!oaType.equals("message")) { SymtabEntry structEntry = st.lookup(oaType); if (structEntry ...
9132fdf5-c167-4891-97db-d46f7dbc85f4
3
public void initGame() { game.setLobbyTime(-1); // sets lobby time to default value /* receive color values for race */ if (PlayerTypes.values()[raceSelectionPointer].getColors() != null) { if (PlayerTypes.values()[raceSelectionPointer].getColors()[colorSelectionPointer].equals(Color.BLUE)) game.setUserCol...
729cf1ae-2d47-48c7-8d61-88240da62cdd
2
public void shuffle(int passes) { int tmpIndex; for(int z = 0; z < passes; z++) { for(int i = 0; i < deck.size(); i++) { tmpIndex = gen.nextInt(deck.size()); deck.add(deck.get(tmpIndex)); deck.remove(tmpIndex); ...
cf0e3b55-c23c-4457-9f16-addad18a2d64
2
private void updateDetailsPane () { TripComponent t = tripList.getSelectedValue(); if (t == null) return; Trip tr = t.getTrip(); detailsGroupNumber.setText("Gruppe " + (tripList.getMinSelectionIndex()+1)); detailsRiverInfo.setText(t.getRiverName() + " " + tr.getTripLength() +"km \u02AC" + t.getWwTopLeve...
1d74b157-b933-4572-9e03-0b03a62638b9
4
private void regenerateShields() { final OutfitType type = (OutfitType) outfit.type ; final float regenTime = SHIELD_REGEN_TIME * 2f / (2 + type.shieldBonus) ; final float maxShield = maxShields() ; if (currentShields < maxShield) { final float nudge = maxShield / regenTime ; currentSh...
5ddddf7f-45a6-4174-a1f1-69e8b615d6f0
3
public int checkMacroWarn() { try { BufferedReader in = new BufferedReader(new FileReader("./data/macrowarn.txt")); String data = null; while ((data = in.readLine()) != null) { if (playerName.equalsIgnoreCase(data)) { return 5; } } } catch (IOException e) { System.out.print...
2704e7d9-e019-4d21-9645-46e146272a30
0
@Override public void gameRenderHitbox(long pauseTime) { }
064c7352-593e-404b-8e36-a340cc0471c2
6
public static boolean validChoice(int row, int column) { boolean valid = true; if (row < 0 || row > 2 || column < 0 || column > 2) { valid = false; } else if (board[row][column] == 'X' || board[row][column] == 'O') { valid = false; } return valid; }
04ebf00c-d9e6-4b32-91a8-b207b5a463cc
3
public int getActivityIndex(Activity activity) { int index = -1; if (activity.getIdActivity() > -1) { index = activities.indexOf(activity); } else { for (Activity a : activities) { if (a.getName().equals(activity.getName())) { index = activities.indexOf(a); break; } } } return...
c8102593-7a16-4daf-ac30-7d837a60ebaa
7
public static void main(String... args) throws IOException { MyScanner sc = new MyScanner(); int n = sc.nextInt(); int unsqr = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { int v = sc.nextInt(); if (j == i) { ...
d8b4cb6f-992e-4527-900b-10cce6d7eec2
4
private static String formatOptimalSolution(String solution) { try { char[] s = solution.toCharArray(); // Initialize the solution with the beginning 2 characters String optimalSolution = solution.substring(0, 2); for (int i = 2; i < s.length; i ++) { // Add each character to the optimal solution ...
54c56e1e-99e7-4b7e-a104-df8cee557227
7
public void calculate() { // Adds the distance from X to Zone #2 // to the distance from Zone #2 -> Zone #3 for(int i = 0; i < m; i++) { for(int i2 = 0; i2 < n; i2++) { ZoneTwotoZoneThree[i][i2] += XtoZoneOne[i]; } } // Adds the distance from zone #3 to Y // to the distance from Zone #2 t...
c194e494-6e80-4419-a1e5-890f0606abf5
1
public void Stop() { if (scrThread != null) { scrThread.Stop(); scrThread.interrupt(); } }
6ec89921-114b-48f8-9c9b-7adefacb22b2
0
public Neighbor getNbr() { return nbr; }
293532fb-4763-48a2-a478-69ddc07650f6
8
@Override public void executeMsg(final Environmental myHost, final CMMsg msg) { super.executeMsg(myHost, msg); if((reRollFlag) &&(affected instanceof MOB) &&(msg.sourceMinor()==CMMsg.TYP_LOOK) &&(msg.source()==affected)) { final MOB M=msg.source(); if((M.session()!=null) &&(M.playerStats()!=null)...
34b865ae-7d9d-4987-9a27-aa3a0c14d9ff
1
public String getBoardString() { String boardString = "["; for (int i = 0; i < boardArray.length; i++) { boardString += boardArray[i] + ","; } boardString += "]"; return boardString; }
9b21f9dd-370c-4e30-9eb8-871d244d383c
1
public void destroy() { if (canfocus) setcanfocus(false); }
fc4aa149-2048-4b2c-a69c-0da27fc1c085
0
public void deleteDoctor(int index){ doctor.remove(index); JOptionPane.showMessageDialog(null, "Doctor is deleted","Delete", JOptionPane.PLAIN_MESSAGE); }
17eac4fd-f542-4c1c-bc15-c42d7dc8e678
5
private void samplePIn() { final PInSampler sampler = graph.getSamplerForNewPIn(); final List<Double> pInValues = graph.getGroundTruth().getPIn(); double result = -1.0; if (PInSampler.MEAN == sampler || pInValues.size() == 1) { result = ListUtils.arithmeticMean(pInValues); } else if (PInSampler.GAUS...
083dcfc6-9e09-43dd-a29f-b289568d5d9c
6
public static void addPerson(BaseRole role) { if (role instanceof RexCustomerRole){ RexCustomerRole customer = (RexCustomerRole) role; customer.setHost(host); customer.setCashier(cashier); customers.add(customer); //customer.gotHungry(); ((RexCustomerRole) role).getGui().setHung...
1b537d9f-5dbb-43b6-9cd6-f51a22abd6fa
4
public JSONWriter key(String string) throws JSONException { if (string == null) { throw new JSONException("Null key."); } if (this.mode == 'k') { try { this.stack[this.top - 1].putOnce(string, Boolean.TRUE); if (this.comma) { ...
96b90d03-0875-4e45-a323-9fead87bd92b
2
public Position getPosition(String id) { Position tempPosition = null; for (PinochlePlayer player : players) { if(player.getUser().getSession_id().equalsIgnoreCase(id)) tempPosition = player.getPosition(); } return tempPosition; }
3b9e653f-2b12-4603-8724-dcb3568afbb2
3
public static Class<?> getClass(String name){ StringBuffer tempMessage = new StringBuffer(); Class<?> cls = null; try { cls = Class.forName(name); tempMessage.append("以下のクラスオブジェクトを取得: " + name + "\r\n"); } catch (ClassNotFoundException e) { e.printStackTrace(); tempMessage.append("ClassNotFound...
08e1b926-d8c8-47ba-b250-336278ef2966
7
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); request.setCharacterEncoding("UTF-8"); User loggedIn = (User) session.getAttribute("loggedIn"); if (!isLoggedIn(ses...
28fab5c6-0c47-4d05-a0ea-24bbdb0dd326
7
public void jouer(){ System.out.println("Joueur " + couleur); Scanner console = new Scanner(System.in); String s = ""; this.setPasse(false); do{ do{ System.out.println("Souhaitez-vous passer ? o/n"); s = console.nextLine(); ...
cbedc80f-83ab-43a7-832a-778bfc360333
2
public int getPrice(String name){ for(Stock s : Singleton.getInstance().listeStocks) { if(s.getName().equals(name)) { return s.getPrice(); } } return 0; }
d644d399-65bb-4d16-91dc-a492655f16ad
8
@Override public void mouseClicked(MouseEvent arg0) { // TODO Auto-generated method stub int x=arg0.getX(); int y=arg0.getY(); if (0 <= x && x < 600 && 0 <= y && y < 600){ cursorX = x/BLOCKSIZE; cursorY = y/BLOCKSIZE; setTile(cursorX, cursorY, currentTile); } if (tilesLft <= x && x < tilesR...
2c2ae131-89f7-4fdf-b6af-f4eea9e334e5
1
protected final void addStart(final String name, final Attributes attrs) { try { h.startElement("", name, name, attrs); } catch (SAXException ex) { throw new RuntimeException(ex.toString()); } }
5491c0d9-3687-45c9-800d-a09fa487fba9
1
private void insertUnderflowData() { if (mUnderflowData != null) { ByteBuffer newBuffer = ByteBuffer.allocate(mUnderflowData.remaining() + mInboundData.remaining()); newBuffer.put(mUnderflowData); newBuffer.put(mInboundData); newBuffer.flip(); mInboundData = newBuffer; mUnderflowData = null; } }
00e5347c-b163-4ce1-97e2-549387a3c33a
3
public void deleteEvent() { if (id != null) { PreparedStatement st = null; String q = "DELETE FROM events WHERE id = ?"; try { conn = dbconn.getConnection(); st = conn.prepareStatement(q); st.setInt(1, this.id.intValue()); ...
0f6c7099-858e-4836-b629-cd6771df0328
8
public double[] getSplitPointSuggestions() { Set<Double> suggestedSplitValues = new TreeSet<Double>(); double minValue = Double.POSITIVE_INFINITY; double maxValue = Double.NEGATIVE_INFINITY; for (int i = 0; i < this.minValueObservedPerClass.numValues(); i++) { if (this.minVal...
cb98c2a0-c97b-49a8-bc63-f6460d751a5b
6
public void run() { int year; char choice; double income; double taxes; System.out.println("Welcome to U.S. Federal Tax Calculater by Ramin Tawakuli."); year = this.getYear(); this.getFilingType(); do { ...
07724811-3a8c-43f0-aab7-5764c1c225af
0
public long getUploaded() { return this.uploaded; }
28fc5367-585a-4014-ae3e-3dd8e6ad32c2
5
public boolean checkCollision(BallModel ball) { double cenX = ball.getCenterPosX(); double cenY = ball.getCenterPosY(); /* if ((ball.getPosX() > pos.getX()) && (ball.getPosX() < pos.getX() + blockWidth) && (ball.getPosY() > pos.getY()) && (ball.getPosY() < pos.getY() + blockHeight)) { */...
220f2ceb-5c85-4fd7-93da-5119ee6cf9fe
6
private GeneralPath makePathFromData(TreeMap<Float, Float> pts, int TYPE) { GeneralPath trend = new GeneralPath(); timePathPoints.clear(); // ///////////////////// float minimumPt = roundTo(min(new ArrayList<Float>(pts.values())), 3); float maximumPt = roundTo(max(new ArrayList<Float>(pts.values())), 3); if...
f32fe7c2-773a-4dbf-b586-35e18c76700d
0
private boolean isActionListener(String name) { return name.equals("onClick"); }
3f925599-7f25-406b-ab5e-b978dfaa70b7
4
@Override public int hashCode() { int result = code; result = 31 * result + category; result = 31 * result + (message != null ? message.hashCode() : 0); result = 31 * result + (reference != null ? reference.hashCode() : 0); result = 31 * result + (details != null ? details.ha...
fb72cf75-654c-4c81-8ae4-f0aa793d4c0f
8
public boolean equals(Object p_other) { boolean l_bRetVal = false; if (p_other == null) { l_bRetVal = false; } else if (this == p_other) { l_bRetVal = true; } else { ExecutionFilter l_theOther = (ExecutionFilter) p_other; l_bRetVal = (m_cl...
d9caaf38-88ab-4329-836c-cf9fa0f027d8
8
public ItemBuilder() { fileParser = new FileParser(KEYS); List<File> files = FileUtils.getFiles("items/"); for (File file : files) { try { Item item = buildItem((FileUtils.readFile(file))); String missingKey = FileValidator.isValid(item, REQUIRED_KEYS); if (missingKey == null) { allItems.add(i...
6916f77e-3e7e-4fe9-b43b-1c01f09a4b9e
6
@Override public void scheduleAll() throws TaskServiceException { LOGGER.info("Running Task discovery..."); // Find all task classes Set<Class< ? >> taskClasses = null; try { taskClasses = AnnotationUtils.findAnnotatedClasses(Task.class, DEFAU...
05072417-5a39-4b3e-b8b7-8715cc5292ef
7
@Override public void construir() { Elemento no_a, no_b; Random randomNumbers; int valorCaracter; no_b = new Elemento(); randomNumbers = new Random(); for (int i = 0; i < 20; i++) { valorCaracter = 64 + randomNumbers.nextInt(22); if ((valorCaracter == 65) || (valorCaracter == 69) || ...
945f913d-8d02-4423-a9ac-5b9f9ba315cf
4
public double standardizedPersonTotal(int index){ if(!this.dataPreprocessed)this.preprocessData(); if(index<1 || index>this.nPersons)throw new IllegalArgumentException("The person index, " + index + ", must lie between 1 and the number of persons," + this.nPersons + ", inclusive"); if(!this.vari...
47ffcb42-8269-4edd-a415-1ba1c042a869
7
@Override public void start() { npcId = (int) parameters[0]; questStage = (int) parameters[1]; switch (questStage) { case 0: sendEntityDialogue(Dialogue.SEND_3_TEXT_CHAT, new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "Hello, " + player.getDisplayName() + "!", "Welcome to " + Se...
bd49a69d-45f9-4ac9-8e4a-e908838f2031
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...
c6ed74ab-fd2a-4cba-ae54-8009df8a65a9
1
private void inorder(Node node, Queue<Key> q) { if (node == null) return; inorder(node.left, q); q.add(node.key); inorder(node.right, q); }
063f1a83-85bb-43a6-8908-7f83150e1982
7
public void brainMove(boolean stillNeedsRotation) { if (currentPiece == null || idealLocation == null || idealLocation.piece == null) { // do nothing, we are at the end of the game and don't want a null exception }else { int idealX = idealLocation.x; int dX = currentX - idealX; if (dX < 0) tick(RIGHT); ...
2c96884d-a2a0-401c-8432-dea7e5ddfb89
1
public void BroadcastMessage(String message) { for(ClientHandler client : clientFramework) { //gameController.Print("Enviat un Missatge Broadcast al client: " + client); client.SendMessage(message); } }
14fdc87b-b73d-4ed2-b885-e885041af5d6
8
public void stateChanged(ChangeEvent e) { //JSlider source = (JSlider)e.getSource(); int lowerBrushVal = -1; int upperBrushVal = -1; if(e.getSource()== rangeSliderBar[0]) { if (!rangeSliderBar[0].getValueIsAdjusting()) { lowerBrushVal = (int)rangeSliderBar[0].getValue(); upperBrushVal = ...
a4c4966a-0846-4b51-b015-ba5f9dc145fa
8
final RasterToolkit method1596(int i, boolean bool, int i_18_, AbstractToolkit var_ha) { anInt2857++; if (i_18_ < 51) aClass114_2860 = null; long l = (long) (((AbstractToolkit) var_ha).id << -1253962829 | (((Class218) this).anInt2853 | i << -1966608624 | (!bool ? 0 : 262144))); RasterToolkit class10...
e4375af5-445c-4dcb-8d76-2831e80874b7
0
@Override public String getDescription() { return description; }
31db8e84-110d-4b32-bab2-9368920b39e6
9
static NumType obj2type(Object cz) { NumType o; if (cz.equals(Short.class)) o = NumType.shrt; else if (cz.equals(Integer.class)) o = NumType.integer; else if (cz.equals(Long.class)) o = NumType.lng; else if (cz.equals(BigInteger.class)) o = NumType.bigint; else if (cz.equals(Float.clas...
35bd28a1-c7de-4588-924c-cb77729a1981
2
public String getSimpleCode(){ String str = ""; if(argumentListOpt!=null){ str += argumentListOpt.getSimpleCode(); } str += this.printLineNumber(true) + "call := " + identifier.getNewName() + " ( "; if(argumentListOpt!=null) str += ((ArgumentListExpression) argumentListOpt).getArgumentList(); ...
381a7679-dc11-4b71-97e7-6323aeac3581
6
public String collectUserInfo() { String fileName = ""; char input = ' '; scan = new Scanner(System.in); while(input != 'Y' && input != 'N' && input != 'n' && input != 'y') { System.out.print("Is there an existing Program of Study (Y or N)? "); input = scan.nextLine().charAt(0); } if (input == '...
7bed629e-61eb-4a3a-b140-c423bf2ba818
3
public Object[] getRange(int start, int end) { end++; if (start < 0 || end >= size || start >= end) throw new IndexOutOfBoundsException(); return Arrays.copyOfRange(items, start, end); }
1ce92f16-bc1a-4523-8500-ff3a6a3f6733
9
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { if (namespaceURI == clNamesapce && localName.equals("Declaration")){ if (firstPass) { for (int i = 0; i < currentTab; i++){ System.out.print("\t"); ...
e467e7fc-c076-4b4c-9244-18c628310673
6
public static String javaCreateCharacterSubstitutionTable() { { StringBuffer table = edu.isi.stella.javalib.Native.makeMutableString(256, '_'); { int code = Stella.NULL_INTEGER; int iter000 = (int) '0'; int upperBound000 = (int) '9'; boolean unboundedP000 = upperBound000 == Stella.NUL...
f186ff79-0929-4f3b-9029-c4bcc29c0826
7
protected void execute() { if(oi.getButton(RobotMap.shooterAngleController, RobotMap.shooterAngleAutoButton)){ autonomous(); } else{ /*if (oi.getButton(RobotMap.shooterAimJoy, RobotMap.autoTopButton)) { double[] sets = new double[4]; ...
641745d4-8ff2-4af5-ac5f-876be054b43d
9
public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout()); shell.setText("Accessible Table Example"); Group group = new Group(shell, SWT.NONE); group.setText("Tables With Accessible Cell Children"); group.setLayout(new ...
3a652df7-9d81-4101-8c34-2756cbb61927
7
public int sampleState() throws RuntimeException { if( !this.validatedCIMs()) throw new IllegalStateException("Error: CIMs are not validated"); if( this.isStaticNode()) // if the node is static return DiscreteModel.sample(this.getCIM(this.getCurrentParentsEntry())[0]); else if( !this.isInstanced(...
7abf922c-e552-4a25-b291-52bf91122542
0
public String getMethod() { return type; }
598c93a4-620f-45a3-8512-61731a1536f4
0
protected byte[] computeByteArray(OSCJavaToByteArrayConverter stream) { computeAddressByteArray(stream); computeArgumentsByteArray(stream); return stream.toByteArray(); }
88c027c1-0b68-47ee-86d8-7b4f1c3ca593
3
public static void main(String[] args) { Scanner in = new Scanner(System.in); Scanner input = new Scanner(System.in); int n = input.nextInt(); int i = 0; String[] mass = new String[n]; while(i<n) { mass[i] = in.nextLine(); i++; } for (int j = 0; j < mass.length; j++) { String[] arraySpl...
006dcbdc-49c7-4f48-84ef-432629e290d0
5
public void fill(Game p) { if (this.filled) { return; } if (p == null) { for (int i = 0; i <= 4; ++i) { this.addBall(new Ball(Color.WHITE, -4, i)); this.addBall(new Ball(Color.BLACK, 4, i)); } for (int i = 0; i <= 5; ++i) { this.a...
9f80b48b-2338-4481-a6b7-7f37617c8062
3
@Command(command = "resetmeta", description = "resets all metadata associated with MCNSAEssentials", permissions = {"resetmeta"}) public static boolean resetMetaData(CommandSender sender) { // get all online players Player[] onlinePlayers = Bukkit.getServer().getOnlinePlayers(); // loop through all play...
1d41bb1a-f45b-4822-80af-9bda91eee933
5
@Override public void execute(CommandSender sender, String gateName, List<String> args) { this.sender = sender; String gateTarget = (args.size() > 0 ? args.get(0) : null); if (gateName == null || gateTarget == null) { error("No gate(s) given."); reply("Usage: /gate loop <gatename> <target_gatename>"); ...
3553f66b-7b3c-4201-9d8c-34a067665b70
1
void create_file (Object doc,String fpath) { Path logfile = FileSystems.getDefault().getPath(fpath); //fileW=fpath; String s = (String) doc; byte data[] = s.getBytes(); try (OutputStream out = new BufferedOutputStream( Files.newOutputStream(logfile,CREATE))) ...
abe66cb8-cab3-4aca-ab0e-2652ee0f7457
0
public Date getEndTime() { return endTime; }
d692528b-5c8e-4627-8d25-9268b675c82d
2
public int previousIndex() { if (prev == null) { return -1; } if (cache == null) { cache = toArray(); } return prev.index; }
e569e2af-6cd8-4d12-9614-9845f1db4821
2
public List<T> visitaLivelli() { List<T> ris = new LinkedList<T>(); Queue<Albero<T>> daVisitare = new LinkedList<Albero<T>>(); daVisitare.offer(this); while (!daVisitare.isEmpty()) { Albero<T> curr = daVisitare.poll(); ris.add(curr.val()); Iterator<Albero<T>> itFigli = curr.figli(); while (itFigli.h...
d7a955e8-d7df-4afa-922f-23909d5a671d
7
public boolean disassembleROM(CPU6502ControllerInterface controller, NESRom rom , Component parentComponent){ if(_running) { stopRunning(); try { Thread.sleep(500); } catch(Exception e) { e.printStackTrace(); } if(!_runCompleted){ System.err.println("Preview D...
0645a163-db16-450c-80ca-b9c9e5aabe6d
0
public SearchQuery getSearchQuery() { return searchQuery; }