method_id
stringlengths
36
36
cyclomatic_complexity
int32
0
9
method_text
stringlengths
14
410k
6adfeeb3-49b2-4ec7-9dda-baa62fa2c6f3
6
public static boolean sameValues(int[] array1, int[] array2) { HashMap<Integer, Integer> m1 = new HashMap<Integer, Integer>(); for (int n : array1) { int before; if (m1.get(n) == null) { before = 0; } else { before = m1.get(n); } m1.put(n, before + 1); } for (int n : array2) { if (m1....
4b448857-3889-4183-80dd-b3e7f1767264
2
Celula[][] mIntTomCelula(int[][] mapa, int l, int c) { int i, j; Celula[][] m; m = new Celula[l][c]; for(i = 0; i < l; i++) for(j = 0; j < c; j++) m[i][j] = new Celula(mapa[i][j], 20); return m; }
becc6b30-87c9-47cf-90e0-c918f26eaa46
1
private JComboBox getJComboBox0() { if (jComboBox0 == null) { jComboBox0 = new JComboBox(); jComboBox0.setModel(new DefaultComboBoxModel(new Object[] { ",", ";", "space", "tab" })); jComboBox0.setDoubleBuffered(false); jComboBox0.setBorder(null); } return jComboBox0; }
7888e441-1911-4aa1-9c8b-f6213fd35e69
9
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { log.info("WANcostResummingServlet1h Got a GET..."); caches.reload(); link[][] linkArr = new link[caches.lSources.size()][caches.lDestinations.size()]; for (int i = 0; i < caches.lSources.size(); i++) for (int j = ...
8a0f585d-6f9a-42db-ab38-1d5da44948b0
0
public FrameFileDataBaseEditor getFileDataBaseEditor(){ return fileDataBaseEditor; }
b4971e40-b079-434b-a478-53edcb36c45f
8
private static String escapeJSON(String text) { StringBuilder builder = new StringBuilder(); builder.append('"'); for (int index = 0; index < text.length(); index++) { char chr = text.charAt(index); switch (chr) { case '"': case '\\': ...
cb3d708b-3d7f-4516-bf77-a10c7722c3a8
1
public static void collapseEverything(JoeTree tree) { int limit = tree.getRootNode().numOfChildren(); for (int i = 0; i < limit; i++) { tree.getRootNode().getChild(i).CollapseAllSubheads(); } // Record the EditingNode, Mark and CursorPosition Node firstNode = tree.getRootNode().getFirstChild(); tree.s...
4b110a3b-3d29-44f0-970a-d6ad945d7cc4
3
public WidgetStackGrid(int w, int h, int size, boolean showGrid) { super(); width = w; height = h; //setMaximumSize(width*size, height*size); //setMinimumSize(width*size, height*size); layout.setSpacing(showGrid ? 1 : 0); layout.setMargin(0); setLayout(layout); stack = new WidgetStack[height][]...
e5a0aae4-8130-4505-82a4-99d19a9bbdcb
2
public Marker rand(int readLen) { while (true) { Marker m = random(readLen); if (m != null) return m; } }
1e06aacb-4ea0-4448-9a6b-c49ed8e46305
5
public void generarCodificacion(){ int total = (int)(Math.random()*(5000-800+1)+800); int direccion = 0; for(int i = 0; i < total; ++i){ direccion = (int)(Math.random()*4); switch(direccion){ case 0: codificacion.add("up"); break; ...
39f1da12-5f58-4754-b406-37bf05f189d8
4
private void show() { int count = 0; System.out.println(" MyTunes "); System.out.println(" Version 1.0 "); System.out.println(" --------------------"); for (MenuItem mi : MenuItem.values()) { count++; System.out.println("" + count + ". ...
4962cf52-f21d-4a3e-b002-b86f6f60d67a
9
@Override public boolean equals(Object other) { if(other == null) return false; if(other instanceof AgigaToken) { AgigaToken o = (AgigaToken) other; return tokIdx == o.tokIdx && Util.safeEquals(word, o.word) && Util.safeEquals(lemma, o.lemma) ...
0ba8cc10-302b-4922-9821-f167aadf18dd
1
public void display(){ System.out.println(name); int count = 0; for (Question question: questions){ count++; System.out.print(count + ")."); question.display(docType.equals(DocumentType.Test)); System.out.println(); } }
7c8fbc60-eca2-4d95-a0f4-9100a579e0df
0
private Object readFloat() { byte[] floatBytes = new byte[4]; floatBytes[0] = bytes[streamPosition++]; floatBytes[1] = bytes[streamPosition++]; floatBytes[2] = bytes[streamPosition++]; floatBytes[3] = bytes[streamPosition++]; // int floatBits = // (floatBytes[0] << 24) // | (floatBytes[1] << 16) // |...
a8df8161-85b2-4f9e-8dd1-9cb3da6ea3c7
3
public void write(final DataOutputStream out) throws IOException { if (Method.DEBUG) { System.out.println("Writing method " + this); System.out.println(" Masked Modifiers: " + (modifiers & 0xf000)); } out.writeShort(modifiers); out.writeShort(name); out.writeShort(type); out.writeShort(attrs.lengt...
7b00d7fe-b870-444d-8b33-f73eb068194d
3
@Test public void testPageIteratorCloning() throws IOException, TesseractException { ImageAnalyzerFactory factory = TestContext.getImageAnaylzerFactory(); try { ImageAnalyzer analyzer = TestContext.getImageAnalyzer(factory, TestContext.poetryImageFile); LayoutIte...
d9a8ca51-e7fa-48df-8061-71f63aa28e8e
5
public void run() { try { try { controle = new Controle(); } catch (ClassNotFoundException ex) { Logger.getLogger(Servidor.class.getName()).log(Level.SEVERE, null, ex); } catch (SQLException ex) { Logger.getLogger(Servidor.class...
220ff87e-41d0-467f-a358-d0147b5f05f0
1
@Override public List<Integer> save(List<DirectionStayHotel> beans, GenericSaveQuery saveGeneric, Connection conn) throws DaoQueryException { try { return saveGeneric.sendQuery(SAVE_QUERY, conn, Params.fill(beans, (DirectionStayHotel bean) -> { Object[] objects = new Object[3]; ...
fe7d01da-47e4-4a8d-9c38-f1bd124bad5e
5
@Override public Iterator<Piece> iterator() { return new IteratorOnPieces(){ private IteratorOnPieces iteratorOnBoard = (IteratorOnPieces) field.iterator(); @Override public boolean hasNext() { Iterator<Piece> clone = iteratorOnBoard.clone(); while(clone.hasNext()){ Piece piece = clone.nex...
69337072-88a2-40e2-aff1-5b06d5deaca0
9
public SmartCrawlerView(SingleFrameApplication app) { super(app); initComponents(); BufferedImage image = null; try { image = ImageIO.read(new File("lib/smart_crawler_logo.png")); getFrame().setIconImage(image); Pr...
e2d6208b-597f-48ba-b15e-3d38e31bd01f
5
public boolean estCleValable(String k) { int i=0; boolean trouve=false; while(i<k.length() && !trouve) { if(!ALPHABET.contains(""+k.charAt(i))&&!ALPHABET.toUpperCase().contains(""+k.charAt(i))&&(k.charAt(i)!=' ')) { trouve=true; JOptionPane.showMessageDialog(null, "Veuillez saisir une cl constitue uniq...
8ca16282-1317-48c9-8823-c822910f4290
4
public static void floyd(int n) { for (int k = 0; k < n; k++) for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) if (d[i][j] > d[i][k] + d[k][j]) d[i][j] = d[i][k] + d[k][j]; }
845ead44-1873-4659-9f0b-bf23406a434a
4
private void addFilesUnder(File root, List<File> files, FileFilter fileFilter) { if (! fileFilter.accept(root)) return; if (root.isFile()) { files.add(root); return; } if (root.isDirectory()) { File[] children = root.listFiles(); for (int i = 0; i < children.lengt...
0decc782-9b95-4e7d-91fd-bdd3ab459978
8
public static OOXMLElement parseOOXML( XmlPullParser xpp, Stack<String> lastTag, WorkBookHandle bk ) { CxnSp c = null; GraphicFrame g = null; GrpSp grp = null; Pic p = null; Sp s = null; try { int eventType = xpp.getEventType(); while( eventType != XmlPullParser.END_DOCUMENT ) { if( eventTyp...
fabdefa2-9465-47e8-9ad5-c1c92db051a6
6
public ArrayList<String> recListaPeticiones(String nick) {//ok //verificar logueo ArrayList<String> peticiones; peticiones = new ArrayList<String> (); try { String queryString = "select * from peticionAmistad where receptor=?"; connection = getConnection(); ...
786091e5-1729-41cb-8d37-0a913ffc44b8
3
public String toString() { String string = ""; for (HardwareSetAlternative hardwareSetAlternative : hardwareSystem.getHardwareSetAlternatives()) { string += hardwareSetAlternative + " hosts "; for (DeployedComponent deployedComponent : deploymentAlternative.getDeployedComponents()) if (deployedComponent.g...
47477458-d81b-44bc-8672-1af280aa7384
8
public void keyTyped(KeyEvent e) { JTextField source = (JTextField) e.getSource(); if (e.getKeyChar() == separator) { e.setKeyChar('\0'); if (!source.getText().isEmpty()) { transferFocus(); } } if (source...
e76d7d6c-60cf-4e2d-8384-71d17343a134
4
@Override public void replaceArgument(Value replace, Value nval, boolean throwOnError) throws Exception { boolean found = false; int s = arguments.size(); for(int i = 0; i < s; i++) { if(arguments.get(i).equals(replace)) { arguments.set(i, nval); found = true; } } if(throwOnError && !foun...
9d653603-58bc-474c-9dec-4dbde45edacb
7
@Override public Icon getIcon(File f) { String extension = Utils.getExtension(f); Icon icon = null; if (extension != null) { if (extension.equals(Utils.jpeg) || extension.equals(Utils.jpg)) { icon = jpgIcon; } else if (extension.equals...
e91ec725-f5d9-4d3e-9426-e580a74c4aff
4
public void tick() { level.tick(); xScroll = game.getPlayer().getX() - game.getScaledWidth() / 2; //yScroll = game.getPlayer().getY() - game.getScaledHeight() / 2; // allow screen scroll only til max int maxwidth = level.getWidth() * 16 - game.getScaledWidth(); if (xScroll > maxwidth) xScroll = maxwidth; ...
2e31da73-cd86-4219-8ec7-1419153d0b6d
1
@Override public double doubleValue() { final int fractionalFactor = DPU.toFractionalFactor(factor); if (fractionalFactor > 0) { return base / (double) DPU.getMaxIntScale() / DPU.getScale(fractionalFactor); } else { return base / (double) DPU.getScale(factor); } }
774f7a1f-7bc7-4aad-bb0e-35427bba08eb
0
public int getScale() { return SCALE; }
cd3db7d9-fc60-4ac8-ac63-1688c16c23a3
5
@Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof TaxonRank)) { return false; } TaxonRank other = (TaxonRank) object; if ((this.id == null && other.id != null) |...
67d65099-c65f-420c-a33c-be7f260c9b1e
7
private void playSound(String filename) { String strFilename = "resources/sounds/"+fileName; try { soundFile = new File(strFilename); } catch (Exception e) { e.printStackTrace(); System.exit(1); } try { audioStream = AudioSyst...
3f379e8f-5da4-411e-9a4b-14bde29a01bc
7
public void move(){ super.move(); if(game.t%30 == 0){ shoot(Math.PI*3/2); } // only attempt to stay in screen if not near boundaries if(x >= 8 && x+8 <= game.viewWidth()){ if(y+32 >= game.viewHeight() && game.goingDown(angle) || y <= 32 && game.goingUp(angle)){ this.angle = -this.angle; ...
7221cac6-bd31-411e-91d2-8107a439c0b4
4
@Test public void testRequests() { JsonRpcRequest reqSent = JsonRpcRequest.newStartRequest("fake sdp", new JsonRpcConstraints("sendonly", "sendonly"), 9); String json = GsonUtils.getGson().toJson(reqSent); JsonRpcRequest reqReceived = GsonUtils.getGson().fromJson(json, JsonRpcRequest.class); assertTru...
46c27a24-9c1e-49aa-bd7a-1c0f936ac3ef
1
static void waitCustomerButton() { long sleep = (long)(Math.random() * 20000); try { Thread.sleep(sleep); } catch (InterruptedException e) { e.printStackTrace(); } }
800f8799-39cf-4596-ab72-3b4124cef687
0
@Override public void disconnecting(DisconnectingEvent e) { }
bc0af6fd-6637-4d10-a636-1a8e761b704e
5
public static ArrayList<Card> readCards(String filename){ ArrayList<Card> cardList = new ArrayList<Card>(); File XMLFile = new File(filename); //get Scanner object Scanner scan; try { scan = new Scanner(XMLFile); } catch (FileNotFoundException e) { System.out.println(filename + " not found")...
22986ab3-d7a1-495f-b36f-b52c663406f9
4
public RotateDemo() { MinuetoWindow window; // The Minueto window MinuetoImage imageTank; // Original image MinuetoImage imageRotate; // Rotated image double r = 0.1; // Rotation angle // Create a 640 by 480 window window = new MinuetoFrame(640, 480, true); // Load our ta...
ab9c9318-8151-4f1a-805e-5a640e23881e
5
public void run() { lastTime = System.nanoTime(); timer = System.currentTimeMillis(); while(running) { now = System.nanoTime(); delta += (now - lastTime)/fps; lastTime = now; RunnableObject.emptyQueue(); while(delta >= 1) { if(GameState.gameRunning) PlatformControls.newPlatform(); cont...
80bb5f61-4d81-48a4-b947-aa9d0859af7c
9
public Raster2pgsqlReclassification() throws IOException, SQLException, InterruptedException { System.out.println("hello3"); int i=0; String [] locateshppgsql=null; locateshppgsql= new String[2]; locateshppgsql[i++] = "locate"; locateshppgsql[i++] = "raster2pgsql"; ProcessBuilder launchershppgsql...
ca23a53c-d36f-431d-a6dd-c859e82461fe
0
public void setDate(String date) { this.date = date; }
9971023f-bd7d-4d30-844a-fd12f201bed2
6
public static void main(String[] args) { LogicGame game = new LogicGame(); while (true) { game.print(); System.out.print("Enter coordinates separated by commas: "); Scanner in = new Scanner(System.in); String input = in.nextLine(); String[] ints = input.split(","); int[] coords = new int[4]; fo...
83f06d69-0deb-4029-a214-f54a1823b6dd
3
public void run(){ gsm = new GameStateManger(); double delta = 0; double ns = 1000000000D / 60D; long lastTime = System.nanoTime(); long timer = System.currentTimeMillis(); while(running){ long now = System.nanoTime(); delta += (now - lastTime) / ns; lastTime = now; while(delta >= 1){ delta-...
407252f2-d561-4413-8a4c-9a2bf2ef4eb0
2
public void capturePicture() { if (checkCameraSupport() == false) { // showAlert("Error", "Camera is not supported!", null); return; } if (checkPngEncodingSupport() == false) { // showAlert("Error", "Png encoding is not supported!", null); retur...
8182eb9b-3f28-4bf8-a435-5cdc0bb42b49
2
private int findYear (String input) { // method to extract year # information Scanner s = new Scanner (input); int[] date = new int[3]; s.useDelimiter("/"); while(s.hasNext()) { for (int i = 0; i < date.length; i++) { date[i] = s.nextInt(); } } s.close(); return date[2]; }
d1fa53ae-8c0b-4a92-bfdb-bb864ebf88a8
1
public void connect() { try { // get permit decrease the sem value, if 0 wait for release sem.acquire(); System.out.printf("%s:: Current connections (max 10 allowed): %d\n", Thread.currentThread().getName(), sem.availablePermits()); ...
3e6feb83-fa20-42c2-add7-9050245dbd16
5
private boolean func_263_h(World var1, int var2, int var3, int var4) { return this.canBlockCatchFire(var1, var2 + 1, var3, var4)?true:(this.canBlockCatchFire(var1, var2 - 1, var3, var4)?true:(this.canBlockCatchFire(var1, var2, var3 - 1, var4)?true:(this.canBlockCatchFire(var1, var2, var3 + 1, var4)?true:(this.can...
ba939bec-03a0-44bd-8a36-6587ec5becdb
6
public void readNet() { final Color BLUE_COLOR = new Color(0, 0, 200); String line; if (fileName == null) { System.err.println("No file name set. Data read aborted."); return; } try { File file = new File(fileName); Scanner scanner...
72d4991e-c884-4f3a-a9b7-3594e1450577
2
public static final void enableSecType(int secType) { for (Iterator<Integer> i = enabledSecTypes.iterator(); i.hasNext();) if ((Integer)i.next() == secType) return; enabledSecTypes.add(secType); }
9a874ff9-6ad6-4258-ad23-ffb85a5bb13c
9
public String sample_frequency_string() { switch (h_sample_frequency) { case THIRTYTWO: if (h_version == MPEG1) return "32 kHz"; else if (h_version == MPEG2_LSF) return "16 kHz"; else // SZD return "8 kHz"; case FOURTYFOUR_POINT_ONE: if (h_version == MPEG1) return "...
5938ffa2-480c-45cc-8242-a5500fb3c8bb
0
@Override public void saveIncompletedSeller(IautosSellerInfo iautosSellerInfo) { EntityManager em = this.getEntityManager(); IautosSellerInfo isi = em.find(IautosSellerInfo.class, iautosSellerInfo.getSeqID()); // em.merge(iautosSellerInfo); isi.setShopAddress(iautosSellerInfo.getShopAddress()); isi.setSh...
c6b18d06-d6f7-4d09-9aa3-bb968cf25224
0
public int getGameStartTime() { return gameTime; }
021f48d6-7a86-47fa-87c3-e06b5e9a913f
8
public SequenceDiagramFileMaker(SequenceDiagram sequenceDiagram, Skin skin, FileFormatOption fileFormatOption, List<BufferedImage> flashcodes) { // HtmlColor.setForceMonochrome(sequenceDiagram.getSkinParam().isMonochrome()); this.flashcodes = flashcodes; this.diagram = sequenceDiagram; this.fileFormatOption ...
1c157f00-b6c6-471b-975e-0ae32e04d45f
0
public String getPassword() { return password; }
051696db-84f1-46a5-9549-5da929657dbb
6
@Override public ZemObject eval(Interpreter interpreter) { ZemObject onVariable = interpreter.getVariable(onVariableNode.getName(), onVariableNode.getPosition()); ZemObject ret = null; if (onVariable instanceof ZemArray) { String asVariableName = asNode.toString(); fo...
af20a556-f496-4bc1-b841-4eee653d2248
9
private static void getConfigParameterFromFile(String FileName) { try { String[] token; Scanner scan = new Scanner(new File(FileName)); while (scan.hasNextLine()) { String line = scan.nextLine(); token = line.split(" "); if ("Pr...
ad0aeabf-2cdb-4484-a1ea-ac4e88af2331
6
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SubModelModel that = (SubModelModel) o; if (idSubModel != that.idSubModel) return false; if (subModel != null ? !subModel.equals(that.subModel)...
1679befd-c00e-44f7-9645-8e49ffe6caf2
0
protected void initialize() { Robot.driveTrain.clearGyro(); }
66587dec-5b47-4a7c-a082-d9ddce56c669
5
private String buildSelectionString(String structure, String domain) { if (structure == null || domain == null) return null; String model = getModel(structure); if (model == null) return null; String chain = getChain(structure); String[] range = domain.split("-"); if (range.length == 2) { String from = ...
75a7a3cf-9dfb-4fbd-b25a-e17e01f7af61
5
private File askForFileName() { while (true){ int option = fileChooser.showSaveDialog(this); if (option == JFileChooser.APPROVE_OPTION){ File file = fileChooser.getSelectedFile(); if (file.exists()){ if (JOptionPane.showConfirmDialog(this, "El archivo ya existe, desea sobreescribir?") == JO...
41e30e06-3116-45a9-a820-68c8a6dd0111
1
public boolean updateDevuelto(Libros l){ PreparedStatement ps; try { ps = mycon.prepareStatement( "UPDATE Libros "+ "SET prestados=prestados-1 "+ "WHERE codigo=?" ); ps.setString(1, l.getCodigolibro()); ret...
26417137-c910-4135-87fc-afd9d147dc4c
9
private boolean isUserValid(String user, char[] password) { Connection connection = null; PreparedStatement statement = null; ResultSet rs = null; boolean valid = false; try { char[] hpwd = hashPassword(password); connection = getConnection(); ...
eb8d5b7c-8ec9-4e24-9c4c-7c25f2f41648
6
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; DownloadTask other = (DownloadTask) obj; if (saveFileAt == null) { if (other.saveFileAt != null) return false; } else if (!saveFileAt.equals(other.sa...
d60ec905-4682-45f6-9019-0dba46911c82
2
@Override public void scan(String order) { if (order == null) { throw new NullPointerException("Arguments can't be null."); } if (order.length() == 0) { throw new IllegalArgumentException("Arguments can't be empty."); } StringBuffer output = new StringBuffer(); output.append(this.order); output.a...
30cccd89-7988-411b-8b24-3e811e63517d
0
public void setjLabelOffreEchantillons(JLabel jLabelOffreEchantillons) { this.jLabelOffreEchantillons = jLabelOffreEchantillons; }
d85cad02-ef39-402d-8fc9-2415eb8b3a88
8
public static void cleanup(String path) { HashMap<String, ArrayList<String>> savedPlayerData = load(path); ConfigurationSection ConfigSec = Spectacles.getInstance().getConfig() .getConfigurationSection("Regions"); if (ConfigSec == null) { if (savedPlayerData != null) ...
2933a7fb-7624-4b2e-a9f6-fd8337a5600d
1
public E min() { if (min == null) { findMin(); } return min.getValue(); }
540f5dd4-02e5-49db-9ed7-2771674bae4a
9
public static void main(String[] args) throws InterruptedException { if(!(args.length == 2 || (args.length == 3 && args[0].matches("-speedup|-scaleup")))) { printUsage(); return; } int numberThreads = Integer.parseInt(args[args.length - 2]); if(numberThre...
e9b8b84d-dc5f-4a83-82e6-304433ac9c5a
7
public InfoNode Add(String key, Integer value, Node node){ if(node instanceof LeafNode){ if(((LeafNode) node).size < BPlusTreeIntToString60.maxDegree + 1){ node.add(key, value); return null; } else{ return SplitLeaf(key,value,node); } } if(node instanceof InternalNode){ for(int i = 1; i...
98bd4ccf-0d21-453d-a8c4-75403932695e
3
public void updateUniforms(Matrix4f worldMatrix, Matrix4f projectedMatrix, Material material) { if (material.getTexture() != null) material.getTexture().bind(); else RenderUtil.unbindTextures(); setUniform("transformProjected", projectedMat...
b3d84a4f-5797-4509-9d4a-8a161991bd45
1
public ConnectionProcessorPipe(final InputStream instream, final Filter[] filters, OutputStream outstream, final ConnectionLogger logger, final Integer bufferSize) { this.instream = new TroubleInputStream(instream, filters); this.outstream = outstream; this.bufferSize = bufferSize == null ? 10...
64e87c14-236b-474e-a589-2311da869781
1
public void removeTimeListener(TimeListener l) { if(l == null) { return; } this.timeListener = null; }
dbdfc8ba-d68b-4c57-b07d-cb81d5ccf60c
7
public void addDoneAbilityUsage(HashSet<String> done, String val) { switch(CMLib.factions().getAbilityFlagType(val)) { case 1: for(int i=0;i<Ability.ACODE_DESCS.length;i++) { if(!done.contains(Ability.ACODE_DESCS[i].toUpperCase())) done.add(Ability.ACODE_DESCS[i].toUpperCase()); } break; c...
3c72e165-68c1-409d-9e32-37ff0c32a837
5
private void burstBalloon() { log.info("Popping!"); SceneObject balloon = SceneEntities.getNearest(balloonID); if (getLocation().distance(balloon) <= 10) { if (getLocation().distance(balloon) <= 5) { if (balloon.isOnScreen()) { balloon.interact("Burst"); Time.sleep(1000); while (Players.getL...
727d981d-796a-4c6b-91ee-5ad6d7931ade
5
static final void method2441(int i, int i_0_, int i_1_, int i_2_, int i_3_, int i_4_, int i_5_) { if (i_2_ != -22728) anInt10503 = 121; if ((Class369.anInt4960 ^ 0xffffffff) >= (i_5_ - i_0_ ^ 0xffffffff) && (i_0_ + i_5_ ^ 0xffffffff) >= (Class113.anInt1745 ^ 0xffffffff) && (Class132.anInt1910 ^ 0x...
faf0a642-1350-4373-abd9-101a57e7aacb
5
public static void strongComponent(int v) { visitado[v] = true; grafo[v].lowLink = cont; grafo[v].index = cont; cont++; pila.add(v); for (int i = 0; i < grafo[v].listaVecinos.size(); i++) { int vecino = grafo[v].listaVecinos.get(i).vecino; if (!visitado[vecino]) { strongComponent(vecino);...
d70db008-96fe-45e7-8dce-45ae17e8ee11
9
public void removeEntry(final File file) throws IOException { synchronized (ksEntries) { final File entriesFile = seekEntries(file.getParent()); // if there is no Entries file we cannot very well remove an Entry // from it if (entriesFile == null) { ...
f9260ebf-dca4-4c80-b392-698ca08e7011
9
public int showEuropeDialog(EuropePanel.EuropeAction europeAction) { // Close any open Europe Dialog (Recruit, Purchase, Train) try { if (europeOpenDialog != null) { europeOpenDialog.setResponse(new Integer(-1)); } } catch (NumberFormatException e) { ...
b0081643-9a2c-4f10-922c-c956384bb83f
9
void data() throws ScriptException { String dataString = null; String dataLabel = null; switch (statementLength) { case 4: case 3: dataString = (String) statement[2].value; case 2: dataLabel = (String) statement[1].value; if (dataLabel.equalsIgnoreCase("clear")) { viewer.setData(null, null); ...
b4da0f3f-088e-4ff4-8667-bbfd98ccf7ae
0
public Transition copy(State from, State to) { return new PDATransition(from, to, getInputToRead(), getStringToPop(), getStringToPush()); }
9f2111f6-a988-4b8f-8e33-b4ad53bd3e1e
3
protected Subscribers(final PluginManager pm, final String permission) { this.pm = pm; this.permission = permission; final Set<Permissible> permissibles = this.pm.getPermissionSubscriptions(this.permission); for (final Permissible permissible : permissibles) { ...
6aed277d-74c0-4649-880f-9688d3714100
0
public void addOrdine(Order ordine) { this.ordini.add(ordine); }
196c7f5d-d194-4ce0-92a9-c3258f74fc91
8
public static void main(String[] args) throws Exception { String input = Utils.getOption('i', args); String output = Utils.getOption('o', args); boolean print = Utils.getFlag('p', args); // words to process? Vector words = new Vector(); for (int i = 0; i < args.length; i++) { if (args[i]....
e4a7d78f-addb-4553-b5bb-bcb6967eea4b
0
public int getT(){ return countT; }
bbad75fa-eddb-49b8-aeac-b9433e30448f
1
public byte[] getAttribute(String name) { AttributeInfo ai = getClassFile2().getAttribute(name); if (ai == null) return null; else return ai.get(); }
f0d53f35-6b54-41d0-a2a2-e6b13d69317b
7
void splitMoney(LivingThing thnStore, int money) { if (money == 0) { return; } if (thnStore.popup) { thnStore.send(""+(char)33+"You have lost "+money+" gp.\n"); } else { thnStore.chatMessage("You have lost "+money+" gp."); } thnStore.cash -= money; int i, i2=0; Vector vctStore; if (...
43af56fc-5791-4b1f-ab8f-29dcd9459a4c
3
public void load() { Scanner sc = null; try { File file = new File("src/res/maps/Maps"); if (!file.exists()) return; sc = new Scanner(file); while(sc.hasNext()) { String name = sc.next(); maps.put(name, new Map(name)); } sc.close(); } catch (IOException eio) { eio.pr...
9443ff5d-e514-4e5d-9d20-c3c9ef004abf
1
private double latticePar(double T, double par0, double TEC, double Tch) { if (temperature == 0) { return par0; } else { return par0 * (1 + TEC * Tch * Utils.debye(Tch / T)); } }
08d13675-2b49-4196-81fc-cd337f1e628d
5
@Override public int mover() { if(salud > 0){ Partida.Pantalla pantalla = Partida.getPantalla(); int yvv = (pantalla.getWidth() + pantalla.getHeigth()) / 50; if (x + velocidad < pantalla.getX()){ // izquierda imgAct = imgDer; x...
1dafe8f6-ca35-48d0-9380-f84c02f31895
7
public boolean purchase(int dispenserNumber) { boolean toReturn = false; this.isOn(); if (!on) { return false; } try { //used to have an ! if (this.dispensers.get(dispenserNumber).canBuy()){ double price; if (this.moneyIn - (price = this.dispensers.get(dispenserNumber).getPrice()) >= 0) { ...
25f3055a-93e1-40be-ab14-ea65f302f18f
2
public void editLocation() { World<T> world = parentFrame.getWorld(); Location loc = display.getCurrentLocation(); if (loc != null) { T occupant = world.getGrid().get(loc); if (occupant == null) { MenuMaker<T> maker = new MenuMaker...
3aaa95f2-e7d4-4f9b-bed6-f9b0a1393787
1
private String generateWord(String[] wordCharPool) { String word = ""; // initialize the word // Loop through every set of characters in the character pool. for (String chars : wordCharPool) { char[] charPool = chars.toCharArray(); // Convert the string to an array of characters. int charIndex = MathUtil...
5ddfdb34-46c8-4c7b-b094-a2dc814270dc
0
public JLabel getjLabelTitre() { return jLabelTitre; }
1c310081-3d18-4806-85f1-dec51facc459
8
public Object [] getResult(Instances train, Instances test) throws Exception { if (m_clusterer == null) { throw new Exception("No clusterer has been specified"); } int addm = (m_additionalMeasures != null) ? m_additionalMeasures.length : 0; int overall_length = RESULT_SIZE+...
0b88d1a5-7c58-4d0e-92e7-62c949bf65e8
4
public void testConstructor_int_int() throws Throwable { MonthDay test = new MonthDay(6, 30); assertEquals(ISO_UTC, test.getChronology()); assertEquals(6, test.getMonthOfYear()); assertEquals(30, test.getDayOfMonth()); try { new MonthDay(Integer.MIN_VALUE, 6); ...
b93fff34-b3e9-46bd-a583-8c841adcdb94
5
@Override public int mkdir(String path, int mode) throws FuseException { try { fileSystem.createDirectory(path); UnixPermissions perms = new UnixPermissions(mode); if (options.isUnixOwnerImpersonateNewFiles()) { perms.setUid(Environment.getUserId()); perms.setGid(Environment.getGroupId()); } ...
4b7ec2f3-b3c7-4392-9608-010306dbdec8
8
@Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; MOB target=mob; if((auto)&&(givenTarget!=null)&&(givenTarget instanceof MOB)) target=(MOB)givenTarget; if(target.fetc...
0b3e56b1-30ba-432a-87a6-9b890aa401b4
1
public void update() { currentLevel.update(); if (currentLevel.levelchange) { Level oldlevel = currentLevel; currentLevel = levels.get(oldlevel.changeto); oldlevel.levelChanged(); } }