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 |
|---|---|---|---|---|---|---|
Costruttore utile all'inizializzazione dell'oggeto | public Scorers(String name, String position, Long numberOfGoals, String teamName) {
super();
this.name = name;
this.position = position;
this.numberOfGoals = numberOfGoals;
this.teamName = teamName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void inicializarOrdenDeCorte(OrdenDeCorte oc);",
"public void inicializar();",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\r\n\tpublic void iniciarSesion() {\n\t\tthis.contextoOrdenMenosUno = new Contexto();\r\n\t\t//Obtengo e... | [
"0.6800843",
"0.6755202",
"0.6710342",
"0.6632655",
"0.66104597",
"0.65599906",
"0.65309423",
"0.65168065",
"0.64834875",
"0.6465929",
"0.6386937",
"0.63804865",
"0.63770807",
"0.63211143",
"0.63001543",
"0.6284669",
"0.6284128",
"0.62752855",
"0.62751496",
"0.6237091",
"0.62... | 0.0 | -1 |
sets the type of the input range map produced by the local sampling expression and types of sort fields | @Override
public void infer(ILogicalExpression expr, IFunctionDescriptor fd, IVariableTypeEnvironment ctx,
CompilerProperties compilerProps) throws AlgebricksException {
AbstractFunctionCallExpression funExp = (AbstractFunctionCallExpression) expr;
Object[] sortingParameters = funExp.getOpaqueParameters();
fd.setImmutableStates(sortingParameters[0], sortingParameters[1], getArgumentsTypes(funExp, ctx));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setForPersistentMapping_Type(Type type) {\n this.type = type;\n }",
"void addPowertypeRange(Generalization powertypeRange);",
"public AdornmentTypeRange(final float min, final float max) {\n\t\tthis.maxFloat = max;\n\t\tthis.minFloat = min;\n\t}",
"public void setRange(Range range) { setRange(... | [
"0.54103106",
"0.53494877",
"0.5342942",
"0.5335299",
"0.53196466",
"0.5310586",
"0.5267865",
"0.5226114",
"0.52108353",
"0.51998836",
"0.5136639",
"0.51264346",
"0.51212966",
"0.51209956",
"0.51133734",
"0.51063037",
"0.5069584",
"0.5064427",
"0.5036729",
"0.5000942",
"0.498... | 0.0 | -1 |
An unformed report for a serious error This class is responsible for gathering error information before the report is packaged, which makes it ready to use and print error info Ususally this is injected as a Provider | @Injectable
@Providable
public interface CrashReport {
/**
* Appends the error information to the report
* @param error the error message
* @return the updated crash report
*/
public CrashReport withError(String error);
/**
* Comments for what might have caused the issue, or where it happened
* @param comment the comment to append
* @return the updated crash report
*/
public CrashReport withComment(String comment);
/**
* A message for the first line of the crash report
* @param message the message to add to the report
* @return the updated crash report
*/
public CrashReport withAdditionalMessage(String message);
/**
* The exception thrown before this crash, prints stack trace in report
* @param t the thrown exception
* @return the updated crash report
*/
public CrashReport withException(Throwable t);
/**
* Prepares this crash report for deployment
* @return The prepared crash report
*/
public PreparedCrashReport build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void reportError(String errorInfo, String errorDetails) {\n\t\t\r\n\t}",
"@Override\n\tpublic void report() throws Exception {\n\t\t\n\t}",
"protected void reportException(Throwable t) {\n }",
"public ReportException(String message) {\n\t\tsuper(message);\n\t}",
"protected void onU... | [
"0.63419366",
"0.5925325",
"0.59085816",
"0.57365173",
"0.566746",
"0.5640059",
"0.5598578",
"0.55397475",
"0.5514517",
"0.5493414",
"0.5492604",
"0.5474427",
"0.5431736",
"0.54215497",
"0.53899425",
"0.53728944",
"0.5372207",
"0.5362252",
"0.53328735",
"0.53327227",
"0.53236... | 0.57375056 | 3 |
Appends the error information to the report | public CrashReport withError(String error); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void reportError(String errorInfo, String errorDetails) {\n\t\t\r\n\t}",
"public void report_error(String message, Object info) {\n StringBuilder m = new StringBuilder(\"ERROR\");\n if (info instanceof java_cup.runtime.Symbol) {\n java_cup.runtime.Symbol s = ((java_... | [
"0.69245857",
"0.655526",
"0.6480382",
"0.64611465",
"0.6252059",
"0.623611",
"0.61970896",
"0.6187209",
"0.60841775",
"0.6074776",
"0.60686725",
"0.60615915",
"0.5983646",
"0.59791756",
"0.597594",
"0.5975031",
"0.59737074",
"0.59404546",
"0.5906036",
"0.5899857",
"0.5879506... | 0.61112195 | 8 |
Comments for what might have caused the issue, or where it happened | public CrashReport withComment(String comment); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void m9741j() throws cf {\r\n }",
"public final void mo51373a() {\n }",
"public final void mo91715d() {\n }",
"public static void debugInfo() { throw Extensions.todo(); }",
"private void m50366E() {\n }",
"public void mo21792Q() {\n }",
"public void inquiryError() {\n\t\t\n\t}... | [
"0.6442738",
"0.63694865",
"0.6146509",
"0.6009452",
"0.60027164",
"0.5996932",
"0.597889",
"0.5934006",
"0.59326965",
"0.5920025",
"0.5918303",
"0.58497864",
"0.58432287",
"0.5825987",
"0.58028114",
"0.57717973",
"0.5765778",
"0.5764825",
"0.5761207",
"0.5759919",
"0.5753346... | 0.0 | -1 |
A message for the first line of the crash report | public CrashReport withAdditionalMessage(String message); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void listCrashes(CommandSender sender, int first) {\r\n\t\tif (first < 0) {\r\n\t\t\tsender.sendMessage(\"§cThe first crash shown cannot be negative.\");\r\n\t\t}\r\n\t\tsender.sendMessage(\"§a-=[§3Crashes§a]=- §f(\" + first + \" to \" +\r\n\t\t\t\t(first + ChatPaginator.CLOSED_CHAT_PAGE_HEIGHT - 2 -... | [
"0.62347054",
"0.552408",
"0.5493934",
"0.54753435",
"0.5458406",
"0.5451963",
"0.54422444",
"0.5428299",
"0.541945",
"0.54052293",
"0.539738",
"0.5379182",
"0.5379164",
"0.5369283",
"0.53691196",
"0.53672636",
"0.5362956",
"0.53595126",
"0.5348555",
"0.5345737",
"0.5337344",... | 0.59917253 | 1 |
The exception thrown before this crash, prints stack trace in report | public CrashReport withException(Throwable t); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void reportException(Exception poException) {\n\t\tSystem.err.println(\"Caught exception : \" + poException.getClass().getName());\n\t\tSystem.err.println(\"Message : \" + poException.getMessage());\n\t\tSystem.err.println(\"Stack Trace : \");\n\t\tpoException.printStackTrace(System.er... | [
"0.67125434",
"0.6612844",
"0.660497",
"0.6585702",
"0.6518596",
"0.64624345",
"0.64566666",
"0.64551616",
"0.6418184",
"0.6418184",
"0.64036065",
"0.6323826",
"0.63201267",
"0.63101727",
"0.6293135",
"0.62615556",
"0.61966294",
"0.619499",
"0.6174827",
"0.6142126",
"0.614091... | 0.64523524 | 8 |
Prepares this crash report for deployment | public PreparedCrashReport build(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkForCrashes()\r\n {\r\n ReportManager.checkForCrashes(this);\r\n }",
"@Override\n public void prepare() {\n applicationDeployer.initialize();\n this.initialize();\n }",
"void setCrashResources(Bundle crashResources) {\r\n mCrashResources = crashResource... | [
"0.5461967",
"0.5414767",
"0.5295905",
"0.5260341",
"0.52333784",
"0.5228564",
"0.52262217",
"0.52227205",
"0.5211972",
"0.52008617",
"0.519618",
"0.51213807",
"0.5066247",
"0.50541437",
"0.5045332",
"0.50165623",
"0.49808782",
"0.49799138",
"0.4966934",
"0.4956306",
"0.49465... | 0.6352009 | 0 |
Department editDepartment(Department department, long id); | Boolean delete(HttpServletRequest request, Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void modifyDepartment(Department dRef);",
"@Override\n public Employee updateEmployeeDepartment(int employeeId, int departmentId) {\n return null;\n }",
"@Override\npublic int update(Department department) {\n\treturn departmentMapper.updateByPrimaryKey(department);\n}",
"@Modifying\n @Query(... | [
"0.7748454",
"0.7744691",
"0.75758755",
"0.7508354",
"0.7476422",
"0.72974956",
"0.7291348",
"0.72367",
"0.7208731",
"0.7167644",
"0.7141927",
"0.7131774",
"0.70856297",
"0.70845634",
"0.70412236",
"0.70135623",
"0.7011736",
"0.6996741",
"0.6969585",
"0.69563746",
"0.69464993... | 0.0 | -1 |
The constructor of ParseResumeLocation. Initially the value of bytePosition is zero and the allowResume is true. | public ParseResumeLocation(String filename, String input) {
setFilename(filename);
setInput(input);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Builder setRawResumeBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n rawResume_ = value;\n onChanged();\n return this;\n }",
"public Builder setRawResum... | [
"0.6474421",
"0.59495974",
"0.59078836",
"0.5591349",
"0.55859673",
"0.54802084",
"0.540724",
"0.5329101",
"0.52304685",
"0.52066535",
"0.51837444",
"0.51833874",
"0.51789266",
"0.5156244",
"0.5155384",
"0.5112319",
"0.50697327",
"0.49926898",
"0.49755087",
"0.49562126",
"0.4... | 0.6611152 | 0 |
Get the filename associated with the parser input. | public String getFilename() {
return filename;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getFilename(){\r\n Scanner scan = new Scanner(System.in);\r\n String input = scan.nextLine();\r\n return input;\r\n }",
"java.lang.String getFilename();",
"java.lang.String getFilename();",
"public String getInputFileName() \n\t{\n\t\treturn inputFileName;\n\t}",
"java... | [
"0.7184241",
"0.70450497",
"0.70450497",
"0.6933443",
"0.6797009",
"0.6797009",
"0.6797009",
"0.6797009",
"0.6797009",
"0.6797009",
"0.6797009",
"0.6797009",
"0.6797009",
"0.66509974",
"0.65087605",
"0.6474775",
"0.6440046",
"0.6440046",
"0.6440046",
"0.6440046",
"0.6440046",... | 0.0 | -1 |
Get the parser input. | public String getInput() {
return input;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Parser getParser() {\n\t\treturn myParser;\n\t}",
"CParser getParser();",
"public static Input getInput() {\r\n return input;\r\n }",
"public String getInputForName() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\treturn bufferedReader.readLine();\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSys... | [
"0.6475284",
"0.6451689",
"0.6449419",
"0.63576686",
"0.63287956",
"0.6303984",
"0.6264389",
"0.62462205",
"0.6239154",
"0.62068284",
"0.6205382",
"0.60545045",
"0.6042568",
"0.5996748",
"0.5983537",
"0.598146",
"0.59709376",
"0.5967943",
"0.59420455",
"0.5935404",
"0.5911605... | 0.6604479 | 0 |
Get a position which indicates the beginning position of the not token input. | public int getBytePosition() {
return bytePosition;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic int getStartOffset() {\n\t\treturn 0;\n\t}",
"private int findTokenStart() {\n\n\t\tint tokenStart = NOTOKENFOUND;\n\t\t//find starting position of token\n\t\twhile ( tokenStart == NOTOKENFOUND)\n\t\t{\n\t\t\t//empty line, but more lines to read\n\t\t\tif (line.length() == 0 && s.hasNextLine(... | [
"0.67318183",
"0.66800815",
"0.65470606",
"0.6494032",
"0.64702487",
"0.63990325",
"0.6354847",
"0.6341927",
"0.63231087",
"0.6307365",
"0.6301789",
"0.6297225",
"0.6292638",
"0.6289808",
"0.627102",
"0.62656033",
"0.6234008",
"0.62317723",
"0.62301385",
"0.6195374",
"0.61947... | 0.0 | -1 |
Set the position which indicates the beginning position of the not token input. | public void setBytePosition(int bytePosition) {
this.bytePosition = bytePosition;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void tokenStart() {\n tokenStartIndex = zzStartRead;\n }",
"public void reset(BacktrackingTokenizerMark mark) {\n\t\tposition = mark.getPosition(tokens);\n\t}",
"private final void yyResetPosition() {\n zzAtBOL = true;\n zzAtEOF = false;\n zzCurrentPos = 0;\n zzMarkedPos = 0;\n ... | [
"0.65914005",
"0.6417085",
"0.64037484",
"0.639327",
"0.63835186",
"0.62563187",
"0.6172147",
"0.6126026",
"0.61242115",
"0.609368",
"0.60918826",
"0.6071623",
"0.60696405",
"0.6043371",
"0.60405034",
"0.59974813",
"0.5987362",
"0.5986632",
"0.59740674",
"0.59708583",
"0.5965... | 0.0 | -1 |
This method initializes jPanel | private JPanel getJPanel(String s) {
if (jPanel == null) {
final GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
gridBagConstraints1.gridx = 0; // Generated
gridBagConstraints1.fill = java.awt.GridBagConstraints.BOTH; // Generated
gridBagConstraints1.gridy = 1; // Generated
final GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; // Generated
gridBagConstraints.gridy = 0; // Generated
gridBagConstraints.weightx = 1.0; // Generated
gridBagConstraints.weighty = 1.0; // Generated
gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); // Generated
gridBagConstraints.gridx = 0; // Generated
jPanel = new JPanel();
jPanel.setLayout(new GridBagLayout()); // Generated
jPanel.add(getJScrollPane(s), gridBagConstraints); // Generated
jPanel.add(getButtonPanel(), gridBagConstraints1);
}
return jPanel;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initPanel() {\n\t\tthis.panel = new JPanel();\n\t\tthis.panel.setBounds(5, 5, 130, 20);\n\t\tthis.panel.setLayout(null); \n\n\t}",
"public NewJPanel() {\n initComponents();\n }",
"public NewJPanel() {\n initComponents();\n }",
"private void initComponents() {\r\n\r\n ... | [
"0.7945597",
"0.7690438",
"0.7690438",
"0.76751626",
"0.7653176",
"0.7649254",
"0.74761856",
"0.7464825",
"0.73105556",
"0.72757375",
"0.7228872",
"0.7217481",
"0.718531",
"0.7171886",
"0.7130567",
"0.7124273",
"0.71133393",
"0.7104561",
"0.7088634",
"0.7076967",
"0.706594",
... | 0.0 | -1 |
This method initializes jScrollPane | private JScrollPane getJScrollPane(String s) {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setPreferredSize(new java.awt.Dimension(600, 200)); // Generated
jScrollPane.setViewportView(getJTextPane(s)); // Generated
}
return jScrollPane;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initScrollPane() {\n\n MyScrollPane = new JScrollPane(MyTextArea);\n super.addCenter(MyScrollPane);\n\n }",
"private void initialize() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setSize(300, 200);\n\t\tthis.add(getJScrollPane(), java.awt.BorderLayout.CENTER);\n\t}",
"public void i... | [
"0.8159628",
"0.8062289",
"0.7897385",
"0.78071505",
"0.77783895",
"0.7508742",
"0.74467057",
"0.74389315",
"0.74032384",
"0.7399273",
"0.7281595",
"0.72806597",
"0.7027388",
"0.6922608",
"0.6898047",
"0.6893452",
"0.68711406",
"0.6857318",
"0.682083",
"0.68090767",
"0.678951... | 0.6352661 | 74 |
This method initializes jTextArea | private JTextPane getJTextPane(String s) {
if (jTextPane == null) {
jTextPane = new JTextPane();
final StyledDocument doc = jTextPane.getStyledDocument();
// Set alignment to be centered for all paragraphs
final MutableAttributeSet standard = new SimpleAttributeSet();
StyleConstants.setAlignment(standard, StyleConstants.ALIGN_CENTER);
doc.setParagraphAttributes(0, 0, standard, true);
final MutableAttributeSet keyWord = new SimpleAttributeSet();
StyleConstants.setForeground(keyWord, Color.red);
StyleConstants.setFontFamily(keyWord, "arial");
StyleConstants.setFontSize(keyWord, 12);
StyleConstants.setBold(keyWord, true);
jTextPane.setText(s);
// Highlight some keywords
doc.setCharacterAttributes(0, s.length(), keyWord, false);
jTextPane.setEditable(false);
}
return jTextPane;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void init(RichTextArea textArea, Config config);",
"private void setupTextArea() {\n\t\tcourseInfo = new JTextPane();\n\t\tinfoScrollPane = new JScrollPane(courseInfo);\n\t\tinfoScrollPane.setPreferredSize(new Dimension(350, 175));\n\t\tcourseInfo.setEditable(false);\n\t\tdisplay.add(infoScrollPane);\n\t}",
"p... | [
"0.780365",
"0.76378614",
"0.74114007",
"0.7370619",
"0.72902566",
"0.7215291",
"0.71703875",
"0.70695376",
"0.7044251",
"0.70259684",
"0.69878846",
"0.6985574",
"0.6887758",
"0.6865586",
"0.685623",
"0.68490547",
"0.6809367",
"0.67957145",
"0.6793258",
"0.6789865",
"0.668512... | 0.0 | -1 |
Primary interface for sending email notifications of activity against tickets. | public interface NotificationManager {
void sendTicketCreateNotification(Ticket ticket);
void sendTicketChangeNotification(TicketChange ticketChange);
void sendCommentNotification(Comment comment);
void sendAttachmentNotification(Attachment attachment);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sendEmailToSubscriberForHealthTips() {\n\n\n\n }",
"public interface MailService {\n\n void sendActivationMail(String usernameToSend, String emailAdress);\n\n void sendNotification(String username, String email, String message);\n \n void sendSeatConfirmingMail(String username, String... | [
"0.7113091",
"0.6695039",
"0.6506407",
"0.6412144",
"0.6376892",
"0.6367859",
"0.628007",
"0.62059426",
"0.61818194",
"0.6082467",
"0.6081351",
"0.6007276",
"0.598158",
"0.5955817",
"0.59394073",
"0.5923706",
"0.5887761",
"0.5861328",
"0.5858101",
"0.5826027",
"0.5820632",
... | 0.6424727 | 3 |
TODO Autogenerated method stub | @Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
Log.i(LOGTAG,"item "+arg2+" clicked");
User u=(User)arg0.getAdapter().getItem(arg2);
if(u!=null&&u.getName()!=null){
Intent intent=new Intent(ContactActivity.this,ChatsActivity.class);
Bundle bundle=ContactActivity.this.getIntent().getExtras();
bundle.putString("recipient", u.getName());
intent.putExtras(bundle);
// startActivity(intent);
//返回聊天
setResult(RESULT_OK,intent);
ContactActivity.this.finish();
}else{
Util.alert(ContactActivity.this, "该用户无效,或无法启动会话");
}
} | {
"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 |
Register a UiAutomation. Only one may be registered at a time. | void registerUiTestAutomationServiceLocked(IBinder owner,
IAccessibilityServiceClient serviceClient,
Context context, AccessibilityServiceInfo accessibilityServiceInfo,
int id, Handler mainHandler,
AccessibilityManagerService.SecurityPolicy securityPolicy,
AbstractAccessibilityServiceConnection.SystemSupport systemSupport,
WindowManagerInternal windowManagerInternal,
GlobalActionPerformer globalActionPerfomer, int flags) {
synchronized (mLock) {
accessibilityServiceInfo.setComponentName(COMPONENT_NAME);
if (mUiAutomationService != null) {
throw new IllegalStateException("UiAutomationService " + serviceClient
+ "already registered!");
}
try {
owner.linkToDeath(mUiAutomationServiceOwnerDeathRecipient, 0);
} catch (RemoteException re) {
Slog.e(LOG_TAG, "Couldn't register for the death of a UiTestAutomationService!",
re);
return;
}
mSystemSupport = systemSupport;
mUiAutomationService = new UiAutomationService(context, accessibilityServiceInfo, id,
mainHandler, mLock, securityPolicy, systemSupport, windowManagerInternal,
globalActionPerfomer);
mUiAutomationServiceOwner = owner;
mUiAutomationFlags = flags;
mUiAutomationServiceInfo = accessibilityServiceInfo;
mUiAutomationService.mServiceInterface = serviceClient;
mUiAutomationService.onAdded();
try {
mUiAutomationService.mServiceInterface.asBinder().linkToDeath(mUiAutomationService,
0);
} catch (RemoteException re) {
Slog.e(LOG_TAG, "Failed registering death link: " + re);
destroyUiAutomationService();
return;
}
mUiAutomationService.connectServiceUnknownThread();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void registerUI(PaletteUI ui){\n pUI = ui;\n }",
"private void registerUiNode() {\n }",
"public void registerGui()\n {\n }",
"public void registerUI(ColorMixerUI ui){\n cmUI = ui;\n }",
"public void registerUI(ColorPickerUI ui){\n cpUI = ui;\n }",
"pu... | [
"0.62087756",
"0.6118187",
"0.61181563",
"0.56053156",
"0.55272996",
"0.54426354",
"0.5395451",
"0.5365406",
"0.52882826",
"0.5253428",
"0.5171126",
"0.5161561",
"0.51190025",
"0.50552726",
"0.5012201",
"0.4996775",
"0.49905452",
"0.49718377",
"0.4971498",
"0.49614888",
"0.49... | 0.56975937 | 3 |
This needs to be done on the main thread | void connectServiceUnknownThread() {
mMainHandler.post(() -> {
try {
final IAccessibilityServiceClient serviceInterface;
final IBinder service;
synchronized (mLock) {
serviceInterface = mServiceInterface;
mService = (serviceInterface == null) ? null : mServiceInterface.asBinder();
service = mService;
}
// If the serviceInterface is null, the UiAutomation has been shut down on
// another thread.
if (serviceInterface != null) {
service.linkToDeath(this, 0);
serviceInterface.init(this, mId, mOverlayWindowToken);
}
} catch (RemoteException re) {
Slog.w(LOG_TAG, "Error initialized connection", re);
destroyUiAutomationService();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@... | [
"0.7115807",
"0.7115807",
"0.71126306",
"0.69988185",
"0.69988185",
"0.693406",
"0.67738056",
"0.67738056",
"0.67701536",
"0.67701536",
"0.67701536",
"0.67664695",
"0.67664695",
"0.67664695",
"0.67664695",
"0.67664695",
"0.67664695",
"0.67664695",
"0.67433757",
"0.67433757",
... | 0.0 | -1 |
Allow UiAutomation to work for any user | @Override
protected boolean isCalledForCurrentUserLocked() {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void allow_Me_To_App(){\n\ttry{\n\tdriver.findElement(clickonOkButton).click();\n\tdriver.findElement(clickOn1stAllowButton).click();\n\tdriver.findElement(clickon2ndAllowButton).click();\n\tdriver.findElement(clickon3rdAllowButton).click();\n\tReusableMethod.waitForPageToLoad(MobileBy.AndroidUIAutomator(\"... | [
"0.63312757",
"0.5716476",
"0.5710193",
"0.5707942",
"0.56955206",
"0.5621123",
"0.5566844",
"0.55556804",
"0.5542641",
"0.5520895",
"0.55019814",
"0.5484429",
"0.54617816",
"0.54224974",
"0.5414367",
"0.53959453",
"0.5369499",
"0.53461844",
"0.5339543",
"0.5335411",
"0.53286... | 0.0 | -1 |
Since this isn't really an accessibility service, several methods are just stubbed here. | @Override
public boolean setSoftKeyboardShowMode(int mode) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static AccessibilityNodeInfo obtain() {\n/* 1814 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\n public void onAccessibilityEvent(AccessibilityEvent event) {\n }",
"public AccessibilityNodeInfo focusSearch(int direction) {\n/* 135 */ throw new RuntimeException(\"S... | [
"0.6495663",
"0.6474324",
"0.6431051",
"0.6344944",
"0.6227015",
"0.6165611",
"0.61333424",
"0.6119376",
"0.6091142",
"0.6027542",
"0.60046613",
"0.5969367",
"0.59689397",
"0.5952297",
"0.59300184",
"0.5906224",
"0.5894768",
"0.5890973",
"0.5860572",
"0.58593446",
"0.5829043"... | 0.0 | -1 |
The concept name for the keyword in the concept_group. string name = 1; | java.lang.String getName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Concept getConceptName();",
"String getConcept();",
"public Concept nameToConcept(String name) {\r\n return concepts.get(name);\r\n }",
"@XmlElement\n private String getConceptPreferredName() {\n return concept != null ? concept.getDefaultPreferredName() : \"\";\n }",
"@SuppressWarnings(\"un... | [
"0.77824587",
"0.67850536",
"0.6630149",
"0.6617661",
"0.65832174",
"0.6576959",
"0.6570138",
"0.6414722",
"0.62951905",
"0.6231228",
"0.605853",
"0.60121673",
"0.6002541",
"0.58576715",
"0.5855141",
"0.5852178",
"0.5832721",
"0.57961875",
"0.57839066",
"0.5782643",
"0.578115... | 0.58969975 | 56 |
The concept name for the keyword in the concept_group. string name = 1; | com.google.protobuf.ByteString
getNameBytes(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Concept getConceptName();",
"String getConcept();",
"public Concept nameToConcept(String name) {\r\n return concepts.get(name);\r\n }",
"@XmlElement\n private String getConceptPreferredName() {\n return concept != null ? concept.getDefaultPreferredName() : \"\";\n }",
"@SuppressWarnings(\"un... | [
"0.7781151",
"0.67829543",
"0.6630408",
"0.6616563",
"0.65831035",
"0.6576845",
"0.6569152",
"0.64132756",
"0.629589",
"0.62307674",
"0.60580885",
"0.6011148",
"0.6000538",
"0.5896075",
"0.5896075",
"0.5896075",
"0.5896075",
"0.5896075",
"0.5896075",
"0.5896075",
"0.5896075",... | 0.0 | -1 |
The concept group of the concept details. .google.ads.googleads.v13.common.ConceptGroup concept_group = 2; | boolean hasConceptGroup(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.google.ads.googleads.v13.common.ConceptGroup getConceptGroup();",
"com.google.ads.googleads.v13.common.ConceptGroupOrBuilder getConceptGroupOrBuilder();",
"public String getConcept() {\n\t\treturn concept;\n\t}",
"public String getGroup() {\n return group;\n }",
"public String getGroup() {\n ... | [
"0.8515323",
"0.8340513",
"0.5964995",
"0.5690563",
"0.5690563",
"0.5669817",
"0.5669817",
"0.5598293",
"0.55657196",
"0.55657196",
"0.5563736",
"0.55577534",
"0.544883",
"0.5375756",
"0.53665465",
"0.5349877",
"0.5321212",
"0.5297817",
"0.5291809",
"0.5276896",
"0.5274066",
... | 0.607236 | 2 |
The concept group of the concept details. .google.ads.googleads.v13.common.ConceptGroup concept_group = 2; | com.google.ads.googleads.v13.common.ConceptGroup getConceptGroup(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.google.ads.googleads.v13.common.ConceptGroupOrBuilder getConceptGroupOrBuilder();",
"boolean hasConceptGroup();",
"public String getConcept() {\n\t\treturn concept;\n\t}",
"public String getGroup() {\n return group;\n }",
"public String getGroup() {\n return group;\n }",
"public S... | [
"0.8340974",
"0.60709554",
"0.5963886",
"0.56912446",
"0.56912446",
"0.5670228",
"0.5670228",
"0.5598972",
"0.5564952",
"0.556402",
"0.556402",
"0.5558218",
"0.54473156",
"0.5376056",
"0.53672445",
"0.5350741",
"0.5321762",
"0.52988774",
"0.5292249",
"0.5278225",
"0.52762294"... | 0.851693 | 0 |
The concept group of the concept details. .google.ads.googleads.v13.common.ConceptGroup concept_group = 2; | com.google.ads.googleads.v13.common.ConceptGroupOrBuilder getConceptGroupOrBuilder(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.google.ads.googleads.v13.common.ConceptGroup getConceptGroup();",
"boolean hasConceptGroup();",
"public String getConcept() {\n\t\treturn concept;\n\t}",
"public String getGroup() {\n return group;\n }",
"public String getGroup() {\n return group;\n }",
"public String getGroup ()\... | [
"0.85160106",
"0.60719955",
"0.59623325",
"0.56905824",
"0.56905824",
"0.5669448",
"0.5669448",
"0.55982834",
"0.5563905",
"0.55622953",
"0.55622953",
"0.5557589",
"0.5448411",
"0.537579",
"0.53666574",
"0.5349785",
"0.5321032",
"0.52982897",
"0.529306",
"0.5277574",
"0.52730... | 0.83418274 | 1 |
GitFollowing to make calls to GitHub API to access a given user's following. | public interface GitFollowing {
/**
* Get calls to access following.
*
* @param user the given user's name.
* @return a list of UserFollowing objects.
*/
@GET("/users/{user}/following")
Call<List<UserFollowing>> getUserFollowing(@Path("user") String user);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<User> getFollowingForUser(User user);",
"public void setFollowing(String following) {\n this.following = following;\n }",
"@GET(\"/users/{user}/following\")\n Call<List<UserFollowing>> getUserFollowing(@Path(\"user\") String user);",
"public void follow(int followerId, int followeeId) {\n\n... | [
"0.6664561",
"0.66629726",
"0.6471258",
"0.63057274",
"0.6275155",
"0.6136478",
"0.60214674",
"0.6006267",
"0.6006081",
"0.60032314",
"0.5953483",
"0.59321207",
"0.58774316",
"0.58733356",
"0.5842903",
"0.5823635",
"0.5797341",
"0.57545",
"0.575383",
"0.5723701",
"0.5717466",... | 0.6753399 | 0 |
Get calls to access following. | @GET("/users/{user}/following")
Call<List<UserFollowing>> getUserFollowing(@Path("user") String user); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<User> getFollowingForUser(User user);",
"@Override\n\tpublic List<User> getFollowers() throws Exception {\n\t\treturn null;\n\t}",
"public ArrayList<Following> getFollowing(){\n return following_list;\n }",
"List<User> getFollowersForUser(User user);",
"public String getFollowing() {\n ... | [
"0.63744277",
"0.6264221",
"0.6224696",
"0.62064487",
"0.6195402",
"0.61464834",
"0.6068548",
"0.6050696",
"0.5965018",
"0.5954906",
"0.59444076",
"0.59065914",
"0.5873261",
"0.58686537",
"0.58643883",
"0.5850424",
"0.58481234",
"0.5832056",
"0.58209765",
"0.571817",
"0.56618... | 0.6520011 | 0 |
/ should be overriden by subclasses | protected FacetsConfig configFacets () {
return new FacetsConfig ();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t... | [
"0.6724696",
"0.66736096",
"0.66639763",
"0.66453063",
"0.65501446",
"0.6536419",
"0.6467339",
"0.64206195",
"0.6383763",
"0.6368979",
"0.6364924",
"0.6321645",
"0.6321645",
"0.6262112",
"0.6257294",
"0.6257294",
"0.62341577",
"0.62125677",
"0.6194737",
"0.6191372",
"0.617754... | 0.0 | -1 |
get device mac address | @Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
String in =((TextView) view).getText().toString();
String ad=in.substring((in.length())-17);
Intent intent= new Intent(MainActivity.this,Connect.class);
//new activity will recieve that
intent.putExtra(EXTRA_ADDRESS,ad);
//Bundle b= new Bundle();
//b.putString("name","sara");
//intent.putExtras(b);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getMac(){\n WifiManager manager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);\n WifiInfo info = manager.getConnectionInfo();\n return info.getMacAddress();\n }",
"private static String getMacAddress(){\n\t\ttry {\n\t\t\t//getting har... | [
"0.8205361",
"0.8027389",
"0.7975654",
"0.796865",
"0.7942532",
"0.7922857",
"0.79169333",
"0.78511494",
"0.78214663",
"0.78056604",
"0.78056604",
"0.7774924",
"0.77556264",
"0.7730138",
"0.771026",
"0.7709537",
"0.769247",
"0.7472663",
"0.73388255",
"0.72915244",
"0.72669977... | 0.0 | -1 |
// WORLD NAME // | public static String worldNameFromObject(Object o)
{
if (o instanceof String)
{
String string = (String)o;
if (MUtil.isUuid(string))
{
String ret = worldNameViaPsMixin(string);
if (ret != null) return ret;
}
return string;
}
if (o instanceof PS) return ((PS)o).getWorld();
World world = worldFromObject(o);
if (world != null) return world.getName();
String ret = worldNameViaPsMixin(o);
if (ret != null) return ret;
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String simpleName();",
"public static String name(){\n return \"10.Schneiderman.Lorenzo\"; \n }",
"String name();",
"String name();",
"String name();",
"String name();",
"String name();",
"String name();",
"String name();",
"String name();",
"String name();",
"String name();",
"String n... | [
"0.70379037",
"0.703699",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"0.6978332",
"... | 0.0 | -1 |
Constructs an object mapper without a type converter. | public ObjectMapper() {
this.typeConverter = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ObjectMapper(TypeConverter typeConverter) {\n this.typeConverter = typeConverter;\n }",
"private static <T extends ObjectMapper> T initializeObjectMapper(T mapper) {\n mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)\n .configure(SerializationFeature.... | [
"0.62564874",
"0.622429",
"0.61870426",
"0.6100861",
"0.6033974",
"0.5972082",
"0.59188133",
"0.5917875",
"0.5849019",
"0.58007956",
"0.57815814",
"0.5761262",
"0.57234794",
"0.56905395",
"0.5675245",
"0.5664533",
"0.5659378",
"0.5629332",
"0.55586874",
"0.5554223",
"0.554111... | 0.7185452 | 0 |
Constructs an object mapper with the given type converter. | public ObjectMapper(TypeConverter typeConverter) {
this.typeConverter = typeConverter;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected TypeConverter createTypeConverter() {\n return new DefaultTypeConverter(getInjector());\n }",
"public BeanMapHandler(Class<V> type, RowProcessor convert) {\n this(type, convert, 1, null);\n }",
"public ObjectMapper() {\n this.typeConverter = null;\n }",
"public interfa... | [
"0.6449078",
"0.6224802",
"0.60202336",
"0.60086346",
"0.58172154",
"0.57655406",
"0.5622516",
"0.5609274",
"0.5601305",
"0.5587742",
"0.557968",
"0.5535298",
"0.5532143",
"0.54568744",
"0.54425514",
"0.5442463",
"0.5398915",
"0.5380018",
"0.53650784",
"0.5350286",
"0.533297"... | 0.7994643 | 0 |
Read JSON value and map it into an object of the given type. | public <V> V readValue(String jsonString, Type valueType) throws JsonException {
try (StringReader reader = new StringReader(jsonString)) {
return readValue(reader, valueType);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"<T> T fromJson(String source, JavaType type);",
"<T> T fromJson(String source, Class<T> type);",
"<T> T fromJson(String json, Class<T> type);",
"public static <T> T mapJsonToObject(String json, Class<T> classType) {\n\t\tT obj = null;\n\t\tif (StringUtils.isBlank(json)) {\n\t\t\treturn null;\n\t\t}\n\t\ttry ... | [
"0.73864627",
"0.70681876",
"0.6901345",
"0.67612886",
"0.6753301",
"0.66382295",
"0.6597063",
"0.65830964",
"0.6563663",
"0.6529815",
"0.6509883",
"0.6478661",
"0.6436562",
"0.64305663",
"0.6398326",
"0.6373343",
"0.6336088",
"0.6294468",
"0.6228407",
"0.6188921",
"0.6137609... | 0.612104 | 23 |
Read JSON value from the reader and map it into an object of the given type. | public <V> V readValue(Reader reader, Type valueType) throws JsonException {
try (JsonReader jsonReader = Json.createReader(reader)) {
return toJavaObject(jsonReader.readValue(), valueType);
} catch (JsonException e) {
throw e;
} catch (Exception e) {
throw new JsonException("Unable to read value from json", e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"<T> T fromJson(String source, JavaType type);",
"public static <T> T fromJson(Reader readerFile, Class<T> valueType) {\n\t\tif(gson == null) {\n\t\t\tgson = new Gson();\n\t\t}\n\t\treturn gson.fromJson(readerFile, valueType);\n\t}",
"public Object parseAndClose(Reader reader, Type dataType) throws IOException ... | [
"0.684728",
"0.6690066",
"0.6621978",
"0.66035",
"0.6582257",
"0.65447265",
"0.63879496",
"0.6285414",
"0.6230124",
"0.6164912",
"0.61524814",
"0.6144247",
"0.61058253",
"0.6102791",
"0.6101945",
"0.60550565",
"0.6007553",
"0.59458244",
"0.5888293",
"0.58865494",
"0.586284",
... | 0.7087444 | 0 |
Read JSON value from byte array and map it into an object of the given type. | public <V> V readValue(byte[] bytes, Type valueType) throws JsonException {
try (ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes);
JsonReader jsonReader = Json.createReader(inputStream)) {
return toJavaObject(jsonReader.readValue(), valueType);
} catch (JsonException e) {
throw e;
} catch (Exception e) {
throw new JsonException("Unable to read value from json", e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static Object valueFromBytes(ByteBuffer bytes) throws JSONException{\n\t\tbyte type = bytes.get();\n\t\t//System.out.println(\"From value: \" + new Integer(type).toString());\n\t\tswitch(type){\n\t\tcase MAP_INDICATOR:\n\t\t\t//System.out.println(\"MAP!\");\n\t\t\treturn mapFromBytes(bytes);\n\t\tcase ARRA... | [
"0.73826855",
"0.716082",
"0.6626606",
"0.6554311",
"0.63469356",
"0.62750256",
"0.62648416",
"0.62205124",
"0.6172245",
"0.61182433",
"0.61016864",
"0.6050957",
"0.60449857",
"0.6033601",
"0.59806436",
"0.59797645",
"0.5974832",
"0.5961206",
"0.5952427",
"0.59199494",
"0.591... | 0.7420988 | 0 |
Map JSON value into a Java object of the given type. | @SuppressWarnings("unchecked")
public <V> V toJavaObject(JsonValue jsonValue, Type valueType) {
Objects.requireNonNull(jsonValue);
Objects.requireNonNull(valueType);
if (valueType instanceof Class && JsonValue.class.isAssignableFrom((Class<?>) valueType)) {
return (V) jsonValue;
}
Map.Entry<Class<?>, Class<?>> typeArguments = getTypeArguments(valueType);
return toJavaObject(jsonValue, (Class<V>) typeArguments.getValue(), typeArguments.getKey());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"<T> T fromJson(String source, JavaType type);",
"public static <T> T mapJsonToObject(String json, Class<T> classType) {\n\t\tT obj = null;\n\t\tif (StringUtils.isBlank(json)) {\n\t\t\treturn null;\n\t\t}\n\t\ttry {\n\t\t\tobj = jsonMapper.readValue(json, classType);\n\t\t} catch (Exception e) {\n\t\t\tlogger.err... | [
"0.71771604",
"0.6851282",
"0.67958",
"0.6791308",
"0.67531514",
"0.66069293",
"0.65778494",
"0.6472477",
"0.64673215",
"0.64561945",
"0.64403147",
"0.6380217",
"0.6351955",
"0.6264053",
"0.6262299",
"0.6260192",
"0.62043726",
"0.615788",
"0.6156646",
"0.6146656",
"0.6116955"... | 0.6197149 | 17 |
Generate the Json value from given object. | public JsonValue toJsonValue(Object value) throws JsonException {
return toJsonValue(value, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void generateJSON(JSONObject object, String name);",
"public String toJsonfrmObject(Object object) {\n try {\n ObjectMapper mapper = new ObjectMapper();\n mapper.setDateFormat(simpleDateFormat);\n return mapper.writeValueAsString(object);\n } catch (IOException e) ... | [
"0.69422114",
"0.64334345",
"0.63692045",
"0.6366104",
"0.6316912",
"0.6284014",
"0.6154846",
"0.612705",
"0.6057945",
"0.60231066",
"0.60042536",
"0.5998752",
"0.5985052",
"0.5955289",
"0.5953592",
"0.5925494",
"0.5892331",
"0.5888152",
"0.5879702",
"0.5858576",
"0.58481634"... | 0.57017833 | 36 |
Combining two array list into one | public static ArrayList<Integer> union(ArrayList<Integer> list1,
ArrayList<Integer> list2) {
ArrayList<Integer> union = new ArrayList<>();
//adding elements from first array list to the new array list
for (int i = 0; i < list1.size(); i++) {
union.add(list1.get(i));
}
//adding elements from the second array list to the new array list
for (int j = 0; j < list2.size(); j++) {
union.add(list2.get(j));
}
//returning combined list
return union;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void joinTwoArrayList(ArrayList<E> array1 , ArrayList<E> array2){\n\t\tint length2 = array2.size();\n\t\tfor(int i=0 ; i<length2 ; i++){\n\t\t\tarray1.add(array2.getElement(i));\n\t\t}\n\t}",
"public static void main(String[] args) \r\n\t{\n\r\n\t\tint[] A = {1,5,8,7,3,6};\r\n\t\tint[] B = {2,9,4};\r\n\t\... | [
"0.72246814",
"0.6975305",
"0.69516957",
"0.6870882",
"0.68310976",
"0.68310976",
"0.6748224",
"0.66919625",
"0.66676027",
"0.66202855",
"0.6575648",
"0.654981",
"0.6548583",
"0.6491593",
"0.6486048",
"0.64722276",
"0.6469365",
"0.64440084",
"0.6416631",
"0.6415535",
"0.63638... | 0.6624901 | 9 |
Main method for reading in Load shedding data set and printing out the eoperation count for the corresponding stage, day and start time. Prints out a list of all times if no paramters given | public static void main(String[] args) throws IOException {
File file = new File("Load_Shedding_All_Areas_Schedule_and_Map.clean.final.txt");
LSItemsArray = new LSItems[2976];
Scanner scan;
//Scanner scan = new Scanner(file);
try {
scan = new Scanner(file);
int count = 0;
while (scan.hasNextLine()){
String line = scan.nextLine();
String[] splitString = splitString(line);
//System.out.println(Arrays.toString(splitString));
LSItems lsItem = new LSItems(splitString[0], splitString[1]);
LSItemsArray[count] = lsItem;
count++;
}
scan.close();
}
catch(FileNotFoundException e) {
throw new RuntimeException(e);
}
if (args.length != 0) {
printAreas(args[0]);
try {
writeOperationsToTxt(args[0], opCount);
writeOperationsToCSV(args[0], opCount);
}
catch(FileNotFoundException e) {
throw new RuntimeException(e);
}
}
else
printAllAreas();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) throws IOException \n { \n StationDefinitionList tempStation = new StationDefinitionList(\n \"data/geoinfo.csv\");\n DataDefinitionList tempData = new DataDefinitionList(\n \"data/DataTranslation.csv\");\n DataDay.setDataD... | [
"0.6056596",
"0.59726244",
"0.5805739",
"0.56718796",
"0.5622215",
"0.5587151",
"0.55557466",
"0.55325574",
"0.55052",
"0.5500984",
"0.5469715",
"0.5441017",
"0.54345876",
"0.54148006",
"0.5409772",
"0.54057074",
"0.5402086",
"0.53982735",
"0.5387172",
"0.53741795",
"0.533793... | 0.59461206 | 2 |
Method to split each line in the file so that it can be read into the Array | public static String[] splitString(String str) {
String line = str.trim();
String info = "";
String areas = "";
for (int i = 0; i < line.length(); i ++) {
if (i <= 6)
info += line.charAt(i);
else
areas += line.charAt(i);
}
info = info.trim();
areas = areas.trim();
String[] splitString = new String[]{info, areas};
return splitString;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String[] ReadAllFileLines(String sFilePath) throws Exception {\n File f = null;\n FileInputStream fstream = null;\n DataInputStream in = null;\n BufferedReader br = null;\n String strLine = \"\";\n String[] stemp = null;\n StringBuffer strbuff = new StringBuf... | [
"0.6826636",
"0.67342174",
"0.66497785",
"0.65451825",
"0.64366066",
"0.6394246",
"0.63927346",
"0.6376991",
"0.63589126",
"0.63199437",
"0.63139457",
"0.6300385",
"0.62963",
"0.6273709",
"0.615695",
"0.6144764",
"0.6050347",
"0.60492325",
"0.6032156",
"0.60309356",
"0.600106... | 0.0 | -1 |
Method to print out the Areas of the given the corresponding date, stage and start time. Returns Areas not found if there is no match | public static void printAreas(String information) {
//String information = stage + "_" + day + "_" + startTime;
boolean bool = false;
for (int i = 0; i <= 2976; i ++) {
opCount++;
if (LSItemsArray[i].getInformation().equals(information)){
System.out.println("Load Shedding Inforamtion: " + LSItemsArray[i].getInformation()
+ ": Corresponding Areas: " + LSItemsArray[i].getAreas());
bool = true;
break;
}
}
if (bool == false)
System.out.println("Areas not found");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void printAllAreas() {\r\n\t for (int i = 0; i <= 2967; i++) {\r\n\t System.out.println(\"Load Shedding Inforamtion: \" + LSItemsArray[i].getInformation()\r\n + \": Corresponding Areas: \" + LSItemsArray[i].getAreas());\r\n\r\n\t }\r\n\t }",
"abstract void findAre... | [
"0.526054",
"0.47011343",
"0.47011343",
"0.45668486",
"0.4527413",
"0.45173907",
"0.44962135",
"0.44904205",
"0.44876707",
"0.44439602",
"0.4407992",
"0.44062304",
"0.43875468",
"0.4379032",
"0.43698284",
"0.43668735",
"0.43481976",
"0.43307942",
"0.43213528",
"0.4312874",
"0... | 0.618083 | 0 |
Method to print out all the "day, stage and start time" and their corresponding areas. | public static void printAllAreas() {
for (int i = 0; i <= 2967; i++) {
System.out.println("Load Shedding Inforamtion: " + LSItemsArray[i].getInformation()
+ ": Corresponding Areas: " + LSItemsArray[i].getAreas());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printAllStages() {\n printIndex();\n printRemoval();\n }",
"public void printDetails() {\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(showtimeId + \" \" + movie.getTitle() + \" starts at \" + startTime.toString());\r\n\t}",
"public void prettyPrint() {\n\t\tArrayList... | [
"0.61494166",
"0.6101832",
"0.5906664",
"0.5884498",
"0.58603877",
"0.5848888",
"0.58175546",
"0.5808451",
"0.580483",
"0.5795182",
"0.5776505",
"0.57336986",
"0.5724475",
"0.56924784",
"0.56757367",
"0.5649085",
"0.5647509",
"0.56318367",
"0.5628626",
"0.5619213",
"0.5591215... | 0.581242 | 7 |
Sets the current API key to use. | @WriteOperation
public void setApiKey(String apiKeyId, String secretApiKey, @Nullable AuthorizationType authorizationType) {
authenticator.setApiKey(getAuthorizationType(authorizationType), apiKeyId, secretApiKey);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void setAPIkey(String key) {\n\t\tkey1 = key;\r\n\r\n\r\n\t}",
"public void setAPIKey(String APIKey)\r\n {\r\n this.APIKey = APIKey == null ? null : APIKey.trim();\r\n }",
"public String getAPIKey()\r\n {\r\n return APIKey;\r\n }",
"public void setApiKey(String apiKey)... | [
"0.76800716",
"0.6750891",
"0.655228",
"0.64632577",
"0.6452721",
"0.6360274",
"0.6312227",
"0.62524426",
"0.6228342",
"0.6221961",
"0.6215622",
"0.6210413",
"0.6203042",
"0.6203042",
"0.6191473",
"0.6186401",
"0.61723197",
"0.61697835",
"0.61697835",
"0.61697835",
"0.6161369... | 0.5481607 | 59 |
1 asc, 2 desc | public TradenameSearchParams(String userRecId, String applicationNumber, String tradename, String exportStatus,
String company, TDate entryDt_start, TDate entryDt_end, boolean commentsOutsd, boolean commentsRespond, int categoryId,
TDate staffReviewDateFromDt, TDate staffReviewDateToDt, TDate commiteeReviewDateFromDt,
TDate commiteeReviewDateToDt, String submissionStatus, String orderBy, int ordering) {
this.userRecId = userRecId;
this.applicationNumber = applicationNumber;
this.tradename = tradename;
this.exportStatus = exportStatus;
this.company = company;
this.entryDt_start = entryDt_start;
this.entryDt_end = entryDt_end;
this.commentsOutsd = commentsOutsd;
this.commentsRespond = commentsRespond;
this.categoryId = categoryId;
this.staffReviewDateFromDt = staffReviewDateFromDt;
this.staffReviewDateToDt = staffReviewDateToDt;
this.commiteeReviewDateFromDt = commiteeReviewDateFromDt;
this.commiteeReviewDateToDt = commiteeReviewDateToDt;
this.submissionStatus = submissionStatus;
this.orderBy = orderBy;
this.ordering = ordering;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Sort asc(QueryParameter parameter);",
"public String getSortOrder();",
"Sort desc(QueryParameter parameter);",
"OrderExpression<T> desc();",
"public interface SortType {\n int ASC=1;\n int DESC=-1;\n int INFO =3;\n int POINT=4;\n int ACTIVE=5;\n}",
"OrderExpression<T> asc();",
"java.lang... | [
"0.6987555",
"0.67679214",
"0.67245936",
"0.66776425",
"0.66037655",
"0.65769327",
"0.6521742",
"0.6428112",
"0.6316339",
"0.6291932",
"0.6247012",
"0.6227534",
"0.6227534",
"0.6203179",
"0.6101199",
"0.6048476",
"0.60459524",
"0.5949125",
"0.5932925",
"0.59278905",
"0.591698... | 0.0 | -1 |
makes the edge highlight wider by this factor | public B selectionStrokeMultiplier(float selectionStrokeMultiplier) {
this.selectionStrokeMultiplier = selectionStrokeMultiplier;
return self();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setHighlightLineWidth(float width) { this.mHighlightLineWidth = Utils.convertDpToPixel(width); }",
"public float getHighlightLineWidth() { return this.mHighlightLineWidth; }",
"public void drawScale()\n\t{\n\tint sw=150;\n\tint sh=10;\n\tint x=width-sw-15;\n\tint y=(int)(END_Y+sh*0.5);\n\tscaleBox=... | [
"0.6193071",
"0.5783554",
"0.5590729",
"0.5530255",
"0.5526006",
"0.53846914",
"0.5255354",
"0.522779",
"0.5197246",
"0.5121678",
"0.50899917",
"0.5086838",
"0.50650096",
"0.5053665",
"0.5050054",
"0.5043311",
"0.5039354",
"0.5035711",
"0.5035036",
"0.5025227",
"0.5024911",
... | 0.0 | -1 |
Provides the currently selected edges | public B selectedEdgeFunction(
Function<VisualizationServer<V, E>, Collection<E>> selectedEdgeFunction) {
this.selectedEdgeFunction = selectedEdgeFunction;
return self();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<GraphEdge> getEdges() {\n return selectedEdges;\n }",
"String getEdges();",
"public Vector<Edge> getEdges(){\n\t\treturn this.listOfEdges;\n\t}",
"public Enumeration edges();",
"public Set<E> getEdges();",
"public Edge[] getEdges() {\n\t\treturn edges;\n\t}",
"public HashSet<... | [
"0.80808204",
"0.7281635",
"0.71878725",
"0.70947534",
"0.7016051",
"0.7009284",
"0.6893104",
"0.68775266",
"0.6871864",
"0.6870378",
"0.6860029",
"0.6791144",
"0.67436934",
"0.67229724",
"0.6692643",
"0.66855884",
"0.6665506",
"0.6652755",
"0.66470206",
"0.6619644",
"0.66106... | 0.5938246 | 94 |
supplies the selected edges that are not hidden | protected Collection<E> getSelectedEdges(VisualizationServer<V, E> visualizationServer) {
LayoutModel<V> layoutModel = visualizationServer.getVisualizationModel().getLayoutModel();
RenderContext<V, E> renderContext = visualizationServer.getRenderContext();
return visualizationServer
.getSelectedEdges()
.stream()
.filter(
e -> {
// don't highlight edge if either incident vertex is not drawn
V u = layoutModel.getGraph().getEdgeSource(e);
V v = layoutModel.getGraph().getEdgeTarget(e);
Predicate<V> vertexIncludePredicate = renderContext.getVertexIncludePredicate();
Predicate<E> edgeIncludePredicate = renderContext.getEdgeIncludePredicate();
return edgeIncludePredicate.test(e)
&& vertexIncludePredicate.test(u)
&& vertexIncludePredicate.test(v);
})
.collect(Collectors.toList());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeAllEdges() {\n }",
"int removeEdges(ExpLineageEdge.FilterOptions options);",
"public boolean resetEdges();",
"public void selectCutVertices() {\n BiConnectedComponents bcc_2p = graph2p_bcc;\n if (bcc_2p != null) {\n Set<String> new_sel = new HashSet<String>();\n\tnew_sel... | [
"0.68713593",
"0.65831274",
"0.64083236",
"0.634094",
"0.63158435",
"0.6256135",
"0.6248218",
"0.62425005",
"0.6184696",
"0.6163027",
"0.60916954",
"0.6085099",
"0.60618156",
"0.6050151",
"0.6036011",
"0.6035088",
"0.5964647",
"0.5945186",
"0.5928511",
"0.59087867",
"0.581973... | 0.62108296 | 8 |
Constructs a new Light Sensor test case with the given name. | public LightSensorTest(String name) {
super(name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LTest(String name) {\r\n\t\tsuper(name);\r\n\t}",
"public SampleJUnit(String name) {\r\n\t\tsuper(name);\r\n\t}",
"public SmokeDetectorTest(String name) {\n\t\tsuper(name);\n\t}",
"public ULTest(String name) {\n\t\tsuper(name);\n\t}",
"public SwitchLookupTest(String name) {\n super(name);\n ... | [
"0.652423",
"0.64694667",
"0.61450195",
"0.6143267",
"0.61066085",
"0.60730624",
"0.6016221",
"0.5884197",
"0.5868955",
"0.58524454",
"0.57208914",
"0.5703597",
"0.56774634",
"0.5670655",
"0.56605524",
"0.5624124",
"0.5620956",
"0.55736655",
"0.5568048",
"0.5536716",
"0.55204... | 0.8159645 | 0 |
Returns the fixture for this Light Sensor test case. | @Override
protected LightSensor getFixture() {
return (LightSensor)fixture;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected MobileDevice getFixture() {\n\t\treturn fixture;\n\t}",
"protected SokobanService getFixture() {\n\t\treturn fixture;\n\t}",
"protected PropertyInstance getFixture() {\n\t\treturn fixture;\n\t}",
"protected SaveParameters getFixture() {\n\t\treturn fixture;\n\t}",
"protected Grid<?, ?> getFixture... | [
"0.76021606",
"0.7433294",
"0.73168766",
"0.7314599",
"0.73073304",
"0.72865313",
"0.7282318",
"0.72092384",
"0.71894777",
"0.71609974",
"0.7129908",
"0.7040556",
"0.703808",
"0.70103854",
"0.69827366",
"0.69786507",
"0.6965058",
"0.69601333",
"0.6840793",
"0.6834382",
"0.680... | 0.75581676 | 1 |
/ Fetch data from cache first, if found return the data else fetch data from database and persist in cache. | @Override
public List<TransactionInfo> fetchMiniStatementByAccountId(Long accountId) {
return fetchAllTransactionInfo().stream()
.filter(transactionInfo ->
transactionInfo.getSenderAccountId().equals(accountId) ||
transactionInfo.getReceiverAccountId().equals(accountId))
.skip(0).limit(20) // Limiting the top 20 records.
.collect(Collectors.toList());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Entity cacheLoadOrStore(Entity entity) {\n Entity cachedEntity = entityCache.findInCache(entity.getClass(), entity.getId());\n if (cachedEntity != null) {\n return cachedEntity;\n }\n entityCache.put(entity, true);\n return entity;\n }",
"public void cac... | [
"0.7037332",
"0.67149806",
"0.660174",
"0.6466724",
"0.6460109",
"0.645658",
"0.6390205",
"0.6363706",
"0.6360573",
"0.63414663",
"0.62305784",
"0.6227768",
"0.6212847",
"0.61868626",
"0.61835194",
"0.6154646",
"0.61521",
"0.61000884",
"0.6062248",
"0.6053069",
"0.6027528",
... | 0.0 | -1 |
/ Check if key is already in cache, if so reject the request here itself. | @Override
public void insertIdempotencyKey(String idempotencyKey) {
if (isKeyAvailable("idempotency", String.class, String.class, idempotencyKey)) {
log.error("Idempotency key already exists.");
throw new CustomBusinessException(
HttpStatus.BAD_REQUEST,
"Duplicate Idempotency-Key, please try again with a new key.");
} else {
log.info("Inserting idempotency key to both cache and database.");
update("idempotency", String.class, String.class, idempotencyKey, LocalDateTime.now().toString());
repositoryService.insertIdempotencyKey(idempotencyKey);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean inCache(String key);",
"@Override\n public Boolean exists(Key<?> key)\n {\n return session.getCache().contains(key) || queryCache.exists(key);\n }",
"boolean isKeyInCache(Object key);",
"protected boolean evictAndReplace(String key) throws KeyDoesntExistException, Exception {\n... | [
"0.67866147",
"0.67328286",
"0.6716237",
"0.6493042",
"0.64399856",
"0.6238959",
"0.62251765",
"0.61231226",
"0.60892266",
"0.6088663",
"0.604861",
"0.5928362",
"0.5828544",
"0.5825321",
"0.58242023",
"0.5817793",
"0.58014333",
"0.5795539",
"0.5772917",
"0.57709146",
"0.56993... | 0.0 | -1 |
/ Save transaction details in database. | @Override
public void saveTransactionDetails(TransactionInfo transactionInfo) {
repositoryService.saveTransactionDetails(transactionInfo);
update("transactions", String.class, TransactionInfo.class, LocalDateTime.now().toString(), transactionInfo);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Transaction save(Transaction transaction);",
"@Override\n\tpublic void createTransaction(Transaction t) { \n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction(); \n\n\t\t/* save */ \n\t\tsession.save(t);\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commi... | [
"0.77861977",
"0.70867527",
"0.69466066",
"0.68129796",
"0.6784324",
"0.6632246",
"0.65637565",
"0.65132076",
"0.64991975",
"0.6495288",
"0.64450675",
"0.6393563",
"0.6362271",
"0.6354529",
"0.6344777",
"0.63198936",
"0.6319696",
"0.6300708",
"0.62634337",
"0.626211",
"0.6241... | 0.75116843 | 1 |
/ Update balance info in database, then fetch latest account balance from database. | @Override
public void updateBalanceInfo(Long accountId, BigDecimal amountToAdd) {
repositoryService.updateBalanceInfo(accountId, amountToAdd);
AccountInfo accountInfo = repositoryService.fetchAccountInfo(accountId).orElseThrow();
update("accounts", Long.class, AccountInfo.class, accountId, accountInfo);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateDatabaseAccountBalance() {\n\t\tString sql = \"UPDATE account SET balance = \" + this.balance + \" \";\n\t\tsql += \"WHERE accountID = '\" + this.accountID + \"';\";\n\n\t\tDbUtilities db = new MySqlUtilities();\n\t\tdb.executeQuery(sql);\n\t}",
"public int baldown(double newbalance, Long acco... | [
"0.81929415",
"0.71908313",
"0.71492136",
"0.70548713",
"0.6977367",
"0.69200784",
"0.68819284",
"0.6828902",
"0.66736996",
"0.6644599",
"0.66315883",
"0.662683",
"0.6555883",
"0.6554313",
"0.65353125",
"0.6528256",
"0.6502698",
"0.648861",
"0.64723366",
"0.64614916",
"0.6455... | 0.6189752 | 31 |
RICE Data dictionary service | public interface RiceDataDictionaryServiceInfc {
/**
* Get the RICE data object for the specified entry key
*
* @param entryKey
* @return null if entry key not found
*/
public DataObjectEntry getDataObjectEntry(String entryKey);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface DataDictionaryService {\n}",
"public interface LanguageDictService {\n\n List<LanguageDict> getDataList(Map<String, Object> map);\n\n Integer setData(Map<String, Object> map);\n\n Integer removeData(Map<String, Object> map);\n\n Integer addData(Map<String, Object> map);\n}",
"publi... | [
"0.64601463",
"0.6127143",
"0.5931464",
"0.5836825",
"0.56788844",
"0.55687016",
"0.5512541",
"0.5491176",
"0.54848605",
"0.54818153",
"0.54818153",
"0.54687405",
"0.5465641",
"0.5454559",
"0.5427442",
"0.5405859",
"0.5399624",
"0.53837866",
"0.5362813",
"0.5362813",
"0.53493... | 0.7534286 | 0 |
Get the RICE data object for the specified entry key | public DataObjectEntry getDataObjectEntry(String entryKey); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface RiceDataDictionaryServiceInfc {\n\n /**\n * Get the RICE data object for the specified entry key\n * \n * @param entryKey\n * @return null if entry key not found\n */\n public DataObjectEntry getDataObjectEntry(String entryKey);\n}",
"protected abstract RMItem readData... | [
"0.63580054",
"0.6157215",
"0.603501",
"0.5992831",
"0.5856626",
"0.58440566",
"0.57887983",
"0.5761931",
"0.57164884",
"0.5632671",
"0.5610415",
"0.55638474",
"0.5558491",
"0.5556893",
"0.55042917",
"0.54810274",
"0.54807895",
"0.54659915",
"0.5459426",
"0.54460466",
"0.5444... | 0.6811257 | 0 |
Builds a scheme using argument as list of colors in HEX format. | private OfficeScheme(String value, String... hexColors) {
scheme = new EnumeratedScheme(CATEGORY, value, hexColors);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String makeHexColorInt(int... vals){\n\t\treturn \"\"+formatNumberString(Integer.toHexString((int)vals[0]),2)+\"\"+formatNumberString(Integer.toHexString((int)vals[1]),2)+\"\"+formatNumberString(Integer.toHexString((int)vals[2]),2);\n\t}",
"public static String makeHexColor(double... vals){\n\t\tre... | [
"0.59179497",
"0.57946587",
"0.56388783",
"0.56298727",
"0.5463162",
"0.534979",
"0.5317475",
"0.5277248",
"0.527212",
"0.51811993",
"0.51021844",
"0.510038",
"0.50683594",
"0.5036532",
"0.5031939",
"0.50206864",
"0.4997803",
"0.49955684",
"0.4943905",
"0.49343538",
"0.493084... | 0.63792145 | 0 |
Converts a java bean into a nested HashMap. Useful for dumping a bean as detail in a health check. | public static Map<String, Object> beanToMap(final Object object) {
Map<String, Object> map;
if (object != null) {
// far from the most efficient way to do this but sufficient for a rarely used
// health check page
final String json = JsonUtil.writeValueAsString(object);
LOGGER.debug("json\n{}", json);
try {
map = JsonUtil.getMapper().readValue(json, new TypeReference<Map<String, Object>>() {
});
} catch (IOException e) {
final String msg = LogUtil.message("Unable to convert object {} of type {}",
object, object.getClass().getName());
LOGGER.error(msg, e);
map = new HashMap<>();
map.put("ERROR", msg + " due to: " + e.getMessage());
}
} else {
map = Collections.emptyMap();
}
return map;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Map<Object, Object> beanProperties(Object bean) {\r\n\t\ttry {\r\n\t\t\tMap<Object, Object> map = new HashMap<>();\r\n\t\t\tArrays.asList(Introspector.getBeanInfo(bean.getClass(), Object.class).getPropertyDescriptors()).stream()\r\n\t\t\t\t\t// filter out properties with setters only\r\n\t\t\t\t\t.fi... | [
"0.65818375",
"0.6457988",
"0.6074935",
"0.5690482",
"0.5664077",
"0.5633671",
"0.560941",
"0.5393774",
"0.5215635",
"0.52135056",
"0.51883477",
"0.5156751",
"0.5051278",
"0.5029228",
"0.4925273",
"0.492162",
"0.49114183",
"0.48923606",
"0.48806605",
"0.48694205",
"0.48552227... | 0.646994 | 1 |
Replaces any values with '' if the key is a string and contains 'password' or 'apikey' or 'token' | public static void maskPasswords(final Map<String, Object> map) {
map.entrySet().forEach(entry -> {
String key = entry.getKey();
if (entry.getValue() instanceof String) {
if (key.toLowerCase().contains("password")) {
LOGGER.debug("Masking entry with key {}", key);
map.put(key, "****");
} else if (key.toLowerCase().contains("apikey") || key.toLowerCase().contains("token")) {
LOGGER.debug("Masking entry with key {}", key);
String oldValue = (String) entry.getValue();
if (oldValue.length() <= 8) {
map.put(key, "****");
} else {
String newValue = oldValue.substring(0, 4) + "****" + oldValue.substring(oldValue.length() - 4);
map.put(key, newValue);
}
}
} else if (entry.getValue() instanceof Map) {
maskPasswords((Map<String, Object>) entry.getValue());
} else if (entry.getValue() instanceof List) {
for (Object item : (List<Object>) entry.getValue()) {
if (item instanceof Map) {
maskPasswords((Map<String, Object>) item);
}
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Map<String, Object> filterPasswordFields(final Output output) {\n final Map<String, Object> data = output.asMap();\n final MessageOutput messageOutput = messageOutputFactory.fromStreamOutput(output);\n\n if (messageOutput == null) {\n return data;\n }\n\n final... | [
"0.53356",
"0.49936378",
"0.49508157",
"0.4949839",
"0.48617002",
"0.48502284",
"0.48496646",
"0.48064268",
"0.47959012",
"0.47482207",
"0.4739091",
"0.47386172",
"0.47349706",
"0.47314587",
"0.47160062",
"0.47106892",
"0.46859473",
"0.46656236",
"0.46368662",
"0.46268368",
"... | 0.5754221 | 0 |
TODO Autogenerated method stub | @Override
public Properties getProperties() {
return null;
} | {
"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 |
well, I have no option beside overriding the LoginFilter.java in Seraph. Seraph is gonna is going to perform authentication when parameter os_username and os_password being thrown to the server Thus, i should override it so that the UserPasswordPair object in PasswordBasedLoginFilter.java is not null and the authentication to perform the sso is completed. | public CustomLoginFilter() {
connectionManager = new MultiThreadedHttpConnectionManager();
// httpClient = new HttpClient(connectionManager);
// HostConfiguration hostConfiguration = new HostConfiguration();
// hostConfiguration.setHost(HOST);
// httpClient.setHostConfiguration(hostConfiguration);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Object authenticate(Invocation invocation, HttpServletRequest request,\r\n HttpServletResponse response) throws IOException {\r\n\r\n Object[] args = invocation.getArgs();\r\n if (args.length != 2) {\r\n throw new RuntimeException(\"The authenticate call must have two ar... | [
"0.67545944",
"0.66802424",
"0.65504843",
"0.6533594",
"0.6514127",
"0.6434319",
"0.6414233",
"0.63841504",
"0.63824606",
"0.637864",
"0.63780326",
"0.6318458",
"0.6313532",
"0.6311075",
"0.6302229",
"0.62955564",
"0.62899566",
"0.62554073",
"0.62400913",
"0.6206311",
"0.6187... | 0.5905249 | 41 |
boolean value = 5; invalid declaration short value = 5; //prints 3 int value = 5; //prints 5 byte value = 5; //prints 3 long value = 5; prints 2 | public static void main(String[] gears) {
float value = 5; //prints 3
System.out.print(new Q48().drive(value));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String []args){\n\n//byte i; // declaration\n//i = 20; //initialization\n//System.out.println(i); // utilization\n\n//short i; // declaration\n//i = 30; //initialization\n//System.out.println(i); // utilization\n\n//long i; // declaration\n//i = 78945612; //initialization\n//S... | [
"0.6037621",
"0.60011506",
"0.5997188",
"0.59399754",
"0.5881412",
"0.5869604",
"0.5806948",
"0.57982594",
"0.5633349",
"0.56180614",
"0.5614235",
"0.5606798",
"0.5605432",
"0.558609",
"0.55553806",
"0.5526781",
"0.55262554",
"0.5508008",
"0.5481435",
"0.54450166",
"0.5416003... | 0.0 | -1 |
Recipient's email ID needs to be mentioned. | public void sendLink(String emailId, String otp) {
String to = emailId;
// Sender's email ID needs to be mentioned
String from = "pankaj.sharma@incture.com";
final String username = "pankaj.sharma@incture.com";
final String password = "9784261079";// change accordingly
// Assuming you are sending email through relay.jangosmtp.net
String host = "smtp.gmail.com";
Properties props = new Properties();
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.host", host);
props.put("mail.smtp.port", "25");
// Get the Session object.
Session session = Session.getInstance(props,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
try {
// Create a default MimeMessage object.
Message message = new MimeMessage(session);
// Set From: header field of the header.
message.setFrom(new InternetAddress(from));
// Set To: header field of the header.
message.setRecipients(Message.RecipientType.TO,
InternetAddress.parse(to));
// Set Subject: header field
message.setSubject("Link For Magic");
// Now set the actual message
message.setText("Welcome to Atithi::" + otp
+ "\n Please do not share it with anyone.");
Transport.send(message);
} catch (MessagingException e) {
throw new RuntimeException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void recipient(String recipient) {\n }",
"@java.lang.Override\n public long getRecipientId() {\n return recipientId_;\n }",
"public void setEmail(String p) { this.idcorreo = p; }",
"@Override\n public void addRecipient(String newRecipient) {\n System.out.println(\"In... | [
"0.6679076",
"0.6535262",
"0.6473539",
"0.6443136",
"0.6432717",
"0.6348342",
"0.63348556",
"0.63263154",
"0.6296808",
"0.62781155",
"0.62391186",
"0.62367135",
"0.62210846",
"0.62085253",
"0.6185119",
"0.61475474",
"0.61453986",
"0.6130136",
"0.6077961",
"0.60607266",
"0.604... | 0.0 | -1 |
return new PHPRPC_Client(" return new PHPRPC_Client(" return new PHPRPC_Client(" | public static PHPRPC_Client getClient(){
return new PHPRPC_Client("http://10.222.139.163:8080/LBEService/servlet/mobile");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static Client createDummyClient() {\n\n PhoneNumber num1 = new PhoneNumber(\"Arnold Schubert\",\"0151234567\", \"Ehemann\");\n PhoneNumber num2 = new PhoneNumber(\"Helene Schubert\",\"0171234567\", \"Tochter\");\n ArrayList<PhoneNumber> phoneNumbers1 = new ArrayList<>();\n phone... | [
"0.54618686",
"0.54395473",
"0.54107726",
"0.5258363",
"0.52383935",
"0.5177107",
"0.5163767",
"0.5144153",
"0.51210654",
"0.50779533",
"0.506205",
"0.5050097",
"0.502941",
"0.5010588",
"0.4993512",
"0.49839416",
"0.4983927",
"0.49619743",
"0.4932029",
"0.4932029",
"0.4932029... | 0.6857888 | 0 |
From DataBase To ObservableList | private void init() {
List<Contructor> list = servisContructor.getAllContructors();
for (Contructor prod : list) {
contructor.add(new ContructorViewer(prod));
}
Label label = new Label("Catalog Contructors");
label.setLayoutX(140);
label.setLayoutY(20);
label.setStyle("-fx-font-size:20px");
initTable();
table.setLayoutX(120);
table.setLayoutY(60);
table.setStyle("-fx-font-size:16px");
GridPane control = new ControlPanel(this, 2).getPanel();
control.setLayoutX(120);
control.setLayoutY(300);
panel.setAlignment(Pos.CENTER);
panel.add(label, 0, 0);
panel.add(table, 0, 1);
panel.add(control, 0, 2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ObservableList<Person> getUsersFromDb() {\n\n ArrayList<Person> usersArrayList = new ArrayList<>();\n\n String dbQuery = \"SELECT * FROM users\";\n\n ResultSet result = DbConnector.selectQuery(dbQuery);\n try {\n while (result.next()) {\n int id =... | [
"0.71346515",
"0.7093124",
"0.69389445",
"0.6924857",
"0.69092447",
"0.68950754",
"0.68939525",
"0.68734664",
"0.6794031",
"0.67037326",
"0.6692924",
"0.66853094",
"0.6676182",
"0.6672837",
"0.66304183",
"0.66275126",
"0.66028035",
"0.6594024",
"0.6542084",
"0.65407974",
"0.6... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void help() {
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
Call this method to find a solution for the current object configuration. | public int[][] findSolution(){
this.hasSolution = false;
BoardStatus solution = findSolution(1, new BoardStatus(boardSize, this.initialPosition));
if (solution == null){
return null;
}
return solution.geBoard();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void findSolution() {\n\n\t\t// TODO\n\t}",
"SolutionRef getCurrentSolution();",
"public Object getSolution() {\n\t\treturn solution;\n\t}",
"private Solution solution(int id) {\n return solutions.get(id);\n }",
"@Override\n\tpublic Solution getSolution() {\t\n\t\treturn solution;\n\t}",
... | [
"0.7286516",
"0.61805415",
"0.60684466",
"0.59983766",
"0.59461004",
"0.59319574",
"0.56925076",
"0.55911195",
"0.5580099",
"0.5568222",
"0.55528283",
"0.5535799",
"0.55154574",
"0.5510413",
"0.5504354",
"0.54813427",
"0.54696596",
"0.5421312",
"0.538463",
"0.53766197",
"0.53... | 0.5131192 | 28 |
Create a new LetterSet. The lang is set to the default value. (ie. english) | public LetterSet() {
this("enEN");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LetterSet(String lang) {\n this.lang = lang;\n }",
"public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n... | [
"0.8783779",
"0.66020024",
"0.58821845",
"0.5796711",
"0.56834817",
"0.56593347",
"0.5573651",
"0.5548737",
"0.5444849",
"0.5398032",
"0.5393891",
"0.53917885",
"0.53917885",
"0.53917885",
"0.5388559",
"0.53020906",
"0.53019166",
"0.52730006",
"0.52551794",
"0.5247244",
"0.52... | 0.8238153 | 1 |
Create a new LetterSet with the given langage. | public LetterSet(String lang) {
this.lang = lang;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LetterSet() {\n this(\"enEN\");\n }",
"public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else ... | [
"0.7077636",
"0.6116449",
"0.533727",
"0.53212327",
"0.52830565",
"0.5177947",
"0.51683444",
"0.5147981",
"0.50852466",
"0.506192",
"0.5054642",
"0.5054642",
"0.5054642",
"0.5014",
"0.49004346",
"0.48704502",
"0.48621687",
"0.4861229",
"0.48510173",
"0.48358837",
"0.48245698"... | 0.77946377 | 0 |
Return the letter needed in the Set. It'll be search with the given Character. | public Letter getLetter(Character c) {
return get(c);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getGroup(char letter);",
"public static char findFirstDuplicates(String str){\n //a green apple\n // ^ now set contains 'e'\n Set<Character> set = new HashSet<>();\n\n for(Character ch:str.toCharArray()){\n if(set.contains(ch)) return ch;\n\n set.a... | [
"0.6447374",
"0.6436454",
"0.63221633",
"0.630034",
"0.6254483",
"0.6252188",
"0.62287927",
"0.6205962",
"0.62040955",
"0.6177281",
"0.615389",
"0.614434",
"0.6138985",
"0.60900646",
"0.60817784",
"0.6011424",
"0.5997625",
"0.5996654",
"0.59856075",
"0.5968533",
"0.5967122",
... | 0.6766304 | 0 |
this will return null (unselected) for default mock dialog. | @Test
public void projectIsNotSelected_doesNotTriggerListeners() {
projectSelector.handleOpenProjectSelectionDialog();
verifyNoMoreInteractions(projectSelectionListener);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic Object getModelSelected() {\n\t\treturn null;\n\t}",
"public boolean getSelected()\n {\n return selected; \n }",
"private void handleSearchButtonSelected() {\n\t\tShell shell = getShell();\n\t\tIProject project = getProject(editorLocal.getProjectName());\n\t\tIJavaProject jav... | [
"0.64282376",
"0.61324185",
"0.6130053",
"0.6099017",
"0.60827976",
"0.60827976",
"0.5929146",
"0.5861471",
"0.58293325",
"0.581113",
"0.5806747",
"0.58003205",
"0.5799505",
"0.5799505",
"0.579435",
"0.5715718",
"0.5713076",
"0.5689774",
"0.563721",
"0.5632842",
"0.56313574",... | 0.0 | -1 |
/Header constructor, creates a holder for the title piece of text parameters: t text to set title to returns: null | public Header(String t) {
this.title=t;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void IsiTabelHeader(String text) {\n IsiTabelHeader = new TextView(getActivity());\n IsiTabelHeader.setText(text);\n IsiTabelHeader.setTextColor(getResources().getColor(R.color.white));\n IsiTabelHeader.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT... | [
"0.679367",
"0.6734283",
"0.6710601",
"0.6705863",
"0.6529728",
"0.6523183",
"0.64926803",
"0.64821666",
"0.6476903",
"0.6453789",
"0.64497423",
"0.64023536",
"0.63960904",
"0.63664496",
"0.63560396",
"0.62634385",
"0.6263311",
"0.6252785",
"0.62402767",
"0.62231284",
"0.6215... | 0.8522395 | 0 |
Read license from raw resource. | private String readLicenseFromRawResource(int resourceid) {
String license = "";
BufferedReader in = new BufferedReader(new InputStreamReader(getResources().openRawResource(resourceid)));
StringBuilder sb = new StringBuilder();
try {
while (true) {
String line = in.readLine();
if (line == null) {
return sb.toString();
}
if (TextUtils.isEmpty(line)) {
sb.append("\n\n");
} else {
sb.append(line);
sb.append(" ");
}
}
} catch (IOException e) {
e.printStackTrace();
return license;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public License read() throws IOException {\n return read(IOFormat.BINARY);\n }",
"License createLicense();",
"List<RawLicense> getRawLicenses();",
"public String getLicense();",
"License getLicense() throws TimeoutException, InterruptedException;",
"String getLicensePlate();",
"public String ... | [
"0.7418802",
"0.5836908",
"0.57906634",
"0.57696694",
"0.5760237",
"0.5406161",
"0.53727484",
"0.5361282",
"0.5337571",
"0.52794135",
"0.5242178",
"0.5189292",
"0.51826906",
"0.5157404",
"0.50776017",
"0.5049238",
"0.50073147",
"0.49909863",
"0.49904707",
"0.4983006",
"0.4968... | 0.7538936 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
int a,b,c;
a=10;b=20;
c=a-(-b);
System.out.println("Addition: "+c);
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected Class<FriendCircle> getEntityClass() {
return FriendCircle.class;
} | {
"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 |
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() {
Btn_add = new javax.swing.JButton();
Label_login = new javax.swing.JLabel();
Pswrd_field = new javax.swing.JPasswordField();
Btn_login = new javax.swing.JButton();
Btn_diagnosis = new javax.swing.JButton();
lb_invalid = new javax.swing.JLabel();
admin = new javax.swing.JLabel();
bg = new javax.swing.JLabel();
setOpaque(false);
setPreferredSize(new java.awt.Dimension(900, 540));
setLayout(null);
Btn_add.setIcon(new javax.swing.ImageIcon(getClass().getResource("/salesPackage/Images/login/add_1.gif"))); // NOI18N
Btn_add.setBorderPainted(false);
Btn_add.setContentAreaFilled(false);
Btn_add.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
Btn_add.setFocusPainted(false);
Btn_add.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/salesPackage/Images/login/add_3.gif"))); // NOI18N
Btn_add.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/salesPackage/Images/login/add_2.gif"))); // NOI18N
Btn_add.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Btn_addActionPerformed(evt);
}
});
add(Btn_add);
Btn_add.setBounds(142, 150, 177, 157);
Label_login.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 14)); // NOI18N
Label_login.setForeground(new java.awt.Color(12, 120, 73));
Label_login.setText("Password :");
add(Label_login);
Label_login.setBounds(380, 188, 80, 30);
Pswrd_field.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
Pswrd_field.setForeground(new java.awt.Color(12, 120, 73));
Pswrd_field.setHorizontalAlignment(javax.swing.JTextField.CENTER);
Pswrd_field.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(12, 120, 73)));
Pswrd_field.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Pswrd_fieldActionPerformed(evt);
}
});
add(Pswrd_field);
Pswrd_field.setBounds(467, 190, 250, 30);
Btn_login.setIcon(new javax.swing.ImageIcon(getClass().getResource("/salesPackage/Images/login/btn_login_1.png"))); // NOI18N
Btn_login.setBorderPainted(false);
Btn_login.setContentAreaFilled(false);
Btn_login.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
Btn_login.setFocusPainted(false);
Btn_login.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/salesPackage/Images/login/btn_login_3.png"))); // NOI18N
Btn_login.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/salesPackage/Images/login/btn_login_2.png"))); // NOI18N
Btn_login.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Btn_loginActionPerformed(evt);
}
});
add(Btn_login);
Btn_login.setBounds(630, 240, 90, 31);
Btn_diagnosis.setIcon(new javax.swing.ImageIcon(getClass().getResource("/salesPackage/Images/login/status_1.gif"))); // NOI18N
Btn_diagnosis.setBorderPainted(false);
Btn_diagnosis.setContentAreaFilled(false);
Btn_diagnosis.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
Btn_diagnosis.setFocusPainted(false);
Btn_diagnosis.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/salesPackage/Images/login/status_3.gif"))); // NOI18N
Btn_diagnosis.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/salesPackage/Images/login/status_2.gif"))); // NOI18N
Btn_diagnosis.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Btn_diagnosisActionPerformed(evt);
}
});
add(Btn_diagnosis);
Btn_diagnosis.setBounds(142, 332, 618, 61);
lb_invalid.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 13)); // NOI18N
lb_invalid.setForeground(new java.awt.Color(255, 0, 0));
lb_invalid.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
lb_invalid.setText("Invalid password !");
add(lb_invalid);
lb_invalid.setBounds(470, 240, 140, 30);
admin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/salesPackage/Images/login/admin_border.png"))); // NOI18N
add(admin);
admin.setBounds(348, 143, 410, 164);
bg.setIcon(new javax.swing.ImageIcon(getClass().getResource("/salesPackage/Images/panel_bg_trans.png"))); // NOI18N
bg.setFocusable(false);
add(bg);
bg.setBounds(0, 0, 900, 540);
} | {
"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.73199165",
"0.7291065",
"0.7291065",
"0.7291065",
"0.72868747",
"0.72488254",
"0.7214099",
"0.7209363",
"0.7196111",
"0.7190702",
"0.7184576",
"0.71590984",
"0.71483636",
"0.7093415",
"0.70814407",
"0.70579475",
"0.69872457",
"0.69773155",
"0.6955104",
"0.69544697",
"0.694... | 0.0 | -1 |
End of variables declaration//GENEND:variables my method | void getReference(Configuration c)
{
c_ref= c;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void myMethod() {\n\t\t\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\... | [
"0.68815815",
"0.68509823",
"0.68509823",
"0.68465465",
"0.6775563",
"0.67723876",
"0.67474014",
"0.6658517",
"0.6651162",
"0.6592925",
"0.65870017",
"0.65855765",
"0.6576514",
"0.65664417",
"0.6522407",
"0.652143",
"0.6512959",
"0.6509933",
"0.6493461",
"0.64927036",
"0.6491... | 0.0 | -1 |
Dutch National Flag Problem Statement: You are given n balls. Each of these balls are of one the three colors: Red, Green and Blue. They are arranged randomly in a line. Your task is to rearrange them such that all balls of the same color are together and their collective color groups are in this order: Red balls first, Green balls next and Blue balls last. This combination of colors is similar to the Dutch National Flag, hence the problem name. This is a popular sorting problem. | public static void dutch_flag_sort(char[] balls)
{
int n = balls.length;
int swapRedHere = 0;
int swapBluHere = n-1;
int cur = 0;
while (cur <= swapBluHere)
{
// If current ball is red, swap with swapRedHere. We will get a green so move current.
if (balls[cur] == 'R')
{
swap(balls, cur, swapRedHere++);
cur++;
}
// If current ball is blue, move it to swapBluHere. But don't move current because it now has unknown ball..
else if (balls[cur] == 'B')
{
swap(balls, cur, swapBluHere--);
}
// Otherwise we have a green. Leave it there because it will get pulled out when swapRedHere reaches it.
else // 'G'
{
cur++;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sortColors(int[] nums) {\n int n = nums.length;\n int red = 0, blue = n-1;\n for(int i = 0; i <= blue; ) {\n if(nums[i] == 0) {\n int tmp = nums[red];\n nums[red++] = nums[i];\n nums[i] = tmp;\n i++;\n ... | [
"0.6326092",
"0.60621524",
"0.59901446",
"0.5915635",
"0.58460385",
"0.58428794",
"0.579945",
"0.5713489",
"0.56150466",
"0.5581201",
"0.5564545",
"0.55641663",
"0.54141766",
"0.5372615",
"0.5342953",
"0.53404546",
"0.53088564",
"0.5302378",
"0.5286073",
"0.5276543",
"0.52359... | 0.6931331 | 0 |
method which translate a card type into a color | private String translateColor(CardColor c) {
if (c == CardColor.BLUE) return Color.BLUE.getAnsiCode();
if (c == CardColor.VIOLET) return Color.RED.getAnsiCode();
if (c == CardColor.GREEN) return Color.GREEN.getAnsiCode();
else return Color.YELLOW.getAnsiCode();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Color determineColorFromType(String type)\n\t{\n\t\tIterator<String> iterator = this.tileTypeColorMap.keySet().iterator();\n\t\twhile (iterator.hasNext())\n\t\t{\n\t\t\tString key = iterator.next();\n\t\t\tif (key == type)\n\t\t\t{\n\t\t\t\treturn tileTypeColorMap.get(key);\n\t\t\t}\n\t\t}\n\t\treturn this... | [
"0.6590581",
"0.6565397",
"0.6422079",
"0.6402042",
"0.6391562",
"0.63548666",
"0.63504344",
"0.63487124",
"0.6328863",
"0.6294049",
"0.6277537",
"0.62148535",
"0.6196446",
"0.61446",
"0.61390525",
"0.61390525",
"0.61344844",
"0.60978186",
"0.6061345",
"0.6055739",
"0.6055739... | 0.63810384 | 5 |
method which builds a string to display a card | public String toString() {
String color = translateColor(card.getColor());
StringBuilder build = new StringBuilder();
build.append(color).append(" ").append(color).append(card.getCardID()).append(color).append(" ").append(Color.reset()).append("\n").append(color).append("╔════").append(color).append("Level").append(color).append("════╗").append(Color.reset()).append("\n").append(color).append("║ ").append(color).append(card.getLevel()).append(color).append(" ║").append(Color.reset()).append("\n").append(color).append("╠════").append(color).append("Cost").append(color).append("═════╣").append(Color.reset()).append("\n");
for (Resource resource : card.getCost().keySet()) {
build.append(color).append("║ ").append(CLI.colorResource(resource)).append(card.getCost().get(resource)).append(" ").append(CLI.shapeResource(resource)).append(color).append(" ║").append(Color.reset()).append("\n");
}
build.append(color).append("╠═").append(color).append("Production").append(color).append("══╣").append(Color.reset()).append("\n");
for (Resource resource : card.getProductionPower().getConsumedResources().keySet()) {
build.append(color).append("║ ").append(CLI.colorResource(resource)).append(card.getProductionPower().getConsumedResources().get(resource)).append(" ").append(CLI.shapeResource(resource)).append(color).append(" ║").append(Color.reset()).append("\n");
}
if (card.getProductionPower().getRequiredResourceOfChoice() != 0) {
build.append(color).append("║ ").append(color).append(+card.getProductionPower().getRequiredResourceOfChoice()).append(" ").append("?").append(color).append(" ║").append(Color.reset()).append("\n");
}
build.append(color).append("║ ").append(color).append("--->>> ").append(color).append(" ║ ").append(Color.reset()).append("\n");
for (Resource resource : card.getProductionPower().getProducedResources().keySet()) {
build.append(color).append("║ ").append(CLI.colorResource(resource)).append(card.getProductionPower().getProducedResources().get(resource)).append(" ").append(CLI.shapeResource(resource)).append(color).append(" ║").append(Color.reset()).append("\n");
}
if (card.getProductionPower().getFaithPointsProduced() != 0) {
build.append(color).append("║ ").append(color).append(+card.getProductionPower().getFaithPointsProduced()).append(" ").append("+").append(color).append(" ║").append(Color.reset()).append("\n");
}
if (card.getProductionPower().getProducedResourceOfChoice() != 0) {
build.append(color).append("║ ").append(color).append(+card.getProductionPower().getProducedResourceOfChoice()).append(" ").append("?").append(color).append(" ║").append(Color.reset()).append("\n");
}
build.append(color).append("╠═══").append(color).append("VPoints").append(color).append("═══╣").append(Color.reset()).append("\n");
if (card.getVictoryPoints() < 10) {
build.append(color).append("║ ").append(color).append(card.getVictoryPoints()).append(color).append(" ║").append(Color.reset()).append("\n");
} else
build.append(color).append("║ ").append(color).append(card.getVictoryPoints()).append(color).append(" ║").append(Color.reset()).append("\n");
build.append(color).append("╚════").append(color).append(color).append("═════════╝").append(Color.reset()).append("\n");
build.append((color + " " + color + color + " " + Color.reset() + "\n").repeat(5));
return build.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String displayCard()\n {\n card = \"\";\n \n switch(cardValue)\n {\n case 11:\n card+= \"J\";\n break;\n case 12:\n card+= \"Q\";\n break;\n case 13:\n card+= \"K\";\n ... | [
"0.8039015",
"0.7850435",
"0.7847962",
"0.7484997",
"0.7392211",
"0.73237324",
"0.72725105",
"0.7253949",
"0.71397316",
"0.7135865",
"0.7135234",
"0.70906186",
"0.70584506",
"0.7002688",
"0.69461465",
"0.69328487",
"0.69198287",
"0.690812",
"0.68780255",
"0.6859299",
"0.68201... | 0.73046416 | 6 |
Uses logic from AutoLiftTest Contains button press logic Uses switch statement to know how to go to each level | public void liftSet(Gamepad gamepad1) {
levelPlus = gamepad1.dpad_up;
levelMinus = gamepad1.dpad_down;
if(!pressP){
if (levelPlus) {
if (level < 8){
level++;
liftPress=true;
}
pressP = true;
}
}
else{
if (!levelPlus){
pressP = false;
}
}
if(!pressM){
if (levelMinus) {
if(level > 0){
level--;
liftPress=true;
}
pressM = true;
}
}
else{
if (!levelMinus){
pressM = false;
}
}
if(liftPress) {
switch (level) {
case 0:
if(distanceLift.getDistance(DistanceUnit.CM) > 1) { //3
lift.setPower(-0.4);
}
else{
lift.setPower(0);
liftPress = false;
}
break;
case 1:
if (distanceLift.getDistance(DistanceUnit.CM) < 10) { //10.5
lift.setPower(0.8);
}
else if(distanceLift.getDistance(DistanceUnit.CM) > 11) {
lift.setPower(-0.4);
}
else{
lift.setPower(0.1);
liftPress = false;
}
break;
case 2:
if (distanceLift.getDistance(DistanceUnit.CM) < 20) { //20.5
lift.setPower(0.8);
}
else if(distanceLift.getDistance(DistanceUnit.CM) > 21) {
lift.setPower(-0.4);
}
else{
lift.setPower(0.1);
liftPress = false;
}
break;
case 3:
if (distanceLift.getDistance(DistanceUnit.CM) < 30) { //30.5
lift.setPower(0.8);
}
else if(distanceLift.getDistance(DistanceUnit.CM) > 31) {
lift.setPower(-0.4);
}
else{
lift.setPower(0.1);
liftPress = false;
}
break;
case 4:
if (distanceLift.getDistance(DistanceUnit.CM) < 40) { //40.5
lift.setPower(0.8);
}
else if(distanceLift.getDistance(DistanceUnit.CM) > 41) {
lift.setPower(-0.4);
}
else{
lift.setPower(0.1);
liftPress = false;
}
break;
case 5:
if (distanceLift.getDistance(DistanceUnit.CM) < 55) { //54
lift.setPower(0.8);
}
else if(distanceLift.getDistance(DistanceUnit.CM) > 56) {
lift.setPower(-0.4);
}
else{
lift.setPower(0.1);
liftPress = false;
}
break;
case 6:
if (distanceLift.getDistance(DistanceUnit.CM) < 63) { //62
lift.setPower(0.8);
}
else if(distanceLift.getDistance(DistanceUnit.CM) > 64) {
lift.setPower(-0.4);
}
else{
lift.setPower(0.1);
liftPress = false;
}
break;
case 7:
if (distanceLift.getDistance(DistanceUnit.CM) < 73) { //72
lift.setPower(0.8);
}
else if(distanceLift.getDistance(DistanceUnit.CM) > 74) {
lift.setPower(-0.4);
}
else{
lift.setPower(0.1);
liftPress = false;
}
break;
case 8:
if (distanceLift.getDistance(DistanceUnit.CM) < 82) { //81
lift.setPower(0.8);
}
else if(distanceLift.getDistance(DistanceUnit.CM) > 83) {
lift.setPower(-0.4);
}
else{
lift.setPower(0.1);
liftPress = false;
}
break;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void switch_level_game(){\n switch (level_name){\n case \"Beginners\":\n uri_grammar1 = \"https://www.talkenglish.com/grammar/grammar.aspx\";\n uri_grammar2 = \"https://www.englisch-hilfen.de/en/exercises_list/alle_grammar.htm\";\n uri_grammar3... | [
"0.64392334",
"0.6032438",
"0.598092",
"0.59552044",
"0.59209436",
"0.5833073",
"0.5817496",
"0.58107823",
"0.57858425",
"0.5742867",
"0.57307947",
"0.57302815",
"0.5709617",
"0.5693304",
"0.5676066",
"0.5667923",
"0.56656915",
"0.5636981",
"0.56316996",
"0.56097335",
"0.5604... | 0.0 | -1 |
/Intent i = new Intent(FullScreenViewActivity.this,StartActivity.class); startActivity(i); finish(); | @Override
public void onClick(View v) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void refreshScreen(){\n Intent thisIntent = getIntent();\n finish();\n startActivity(thisIntent);\n }",
"@Override\r\n public void onClick(View v) {\n finish();\r\n IntentToStartView();\r\n }",
"@Override\n public vo... | [
"0.730324",
"0.72984725",
"0.72725147",
"0.72667634",
"0.7245563",
"0.72161025",
"0.7210839",
"0.7183041",
"0.7164933",
"0.713136",
"0.70922965",
"0.7092197",
"0.70633125",
"0.70619875",
"0.7053885",
"0.704319",
"0.7041496",
"0.70361644",
"0.7035087",
"0.7032611",
"0.7020131"... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onBackPressed() {
super.onBackPressed();
} | {
"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 |
for identify the icon image. | public String getId() {
return mId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getIcon();",
"String getIcon();",
"java.lang.String getIcon();",
"java.lang.String getIcon();",
"public int getIconImageNumber(){return iconImageNumber;}",
"public abstract ImageDescriptor getIcon();",
"public ImageDescriptor getIcon();",
"public int getIconId(){\n return mIconId;\n ... | [
"0.76152205",
"0.76152205",
"0.75999355",
"0.75999355",
"0.7595201",
"0.74269736",
"0.73658717",
"0.72315556",
"0.7202867",
"0.7199555",
"0.7187047",
"0.7158677",
"0.709988",
"0.70938027",
"0.70616335",
"0.70559525",
"0.70310414",
"0.70310414",
"0.70310414",
"0.70310414",
"0.... | 0.0 | -1 |
if any error occurs in the network operations, show the TextView that contains the error message | public static void handleVolleyError(VolleyError error,Activity actvity) {
String str;
if (error instanceof TimeoutError || error instanceof NoConnectionError) {
str = "Oops! Your Connection Timed Out, Seems there is no Network !!!";
Log.e("VolleyError"," volly "+str);
if (actvity!=null)
{
Crouton.makeText(actvity, "Oops! Your Connection Timed Out May be Network Messed Up", Style.ALERT).show();
}
//getResources(R.string.error_timeout).toString();
} else if (error instanceof AuthFailureError) {
str = "Oops! carteckh Says It Doesn\'t Recognize You";
Log.e("VolleyError"," volly "+str);
//mTextError.setText(R.string.error_auth_failure);
//TODO
} else if (error instanceof ServerError) {
str = "Oops! carteckh Server Just Messed Up";
Log.e("VolleyError"," volly "+str);
// mTextError.setText(R.string.error_auth_failure);
//TODO
} else if (error instanceof NetworkError) {
str = "Oops! Your Connection Timed Out May be Network Messed Up";
Log.e("VolleyError"," volly "+str);
//TODO
} else if (error instanceof ParseError) {
str = "Oops! Data Received Was An Unreadable Mess";
Log.e("VolleyError"," volly "+str);
//TODO
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void showErrorMessage() {\n /* First, hide the currently visible data */\n mEmptyTextView.setText(\"No Internet Connection\");\n mRecyclerView.setVisibility(View.INVISIBLE);\n /* Then, show the error */\n mEmptyTextView.setVisibility(View.VISIBLE);\n }",
"public void... | [
"0.79007596",
"0.7520301",
"0.74941444",
"0.73865217",
"0.7339133",
"0.71917236",
"0.7177998",
"0.7121963",
"0.70160824",
"0.69943345",
"0.6982991",
"0.6970264",
"0.69453275",
"0.69446576",
"0.6928541",
"0.6928541",
"0.69127935",
"0.68891186",
"0.68743116",
"0.68594795",
"0.6... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Iterator<TensorScalar> iterator() {
return null;
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
redirecting if the user is already logged in to the home activity | @Override
protected void onStart(){
super.onStart();
FirebaseUser user=auth.getCurrentUser();
if(user!=null){
startActivity(new Intent(MainActivity.this,HomeActivity.class));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkIfLoggedIn() {\n LocalStorage localStorage = new LocalStorage(getApplicationContext());\n\n if(localStorage.checkIfAuthorityPresent()){\n Intent intent = new Intent(getApplicationContext(),AuthorityPrimaryActivity.class);\n startActivity(intent);\n } els... | [
"0.74015313",
"0.7191325",
"0.69848764",
"0.6928248",
"0.68389815",
"0.6812041",
"0.67961586",
"0.6767051",
"0.674034",
"0.67301476",
"0.6728948",
"0.67030716",
"0.6698831",
"0.6620836",
"0.66066563",
"0.6589924",
"0.65674883",
"0.6560653",
"0.65392005",
"0.65196294",
"0.6515... | 0.66859424 | 13 |
TODO Autogenerated method stub | @Override
protected Integer add(Integer x1, Integer x2) {
return x2+x1;
} | {
"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
protected Integer zero() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
/ Linux problem We are using the solution available on the site below to face the problem of the process deadlock when it is started from another process. | public static void exec(String command, long miliseconds) throws IOException, InterruptedException {
FileOutputStream fos = new FileOutputStream(Thread.currentThread().getName());
Runtime r = Runtime.getRuntime();
Process proc = null;
if (System.getProperty("os.name").toLowerCase().contains("win")) {
proc = r.exec( "cmd /c start /min /wait "+command );
} else {
proc = r.exec(Util.msg(command));
// any error message?
StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
// any output?
StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT", fos);
// kick them off
errorGobbler.start();
outputGobbler.start();
}
if (miliseconds>0){
proc.waitFor(miliseconds, TimeUnit.MILLISECONDS);
}
fos.flush();
fos.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void checkDeadLock()\r\n/* 303: */ {\r\n/* 304:389 */ EventExecutor e = executor();\r\n/* 305:390 */ if ((e != null) && (e.inEventLoop())) {\r\n/* 306:391 */ throw new BlockingOperationException(toString());\r\n/* 307: */ }\r\n/* 308: */ }",
"@Override\r\n\t\t\tpublic voi... | [
"0.5916886",
"0.58064085",
"0.5773912",
"0.5648407",
"0.5565421",
"0.5508809",
"0.5506851",
"0.5503967",
"0.54187346",
"0.53994393",
"0.5368815",
"0.53644365",
"0.5359849",
"0.5342369",
"0.5342021",
"0.53293186",
"0.53293186",
"0.53293186",
"0.53293186",
"0.53293186",
"0.5329... | 0.0 | -1 |
Default constructor Applying singleton | private MockarooPingHelper(){} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Singleton(){}",
"private Singleton()\n\t\t{\n\t\t}",
"private Singleton() {\n\t}",
"private Singleton() { }",
"private LazySingleton(){}",
"private SingletonObject() {\n\n\t}",
"private SingletonSample() {}",
"private Singleton(){\n }",
"private SingletonSigar(){}",
"private SparkeySer... | [
"0.8180924",
"0.7981316",
"0.789409",
"0.78686476",
"0.7786066",
"0.77625585",
"0.7753489",
"0.77101016",
"0.7622935",
"0.7433799",
"0.73717874",
"0.7338361",
"0.7263091",
"0.7259152",
"0.72239745",
"0.7137737",
"0.7091383",
"0.70722574",
"0.7031634",
"0.7028764",
"0.7028764"... | 0.0 | -1 |
Receive input from the user | public static String getInput() {
Scanner inputReader = new Scanner(System.in);
String userInput;
userInput = inputReader.nextLine();
return userInput;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void takeUserInput() {\n\t\t\r\n\t}",
"String getUserInput();",
"void requestInput();",
"public String onInputMessage(String userInput) throws QuitException{\n if (!userInput.equals(\"\"))\n System.out.println(userInput);\n\n //Enter data using BufferReader \n BufferedR... | [
"0.7753713",
"0.77266914",
"0.7541556",
"0.752562",
"0.7310826",
"0.70930445",
"0.7087443",
"0.7077517",
"0.7045825",
"0.7012974",
"0.69576925",
"0.6951017",
"0.69417197",
"0.69159997",
"0.6910725",
"0.6904562",
"0.68912405",
"0.6889629",
"0.6877303",
"0.6869804",
"0.68515044... | 0.6312101 | 69 |
returns a string formatted as currency | public static String formatCurrency(double amt) {
NumberFormat formatter = NumberFormat.getCurrencyInstance();
return formatter.format(amt);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String formatCurrency( double amt ) {\n return formatCurrency( amt, 2 );\n }",
"public String centsToDollar() {\n return partieEntier + \".\" +\n String.format(\"%02d\", partieFractionnaire) + \"$\";\n }",
"private String currencyFormat(BigDecimal amount) {\n r... | [
"0.80469584",
"0.73165333",
"0.71502906",
"0.71049297",
"0.70521265",
"0.70454246",
"0.7023428",
"0.7016047",
"0.6951574",
"0.6867203",
"0.6864785",
"0.6838018",
"0.68300474",
"0.68300474",
"0.68300474",
"0.68300474",
"0.6824593",
"0.68192106",
"0.68020916",
"0.6770973",
"0.6... | 0.73576224 | 1 |
returns a string formatted as a number with commas at the thousands | public static String formatNumber(double num) {
NumberFormat.getNumberInstance(Locale.US).format(35634646);
NumberFormat formatter = NumberFormat.getNumberInstance(Locale.US);
return formatter.format(num);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String insertThousandCommas( int number )\n {\n return thousands.format( number );\n }",
"public static String commafyF(int n) {\n //convert n tostr to allow for comma addition\n String ns = Integer.toString(n);\n \n //if d(n)>3, we add commas every third... | [
"0.7404292",
"0.66674334",
"0.6620018",
"0.65042377",
"0.6362374",
"0.63377035",
"0.63117415",
"0.6203911",
"0.61710465",
"0.60694015",
"0.6024224",
"0.6004797",
"0.5989503",
"0.5970321",
"0.5951287",
"0.5950022",
"0.591272",
"0.5907722",
"0.5848153",
"0.58381",
"0.5821857",
... | 0.5857878 | 18 |
returns a string formatted as a date in a MMDDYYYY format | public static String formatDate(Date date) {
String newstring = new SimpleDateFormat("MM-dd-yyyy").format(date);
return newstring;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getDate() {\n\t\tDate date = new Date();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"ddMMYYYY\");\n\t\tString strDate = formatter.format(date);\n\t\treturn strDate;\n\t}",
"private static String getDateStr() {\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tDateFormat da... | [
"0.72786605",
"0.7221126",
"0.70084167",
"0.69748527",
"0.6932954",
"0.68671876",
"0.67745334",
"0.6766432",
"0.6748079",
"0.67405254",
"0.67048514",
"0.66970617",
"0.66903913",
"0.6673275",
"0.6666316",
"0.66341305",
"0.66100234",
"0.6534457",
"0.6534457",
"0.6532453",
"0.65... | 0.61574763 | 48 |
returns a string formatted as a multiline paragraph | public static String formatParagragh(String text, Integer colWidth) {
String formattedStr = "";
String lineStr = "";
String[] textArray = text.split(" ");
for (String x : textArray) {
if ((lineStr + x).length() > colWidth) {
formattedStr += "\n" + lineStr;
lineStr = "";
}
else lineStr += " " + x;
}
if (lineStr != "") formattedStr += "\n" + lineStr;
return formattedStr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static CharSequence toMultilineMarkup(final CharSequence s)\n\t{\n\t\tif (s == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tfinal AppendingStringBuffer buffer = new AppendingStringBuffer();\n\t\tint newlineCount = 0;\n\n\t\tbuffer.append(\"<p>\");\n\t\tfor (int i = 0; i < s.length(); i++)\n\t\t{\n\t\t\tfi... | [
"0.6748601",
"0.6738295",
"0.64285856",
"0.6339165",
"0.61036855",
"0.59956473",
"0.5922099",
"0.5922099",
"0.5922099",
"0.5922099",
"0.5922099",
"0.5922099",
"0.5916427",
"0.5799107",
"0.57780474",
"0.5761301",
"0.5754082",
"0.5750928",
"0.56443375",
"0.56374514",
"0.5449521... | 0.48088297 | 81 |
returns a string with spaces padding the column for alignment purposes | public static String formatColumn(String colText, Integer colWidth, boolean leftJustify) {
String str50Spaces = " ";
String paddedResult;
if (leftJustify) paddedResult = (colText + str50Spaces).substring(0, colWidth);
else paddedResult = (str50Spaces + colText).substring(colWidth - colText.length());
return paddedResult;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String padDataForOutputTable(int padding) {\n\t\treturn String.format(\"%-\" + padding + \"s\", this.getWeight());\n\t}",
"public String buildColumnHeader() {\n if (padder == null) {\n return this.destColumnName;\n }\n return padder.doPadding(this.destColumnName);\n }",
... | [
"0.68319696",
"0.6566197",
"0.6512763",
"0.65038437",
"0.64192",
"0.63274306",
"0.6317087",
"0.6280665",
"0.62779236",
"0.6269246",
"0.62579066",
"0.62562925",
"0.61764216",
"0.6173631",
"0.6133166",
"0.61074567",
"0.6088143",
"0.60750085",
"0.60507494",
"0.6043624",
"0.60406... | 0.7096452 | 0 |
returns the name of the month | public String getMonth(int month) {
return new DateFormatSymbols().getMonths()[month-1];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getMonthName()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1)\r\n {return \"January\";}\r\n else if (mn == 2)\r\n {return \"February\";}\r\n else if (mn == 3)\r\n {return \"March\";}\r\n else if (mn == 4)\r\n {return \"April\";}\r... | [
"0.867543",
"0.8394262",
"0.7971138",
"0.784626",
"0.77890444",
"0.77094173",
"0.7675608",
"0.763777",
"0.76103693",
"0.75914085",
"0.75251967",
"0.7505526",
"0.7487115",
"0.7331129",
"0.73043734",
"0.72930396",
"0.7288687",
"0.7156987",
"0.71398336",
"0.71374637",
"0.706793"... | 0.7367595 | 13 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.