method_id
stringlengths
36
36
cyclomatic_complexity
int32
0
9
method_text
stringlengths
14
410k
7d50ed85-0d36-4172-aeed-b28200d1d72c
0
@Override public void mouseClicked(MouseEvent e) { }
766d3dbd-fae6-4029-be5d-f893b071a64d
9
private void balanceClusters() { findAllClusters(); step = 0; boolean somethingMoved = false; for (int i = 0; i < allClusters.size();) { NodeCluster c = (NodeCluster) allClusters.get(i); int delta = c.getPull(); if (delta < 0) { if (c.leftFreedom > 0) { c.adjustRank(Math.max(delta, -c.leftF...
b7bc521d-ea72-49ff-8d01-4311068d492e
2
@Override public List<String> getSuggestions(CommandInvocation invocation) { List<String> result = new ArrayList<>(); String token = invocation.currentToken().toLowerCase(); for (String key : getFixedValues()) { if (key.startsWith(token)) { ...
05f5f0dc-f4a4-4286-bb19-57be7e1a21bd
3
protected List<IDrawable> getVisibleDrawable(List<IDrawable> allItems, float offsetX, float offsetY) { List<IDrawable> visibleItems = new LinkedList<IDrawable>(); // Iterate through each game object and if its visible we return the the // object within the list for (IDrawable gameObject : allItems) { if (gam...
8af0bc04-6765-4422-b7bc-4cce6be8ba12
4
public double toDouble() { /* * Wenn der Exponent maximal ist, nimmt die Gleitpunktzahl einen der * speziellen Werte an */ if (this.exponent.toInt() == maxExponent) { /* * Wenn die Mantisse Null ist, hat die Zahl den Wert Unendlich oder * -Unendlich */ if (this.mantisse.isNull()) { if...
b64f4e64-3779-4d3b-93e0-7591f630c8a8
7
@Override public void hyperlinkUpdate(HyperlinkEvent hle) { Desktop desk; URI license, src; try { license = new URI("http://www.gnu.org/licenses/gpl.txt"); src = new URI("https://github.com/SamLex/Tinted-Window"); } catch (URISyntax...
7a4610db-90f4-4162-b5d1-70292c6d9627
1
@Test(enabled = true) void testC() { if (10 > 1) { // do nothing, this test always passed. } }
15f3d835-ce2f-4c6c-8d95-d22286fae242
7
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Regle other = (Regle) obj; if (action == null) { if (other.action != null) return false; } else if (!action.equals(other.action)) ret...
014aef15-6603-489e-a4a0-d463fe2851b4
1
public Dijkstra(HashMap<Node, HashSet<Edge>> graph, Node fromNode, Node toNode, boolean heuristic) { this.graph = graph; this.fromNode = fromNode; this.toNode = toNode; edgeTo = new HashMap<>(); for (Node node : graph.keySet()) { node.setDistTo(Double.POSITIVE_INFINITY); node.setHeuristic(Double.POSI...
2cdbf12d-e2e9-4742-932a-ec698921ec04
9
@Override public boolean tick(Tickable ticking, int tickID) { super.tick(ticking,tickID); if(tickID!=Tickable.TICKID_AREA) return true; if(!(ticking instanceof Area)) return true; if(areaName==null) { if(getParms().length()==0) return true; String s=getParms(); final int x=s.indexOf(';');...
6a259f5a-6a91-4b6b-92df-fb1788954320
6
public static void main(String[] args) { StaffBL staffBL = new StaffBL(); staffBL.createStaff("root", "toor"); Cineplex cineplex = new Cineplex("Orchard", "ION Orchard Road"); Cinema cinema = new Cinema("O01", "Hall 1", CinemaClass.NORMAL, cineplex); Movie _TheHungerGame = new Movie("The Hunger Games: C...
4e50ca0a-29d3-42c8-a212-48d3e5cf5dfd
2
public void run() { //authorize with Twitter authorize(); //create and start the friends list FriendsList fl = new FriendsList(); Thread friendsList = new Thread(fl); friendsList.start(); //wait until friendslist is loaded before continuing while (fl.ge...
2a559a33-dcb2-4183-b0d2-c76cad1d60be
5
private static void appendJSONPair(StringBuilder json, String key, String value) throws UnsupportedEncodingException { boolean isValueNumeric = false; try { if (value.equals("0") || !value.endsWith("0")) { Double.parseDouble(value); isValueNumeric = true; ...
7ea404ba-0284-41f1-b11d-a172d275aa0e
6
public void fieldNotConstant(FieldIdentifier fi) { for (Iterator iter = bytecode.getInstructions().iterator(); iter .hasNext();) { Instruction instr = (Instruction) iter.next(); if (instr.getOpcode() == opc_getfield || instr.getOpcode() == opc_getstatic) { Reference ref = instr.getReference(); ...
78e499d7-42c1-45e4-b8bf-344ee119ea45
5
public Launch(String...args) { Server server = null; if (args.length > 0) try { server = com.lensflare.svh.impl.Server.load(new File(args[0])); } catch (FileNotFoundException e) { log.fatal("Could not find configuration file: {}", args[0]); System.exit(-1); } else try { server = com.l...
4863d008-6614-43fd-9ce6-78955a9960b5
2
public void resume (int port) throws IOException { if (port <= 0 || port > ports) throw new IllegalArgumentException (); ControlMessage.clearFeature (dev, ControlMessage.TYPE_CLASS | ControlMessage.RECIPIENT_OTHER, PORT_SUSPEND, port ); }
c5bef3bb-ddae-4ae4-98d7-ed2718dcd6da
8
public void registerLink(MindMapLink link) throws java.lang.IllegalArgumentException { if ((link.getSource() == null) || (link.getTarget() == null) || (link.getDestinationLabel() == null)) throw new java.lang.IllegalArgumentException( "Illegal link spe...
b72d89b3-efb7-4518-89af-3bbf07ba661b
0
public boolean containPark(Park park) { return this.parkList.contains(park); }
f0cb0b25-415b-4f87-856a-832afc73096d
0
public Automaton getAutomaton() { return (Automaton) getSource(); }
bf7f37c7-b06b-41e7-9997-e6c28669722a
0
public void mouseExited(MouseEvent e) { String str = "The mouse has left the Frame !"; System.out.println(str); }
3011fe49-1550-445c-9239-42b6a986f60e
3
@Override public void exitPrivateMode() { Runnable runnable = new Runnable() { @Override public void run() { if (terminalFrame == null) { return; } blinkTimer.stop(); terminalFrame.setVisible(false);...
8382c81f-8632-4a81-8eda-33d4db15f8b4
4
@Override public void removeElement() { if (depthManager.getMaxDepth() > 1) { DepthRow lastRow = depthManager.getDepth(depthManager.getMaxDepth() - 1); if(!lastRow.isEmptyRow()){ return; } depthManager.removeLastDepth(); boolean f...
170d7b87-811a-46fd-a6ae-37c27e7aea79
7
public static void main(String[] args) { for (int i = 0; i < CacheMemoryD.length; i++) { CacheMemoryD[i] = new cacheLine(); } for (int i = 0; i < Conjuntos.length; i++) { Conjuntos[i] = new CacheLineSet(); } try { reader = new BufferedReader(...
2524e3e9-8171-421f-a065-69030ff42bf1
2
@Override public boolean[] get( ByteBuffer in ) { Integer length = Compress.getIntUnsignedNullable( in ); if (length == null) { return null; } boolean[] array = new boolean[length]; int byteCount = toBytes( length ); byte[] bytes = new byte[...
4f6b141a-a81f-4d69-9d43-5223c83ab2a7
3
/* package */static Tracker getBackedTracker (Collection<String> announces) { List<Tracker> trackers = new ArrayList<Tracker>(); for (String str : announces) { Tracker tracker = getSingleTracker(str); trackers.add(tracker); } if (trackers.isEmpty()) { ...
93ae5f6d-0f56-4cd2-b490-978640bd186c
2
@Override public String readFromBomberman() { ArrayList<IOException> errors = new ArrayList<IOException>(); int TRY_TIMES = 1000; for (int i = 0; i < TRY_TIMES; i++) { try { String msg = reader.readLine(); return msg; } catch (IOExcepti...
90cba2ba-114b-409f-a40e-8a862a9a4f7d
3
public static Object[][] getData(String sheetName) { // return and read test data from excel int rows = (datatable.getRowCount(sheetName) - 1); if(rows <= 0){ Object[][] testData = new Object[1][]; return testData; } rows = datatable.getRowCount(sheetName); int cols = datatable.get...
29eec9ca-cdbc-4bfa-b4d6-e00d821c71c8
7
private void findBestPermutation(SubPath[] subPaths, int[] solution, boolean[] reversed, boolean[] used, int depth, int dist){ //add the new distance from the edge added by the caller of this method. //also works for the last depth when the depth is -1 if(depth<subPaths.length-2){ dist += dist(subPaths,...
34de7c16-dc61-47f6-8d96-bf93ace25127
0
public PreferencesGUITreeSubContainer() { setLayout(new GridBagLayout()); }
f793cfb9-c1fa-43ce-92d1-5ea4927d522f
4
public void updateView() { // Get the models for the combo boxes DefaultComboBoxModel<String> problemsModel = (DefaultComboBoxModel<String>) problemComboBox .getModel(); DefaultComboBoxModel<String> languagesModel = (DefaultComboBoxModel<String>) languageComboBox .getModel(); // Get problems and langua...
91687fbb-18e9-4fb5-9acd-550361565d3c
8
private void capturarPeca(Posicao posicaoInicial, Posicao posicaoFinal) throws CasaVaziaException, PecaAlheiaException, CaminhoBloqueadoException, MovimentoInvalidoException, CapturaInvalidaPecaInexistenteException, CapturaInvalidaPecaPropriaException { PecaAbstrata peca = (PecaAbstrata) jogo.getTabuleiro().ge...
6bbf63a7-c065-448b-a359-4fc778d71225
9
public static SorterParams.SortType ChooseSortTypeMenu() throws IOException { int menuSelect; SorterParams.SortType sType = SorterParams.SortType.SELECTION; //default value do { clearScreen(); System.out.println("(1) Selection sort"); Sys...
95035c2a-4445-4d93-b331-36b18032b55b
0
public void moveA(int x, int y) { ((Rectangle) shape).x = x; ((Rectangle) shape).y = y; updateCornerRects(); canvas.repaint(); }
4f2dc79f-fceb-44f4-ab60-dbf0301bf9e4
8
public void init(Object x) { if (x instanceof double[]) initDouble((double[]) x); else if (x instanceof int[]) initInt((int[]) x); else if (x instanceof boolean[]) initBoolean((boolean[]) x); else if (x instanceof byte[]) initByte((byte[]) ...
ed96080b-2a2c-4992-b347-c906a48d659b
3
protected boolean doSkip(Field field) { return Modifier.isTransient(field.getModifiers()) || Modifier.isStatic(field.getModifiers()) || Modifier.isFinal(field.getModifiers()) || !Modifier.isPublic(field.getModifiers()); }
e3311a55-7f4a-43b3-b510-06df5dc6db5e
8
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); Cookie currentCookie = getCookie(request.getCookies()); ServerContext.getInstance().setCurrentRequest(request); ServerContext.getInstance().se...
0cc31e9f-2c29-41d4-8576-263dac3b499f
3
public T elementEqualTo(T e) { if (e == null) { throw new NullPointerException(); } if (this.firstElement.equals(e) || this.secondElement.equals(e)) { return e; } else { return null; } }
dab9a4d0-fdc2-4b00-a1fb-2a7d77589aa7
0
public String getPreviousGameName() { return previousGameName; }
cb8357e2-e81b-44f0-b81e-e290b77b1a25
1
private void reset() { for (int i=2; i<32; i++) clear(i); }
dffae131-2ba4-44ee-be33-f5b3734d0762
9
private void subFlag() { int ch = peek(); for (;;) { switch (ch) { case 'i': flags &= ~CASE_INSENSITIVE; break; case 'm': flags &= ~MULTILINE; break; case 's': flags &= ~DOTALL...
afa8b21b-5472-4a40-ab07-c4597accba85
7
public static void main(String[] args) { changeLookAndFeel = changeLookAndFeel || args.length > 1 ; //Remember to se it so we can customize the look and feel on the fly //Set the look and feel for the program if(changeLookAndFeel){ //Just in case you are running from console... was of time I know if(a...
4c28abd2-1e10-4b8b-82ac-57e1363b484d
0
@After public void tearDown() { }
6a282e06-36e1-4206-a9fa-2bfc1658745f
9
public static <E> void traversalWithLineZigZag(BalancedTreeNode<E> root) { if(root == null) { return; } int currentLineNodeCount = 1; int nextLineNodeCount = 0; int lineNo = 0; Stack<BalancedTreeNode<E>> stackEven = new Stack<BalancedTreeNode<E>>(); Stack<BalancedTreeNode<E>> stackOdd = new Stack<Balan...
720330dc-1cec-47c9-90d8-6be22c2ea214
1
public String getValueString1(int row, int clums, int sheetat) { String s = null; try { XSSFSheet xSheet = xWorkbook.getSheetAt(sheetat); XSSFRow xRow = xSheet.getRow(row - 1); XSSFCell xCell = xRow.getCell(clums - 1); xCell.setCellType(Cell.CELL_TYPE_STRING); s = xCell.getStringCellValue(); } catc...
1f8ab71e-dab6-488e-9ab0-287f798b685e
6
protected void draw() { GraphicsContext gc = this.getGraphicsContext2D(); //clear area with white gc.setFill(Color.WHITE); gc.fillRect(0, 0, this.getWidth(), this.getHeight()); //draw debug lines gc.setStroke(Color.RED); gc.strokeLine(0, 0, this.getWidth(), this.getHeight()); gc.strokeLine(this.getWidth...
c65f6900-5d2b-4d9d-bd43-c601782f11cf
8
public void initialize(Object[] xData, Object[] yData, Object[] zData) { this.xValues = new Double[xData.length]; this.yValues = new Double[yData.length]; this.zValues = new Double[zData.length]; // We organise the data with the fol...
586f2df7-05d1-4596-b977-88c3a14cc31a
6
@Override public void actionPerformed(ActionEvent e) { if (e.getSource().equals(addButton)) { if (source.getSelectedValue() != null) { String str = (String) source.getSelectedValue(); if (str != null) { destModel.addElement(str); dest.setSelectedIndex(0); sourceModel.removeElement(str); ...
2e8169da-83ab-45fd-b7d6-48f24a5eb99c
9
public int[] twoSum(int[] nums, int target) { if (nums == null || nums.length == 0) { return null; } int[] sorted = new int[nums.length]; System.arraycopy(nums, 0, sorted, 0, nums.length); Arrays.sort(sorted); int start = 0; int end = sorted.length ...
577b5dc5-9b56-428f-8d09-e94f6ce8fc76
3
public CSVFileManager readFile(String fileName) throws IOException { BufferedReader buff = new BufferedReader(new InputStreamReader( new FileInputStream(new File(fileName)))); csv = new CSVObject(VALUES_PER_LINE); for (String line = buff.readLine(); line != null; line = buff .readLine()) { //get rid o...
20dee718-87e4-47b9-8ca4-d68e8fb136e8
3
public void vitessePlus(int $param_int_1) throws java.rmi.RemoteException { try { ref.invoke(this, $method_vitessePlus_1, new java.lang.Object[] {new java.lang.Integer($param_int_1)}, -439484241047378877L); } catch (java.lang.RuntimeException e) { throw e; } catch (java.rmi.RemoteException e) { t...
b95a9ef5-68e2-45a9-845c-48a309e29da4
2
public final CLC getContext(String context) { if(!contextMap.containsKey(context)) { contextMap.put(context, new CLC()); if(commandMap.containsKey(context)) { contextMap.get(context).setRootAction(commandMap.get(context)); } } return contextMap.get(context); }
b5f34c93-9368-47dc-83ca-c1389b41e147
6
@Override public void bsp( BSPPeer<NullWritable, NullWritable, NullWritable, NullWritable, NullWritable> peer) throws IOException, SyncException, InterruptedException { int nbRowsBlocks = nbRowsA / blockSize; int nbColsBlocks = nbColsB / blockSize; int nbBlocks = nbRowsBlocks * nbColsBlocks; int b...
34b95a34-9321-4b9a-9fad-58ed77050694
8
@Override public void sequence(String id, String sequence, String quality) { // Testing the strings (if some are null the method will stop here) if ((sequence == null) || (quality == null) || sequence.isEmpty() || quality.isEmpty()) { return; } int[] q = null; try { q = decoder.decodeQuality(qual...
1d874494-f812-47c3-ad84-190ebc1491d1
2
public WorkerThread(String name, LocalLogManager localLogManagerTemp, AbstractQueue<String> fileQueueTemp, Configuration config) { this.name = name; this.log = localLogManagerTemp; this.queue = fileQueueTemp; this.config = config; initialQueueSize = queue.size(); queueSizePrintIncrement = initialQueue...
f4ac83f3-3ed9-4abc-ac1c-9d704e753bed
3
private int isOneBitDeferent(String binAdress1, String binAdress2) { int pos = -1; int bitDefer = 0; for (int i = 0; i < binAdress1.length(); i++) { if (binAdress1.charAt(i) != binAdress2.charAt(i)) { pos = i; bitDefer++; } } if (bitDefer != 1) pos = -1; return pos; }
fce28829-48e1-42f7-ae08-da70448c70eb
9
public static void main(String[] args) { int count = 0; for(int one = 0; one <= N; one++) for(int two = 0; one+two*2 <= N; two++) for(int five = 0; one+two*2+five*5 <= N; five++) for(int ten = 0; one+two*2+five*5+ten*10 <= N; ten++) for(int twenty = 0; one+two*2+five*5+ten*10+twenty*20 <= N; ...
e1ce3cde-d773-46de-9cad-c3cc6e9574d9
7
public Lab9Frame() { /* create int[]; create new instance of MyPanel sortPanel with myList attribute */ myList = buildList(); sortPanel = new MyPanel(myList); /* thread, flags, sleep duration */ sortThread = new Thread(new Runnable(){ public void run() ...
0b718599-6b46-47d1-9097-069dfbee1645
8
@SuppressWarnings("unused") private void method349(int ai[], int ai1[], int j, int k, int l, int i1, int j1, int k1) { int i;// was parameter int l1 = -(l >> 2); l = -(l & 3); for (int i2 = -i1; i2 < 0; i2++) { for (int j2 = l1; j2 < 0; j2++) { i = ai1[j++]; if (i != 0) ai[k++] = i; else ...
f22561bb-585f-48fe-96d7-a8881e8c06f6
0
public ClockListener() { super(); appendex = "null"; }
2a7161a8-0e64-4003-b4b4-43874a5e0f8e
5
public int Close() { int retcode = DDC_SUCCESS; switch ( fmode ) { case RFM_WRITE: try { file.seek(0); try { byte[] br = new byte[8]; br[0] = (byte) ((riff_header.ckID >>> 24) & 0x000000FF); br[1] = (byte) ((riff_header.ckID >>> 16) & 0x000000FF); b...
9d8e6a74-3b32-4ce3-9b5d-b32a4c8581fc
2
public int get(int symbol) { if (symbol < 0 || symbol >= frequencies.length) throw new IllegalArgumentException("Symbol out of range"); return frequencies[symbol]; }
35e5e536-149f-498e-9887-2263883f991f
6
private static void startMenu(String arg){ switch (arg.toUpperCase()){ case "PLAY": playing=true; if(!loaded){ dayController.setWorld(new World()); } break; case "LOAD": //TODO load saves loaded = true; break; case "QUIT": running = false; break; case "RESET": //TODO load sav...
996622f3-841e-494f-bd4c-510f87212cb9
1
public static double[] random( int m ) { double[] res = new double[m]; for ( int i = 0; i < m; ++i ) { res[i] = Math.random(); } return(res); }
224415ad-906f-42d8-94a2-a98e4be14866
7
public void setOptions (String[] options) throws Exception { String optionString; resetOptions(); optionString = Utils.getOption('P', options); if (optionString.length() != 0) { setStartSet(optionString); } optionString = Utils.getOption('Z', options); if (optionString.length() !...
b0db304d-fb28-44f4-9f2e-38f4d5630516
7
@Override public int hashCode() { int hash = 0; hash += (a == null ? 0 : a.hashCode()); hash += (b == null ? 0 : b.hashCode()); hash += (c == null ? 0 : c.hashCode()); hash += (d == null ? 0 : d.hashCode()); hash += (e == null ? 0 : e.hashCode()); hash += (f == null ? 0 : f.hashCode()); hash += (g == n...
55ee7245-6a21-494c-9a48-82b018eaa284
7
public void parseOptionDescriptionXMLfile(URL url) throws MaltChainedException { if (url == null) { throw new OptionException("The URL to the default option file is null. "); } try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDo...
ac6d7c39-aaec-447d-b93b-9a607e978973
6
public static String numberToString(Number number) throws JSONException { if (number == null) { throw new JSONException("Null pointer"); } testValidity(number); // Shave off trailing zeros and decimal point, if possible. String string = number.toString(); ...
f5d72bc8-3152-47dc-9320-fac4ef49104e
9
public NGraph<InputData> get() throws InputException { NGraph<InputData> g = new ListGraph<InputData>(); //Create the vertices for(int i=0; i<x*x; ++i) { NVertex<InputData> v = new ListVertex<InputData>(); v.data = new InputData(); v.data.id = i; v.data.name = ""+(i+1); g.addVertex( v ); ...
a285aac7-19f1-452e-8f14-8e9e544e8415
7
public void initialize() throws Exception { m_RunNumber = getRunLower(); m_DatasetNumber = 0; m_PropertyNumber = 0; m_CurrentProperty = -1; m_CurrentInstances = null; m_Finished = false; if (m_UsePropertyIterator && (m_PropertyArray == null)) { throw new Exception("Null array for ...
c38ce92f-d8a8-4d11-b30b-251842c5c4dd
4
public boolean implementedBy(ClassInfo clazz) { while (clazz != this && clazz != null) { ClassInfo[] ifaces = clazz.getInterfaces(); for (int i = 0; i < ifaces.length; i++) { if (implementedBy(ifaces[i])) return true; } clazz = clazz.getSuperclass(); } return clazz == this; }
c89339b3-6a84-44e2-b872-801aed9a4357
3
public int getAvgPlaytime(String playerName) { int avgPlaytime = 0; try { ResultSet rs = _sqLite.query("SELECT avg(time_online) " + "AS avg_playtime " + "FROM player, login " + "WHERE player.playername = '" + playerName + "' " + "AND player.id = login.id_player;");...
45a28d29-0cad-4d45-a93f-903411e230fd
8
@Override public Object cresciDinosauro(String token, String idDinosauro) { try { if (myLogica.isMioTurno(token)) { if ( myLogica.doCresciDinosauro(token, idDinosauro)) { return "@ok"; } return "@no,@idNonValido"; } else return "@no,@nonIlTuoTurno"; } catch (InvalidTokenException e) { ...
d429fb32-70a5-4289-8865-bc1e70da1788
7
static final public void term() throws ParseException { unary(); label_2: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case MULTIPLY: case DIVIDE: ; break; default: jj_la1[3] = jj_gen; break label_2; } switch ((jj_ntk==-1)?jj_ntk(...
a10ef174-8b10-41c8-83c1-798b3c111678
4
public Set<Coordinate> getWin(){ boolean test = false; if (test || m_test) { System.out.println("Othello :: getWin() BEGIN"); } if (test || m_test) { System.out.println("Othello :: getWin() END"); } return m_win; }
5fb57a59-b09d-4dc1-a893-1e3917146049
7
@Override public List<Filial> Buscar(Filial obj) { String consulta = "select f from Filial f"; String filtro = ""; HashMap<String, Object> parametros = new HashMap<String, Object>(); if (obj != null) { if (obj.getIdFilial()!= null) { ...
7c0610f2-1b7a-438b-a4ee-1f3d0feb04fe
9
public double calculate() { // our strategy: // - put all items in another collection // - let the rule objects to pick their favorites double amount = 0.0; // put all items into a workspace. cartWorkspace = new ArrayList<Item>(cart); Map<Rule, RuleResult> ruleResults = new HashMap<Rule, RuleResult>()...
f3c981e1-3427-4cd5-8d02-f8e10c8aa61e
7
public HashMap<String, Multimap<String, Double>> call() throws Exception { HashMap<String, Multimap<String, Double>> rt = new HashMap<String, Multimap<String, Double>>(); HypermodulesHeuristicAlgorithm ha = new HypermodulesHeuristicAlgorithm(this.stat,this.foregroundvariable, this.sampleValues, this.clinicalValues,...
777f7040-4078-46d0-816f-a5058ee43792
6
public BatchResult unshareProfiles() throws IOException, ServiceException { if (this.profiles == null) { this.getAllProfiles(); } BatchResult result = new BatchResult(); Status status = new Status(); int index = 0; status.setIndexed(false); while (index < this.profiles...
0268218e-f753-4d70-9a1f-c04d779f94af
6
void ejecutar() { snake = new Snake(30, 20); panel = new SnakePanel(snake, 20); this.setTitle("Snake INSO"); this.getContentPane().add(panel); this.pack(); this.setVisible(true); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); this.addKeyList...
d03c8f01-34d4-44fe-82c8-3f430b181b7a
6
public String stSharingViaFastShare (String targetXPath, int ExpVal, String flow) { int actVal = 1000; String returnVal = null; STCommonLibrary comLib = new STCommonLibrary (); Vector<String> xPath = new Vector<String> (); Vector<String> errorMsg = new Vector<String> (); Calendar cal = Calendar...
5ad3bdb7-18df-4d72-b5a5-c153c665ef57
4
public static void main(String[] args) { /* Cypher typer */ System.out.println("Please select option:"); System.out.println(" 1.Start session"); System.out.println(" 2.Verify message"); String alg = null; try { alg = (new BufferedReader(new InputStreamReader(System.in))) .readLine(); } catch ...
1873491f-95da-4a24-8be9-fbab3235ab43
7
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBlockPlace(BlockPlaceEvent event) { for (Entry<Integer, Game> en : GameAPIMain.getRunners().entrySet()) { if (en.getValue() instanceof CTTGame) { if (en.getValue().getPlayers().contains(event.ge...
775bdfbc-5ff8-42f2-ba93-1e29fe1597ff
6
public void setOptions(String validOptions) { for (Component component : mainPanel.getComponents()) { component.setEnabled(false); } this.labelBet.setEnabled(true); if (validOptions.contains("bet")) { this.buttonChip10.setEnabled(true); this.buttonChi...
7ece17f0-82d0-4a02-9dad-0b2ce4ba45ae
5
*/ public boolean step() { // if there are no more GenChains in chains, return false // signifying that the maze is complete if (this.chains.size() == 0) return false; // if the most recent added GenChain has carved 'frequency' number // of Cells, get the newest Cell it can continue from, and start a // new...
fcf1cbaf-3e56-4f59-9370-1f46b2465a82
4
public void open() { if (!mainMenuButton.isOpen()) mainMenuButton.setOpen(true); if (!options.isButtonHideOnSelect()) { show(); } if (State.OPENED == getState()) { return; } setState(State.OPENED); mainMenuButton.setOpacity(1.0); o...
656ae716-0119-426c-8042-82375abbe740
9
public static boolean perimeterFits(Element element) { final Box2D area = element.area(tA) ; final Tile perim[] = perimeter(area, element.origin().world) ; // // Here, we check the first perimeter. First, determine where the first // taken (reserved) tile after a contiguous gap is- boolean in...
c1826eb7-ab8b-4691-8129-2e01e6f99ed8
9
public final void performBFS(int start, int stop, JPFMap map){ //initialize if (map==null) return; Node node = new Node(null, start); Queue<Node> open = new ConcurrentLinkedQueue<Node>(); Set<Node> closed = new HashSet<Node>(); //search & visualisation phase ...
f9d601c0-6129-4492-9458-769ab6a93f6a
2
private void update() { switch(state.getState()) { case 1: this.setIcon(x); break; case 2: setIcon(o); break; default: setIcon(blank); break; } }
908425c3-7da9-4230-b000-2eb618936148
9
public boolean overlapOrMeet(Temporal temporal) { if (null == temporal) return false; if (this == temporal || !hasTemporalInfo()) return true; if (isTimeInstance()) { if (temporal.isTimeInstance()) return startTime == temporal.startTime; else { if (startTime < temporal.startTime || temporal.endTime < st...
6d63ce91-8c41-46f5-80a0-bd0bc0516050
5
Class286_Sub5(OpenGlToolkit var_ha_Sub2, Class83 class83) { super(var_ha_Sub2); try { aClass83_6259 = class83; aClass61_6254 = new Class61(var_ha_Sub2, 2); aClass61_6254.method595((byte) 104, 0); ((Class286) this).aHa_Sub2_3684.method3738(-15039, 1); if (((Class83) aClass83_6259).aBoolean1442...
f283e6ea-b3a5-4425-ae04-69c5520664d5
5
public boolean createUser(Employee employee) { Connection connection = new DbConnection().getConnection(); PreparedStatement preparedStatement = null; boolean flag = false; boolean isUserAlreadyExists = isUserAlreadyExists(employee .getEmployeeId()); if (!isUserAlreadyExists) { String password = Random...
07375a35-bdb3-47fd-8b8d-ee8ae37c5168
7
public boolean validDirection(String direction) { int newCol, newRow; switch(direction) { case "e": newCol = heroCol + 1; return (newCol < myDungeon[0].length) ? true : false; case "w": newCol = heroCol - 1; return (newCol >= 0) ? true : false; ...
bb31612a-97bf-418b-9aeb-c61e7e53f18c
3
public static void uncastVote(VoteCast vote){ if(vote == VoteCast.A) A-=1; else if(vote == VoteCast.B) B-=1; else if(vote == VoteCast.R) R-=1; updatePlayerReadout(); }
2b77e732-800a-4981-aa9e-8a54d5346e9a
0
public int getMask() { return mask; }
5561552f-5802-41aa-9c5f-f1f1f7bf6713
9
public boolean pelinappulaSamassaRuudussa() { if (nappulanNro == 1) { if (pylpyra.getNappulanSijainti(1) == pylpyra.getNappulanSijainti(0)) { return true; } } else if (nappulanNro == 2) { if (pylpyra.getNappulanSijainti(2) == pylpyra.getNappulanSijaint...
7ba4c2e9-349b-4edd-adc2-71dfacbc8087
3
@Override public Iterable<Entry<K, V>> entrySet() { ArrayList<Entry<K, V>> entries = new ArrayList<>();// return container for (int i = 0; i < capacity; i++) { if ((bucket[i] != null) && (bucket[i] != available)) entries.add(bucket[i]); } return entries; }
e4f6a013-8b41-4aa0-8791-a3ebd4075348
2
public float getProgress() { float current = 0.0F; float total = 0.0F; synchronized (this.progressContainers) { for (ProgressContainer progress : this.progressContainers) { total += (float)progress.getTotal(); current += (float)progress.getCurrent(); } } float result = ...
be23631a-9fe5-4b21-82f5-119901fc7b37
3
public double[] do600baudFSKHalfSymbolBinRequest (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,6); double datar[]=new double[FFT_64_SIZE]; // Run the data through a Blackman wind...
2d144b4a-0ff3-4572-9459-362024956fa0
7
private String buildParameterQueue(String method, Map<String, String> params, String... strings) { StringBuilder builder = new StringBuilder(100); builder.append("method="); builder.append(method); builder.append('&'); for (Iterator<Entry<String, String>> it = params.entrySet().iterator(); it.hasNext();) { ...
40af8a99-570b-4aee-bb51-7ec7ea9dc915
6
protected void flowThrough(Object outValue, Object unit, Object inValue) { FlowSet in = (FlowSet) inValue; FlowSet out = (FlowSet) outValue; Stmt s = (Stmt) unit; // Copy out to in out.copy( in ); // Take out kill set Iterator boxIt = s.ge...