text
stringlengths
14
410k
label
int32
0
9
private boolean mpChecker(LinkedList<String>left,LinkedList<String>middle, LinkedList<String>consequent) { /* * assume (a=>b) * assume ((a=>b)=>(b=>c)) * mp 1 2 (b=>c) * * */ LinkedList<String> fullExpression; LinkedList<String> predicate; if (left.size() > middle.size()) { fullExpres...
7
public boolean isLeftDiverse(Node node) { if (node.leaves.size() == 0 || node.leaves.get(0) == 1) { return true; } char temp = input.charAt(node.leaves.get(0) - 2); for (int i = 1; i < node.leaves.size(); i++) { if (temp != input.charAt(node.leaves.get(i) - 2)) { // Sy...
4
public static Item getItemTester(String name){ // get item Item item = ItemStorageInventory.create().getItemfromStorage(name); if(item != null) System.out.println("you just get "+ item + " from item list \n"); else System.out.println("getting "+ item + " failed\n"); return item; }
1
private JSONWriter append(String string) throws JSONException { if (string == null) { throw new JSONException("Null pointer"); } if (this.mode == 'o' || this.mode == 'a') { try { if (this.comma && this.mode == 'a') { this.writer.write('...
7
private static void doDir(File f, ClassLoader cl) { final String name = f.getPath(); System.out.println("SourceUtils.doDir(): " + name); if (!f.exists()) { throw new IllegalStateException(name + " does not exist"); } if (f.isFile()) { final String className = f.getPath().substring(1+startPath.length());...
5
public int getWidth() { Window window = device.getFullScreenWindow(); if (window != null) { return window.getWidth(); } else { return 0; } }
1
public void mouseReleased(MouseEvent e) { }
0
@Override public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("setImagePath")) { JFileChooser chooser = new JFileChooser(); FileNameExtensionFilter filter1 = new FileNameExtensionFilter("Image files", "png", "jpeg", "jpg", "bmp"); chooser.addChoosableFileFilter(filter1); ...
8
public void actionPerformed(ActionEvent evt) { JButton bouton = (JButton) evt.getSource() ; String texte = bouton.getText() ; if (texte.equals(BTN_RETOUR)) modelePanneau.setChoix(MENU_PRINCIPAL); if (texte.equals(BTN_FACILE)) { difficulteChoisi = DIFF_FACILE; Facade.getInstance(new Jeu(new Config...
6
public boolean validateInput() { int i = 0, j = 0; for(i = 0; i < 9; i++) { for(j = 0; j < 9; j++) { try { if(Integer.parseInt(entries[i][j].getText()) < 1) { return false; } } catch (NumberFormatException e) ...
4
public void Refresh(CellVariable[][] cells) throws ContradictionException { System.out.println("begin refresh"); solver.clear(); solver.read(model); System.out.println("model read"); for(int x = 0; x < sudokuSize; x++) { for(int y = 0; y < sudokuSize; y++) { if(cells[x][y].current != -1 && !cells...
5
public int getPages(int intRegsPerPag, ArrayList<FilterBean> alFilter, HashMap<String, String> hmOrder) throws Exception { int pages; try { oMysql.conexion(enumTipoConexion); pages = oMysql.getPages("backlog", intRegsPerPag, alFilter, hmOrder); oMysql.desconexion(); ...
1
private void compileArgumentsList() throws ParseException, IOException { //empty arguments list if ((tokenizer.tokenType() == Tokenizer.SYMBOL) && (tokenizer.symbol() == ')')) { return; } do { // <data-type> Type type = compileDataType(); // <argument-name> if (tokenizer.tokenType() !=...
6
public N getHigherNode(T payLoad) { N p = m_root; while (p != null) { int cmp = compare(payLoad, p.getPayload()); if (cmp < 0) { if (p.getLeft() != null) p = p.getLeft(); else return p; } else { if (p.getRight() != null) ...
6
public static JSONObject toJSONObject(String string) throws JSONException { JSONObject jo = new JSONObject(); XMLTokener x = new XMLTokener(string); while (x.more() && x.skipPast("<")) { parse(x, jo, null); } return jo; }
2
@Override public void doRound(Game game){ Iterator<Player> it = game.getPlayerList().iterator(); Player player1 = it.next(); Player player2 = it.next(); int roll1 = player1.doRoll(); int roll2 = player2.doRoll(); if(roll1>roll2){ roll1=roll2-2; ...
2
private boolean lataaPelaaja() { String[] pelaajat = PelaajatIO.haeLadattavatPelaajat(); if (pelaajat == null || pelaajat.length == 0) { System.out.println("Ei ladattavia pelaajia."); return false; } System.out.println("\nLadattavat pelaajat:"); for (Strin...
9
@Override public void initialize(URL url, ResourceBundle rb) { udpflood = new UDPFlood(); }
0
public void setLocation(Location newLocation) { // If either the add or remove involves a colony, call the // colony-specific routine... Colony oldColony = (location instanceof WorkLocation) ? this.getColony() : null; Colony newColony = (newLocation instanceof WorkLocation) ...
8
public static int unsignedShort (byte[] byteArray, int selector, int byteOrdering) { // byteOrdering tells how bytes are stored // selector should always point to lowest byte position of range // local vars int a = 0 ; // case out on the storage scheme switch (byteOrdering) { case HI_TO_LO: /...
2
private void calculateNextRandomDirection() { int newDirection = randomGenerator.nextInt(4); while (!isAValidDirection(newDirection)) { newDirection = (newDirection + 1) % 4; } setDirection(newDirection); }
1
private void eliminarTarea(String titulo) { int indice; switch (jCBEstado.getSelectedIndex()) { case 1: indice = buscarTarea(this.proyectos.get(index).getProximo(), titulo); if (indice != -1) { this.proyectos.get(index).getProximo().remove(...
7
public void nextMove() { if (exitDelay > 0) { exitDelay--; return; } progress(PIXELS); nextPhotogram(); }
1
private Set<SootClass> collectAllInterfaces(SootClass sootClass) { Set<SootClass> interfaces = new HashSet<SootClass>(sootClass.getInterfaces()); for (SootClass i : sootClass.getInterfaces()) interfaces.addAll(collectAllInterfaces(i)); return interfaces; }
1
private static byte[] parseBase64Binary(String str) { // strict parser, must have length divisble by 4 if (str.length() % 4 != 0) { throw new IllegalArgumentException("Invalid Base64 string"); } // base64Str has 65 characters, with '=' at the end which is masked away ...
4
public void createIndexArff(String in, ArrayList<Integer> years) { String result = ""; int instances = 0; result += "@RELATION " + in + "\r\n"; result += "@ATTRIBUTE day NUMERIC " + "\r\n"; result += "@ATTRIBUTE djia NUMERIC " + "\r\n"; result += "@ATTRIBUTE nasdaq NUMER...
9
@Override public String execute(HttpServletRequest request, HttpServletResponse response) throws Exception { String data; try { ArrayList<FilterBean> alFilter = new ArrayList<>(); if (request.getParameter("filter") != null) { if (request.getParameter("filterop...
7
private void getStayHotelCollection(AbstractDao dao, List<Direction> directions) throws DaoException { for (Direction dir : directions) { Criteria crit = new Criteria(); crit.addParam(DAO_ID_DIRECTION, dir.getIdDirection()); List<DirectionStayHotel> stays = dao.findDirectionS...
1
public ReturnObject get(int i) { ReturnObjectImpl returnValue = new ReturnObjectImpl(); if (i < 0 || i >= size()) { returnValue.value = ErrorMessage.INDEX_OUT_OF_BOUNDS; return returnValue; } if (nextElement.index == i) { returnValue.value = nextElement.value; return returnValue; } else { retu...
3
protected String runProgramGetResp (List<String> args) throws IOException, InterruptedException { logger.entering(getClass().getName(), "runProgramGetResp", args); String response = ""; ProcessBuilder procBuilder = new ProcessBuilder(args); Process proc = procBuilder...
2
@Override public void performAction() { if(!started) { performActionStartup(); } else { unit.addX(pathSegment.getDir().x); unit.addY(pathSegment.getDir().y); } }
1
public void generateUpdatedEntries() { _modifiedEntries.clear(); HashSet<String> newEntries = new HashSet<String>(); for (int i = 0; i < 5; i++) { OrderEntry orderEntry = null; int action = _random.nextInt(100); if (_orderEntries.size() == 0 || ...
7
public boolean isLambdaTransition(Transition transition) { PDATransition trans = (PDATransition) transition; String input = trans.getInputToRead(); String toPop = trans.getStringToPop(); String toPush = trans.getStringToPush(); if (input.equals(LAMBDA) && toPop.equals(LAMBDA) && toPush.equals(LAMBDA)) ...
3
public long overlap(Interval interval) { long millis = 0; for (Interval i : this) { Interval match = interval.overlap(i); if (match != null && match.toDurationMillis() > 0) { millis += match.toDurationMillis(); } } return millis; ...
3
protected boolean generateNext(){ int[] actors = getActors(); // if not yet initialized do it if (actors == null){ actors = new int[ actorLength ]; actors[actorLength - 1] = 1; setActors(actors); return true; } // move onto the next scenario, which is greater than the previous by 1 else{ i...
9
private String replaceHexWithNames(String line) { int indexOfhash = line.indexOf("#"); if (line.length() >= 7 && indexOfhash != -1 && indexOfhash + 7 <= line.length()) { String colorHex = line.substring(indexOfhash + 1, indexOfhash + 7); int endOfHex = -1; if (colorHex.matches("[a-fA-F0-9][a-fA-F0-9][a-fA...
6
public int size() { return size; }
0
public byte[] decompress(HuffmanTree tree, int uncompressedLength, Byte[] byteArray) { System.out.println("Decompressing Byte[]."); System.out.println("Compressed Message ByteCount: " + byteArray.length); // For each byte, // Get each byte's value from the huffman tree. // Compose the new values. List<B...
4
static final Class348_Sub41 method2661(int i, int i_0_, int i_1_, boolean bool, int i_2_) { if (i_2_ != 2) method2661(31, -43, 32, true, -110); anInt4189++; Class348_Sub41 class348_sub41 = new Class348_Sub41(); ((Class348_Sub41) class348_sub41).anInt7050 = i; ((Class348_Sub41) class348_sub41).anInt705...
7
public static File createTestTempFileOrDir(File parent, String name, boolean dir) throws IOException { File f = new File(parent, name); f.deleteOnExit(); if (dir && !f.mkdirs()) { throw new IOException("디렉토리를 생성할 수 없습니다: " + f); } return f; }
2
@RequestMapping(value = "/room-event-picture-list/{roomEventId}", method = RequestMethod.GET) @ResponseBody public CreativeMaterialListResponse roomEventPictureList( @PathVariable(value = "roomEventId") final String roomEventIdStr ) { return typedCreativeMaterialList(roomEventIdStr, Crea...
0
public Vector<Move> commuteNextMove ( ) { final Vector<Move> moves = new Vector<Move> ( ) ; /* * Go through each square on the board and if it is blank get the words from * it by going though each word in the dictionary and getting the up and * down words from it. */ for ( int i = 0 ; i ...
4
@Override public void updateLong() { super.updateLong(); if (inventory.getUsedSlots() == 0) { isDirty = true; } }
1
public static Dimension extractDimension(String buffer) { int[] values = extractIntegers(buffer); if (values.length == 2) { return new Dimension(values[0], values[1]); } return null; }
1
public StringBuffer showWhoShort(MOB who, int[] colWidths) { final StringBuffer msg=new StringBuffer(""); msg.append("["); if(!CMSecurity.isDisabled(CMSecurity.DisFlag.RACES)) { if(who.charStats().getCurrentClass().raceless()) msg.append(CMStrings.padRight(" ",colWidths[0])+" "); else msg.append(...
8
public int getPageNumber(PDFObject page) throws IOException { if (page.getType() == PDFObject.ARRAY) { page = page.getAt(0); } // now we've got a page. Make sure. PDFObject typeObj = page.getDictRef("Type"); if (typeObj == null || !typeObj.getStringValue().equals("P...
8
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; LinhaVenda other = (LinhaVenda) obj; if (id != other.id) return false; return true; }
4
public final T getInTestLinkListener() { return inTestLinkListener; }
0
protected void _upload( BlobInfo bi, String tag ) throws ServerError, IOException { if( bi instanceof FileInfo ) { transferTracker.sendingFile( ((FileInfo)bi).getPath() ); } InputStream is = bi.openInputStream(); try { URL url = urlFor(bi.getUrn()); if( inducePutErrors ) { throw new ServerEr...
7
public static void main(String[] args) { if (args.length != 2) { System.out.println("Usage: CopyFile source target"); return; } String sourceName = args[0]; String targetName = args[1]; FileReader sourceFile = null; FileWriter targetFile = null; Scanner source = null; try { sourceFi...
9
public void send(final byte[] frame, final boolean waitForCon) throws KNXPortClosedException, KNXAckTimeoutException, InterruptedException { final boolean group = (frame[3] & 0x80) == 0x80; KNXAddress dst = null; if (group) { dst = new GroupAddress(new byte[] { frame[6], frame[7] }); addresses.add(dst); ...
9
public static String removeStart(String str, String remove) { if (isEmpty(str) || isEmpty(remove)) { return str; } if (str.startsWith(remove)) { return str.substring(remove.length()); } return str; }
3
public <A extends Appendable> A appendTo(A appendable, Iterator<?> parts) { try { if (parts.hasNext()) { appendable.append(toString(parts.next())); while (parts.hasNext()) { appendable.append(separator); appendable.append(toStri...
4
@Override public void render(Art art, Level level) { if (!collected) { frame++; frame %= (4 * 6); art.drawTile(art.spriteSheet, getX(), getY(), 13 + frame / 6, 8); } }
1
private void thresholdEdges() { for (int i = 0; i < picsize; i++) { data[i] = data[i] > 0 ? -1 : 0xff000000; } }
2
private void generateInitialRooms() { for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { // create north walls rooms[i][j] = new Room(i, j); if (i == 0) { rooms[i][j].north = new Wall(rooms[i][j]); ...
6
public void handleImmediateReservation(ARObject obj, int senderID, int sendTag) { // check whether the requested PE is sufficient to handle or not if (obj.getNumPE() > super.totalPE_) { super.replyCreateReservation(senderID, sendTag, NOT...
4
private void moveOnY(Vector<Integer> ans, int xDis, int yDis){ if (yDis >= 0){ ans.add(0); if (xDis >= 0){ ans.add(1); ans.add(2); ans.add(3); } else { ans.add(3); ans.add(2); ans.add(1); } } else { ans.add(2); if (xDis >= 0){ ans.add(1); ans.add(0); ans.ad...
3
public Date getLetzteZahlung() { if (letztezahlung == null) { Date d = null; for (Rechnung r : rechnungCollection) { if (r.getEingang() != null) { if (d == null) { d = r.getEingang(); } else { ...
5
static public ParseException generateParseException() { jj_expentries.clear(); boolean[] la1tokens = new boolean[57]; if (jj_kind >= 0) { la1tokens[jj_kind] = true; jj_kind = -1; } for (int i = 0; i < 0; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { ...
9
@SuppressWarnings("unchecked") public ListTag<? extends Tag> getList(String name) { if (!tags.containsKey(name)) return new ListTag<Tag>(name); return (ListTag<? extends Tag>) tags.get(name); }
3
public static boolean controlDirectory(Path p) { return ((p != null) && Files.exists(p, LinkOption.NOFOLLOW_LINKS) && Files.isDirectory(p, LinkOption.NOFOLLOW_LINKS)); }
2
public static void calc(int[] input, int pivot) { int index = -1; int countl = 0; int countr = 0; for (int i = 0; i < input.length; i++) { if (input[i] == pivot) { index = i; } } HashSet<Integer> hs = new HashSet<Integer>(); int j = 0; int k = index + 1; while (j < index) { if (input[j] ...
8
public void frechetProbabilityPlot(){ this.lastMethod = 7; // Check for suffient data points this.frechetNumberOfParameters = 3; if(this.numberOfDataPoints<4)throw new IllegalArgumentException("There must be at least four data points - preferably considerably more"); ...
9
public Object getField(Reference ref, Object obj) throws InterpreterException { if (isWhite(ref)) return super.getField(ref, obj); FieldIdentifier fi = (FieldIdentifier) Main.getClassBundle() .getIdentifier(ref); if (fi != null && !fi.isNotConstant()) { Object result = fi.getConstant(); if (curren...
5
@Override public double distribute(TVC newCon) { Random r = new Random(); Firewall[] firewalls = environment.getFirewalls(); // forget about all links and redistribute connections from scratch for (TVC c : environment.getConnectionsSortedUp()) { int managerFirewallId = r.nextBoolean() ? c.getFir...
2
private void checkStatusActive(Integer adresse, Integer value) { if(adresse == 0x03 || adresse == 0x83){ String logstring = "[Aktive Beeinträchtigung des Statusregisters]: "; //CARRY if( (value & 0x01) == 0x01){ //Carrybit manuell gesetzt status.setBit(bits.C); PIC_Logger.logger.info(logstrin...
6
public void render(int x , int y , int startX , int startY , Graphics g) { if(preMode) { diary.draw(); } else { if(music.playing() == false) music.loop(); map.render(0, 0 , startX + x , startY + y , 100 , 100); g.drawString(" " + (float)((timer - elapsedTime) / 1000), 350 , 25); } }
2
public void add(Object o) throws PropertyException { if (o instanceof Event) addEvent((Event)o); else if (o instanceof Note) addNote((Note)o); else throw new PropertyException("Unable to add object of type " + o.getClass().getName() + " to a Family"); }
2
private int choiceLeft() { if (round == 0) return nplayers - getIndex()- npassed+1; else return nplayers - npassed+2; }
1
public int filterRow(byte[] currRow, byte[] prevRow, byte[][] scratchRows, int bytesPerRow, int bytesPerPixel) { int[] filterBadness = new int[5]; for (int i = 0; i < 5; i++) { filterBadness[i...
9
private boolean checkUpRight(int _row, int _column, int _player) { boolean keepGoing = true; int nbAligned = 0; while (keepGoing == true && nbAligned < nbToAlign) { if (_row - nbAligned < 0 || _column + nbAligned >= column) { keepGoing = false; } else if (gameGrid[_row - nbAligned][_colum...
5
private int checkDiagonal(byte[][] arr, int startIndex, int mark) { int countOfEmptyField = 0; int countOfBusyField = 0; int emptyIndex = -1; int j; for (int i = 0; i < arr.length; i++) { if (startIndex == 0) { j = i; } else { ...
6
public synchronized void InsertArticle(String name, String author, String years, String url, String introduction) { String insert_article = "INSERT INTO zhangyu_sca.article (name, author, years , url , introduction) values ( '" + name + "','" + author + "' , '" + years + "','" + url + "','" + introduction + "' ...
1
public static boolean checkDungeonBounds(RoomReference reference, Room[][] map, Room room) { if (reference.getX() == 0 && room.hasWestDoor()) return false; if (reference.getX() == map.length - 1 && room.hasEastDoor()) return false; if (reference.getY() == 0 && room.hasSouthDoor()) return false; if (...
8
@Override public void init(String[] players, int fieldWidth, int fieldHeight) throws IllegalArgumentException, WrongArgumentException { if(players == null || players.length < 2 || fieldWidth < 5 || fieldHeight < 5 || fieldWidth > 15 || fieldHeight > 15){ throw new IllegalArgumentException("check input arguments: ...
9
public TreeNode buildTree(int[] inorder, int[] postorder) { if(inorder.length == 0 && postorder.length == 0) return null; TreeNode node = buildTreeRec(inorder, postorder, 0, inorder.length-1, 0, postorder.length-1); return node; }
2
public void onKeyPressed(KeyEvent e) { switch (e.getKeyCode()) { case VK_UP: case VK_W: directions.add(Direction.UP); break; case VK_DOWN: case VK_S: directions.add(Direction.DOWN); break; case VK_RIGHT: case VK_D: directions.add(Direction.RIGHT); break; case VK_LEFT: case VK_A: ...
8
@Override public NepticalData getData() { Location location = getLocation(); DataModule moduleContext = NSpaceManager.getSpace(location.context()); List<NepticalData> data = moduleContext.getDataAt(location.fragment()); if (data.isEmpty()) { return NepticalData.NULL_DATA; } if (location instanceof C...
2
private void startNextSong() { EIError.debugMsg("startNextSong"); if(playList != null && !stopping) { if(currentSongIndex < playList.size()) { lastSong = playList.get(currentSongIndex); } else { lastSong = null; } GameSong g...
6
public void deletePlayerFromPlayers(String userName){ try { cs = con.prepareCall("{call DELETE_PLAYER_FROM_PLAYER(?)}"); cs.setString(1, userName); cs.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } }
1
public void forward(String ip, String message) { if (active) { Iterator<Service> it = services.iterator(); Service service; while (it.hasNext()) { service = it.next(); service.pushMessage(ip, message); } } }
2
@Override public int hashCode() { int result = personId; result = 31 * result + (accountNumber != null ? accountNumber.hashCode() : 0); return result; }
1
@Override public List<Integer> sort(List<Integer> list) { // checking input parameter for null if (list == null) { throw new IllegalArgumentException("ArrayList not specified!"); } int i, j, increment, temp, arraySize = list.size(); // moving forward through ar...
5
public Vector<String> findPath() throws ActorNotFoundException, EmptyQueueException { //Check that the actor to start from exists. if(actors.containsKey(startingNode)){ q.enqueue(actors.get(startingNode)); actors.get(startingNode).setVisited(true); } else { throw new ActorNotFoundException("There is n...
7
public int saveOrder(ArrayList<Order> order, Connection con) throws SQLException { int rowsInserted = 0; int tal = 0; String SQLString1 = "insert into ordre values(?,?,?)"; String SQLString2 = "insert into ordreDetails values(?,?,?,?,?)"; String SQLString3 = "select ordreseq.nex...
9
public List<GeoIPv4Adress> parse(File file) throws IOException, XMLStreamException { FileInputStream in = new FileInputStream(file); XMLEventReader eventReader = factory.createXMLEventReader(in); while(eventReader.hasNext()) { XMLEvent xmlEvent = eventReader.nextEvent(); switch(xmlEvent.ge...
6
private String parseHTML(int dId) { String result = ""; _logger.debug("Filetype = HTML"); MySqlDatabaseHelper databaseHelper = new MySqlDatabaseHelper(); result = (new SourceLoader().loadURL(databaseHelper.loadDocumentURL(dId))); return result; }
0
@Override public int hashCode() { return (username.hashCode() << 5) - 1; }
0
private void renderSprite(double xDiff, double yDiff, double zDiff, int tex, int color) { double xc = (xDiff - x) * 2 - rotXZSin * 0.2; double zc = (zDiff - z) * 2 - rotXZCos * 0.2; double yc = (yDiff - y) * 2 - rotYSin * 5; double zz = zc * rotXZCos + xc * rotXZSin; if(zz < 0.1){ return; } do...
9
public static void printMatrixInSpiral(int [][] input) { int leftTop = 0; int rightTop = input[0].length; int leftBottom = -1; int rightBottom = input.length; int i=0; int j=0; int count =0; while(count<input.length * input[0].length){ while(true){ ...
9
public void grabTexture(int var1, boolean var2) { int var3; if((var3 = this.getSlot(var1)) >= 0) { this.selected = var3; } else { if(var2 && var1 > 0 && SessionData.allowedBlocks.contains(Block.blocks[var1])) { this.replaceSlot(Block.blocks[var1]); } } ...
4
static Element getElementByTagNameNR(Element e, String tagName) { Node child = e.getFirstChild(); while (child != null) { if (child instanceof Element && child.getNodeName().equals(tagName)) return (Element) child; child = child.getNextSibling(); } return null; }
3
final public boolean replaceChild(Construct child, Construct newCon) { List<Construct> childConstructs = new LinkedList<Construct>(); getAllChildConstructs(childConstructs, child); // Do the construct replacement here, if the replacement // is successful, then we need to cleanup all editors related // to c...
4
protected void readImage() { ix = readShort(); // (sub)image position & size iy = readShort(); iw = readShort(); ih = readShort(); int packed = read(); lctFlag = (packed & 0x80) != 0; // 1 - local color table flag interlace = (packed & 0x40) != 0; // 2 - interlace flag // 3 - s...
7
public AddNewChunkDialog(KlangEditor parent, Chunk curChunk) { super(parent); this.setModalityType(ModalityType.APPLICATION_MODAL); this.setResizable(false); this.setTitle(KlangConstants.KLANGEDITOR_ADDNEWCHUNKDIALOG_TITLE); this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); pnlContent = ne...
9
public ScaledQuantity(double value, Unit unit) { super(value, unit); if(!Temperature.class.isInstance(unit)) { throw new RuntimeException("Cannot create ArithmeticQuantity with unit " + unit); } }
1
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (obj.getClass() == this.getClass()) { Matrix m = (Matrix) obj; for (int i = 0; i < m.rows; i++) { for (int j = 0; j < m.columns; j++) { if (this.getElement(j, i) != m.get...
6
public void loadModels() { ModelList.SortedListModel dataModel = ((ModelList.SortedListModel) m_ModelList.getModel()); int directoryCount = 0; int modelCount = 0; dataModel.clear(); File directory = m_Library.getWorkingDirectory(); File subDirectories[] = directory.listFiles(...
7
@Test public void testGetDescriptionSecondPhone() { Map<String, Object> descriptionSecondPhone = new HashMap<String, Object>(); descriptionSecondPhone.put("name", "Cink Five"); descriptionSecondPhone.put("brandName", "Wiko"); descriptionSecondPhone.put("screenSize", 5); descriptionSecondPhone.put("screenType...
8