method_id
stringlengths
36
36
cyclomatic_complexity
int32
0
9
method_text
stringlengths
14
410k
5ba17eaf-e28d-41ef-8402-bbc1c799f5c2
1
private void compute_pcm_samples1(Obuffer buffer) { final float[] vp = actual_v; //int inc = v_inc; final float[] tmpOut = _tmpOut; int dvp =0; // fat chance of having this loop unroll for( int i=0; i<32; i++) { final float[] dp = d16[i]; float pcm_sample; pcm_sample = (float)(((vp[1 + d...
73a9c962-2278-4257-9063-e4b4094c4f0b
7
public void testPresent7() { try { TreeNode tree = new TreeNode("root", 2); tree.branch[0] = mkChain(new String[]{ "label1", "label2" }); tree.branch[1] = mkChain(new String[]{ "label3", "label4" }); TreeNode result = contains(tree, new TreeNode("label3")); ...
a14af8bd-a7e9-45ea-b013-d707ab8d6f88
1
public void testSetIntoIntervalEx_Object_Chronology1() throws Exception { MutableInterval m = new MutableInterval(-1000L, 1000L); try { StringConverter.INSTANCE.setInto(m, "", null); fail(); } catch (IllegalArgumentException ex) {} }
e6857047-3cd8-467b-aeee-c921432c6f84
9
int insertKeyRehash(long val, int index, int hash, byte state) { // compute the double hash final int length = _set.length; int probe = 1 + (hash % (length - 2)); final int loopIndex = index; int firstRemoved = -1; /** * Look u...
e8020692-1bd3-4c83-9259-5f64b91c3ac4
7
public void auswerten(){ int gewinnerID = 10; int angebot = 99999999; for(int i=0; i < spieler.length; i++){ if(spieler[i].getX(i) - spieler[i].getRange(i) < pos_x && pos_x < spieler[i].getX(i) + spieler[i].getRange(i) && spieler[i].getY(i) - spieler[i].getRange(i) < pos_y && pos_y < spieler[i].getY(i) +...
edef2792-867a-4a44-9956-adbee20c6baf
1
void addCSSIfAvailable(Parent parent) { URL uri = getClass().getResource(getStyleSheetName()); if (uri == null) { return; } String uriToCss = uri.toExternalForm(); parent.getStylesheets().add(uriToCss); }
6ff8fb5b-c9dc-4aeb-9e60-b7226073329d
0
public void moveLeft() { x -= walkSpeed; }
b2c84b0d-91fe-448b-8ea8-74b0f219b80d
7
public void assemblePacket() { byte[] tokenenc = new byte[0]; byte[] sharedsecretenc = new byte[0]; try { tokenenc = this.encode(this.token); sharedsecretenc = this.encode(this.sharedsecret); } catch (InvalidKeyException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch ...
27b47ff1-0946-4540-a5ff-b6576b5dd80b
2
private int getBlockIntensity(int x, int y) { int averageIntensity = 0; for (int i = x; i < scale + x; i++) { for (int j = y; j < scale + y; j++) { averageIntensity += getIntensity(i, j); } } return averageIntensity / (scale * scale); }
187422f4-748b-429a-a882-cd2a681534b4
7
final int method1142(int i, float f) { if (i == 0) { float f1 = (float) anIntArray2042[0] + (float) (anIntArray2042[1] - anIntArray2042[0]) * f; f1 *= 0.003051758F; aFloat2044 = (float) Math.pow(0.10000000000000001D, f1 / 20F); anInt2039 = (int) (aFloat2044 * 6553...
eec9f360-bd58-42ad-952d-3da252555018
8
@Override public void keyPressed(KeyEvent ke) { if (ke.getSource() == sessaoLogin.getInputUser()) { if (ke.getKeyCode() == KeyEvent.VK_ENTER) { user = sessaoLogin.getInputUser().getText(); sessaoLogin.getInputPass().requestFocus(); } } else if ...
9b18f298-0352-4240-b765-88fd32784c0f
4
public void iDCT(double[][] input, double[][] output) { double total = 0.0; for(int i = 0; i < 8; i++) { for(int j = 0; j < 8; j++) { for(int u = 0; u < 8; u++) { for(int v = 0; v < 8; v++) { total += C(u) * C(v) * input[u][v] * Math.cos(((2*i + 1) * v * Math.PI)/16.0) * Math.cos...
9d101f31-6632-4d59-a989-6f14e5305274
8
private void search(final String query, final String type) { Toolkit.getDefaultToolkit().beep(); new Thread((new Runnable() { public void run() { try { JComponent panel2 = null; String searchKey = query; panel2 = makeTextPanel(searchKey,type,jTabbedPane.getTabCount()); if (type.equals("...
3b5d24f9-3ae2-4397-9ba7-1c488bd1c085
7
private void pullUp(DockLayoutNode node) { if (mParent != null) { if (mParent.mChildren[0] == this) { mParent.mChildren[0] = node; } else if (mParent.mChildren[1] == this) { mParent.mChildren[1] = node; } if (node instanceof DockLayout) { ((DockLayout) node).mParent = mParent; } else if (no...
7ec86712-4f75-49e3-a222-c13fd83dae86
0
public static String getLogin() { return login; }
3f92f309-fe51-4f0e-a661-2afe33e1a9c0
3
public void showArrows( TopicLabel focus, Collection<String> broaderIDs, Collection<String> narrowerIDs ) { for (Component t : this.getComponentsInLayer(TOPICS_LAYER)) { String id = ((TopicLabel) t).getID(); if (narrowerIDs.contains(id)) { this.showArrow(focus, (TopicLabel) t); } else if (bro...
ea9b8df5-d87b-42d6-9ed0-58db9223a6b9
8
public static void main(String[] args)throws IOException{ int input_lines,size = 0; commands cache_call; String[] input = new String[3]; String key,value; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); input_lines = Integer.parseInt(br.readLine()); while(input_lines > 0){ inp...
c63235c4-0fc2-4078-842b-c78fecebb958
4
double rate(Board board) { final int width = board.getWidth(); final int maxHeight = board.getMaxHeight(); int holes = 0; // Count the holes, and sum up the heights for (int x=0; x<width; x++) { final int colHeight = board.getColumnHeight(x); int y = colHeight - 2; // addr of first possible hole ...
f187f5c4-1dca-40df-b4ae-49d68e3d0fca
3
public int[] computeDotArray() { int[] dotArray = new int[NCELLS * NCELLS]; int index = 0; for (int row = 0; row < NCELLS; row++) { for (int col = 0; col < NCELLS; col++) { if (grid.cells[row][col].containsDot) { dotArray[index++] = 1; } else { dotArray[index++] = 0; } } } retur...
bf945ee1-af0f-49d2-b1cb-c2bd85eed592
2
@Override public int hashCode() { int hash = 7; hash = 37 * hash + (this.location != null ? this.location.hashCode() : 0); hash = 37 * hash + (this.direction != null ? this.direction.hashCode() : 0); return hash; }
203a1780-f09a-4b88-b639-dfd251009518
0
public static void startCheck(Side sideToCheck) { final Thread thread = new Thread(ThreadVersionCheck.instance); thread.start(); }
09de9450-996d-44a6-849c-c98102606760
8
public static void requestPlayerTeleportToYou( String player, String target ) { final BSPlayer bp = PlayerManager.getPlayer( player ); final BSPlayer bt = PlayerManager.getSimilarPlayer( target ); if ( playerHasPendingTeleport( bp ) ) { bp.sendMessage( Messages.PLAYER_TELEPORT_PENDIN...
cd68f533-3f0f-48f8-8a9f-e61c688d1ffa
1
public String getUserName(){ if (user!=null) return user.getName(); return null; }
67fb0204-238e-4598-8a60-c6df58b914f2
3
private boolean validateInput(String subject, String verb, String complement) { if (subject.trim().length() == 0 || verb.trim().length() == 0 || complement.trim().length() == 0) return false; else return true; }
8c61a90e-9cba-485b-9d66-53a7708bb6e5
7
@Override public void drawSolutionk(Graphics2D drawingArea, int... args) { if (args.length != 5) throw new IllegalArgumentException( "number of parameters different of 5"); if (args[3] != 0) { drawingArea.drawRect(args[0], args[1], args[2], args[2]); ...
9f1e1e72-7261-49c5-9dee-3e06aa41bb80
4
public static boolean isAtoZor1To10(String s) { char c = s.toCharArray()[0]; if (('0' <= c && c <= '9') || ('A' <= c && c <= 'Z')) return true; else return false; }
ed07438b-52dc-4a83-b1a4-7bc0b9fce45a
0
private Universe() { }
7e8b6ab1-4808-434c-946d-0137e5d4ea6a
4
@Override public void actionPerformed(ActionEvent e) { // if (e.getSource() == this.view.getCreateGameButton()) { // LOGGER.log(Level.INFO, "Creating game."); // this.client.getServerHandler().sendCommand( // ServerProtocol.CREATE_GAME, new String[0]); // } else if (e.getSource() == this.view.getPrivateBu...
8ddfbadf-929f-4f38-9608-97c6be1456bf
6
public int maxProfit(int[] prices) { int[] A = prices; if (A.length < 2) return 0; int[] firstHalf = new int[A.length]; int[] secondHalf = new int[A.length]; firstHalf[0] = 0; secondHalf[A.length - 1] = 0; int buy; int sell; int max;...
94cc2402-eb26-4bf6-81db-8fe3336e095c
6
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://down...
38103bc4-2426-465d-8de1-ed6057d67ef2
8
public KnnResult classify(DataPiece testDataPiece, int N) { if (N > trainingDataSet.size()) { throw new IllegalArgumentException("N should be <= training dataset size"); } if (testDataPiece.getFeaturesQty() != trainingDataSet.getFeaturesQty()) { throw new IllegalArgumentE...
6a33f3e7-46cc-4ace-97a8-f8a0314a1de6
8
private boolean checkTypeExprent(Exprent exprent) { for (Exprent expr : exprent.getAllExprents()) { if (!checkTypeExprent(expr)) { return false; } } if (exprent.type == Exprent.EXPRENT_CONST) { ConstExprent constExpr = (ConstExprent)exprent; if (constExpr.getConstType().typ...
4bf1d8af-95de-4021-bf7a-a61fb5375eff
0
public ExtensionsType createExtensionsType() { return new ExtensionsType(); }
dbd04ba4-85b9-41ed-b3d3-b27bda81aee4
1
public boolean opEquals(Operator o) { return o instanceof GetFieldOperator && ((GetFieldOperator) o).ref.equals(ref); }
a31dafa6-6f69-45f2-9f4e-4e64b9626fe3
7
public Behaviour jobFor(Actor actor) { if ((! structure.intact()) || (! personnel.onShift(actor))) return null ; final Choice choice = new Choice(actor) ; final float powerCut = stocks.shortagePenalty(POWER) * 5 ; final int loomBonus = (5 * structure.upgradeLevel(POLYMER_LOOM)) / 2, bondBonu...
a54a51fa-0e8c-470f-a749-23a8862c0360
7
public CSVNormaliser fillBlanks(){ if(csvList.isEmpty()){ System.err.println("Tried to fill blanks on empty dataset."); return this; } int numAttributes = csvList.get(0).length; for(int attribute = 0; attribute < numAttributes; ++attribute){ if(attribute == classificationIndex){ continue; // ...
e48d2ce9-6ac8-4512-86e8-e093a494ebb4
5
@Override public Object execute(Object... args) { String usedCmd = (String)args[0]; String url = (String)args[1]; FileDownload dl = null; if(args.length > 3) { String compression = (String) args[2]; if(compression.equalsIgnoreCase("-c")) { CompressionType type = getType((String)args[3]); if(type ...
97fc8d55-bb96-44e8-90de-453c45211e5a
1
@Test public void ensureCoreBudgetItemValueWithinBudgetIs12TimesTheValueInFormObject() { List<CoreBudgetItem> coreBudgetItemList = new ArrayList<CoreBudgetItem>(); coreBudgetItemList.add(new CoreBudgetItem("Test Description", new BigDecimal("100"))); when(budgetFormData.getCoreBudgetItemsL...
b0bb1feb-a692-45ab-9385-6af0d4020c82
2
public void printZoomHeaders() { // note if successfully read - should always be correct if(zoomLevelHeaders.size() == zoomLevelsCount) log.debug("Zoom level headers read for " + zoomLevelsCount + " levels:"); else log.error("Zoom level headers not successfully read for...
47f0e549-1c79-47ed-a451-c73060b465cf
5
public boolean eq(Matrix B) { Matrix A = this; if (B.M != A.M || B.N != A.N) { throw new RuntimeException("Illegal matrix dimensions."); } for (int i = 0; i < M; i++) { for (int j = 0; j < N; j++) { if (A.data[i][j] != B.data[i][j]) { ...
448a6b78-0ae8-4ee9-a67c-c3b517707ba0
3
public String readErrorFile(String errorPropertyType, String errorFilePath) { final Properties prop = new Properties(); InputStream input = null; try { prop.load(getClass().getClassLoader().getResourceAsStream(errorFilePath)); } catch (IOException ex) { ex.printStackTrace(); } finally { ...
bb431c9c-ab14-4379-9712-064e51cf45b2
7
public boolean init(){ try { xlsxs = new ArrayList<BaseRegex>(); reader = new XSSFWorkbook(new FileInputStream(path)); XSSFSheet sheet = reader.getSheetAt(0); int rows = sheet.getPhysicalNumberOfRows(); for (int r = 0; r < rows; r++) { XSSFRow row = sheet.getRow(r); if (row == null) { con...
8fd26511-afae-4f0c-a43e-2640470890e4
3
public void setListeners() { for(int i = 0; i < shipButtons.size(); i++) { JButton jb = shipButtons.get(i); // Hide this button if it has been selected by a previous player // System.err.println("outside" + disabledButtons.size()); // for(int j = 0; j < disabledButtons.size(); j++) { // if(jb == disa...
d3f8e8df-9c75-4995-a343-1bb72f0041d6
4
protected void progress(double pixels) { switch (getDirection()) { case 0: y -= pixels; break; case 1: x += pixels; break; case 2: y += pixels; b...
4c5534a7-8a64-47ad-95bb-3e482b7a9a37
1
public GameSWT(Display display, AbstractGame game) { this.display = display; this.game = game; shell = new Shell(display, SWT.SHELL_TRIM & (~SWT.MAX) & (~SWT.RESIZE)); shell.setText("Game of Life"); init(); if (!shell.isDisposed()) { game.addObserver(new GameO...
4d7554cd-5216-47d8-a058-5bee750d76be
1
public CNRLink setNetworkType(int n) throws ShellLinkException { if (n == 0) { flags.clearValidNetType(); nptype = n; } else { checkNptype(n); flags.setValidNetType(); nptype = n; } return this; }
11282b6e-366c-4360-9ae4-55a13a5c52c4
4
private Packet joinToGame(Packet packet) { if(nickname == null) { return Packet.getUserNotSingingUpPacket(); } Integer ID = (Integer) packet.getData(); switch(controller.getLobbyController().joinToLobby(ID, this)) { case LobbyController....
a119970c-41a1-445c-9283-a6914cafdda1
1
public int getLastX(int offset) { if(offset <= this.index) return line[index - offset][0]; else return -1; }
8d25f3d0-a5ba-4d37-8f13-1800a4381baa
4
private void lisaaJuoma(HttpServletRequest request, HttpServletResponse response, String action) throws ServletException, IOException { // kutsutaan metodia joka alustaa tilausrivit jos niitä // ei ole vielä sessiossa ArrayList<Tilausrivi> tilausrivit = luoTilausrivi(request); // otetaan juoman id-nume...
55b63154-e8f5-460f-9dbd-7a9db7e3b5e5
1
public int getOffset() { if ((status & RESOLVED) == 0) { throw new IllegalStateException( "Label offset position has not been resolved yet"); } return position; }
f2126d0e-67cf-4314-8cad-ec2579d3bef3
5
public void testRec(Configuration conf,byte depth){ depth++; nbAppelListeFils++; if (depth == 2) System.out.println("nbappelListeFils : "+nbAppelListeFils); ArrayList<Configuration> listeConfig = listeFils(conf); if (depth<depthMax){ for (Configuration c : listeConfig) { testRec(c, depth); ...
4273c62f-c1aa-4e62-b52b-50aa52781a87
7
@Override public void valueUpdated(Setting s, Value v) { try { if (s.getName().equals(_Min)) { if (progressBar_ != null) progressBar_.setMinimum(v.getInt()); } else if (s.getName().equals(_Max)) { if (progressBar_ != null) progressBar_.setMaximum(v.getInt()); } else if (s.getName().equals(...
7828624e-9084-4ef0-b416-2fa742709b73
4
public void method282(int orientation, Entity entity0, int uid, int y, byte objectConfig, int x, Entity entity1, int z, int orientation1, int off) { if (entity0 == null && entity1 == null) { return; } WallObject wallObject = new WallObject(); wallObject.uid = uid; wallObject.objectConfig = objectConfig; ...
99cecd02-bba1-41f0-8a27-67eff18eb63f
4
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } Pilot other = (Pilot) obj; if (characterId != other.characterId) { return false; } return true; }
bade7a08-3461-4838-9c2e-f21c512c96e1
6
public static GlobalFeatureVector computeGlobalFeatures(Signature s) { GlobalFeatureVector globVect = new GlobalFeatureVector(); double totalLength = 0; double vxmoy = 0; double vymoy = 0; double vmoy = 0; double axmoy = 0; double aymoy = 0; double amoy = 0; double vmax = 0; double amax = 0; doub...
4a34ed94-7bf7-4308-8804-60f423b4e5e1
2
public boolean contains(Object li) { li = ((LocalInfo) li).getLocalInfo(); for (int i = 0; i < count; i++) if (locals[i].getLocalInfo() == li) return true; return false; }
3ad3149f-ec0d-4206-b36f-cf6df6f53447
5
protected OgexLightNode toLightNode( DataStructure ds, Map<BaseStructure, Object> index ) { OgexLightNode result = new OgexLightNode(); configureNode(result, ds, index, false); result.setShadow((Boolean)ds.getProperty("shadow")); OgexLightObject light = null; fo...
56b3d421-5781-463f-bd57-6066a16b7e63
9
public void setLogger() { String loggerName = me.toString(); if(this instanceof Scout) loggerName = ((Scout)this).leader.me.toString(); else if(this instanceof Commander) loggerName = ((Commander)this).leader.me.toString(); logger = Logger.getLogger(loggerName); ...
1df015b9-caec-428c-ace5-6a1f3f571738
4
private void presente(ArrayList<Cellule> a){ // Regarde si la cellule est deja presente dans une liste de cellule boolean present = true; for (int i =0 ; i<a.size() ; i++){ for (int j = 0 ; j < this.al.ressource.size() ; j++){ if (a.get(i).coord == this.al.ressource.get(j).coord ){ present = false; ...
c0ebb8b8-a377-48d9-98de-f86ea1df5f72
1
public static void init() { try { (new File("debug.log")).delete(); } catch (Exception e) { } ready = true; //if(Game.RELEASE) { // errorFilterLevel = EIError.ErrorLevel.Error; //} else { errorFilterLevel = EIError.ErrorLevel.Notice; ...
04a86346-a2b7-4fa4-ad83-8b10d4952715
5
public static Workload forPercent(final int percent) { if (percent==0) { return NONE; } else if (percent==25) { return QUARTER; } else if (percent==50) { return HALF; } else if (percent==75) { return THREEQUARTER; } else if (percent...
3dfe8829-cd6a-434c-884c-cefb4ccaa96f
5
@Override public int hashCode() { int prime = 41; int prime1 = 31; int prime2 = 43; int prime3 = 59; int tIId = imageId; if (tIId == 0) { tIId = prime; } int tPath; if (path == null) { tPath = prime1; } e...
a716f8e2-3ec6-4326-a8a4-b3013914609a
0
public String readLabel() { return label; }
2b587608-5d2e-4bb0-aa4c-8a18e9d4aa19
8
private double[] analysisSingleWeibo(String weibo, String keyword) throws UnsupportedEncodingException { Sentence[] sen = null; /* if (weibo.lastIndexOf("但") != -1) weibo = weibo.substring(weibo.lastIndexOf("但") + 1); else if (weibo.lastIndexOf("不过") != -1) weibo = weibo.substring(weibo.lastIndexOf("不过") + 2...
083d0a6d-7bec-4338-a92e-e6674bd3a785
8
public void StartReminder() { Phpbbpm.getBukkitServer().getScheduler().runTaskTimerAsynchronously(plugin, new Runnable() { public void run() { Player[] players = Phpbbpm.getBukkitServer().getOnlinePlayers(); if (players.length > 0) { SqlManager sq...
6043a778-26d8-4e09-a3f9-4afbdf99064b
3
private static void colorInputValidator() { while (!validInput) { try { System.out.print("You selected to search by color. Please enter a color: "); colorInput = actionInput.next(); colorInput.toUpperCase(); System.out.println("You entered: " + colorInput); validInput = true; if(da...
e109e43a-1dea-4448-ab12-d2ba6f51cd9c
2
public static TimeZone parseTimeZoneString(String timeZoneString) { TimeZone timeZone = TimeZone.getTimeZone(timeZoneString); if ("GMT".equals(timeZone.getID()) && !timeZoneString.startsWith("GMT")) { // We don't want that GMT fallback... throw new IllegalArgumentException("Invalid time zo...
9f30dd8e-f5f6-4d62-a60c-bf59d19c50e4
4
public String execute() throws Exception { Connection conn = null; ResultSet rs = null; Statement stmt = null; try{ Class.forName("com.mysql.jdbc.Driver"); conn = DriverManager.getConnection(url, user, psw); if (!conn.isClosed()) System.out.println("Success connecting to the Database!"); else ...
c925943b-7b90-4f1c-a6c1-462ba9f99bc4
8
@Override public boolean equals(Object other) { if (other == null || !other.getClass().equals(this.getClass())) { return false; } MixedRevision mr = (MixedRevision) other; return baseRevision.equals(mr.baseRevision) && compilable == mr.compilable && ((testResult == null && mr.testResult == null) || ...
47991764-8737-4202-b575-a98995db31e9
9
public void initLevel() { // Iterates through all the fields and creates the elements for (int i = 0; i < grid.length; i++) { for (int n = 0; n < grid[i].length; n++) { switch (grid[i][n].getState()) { case PLAYER: Player p = new Player(); this.add(p); field[i][n] = p; break; cas...
e19d56a5-cdf4-4d4d-abca-bcb32a01bbc8
5
public void actionPerformed(ActionEvent a) { int i = 0; int j = 0; for(JButton button : buttons) { if(a.getSource() == button) { button.setText(play); occupied[j][i] = true; button.setEnabled(false); } if(i == 2) {j++; i = 0;} ...
a35b894e-993f-4a03-a894-7f8fdd2644bf
4
@Override public boolean isVisibleAt(int posX, int posY) { if((posX/zoom) > originX && (posX/zoom) < (originX + width)) if((posY/zoom) > originY && (posY/zoom) < (originY + height)) return true; return false; }
b5c3ab10-bfd1-4dd7-9333-2b584fbc6f2c
3
public T getDefaultExtension() { getExtensionClasses(); if (null == defaultExtensionName || defaultExtensionName.length() == 0 || "true".equals(defaultExtensionName)) { return null; } return getExtension(defaultExtensionName); }
417672ca-3a62-4e96-9df7-027710c0d058
8
private void addModifier(ProgramElementDoc member, Content code) { if (member.isProtected()) { code.addContent("protected "); } else if (member.isPrivate()) { code.addContent("private "); } else if (!member.isPublic()) { // Package private code.addContent(conf...
5433123b-05b6-4b19-ba99-ccd04d9d545e
3
public void setADe(TNumeroInt node) { if(this._aDe_ != null) { this._aDe_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); ...
ec76a364-aff2-49c1-a7b5-bdb0ee0fac8d
6
public static void log() { String folderToSave = larvikGaming.getConfig().getString("FileDir", "plugins/dynmap/web/admin") + "/"; String logFolder = folderToSave + "logs/"; boolean full = larvikGaming.getConfig().getBoolean("Full-Logger", true); boolean fine = larvikGaming.getConfig().getBoolean("Fine-Logger", ...
1b011a75-2f37-49ef-bec5-b4c59c1ee598
0
public String getCode() { return code; }
01fb068f-ad53-488b-9b97-2137ab5abdfe
7
private static void generateLevel1TestSuite(Map<String, DPermission> permissionsMap, String suiteName, FileWriter fileWriter) throws IOException { Set<String> dbSet = PermissionType.getPermissionTypes(); fileWriter.append(String.format("<testsuite name=\"%s\" >\n", suiteName.toUpperCase())); f...
c387a7fa-1432-4d84-b042-b3a765a57607
3
public int wmaLookback( int optInTimePeriod ) { if( (int)optInTimePeriod == ( Integer.MIN_VALUE ) ) optInTimePeriod = 30; else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) return -1; return optInTimePeriod - 1; }
45ac5cc6-6e82-40c3-9900-272ee4ac2317
3
private void initializeLogger() { Formatter formatter = this.initializeFormatter(); String levelName = this.configuration.getLevel(); LevelManager levelManager = new LevelManager(); Level level = levelManager.getLevel(levelName); this.logger = new GenericLogger(level, formatter); try { this.initializeOut...
2b416206-831c-47d5-bbc1-8f65beb8eab8
2
public static void handleGetSysTimeReply(HTSMsg msg, HTSPClient client) { Collection<String> requiredFields = Arrays.asList(new String[]{"time","timezone"}); if (msg.keySet().containsAll(requiredFields)){ //TODO } else if (msg.get("error") != null){ //TODO } else{ System.out.println("Faulty reply"); ...
3c422040-6a54-4636-b0a0-c6ea02960be0
0
@Override public void setSex(String sex) { super.setSex(sex); }
f092ee04-ec85-4886-9f41-73a5bbef49bc
0
@Override public void internalFrameClosing(InternalFrameEvent e) { closeInternalFrame(e.getInternalFrame()); }
817ede91-2cb9-49e9-b3bf-bd5f878afd07
0
@Override public void onStallWarning(StallWarning arg0) { // TODO Auto-generated method stub }
ada2e3d0-c35b-43c9-a932-6c8856a52b2b
1
@Override protected void onNotice(String sourceNick, String sourceLogin, String sourceHostname, String target, String notice) { if (serverEventsListener != null) serverEventsListener.noticeMessageReceived(sourceNick, notice); }
96e6bf0d-3c89-43cb-bac0-b0955d4a2f65
3
public static void toggleMoveableForSingleNode(Node node, CompoundUndoable undoable) { int oldValue = node.getMoveableState(); int newValue = Node.MOVEABLE_INHERITED; boolean isMoveable = node.isMoveable(); if (oldValue == Node.MOVEABLE_FALSE) { node.setMoveableState(Node.MOVEABLE_TRUE); newValue = Nod...
88104997-f284-4bad-bb1f-6534e1e718af
6
public void onUpdate() { super.onUpdate(); if (this.delayBeforeCanPickup > 0) { --this.delayBeforeCanPickup; } this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; this.motionY -= 0.03999999910593033D; ...
444e511f-71c2-4d01-96ca-8757638993b8
0
public List<Speciality> findSpecialitiesByHallEventId(final Long hallEventId) { return new ArrayList<Speciality>(); }
e5069508-1cf6-482f-8cfd-fd18ca2adb17
7
public Object nextContent() throws JSONException { char c; StringBuffer sb; do { c = next(); } while (Character.isWhitespace(c)); if (c == 0) { return null; } if (c == '<') { return XML.LT; } sb = new Str...
5ce68a10-e393-4deb-b617-dd1334a73ffe
1
public void removeUnit() { if(containsUnit())//this.abstractMatterList.has(Unit.class)) { this.abstractMatterList.get(Unit.class).owner.cityList.remove(this.abstractMatterList.get(Unit.class)); this.abstractMatterList.remove(Unit.class); } }
ef65c70d-e1db-4041-b6cf-c1cd1031d9bd
6
public void init() { try { logOnConsole = Boolean.valueOf(getParameter("CONSOLELOGGING")); hideCADButton = Boolean.valueOf(getParameter("HIDECAD")); path = getDocumentBase(); writeline(""); writeline("Loading UI..."); UIManager.s...
1811a6bf-405f-4906-8188-700aa25d4121
6
private void submitToDataBase(AdminUnitTypeVM formData, HttpServletResponse response) throws IOException { System.out.println("Submit, no errors, save and exit"); // we have to update two tables - AdminUnitType and // AdminUnitTypeSubordination // save the primary AdminUnitType AdminUnitTypeDAO adminUnit...
6787f394-0f5c-4537-9b0d-946d07c6621d
1
private void updatePersonalBest(int row){ for(int k = 0; k < positions[row].length; k++){ personalBest[row][k] = positions[row][k]; } }
4f6c4e31-d935-4c9a-80e6-d6c451ffb5d2
0
private void thisWindowActivated(WindowEvent e) { // TODO add your code here }
2d9aa5a6-854a-45e6-81b3-f8c701485d11
3
@EventHandler public void playerTeleport(PlayerTeleportEvent e){ if(e.isCancelled()){ return; } if(!e.getCause().equals(TeleportCause.PLUGIN)){ return; } if(TeleportsManager.ignoreTeleport.contains(e.getPlayer())){ TeleportsManager.ignoreTeleport.remove(e.getPlayer()); return; } TeleportsMana...
47afa0a6-6d1f-4d6f-af4f-6d52db90d7e4
7
private void RecordButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_RecordButtonActionPerformed if (Parent.Camera.GetIP().length > 1) { // Multiple Cameras CamogmState check = Parent.Camera.GetCamogmState(); if (check == CamogmState.STOPPED) { float RecordDelay = Parent.Camera...
655f3695-33a2-4fda-a1a5-00b9cb8fcc7b
8
@Override public String getColumnName(int column) { switch (column) { case ID_COLUMN_INDEX: return "ID"; case MITGLIEDSNR_COLUMN_INDEX: return "Mitglieds-Nr."; case NAME_COLUMN_INDEX: return "Name"; case...
c5a9cb34-fb3d-44be-b437-9091fb5dc2f5
9
public void save() { try { Document d; d = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); Transformer t = TransformerFactory.newInstance().newTransformer(); Element rootElement = d.createElement("dssSave"); Element statsElement = d.createElement("stats"); for (Stat sta...
bea5060f-5d6b-49b3-b427-05d01ce11eb7
8
private HttpURLConnection processRequest(CallReport callReport, Request request, int count) throws MalformedURLException, IOException { println("REQUEST:"); if (AzotConfig.GLOBAL.DEBUG) { final List<Variable> contextVariables = workflow.getContext().getVariables(); for (final Variable variable : contextVaria...
c03227de-6ac2-4629-8749-fe5afab89831
2
public ArrayList<Product> getAlleOnderdelenDB() { ArrayList<Product> alleOnderdelenDB = new ArrayList<Product>(); try { this.leesDatabase(); statement = con.createStatement(); rs = statement .executeQuery("SELECT * FROM voorraad where type='2'"); while (rs.next()) { int id = rs.getInt("id"); ...