text
stringlengths
14
410k
label
int32
0
9
public int getM(String word){ int m = 0; String vc = ""; if(word != null){ for (int i = 0; i < word.length(); i++) { char charAtIndex = word.charAt(i); char vcChar =vcTrans(charAtIndex); if(vcChar == 'y'){ if(i>0 && vcTrans(word.charAt(i-1)) == 'c'){ vc.concat("v"); }else{ vc.conc...
8
public boolean isMatch(String s, String p) { boolean[] a = new boolean[s.length()+1]; boolean[] b = new boolean[s.length()+1]; a[0] = true; for (int j=1; j<=s.length(); j++) a[j] = false; for (int i=1; i<=p.length(); i++) { char cp = p.charAt(i-1); ...
8
public Car driverCar() { return new Audo(); }
0
public void sort (int[] a){ if (a==null || a.length<=1){ return; } int max = a[0]; for (int i=1; i<a.length; i++){ max = Math.max(max, a[i]); } int ten=1; int[] aux = new int[a.length]; int [] count = new int[10]; while (t...
9
public void test_getValue_long_long() { assertEquals(0, iField.getValue(0L, 567L)); assertEquals(12345678 / 90, iField.getValue(12345678L, 567L)); assertEquals(-1234 / 90, iField.getValue(-1234L, 567L)); assertEquals(INTEGER_MAX / 90, iField.getValue(LONG_INTEGER_MAX, 567L)); try...
1
public void fitBoundsToLayers() { int width = 0; int height = 0; Rectangle layerBounds = new Rectangle(); for (int i = 0; i < layers.size(); i++) { getLayer(i).getBounds(layerBounds); if (width < layerBounds.width) width = layerBounds.width; if (heig...
3
public void polynomialFit(int n){ if(this.nAnalyteConcns<(n+2))throw new IllegalArgumentException("Method polynomialFit(" + n +") requres at least " + (n+2) + " data points; only " + this.nAnalyteConcns + " were supplied"); this.methodUsed = 2; this.sampleErrorFlag = true; this.degSet = ...
5
public final FEMFormatter putParams(final Iterable<? extends FEMFunction> params) throws NullPointerException, IllegalArgumentException { final Iterator<? extends FEMFunction> iter = params.iterator(); if (iter.hasNext()) { FEMFunction item = iter.next(); if (iter.hasNext()) { this.putIndent().put("(").pu...
5
String get_rep2() { switch( action_type ) { case SS_ACTION_CUT: return "CUT(" + arg + ")"; case SS_ACTION_ZERO: return "ZERO(" + arg + ")"; case SS_ACTION_RANGE_ERROR: return "RANGE_ERROR"; case SS_ACTION_RESTART: return "RESTART"; case SS_ACTION_DONE: return "DONE"; case SS_ACTION_NEGATE: ...
6
@Override public float contains( int x, int y ) { if( boundaries.contains( x, y ) ){ return 1.f; } else{ return 0.f; } }
1
@EventHandler public void onPlayerInteract (PlayerInteractEvent event) { Player player = event.getPlayer(); Block block = event.getClickedBlock(); if (event.getAction() == Action.LEFT_CLICK_BLOCK && player.getItemInHand().getType() == Material.BLAZE_ROD) { player.setMetadata("x1", new FixedMetadataValue(plug...
9
public void handle(CollisionEvent event) { ArrayList<OperateShape> shapes = event.getTarget(); for (MoveShape shape : shapes) { if (shape instanceof Circle) { switch (event.getEdgeType()) { case RIGHT: shape.setAngle(180 - (shape.getAngle())); break; case LEFT: shape.setAngle(180 - (sh...
9
public static JDialog createDialog(Component c, String title, boolean modal, final JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener) throws HeadlessException { final Color initialColor = chooserPane.getColor(); Window window = getWindowForComponent(c); final JDialog r...
8
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
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((code == null) ? 0 : code.hashCode()); return result; }
1
public void func_73707_e() { if (!field_73713_b.isFile()) { return; } BufferedReader bufferedreader; try { bufferedreader = new BufferedReader(new FileReader(field_73713_b)); } catch (FileNotFoundException filenotfoundexceptio...
7
public static void main(String [] args) { try { //System.err.println("DBThread Runs"); Class.forName("com.mysql.jdbc.Driver"); connect = DriverManager.getConnection("jdbc:mysql://localhost/cdr_data?user=root&password=root"); preparedStatement = connect.prepare...
3
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed PrintWriter settings = null; try { settings = new PrintWriter(System.getProperty("user.home")+"/Documents/AcerX/settingsYM.txt", "UTF-8"); settings.println(jTextField1....
3
private static boolean isDigit(int c) { return '0' <= c && c <= '9'; }
1
public boolean displayModesMatch(DisplayMode m1, DisplayMode m2){ if(m1.getWidth() != m2.getWidth() || m1.getHeight() != m2.getHeight()){ return false; } if(m1.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI && m2.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI && m1.getBitDepth() != m2.getBitDepth()){ return fal...
8
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
public boolean isOnBorder(int x, int y) { if (selectedX + x >= tileWidth) { return true; } else if (vectorToId(selectedX + x, selectedY) >= inv.getItems() .size()) { return true; } return false; }
2
private void initLog4J() { logger.setLevel(Level.INFO); Logger.getRootLogger().addAppender(new ConsoleAppender(new PatternLayout("%d %-5p [%c] - %m%n"))); try { if(logfile != null) Logger.getRootLogger().addAppender(new FileAppender(new PatternLayout("%d %-5p...
3
public void setOptions(String[] options) throws Exception { setDebug(Utils.getFlag('D', options)); String classIndex = Utils.getOption('c', options); if (classIndex.length() != 0) { if (classIndex.toLowerCase().equals("last")) { setClassIndex(0); } else i...
9
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (active(request)) //if there is an active user { if (request.getRequestURI().equals(request.getContextPath() + "/followers")) //if there is no string after followers/ { List<User> ...
3
public static String getString(String expression) { String result = ""; for (int i = 0; i < expression.length(); i++) { if (expression.charAt(i) == '#') { result += getRandomString(true, false, false, 1); } else if (expression.charAt(i) == '*') { ...
8
private static final int method3961(Class70 class70, int i) { if (i != 2) aFloatArray9797 = null; if (Class342.aClass70_4247 == class70) return 2; if (class70 == Class285_Sub2.aClass70_8503) return 0; if (Class318_Sub1_Sub2.aClass70_8737 != class70) { if (Class348_Sub40_Sub39.aClass70_9485 == class7...
5
private boolean isChar(char c) { return 'a' <= c && 'z' >= c || 'A'<=c && 'Z' >=c || '0' <= c && '9' >= c ; }
5
private static int digitSum(String bigInt){ int sum = 0; for(char c:bigInt.toCharArray()){ sum+=Integer.parseInt(""+c); } return sum; }
1
String convert(String s, int nRows){ if(nRows<=1) return s; StringBuffer result = new StringBuffer(); if(s.length()==0) return ""; for(int i=0;i<nRows;i++){ for(int j=0,index =i; index<s.length();j++,index=(2*nRows-2)*j+i){ result.append(s.charAt(index)); ...
7
@Test public void testGetAllTiles() { System.out.println("getAllTiles"); Tile newtile=new Tile(); Tile[][] store=new Tile[3][3]; for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ store[i][j]=newtile; } } map.MapArray=store; Ti...
2
public static AbstractCarriage generateFreightCarriage() { AbstractCarriage carriage = null; try { carriage = FreightCarriageFactory.newCarriage( new RandomEnum<FreightCarType>(FreightCarType.class).random(), generateId(), generateNumber(), generateMaxCapacity()); ((AbstractFreightCarriage...
1
public int getLowestX() { int x = a[0]; if(b[0] < x) { x = b[0]; } if(c[0] < x) { x = c[0]; } if(d[0] < x) { x = d[0]; } return(x); }
3
private void checkVersion(int[] requiredVersion) throws IOException { if (m_registryVersion == null) { m_registryVersion = requiredVersion; } else if (requiredVersion != null) { for (int i = 0; i < requiredVersion.length; i++) { if (m_registryVersion[i] != requiredVersion[i]) { ...
4
private static int max(int[] histogram) { int max = 0; for (int i = 0; i < histogram.length; i++) { if (histogram[i] > max) max = histogram[i]; } return max; }
2
protected void addNewChat() { String chatContent = chatInputJTxa.getText(); DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm a"); Date date = new Date(); if (!(chatContent == null || chatContent.isEmpty())) { //chatHistoryDLM.addElement(userLogin.getName() + " (" + dateFormat.format(date) + "):...
3
private void validate() { if (majorVersion()<0 || year()<0 || month()<0 || minorVersion()<0) throw new IllegalArgumentException("No components of a version" + " number may be negative."); if (year() > 99) throw new IllegalArgumentException("The second numb...
9
public static void main(String[] args) { HelloWorld hw = new HelloWorld(); hw.printHelloWorld(); System.out.println(args[0]); System.out.println(args[1]); System.out.println(args[2]); HelloWorldWithMethod hw2 = new HelloWorldWithMethod(); hw2.he...
3
public boolean displayModesMatch(DisplayMode mode1, DisplayMode mode2) { if (mode1.getWidth() != mode2.getWidth() || mode1.getHeight() != mode2.getHeight()) { return false; } if (mode1.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI && mode2...
8
private void closeIfNotKeepAlive() { if ("close".equals(getFirstHeader("connection"))) { requestClose(false); } }
1
private int[] getSq() { int startRow = row/SQ_SIZE * SQ_SIZE; int startCol = col/SQ_SIZE * SQ_SIZE; int[] sqNumbers = new int[SIZE]; int count = 0; for (int i = 0; i < SQ_SIZE; i++) { for (int j = 0; j < SQ_SIZE; j++) { sqNumbers[count] = grid[startRow + i][startCol + j]; count++; ...
2
public static void beginButtonAction() { running = true; factories = new ArrayList<Factory>(); customers = new ArrayList<Customer>(); factoryCount = maxFactoryCount; customerCount = maxCustomerCount; factoryClock = new Signal(); factoryStore = new FactoryStoreSignal(); // construct store customerSt...
5
private void cargarSetPrueba(){ DefaultTableModel temp = (DefaultTableModel) this.tablaSetPruebas.getModel(); String csvFile = "dataset/diabetes_prueba.csv"; BufferedReader br = null; String line = ""; String cvsSplitBy = ","; try { double maximo0 = normalizacion.obtenerMaximo(0, csvFile); doubl...
9
public File askForTargetArchive(File def) { JFileChooser chooser = new JFileChooser(); chooser.setFileFilter(new FileFilter() { public boolean accept(File f) { if(f.isDirectory()) return true; else{ A...
4
public void removePreferences(String module) { String prefix = module + '.'; ArrayList<String> list = new ArrayList<>(); int length = prefix.length(); for (Enumeration<Object> keys = mPrefs.keys(); keys.hasMoreElements();) { String key = (String) keys.nextElement(); if (key.startsWith(prefix)) { lis...
4
public void addPropertyTablesToJoin(ObjectStack propertyStack) { boolean propertiesFound = false; List<ObjectRepresentation> allReps = propertyStack .getAllRepresentations(); for (ObjectRepresentation rep : allReps) { if (!propertiesFound) { if (rep.getNonNullPropertyCount() > 0 || rep.isArray())...
6
private void produceHumidity() { Perlin noise = new Perlin(); try { noise.setOctaveCount(octaves); } catch (Exception e) {e.printStackTrace();} noise.setFrequency(frequency); noise.setSeed(seed); if (details) System.out.println("Noise produced."); int dimx = MyzoGEN.DIMENSION_X * chunksX; int dimy =...
9
private PreparedStatement createQuery(String prefix, Connection con, Set<Key> keys, int count) { List<Object> parms = new ArrayList<>(); List<Column> pk = getPk(); StringBuilder sb = new StringBuilder(); int rowIndex = 0; for (Key key : new HashSet<>(keys)) { keys.rem...
7
public static void saveMeetingRoom(MeetingRoom mr){ try { if(conn == null || conn.isClosed()){ conn = DatabaseConnection.getConnection(); } } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { conn.setAutoCommit(false); ...
4
static void browseDump(ClassFile cls) { String[] ix = cls.browseInterfaces(); String[] fx = cls.browseFields(); String[] mx = cls.browseMethods(); String[][] mf = cls.browseFieldrefs(); String[][] mm = cls.browseMethodrefs(); String[][] mi = cls.browseInterfaceMethodrefs(); Str...
7
@Override public void handleRequest(int request) { if (request == 1) { System.out.println("ConcreteHandlerA handleRequest " + request); } else if (mSuccessor != null) { mSuccessor.handleRequest(request); } }
2
private List<DBObject> ConstructYahooObj(List<String> finvizReturn, String Ticker) { LinkedList<DBObject> MongoObjList = new LinkedList<DBObject>(); int headerFlag = 0; String[] headers = new String[]{""}; for (String finvizValues : finvizReturn){ if (headerFlag == 0){ ...
4
public Transaction transactionWLockOnVar(int index) { for (Transaction t: locks.keySet()) { ArrayList<Lock> lockListT = locks.get(t); for (Lock lock: lockListT) { if(lock.getIndex()==index && lock.isWrite()) { return t; } } } return null; }
4
public List<Position> getPath3(int x, int y){ try{ Pattern pattern= Pattern.compile("(\\d+)"); List<Position> posList= new ArrayList<>(); int X,Y = 0; if(posicao(pacmanX(),pacmanY())){ String str=intelFant(x, y, pacmanX(), pacmanY(),"path"); ...
4
private static void copyToZip(ZipOutputStream output, File from, boolean keepManifest) throws IOException { ZipFile input = new ZipFile(from); Enumeration<? extends ZipEntry> entries = input.entries(); while (entries.hasMoreElements()) { try { ZipEntry entry = entries.nextElement(); if (!keepManif...
6
private String ExtractIdFromLink(String partialLink) { int beginIdx = partialLink.indexOf(ID_PREFIX)+ID_PREFIX.length(); int endIdx = partialLink.indexOf("-", beginIdx); String id = endIdx != -1 ? partialLink.substring(beginIdx, endIdx) : partialLink.substring(beginIdx); return id; }
1
public boolean onItemUse(ItemStack var1, EntityPlayer var2, World var3, int var4, int var5, int var6, int var7) { if(var7 != 1) { return false; } else { ++var5; BlockBed var8 = (BlockBed)Block.bed; int var9 = MathHelper.floor_double((double)(var2.rotationYaw * 4.0F / 360....
9
private static float commonOverPrintAlpha(float alpha) { // if alpha is already present we reduce it and we minimize // it if it is already lower then our over paint. This an approximation // only for improved screen representation. if (alpha != 1.0f && alpha > OVERPAINT_ALPHA) { ...
3
@Override public String toString() { StringBuffer sb = new StringBuffer(28); if (hardwareType != HTYPE_ETHER) { // append hType only if it is not standard ethernet sb.append(this.hardwareType).append("/"); } for (int i=0; i<hardwareAddress.length; i++) { if ((hardwareAddress[i] & 0xff) < 0x10) sb...
4
@Override public void keyPressed(KeyEvent e) { int key = e.getKeyCode(); String keyEvent = ""; if (key == KeyEvent.VK_LEFT) { keyEvent = "VK_LEFT"; } if (key == KeyEvent.VK_RIGHT) { keyEvent = "VK_RIGHT"; } if(keyEvent != "" && started){ SnakeUserMessage SUM = new SnakeUserMessage(Player, key...
5
final private void createAndAddVariable(String variableRepresentation) throws InvalidInputException { //ignore empty variable names if (variableRepresentation.trim().equals("")) { return; } //find the variable and then add it to the tokenized expression for (int variableIndex = 0; variableIndex < this....
3
public void setHelloWorld(String helloWorld) { this.helloWorld = helloWorld; }
0
static void testValidity(Object o) throws JSONException { if (o != null) { if (o instanceof Double) { if (((Double)o).isInfinite() || ((Double)o).isNaN()) { throw new JSONException( "JSON does not allow non-finite numbers."); ...
7
public void adjustBeginLineColumn(int newLine, int newCol) { int start = tokenBegin; int len; if (bufpos >= tokenBegin) { len = bufpos - tokenBegin + inBuf + 1; } else { len = bufsize - tokenBegin + bufpos + 1 + inBuf; } int i = 0, j = 0, k = 0; int nextColDiff = ...
6
public void loadMap(String s) { try { InputStream in = getClass().getResourceAsStream(s); BufferedReader br = new BufferedReader(new InputStreamReader(in)); numCols = Integer.parseInt(br.readLine()); numRows = Integer.parseInt(br.readLine()); map = new int[numRows][numCols]; width = numCols * til...
3
public String ex_string(String buff, int item, String sep) { String result = null; int ptr1 = 0; int ptr2 = 0; int cpt = 0; int next = 0; if ( item > 1) while ( cpt < item -1) { ptr1 = buff.indexOf(sep, next); //search the tag preceeding area cpt++; next = ptr1+1; } else ptr1 = 0; //...
9
synchronized public static void setEarthRadius(double radius, LengthUnit unit) { EARTH_RADIUS = new double[LengthUnit.values().length]; for (LengthUnit toUnit : LengthUnit.values()) { EARTH_RADIUS[toUnit.ordinal()] = unit.convertTo(toUnit, radius); } }
1
private void idCmbxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_idCmbxActionPerformed String id = ""; tableModel.setRowCount(0); if (idCmbx.getSelectedItem() != null && idCmbx.getSelectedIndex() != 0) { id = idCmbx.getSelectedItem().toString(); if (!...
7
public void updateTheory(final List<Rule> rulesToAdd, // final Set<String> rulesToDelete, // Map<String, List<Rule>> oldNewRuleMapping) throws TheoryException { if (null != rulesToDelete) { for (String ruleLabel : rulesToDelete) { removeRule(ruleLabel); } } if (null != rulesToAdd) { for (Rule r...
7
@SuppressWarnings("deprecation") public void testConstructor_RP_RP6() throws Throwable { YearMonthDay dt1 = new YearMonthDay(2005, 7, 17); TimeOfDay dt2 = new TimeOfDay(10, 20, 30, 40); try { new Period(dt1, dt2); fail(); } catch (IllegalArgumentException ex) ...
1
public Report cleanupDirs(Report report) throws IOException { List<Path> newDirectories = new ArrayList<Path>(); for (Path path : report.getNewDirectories()) { newDirectories.add(path); } Collections.sort(newDirectories, new Comparator<Path>() { @Override public int compare(Path o1, Path o2) { ...
6
@Override public void run() { int i = 0; for (String line : linesToCheck) { try { boolean recursive = false; if (DNSChecker.CheckedReflectors.containsKey(line)) { continue; } int size = Integer.parseInt(...
6
private boolean correctSyntax(String format, String assemblyLine, ArrayList<String> relevantOperands) { String[] formatSplit = format.split("\\s+"); int noOfTokens = formatSplit.length; String regex = ".*"; int i = 1; int i2 = 0; for (String str : formatSplit) { if(i > 1 && i <= noOfTokens) r...
6
public UpdateModule(){ setAuthor("Sinrel Group"); setName("GameUpdater"); setVersion("1.0.0"); }
0
public int getY() { return y; }
0
private void checkPoint() { // Ball went past left side if (ball.getX() + ball.getWidth() / 2 < 0) { ballSleep = Calendar.getInstance().getTimeInMillis() + POINT_DELAY; ball.setPos(paddles[0].getX() + paddles[0].getWidth() / 2 + ball.getWidth() / 2, paddles[0].getY()); ball.setXSpeed(- ball.getXSpeed())...
4
public int getColumnCount() { // TODO Auto-generated method stub return 0; }
0
public static String[] searchHistory(Integer ID,String changed, String name) { Database db = dbconnect(); String [] Array = null; try { String query = ("SELECT * FROM ticket_history WHERE ticket_TID = ? " + "AND changed_on = ? AND column_name = ?"); ...
2
public void update() { if (listBadgeNames.getSelectedValue() == null) { return; } clearErrors(); if (txtBadgeName.isMessageDefault() || txtBadgeName.getText().isEmpty()) { Util.setError(lblNameError, "Advancement name cannot be left blank"); return; ...
9
public Terrain getTerrainAt(int x, int y) { System.out.println("TERRAIN AT "+x+" "+y+" "+tmap[x][y]); if (tmap[x][y].ground) { return tmap[x][y]; } for (int i=x-1; i<=x+1; ++i) { for (int j=y-1; j<=y+1; ++j) { //System.out.println("TERRAIN AT "+i+" "+j+" "+tmap[i][j]); try { if (tmap[i...
5
public void lueFunktio() throws IllegalStateException { if (!merkkiOsaTunnusta()) { throw new IllegalStateException(); } int aloituspaikka = paikka; siirryTunnuksenLoppuun(); Funktio lisattava = kirjasto.haeFunktio( s...
3
public String createEnvironment() { // returns a string containing a fully written out environment for this // datasource StringBuilder sb = new StringBuilder(); sb.append( TAB + TAB + "<environment id=\"" + this.environmentName + "\">\n" ); sb.append( TAB + TAB...
3
public String getToken() { if (token == null) { token = out.toString(); } return token; }
1
private GraphModel groupHelpVertexes(GraphModel newGraph, int K) { ArrayList<GraphPoint> p = new ArrayList<GraphPoint>(); for (Vertex v : newGraph.getVertexArray()) { // Alle Punkte, die 'noch zu Relokalisieren' sind (Hilfspunkte) // werden gesammelt... if (v.getLabel().equals("noch zu Relokalisieren")) ...
8
public static void saveHouseInt() { String output ="savedata/"+idString+".houseaninteger"; try { PrintWriter fout=new PrintWriter(new FileWriter(output)); if(VERSION.equals("Peaches")) fout.println("PDAE"+idString); else fout.println("CDAE"+idString); fout.println(houseInt); fout.close(...
2
public String[][] productdata(JXTreeTable treeTable, Boolean[] bflag) { String[][] datas = new String[treeTable.getRowCount()][treeTable .getColumnCount() + 1]; for (int i = 0; i < treeTable.getRowCount(); i++) { for (int j = 0; j <= treeTable.getColumnCount(); j++) { if (j < treeTable.getColumnCount()) ...
4
public boolean isFPSStatus() { if(frame == null) buildGUI(); return fpsStatus.isSelected(); }
1
private boolean zzRefill() throws java.io.IOException { /* first: make room (if you can) */ if (zzStartRead > 0) { System.arraycopy(zzBuffer, zzStartRead, zzBuffer, 0, zzEndRead-zzStartRead); /* translate stored positions */ zzEndRead-= zzStartRe...
5
private static void indent(StringBuffer buf, int depth) { for (int i = 0; i < depth; i++) { buf.append("\t"); } }
1
@Basic @Column(name = "FES_ID_FUNCIONARIO") public Integer getFesIdFuncionario() { return fesIdFuncionario; }
0
@Override public Object getValueAt(int row, int col) { switch (col) { case 0: return entidades.get(row).getUsuario().getNome(); case 1: return entidades.get(row).getDataInicio().toLocalDate().toString(); case 2: return entid...
4
public void setStage() { //Initial set up before any level starts //System.out.println("size=" + brickList.size()); brickList = null; brickList = new ArrayList<Brick>(); powerList.clear(); for (int i = 0; i < stage.length; i++) { //System.out.println(stage[i][0]); ...
8
public void doit(JvstCodeGen gen, Bytecode bytecode, ASTList args) throws CompileError { int num = gen.getMethodArgsLength(args); if (num != dimension) throw new CompileError(Javac.proceedName + "() with a wrong number of parameters");...
3
private int getConstructorType(StructuredBlock body) { /* * A non static constructor must begin with a call to another * constructor. Either to a constructor of the same class or to the * super class */ InstructionBlock ib; if (body instanceof InstructionBlock) ib = (InstructionBlock) body; else ...
9
public String getPopupWarning() { if (this.description == null) return null; if (this == SNAPSHOT) return "Are you sure you want to enable development builds?\nThey are not guaranteed to be stable and may corrupt your world.\nYou are advised to run this in a separate directory or run regular backups."; if (...
4
private Representation execute() { Representation repr = null; // Get context Context context = getContext(); // generate the DatabaseRequest DataSetApplication datasetApp = (DataSetApplication) getApplication(); DataSetExplorerUtil dsExplorerUtil = new DataSetExplorerUtil(datas...
4
public SaveRunnable(MainClass mainClass) { FileUtil.checkAutoSaveConfigYAML(); SavedMSG = LangUtil.getSavedMSG(); SavingMSG = LangUtil.getSavingMSG(); if(!SavingMSG.equals("%NONE%")){ saving = true; } if(!SavedMSG.equals("%NONE%")){ saved = true; } }
2
public void decoder(int[] octets_data){ /* if (taille == 3){ capt_distri = (octets_data[0] & 0xC0) >>> 6; sonar_droit = (octets_data[0] & 0x20) >>> 5; sonar_gauche = (octets_data[0] & 0x10) >>> 4; etat_match = (octets_data[0] & 0x8) >>> 3; couleur_table = (octets_data[0] & 0x4) >>> 2; type_bal...
0
public void setVisible(boolean visible) { if(frame == null) buildGUI(); frame.setVisible(visible); }
1
public void close() { if (bdl != null) { bdl.close(); } if (server != null) { server.close(); } isConnected = false; boolean retry = true; while (retry) { try { join(); retry = false; ...
4