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
/ renamed from: c
public static String m40101c(String str) { return m40098a(str, ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo5289a(C5102c c5102c);", "public static void c0() {\n\t}", "void mo57278c();", "private static void cajas() {\n\t\t\n\t}", "void mo5290b(C5102c c5102c);", "void mo80457c();", "void mo12638c();", "void mo28717a(zzc zzc);", "void mo21072c();", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", ...
[ "0.64592767", "0.644052", "0.6431582", "0.6418656", "0.64118475", "0.6397491", "0.6250796", "0.62470585", "0.6244832", "0.6232792", "0.618864", "0.61662376", "0.6152657", "0.61496663", "0.6138441", "0.6137171", "0.6131197", "0.6103783", "0.60983956", "0.6077118", "0.6061723",...
0.0
-1
/ renamed from: a
private static final Function1<String, String> m40099a(String str) { if (str.length() == 0) { return C12824a.f29504c; } return new C12825b(str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
Calls a remote procedure.
public AsyncResult<Value> call(Jid jid, String methodName, Value... parameters) { AsyncResult<IQ> query = xmppSession.query(IQ.set(jid, Rpc.ofMethodCall(methodName, parameters))); return query.thenApply(result -> { if (result != null) { Rpc rpc = result.getExtension(Rpc.class); if (rpc != null) { Rpc.MethodResponse methodResponse = rpc.getMethodResponse(); if (methodResponse != null) { if (methodResponse.getFault() != null) { throw new CompletionException(new RpcException(methodResponse.getFault().getFaultCode(), methodResponse.getFault().getFaultString())); } return methodResponse.getResponse(); } } } return null; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ProcedureCall createProcedureCall();", "@Override\n\t@Transactional\n\tpublic List callProcR(String proc, List<String> paras) {\n\t\tSession session = getHibernateTemplate().getSessionFactory().openSession();\n\t\t// Transaction tx = session.beginTransaction();\n\t\tSQLQuery q = session.createSQLQuery(\"{call \"...
[ "0.6510706", "0.61179405", "0.5927468", "0.5881134", "0.58321565", "0.57579935", "0.5554934", "0.5539644", "0.55321646", "0.54765624", "0.5470081", "0.53693455", "0.5365171", "0.53587633", "0.53237194", "0.53084224", "0.5300143", "0.5296875", "0.5295283", "0.52764714", "0.522...
0.0
-1
Sets the RPC handler, which will handle RPCs.
public synchronized void setRpcHandler(RpcHandler rpcHandler) { this.rpcHandler = rpcHandler; setEnabled(rpcHandler != null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHandler(Handler handler) {\r\n this.handler = handler;\r\n }", "public void setHandler(Handler handler) {\r\n this.handler = handler;\r\n }", "void setConnectorHandler(Handler handler) {\n connectorHandler = handler;\n }", "@Override\n\tpublic void setHandler(Incoming handler...
[ "0.65982443", "0.65982443", "0.64741075", "0.64374727", "0.64195627", "0.61178946", "0.5760458", "0.5741706", "0.57357675", "0.55849475", "0.55812424", "0.5532046", "0.5486497", "0.5482016", "0.54789984", "0.54460293", "0.54223096", "0.54217255", "0.54084677", "0.54061157", "...
0.8022985
0
Ask how many users we want to add
public static void main(String[] args){ System.out.println("Enter number of new students to enroll: "); Scanner in = new Scanner(System.in); int numOfStudents = in.nextInt(); StudentData[] students = new StudentData[numOfStudents]; //create a number a new student for (int n=0; n< numOfStudents; n++) { students[n] = new StudentData(); students[n].enroll(); students[n].payTuition(); } for (int n=0; n< numOfStudents; n++) { System.out.println(students[n].toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addUser() {\n\t\tthis.users++;\n\t}", "public int askHowManyUsers() {\r\n\t\tint userAmount = 0;\r\n\t\tboolean correctInput = false;\r\n\r\n\t\twhile (correctInput == false) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"How many players would like to participate in the game?\\nPlease type 1,2,3 or 4...
[ "0.713012", "0.70896864", "0.68559724", "0.66202986", "0.66202986", "0.66202986", "0.66119313", "0.6604152", "0.6517692", "0.6410268", "0.6347544", "0.62843513", "0.6234752", "0.6226642", "0.6199091", "0.61826426", "0.6152063", "0.613737", "0.61259884", "0.60997194", "0.60898...
0.0
-1
Caps the absolute coordinates of the supplied vector to the given values mantaining the original vector coordinates signs.
public static Point2D absCap(final Point2D vector, final double maxAbsX, final double maxAbsY) { return new Point2D(absCap(vector.getX(), maxAbsX), absCap(vector.getY(), maxAbsY)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Vector normalize(Vector v) {\r\n Vector w = new Vector(v);\r\n w.normalize();\r\n return w;\r\n }", "public Vector transform(Vector v) {\n\t\treturn new Vector(a * v.x + c, b * v.y + d);\n\t}", "public Vector minusAll(Vector v) {\n return new Vector(\n getX() - v.g...
[ "0.5523797", "0.54763347", "0.5399317", "0.5317893", "0.53093326", "0.5307758", "0.5306139", "0.52726245", "0.526871", "0.51520324", "0.49594006", "0.49036455", "0.48735672", "0.48564494", "0.47688282", "0.4757342", "0.47493154", "0.46996865", "0.46745247", "0.46732843", "0.4...
0.50204176
10
Web service: Registrira klijenta na server.
@WebMethod(operationName = "Register") public Boolean Register(@WebParam(name = "username") String username, @WebParam(name = "sharedFiles") String sharedFiles, @WebParam(name = "address") String address, @WebParam(name = "port") Integer port) { int freeSlot = MAX_CLIENT; for(int i=0;i<MAX_CLIENT;i++) { if(this.client[i].equals("") && freeSlot == MAX_CLIENT) { freeSlot = i; } else if(this.client[i].toLowerCase().equals(username.toLowerCase())) { return false; } } if(freeSlot != MAX_CLIENT) { this.client[freeSlot] = username; this.sharedFiles[freeSlot] = sharedFiles; this.location[freeSlot].setPort(port); this.location[freeSlot].setAddress(address); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void registerWithServer();", "public void registrarPreguntaRespuesta() throws SolrServerException, IOException{\n \tregistrarBaseDatosRedis(); //Registra en la base de datos.\n \tregistrarEnWatson(); // Entrena el servicio de watson.\n }", "private void register_user() {\n\n\t\tHttpRegister p...
[ "0.7461017", "0.6392349", "0.63817257", "0.63629806", "0.628818", "0.6279496", "0.62522537", "0.619532", "0.61135143", "0.61063325", "0.6022031", "0.6022011", "0.6016747", "0.60166466", "0.6007544", "0.5891145", "0.5860146", "0.5829708", "0.57723606", "0.57492864", "0.5744319...
0.56358224
39
Checks if button is pressed and what button is pressed
public boolean getButton(XboxController.Button inputButton) { return this.getRawButton(inputButton.value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean getButtonRelease(Buttons but);", "protected abstract boolean up(int button);", "public boolean wasButtonJustPressed(int playerNum) {\r\n if (button.clicked) {\r\n button.clicked = false;\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }...
[ "0.74343425", "0.73445666", "0.7332852", "0.7265748", "0.71628344", "0.7113445", "0.7087389", "0.7024677", "0.70035225", "0.6939116", "0.69114363", "0.68311334", "0.68022794", "0.677831", "0.67550457", "0.6732143", "0.6717879", "0.6698061", "0.66602415", "0.66478735", "0.6634...
0.0
-1
Gets the input of DPad
public double getDPad() { return this.getRawAxis(6); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getInput();", "@Override\n\tpublic String readDatagram() {\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tSystem.out.print(\"MAC ADRESS: \");\n\t\tString mac = null;\n\t\ttry {\n\t\t\tmac = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generat...
[ "0.6166549", "0.61306447", "0.6112555", "0.6057626", "0.6022508", "0.5961726", "0.5900545", "0.58903897", "0.58722585", "0.5865793", "0.5852459", "0.5848554", "0.58405787", "0.58257395", "0.5796533", "0.5793878", "0.57891846", "0.5776822", "0.57614946", "0.57520086", "0.56944...
0.0
-1
Gets the axis of each Analog stick
public double getAxis(int stickNumber, int axisNumber) { int axes[] = { 1, 2, 4, 5 }; int fAxis = 0; if (stickNumber == 1 && axisNumber == 1) { fAxis = axes[0]; } else if (stickNumber == 1 && axisNumber == 2) { fAxis = axes[1]; } else if (stickNumber == 2 && axisNumber == 1) { fAxis = axes[2]; } else if (stickNumber == 2 && axisNumber == 2) { fAxis = axes[3]; } else { return -69; } return this.getRawAxis(fAxis); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getRawAxis(int i){\n \treturn dStation.getStickAxis(port, i);\n }", "public abstract ArrayList<Joystick> findJoysticksByAxis(String... axis);", "public double getAxis(Axis axis) {\n return joystick.getRawAxis(axis.getId());\n }", "public Vector3d[] getAxes()\n {\n ...
[ "0.73392934", "0.6307742", "0.628583", "0.6172478", "0.610556", "0.60147274", "0.593485", "0.59038645", "0.5827426", "0.57342046", "0.5694859", "0.568537", "0.5664693", "0.5650814", "0.5645841", "0.56401503", "0.56235033", "0.5548225", "0.5547001", "0.5522743", "0.5514231", ...
0.6180317
3
Modify this method so that it looks for the firs occurrence of the valid attribute in the line. e.g. MaxFetchSize=0 FetchSize=16 should return true
public boolean lineContainsAttributeName(String line, String attributeName) { int startSearchIndex = 0; boolean validStart = false; boolean validEnd = false; if (isEmpty(line) || isEmpty(attributeName)) { return false; } if (!line.contains(attributeName)) { return false; } while (true) { int startIndexOfAttr = line.indexOf(attributeName, startSearchIndex); if (startIndexOfAttr < 0) { return false; } if (startIndexOfAttr == 0) { validStart = true; } else { Character charbefore = line.charAt(startIndexOfAttr - 1); if (Character.isWhitespace(charbefore)) { validStart = true; } else { validStart = false; } } if (validStart == false) { startSearchIndex = startSearchIndex + attributeName.length(); continue; } int endIndexOfAttr = startIndexOfAttr + attributeName.length(); int strLength = line.length(); // this is quite silly - because it should not end with the attributeName, but its still valid if (endIndexOfAttr == strLength - 1) { validEnd = true; } else { Character charAfter = line.charAt(endIndexOfAttr); if (Character.isWhitespace(charAfter)) { validEnd = true; } if (charAfter == '=') { validEnd = true; } } if (validStart && validEnd) { return true; } startSearchIndex = startSearchIndex + attributeName.length(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean hasAttributeKey(String xryLine) {\n int attributeKeyIndex = xryLine.indexOf(KEY_VALUE_DELIMITER);\n //No key structure found.\n if (attributeKeyIndex == -1) {\n return false;\n }\n\n String normalizedDataKey = xryLine.substring(0,\n attri...
[ "0.62381977", "0.5816384", "0.55210924", "0.54087573", "0.52587456", "0.516951", "0.5149126", "0.5133553", "0.5069397", "0.5047485", "0.50095344", "0.5003077", "0.49267828", "0.49164313", "0.49027526", "0.48846108", "0.48684838", "0.48658776", "0.48576885", "0.48470134", "0.4...
0.6179096
1
Modify this method so that it looks for the firs occurrence of the valid attribute in the line. e.g. MaxFetchSize=0 FetchSize=16 should return true
public int getStartIndexOfAttributeNameInStr(String line, String attributeName) { int startSearchIndex = 0; boolean validStart = false; boolean validEnd = false; if (isEmpty(line) || isEmpty(attributeName)) { return -1; } if (!line.contains(attributeName)) { return -1; } while (true) { int startIndexOfAttr = line.indexOf(attributeName, startSearchIndex); if (startIndexOfAttr < 0) { return -1; } if (startIndexOfAttr == 0) { validStart = true; } else { Character charbefore = line.charAt(startIndexOfAttr - 1); if (Character.isWhitespace(charbefore)) { validStart = true; } else { validStart = false; } } if (validStart == false) { startSearchIndex = startSearchIndex + attributeName.length(); continue; } int endIndexOfAttr = startIndexOfAttr + attributeName.length(); int strLength = line.length(); // this is quite silly - because it should not end with the attributeName, but its still valid if (endIndexOfAttr == strLength - 1) { validEnd = true; } else { Character charAfter = line.charAt(endIndexOfAttr); if (Character.isWhitespace(charAfter)) { validEnd = true; } if (charAfter == '=') { validEnd = true; } } if (validStart && validEnd) { return startIndexOfAttr; } startSearchIndex = startSearchIndex + attributeName.length(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean hasAttributeKey(String xryLine) {\n int attributeKeyIndex = xryLine.indexOf(KEY_VALUE_DELIMITER);\n //No key structure found.\n if (attributeKeyIndex == -1) {\n return false;\n }\n\n String normalizedDataKey = xryLine.substring(0,\n attri...
[ "0.62381977", "0.6179096", "0.55210924", "0.54087573", "0.52587456", "0.516951", "0.5149126", "0.5133553", "0.5069397", "0.5047485", "0.50095344", "0.5003077", "0.49267828", "0.49164313", "0.49027526", "0.48846108", "0.48684838", "0.48658776", "0.48576885", "0.48470134", "0.4...
0.5816384
2
Will add nodeToadd after siblingNode
public void addSiblingAfterNode(Node siblingNode, String nodeToAdd) throws Exception { if (siblingNode == null || nodeToAdd == null) return; if (fileContents == null) { fileContents = convertFileToStringArray(m_file); } Integer endTagLineNumber = getEndTagLineNumber(siblingNode); String endLine = fileContents[endTagLineNumber - 1]; String newLine = endLine + getIndentation(siblingNode) + nodeToAdd + FILE_NEW_LINE; if (bDebug) { System.out.println("Old line: " + endLine); System.out.println("New line: " + newLine); } fileContents[endTagLineNumber - 1] = newLine; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addNode(Node node){subNodes.add(node);}", "public void addNode() {\n if (nodeCount + 1 > xs.length)\n resize();\n nodeCount++;\n }", "@Test\n\tpublic void addNodeAfterGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node after the given node \");\n\t\tdll.p...
[ "0.7246202", "0.6720385", "0.6637579", "0.65664977", "0.6559025", "0.6555246", "0.6530916", "0.6489275", "0.6487457", "0.64769566", "0.6472667", "0.63859504", "0.63425976", "0.6314807", "0.6311062", "0.6292569", "0.628295", "0.6263169", "0.62521863", "0.6225092", "0.618848", ...
0.7133408
1
Gets the line number of the end of the start tag in the source file
public Integer getLineNumberInSourceFile(Node componentNode) { if (componentNode instanceof XMLElement) { XMLElement xmlComponentNode = (XMLElement)componentNode; Integer lineNum = xmlComponentNode.getLineNumber(); return lineNum; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getStartLineNumber();", "int getEndLineNumber();", "public int getLineNumber()\n {\n return parser.getLineNumber();\n }", "public int getLineNumber() {\n\t\t\treturn startLineNumber;\n\t\t}", "public int getStartLineNumber() {\n return startLineNumber_;\n }", "public int getLineNumber...
[ "0.77397645", "0.74480075", "0.6972902", "0.6905496", "0.69019157", "0.6899464", "0.68976414", "0.68966335", "0.689258", "0.6861346", "0.6852793", "0.68400955", "0.68313456", "0.6825975", "0.68080676", "0.68035895", "0.67800593", "0.67337275", "0.67274743", "0.6711633", "0.66...
0.6522664
25
Gets the column number of the end of the start tag in the soruce file
public Integer getColumnNumberInSourceFile(Node componentNode) { if (componentNode instanceof XMLElement) { XMLElement xmlComponentNode = (XMLElement)componentNode; Integer columnNumber = xmlComponentNode.getColumnNumber(); return columnNumber; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getBeginColumnNumber() {\n return this.beginColumn;\n }", "private int getNIdx() {\n return this.colStartOffset + 7;\n }", "public int getLast5SSPos() {\n\t\tfinal BEDentry secondLastExon = getBEDentry().getBlockAtRelativePosition(-2);\n\t\treturn getEndOfBEDentry(secondLastExon); \n\t}", ...
[ "0.66366494", "0.6319855", "0.6308527", "0.6266701", "0.62494564", "0.62205136", "0.6205218", "0.6159551", "0.61454195", "0.6132765", "0.6106316", "0.6105992", "0.61042583", "0.6095794", "0.60740244", "0.6048774", "0.6046814", "0.6040867", "0.6024914", "0.6017851", "0.6016693...
0.626702
3
Gets the line number of the end of the end tag in the source file
public Integer getEndTagLineNumber(Node componentNode) { if (componentNode instanceof XMLElement) { XMLElement xmlComponentNode = (XMLElement)componentNode; Integer lineNum = xmlComponentNode.getEndTagLineNum(); return lineNum; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getEndLineNumber();", "public int getEndLineNumber() {\n return endLineNumber_;\n }", "public int getEndLineNumber() {\n return this.endLine;\n }", "public int getEndLineNumber() {\n return endLineNumber_;\n }", "public int getEndLIne() {\r\n return this.endLine;\r\n }...
[ "0.8166278", "0.75992763", "0.75833845", "0.75242203", "0.7360341", "0.72172344", "0.717577", "0.7129715", "0.7014491", "0.698832", "0.69524956", "0.6944092", "0.6657021", "0.6578535", "0.6515171", "0.64720005", "0.6428398", "0.64272493", "0.64053637", "0.6377542", "0.6355246...
0.66006374
13
indicates whether the maze has been edited by the user
public boolean isModified() { return modified; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isEdit();", "public final boolean isEdited(){\n\t\treturn JsUtils.getNativePropertyBoolean(this, \"edited\");\n\t}", "boolean isEditable();", "protected boolean isEdit(){\n\t\treturn getArguments().getBoolean(ARG_KEY_IS_EDIT);\n\t}", "public boolean isModified() {\n return(!this.getText().equals...
[ "0.74193764", "0.7151492", "0.6953104", "0.69501585", "0.6676268", "0.6656268", "0.6652627", "0.6651835", "0.6585693", "0.6559455", "0.6494623", "0.64363426", "0.64074653", "0.64074653", "0.63627976", "0.63293564", "0.63177896", "0.6306349", "0.6303548", "0.62967145", "0.6293...
0.57141596
79
indicates the box that has been changed to mazeApp
public final void changeModified(int line, int column) { modified=true; ArrayList<Integer> coordinates = new ArrayList<Integer>(); coordinates.add(line); coordinates.add(column); setChanged(); notifyObservers(coordinates); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setBox();", "private void updateBoxes(){\n if(model.getMap() != null) {\n DoubleVec position = invModelToView(new DoubleVec(canvas.getWidth()*0.5,canvas.getHeight()*0.5));\n inner = new Rectangle(position, 1.0/zoomFactor * fi * canvas.getWidth(), 1.0/zoomFactor * fi * canvas.get...
[ "0.68588924", "0.64390874", "0.637562", "0.6320441", "0.6235874", "0.6151344", "0.61391586", "0.6062766", "0.5978551", "0.5947534", "0.5865711", "0.5863035", "0.58125675", "0.58013064", "0.5791775", "0.5750407", "0.5716761", "0.5708337", "0.5681212", "0.56641805", "0.5642265"...
0.0
-1
Instantiates a new excel import exception.
public ExcelImportException() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ExcelImportException(Throwable cause) {\r\n\t\tsuper(cause);\r\n\t}", "public ExcelImportException(String message) {\r\n\t\tsuper(message);\r\n\t}", "public ExcelImportException(String message, Throwable cause) {\r\n\t\tsuper(message, cause);\r\n\t}", "public ExcelImportConfig() {\n super();\n ...
[ "0.65188646", "0.6501286", "0.6249804", "0.6159146", "0.6056663", "0.5960706", "0.59435636", "0.5822698", "0.57927513", "0.5727217", "0.57250476", "0.56973547", "0.5683293", "0.56778264", "0.56757975", "0.56726664", "0.5670449", "0.5654823", "0.5622036", "0.56007856", "0.5536...
0.8024236
0
Instantiates a new excel import exception.
public ExcelImportException(String message) { super(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ExcelImportException() {\r\n\t\tsuper();\r\n\t}", "public ExcelImportException(Throwable cause) {\r\n\t\tsuper(cause);\r\n\t}", "public ExcelImportException(String message, Throwable cause) {\r\n\t\tsuper(message, cause);\r\n\t}", "public ExcelImportConfig() {\n super();\n }", "public Exce...
[ "0.8024236", "0.65188646", "0.6249804", "0.6159146", "0.6056663", "0.5960706", "0.59435636", "0.5822698", "0.57927513", "0.5727217", "0.57250476", "0.56973547", "0.5683293", "0.56778264", "0.56757975", "0.56726664", "0.5670449", "0.5654823", "0.5622036", "0.56007856", "0.5536...
0.6501286
2
Instantiates a new excel import exception.
public ExcelImportException(String message, Throwable cause) { super(message, cause); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ExcelImportException() {\r\n\t\tsuper();\r\n\t}", "public ExcelImportException(Throwable cause) {\r\n\t\tsuper(cause);\r\n\t}", "public ExcelImportException(String message) {\r\n\t\tsuper(message);\r\n\t}", "public ExcelImportConfig() {\n super();\n }", "public Exception() {\n\t\t\tsuper()...
[ "0.8024236", "0.65188646", "0.6501286", "0.6159146", "0.6056663", "0.5960706", "0.59435636", "0.5822698", "0.57927513", "0.5727217", "0.57250476", "0.56973547", "0.5683293", "0.56778264", "0.56757975", "0.56726664", "0.5670449", "0.5654823", "0.5622036", "0.56007856", "0.5536...
0.6249804
3
Instantiates a new excel import exception.
public ExcelImportException(Throwable cause) { super(cause); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ExcelImportException() {\r\n\t\tsuper();\r\n\t}", "public ExcelImportException(String message) {\r\n\t\tsuper(message);\r\n\t}", "public ExcelImportException(String message, Throwable cause) {\r\n\t\tsuper(message, cause);\r\n\t}", "public ExcelImportConfig() {\n super();\n }", "public Exc...
[ "0.8024236", "0.6501286", "0.6249804", "0.6159146", "0.6056663", "0.5960706", "0.59435636", "0.5822698", "0.57927513", "0.5727217", "0.57250476", "0.56973547", "0.5683293", "0.56778264", "0.56757975", "0.56726664", "0.5670449", "0.5654823", "0.5622036", "0.56007856", "0.55366...
0.65188646
1
Creates new form NewSem
public NewSemFrame() { initComponents(); this.setLocationRelativeTo(null); semC.removeAllItems(); for(int i=1;i<=10;i++) semC.addItem(String.valueOf(i)); semC.setSelectedItem("1"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int create(Semester sem) {\n\t\treturn 0;\n\t}", "Secuencia createSecuencia();", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tm...
[ "0.6669982", "0.5912276", "0.5576298", "0.55561686", "0.5537314", "0.5526284", "0.5448716", "0.5431602", "0.5400927", "0.53811985", "0.5366485", "0.5316209", "0.5267025", "0.5263353", "0.526166", "0.5247877", "0.5238663", "0.5231012", "0.5228704", "0.52279496", "0.5207897", ...
0.6160091
1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel3 = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); semC = new javax.swing.JComboBox<>(); submitB = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); messageL = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jPanel3.setBackground(new java.awt.Color(0, 0, 0)); jPanel1.setBackground(new java.awt.Color(0, 0, 0)); jPanel1.setLayout(null); jPanel2.setBackground(new java.awt.Color(0, 0, 0)); jPanel2.setOpaque(false); jLabel1.setFont(new java.awt.Font("Comic Sans MS", 1, 22)); // NOI18N jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText("Choose Semester:"); semC.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); submitB.setText("Submit"); submitB.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { submitBActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(48, 48, 48) .addComponent(jLabel1) .addGap(18, 18, 18) .addComponent(semC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(123, 123, 123) .addComponent(submitB, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(36, 36, 36) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(semC, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(submitB, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)) ); jPanel1.add(jPanel2); jPanel2.setBounds(230, 350, 324, 128); jLabel2.setFont(new java.awt.Font("Comic Sans MS", 1, 24)); // NOI18N jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("Starting A New Semester"); jPanel1.add(jLabel2); jLabel2.setBounds(210, 50, 408, 39); messageL.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N messageL.setForeground(new java.awt.Color(255, 102, 102)); jPanel1.add(messageL); messageL.setBounds(0, 760, 830, 63); jLabel4.setBackground(new java.awt.Color(0, 0, 0)); jLabel4.setText("jLabel4"); jLabel4.setOpaque(true); jPanel1.add(jLabel4); jLabel4.setBounds(530, 690, 170, 40); jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/gola.gif"))); // NOI18N jLabel3.setText("jLabel3"); jPanel1.add(jLabel3); jLabel3.setBounds(110, 130, 650, 610); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 779, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() .addGap(40, 40, 40) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 774, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73213893", "0.72913563", "0.72913563", "0.72913563", "0.7286415", "0.724936", "0.72132975", "0.72076875", "0.71963966", "0.7190991", "0.7184836", "0.71593595", "0.71489584", "0.709429", "0.7080468", "0.70567", "0.6987573", "0.69780385", "0.69556123", "0.69538146", "0.69455...
0.0
-1
Set up the testing environment.
protected void setUp() { container = new DialogFloatContainer(new DefaultDock(new DockableWrapper(new JButton("Failure Test")))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupEnvironment() {\n // Create mocks for configurations\n bgpConfig = createMock(BgpConfig.class);\n participantsConfig = createMock(SdxParticipantsConfig.class);\n\n // Create mocks for services\n coreService = new TestCoreService();\n configService = new T...
[ "0.7499796", "0.74249953", "0.7397457", "0.7390089", "0.7364602", "0.73336345", "0.71700644", "0.716756", "0.70702606", "0.7059444", "0.7046685", "0.7015183", "0.6987039", "0.69828206", "0.6929989", "0.6929792", "0.6927447", "0.6917279", "0.69100124", "0.6895724", "0.68833214...
0.0
-1
Set up the testing environment.
protected void tearDown() { // empty }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupEnvironment() {\n // Create mocks for configurations\n bgpConfig = createMock(BgpConfig.class);\n participantsConfig = createMock(SdxParticipantsConfig.class);\n\n // Create mocks for services\n coreService = new TestCoreService();\n configService = new T...
[ "0.7499796", "0.74249953", "0.7397457", "0.7390089", "0.7364602", "0.73336345", "0.71700644", "0.716756", "0.70702606", "0.7059444", "0.7046685", "0.7015183", "0.6987039", "0.69828206", "0.6929989", "0.6929792", "0.6927447", "0.6917279", "0.69100124", "0.6895724", "0.68833214...
0.0
-1
Test for the constructor. the dock is null, IllegalArgumentException is expected.
public void testDialogFloatContainer() { try { new DialogFloatContainer(null); fail("the dock is null, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testCanDock() {\n try {\n container.canDock(null);\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void testDockDock() {\n try {\n c...
[ "0.7417095", "0.7297419", "0.7169094", "0.70677114", "0.7041695", "0.7030439", "0.70048314", "0.7004422", "0.69871324", "0.6944356", "0.6930489", "0.6883057", "0.6881033", "0.6859397", "0.68541527", "0.68320596", "0.6826427", "0.68068504", "0.6792573", "0.67860156", "0.676679...
0.72083396
2
Test for the canDock(Dock dock). the dock is null, IllegalArgumentException is expected.
public void testCanDock() { try { container.canDock(null); fail("the dock is null, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDockDock() {\n try {\n container.dock(null);\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void testDockDockPointNullDock() {\n try {\n ...
[ "0.81613743", "0.76312107", "0.73885214", "0.7375326", "0.7276676", "0.70129865", "0.66587526", "0.6606278", "0.6505237", "0.64811933", "0.6309603", "0.6286275", "0.62804896", "0.62190145", "0.6204978", "0.58276695", "0.5734414", "0.53756344", "0.52775544", "0.52365816", "0.5...
0.880433
0
Test for the dock(Dock dock). the dock is null, IllegalArgumentException is expected.
public void testDockDock() { try { container.dock(null); fail("the dock is null, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testCanDock() {\n try {\n container.canDock(null);\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void testDockDockPointNullDock() {\n try {\n...
[ "0.84593976", "0.7908734", "0.77736074", "0.76950777", "0.76765794", "0.7429936", "0.69161934", "0.6811221", "0.65840286", "0.6444213", "0.6379605", "0.62965477", "0.62625515", "0.6247302", "0.6177047", "0.5836", "0.5786712", "0.5312766", "0.5031667", "0.5025225", "0.5021958"...
0.8490892
0
Test for the dock(Dock dock, Point location). the dock is null, IllegalArgumentException is expected.
public void testDockDockPointNull() { try { container.dock(null, new Point(1, 1)); fail("the dock is null, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDockDockPointNullDock() {\n try {\n container.dock(null, new Point(1, 1));\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void testDockDock() {\n...
[ "0.82427937", "0.82264394", "0.8140412", "0.8098026", "0.79467684", "0.74385875", "0.7287879", "0.72784096", "0.7041839", "0.69783586", "0.67692775", "0.6310991", "0.6242633", "0.61505264", "0.57745737", "0.5693464", "0.5678248", "0.5615505", "0.54960793", "0.5448242", "0.541...
0.8128383
3
Test for the dock(Dock dock, Point location). the dock is null, IllegalArgumentException is expected.
public void testDockDockPointNullDock() { try { container.dock(null, new Point(1, 1)); fail("the dock is null, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDockDock() {\n try {\n container.dock(null);\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void testCanDock() {\n try {\n cont...
[ "0.82272613", "0.8141087", "0.8128261", "0.8098275", "0.7946892", "0.743707", "0.7288323", "0.7276755", "0.704096", "0.6977311", "0.67680645", "0.6310329", "0.62437683", "0.6149312", "0.5777797", "0.56901133", "0.5681029", "0.56185895", "0.5498761", "0.5449616", "0.54087955",...
0.8242854
0
Test for the dock(Dock dock, Point location). the dock is null, IllegalArgumentException is expected.
public void testDockDockPointNullPoint() { try { container.dock(new DockImpl(), null); fail("the dock is null, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDockDockPointNullDock() {\n try {\n container.dock(null, new Point(1, 1));\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void testDockDock() {\n...
[ "0.8242854", "0.82272613", "0.8141087", "0.8128261", "0.7946892", "0.743707", "0.7288323", "0.7276755", "0.704096", "0.6977311", "0.67680645", "0.6310329", "0.62437683", "0.6149312", "0.5777797", "0.56901133", "0.5681029", "0.56185895", "0.5498761", "0.5449616", "0.54087955",...
0.8098275
4
Test for the dock(Dock dock, Point location). the x of location is 1, IllegalArgumentException is expected.
public void testDockDockPointNegX() { try { container.dock(new DockImpl(), new Point(-1, 1)); fail("the x of location is -1, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDockDockPointIntNegX() {\n try {\n container.dock(new DockImpl(), new Point(-1, 1), 1);\n fail(\"the x of location is -1, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public voi...
[ "0.81726074", "0.78563124", "0.7816742", "0.7753431", "0.771421", "0.7558762", "0.75426704", "0.7506863", "0.74514705", "0.73855424", "0.66483295", "0.65496504", "0.64242816", "0.6153402", "0.6118215", "0.58395034", "0.5707502", "0.5707369", "0.5684899", "0.56848776", "0.5582...
0.82424915
0
Test for the dock(Dock dock, Point location). the y of location is 1, IllegalArgumentException is expected.
public void testDockDockPointNegY() { try { container.dock(new DockImpl(), new Point(-1, 1)); fail("the y of location is -1, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDockDockPointIntNegY() {\n try {\n container.dock(new DockImpl(), new Point(-1, 1), 1);\n fail(\"the y of location is -1, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public voi...
[ "0.7932119", "0.79245406", "0.78464943", "0.7763374", "0.7682519", "0.76448804", "0.76040876", "0.7466912", "0.7440357", "0.7257491", "0.64921504", "0.646462", "0.63646334", "0.6288549", "0.62618715", "0.61109394", "0.6009925", "0.5825188", "0.5693486", "0.562001", "0.5609595...
0.7939541
0
Test for the dock(Dock dock, int index). the index is 1, IllegalArgumentException is expected.
public void testDockDockIntNullDock() { try { container.dock(null, 0); fail("the index is -1, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDockDock() {\n try {\n container.dock(null);\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void testCanDock() {\n try {\n cont...
[ "0.74454653", "0.73020756", "0.6733359", "0.6697889", "0.665026", "0.65711606", "0.6455686", "0.6388258", "0.62316376", "0.61451256", "0.60359335", "0.5987997", "0.5894428", "0.5737759", "0.54808766", "0.51515967", "0.515146", "0.50215447", "0.49908814", "0.49740323", "0.4953...
0.7989764
0
Test for the dock(Dock dock, Point location). the dock is null, IllegalArgumentException is expected.
public void testDockDockPointIntNullPoint() { try { container.dock(new DockImpl(), null, 1); fail("the dock is null, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDockDockPointNullDock() {\n try {\n container.dock(null, new Point(1, 1));\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void testDockDock() {\n...
[ "0.8242854", "0.82272613", "0.8141087", "0.8128261", "0.8098275", "0.743707", "0.7288323", "0.7276755", "0.704096", "0.6977311", "0.67680645", "0.6310329", "0.62437683", "0.6149312", "0.5777797", "0.56901133", "0.5681029", "0.56185895", "0.5498761", "0.5449616", "0.54087955",...
0.7946892
5
Test for the dock(Dock dock, Point location). the x of location is 1, IllegalArgumentException is expected.
public void testDockDockPointIntNegX() { try { container.dock(new DockImpl(), new Point(-1, 1), 1); fail("the x of location is -1, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDockDockPointNegX() {\n try {\n container.dock(new DockImpl(), new Point(-1, 1));\n fail(\"the x of location is -1, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void test...
[ "0.8241327", "0.7854454", "0.7815109", "0.7751869", "0.77126354", "0.7557153", "0.7541464", "0.75060326", "0.7450331", "0.73846513", "0.66480964", "0.65489197", "0.64242095", "0.61519367", "0.61178476", "0.5839383", "0.57095224", "0.5707274", "0.56854635", "0.568439", "0.5581...
0.8171757
1
Test for the dock(Dock dock, Point location). the y of location is 1, IllegalArgumentException is expected.
public void testDockDockPointIntNegY() { try { container.dock(new DockImpl(), new Point(-1, 1), 1); fail("the y of location is -1, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDockDockPointNegY() {\n try {\n container.dock(new DockImpl(), new Point(-1, 1));\n fail(\"the y of location is -1, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void test...
[ "0.7939541", "0.79245406", "0.78464943", "0.7763374", "0.7682519", "0.76448804", "0.76040876", "0.7466912", "0.7440357", "0.7257491", "0.64921504", "0.646462", "0.63646334", "0.6288549", "0.62618715", "0.61109394", "0.6009925", "0.5825188", "0.5693486", "0.562001", "0.5609595...
0.7932119
1
Test for the undock(Dock dock). the dock is null, IllegalArgumentException is expected.
public void testUndock() { try { container.undock(null); fail("the dock is null, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDockDock() {\n try {\n container.dock(null);\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void testCanDock() {\n try {\n cont...
[ "0.69154185", "0.6838754", "0.63490564", "0.62813824", "0.6253447", "0.61924225", "0.61644185", "0.60634357", "0.6005452", "0.5951066", "0.5816289", "0.57735616", "0.56995404", "0.5690165", "0.56881404", "0.56488615", "0.562488", "0.5597865", "0.5597865", "0.5578034", "0.5547...
0.8270989
0
Test for the setLocation(Point location). the location is null, IllegalArgumentException is expected.
public void testSetLocation() { try { container.setLocation(null); fail("the location is null, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testSetLocationNegX() {\n try {\n container.setLocation(new Point(-1, 1));\n fail(\"the x of the point is -1, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void testSetLocatio...
[ "0.79814076", "0.7629589", "0.7583076", "0.7063812", "0.69951445", "0.69823563", "0.69541925", "0.68449026", "0.68296456", "0.68275535", "0.67123413", "0.67080694", "0.6658373", "0.66059935", "0.65518016", "0.65417826", "0.6538416", "0.6481233", "0.64698625", "0.64636266", "0...
0.8384598
0
Test for the setLocation(Point location). the x of the point is 1, IllegalArgumentException is expected.
public void testSetLocationNegX() { try { container.setLocation(new Point(-1, 1)); fail("the x of the point is -1, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testSetLocation() {\n try {\n container.setLocation(null);\n fail(\"the location is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void testSetLocationNegY() {\n t...
[ "0.7785433", "0.7617022", "0.73574996", "0.7194413", "0.70791024", "0.705389", "0.6988581", "0.6876511", "0.67618513", "0.6729376", "0.6729047", "0.6719468", "0.66533726", "0.66300845", "0.65652585", "0.65475756", "0.6535301", "0.65236384", "0.65043277", "0.64723605", "0.6446...
0.83798057
0
Test for the setLocation(Point location). the y of the point is 1, IllegalArgumentException is expected.
public void testSetLocationNegY() { try { container.setLocation(new Point(1, -1)); fail("the y of the point is -1, IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // expected } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testSetLocationNegX() {\n try {\n container.setLocation(new Point(-1, 1));\n fail(\"the x of the point is -1, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void testSetLocatio...
[ "0.8134997", "0.78207237", "0.747916", "0.718068", "0.70524514", "0.6979845", "0.6952253", "0.68359125", "0.68207836", "0.6731376", "0.6710716", "0.6705911", "0.6659879", "0.66590184", "0.6654554", "0.6640019", "0.66150177", "0.6599473", "0.656811", "0.6548645", "0.6527772", ...
0.8141509
0
Complete the minimumBribes function below.
static void minimumBribes(int[] q) { try { System.out.println(amountOfPeopleBribed(q)); } catch (TooManyBribedPeople e) { System.out.println("Too chaotic"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void minimum()\n\t{\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tif(rowTick[i]==8888)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(columnTick[j]==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cost[i][j]<min)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmin=cost[i][j];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}...
[ "0.67411", "0.6352038", "0.6311637", "0.61929566", "0.6147005", "0.6127445", "0.61164165", "0.60784566", "0.6077387", "0.60745406", "0.60378724", "0.60372376", "0.6005094", "0.59923875", "0.59897715", "0.5972789", "0.5970416", "0.59683555", "0.5938646", "0.5933429", "0.590777...
0.67567515
0
TODO Autogenerated method stub
@Override public void initData() { super.initData(); initLsitData(); viewpager.setAdapter(new MyPagerAdapter()); indicator.setViewPager(viewpager); }
{ "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
private void initLsitData() { list = new ArrayList<View>(); list.add(new NewsMenupagerItem(Mactivity,TY).initView()); list.add(new NewsMenupagerItem(Mactivity,YL).initView()); list.add(new NewsMenupagerItem(Mactivity,QW).initView()); list.add(new NewsMenupagerItem(Mactivity,MV).initView()); }
{ "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 CharSequence getPageTitle(int position) { return TITLE[position]; }
{ "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 int getCount() { return list.size(); }
{ "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 boolean isViewFromObject(View arg0, Object arg1) { return arg0 == arg1; }
{ "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
/ El metodo getMusicName_ se encarga de retornar un arrayList com todos los nombres de un archivo mp3
public ArrayList<String> getMusicName_ () { /* ArrayList<String> musicList = new ArrayList<>(); Collections.sort(musicName); for (String item : musicName) { musicList.add(item); } return musicList; * */ return musicName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<ArrayList<String>> readthePathOfMusicFiles()\n {\n File file = new File(path);\n String[] names = file.list();// all directories inside dataset1 direcory\n ArrayList<ArrayList<String>> pathOfMusicFiles = new ArrayList<>();\n String artistName = \"\";\n String ...
[ "0.73704004", "0.6994374", "0.68746567", "0.67726856", "0.659318", "0.6513371", "0.64943373", "0.63828963", "0.63810784", "0.63197386", "0.63098854", "0.6244902", "0.6216946", "0.6188528", "0.61752474", "0.61748016", "0.6159401", "0.6154419", "0.6103605", "0.6094784", "0.6092...
0.72474116
1
Object obj = getCacheMap().get(key);
public static Object getCache(String key, Object defaultValue) { Object obj = getSession().getAttribute(key); return obj==null?defaultValue:obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private CacheObject<K, V> getCacheObject(K key){\n return this.cache.get(key);\n }", "Object getValueFromLocalCache(Object key);", "@SuppressWarnings(\"unchecked\")\n public T get(K key) {\n synchronized (cacheMap) {\n CacheObject c = (CacheObject) cacheMap.get(key);\n\n ...
[ "0.82052046", "0.7975737", "0.766905", "0.7658105", "0.7483921", "0.7399853", "0.73577917", "0.7305846", "0.7305846", "0.72979563", "0.72979563", "0.7297071", "0.7287745", "0.7282898", "0.71847147", "0.71151555", "0.70733964", "0.7067301", "0.70140934", "0.69803274", "0.69740...
0.6719894
35
HashMap solution boundary check
public String fractionToDecimal(int numerator, int denominator) { if(numerator == 0) return "0"; StringBuilder sb = new StringBuilder(); //key is remainder, value is len of curr sb, which is starting index of this remainder HashMap<Long, Integer> hs = new HashMap<Long, Integer>(); //convert to long to prevent overflow long n = (long) numerator; long d = (long) denominator; //catch negative sign if( (n < 0) ^ (d < 0) ){ sb.append("-"); n = Math.abs(n); d = Math.abs(d); } sb.append(n/d); long remainder = n%d; if(remainder == 0) return sb.toString(); sb.append("."); //we will process inputs until we face a visited remainder again //in case inputs are dividable, we will return result inside the loop while( !hs.containsKey(remainder) ){ //each loop we will start with a new remainder from last loop //record curr remainder and its starting index hs.put( remainder, sb.length() ); //update remainder like what we did in math division remainder *= 10; sb.append( remainder/d ); //update remainder to get next remainder remainder %= d; //inputs are dividable if(remainder == 0) return sb.toString(); } //we get here only when we have Recurring Decimal, add "(" based on hashMap value sb.insert( hs.get(remainder), "(" ).append(")"); return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isHashMap();", "@Test\n\tpublic void testHashMap() {\n\n\t\t/*\n\t\t * Creates an empty HashMap object with default initial capacity 16 and default\n\t\t * fill ratio \"0.75\".\n\t\t */\n\t\tHashMap hm = new HashMap();\n\t\thm.put(\"evyaan\", 700);\n\t\thm.put(\"varun\", 100);\n\t\thm.put(\"dolly\...
[ "0.62082696", "0.6182553", "0.6166156", "0.6000055", "0.59850997", "0.59822106", "0.59229285", "0.5892423", "0.57813287", "0.57030207", "0.56679314", "0.55770296", "0.55381024", "0.55328166", "0.55086076", "0.5497949", "0.5489326", "0.5472601", "0.5471912", "0.54603636", "0.5...
0.0
-1
Creates a new instance of MessageImportEvent
public SendMessageEvent(SendThread _source, Socket _socket, Message _message) { source = _source; socket = _socket; message = _message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private EventMessageMapper() {\n }", "public EventMessage(Event event)\r\n {\r\n //super(\"EventMessage\");\r\n super(TYPE_IDENT, event);\r\n }", "@Override\n\tpublic EventMessage initLocalEventMessage() {\n\t\treturn getEventMessage();\n\t}", "public Message createEventMessage() throws ...
[ "0.5842096", "0.58225596", "0.56965655", "0.5654454", "0.5499089", "0.54690784", "0.5450803", "0.5431411", "0.5411706", "0.5405012", "0.5374716", "0.53673494", "0.5354805", "0.5335966", "0.5331568", "0.52710456", "0.52612543", "0.52602285", "0.52602285", "0.5256308", "0.52563...
0.0
-1
Gets the orientation of an image (usually photo). Outputs: 6: rotate 90, 1: original (no change) 3: rotate 180, 8: rotate 270, others: original (no change)
public static int getOrientation(File in) throws IOException { int orientation = 1; Metadata metadata; Directory directory; try { metadata = ImageMetadataReader.readMetadata(in); directory = metadata.getFirstDirectoryOfType(ExifIFD0Directory.class); if(directory != null){ orientation = directory.getInt(ExifIFD0Directory.TAG_ORIENTATION); } } catch (ImageProcessingException e) { //System.err.println("[ImgUtil] could not process image"); //e.printStackTrace(); } catch (MetadataException e) { //System.err.println("[ImgUtil] could not get orientation from image"); //e.printStackTrace(); } return getDegreeForOrientation(orientation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ImageOrientation getOrientation()\n\t{\n\t\treturn ImageOrientation.None;\n\t}", "public IOrientation getOrientation();", "protected int getExifOrientation(final File imageFile) {\n try {\n final ImageMetadata metadata = Imaging.getMetadata(imageFile);\n TiffImageMetadata ti...
[ "0.7594228", "0.7456992", "0.73700273", "0.73555046", "0.7352765", "0.7345229", "0.73136437", "0.72706634", "0.7119961", "0.7119795", "0.7109523", "0.70922667", "0.7087807", "0.70772815", "0.7069885", "0.7063753", "0.70602405", "0.70439976", "0.7026239", "0.6975651", "0.69640...
0.74100155
2
This interface contains all the essential methods that'll make the column lane class work
public interface ColumnLaneInterface { /** * This method converts the current x position and determines which column lane this is * @return Returns the number of this column lane * @author Justin Yau */ public int getLane(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int getColumn();", "public interface Column extends Field {\n\n\t/**\n\t * Get the index of the column within the tabular data set. This is\n\t * always 1 based. If a value of 0 is returned that is interpreted as\n\t * this column does not a fixed position and will be assigned an index.\n\t * \n\...
[ "0.6494448", "0.6159255", "0.60531586", "0.59677124", "0.595325", "0.5880548", "0.58691764", "0.5848594", "0.5818226", "0.5813236", "0.580248", "0.5801652", "0.5789648", "0.57556754", "0.5755003", "0.57287043", "0.5723535", "0.57159495", "0.5705391", "0.56620526", "0.56390536...
0.7818437
0
This method converts the current x position and determines which column lane this is
public int getLane();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int convertXToColumn(int x) {\n return (x - DRAG_TARGET_SQUARE_START_X) / SQUARE_WIDTH;\n }", "public int calculateGridCellColumn(int x)\n {\n float leftEdge = miniGame.getBoundaryLeft();\n x = (int)(x - leftEdge);\n return x / TILE_IMAGE_WIDTH;\n }", "private...
[ "0.72776747", "0.6963715", "0.6754757", "0.6423104", "0.63131243", "0.624155", "0.62332445", "0.611479", "0.6110199", "0.6046707", "0.6042993", "0.5983247", "0.59265625", "0.59170645", "0.59084547", "0.5897305", "0.5877251", "0.5850243", "0.58295035", "0.58289915", "0.5823331...
0.0
-1
Verify that we can create an EventData with an empty byte array.
@Test public void canCreateWithEmptyArray() { // Arrange byte[] byteArray = new byte[0]; // Act final EventData eventData = new EventData(byteArray); // Assert final byte[] actual = eventData.getBody(); Assertions.assertNotNull(actual); Assertions.assertEquals(0, actual.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void TestBytes() {\n ConnectionEvent connectionEvent = new ConnectionEvent(ConnectionEvent.ConnectionEventType.Close, new byte[0][0]); // Initialize connection event\n\n assertTrue(\"connection event bytes must not be null\", connectionEvent.Bytes() != null); // Ensure event is not ...
[ "0.7221988", "0.65171087", "0.6509261", "0.63454133", "0.6160397", "0.6108104", "0.5847177", "0.5831395", "0.58153594", "0.57554156", "0.57535076", "0.57218194", "0.57026565", "0.5684061", "0.566689", "0.56478685", "0.5602381", "0.5593468", "0.55926424", "0.55710346", "0.5547...
0.8646276
0
Verify that we can create an EventData with the correct body contents.
@Test public void canCreateWithPayload() { // Act final EventData eventData = new EventData(PAYLOAD_BYTES); // Assert Assertions.assertNotNull(eventData.getBody()); Assertions.assertEquals(PAYLOAD, new String(eventData.getBody(), UTF_8)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void canCreateWithEmptyArray() {\n // Arrange\n byte[] byteArray = new byte[0];\n\n // Act\n final EventData eventData = new EventData(byteArray);\n\n // Assert\n final byte[] actual = eventData.getBody();\n Assertions.assertNotNull(actual);\n ...
[ "0.6387247", "0.6050491", "0.5710427", "0.56742936", "0.56693155", "0.5652188", "0.5600802", "0.5496599", "0.54417264", "0.5432168", "0.542192", "0.53691006", "0.53466135", "0.530551", "0.52999073", "0.52944493", "0.52513903", "0.52440035", "0.52408355", "0.52240515", "0.5203...
0.75510424
0
Creates an event with the sequence number set.
private static EventData constructMessage(long sequenceNumber) { final HashMap<Symbol, Object> properties = new HashMap<>(); properties.put(getSymbol(SEQUENCE_NUMBER_ANNOTATION_NAME.getValue()), sequenceNumber); properties.put(getSymbol(OFFSET_ANNOTATION_NAME.getValue()), String.valueOf(OFFSET)); properties.put(getSymbol(PARTITION_KEY_ANNOTATION_NAME.getValue()), PARTITION_KEY); properties.put(getSymbol(ENQUEUED_TIME_UTC_ANNOTATION_NAME.getValue()), Date.from(ENQUEUED_TIME)); final byte[] contents = "boo".getBytes(UTF_8); final Message message = Proton.message(); message.setMessageAnnotations(new MessageAnnotations(properties)); message.setBody(new Data(new Binary(contents))); return MESSAGE_SERIALIZER.deserialize(message, EventData.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setSequenceNumber(int sequenceNumber);", "public SimulatorEvent( long timestamp ) {\r\n // Store the timestamp\r\n this.timestamp = timestamp;\r\n // Set the next sequence number (ignore wrap around :P)\r\n this.sequenceNumber = SimulatorEvent.nextSequenceNumber++;\r\n }", "...
[ "0.63138646", "0.60892904", "0.5918758", "0.5918758", "0.59173954", "0.58614975", "0.5856639", "0.58061624", "0.57812417", "0.57812417", "0.57650274", "0.5761327", "0.57591385", "0.57271624", "0.5659321", "0.56470525", "0.56451535", "0.5641585", "0.5626664", "0.5519405", "0.5...
0.55003697
22
TODO Autogenerated method stub
public static void main(String[] args) { Student stu = new Student(); try { stu.regist(10); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println(stu.toString()); }
{ "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
driver = new FirefoxDriver();
@Before public void setUp() throws Exception { URL = "https://www.facebook.com/"; //baseUrl = "https://www.katalon.com/"; System.setProperty("webdriver.chrome.driver", "E:\\Documentos\\Java Drivers\\chromedriver.exe"); driver = new ChromeDriver(); // driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@BeforeClass\r\n\tpublic void browser() {\r\n\tdriver = new FirefoxDriver();\r\n\t}", "public static WebDriver firefox()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.gecko.driver\",System.getProperty(\"user.dir\")+\"\\\\Gecko\\\\geckodriver.exe\");\r\n\t\tgk = new FirefoxDriver();\r\n\t\treturn gk;\r\n\t}", "@...
[ "0.79030126", "0.7598755", "0.7596527", "0.75318944", "0.7512949", "0.7365793", "0.73215264", "0.7281525", "0.72494936", "0.7208571", "0.71939915", "0.71733266", "0.7094402", "0.6909102", "0.6899979", "0.6861617", "0.6861404", "0.68581027", "0.6857954", "0.68509394", "0.68443...
0.0
-1
Log.d("DEPURAR", entregada + "");
@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { mTarea.setEntregada(isChecked); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String insertAlum(Alumno alumno) //lo necesitaba\n {\n String regInsertado = \"Alumno: \";\n\n\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"CARNET\",alumno.getCarnet());\n contentValues....
[ "0.6507909", "0.6112085", "0.6096006", "0.6043042", "0.6031549", "0.59337574", "0.59074473", "0.5888971", "0.58482224", "0.5846052", "0.57373416", "0.5726622", "0.57233804", "0.5719078", "0.5676241", "0.56694376", "0.5660325", "0.5640286", "0.5595274", "0.5586303", "0.5585096...
0.0
-1
T(n+n), O(n), space O(n)
public String urlify(char [] arr, int size){ if(arr.length <= 0) return ""; //size needed for %20 expand int newSize = size; //T(n) for(int i=0; i< size; i++){ //expand by 2 each time find space, ' ' is 1, '%20' is 3 if(arr[i] == ' ') newSize += 2; } //O(n) Space complexity char [] newArr = new char [newSize]; int ind = 0; //index for new Arr //T(n) for(int i=0; i< size; i++){ if(arr[i] != ' '){ //assign when not space newArr[ind] = arr[i]; }else{ //when space newArr[ind] = '%'; newArr[++ind] = '2'; newArr[++ind] = '0'; } ind++; } return new String(newArr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++...
[ "0.7219487", "0.6922242", "0.65924513", "0.6384012", "0.6265819", "0.6253801", "0.6090085", "0.6041751", "0.590745", "0.5886171", "0.5836131", "0.5826244", "0.5798625", "0.5784447", "0.5742501", "0.56955934", "0.5654392", "0.5653277", "0.5648556", "0.5642132", "0.5608859", ...
0.0
-1
using backward approach, without allocating new space, Space O(1)
public void replaceSpace(char [] arr, int size){ int newSize = size; for(int i=0; i< size; i++){ //expand by 2 each time find space, ' ' is 1, '%20' is 3 if(arr[i] == ' ') newSize += 2; } int ind = newSize -1; //assign backward, extra space allow us to assign to the same arr without replacing the original chars when looping for(int i = size-1; i >= 0; i--){ if(arr[i] != ' '){ arr[ind] = arr[i]; }else{ //is space, assign backward arr[ind] = '0'; arr[--ind] = '2'; arr[--ind] = '%'; } ind--; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void backward() {\n }", "@Override\n public void backward() {\n Tensor x = modInX.getOutput();\n Tensor tmp = new Tensor(yAdj); // copy\n tmp.elemDivide(x);\n modInX.getOutputAdj().elemAdd(tmp);\n }", "public void stepBackward() {\n\t\tposition = backwardP...
[ "0.6931875", "0.6517026", "0.6493527", "0.6279712", "0.6266311", "0.62636316", "0.62284094", "0.6193935", "0.6193922", "0.61618674", "0.6100041", "0.5981271", "0.59705055", "0.5948531", "0.59352654", "0.5910065", "0.5910065", "0.5907558", "0.5897867", "0.58963394", "0.5887861...
0.0
-1
Constructor for this control panel.
public ReportingControlPanel(){ setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; c.anchor = GridBagConstraints.PAGE_START; c.weightx = 0.5; c.weighty = 0; c.gridx = 0; c.gridy = 0; c.gridheight = 1; c.insets = new Insets(5,5,5,5); c.gridwidth = 3; //text area for display of statistics. JLabel jLabel1 = new JLabel("<html><u><b>" + Messages.getString("ReportingControlPanel.statistics") + "</u></b></html>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ ++c.gridy; add(jLabel1, c); c.gridwidth = 2; autoUpdateStatisticsCheckBox_ = new JCheckBox(Messages.getString("ReportingControlPanel.autoupdateStatistics"), false); //$NON-NLS-1$ autoUpdateStatisticsCheckBox_.addItemListener(this); ++c.gridy; add(autoUpdateStatisticsCheckBox_,c); statisticsTextArea_ = new JTextArea(11,1); statisticsTextArea_.setEditable(false); statisticsTextArea_.setLineWrap(true); JScrollPane scrolltext = new JScrollPane(statisticsTextArea_); scrolltext.setMinimumSize(new Dimension(180,300)); c.fill = GridBagConstraints.HORIZONTAL; ++c.gridy; add(scrolltext, c); c.gridwidth = 1; c.gridx = 1; ++c.gridy; c.fill = GridBagConstraints.NONE; JPanel tmpPanel = new JPanel(); tmpPanel.add(ButtonCreator.getJButton("refresh.png", "refresh", Messages.getString("ReportingControlPanel.refresh"), this)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ tmpPanel.add(ButtonCreator.getJButton("clipboard.png", "copyStatisticsInfo", Messages.getString("ReportingControlPanel.copyStatisticsToClipboard"), this)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ add(tmpPanel, c); c.gridwidth = 3; c.gridx = 0; c.fill = GridBagConstraints.BOTH; jLabel1 = new JLabel("<html><u><b>" + Messages.getString("ReportingControlPanel.monitoredBeaconZoneInfo") + "</u></b></html>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ ++c.gridy; c.insets = new Insets(25,5,5,5); add(jLabel1, c); c.insets = new Insets(5,5,0,5); doMonitorBeaconsCheckBox_ = new JCheckBox(Messages.getString("ReportingControlPanel.enableMonitoring"), false); //$NON-NLS-1$ doMonitorBeaconsCheckBox_.addItemListener(this); ++c.gridy; add(doMonitorBeaconsCheckBox_,c); monitoredBeaconZoneShowCheckBox_ = new JCheckBox(Messages.getString("ReportingControlPanel.showMonitoredZone"), false); //$NON-NLS-1$ monitoredBeaconZoneShowCheckBox_.addItemListener(this); ++c.gridy; add(monitoredBeaconZoneShowCheckBox_,c); monitoredBeaconZoneEditCheckBox_ = new JCheckBox(Messages.getString("ReportingControlPanel.editMonitoredZone"), false); //$NON-NLS-1$ monitoredBeaconZoneEditCheckBox_.addItemListener(this); ++c.gridy; add(monitoredBeaconZoneEditCheckBox_,c); c.insets = new Insets(5,5,5,5); //text area for display of vehicles leaving mix zones. beaconInfoTextArea_ = new JTextArea(25,1); beaconInfoTextArea_.setEditable(false); beaconInfoTextArea_.setText(Messages.getString("ReportingControlPanel.legend")); //$NON-NLS-1$ beaconInfoTextArea_.setLineWrap(true); scrolltext = new JScrollPane(beaconInfoTextArea_); scrolltext.setMinimumSize(new Dimension(180,300)); scrolltext.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); beaconInfoVerticalScrollBar_ = scrolltext.getVerticalScrollBar(); ++c.gridy; c.fill = GridBagConstraints.HORIZONTAL; add(scrolltext, c); c.gridwidth = 1; c.gridx = 1; ++c.gridy; c.fill = GridBagConstraints.NONE; tmpPanel = new JPanel(); tmpPanel.add(ButtonCreator.getJButton("delete.png", "deleteBeaconInfo", Messages.getString("ReportingControlPanel.deleteBeaconInfo"), this)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ tmpPanel.add(ButtonCreator.getJButton("clipboard.png", "copyBeaconInfo", Messages.getString("ReportingControlPanel.copyBeaconToClipBoard"), this)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ add(tmpPanel, c); //log analyser c.gridwidth = 2; c.gridx = 0; c.fill = GridBagConstraints.BOTH; ++c.gridy; c.insets = new Insets(25,5,5,5); add(new JLabel("<html><u><b>" + Messages.getString("ReportingControlPanel.analyseLog") + "</u></b></html>"), c); c.insets = new Insets(5,5,0,5); //exchanges coordinates with port numbers in mix-zone-logs ++c.gridy; c.gridx = 0; privacyLogCleaner_ = new JButton(Messages.getString("EditLogControlPanel.privacyLogCleanerButton")); privacyLogCleaner_.setActionCommand("cleanLog"); privacyLogCleaner_.setPreferredSize(new Dimension(200,20)); privacyLogCleaner_.addActionListener(this); add(privacyLogCleaner_,c); //opens the log-analyzer component ++c.gridy; c.gridx = 0; privacyLogAnalyzer_ = new JButton(Messages.getString("EditLogControlPanel.privacyLogAnalyzerButton")); privacyLogAnalyzer_.setActionCommand("openAnalyzer"); privacyLogAnalyzer_.setPreferredSize(new Dimension(200,20)); privacyLogAnalyzer_.addActionListener(this); add(privacyLogAnalyzer_,c); //sums up the length of all streets on the map ++c.gridy; c.gridx = 0; JButton calculateStreetLengthButton = new JButton(Messages.getString("ReportingControlPanel.calculateStreetLength")); calculateStreetLengthButton.setActionCommand("openStreetLengthCalculator"); calculateStreetLengthButton.setPreferredSize(new Dimension(200,20)); calculateStreetLengthButton.addActionListener(this); add(calculateStreetLengthButton,c); //show the location information on a map ++c.gridy; c.gridx = 0; JButton advancedLocationInformation = new JButton(Messages.getString("ReportingControlPanel.showAdvancedLocationInformation")); advancedLocationInformation.setActionCommand("showAdvancedLocationInformation"); advancedLocationInformation.setPreferredSize(new Dimension(200,20)); advancedLocationInformation.addActionListener(this); add(advancedLocationInformation,c); //define FileFilter for fileChooser logFileFilter_ = new FileFilter(){ public boolean accept(File f) { if (f.isDirectory()) return true; return f.getName().toLowerCase().endsWith(".log"); //$NON-NLS-1$ } public String getDescription () { return Messages.getString("EditLogControlPanel.logFiles") + " (*.log)"; //$NON-NLS-1$ //$NON-NLS-2$ } }; //to consume the rest of the space c.weighty = 1.0; ++c.gridy; add(new JPanel(), c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ControlPanel() {\n\t\tpanelName = null;\n\t}", "public JavaPanel() {\n\t\tsuper();\n\t}", "public Panel() {\n initComponents();\n\n\n }", "public Panel() {\n }", "public PanelControl() {\r\n initComponents();\r\n VersionEImageIcon versionEImageIcon = new VersionEImageIcon();\r\n ...
[ "0.7778336", "0.7334563", "0.7329748", "0.7298096", "0.7209615", "0.7203798", "0.7132951", "0.7110726", "0.7098827", "0.70933115", "0.7088505", "0.7074039", "0.7046061", "0.6966069", "0.69374824", "0.6936021", "0.6921694", "0.690613", "0.6895456", "0.6892981", "0.6881311", ...
0.66817695
45
This function should be called after each simulation step to determine if an update of statistics/beacon information is necessary
public void checkUpdates(int timePerStep){ if(updateStatistics_ || statisticsCountdown_ == -1){ statisticsCountdown_ -= timePerStep; if(statisticsCountdown_ < 1){ statisticsCountdown_ += STATISTICS_ACTUALIZATION_INTERVAL; updateStatistics(); } } if(updateBeaconInfo_){ beaconInfoCountdown_ -= timePerStep; if(beaconInfoCountdown_ < 1){ beaconInfoCountdown_ += BEACONINFO_ACTUALIZATION_INTERVAL; updateBeaconInfo(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean needsToRecalcStats() {\n\n return this.equipsChanged;\n }", "private boolean hasEnoughInfoForBeaconMode() {\n return nsdController.getSocketManager().getConnections().size() >= 2\n && nodeManager.countConnectedNodes() >= 2;\n // TODO check node conn...
[ "0.6284436", "0.62077296", "0.6091483", "0.60031545", "0.5891756", "0.58493406", "0.58163327", "0.56749684", "0.56725883", "0.5647956", "0.5624143", "0.56031513", "0.55997366", "0.558902", "0.5571368", "0.55631614", "0.55573237", "0.5537973", "0.54931384", "0.54885244", "0.54...
0.6516405
0
Updates the statistics. You need to make sure that the vehicles are not modified while executing this.
private final void updateStatistics(){ statisticsText_.setLength(0); //reset Region[][] regions = Map.getInstance().getRegions(); Vehicle[] vehicles; Vehicle vehicle; int i, j, k; int activeVehicles = 0; int travelledVehicles = 0; int wifiVehicles = 0; long messagesCreated = 0; long IDsChanged = 0; double messageForwardFailed = 0; double travelDistance = 0; double travelTime = 0; double speed = 0; double knownVehicles = 0; for(i = 0; i < regions.length; ++i){ for(j = 0; j < regions[i].length; ++j){ vehicles = regions[i][j].getVehicleArray(); for(k = 0; k < vehicles.length; ++k){ vehicle = vehicles[k]; if(vehicle.getTotalTravelTime() > 0){ ++travelledVehicles; travelDistance += vehicle.getTotalTravelDistance(); travelTime += vehicle.getTotalTravelTime(); } if(vehicle.isActive()){ ++activeVehicles; speed += vehicle.getCurSpeed(); if(vehicle.isWiFiEnabled()){ ++wifiVehicles; messageForwardFailed += vehicle.getKnownMessages().getFailedForwardCount(); knownVehicles += vehicle.getKnownVehiclesList().getSize(); IDsChanged += vehicle.getIDsChanged(); messagesCreated += vehicle.getMessagesCreated(); } } } } } statisticsText_.append(Messages.getString("ReportingControlPanel.currentTime")); //$NON-NLS-1$ statisticsText_.append(INTEGER_FORMAT.format(Renderer.getInstance().getTimePassed())); statisticsText_.append("\n"); //$NON-NLS-1$ statisticsText_.append(Messages.getString("ReportingControlPanel.activeVehicles")); //$NON-NLS-1$ statisticsText_.append(INTEGER_FORMAT.format(activeVehicles)); statisticsText_.append("\n"); //$NON-NLS-1$ statisticsText_.append(Messages.getString("ReportingControlPanel.averageSpeed")); //$NON-NLS-1$ if(activeVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(speed/activeVehicles/100000*3600)); else statisticsText_.append("0"); //$NON-NLS-1$ statisticsText_.append(" km/h\n"); //$NON-NLS-1$ statisticsText_.append(Messages.getString("ReportingControlPanel.averageTravelDistance")); //$NON-NLS-1$ if(travelledVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(travelDistance/travelledVehicles/100)); else statisticsText_.append("0"); //$NON-NLS-1$ statisticsText_.append(" m\n"); //$NON-NLS-1$ statisticsText_.append(Messages.getString("ReportingControlPanel.averageTravelTime")); //$NON-NLS-1$ if(travelledVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(travelTime/travelledVehicles/1000)); else statisticsText_.append("0"); //$NON-NLS-1$ statisticsText_.append(" s\n"); //$NON-NLS-1$ statisticsText_.append(Messages.getString("ReportingControlPanel.wifiVehicles")); //$NON-NLS-1$ statisticsText_.append(INTEGER_FORMAT.format(wifiVehicles)); statisticsText_.append("\n"); //$NON-NLS-1$ statisticsText_.append(Messages.getString("ReportingControlPanel.averageKnownVehicles")); //$NON-NLS-1$ if(wifiVehicles > 0) statisticsText_.append(INTEGER_FORMAT_FRACTION.format(knownVehicles/wifiVehicles)); else statisticsText_.append("0"); //$NON-NLS-1$ statisticsText_.append("\n"); //$NON-NLS-1$ statisticsText_.append(Messages.getString("ReportingControlPanel.uniqueMessages")); //$NON-NLS-1$ statisticsText_.append(INTEGER_FORMAT.format(messagesCreated)); statisticsText_.append("\n"); //$NON-NLS-1$ statisticsText_.append(Messages.getString("ReportingControlPanel.failedMessages")); //$NON-NLS-1$ statisticsText_.append(INTEGER_FORMAT.format(messageForwardFailed)); statisticsText_.append("\n"); //$NON-NLS-1$ statisticsText_.append(Messages.getString("ReportingControlPanel.totalIDchanges")); //$NON-NLS-1$ statisticsText_.append(INTEGER_FORMAT.format(IDsChanged)); statisticsText_.append("\n"); //$NON-NLS-1$ statisticsTextArea_.setText(statisticsText_.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateVehicles() {\n OffloaderSyncAdapter.syncImmediately(getContext());\n Log.w(LOG_TAG, \"updateVehicles: \");\n }", "public void updateStats( ) {\r\n\t\tperseverance = owner.perseverance;\r\n\t\tobservation = owner.observation;\r\n\t\tintellect = owner.intellect;\r\n\t\tnegotiati...
[ "0.6805928", "0.67295015", "0.6438624", "0.6338533", "0.63028693", "0.6181716", "0.6175437", "0.61618704", "0.61167586", "0.60777843", "0.60264915", "0.59366584", "0.59329736", "0.5826729", "0.57720816", "0.5758528", "0.57408184", "0.57236445", "0.56418884", "0.56167275", "0....
0.7725796
0
Updates the statistics. You need to make sure that the vehicles are not modified while executing this.
public void updateBeaconInfo(){ boolean autoScroll; int scrollDiff = beaconInfoVerticalScrollBar_.getValue() + beaconInfoVerticalScrollBar_.getVisibleAmount() - beaconInfoVerticalScrollBar_.getMaximum(); if(scrollDiff > -10) autoScroll = true; else autoScroll = false; beaconInfoTextArea_.append(beaconInfoText_.toString()); if(autoScroll) beaconInfoTextArea_.setCaretPosition(beaconInfoTextArea_.getDocument().getLength()); beaconInfoText_.setLength(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final void updateStatistics(){\r\n\t\tstatisticsText_.setLength(0); \t//reset\r\n\t\t\r\n\t\tRegion[][] regions = Map.getInstance().getRegions();\r\n\t\tVehicle[] vehicles;\r\n\t\tVehicle vehicle;\r\n\t\tint i, j, k;\r\n\t\tint activeVehicles = 0;\r\n\t\tint travelledVehicles = 0;\r\n\t\tint wifiVehicles =...
[ "0.7725491", "0.68072987", "0.6729937", "0.64399326", "0.6337699", "0.6307139", "0.6179425", "0.6177785", "0.61606145", "0.61172175", "0.6077355", "0.6028993", "0.59362024", "0.59326726", "0.5827502", "0.5772407", "0.5758969", "0.57417995", "0.5724979", "0.5642018", "0.561584...
0.0
-1
Receive a beacon from a vehicle in the monitored zone.
public synchronized void addBeacon(Vehicle vehicle, long ID, long x, long y, double speed, boolean isEncrypted){ beaconInfoText_.append("\n\nVehicle\n"); //$NON-NLS-1$ beaconInfoText_.append(Renderer.getInstance().getTimePassed()); beaconInfoText_.append("ms\n"); //$NON-NLS-1$ beaconInfoText_.append(Long.toHexString(ID)); beaconInfoText_.append(","); //$NON-NLS-1$ beaconInfoText_.append(speed); beaconInfoText_.append("\n"); //$NON-NLS-1$ beaconInfoText_.append(x); beaconInfoText_.append(","); //$NON-NLS-1$ beaconInfoText_.append(y); beaconInfoText_.append(", encrypted:"); //$NON-NLS-1$ beaconInfoText_.append(isEncrypted); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onIBeaconServiceConnect();", "public void onReceive();", "public boolean beaconEvent(ByteBuffer beaconInfo);", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tVibrator v = (Vibrator) context\r\n\t\t\t\t.getSystemService(Context.VIBRATOR_SERVICE);\r\n\t\tv.vibrate(500)...
[ "0.5825071", "0.559024", "0.5589727", "0.556827", "0.555878", "0.5553342", "0.5553272", "0.5421464", "0.53753394", "0.53186846", "0.52859026", "0.5233798", "0.5205718", "0.51852906", "0.5138294", "0.51176304", "0.5092197", "0.5064647", "0.50644565", "0.5015905", "0.50103277",...
0.4594002
63
Receive a beacon from a vehicle in the monitored zone.
public synchronized void addBeacon(Vehicle vehicle, long ID, long x, long y, double speed, boolean isEncrypted, boolean isForwared){ beaconInfoText_.append("\n\nVehicle (forwarded by RSU) \n"); //$NON-NLS-1$ beaconInfoText_.append(Renderer.getInstance().getTimePassed()); beaconInfoText_.append("ms\n"); //$NON-NLS-1$ beaconInfoText_.append(Long.toHexString(ID)); beaconInfoText_.append(","); //$NON-NLS-1$ beaconInfoText_.append(speed); beaconInfoText_.append("\n"); //$NON-NLS-1$ beaconInfoText_.append(x); beaconInfoText_.append(","); //$NON-NLS-1$ beaconInfoText_.append(y); beaconInfoText_.append(", encrypted:"); //$NON-NLS-1$ beaconInfoText_.append(isEncrypted); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onIBeaconServiceConnect();", "public void onReceive();", "public boolean beaconEvent(ByteBuffer beaconInfo);", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tVibrator v = (Vibrator) context\r\n\t\t\t\t.getSystemService(Context.VIBRATOR_SERVICE);\r\n\t\tv.vibrate(500)...
[ "0.5825071", "0.559024", "0.5589727", "0.556827", "0.555878", "0.5553342", "0.5553272", "0.5421464", "0.53753394", "0.53186846", "0.52859026", "0.5233798", "0.5205718", "0.51852906", "0.5138294", "0.51176304", "0.5092197", "0.5064647", "0.50644565", "0.5015905", "0.50103277",...
0.4860686
29
Receive a beacon from a RSU in the monitored zone.
public synchronized void addBeacon(RSU rsu, long ID, long x, long y, boolean isEncrypted){ beaconInfoText_.append("\n\nRSU\n"); //$NON-NLS-1$ beaconInfoText_.append(Renderer.getInstance().getTimePassed()); beaconInfoText_.append("ms\n"); //$NON-NLS-1$ beaconInfoText_.append(ID); beaconInfoText_.append("\n"); //$NON-NLS-1$ beaconInfoText_.append(x); beaconInfoText_.append(","); //$NON-NLS-1$ beaconInfoText_.append(y); beaconInfoText_.append(", encrypted:"); //$NON-NLS-1$ beaconInfoText_.append(isEncrypted); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onReceive();", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.d(\"ALARMA\", \"alarma\");\n AlarmUtils.scheduleAlarmHeartRate();\n BleDevice device = new BleDevice(new DeviceManager().getDevice().getMacAddress());\n\n device.connect();\n ...
[ "0.56119376", "0.5570508", "0.54057497", "0.53374696", "0.5288027", "0.52691895", "0.52232575", "0.5157112", "0.513057", "0.5117427", "0.51068515", "0.50762993", "0.50642157", "0.5055644", "0.5050986", "0.50222266", "0.5019724", "0.5005343", "0.49888608", "0.489993", "0.48959...
0.44906723
68
Receives a mouse event for changing the monitored mix zone.
public void receiveMouseEvent(int x, int y){ if(x < 0) x = 0; else if(x > Map.getInstance().getMapWidth()) x = Map.getInstance().getMapWidth(); if(y < 0) y = 0; else if(y > Map.getInstance().getMapHeight()) y = Map.getInstance().getMapHeight(); if(lastPressedX_ == -1 && lastPressedY_ == -1){ lastPressedX_ = x; lastPressedY_ = y; } else { //get bounding box variables int minX = Math.min(lastPressedX_, x); int maxX = Math.max(lastPressedX_, x); int minY = Math.min(lastPressedY_, y); int maxY = Math.max(lastPressedY_, y); Vehicle.setMonitoredMixZoneVariables(minX, maxX, minY, maxY); Renderer.getInstance().setMonitoredBeaconZoneVariables(minX, maxX, minY, maxY); if(monitoredBeaconZoneShowCheckBox_.isSelected()) Renderer.getInstance().ReRender(false, false); lastPressedX_ = -1; lastPressedY_ = -1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseMoved(MouseEvent e) {}", "public void mouseMoved(MouseEvent e) {}", "public void mouseMoved(MouseEvent event) {\n }", "public void mouseMoved(MouseEvent e){}", "public void mouseMoved(MouseEvent e) {}", "public void mouseMoved(MouseEvent evt) { }", "public void mous...
[ "0.6776541", "0.6776541", "0.67587453", "0.6734425", "0.6674469", "0.6663424", "0.65973085", "0.6578108", "0.6555309", "0.65446645", "0.65267324", "0.651963", "0.64793307", "0.6477833", "0.6476195", "0.64530134", "0.64411646", "0.6434476", "0.6426481", "0.6425837", "0.6423911...
0.6428697
18
An implemented ActionListener which performs all needed actions when a JButton is clicked.
public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if ("refresh".equals(command)){ //$NON-NLS-1$ if(VanetSimStart.getSimulationMaster().isSimulationRunning()) statisticsCountdown_ = -1; else updateStatistics(); } else if ("deleteBeaconInfo".equals(command)){ //$NON-NLS-1$ StringSelection ss = new StringSelection(beaconInfoTextArea_.getText()); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null); beaconInfoTextArea_.setText(Messages.getString("ReportingControlPanel.legend")); //$NON-NLS-1$ } else if ("copyStatisticsInfo".equals(command)){ //$NON-NLS-1$ StringSelection ss = new StringSelection(statisticsTextArea_.getText()); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null); } else if ("copyBeaconInfo".equals(command)){ //$NON-NLS-1$ StringSelection ss = new StringSelection(beaconInfoTextArea_.getText()); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null); } else if("cleanLog".equals(command)){ try { cleanLogFile(); } catch (IOException e2) { e2.printStackTrace(); } } else if("openAnalyzer".equals(command)){ new LogAnalyserDialog(); } else if("openStreetLengthCalculator".equals(command)){ calculateStreetLength(); } else if("showAdvancedLocationInformation".equals(command)){ showAdvancedLocationInformation(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void actionPerformed(ActionEvent e) {\n action.actionPerformed(e);\n }", "public void actionPerformed(ActionEvent arg0) {\n myButtonActionPerformed(arg0);\n }", "public void actionPerformed(ActionEvent arg0) {\r\n\t\t\t}", "public void actionPerforme...
[ "0.7312712", "0.7303525", "0.72172457", "0.7194046", "0.7194046", "0.7155538", "0.7138753", "0.7138753", "0.7126179", "0.7126179", "0.7126179", "0.7126179", "0.7126179", "0.7126179", "0.7091297", "0.7091297", "0.7079738", "0.7062529", "0.70602036", "0.7055219", "0.7043386", ...
0.0
-1
Invoked when an item changes. Used for the JCheckBoxes.
public void itemStateChanged(ItemEvent e){ boolean state; if(e.getStateChange() == ItemEvent.SELECTED) state = true; else state = false; if(e.getSource() == monitoredBeaconZoneEditCheckBox_){ monitoredBeaconZoneEdit_ = state; } else if(e.getSource() == doMonitorBeaconsCheckBox_){ Vehicle.setBeaconMonitorZoneEnabled(state); updateBeaconInfo_ = state; } else if(e.getSource() == monitoredBeaconZoneShowCheckBox_){ Renderer.getInstance().setShowBeaconMonitorZone(state); Renderer.getInstance().ReRender(false, false); } else if(e.getSource() == autoUpdateStatisticsCheckBox_){ updateStatistics_ = state; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changed(Item itemChanged) {\n int childNumber = this.indexOf(itemChanged);\n if (childNumber != -1) {\n fireContentsChanged(this, childNumber, childNumber);\n }\n }", "@Override\r\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t}", "public void itemStateChanged(ItemEvent e)...
[ "0.71866167", "0.7106867", "0.7099548", "0.70824564", "0.7062353", "0.7041088", "0.7041088", "0.6984407", "0.69805044", "0.697104", "0.681754", "0.6753664", "0.6749195", "0.6746634", "0.6745965", "0.6741139", "0.6709651", "0.66759926", "0.66730565", "0.66322374", "0.6628845",...
0.6546262
25
Sets if this panel is currently active.
public boolean isActive(){ return active_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setActive() {\n\t\tactive = true;\n\t}", "public void setActive() {\n setState(true);\n }", "public void setActive( boolean tof ) {\n\t\tthis.active = tof;\n\t}", "public void setActive(boolean value) {\n this.active = value;\n }", "public void setActive(Boolean active) {\n\...
[ "0.74691516", "0.73906255", "0.71901244", "0.7167592", "0.71324795", "0.7107475", "0.70878375", "0.7077948", "0.70714885", "0.7024263", "0.6983734", "0.69783133", "0.6965695", "0.69565105", "0.69496465", "0.693341", "0.6907219", "0.68971604", "0.68971604", "0.68971604", "0.68...
0.68950135
20
Returns if editing of the monitored mix zone is enabled.
public boolean isInMonitoredMixZoneEditMode(){ if(active_ && monitoredBeaconZoneEdit_) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isPortalEditEnabled() {\n return portalEditEnabled;\n }", "protected boolean isEdit(){\n\t\treturn getArguments().getBoolean(ARG_KEY_IS_EDIT);\n\t}", "public boolean isDashboardEditEnabled() {\n return dashboardEditEnabled;\n }", "public final boolean isEdited(){\n\t\tretur...
[ "0.6672009", "0.6555752", "0.6446303", "0.6433858", "0.6401744", "0.6349665", "0.62851053", "0.62819976", "0.62766737", "0.6231679", "0.618976", "0.61455417", "0.6113705", "0.6044726", "0.5979253", "0.59678125", "0.5945242", "0.59258336", "0.59214926", "0.5873864", "0.5873846...
0.79638135
0
Sets if this panel is currently active
public void setActive(boolean active){ active_ = active; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setActive() {\n\t\tactive = true;\n\t}", "public void setActive() {\n setState(true);\n }", "public void setActive( boolean tof ) {\n\t\tthis.active = tof;\n\t}", "public void setActive(boolean value) {\n this.active = value;\n }", "public void setActive(Boolean active) {\n\...
[ "0.75711477", "0.7543183", "0.7239762", "0.71919423", "0.71577984", "0.71362454", "0.71101505", "0.7093195", "0.7086719", "0.7052918", "0.70232683", "0.70229214", "0.7006182", "0.6999653", "0.69549745", "0.69549745", "0.69549745", "0.6953562", "0.69533885", "0.69425946", "0.6...
0.7204452
3
Exchanges the coordinates of a mixzonelog with port numbers. Has to be done before using the loganalyzer!
public void cleanLogFile() throws IOException{ //begin with creation of new file JFileChooser fc = new JFileChooser(); //set directory and ".log" filter fc.setMultiSelectionEnabled(true); fc.setCurrentDirectory(new File(System.getProperty("user.dir"))); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); fc.setFileFilter(logFileFilter_); int status = fc.showDialog(this, Messages.getString("EditLogControlPanel.approveButton")); //the coordinates with a port class MixZoneCoordinate{ public int xCoordinate = -1; public int yCoordinate = -1; public int port = -1; public MixZoneCoordinate(int x,int y, int p){ xCoordinate = x; yCoordinate = y; port = p; } } //choose one or mor logs if(status == JFileChooser.APPROVE_OPTION){ File[] files = fc.getSelectedFiles(); for(File file:files){ ArrayList<MixZoneCoordinate> mixZoneCoordinateList = new ArrayList<MixZoneCoordinate>(); BufferedReader reader; FileWriter fstream = new FileWriter(file.getPath().substring(0, file.getPath().length() - 4) +"_cleaned.log"); BufferedWriter out = new BufferedWriter(fstream); try{ reader = new BufferedReader(new FileReader(file)); String line = reader.readLine(); boolean headerSeperator = true; ArrayList<String> savedLines = new ArrayList<String>(); while(line != null){ //read header completely if(line.length() >= 8 && line.substring(0, 8).equals("Mix-Zone")){ ArrayList<String> savedLines2 = new ArrayList<String>(); boolean saved = false; String[] lineSplitted = line.split(":"); if(savedLines.size() < 1){ savedLines2.add(line); saved = true; } for(String savedLine:savedLines){ if(!saved && Integer.parseInt(lineSplitted[2]) < Integer.parseInt(savedLine.split(":")[2])){ saved = true; savedLines2.add(line); } savedLines2.add(savedLine); } if(!saved)savedLines2.add(line); savedLines = savedLines2; } else{ if(headerSeperator){ String xArray[]; String yArray[]; String writeLine =""; //save all coordinates for(int j = 0; j < savedLines.size(); j=j+2){ xArray = savedLines.get(j).split(":"); yArray = savedLines.get(j+1).split(":"); writeLine = "Mix-Zone:" + xArray[1] + ":" + xArray[2] + ":" + xArray[3] + ":" + xArray[4]; for(int i = 5; i < xArray.length; i++) { writeLine += ":" + (i-4) + "=" + xArray[i] + "/" + yArray[i]; mixZoneCoordinateList.add(new MixZoneCoordinate(Integer.parseInt(xArray[i]), Integer.parseInt(yArray[i]), i-4)); } out.write(writeLine + "\n"); } out.write("*******************" + "\n"); headerSeperator=false; } int xCoord = -1; int yCoord = -1; String[] lineSplit = line.split(":"); if(lineSplit.length == 23){ xCoord = Integer.parseInt(lineSplit[20]); yCoord = Integer.parseInt(lineSplit[22]); } else break; //check which coordinate is which port and write the result to file for(MixZoneCoordinate c : mixZoneCoordinateList){ long dx = c.xCoordinate - xCoord; long dy = c.yCoordinate - yCoord; long distanceSquared = dx * dx + dy * dy; if(distanceSquared < 500000){ out.write(lineSplit[0] + ":" + lineSplit[1] + ":" + lineSplit[2] + ":" + lineSplit[3] + ":" + lineSplit[4] + ":" + lineSplit[5] + ":" + lineSplit[6] + ":" + lineSplit[7] + ":" + lineSplit[8] + ":" + lineSplit[9] + ":" + lineSplit[10] + ":" + lineSplit[11] + ":" + lineSplit[12] + ":" + lineSplit[13] + ":" + lineSplit[14] + ":" + lineSplit[15] + ":" + lineSplit[16] + ":" + lineSplit[17] + ":" + lineSplit[18] + ":port:" + c.port + "\n"); break; } } } line = reader.readLine(); } out.close(); } catch (FileNotFoundException e) { System.err.println("FileNotFoundException: " + e.getMessage()); } catch (IOException e) { System.err.println("Caught IOException: " + e.getMessage()); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ProxyLogger () {\n\tTimeZone tz = sdf.getTimeZone ();\n\tGregorianCalendar gc = new GregorianCalendar ();\n\tgc.setTime (new Date ());\n\toffset = tz.getOffset (gc.get (Calendar.ERA),\n\t\t\t gc.get (Calendar.YEAR),\n\t\t\t gc.get (Calendar.MONTH),\n\t\t\t gc.get (Calendar.DAY_OF_MONTH),\n...
[ "0.46213534", "0.45069015", "0.44330344", "0.44223988", "0.44136158", "0.44051936", "0.4376954", "0.43630806", "0.4342238", "0.43143773", "0.4301089", "0.4291635", "0.42894912", "0.42838743", "0.42449945", "0.42265698", "0.4204963", "0.41979975", "0.41877145", "0.4184688", "0...
0.41676393
21
Sums up the length of all the streets on the loaded map
public void calculateStreetLength(){ BigDecimal streetLength = BigDecimal.ZERO; BigDecimal streetLength_old = BigDecimal.ZERO; Region[][] regions = Map.getInstance().getRegions(); //iterate trough all regions and streets for(int i = 0; i < regions.length; i++){ for(int j = 0; j < regions[i].length; j++){ Street[] tmpStreets = regions[i][j].getStreets(); for(int k = 0; k < tmpStreets.length; k++){ streetLength_old = new BigDecimal(streetLength.toString()); streetLength = streetLength_old.add(BigDecimal.valueOf(tmpStreets[k].getLength())); } } } streetLength_old = new BigDecimal(streetLength.toString()); streetLength = streetLength_old.divide(new BigDecimal(100000)); JOptionPane.showMessageDialog(null, streetLength.toPlainString() + "km", "Information", JOptionPane.INFORMATION_MESSAGE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void calculateMapSize() {\n calculateMapSize(true);\n }", "public int total_maps() {\r\n\t\tcheck( 1 );\r\n\r\n\t\treturn total_maps;\r\n\t}", "public int getTotalMaps() {\r\n\t\treturn total_maps;\r\n\t}", "public int getRoadLength() {\n \t\treturn roadLength;\n \t}", "long getAllSize(fi...
[ "0.6508381", "0.63632226", "0.6180545", "0.590768", "0.5765047", "0.5661894", "0.56130093", "0.5558752", "0.5539041", "0.55112326", "0.5506701", "0.5488104", "0.547497", "0.5448371", "0.54432756", "0.54223615", "0.54124177", "0.5396845", "0.53527373", "0.53469473", "0.5343247...
0.77417684
0
Show the attack results on the map
public void showAdvancedLocationInformation(){ //begin with selection of file JFileChooser fc = new JFileChooser(); //set directory and ".log" filter fc.setCurrentDirectory(new File(System.getProperty("user.dir"))); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); fc.setFileFilter(logFileFilter_); int status = fc.showDialog(this, Messages.getString("EditLogControlPanel.approveButton")); HashMap<String,String> mixHashMap = new HashMap<String,String>(); HashMap<String,Integer> colors = new HashMap<String,Integer>(); ArrayList<String> locationInformation = new ArrayList<String>(); String logType = ""; if(status == JFileChooser.APPROVE_OPTION){ File file = fc.getSelectedFile().getAbsoluteFile(); BufferedReader reader; try{ reader = new BufferedReader(new FileReader(file)); String line = reader.readLine(); boolean headerSeperator = true; String data[]; //check if the log is a silent-period or a mix-zone log while(line != null){ data = line.split(":"); if(logType.equals("")){ if(line.length() >= 8 && line.substring(0, 8).equals("Mix-Zone")) logType = "Mix Zone"; else logType = "Silent Period"; } if(logType.equals("Mix Zone")){ if(line.length() >= 8 && line.substring(0, 8).equals("Mix-Zone")){ for(int i = 5; i < data.length; i++){ mixHashMap.put(data[2] + "-" + (i-4), data[i].split("=")[1].split("/")[0] + ":" + data[i].split("=")[1].split("/")[1]); } } else{ if(headerSeperator){ headerSeperator=false; line = reader.readLine(); data = line.split(":"); } if(colors.get(data[1] + "-" + data[2] + "-" + data[0]) == null) colors.put(data[1] + "-" + data[2] + "-" + data[0], new Integer(0)); colors.put(data[1] + "-" + data[2] + "-" + data[0], new Integer(colors.get(data[1] + "-" + data[2] + "-" + data[0]).intValue() + 1)); } } else{ if(headerSeperator){ headerSeperator=false; //skipping both header lines line = reader.readLine(); line = reader.readLine(); } locationInformation.add(line); } line = reader.readLine(); } } catch (FileNotFoundException e) { System.err.println("FileNotFoundException: " + e.getMessage()); } catch (IOException e) { System.err.println("Caught IOException: " + e.getMessage()); } //mix-zone-log if(logType.equals("Mix Zone")){ int red = 0; int green = 0; int counter = 0; //adds results to location information ArrayList. (Format: "port":"percent red":"percent green":"amount total") for(Entry<String, String> e : mixHashMap.entrySet()){ red = 0; green = 0; if(colors.get(e.getKey() + "-false") == null)green = 0; else green = colors.get(e.getKey() + "-false").intValue(); if(colors.get(e.getKey() + "-true") == null) red = 0; else red = colors.get(e.getKey() + "-true").intValue(); counter = counter + red + green; if((red + green) == 0) locationInformation.add(e.getValue() + ":" + 0 + ":" + 0 + ":" + 0); else locationInformation.add(e.getValue() + ":" + ((float)red/(red+green)) + ":" + ((float)green/(red+green)) + ":" + (red + green)); } Renderer.getInstance().setLocationInformationMix(locationInformation); Renderer.getInstance().setMixZoneAmount(counter); Renderer.getInstance().ReRender(true, true); } //silent-period-log else{ //adds results to location information ArrayList. (Format: "attack status":"x":"y") Renderer.getInstance().setLocationInformationSilentPeriod_(locationInformation); Renderer.getInstance().ReRender(true, true); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n Sys...
[ "0.6616395", "0.64233875", "0.63063025", "0.6294767", "0.6204799", "0.6169917", "0.61506814", "0.6112102", "0.6078331", "0.6065134", "0.5990424", "0.5965619", "0.59428537", "0.59054387", "0.5897645", "0.5889955", "0.5882474", "0.5836399", "0.5801062", "0.57980907", "0.5779484...
0.0
-1
the following methods are scripts and where used in the master thesis of andreas tomandl 2011. They are not part of the Simulator, but can be used to edit the data for gnuplot graphs Accumulates different versions of a scenario for a simple mixzone analysis
public float[] accumulateSimpleMixFiles(ArrayList<File> files){ float[] returnValue = new float[10]; float[] values = new float[10]; for(File file:files){ BufferedReader reader; try{ reader = new BufferedReader(new FileReader(file)); String line = reader.readLine(); while(line != null){ if(line.substring(0,5).equals("Total")){ String[] values2 = line.split(" "); for(int i = 2; i < values2.length; i++) values[i-2] += Float.valueOf(values2[i]); } line = reader.readLine(); } } catch (FileNotFoundException e) { System.err.println("FileNotFoundException: " + e.getMessage()); } catch (IOException e) { System.err.println("Caught IOException: " + e.getMessage()); } } for(int j = 0; j < values.length; j++) returnValue[j] = (float)values[j]/files.size(); return returnValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void processData() {\n\t\tString dirName = \"C:\\\\research_data\\\\mouse_human\\\\homo_b47_data\\\\\";\r\n\t//\tString GNF1H_fName = \"GNF1H_genes_chopped\";\r\n\t//\tString GNF1M_fName = \"GNF1M_genes_chopped\";\r\n\t\tString GNF1H_fName = \"GNF1H\";\r\n\t\tString GNF1M_fName = \"GNF1M\";\r\n\t\tSt...
[ "0.59389544", "0.592227", "0.58517796", "0.5844103", "0.5780704", "0.57499117", "0.5657287", "0.5610602", "0.5603899", "0.55460274", "0.5543183", "0.5520762", "0.55031276", "0.5497589", "0.54868263", "0.5482952", "0.54799104", "0.54742604", "0.5466208", "0.54534733", "0.54371...
0.0
-1
Accumulates different versions of a scenario for a simple silentperiod analysis
public float[] accumulateSimpleSilentPeriodFiles(ArrayList<File> files){ float[] values = new float[10]; float[] returnValue = new float[10]; for(File file:files){ BufferedReader reader; try{ reader = new BufferedReader(new FileReader(file)); String line = reader.readLine(); while(line != null){ if(!line.substring(0,1).equals("#")){ String[] values2 = line.split(" "); System.out.println(file.getAbsolutePath()); for(int i = 1; i < values2.length; i++) { System.out.println("+ " + values2[i]); values[i-1] += Float.valueOf(values2[i]); } } line = reader.readLine(); } } catch (FileNotFoundException e) { System.err.println("FileNotFoundException: " + e.getMessage()); } catch (IOException e) { System.err.println("Caught IOException: " + e.getMessage()); } } for(int j = 0; j < values.length; j++) if(values[j] != 0) returnValue[j] = (float)values[j]/files.size(); return returnValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void scenarioChanged();", "public void increaseScenarioCountBy(int amount) {\n this.scenarioCount += amount;\n }", "@Test\n public void testElementsTrackedIndividuallyForAStep() throws IOException {\n NameContext stepA = createStep(\"A\");\n NameContext stepB = createStep(\"B\");\n\n ...
[ "0.5500637", "0.54522836", "0.54033977", "0.53907907", "0.50674105", "0.50420254", "0.50146276", "0.49981177", "0.4984421", "0.49701515", "0.49630263", "0.49257213", "0.4925061", "0.49220383", "0.49176478", "0.4916391", "0.49064374", "0.48866653", "0.48475593", "0.48470616", ...
0.0
-1
Accumulates different versions of a scenario for a detailed analysis
public float[] accumulateDetailFiles(ArrayList<File> files){ float[] values = new float[100]; int counter = 0; for(File file:files){ System.out.println(file.getName()); counter = 0; BufferedReader reader; try{ reader = new BufferedReader(new FileReader(file)); String line = reader.readLine(); while(line != null){ if(!line.substring(0,1).equals("#")){ String[] values2 = line.split(" "); values[counter] += Float.valueOf(values2[values2.length-1]); counter++; } line = reader.readLine(); } } catch (FileNotFoundException e) { System.err.println("FileNotFoundException: " + e.getMessage()); } catch (IOException e) { System.err.println("Caught IOException: " + e.getMessage()); } } float[] returnValues = new float[counter]; for(int j = 0; j < returnValues.length; j++) returnValues[j] = ((float)values[j]/files.size()); return returnValues; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void increaseScenarioCountBy(int amount) {\n this.scenarioCount += amount;\n }", "List<Defect> analyze(StructuredScenario mainScenario, HashMap<String, List<StructuredScenario>> sequentiallyRelatedScenariosHashMap, HashMap<String, List<StructuredScenario>> nonSeqRelatedScenarioHashMap);", "pub...
[ "0.5643575", "0.5587937", "0.5578476", "0.556173", "0.54115355", "0.5290665", "0.52174526", "0.5081106", "0.5031122", "0.5025694", "0.49804777", "0.49409768", "0.49014515", "0.4882472", "0.4865858", "0.48548216", "0.48373663", "0.48256388", "0.48220462", "0.4818277", "0.48179...
0.0
-1
Gets the different versions of a szenario log (searches for _version1..., _version2...)
public ArrayList<File> getFileList(File file){ File dir = new File(file.getParent()); String filename = file.getName(); //get all files with the same beginning and end int index = filename.indexOf("Version"); String stringStart = filename.substring(0, index-1); ArrayList<File> files = new ArrayList<File>(); for(File f:dir.listFiles()){ if(f.getName().contains(stringStart))files.add(f); } return files; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Collection<String> getVersions();", "@Override\n\tpublic List<String> getAGBDifferencesForDemo(int sourceId, int version1, int version2) {\n\t\t\n\t\treadAllAGBVersionsOfSource(sourceId, version1, version2);\n\t\twriteSelectedVersionsOfSource(getSelectedVersion1(), getSelectedVersion2());\n\t\tcompareSelectedVer...
[ "0.5772165", "0.57062936", "0.56927025", "0.5578136", "0.5535781", "0.5497238", "0.5483892", "0.5456136", "0.540358", "0.538107", "0.531146", "0.5308572", "0.5223709", "0.52084297", "0.5202272", "0.51883113", "0.51815313", "0.5172619", "0.5172619", "0.5172619", "0.5172619", ...
0.0
-1
Reads detailed log files and calculates advanced information for diagrams
public void editDetailLogFiles(){ String filter1 = "_advanced_detail_analyzed"; String filter2 = "_standard_detail_analyzed"; //begin with creation of new file JFileChooser fc = new JFileChooser(); fc.setSize(2560, 1300); //set directory and ".log" filter fc.setMultiSelectionEnabled(true); fc.setCurrentDirectory(new File(System.getProperty("user.dir"))); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); int status = fc.showDialog(this, Messages.getString("EditLogControlPanel.approveButton")); if(status == JFileChooser.APPROVE_OPTION){ File[] tmpFiles = fc.getSelectedFiles(); for(File file:tmpFiles){ //get log names ArrayList<File> files = getFileList(file); for(File f:files){ if(f.getName().contains(filter1) || f.getName().contains(filter2)){ FileWriter fstream; try { if(!(new File(f.getParent() + "/corrected/")).exists()) (new File(f.getParent() + "/corrected/")).mkdir(); fstream = new FileWriter(f.getParent() + "/corrected/" + f.getName(), false); BufferedWriter out = new BufferedWriter(fstream); int vehiclesTotal = 0; String[] data; float[] tmpData = new float[100]; float[][] tmpData2 = new float[100][100]; int counter = 0; //read file BufferedReader reader; //get maximal vehicles count and calculates values of line try{ reader = new BufferedReader(new FileReader(f)); String line = reader.readLine(); while(line != null){ if(!line.substring(0, 1).equals("#") && !line.equals("")){ data = line.split(" "); for(int i = 1; i < data.length-1;i++){ tmpData[counter] += Integer.parseInt(data[i]); vehiclesTotal += Integer.parseInt(data[i]); tmpData2[counter][i-1] = Integer.parseInt(data[i]); } counter++; } else out.write(line + "\n"); line = reader.readLine(); } } catch (Exception e) { System.err.println("FileNotFoundException: " + e.getMessage()); } float tmpSum = 0; float vehiclesTotal2 = 0; for(int l = 0; l < counter;l++){ out.write("" + l); for(int j = 0; j < counter-1; j++) out.write(" " + (int)tmpData2[l][j]); if(l == 0){ out.write(" " + (float)(tmpData[l]/vehiclesTotal) + "\n"); } else if(l == 1){ tmpSum = 0; for(int i = l; i < counter; i++) tmpSum += tmpData[i]; out.write(" " + (float)(tmpSum/vehiclesTotal) + "\n"); } else{ tmpSum = 0; for(int i = l; i < counter; i++) tmpSum += tmpData[i]; vehiclesTotal2 = vehiclesTotal; for(int n = 0; n < (l-1);n++){ for(int o = 0; o < l;o++){ vehiclesTotal2 -= tmpData2[o][n]; } } out.write(" " + (float)(tmpSum/vehiclesTotal2) + "\n"); } } out.close(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void accumulateDetailedLogFiles(){\r\n\t\tString filter2 = \"_advanced_detail_analyzed\";\r\n\t\tString filter1 = \"_standard_detail_analyzed\";\r\n\r\n\t\tArrayList<File> files1 = new ArrayList<File>();\r\n\t\tArrayList<File> files2 = new ArrayList<File>();\r\n\t\t\r\n\t\t//begin with creation of new file\...
[ "0.6167472", "0.60713816", "0.5844027", "0.58291763", "0.5789016", "0.57419616", "0.5679094", "0.5677337", "0.5646388", "0.5613032", "0.56109565", "0.5574543", "0.55519783", "0.55500174", "0.544526", "0.54381466", "0.54380894", "0.5414982", "0.5404245", "0.5401602", "0.537803...
0.57135725
6
Opens log files and calculates data for diagram. More than one file can be opened. If there is more than one version (same scenario with new random vehicles) of the file opening one version is enough. The script will look for version1, version2, version3...
public void accumulateDetailedLogFiles(){ String filter2 = "_advanced_detail_analyzed"; String filter1 = "_standard_detail_analyzed"; ArrayList<File> files1 = new ArrayList<File>(); ArrayList<File> files2 = new ArrayList<File>(); //begin with creation of new file JFileChooser fc = new JFileChooser(); //set directory and ".log" filter fc.setMultiSelectionEnabled(true); fc.setCurrentDirectory(new File(System.getProperty("user.dir"))); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); int status = fc.showDialog(this, Messages.getString("EditLogControlPanel.approveButton")); if(status == JFileChooser.APPROVE_OPTION){ File[] tmpFiles = fc.getSelectedFiles(); //sort the files ArrayList<File> sortedFiles = new ArrayList<File>(); for(int i = 0; i < tmpFiles.length; i++){ if(sortedFiles.size() == 0) sortedFiles.add(tmpFiles[i]); else{ boolean sorted = false; for(File f:sortedFiles){ if(compare(tmpFiles[i].getName().split("_"),f.getName().split("_")) < 0) { sorted = true; sortedFiles.add(sortedFiles.indexOf(f), tmpFiles[i]); break; } } if(!sorted) sortedFiles.add(tmpFiles[i]); } } FileWriter fstream1; FileWriter fstream2; try { if(!(new File(tmpFiles[0].getParent() + "/diagramms/")).exists()) (new File(tmpFiles[0].getParent() + "/diagramms/")).mkdir(); fstream1 = new FileWriter(tmpFiles[0].getParent() + "/diagramms/standardAttackedDetailedDiagramm.txt", false); BufferedWriter out1 = new BufferedWriter(fstream1); fstream2 = new FileWriter(tmpFiles[0].getParent() + "/diagramms/advancedAttackedDetailedDiagramm.txt", false); BufferedWriter out2 = new BufferedWriter(fstream2); float[][] standardArray = new float[100][100]; float[][] advancedArray = new float[100][100]; for(int i = 0; i < standardArray.length; i++){ for(int j = 0; j < standardArray[0].length; j++){ standardArray[i][j] = -1; advancedArray[i][j] = -1; } } int counter = 0; for(File file:sortedFiles){ //get log names ArrayList<File> files = getFileList(file); files1 = new ArrayList<File>(); files2 = new ArrayList<File>(); for(File f:files){ if(f.getName().contains(filter1)) files1.add(f); else if(f.getName().contains(filter2)) files2.add(f); } float [] accu1 = accumulateDetailFiles(files1); float [] accu2 = accumulateDetailFiles(files2); for(int i = 0; i < accu1.length; i++){ standardArray[i][counter] = accu1[i]; } for(int i = 0; i < accu2.length; i++){ advancedArray[i][counter] = accu2[i]; } counter++; } for(int j = 0; j < tmpFiles.length; j++) { out1.write("1 "); out2.write("1 "); } out1.write("\n"); out2.write("\n"); for(int i = 1; i < standardArray.length; i++) { if(standardArray[i][0] == -1) break; for(int j = 0; j < tmpFiles.length; j++){ if(standardArray[i][j] == -1) out1.write("0 "); else out1.write(standardArray[i][j] + " "); } out1.write("\n"); } for(int i = 1; i < advancedArray.length; i++) { if(advancedArray[i][0] == -1) break; for(int j = 0; j < tmpFiles.length; j++){ if(advancedArray[i][j] == -1) out2.write("0 "); else out2.write(advancedArray[i][j] + " "); } out2.write("\n"); } out1.close(); out2.close(); } catch (Exception e) { e.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void editDetailLogFiles(){\r\n\t\tString filter1 = \"_advanced_detail_analyzed\";\r\n\t\tString filter2 = \"_standard_detail_analyzed\";\r\n\t\t\r\n\t\t//begin with creation of new file\r\n\t\tJFileChooser fc = new JFileChooser();\r\n\t\tfc.setSize(2560, 1300);\r\n\t\t//set directory and \".log\" filter\r\n...
[ "0.62620485", "0.6043244", "0.5929778", "0.59005135", "0.5886763", "0.5869183", "0.5845001", "0.57879424", "0.56088936", "0.5579339", "0.5559484", "0.54704", "0.5449072", "0.53760743", "0.5353619", "0.5339707", "0.5316159", "0.5312041", "0.5277647", "0.52510947", "0.5208145",...
0.58467114
6
Opens log files and calculates data for diagram. More than one file can be opened. If there is more than one version (same scenario with new random vehicles) of the file opening one version is enough. The script will look for version1, version2, version3...
public void accumulateSimpleLogFiles(String mode){ String filter2 = "_advanced_simple_analyzed"; String filter1 = "_standard_simple_analyzed"; ArrayList<File> files1 = new ArrayList<File>(); ArrayList<File> files2 = new ArrayList<File>(); //begin with creation of new file JFileChooser fc = new JFileChooser(); //set directory and ".log" filter fc.setMultiSelectionEnabled(true); fc.setCurrentDirectory(new File(System.getProperty("user.dir"))); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); int status = fc.showDialog(this, Messages.getString("EditLogControlPanel.approveButton")); if(status == JFileChooser.APPROVE_OPTION){ File[] tmpFiles = fc.getSelectedFiles(); //sort the files ArrayList<File> sortedFiles = new ArrayList<File>(); for(int i = 0; i < tmpFiles.length; i++){ if(sortedFiles.size() == 0) sortedFiles.add(tmpFiles[i]); else{ boolean sorted = false; for(File f:sortedFiles){ if(compare(tmpFiles[i].getName().split("_"),f.getName().split("_")) < 0) { sorted = true; sortedFiles.add(sortedFiles.indexOf(f), tmpFiles[i]); break; } } if(!sorted) sortedFiles.add(tmpFiles[i]); } } FileWriter fstream1; try { if(!(new File(tmpFiles[0].getParent() + "/diagramms/")).exists()) (new File(tmpFiles[0].getParent() + "/diagramms/")).mkdir(); fstream1 = new FileWriter(tmpFiles[0].getParent() + "/diagramms/simpleDiagramm.txt", false); BufferedWriter out = new BufferedWriter(fstream1); for(File file:sortedFiles){ //get log names ArrayList<File> files = getFileList(file); files1 = new ArrayList<File>(); files2 = new ArrayList<File>(); for(File f:files){ if(f.getName().contains(filter1)) files1.add(f); else if(f.getName().contains(filter2)) files2.add(f); } float [] accu1; float [] accu2; if(mode.equals("SP")){ accu1 = accumulateSimpleSilentPeriodFiles(files1); accu2 = accumulateSimpleSilentPeriodFiles(files2); } else{ accu1 = accumulateSimpleMixFiles(files1); accu2 = accumulateSimpleMixFiles(files2); } out.write("" + accu1[0]); for(int i = 0; i < accu2.length; i++){ if(accu2[i] != 0)out.write(" " + accu2[i]); } out.write("\n"); out.write("#"); for(int i = 0; i < accu1.length; i++){ if(accu1[i] != 0)out.write(" " + accu1[i]); } out.write("\n"); } out.close(); } catch (Exception e) { e.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void editDetailLogFiles(){\r\n\t\tString filter1 = \"_advanced_detail_analyzed\";\r\n\t\tString filter2 = \"_standard_detail_analyzed\";\r\n\t\t\r\n\t\t//begin with creation of new file\r\n\t\tJFileChooser fc = new JFileChooser();\r\n\t\tfc.setSize(2560, 1300);\r\n\t\t//set directory and \".log\" filter\r\n...
[ "0.6262247", "0.6043189", "0.5928493", "0.5900067", "0.5886943", "0.5868729", "0.5847825", "0.57875305", "0.56078166", "0.55787104", "0.5560205", "0.54704285", "0.54486126", "0.53765446", "0.53524476", "0.5340806", "0.53168243", "0.53127915", "0.52763975", "0.5250192", "0.520...
0.5845663
7
Yes it is a own compareTo method, because java is annoying!!!111einseins ;). Used to sort the files selected in the file chooser.
public int compare(String[] string1, String[] string2){ int returnValue = 0; int int1 = 0; int int2 = 0; for(int i = 0; i < string1.length; i++){ try{ int1 = Integer.parseInt(string1[i]); int2 = Integer.parseInt(string2[i]); if(int1 < int2) { returnValue = -1; break; } } catch(Exception e){} } return returnValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int compare(File f1, File f2) {\n\t\treturn f1.compareTo(f2);\n\t}", "public int compareTo (Object o) {\n return getFileName ().compareTo (((Page)o).getFileName());\n }", "@Override\n public int compareTo(final ModelFile o) {\n final ModelFile otherModelFile = ((ModelF...
[ "0.7815773", "0.75745255", "0.75473136", "0.7523659", "0.7406186", "0.71573645", "0.7134944", "0.70261115", "0.701757", "0.6962546", "0.68605816", "0.68188095", "0.6757396", "0.67248845", "0.66682076", "0.6648186", "0.66173434", "0.661675", "0.661675", "0.66125464", "0.654698...
0.0
-1
/ find max number of non overlapping intervals 1. sort array by end points 2. iterate intervals and keep updating endpoint
public int eraseOverlapIntervals(int[][] intervals) { Arrays.sort(intervals, new Comparator<int[]>() { public int compare(int[] a, int[] b) { return a[1] - b[1]; } }); int count = 1; int n = intervals.length; if (n == 0) return 0; int start = intervals[0][0]; int end = intervals[0][1]; for (int i = 1; i < n; ++i) { if (intervals[i][0] >= end) { end = intervals[i][1]; count++; } } return n - count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int maxEvents(int[] arrival, int[] duration) {\n int[][] events = new int[arrival.length][2];\n for (int i = 0; i < arrival.length; i++) {\n events[i] = new int[] {arrival[i], arrival[i] + duration[i]};\n }\n\n // events = [[1, 3], [3, 5], [3, 4], [5, 7], [7, 8]]\n // use start as a sw...
[ "0.69925517", "0.69491446", "0.6662467", "0.66174537", "0.6532261", "0.62695354", "0.62505126", "0.5931746", "0.5903215", "0.590317", "0.58547515", "0.5823956", "0.5823664", "0.5810885", "0.5782257", "0.5774526", "0.57714915", "0.5767522", "0.57555354", "0.5750687", "0.572731...
0.6120582
7
TODO Autogenerated method stub
public static void main(String[] args) { System.setProperty("webdriver.gecko.driver", "/Users/lakshmigopalakrishna/Downloads/geckodriver"); WebDriver driver = new FirefoxDriver(); GithubHomePage home = new GithubHomePage(driver); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); GithubLoginPage loginPage = home.Signin(); loginPage.login("gvtester5", "googletesting123"); }
{ "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
Initializes the SDK so that it can safely be accessed for mobile checkout functionality
public static void initialize( @NonNull MasterpassMerchantConfiguration masterpassMerchantConfiguration, final MasterpassInitCallback listener) { Set<CardType> allowedCardTypes = convertAllowedNetworkTypes(masterpassMerchantConfiguration.getAllowedNetworkTypes()); CommerceConfig commerceConfig = new CommerceConfig(masterpassMerchantConfiguration.getLocale(), masterpassMerchantConfiguration.getCheckoutId(), masterpassMerchantConfiguration.getEnvironment(), allowedCardTypes); commerceWebSdk = CommerceWebSdk.getInstance(); commerceWebSdk.initialize(masterpassMerchantConfiguration.getContext(), commerceConfig); contextWeakReference = new WeakReference<>(masterpassMerchantConfiguration.getContext()); listener.onInitSuccess(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\n\t\tservice = KCSClient.getInstance(this.getApplicationContext(), new KinveySettings(APP_KEY, APP_SECRET));\n\n BaseKinveyDataSource.setKinveyClient(service);\n }", "private void initializeHERESDK() {\n String accessKeyID = \"YOUR_ACCESS_KEY_ID\";\n String acc...
[ "0.6808909", "0.6798251", "0.6765277", "0.67472076", "0.66216075", "0.64403933", "0.6405868", "0.64016163", "0.63477594", "0.630318", "0.6286167", "0.6248783", "0.61444724", "0.60939515", "0.6062468", "0.60611445", "0.6054263", "0.60320854", "0.6012059", "0.60088146", "0.5997...
0.0
-1
Provides the ability to directly call a checkout which gives SRC experience
public static void masterpassCheckout( final MasterpassCheckoutCallback masterpassCheckoutCallback) { merchantInitiated = true; checkout(masterpassCheckoutCallback.getCheckoutRequest(), masterpassCheckoutCallback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkout() {\n\t}", "@Then(\"^click on checkout$\")\r\n\tpublic void click_on_checkout() throws Throwable {\n\t\tverbose(\"***********************************************************\");\r\n\t\tAssert.assertTrue(navigate_rsc.checkout());\r\n\t\tverbose(\"**********************************************...
[ "0.7630835", "0.67963684", "0.67801696", "0.6637814", "0.6519708", "0.63586104", "0.6353855", "0.61675984", "0.6088133", "0.6044454", "0.6023796", "0.6016145", "0.5910714", "0.58769333", "0.58695817", "0.5815531", "0.57829154", "0.5774308", "0.57610476", "0.57504755", "0.5719...
0.0
-1
This is legacy method. It is no longer supported. Invoking it will do nothing.
public static void resetDefaultWallet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Deprecated\n\tprivate void oldCode()\n\t{\n\t}", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oc...
[ "0.617608", "0.61097014", "0.6100092", "0.60385704", "0.6024186", "0.6001818", "0.59981626", "0.5927743", "0.5922243", "0.5922111", "0.5895712", "0.58793926", "0.583391", "0.58311665", "0.5810318", "0.5779344", "0.57633513", "0.57521677", "0.57459027", "0.5744805", "0.5741803...
0.0
-1
This is legacy method. It is no longer supported. Invoking it will do nothing.
public static void setUserDetails(UserSetup userSetup) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Deprecated\n\tprivate void oldCode()\n\t{\n\t}", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oc...
[ "0.617608", "0.61097014", "0.6100092", "0.60385704", "0.6024186", "0.6001818", "0.59981626", "0.5927743", "0.5922243", "0.5922111", "0.5895712", "0.58793926", "0.583391", "0.58311665", "0.5810318", "0.5779344", "0.57633513", "0.57521677", "0.57459027", "0.5744805", "0.5741803...
0.0
-1
long amount to double amount conversion
private static CheckoutRequest buildCheckoutRequest( MasterpassCheckoutRequest masterpassCheckoutRequest) { Amount amount = masterpassCheckoutRequest.getAmount(); return new CheckoutRequest.Builder().amount(getAmount(amount)) .currency(amount.getCurrencyCode()) .cartId(masterpassCheckoutRequest.getCartId()) .cvc2Support(masterpassCheckoutRequest.isCvc2support()) .shippingLocationProfile(masterpassCheckoutRequest.getShippingProfileId()) .suppress3ds(masterpassCheckoutRequest.isSuppress3Ds()) .suppressShippingAddress(!masterpassCheckoutRequest.isShippingRequired()) .validityPeriodMinutes(masterpassCheckoutRequest.getValidityPeriodMinutes()) .unpredictableNumber(masterpassCheckoutRequest.getTokenization() != null ? masterpassCheckoutRequest.getTokenization().getUnpredictableNumber() : null) .cryptoOptions(buildCryptoOptions(masterpassCheckoutRequest.getTokenization())) .build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double convert(double amount, Unit u);", "public static double longToDouble(long l) {\n return (double) l;\n }", "public static String formatDoubleAmount(double amount){\n NumberFormat formatter = new DecimalFormat(\"$#,###,##0.00;($#,###,##0.00)\");\n return formatter.format(amount); \n }", ...
[ "0.65930474", "0.64835775", "0.61075056", "0.60569537", "0.5991463", "0.59134984", "0.5884671", "0.58544534", "0.58323294", "0.58244455", "0.5824325", "0.57445145", "0.5725288", "0.5714758", "0.5700113", "0.5677395", "0.5663095", "0.56630397", "0.5661544", "0.5655431", "0.565...
0.0
-1
Since pairing flow supports are removed error will be returned in callback
private static void pairingError(MasterpassCheckoutCallback masterpassCheckoutCallback) { Log.e(TAG, "Pairing without checkout is no longer supported"); MasterpassError error = new MasterpassError(MasterpassError.ERROR_CODE_NOT_SUPPORTED, "Pairing without checkout is no longer supported"); masterpassCheckoutCallback.onCheckoutError(error); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onPairingComplete(int errorCode);", "void onPairingDeleted(int errorCode);", "public void processBlockwiseResponseTransferFailed() {\n //to be overridden by extending classes\n }", "public void communicationChannelBroken() {\n\n }", "@Override\n public void onFailure(Throwable ...
[ "0.7471839", "0.6479324", "0.5897468", "0.5283331", "0.5264124", "0.5191483", "0.5150559", "0.51435167", "0.5131541", "0.5109434", "0.5084679", "0.50823855", "0.50561976", "0.5043405", "0.50343776", "0.50111675", "0.5004371", "0.4991382", "0.49773777", "0.49711668", "0.496844...
0.6258332
2
end full constructor with call to super
public String Speak() { if(this.age < 2) { } //end if return "Woof"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "O() { super(null); }", "Constructor() {\r\n\t\t \r\n\t }", "public aed(World paramaqu)\r\n/* 9: */ {\r\n/* 10: 24 */ super(paramaqu);\r\n/* 11: */ }", "private BigB()\r\n{\tsuper();\t\r\n}", "public Constructor(){\n\t\t\n\t}", "public b3(){\n super();\n }", "public Supercar(...
[ "0.7013483", "0.67829573", "0.6749167", "0.66941935", "0.6688463", "0.6672032", "0.65042394", "0.64864963", "0.64797735", "0.6465593", "0.6457185", "0.64371926", "0.6437157", "0.64280945", "0.6427791", "0.6413442", "0.64125097", "0.63915855", "0.63764536", "0.6359656", "0.632...
0.0
-1
Config product with original price product gallery remove
public ConfigProductWithOriginalPriceDetailPage removeProductGalleryFromConfigProductWithOriginalPrice() { SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20); Actions actions = new Actions(driver); WebElement target = driver.findElement(By.xpath(firstImageElement)); actions.moveToElement(target).perform(); SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20); driver.findElement(By.xpath(removeElement)).click(); return new ConfigProductWithOriginalPriceDetailPage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConfigProductWithSpecialPriceDetailPage removeProductGalleryFromConfigProductWithSpecialPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElem...
[ "0.77434826", "0.688995", "0.68691367", "0.6863866", "0.67466944", "0.6053005", "0.5723471", "0.56694895", "0.56524193", "0.56138265", "0.55883944", "0.5513317", "0.5475261", "0.5390663", "0.53713715", "0.5349371", "0.53449225", "0.53281635", "0.5319538", "0.5300695", "0.5293...
0.7795926
0
Config product with special price product gallery remove
public ConfigProductWithSpecialPriceDetailPage removeProductGalleryFromConfigProductWithSpecialPrice() { SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20); Actions actions = new Actions(driver); WebElement target = driver.findElement(By.xpath(firstImageElement)); actions.moveToElement(target).perform(); SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20); driver.findElement(By.xpath(removeElement)).click(); return new ConfigProductWithSpecialPriceDetailPage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConfigProductWithOriginalPriceDetailPage removeProductGalleryFromConfigProductWithOriginalPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageEl...
[ "0.73805887", "0.69261014", "0.6779389", "0.6432561", "0.6429932", "0.5607918", "0.5585556", "0.55291975", "0.5488333", "0.5481862", "0.538472", "0.53659594", "0.5326749", "0.52611196", "0.5258958", "0.5233471", "0.5230592", "0.5225056", "0.5210235", "0.51948977", "0.5175941"...
0.77883744
0
Simple product 1 with original price product gallery remove
public SimpleProduct1WithOriginalPriceDetailPage removeProductGalleryFromSimpleProduct1tWithOriginalPrice() { SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20); Actions actions = new Actions(driver); WebElement target = driver.findElement(By.xpath(firstImageElement)); actions.moveToElement(target).perform(); SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20); driver.findElement(By.xpath(removeElement)).click(); return new SimpleProduct1WithOriginalPriceDetailPage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConfigProductWithOriginalPriceDetailPage removeProductGalleryFromConfigProductWithOriginalPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageEl...
[ "0.7736678", "0.76954794", "0.7691849", "0.76165277", "0.7597839", "0.62843764", "0.6257044", "0.6047608", "0.6018485", "0.5914087", "0.5884652", "0.5855789", "0.5808926", "0.57632035", "0.57565576", "0.5723248", "0.5717603", "0.5704973", "0.5685948", "0.56762415", "0.5664914...
0.7783207
0
Simple product 3 with special price product gallery remove
public SimpleProduct3WithSpecialPriceDetailPage removeProductGalleryFromSimpleProduct3tWithSpecialPrice() { SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20); Actions actions = new Actions(driver); WebElement target = driver.findElement(By.xpath(firstImageElement)); actions.moveToElement(target).perform(); SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20); driver.findElement(By.xpath(removeElement)).click(); return new SimpleProduct3WithSpecialPriceDetailPage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SimpleProductWithSpecialPriceDetailPage removeProductGalleryFromSimpleProducttWithSpecialPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageEle...
[ "0.7526851", "0.751998", "0.724194", "0.7181249", "0.7156948", "0.5984964", "0.59003145", "0.58762056", "0.58473545", "0.584355", "0.58283687", "0.5817557", "0.57655925", "0.5683988", "0.56626433", "0.5625463", "0.55236405", "0.5521503", "0.54992634", "0.5495181", "0.5491377"...
0.7598173
0