method_id
stringlengths
36
36
cyclomatic_complexity
int32
0
9
method_text
stringlengths
14
410k
3159e697-bb58-4b26-a0e0-0ee84b6e1307
8
@Override public void mouseClicked(MouseEvent e) { if (e.getSource().equals(view.getArtistTable())) { int row = view.getArtistTable().rowAtPoint(e.getPoint()); Artist artist = artistsFiltered.get(row); albumsFiltered = getAlbumsFromArtist(artist); ...
3e41e52b-baff-4979-afab-4fe977f04da6
6
protected void handleComponentAction(Component c, ActionEvent event) { Container rootContainerAncestor = getRootAncestor(c); if(rootContainerAncestor == null) return; String rootContainerName = rootContainerAncestor.getName(); Container leadParentContainer = c.getParent().getLeadParent()...
0fb9d49c-7b7b-4e5a-a17a-889ce6f1479b
3
private int indexOf(List<CharNode> children, char c) { if (children == null) { return -1; } for (int i = 0; i < children.size(); i++) { if (children.get(i).data == c) { return i; } } return -1; }
808b3aea-bf17-4394-809a-d5af74aeece4
6
public static HashMap<String, HashMap<String, Integer>> getMap(String filePath) throws Exception { HashMap<String, HashMap<String, Integer>> map = new HashMap<String, HashMap<String,Integer>>(); BufferedReader reader = filePath.toLowerCase().endsWith("gz") ? new BufferedReader(new InputStreamReader( ...
345e707e-e1e7-4c87-84f2-1e86cd2f8340
0
@Test public void testGetAdjacentAntsBlack() { System.out.println("getAdjacentAntsBlack"); Cell instance = new Cell(0,0); int expResult = 0; int result = instance.getAdjacentAntsBlack(); assertEquals(expResult, result); }
821ca2fa-9266-492c-a159-1612c7b4d645
7
@SuppressWarnings("deprecation") @EventHandler(priority = EventPriority.MONITOR) public void blockMelt(BlockFadeEvent event){ int i = 0; if(!event.isCancelled()){ for(i = 1; i <= plugin.canjoin.size(); i++){ if(plugin.canjoin.get(i)){ if(plugin.config.getStringList("worlds").isEmpty() || (!plugin.conf...
786b7603-59fa-42b3-80cb-3816b6ee3c4e
1
@Override public void collideWith(Element e) { if (e instanceof IdentityDisc) { skipNextTurn(); // the disc ends up on the square of the player that was hit. ((IdentityDisc) e).endLifetime(); } }
f6f86e6b-33ae-4e1a-a407-62ca64719f49
9
final String method2456(boolean bool, int i) { anInt10550++; String string = ""; if (Class367_Sub9.aStringArray7378 != null) string += Class367_Sub9.aStringArray7378[aByte10552]; int[] is; if ((aByte10538 ^ 0xffffffff) != -2 || Class239_Sub17.anIntArray6021 == null) is = RuntimeException_Sub1.anIntA...
ea796ba9-68f1-4635-abf4-43bd99296161
3
private static boolean manualInitialize() { try { DataInput in = new DataInputStream(System.in); int numPatterns = Integer.parseInt(in.readLine()); for (int i = 0; i < numPatterns; i++) { allPatterns.add(new Pattern(in.readLine())); } int numPaths = Integer.parseInt(in.readLine()); for (in...
158cc2dc-c82a-4f92-8e02-417ea7754c7a
0
public int getMaxDay(){ return report.maxDay; }
a28de768-41eb-4014-a1ee-e1f8c5dc33b2
0
public void pushDivideByOperator(){ ((Vector)operatorStack).add(0, new DivideByOperator()); }
a24f77e8-90b8-46c7-bc36-b72532d1c247
2
protected void addHeader() { VcfEntry vcfEntry = (VcfEntry) section; // Sanity check if (vcfEntry == null) return; // Get header VcfFileIterator vcfFile = vcfEntry.getVcfFileIterator(); // Add new lines for (String newHeaderLine : getNewHeaderLines()) vcfFile.getVcfHeader().addLine(newHeaderLine); ...
2bbef4cc-0bb6-4a9e-9eef-7b144c0f667b
4
@Override public void deserialize(Buffer buf) { presetId = buf.readByte(); if (presetId < 0) throw new RuntimeException("Forbidden value on presetId = " + presetId + ", it doesn't respect the following condition : presetId < 0"); symbolId = buf.readByte(); if (symbolId < ...
6da6b970-ffeb-48c4-9706-935da0c88374
8
private void printKills(){ printStart("Player Has Killed"); for(int i=0;i<kills.length;++i){ String type = ""; switch(i){ case SpriteTemplate.RED_TURTLE: type = "Red Koopa"; break; case SpriteTemplate.GREEN_TURTLE: type = "Green Koopa"; break; case SpriteTemplate.GOOMPA: ...
208defb8-1b0a-4c24-981d-65e924e17ca7
1
public void visitLabel(final Label label) { buf.setLength(0); buf.append(ltab); appendLabel(label); buf.append('\n'); text.add(buf.toString()); if (mv != null) { mv.visitLabel(label); } }
2530f32b-0884-4df3-9c32-c072b526b544
3
@Override public synchronized void putCharacter(char c) { characterMap[textPosition.getRow()][textPosition.getColumn()] = new TerminalCharacter(c, currentForegroundColor, currentBackgroundColor, currentlyBold, currentlyBlinking, currentlyUnderlined); if(textPosition.getColumn() =...
918c111d-abcd-42e4-a778-77700055964a
4
void dispatchSliderEvent(MouseEvent e, int eventType) { if(!myrenderer.sliderHasFocus) if(eventType!=MouseEvent.MOUSE_RELEASED){ if(eventType==MouseEvent.MOUSE_PRESSED){ Object item = this.getItemAt(myrenderer.selectedIndex); if(item instanceof ZoomButtons) ((ZoomButt...
bd199bf8-76f8-40cc-957e-e69a4bfe4b21
1
@Override public void cuttingAdsFromVideoFinished(File outputFile) { if (outputFile == null) { text.append( String.format( "Unable to generate output video file: %s.%s", outputFile.getAbsolutePath(), newline)); ...
08ba65f8-d982-4b81-b421-894b9be4c173
0
public Student(Integer id, String name, String sex, String age, String aihao) { this.id = id; this.name = name; this.sex = sex; this.age = age; this.aihao = aihao; }
0d4fdbc3-297f-43e4-a835-000d4d50f846
0
public DijkstraPerformanceTest() { }
90e335a9-9db1-4d5c-8416-30963507fea7
5
static Encounter random(Token token) { int result = 0; for (Encounter e : List) { if (e.type == token) { result++; } } int a = Roll.random(0, result); for (Encounter e : List) { if (e.type != token) continue; if (a == 0) return e; a--; } return null; }
e7744110-2cd0-4552-9543-d22f64a26a67
2
public void actionPerformed(ActionEvent e) { if (automaton.getInitialState() == null) { JOptionPane.showMessageDialog(environment, "The automaton needs an initial state.", "No Initial State", JOptionPane.ERROR_MESSAGE); return; } AutomatonChecker ac = new AutomatonChecker(); if (!ac.isNFA(autom...
e47d689d-7fc5-48b8-a920-43b18e7a4928
6
public Object getValueAt(int row, int column) { if (row >= listData.size()) throw new IndexOutOfBoundsException("Report row "+row+" is not valid"); Object value; TransactionRecord t = listData.get(row); switch (column) { case 0: ...
3866bbf8-7141-4f6f-ae69-8f3f3c1e1a10
6
protected final void checkSliderPosition() { if (orientation == VERTICAL) { if (slider.y < y + 25) slider.y = y + 25; else if (slider.y > y + length - (25 + sliderSize)) slider.y = y + length - (25 + sliderSize); } else if (orientation == HORIZONTAL) { if (slide...
c040bada-86ed-4471-a7cd-e47b2a00254f
6
public static Object prepRet(Class c, Object x){ if (!(c.isPrimitive() || c == Boolean.class)) return x; if(x instanceof Boolean) return ((Boolean) x)?Boolean.TRUE:Boolean.FALSE; else if(x instanceof Integer) { return ((Integer)x).longValue(); } else if(x instanceof Float) return Double.valueOf(((Float...
25871b0f-4006-477e-84f9-a1f96849dfdb
9
public ArrayList<Integer> postorderTraversal(TreeNode root) { ArrayList<Integer> result = new ArrayList<Integer>(); if (root==null){ return result; } Stack<TreeNode> stk = new Stack<TreeNode>(); TreeNode cur = root; TreeNode pre = null; stk.push(cur); ...
b5242d43-d674-45e3-bed7-fe67c00be0ce
0
public void displayScreen() { System.out.println("Select One of the following by its integer value"); System.out.println("1. Add type of a room"); System.out.println("2. Delete type of a room"); System.out.println("3. Add a room"); System.out.println("4. Delete a room"); ...
143feaab-7f05-428a-b728-90f948ea2b44
1
public boolean initializeDriver() { try { // Initiate Driver and event listener print("Initialize the web driver."); driver = new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(defaultWaitMilliseconds, TimeUnit.MILLISECONDS); driver.manage(...
aa5f2596-4207-48b1-8b15-f279813bd4d4
4
@Override public String[] getData() { if (ptr != 0) { return null; } else { if (isConstant()) { if (length > getMaxSizeOf32bitArray()) return null; String[] out = new String[(int) length]; for (int i = 0; i < length; i++) { ...
afa1a319-0582-4c67-9eb6-00ef86539ded
4
public boolean writeToFile(String fileName) { OutputStreamWriter outStream; try { outStream = new OutputStreamWriter(new FileOutputStream(fileName), CHARSET); } catch(IOException e) { return false; } BufferedWriter bufferedWriter = new BufferedWriter(outStream); boolean error = false; for(Card card : stack...
36cbe0e9-f3b7-4a0a-b02e-4bcd4976514b
6
public List<BipolarQuestion> getBipolarParentList(String teamType) { List<BipolarQuestion> bipolarQuestionList = new ArrayList<BipolarQuestion>(); Element bipolarQuestionE; BipolarQuestion bipolarQuestion; for (Iterator i = root.elementIterator(); i.hasNext();) { bipolarQuestionE = (Element)i.next(); if (...
e5719faa-89de-4dd7-83e9-5ccb8f7eb270
7
public static ArrayList<String> FetchjobsFromJobPortal(String urlForJob) { WebDriver driver1 = new FirefoxDriver(); // Code for pagination driver1.get(urlForJob); ArrayList<String> listOfJobs = new ArrayList<String>(); //WebElement ulOfPagination = divForJobs.findElement(By...
93ebc75c-17b9-4696-9698-da65bedf99a8
4
private void createTextWidgets() { if (labels == null) return; Composite composite = new Composite(shell, SWT.NONE); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); GridLayout layout= new GridLayout(); layout.numColumns = 2; composite.setLayout(layout); if (values == null) values = new Str...
5ed7d36e-5b53-405d-9db5-77dd49f35fb5
8
public static void main(String[] args) throws InterruptedException, ExecutionException { long d1 = System.currentTimeMillis(); WriteFileTest test = new WriteFileTest(); List<ICommand> commands = new ArrayList<ICommand>(); List<Future<String>> computes = new ArrayList<Future<String>>(); List<Future<Object>>...
7c4429e1-a680-4710-b88c-cfc3986a2ff8
2
public void visitEnum( final String name, final String desc, final String value) { checkEnd(); checkName(name); CheckMethodAdapter.checkDesc(desc, false); if (value == null) { throw new IllegalArgumentException("Invalid enum value"); } ...
c69c5974-4843-4bfc-af6f-49750df693b2
9
private static int[] generateSubsetArray(Frame frame, int property){ int[] ret = new int[NUMBER_OF_ALTERNATIVES]; int i = 0; int frameProperty = 0; switch (property) { case 0: frameProperty = frame.isBfurrowedbrow() ? 1 : 0; break; case 1: frameProperty = frame.isBmarionettelines() ? 1 : 0; ...
577d7c17-64ec-4263-be95-0e5b8a409cb9
4
public void run() { long lastTime = System.nanoTime(); double nanoPerUpdate = 1000000000D/60D; long lastTimer = System.currentTimeMillis(); double delta = 0D; init(); while(running) { long now = System.nanoTime(); delta += (now - lastTime) / nanoPerUpdate; lastTime = now; boolean should...
b8ecf86c-9ced-47b5-a2f6-8799bdf03991
4
public double angle(Coord o) { Coord c = o.add(this.inv()); if (c.x == 0) { if (c.y < 0) return (-PI / 2); else return (PI / 2); } else { if (c.x < 0) { if (c.y < 0) return (-PI + Math.atan((double) c.y / (double) c.x)); else return (PI + Math.atan((double) c.y / (double) c.x));...
dccace86-f1ec-46ee-9b1f-6811bc71faae
4
public static int[] merge (int[] left, int[] right) { int bound = left.length + right.length; int[] list = new int[bound]; int leftIndx = 0, rightIndx = 0; int leftRef = -9999, rightRef = -9999; for (int indx = 0; indx < bound; indx++) { if (leftIndx < left.leng...
821091c7-d3d0-4d51-ba44-40e5cd72cfb5
9
@Override public boolean equals(Object o) { if(o == null) return false; if(o == this) return true; if(!(o instanceof AngebotDTO)) return false; AngebotDTO a = (AngebotDTO)o; if(a.getKundeNr()!= kundeNr || a.getNr() != nr || a.getPreis()...
00f0e558-d58f-4bd9-80f6-8667f9ba23b4
8
public Type setType(Type otherType) { LocalInfo li = getLocalInfo(); if (li.loopCount++ > 5) { GlobalOptions.err.println("Type error in local " + getName() + ": " + li.type + " seems to be recursive."); Thread.dumpStack(); otherType = Type.tError; } Type newType = li.type.intersection(otherType); ...
dbf2b394-9191-4cb1-8bc9-ac88dc1722f8
7
public void inheritSupercontexts() { { Module module = this; if (!module.multipleParentsP()) { { Module onlyparent = ((Module)(module.parentModules.first())); if (onlyparent != null) { module.allSuperContexts = Cons.cons(onlyparent, onlyparent.allSuperContexts); ret...
bf43ae4b-070b-49e2-9d1f-50951dde981f
3
public int LeadWolf(){ // returns the player ID of the highest ranking living wolf{ int output = 0; for(int n = 0; n < NumWolves;n++){ for(int i = 0; i < NumPlayers; i++){ if(PlayerRoles[i] == (n+3)){ output = (i+1); n = NumWolves; } } } return output; }
616f683a-db1d-4b65-9209-8889d96e2070
8
@Override public void run() { if (!flag) { return; } try { seatsList = new LinkedList<Integer>(); Boolean[] tmpList = uiswt.seatsList; for (int i = 0; i < tmpList.length; i++) { if (tmpList[i] && seatsList.size() < num) { seatsList.add(i); uiswt.takeSeat(i); } } /////////////...
acc0934a-1b1b-4e5a-a681-cdbc64da6367
4
private boolean login() { Console console = System.console(); boolean isAuthenticated = false; if (console != null) { int count = 0; do { char[] pwd = console.readPassword("[%s]", "Password:"); isAuthenticated = authenticate(pwd); // character array is a primitive array // the idea is it can...
5f76fc1d-6809-4089-b105-b4711664acfd
0
public void quitter(){ CtrlPrincipal ctrlP = new CtrlPrincipal(); ctrlP.action(EnumAction.MENU_FICHIER_QUITTER); }
7e1e7529-f781-4b9e-a612-9195e654f3ad
3
public CartePanel(float ratio, int largeur1, int hauteur1) { super(); FactoryObjet factoryObjet = new FactoryObjet(ratio, largeur1*hauteur1); this.largeur=largeur1; this.hauteur=hauteur1; this.setLayout(new GridLayout(largeur,hauteur)); this.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20)); thi...
d2c2133a-2a7d-4384-9b99-9bfabc712c14
0
public boolean isRunning(){ return this.running; }
3ea85e81-dc8d-48b8-89c7-031d39482d4f
6
public void keyReleased(KeyEvent e){ int keyCode = e.getKeyCode(); switch(id){ default: System.out.println("Please enter valid id fpr paddle"); break; case 1: if(keyCode == e.VK_W){ setYDirection(0); } if(keyCode == e.VK_S){ setYDirection(0); } break; case 2: if(keyCode == ...
4b7f8030-17c1-4f47-b31d-4acf4427cef5
5
private void addSpecial(int blueValue, int x, int y){ if(blueValue == 16) addDoor(x, y); if(blueValue == 1) player = new Player(new Vector3f((x + 0.5f) * SPOT_WIDTH , 0.4375f, (y + 0.5f) * SPOT_LENGTH)); if(blueValue == 128) { Transform monsterTransform = new ...
d8dce50d-d84e-4f2e-9934-e182aa1bd912
5
public Tile getTileIntArray(int[] Layer, int x, int y) { if(x < 0 || y < 0 || x >= width || y >= height) return VoidTile; if(Layer[x + y * width] < TileIDS.size()) { return TileIDS.get(Layer[x + y * width]); } else { return EmptyTile; } }
9bd33808-6ff8-4804-a6b0-5002953787ba
9
public final SS_play_expr additiveExpr(SS_statement stat) throws RecognitionException { SS_play_expr expr = null; Token j=null; SS_play_expr a =null; SS_play_expr b =null; try { // SayScript.g:285:3: (a= multiplyExpr[stat] (j= ( PLUS | DASH ) b= multiplyExpr[stat] )? ) // SayScript.g:285:5: a= multip...
d624624d-d87b-417c-acf9-18d2a76e01b7
6
public static int minimumTotal(ArrayList<ArrayList<Integer>> triangle) { if(triangle == null) return 0; int[] prev = new int[1]; prev[0] = triangle.get(0).get(0); int min = prev[0]; int i =1; while(i< triangle.size()){ int[] cur = new int[triangle.get(i).size()]; cur[0...
c70c6975-bd5b-40db-88ed-1520c6ad9168
2
public static final String subtractSegment(String segment, String path) { segment = clean(segment); path = clean(path); if(path.startsWith(segment)){ if(segment.equals(path)){ return EMPTY_STRING; } path = path.substring(segment.length()); } return ...
f809382d-1cdd-4480-a29c-58dc9d5f87a8
2
public void render() { engine.getPlayer().render(); ArrayList<Entity> entities = engine.getEntitiesArray(); for(int i = 0; i < entities.size(); i++) { if(entities.get(i) != null) { entities.get(i).render(); } } }
2a0544b0-83b6-4fd1-9f8d-025847e3c7c4
9
public static void main(String[] args) throws IOException { BufferedReader citizenReader = new BufferedReader(new FileReader("cittrackerGA.txt")); BufferedReader govtReader = new BufferedReader(new FileReader("govtrackerGA.txt")); BufferedReader resultReader = new BufferedReader(new Fi...
d4e56734-0fdd-47cf-bc42-29940ef4c831
1
public static void enterchk(){ for (String value:GosLink2.gb.enters){ GosLink2.dw.append(value); int num=Integer.parseInt(value.substring(0,1)); GosLink2.TNH.get(num).write(value.substring(2)); } GosLink2.gb.enters.clear(); }
999ee248-5367-4bf4-a0ff-811ed4dfc75d
9
private static void dbWithoutTooLongJokes(Joke j, BufferedWriter bw) throws IOException{ // ArrayList<Joke> all_jokes = f.getO_jokes().getJokes(); // BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("resources/files/Outputs/allWithoutTooLong.csv"), "UTF-8")); if(j.getTooLong...
1a717d84-84b7-4a49-b8c6-92a479ac3f13
0
public ArrayList<String> getCertTitles() { return super.getCertTitles(); }
6efcec68-a69c-4050-9689-717a2f0e6a51
4
protected static Ptg calcTranspose( Ptg[] operands ) { String retArray = ""; PtgArray ret = new PtgArray(); if( !(operands[0] instanceof PtgArray) ) { Ptg[] arr = operands[0].getComponents(); //it's a list of values, convert to row-based for( Ptg anArr : arr ) { retArray = retArray + anArr.getV...
4643f8ff-294e-4bb2-8b51-43421a792927
1
public boolean isCrossroad() { int walls = 0; for (int i = 0; i < exits.length(); i++) { walls += Integer.parseInt(exits.substring(i, i + 1)); } return walls < 2; }
e35aaf88-4298-43e8-81a3-21bda7abae73
5
public static short craftNewWeapon(int wtype, int skill) { short result = (short) (AGPmain.rand.nextInt() << 6); if (wtype == Misc.sword) {result = Calc.setBitPart(result, 0, 1, 1);} else if (wtype == Misc.mace) {result = Calc.setBitPart(result, 0, 1, 0);} int rarety = 0; final int denom = 11; for (int i = ...
b10cd8c8-1102-44e0-8f60-d2114b8ce88a
2
public Collection<Track> getTracks() throws SQLException { if (tracks == null || tracks.size() == 0) tracks = GetRecords.create().getTracks(number); return tracks; }
325acc0f-9e5e-4a1d-aecf-5bbf9781084e
1
private void bindRenderTarget(int fbo) { if (fbo == boundFbo) { return; } FramebufferData data = framebuffers.get(fbo); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo); boundFbo = fbo; glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glViewport(0, 0, data.width, data.heigh...
ebb988fb-9cbb-45ff-a530-98c86a2333fc
8
private Token.Number consumeNumber() { StringBuilder sb = new StringBuilder(); int p = this.pos; int c = peek(); if (c == '+' || c == '-') { sb.appendCodePoint(next()); } while (isDigit(peek())) { sb.appendCodePoint(next()); } ma...
462e1254-45dc-48f7-9aef-85d02e7c95e2
4
public static void deliver(int where, String what) { switch (where) { case EVENT_AREA: ((MainWindow) GUI_Destination).setEventText(what); break; case SYNTAX_AREA: ((MainWindow) GUI_Destination).setSyntaxText(what); break; case ERROR: if(GUI_Origin instanceof ...
5e8f56d6-6ad3-4374-98dc-f1c326e81b61
0
public int getI() { return i; }
7518df84-f3d6-4de9-93ce-b02baf90022a
4
private void masterSort(String[] data, SortType pSort) { if (pSort == SortType.INSERTION) InsertionSort.insertionSort(data, 0, data.length); else if (pSort == SortType.QUICKSORT) QuickSort.quickSort(data, 0, data.length); else if (pSort == SortType.MERGESORT) MergeSort.mergeSort(data, 0, data.length); ...
5e0b4eb2-eee1-4c0c-bb21-beaca3a923ba
3
private double getCost(int n, int m, int nextLevelCalls, int[][] newBoard, double cost) { int emptyCnt = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { if (newBoard[i][j] == 0) { emptyCnt++; newBoard[i][j] = 2; ...
1fdd8b59-c338-4d5e-bdaa-0404f6b807b7
0
public static void main(String[] args) throws IOException { LockManager manager = new LockManager("230.0.0.1", "Node2"); manager.start(); }
ba5ffd41-2279-49b6-b1dc-0a5bc0a67790
0
@Basic @Column(name = "FES_TERMINAL") public String getFesTerminal() { return fesTerminal; }
0ed82167-bc10-4c13-a565-c630aef708f8
1
public static String generate(ParseTree parseRoot, ArrayList<VariableInformation> tvariableList) { variableList = tvariableList; String code = "#include <stdio.h>\n\n"; code += getTransrealLibrary(); code += "int main() \n{\n"; for (int i = 0; i < parseRoot.children.size(); i++) { code += generateNode(p...
0ca88126-b1a2-4c2f-9725-27f786f18f95
2
private Url getRandom() { int index; do { index = (new Random()).nextInt(urls.length); } while (!User.isGuildMember() && urls[index].isOnlyGuild()); return urls[index]; }
f7b0dfa5-8ac7-4a46-85a6-ef093ad2404b
6
static public List<ModuleTime> parseModuleTime(String moduleCode) { List<ModuleTime> moduleList = new ArrayList<>(); try (Reader reader = getModuleReader(moduleCode);) { HTMLEditorKit.Parser parser = new ParserDelegator(); HTMLTableParser callback = new HTMLTableParser(); parser.parse(reader, callback, tr...
72b8c141-a9b4-4ca7-affe-81c8b7ff900d
2
public void checkUpdate() throws IOException { if (tilebmpFile != null && tilebmpFile.lastModified() > tilebmpFileLastModified) { refreshImportedTileBitmap(); tilebmpFileLastModified = tilebmpFile.lastModified(); } }
2c6570da-03a8-4b86-abd8-918a7e627601
0
public void load(int x,int z){ //Server only; }
bcf1acb6-42ac-423c-b823-f1148e390c54
5
static final void method1286(File file, int i, String string) { do { try { anInt2181++; Class275.nativeLibraries.put(string, file); if (i == 64) break; aClass114_2183 = null; } catch (RuntimeException runtimeexception) { throw Class348_Sub17.method2929(runtimeexception, ("pg.F(" ...
ed586564-a648-4446-91a3-7567a7cdcd87
7
public ProductTree() { super(); // Create the model. root = new NodeItem(Product.class); model = new DefaultTreeModel(root); map = new HashMap<String, NodeItem>(); // Set model and settings. setModel(model); getSelectionModel().setSelectionMode (TreeSelectionModel.SINGLE_TREE_SELECTION); setS...
a30ec2b3-0707-4bc5-91c2-36928bcad481
1
@Override public void addBuffers(GameAction action) { super.addBuffers(action); for (GameAction currentGameAction : getGameActions()) { currentGameAction.addBuffers(currentGameAction); } }
4a979531-a168-4f3f-8439-f22a908546bc
6
@EventHandler public void EndermanNightVision(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.getEndermanConfig().getDouble("Enderm...
640bbab7-6a96-4cc0-86b0-eabda3a0908c
1
public boolean isEdgeToChainMember(Object vertex) { if (getDegreeInChain(vertex) > 0) return true; return false; }
74ddd495-d016-418c-ab27-3d5eae291630
2
private void createRegistrationSocket() { try { isSocketRegistration = true; //Создаем сокет socket = new Socket("localhost", RegistrationServer.serverPort); } catch (UnknownHostException ex) { JOptionPane.showMessageDialog(this, "Невозможно подключиться к...
d25fa39b-177b-444e-96ee-c7cf862d8674
7
public static void destroyTerm(LogicObject self) { if ((self == null) || self.deletedP()) { return; } Logic.destroyLogicInstance(self); if (Surrogate.subtypeOfP(Stella_Object.safePrimaryType(self), Logic.SGT_LOGIC_DESCRIPTION)) { { Description self000 = ((Description)(self)); ...
57b858e0-4ef6-4799-ab16-9eee4b8d5cc7
7
@EventHandler(priority=EventPriority.LOW) public void cancelNormalCrafting(PrepareItemCraftEvent event) { if(event.getView().getPlayer() instanceof Player == false) return; Player player = (Player) event.getView().getPlayer(); if(ef.crafting.get(player.getName()) != null) return; ...
982e0eec-0b16-4b30-99f4-642233fd44ad
8
private static List<String> getAllItemClassNames(final Enumeration<? extends Item> i, final boolean NonArchon, final boolean NonGeneric, final boolean NonStandard) { final Vector<String> V=new Vector<String>(); for(;i.hasMoreElements();) { final Item I=i.nextElement(); if(((!NonArchon)||(!(I ...
8ec2d682-fdcd-4ac1-969c-802da40bac93
2
public static boolean isPrimitiveWrapperArray(Class<?> clazz) { Assert.notNull(clazz, "Class must not be null"); return (clazz.isArray() && isPrimitiveWrapper(clazz.getComponentType())); }
a834d0eb-b59b-4729-a850-7e5eb14b5b16
1
private void setBalance(BigInteger balance) throws IllegalArgumentException { if (! this.canHaveAsBalance(balance)) throw new IllegalArgumentException(); this.balance = balance; }
5c3880dc-78a9-4745-ac77-6fb9b76aa4b1
1
public static boolean isInOut(Field f) { return isIn(f) && isOut(f); }
42c42de9-d4ed-4399-a594-ff5a3bee2cde
3
public void searchPacientebyDocs() { facesContext = FacesContext.getCurrentInstance(); requestContext = RequestContext.getCurrentInstance(); List<Cliente> listCliente; try { listCliente = genericDAO.searchObject(Cliente.class,"cliente", null, null, new String[]{"cli_na...
4bf352db-98c8-4b7f-a995-fa74b66c2c5f
9
private void resolveVersions(List<Dependency> deps, List<Dependency> management) { for (Dependency parentDep: management) { for (Dependency dependency: deps) { if (dependency.getVersion() == null || !dependency.isScopeDefined()) { if (dependency.getGroupId().equal...
84d91dbc-e490-4a25-b16f-7ab9f04a232a
9
private CollectionsList getBean(NodeList nodelist) { CollectionsList bean = new CollectionsList(); for (int counter = 0; counter < nodelist.getLength(); counter++) { Node parentNode = nodelist.item(counter); NodeList children = parentNode.getChildNodes(); Node node = children.item(0); if (node == null...
709a844c-b99a-40a5-aa8c-0d6b26a026f4
2
public Job complete(int id) { for(Job job : queue){ if(job.getId() == id){ job.complete(); return job; } } return null; }
ec77b82f-4675-403d-a62d-69fa4d67a7a2
1
public void ctick(int dt) { if (spr == null) { delay += dt; } else { spr.tick(delay + dt); delay = 0; } }
b86f8270-7f1b-4982-af18-d421e9ef9b38
2
public void mouseClicked(MouseEvent me) { int clickCount = me.getClickCount(); int button = me.getButton(); Point location = me.getLocationOnScreen(); if (clickCount == 2) { // TODO pick selected Object or take Object under Pointer? // Doubleclick should already s...
086c984c-3323-492f-b4f5-a22452b10880
3
public void loadMap(int[] map, int width, int height, int[] tpmap) { int count = 0; Tile temp; // Go through each width 0-w then // increment the height + 1 until complete for(int j = 0; j < height; j++){ for(int i = 0; i < width; i++){ temp = new Tile( i, j, map[count] ); tileList.add(temp);...
e8a49222-f6f9-4a41-a33e-7e5f7dad44f7
4
public static void printSuccessInformation(HttpURLConnection connection) throws Exception { int code = connection.getResponseCode(); if (code == 200) { System.out.println("Success"); } else if (code == 201) { System.out.println("Created"); } else if (code == 202) ...
fd9d7361-1fd0-47fb-8242-3c2bd0a1925f
9
protected JToolBar init(JPanel jpanel, JTextArea jarea) { this.panel = jpanel; this.area = jarea; JToolBar toolBar = new JToolBar(); //set up toolbar items ImageIcon lims = new ImageIcon("./resources/icons/lims.png"); ImageIcon manifest = new ImageIcon("./resources/icons/excel.png"); ImageIcon pos =...
ba6be4f2-4236-49eb-93b4-3c9b042b8392
0
public static void addItem(JMenu menu, Action a) { JMenuItem item = new JMenuItem(a); item.setAccelerator((KeyStroke) a.getValue(Action.ACCELERATOR_KEY)); menu.add(item); }
7f36e7af-28d2-4bf9-9f77-9df80ad7c514
3
public void paintComponent(Graphics g) { if(this.shapeDrawing == ShapeKey.BEPAINT_LINE) { this.line.initialize(this.lineData.getX1(), this.lineData.getY1(), this.lineData.getX2(), this.lineData.getY2(), this.lineData.getColor()); this.line.drawLine(g); } else if(this.shapeDrawing == ShapeKey.BEPAINT_OVAL)...
e370bed7-ebef-4209-b88e-58b36e084c0d
9
public void loadSim(String fileName) throws IOException { if (currentFile != null) { String parentDirectory = MiscUtil.getParentDirectory(currentFile.toString()); if (parentDirectory != null) loadFile(new File(parentDirectory, fileName)); } else if (currentModel != null) { String parentDirectory = Misc...