method_id
stringlengths
36
36
cyclomatic_complexity
int32
0
9
method_text
stringlengths
14
410k
dbe84c2f-30ab-424e-b815-db6bf66d0a70
7
public Binding getTypeOrPackage(char[] name, int mask) { Binding typeBinding = getBinding0(name, mask); // if (typeBinding != null && typeBinding != LookupEnvironment.TheNotFoundType) { // typeBinding = BinaryTypeBinding.resolveType(typeBinding, environment, false); // no raw conversion for now // if (typeBinding.is...
4c50b0f4-0fac-4dd7-b60d-ebcd18aacb82
1
private void mapChangesAndTheirStats() { overallMarketChange = (int) (100 * ((Database.SUM_MARKET_PRICE_DATA .lastEntry().getValue()[6]) - Database.SUM_MARKET_PRICE_DATA .ceilingEntry(15800f).getValue()[6]) / (Database.SUM_MARKET_PRICE_DATA .ceilingEntry(15800f).getValue()[6])); for (Entry<String, Tree...
84eab2e4-0fe8-4db0-9bd1-c8fa6591c151
1
@Override public void changedMostRecentDocumentTouched(DocumentRepositoryEvent e) { if (e.getDocument() == null) { setEnabled(false); } else { setEnabled(true); } }
09761f6a-c7e6-48d0-b39f-1cc9b7e3c4be
7
protected void addOwnUnits() { reportPanel.add(localizedLabel(StringTemplate.template("report.military.forces") .addStringTemplate("%nation%", player.getNationName())), "newline, span, split 2"); reportPanel.add(new JSeparator(JSeparator.HOR...
558a79f1-3ed8-45b5-a4e4-f01565623580
2
private clsPersona asignarValoresContacto(){ clsPersona p = new clsPersona(); p.setCodigo(Integer.parseInt(txtCodigo.getText())); p.setNombre(txtNombre.getText()); p.setTelefonoFijo(txtTelefonoFijo.getText()); p.setCelular(txtCelular.getText()); p.setEmail(txtEmail.getText()); ...
16dd8b39-a8b6-4a5e-8bbe-e00034e2159f
0
public String getCiudad() { return ciudad; }
1055afdc-cd1e-44da-8541-80a71932a0b1
5
public boolean compEntity(EntityType entity, Player play, String sAction, ArrayList<PaymentCache> aPayer) { HashMap<String, ArrayList<EntityType>> hType = _jobsdata.getEntHash(); if(hType.isEmpty()) return false; for (Map.Entry<String, ArrayList<EntityType>> e : hType.entrySet...
07c1bf36-50ed-4692-ae13-269f71ac16a2
8
private boolean determineCommand(String line) { try { if ((line == null) || (line.trim().equals(""))) { return false; } if (line.startsWith("[SPLINTER_IMPLANT]")) { this.myIMPLANT_ID = 2; try { this.myImplantName = Driver.ARR_IMPLANT_NAME[this.myIMPLANT_I...
123a6a4a-35bf-4f35-863b-27df54e7d83b
4
private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed // TODO add your handling code here: // get a file path from the user programmerThread.stop(); hidePanels(lastPane); JFileChooser fileChooser = new JFileChooser(); ...
ff37a254-e800-4fc6-bdf6-52f3948a8e68
9
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { Player player = null; if (sender instanceof Player) { player = (Player) sender; } if (args.length == 0) { if (player == null) { sender.sendMessage(ChatColor.RED+"This command can o...
4df51099-c93d-4997-89e5-ce8a9b662dc3
5
private boolean Invalid(char h){ /*update the record*/ boolean invalid=false; // System.out.println("This pkg type is: "+h); if((Character.getNumericValue(h)-1)<1 || (Character.getNumericValue(h)-1)>5){ invalid =true; }else{ statusCodeRecord[Character.getNumericValue(h)-1]++; if(h=='1' || h=='4' || h=...
fc65b3b9-c156-42c1-b1ff-21b5de5c2df1
6
public void paintComponent(Graphics g){ super.paintComponent(g); if(client.shouldQuit()) quit(); if(game.hasStarted() && !quit){ preview.setShouldPaint(false); if(game.shouldRepaint()) game.paint(background.createGraphics()); g.drawImage(background, 0, 0, getWidth(), height, null); new SwingDe...
3e7a317b-8338-469c-be20-4f3ef64a8cfa
6
private String[] getRelatedSetting(String tagName) { String[] vals = null; try { NodeList nodeList = m_root.getElementsByTagName( "Related" ); if ( nodeList == null ) { return null; } int len = nodeList.getLength(); vals = new String[len]; for ( int i = 0; i < len; i++ ) { Element child = ...
35170976-2b1a-4a3e-91c2-dc334a239803
0
public Marquee() { setDefaultCloseOperation(EXIT_ON_CLOSE); setPreferredSize(new Dimension(350, 200)); setSize(new Dimension(350, 200)); getContentPane().setBackground(Color.black); scroller = new MyScroller(); getContentPane().add(scroller); pack(); set...
72ebfd04-de4d-4dd9-a77f-e44adb5a1842
2
public void run() { while( true ) { System.out.println(TetrisTimer.abc); TetrisTimer.abc++; try { sleep(1000); } catch (InterruptedException e) { System.out.println(getName() + " interrupted."); } } }
6ecc1250-23c6-4f03-91eb-b09f1dd6f5ee
4
private OutputStream getCorrectOutputStream(int optionalPresizing) throws IOException { if (isCached) { // create the tmp file if not initiated. if (tempFile == null) { createTempFile(); } // create the new file stream if (fileOutputStr...
146d320b-7f4f-4c00-a281-59e1413c11a6
6
private static boolean method518(char c) { return c < 'a' || c > 'z' || c == 'v' || c == 'x' || c == 'j' || c == 'q' || c == 'z'; }
c2d8a0d9-eb5f-44ad-bdd7-7f0f5b1001d5
3
private void readRemaining(int flag, int bits) throws EncodingException, NotImplementedException { // For forwards compatibility, read in any other flagged objects to // preserve the integrity of the input stream... if ((flag >> bits) != 0) { for (int o = bits; o < 6; o++) { if (((flag >> o) & 1) != ...
4b1792f6-e43e-4cc9-8714-f4818d39d41b
0
public void startPower() { System.out.println("模板共性,开启电源"); }
b596d9c2-b2ef-4b78-bb8c-0df1043f1f4b
7
public static double sinh(double x) { boolean negate = false; if (x != x) { return x; } if (x > 20.0) { return exp(x)/2.0; } if (x < -20) { return -exp(-x)/2.0; } if (x == 0) { return x; } if (x < 0.0) { x ...
bf549530-51b3-4e4d-b50f-6f7e741cb28a
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...
2725c15f-ae94-424d-913f-c7bdf1ff9f34
5
@Test public void testPersistencyHandler() { PersistenceHandler ph = PersistenceHandler.getInstance(); ph.loadDb(); try { ph.write(new MusicPersisted("/home/andreluiz/a.mp3")); ph.write(new MusicPersisted("/home/andreluiz/b.mp3")); ph.write(new UserPersisted("andrelgsl@gmail.com", "1234", 24, ...
10d46e36-837a-43c1-9f29-4e1205e51ef6
5
@Override public boolean updateItem(Item item) { String itemID = item.getID(); String title = item.getTitle(); String publisher = item.getPublisher(); Calendar date = item.getDate(); Date sqlDate = new Date(date.getTimeInMillis()); Statement stmt = null; try { stmt = con.createStatement(); ...
5f795eee-0785-4591-9a71-190a2fd5ccf6
8
public void initialize(InputStream stream) { try { ais = AudioSystem.getAudioInputStream(stream); format = ais.getFormat(); if (format.getChannels() == 1) { if (format.getSampleSizeInBits() == 8) { chanelFormat = EnumChanelFormat.MONO_CHANE...
5e04f40f-0a96-40db-9c72-08da5d9e386e
8
public void startGame() { ResourceMapping gameMapping = new ResourceMapping(); for (Player player : freeColClient.getGame().getPlayers()) { addPlayerResources(player.getNationID(), gameMapping); } // Unknown nation is not in getPlayers() list. addPlayerResources(Natio...
91b021d3-b94d-44a8-97a1-667330ceb939
5
public CheckResultMessage checkTF07(int day) { int r1 = get(20, 2); int c1 = get(21, 2); int r2 = get(23, 2); int c2 = get(24, 2); if (checkVersion(file).equals("2003")) { try { in = new FileInputStream(file); hWorkbook = new HSSFWorkbook(in); if (0 != getValue(r1 + 6, c1 + day, 2).abs().compar...
ae175f6c-3181-4e8d-a073-1c1436f17d7d
1
protected String calcBPB_FilSysType() throws UnsupportedEncodingException { byte[] bTemp = new byte[8]; for (int i = 82;i < 90; i++) { bTemp[i-82] = imageBytes[i]; } BPB_FilSysType = new String(bTemp, "UTF-8"); System.out.println(BPB_FilSysType); return BPB_Fi...
c04131b1-f8cb-490e-a8d4-a482e45b421a
6
public boolean validarConexion (String n_url, String n_port, boolean seg_int, String n_usu, String n_cla){ boolean valida = false; if (! n_port.equals("")){ port = n_port; } else{ port = "1433"; } String urlConexion = jdbc+n_u...
fabfb35f-2215-4cdb-98f5-691bf11118c7
6
public void loadResults(){ FileInputStream fi = null; BufferedReader br = null; try { fi = new FileInputStream(new File(this.resultsDataFilePath)); br = new BufferedReader(new InputStreamReader(fi)); String line = br.readLine(); while(line != null)...
45c7f326-cc75-4b77-a05d-a5792888e156
8
public void selectGameTypeCheck(int select) { input.setText(inputStart); if (select >= gameTypeChecks.length) select = 0; for (int j = 0; j < gameTypeChecks.length; j++) gameTypeChecks[j].setSelected(select == j); if (select == 1) { this.selectDictChec...
005a6988-414f-46df-ba67-c3100afe3d68
2
public void testToStandardDuration_months() { Period test = Period.months(1); try { test.toStandardDuration(); fail(); } catch (UnsupportedOperationException ex) {} test = Period.months(-1); try { test.toStandardDuration(); ...
4f55ea94-be88-4f21-b8fc-ccab56769895
6
private boolean attCanWithdraw(Territory territory){ if(battle.defTerritory.getNeighbors().contains(territory)){ if(battle.defTerritory instanceof Water){ return (territory instanceof Water) && (territory.getFamily()==null || territory.getFamily()==oppFamily); }else{ return (territory instanceof Land) &...
1c352580-c0bc-4607-97ed-2d500ce10194
0
private void chooseWorldActionPerformed(java.awt.event.ActionEvent evt) throws Exception { World w = new World(); w.readInWorld(chooseWorld.getSelectedFile().getName()); worlds.add(w); }
b8e8f4b4-73f3-4952-acea-6bdf73f637a1
3
static public void addLocation(Location newLocation) { Charset charset = Charset.forName("UTF-8"); final File file = new File("VMlocations.ini"); if (!file.exists()) try { file.createNewFile(); } catch (IOException ex) { Logger.getLogger(LocationsManager.class.getN...
92ff6ab5-c55f-4c5d-99c1-c9451d4fb9d8
9
static void executeBatch(Batch batch) throws ProcessException { for (int i = 0; i < batch.cmdCmds.size(); i++) { List<String> command = new ArrayList<String>(); command.add(batch.cmdCmds.get(i).path); //Add the arguments for(String argi: batch.cmdCmds.get(i).cmdArgs) { command.add(argi); } ...
4e478ade-663a-4161-8822-b53fc11711e9
8
@Override public BuildResult call() throws Exception { // set the name of this thread to the package // name for debugging Thread.currentThread().setName(pkg.getName()); // write the POM to the base dir pkg.writePom(); BuildResult result = new BuildResult(); result.setPackage...
9080c373-7e27-4878-ae6c-49537b64f7c0
7
protected int recurse_multiple(MDDManager ddmanager, int[] nodes, int leafcount, MDDVariable bestVar) { if (bestVar.nbval == 2) { int lchild, rchild; int[] lnodes = new int[nodes.length], rnodes = new int[nodes.length]; for (int i=0 ; i<leafcount ; i++) { lnodes[i] = rnodes[i] = nodes[i]; } for (in...
8b5de6a2-0e72-49c5-aa13-7e2d19685dc7
4
@EventHandler public void onPlayerRespawn(PlayerRespawnEvent event) { Arena arena = this.gm.findArenaByPlayer(event.getPlayer()); if (arena == null) return; PlayerInfo p = arena.findPlayer(event.getPlayer()); if (p == null) return; event.setRespawnLocation((Location)arena.mainArea.Sp...
615470be-7821-4836-af94-a5cd2cbea83e
3
public AbstractResource getResourceByName(String resourceName) { for (ResConfig rc : this.configurations) for (AbstractResource res : rc.getResources()) if (res.getResourceName().equals(resourceName)) return res; return null; }
3b3e5f12-5158-4bc7-ad0d-0f14f5639c73
9
public void log4dstm2(Object version) { if (version == null) return; Field[] fields = version.getClass().getDeclaredFields(); for (int j = 0; j < fields.length; j++) { fields[j].setAccessible(true); System.out.print(fields[j].getName() + ","); if (fields[j].getType().getName() .equals(java.la...
b437a528-33c0-4857-b703-314533805e25
1
@Override public boolean onCommand(CommandSender arg0, Command arg1, String arg2, String[] arg3) { if (arg0.hasPermission("CreeperWarning.reload")) { plugin.getServer().getPluginManager().disablePlugin(plugin); plugin.getServer().getPluginManager().enablePlugin(plugin); arg0.sendMessage(plugin.NAME + "Reloa...
9da7e369-8228-4548-9749-85a3514448ee
0
private void showBasicDialogs(String message) { messageLabel.setText(message); instance.showDialog(); }
e58ee633-26e1-4fc2-89cf-49001a8cb500
4
public static int[][] rotateImage(int[][] image){ int n=image.length; /*The first step*/ for(int i=0;i<n;i++){ for(int j=0;j<n/2;j++){ image[i][j]=image[i][j]+image[i][n-j-1]; image[i][n-j-1]=image[i][j]-image[i][n-j-1]; image[i][j]=image[i][j]-image[i][n-j-1]; } } /*The second step*/ for(int...
67ebf6d9-473a-4cfe-8ef9-470489359d29
1
public void setColor(Vector4f color) { this.color = (color != null ? color : new Vector4f(1f,1f,1f,1f)); }
718819ca-fae0-4daa-9a73-7c0535231126
9
@Override public void run() { try{ while(true){ Thread.sleep(waitTime); int newScore = 0; if(MarketUtils.IsMarketOpen){ for(Stock stock : watched){ stock.update(); newScore = 0; for(Strategy strategy : strategyProfile){ newScore += strategy.evaluate(stock); } ...
ee02d361-a128-4be3-8357-6239131079bc
2
private void makeImgToBase64(HtmlPage page) throws FailingHttpStatusCodeException, MalformedURLException, IOException { @SuppressWarnings("unchecked") List<HtmlImage> imageList = (List<HtmlImage>) page.getByXPath("//img"); for (HtmlImage image : imageList) { InputStream ins = webClient.getPage("http://ec...
1e74c6a2-bd55-4882-ae0e-e4a95213ad20
4
private void placerPostes(Graphics2D g){ g.setStroke(new BasicStroke()) ; for(Poste poste : modele){ g.setColor(Color.gray) ; int xPoste = Parametres.posteX(poste.getPosition().getTravee(),poste.getOrientation()) ; int yPoste = Parametres.posteY(poste.getPosition().getRangee(),poste.getOrientation()) ...
30d4f86d-8b9a-4ec9-ab1b-84dfab049200
4
public static void main(String [] args){ try { System.out.println("reading wav file..."); //String dir = "C:/Users/Jeudy7/Desktop/Doc_ITC_teaching_250913/sphinx_4_project/reco/resource/tmp_file_dir/"; String dir = "./resource/tmp_file_dir/"; File directory = new File(dir); //ge...
34e30a9f-e0a8-404b-be04-13a74fa76e72
6
public JSONObject details(int id, boolean isUser, boolean isForum, boolean isThread) { JSONObject result = new JSONObject(); JSONObject response = null; ResultSet resultSet; try { PreparedStatement stmt = con.prepareStatement("SELECT message, date, likes, dislikes, points, i...
17eeb133-06b6-4fe0-8f84-485621755cd8
5
private static void displayAddInventory(BufferedReader reader, VideoStore videoStore) { try { System.out.println("Please enter the title of the video you would like to add inventory to:"); String isbn = getISBNFromTitle(reader, videoStore, reader.readLine()); System.out.print...
ec3f7893-6d9e-464d-a08e-6484d9c73bde
6
public void escribirCarpetas() throws ReporteJasperException { try { index=0; String separador = System.getProperty("file.separator"); for (int i = 0; i < this.lista.size(); i++) { ReporteJasperVO reporteJasperVO = (ReporteJasperVO) thi...
1376fc91-f0f9-4b3b-b445-8dbdcadfca27
4
public ReportGenerator(boolean advancedMode, File baseDir, final GenerationProgress gp) { super(); Logger.getLogger(ReportGenerator.class.getName()).entering(ReportGenerator.class.getName(), "ReportGenerator", new Object[] {advancedMode, baseDir, gp}); try { this.advancedMode = advan...
2f34d92f-66c6-482f-ab44-fa4fad1d507b
2
public Double getMaxPrize(String type) { Map<Integer, Reward> rewards = getRewards(type); Double max = 0.0; for(Map.Entry<Integer, Reward> entry : rewards.entrySet()) { Reward reward = entry.getValue(); Double money = reward.getMoney(); if(money > max) { max = money; } } return max; }
7ed07b0c-574e-49ac-a28c-6b4e076784df
5
private int getFrameForReplacement(){ int frameID = -1; for (int i=0; i<this.frames.length && frameID == -1; i++){ if( this.pinCount[i] == 0 ) frameID = i; } // System.out.println( "Replacement frame is " + frameID ); if( frameID != -1 && dirty[frameID] ){ writeBlock(frameID); } ...
3f37c432-88d6-44d3-92d2-fcb090516643
0
public int getId() { return id; }
8ca55119-1fb0-4f3c-b1be-3e5e119d495f
6
private void extractArguments(String[] args) { String testArgsString = Config.getString("AutoGrader.testArgs"); if (testArgsString == null) { testArgsString = ""; } for (int i=0; i<args.length; ) { String arg = args[i++]; if (arg.length() > 0 && arg.charAt(0) == '-') { if (arg.equals("-#")) { ...
0f9b898a-e54c-4841-96aa-18367b6de31c
1
@Override public String format(Date fromObject) { try{ return forFormatting.format(fromObject); } catch(Exception e){ } return null; }
ce7e0ff7-37c2-4bcb-a389-81cbbc064a7d
0
public String getApplicationName() { return this.applicationName; }
eb7dba02-7a8b-402c-abc8-6e43dc26f1ac
4
public boolean spaceHasOpponent(Position p, int opponentColor) { try { if (opponentColor == Board.white) { if (this.board[p.rank][p.file] > 0) { return true; } } else { if (this.board[p.rank][p.file] < 0) { return true; } } return false; } catch (Exception e) { return false;...
9fcba528-fa76-43d7-a2da-4bd3d01066c2
6
public static final void method544(int i, int j, int k, int l, GameObject gameObject, long l1, GameObject gameObject_1, GameObject gameObject_2) { Class46 class46 = new Class46(); class46.aGameObject_787 = gameObject; class46.anInt791 = j * 128 + 64; class46.anInt794 = k * 128 + 64; ...
6da664c9-d7b8-455a-af16-7186f24d6116
6
@Override public void run() { Map<String, Ban> bans = plugin.getController().getBans(); // empty ban list print info and stop if (bans.isEmpty()) { if (!silent) { String message = MessagesUtil.formatMessage("run_no_bans", null); log.log(Level.INFO...
347218e3-cad1-4447-bbb6-022afbe1f62c
2
private void finalizeCNFMap(HashMap <Production, Production> map) { for (Production p : myCNFMap.keySet()) { ArrayList <Production> temp=new ArrayList <Production>(); for (Production pp : myCNFMap.get(p)) { temp.add(map.get(pp)); } myCNFMap.put(p, temp); } }
baa6061c-e643-4c06-97c6-127e574af93c
5
@Override public String getColumnName(int columnIndex) { if (columnIndex == DELIVERY_PACKET_ID) { return "№"; } else if (columnIndex == MEMBER_NAME) { return "Кому выдано"; } else if (columnIndex == EVENT) { return "Мероприятие"; } else if (columnI...
2ff84528-5037-431a-b829-3c49be88c26e
7
public static <T> void ForEach(Iterable<T> parameters, final LoopBody<T> loopBody) { ExecutorService executor = Executors.newFixedThreadPool(iCPU); List<Future<?>> futures = new LinkedList<>(); for (final T param : parameters) { Future<?> future = executor.submit(new Runnable() { ...
1047249b-e2cc-4029-93ca-a2384bed7803
4
public MarginKernelPerceptron(String kernelType) { if (kernelType.equals("perceptron_linear_kernel")) { kernel = new LinearKernel(); } else if (kernelType.equals("perceptron_polynomial_kernel")) { int polynomial_kernel_exponent = 2; if (CommandLineUtilities.hasArg("polynomial_kernel_exponent")) { pol...
e2961298-734a-4ece-8a12-195cf0a4b7c0
2
public void updateSubTypes() { if (parent != null && (GlobalOptions.debuggingFlags & GlobalOptions.DEBUG_TYPES) != 0) GlobalOptions.err.println("local type changed in: " + parent); local.setType(type); }
60ddfe8a-26bf-4410-8ec2-fb25488ef7db
4
public void setForceImageLocation(String forceName) { switch (forceName) { case "曹操": forceImageLocation = "/resources/caocaoForceColour.png"; break; case "刘备": forceImageLocation = "/resources/liubeiForceColour.png"; break; ...
a7c900db-c8c6-4642-8f3a-14d4f6a7435c
9
@Override public void onMessage(String strmsg) { //System.out.println(strmsg); // pos updates try { JSONObject jsmsg = new JSONObject(strmsg); JSONObject data = jsmsg.getJSONObject("Data"); switch(jsmsg.getInt("Type")) { case 1: //disconnection String discoUserName = data.getString("n"); thi...
6f4ddda0-fe3b-43d5-bf68-ba48eea3620a
1
private void setChunk() { for (int x = 0; x < chunks.length; x++) { chunks[x] = new Chunk(3); } }
0bbfcd1e-4d5f-4899-a336-47c1ac4fb161
7
public Direction hitObj(GameObj other) { if (this.willIntersect(other)) { double dx = other.pos_x + other.width /2 - (pos_x + width /2); double dy = other.pos_y + other.height/2 - (pos_y + height/2); double theta = Math.atan2(dy, dx); double diagTheta = Math.atan2(height, width); if ( -diagTheta <= ...
15d81c33-b4a7-404c-98d7-94876aa2dc0a
0
public Date getHireDay() { return hireDay; }
8cd65ad0-d6c2-46b2-ad45-9712813e93ea
5
@Override public double drawString(String str, SpriteSheet font, double x, double y, double scale, Color color, double wrapX) { double aspect = font.getSpriteAspect(); double maxLength = (wrapX - x) / (scale * aspect); if (wrapX <= x || wrapX <= -1 || str.length() < maxLength) { drawStringLine(str, font, x...
cdc0f5c4-8f2f-4e54-a84a-796637e9a3f7
5
public NameGenerator(){ Scanner scanner; random = new Random(); try{ scanner = new Scanner(this.getClass().getResourceAsStream("/res/vowels.txt")); }catch(Exception e){ e.printStackTrace(); return; } if(!scanner.nextLine().equals("vowels:")){ System.out.println("wrong file!"); return; ...
a1cabea6-4db4-42cd-b15f-95a977f348ed
8
private void handleKeyboardInput() { while(Keyboard.next()) { if (Keyboard.getEventKeyState()) { if(Keyboard.getEventKey() == Keyboard.KEY_ESCAPE) { System.exit(0); } if(Keyboard.getEventKey() == Keyboard.KEY_RETURN) { mouseActive = !mouseActive; } } } moveDir.set(0.0f,0.0f,0.0f...
43c5bdd0-0330-42bb-9b9d-57a6dc2e7ec1
9
private final void method2525(int[] is, Node_Sub10 node_sub10, int i, int i_7_, int i_8_, int i_9_) { if (i_9_ != 12073) { DECODE_MASKS_PLAYERS_COUNT = 44; } if ((0x4 & aNode_Sub9_Sub1_9734.anIntArray9680[node_sub10.anInt7080] ^ 0xffffffff) != -1 && node_sub10.anInt7100 < 0) { int i_10_ = aNode_Sub9_Sub1_97...
ba1af29e-ea0d-405d-87a9-1327a9151b96
7
private boolean isDragOk( final java.io.PrintStream out, final java.awt.dnd.DropTargetDragEvent evt ) { boolean ok = false; // Get data flavors being dragged java.awt.datatransfer.DataFlavor[] flavors = evt.getCurrentDataFlavors(); // See if any of the flavors are a file ...
06dd9fd5-1fab-4132-b0e1-7480e5e9d08e
2
@Override public void close() { if (this.connection != null) try { this.connection.close(); } catch (SQLException ex) { this.writeError("Error on Connection close: " + ex, true); } }
892f8486-3f43-45b0-acd9-9521c321b438
9
public void storePerson(Person person) throws NameClashException, UpdatingNonexistantPersonException { Person foundDbPerson = null; int personId = person.getId(); if (personId != -1) { foundDbPerson = findPersonWithId(personId); if (foundDbPerson == null) { ...
b73fc401-6332-40d7-8189-419bd843ff8c
3
public static String askPath(String msg) { String res = null; while (res == null || !Draft.isPath(res) ) { res = ask(msg); if ( !Draft.isPath(res) ) System.out.println("\n!!! No such file !!!"); } return res; }
2df821d9-af1d-46b1-8139-b660a034856e
6
public static int calculeHyperperiode(List<Tache> taches) { int nb = 0; List<Integer> Pi = new ArrayList<Integer>(); for(Tache tache : taches) { if (tache instanceof TachePeriodique) { Pi.add(((TachePeriodique) tache).getPi()); nb++; } } Integer[] periodes = new Integer[nb]; Pi.toArray(peri...
b583232c-c017-4968-9088-14055cb4da3e
2
private int insert0(int pos, byte[] code, boolean exclusive) throws BadBytecode { int len = code.length; if (len <= 0) return pos; // currentPos will change. pos = insertGapAt(pos, len, exclusive).position; int p = pos; for (int j = 0; j < len; +...
9d8e5fe7-4c13-4a21-b8fe-dfdd9761cff2
3
public static void main(String args[]) { String url = "jdbc:oracle:thin:@192.168.1.105:1521:timran11g"; // HOST:192.168.1.105;PORT:1521;SID_NAME:timran11g String strSql = "SELECT * FROM t1"; // 将sql中将;去掉 String strSql1 = "SELECT * FROM MYTEST"; String createTable1 = "Create table MYTEST (ID INT,NAME V...
af5a2a4c-4997-4c91-b0e3-f477ff959a76
6
static public int get(int itemLevel) { /*if (itemLevel < 1) { throw new IllegalArgumentException("Invalid Item Level: " + itemLevel); } else*/if (itemLevel < 18) { return 0; } else if (itemLevel < 30) { return 1; } else if (itemLevel < 42) { ...
2f307c5b-695a-4f16-901a-4fcb8932e7d7
0
public BinaryDataType createBinaryDataType() { return new BinaryDataType(); }
1ec77c8e-f200-435f-9479-6c66c1ecfe5e
6
public void handle(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException { //System.out.println(request.getHeader("data")); //System.out.println(System.currentTimeMillis()); baseRequest.setHandled(true); ...
764eb74d-8a97-44e6-81da-3ee1d9b426a9
8
TimeMarker[] getTimeMarkers( long start, long stop ) { start *= 1000; // Discard milliseconds stop *= 1000; Calendar cMaj = Calendar.getInstance(); Calendar cMin = Calendar.getInstance(); // Set the start calculation point for the grids setStartPoint(cMaj, majGridTimeUnit, start); setStartPoi...
d8f555b6-f655-4e69-b2b3-1a27e35713b7
3
@Override public void actionPerformed(ActionEvent arg0) { Iterator<JRadioButton> it = buttonlist.iterator(); while ( it.hasNext() ) { JRadioButton thisButton = it.next(); if ( thisButton.isSelected() ) { if ( callbackHandler != null ) { callbackHandler.selectInterface(thisButton.getText());...
515310c4-343b-49ff-aec6-46a892c1724c
3
public void setParent(View parent) { super.setParent(parent); fContainer = parent!=null ?getContainer() :null; if( parent==null && fComponent!=null ) { fComponent.getParent().remove(fComponent); fComponent = null; } }
096a1cf0-a0c1-45a4-aff9-331036264297
1
public void visit_lreturn(final Instruction inst) { stackHeight -= 2; if (stackHeight < minStackHeight) { minStackHeight = stackHeight; } }
080b41b0-8ec8-40b7-a346-6770b67661bc
3
private boolean guardarFichero (String salida) { boolean guardado = false; JFileChooser chooser = new JFileChooser(); int retrival = chooser.showSaveDialog(MainVentana.this); if (retrival == JFileChooser.APPROVE_OPTION) { try (FileWriter fw = new F...
b4fb169a-e278-40c2-9b1d-d3fb8cb2d80a
8
protected void checkMovement() { if(figUp && !figDown) figY -= speed; if(figDown && !figUp) figY += speed; if(figRight && !figLeft) figX += speed; if(figLeft && !figRight) figX -= speed; l.setFigureCoordinates(figX, figY); g.setFigureCoordinates(figX, figY); }
4785f346-dd4e-4e4f-ab41-4f464464e8fa
0
public void setCoordinates(List<T> coordinates) { this.coordinates = coordinates; }
9dc2f4df-bf5b-42b7-811a-2a8210c6c389
5
public void start(BundleContext context) throws Exception { super.start(context); IWorkspace workspace = ResourcesPlugin.getWorkspace(); IResourceChangeListener listener = new IResourceChangeListener() { @Override public void resourceChanged(IResourceChangeEvent event) { // blocking do...
630a4057-a5a4-4a97-8fa4-c39a322b2d9f
4
@Override public List<Integer> sort(List<Integer> list) { // checking input parameter for null if (list == null) { throw new IllegalArgumentException("ArrayList not specified!"); } // building heap for (int child = 1; child < list.size(); child++) { ...
a0440416-6f4e-4463-a400-4100797610ae
0
public Lid getLid() { return lid; }
5c6b7109-5880-4f81-8195-bfdf2c2a6803
5
public void startNewGame() { // Create Deck createTime = new Date(); int count = 0; for (ItalianDeckSuit suit : ItalianDeckCard.ItalianDeckSuit.values()) { for (ItalianDeckRank rank : ItalianDeckCard.ItalianDeckRank .values()) { deck[count++] = new ItalianDeckCard(suit, rank); } } // Shuffle...
4f47f853-2744-4177-8120-390126606a33
8
int[] ContaTudo() { FileWriter wr; PrintWriter pw; wr = null; pw = null; try{ wr = new FileWriter("resultado.csv", true); pw = new PrintWriter(wr, true); } catch(Exception e) { } if(!h) { pw.printf("Tempo, Presa, Predador, Reciclador, Defunto, Vazio\n"); h = true; tmp = 0; } ...
bb74104b-cae1-4e10-9ab1-8063d3c1525e
7
private IFn findAndCacheBestMethod(Object dispatchVal) throws Exception{ Map.Entry bestEntry = null; for(Object o : getMethodTable()) { Map.Entry e = (Map.Entry) o; if(isA(dispatchVal, e.getKey())) { if(bestEntry == null || dominates(e.getKey(), bestEntry.getKey())) bestEntry = e; if(!dominates(bes...
c917076d-c980-452c-a9a1-593fe575ca09
7
public void update() throws MaltChainedException { final AddressValue a = addressFunction.getAddressValue(); if (a.getAddress() == null) { if (getSymbolTable() != null) { featureValue.setIndexCode(getSymbolTable().getNullValueCode(NullValueId.NO_NODE)); featureValue.setSymbol(getSymbolTable().getNull...
2f42393e-3f1a-42ce-98ef-a487cb73eb7d
0
public SimpleStringProperty countryProperty() { return country; }