query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
private String stop; private String run;
public StatusEndPoint(String id) { super(id); System.out.println("id = " + id); // System.out.println("stop = " + stop); // System.out.println("run = " + run); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String stop()\r\n {\r\n return \"{ \\\"action\\\": \\\"stop\\\" }\";\r\n }", "@Override\npublic String stop() {\n\treturn \"the Truck has stopped\";\n}", "public Stop(String name) {\n this.name = name;\n }", "public boolean getAllowStop();", "public void stop(){\n stop...
[ "0.6369963", "0.6330678", "0.6189379", "0.60898036", "0.6075603", "0.60719126", "0.604269", "0.5981552", "0.59720564", "0.59550595", "0.59173375", "0.5864645", "0.5851681", "0.58180463", "0.5815192", "0.58028024", "0.57894605", "0.5770054", "0.5769192", "0.5769192", "0.576919...
0.0
-1
Simply should not fail and return something.
@Test public void testCreateDocumentChecksumFromContent() throws IOException { String content = "Some content"; CachedInputStream is = new CachedStreamFactory(1024, 1024).newInputStream(content); Doc doc = new Doc("N/A", is); MD5DocumentChecksummer cs = new MD5Documen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean getPossiblyBad();", "@Override\n boolean canFail() {\n return true;\n }", "boolean isFail();", "boolean isFailure();", "@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}", "public boolean needsProblem();", "boolean hasPossiblyBad();", "static void return_unconditionally(String...
[ "0.7106674", "0.7016902", "0.70101345", "0.70043266", "0.6755166", "0.6563591", "0.65042853", "0.64964217", "0.6443713", "0.639487", "0.6383219", "0.6361692", "0.6309689", "0.6302902", "0.6223239", "0.62038815", "0.61624336", "0.61477894", "0.6137916", "0.6121422", "0.6098090...
0.0
-1
Simply should not fail and return something.
@Test public void testCreateDocumentChecksumFromMeta() throws IOException { CachedInputStream is = new CachedStreamFactory(1024, 1024).newInputStream(); Doc doc = new Doc("N/A", is); doc.getMetadata().add("field1", "value1.1", "value1.2"); doc.getMetadata().add("field...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean getPossiblyBad();", "@Override\n boolean canFail() {\n return true;\n }", "boolean isFail();", "boolean isFailure();", "@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}", "public boolean needsProblem();", "boolean hasPossiblyBad();", "static void return_unconditionally(String...
[ "0.71075034", "0.701807", "0.7010935", "0.70053214", "0.6755728", "0.6563681", "0.65047634", "0.64954984", "0.6442642", "0.6395718", "0.63832814", "0.6360624", "0.63099146", "0.6301524", "0.6222979", "0.6201706", "0.616339", "0.61467016", "0.6138464", "0.6121988", "0.60990244...
0.0
-1
Simply should not fail and return something.
@Test @Deprecated public void testCreateDocumentChecksumFromMetaDeprecated() throws IOException { CachedInputStream is = new CachedStreamFactory(1024, 1024).newInputStream(); Doc doc = new Doc("N/A", is); doc.getMetadata().add("field1", "value1.1", "value1.2")...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean getPossiblyBad();", "@Override\n boolean canFail() {\n return true;\n }", "boolean isFail();", "boolean isFailure();", "@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}", "public boolean needsProblem();", "boolean hasPossiblyBad();", "static void return_unconditionally(String...
[ "0.7106674", "0.7016902", "0.70101345", "0.70043266", "0.6755166", "0.6563591", "0.65042853", "0.64964217", "0.6443713", "0.639487", "0.6383219", "0.6361692", "0.6309689", "0.6302902", "0.6223239", "0.62038815", "0.61624336", "0.61477894", "0.6137916", "0.6121422", "0.6098090...
0.0
-1
Constructor for node that sets all the data.
public Node(String data, Node next, Node prev) { this.data = data; this.next = next; this.prev = prev; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Node( T data_ )\n {\n data = data_;\n parent = this;\n }", "public Node(T data) {this.data = data;}", "public Node(Object data) {\n\t\t\tthis.data = data;\n\t\t}", "public Node(T data) {\n this(data, null, null, null);\n }", "public Node(){\n\n\...
[ "0.72843635", "0.71100765", "0.70307475", "0.7018912", "0.6928194", "0.69191253", "0.6915738", "0.6889563", "0.6880367", "0.68614393", "0.6851548", "0.6804839", "0.67967", "0.6785931", "0.6774557", "0.67672604", "0.67603403", "0.67271364", "0.66946244", "0.66853493", "0.66706...
0.0
-1
Getter for next node.
public Node getNext() { return next; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node getNext() { return next; }", "public DNode getNext() { return next; }", "public node getNext() {\n\t\t\treturn next;\n\t\t}", "public Node<E> getNext() { return next; }", "public Node getNextNode() {\n return nextNode;\n }", "public LLNode<T> getNext() {\n return next;\n }", "Node<T...
[ "0.8390598", "0.8321453", "0.8295639", "0.8260686", "0.82429385", "0.82372594", "0.8223965", "0.82182163", "0.8214762", "0.8214731", "0.82101434", "0.8208476", "0.8208476", "0.8190305", "0.817502", "0.817502", "0.8141064", "0.8135736", "0.8122429", "0.811924", "0.8094795", ...
0.82168937
8
Setter for next node.
public void setNext(Node next) { this.next = next; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setNext(Node<E> next) { this.next = next; }", "public void setNext(Node n) { next = n; }", "public void setNext(Node next){\n\t\tthis.next = next;\n\t}", "public void setNextNode(Node nextNode) {\n this.nextNode = nextNode;\n }", "public void setNextNode(Node<T> next) {\n itsNext...
[ "0.8342445", "0.8319406", "0.826054", "0.81856114", "0.8183229", "0.81703496", "0.81660825", "0.81629014", "0.81414485", "0.81235063", "0.8085059", "0.80717313", "0.8061669", "0.80172503", "0.79935217", "0.79841757", "0.7953313", "0.79465", "0.79315907", "0.79232574", "0.7907...
0.8170205
6
Getter for Previous node in the list.
public Node getPrev() { return prev; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public node getPrevious() {\n\t\t\treturn previous;\n\t\t}", "public Node getPrevious() {\n return previous;\n }", "public Node getPrev()\r\n\t{\r\n\t\treturn prev;\r\n\t}", "public Node getPrev()\n {\n return this.prev;\n }", "public DoublyLinkedNode<E> getPrevious() {\n ...
[ "0.8843789", "0.87889", "0.87716115", "0.8759016", "0.8619982", "0.86135626", "0.8596417", "0.8559983", "0.85481393", "0.854293", "0.85094887", "0.8487676", "0.8418937", "0.8415477", "0.8409887", "0.8370842", "0.829932", "0.8277712", "0.8222902", "0.8207123", "0.8005482", "...
0.8703741
4
Setter for previous node.
public void setPrev(Node prev) { this.prev = prev; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPrevious(Node<T> previous) {\r\n this.previous = previous;\r\n }", "public Node setPrevNode(Node node);", "public void setPrev(Node<T> prev) {\n\t\tthis.prev = prev;\n\t}", "public void setPrev(Node prev)\r\n\t{\r\n\t\tthis.prev = prev;\r\n\t}", "public void setPrevNode(Nod...
[ "0.8674817", "0.8620083", "0.86005926", "0.8502014", "0.84892076", "0.8433329", "0.8382148", "0.82613224", "0.8185784", "0.81610805", "0.8077892", "0.80712694", "0.80158293", "0.8006401", "0.79686564", "0.79251254", "0.7916708", "0.78860104", "0.7861295", "0.78393525", "0.775...
0.8581396
3
/ AI Types 1 = Smart 2 = Random
public TicTacToeAI(String brainFileLocation, int type) { game = null; this.brainLocation = brainFileLocation; this.aiType = type; //Initialize a new long term and short term memory longTermMemory = new HashMap<>(); shortTermMemory = new ArrayList<String>(); //L...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Card aiRequestLogic()\n {\n Random randomCard = new Random(); // A placeholder is set aside for generating a random integer.\n return hand.get(randomCard.nextInt(hand.size())); // A card at a randomized index will be returned.\n }", "public abstract void randomize();", "private void...
[ "0.65205616", "0.6455896", "0.6418166", "0.63306665", "0.629475", "0.62851787", "0.62550277", "0.6198587", "0.6181326", "0.6171185", "0.6063036", "0.6056062", "0.59899867", "0.59567076", "0.5936694", "0.5921451", "0.5916746", "0.59002846", "0.5838939", "0.58384115", "0.583644...
0.0
-1
Return a move based on the current board configuration
public synchronized String computeMove() { if (game == null) { System.err.println("CODE ERROR: AI is not attached to a game."); return "0,0"; } char[] board = (char[]) game.getStateAsObject(); //Choose a smart move if that AI is set to "Smart" or if the random v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Move getMove(Board board);", "private int getSmartMove(char[] boardConfig) {\n\n ArrayList<Integer> emptySpaces = getEmptySpaces(boardConfig);\n\n double bestScore = -1;\n String bestChoice = \"\";\n int move = 0;\n\n //Loop through each empty space on the board...
[ "0.7437685", "0.7326363", "0.68912184", "0.68906075", "0.6842904", "0.68356663", "0.6817478", "0.67824656", "0.67610204", "0.6721933", "0.6704862", "0.6667476", "0.66611284", "0.6613201", "0.66114", "0.65858454", "0.6585437", "0.65771693", "0.65412563", "0.6534774", "0.649311...
0.6531827
20
Return a random move based on the available spaces
private int getRandomMove(char[] boardConfig) { ArrayList<Integer> emptySpaces = getEmptySpaces(boardConfig); int random = (int) (Math.random() * emptySpaces.size()); int randomSpace = emptySpaces.get(random); char currentPlayer = (game.getPlayer() == 0) ? 'X' : 'O'; char[] temp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int Rand_Move() {\n\t\tRandom r = new Random();\n\t\tint move = NO_MOVE;\n\t\tdo{\n\t\t\tmove = r.nextInt(9);\n\t\t}while(square_empty[move] == false);\n\t\treturn move;\n\t}", "private void randomMove() {\n }", "public int randomMove()\r\n {\r\n r = new Random();\r\n x = r.nextInt(...
[ "0.7857806", "0.7526575", "0.74671704", "0.74649173", "0.7458852", "0.7271986", "0.7185866", "0.71555036", "0.7013415", "0.699517", "0.6953338", "0.69054574", "0.6892935", "0.6889608", "0.6870371", "0.6837374", "0.6822215", "0.67848", "0.67609656", "0.67608833", "0.6676824", ...
0.7286806
5
/ Return the optimal move for the current empty spaces if the possible moves are in the long term memory. Otherwise choose a random move.
private int getSmartMove(char[] boardConfig) { ArrayList<Integer> emptySpaces = getEmptySpaces(boardConfig); double bestScore = -1; String bestChoice = ""; int move = 0; //Loop through each empty space on the board for (Integer emptySpace : emptySpaces) { i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Move getBestMove() {\n //System.out.println(\"AI chooses: \" + m.toString());\n return moves.get((int) (Math.random() * moves.size()));\n }", "public void performMove() {\n\t\tfor (int x = 0; x <= size-1; x++)\n\t\t\tfor (int y = 0; y <= size-1; y++)\n\t\t\t\tlocalBoard[y][x] = 0;\n\t\t\n\t\t//r...
[ "0.71696544", "0.6840756", "0.6811112", "0.6758936", "0.67464465", "0.6734174", "0.6638513", "0.6575392", "0.65339756", "0.65117276", "0.64103866", "0.6375238", "0.6297857", "0.62813514", "0.6230882", "0.6214935", "0.6214179", "0.62011236", "0.61824214", "0.6146412", "0.61372...
0.694898
1
/ Input: the current board Output: an ArrayList containing all of the empty spots on the board
private ArrayList<Integer> getEmptySpaces(char[] board) { ArrayList<Integer> emptySpaces = new ArrayList<>(); for (int i = 0; i < board.length; i++) { if (board[i] == ' ') { emptySpaces.add(i); } } return emptySpaces; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Tile> getEmptyTiles(){\n\t\tArrayList<Tile> emptyTiles = new ArrayList<Tile>();\n\t\tArrayList<Tile> boardTiles = getAllBoardTiles();\n\t\tfor (Tile tile : boardTiles) {\n\t\t\tif(tile.getPiece()== null && tile.getColor1()== PrimaryColor.BLACK) {\n\t\t\t\temptyTiles.add(tile);\n\t\t\t}\n\t\t}\n\t\...
[ "0.73431057", "0.7143795", "0.71135354", "0.7107761", "0.71047485", "0.70340407", "0.68229574", "0.680377", "0.6791804", "0.6780762", "0.67398286", "0.66870683", "0.6634945", "0.656488", "0.6560722", "0.65537894", "0.6524856", "0.6500448", "0.6480006", "0.6436721", "0.6422956...
0.66953534
11
Link the AI to the current game
public void attachGame(Game g) { game = (TicTacToeGame) g; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void playAI (int actualAI) {\n }", "public void startGame(){\n\n AgentAddress coordinatorAddressPre = getAgentWithRole(\"investment_game\", \"tout_le_monde\", \"coordinator\");\n\n if (coordinatorAddressPre==null){\n Coordinator coordinator = new Coordinator();\n\n ...
[ "0.6398667", "0.6259176", "0.61975896", "0.6192805", "0.61565304", "0.6065297", "0.6062759", "0.60625035", "0.6018016", "0.59761703", "0.5937144", "0.5934206", "0.59321", "0.59314317", "0.58840644", "0.58323836", "0.58161205", "0.58161205", "0.58161205", "0.58158386", "0.5807...
0.54766566
81
/ Input: the current board Output: an string representation of the referenced board state
private String boardToString(char[] board) { String boardString = ""; for (char aBoard : board) boardString += aBoard; return boardString.replaceAll(" ", "_"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String dumpState() {\n StringBuilder out = new StringBuilder();\n out.append(currentPlayer);\n for (int i = 0; i < board.length; ++i)\n out.append(\" \" + board[i]);\n\n return out.toString();\n }", "public String getStateOfBoard()\n {\n // This function is used to print state of...
[ "0.7754882", "0.744507", "0.7330105", "0.7292678", "0.706085", "0.70298314", "0.7026795", "0.69535774", "0.6942798", "0.6880832", "0.6868008", "0.68422353", "0.6837344", "0.6779664", "0.6772159", "0.67457414", "0.67455757", "0.6745046", "0.67377025", "0.66982865", "0.6629163"...
0.0
-1
Given the result of the game, give each move made either a reward or punishment
private void rememberGame(char result) { char playerPiece = game.getPlayer() == 0 ? 'H' : 'A'; if (result == playerPiece) { wins++; } else if (result == 'T') { ties++; } else { losses++; } // Loop through the short term memory and ad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void noteNewTurn()\n {\n if ( traceStats && stateMachine.getInstanceId() == 1 )\n {\n ForwardDeadReckonLegalMoveInfo[] masterList = stateMachine.getFullPropNet().getMasterMoveList();\n for(int i = 0; i < bestResponseScores.length; i++)\n {\n float best = -Float.MAX_...
[ "0.6254587", "0.6194907", "0.6126895", "0.61254114", "0.59846234", "0.59139806", "0.5882312", "0.5874581", "0.5863343", "0.5842919", "0.58288944", "0.57816213", "0.57767427", "0.5776478", "0.5776448", "0.5749248", "0.57268167", "0.56999105", "0.569595", "0.56411767", "0.56392...
0.5242913
77
Inform AI who the winner is result is either (H)ome win, (A)way win, (T)ie
@Override public synchronized void postWinner(char result) { rememberGame(result); //Increase the heat (decrease randomness) as more games are played if (heat < heatMax && gamesPlayed % 50 == 0) heat++; gamesPlayed++; game = null; // No longer playing a game though. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void tellPlayerResult(int winner) {\n\t}", "public int winner() {\n if(humanPlayerHits == 17) {\n return 1;\n }\n if(computerPlayerHits == 17){\n return 2;\n }\n return 0;\n }", "private static void winnerOrTie()\n\t{\n\t\t//Check each row for ...
[ "0.7473112", "0.7211351", "0.70625156", "0.6983686", "0.6948988", "0.693532", "0.692072", "0.68828005", "0.68686295", "0.6865958", "0.6858123", "0.68339866", "0.68231773", "0.68225276", "0.6816511", "0.68103933", "0.6807445", "0.6805201", "0.6803354", "0.6803209", "0.6748097"...
0.0
-1
Shutdown the AI allowing it to save its learned experience
@Override public synchronized void end() { System.out.println("Wins: " + wins + " Ties: " + ties + " Losses: " + losses + " Name: " + brainLocation + " Heat:" + heat); saveMemory(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shutdown() {\n mGameHandler.shutdown();\n mTerminalNetwork.terminate();\n }", "public void stopTrainingMode() {\n\t\t\r\n\t}", "public void shutDown() {\n isStarted = false;\n logger.info(\"[GAME] shut down\");\n }", "private void shutdown(){\n\t\ttry{\n\t\t\tMai...
[ "0.70055", "0.6884663", "0.6868683", "0.67499155", "0.67471373", "0.66654956", "0.66647846", "0.6656888", "0.6618424", "0.6614583", "0.6610583", "0.65857047", "0.6558745", "0.6553822", "0.65507025", "0.65422857", "0.6534022", "0.6524655", "0.6465975", "0.6446135", "0.64423335...
0.0
-1
Serialize the long term memory object to a file
private void saveMemory() { try { File varTmpDir = new File("data/" + brainLocation + ".ser"); if (!varTmpDir.exists()) { varTmpDir.createNewFile(); } FileOutputStream fileOut = new FileOutputStream(varTmpDir); ObjectOutputStream out = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void serialize() {\n FileOutputStream fileOutput = null;\n ObjectOutputStream outStream = null;\n // attempts to write the object to a file\n try {\n clearFile();\n fileOutput = new FileOutputStream(data);\n outStream = new ObjectOutputStream(file...
[ "0.6990989", "0.68375444", "0.6682146", "0.6646784", "0.6532085", "0.6520243", "0.6493477", "0.64759487", "0.64145714", "0.64097005", "0.6393149", "0.63260007", "0.63051486", "0.62918025", "0.6279077", "0.6270747", "0.6248124", "0.61784655", "0.61630696", "0.6131955", "0.6124...
0.7050866
0
Load the serialized memory from a file. If the file doesn't exist, create it.
private void loadMemory() { try { File varTmpDir = new File("data/" + brainLocation + ".ser"); if (varTmpDir.exists()) { FileInputStream fileIn = new FileInputStream(varTmpDir); ObjectInputStream in = new ObjectInputStream(fileIn); longTerm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object loadFromFile(String fileName) {\n\t Object obj = null;\n\t try{\n\t\t FileInputStream FIS = new FileInputStream((defaultPath+\"\\\\\" + fileName));\n\t\t ObjectInputStream onjIn = new ObjectInputStream(FIS);\n\t\t obj = onjIn.readObject();\n\t } catch (NoSuchFileException e){\n\t\t saveTo...
[ "0.6286914", "0.6272416", "0.61801565", "0.6177695", "0.61447364", "0.61086273", "0.60986733", "0.6090153", "0.60397685", "0.5996801", "0.59695226", "0.5931803", "0.59171474", "0.5897448", "0.57825875", "0.5775248", "0.57692224", "0.5760158", "0.5756674", "0.57294565", "0.572...
0.626707
2
Update the counts of a specific long term memory
public void updateLongTermMemory(String board, int wins, int ties, int losses) { BoardRecord stm = longTermMemory.get(board); stm.setWins(wins); stm.setTies(ties); stm.setLosses(losses); longTermMemory.replace(board, stm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void updateMemory(){\n \tint memory = Math.round(System.getRuntime().totalMemory()/System.getRuntime().freeMemory());\n \tstore(new DisplayableData(\"memory\", \"M\"+memory+\"%\", memory));\n }", "@SuppressWarnings(\"deprecation\")\n private void updateResourceCounters() {\n upda...
[ "0.6660036", "0.61332273", "0.59868675", "0.59372574", "0.58567405", "0.58271635", "0.58128035", "0.57339114", "0.57297313", "0.57154524", "0.5710903", "0.5709188", "0.5672283", "0.5653198", "0.56523454", "0.56366694", "0.55535626", "0.5488108", "0.548535", "0.5476312", "0.54...
0.54710066
20
Print the value in a long term memory
private void getLongTermMemory(String board) { BoardRecord stm = longTermMemory.get(board); System.out.println(stm.getWins()); System.out.println(stm.getTies()); System.out.println(stm.getLosses()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print()\n {\n StringBuffer buffer = new StringBuffer();\n for (int i = 0; i < memorySize; i++)\n {\n buffer.append(mainMemory[i]);\n }\n System.out.println(buffer.toString());\n }", "public void smem_print_store(StringBuilder return_val) throws Soar...
[ "0.65877354", "0.64525825", "0.6425168", "0.63983923", "0.6305268", "0.615572", "0.611622", "0.60744315", "0.6061534", "0.6011434", "0.5941939", "0.59335047", "0.5906248", "0.5889627", "0.5864824", "0.58416516", "0.5836772", "0.58331203", "0.5831319", "0.5831319", "0.5826006"...
0.6144963
6
It formulates a new path when the agent is done with its previous one.
public void findNewAStarPath(PedSimCity state) { RouteData route = new RouteData(); route.origin = originNode.getID(); route.destination = destinationNode.getID(); // originNode = PedSimCity.nodesMap.get(9406); // destinationNode = PedSimCity.nodesMap.get(4456); if (UserParameters.empiricalABM) { Sys...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void finalizePath(){\n\t\tif(getCompletePath()||temp.isEmpty())\n\t\t\treturn;//path has already been finalized or there is no path defined\n\t\telse{\n\t\t\tint LastPos=temp.peekLast().getPos();\n\t\t\tint d = currentPath.getDirection(LastPos);\n\t\t\tPathType type = Map.createPathTileOfType(d,caseEdge);\n...
[ "0.7234013", "0.66378725", "0.6504491", "0.6450179", "0.63537586", "0.63157415", "0.6201582", "0.61919385", "0.6134449", "0.6103762", "0.6026457", "0.59080315", "0.59074277", "0.5850241", "0.5795253", "0.57616204", "0.5736046", "0.57192826", "0.5708641", "0.5703777", "0.57030...
0.5830018
14
This is called every tick by the scheduler. It moves the agent along the path.
@Override public void step(SimState state) { PedSimCity stateSchedule = (PedSimCity) state; minutesSoFar += UserParameters.minutesPerStep; if (UserParameters.activityBased && minutesSoFar == UserParameters.endingHour) { System.out.println("End of the day - calling finish"); stateSchedule.finish(); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void move() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null) {\n\n\t return;\n\t}\n\n\tLocation loc = getLocation();\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t int counter = dirCounter.get(getDirection());\n\t dirCounter.put(getDi...
[ "0.7059321", "0.69565356", "0.68175936", "0.68081236", "0.68018603", "0.67860985", "0.67068726", "0.6681601", "0.66618353", "0.6653907", "0.6568021", "0.65518355", "0.65489924", "0.65440214", "0.65292037", "0.6514056", "0.65106416", "0.65069014", "0.64986235", "0.6480785", "0...
0.0
-1
Transition to the next edge in the path
void transitionToNextEdge(double residualMove) { // update the counter for where the index on the path is indexOnPath += pathDirection; // check to make sure the Agent has not reached the end of the path already // depends on where you're going! if ((pathDirection > 0 && indexOnPath >= path.size()) || (path...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void next() {\n\t\t// Next node\n\t\tnode = path.remove(0);\n\t\ttransition(NavigatorState.ROTATE_TO);\n\t}", "private void selectNextPath(boolean inc) {\n\t\tif (this.allPathsList.size() < 1)\n\t\t\treturn;\n\t\tList<GraphPath<PathwayVertexRep, DefaultEdge>> paths = this.allPathsList.get(this.allPaths...
[ "0.7252566", "0.6821686", "0.6330777", "0.61816376", "0.6159228", "0.61315405", "0.6060969", "0.6042948", "0.5997076", "0.59740156", "0.5919283", "0.5913824", "0.5903942", "0.58859944", "0.5877571", "0.58580816", "0.5849799", "0.58418167", "0.5787682", "0.5782554", "0.5743922...
0.7956939
0
Sets the Agent up to proceed along an Edge.
void setupEdge(EdgeGraph edge) { if (UserParameters.socialInteraction) updateCrowdness(edge); currentEdge = edge; //transform GeomPlanarGraphEdge in Linestring LineString line = edge.getLine(); //index the Linestring segment = new LengthIndexedLine(line); startIndex = segment.getStartIndex(); endIndex ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setup(){\n\n\t\tsuper.setup();\n\n\t\tfinal Object[] args = getArguments();\n\t\tif(args!=null && args[0]!=null && args[1]!=null){\n\t\t\tdeployAgent((Environment) args[0],(EntityType)args[1]);\n\t\t}else{\n\t\t\tSystem.err.println(\"Malfunction during parameter's loading of agent\"+ this.getClass()...
[ "0.6291797", "0.5766119", "0.5751221", "0.57245517", "0.57113016", "0.5710157", "0.5689873", "0.56653833", "0.56620437", "0.5645107", "0.56423026", "0.5624952", "0.55713433", "0.5558551", "0.5557259", "0.5548124", "0.55245894", "0.5495834", "0.54957837", "0.5456445", "0.54268...
0.7328203
0
It moves the agent to the given coordinates.
public void updatePosition(Coordinate c) { pointMoveTo.setCoordinate(c); PedSimCity.agents.setGeometryLocation(agentLocation, pointMoveTo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void move() {\n\t\tmoveX();\n\t\tmoveY();\n\t}", "public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\t\n\t\tLocation next2 = next.getAdjacentLocation(getDire...
[ "0.71339065", "0.6963379", "0.68941045", "0.68855697", "0.6862072", "0.6859203", "0.6858495", "0.68132794", "0.68072164", "0.6796319", "0.6795778", "0.6792442", "0.67909664", "0.67763126", "0.67666596", "0.67306554", "0.67171633", "0.6704896", "0.66894996", "0.66856563", "0.6...
0.6268962
80
It updates the volumes on a given edge, on the basis of the agent's route choice model.
void updateEdgeData(EdgeGraph edge) { edge = PedSimCity.edgesMap.get(edge.getID()); //in case it was a subgraph edge if (UserParameters.empiricalABM) edge.densities.replace(agp.groupName, edge.densities.get(agp.groupName)+1); else edge.densities.replace(ap.routeChoice, edge.densities.get(ap.routeChoice)+1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateCrowdness(EdgeGraph newEdge) {\n\t\tif (currentEdge != null) {\n\t\t\tArrayList<Pedestrian> currentVolume = PedSimCity.edgesVolume.get(currentEdge);\n\t\t\tcurrentVolume.remove(this);\n\t\t}\n\n\t\t// update new edge traffic\n\t\tif (PedSimCity.edgesVolume.get(newEdge) == null) PedSimCity.edgesVo...
[ "0.5847958", "0.55869496", "0.5501072", "0.5473177", "0.5394926", "0.5393179", "0.5365799", "0.53326833", "0.5331536", "0.5319934", "0.5252718", "0.5208703", "0.5156453", "0.50916773", "0.50753117", "0.5067313", "0.50571555", "0.4978622", "0.49463823", "0.49328616", "0.492293...
0.63549745
0
It returns the geometry representing agent location
public MasonGeometry getGeometry() {return agentLocation;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Geometry getGeometry();", "public AreaGeometry getGeometry() {\n return this.geometry;\n }", "public PlaceGeometry getGeometry() {\n return geometry;\n }", "public GeoOrigin getGeoOrigin();", "public GridLocation getLocation();", "public geo_location getLocation() {\n return _p...
[ "0.6915802", "0.63575715", "0.6230512", "0.61473405", "0.60812384", "0.60618794", "0.6046632", "0.60291487", "0.60019493", "0.59939545", "0.5957237", "0.5946694", "0.5911702", "0.5878252", "0.587438", "0.5873447", "0.5859106", "0.584013", "0.5808647", "0.580755", "0.5798784",...
0.8686108
0
It select the route choice model and it calls the path formulation algorithm
public void selectRouteChoice() { RoutePlanner planner = new RoutePlanner(); this.sequence = ap.listSequences.get(numTrips); // only minimisation if (ap.routeChoice.equals("DS")) newPath = planner.roadDistance(originNode, destinationNode, ap); else if (ap.routeChoice.equals("AC")) newPath = planner.angularCh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void findNewAStarPath(PedSimCity state) {\n\n\t\tRouteData route = new RouteData();\n\t\troute.origin = originNode.getID();\n\t\troute.destination = destinationNode.getID();\n\t\t//\t\toriginNode = PedSimCity.nodesMap.get(9406);\n\t\t//\t\tdestinationNode = PedSimCity.nodesMap.get(4456);\n\n\t\tif (UserPara...
[ "0.6437227", "0.6226352", "0.6193227", "0.60500073", "0.5939259", "0.5916624", "0.5880344", "0.58478427", "0.5832727", "0.58221316", "0.5705578", "0.5701128", "0.56924736", "0.5664431", "0.56237835", "0.5610023", "0.55915874", "0.55879134", "0.5564051", "0.5543681", "0.553654...
0.7780745
0
It computes the agents' speed
double progress(double val) { return val * linkDirection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getSpeed();", "double getSpeed();", "protected long travel() {\n\n return Math.round(((1 / Factory.VERTEX_PER_METER_RATIO) / (this.speed / 3.6)) * 1000);\n }", "public void calcSpeed(){\r\n Random rand = new Random();\r\n tire = rand.nextInt(10)+1;\r\n engine = ra...
[ "0.6754982", "0.6750929", "0.67089045", "0.66360086", "0.6623297", "0.66072196", "0.6510198", "0.6507167", "0.65004814", "0.6454249", "0.6450234", "0.64472026", "0.641602", "0.63918614", "0.6389906", "0.6383413", "0.6383413", "0.6383413", "0.6383413", "0.6383413", "0.6383413"...
0.0
-1
It makes the agent move along the computed route
public void keepWalking() { // move along the current segment if (UserParameters.socialInteraction) speed = progressSocial(moveRate); else speed = progress(moveRate); currentIndex += speed; // check to see if the progress has taken the current index beyond its goal // given the direction of movement. If so,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void move() {\n\n if (_currentFloor == Floor.FIRST) {\n _directionOfTravel = DirectionOfTravel.UP;\n }\n if (_currentFloor == Floor.SEVENTH) {\n _directionOfTravel = DirectionOfTravel.DOWN;\n }\n\n\n if (_directionOfTravel == DirectionOfTravel.UP) {\n...
[ "0.72984105", "0.71370465", "0.7055927", "0.70434135", "0.69800705", "0.69718593", "0.6908271", "0.6893375", "0.6758387", "0.6756284", "0.67559296", "0.67340696", "0.66973794", "0.66956717", "0.66908157", "0.6671399", "0.6660531", "0.6647472", "0.66422725", "0.6629346", "0.66...
0.0
-1
clean up on old edge
public void updateCrowdness(EdgeGraph newEdge) { if (currentEdge != null) { ArrayList<Pedestrian> currentVolume = PedSimCity.edgesVolume.get(currentEdge); currentVolume.remove(this); } // update new edge traffic if (PedSimCity.edgesVolume.get(newEdge) == null) PedSimCity.edgesVolume.put(newEdge, new Arra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clean() {\n // TODO: Your code here.\n for (Long id : vertices()) {\n if (adj.get(id).size() == 1) {\n adj.remove(id);\n }\n }\n }", "private void clean() {\n nodesToRemove.clear();\n edgesToRemove.clear();\n }", "privat...
[ "0.72632575", "0.69673824", "0.6934367", "0.68585795", "0.66869366", "0.6672074", "0.65085834", "0.6436976", "0.6354367", "0.6339832", "0.6339832", "0.6316334", "0.62722164", "0.62454444", "0.6232163", "0.6172433", "0.6155709", "0.6155709", "0.6153174", "0.6147106", "0.611394...
0.0
-1
A utility function to check if the given character is operand
private static boolean isOperand(char ch) { return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean operator(Character input){\r\n //detects operands\r\n if(input == '^'||input == '-'||input == '+'||input == '/'||input == '*'|| input =='('|| input ==')'){\r\n return true;\r\n }\r\n else\r\n return false;\r\n }", "public static boolean checkOperator(S...
[ "0.80983895", "0.80913067", "0.8091049", "0.8021369", "0.7934937", "0.79305017", "0.79152375", "0.7911901", "0.79022646", "0.7876445", "0.7858984", "0.78504336", "0.7791002", "0.77500355", "0.7745211", "0.77186036", "0.7653191", "0.7650521", "0.7554993", "0.75278795", "0.7464...
0.8052691
3
Test that, once the queue eclipses the configure size limit, calls to journal more data are rejected.
@Test public void testQueueLimiting() throws Exception { // Block the underlying fake proxy from actually completing any calls. DelayAnswer delayer = new DelayAnswer(LOG); Mockito.doAnswer(delayer).when(mockProxy).journal( Mockito.<RequestInfo>any(), Mockito.eq(1L), Mockito.eq(1L), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEnsureBufferSizeExpandsToBeyondMaxBufferSize() {\n assertEnsureBufferSizeExpandsToMaxBufferSize(true);\n }", "private void raiseLimitException() {\n\t\t\tthrow new DataBufferLimitException(\"Exceeded limit on max bytes to buffer : \" + getMaxInMemorySize());\n\t\t}", "@Over...
[ "0.65991145", "0.65122545", "0.64931136", "0.64005196", "0.6302009", "0.6280919", "0.5996313", "0.59666634", "0.58924556", "0.5823115", "0.5820635", "0.5787166", "0.5761012", "0.5748183", "0.5745549", "0.57410055", "0.5716088", "0.57092386", "0.57081765", "0.570437", "0.56982...
0.7568555
0
Test that, if the remote node gets unsynchronized (eg some edits were missed or the node rebooted), the client stops sending edits until the next roll. Test for HDFS3726.
@Test public void testStopSendingEditsWhenOutOfSync() throws Exception { Mockito.doThrow(new IOException("injected error")) .when(mockProxy).journal( Mockito.<RequestInfo>any(), Mockito.eq(1L), Mockito.eq(1L), Mockito.eq(1), Mockito.same(FAKE_DATA)); try { ch.sendEdits(1L,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testServerReplicaLeavingDuringWrite() throws Exception {\n\t\tfinal KeyValueServer server = new KeyValueServer();\n\t\tArrayList<String> files = populateServer(server);\n\t\tfinal long TIMEOUT = 100;\n\t\tthis.err = false;\n\t\t//We can make a fake client that blocks in its write then make sur...
[ "0.65554065", "0.6385915", "0.60428077", "0.59956723", "0.5916765", "0.590722", "0.58935595", "0.5867984", "0.5866431", "0.5812901", "0.57881486", "0.57633954", "0.5751304", "0.57085246", "0.5692372", "0.56606334", "0.5658153", "0.56519043", "0.563446", "0.5582188", "0.557505...
0.63657403
2
get bean by bean name
public static <T> T getBean(String beanName) { return (T) applicationContext.getBean(beanName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getBean(String name) {\n Object bean = beanMap.get(name);\n if (bean == null) {\n throw new IllegalArgumentException(\"there is no bean with name \" + name);\n }\n\n return bean;\n }", "public static Object getBean(String name) {\r\n\t\tWebApplicationContex...
[ "0.79964346", "0.786159", "0.77600926", "0.76266176", "0.75355107", "0.7450493", "0.7419184", "0.7288232", "0.7136635", "0.71234405", "0.7065102", "0.67924273", "0.6779629", "0.6707856", "0.67021966", "0.6622216", "0.66143364", "0.6528129", "0.6440731", "0.6407061", "0.636274...
0.6773485
13
get interface all subclass by interface class type
public static String[] getBeanNamesForType(Class clazz) { return applicationContext.getBeanNamesForType(clazz); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Collection<ClassTranslator> getInterfaces();", "private static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {\n return getAllInterfacesForClass(clazz, null);\n }", "TypeInfo[] interfaces();", "Set<Interface> getInterfaces();", "<T> IList<T> getImplementingObjects(Class<T> interfaceT...
[ "0.6878797", "0.67680293", "0.6599951", "0.6560383", "0.6541091", "0.64673764", "0.6310602", "0.61826444", "0.6175833", "0.61224127", "0.6109677", "0.6109677", "0.60940444", "0.60816187", "0.6065243", "0.60587126", "0.6011333", "0.6007515", "0.59966296", "0.591689", "0.590667...
0.0
-1
get bean class by bean name
public static Class<?> getType(String beanName) { return applicationContext.getType(beanName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Object getBean(String name) {\r\n\t\tWebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext();\r\n\t\treturn wac.getBean(name);\r\n\t}", "public <T> T getBean(String beanName, Class<T> ofType) throws CouldNotResolveBeanException;", "public Object findBean(String beanName) {\n\t...
[ "0.6871323", "0.67342687", "0.6710013", "0.6689754", "0.66291994", "0.6628337", "0.66251165", "0.66244644", "0.64513314", "0.6440585", "0.6439291", "0.6438513", "0.64070725", "0.63580227", "0.63564754", "0.6269657", "0.6238258", "0.62295604", "0.62163204", "0.62156665", "0.61...
0.6861701
1
get bean by bean name
public static <T> T getBean(String beanName, Class<? extends Annotation> annotationType) { T t = (T) applicationContext.getBean(beanName); if (!t.getClass().isAnnotationPresent(annotationType)) { throw new NoSuchBeanDefinitionException("Resources don't exist."); } return t; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getBean(String name) {\n Object bean = beanMap.get(name);\n if (bean == null) {\n throw new IllegalArgumentException(\"there is no bean with name \" + name);\n }\n\n return bean;\n }", "public static Object getBean(String name) {\r\n\t\tWebApplicationContex...
[ "0.7995118", "0.78612924", "0.77599835", "0.76259434", "0.7534363", "0.74506", "0.74193335", "0.728913", "0.7136137", "0.71225464", "0.7064616", "0.6793508", "0.67810076", "0.6772993", "0.6707734", "0.6703208", "0.6624315", "0.6612891", "0.6528349", "0.6440455", "0.64074963",...
0.54494375
71
/ Using the Observable.lift() method you can perform multiple queries without breaking method chaining. Observable.lift() requires an Operator parameter which are available via db.select(sql).parameterOperator().getXXX() db.select(sql).parameterListOperator().getXXX() db.select(sql).dependsOnOperator().getXXX() db.upda...
public static void main(String[] args) { Database db = Database.from("jdbc:mysql://127.0.0.1:3306/alarm_user", "root", ""); Observable<Integer> score = Observable // parameters for coming update .just(4, "FRED") // update Fred's score to 4 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void example() {\n Func1<Integer, Observable<Integer>> db1 = param -> Observable.range(1, param);\n\n // ws-kald som funktion der returner en Observable\n Func1<Integer, Observable<Integer>> ws1 = param -> Observable.just(param);\n\n // ws-kald som funktion der returne...
[ "0.58075345", "0.544267", "0.5085378", "0.50321555", "0.5011454", "0.49489313", "0.4844218", "0.4842796", "0.47734678", "0.47468552", "0.47328648", "0.4727003", "0.47255653", "0.47017977", "0.46715808", "0.46607605", "0.46524936", "0.4637129", "0.4606826", "0.45846593", "0.45...
0.60537094
0
Processes requests for both HTTP GET and POST methods.
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ArrayList<Integer> selectedClassrooms = new ArrayList<>(); for(String val: request.getParameterValues("selected")) { selectedClassrooms.add(Integer.pars...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_...
[ "0.7005406", "0.66572356", "0.6604074", "0.65101326", "0.64464515", "0.64432913", "0.6439602", "0.64311135", "0.642902", "0.6425377", "0.6425377", "0.6420841", "0.6420841", "0.6420841", "0.6417446", "0.64133376", "0.64133376", "0.6399404", "0.6395047", "0.6395047", "0.6393712...
0.0
-1
TODO Autogenerated method stub
@Override public void run() { isAlive = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
go through each moveable object
private void setNodeConnectors(){ for (MoveableObject moveableObject : gameObjects.getMoveableObjectsList()) { // if the hashmap doesn't contain that radius then make the nodes if (!nodeMap.containsKey(moveableObject.getObjectRadius())){ bufferedStationaryObstacles =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean updateMovingObjects(double elapsedSeconds) {\n for(Movable movingObj : engine.getMovingObjects()){\n double dx = 0, dy = 0;\n switch (movingObj.getFacing()){\n case UP:\n dy -= movingObj.getSpeed() * GRID_SIZE * elapsedSeconds;\n ...
[ "0.66834337", "0.66012746", "0.65674216", "0.6537636", "0.64115244", "0.6395218", "0.63849676", "0.6315673", "0.6312731", "0.6312251", "0.6310383", "0.63078076", "0.6302739", "0.6263179", "0.62549436", "0.6204251", "0.61909366", "0.61547506", "0.6113787", "0.60943073", "0.609...
0.0
-1
go through the hashmap and get the appropriate nodeConnector
public ArrayList<KPoint> getPathPoints(KPoint startPoint, KPoint endPoint, int objectRadius){ double maxConnectionDistanceFromStartAndEndPointsToObstacles = maxConnectionDistanceBetweenObstacles; NodeConnector node = (NodeConnector) nodeMap.get(objectRadius); ArrayList<PathBlockingObstacle> ob...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Connector getConnector(int index);", "Map getConnectionManagerMap();", "private Client findClient() {\n if ( key != null )\n return clientConnections.getConnection(key);\n else { //use keyCluster to find client\n return clientConnections.getConnection( keyCl...
[ "0.593699", "0.58908296", "0.55760074", "0.5493732", "0.54519373", "0.54414", "0.53177005", "0.5274909", "0.5224858", "0.520134", "0.51994604", "0.51178753", "0.5104916", "0.50763035", "0.5069218", "0.5044898", "0.50070083", "0.5003873", "0.49984083", "0.49937895", "0.4981857...
0.0
-1
repeat for each moveable object
public void moveObjectsAlongPath(){ for (int i=0; i<gameObjects.getMoveableObjectsList().size(); i++){ MoveableObject movingOb = gameObjects.getMoveableObjectsList().get(i); if (movingOb.getPathDestination()!=null ){ KPoint...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void move() {\r\n\t\tmoveCount++;\r\n\t}", "@Override\n\tpublic void makeNextMove() \n\t{\n\t}", "private void randomMove() {\n }", "public void move() {\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t...
[ "0.68882495", "0.6840661", "0.6706359", "0.66982454", "0.66090673", "0.6584404", "0.6485088", "0.6456513", "0.6454904", "0.6416398", "0.6394383", "0.63820475", "0.6368092", "0.6293158", "0.628855", "0.62820023", "0.62696534", "0.62653804", "0.6255368", "0.62419343", "0.621733...
0.6169385
25
test for drawing the obstacles
public ArrayList<PathBlockingObstacle> getStationaryObstacles(){ ArrayList<PathBlockingObstacle> obstacles = (ArrayList)obstaclesMap.get(gameObjects.getMoveableObjectsList().get(0).getObjectRadius()); return obstacles; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void drawObstacle(Graphics2D g2){\n\t\tif( obstacleExists() ){\n\t\t\t// Get the overlay screen position of the obstacle.\n\t\t\tPoint scr_obs_top = overlayPoint(toScaledX(getObstacleDistance()+getDefaultTHR()), toScaledY(-getObstacleHeight()));\n\t\t\tPoint scr_obs_bottom = overlayPoint(toScaledX(getObsta...
[ "0.68571174", "0.670964", "0.6704004", "0.6563452", "0.6550401", "0.6353997", "0.6352511", "0.63402575", "0.6318694", "0.6220697", "0.6212439", "0.61992645", "0.619027", "0.61693597", "0.6167369", "0.61605895", "0.61225724", "0.61056197", "0.6085746", "0.60483754", "0.6043756...
0.0
-1
The LocalDate represents a date in ISO format (yyyyMMdd) without time.
public static void main(String[] args) { LocalDate localDate = LocalDate.now(); System.out.println("LocalDate: " + localDate); System.out.println(LocalDate.of(2019, 04, 16)); System.out.println(LocalDate.parse("2019-04-16")); //////////////////////////////////////////////////////// LocalDate tomorrow =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "LocalDate getDate();", "Date date(LocalDate date);", "public LocalDate getDate() {\n return date;\n }", "@Override\n public LocalDate getDate() {\n return null;\n }", "public LocalDate getDate() {\n return date;\n }", "public LocalDate getDate() {\n return date;\n }",...
[ "0.73936325", "0.71881515", "0.67838955", "0.6727861", "0.6691928", "0.6691928", "0.6549875", "0.6479021", "0.6359533", "0.62193185", "0.6185043", "0.6180954", "0.6170521", "0.6147574", "0.6138134", "0.60839957", "0.6068309", "0.6066844", "0.6002054", "0.59912103", "0.5974744...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Thread t = new Thread(new MyRunnable1());// 新建状态 t.start();// 就绪状态 try { t.sleep(5000); } catch (Exception e) { e.printStackTrace(); } new MyRunnable1().setStop();// 线程停止 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
creating a parameterized constructor
Student4(int i, String n) { id = i; name = n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor<T> newConstructor();", "DefaultConstructor(int a){}", "HxMethod createConstructor(final String... parameterTypes);", "defaultConstructor(){}", "public Generic(){\n\t\tthis(null);\n\t}", "T newInstance(Object... args);", "public ParameterizedInstantiateFactory() {\r\n super();\r\n ...
[ "0.7219093", "0.70234513", "0.693673", "0.6885861", "0.68138236", "0.67968607", "0.6698335", "0.66839397", "0.66606253", "0.6649937", "0.6626583", "0.65138125", "0.64808506", "0.63760394", "0.6372293", "0.6348277", "0.6320196", "0.6310452", "0.62995434", "0.6286599", "0.62548...
0.0
-1
creating a parameterized constructor
Student4(int i, String n, int t) { id = i; name = n; age = t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor<T> newConstructor();", "DefaultConstructor(int a){}", "HxMethod createConstructor(final String... parameterTypes);", "defaultConstructor(){}", "public Generic(){\n\t\tthis(null);\n\t}", "T newInstance(Object... args);", "public ParameterizedInstantiateFactory() {\r\n super();\r\n ...
[ "0.7219093", "0.70234513", "0.693673", "0.6885861", "0.68138236", "0.67968607", "0.6698335", "0.66839397", "0.66606253", "0.6649937", "0.6626583", "0.65138125", "0.64808506", "0.63760394", "0.6372293", "0.6348277", "0.6320196", "0.6310452", "0.62995434", "0.6286599", "0.62548...
0.0
-1
method to display the values
void display() { System.out.println(id + " " + name + " " + age); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "public void printValues() {\n\t\tfor (int i = 0; i < 7; i++) {...
[ "0.8289284", "0.7809706", "0.7770151", "0.75643086", "0.7482198", "0.74327594", "0.7338533", "0.7313772", "0.72396016", "0.7081672", "0.70516", "0.7014946", "0.6997404", "0.6991467", "0.6978281", "0.69335806", "0.6930144", "0.69300115", "0.69255114", "0.6920068", "0.69186103"...
0.6854468
35
creating objects and passing values
public static void main(String args[]) { Student4 s1 = new Student4(111, "Karan"); //Log.info("Test"); Student4 s2 = new Student4(222, "Aryan", 23); //calling method to display the values of object s1.display(); s2.display(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void Constructor_ObjectValues_InstanceCreated() {\n\t\ttry {\n Position position = make_PositionWithIntegerPoints(xCoordinate, yCoordinate, direction);\n Surface surface = make_SurfaceWithGivenDimensions(xDimension, yDimension);\n\t\t\tRover rover = make_RoverWithObjectValue...
[ "0.70574325", "0.65297747", "0.63541913", "0.6248974", "0.6234699", "0.6212324", "0.6087354", "0.6065963", "0.6024975", "0.59997845", "0.598354", "0.5980574", "0.5914344", "0.5884554", "0.5880936", "0.58716017", "0.58390015", "0.5825988", "0.58125186", "0.58063745", "0.580259...
0.0
-1
Save a tree on a file.
public static Tree saveTree(Tree tree, String outFile) { if (tree == null) throw new NullPointerException("tree: null"); if (outFile == null) throw new NullPointerException("outFile: null"); TreeBuilder.saveTree(tree.tb, outFile); return tree; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveTree(File saveFile) throws FileNotFoundException {\r\n\t\tPrintStream ps = new PrintStream(saveFile); // Prepare to output to save file\r\n\t\tsaveTree(ps, getRootNode());\r\n\t\tps.close(); // Close the save file\r\n\t}", "public void saveTree(String filename) {\r\n\t\ttry { // Try saving tree\...
[ "0.79049844", "0.7726581", "0.7363603", "0.7152008", "0.6981818", "0.6805854", "0.66211295", "0.65460956", "0.6503389", "0.64902663", "0.642824", "0.6399494", "0.6309287", "0.62664175", "0.6248563", "0.6242364", "0.6038461", "0.60299736", "0.6019368", "0.59962636", "0.5992856...
0.7161307
3
Load a tree from a file.
public static Tree loadTree(String inFile) { if (inFile == null) throw new NullPointerException("inFile: null"); TreeBuilder tb = TreeBuilder.loadTree(inFile); return tb == null ? null : new Tree(tb); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static DecisionTree loadTree(File file) throws FileNotFoundException {\r\n\t\tScanner scan = new Scanner(file); // Read from file\r\n\t\t// First line of file is question at root node\r\n\t\tDecisionTree dt = new DecisionTree(scan.nextLine());\r\n\t\tBinaryNode<String> root = dt.getRootNode();\r\n\t\tfillT...
[ "0.7695734", "0.7525982", "0.72663635", "0.69762564", "0.6559921", "0.64634305", "0.6453183", "0.6371325", "0.63195574", "0.6309153", "0.6249276", "0.62193036", "0.6186765", "0.61075854", "0.6096798", "0.60933864", "0.6069449", "0.5928384", "0.5919075", "0.5860208", "0.582713...
0.72693294
2
Implemented equality among trees. Not sure it will work.
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((tb == null) ? 0 : tb.hashCode()); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean equal(Tree T) {\n if(T.count() != count()) {\n return false;\n } else {\n return equalNodes(root,T.root);\n }\n }", "@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}", "public void equalsCheck() {\n System.out.print...
[ "0.75099313", "0.73878944", "0.7298092", "0.72963464", "0.7279593", "0.7029307", "0.7002929", "0.69921356", "0.69844985", "0.6982037", "0.6971012", "0.69054735", "0.6839839", "0.67785144", "0.676822", "0.67384255", "0.67266405", "0.67156124", "0.6715256", "0.6699898", "0.6656...
0.0
-1
standard:: using one basic beginning method to get the input, call the recursive and return the final result using another void return type of the same name as the overloading and recursive down to the road basic interface with final return type Note: in the basic interface we only need one parameter, i.e. the root
ArrayList< LinkedList< Node > > levellist(Node root) { //results contain all the linkedlists containing all the nodes on each level of the tree ArrayList< LinkedList< Node > > results = new ArrayList< LinkedList< Node > > (); //basic condition for the following built-in calling of recursive levellist(root, results,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void work(RootNode root) throws Exception;", "protected abstract void traverse();", "public static void main(String[] args) {\n\n TreeNode node1 = new TreeNode(1);\n TreeNode node2 = new TreeNode(2);\n TreeNode node3 = new TreeNode(3);\n TreeNode node4 = new TreeNode(4);\n ...
[ "0.6035457", "0.5744705", "0.5684813", "0.56583077", "0.55165994", "0.54646844", "0.54209334", "0.5408751", "0.53461057", "0.531973", "0.52993774", "0.5289165", "0.5279782", "0.52788985", "0.5276386", "0.5272718", "0.5223957", "0.5223774", "0.52173275", "0.5210888", "0.515058...
0.5073134
26
following interface with void type in this overloaded function we need three parameters passed from the basic GUI interface
void levelList(Node root, ArrayList< LinkedList< Node > > results, int level) { if(root == null) return; // base case: the outlet of the recursive LinkedList<Node> list = null; // initialize list with null, i.e. we did not create it yet //because we use the DFS therefore we must pass the level as one of the parame...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void actionPerformed(GuiButton guiButton);", "@Override\n\tpublic void guiTinNhan() {\n\n\t}", "public interface GUI {\n\n /**\n * Adds a MouseListener to the GUI.\n * @param mouseListener added to the GUI.\n */\n void addMouseListener(MouseListener mouseListener);\n\n /**\...
[ "0.63986534", "0.63522017", "0.62565607", "0.6122353", "0.6058947", "0.6008733", "0.59794164", "0.59765404", "0.59593165", "0.5941216", "0.5938274", "0.59082323", "0.58889914", "0.5884556", "0.587794", "0.5876319", "0.587236", "0.58506465", "0.5836368", "0.5818087", "0.581720...
0.0
-1
////////////////////////////////////////////////////////////////////////// End of custom mappings //////////////////////////////////////////////////////////////////////////
public Patient() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mapping() {\n\t\t\n\t}", "public abstract AnnotationMap mo30683d();", "private static void createTypeMap() {\n\n }", "@Override\n public String mapping() {\n return StringUtils.lines(\n \"foo.bar.Baz -> foo.bar.Baz:\", \" java.lang.Object f1 -> a\", \" java.lang.String f2 -> a\");...
[ "0.75489783", "0.66221595", "0.6476321", "0.6307363", "0.6257793", "0.62155", "0.6187813", "0.6177484", "0.6171128", "0.6156901", "0.6155117", "0.6143827", "0.61408734", "0.61392754", "0.61139", "0.6081774", "0.60649604", "0.60533124", "0.6039588", "0.60379934", "0.6037088", ...
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Patient)) { return false; } Patient other = (Patient) object; if (this.id == null && other.id == null && this != other) { return false; } if ((this.id == null && other.id ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.68948644", "0.6837785", "0.67038405", "0.6639133", "0.6639133", "0.65911627", "0.6576973", "0.6576973", "0.6573157", "0.6573157", "0.6573157", "0.6573157", "0.6573157", "0.6573157", "0.65598476", "0.65598476", "0.6543178", "0.6523156", "0.65143406", "0.6486455", "0.6475413...
0.0
-1
Created by kburkhardt on 1/24/15.
public interface GameServerState<Data> extends ServerState { void setId(int id); int getId(); Data getClusterEntry(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public final void...
[ "0.58455807", "0.5791059", "0.56601936", "0.56469935", "0.5614285", "0.56104904", "0.5599285", "0.55924106", "0.55674386", "0.55674386", "0.55114466", "0.55092025", "0.55092025", "0.55092025", "0.55092025", "0.55092025", "0.54906726", "0.54901785", "0.54890007", "0.54823345", ...
0.0
-1
Specify the base URL to the RESTful web service
@Test public void Solution() { RestAssured.baseURI = baseUrl; RestAssured.useRelaxedHTTPSValidation(); JsonPath jsonpath = RestAssured.get("/comments?postId=40").body().jsonPath(); // get the jsonResponse list List<Object> jsonResponse = jsonpath.getList("$"); assertEquals(jsonResponse.size(), 5); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected String getHttpBaseUrl() {\n\t\treturn this.properties.getHttpUrlBase();\n\t}", "public abstract String getBaseURL();", "private static String getBaseUrl() {\n StringBuilder url = new StringBuilder();\n url.append(getProtocol());\n url.append(getHost());\n url....
[ "0.7228045", "0.69052815", "0.679907", "0.6798727", "0.67873746", "0.67425233", "0.67407423", "0.67308515", "0.67306757", "0.6651933", "0.6629259", "0.6582385", "0.6582385", "0.6571985", "0.6567037", "0.6555146", "0.65542257", "0.6554184", "0.6522676", "0.65026265", "0.643887...
0.0
-1
leggo le cartelle del fascicolo da Esb
private static CartelleAvvisiResponseType getBPSCartelleResponse( Fascicolo fascicolo) throws Exception { CartellaAvvisiRequestType bpCartelleRequest = new CartellaAvvisiRequestType(); bpCartelleRequest.setTipologiaRichiesta(MessagesClass.getMessage("TIPOLOGIA_DOCUMENTI_TUTTI").trim()) ; bpCartelleRequ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Carta(char s,int v)\r\n {\r\n valore = v;\r\n \r\n nome = \"\";\r\n \r\n codice = valore;\r\n \r\n Potenziale = new ConcurrentSkipListMap();\r\n \r\n ValoriPotenziale = new ConcurrentSkipListMap(); \r\n \r\n /*\r\n COM...
[ "0.64965993", "0.63475794", "0.6071892", "0.59902084", "0.59268296", "0.58813554", "0.5866403", "0.58645874", "0.5864464", "0.58471006", "0.58403885", "0.58092964", "0.57910997", "0.57863027", "0.57845944", "0.5782026", "0.5768458", "0.57677424", "0.5764929", "0.5759331", "0....
0.0
-1
fine modifica_problema_transazioni 13/10/2014 inizio modifica_08/10/2014
private static RataType[] getRataTypeFromBPSDettaglioCartellaResponse( DettaglioCartellaAvvisoResponse response) { RataType[] result = new RataType[0]; //inizio modifica FASCICOLO_2.1 if (response.getCartellaAvviso().getPianoRateOrigine()!=null ) { it.equitalia.dettagliocartellaavviso.wsdl.RataT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void affichageDateFin() {\r\n\t\tif (dateFinComptage!=null){\r\n\t\t\tSystem.out.println(\"Le comptage est clos depuis le \"+ DateUtils.format(dateFinComptage));\r\n\t\t\tif (nbElements==0){\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos mais n'a pas d'éléments. Le comptage est en anomalie.\");\r\n\t...
[ "0.63138115", "0.61593735", "0.6148405", "0.61025596", "0.6027052", "0.601694", "0.59608024", "0.59608024", "0.5942456", "0.59305406", "0.5925967", "0.59226716", "0.5914946", "0.59015316", "0.58988583", "0.58805734", "0.58701247", "0.5860164", "0.5838158", "0.58349526", "0.58...
0.0
-1
inizio modifica mail 08/10/2014 10:38
private static DocumentoType[] getDocumentoTypeFromBPSDettaglioCartellaResponse( DettaglioCartellaAvvisoResponse response) { it.equitalia.dettagliocartellaavviso.wsdl.DocumentoType bpelDocumentoType = response.getCartellaAvviso().getDocumento(); DocumentoType[] result = new DocumentoType[1]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getExpirationtMailBody( );", "private void sendMailLogInfo() {\n\t\tif (mChangedInfoList.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t// 1.导出信息\n\t\tString content = dumpLogInfoWithHtml();\n\t\t\n\t\t// 2. 更新收件人与标题\n\t\tmMailSender.updateMailToAndCc(mMailReceivers, mMailCcReceivers);\n\t\t\n\t\tLogger.printl...
[ "0.61524236", "0.6069111", "0.60064083", "0.59422064", "0.5914998", "0.58934075", "0.58036035", "0.5742891", "0.5705776", "0.5616124", "0.55663157", "0.55623126", "0.5508319", "0.55073684", "0.55038464", "0.549713", "0.54942375", "0.54898345", "0.5484559", "0.54812974", "0.54...
0.0
-1
fine modifica mail 08/10/2014 10:38
static DettaglioCartellaAvvisoResponse getBPSDettaglioCartellaResponse( DettaglioCartellaAvvisoRequest request) throws Exception { DettaglioCartellaAvvisoResponse response; DettaglioCartellaAvvisoPortTypeProxy proxy = new DettaglioCartellaAvvisoPortTypeProxy( MessagesClass.getMessage("DETTAGLIO_CARTELLA_ESB_ENDPO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getExpirationtMailBody( );", "private void sendMailLogInfo() {\n\t\tif (mChangedInfoList.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t// 1.导出信息\n\t\tString content = dumpLogInfoWithHtml();\n\t\t\n\t\t// 2. 更新收件人与标题\n\t\tmMailSender.updateMailToAndCc(mMailReceivers, mMailCcReceivers);\n\t\t\n\t\tLogger.printl...
[ "0.6177004", "0.5998088", "0.59333694", "0.5903529", "0.58537203", "0.5843268", "0.5829064", "0.565341", "0.5625269", "0.5580289", "0.5561994", "0.54921716", "0.54894125", "0.54842556", "0.5481108", "0.5474427", "0.5470838", "0.5466647", "0.54569787", "0.54441786", "0.5437276...
0.0
-1
INIZIO Fascicolo 2.1 20150507
private static EnteType getEnteConcedentePianoRateazione( it.equitalia.dettagliocartellaavviso.wsdl.PianoRateazioneType typeResponse) { EnteType res = new EnteType(); res.setDescrizione(typeResponse.getEnteConcedente().getDescrizione()); res.setCodiceEnte(typeResponse.getEnteConcedente().getCodiceEnte()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "void mo1507n();", "public void mo38117a() {\n }", "public void mo6081a() {\n }", "public void mo4359a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "publ...
[ "0.65501523", "0.6183705", "0.6172345", "0.61172104", "0.6071212", "0.6045922", "0.6045922", "0.6045922", "0.6045922", "0.6045922", "0.6045922", "0.6045922", "0.60153335", "0.5968837", "0.5945011", "0.59353817", "0.5929287", "0.5911117", "0.5907389", "0.59065586", "0.59024006...
0.0
-1
FINE Fascicolo 2.1 20150507 inizio ModDocumentiAssociati
private static IdentificativoDocumentoType[] getDocumentiAssociatiPianoRateazione( it.equitalia.dettagliocartellaavviso.wsdl.PianoRateazioneType typeResponse) { it.equitalia.dettagliocartellaavviso.wsdl.IdentificativoDocumentoType[] documentoAssociatoTypeResponse = typeResponse.getDocumentoAssociato(); Identifica...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface CfgDocument extends com.hps.july.persistence.Document, com.ibm.ivj.ejb.runtime.CopyHelper {\n\n\n\n\t/**\n\t * Get accessor for persistent attribute: savconfigidold\n\t */\n\tpublic int getSavconfigidold() throws java.rmi.RemoteException;\n\t/**\n\t * Set accessor for persistent attribute: savconf...
[ "0.6121743", "0.5891941", "0.5883054", "0.5864749", "0.58620495", "0.58490896", "0.5790398", "0.5768333", "0.5732173", "0.57151896", "0.5686522", "0.5666772", "0.56655824", "0.5631346", "0.5574874", "0.55697006", "0.5554917", "0.5539498", "0.55361015", "0.5508285", "0.5506769...
0.0
-1
TODO Autogenerated method stub
@Override public void keyReleased(KeyEvent e) { int keyCode = e.getKeyCode(); if (keyCode == KeyEvent.VK_SPACE) System.exit(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void keyTyped(KeyEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", ...
0.0
-1
Method to initialize Logger with the command BasicConfigurator.configure() and to set its level.
public static void initializeLogger(Level level) { ClassLoader loader = Thread.currentThread().getContextClassLoader(); URL url = loader.getResource("resources/log4j.xml"); PropertyConfigurator.configure(url); Logger logger = Logger.getLogger(BaseActivator.class); logger.setLevel(level); logger.info("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initLogger() {\n initLogger(\"DEBUG\");\n }", "private void initLogger() {\n\t\ttry {\n\t\t\tjava.util.logging.Logger rootLogger = java.util.logging.Logger.getLogger(\"\");\n\t\t\trootLogger.setUseParentHandlers(false);\n\t\t\tHandler csvFileHandler = new FileHandler(\"logger/log.csv\", ...
[ "0.6689497", "0.6681561", "0.66710705", "0.6651389", "0.6594059", "0.6572551", "0.65362304", "0.651357", "0.65063775", "0.65015465", "0.6493587", "0.63954234", "0.63636607", "0.6358183", "0.62839895", "0.6271482", "0.62675685", "0.626665", "0.6261692", "0.6198976", "0.6193958...
0.67737234
0
Method to get information if logger is initialized.
public static boolean loggerIsInitialized() { return loggerIsInitialized; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean logInfo()\r\n {\r\n return infoLevelHandler.getBoolean();\r\n }", "private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }", "static public boolean isLogging()\n {\n return GetInstance().m_bLog;\n }...
[ "0.6664043", "0.64602417", "0.6438265", "0.63996834", "0.6359927", "0.6357873", "0.6329416", "0.6329416", "0.6329416", "0.6329416", "0.63289094", "0.621924", "0.6195906", "0.61644983", "0.61326087", "0.6132392", "0.6116723", "0.611672", "0.609686", "0.6092904", "0.6061661", ...
0.7144459
0
Method to choose the articles should be saving in the bag according the business rules.
public String chooseArticlesPackage(Bag bag) { StringBuilder result = new StringBuilder(); double countWeightBag=0; if(bag.getArticles() != null) { bag.setArticles(orderArticles(bag.getArticles())); int position=0; int countArticles = 0; while(countWeightBag<bag.getCapacit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveArticlesList();", "public Article save(Article article);", "private boolean saveData() {\n // get data from input controls\n collectDataFromUI();\n\n if (!validateData()) return false;\n\n boolean isTransfer = mCommon.transactionEntity.getTransactionType().equals(Tra...
[ "0.5610241", "0.54518723", "0.5235617", "0.51539737", "0.5147993", "0.50872564", "0.5083981", "0.50445807", "0.5023662", "0.49780244", "0.49702287", "0.49584982", "0.49335268", "0.49208653", "0.49139953", "0.490096", "0.49002793", "0.48890278", "0.48764122", "0.48634726", "0....
0.0
-1
Method to order the articles for analizing each one, so take the decisition of the articles bring in bag.
private List<Article> orderArticles(List<Article> things){ Comparator<Article> comparatorPrizes = new Comparator<Article>() { public int compare(Article x, Article y) { return (int) (x.getPrize() - y.getPrize()); } }; Collections.sort(things,comparatorPrizes); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sor...
[ "0.60410684", "0.59956723", "0.59458756", "0.583357", "0.5767155", "0.5711642", "0.56232727", "0.55985063", "0.55979586", "0.55874187", "0.543234", "0.54294276", "0.53926784", "0.5381414", "0.53752685", "0.53720593", "0.5367483", "0.53539354", "0.53316844", "0.5317036", "0.52...
0.68575495
0
Interval at which the news should be collected. No news within this interval will be collected. This is in Minutes / / Class constructor for RSS parser. / / ID of the source that is being parsed / Recognizable Name of the source that is being parsed / Accessible URL of the source
public RssParser(int _SourceID, String _SourceName, String _SrcURL, int _ReadInterval) { SourceID = _SourceID; SourceName = _SourceName; Src_URL = _SrcURL; ReadInterval = _ReadInterval; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getInterval() { return _interval; }", "public SourceRecord(Integer id, String url, String name, Short invalid, Long lastUpdateTime, Long lastFetchTime, Short autoFetchInterval, String basePath) {\n super(Source.SOURCE);\n\n set(0, id);\n set(1, url);\n set(2, name);\n ...
[ "0.55621874", "0.5536951", "0.5411229", "0.5259436", "0.5256928", "0.52357477", "0.5231611", "0.5201289", "0.5184466", "0.51359737", "0.5132839", "0.5110152", "0.5074536", "0.5044714", "0.5042041", "0.50379074", "0.5013031", "0.49804315", "0.4979164", "0.49747318", "0.497329"...
0.68212944
0
/ / Parse RSS feeds but only one URL at a time. Notice the function only has a single source URL in args. / Parsing multiple source URI has to be done via loop in the calling function. /
public void PopulateRSSData() { try { URL Feed = ParseRSSFromFeed(); ParseRSS(Feed); } catch(java.net.MalformedURLException exp) { String message = exp.getMessage(); System.out.println(message); } catch(com.romet...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public URL ParseRSSFromFeed() throws java.net.MalformedURLException\n {\n URL feedUrl = new URL(Src_URL);\n return feedUrl;\n }", "public List<LinkDetails> scrapeRSSPageForLinks(String rssUrl) {\n\t\tString description = \"\";\n\t\tString title = \"\";\n\t\tString link = \"\";\n\t\tString pub...
[ "0.69046986", "0.65805674", "0.6246149", "0.6024916", "0.600455", "0.59115267", "0.5872272", "0.5772476", "0.5771507", "0.5753881", "0.5634839", "0.56343263", "0.56238735", "0.5615778", "0.5574957", "0.55691755", "0.5554161", "0.5536199", "0.5526821", "0.5525043", "0.5495744"...
0.65198725
2
/ / Return source URL from the given string. /
public URL ParseRSSFromFeed() throws java.net.MalformedURLException { URL feedUrl = new URL(Src_URL); return feedUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getUrl(final String sourceURL) {\n\n String result = null;\n\n if (sourceURL == null) {\n // if only one URL is configured, \"default URL\" should mean that\n // URL.\n List<String> urls = descriptor().getUrls();\n if (!urls.isEmpty()) {\n ...
[ "0.69550294", "0.6820826", "0.6820826", "0.6820826", "0.6820826", "0.6820826", "0.68058455", "0.68058455", "0.68058455", "0.68058455", "0.68058455", "0.68058455", "0.66520625", "0.65738666", "0.6533551", "0.65140945", "0.6494836", "0.64634305", "0.64284575", "0.6428314", "0.6...
0.0
-1
/ / Parse RSS from the input URL and insert to DB. / / RSS feed URL
public void ParseRSS(URL feedUrl) throws com.rometools.rome.io.FeedException, java.io.IOException { //TODO: EVERY THING HERE SHOULD BE IN A TRANSACTION List<String> HashFields = new ArrayList<>(); SyndFeedInput input = new SyndFeedInput(); SyndFeed feed = input.build(new XmlReader(feedUr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public URL ParseRSSFromFeed() throws java.net.MalformedURLException\n {\n URL feedUrl = new URL(Src_URL);\n return feedUrl;\n }", "public void PopulateRSSData()\n {\n try\n {\n URL Feed = ParseRSSFromFeed();\n ParseRSS(Feed);\n }\n catch(ja...
[ "0.6959614", "0.6898664", "0.67438", "0.6496058", "0.6477775", "0.62868774", "0.62531036", "0.6247518", "0.61168456", "0.6023782", "0.5967723", "0.59606135", "0.58757323", "0.58617777", "0.58349127", "0.5826652", "0.5826206", "0.575102", "0.5749206", "0.5734009", "0.57313734"...
0.6881146
2
/ / Insert the parsed RSS fields (Individual Fields Specific) to DB. / / Class containing all parsed values
public void InsertToDB(RSSFields RssFieldValues, int ChannelID) throws java.sql.SQLException { String SQLQuery = "INSERT INTO tbl_ex_RSSData " + " (SourceID, ChannelInstanceID, Title, Link, Description,PublishedDate,UpdatedDate, ParsedDate, Hash) " + " ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void PopulateRSSData()\n {\n try\n {\n URL Feed = ParseRSSFromFeed();\n ParseRSS(Feed);\n }\n catch(java.net.MalformedURLException exp)\n {\n String message = exp.getMessage();\n System.out.println(message);\n }\n ...
[ "0.61580324", "0.5749993", "0.54414856", "0.5254157", "0.5201817", "0.51893395", "0.5069257", "0.50674003", "0.50623953", "0.5042099", "0.50344926", "0.50231296", "0.501948", "0.49955225", "0.49757916", "0.49554634", "0.49366093", "0.49243394", "0.49241367", "0.48519573", "0....
0.5708017
2
/ / Insert the parsed RSS fields (Channel Specifics) to DB. / / Class containing all parsed values for channel specific data
public int InsertChannelDetails(RSSChannelElements ChannelElements) throws java.sql.SQLException { String SQLQuery = "INSERT INTO tbl_ex_channeldetails " + " (SourceID, AuthorName, Language, PublishedDate, WebMaster, LastBuildDate, ManagingEditor, Generator, Description) "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ParseRSS(URL feedUrl) throws com.rometools.rome.io.FeedException, java.io.IOException {\n //TODO: EVERY THING HERE SHOULD BE IN A TRANSACTION\n List<String> HashFields = new ArrayList<>();\n SyndFeedInput input = new SyndFeedInput();\n SyndFeed feed = input.build(new XmlRead...
[ "0.6648855", "0.62885463", "0.6230488", "0.61157876", "0.5583709", "0.5302745", "0.5246573", "0.52407354", "0.5179852", "0.5114815", "0.51018476", "0.4998882", "0.49852285", "0.4953471", "0.49506631", "0.49451917", "0.48825562", "0.48614934", "0.48165137", "0.4805462", "0.478...
0.51533395
9
Create an independent copy of this JSON member.
public JsonMember copy() { return new JsonMember(name, value.copy()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JsonFactory copy()\n/* */ {\n/* 324 */ _checkInvalidCopy(JsonFactory.class);\n/* */ \n/* 326 */ return new JsonFactory(this, null);\n/* */ }", "@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends JsonNode> T deepCopy() { return (T) this; }", "public He...
[ "0.6518772", "0.5967288", "0.59662026", "0.5787729", "0.5778709", "0.5711762", "0.5687242", "0.56691307", "0.5663928", "0.56497574", "0.56295407", "0.5622642", "0.5622604", "0.56200916", "0.55804497", "0.55768555", "0.5573292", "0.55479026", "0.55453193", "0.5503251", "0.5496...
0.837041
0
uwi solution (ideas: created 2d array if we wanna keep things together like here difficulty profit. Monolith array approach.)
public int _maxProfitAssignmentBetter(int[] difficulty, int[] profit, int[] worker) { int n = difficulty.length; int [][] dp = new int [n][]; for (int i = 0; i < n; i ++) dp [i] = new int[] { difficulty[i], profit[i] }; Arrays.sort(dp, (a, b) -> (a [0] != b [0]) ? (a [0] - ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) { \r\n int[][] a = new int[3][5]; // прямоугольный массив\r\n int size1 = a.length;\r\n int size2 = a[0].length;\r\n int[][] b = new int[3][]; // массив переменной длины (тут - треугольный)\r\n b[0] = new int[1];\r\n b[1] = new...
[ "0.6106231", "0.6083643", "0.6067454", "0.59514195", "0.5936942", "0.5873287", "0.58613163", "0.5814743", "0.58097625", "0.580849", "0.5793755", "0.578277", "0.5769761", "0.57694197", "0.57693076", "0.57388145", "0.5736039", "0.5733333", "0.5720896", "0.57055694", "0.56939787...
0.0
-1
we can use the first dimension of 2d array as index of 1d array itself use the other dimension as values. (optimized monolith approach)
public int _maxProfitAssignmentBest(int[] difficulty, int[] profit, int[] worker) { // value index reverse array int [] dp = new int [100001]; // nice strategy to use in multi-array approach // using difficulty as index, profit as value. // (difficulty array sorted by default, e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) { \r\n int[][] a = new int[3][5]; // прямоугольный массив\r\n int size1 = a.length;\r\n int size2 = a[0].length;\r\n int[][] b = new int[3][]; // массив переменной длины (тут - треугольный)\r\n b[0] = new int[1];\r\n b[1] = new...
[ "0.6236481", "0.61202514", "0.5996663", "0.5735107", "0.57283896", "0.5681327", "0.5627206", "0.56223404", "0.5601616", "0.55920273", "0.55790454", "0.55749685", "0.5562486", "0.55511606", "0.55037206", "0.5490395", "0.54409057", "0.54161805", "0.5411116", "0.5408849", "0.539...
0.0
-1
we can optimize while collection. Build forward during the Collection time. (optimized monolith approach)
public int _maxProfitAssignmentSortedCollectors(int[] difficulty, int[] profit, int[] worker) { int n = difficulty.length; int [][] dp = new int [n][2]; // difficulty, profit pair (dp) for (int idx = 0; idx < n; idx ++) { dp [idx][0] = difficulty [idx]; dp [idx][1] = pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"serial\")\r\n\tprivate void fcbuild() {\n\t\tfor (int i = 0; i < keys.size(); i++) {\r\n\t\t\tString s = keys.get(i);\r\n\t\t\tfc.add(new ArrayList<String>() {\r\n\t\t\t\t{\r\n\t\t\t\t\tadd(sharedV.get(s).get(0));\r\n\t\t\t\t\tadd(s);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfor (int i = 0...
[ "0.59323645", "0.5700556", "0.55240124", "0.52680767", "0.5250331", "0.51783586", "0.5167583", "0.51598936", "0.5149548", "0.50912684", "0.50867754", "0.5041359", "0.5040846", "0.50114423", "0.5007294", "0.5006007", "0.49995074", "0.4998849", "0.49722576", "0.49718934", "0.49...
0.0
-1
my approach similar to uwi. (ideas: created a third array indexes to store the relation between difficulty and profit. Distributed arrays approach.)
public int _maxProfitAssignment(int[] difficulty, int[] profit, int[] worker) { Integer [] indexes = new Integer [difficulty.length]; for (int idx = 0; idx < indexes.length; idx ++) indexes [idx] = idx; Arrays.sort(indexes, (a, b) -> difficulty [a] != difficulty [b] ? difficulty...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildArray() throws VerificationException\n {\n \tindices = new int[length];\n \tcommonality = new int[length];\n \n \tcommonality[0] = -1;\n \tfor( int i=0; i<indices.length; i++ ){\n \t indices[i] = i;\n \t}\n \n sort();\n }", "public static Object[] ticket_combo(int l, Set<Set<...
[ "0.5661348", "0.55741626", "0.5551597", "0.55431396", "0.55388886", "0.553581", "0.5500462", "0.5494798", "0.54739", "0.5432241", "0.5417037", "0.53727186", "0.53550833", "0.53529763", "0.5311245", "0.52881646", "0.52619565", "0.5260917", "0.5254436", "0.52511024", "0.5244527...
0.5275454
16
Gets jaxb context data.
@Test void getJaxbContextData(SoftAssertions softly) { ComparatorJaxbContextDataProvider target = new ComparatorJaxbContextDataProvider(); Collection<JaxbContextData> actual = target.getJaxbContextData(); softly.assertThat(actual) .containsExactly(new JaxbContextData(ObjectFactory.class.getPackage...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JAXBContext getJaxContext()\n {\n JAXBContext jc = null;\n \n try\n {\n jc = JAXBContext.newInstance(\"generated\");\n }\n catch (JAXBException e)\n {\n e.printStackTrace();\n }\n return jc;\n }", "pub...
[ "0.6841471", "0.664883", "0.6500057", "0.6495569", "0.629308", "0.6238154", "0.62332904", "0.6204135", "0.61953574", "0.61953574", "0.61953574", "0.61879784", "0.6119424", "0.611207", "0.6103814", "0.6098982", "0.6069671", "0.60670257", "0.60236675", "0.60156196", "0.5991049"...
0.53532803
75
old data include method below, there is comment
public void scandb_book_info(String table_name) { sql = " SELECT * from " + table_name + ";"; try { result = statement.executeQuery(sql); while (result.next()) { set_book_info(result.getInt("id"), result.getString("name"), result.getString("url")); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void loadData()\n {\n }", "public void setIncludes(String includes)\n {\n this.includes = includes;\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "protected abstract void loadData();", "private void parseData() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void crawl_data() {\n\t...
[ "0.6139704", "0.570362", "0.56979764", "0.56438124", "0.54716027", "0.5469597", "0.5439888", "0.54363495", "0.5430885", "0.5430885", "0.54282075", "0.5379788", "0.532639", "0.53243023", "0.53243023", "0.53243023", "0.53243023", "0.53243023", "0.53243023", "0.53006124", "0.526...
0.0
-1
constructor init the Buttons of the StartMenu
@Override public final void initButtons(int x, int y, int addy){ String data = s_datapath; addButton(data + "SM_NeuesSpiel" + s_typ, x, y, 1); addButton(data + "OM_SpielSpeichern" + s_typ, x, y + addy, 2); addButton(data + "SM_SpielLaden" + s_typ, x, y + addy * 2, 3); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\...
[ "0.7706423", "0.748784", "0.73391783", "0.72927845", "0.7196089", "0.71318763", "0.7069379", "0.7053129", "0.7037119", "0.6958277", "0.6920505", "0.6889352", "0.6835056", "0.68298167", "0.6813985", "0.67969644", "0.6793507", "0.6788672", "0.67333007", "0.67274106", "0.6717670...
0.6580768
37
/ Here the function tries to get the solution path. Since the Nodes are connected. We take the goal node and use the method getParent() until we arrive at the startNode. The path is printed to output.
private void solutionPath(Node n){ ArrayList<String> num = new ArrayList<>(); num.add(n.getDigit().getDigitString()); Node node = n.getParent(); while(true){ if(node == startNode){ num.add(node.getDigit().getDigitString()); break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Node> findPath(Vector2i start, Vector2i goal) {\n\t\tList<Node> openList = new ArrayList<Node>(); //All possible Nodes(tiles) that could be shortest path\n\t\tList<Node> closedList = new ArrayList<Node>(); //All no longer considered Nodes(tiles)\n\t\tNode current = new Node(start,null, 0, getDistance(s...
[ "0.7252731", "0.68260264", "0.6671419", "0.66349065", "0.66123354", "0.6603679", "0.6580846", "0.65430224", "0.6503828", "0.6497051", "0.64705145", "0.6415798", "0.6354924", "0.6301623", "0.62661606", "0.6257092", "0.6247333", "0.6240979", "0.62342954", "0.6218692", "0.620133...
0.6826425
1
/ Here we take the expanded nodes and print it.
private void printExpanded(Queue<Node> expanded){ ArrayList<String> nodes = new ArrayList<>(); for(Node s : expanded){ if(s != null){ nodes.add(s.getDigit().getDigitString()); } } if (forbidden.size() == 0){ int size = nodes.size()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printTree() {\n Object[] nodeArray = this.toArray();\n for (int i = 0; i < nodeArray.length; i++) {\n System.out.println(nodeArray[i]);\n }\n }", "public void tree()\n\t{\n\t\tIterable<Position<FileElement>> toPrint = fileSystem.PreOrder();\n\t\tfor (Pos...
[ "0.75091845", "0.7240713", "0.71894604", "0.70823896", "0.7065136", "0.706287", "0.7039093", "0.6979379", "0.69171613", "0.6915615", "0.6894241", "0.6880421", "0.6855082", "0.6846921", "0.6829338", "0.6819054", "0.68090576", "0.67836213", "0.6773025", "0.67710125", "0.6757601...
0.7714829
0
/ Here we temporarily make the children. No parentchild connections are made here. This is a helper function to cycleCheck
private ArrayList<String> makeChildren(Node current) { ArrayList<String> current_children = new ArrayList<>(); if (current != null && current.getDigit().last_changed != 0) { //-1 child first digit if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createChildren() {\n\t\t\n\t\tfor(int i=0;i<horizontal;i++) {\n\t\t\t\n\t\t\tAction a = new Action(i);\n\t\t\tif(!gameOver && actionIsValid(a)) {\n\t\t\t\t\n\t\t\t\tPlayer otherPlayer;\n\t\t\t\t\n\t\t\t\tif(player == Player.PLAYER_BLUE) {\n\t\t\t\t\totherPlayer = Player.PLAYER_RED;\n\t\t\t\t}else {\n\...
[ "0.6246335", "0.6222769", "0.6081489", "0.56986165", "0.5600083", "0.5569997", "0.55359197", "0.55359197", "0.55359197", "0.5526154", "0.55173075", "0.55170625", "0.55154157", "0.5506944", "0.55060697", "0.5481505", "0.5470102", "0.543657", "0.54289436", "0.53934395", "0.5393...
0.5201133
42
/ Here I check for cycles.
private boolean cycleCheck(Node current, Queue<Node> expanded){ if( expanded.size() == 0){ return false; //Because current is root } for(Node nodeInExpanded : expanded){ if(current!=null && current.getDigit().getDigitString().equals(nodeInExpanded.getDigit().getDigitSt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Boolean checkCycle() {\n Node slow = this;\n Node fast = this;\n while (fast.nextNode != null && fast.nextNode.nextNode != null) {\n fast = fast.nextNode.nextNode;\n slow = slow.nextNode;\n if (fast == slow) {\n ...
[ "0.8022661", "0.7582115", "0.7467581", "0.7309301", "0.6859185", "0.68320376", "0.683162", "0.6827226", "0.6763716", "0.6718021", "0.67077047", "0.6691687", "0.6690034", "0.66510946", "0.6608548", "0.6603222", "0.65824634", "0.6558572", "0.65290487", "0.65054256", "0.65023834...
0.58040166
89
/ This function performs the main functionality for the DFS.
private boolean helperDFS(Node current){ if(expandedNode.size() == 999){ //limit has been reached. jump out of recursion. expandedNode.add(current); System.out.println("No solution found."); printExpanded(expandedNode); System.exit(0); ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void DFS() {\n \t\n \t// Mark all the vertices as not visited(set as false by default in java) \n \tboolean visited[] = new boolean[V];\n \t\n \t// Call the recursive helper function to print DFS traversal \n // starting from all vertices one by one \n \tfor (int i=0; i<V; i++) { \n \t...
[ "0.76480645", "0.75557256", "0.7514414", "0.75062317", "0.7277212", "0.722608", "0.71571517", "0.7138194", "0.70538133", "0.70303774", "0.70216507", "0.69316167", "0.6903866", "0.6777672", "0.6751997", "0.666118", "0.6642507", "0.66257745", "0.66136944", "0.6573592", "0.65537...
0.0
-1
need a function that returns. So that some states can cancel out and thus no stackoverflow.
private void DepthFirstSearch(Node current){ helperDFS( current ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Boolean call() throws Exception {\n return this.state22();\n }", "protected abstract List breakOutOfStateStack();", "private Object getState() {\n\treturn null;\r\n}", "private static int runStateOf(int c) { return c & ~CAPACITY; }", "public E pollBack();", "@Override\...
[ "0.6374901", "0.6343056", "0.6179897", "0.59843194", "0.5812559", "0.5794001", "0.57540935", "0.5715684", "0.57061565", "0.57061565", "0.5623487", "0.5617053", "0.5574859", "0.5499765", "0.5499765", "0.5499765", "0.5499765", "0.548147", "0.5471886", "0.5469918", "0.5456608", ...
0.0
-1
sets the heuristic of the node passed.
private void heuristicSetter(Node node){ int goalNodeFirstDigit = Integer.parseInt(goalNode.getDigit().getFirst_digit()); int goalNodeSecondDigit = Integer.parseInt(goalNode.getDigit().getSecond_digit()); int goalNodeThirdDigit = Integer.parseInt(goalNode.getDigit().getThird_digit()); i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHeuristic(int heuristic) {\n\t\tthis.heuristic = heuristic;\n\t}", "public void setAStarHeuristic(AStarHeuristic heuristic)\n\t{\n\t\t_estimator = heuristic;\n\t}", "public void setHeuristic(int h) {\n\t\t\tthis.heuristique = h;\n\t\t}", "public void setHeuristics(Heuristic h,Heuristic totalFu...
[ "0.7458475", "0.7067843", "0.66975325", "0.6607452", "0.6063322", "0.58320844", "0.5741439", "0.5738452", "0.5724705", "0.5718298", "0.5676771", "0.56604266", "0.55995935", "0.5574674", "0.5560622", "0.5529921", "0.5517654", "0.55060416", "0.54573745", "0.53933114", "0.533580...
0.77933234
0
/ The greedy algorithm selects the best out of the children. There should be a loop. During each iteration, take the node make its children. Perfrom goal check, cycle check
private void GreedySearch(){ Queue<Node> expanded = new LinkedList<>(); ArrayList<Node> fringe = new ArrayList<>(); ArrayList<Node> fringeTemp = new ArrayList<>(); Node current = startNode; while(expanded.size() < 1000){ if(current.getDigit().getDigitString().equ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void greedyBFS(String input)\r\n\t{\r\n\t\tNode root_gbfs = new Node (input);\r\n\t\tNode current = new Node(root_gbfs.getState());\r\n\t\t\r\n\t\tNodeComparator gbfs_comparator = new NodeComparator();\r\n\t\tPriorityQueue<Node> queue_gbfs = new PriorityQueue<Node>(12, gbfs_comparator);\r\n\t\tArrayList<Str...
[ "0.68561", "0.66838115", "0.64369076", "0.62570703", "0.6249718", "0.6213673", "0.6053108", "0.60517704", "0.6046425", "0.60363895", "0.60311365", "0.5989149", "0.59789205", "0.5899618", "0.5888914", "0.58667064", "0.5839533", "0.58271617", "0.5823444", "0.5815419", "0.574638...
0.7819133
0
read the file and take information about start,goal and forbidden
public static void main(String[] args) throws FileNotFoundException { ThreeDigits threeDigits = new ThreeDigits(); String filename = args[1]; File myFile = new File(filename); Scanner reader = new Scanner(myFile); threeDigits.startNode = new Node(reader.nextLine()); thr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void extractFile() {\n try (BufferedReader buffered_reader = new BufferedReader(new FileReader(source_file))) {\n String line;\n while((line = buffered_reader.readLine()) != null) {\n String spaceEscaped = line.replace(\" \", \"\");\n //file was re...
[ "0.5580772", "0.5543112", "0.54212064", "0.54078823", "0.5372267", "0.5369949", "0.5281969", "0.5267081", "0.5252606", "0.52332395", "0.52244395", "0.52021086", "0.5095645", "0.50758034", "0.504734", "0.5046121", "0.5032622", "0.5024921", "0.49841657", "0.4968902", "0.4946294...
0.0
-1
Created by Timothy Foster on 25 Jul 2016.
public interface IGuessingGamePlayer { int nextGuess() throws NumberFormatException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n...
[ "0.60571116", "0.6012129", "0.59049565", "0.58367926", "0.58117336", "0.57942146", "0.57780886", "0.57780886", "0.57749665", "0.5743262", "0.5688063", "0.5628502", "0.5624226", "0.56157595", "0.55905956", "0.5589926", "0.5585916", "0.5560103", "0.5544365", "0.5535738", "0.552...
0.0
-1
creates a new wizard
public NewReviewWizard() { super(); setNeedsProgressMonitor(true); setWindowTitle("New Review"); setHelpAvailable(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract AbstractPerfCakeEditWizard createWizard(IStructuredSelection selection);", "static public Wizard createWizard (){\n System.out.println(\"Enter the name of your wizard : \");\n Scanner sc = new Scanner(System.in);\n String nameCharacter = sc.next();\n\n // enter and ...
[ "0.6949543", "0.68756926", "0.6706814", "0.6687967", "0.6602528", "0.6525941", "0.6505783", "0.645814", "0.6402296", "0.62814623", "0.6261516", "0.6247386", "0.62305826", "0.6167935", "0.6166846", "0.6135973", "0.6132156", "0.61190283", "0.611149", "0.60869133", "0.60696", ...
0.60789233
20