method_id
stringlengths
36
36
cyclomatic_complexity
int32
0
9
method_text
stringlengths
14
410k
7b09313f-59be-47a1-919a-71321d0afe6e
0
protected Icon getIcon() { java.net.URL url = getClass().getResource("/ICON/undo2.jpg"); return new javax.swing.ImageIcon(url); }
a7b8eba0-4f85-49db-b79d-9b0528da41b1
5
public static String convertStringToHexComma(String plain, boolean appendNullSigns) { if(plain == null || plain.trim().length() == 0) return plain; StringBuffer strBuf = new StringBuffer(); for(int x = 0; x != plain.length(); x++) { if(x > 0) strBuf.append(","); strBuf.append...
c6c9c5e5-812f-4e54-aab3-54106e2e896a
8
public String toString(){ StringBuffer sb = new StringBuffer(); switch(type){ case TYPE_VALUE: sb.append("VALUE(").append(value).append(")"); break; case TYPE_LEFT_BRACE: sb.append("LEFT BRACE({)"); break; case TYPE_RIGHT_BRACE: sb.append("RIGHT BRACE(})"); break; case TYPE_LEFT_SQUARE: ...
4f62c6d2-afa2-4f66-b92c-7fb2390d2ff7
9
@Override public int read() throws IOException { // Read buffer empty: read and decode a new base64-encoded 4-byte group if(bytesLeft==0) { int read; int nbRead = 0; while(nbRead<4) { read = in.read(); // EOF reached ...
6f977b25-616f-4f60-b404-6c6a7ef95b44
4
boolean matchesLetter() { if (isEmpty()) return false; char c = input[pos]; return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); }
a5277a44-86ec-47aa-9fd1-593c008f65dc
6
public void disablePlugin(CommandSender sender, String[] args) { if (args.length == 1) { sender.sendMessage(pre + red + specifyPlugin); return; } if ("all".equalsIgnoreCase(args[1]) || "*".equalsIgnoreCase(args[1])) { for (Plugin pl : Bukkit.getPluginManager...
c4de796f-2870-467d-86d8-11a6e26b0045
5
public JSONObject increment(String key) throws JSONException { Object value = this.opt(key); if (value == null) { this.put(key, 1); } else if (value instanceof Integer) { this.put(key, (Integer) value + 1); } else if (value instanceof Long) { this.put(...
2a8fe53b-a4ee-428c-86d5-20e58652c82d
2
public String toString(){ String out=""; out+="name = "+name+"\n"; out+="host = "+host+"\n"; out+="minAbsolute = "; if(minAbsolute==null){ } else{ out+=minAbsolute; } out+="\n"; out+="maxAbsolute = "; if(maxAbsolute==null){ } else{ out+=maxAbsolute; } out+="\n"; out+="minRelativeToNowIn...
98c088ad-5ee7-41e6-814e-ca0617aadb10
4
@Override public void putAll(Grid<? extends V> grid) { if (grid == null) { throw new IllegalArgumentException("Grid must nor be null"); } for (Cell<? extends V> cell : grid.cells()) { put(cell.getRow(), cell.getColumn(), cell.getValue()); } }
f8199c91-5084-4b0d-83cb-1f03b7fd7aba
7
@Test public void testSendDataToServer() { System.out.println("sendDataToServer"); try { Server s = ServerImpl.initNewServer(5251); Client c = ClientImpl.initNewClient(5253); try { c.sendDataToServer(null); fail("Should have failed...
815f0421-2dd5-4c41-974c-3bbe6b287f7c
5
protected void exportDone(JComponent c, Transferable data, int action) { //Only do this if cutting, not copying if (action != MOVE) { return; } //Make sure there is a valid selection if ((p0 != null) && (p1 != null) && (p0.getOffset() != p1.getOffset())) { ...
da398e5e-e29d-491d-b7f7-2955014d8c9d
0
public static void main(String[] args) throws Exception { InetAddress address = InetAddress.getLocalHost(); System.out.println(address); address = InetAddress.getByName("www.baidu.com"); System.out.println(address); }
212528f7-84ac-4c93-b5dc-4ceb5d8973b5
9
@Override public boolean MoveLeft() { undodata.addLast(dataClone()); undoscore.addLast(scoreClone()); initFlag(); win = false; noMoreMoves = false; boolean flag = true; int count = 0; while (flag == true) { flag = false; for(int i=0; i<N; i++) { for(int j=1; j<N; j++) { if (data...
a883ef1b-b251-4416-bff5-75f5731a5e4f
4
public void registerCommands(final Set<Command> commands) { for (final Command c : commands) { if (c.getCommandText().equals("help")) { helpCommands.put(null, (HelpCommand) c); if (c.getCommandText().startsWith("help ")) helpCommands.put(c.getCommandText().replaceFirst("help ", ""), (HelpCommand) c); ...
2f8ec895-479b-4a00-aa5d-94f5c29522c7
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 "...
58fd4903-e51d-42f9-a008-e641cc9e1b3d
7
@Override public final boolean perform(AbstractComponent performer) throws IllegalAccessException { if (!isPerformable()) { throw new IllegalAccessException("Can't perform an abstract action"); } if (isCompleted()) { // stop performing if completed return true; } if (!initialized) { if (!preAc...
b1ea2225-27c7-40fc-b178-22b66f508253
2
@Override public int hashCode() { int hash = 3; hash = 89 * hash + (this.name != null ? this.name.hashCode() : 0); hash = 89 * hash + (this.password != null ? this.password.hashCode() : 0); hash = 89 * hash + Arrays.deepHashCode(this.groups); return hash; }
b5a29994-cfc2-4057-bcec-01b84c744085
5
@Override public String remove(Object keyObject) { String key = (String) keyObject; Map.Entry<String,String> toRemove = null; for (Map.Entry<String, String> e : entries) { if (key == null) { if (e.getKey() == null) { toRemove = e; break; } } else if (key.equalsIgnoreCase(e.ge...
a33a7fcb-cfe5-4b59-ac53-14e6b8d82437
6
public static OS getPlatform() { String osName = System.getProperty("os.name").toLowerCase(); if (osName.contains("win")) { return OS.windows; } if (osName.contains("mac")) { return OS.macos; } if (osName.contains("solaris")) { return O...
37346275-a324-4c18-af35-43169d01890e
1
public WallGridFactory(Grid grid) { if (grid == null) throw new IllegalArgumentException("Grid can't be null!"); this.grid = grid; }
3385c0cb-c30b-440d-8280-8e81aec6e4ba
1
@Override public void insertFilter(int index, PropertyFilter filter) throws IndexOutOfBoundsException { if (filter != null) { filters.add(index, filter); } else { throw new IllegalArgumentException("Provided PropertyFilter was null."); } }
daf875b4-8b41-4b58-bfe5-381230ff792c
0
public void addEdge(Vertex start, Vertex end) { adjacencyList.get(indexOf(start)).insertLast(end); }
0d7460cd-1014-48d2-afa4-ffcc78bbe508
6
@EventHandler public void WolfWeakness(EntityDamageByEntityEvent event) { Entity e = event.getEntity(); Entity damager = event.getDamager(); String world = e.getWorld().getName(); boolean dodged = false; Random random = new Random(); double randomChance = plugin.getWolfConfig().getDouble("Wolf.Weakness.Dod...
1c26fd43-4167-46b3-9936-f60c72052251
7
@Override public Success<Expression> parse(String s, int p) { StringBuilder sb = new StringBuilder(); // Read in digits until there are none left. while (Character.isDigit(s.charAt(p))) sb.append(s.charAt(p++)); // If we didn't find any digits, this ain't an int. ...
02adfa3e-c4d0-4d33-932c-e27020a1cf34
3
public int willRLookback( int optInTimePeriod ) { if( (int)optInTimePeriod == ( Integer.MIN_VALUE ) ) optInTimePeriod = 14; else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) return -1; return (optInTimePeriod-1); }
d4eb758e-66d4-42d6-a273-47bc201d6fac
0
public void setQuantity(Integer quantity) { this.quantity = quantity; }
56bdf472-480e-427e-b404-29b588c161b3
2
public List<Interval> getIntervals() { List<Interval> result=new ArrayList<>(); if(treeSet.isEmpty()){ return result; } Node worker=treeSet.first(); while (worker!=null){ Interval interval=new Interval(worker.value,worker.seqNex...
10719bb6-3aff-4056-bdc6-400473f9d755
4
private void initialize() { frame = new JFrame(); frame.setBounds(100, 100, 423, 144); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(null); textField_Integer = new JTextField(); textField_Integer.setBounds(110, 41, 99, 21); frame.getContentPane().add(textField_I...
281ca22d-4444-402d-a041-0382e8b9e4d6
1
@Override public void clear() { for (int i = 0; i < size; i++) { data[i] = null; } size = 0; }
106007b4-9220-4513-8a6c-41e8276e62a9
1
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed imgIndicator--; jButton2.setEnabled(true); jButton4.setEnabled(true); if (imgIndicator == 0) { jButton1.setEnabled(false); jButton3.setEnabled(false); ...
46c9095d-7f84-4998-a87c-99e27621bf70
3
public void saveConfig() { File folder = getDataFolder(); if (!folder.exists()) { folder.mkdir(); } File config = new File(folder, "config.cfg"); if (!config.exists()) { try { config.createNewFile(); Console.log("Created config.cfg!"); FileWriter fw = new FileWriter(config); BufferedW...
76ff3fc2-fe5b-4ef5-b85c-b951f9a56afc
2
public Ranking(boolean needsAnswer){ items = new HashMap<Integer, String>(); hasAnswer = needsAnswer; prompt = InputHandler.getString("Enter the prompt for your Multiple Choice question:"); int numChoices = InputHandler.getInt("Enter the number of items: "); for (int i=1; i<=numChoices; i++){ String item =...
6c1df74d-2910-4625-bd7a-adb8fd236a92
6
public void dispose() { if (tabs != null) { for (int i = 0; i < tabs.length; i++) { GraphicsTab tab = tabs[i]; tab.dispose(); } } tabs = null; if (resources != null) { for (int i = 0; i < resources.size(); i++) { if (resources.get(i) instanceof Resource) { resources.get(i).dispose(); } } } ...
23e2dc18-e1c6-480d-9dca-582d6846b385
8
private static void sort(Node[] src, Node[] dest, int low, int high) { int length = high - low; if (length < 7) { for (int i = low + 1; i < high; i++) for (int j = i, k = i - 1; j > low && (dest[k].weight > dest[j].weight); --j, --k) { Node t = dest[j]; dest[j] = dest[k]; ...
a2cdd2f8-1025-4a76-9361-350b4a08fb40
7
protected String getDataType() { int offset = getOffsetInDataHeaderForDataName(); int maxLength = getDataNameMaxLength(); int nameLength = 0; // skip first 0 while ( (0 != dataHeader[offset + nameLength]) && (nameLength < maxLength) ) nameLength++; ...
b2b60960-7aa6-43c8-8278-02b49cf86997
8
public boolean simpleAddBlock(Polyominos p) { int hauteur=p.getHauteur(); int largeur= p.getLargeur(); // boucle de parcour du tableau for (int ligne = 0; ligne <= taille; ligne++) { for (int col = 0; col <= taille; col++) { // si il y a de la place pour pose en largeur et en hauteur if (((ligne + ...
5b6b67d0-bad7-49d2-848c-53129958accb
6
@Override public void actionPerformed(ActionEvent e) { Color color = display.getBackground(); int red = color.getRed(); int green = color.getGreen(); int blue = color.getBlue(); if (e.getActionCommand().equals("red")) { if (red == 0) { red = 255; } else { red = 0; } } if (e.getActionC...
7956d8cb-746f-481f-aa02-81b390483769
4
@Override protected void printScriptContents() { int nrOfClusters = clusters.size(); for (int i = 0; i < nrOfClusters; i++) { String rgbColourSpec = getRgbColourSpec(i); List<Integer> timeSeriesIndexes = clusters.get(i).getTimeSeriesIndexes(); int nrOfElementsInCluster = timeSeriesIndexes.size(); ...
af95dc2d-9572-4319-9136-7b7b90a43893
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...
75dff927-0b99-41e6-80c5-1661ed691f49
8
public boolean isOuter() { if (classType instanceof ClassInterfacesType) { ClassInfo clazz = ((ClassInterfacesType) classType).getClassInfo(); ClassAnalyzer ana = methodAnalyzer.getClassAnalyzer(); while (true) { if (clazz == ana.getClazz()) return true; if (ana.getParent() == null) break; ...
9dcfd728-ff7e-4c8b-b286-547d2429e25b
9
@Override protected ArrayList<PossibleTile> getLazyTiles(Board b) { King clone = this.clone(); clone.canCastle = false; ArrayList<PossibleTile> possibleTiles = new ArrayList<PossibleTile>(); ArrayList<PossibleTile> superLazyTile = new ArrayList<PossibleTile>(); superLazyTile.add(new PossibleTile(clone.getX()...
b50da52f-00e0-456c-8148-eff82ec11bff
9
@Transactional @Override public String delete(Long objectId, Class clazz) { SimpleEntity object = (SimpleEntity) sessionFactory.getCurrentSession().get(clazz, objectId); //usuwam powiązania dla produktów, które odnoszą się do usuwanego typu if(clazz.equals(Type.class) && ((Type...
3aeacda6-f2c8-434d-9010-64dc503dbbeb
7
@Test public void testJoin() { Runnable r1 = new Runnable(){ @Override public void run() { assertTrue(!r1Completed && !r2Completed); try { Thread.sleep(3000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } r...
6723a343-f591-4c81-879a-08f31f17d69f
9
public void createGameTab() { JPanel drawimagepanel; JLabel downfacelabel; JPanel drawbuttonslabel; JLabel laydownlabel; JPanel discardbuttonlabel; Icon upfaceicon; gametab = new JPanel(); gametab.setPreferredSize(new Dimension(1100,800)); gametab.setLayout(new GridLayout(5,1)); drawimagepane...
445742f5-2047-4120-ae06-bad24764c6f5
8
private int calculateTeachersLectureWindowForIIIAndIV() { int penaltyPoints = 0; List<LinkedHashMap> teachersAllDay = getAllDaysTeacherTimeTable(); for (LinkedHashMap<String, LinkedHashMap> daysTimeTable : teachersAllDay) { Collection<String> teacherNames = daysTimeTable.keySet(); ...
9b08d0ea-db64-48b0-b212-35f70db7fce6
0
public String getSourceType() { return SOURCE_TYPE; }
ee38b9ef-ee8f-4c5d-84ad-293fe1481d35
6
public boolean equals(Object other) { try { if(other == null) return false; if(!(other instanceof KundeDTO)) return false; KundeDTO o = (KundeDTO)other; if (o.getNr() != this.getNr()) return false; ...
126ea31a-4eb4-46cc-8258-0551ec8909cf
6
@EventHandler public void SpiderSlow(EntityDamageByEntityEvent event) { Entity e = event.getEntity(); Entity damager = event.getDamager(); String world = e.getWorld().getName(); boolean dodged = false; Random random = new Random(); double randomChance = plugin.getSpiderConfig().getDouble("Spider.Slow.Dodge...
710f7b76-078b-48c6-b848-1cea2bfc4684
8
public synchronized void bestowCurses(MOB mob) { norecurse=true; try { if(numCurses()>0) { mob.location().show(this,mob,CMMsg.MSG_OK_VISUAL,L("You feel the wrath of <S-NAME> in <T-NAME>.")); if(mob.charStats().getCurrentClass().baseClass().equals("Cleric") ||(CMSecurity.isASysOp(mob))) { ...
7c985355-4c7d-4c9b-88ad-5ac62fe02dad
6
public void parseFromJsonFile(File json) { try { String s = readFile(json); if(s.trim().length()!=0) { JSONObject jsonO = new JSONObject(s); if(jsonO.has("title")) { name = jsonO.getString("title"); } if(...
cfebc747-b03a-4225-a5ae-23ba79588f49
3
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ZState other = (ZState) obj; if (!Objects.equals(this.id, other.id)) { return false; ...
8056a105-eeef-47ac-a502-d9f413ebe8d7
7
public void parseParams(String[] args) { if (args == null || args.length == 0) return; for (String s : args) { // split on "=" int splitIndex = s.indexOf('='); if (splitIndex < 0) throw new IllegalArgumentException( "Parameter '" + s + "' is ill-formed. It should be of the fo...
e2f4b645-d2de-49b5-b272-7a900a69e9e3
1
@Override public void display(String[] playersName) { JButton confirmButton = createButton(250, 400, "Confirm"); addListeners(confirmButton); panel.add(confirmButton); createVoteList(180, 30); panel.add(voteList); int x = 80, y = 70; for (String player : playe...
23fdc709-cccc-4623-8539-bdc2f070847f
7
public Boolean balance(privAVLNode x) { if(checkBalance(x) == true) return true; int test0 = 0; int test1 = 0; if(x.getChild(0) != null) test0 = x.getChild(0).getHeight() + 1; if(x.getChild(1) != null) test1 = x.getChild(1).getHeight() + 1; int hld1; if(test0 > test1) hld1 = 0...
0c93ea26-e896-43c7-9af0-8d2b4a80da81
7
@Override public Object getValueAt(int r, int c) { TableElement te = _data.get( _filter.get(r) ); switch(c) { case 0: return te.getUniqueID(); case 1: return te.getCoords()[0]; case 2: return te.getCoords()[1]; case 3: return te.getPlateInfo()[0]; case 4: return te.getPlateInfo()[1]; case 5: retu...
41b74c79-1515-4f07-89e1-d611f95aa388
7
public int divide(int dividend, int divisor) { boolean positive = true; if((dividend>0&&divisor<0)||(dividend<0&&divisor>0)) positive = false; long did,dis; did = dividend>=0?(long)dividend:-(long)dividend; dis = divisor>=0?(long)divisor:-(long)divisor; int re...
57dbb761-6638-4989-827d-6965f780e2cc
6
public static void main(String[] args) throws UnknownHostException, InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException, IllegalArgumentException, InvocationTargetException{ List<TaoItem> tiList = new ArrayList<TaoItem>(); Mongo mongo = new Mongo(); for(String dbName : mo...
c0810087-fcbc-4c31-a4fe-447d9b14b8a9
8
protected String escapeString(final String csvElement) { if( csvElement.isEmpty() ) { return ""; } currentColumn.delete(0, currentColumn.length()); // reusing builder object final int delimiter = preference.getDelimiterChar(); final char quote = (char) preference.getQuoteChar(); final char space = ...
c9934d03-3844-4f25-a5fb-998a7f8441f6
1
void send(ConduitMessage msg) { try { msg.send(mClientOutput); } catch (Exception exception) { shutdown(); } }
427ee3a0-2e2f-4eb7-8634-4b0386c74e0c
1
protected Duration restReduced() { Duration gap = lastWeekRest(); if (gap.isShorterThan(Rest.NORMAL.getValue())) { return null; } return Utils.safeMinus(Rest.REDUCED.getValue(), intervals.lastGap()); }
b9d56b96-c809-4fd5-9f55-4b5110f4c9d4
0
protected TableModel createModel(Transition transition) { final MooreTransition t = (MooreTransition) transition; return new AbstractTableModel() { String s[] = new String[] {t.getLabel()}; public Object getValueAt(int r, int c) {return s[c];} ...
44240659-76ac-43dc-a813-6a0f39378152
3
public Region get(int x,int z){ int i = 0; while(i < regions.size()){ if(regions.get(i).getX()==x&&regions.get(i).getZ()==z)return regions.get(i); i++; } return null; }
11b3ad4e-cd90-4c5e-8df0-313d56038d70
8
@Override public boolean execute(MOB mob, List<String> commands, int metaFlags) throws java.io.IOException { String parm = (commands.size() > 1) ? CMParms.combine(commands,1) : ""; if((!mob.isAttributeSet(MOB.Attrib.AUTOGOLD) && (parm.length()==0))||(parm.equalsIgnoreCase("ON"))) { mob.setAttribute(MOB.At...
d9aaa53b-5659-4c97-930c-55e6cde50ba9
8
public int candy(int[] ratings) { int n = ratings.length; if(n==0) return 0; if(n==1) return 1; int[] candys = new int[n]; if(ratings[0]<=ratings[1]) candys[0] = 1; if(ratings[n-1]<=ratings[n-2]) candys[n-1] = 1; for(int i=1; i<n;i++){ ...
fe07121f-8585-4ed6-8b49-a10f5ac743b4
7
private boolean bruteForceSolver(int index) { boolean solvable = false; NakedCandidates candidate = nakeds.get(index); for (int i=0; i < candidate.values.size() && !solvable; i++) { if (!board.duplicateEntryColumn(candidate.y, candidate.values.get(i)) && !board.duplicateEntryRow(candidate.x, candi...
9df9650d-2bfc-4916-b438-caecb258c651
1
public String getEntitySystemId(String ename) { Object entity[] = (Object[]) entityInfo.get(ename); if (entity == null) { return null; } else { return (String) entity[2]; } }
2e98d75f-1c22-4a82-a00d-b279d425d198
7
private static void moveChars(int len){ String str = "abcdefg"; char[] sa = str.toCharArray(); char s; if(len > 0){ //拆为两部分,分别反转,然后再整体反转,表现为左移 for (int i = 0; i < len >> 1; i++ ) { s = sa[i]; sa[i] = sa[len -i - 1]; ...
781ef9f2-c216-425c-a3a2-977914cdfdbc
2
public void run(){ try { while(true){ rcv(); } } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } }
45a0219e-9a8f-40af-9fd1-ed10884e2bd7
0
public MouseHandler()//Check again later { cX = Game.fieldWidth + Game.xOff; cY = Game.fieldWidth + Game.yOff; }
f6164590-5d0b-462d-8924-dc8a9a43d465
4
public void getChunkByOff(long off) { //TODO int[] rpos = new int[vsize.length]; long toff = off; for (int i = vsize.length -1 ; i >=0 ; i--) { rpos[i] =(int)toff % vsize[i]; toff /= vsize[i]; } int cnum = 0; int ichunk = 0; for (int i = 0 ; i < vsize.length ; i++) { cnum = cnum *(( vsize...
9775a8b1-f03a-4574-9b0b-e3d3240984f5
1
public URL getURL() throws NotFoundException { URL url = classPool.find(getName()); if (url == null) throw new NotFoundException(getName()); else return url; }
b61f1c31-c667-423f-9f58-3af3d2313573
5
@Override protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws IOException { DatabaseManager manager=DatabaseManager.getManager(); try { Room room = manager.getRoomDao().queryForId( Integer.parseInt(request.getParameter(ID))); String title=request.getPara...
0ae8bdd9-03d4-4a6c-bf8d-de0d3ca10035
6
private boolean versionCheck(String title) { if(type != UpdateType.NO_VERSION_CHECK) { String version = plugin.getDescription().getVersion(); if(title.split(" v").length == 2) { String remoteVersion = title.split(" v")[1].split(" ")[0]; // Get the ...
f8a0eb24-72a9-4d01-a41c-1ca99962d934
5
public void move(Direction dir) { if(dir == null) return; if(dir.equals(Direction.North)) { y--; last = Direction.North; visited.add(new Location(x , y)); } else if(dir.equals(Direction.East)) { x++; last = Direction.East; visited.add(new Location(x , y)); } else if(dir.equals(Dire...
e8884a7a-1470-4b1f-bba6-3eb2f9ba20ad
9
private void rectangleSelectHandler(Page currentPage, Point mouseLocation) { // detect L->R or R->L if (currentPage != null && currentPage.isInitiated()) { // get page text PageText pageText = currentPage.getViewText(); if (pageText != null) { ...
095e9c89-8033-4aa3-b4c9-6b3ad2e8d781
8
@Override public void execute() { if (Game.getClientState() != Game.INDEX_MAP_LOADED) { AIOsmelter.stop = 1000; } if (Game.getClientState() == Game.INDEX_MAP_LOADED && AIOsmelter.stop == 1000) { AIOsmelter.stop = 50; } if (AIOsmelter.client != Bot.client()) { WidgetCache.purge(); Bot.context(...
63915021-cd5f-4855-8310-92215042d06c
9
private void spinner_x2StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinner_x2StateChanged if(hitbox_index_selected!=-1 || click_target_flag) { click_target_flag=true; if(hitbox_index_selected!=-1) { int i=0; for(Node hitboxes_node=current_fr...
a43738d4-ae69-44b1-8683-ad8cae714ca0
0
public HeroSlot() { // create slot with all basic at first hero = CharacterFactory.create().buyCharacter(Constants.CHARACTER_DEFAULT); weaponSlot = new WeaponSlots(); headArmorSlot = new HeadArmorSlots(); bodyArmorSlot = new BodyArmorSlots(); }
53b02544-f426-4692-be0f-7b9a4001beb0
0
public int GetAverageNumberOfPersons() { return averageNumberOfPersons; }
084f1df5-ed41-488f-9a7a-1cf9d04f4f3c
2
@Override public void write(Writer writer) throws IOException { writer.write('['); Iterator<JSONValue> it = values.iterator(); while (it.hasNext()) { it.next().write(writer); if (it.hasNext()) { writer.write(", "); } } writer.write(']'); }
c9f310fe-088b-448f-8df5-5e16d8f83ee1
7
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof OpenBitSet)) return false; OpenBitSet a; OpenBitSet b = (OpenBitSet)o; // make a the larger set. if (b.wlen > this.wlen) { a = b; b=this; } else { a=this; } // check for any set ...
d73ecaf1-5f5f-4756-b37a-9949f70ecb45
2
private int ROMSize() { if (addressMax <= 24576) return 24576; // The amount needed is less than/equal to 24K, return 24K int size = 24576; // Start off w/ 24KB addressMax -= 24576; // Remove 24KB from the overall size while (addressMax > 0) { addressMax -= 8192; // Iterate ...
77d3297e-9fec-43a6-92dc-131004e518fe
2
public static Performance createNew(Connection con, int userID, int phrase) { Performance perf = null; try { PreparedStatement ps = con.prepareStatement( "INSERT INTO " + tableInfo.tableName + " (UserID, Phrase, Success, RevSuccess, LastSuccess, RevLastSuccess , LastFail, RevLastFail) VALUES (?, ?, ...
fed80146-aae8-4d8a-935e-70a5f247645b
2
public Point[] simplifiedCurve(){ if(!this.simplifyDone){ if(!this.tolerenceEntered){ throw new IllegalArgumentException("No tolerance has been entered"); } else{ this.douglasPeucker(); } } return this.simplifiedPoin...
5cfa5b6e-ffb9-4947-9870-dea1b28e2f4c
0
public void setjTextAreaBilan(JTextArea jTextAreaBilan) { this.jTextAreaBilan = jTextAreaBilan; }
86799eda-bcaf-4ff5-a1e1-f1464645be17
1
public void test_append_nullParser() { try { DateTimeFormatterBuilder bld2 = new DateTimeFormatterBuilder(); bld2.append((DateTimeParser) null); fail(); } catch (IllegalArgumentException ex) { // expected } }
b7dff91e-bd24-4fd6-bcdd-d02ed1d93b15
8
protected static Level getLog4jLevel(final int level) { switch(level) { case SyslogConstants.LEVEL_DEBUG: return Level.DEBUG; case SyslogConstants.LEVEL_INFO: return Level.INFO; case SyslogConstants.LEVEL_NOTICE: return Level.INFO; case SyslogConstants.LEVEL_WARN: return Level.WARN; case SyslogConstants...
02cd3a92-f360-4d1b-b0c0-764735aac33e
1
private boolean isMyTurn() { return myColor.isPresent() && myColor.get() == turnOfColor; }
7642e96b-e736-4f4c-9d11-eb5152462824
0
public void setK(float k) { this.k = k; }
0e313d2c-d820-4cc8-b992-10a8604f499f
1
public boolean posnEquals(Point p1, Point p2) { return p1.x == p2.x && p1.y == p2.y; }
8fd99d9b-d6df-4260-a974-aecf67082a7c
5
public void addGtfsData(List<Object> data){ if(fields==null || data==null) return; if(fields.size()!=data.size()) return; CoordSystemPointConversion conversion = new CoordSystemPointConversion("PROJCS[\"Albers Conical Equal Area [Florida Geographic Data Library]\"," + "GEOGCS[\"GCS_North_American_1...
a8fc2517-b43c-4ec0-bc1d-691113824702
3
public Matrix4f InitIdentity() { for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) if (i == j) matrix[i][j] = 1; else matrix[i][j] = 0; return this; }
d219cbdb-2f05-4684-ad7a-9af566db4d73
0
public String getId() { return id; }
fd317279-bcaa-4c67-a7f0-cf7a83375e3e
4
protected int getMaxSizeX(final JComponent[] components) { int max = 0; for (final JComponent component : components) { final Dimension dimension = component.getMaximumSize(); if (dimension != null) { if ((dimension.width > max) && (dimension.width != Integer.MAX_VALUE)) { max = dimension.wid...
ae0ebfdd-9f73-4ea9-8526-ec1c23a440f1
3
public void acquirePowerUp(PowerUp powerUp) { // remove it from the map map.removeSprite(powerUp); if (powerUp instanceof PowerUp.Star) { // do something here, like give the player points score += 50; municiones += 1; soundManager.play(prizeSound)...
344c5e1e-4aa3-415a-8a18-08e7bcdff71a
3
public EdgeReorderer(ArrayList<Edge> origEdges, Class criterion) { if (criterion != Vertex.class && criterion != Site.class) { throw new Error("Edges: criterion must be Vertex or Site"); } _edges = new ArrayList(); _edgeOrientations = new ArrayList(); if (origEdges.si...
3bf6ec34-7ad7-41dc-9e14-68532842468f
1
public void testGetPeriodConverter() { PeriodConverter c = ConverterManager.getInstance().getPeriodConverter(new Period(1, 2, 3, 4, 5, 6, 7, 8)); assertEquals(ReadablePeriod.class, c.getSupportedType()); c = ConverterManager.getInstance().getPeriodConverter(new Duration(123L)); ...
974de659-d140-4fa5-85a0-470f2af06fab
5
public AnimState getCurrentState() { AnimState ret = new AnimState(); for (AnimMultipleLine line : lines) { AnimState state = line.getCurrentState(); if (line.myPos) ret.pos = state.pos; if (line.myColor) ret.color = state.color; if (line.myAngle) ret.angle = state.angle; if (line.myScale) { ret....
c61e17c0-079d-4d21-b805-70bc9d0724c5
0
public ServerConnectionHandler(Socket sock, DtoExtractor dtoExtractor) { this.localSock = sock; this.dtoExtractor = dtoExtractor; }
9076571c-7d3b-472f-b2da-532edf07affe
6
public byte[] getEraseSequence(int eraseFunc) { byte[] sequence = null; switch (eraseFunc) { case TerminalIO.EEOL: sequence = new byte[3]; sequence[0] = ESC; sequence[1] = LSB; sequence[2] = LE; break; ...