text
stringlengths
14
410k
label
int32
0
9
String apply(String[] params) throws IOException { String result = null; if (isDefault) { if (defaultRealm.equals(params[0])) { result = params[1]; } } else if (params.length - 1 == numOfComponents) { String base = replaceParameters(format, params); if (match ...
8
private boolean isNeighbourOfMarkedPixel(int aX, int aY) { return ( pixelIsMarked(aX - 1, aY) || pixelIsMarked(aX + 1, aY) || pixelIsMarked(aX, aY - 1) || pixelIsMarked(aX, aY + 1) || pixelIsMarked(aX - 1, aY - 1) ...
7
public static void reloadConfig(){ BiomesExcluded = new ArrayList<Biome>(); // Reset BiomesIncluded = new ArrayList<Biome>(); // Reset plugin.reloadConfig(); List<?> biomesInc = plugin.getConfig().getList("included-biomes"); for (Object b : biomesInc){ String biome = ((String)b).toUpperCase(); ...
6
public boolean equalsExpr(final Expr other) { return (other instanceof StoreExpr) && ((StoreExpr) other).target.equalsExpr(target) && ((StoreExpr) other).expr.equalsExpr(expr); }
2
@Test @Ignore public void test_SessionsPost() { SessionList laSessionList = new SessionList(); // Put all the attribute that you want control over. This is so // we can handle removal of attributes when a registrant is // updated and no longer has that attribute. laSessionList.getAttrName().add("Session Ty...
1
public void extractSS(ArrayList<String> dsspFile, ArrayList<Residue> resArray) { int resArrayCounter = 0; String current = "T"; String old = "T"; String[] sheetArray = {"E","B"}; String[] helixArray = {"G","H","I"}; String[] turnArray = {"","S","T"," "}; int nis = 1; // this counter keeps track of the number of...
8
private void scanning() { if (on && currentFreq > Range.BOTTOM.getFreq() && !stationFound()) { scanning = true; decreaseCurrentFreq(); } else if(currentFreq == Range.BOTTOM.getFreq()) { scanning = false; stopScan = true; } }
4
public int topFrameSize() { return runStack.size() - framePointers.peek(); }
0
public static void createTree(ResearchScreen rs, ResearchItem root, float x, float y) { if(root != null) { rs.addItemSlot(x, y, root); if(root.researched()) { int indx = 0; for(ResearchItem i : root.getFollowers()) { createTree(rs, i, x...
3
@Test public void getDuplicatesFromKeyword() throws SameAsServiceException { EquivalenceList equivalences = this.service.getDuplicates("Rome"); assertEquals(10, equivalences.size()); }
0
@Override public Collection<? extends GrantedAuthority> getAuthorities() { Set<String> roles = this.getRoles(); if (roles == null) { return Collections.emptyList(); } Set<GrantedAuthority> authorities = new HashSet<GrantedAuthority>(); for (String role : roles) { authorities.add(new SimpleGrantedA...
3
public ArrayList<Object> playGame(String gameType) { ArrayList<Object> results = new ArrayList<Object>(); if (gameType.equals("Com")) { int activePlayerIndex = 0; while (this.players.size() > 1) { this.turnNumber++; this.activePlayer = this.players.get(activePlayerIndex); this.activePlayer.setPla...
6
public static void main(String[] args) throws RemoteException, AlreadyBoundException, NotBoundException, InterruptedException { try { Parser.hdfsCoreConf(); Parser.mapreduceCoreConf(); Parser.mapreduceJobTrackerConf(); Parser.mapreduceTaskTrackerIndividualConf(); } catch (Exception e) { e.printStackT...
5
private MinuetoImage buildChessBoard(MinuetoColor mcoFirstColor, MinuetoColor mcoSecondColor) { MinuetoImage imageTempChessBoard; // Stores the temporary chessboard we are drawing. MinuetoImage imageAlternateSquare; // Stores a tile of the second color. // First, we make a board from the first color. im...
5
public Weibull(double lambda, double k) throws ParameterException { if (lambda <= 0 || k <= 0) { throw new ParameterException("Weibull parameters lambda, k > 0."); } else { this.lambda = lambda; this.k = k; unif = new ContinuousUniform(0, 1); } }
2
@Override protected String readNext() { try { if (reader.ready()) { line = reader.readLine(); // Read a line (only if needed) if (line != null) { lineNum++; return line; } } } catch (IOException e) { return null; } return null; }
3
public void setStatustextZoomedFonttype(Fonttype fonttype) { if (fonttype == null) { this.statustextZoomedFontType = UIFontInits.STATUSZOOMED.getType(); } else { this.statustextZoomedFontType = fonttype; } somethingChanged(); }
1
protected static Ptg calcLCM( Ptg[] operands ) { if( operands.length < 1 ) { return new PtgErr( PtgErr.ERROR_NA ); } Ptg[] numbers = PtgCalculator.getAllComponents( operands ); // algorithm: // LCM(a, b)= (a*b)/GCD(a, b) long lcm = 0; try { Ptg[] ops = new Ptg[2]; if( (lcm = PtgCalculator.ge...
5
public static void parser(String content) throws ParserException{ Parser parser=new Parser(content); parser.setEncoding( parser.getEncoding()); //parser.getEncoding() NodeList nodeList=null; // עضǩ ˵ijضĽڵ NodeFilter titleFilter=new NodeClassFilter(TitleTag.class); ...
7
public void keyPressed(KeyEvent arg0) { if(arg0.getKeyCode() == KeyEvent.VK_ESCAPE) { System.exit(0); } else if(arg0.getKeyCode() == KeyEvent.VK_ENTER) { yamg.runApplication(); } }
2
* @param algName holds the name of a weka algorithm to configure the * bean with if it is a wekawrapper bean * @return a JPanel holding the instantiated (and configured bean) */ private JPanel instantiateToolBarBean(boolean wekawrapper, String tempBeanCompName, String algName) { Object tempBea...
8
private void printScore(){ System.out.println(); int[][] temp = new int [25][50]; for (int Y = 0; Y < 25; Y++){ for (int X = 0; X < 50; X++){ Node tempNode = map[Y][X]; if (tempNode != null){ temp[Y][X] = tempNode.getFinalCost();} ...
5
public void setProcessMode(int processMode) { this.processMode = processMode; }
0
static final void method872(int i, int i_0_, int i_1_, int i_2_, int i_3_, int i_4_, int i_5_) { anInt1554++; if (i_5_ >= Class369.anInt4960 && (i_4_ ^ 0xffffffff) >= (Class113.anInt1745 ^ 0xffffffff) && Class132.anInt1910 <= i_2_ && (i_3_ ^ 0xffffffff) >= (Class38.anInt513 ^ 0xffffffff)) { if...
7
private int combineTestStatus(int beforeMethodStatus, int testMethodStatus, int afterMethodStatus) { int finalStatus = ITestResult.SKIP; if (beforeMethodStatus == ITestResult.SUCCESS && testMethodStatus == ITestResult.SUCCES...
7
public void testIteratorPastEnds() { int size = 10; Data[] data = new Data[size]; for ( int i = 0; i < data.length; i++ ) { data[i] = new Data( i ); list.add( data[i] ); } ListIterator<Data> iter = list.listIterator(); Data current = list.getFirst...
7
@SuppressWarnings("unchecked") public ArrayList<Peer> update(String event, Manager manager) { this.event = event; if(this.event.equals("started")){ try { manager.getUpload(); } catch (IOException e) { this.downloaded = 0; this.uploaded = 0; } } else { manager.setDownloadUpload(thi...
9
private void answerEquation(){ //Attempt solution int answer; //Parse answerString as an integer try{ answer = Integer.parseInt(answerString); }catch(NumberFormatException nfe){ System.out.println("Please enter valid value."); answer = 0; return; } //If targeting yourself, make the power 0. ...
4
public void sendFirst() { System.out.println("-- Alice --"); if (MitM) { System.out.println("ACHTUNG: MitM aktiv!!!"); } // fingerprint werte aus datei auslesen fingerprint = new Fingerprint(new File("HashParameter")); // alice wählt p und g und sendet diese an bob getPrimeAndGenerat...
9
public void visit_i2d(final Instruction inst) { stackHeight -= 1; if (stackHeight < minStackHeight) { minStackHeight = stackHeight; } stackHeight += 2; }
1
public void writeBits(int amount, int value) { if (getAccessType() != AccessType.BIT_ACCESS) { throw new IllegalStateException("Illegal access type."); } if (amount < 0 || amount > 32) { throw new IllegalArgumentException("Number of bits must be between 1 and 32 inclusive."); } int bytePos = get...
6
protected Icon getIcon() { java.net.URL url = getClass().getResource("/ICON/state_expander.gif"); return new ImageIcon(url); }
0
public Adapter(Adaptee adaptee) { this.adaptee = adaptee; }
0
public void action_172() throws SemanticError { Identifier id = ControlVariables.identifiers.pop(); String idClassName = id.getClass().getSimpleName(); switch(idClassName){ case "Variable": Variable variable = (Variable) id; if (variable.getType().isEqual(IdType.VECTOR)) throw new SemanticError("veto...
7
private void addRow(Parameter Parameter){ String ParameterName = Parameter.getName(); String ParameterType = Parameter.getType(); String ParameterValue = Parameter.getValue(); boolean isRequired = Parameter.isRequired(); boolean isComplex = Pa...
9
public void cadastar(Medico medico) throws Exception{ if(medico.getNome().isEmpty()){ throw new Exception("Nome Invalido !!"); }else{ this.verificarNome(medico.getNome()); } if(medico.getCpf().equals(" . . - ")){ throw new Exception("CPF Invalido...
6
private static String converting(String[] end) { String conver = ""; for (int i = 0; i < end.length; i++) { int bin = sumOfArray(sumOfBinaryString(end[i])); conver += Base64.charAt(bin); } return conver; }
1
@Override public void update() { super.update(); Indicator indicator = null; for (int i = 0; i < indicators.size(); i++) { indicator = indicators.get(i); if (indicator != null) { indicator.update(); if (indicator.isDirty()) { ...
3
protected TreeNode<K, D> successor(TreeNode<K, D> node) { if (!isNil(node.getRightChild())) { return getMinNode(node.getRightChild()); } TreeNode<K, D> parent = node.getParent(); while (!isNil(parent) && node == parent.getRightChild()) { node = parent; ...
3
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...
6
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { resp.setContentType("text/html"); PrintWriter out = resp.getWriter(); String line = null; StringBuilder sb = new StringBuilder(); StringBuilder alertDiv = new StringBuilder(); String advisory = ""; try { URL url =...
7
public MyKey(String pankaj) { name = pankaj; }
0
protected <E> void findArray(String fieldName, Collection<E> rtn) throws SQLException { Data._findArray(this.tableName + "_" + fieldName, this.getId(), rtn); }
0
public Object nth(int position) { SListNode currentNode; if ((position < 1) || (head == null)) { return null; } else { currentNode = head; while (position > 1) { currentNode = currentNode.next; if (currentNode == null) { return null; } position--;...
4
public List<Integer> parts(int n) { int aTimesNPlusB = a_Times_n_Plus_b(n); for(int a = 1;a < n+1 || new ArrayList<Integer>().size() == 2; a++ ){ if (a == 1 || isPrime(a)) { if (isPrime(abs(b(n, aTimesNPlusB, a))) && allArePrimes(a, b(n, aTimesNPlusB, a), n)) { return asList(a, b(n, aTimesNPlusB, ...
8
public void loadPropertiesForClasses(LinkedList<String> classes){ try{ Properties props = new Properties(); String softwareProperties = System.getProperty(SOFTWARE_PROPERTIES); props.load(new FileInputStream(softwareProperties != null ? softwareProperties : HARD_CODED_SOFTWAR...
5
@EventHandler public void SkeletonFireResistance(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.getZombieConfig().getDouble("Skele...
7
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Identification that = (Identification) o; if (revision != that.revision) return false; if (!description.equals(that.description)) return false;...
9
public void updateResourceName(String rn) { if (miniMapHUD != null) { miniMapHUD.updateResourceName(rn); } }
1
public AngularBond getBond(Atom a, Atom b, Atom c) { if (isEmpty()) return null; synchronized (bonds) { for (AngularBond x : bonds) { if (x.atom3 == b) { if ((x.atom1 == a && x.atom2 == c) || (x.atom1 == c && x.atom2 == a)) return x; } } } return null; }
7
public static void init() { frame = new JFrame("VillageCraft"); frame.addKeyListener(Listener.universal); frame.addMouseListener(Listener.universal); frame.addMouseMotionListener(Listener.universal); frame.addMouseWheelListener(Listener.universal); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); fra...
0
public BFObject getNextFieldObject(int v, int h, Direction direction) { BFObject result = null; switch (direction) { case UP: if (v > 0) { result = getFieldObject(v - 1, h); } break; case DOWN: if (v < 8) { result = getFieldObject(v + 1, h); } break; case LEFT: if (h > 0) { r...
8
private void runWork(){ while(this.noStopRequested){ try{ this.idleWorkers.add(this); process(handoffBox.take());//接收数据进行处理 }catch(Exception e){ e.printStackTrace(); } } }
2
public void addDimension(Dimension dim) { dimensions.put(dim.getName(), dim); Object[] o = dimensions.values().toArray(); dimensionArray = new Dimension[dimensions.size()]; for (int i = 0; i < dimensions.size(); i++) { dimensionArray[i] = (Dimension)(o[i]); } }
1
public AidyCalender(String title) { super(title); for (int y = 1900; y < 2101; y++) { combo1.addItem(" " + new Integer(y).toString() + "年"); } for (int m = 0; m < 12; m++) { combo2.addItem(" " + stringMonthCn[m]); } buttonToday.setText("今 天"); setLayout(new FlowLayout()); add(panel1); add(pan...
6
private void onClickRB(ActionEvent e) throws Exception { cbRoute.removeAllItems(); LinkedList<Route> routes = calculator.getRoutes(); cbRoute.addItem("All"); if(e == null) { for(Route route : routes) { if((route.getType() + "").equalsIgnore...
8
@Test public void FireWeapons() { ship.setRng(new FixedRandom(0.7)); assertEquals(0, ship.fireGuns(1)); ship.setRng(new FixedRandom(0.5)); assertEquals(3, ship.fireGuns(1)); ship.setRng(new Random()); int hitCount = 0; ...
8
@Override public void applyEvidence(Corpus c, int T) { // error-check String doclabelStr = SideInfoType.DOCLABEL.infoName; assert(c.sideInfo.containsKey(doclabelStr)); for(int t : hashSeedTopics) assert(t >= 0 && t < T); // get document labels int[] doclabels = (int[]) c.sideInfo.get(doclabelStr)...
7
public static String insertRepresentation(String numS, String dateRep, String heureRep) throws BDException, BDExceptionParamError { String requete = null; PreparedStatement stmt = null; Connection conn = null; BDExceptionParamError errors = new BDExceptionParamError() ; String nomSpectacle = null ; try { ...
7
public static int singleNumberByHashSet(int[] A) { HashSet<Integer> hSet=new HashSet<>(); for(int i=0;i<A.length;i++) { if(hSet.contains(A[i])) hSet.remove(A[i]); else hSet.add(A[i]); } return hSet.iterator().next(); }
2
public void moveRIGHT() { x += Bullet_SPEED; if (x > 1800 || x<1 || y>900 || y<1){ //explode(); visible = false; if(x > 1351 && y>396 && y<600){ GameArea.scoreamount++; } } }
7
public boolean gameoverBust(Hand hand) { boolean gameOver = true; switch (hand.getOwner()) { case "split": setEnableSplitHand(false); gameOver = false; break; case "dealer": declareWinner(); break; ...
5
public void setMarq(int indice, int val){ tabMarq[indice] = val; }
0
public double[] do300baudFSKHalfSymbolBinRequest (CircularDataBuffer circBuf,int start,int bin0,int bin1) { double vals[]=new double[2]; // Get the data from the circular buffer double samData[]=circBuf.extractDataDouble(start,13); double datar[]=new double[FFT_64_SIZE]; // Run the data through a Blackman win...
3
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Event other = (Event) obj; if (id == null) { if (other.id != null) ...
6
public static double evaluateReciprocalRank( HashMap<String, HashMap<Integer,Double>> relevance_judgments, String path){ try { BufferedReader reader = new BufferedReader(new FileReader(path)); int count=0; String readLineString...
5
public UserListWindow(ClientGUI inter) { setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { mInterface.exit(); System.exit(0); } }); setBounds(100, 100, 166, 350); contentPane = new JPanel(); contentPane.setB...
1
public int theCount(int N, int muddyCount){ int[][][] dp = new int[N][muddyCount+1][3]; dp[0][0][1] = 1; for(int i=0; i<N-1; i++){ int bound = Math.min(i, muddyCount); for(int j=0; j<=bound; j++){ for(int r=0; r<3; r++){ dp[i+1][j][(r+1...
9
public static void main(String[] args) throws UnknownHostException, IOException, ParsingException, InterruptedException { MessageFactory factory = new V1MessageFactory(); System.out.println("local protocol: " + VersionMessage.PROTOCOL_VERSION); Socket s = new Socket("141.134.180.7", 8444); InputStream in = s...
3
public synchronized ValidationMessage[] validate(String prefix, String uri, PageData page) { try { this.uri = uri; // initialize messageVector = new Vector(); // save the prefix this.prefix = prefix; // parse parameters if nec...
4
private void preparePlayer() { if (m_timing) { m_timer = new Timer(1000, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { ((TimerLabel)lblClock0).tick(); } }); m_timer.start(); ...
9
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...
6
public String getQuery() { return this.query; }
0
protected void refreshTitle() { String title = DEFAULT_TITLE + " : " + getDescription(); setTitle(title); }
0
public final void normalise() { float m = getMagnitude(); if (m <= Utility.nearZero) m = 1; x /= m; y /= m; z /= m; if (Math.abs(x) < Utility.nearZero) x = 0.0f; if (Math.abs(y) < Utility.nearZero) y = 0.0f; if (Math.abs(z) < Utility.nearZero) z = 0.0f; }
4
public static boolean isQname(String s) { int len = s.length(); if (len == 0) return false; if (!isNameStartCharNs(s.charAt(0))) return false; for (int i = 1; i < len; i++) { char c = s.charAt(i); if (!isNameChar(c)) { if (c == ':' && ++i < len && isNameStartCharNs(s.char...
9
public String nextToken() throws JSONException { char c; char q; StringBuffer sb = new StringBuffer(); do { c = next(); } while (Character.isWhitespace(c)); if (c == '"' || c == '\'') { q = c; for (;;) { c = next(); ...
9
public void executeLastCommandBeforeLogin() { try { this.getClass().getMethod(this.lastCommandBeforeLogin, new Class[] {MenuItem.class}).invoke(this, this.lastCommandParams.toArray()); lastCommandBeforeLogin = null; lastCommandParams.clear(); } catch (SecurityException e) { e.printStackTrace(); } catc...
5
public int getSample() { if (!enabled) return 0; // Decrement Counter counter -= psg_cycles; // Counter Expired if (counter < 0) { // Toggle Amplitude Flip Flop amplitude_flipflop = !amplitude_flipflop;; // Update Frequency from ...
7
private Node parseAdditive() throws ScriptException { Node left = parseMultiplicative(); if (left == null) return null; Token token; while ((token = analyzer.getNextToken()) != null) { if (token.getType() != Operators.ADD && token.getType() != ...
4
public int stackSize() { switch (typecode) { case TC_VOID: return 0; case TC_ERROR: default: return 1; case TC_DOUBLE: case TC_LONG: return 2; } }
4
public HighScoreView(TetrisWorld tw) { myWorld = tw; myWorld.addObserver(this); this.setLayout(new GridLayout(6, 1)); this.setBackground(Color.DARK_GRAY); try { highScoreFile = new File("." + File.separator + "TetrisGA.txt"); highScoreFile.createNewFile(); highScoreReader = new BufferedReader(new F...
3
public Method findGetMethod(Field field) { if(field == null) return null; if(getFieldDetailStore().isGetMethodPresentFor(field)) { return getFieldDetailStore().getMethodOf(field); } String getterName = createMethodName("get", field.getName());...
4
public WorkLocation getCorrespondingWorkLocation(WorkLocation wl) { Colony original = wl.getColony(); // Insist that this is a scratch colony, and the work location // is in the original or vice versa. if (getName().equals("scratch" + original.getName()) || original.getName()...
8
public synchronized void deleteDrawFile() { if (useable.get() == false) { return; } // checkUseable(); final int count = useCounter.addAndGet(-1); if (count == 0) { if (cached && isCacheTooBig() == false) { return; } synchronized (toDelete) { deleteNow(); if (cached) { final boole...
7
public void render(IRenderContext target, SpriteSheet font, double offsetX, double offsetY, double scale, Color selectionColor, Color fontColor) { double y = offsetY; for (int i = 0; i < options.length; i++) { Color color = i == selectionIndex ? selectionColor : fontColor; y = target.drawString(options[i],...
2
public static String getInputStr(String strType, boolean checkFlag){ String readLine = readInput(); if(checkFlag){ if(strType.equals(CoreyangHelper.INPUT_TYPE_FILE)){ //check路径类型 if(filePathPreProc(readLine)){ return readLine; }else{ System.out.println("路径输入有误,请重新输入:"); return getInput...
7
private void recalculate(AZeit zeit, ZeitPunktResult r) { AZeit gesamtZeit=startZeit.vonNach(zeit);; char kontoVeraenderungPrefix; AZeit kontoveraenderung; AZeit restZeit; Config.ZeitAbschnitt[] a = Config.getAbschnitte(); AZeit produktivZeit=new Zeit(0); AZeit pausenZeit=new Zeit(0); Zeit abschnittEn...
9
public void renderInventory(Graphics g) { g.setColor(Color.black); g.fillRect(inv_window_start, 0, 226, 600); g.setColor(Color.red); g.fillArc(inv_window_start, 0, 226, 140, 0, 360); //create armor inventory int next = 0; for(int y = 0; y < arm_...
9
@Override public boolean equals(Object o){ if(o instanceof Pair){ Pair<?, ?> p = (Pair<?, ?>) o; if(getValueOne().equals(p.getValueOne()) && getValueTwo().equals(p.getValueTwo())){ return true; } } return false; }
7
public boolean criarLinhaVenda(Produto p, double quantidade, double desconto) throws ExceptionGerenteVendas { if (p != null && quantidade > 0 && desconto >= 0) { LinhaVenda lv = new LinhaVenda(); lv.setNomeProduto(p.getNome()); lv.setValorProduto(p.getValordeVenda()); ...
3
public void loadBlackjackData(File file) { this.tablesConfig = YamlConfiguration.loadConfiguration(file); ConfigurationSection tablesSection = this.tablesConfig.getConfigurationSection("tables"); try { Set<String> tables = tablesSection.getKeys(false); if (tables == null) { return; } for (Stri...
9
public List<Monster> zoekAlleMonsters() { List<Monster> monsters = new ArrayList<>(); try (Connection conn = DriverManager.getConnection(JDBC_URL)) { PreparedStatement queryAlleMonsters = conn.prepareStatement("SELECT * FROM MONSTER"); try (ResultSet rs = queryAlleMonsters.e...
3
public String getToolTipText(MouseEvent e) { // Check parsers for tool tips first. String text = null; URL imageBase = null; if (parserManager!=null) { ToolTipInfo info = parserManager.getToolTipText(e); if (info!=null) { // Should always be true text = info.getToolTipText(); // May be null image...
7
public void fireAttributesVisibilityChangedEvent(OutlinerDocument doc) { attributesVisibilityChangedEvent.setOutlinerDocument(doc); for (int i = 0, limit = outlinerDocumentListeners.size(); i < limit; i++) { ((OutlinerDocumentListener) outlinerDocumentListeners.get(i)).attributesVisibilityChanged(attributesVisib...
1
public static String formatOutputName(String fileName, String prefix, boolean gzipped) { String rgx = "^.*\\.[tar\\.]?gz$"; boolean hasGzip = Pattern.matches(rgx, fileName); fileName = (gzipped && !hasGzip) ? String.format("%s%s", fileName, GZIP_EXT) : fileName.replaceAll("\\.tar\\.gz$", GZIP_EXT); in...
3
public boolean compareId(Object o) { if (o == null) return false; //if (!o.modelImplementation().equals(type)) return false; String id = factory.getCache().getModelId(type); Class idType = factory.getCache().getModelIdType(type); if (!o.getClass().equals(idType)) return false; if (idType == I...
6
private void getNode(NodeList nodeList, List<String> path, int pathDepth) throws XmlPathNotFoundException { for (int i = 0; i < nodeList.getLength(); i += 1) { Node node = nodeList.item(i); // get rid of {enter}, the empty node if (node.getNodeType() != Node.ELEME...
5
public void setNote(String note) { this.note = note; }
0
public HsqlCharacterDao(HsqlUnitOfWork uow) { super(uow); try { Connection connection = uow.getConnection(); stmt = connection.createStatement(); ResultSet rs = connection.getMetaData().getTables(null, null, null, null); boolean exists = false; while(rs.next()) { if("product".equalsIg...
4