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 |
|---|---|---|---|---|---|---|
File METHODS method to get all files from a particular folder path | public File[] getAllFiles(String sFolderPath) {
File[] files = null;
ArrayList<File> altemp = new ArrayList<File>();
try {
File folder = new File(sFolderPath);
files = folder.listFiles();
for (int i = 0; i < files.length; i++) {
if (files[i].isFile()) {
altemp.add(files[i]);
}
}
files = null;
files = altemp.toArray(new File[altemp.size()]);
} catch (Exception e) {
files = null;
} finally {
return files;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Path> getFiles();",
"File[] getFilesInFolder(String path) {\n return new File(path).listFiles();\n }",
"public static void getAllFiles()\n\t{\n\t\t//Getting the File Name\n\n\t\tList<String> fileNames = FileManager.getAllFiles(folderpath);\n\t\n\t\tfor(String f:fileNames)\n\t\tSystem.out.println... | [
"0.7929717",
"0.7857711",
"0.7686616",
"0.76187545",
"0.7608877",
"0.7545611",
"0.7470408",
"0.7363753",
"0.7326148",
"0.72024333",
"0.7142466",
"0.7128243",
"0.71114594",
"0.7023966",
"0.6996091",
"0.69944555",
"0.6969765",
"0.6969691",
"0.6945279",
"0.69046366",
"0.68852943... | 0.7322117 | 9 |
method to read complete file in string from classpath inside jar based on class object | public String ReadFile_FromClassPath(String sFileName) {
String stemp = null;
try {
InputStream is = getClass().getClassLoader().getResourceAsStream(sFileName);
stemp = getStringFromInputStream(is);
} catch (Exception e) {
stemp = null;
throw new Exception("ReadFile_FromClassPath : " + e.toString());
} finally {
return stemp;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getDataFromClassResourceFile(String file) {\n\n StringBuffer sb = new StringBuffer();\n String str = \"\";\n\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(file);\n try {\n BufferedReader reader = new BufferedReader(new InputStreamReade... | [
"0.6325339",
"0.6014968",
"0.5947269",
"0.5944533",
"0.5803251",
"0.57674164",
"0.5734069",
"0.5725754",
"0.5712476",
"0.5680995",
"0.56615853",
"0.5655229",
"0.5650052",
"0.56497824",
"0.56489956",
"0.5648792",
"0.5617679",
"0.5595867",
"0.55602896",
"0.55496764",
"0.5549320... | 0.6419711 | 0 |
method to read complete file in string[] array from classpath inside jar based on class object | public String[] ReadAllFileLines_FromClassPath(String sFileName) {
String[] satemp = null;
try {
InputStream is = getClass().getClassLoader().getResourceAsStream(sFileName);
satemp = getStringArrayFromInputStream(is);
} catch (Exception e) {
satemp = null;
throw new Exception("ReadAllFileLines_FromClassPath : " + e.toString());
} finally {
return satemp;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String[] readClasses();",
"public List<Clazz> loadAndScanJar()\n\t\t\tthrows ClassNotFoundException, ZipException, IOException {\n\t\tsuper.addURL(new File(path).toURI().toURL());\n\t\tList<Clazz> representations=new ArrayList<Clazz>();\n\n\t\t// Count the classes loaded\n\t\t// Your jar file\n\t\tFile f ... | [
"0.7006697",
"0.6276295",
"0.6058555",
"0.59936947",
"0.5784446",
"0.5748443",
"0.5682245",
"0.5657504",
"0.5618818",
"0.55921066",
"0.5555699",
"0.5555438",
"0.5545898",
"0.55306274",
"0.5519419",
"0.5513427",
"0.5509308",
"0.5474391",
"0.5467838",
"0.5463271",
"0.5447416",
... | 0.65122986 | 1 |
method reads all lines of a files into a String array from a file on HDD | public String[] ReadAllFileLines(String sFilePath) throws Exception {
File f = null;
FileInputStream fstream = null;
DataInputStream in = null;
BufferedReader br = null;
String strLine = "";
String[] stemp = null;
StringBuffer strbuff = new StringBuffer();
try {
//getting file oject
f = new File(sFilePath);
if (f.exists()) {
//get object for fileinputstream
fstream = new FileInputStream(f);
// Get the object of DataInputStream
in = new DataInputStream(fstream);
//get object for bufferreader
br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
//Read File Line By Line
while ((strLine = br.readLine()) != null) {
strbuff.append(strLine + "##NL##");
}
stemp = strbuff.toString().split("##NL##");
} else {
throw new Exception("File Not Found!!");
}
return stemp;
} catch (Exception e) {
throw new Exception("ReadAllFileLines : " + e.toString());
} finally {
//Close the input stream
try {
br.close();
} catch (Exception e) {
}
try {
fstream.close();
} catch (Exception e) {
}
try {
in.close();
} catch (Exception e) {
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String[] readFile(BufferedReader reader) throws IOException {\r\n // Read each line in the file, add it to the ArrayList lines\r\n ArrayList<String> lines = new ArrayList<String>();\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n lines.add(line);\r\n }\r\n reade... | [
"0.7789185",
"0.76824576",
"0.751451",
"0.74439406",
"0.74428594",
"0.71342593",
"0.71101594",
"0.705629",
"0.705571",
"0.70327044",
"0.70028716",
"0.6966114",
"0.69469845",
"0.69423294",
"0.6937069",
"0.6919193",
"0.69176036",
"0.6837711",
"0.6789965",
"0.6776568",
"0.676705... | 0.7201649 | 5 |
method reads all file into a string variable from a file on HDD | public String ReadFile(String sFilePath) throws Exception {
File f = null;
FileInputStream fstream = null;
String stemp = "";
try {
//getting file oject
f = new File(sFilePath);
//get object for fileinputstream
fstream = new FileInputStream(f);
//getting byte array length
byte data[] = new byte[fstream.available()];
//getting file stream data into byte array
fstream.read(data);
//storing byte array data into String
stemp = new String(data);
return stemp;
} catch (Exception e) {
throw new Exception("ReadFile : " + e.toString());
} finally {
try {
fstream.close();
} catch (Exception e) {
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String readFileToString(String filePath) throws IOException {\n\t\tStringBuilder fileData = new StringBuilder(1000);\n\t\tBufferedReader reader = new BufferedReader(new FileReader(filePath));\n\t\tchar[] buf = new char[10];\n\t\tint numRead = 0;\n\t\twhile ((numRead = reader.read(buf)) != -1) {\n\t\... | [
"0.7443202",
"0.7315426",
"0.72186536",
"0.71853745",
"0.71615785",
"0.715444",
"0.7134137",
"0.7115979",
"0.70603216",
"0.7052144",
"0.7031198",
"0.7031198",
"0.7031198",
"0.7022255",
"0.70151436",
"0.70098585",
"0.6947592",
"0.692079",
"0.6920743",
"0.69100094",
"0.6906119"... | 0.6924612 | 17 |
method copies a file from one location to other location | public int Copy(final String sSourceFile, final String sDestinationtFile, final int EXISITING_FILE_ACTION) throws Exception {
OutputStream out = null;
InputStream in = null;
File fSrc = null;
File fDest = null;
File fDestDir = null;
byte[] buf = null;
int len = 0;
int iFileCopied = 0;
boolean bProcess = false;
try {
buf = new byte[4096];
//reating source file object
fSrc = new File(sSourceFile);
if (!fSrc.exists()) {
throw new Exception("Source File Does not exists!! :" + sSourceFile);
}
//creating output file object
fDest = new File(sDestinationtFile);
//check for folder/directory
if (fSrc.isDirectory()) {
File[] fSubFiles = fSrc.listFiles();
//creating destination directory
if (!fDest.exists()) {
fDest.mkdirs();
}
for (int i = 0; i < fSubFiles.length; i++) {
String sSourceSubFile = sSourceFile + File.separator + fSubFiles[i].getName();
String sDestinationtSubFile = sDestinationtFile + File.separator + fSubFiles[i].getName();
iFileCopied = iFileCopied + Copy(sSourceSubFile, sDestinationtSubFile, EXISITING_FILE_ACTION);
}
//check for file
} else {
//creating input stream of source file
in = new FileInputStream(fSrc);
//check for destination file parent directory
fDestDir = fDest.getParentFile();
if (!fDestDir.exists()) {
fDestDir.mkdirs();
}
//check for exisitng file
//REPLACE EXISITNG FILE
if (fDest.exists() && EXISITING_FILE_ACTION == FILE_REPLACE) {
bProcess = true;
out = new FileOutputStream(fDest);
//APPEND EXISITNG FILE
} else if (fDest.exists() && EXISITING_FILE_ACTION == FILE_APPEND) {//For Append the file.
bProcess = true;
out = new FileOutputStream(fDest, true);
//COPY WITH TIMESTAMP WITH EXISITNG FILE
} else if (fDest.exists() && EXISITING_FILE_ACTION == FILE_COPY_WITH_TIMESTAMP) {//For Append the file.
bProcess = true;
String sTimeStamp = fDest.lastModified() + "_";
fDest = new File(fDest.getParent() + File.separator + sTimeStamp + fDest.getName());
out = new FileOutputStream(fDest);
//DO NOTHING EXISITNG FILE
} else if (fDest.exists() && EXISITING_FILE_ACTION == FILE_DO_NOTHING) {//For Append the file.
bProcess = false;
//file does not exists
} else if (!fDest.exists()) {
bProcess = true;
out = new FileOutputStream(fDest, true);
}
//loop to read buffer & copy in output file
while ((len = in.read(buf)) > 0 && bProcess) {
out.write(buf, 0, len);
}
iFileCopied = iFileCopied + 1;
}
return iFileCopied;
} catch (Exception e) {
throw e;
} finally {
try {
in.close();
} catch (Exception e) {
}
try {
out.close();
} catch (Exception e) {
}
in = null;
out = null;
fSrc = null;
fDest = null;
fDestDir = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void copyFile(String sourceFile, String destinationFile) throws IOException;",
"public void copyOne(String from, String to) {\n\t\tFile source = new File(from);\n\t\tif (sourceExists(source)) {\n\t\t\tFile target = new File(to);\n\t\t\ttry{\n\t\t\t\tif(!targetExists(target)){\n\t\t\t\t\tFiles.copy(source.toPath(... | [
"0.768934",
"0.7509614",
"0.75014025",
"0.74984944",
"0.74289006",
"0.73592585",
"0.735723",
"0.7223716",
"0.72134626",
"0.7110795",
"0.70647675",
"0.70055",
"0.6993118",
"0.6974994",
"0.68959504",
"0.686023",
"0.68559253",
"0.68356717",
"0.68333817",
"0.6817528",
"0.6721393"... | 0.6182848 | 54 |
method moves a file from one location to other location | public int Move(String sSourcePath, String sDestinationPath, int EXISTING_FILE_ACTION) {
int iRetVal = 0;
int iCopyCount = 0;
int iDeleteCount = 0;
try {
//check if source & destination path are same.
if (sSourcePath.equalsIgnoreCase(sDestinationPath)) {
iRetVal = 0;
}
//copying file for movement
iCopyCount = Copy(sSourcePath, sDestinationPath, EXISTING_FILE_ACTION);
if (iCopyCount > 0) {
iDeleteCount = Delete(sSourcePath);
}
if (iCopyCount == iDeleteCount) {
iRetVal = iCopyCount;
} else if (iCopyCount > iDeleteCount) {
iRetVal = iDeleteCount;
} else if (iCopyCount < iDeleteCount) {
iRetVal = iCopyCount;
}
} catch (Exception exp) {
println("move : " + exp.toString());
iRetVal = 0;
} finally {
return iRetVal;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void moveFile(String pathToFile, String pathDirectory);",
"void moveFile(String sourceName, String destinationName, boolean overwrite) throws IOException;",
"void move(Path repoRoot, Path source, Path target);",
"public static void main(String[] args){\nFile from = new File(\"d:/prac/shubha.txt\");\r\n//rena... | [
"0.7839009",
"0.7024468",
"0.6842362",
"0.67757",
"0.67627406",
"0.672159",
"0.6603478",
"0.6538548",
"0.6396593",
"0.63799673",
"0.6372421",
"0.630987",
"0.62827754",
"0.62509054",
"0.6212487",
"0.62085253",
"0.6194852",
"0.61936414",
"0.6186201",
"0.6155985",
"0.61506945",
... | 0.6025278 | 25 |
method to delete file or folder | public int Delete(String sTargetPath) throws Exception {
File ftarget = null;
int iRetVal = 0;
try {
ftarget = new File(sTargetPath);
if (ftarget.isDirectory()) {
File[] fsubtargets = ftarget.listFiles();
for (int i = 0; i < fsubtargets.length; i++) {
iRetVal = iRetVal + Delete(sTargetPath + File.separator + fsubtargets[i].getName());
}
ftarget.delete();;
} else {
ftarget.delete();
}
return iRetVal;
} catch (Exception e) {
throw e;
} finally {
ftarget = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deleteFile(FsPath path);",
"public void deleteFile(File f);",
"@Override\n public void delete(File file) {\n }",
"public File delete(File f) throws FileDAOException;",
"public void delete_File(){\n context.deleteFile(Constant.FILE_NAME);\n }",
"void deleteFile(FileReference fileRefe... | [
"0.79961836",
"0.7981843",
"0.742981",
"0.7385635",
"0.7371089",
"0.7363688",
"0.72884446",
"0.72842765",
"0.7282068",
"0.7192046",
"0.71865976",
"0.71690595",
"0.7079669",
"0.7070663",
"0.7068429",
"0.70496064",
"0.7006267",
"0.6913713",
"0.689668",
"0.6895886",
"0.6884393",... | 0.0 | -1 |
method to read INI file (WINDOWS format) | public String ReadINI(String Section, String Key, String FilePath) {
String sValue = "";
int iRetVal = -2;
String[] FileLines = null;
String sTemp = "";
boolean bKeyFound = false;
boolean bSectionFound = false;
int i = 0;
int counter = 0;
try {
FileLines = ReadAllFileLines(FilePath);
for (i = 0; i < FileLines.length; i++) {
sTemp = FileLines[i].trim();
if (sTemp.charAt(0) == '[' && sTemp.charAt(sTemp.length() - 1) == ']') {
if (sTemp.substring(1, sTemp.length() - 1).equalsIgnoreCase(Section)) {
bSectionFound = true;
counter = i + 1;
while (!bKeyFound) {
}
}
}
if (bKeyFound) {
break;
}
}
if (!bKeyFound) {
throw new Exception(" : Section :" + Section + " : key : " + Key + " :Not found");
}
} catch (Exception exp) {
iRetVal = -2;
}
return sValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ReadConfigFile (){\n\t\ttry {\n\t\t\tinput = ReadConfigFile.class.getClassLoader().getResourceAsStream(Constant.CONFIG_PROPERTIES_DIRECTORY);\n\t\t\tprop = new Properties();\n\t\t\tprop.load(input);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}catch ( IOException e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}",
... | [
"0.5890178",
"0.5688023",
"0.5680303",
"0.56350964",
"0.55298495",
"0.5502592",
"0.54222655",
"0.5376899",
"0.5368613",
"0.5353768",
"0.5326466",
"0.5249664",
"0.52364993",
"0.51919025",
"0.51643157",
"0.5143627",
"0.5138968",
"0.5132742",
"0.5049769",
"0.504556",
"0.5035538"... | 0.53927517 | 7 |
end READINI method to get file extension of a file | public String getFileExtension(File objFile) {
String sFileName = null;
String sExtension = null;
try {
if (!objFile.exists()) {
throw new Exception("File does not exists");
}
sFileName = objFile.getName();
int i = sFileName.lastIndexOf('.');
if (i > 0) {
sExtension = sFileName.substring(i + 1).trim();
}
} catch (Exception e) {
println("Methods.getFileExtension : " + e.toString());
sExtension = "";
} finally {
return sExtension;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int lookupReadFileExtension(String extension);",
"String getFileExtension();",
"public String getReadFileExtension(int formatIndex);",
"private static char getFileExt(String file) {\r\n \treturn file.charAt(file.indexOf('.')+1);\r\n }",
"public String getFileExtension();",
"protected abstrac... | [
"0.75096524",
"0.7453803",
"0.74021757",
"0.7398774",
"0.7342182",
"0.71963286",
"0.71880794",
"0.7173616",
"0.7138183",
"0.7102335",
"0.70659584",
"0.7053923",
"0.70193297",
"0.6866675",
"0.684527",
"0.67864954",
"0.67847335",
"0.67681336",
"0.67617553",
"0.6751575",
"0.6748... | 0.6811519 | 15 |
method to sort file object by ites name | public File[] SortFilesByName(final File[] Files, final boolean bCaseSensitive, final boolean bSortDesecnding) {
File[] faFiles = null;
Comparator<File> comparator = null;
try {
faFiles = Files.clone();
if (faFiles == null) {
throw new Exception("Null File Array Object");
}
//check if array consists of more than 1 file
if (faFiles.length > 1) {
//creating Comparator
comparator = new Comparator<File>() {
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone(); //To change body of generated methods, choose Tools | Templates.
}
@Override
public int compare(File objFile1, File objFile2) {
String Str1 = objFile1.getName();
String Str2 = objFile2.getName();
if (bCaseSensitive) {
int iRetVal = objFile1.getName().compareTo(objFile2.getName());
return iRetVal;
} else {
int iRetVal = objFile1.getName().compareToIgnoreCase(objFile2.getName());
return iRetVal;
}
}
};
//Sorting Array
if (bSortDesecnding) {//Descending
} else {//Ascending
Arrays.sort(faFiles, comparator);
}
}
} catch (Exception e) {
faFiles = null;
} finally {
return faFiles;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int compare(File o1, File o2) {\n if (desc) {\n return -o1.getFileName().compareTo(o2.getFileName());\n }\n return o1.getFileName().compareTo(o2.getFileName());\n }",
"private void sort() {\n setFiles(getFileStreamFromView());\n }",
"public void s... | [
"0.72009665",
"0.71134895",
"0.6819677",
"0.68182033",
"0.67074585",
"0.66604745",
"0.65176404",
"0.6513625",
"0.635522",
"0.63166666",
"0.62951475",
"0.62918425",
"0.623394",
"0.62075645",
"0.6191847",
"0.61697865",
"0.61366004",
"0.60549265",
"0.6052062",
"0.60381526",
"0.6... | 0.6506237 | 8 |
method to sort file object by ites name | public File[] SortFilesByDate(final File[] Files, final boolean bSortDesecnding) {
File[] faFiles = null;
Comparator<File> comparator = null;
try {
faFiles = Files.clone();
if (faFiles == null) {
throw new Exception("Null File Array Object");
}
//check if array consists of more than 1 file
if (faFiles.length > 1) {
//creating Comparator
comparator = new Comparator<File>() {
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone(); //To change body of generated methods, choose Tools | Templates.
}
@Override
public int compare(File objFile1, File objFile2) {
String Str1 = objFile1.getName();
String Str2 = objFile2.getName();
if (bSortDesecnding) {
int iRetVal = objFile1.getName().compareTo(objFile2.getName());
return iRetVal;
} else {
int iRetVal = objFile1.getName().compareToIgnoreCase(objFile2.getName());
return iRetVal;
}
}
};
//Sorting Array
Arrays.sort(faFiles, comparator);
}
} catch (Exception e) {
faFiles = null;
} finally {
return faFiles;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int compare(File o1, File o2) {\n if (desc) {\n return -o1.getFileName().compareTo(o2.getFileName());\n }\n return o1.getFileName().compareTo(o2.getFileName());\n }",
"private void sort() {\n setFiles(getFileStreamFromView());\n }",
"public void s... | [
"0.72009665",
"0.71134895",
"0.6819677",
"0.68182033",
"0.67074585",
"0.66604745",
"0.65176404",
"0.6513625",
"0.6506237",
"0.635522",
"0.63166666",
"0.62951475",
"0.62918425",
"0.623394",
"0.62075645",
"0.6191847",
"0.61697865",
"0.60549265",
"0.6052062",
"0.60381526",
"0.60... | 0.61366004 | 17 |
PROPERTY File METHODS method reads all property in file in hashmap | public HashMap<String, String> readPropertyFile(String propertyFilePath) throws Exception {
File propertyFile = null;
InputStream inputStream = null;
Properties properties = null;
HashMap<String, String> propertyMap = new HashMap<String, String>();
try {
//creating file object
propertyFile = new File(propertyFilePath);
//check if property file exists on hard drive
if (propertyFile.exists()) {
inputStream = new FileInputStream(propertyFile);
// check if the file exists in web environment or relative to class path
} else {
inputStream = getClass().getClassLoader().getResourceAsStream(propertyFilePath);
}
if (inputStream == null) {
throw new Exception("FILE NOT FOUND : inputStream = null : " + propertyFilePath);
}
properties = new Properties();
properties.load(inputStream);
Enumeration enuKeys = properties.keys();
while (enuKeys.hasMoreElements()) {
String key = (String) enuKeys.nextElement();
String value = properties.getProperty(key);
//System.out.print("key = "+key + " : value = "+value);
propertyMap.put(key, value);
}
if (propertyMap == null) {
throw new Exception("readPropertyFile : propertyMap = null");
}
return propertyMap;
} catch (Exception e) {
throw new Exception("readPropertyFile : " + e.toString());
} finally {
try {
inputStream.close();
} catch (Exception e) {
}
try {
properties = null;
} catch (Exception e) {
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Map<String, String> fetchPropertyFromFile()\n {\n Map<String, String> components = new HashMap<>();\n Properties props = new Properties();\n InputStream in = null;\n try {\n in = new FileInputStream(\"/slog/properties/LogAnalyzer.properties\");\n props.lo... | [
"0.7476791",
"0.7301177",
"0.67913854",
"0.6789095",
"0.6730097",
"0.6692692",
"0.6629852",
"0.6611769",
"0.65903527",
"0.6540004",
"0.65357023",
"0.6500552",
"0.643584",
"0.6434237",
"0.63981193",
"0.63562244",
"0.63448566",
"0.63410044",
"0.63219285",
"0.6321135",
"0.631805... | 0.7230381 | 2 |
method to a particular property from a property file | public String readProperty(String property, String sFilePath) throws Exception {
try {
return readPropertyFile(sFilePath).get(property);
} catch (Exception e) {
throw new Exception("readProperty : " + e.toString());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getProperty(String property);",
"String getProperty();",
"String getProperty();",
"String getProperty();",
"java.lang.String getProperty();",
"Property getProperty();",
"Property getProperty();",
"public abstract String getPropertyFile();",
"public String getProperty();",
"@Override\r\n\tp... | [
"0.7129801",
"0.70056397",
"0.70056397",
"0.70056397",
"0.69209814",
"0.68375874",
"0.68375874",
"0.66906387",
"0.6630672",
"0.6615635",
"0.65789497",
"0.65649605",
"0.6555834",
"0.6555834",
"0.6555834",
"0.65128046",
"0.64407593",
"0.6324859",
"0.6308422",
"0.62779206",
"0.6... | 0.61531824 | 25 |
DATE TIME METHODS method to get current system date and time in particular format | public String getCurrentDateTime(String sDateFormat) throws Exception {
SimpleDateFormat formatter = null;
String dateNow = "";
String sDefaultDateFormat = "yyyy:MM:dd:HH:mm";
try {
if (sDateFormat == null) {
sDateFormat = "";
}
if (!sDateFormat.trim().equalsIgnoreCase("")) {
sDefaultDateFormat = sDateFormat;
}
Calendar currentDate = Calendar.getInstance();
formatter = new SimpleDateFormat(sDefaultDateFormat);
dateNow = formatter.format(currentDate.getTime());
dateNow.trim();
return dateNow;
} catch (Exception exp) {
println("getCurrentDateTime : " + exp.toString());
throw exp;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSystemDateTime() {\n\t\tjava.text.SimpleDateFormat sdfDate = new java.text.SimpleDateFormat(\"yyyy/MM/dd\");\n java.text.SimpleDateFormat sdfTime = new java.text.SimpleDateFormat(\"HH:mm\");\n Date now = new Date();\n String strDate = sdfDate.format(now... | [
"0.8151964",
"0.7662089",
"0.75817394",
"0.74278396",
"0.73835087",
"0.7377022",
"0.73517925",
"0.7344778",
"0.7344778",
"0.734355",
"0.7324122",
"0.73170125",
"0.72956777",
"0.72884023",
"0.726845",
"0.7264958",
"0.7235881",
"0.72350633",
"0.71953565",
"0.715077",
"0.7147717... | 0.0 | -1 |
method to get date time format in particular format of a calender refernce | public String getDateFormated(Calendar objCalendar, String sDateFormat) throws Exception {
SimpleDateFormat formatter = null;
String sDate = "";
String sDefaultDateFormat = "yyyy:MM:dd HH:mm:ss";
try {
if (sDateFormat == null) {
sDateFormat = "";
}
sDateFormat = sDateFormat.trim();
if (!sDateFormat.trim().equalsIgnoreCase("")) {
sDefaultDateFormat = sDateFormat;
}
formatter = new SimpleDateFormat(sDefaultDateFormat);
sDate = formatter.format(objCalendar.getTime());
sDate.trim();
return sDate;
} catch (Exception exp) {
println("getCurrentDateTime : " + exp.toString());
throw exp;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String formatCalDate(Calendar cal) {\n if (cal != null) return SDF_TYPE_1.format(cal.getTime());\n return \"\";\n }",
"DateFormat getDisplayDateFormat();",
"DateFormat getSourceDateFormat();",
"private String formatCalendar(Calendar c)\r\n\t{\n\t\t\tDate tasktime = c.getTime(); \r\n\... | [
"0.69490564",
"0.68759006",
"0.67171377",
"0.66043967",
"0.6568671",
"0.6440583",
"0.6418776",
"0.6369004",
"0.6311322",
"0.62576216",
"0.6242972",
"0.62424606",
"0.62273467",
"0.6185505",
"0.61707014",
"0.6167024",
"0.615411",
"0.614449",
"0.6142602",
"0.6117073",
"0.6091437... | 0.5903315 | 57 |
method to get calender object based on datetime provided as parameter | public Calendar GetCalendar(String sDateTime) throws Exception {
String YYYY = "", MM = "", DD = "", hh = "", mm = "", ss = "";
Calendar calendarInstance = null;
try {
//considering deafult date format as YYYY-MM-DD hh:mm:ss (e.g 2012-11-21 23:59:30)
sDateTime = sDateTime.trim();
if (sDateTime.equalsIgnoreCase("")) {
throw new Exception("Blank datetime value");
}
YYYY = sDateTime.substring(0, 4);
MM = sDateTime.substring(5, 7);
DD = sDateTime.substring(8, 10);
hh = sDateTime.substring(11, 13);
mm = sDateTime.substring(14, 16);
ss = sDateTime.substring(17, 19);
MM = "" + (Integer.parseInt(MM) - 1);
if (MM.length() < 2) {
MM = "0" + MM;
}
calendarInstance = Calendar.getInstance();
calendarInstance.set(Integer.parseInt(YYYY), Integer.parseInt(MM), Integer.parseInt(DD), Integer.parseInt(hh), Integer.parseInt(mm), Integer.parseInt(ss));
return calendarInstance;
} catch (Exception e) {
throw new Exception("SetCalendar : " + e.toString());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Calendar getCalendar();",
"abstract public Date getServiceAppointment();",
"Date getForDate();",
"public StockDate GetCalendar()\r\n\t{\r\n\t\treturn date;\r\n\t}",
"public static Calendar getCalender(Date date) {\n\n Calendar calendar = Calendar.getInstance();\n\n if (date != null) {\n ... | [
"0.6794745",
"0.6074519",
"0.60162",
"0.5916132",
"0.5846541",
"0.583389",
"0.5817498",
"0.5745974",
"0.5743449",
"0.5739673",
"0.5733557",
"0.5716298",
"0.56778944",
"0.56441855",
"0.56382746",
"0.56309164",
"0.562867",
"0.5593988",
"0.5593951",
"0.55739814",
"0.5572599",
... | 0.5654493 | 13 |
method to differnece between two dates dates in | public int getDifferenceInDate(String sPreviousDate, String sCurrentDate) {
Calendar calPrevious = null;
Calendar calCurrent = null;
String[] arrTempDate = null;
long longPreviousDate = 0;
long longCurrentTime = 0;
int timeDelay = 0;
try {
if (sPreviousDate.contains(":") && sCurrentDate.contains(":")) {
arrTempDate = sPreviousDate.split(":");
calPrevious = Calendar.getInstance();
calPrevious.set(Integer.parseInt(arrTempDate[0]), (Integer.parseInt(arrTempDate[1]) - 1),
Integer.parseInt(arrTempDate[2]), Integer.parseInt(arrTempDate[3]), Integer.parseInt(arrTempDate[4]));
arrTempDate = sCurrentDate.split(":");
calCurrent = Calendar.getInstance();
calCurrent.set(Integer.parseInt(arrTempDate[0]), (Integer.parseInt(arrTempDate[1]) - 1),
Integer.parseInt(arrTempDate[2]), Integer.parseInt(arrTempDate[3]), Integer.parseInt(arrTempDate[4]));
longPreviousDate = Long.parseLong(new SimpleDateFormat("yyyyMMddHHmm").format(calPrevious.getTime()));
longCurrentTime = Long.parseLong(new SimpleDateFormat("yyyyMMddHHmm").format(calCurrent.getTime()));
///println("Previous Time In Int= "+longPreviousDate);
//println("Current Time In Int= "+longCurrentTime);
if (longCurrentTime > longPreviousDate) {
while (true) {
timeDelay++;
calCurrent.add(Calendar.MINUTE, -1);
longCurrentTime = Long.parseLong(new SimpleDateFormat("yyyyMMddHHmm").format(calCurrent.getTime()));
//println("Previous Time In Int= "+longPreviousDate);
//println("Current Time In Int= "+longCurrentTime);
if (longCurrentTime < longPreviousDate) {
break;
}
}
}
}
} catch (Exception e) {
println("getDifferenceInDate : Exception : " + e.toString());
} finally {
return timeDelay;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void dateDifference(){\r\n\t\t\r\n\t\tLocalDate firstDate = LocalDate.of(2013, 3, 20);\r\n\t\tLocalDate secondDate = LocalDate.of(2015, 8, 12);\r\n\t\t\r\n\t\tPeriod diff = Period.between(firstDate, secondDate);\r\n\t\tSystem.out.println(\"The Difference is ::\"+diff.getDays());\r\n\t}",
"public st... | [
"0.76062906",
"0.725268",
"0.7223506",
"0.71618104",
"0.7089453",
"0.6867889",
"0.6769124",
"0.6747556",
"0.6741762",
"0.66403586",
"0.6541047",
"0.6536395",
"0.6417829",
"0.63999885",
"0.6391146",
"0.63283527",
"0.6322493",
"0.6288747",
"0.62638074",
"0.62602127",
"0.6255076... | 0.5782085 | 45 |
/generic metod to get list of YYYYMM between two dates in (yyyymmdd) format | public ArrayList<String> getYYYYMMList(String dateFrom, String dateTo) throws Exception {
ArrayList<String> yyyyMMList = new ArrayList<String>();
try {
Calendar calendar = Calendar.getInstance();
calendar.set(Integer.parseInt(dateFrom.split("-")[0]), Integer.parseInt(dateFrom.split("-")[1]) - 1, Integer.parseInt(dateFrom.split("-")[2]));
String yyyyTo = dateTo.split("-")[0];
String mmTo = Integer.parseInt(dateTo.split("-")[1]) + "";
if (mmTo.length() < 2) {
mmTo = "0" + mmTo;
}
String yyyymmTo = yyyyTo + mmTo;
while (true) {
String yyyy = calendar.get(Calendar.YEAR) + "";
String mm = (calendar.get(Calendar.MONTH) + 1) + "";
if (mm.length() < 2) {
mm = "0" + mm;
}
yyyyMMList.add(yyyy + mm);
if ((yyyy + mm).trim().toUpperCase().equalsIgnoreCase(yyyymmTo)) {
break;
}
calendar.add(Calendar.MONTH, 1);
}
return yyyyMMList;
} catch (Exception e) {
throw new Exception("getYYYYMMList : dateFrom(yyyy-mm-dd)=" + dateFrom + " : dateTo(yyyy-mm-dd)" + dateTo + " : " + e.toString());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void getBetweenDaysTest(){\n\n Date bDate = DateUtil.parse(\"2021-03-01\", DatePattern.NORM_DATE_PATTERN);//yyyy-MM-dd\n System.out.println(\"bDate = \" + bDate);\n Date eDate = DateUtil.parse(\"2021-03-15\", DatePattern.NORM_DATE_PATTERN);\n System.out.println(\"eDate... | [
"0.69182944",
"0.68233705",
"0.6758164",
"0.63741404",
"0.6268255",
"0.61234254",
"0.6007859",
"0.59714454",
"0.58655995",
"0.5824826",
"0.5817367",
"0.5809082",
"0.58020675",
"0.5801842",
"0.5787706",
"0.57384115",
"0.56784254",
"0.56509507",
"0.56492096",
"0.56474215",
"0.5... | 0.755372 | 0 |
method to get date in specific format from date in (yyyymmdd) format | public String getDDMMMYYYYDate(String date) throws Exception {
HashMap<Integer, String> month = new HashMap<Integer, String>();
month.put(1, "Jan");
month.put(2, "Feb");
month.put(3, "Mar");
month.put(4, "Apr");
month.put(5, "May");
month.put(6, "Jun");
month.put(7, "Jul");
month.put(8, "Aug");
month.put(9, "Sep");
month.put(10, "Oct");
month.put(11, "Nov");
month.put(12, "Dec");
try {
String[] dtArray = date.split("-");
return dtArray[1] + "-" + month.get(Integer.parseInt(dtArray[1])) + "-" + dtArray[0];
} catch (Exception e) {
throw new Exception("getDDMMMYYYYDate : " + date + " : " + e.toString());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getStartDateYYYYMMDD();",
"private static String convertToDDMMYYYY(Date date) {\n\t\tString returnStr = \"\";\n\t\ttry {\n\t\tDateFormat format1 = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\treturnStr = format1.format(date);\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\... | [
"0.7505692",
"0.74831",
"0.71497864",
"0.7100741",
"0.7060008",
"0.7032896",
"0.69488615",
"0.69283664",
"0.67949367",
"0.67374325",
"0.6701828",
"0.66903484",
"0.6680801",
"0.6672087",
"0.66618437",
"0.66618437",
"0.6646981",
"0.6637739",
"0.6616386",
"0.66159993",
"0.655860... | 0.6931925 | 7 |
method to convert date to unixtimestamp format | public long DateStringToUnixTimeStamp(String sDateTime) {
DateFormat formatter;
Date date = null;
long unixtime = 0;
formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
try {
date = formatter.parse(sDateTime);
unixtime = date.getTime() / 1000L;
} catch (Exception ex) {
ex.printStackTrace();
unixtime = 0;
}
return unixtime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@ExecFunction(name = \"unix_timestamp\", argTypes = {}, returnType = \"INT\")\n public static Expression unixTimestamp() {\n return new IntegerLiteral((int) (System.currentTimeMillis() / 1000L));\n }",
"void fromUnixtime(HplsqlParser.Expr_func_paramsContext ctx) {\n int cnt = getParamCount(ctx);\... | [
"0.66079235",
"0.622985",
"0.6095874",
"0.60657614",
"0.5902506",
"0.58582556",
"0.5853266",
"0.58117",
"0.58025813",
"0.5800931",
"0.5800931",
"0.5800931",
"0.5800931",
"0.5800931",
"0.5800931",
"0.5800931",
"0.5800931",
"0.5800931",
"0.5800931",
"0.5800931",
"0.5800931",
... | 0.6295605 | 1 |
method to get current GMT seconds | public int getGMTOffSetSeconds() throws Exception {
return getGMTOffSetSeconds("");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static long getCurrentGMTTime() {\n\n\t\tTimeZone timezone = TimeZone.getTimeZone(STANDARD_TIME_ZONE);\n\t\tlong currentTime = System.currentTimeMillis();\n\t\treturn currentTime - timezone.getOffset(currentTime);\n\t}",
"public double getSystemTimeSec() {\n\treturn getSystemTime() / Math.pow(10, 9);\n}",... | [
"0.7545283",
"0.71840405",
"0.70763093",
"0.7045088",
"0.69520104",
"0.69124174",
"0.68477094",
"0.6784231",
"0.6757396",
"0.6755154",
"0.67538804",
"0.6750216",
"0.6750216",
"0.6717372",
"0.6685781",
"0.6653546",
"0.6622547",
"0.65796965",
"0.6562136",
"0.65435237",
"0.65378... | 0.0 | -1 |
method to get GMT seconds for a particular GMT (04:30. +11:15) | public int getGMTOffSetSeconds(String GMT) throws Exception {
int RawOffSet = 0;
double iTracker = 0.0;
try {
iTracker = 0.0;
//check for null & blank GMT,, return server deafult GMT
if (GMT == null) {
return RawOffSet = TimeZone.getDefault().getRawOffset() / 1000;
} //null GMT
if (GMT.trim().equalsIgnoreCase("")) {
return RawOffSet = TimeZone.getDefault().getRawOffset() / 1000;
} //invalid GMT value
iTracker = 1.0;
//check for validations of GMT string
if (!GMT.contains(":")) {
throw new Exception("Invalid GMT , does noit contains ':' colon ## ");
} //invalid GMT value
iTracker = 2.0;
String[] saTemp = GMT.trim().toUpperCase().split(":"); //
if (saTemp.length != 2) {
throw new Exception("Invalid GMT, : slpit length is not equal to 2 ## ");
} //invalid GMT value
iTracker = 3.0;
String HH = saTemp[0].trim();
String MM = saTemp[1].trim();
boolean isNegativeGMT = false;
iTracker = 4.0;
if (HH.contains("-")) {
isNegativeGMT = true;
}
HH = HH.replaceAll("-", "").trim().toUpperCase();
HH = HH.replaceAll("[+]", "").trim().toUpperCase();
iTracker = 5.0;
int iHH = Integer.parseInt(HH);
int iMM = Integer.parseInt(MM);
if (iHH > 11) {
throw new Exception("invalid GMT : HH > 11 ##");
}
if (iHH < -11) {
throw new Exception("invalid GMT : HH < -11 ##");
}
if (iMM < 0) {
throw new Exception("invalid GMT : MM < 0 ##");
}
if (iMM > 59) {
throw new Exception("invalid GMT : MM > 59 ##");
}
iTracker = 6.0;
RawOffSet = (iHH * 60 * 60) + (iMM * 60);
if (isNegativeGMT) {
RawOffSet = RawOffSet * -1;
}
iTracker = 7.0;
return RawOffSet;
} catch (Exception e) {
println("getGMTOffSetSeconds : " + e.toString() + " : " + GMT);
throw new Exception("getGMTOffSetSeconds : " + e.toString());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDateTime(Calendar cal, int GMT_OFFSET_SECONDS, String DATE_TIME_FORMAT) throws Exception {\n\n String sRetVal = \"\";\n String DefaultFormat = \"yyyyMMddHHmmss\";\n int GMT_OFFSET_DIFF = 0;\n try {\n\n //check for valid Calender values\n if (cal ==... | [
"0.64769423",
"0.6401977",
"0.63143307",
"0.58708954",
"0.58332235",
"0.5777432",
"0.57045084",
"0.56802946",
"0.56704664",
"0.56666917",
"0.56608194",
"0.54846895",
"0.547865",
"0.5463407",
"0.5456175",
"0.5436994",
"0.54154617",
"0.5409956",
"0.5380168",
"0.5374342",
"0.531... | 0.67704934 | 0 |
end getGMTOffSetSeconds method to get date in YYYYMMDDhhmmss format | public String getDateTime() throws Exception {
return getDateTime(null, 0, "");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getYYYYMMDDHHMMSS()\r\n/* 56: */ {\r\n/* 57: 68 */ String nowTime = \"\";\r\n/* 58: 69 */ Date now = new Date();\r\n/* 59: 70 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n/* 60: 71 */ nowTime = formatter.format(now);\r\n/* 61: 72 */ ... | [
"0.6478995",
"0.6288667",
"0.60737693",
"0.587249",
"0.58722466",
"0.5862005",
"0.58078223",
"0.57988113",
"0.57947344",
"0.5755224",
"0.57315856",
"0.5656006",
"0.56427175",
"0.5636676",
"0.5633332",
"0.56275564",
"0.5603452",
"0.55977744",
"0.5579716",
"0.55752325",
"0.5572... | 0.0 | -1 |
methoid to get date time in particular format wrt GMT, default is yyyyMMddHHmmss | public String getDateTime(String DATE_TIME_FORMAT) throws Exception {
return getDateTime(null, null, DATE_TIME_FORMAT);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getGMTTime() {\r\n\t\treturn getGMTTime(\"HH:mm:ss\");\r\n\t}",
"public String getDateTime(Calendar cal, int GMT_OFFSET_SECONDS, String DATE_TIME_FORMAT) throws Exception {\n\n String sRetVal = \"\";\n String DefaultFormat = \"yyyyMMddHHmmss\";\n int GMT_OFFSET_DIFF = 0;... | [
"0.7136102",
"0.669008",
"0.66894984",
"0.6586164",
"0.6544667",
"0.65070444",
"0.65006006",
"0.6496049",
"0.6464054",
"0.6458278",
"0.6394899",
"0.639099",
"0.63766927",
"0.63752294",
"0.63696957",
"0.63510954",
"0.63416",
"0.6297777",
"0.62913066",
"0.6290827",
"0.62898815"... | 0.0 | -1 |
method to get date in YYYYMMDDhhmmss format | public String getDateTime(Calendar calendar) throws Exception {
return getDateTime(calendar, 0, "");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getYYYYMMDDHHMMSS()\r\n/* 56: */ {\r\n/* 57: 68 */ String nowTime = \"\";\r\n/* 58: 69 */ Date now = new Date();\r\n/* 59: 70 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n/* 60: 71 */ nowTime = formatter.format(now);\r\n/* 61: 72 */ ... | [
"0.7913427",
"0.7624351",
"0.7570983",
"0.7238402",
"0.716994",
"0.71474934",
"0.71142495",
"0.7045356",
"0.68999505",
"0.68808347",
"0.68446964",
"0.6823716",
"0.67602795",
"0.67547303",
"0.66501004",
"0.66459817",
"0.6574838",
"0.6561677",
"0.65386903",
"0.6499834",
"0.6499... | 0.0 | -1 |
method to get date in YYYYMMDDhhmmss format | public String getDateTime(Calendar calendar, String GMT) throws Exception {
return getDateTime(calendar, GMT, "");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getYYYYMMDDHHMMSS()\r\n/* 56: */ {\r\n/* 57: 68 */ String nowTime = \"\";\r\n/* 58: 69 */ Date now = new Date();\r\n/* 59: 70 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n/* 60: 71 */ nowTime = formatter.format(now);\r\n/* 61: 72 */ ... | [
"0.7913427",
"0.7624351",
"0.7570983",
"0.7238402",
"0.716994",
"0.71474934",
"0.71142495",
"0.7045356",
"0.68999505",
"0.68808347",
"0.68446964",
"0.6823716",
"0.67602795",
"0.67547303",
"0.66501004",
"0.66459817",
"0.6574838",
"0.6561677",
"0.65386903",
"0.6499834",
"0.6499... | 0.0 | -1 |
methoid to get date time in particular format wrt GMT,default is yyyyMMddHHmmss | public String getDateTime(Calendar calendar, String GMT, String DATE_TIME_FORMAT) throws Exception {
int GMT_OFFSET_SECONDS = 0;
try {
GMT_OFFSET_SECONDS = getGMTOffSetSeconds(GMT);
return getDateTime(calendar, GMT_OFFSET_SECONDS, DATE_TIME_FORMAT);
} catch (Exception e) {
throw new Exception("getDateTime : Invalid GMT :" + GMT + " : " + e.toString());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getGMTTime() {\r\n\t\treturn getGMTTime(\"HH:mm:ss\");\r\n\t}",
"public String getDateTime(Calendar cal, int GMT_OFFSET_SECONDS, String DATE_TIME_FORMAT) throws Exception {\n\n String sRetVal = \"\";\n String DefaultFormat = \"yyyyMMddHHmmss\";\n int GMT_OFFSET_DIFF = 0;... | [
"0.7024169",
"0.6679906",
"0.66180986",
"0.66126585",
"0.65786195",
"0.65542835",
"0.6532641",
"0.647099",
"0.6465074",
"0.64573383",
"0.6453273",
"0.64484704",
"0.64291435",
"0.6421075",
"0.6414333",
"0.64066654",
"0.6394108",
"0.639107",
"0.639107",
"0.6356067",
"0.6350347"... | 0.6280659 | 24 |
methoid to get date time in particular format wrt GMT, default is yyyyMMddHHmmss | public String getDateTime(Calendar cal, int GMT_OFFSET_SECONDS, String DATE_TIME_FORMAT) throws Exception {
String sRetVal = "";
String DefaultFormat = "yyyyMMddHHmmss";
int GMT_OFFSET_DIFF = 0;
try {
//check for valid Calender values
if (cal == null) {
cal = Calendar.getInstance();
}
//check for valid FORMAT values
if (DATE_TIME_FORMAT == null) {
DATE_TIME_FORMAT = DefaultFormat;
}
if (DATE_TIME_FORMAT.trim().toUpperCase().equalsIgnoreCase("")) {
DATE_TIME_FORMAT = DefaultFormat;
}
//check GMT RAW OFF SET difference
int CURR_GMT_OFFSET = TimeZone.getDefault().getRawOffset() / 1000;
//in case Current GMT is GREATER THAN provided GMT
if (CURR_GMT_OFFSET > GMT_OFFSET_SECONDS && GMT_OFFSET_SECONDS != 0) {
if (GMT_OFFSET_SECONDS < 0) {
GMT_OFFSET_DIFF = GMT_OFFSET_SECONDS - CURR_GMT_OFFSET;
} else {
GMT_OFFSET_DIFF = GMT_OFFSET_SECONDS - CURR_GMT_OFFSET;
}
//in case Current GMT is SMALLER THAN provided GMT
} else if (CURR_GMT_OFFSET < GMT_OFFSET_SECONDS && GMT_OFFSET_SECONDS != 0) {
if (GMT_OFFSET_SECONDS < 0) {
GMT_OFFSET_DIFF = GMT_OFFSET_SECONDS - CURR_GMT_OFFSET;
} else {
GMT_OFFSET_DIFF = GMT_OFFSET_SECONDS - CURR_GMT_OFFSET;
}
}
if (CURR_GMT_OFFSET == GMT_OFFSET_SECONDS) {
GMT_OFFSET_DIFF = 0;
}
//setting calender datetime as per GMT
cal.add(Calendar.SECOND, GMT_OFFSET_DIFF);
//using SimpleDateFormat class
sRetVal = new SimpleDateFormat(DATE_TIME_FORMAT).format(cal.getTime());
return sRetVal;
} catch (Exception e) {
println("getDateTime : " + GMT_OFFSET_SECONDS + " : " + e.toString());
throw new Exception("getDateTime : " + GMT_OFFSET_SECONDS + " : " + e.toString());
} finally {
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getGMTTime() {\r\n\t\treturn getGMTTime(\"HH:mm:ss\");\r\n\t}",
"public static String getGMTTime(String format) {\r\n\t\tfinal Date currentTime = new Date();\r\n\r\n\t\tfinal SimpleDateFormat sdf = new SimpleDateFormat(format);\r\n\r\n\t\tsdf.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\r\n\t... | [
"0.7136102",
"0.66894984",
"0.6586164",
"0.6544667",
"0.65070444",
"0.65006006",
"0.6496049",
"0.6464054",
"0.6458278",
"0.6394899",
"0.639099",
"0.63766927",
"0.63752294",
"0.63696957",
"0.63510954",
"0.63416",
"0.6297777",
"0.62913066",
"0.6290827",
"0.62898815",
"0.6265442... | 0.669008 | 1 |
Maths calculation METHODS methods checks if a particular string is an integer | public boolean isInteger(String sIntString) {
int i = 0;
try {
i = Integer.parseInt(sIntString);
return true;
} catch (Exception e) {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isInt(TextField input);",
"public static boolean isInteger(String s)\r\n {\r\n if (s == null || s.length() == 0)\r\n return false;\r\n \r\n //integer regular expression\r\n String regex = \"[-|+]?\\\\d+\";\r\n if (!s.matches(regex))\r\n return f... | [
"0.69623077",
"0.68579835",
"0.68458027",
"0.68072206",
"0.67937106",
"0.6790145",
"0.67725796",
"0.6763845",
"0.667392",
"0.66652256",
"0.6642521",
"0.6618178",
"0.661464",
"0.65937537",
"0.6571019",
"0.6559598",
"0.65516645",
"0.65373313",
"0.6524987",
"0.65175956",
"0.6517... | 0.63575375 | 34 |
method checks if a particular string is a decimal value | public boolean isDecimal(String sDecimalString) {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean isDecimalNumber(String string) {\n\t\ttry {\n\t\t\tDouble.parseDouble(string);\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\n\t}",
"public boolean countDecimals(String assetValue){\n\n int count = 0;\n for(int i = 0; i < assetValue.length(); i... | [
"0.7745456",
"0.7077546",
"0.6957247",
"0.69045377",
"0.68851817",
"0.68773526",
"0.6794734",
"0.67535853",
"0.6733808",
"0.6705036",
"0.66283846",
"0.6623698",
"0.66006273",
"0.6578927",
"0.6567979",
"0.65628076",
"0.6534059",
"0.6528588",
"0.6438526",
"0.6432925",
"0.642740... | 0.7809409 | 0 |
check if a string is numeric | public boolean isNumeric(String sNumericString) {
try {
for (char c : sNumericString.toCharArray()) {
if (!Character.isDigit(c)) {
return false;
}
}
return true;
} catch (Exception e) {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean isNumeric(String str) { \n\t\ttry { \n\t\t\tDouble.parseDouble(str); \n\t\t} \n\t\tcatch(NumberFormatException nfe) { \n\t\t\treturn false; \n\t\t} \n\t\treturn true; \n\t}",
"private static boolean isNumeric(String str){\n return str.matches(\"-?\\\\d+(\\\\.\\\\d+)?\"); ... | [
"0.8357487",
"0.8356089",
"0.83044535",
"0.8295829",
"0.82601696",
"0.8255934",
"0.82348186",
"0.8218124",
"0.8212148",
"0.81751126",
"0.81592023",
"0.8143244",
"0.8140167",
"0.808156",
"0.80768335",
"0.80741787",
"0.8033325",
"0.79852915",
"0.7952806",
"0.79472846",
"0.79454... | 0.7504515 | 48 |
methods to convert double variable to string | public String DoubleToString(double dValue) {
String sValue = "";
try {
sValue = String.format("%.4f", dValue);
} catch (Exception e) {
sValue = "";
} finally {
return sValue;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static String double2String (Double a){\n String s = \"\"+a;\n String[] arr = s.split(\"\\\\.\");\n if (arr[1].length()==1) s+=\"0\";\n return s;\n }",
"public String format(double number);",
"private static String toPsString(double d) {\n return \"(\" + d + \")\";\n }"... | [
"0.78063637",
"0.74658585",
"0.72760344",
"0.72488034",
"0.71758735",
"0.7102762",
"0.7037083",
"0.69285846",
"0.67604744",
"0.66724443",
"0.65734553",
"0.65208364",
"0.64972275",
"0.6475562",
"0.64665097",
"0.64458144",
"0.6443086",
"0.6441451",
"0.6434726",
"0.6422785",
"0.... | 0.6657111 | 10 |
method to convert float variable to string | public String FloatToString(float dValue) {
String sValue = "";
try {
sValue = String.format("%.4f", dValue);
} catch (Exception e) {
sValue = "";
} finally {
return sValue;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String floatWrite();",
"public String floatToString(float amount){\n return Float.toString(amount);\n }",
"public static String FloatToString(float FloatValue){\n Float floatee = new Float(FloatValue);\n return floatee.toString(); \n }",
"public String toFloatString() {\n\t\tre... | [
"0.7784302",
"0.74763626",
"0.74667746",
"0.73443073",
"0.7036597",
"0.69662154",
"0.69163173",
"0.66371864",
"0.66072285",
"0.6591713",
"0.65915734",
"0.6562504",
"0.6510275",
"0.63948876",
"0.6362903",
"0.6335125",
"0.6288329",
"0.62839854",
"0.623604",
"0.6205764",
"0.6200... | 0.6769275 | 7 |
method to calculate average of integer list | public double calculateAverage(List<Integer> list) {
double sum = 0;
double avg = 0.0;
try {
if (list.isEmpty()) {
throw new Exception("Empty List");
}
//loop for values to calculate average
for (Integer mark : list) {
sum = sum + mark;
}
avg = sum / list.size();
} catch (Exception e) {
avg = 0.0;
}
return avg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static int getAverage(ArrayList<Integer> inList) \n\t{\n\t\tint add = 0; \n\t\tint mean = 0; \n\t\tfor(int pos = 0; pos < inList.size(); ++pos)\n\t\t{\n\t\t\tadd = add + inList.get(pos);\n\t\t\t\n\t\t}\n\t\t\n\t\tmean = add/inList.size(); \n\t\t\n\t\treturn mean; \n\t\t\n\t}",
"public static double getAv... | [
"0.84028214",
"0.82216233",
"0.8216388",
"0.7996866",
"0.7607684",
"0.7581997",
"0.75749105",
"0.748946",
"0.7422218",
"0.74160326",
"0.73957694",
"0.7345884",
"0.73450327",
"0.73190373",
"0.7264247",
"0.72619575",
"0.7246804",
"0.72112226",
"0.7171354",
"0.7164925",
"0.71459... | 0.82732224 | 1 |
method to calculate average of double list | public double calculateAverage(List<Double> list, String s) {
double sum = 0;
double avg = 0.0;
try {
if (list.isEmpty()) {
throw new Exception("Empty List");
}
//loop for values to calculate average
for (Double mark : list) {
sum = sum + mark;
}
avg = sum / list.size();
} catch (Exception e) {
avg = 0.0;
}
return avg;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static double average(ArrayList<Double> nums){\n double sum = 0.0;\n for(Double num : nums){\n sum += num;\n }\n return sum / nums.size();\n }",
"public static double getArrayListDoubleMean(ArrayList<Double> list) {\n\t\treturn 0;\n\t}",
"public double average()... | [
"0.8160761",
"0.79379696",
"0.7841702",
"0.7792062",
"0.77336407",
"0.77079916",
"0.76984966",
"0.7680299",
"0.7657294",
"0.7594179",
"0.7539824",
"0.75120825",
"0.7496666",
"0.74832547",
"0.74752706",
"0.743621",
"0.74298537",
"0.7426118",
"0.7419833",
"0.7417377",
"0.738273... | 0.76047736 | 9 |
ENCRYPTION / DECRYPTION METHODS method to encode string into md5 hash | public String get_Md5_Hash(String sStringToEncode) throws Exception {
String sRetval = "";
StringBuffer sb = new StringBuffer();
try {
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] messageDigest = md.digest(sStringToEncode.getBytes("UTF-8"));
BigInteger number = new BigInteger(1, messageDigest);
String hashtext = number.toString(16);
sRetval = hashtext;
} catch (Exception e) {
throw new Exception("get_Md5_Hash : " + e);
}
return sRetval;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String str2MD5(String strs) {\n StringBuffer sb = new StringBuffer();\n try {\n MessageDigest digest = MessageDigest.getInstance(\"MD5\");\n byte[] bs = digest.digest(strs.getBytes());\n /*\n * after encryption is -128 to 127 ,is not safe\n ... | [
"0.7021336",
"0.6877267",
"0.66857",
"0.66574025",
"0.65487653",
"0.65465635",
"0.65256363",
"0.6507957",
"0.6504943",
"0.64985204",
"0.6477323",
"0.6476254",
"0.64545494",
"0.64154065",
"0.63714945",
"0.63667816",
"0.6360527",
"0.6347052",
"0.63217926",
"0.63119936",
"0.6296... | 0.6177471 | 31 |
Compression METHODS method to zip any file | public boolean ZipFile(String sSourceFilePath, String sDestinationZipFilePath, boolean bReplaceExisting) {
byte[] buffer = new byte[30720];
FileInputStream fin = null;
FileOutputStream fout = null;
ZipOutputStream zout = null;
int length;
String sZipEntryFileName = "";
File objFile = null;
try {
//check for source file
if (sSourceFilePath.trim().equalsIgnoreCase("")) {
throw new Exception("Invalid Source File : " + sSourceFilePath);
}
objFile = new File(sSourceFilePath);
if (!objFile.exists()) {
throw new Exception("Source file not found : " + sSourceFilePath);
}
//check for destination Zip file
if (sDestinationZipFilePath.trim().equalsIgnoreCase("") || sDestinationZipFilePath == null) {
String stmp_Path = objFile.getAbsolutePath();
String stmp_Name = objFile.getName();
if (stmp_Name.contains(".")) { //check for removing extension
int indx = 0;
try {
indx = stmp_Name.indexOf(".", stmp_Name.length() - 5);
} catch (Exception e) {
indx = 0;
}
if (indx <= 0) {
indx = stmp_Name.length();
}
stmp_Name = stmp_Name.substring(0, indx);
stmp_Name = stmp_Name + ".zip";
}
sDestinationZipFilePath = stmp_Path + File.separator + stmp_Name;
}
objFile = new File(sDestinationZipFilePath);
if (objFile.exists()) {
if (bReplaceExisting) {
objFile.delete();
} else {
throw new Exception("Destination ZipFile Already exists : " + sDestinationZipFilePath);
}
}
//Zipping File
sZipEntryFileName = sSourceFilePath.substring(sSourceFilePath.lastIndexOf("\\") + 1);
fout = new FileOutputStream(sDestinationZipFilePath);
zout = new ZipOutputStream(fout);
fin = new FileInputStream(sSourceFilePath);
zout.putNextEntry(new ZipEntry(sZipEntryFileName));
while ((length = fin.read(buffer)) > 0) {
zout.write(buffer, 0, length);
}
return true;
} catch (Exception exp) {
println("Src = " + sSourceFilePath + " : Dest = " + sDestinationZipFilePath + " : " + exp.toString());
return false;
} finally {
try {
fin.close();
} catch (Exception exp) {
}
try {
zout.closeEntry();
} catch (Exception exp) {
}
try {
zout.close();
} catch (Exception exp) {
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void compress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tZipOutputStream rfoFile = new ZipOutputStream(new FileOutputStream(path + fileName)); \n\t\t\tFile dirToZip = new File(rfoDir); \n\t\t\tString[] fileList = dirToZip.list(); \n\t\t\tbyte[] buffer = new byte[4096]; \n\t\t\tint bytesIn = 0; \n\n\t\t\tfor(int i=0; i<... | [
"0.7265806",
"0.70647603",
"0.66470194",
"0.6545827",
"0.6426159",
"0.6393275",
"0.6293023",
"0.6287428",
"0.6269959",
"0.6259811",
"0.6189281",
"0.6176582",
"0.61472696",
"0.61250395",
"0.61150146",
"0.60793203",
"0.6078917",
"0.6055336",
"0.60493124",
"0.6036569",
"0.601254... | 0.63442427 | 6 |
Initialize and update both lists | @FXML
/**
* Initializes lists for combo boxes
* @author Yuxi Sun
*/
void initialize(){
endOptions = FXCollections.observableArrayList();
startOptions = FXCollections.observableArrayList();
T3_startYear_ComboBox.setItems(startOptions);
T3_endYear_ComboBox.setItems(endOptions);
//perform link with T3_row_structure and fxml table
T3_name_TableColumn.setCellValueFactory(new PropertyValueFactory<>("name"));
T3_start_rank_TableColumn.setCellValueFactory(new PropertyValueFactory<>("startRank"));
T3_start_year_TableColumn.setCellValueFactory(new PropertyValueFactory<>("startYear"));
T3_end_rank_TableColumn.setCellValueFactory(new PropertyValueFactory<>("endRank"));
T3_end_year_TableColumn.setCellValueFactory(new PropertyValueFactory<>("endYear"));
T3_trend_TableColumn.setCellValueFactory(new PropertyValueFactory<>("trend"));
this.t3_rows = FXCollections.<T3_row_structure>observableArrayList();
T3_output_Table.setItems(t3_rows);
//set type options
types = FXCollections.observableArrayList(DatasetHandler.getTypes());
T3_type_ComboBox.setItems(types);
T3_type_ComboBox.setValue("human");
//set country options based on the default of usa
countries = FXCollections.observableArrayList(DatasetHandler.getCountries("human"));
T3_country_ComboBox.setItems(countries);
T3_country_ComboBox.setValue("usa");
//update ranges according to default
Pair<String,String> validRange = DatasetHandler.getValidRange("human","usa");
T3_startYear_ComboBox.setValue(validRange.getKey());
T3_endYear_ComboBox.setValue(validRange.getValue());
selectCountry();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initializeLists() {\n this.sensorsPm10 = new ArrayList<>();\n this.sensorsTempHumid = new ArrayList<>();\n }",
"public void init() {\n l0 = new EmptyList();\n l1 = FListInteger.add(l0, new Integer(5));\n l2 = FListInteger.add(l1, new Integer(4));\n l3 = F... | [
"0.6763302",
"0.67242837",
"0.66436714",
"0.6613499",
"0.63594645",
"0.6338379",
"0.63098484",
"0.62913513",
"0.62773794",
"0.6195416",
"0.61506027",
"0.61342335",
"0.60942173",
"0.6074803",
"0.6031514",
"0.6014207",
"0.58929324",
"0.58774304",
"0.586888",
"0.58687943",
"0.58... | 0.0 | -1 |
Call this when a value from type list is selected. Clears country, startYear, endYear comboBoxes | @FXML
void selectType() {
//hide all errors
hideErrors();
//get countries from /type/metadata.txt
//Reset range string
T3_startYear_ComboBox.setValue("");
T3_endYear_ComboBox.setValue("");
//update country list
String type = T3_type_ComboBox.getValue(); // getting type
countries.clear();
for (String country: DatasetHandler.getCountries(type)){
countries.add(country);
}
T3_country_ComboBox.setValue("");
//clearing the StartYear and EndYear values and lists
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@FXML\n void selectCountry() {\n \t//hide all errors\n \thideErrors();\n \t//Getting start year and end year limits from /type/country/metadata.txt\n if (isComboBoxEmpty(T3_country_ComboBox.getValue())){\n //if nothing has been selected do nothing\n return;\n }\n ... | [
"0.70593286",
"0.6651962",
"0.63350475",
"0.61583793",
"0.60879934",
"0.6058241",
"0.60546356",
"0.60083616",
"0.58410317",
"0.57768416",
"0.574895",
"0.57399803",
"0.57178825",
"0.5710163",
"0.5698707",
"0.5691944",
"0.56661034",
"0.56539816",
"0.565386",
"0.5636965",
"0.557... | 0.7543185 | 0 |
Call this when a value of country is selected. | @FXML
void selectCountry() {
//hide all errors
hideErrors();
//Getting start year and end year limits from /type/country/metadata.txt
if (isComboBoxEmpty(T3_country_ComboBox.getValue())){
//if nothing has been selected do nothing
return;
}
String type = T3_type_ComboBox.getValue(); // getting type
String country = T3_country_ComboBox.getValue(); // getting country
//update ranges
Pair<String,String> validRange = DatasetHandler.getValidRange(type,country);
//update relevant menus
int start = Integer.parseInt(validRange.getKey());
int end = Integer.parseInt(validRange.getValue());
//set up end list
endOptions.clear();
startOptions.clear();
for (int i = start; i <= end ; ++i){
endOptions.add(Integer.toString(i));
startOptions.add(Integer.toString(i));
}
//set up comboBox default values and valid lists
T3_startYear_ComboBox.setValue(Integer.toString(start));
T3_endYear_ComboBox.setValue(Integer.toString(end));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onSelectCountry(Country country) {\n // get country name and country ID\n binding.editTextCountry.setText(country.getName());\n countryID = country.getCountryId();\n statePicker.equalStateObject.clear();\n cityPicker.equalCityObject.clear();\n \n... | [
"0.7400468",
"0.7390081",
"0.71376675",
"0.71297646",
"0.70937616",
"0.7054839",
"0.69229823",
"0.68907064",
"0.6813889",
"0.6758525",
"0.67171097",
"0.67171097",
"0.67171097",
"0.67171097",
"0.67171097",
"0.67171097",
"0.66870385",
"0.66523165",
"0.66164315",
"0.6602865",
"0... | 0.6847116 | 8 |
Helper functions checks if a ComboBox is empty | private boolean isComboBoxEmpty(String entry){
return entry == null || entry.isBlank();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic boolean isEmpty() {\n\t\treturn (getSelection() == null);\n\t}",
"public boolean hasValidItemSelected() {\n return !(autoComplete.getSelection() == null || ((Comboitem)autoComplete.getSelection()).getValue() == null);\n }",
"private boolean noFieldsEmpty() {\n if ( nameFiel... | [
"0.6757778",
"0.67239684",
"0.65283036",
"0.64282876",
"0.64016885",
"0.63683957",
"0.63043356",
"0.6249262",
"0.62469596",
"0.6132233",
"0.6075939",
"0.605766",
"0.603656",
"0.60344285",
"0.6032206",
"0.6017614",
"0.6003121",
"0.59844506",
"0.59668875",
"0.596504",
"0.596327... | 0.8379461 | 0 |
validation Input validation and error message handler for T3 Controller | private boolean validateInputs(String iStart, String iEnd, String country, String type) {
hideErrors();
int validStart;
int validEnd;
boolean valid = true;
// //will not occur due to UI interface
// if (isComboBoxEmpty(type)) {
// valid = false;
// T3_type_error_Text.setVisible(true);
// }
if (isComboBoxEmpty(country)) {
valid = false;
T3_country_error_Text.setVisible(true);
}
//checking if start year and end year are set
if (isComboBoxEmpty(iStart)){
//start is empty
T3_start_year_error_Text.setVisible(true);
valid = false;
}
if (isComboBoxEmpty(iEnd)){
//end is empty
T3_end_year_error_Text.setVisible(true);
valid = false;
}
if (valid){
//if years are not empty and valid perform further testing
//fetch valid data range
Pair<String,String> validRange = DatasetHandler.getValidRange(type, country);
validStart = Integer.parseInt(validRange.getKey());
validEnd = Integer.parseInt(validRange.getValue());
//check year range validity
int start = Integer.parseInt(iStart);
int end = Integer.parseInt(iEnd);
if (start>=end) {
T3_range_error_Text.setText("Start year should be < end year");
T3_range_error_Text.setVisible(true);
valid=false;
}
// //will not occur due to UI interface
// else if (start<validStart) {
// T3_range_error_Text.setText("Start year should be >= " + Integer.toString(validStart));
// T3_range_error_Text.setVisible(true);
// valid=false;
// }else if (end>validEnd) {
// T3_range_error_Text.setText("End year should be <= " + Integer.toString(validEnd));
// T3_range_error_Text.setVisible(true);
// valid=false;
// }
}
// //will not occur due to UI interface
// if(isComboBoxEmpty(type)) {
// //if type is not set
// T3_type_error_Text.setVisible(true);
// }
if(isComboBoxEmpty(country)) {
//if country is not set
T3_country_error_Text.setVisible(true);
}
return valid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void validateInputParameters(){\n\n }",
"@Override\n\tprotected void validate(Controller c) {\n\n\t}",
"protected void validateInput()\r\n\t{\r\n\t\tString errorMessage = null;\r\n\t\tif ( validator != null ) {\r\n\t\t\terrorMessage = validator.isValid(text.getText());\r\n\t\t}\r\n\t\t// Bug 16256: i... | [
"0.6481308",
"0.6420802",
"0.6228055",
"0.6067439",
"0.6052541",
"0.6039231",
"0.602913",
"0.6005494",
"0.59959084",
"0.59722775",
"0.59524703",
"0.59511536",
"0.593392",
"0.5925371",
"0.5912965",
"0.58939177",
"0.5887017",
"0.58813673",
"0.5877037",
"0.58475095",
"0.58286786... | 0.0 | -1 |
constructor Constructor of data structure | public T3_row_structure(String name, String startRank, String startYear, String endRank, String endYear, String trend){
this.name = new SimpleStringProperty(name);
this.startRank = new SimpleStringProperty(startRank);
this.startYear = new SimpleStringProperty(startYear);
this.endRank = new SimpleStringProperty(endRank);
this.endYear = new SimpleStringProperty(endYear);
this.trend = new SimpleStringProperty(trend);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DesignADataStructure() {\n arr = new ArrayList<>();\n map = new HashMap<>();\n }",
"public Data() {}",
"public DataStructure() {\r\n firstX = null;\r\n lastX = null;\r\n firstY = null;\r\n lastY = null;\r\n size = 0;\r\n }",
"public Data() {\n ... | [
"0.7076258",
"0.6998424",
"0.69544095",
"0.68752015",
"0.68752015",
"0.68295574",
"0.67573947",
"0.6727266",
"0.6697593",
"0.6695225",
"0.668104",
"0.66637754",
"0.6638212",
"0.6589588",
"0.6563197",
"0.64201564",
"0.6413602",
"0.63903725",
"0.6375416",
"0.6366404",
"0.635111... | 0.0 | -1 |
The output of joystick axes can be slowed down so that after each update its output will only deviate from previous value at a maximum of the slow value. | public void setSlow(double s) {
slow = Math.abs(s);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void updateMaxTick();",
"public void accelerateYU() {\n double temp;\n temp = this.getySpeed();\n if (temp >= -this.getMaxSpeed()) {\n temp += -this.getMaxSpeed() / 10;\n }\n this.setySpeed(temp);\n\n }",
"public void slowDownY() {\n double temp;\n ... | [
"0.63613456",
"0.6119397",
"0.6032133",
"0.58401823",
"0.5828091",
"0.5789473",
"0.5753884",
"0.57474893",
"0.57435143",
"0.5742727",
"0.5706989",
"0.56979316",
"0.5675902",
"0.56601083",
"0.56503963",
"0.5644606",
"0.5635065",
"0.56056696",
"0.558435",
"0.55409276",
"0.55357... | 0.0 | -1 |
Gets the button value | public boolean isPressed(int b) {
if (b >= 0 && b < buttonPressed.length) {
return buttonPressed[b] && !buttonLastPressed[b];
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getValue_click_Digital_coupons_button(){\r\n\t\treturn click_Digital_coupons_button.getAttribute(\"value\");\r\n\t}",
"public String getValue_click_CloseModal_Button(){\r\n\t\treturn click_CloseModal_Button.getAttribute(\"value\");\r\n\t}",
"public String getValue_txt_Fuel_Rewards_Page_Button(){\... | [
"0.7766747",
"0.7692338",
"0.7657276",
"0.7492062",
"0.70378983",
"0.68987954",
"0.68948376",
"0.68232125",
"0.67027164",
"0.66557604",
"0.66169006",
"0.650922",
"0.6386827",
"0.6361043",
"0.635144",
"0.63487434",
"0.63410944",
"0.6325253",
"0.6296426",
"0.62941724",
"0.62864... | 0.0 | -1 |
Gets whether or not the button is being released | public boolean isReleased(int b) {
if (b >= 0 && b < buttonPressed.length) {
return !buttonPressed[b] && buttonLastPressed[b];
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean getButtonReleased(Button button) {\n return getButtonReleased(button);\n }",
"boolean getButtonRelease(Buttons but);",
"public boolean isDown() {\n return pm.pen.hasPressedButtons();\n }",
"private boolean releasedInBounds(int button) {\n if (pressedButton == button) {\n ... | [
"0.82986814",
"0.82547",
"0.7791314",
"0.7652561",
"0.7522579",
"0.7367631",
"0.7103001",
"0.7081722",
"0.705728",
"0.7045028",
"0.7017005",
"0.697376",
"0.68347543",
"0.68178993",
"0.68052983",
"0.6737691",
"0.6730423",
"0.672668",
"0.6719503",
"0.67126894",
"0.6642276",
"... | 0.7940708 | 2 |
Gets the value of the axis. | public double getAxis(int b) {
if (b >= 0 && b < axes.length) {
//return axes[b];
return axisInfos[b].getValue();
} else {
return 0;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float getAxisValue(InputAxis axis) {\n Float value = axisValues.get(axis);\n return value != null ? value : 0;\n }",
"public AXValue getValue() {\n return value;\n }",
"public String getValueAxisLabel() {\n return this.valueAxisLabel;\n }",
"public double getValue(... | [
"0.7466031",
"0.71450996",
"0.70620465",
"0.6956378",
"0.6956378",
"0.6956378",
"0.69488233",
"0.69165385",
"0.68759483",
"0.68735135",
"0.68735135",
"0.68735135",
"0.68473965",
"0.68408746",
"0.68378276",
"0.6816907",
"0.6815373",
"0.6814392",
"0.68078995",
"0.6805024",
"0.6... | 0.0 | -1 |
Scenario Outline: Normal Flow | @Given("a todo with the title {string}, done status {string} and description {string}")
public void aTodoWithTheTitleDoneStatusAndDescription(String title, String doneStatus, String description){
JSONObject todo = new JSONObject();
todo.put("title", title);
boolean status = false;
if (doneStatus.equals("true")){
status = true;
}
todo.put("doneStatus", status);
todo.put("description", description);
String validID = "/todos";
try {
TodoInstance.post(validID,todo.toString());
} catch (IOException e) {
error = true;
}
try {
Thread.sleep(200);
} catch (InterruptedException e) {
error = true;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void scenario(gherkin.formatter.model.Scenario scenario) {\n }",
"@Given(\"prepare to Analysis\")\npublic void preanalysis(){\n}",
"@Given(\"I come in to the bar\")\r\n public void i_come_in_to_the_bar() {\n System.out.println(\"@Given: Entro al bar\");\r\n //throw new... | [
"0.6967509",
"0.66436493",
"0.6543057",
"0.65153295",
"0.63684094",
"0.6354681",
"0.6314911",
"0.61634755",
"0.61576194",
"0.6154193",
"0.6142738",
"0.60972106",
"0.60972106",
"0.6048274",
"0.6048274",
"0.59695566",
"0.5938793",
"0.593402",
"0.59242296",
"0.5922221",
"0.59195... | 0.0 | -1 |
Scenario Outline: Alternative Flow | @Given("a todo with the title {string}, done status {string}, description {string} and category {string}")
public void aTodoWithTheTitleDoneStatusDescriptionAndCategory(String title, String doneStatus, String description, String priority) throws IOException {
JSONObject todo = new JSONObject();
todo.put("title", title);
boolean status = false;
if (doneStatus.equals("true")){
status = true;
}
todo.put("doneStatus", status);
todo.put("description", description);
String validID = "/todos";
try {
TodoInstance.post(validID,todo.toString());
} catch (IOException e) {
error = true;
}
try {
Thread.sleep(200);
} catch (InterruptedException e) {
error = true;
}
JSONObject pResponse = TodoInstance.send("GET", "/categories?title=" + priority);
String pID = pResponse.getJSONArray("categories").getJSONObject(0).getString("id");
JSONObject tResponse = TodoInstance.send("GET", "/todos?title=" + title);
String tID = tResponse.getJSONArray("todos").getJSONObject(0).getString("id");
JSONObject body = new JSONObject();
body.put("id", pID);
TodoInstance.post("/todos/" + tID + "/categories", body.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void scenario(gherkin.formatter.model.Scenario scenario) {\n }",
"@Given(\"I come in to the bar\")\r\n public void i_come_in_to_the_bar() {\n System.out.println(\"@Given: Entro al bar\");\r\n //throw new io.cucumber.java.PendingException();\r\n }",
"@Given(\"prepare... | [
"0.67520106",
"0.65973115",
"0.6543981",
"0.648328",
"0.6470273",
"0.63441044",
"0.6282799",
"0.62206805",
"0.61617315",
"0.61532134",
"0.61378294",
"0.611637",
"0.6010019",
"0.59825015",
"0.5968007",
"0.5967311",
"0.58921885",
"0.5864573",
"0.58528155",
"0.5813408",
"0.58134... | 0.0 | -1 |
private static final ExecutorService exec = Executors.newFixedThreadPool(NTHREADS); | public void start() throws IOException {
ServerSocket socket = new ServerSocket(80);
while (!exec.isShutdown()) {
try {
final Socket conn = socket.accept();
exec.execute(new Runnable() {
@Override
public void run() {
handleRequest(conn);
}
});
} catch (RejectedExecutionException e) {
if (!exec.isShutdown()) {
System.out.println("task submission rejected" + e);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initExecService() {\n try {\n executorService = Executors.newFixedThreadPool(NO_OF_THREADS);\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }",
"public void testForNThreads();",
"public static void main(String[] args) {\n Executor... | [
"0.7162939",
"0.68468124",
"0.67974204",
"0.67914236",
"0.6680448",
"0.6630503",
"0.6595481",
"0.65567297",
"0.6540369",
"0.6523513",
"0.64987296",
"0.6486301",
"0.64604014",
"0.6428719",
"0.6419118",
"0.64094955",
"0.64050794",
"0.6393713",
"0.6375978",
"0.6372931",
"0.63576... | 0.0 | -1 |
This will reference one line at a time | public static ArrayList<String> getGeneSymbols(String filename){
String line = null;
// This will contain the gene symbols
ArrayList<String> geneSymbols = new ArrayList<String>();
try {
// FileReader reads text files in the default encoding.
FileReader fileReader = new FileReader(filename);
// Always wrap FileReader in BufferedReader.
BufferedReader bufferedReader = new BufferedReader(fileReader);
while((line = bufferedReader.readLine()) != null) {
String lineHolder = line.toString();
String delimiter = "\\t";
String [] strArray = lineHolder.split(delimiter);
geneSymbols.add(strArray[0]);
}
// Always close files.
bufferedReader.close();
}
catch(FileNotFoundException ex) {
System.out.println("Unable to open file '" + filename + "'");
}
catch(IOException ex) {
System.out.println("Error reading file '" + filename + "'");
// Or we could just do this:
// ex.printStackTrace();
}
return geneSymbols;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void getNextLine()\n\t\t\tthrows IOException, FileNotFoundException {\n String nextLine = \"\";\n if (reader == null) {\n nextLine = textLineReader.readLine();\n } else {\n nextLine = reader.readLine();\n }\n if (nextLine == null) {\n atEnd = true;\n line = new StringBuffer();\n ... | [
"0.6375205",
"0.6289187",
"0.6014896",
"0.60019493",
"0.59689355",
"0.5949497",
"0.59227395",
"0.5855108",
"0.58271587",
"0.58232486",
"0.57955515",
"0.57854056",
"0.5673876",
"0.5671955",
"0.56669575",
"0.56617135",
"0.5636763",
"0.5636292",
"0.561826",
"0.56154805",
"0.5589... | 0.0 | -1 |
basic constructor for Dealer object | public Dealer(String[] flop, String turn, String river) {
setFlop(flop);
setTurn(turn);
setRiver(river);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Dealer()\n {\n super(\"Dealer\");\n }",
"public Dealer()\n {\n\n\n }",
"public Dealer() {\n this(1);\n }",
"public Dealer() {\n dealerHand = new Deck();\n }",
"private DingnedDealManager() {}",
"public Dealer(Bloc playerBloc)\n {\n super(\"Dealer Ga... | [
"0.864912",
"0.8514317",
"0.8510492",
"0.7981466",
"0.7215404",
"0.7007",
"0.6946557",
"0.68979925",
"0.68795884",
"0.6721847",
"0.6666651",
"0.6632447",
"0.65962416",
"0.6534868",
"0.65180165",
"0.65153915",
"0.6512481",
"0.6505757",
"0.65009475",
"0.6495464",
"0.6459268",
... | 0.0 | -1 |
basic getters / setters for dealer object | public String[] getFlop() {
return this.flop;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDealerName(String dealerName);",
"public String getDealMan() {\n return dealMan;\n }",
"public void setDealerId(String dealerId);",
"public DealOffer getDealOffer() {\n return dealOffer;\n }",
"public Dealer() {\n dealerHand = new Deck();\n }",
"public long ge... | [
"0.66602564",
"0.6373635",
"0.6361514",
"0.62735194",
"0.6214485",
"0.61356914",
"0.5969439",
"0.58957356",
"0.5715306",
"0.5697886",
"0.5665788",
"0.56603384",
"0.56464314",
"0.5641233",
"0.56091475",
"0.5607764",
"0.5542153",
"0.5529029",
"0.5516156",
"0.5515362",
"0.547720... | 0.0 | -1 |
EmployeeBean.address = "This is new company"; | public static void main(String[] args) {
EmployeeBean employeeBean = new EmployeeBean("Dileep", "Software Engineer");
//System.out.println(employeeBean.ADDRESS);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Employee setFirstname(String firstname);",
"public void setEmployee(String employee)\r\n/* 43: */ {\r\n/* 44:47 */ this.employee = employee;\r\n/* 45: */ }",
"Employee setLastname(String lastname);",
"public void setEmployeeID(int employeeID) { this.employeeID = employeeID; }",
"public String c... | [
"0.6541235",
"0.64740705",
"0.6305702",
"0.6101772",
"0.6069977",
"0.60657865",
"0.60355693",
"0.5999078",
"0.59415907",
"0.59285945",
"0.5878852",
"0.58775663",
"0.58737034",
"0.58737034",
"0.58523834",
"0.58508974",
"0.58492047",
"0.5838598",
"0.5796588",
"0.57903093",
"0.5... | 0.5742539 | 24 |
Connection mongo and DB | public static void main(String[] args) {
MongoClient mongoClient = new MongoClient("localhost", 27017);
ArrayList<DatabaseObj> databaseObjarray = new ArrayList<DatabaseObj>();
ListDatabasesIterable<Document> databaseDocList = mongoClient.listDatabases();
for (Document databaseDocument : databaseDocList){
String databaseName = databaseDocument.get("name").toString();
ArrayList<String> collectionNameList = new ArrayList<String>();
MongoDatabase database = mongoClient.getDatabase(databaseName);
ListCollectionsIterable<Document> list = database.listCollections();
for (Document d : list){
String name = d.get("name").toString();
collectionNameList.add(name);
}
databaseObjarray.add(new DatabaseObj(databaseName, collectionNameList));
}
//JOptionPane.showMessageDialog(null,"Eggs are not supposed to be green.","Inane error",JOptionPane.ERROR_MESSAGE);
MainUserInterface mui = new MainUserInterface(databaseObjarray);
mui.go();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void init()\n\t{\n\t\tMongoClient mongoClient = new MongoClient(new MongoClientURI(\"mongodb://111.111.111.111:27017\"));\n\t\tdatabase=mongoClient.getDatabase(\"mydb\");\n\t}",
"private void connect() throws UnknownHostException {\n mongoClient = new MongoClient(configurationFile.getHost()... | [
"0.7803248",
"0.74803275",
"0.7296866",
"0.7135515",
"0.7062728",
"0.70411915",
"0.7033728",
"0.7022772",
"0.7020117",
"0.69946027",
"0.69812924",
"0.6952477",
"0.6948292",
"0.6905006",
"0.68529797",
"0.68155587",
"0.68063784",
"0.67627853",
"0.67054737",
"0.6594775",
"0.6571... | 0.562891 | 70 |
destroy note:main merthod is not a servlet life cycle method ,main method is not require in servlet programming servlet programming in main method is not executed...because of , it is not a servlet life cycle method. | public static void main(String[] args){
System.out.println("main method(-)");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void destroy() {\n\t\tsuper.destroy(); \n\t\tSystem.out.println(\"=====destory servlet=========\");\n\t}",
"@Override\r\n\tpublic void destroy() {\n\t\tSystem.out.println(\"second servlet destory\");\r\n\t}",
"@Override\n\tpublic void destroy() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.destro... | [
"0.8398446",
"0.805583",
"0.8053632",
"0.7605024",
"0.747721",
"0.7195919",
"0.7072218",
"0.70531094",
"0.70531094",
"0.70531094",
"0.70531094",
"0.70531094",
"0.70531094",
"0.7045484",
"0.704093",
"0.704069",
"0.70284116",
"0.70225775",
"0.70225775",
"0.70225775",
"0.7022577... | 0.0 | -1 |
Constructor for the duke.tasks.Task object, which is not used due to the further categorization of duke.tasks.Task objects into the inherited duke.tasks.ToDo, duke.tasks.Event and duke.tasks.Deadline objects that extend the duke.tasks.ToDo Object. | public Task(String description) {
this.description = description.trim();
this.isDone = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Todo(String task) {\n super(task);\n }",
"public Task() {\n\t}",
"public Task(){\n super();\n }",
"public Task(Task task) {\n id = task.id;\n taskType = task.taskType;\n title = task.title;\n period = task.period;\n deadline = task.deadline;\n ... | [
"0.7798826",
"0.7686791",
"0.75932825",
"0.7561345",
"0.74721617",
"0.74660134",
"0.74617827",
"0.741621",
"0.73519105",
"0.73457736",
"0.73338664",
"0.7315318",
"0.7310624",
"0.72833925",
"0.7261841",
"0.72615945",
"0.7238827",
"0.72273725",
"0.72263646",
"0.7225733",
"0.720... | 0.6795121 | 50 |
Returns the icon of the task that represents whether the task is done or not. v represents the task being done. x represents the task being not done. | public String getStatusIcon() {
return (isDone ? "v" : "x"); // returns ticks (v) and crosses (x)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getStatusIcon() {\n return (isDone ? \"X\" : \" \"); //mark done task with X\n }",
"public String getStatusIcon() {\n return (isDone? \"v\" : \"x\");\n }",
"private String getStatusIcon() {\n return this.isDone ? \"X\" : \"\";\n }",
"protected String getStatusIcon(... | [
"0.74986345",
"0.7346419",
"0.7162234",
"0.7044713",
"0.69288564",
"0.6920977",
"0.67855203",
"0.6688722",
"0.6649154",
"0.6635921",
"0.6559722",
"0.6506606",
"0.6477624",
"0.6428565",
"0.6428565",
"0.6428565",
"0.6373771",
"0.6319349",
"0.6084691",
"0.6084691",
"0.6053052",
... | 0.71266025 | 3 |
Returns the description of the Task object. | public String getDescription() {
return description;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String get_task_description()\n {\n return task_description;\n }",
"public String getTaskName() {\n return this.taskDescription;\n }",
"public String getDescription()\r\n {\r\n return \"Approver of the task \"+taskName();\r\n }",
"public String GiveTask(){\n return \... | [
"0.84254324",
"0.8002562",
"0.799731",
"0.7430235",
"0.73923856",
"0.7291331",
"0.7291331",
"0.7211675",
"0.7211675",
"0.7152102",
"0.70794654",
"0.705331",
"0.70403606",
"0.70281726",
"0.7018668",
"0.6969061",
"0.69661874",
"0.69661874",
"0.69661874",
"0.69661874",
"0.695355... | 0.0 | -1 |
Return a String representation of the duke.tasks.Task, as displayed on the command line / in todo_list.txt | public String toString() {
return "["
+ this.getStatusIcon()
+ "] "
+ this.description;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getString() {\n assert tasks != null : \"tasks cannot be null\";\n StringBuilder str = new StringBuilder();\n for (int i = 1; i < parts.length; i++) {\n str.append(\" \");\n str.append(parts[i]);\n }\n String taskString = str.toString();\n ... | [
"0.74328953",
"0.7430281",
"0.73929507",
"0.70640063",
"0.7043839",
"0.7037553",
"0.70347667",
"0.7008083",
"0.7003718",
"0.6999432",
"0.69390136",
"0.69378245",
"0.6926039",
"0.68987864",
"0.689064",
"0.68662816",
"0.6862438",
"0.6857242",
"0.6830236",
"0.6826464",
"0.672877... | 0.0 | -1 |
Sets the task as done. Note that conversion back to an undone state is perceived to be unnecessary as it does not make sense for done tasks to be undone. | public void setDone() {
this.isDone = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Task markAsDone() {\n isDone = true;\n status = \"\\u2713\"; // A tick symbol indicating the task is done.\n\n return this;\n }",
"public void markAsDone() {\n this.isDone = true;\n this.completed = \"1\";\n }",
"public void setDone(boolean value) {\n this... | [
"0.7332076",
"0.72991604",
"0.72784877",
"0.72768986",
"0.72768986",
"0.72572947",
"0.7171763",
"0.7150601",
"0.71355486",
"0.71331173",
"0.7113931",
"0.70548326",
"0.7011048",
"0.70032966",
"0.6973069",
"0.6973069",
"0.6973069",
"0.6947684",
"0.69448876",
"0.68455935",
"0.68... | 0.72633195 | 7 |
/ renamed from: b | public final C5894b mo27872b() {
return new C5894b().mo28250a(this.f18207a);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo2508a(bxb bxb);",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public void b() {\n }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"@Override\n\tpublic void b2() {\n\t\t\n\t}",
"v... | [
"0.64558864",
"0.6283203",
"0.6252635",
"0.6250949",
"0.6244743",
"0.6216273",
"0.6194491",
"0.6193556",
"0.61641675",
"0.6140157",
"0.60993093",
"0.60974354",
"0.6077849",
"0.6001867",
"0.5997364",
"0.59737104",
"0.59737104",
"0.5905105",
"0.5904295",
"0.58908087",
"0.588663... | 0.0 | -1 |
/ renamed from: c | public final byte mo27873c() {
return 6;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo5289a(C5102c c5102c);",
"public static void c0() {\n\t}",
"void mo57278c();",
"private static void cajas() {\n\t\t\n\t}",
"void mo5290b(C5102c c5102c);",
"void mo80457c();",
"void mo12638c();",
"void mo28717a(zzc zzc);",
"void mo21072c();",
"@Override\n\tpublic void ccc() {\n\t\t\n\t}",
... | [
"0.64592767",
"0.644052",
"0.6431582",
"0.6418656",
"0.64118475",
"0.6397491",
"0.6250796",
"0.62470585",
"0.6244832",
"0.6232792",
"0.618864",
"0.61662376",
"0.6152657",
"0.61496663",
"0.6138441",
"0.6137171",
"0.6131197",
"0.6103783",
"0.60983956",
"0.6077118",
"0.6061723",... | 0.0 | -1 |
/ renamed from: d | public final byte mo27874d() {
return 15;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void d() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public int d()\r\n/* 79: */ {\r\n/* 80:82 */ return this.d;\r\n/* 81: */ }",
"public String d_()\r\n/* 445: */ {\r\n/* 446:459 */ return \"container.inventor... | [
"0.63810617",
"0.616207",
"0.6071929",
"0.59959275",
"0.5877492",
"0.58719957",
"0.5825175",
"0.57585526",
"0.5701679",
"0.5661244",
"0.5651699",
"0.56362265",
"0.562437",
"0.5615328",
"0.56114155",
"0.56114155",
"0.5605659",
"0.56001145",
"0.5589302",
"0.5571578",
"0.5559222... | 0.0 | -1 |
/ renamed from: f | public final int mo27877f() {
return this.f18208b;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void func_70305_f() {}",
"public static Forca get_f(){\n\t\treturn f;\n\t}",
"void mo84656a(float f);",
"public final void mo8765a(float f) {\n }",
"@Override\n public int f() {\n return 0;\n }",
"public void f() {\n }",
"void mo9704b(float f, float f2, int i);",
"void mo56155... | [
"0.7323683",
"0.65213245",
"0.649907",
"0.64541733",
"0.6415534",
"0.63602704",
"0.6325114",
"0.63194084",
"0.630473",
"0.62578535",
"0.62211406",
"0.6209556",
"0.6173324",
"0.61725706",
"0.61682224",
"0.6135272",
"0.6130462",
"0.6092916",
"0.6089471",
"0.6073019",
"0.6069227... | 0.0 | -1 |
/ renamed from: g | public final String mo27878g() {
return this.f18209c;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void g() {\n }",
"public void gored() {\n\t\t\n\t}",
"public boolean g()\r\n/* 94: */ {\r\n/* 95:94 */ return this.g;\r\n/* 96: */ }",
"public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }",
"public void stg() {\n\n\t}",
"public xm n()\r\n/* 274: ... | [
"0.678414",
"0.67709124",
"0.6522526",
"0.64709187",
"0.6450875",
"0.62853396",
"0.6246107",
"0.6244691",
"0.6212993",
"0.61974055",
"0.61380696",
"0.6138033",
"0.6105423",
"0.6057178",
"0.60355175",
"0.60195917",
"0.59741",
"0.596904",
"0.59063077",
"0.58127505",
"0.58101356... | 0.0 | -1 |
Scanner sc = new Scanner(new FileInputStream("sample_input.txt")); | public static void main(String args[]) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
calculate( n, 0 );
System.out.println( min );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) throws IOException {\n\t\t FileInputStream file=new FileInputStream(\"C:\\\\Users\\\\DELL\\\\Desktop\\\\test.txt\");\r\n Scanner scan=new Scanner(file);\r\n while(scan.hasNextLine()){\r\n \t System.out.println(scan.nextLine());\r\n }\r... | [
"0.69643706",
"0.6922244",
"0.6889643",
"0.6859297",
"0.6814297",
"0.6660352",
"0.66130334",
"0.6489196",
"0.6426292",
"0.6412208",
"0.6412208",
"0.6284936",
"0.62173074",
"0.6166391",
"0.61630523",
"0.6139653",
"0.6103596",
"0.60544664",
"0.60501283",
"0.6049663",
"0.6045453... | 0.0 | -1 |
Reserve a location by the strategy | public Location reserveShippingStageLocation(ShippingStageAreaConfiguration shippingStageAreaConfiguration, Pick pick) {
logger.debug("Start to reserve a ship stage location for the pick {}, by configuration {} / strategy {}",
pick.getNumber(), shippingStageAreaConfiguration.getSequence(),
shippingStageAreaConfiguration.getLocationReserveStrategy());
String reserveCode = "";
switch (shippingStageAreaConfiguration.getLocationReserveStrategy()) {
case BY_ORDER:
reserveCode = pick.getOrderNumber();
break;
case BY_SHIPMENT:
reserveCode = pick.getShipmentLine().getShipmentNumber();
break;
case BY_WAVE:
reserveCode = pick.getShipmentLine().getWave().getNumber();
break;
}
logger.debug(" will reserve ship stage with code: {}", reserveCode);
if (StringUtils.isBlank(reserveCode)) {
throw ShippingException.raiseException("Shipping Stage Area Configuration is no correctly defined");
}
return warehouseLayoutServiceRestemplateClient.reserveLocationFromGroup(
shippingStageAreaConfiguration.getLocationGroupId(), reserveCode, pick.getSize(), pick.getQuantity(), 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean reserveRoom(int id, int customerID, String location)\n throws RemoteException, DeadlockException;",
"private void doReserve() {\n pickParkingLot();\n pickParkingSpot();\n pickTime();\n pickDuration();\n int amount = pickedparkinglot.getPrice() * picked... | [
"0.63310444",
"0.5920073",
"0.5885867",
"0.58643454",
"0.5808297",
"0.5808297",
"0.5808297",
"0.5662932",
"0.5662397",
"0.5611594",
"0.558931",
"0.55637854",
"0.5556583",
"0.55399805",
"0.55177474",
"0.5507253",
"0.5504436",
"0.54616135",
"0.5429298",
"0.53980863",
"0.5352123... | 0.58628124 | 4 |
create a list of integers | public static void main(String args[])
{
List<Integer> number = Arrays.asList(2,3,4,5);
// demonstration of map method
List<Integer> square = number.stream().map(x -> x*x).
collect(Collectors.toList());
System.out.println("Square od number using map()"+square);
// create a list of String
List<String> names =
Arrays.asList("Reflection","Collection","Stream");
// demonstration of filter method
List<String> result = names.stream().filter(s->s.startsWith("S")).
collect(Collectors.toList());
System.out.println(result);
// demonstration of sorted method
List<String> show =
names.stream().sorted().collect(Collectors.toList());
System.out.println(show);
// create a list of integers
List<Integer> numbers = Arrays.asList(2,3,4,5,2);
// collect method returns a set
Set<Integer> squareSet =
numbers.stream().map(x->x*x).collect(Collectors.toSet());
System.out.println(squareSet);
// demonstration of forEach method
number.stream().map(x->x*x).forEach(y->System.out.println(y));
// demonstration of reduce method
int even =
number.stream().filter(x->x%2==0).reduce(0,(ans,i)-> ans+i);
System.out.println(even);
// Create a String with no repeated keys
Stream<String[]>
str = Stream
.of(new String[][] { { "GFG", "GeeksForGeeks" },
{ "g", "geeks" },
{ "G", "Geeks" } });
// Convert the String to Map
// using toMap() method
Map<String, String>
map = str.collect(
Collectors.toMap(p -> p[0], p -> p[1]));
// Print the returned Map
System.out.println("Map:" + map);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static ArrayList<Integer> makeListOfInts() {\n ArrayList<Integer> listOfInts = new ArrayList<>(Arrays.asList(7096, 3, 3924, 2404, 4502,\n 4800, 74, 91, 9, 7, 9, 6790, 5, 59, 9, 48, 6345, 88, 73, 88, 956, 94, 665, 7,\n 797, 3978, 1, 3922, 511, 344, 6, 10, 743, 36, 9289, ... | [
"0.7886953",
"0.755134",
"0.7213843",
"0.702643",
"0.6951622",
"0.6938611",
"0.6803486",
"0.6743979",
"0.6728122",
"0.67257625",
"0.67232585",
"0.66522443",
"0.66423684",
"0.66106904",
"0.6598808",
"0.65789604",
"0.6576418",
"0.65179884",
"0.65151316",
"0.6477692",
"0.6462708... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onSelectedDayChange(CalendarView view, int year, int month,
int dayOfMonth) {
calendarListAdapter.removeALL();
calendarListAdapter = null;
calendarListAdapter = new CalendarListAdapter();
calendarListView.setAdapter(calendarListAdapter);
calendarListAdapter.add("내역", "카테고리", random.nextInt(10000)+1, 0, "지출", year, month+1, dayOfMonth);
calendarListAdapter.add("내역", "카테고리", random.nextInt(10000)+1, 0, "지출", year, month+1, dayOfMonth);
calendarListAdapter.add("내역", "카테고리", random.nextInt(10000)+1, 0, "지출", year, month+1, dayOfMonth);
calendarListAdapter.add("내역", "카테고리", random.nextInt(10000)+1, 0, "지출", year, month+1, dayOfMonth);
calendarListAdapter.add("내역", "카테고리", random.nextInt(10000)+1, 0, "지출", year, month+1, dayOfMonth);
} | {
"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 |
Created by hugoa on 4/17/2017. | public interface RESTfulAPI {
@GET("posts")
Call<List<Post>> getAllPosts();
@GET("posts")
Call<List<Post>> getAllPostsByUserID(@Query("userID") int userID);
@GET("post/{postID}")
Call<Post> getPostByID();
// @POST("post")
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpubl... | [
"0.6168699",
"0.60016143",
"0.58729106",
"0.5868131",
"0.5824119",
"0.57895094",
"0.57895094",
"0.57647973",
"0.5736492",
"0.5705222",
"0.5694301",
"0.5670465",
"0.56671727",
"0.5662889",
"0.56492877",
"0.5644921",
"0.5642457",
"0.5606048",
"0.56055903",
"0.5601539",
"0.55788... | 0.0 | -1 |
/ if !(int|long|double t JDK8 jdk) Applies this function to the given argument. | R apply(char value); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void functionalInterfacesForDoubleIntLong() {\n double d = 1.0;\n DoubleToIntFunction f1 = x -> 1;\n f1.applyAsInt(d);\n\n }",
"public int a(String paramString, int paramInt1, int paramInt2, int paramInt3)\r\n/* 239: */ {\r\n/* 240:247 */ return a(paramString, (float)para... | [
"0.5513545",
"0.5504476",
"0.5397278",
"0.5395374",
"0.53927165",
"0.5383686",
"0.53311723",
"0.5258227",
"0.52556425",
"0.52334976",
"0.5213551",
"0.5180291",
"0.5162583",
"0.5110002",
"0.5101816",
"0.50870216",
"0.5061276",
"0.5058611",
"0.50525635",
"0.50167763",
"0.500283... | 0.0 | -1 |
Determines the version of this plugin. | public static String getVersion()
{
String result = "unkown version";
InputStream properties = DashboardMojo.class.getResourceAsStream(
"/META-INF/maven/" + GROUP_ID + "/" + ARTIFACT_ID + "/pom.properties" );
if ( properties != null )
{
try
{
Properties props = new Properties();
props.load( properties );
result = props.getProperty( "version" );
}
catch ( IOException e )
{
result = "problem determining version";
}
finally
{
IOUtil.close( properties );
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PluginVersion getVersion() {\n return version;\n }",
"int getCurrentVersion();",
"Version getVersion();",
"Version getVersion();",
"Version getVersion();",
"Version getVersion();",
"public String getVersion();",
"public String getVersion();",
"public String getVersion();",
"publi... | [
"0.73218083",
"0.7271967",
"0.72553843",
"0.72553843",
"0.72553843",
"0.72553843",
"0.7245391",
"0.7245391",
"0.7245391",
"0.7245391",
"0.7236185",
"0.7236185",
"0.7236185",
"0.7236185",
"0.7236185",
"0.7236185",
"0.7236185",
"0.7236185",
"0.7202209",
"0.7202209",
"0.7202209"... | 0.0 | -1 |
/ This method is called when a GET request is sent to the URL /admin. This method prepares and dispatches the Admin view | @RequestMapping(value="/admin", method=RequestMethod.GET)
public String getAdminPage(Model model) {
return "admin";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RequestMapping(value = \"/admin\", method = RequestMethod.GET)\n public ModelAndView adminPage() {\n logger.info(\"Admin GET request\");\n\n String login = authorizationUtils.getCurrentUserLogin();\n String message = MessageFormat.format(\"User login: {0}\", login);\n logger.info(me... | [
"0.77195543",
"0.75742364",
"0.6840917",
"0.66437757",
"0.64377224",
"0.6379811",
"0.63570946",
"0.62139857",
"0.62087476",
"0.6207232",
"0.61652255",
"0.615585",
"0.61446077",
"0.60737026",
"0.5988388",
"0.5877289",
"0.58715916",
"0.5864857",
"0.5861742",
"0.5832931",
"0.581... | 0.6437974 | 4 |
/ This method is called when a GET request is sent to the url /reservations/form. This method prepares and dispatches the Reservations Form view | @RequestMapping(value="/reservations/form", method=RequestMethod.GET)
public String getAdminReservationForm(Model model) {
model.addAttribute("onDate", new Reservation());
return "reservationsForm";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RequestMapping(value=\"/reservations/form\", method=RequestMethod.POST)\r\n\tpublic String getRoomsFromTo(@Valid @ModelAttribute(\"onDate\") Reservation reservation,\r\n\t\t\tBindingResult bindingResult, Model model) {\r\n\t\tthis.reservationValidator.adminValidate(reservation, bindingResult);\r\n\t\tif(!bindingR... | [
"0.65705824",
"0.6216969",
"0.6172476",
"0.61408156",
"0.59817064",
"0.59588397",
"0.5864783",
"0.57553303",
"0.573267",
"0.57218057",
"0.56306875",
"0.5630168",
"0.55585897",
"0.5529961",
"0.5475444",
"0.5469221",
"0.54292214",
"0.5381031",
"0.5341029",
"0.53310263",
"0.5322... | 0.6932394 | 0 |
/ This method is called when a POST request is sent to the url /reservations/form. This method evaluates the recieved date from the form and prepares a List containing all the free rooms and all the reserved rooms on the recieved date | @RequestMapping(value="/reservations/form", method=RequestMethod.POST)
public String getRoomsFromTo(@Valid @ModelAttribute("onDate") Reservation reservation,
BindingResult bindingResult, Model model) {
this.reservationValidator.adminValidate(reservation, bindingResult);
if(!bindingResult.hasErrors()) {
LocalDate localDate= reservation.getCheckIn();
model.addAttribute("onDate", reservation.getCheckIn());
model.addAttribute("freeRooms", this.roomService.getFreeOn(localDate));
model.addAttribute("reservedRooms", this.roomService.getReservedOn(localDate));
return "roomsAdmin";
}
return "reservationsForm";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GetMapping\r\n public String getReservations(@RequestParam(value = \"date\", required = false) String dateString,\r\n Model model,\r\n HttpServletRequest request) {\n LocalDate date = DateUtils.createDateFromDateString(dat... | [
"0.6920008",
"0.64906096",
"0.6359034",
"0.61769724",
"0.6171354",
"0.61378706",
"0.6076478",
"0.6074799",
"0.6073999",
"0.6058082",
"0.59891105",
"0.59416574",
"0.5823858",
"0.5816581",
"0.5815228",
"0.58150184",
"0.5806527",
"0.5788406",
"0.5764524",
"0.5760437",
"0.5744849... | 0.76793796 | 0 |
/ This method is called when a GET request is sent to the URL /room/form. This method prepares and dispatches the Room Form view | @RequestMapping(value="/room/form", method=RequestMethod.GET)
public String getRoomForm(Model model) {
model.addAttribute("room", new Room());
return "roomForm";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GetMapping(\"/showFormForAddRoom\")\r\n\tpublic String showFormForAddRoom(Model theModel) {\n\t\tRoom theRoom = new Room();\r\n\t\t\r\n\t\ttheModel.addAttribute(\"room\", theRoom);\r\n\t\t\r\n\t\treturn \"/rooms/room-form\";\r\n\t}",
"@RequestMapping(value=\"/room/form\", method=RequestMethod.POST)\r\n\tpublic ... | [
"0.7191519",
"0.6221935",
"0.6050594",
"0.6008833",
"0.59524226",
"0.59232384",
"0.58459383",
"0.57894737",
"0.57649183",
"0.57090724",
"0.5660444",
"0.5632656",
"0.5613718",
"0.5569199",
"0.5558411",
"0.5516135",
"0.55005157",
"0.5461937",
"0.5452367",
"0.54463834",
"0.53861... | 0.76083046 | 0 |
/ This method is called when a POST request is sent to the URL /room/form This method evaluates the recieved room and prepares and dispatches the Room Created view | @RequestMapping(value="/room/form", method=RequestMethod.POST)
public String postRoom(@Valid @ModelAttribute("room") Room room,
BindingResult bindingResult, Model model) {
this.roomValidator.validate(room, bindingResult);
if(!bindingResult.hasErrors()) {
model.addAttribute("room", this.roomService.save(room));
return "roomCreated";
}
return "roomForm";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Result createRoom() {\n\n DynamicForm dynamicForm = Form.form().bindFromRequest();\n String roomType = dynamicForm.get(\"roomType\");\n Double price = Double.parseDouble(dynamicForm.get(\"price\"));\n int bedCount = Integer.parseInt(dynamicForm.get(\"beds\"));\n String wif... | [
"0.7401794",
"0.7059239",
"0.68739545",
"0.6815284",
"0.68037504",
"0.67834216",
"0.6715179",
"0.6618208",
"0.61830145",
"0.605328",
"0.6036056",
"0.60021144",
"0.5965407",
"0.59434515",
"0.5900094",
"0.5888357",
"0.5738676",
"0.5683716",
"0.5630846",
"0.55877995",
"0.5550266... | 0.7592033 | 0 |
Check whether the user is authorized for the particular organization. | public boolean isUserAuthorized(User user, String resourceId, String action, String orgId, int tenantId)
throws UserStoreException {
OrganizationMgtAuthzDAOImpl organizationMgtAuthzDAOImpl = new OrganizationMgtAuthzDAOImpl();
return organizationMgtAuthzDAOImpl.isUserAuthorized(user, resourceId, action, orgId, tenantId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Boolean isAuthorized(String userId);",
"boolean getIsAuthorized();",
"public boolean isAuthorised(SessionObjectDTO sessionDTO) {\n\t\ttry {\n\t\t\tIUserService service = (IUserService) BusinessServiceLocator.locate(IUserService.class);\n\t\t\tsessionDTO = (SessionObjectDTO) session.get(\"sessionDTO\");... | [
"0.6519076",
"0.63191813",
"0.62942225",
"0.6144809",
"0.6135034",
"0.6081322",
"0.60489404",
"0.5936824",
"0.59140706",
"0.5774425",
"0.5756465",
"0.5730463",
"0.5674786",
"0.563301",
"0.5605835",
"0.5592255",
"0.55774415",
"0.5566448",
"0.5555858",
"0.5489106",
"0.54866236"... | 0.6006948 | 7 |
Check whether the user has permission at least for one organization. | public boolean isUserAuthorized(User user, String resourceId, String action, int tenantId)
throws UserStoreException {
OrganizationMgtAuthzDAOImpl organizationMgtAuthzDAOImpl = new OrganizationMgtAuthzDAOImpl();
return organizationMgtAuthzDAOImpl.isUserAuthorized(user, resourceId, action, tenantId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isHasPermissions();",
"@Override\n\tpublic boolean can(String permission)\n\t{\n\t\treturn this.auth() != null && this.auth().getRole() != null && this.auth().getRole().getPermissions().parallelStream().filter(p -> Pattern.compile(p.getName()).matcher(permission).groupCount() == 0).count() != 0;\n\t}",
... | [
"0.68809897",
"0.628632",
"0.6281366",
"0.62557447",
"0.6079818",
"0.6066579",
"0.6043727",
"0.59480834",
"0.5938893",
"0.593797",
"0.58753794",
"0.58457625",
"0.58167434",
"0.5801026",
"0.57775915",
"0.5742852",
"0.57411677",
"0.5736852",
"0.57189405",
"0.57186043",
"0.57031... | 0.0 | -1 |
Make it false in Prod | private Logger(){ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic boolean paie() {\n\t\treturn false;\n\t}",
"protected boolean func_70814_o() { return true; }",
"public boolean method_2453() {\r\n return false;\r\n }",
"public boolean method_4088() {\n return false;\n }",
"public boolean method_2434() {\r\n return false;\r\n }",
... | [
"0.7144241",
"0.70949197",
"0.6896427",
"0.68289757",
"0.6815012",
"0.675061",
"0.6721855",
"0.67181015",
"0.67082185",
"0.6700269",
"0.6690336",
"0.66742367",
"0.6666277",
"0.66220695",
"0.6613516",
"0.6607828",
"0.660709",
"0.6591409",
"0.6585597",
"0.6582819",
"0.6549498",... | 0.0 | -1 |
Temporary hack: the TreeNodeRepository should be created and maintained upstream! | @Override
public SpawnResult exec(Spawn spawn, SpawnExecutionPolicy policy)
throws InterruptedException, IOException, ExecException {
TreeNodeRepository repository =
new TreeNodeRepository(execRoot, policy.getActionInputFileCache());
SortedMap<PathFragment, ActionInput> inputMap = policy.getInputMapping();
TreeNode inputRoot = repository.buildFromActionInputs(inputMap);
repository.computeMerkleDigests(inputRoot);
Command command =
RemoteSpawnRunner.buildCommand(spawn.getArguments(), spawn.getEnvironment());
Action action =
RemoteSpawnRunner.buildAction(
spawn.getOutputFiles(),
Digests.computeDigest(command),
repository.getMerkleDigest(inputRoot),
platform,
policy.getTimeout());
// Look up action cache, and reuse the action output if it is found.
ActionKey actionKey = Digests.computeActionKey(action);
ActionResult result =
this.options.remoteAcceptCached ? remoteCache.getCachedActionResult(actionKey) : null;
if (result != null) {
// We don't cache failed actions, so we know the outputs exist.
// For now, download all outputs locally; in the future, we can reuse the digests to
// just update the TreeNodeRepository and continue the build.
try {
remoteCache.download(result, execRoot, policy.getFileOutErr());
return new SpawnResult.Builder()
.setStatus(Status.SUCCESS)
.setExitCode(result.getExitCode())
.build();
} catch (CacheNotFoundException e) {
// There's a cache miss. Fall back to local execution.
}
}
SpawnResult spawnResult = delegate.exec(spawn, policy);
if (options.remoteUploadLocalResults
&& spawnResult.status() == Status.SUCCESS
&& spawnResult.exitCode() == 0) {
List<Path> outputFiles = RemoteSpawnRunner.listExistingOutputFiles(execRoot, spawn);
remoteCache.upload(actionKey, execRoot, outputFiles, policy.getFileOutErr());
}
return spawnResult;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"TreeNode getTreeNode();",
"private static TreeNode getNode() {\n TreeNode treeNode = new TreeNode(1);\n TreeNode left = new TreeNode(2);\n TreeNode right = new TreeNode(3);\n treeNode.left = left;\n treeNode.right = right;\n\n left.left = new TreeNode(4);\n right.... | [
"0.6427663",
"0.60223436",
"0.5986839",
"0.5971029",
"0.59677935",
"0.59504753",
"0.59277874",
"0.59123296",
"0.58865494",
"0.58356094",
"0.5829203",
"0.57961744",
"0.5795769",
"0.5785961",
"0.57720816",
"0.5756286",
"0.57180524",
"0.5705918",
"0.57035744",
"0.56929266",
"0.5... | 0.0 | -1 |
Called by the containing screen to set the panel size | void setSize(int width, int height)
{
this.controls.clear();
this.width = width;
this.height = height;
this.innerHeight = this.height - TOP - BOTTOM;
this.innerWidth = this.width - (MARGIN * 2) - 6;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void settings() {\n setSize(WIDTH, HEIGHT);\n }",
"private void basicSize(){\n setSize(375,400);\n }",
"public void setSize();",
"private void extendedSize(){\n setSize(600,400);\n }",
"public void updateSize() {\n\t\tint mpVis = (csub.isMorePanelVisible(... | [
"0.7529072",
"0.7354276",
"0.7321035",
"0.7320598",
"0.72673875",
"0.722796",
"0.72113395",
"0.7182685",
"0.7151642",
"0.7140505",
"0.7127763",
"0.7094293",
"0.7084563",
"0.7047757",
"0.70332223",
"0.69872713",
"0.6951867",
"0.689219",
"0.68078905",
"0.67811227",
"0.67317015"... | 0.62642926 | 94 |
Get whether the client wants to close the panel | boolean isCloseRequested()
{
return this.closeRequested;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isCloseButtonDisplayed();",
"public boolean requestCloseWindow() \n {\n return true; \n }",
"public boolean isCloseRequested(){\n return glfwWindowShouldClose(handle);\n }",
"public boolean canClose(){\n return true;\n }",
"private final void closePanel() {... | [
"0.7319708",
"0.7162049",
"0.6947274",
"0.67296046",
"0.67176443",
"0.66816455",
"0.66184133",
"0.64981866",
"0.6386431",
"0.63696",
"0.6331231",
"0.6312606",
"0.6296227",
"0.6250629",
"0.61881983",
"0.6179918",
"0.6175662",
"0.6165656",
"0.6164919",
"0.6132484",
"0.61087364"... | 0.62788445 | 13 |
Called after the screen is hidden | abstract void onHidden(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void hideScreen() {\n\t}",
"@Override\n\tpublic void hide() {\n\t\tGdx.app.log(\"GameScreen\", \"Hidden\");\n\n\t}",
"@Override\n\tpublic void onHide (ScreenState mode) {\n\n\t}",
"@Override\n\tpublic void onHide (ScreenState mode) {\n\n\t}",
"@Override\n\tpublic void hide() {\n\t\tGdx.app.log(\"Gam... | [
"0.7591473",
"0.7389779",
"0.7382656",
"0.7382656",
"0.7350558",
"0.72455174",
"0.7221072",
"0.7154431",
"0.70584506",
"0.70088094",
"0.69937253",
"0.69079506",
"0.68653786",
"0.68411356",
"0.68268645",
"0.68245316",
"0.68228114",
"0.68228114",
"0.68228114",
"0.68228114",
"0.... | 0.66290766 | 60 |
Called when the panel is shown | abstract void onShown(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void shown() {\n\n\t}",
"@Override\r\n\t\t\tpublic void componentShown(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"void zeigeFenster() {\r\n\t\t_panel.setVisible(true);\r\n\t}",
"@Override\n public void componentShown(ComponentEvent e) {\n }",
"@Override\r\n ... | [
"0.7483933",
"0.7461789",
"0.74503034",
"0.7427413",
"0.742057",
"0.73910934",
"0.73862815",
"0.73773706",
"0.7363544",
"0.73472756",
"0.73472756",
"0.73242116",
"0.7303475",
"0.7296417",
"0.7286727",
"0.724253",
"0.724253",
"0.72393495",
"0.72393495",
"0.7215881",
"0.720378"... | 0.71755916 | 24 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_navagation_drawer, container, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onSpy(SpyEvent arg0) {
if (arg0.getSnapshot() == null) {
spy = arg0.getMsg();
} else {
spy = arg0.getSnapshot().toString();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onOutput(OutputEvent arg0) {
output = arg0.getMsg();
} | {
"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 |
Creates a rule set with a given array of rules. | public static RuleSet ofList(RelOptRule... rules) {
return new ListRuleSet(ImmutableList.copyOf(rules));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static RuleSet ofList(Iterable<? extends RelOptRule> rules) {\n return new ListRuleSet(ImmutableList.copyOf(rules));\n }",
"public RulesBook(Collection<Rule<A, B>> rules) {\n this(rules, StreamingRulesEngine.create());\n }",
"@Required\n public void setRules(Set<Rule> rules)\n {\n thi... | [
"0.6631089",
"0.65375865",
"0.6508029",
"0.6377702",
"0.6362703",
"0.63551587",
"0.6346002",
"0.603954",
"0.59138316",
"0.5886966",
"0.58798176",
"0.5829861",
"0.5829861",
"0.5829861",
"0.58206165",
"0.58142036",
"0.58068365",
"0.57976943",
"0.57484883",
"0.56726205",
"0.5634... | 0.6552558 | 1 |
Creates a rule set with a given collection of rules. | public static RuleSet ofList(Iterable<? extends RelOptRule> rules) {
return new ListRuleSet(ImmutableList.copyOf(rules));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public RulesBook(Collection<Rule<A, B>> rules) {\n this(rules, StreamingRulesEngine.create());\n }",
"IRuleset add(IRuleset...rules);",
"@Required\n public void setRules(Set<Rule> rules)\n {\n this.rules = new TreeSet<Rule>(new RuleComparator());\n this.rules.addAll(rules);\n }",
"public s... | [
"0.6794694",
"0.66959316",
"0.65793335",
"0.65416265",
"0.64189726",
"0.64178085",
"0.6304526",
"0.6289067",
"0.6270146",
"0.6260109",
"0.5929581",
"0.5914926",
"0.5707264",
"0.56874335",
"0.5680131",
"0.5680131",
"0.5680131",
"0.5592316",
"0.5563639",
"0.5512916",
"0.5500548... | 0.6701491 | 1 |
Parse the ClientLogin response and return the auth token | protected String parseClientLoginResponse(HttpResponse response) throws
AuthClientException, IOException {
int status = response.getStatusLine().getStatusCode();
if (status != HttpStatus.SC_OK && status != HttpStatus.SC_FORBIDDEN) {
throw new AuthClientException("Unexpected ClientLogin HTTP status " + status);
}
String body = EntityUtils.toString(response.getEntity());
Map<String, String> responseMap = parseClientLoginBody(body);
if (status == HttpStatus.SC_OK) {
String authToken = responseMap.get("Auth");
if (authToken == null) {
throw new AuthClientException("Auth token missing from ClientLogin response");
}
return authToken;
} else {
String message = "ClientLogin forbidden";
// Base error code (eg. BadAuthentication)
String error = responseMap.get("Error");
if (error != null) {
message += ": " + error;
}
// Additional error code, not usually present (eg. InvalidSecondFactor)
String info = responseMap.get("Info");
if (info != null) {
message += " (" + info + ")";
}
throw new AuthClientException(message);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getTokenViaClientCredentials(){\n\t\t//Do we have credentials?\n\t\tif (Is.nullOrEmpty(clientId) || Is.nullOrEmpty(clientSecret)){\n\t\t\treturn 1;\n\t\t}\n\t\ttry{\n\t\t\t//Build auth. header entry\n\t\t\tString authString = \"Basic \" + Base64.getEncoder().encodeToString((clientId + \":\" + clientSecr... | [
"0.6134843",
"0.61101246",
"0.608185",
"0.6056327",
"0.5921681",
"0.5875011",
"0.58730996",
"0.58707833",
"0.5862427",
"0.58372766",
"0.58188635",
"0.5777905",
"0.57625014",
"0.57422477",
"0.5725542",
"0.569055",
"0.5690288",
"0.5680749",
"0.5680749",
"0.5680749",
"0.56780744... | 0.79928786 | 0 |
The body of the response is lines of keyvalue pairs | protected Map<String, String> parseClientLoginBody(String body) {
Map<String, String> responseMap = new HashMap<>();
for (String line : body.split("\n")) {
int idx = line.indexOf("=");
if (idx > 0) {
responseMap.put(line.substring(0, idx), line.substring(idx + 1));
}
}
return responseMap;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getBody(CloseableHttpResponse response) throws IOException {\n HttpEntity entity = response.getEntity();\n return EntityUtils.toString(entity, \"UTF-8\");\n }",
"private static String paseResponse(HttpResponse response) {\n\t\tHttpEntity entity = response.getEntity();\n\t\t\n//\t\... | [
"0.6014063",
"0.5887251",
"0.5675289",
"0.5526055",
"0.55019397",
"0.54529554",
"0.54087436",
"0.5335094",
"0.53288966",
"0.5321905",
"0.53018904",
"0.5295115",
"0.5263298",
"0.52581483",
"0.5250285",
"0.52422506",
"0.523753",
"0.52356136",
"0.52258486",
"0.52164745",
"0.5203... | 0.5725256 | 2 |
When the subscriber wants to see his activity log. Accessible subscriber the librarian menu. (action made by subscriber) | @Override
public void initialize(URL arg0, ResourceBundle arg1)
{
Subscriber subscriberA = new Subscriber(LoginController.subscriberResult.getSubscriberDetails());
MessageCS message = new MessageCS(MessageType.ACTIVITY_LOG,subscriberA);
MainClient.client.accept(message);
try {
// TODO Auto-generated catch block
Thread.sleep(1500);
} catch (InterruptedException e) {
e.printStackTrace();
}
//if the subscriber has no activities at all
if(finalSubscriberActivity.size()==0)
{
Alert alert1=new Alert(Alert.AlertType.INFORMATION);
alert1.setTitle("Activities");
alert1.setContentText("You dont have any activities");
alert1.showAndWait();
return;
}
//if the subscriber has activities
else
{
columnDate.setCellValueFactory(new PropertyValueFactory<ActivityLog,String>("Date"));
columnAction.setCellValueFactory(new PropertyValueFactory<ActivityLog,String>("Activity"));
listOfActivities = FXCollections.observableArrayList(finalSubscriberActivity);
activityLogTable.setItems(listOfActivities);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void recordInProductHelpMenuItemClicked() {\n RecordUserAction.record(\"Android.ChromeHome.IPHMenuItemClicked\");\n }",
"public void viewLogs() {\n\t}",
"@Override\n public void onClick(View view) {\n insertLogEntry();\n\n Toast toast = Toas... | [
"0.6242719",
"0.6210141",
"0.6092271",
"0.6080057",
"0.6035814",
"0.5971557",
"0.59510154",
"0.58848906",
"0.5875932",
"0.5875786",
"0.5796101",
"0.57943004",
"0.5788108",
"0.5726812",
"0.56978625",
"0.5685421",
"0.56556773",
"0.5655406",
"0.56500953",
"0.5639577",
"0.5628532... | 0.0 | -1 |
Return to Subscriber Menu | @FXML
public void returnAction(ActionEvent event) throws IOException {
LoadGUI.loadFXML("SubscriberMenu.fxml",returnButton);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void returnToMenu(){\n client.moveToState(ClientState.WELCOME_SCREEN);\n }",
"@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}",
"private static void returnMenu() {\n\t\t\r\n\t}",
"public void returnToMenu()\n\t{\n\t\tchangePanels(menu);\n\t}",
"p... | [
"0.6936525",
"0.66366786",
"0.6400909",
"0.6311171",
"0.6219749",
"0.6180778",
"0.607201",
"0.6071675",
"0.60673714",
"0.5972546",
"0.5972099",
"0.595524",
"0.5933346",
"0.5928287",
"0.5880486",
"0.587401",
"0.5857921",
"0.5851121",
"0.5841218",
"0.58363813",
"0.58323795",
... | 0.58359826 | 20 |
Is called when Request mapping url is accessed with GET Handles and prints out errors | @RequestMapping(value="/errors", method=RequestMethod.GET)
public String renderErrorPage(final Model model, final HttpServletRequest request){
// get the HttpStatusCode of the request
final int error_code = getHttpStatusCode(request);
//error_message is generated using the error_code
final String error_message=errorService.generateErrorMessage(error_code);
//get the logged in user
String loggedInUser = request.getRemoteUser();
model.addAttribute("loggedInUser", loggedInUser);
//error message is added to model
model.addAttribute("errorMsg", error_message);
//errorPage jsp
return "errors/errorPage";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RequestMapping(\"/error\")\n\tpublic String handleError() {\n\t\treturn \"error-404\";\n\t}",
"@GetMapping(\"/error\")\n public String handleError() {\n return \"ErrorPage\";\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws S... | [
"0.67014486",
"0.6626598",
"0.64899063",
"0.63360924",
"0.62985224",
"0.6289932",
"0.62122846",
"0.6176699",
"0.6175338",
"0.6138631",
"0.6123818",
"0.6123514",
"0.61115104",
"0.60941803",
"0.60845673",
"0.60742414",
"0.60737914",
"0.60334367",
"0.60314053",
"0.60215455",
"0.... | 0.0 | -1 |
Generate a String representation of the object. | @Override
public String toString() {
final StringBuilder sb = new StringBuilder("AbstractStock{");
sb.append("stockSymbol='").append(stockSymbol).append('\'');
sb.append(", lastDividend=").append(formatter.format(lastDividend));
sb.append(", parValue=").append(formatter.format(parValue));
sb.append(", stockPrice=").append(formatter.format(stockPrice));
sb.append('}');
return sb.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString()\r\n\t{\r\n\t\tStringBuffer OutString = new StringBuffer();\r\n\t\t// Open tag\r\n\t\tOutString.append(\"<\");\r\n\t\t// Add the object's type\r\n\t\tOutString.append(getType());\r\n\t\t// attach the ID if required.\r\n\t\tif (DEBUG)\r\n\t\t\tOutString.append(getObjID());\r\n\t\t// add the ... | [
"0.79704773",
"0.77526873",
"0.76128995",
"0.7590809",
"0.75719756",
"0.75289893",
"0.7521804",
"0.75027454",
"0.74220514",
"0.739193",
"0.739193",
"0.7390753",
"0.73666406",
"0.73228884",
"0.7303857",
"0.72611403",
"0.72378707",
"0.7232711",
"0.72308385",
"0.72260356",
"0.72... | 0.0 | -1 |
Equals method comparing member variables. | @Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AbstractStock that = (AbstractStock) o;
if (stockSymbol != null ? !stockSymbol.equals(that.stockSymbol) : that.stockSymbol != null) return false;
if (lastDividend != null ? !lastDividend.equals(that.lastDividend) : that.lastDividend != null) return false;
if (parValue != null ? !parValue.equals(that.parValue) : that.parValue != null) return false;
return stockPrice != null ? stockPrice.equals(that.stockPrice) : that.stockPrice == null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic boolean equals(Object o) {\n\t\tboolean res= false;\r\n\t\t\r\n\t\tif (o instanceof Member) {\r\n\t\t\tMember other = (Member) o;\t\t\t\t\t\r\n\t\t\tres= _name.equals(other._name);\t\r\n\t\t}\t\t\r\n\t\treturn res;\r\n\t}",
"private Equals() {}",
"@Override\n public boolean equals(Objec... | [
"0.6663968",
"0.6592529",
"0.64728475",
"0.62925506",
"0.6273526",
"0.62590164",
"0.6174743",
"0.6151963",
"0.61312556",
"0.6120565",
"0.610936",
"0.6085546",
"0.60825276",
"0.607657",
"0.60632473",
"0.6057842",
"0.60481876",
"0.604152",
"0.604139",
"0.60390526",
"0.60205936"... | 0.0 | -1 |
Generate a hashcode for the object using member fields. | @Override
public int hashCode() {
int result = stockSymbol != null ? stockSymbol.hashCode() : 0;
result = 31 * result + (lastDividend != null ? lastDividend.hashCode() : 0);
result = 31 * result + (parValue != null ? parValue.hashCode() : 0);
result = 31 * result + (stockPrice != null ? stockPrice.hashCode() : 0);
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int calculateHash(final Field field) {\n int hash = 17;\n hash = (37 * hash) + field.getName().hashCode();\n Class type = field.getType();\n hash = (37 * hash) + type.getName().hashCode();\n return hash;\n }",
"@Override\n public int hashCode() {\n \tif (member == null) {\n ... | [
"0.71863073",
"0.7075676",
"0.7012904",
"0.68610007",
"0.67551297",
"0.6722827",
"0.6719625",
"0.6546281",
"0.6521307",
"0.6516643",
"0.64888656",
"0.6479804",
"0.64485484",
"0.64409184",
"0.6432153",
"0.6405596",
"0.6396035",
"0.6365839",
"0.63551646",
"0.6319873",
"0.629807... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.