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
Returns the list of values for d
public double[] getDs() { return this.ds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<T> values();", "List getValues();", "public List<V> values()\r\n\t{\r\n\t\tList<V> values = new ArrayList<V>();\r\n\t\t\r\n\t\tfor(Entry element : data)\r\n\t\t{\r\n\t\t\tvalues.add(element.value);\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn values;\r\n\t}", "public List<Object> getValues();", "@Overrid...
[ "0.721996", "0.718755", "0.7114984", "0.69275206", "0.6861326", "0.68281084", "0.6669955", "0.6669955", "0.662396", "0.65286833", "0.6524202", "0.6522868", "0.64728343", "0.6470909", "0.6470909", "0.6430983", "0.6412161", "0.64048773", "0.64033115", "0.63929635", "0.6351749",...
0.58787847
67
Calculates and returns the normalised normal to face; the normal is in the direction the face is 'facing', which is the direction from which the face's vertices are listed in clockwise order
private Vector normal(int[] face) { Vector point0 = verts[face[0]]; Vector point1 = verts[face[1]]; Vector point2 = verts[face[2]]; return point1.subtract(point0).crossProduct(point2.subtract(point0)).normalise(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void invertNormals() {\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n ...
[ "0.69235384", "0.654207", "0.6352867", "0.633719", "0.60157603", "0.6013803", "0.60106796", "0.59653443", "0.58550555", "0.5779874", "0.57644826", "0.57532275", "0.57407266", "0.5739919", "0.57331145", "0.5721922", "0.5682329", "0.56537926", "0.5648336", "0.56215304", "0.5616...
0.79497427
0
Service for working with Git features.
public interface GitService extends Service { /** * Checks that project has selected branches * * @param project project for checking * @param branches branches that need to be checked * @param isCommon if true - checking will occur for all selected branches, if false - for at least one of them. * @return true if project contains selected branches, false if does not contains */ boolean containsBranches(Project project, List<Branch> branches, boolean isCommon); /** * Checkouts projects to selected branch * * @param projects projects that need to be checked out * @param branch selected branch * @param progress the listener for obtaining data on the process of performing the operation * * @return map with projects and theirs checkout statuses */ Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress); /** * Checkouts projects to selected branch * * @param projects projects that need to be checked out * @param branchName name of the branch * @param isRemote <code>true</code> if the branch has {@link BranchType#REMOTE} * @param progress the listener for obtaining data on the process of performing the operation * @return map with projects and theirs checkout statuses */ Map<Project, JGitStatus> checkoutBranch(List<Project> projects, String branchName, boolean isRemote, ProgressListener progress); /** * Gets projects that have uncommited changes * * @param projects projects that need to be checked * @return list of projects that has uncommited changes */ List<Project> getProjectsWithChanges(List<Project> projects); /** * Reverts uncommited changes * * @param projects projects that need to be resets * @return list of projects that and their discard statuses */ Map<Project, JGitStatus> revertChanges(List<Project> projects); /** * Commit changes to selectedProjects * * @param projects projects that contains changes * @param commitMessage message for commit * @param isPushImmediately if true - make push operation after commiting, if false - make commit without pushing * @param progressListener Listener for obtaining data on the process of performing the operation. */ Map<Project, JGitStatus> commitChanges(List<Project> projects, String commitMessage, boolean isPushImmediately, ProgressListener progressListener); /** * Creates new branch * * @param projects the projects that needs new branch * @param branchName new branch name * @param startPoint corresponds to the start-point option; if <code>null</code>, the current HEAD will be used * @param force if <code>true</code> and the branch with the given name * already exists, the start-point of an existing branch will be * set to a new start-point; if false, the existing branch will * not be changed * @return map with projects and theirs statuses of branch creating */ Map<Project, JGitStatus> createBranch(List<Project> projects, String branchName, String startPoint, boolean force); /** * Returns the set of selected type of branches * * @param projects projects list * @param branchType selected {@link BranchType} * @param isOnlyCommon if <code>true</code> returns only common branches for all projects and otherwise if <code>false</code> * @return set of the branches or empty set if such type of branches does not exist for this projects */ Set<Branch> getBranches(List<Project> projects, BranchType branchType, boolean isOnlyCommon); /** * Returns current branch name for selected project * * @param project - selected project * @return current branch name for selected project or <code>null</code> if project has no branches (unreachable state) */ String getCurrentBranchName(Project project); /** * Pushed selected projects to upstream * * @param projects - list of projects * @param progressListener - listener for obtaining data on the process of performing the operation * @return map of operation statuses */ Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener); /** * Pulls changes in selected projects from upstream * * @param projects - selected projects * @param progressListener - instance of {@link OperationProgressListener} * @return <code>true</code> if pull operation works well and <code>false</code> otherwise */ boolean pull(List<Project> projects, OperationProgressListener progressListener); /** * Checks that project has any references. * * @param project the cloned project * @return <code>true</code> if project has any references, <code>false</code> if project does not have references. */ public boolean hasAtLeastOneReference(Project project); /** * Returns count of commits ahead and behind index * * @param project - project to show status * @param branchName - the name of branch * @return array of ahead and behind commits counts<br> * Array consists of two parameters: * first is the count of commits ahead Index, <br> * second is the count of commits behind Index */ public int[] getAheadBehindIndexCounts(Project project, String branchName); /** * Checks whether the project has conflicts and uncommitted changes. * * @param project the project * @return array of values. Array consists of two parameters: * - has conflicts: <true> is has, otherwise <false>. * - has changes: <true> is has, otherwise <false>. */ public boolean[] hasConflictsAndChanges(Project project); /** * Starts canceling process for cloning. This may take some time. */ void cancelClone(); /** This method return tracking branch. * * @param project * @return tracking branch. */ public String getTrackingBranch(Project project); /** * This method return all commits for currently selected project * * @param project the project * @param branchName the branch * @return list of all commits for currently selected project */ public List<Commit> getAllCommits(Project project, String branchName); /** * Gets ChangedFiles for project. * * @param project the project * @return a ChangedFiles list */ List<ChangedFile> getChangedFiles(Project project); /** * Adds untracked files to index. * * @param files the map of projects and changed files * @return the list of added files */ List<ChangedFile> addUntrackedFilesToIndex(Map<Project, List<ChangedFile>> files); /** * Resets changed files to head * * @param files the map which has projects and their changed files * @return a list of changed files */ List<ChangedFile> resetChangedFiles(Map<Project, List<ChangedFile>> files); /** * Gets ProjectStatus for project. * We use {@link Status} for getting info about conflicting, untracked files etc. * Also, use it for checking the presence of uncommitted changes. * Gets current branch name, ahead and behind indexes using {@link Git}. * * @param project the project * @return ProjectStatus for the project. */ ProjectStatus getProjectStatus(Project project); /** * Gets branches of project * * @param projects cloned project * @param brType type branch * @param onlyCommon if value is <code>true</code> return only common branches of projects, * if <code>false</code> return all branches. * @return a list of branches */ Set<Branch> getBranches(Collection<Project> projects, BranchType brType, boolean onlyCommon); /** * Replaces changed files with HEAD revision * * @param changedFiles the files for replacing */ void replaceWithHEADRevision(Collection<ChangedFile> changedFiles); /** * Creates stash for projects * * @param projects the cloned projects * @param stashMessage the stash message * @param includeUntracked <code>true</code> if need to include untracked file to stash, otherwise <code>false</code> * @return a map of operation statuses */ Map<Project, Boolean> createStash(List<Project> projects, String stashMessage, boolean includeUntracked); /** * Gets list of stashes for projects * * @param projects the cloned projects * @return a list of projects' stashes */ List<Stash> getStashList(List<Project> projects); /** * Applies stash for the project * * @param stash the stash for applying * @param progressListener the listener for obtaining data on the process of performing the operation */ void applyStashes(Stash stash, ProgressListener progressListener); /** * Drops stash from the project * * @param stash the stash which need to drop * @return a map of operation statuses */ Map<Project, Boolean> stashDrop(Stash stash); /** * Deletes branch from projects * * @param projects the cloned projects * @param deletedBranch the branch which will be deleted * @param progressListener the listener for obtaining data on the process of performing the operation * @return a map of operation statuses by each project. * <code>true</code> if a branch was successfully deleted from a project, otherwise <code>false</code>. */ Map<Project, Boolean> deleteBranch(List<Project> projects, Branch deletedBranch, ProgressListener progressListener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Git getGit();", "public void gitThis(){\n\t}", "private HelloGitUtil(){\n\t}", "public abstract void execute(GitTool opts) throws Exception;", "public static void main(String[] args) {\nSystem.out.println(\"day one example how to use git\");\r\n\t}", "public static void main(String[] args) {\n\t\tSystem....
[ "0.72034943", "0.68151605", "0.65959096", "0.6454569", "0.63468", "0.59933245", "0.5983597", "0.5817693", "0.57845837", "0.5747153", "0.5672248", "0.56617767", "0.55207354", "0.5518685", "0.54743063", "0.54628944", "0.54356", "0.5393968", "0.53637135", "0.53322524", "0.532861...
0.69587344
1
Checks that project has selected branches
boolean containsBranches(Project project, List<Branch> branches, boolean isCommon);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource....
[ "0.6532074", "0.64064217", "0.63736767", "0.6288467", "0.61826724", "0.61792696", "0.5961198", "0.5893698", "0.58809626", "0.58760923", "0.580441", "0.5766577", "0.5748725", "0.5741034", "0.5735676", "0.57135093", "0.5693991", "0.56845427", "0.5626118", "0.5580526", "0.548736...
0.6907267
0
Checkouts projects to selected branch
Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void checkoutBranch(String arg) throws IOException {\n File currFile = Utils.join(Commit.COMMIT_FOLDER, commitPointers.readHeadCommit()[1] + \".txt\");\n Commit currCommit = Utils.readObject(currFile, Commit.class);\n\n if(!commitPointers.readBranches().containsKey(arg)){\n ...
[ "0.61696863", "0.6133506", "0.6042762", "0.6003959", "0.5731692", "0.5674813", "0.56544274", "0.5631035", "0.5627025", "0.5623421", "0.56211287", "0.5597924", "0.55873346", "0.5579308", "0.5481574", "0.54595006", "0.54590696", "0.5406293", "0.5399936", "0.5322111", "0.5315089...
0.73027897
0
Gets projects that have uncommited changes
List<Project> getProjectsWithChanges(List<Project> projects);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Project> getWithNonResolvedMessages();", "public List<Project> getAllProjects();", "private Collection<EclipseProject> allProjects() {\n Collection<EclipseProject> all = new HashSet<EclipseProject>(selectedProjects);\n all.addAll(requiredProjects);\n return all;\n }", "@GetMappin...
[ "0.6906061", "0.6249415", "0.6238292", "0.6181875", "0.6174198", "0.6097148", "0.60448676", "0.6023002", "0.5963352", "0.5944882", "0.5928541", "0.5836748", "0.57538754", "0.57311517", "0.5730377", "0.572611", "0.5690791", "0.56416094", "0.56263727", "0.5607872", "0.56000787"...
0.6777613
1
Commit changes to selectedProjects
Map<Project, JGitStatus> commitChanges(List<Project> projects, String commitMessage, boolean isPushImmediately, ProgressListener progressListener);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void commit(String workspace);", "public void testCommit() throws Exception {\n IProject project = createProject(\"testCommit\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n // Perform some opera...
[ "0.6360306", "0.61800766", "0.6121122", "0.60884106", "0.5969907", "0.59379333", "0.579169", "0.5790801", "0.57700616", "0.5753942", "0.57019234", "0.5688416", "0.5687013", "0.568166", "0.56726193", "0.5669376", "0.566153", "0.5660767", "0.5657972", "0.56560767", "0.56150115"...
0.6592325
0
Returns current branch name for selected project
String getCurrentBranchName(Project project);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getBranchName();", "String getBranchName();", "public String getTrackingBranch(Project project);", "public String getBranchName() {\r\n return branchName;\r\n }", "public String getBranchName() {\n return branchName;\n }", "public String getBranchName() {\n return ...
[ "0.83120024", "0.81681484", "0.7825225", "0.7571812", "0.7534545", "0.75179017", "0.7447644", "0.73280054", "0.7234993", "0.71140426", "0.7013341", "0.70043033", "0.6986058", "0.6975251", "0.69367045", "0.6877475", "0.67086655", "0.6689625", "0.663296", "0.65878654", "0.65878...
0.91856605
0
Pushed selected projects to upstream
Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void push(TaskMonitor aTM) throws Exception\n{\n // Get repository and git\n Git git = getGit();\n \n // Get push\n PushCommand push = git.push();\n push.setProgressMonitor(getProgressMonitor(aTM));\n if(getCD()!=null) push.setCredentialsProvider(getCD());\n for(PushResult pr : push....
[ "0.61461616", "0.5740284", "0.55875254", "0.55555815", "0.55161595", "0.55028784", "0.54728734", "0.54205143", "0.53854364", "0.53703415", "0.5357096", "0.5351392", "0.5340906", "0.5312805", "0.52636766", "0.52472836", "0.52358246", "0.5220136", "0.5216979", "0.52004105", "0....
0.6401831
0
Checks that project has any references.
public boolean hasAtLeastOneReference(Project project);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasProject();", "private void addReferences() throws BuildException {\n Hashtable thisReferences\n = (Hashtable) getProject().getReferences().clone();\n Hashtable newReferences = newProject.getReferences();\n Enumeration e;\n if (references.size() > 0) {\n ...
[ "0.6571544", "0.62240857", "0.6152511", "0.61361825", "0.6107451", "0.6107451", "0.6088319", "0.5963836", "0.59308225", "0.5827528", "0.5801029", "0.5794786", "0.57924545", "0.5788509", "0.5782212", "0.575601", "0.5741508", "0.57299906", "0.5701295", "0.5584389", "0.555914", ...
0.7192113
0
Returns count of commits ahead and behind index
public int[] getAheadBehindIndexCounts(Project project, String branchName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void advanceCommitIndex() {\n // 获取quorum matchIndex\n int peerNum = configuration.getServersList().size();\n long[] matchIndexes = new long[peerNum];\n int i = 0;\n for (RaftProto.Server server : configuration.getServersList()) {\n if (server.getServerId() != ...
[ "0.6441644", "0.58923346", "0.5796712", "0.5732093", "0.5709883", "0.5674648", "0.56313854", "0.5536244", "0.5493177", "0.54907554", "0.5421669", "0.5311873", "0.52968955", "0.5247269", "0.52325475", "0.52009135", "0.519597", "0.5192522", "0.51265883", "0.50937915", "0.506542...
0.7174345
0
Checks whether the project has conflicts and uncommitted changes.
public boolean[] hasConflictsAndChanges(Project project);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean isDirty() {\n return !conflicts.isEmpty() || super.isDirty();\n }", "private boolean commitChecker() {\n\t\tFile file = new File(stagePath);\n\t\tFile[] files = file.listFiles();\n\t\tif (files.length == 0 && untrackedFiles.size() == 0) {\n\t\t\tSystem.out.println(\"No cha...
[ "0.69187033", "0.65180224", "0.6167319", "0.59612656", "0.58014995", "0.57972085", "0.57893693", "0.57009774", "0.5668049", "0.5610332", "0.5610121", "0.55182403", "0.5479471", "0.5471442", "0.54656976", "0.54594344", "0.5459061", "0.5428745", "0.54153293", "0.5385341", "0.53...
0.7662465
0
Starts canceling process for cloning. This may take some time.
void cancelClone();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cancel() {\r\n\t\tcanceled = true;\r\n\t\ttry {\r\n\t\t\tThread.sleep(51);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void cancel() {\n\t\tfinish();\n\t}", "public void cancel() {\r\n\t\tbStop = true;\r\n\t}", "void cancelOriginal();", "pu...
[ "0.63153976", "0.6038008", "0.59268296", "0.5842338", "0.5792323", "0.5762018", "0.5744302", "0.5735879", "0.5655637", "0.5637905", "0.56346333", "0.56252295", "0.56238174", "0.5611981", "0.5576666", "0.5567709", "0.5554287", "0.5554287", "0.5554287", "0.5554287", "0.5554287"...
0.74184805
0
This method return tracking branch.
public String getTrackingBranch(Project project);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getBranch() {\n if (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"getBranch()\");\n Via via=(Via)sipHeader;\n return via.getBranch();\n }", "public GitBranch getBranch() { return GitDir.this.getBranch(getName())...
[ "0.7004923", "0.6909643", "0.68587464", "0.67680925", "0.67323685", "0.669299", "0.66823435", "0.6521628", "0.6511686", "0.64730674", "0.645698", "0.6384125", "0.6339549", "0.63390887", "0.6266651", "0.6251087", "0.62461656", "0.62285125", "0.6206572", "0.6168185", "0.6153415...
0.8001077
0
This method return all commits for currently selected project
public List<Commit> getAllCommits(Project project, String branchName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Commit> getAllCommits() {\r\n return datastore.createQuery(Commit.class)\r\n .field(\"vcs_system_id\").equal(vcSystem.getId())\r\n .asList();\r\n }", "public List<String> getAllCommits() {\n return Utils.plainFilenamesIn(Main.ALL_COMMITS);\n }", "public GitCommit[] getCo...
[ "0.7925441", "0.72740126", "0.70479065", "0.6990224", "0.67062545", "0.62662506", "0.59990007", "0.5985707", "0.5873153", "0.5867077", "0.5795912", "0.57114476", "0.571035", "0.57014364", "0.56581694", "0.56166095", "0.55907035", "0.5554614", "0.54670876", "0.5450306", "0.543...
0.7966272
0
Gets ChangedFiles for project.
List<ChangedFile> getChangedFiles(Project project);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getChangedFilesInProjectOption() {\r\n\t\treturn ProjectUIPlugin.getChangedFilesInProjectOption();\r\n\t}", "@Override\n public GitFile[] getFiles()\n {\n if(_files==null) try { _files = getFilesImpl(); } catch(Exception e) { throw new RuntimeException(e); }\n return _files;...
[ "0.723599", "0.650778", "0.6378127", "0.63429946", "0.6208682", "0.6185557", "0.60870785", "0.5996188", "0.5950312", "0.58644557", "0.58588773", "0.5825444", "0.5802346", "0.5758512", "0.57443076", "0.5725645", "0.56918424", "0.5678396", "0.56749237", "0.5646034", "0.5640213"...
0.87650365
0
Adds untracked files to index.
List<ChangedFile> addUntrackedFilesToIndex(Map<Project, List<ChangedFile>> files);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized static void addIndex(File fileName, TreeMap<String, TreeSet<Integer>> index) {\n if (!fileIndices.containsKey(fileName)) {\n fileIndices.put(fileName, index);\n } else {\n System.out.println(\"There exist files with the same name in the input location.\");\n ...
[ "0.58389735", "0.5774886", "0.5616337", "0.55316085", "0.5526397", "0.5498273", "0.5433057", "0.5380276", "0.5366191", "0.5319509", "0.5292478", "0.5275227", "0.5261001", "0.5240389", "0.52353543", "0.5203538", "0.51687783", "0.5126074", "0.5122524", "0.51084894", "0.5095962"...
0.730305
0
Resets changed files to head
List<ChangedFile> resetChangedFiles(Map<Project, List<ChangedFile>> files);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void reset() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry{\r\n\t\t\tbr.seek(0);\r\n\t\t}catch(IOException e){\r\n\t\t\tSystem.out.println(\"Files not found.\");\r\n\t\t}\r\n\t}", "private void reset() {\n\t\tfiles = new HashMap<>();\n\t\tparams = new HashMap<>();\n\t}", "public ...
[ "0.6956521", "0.6553177", "0.6449635", "0.6393208", "0.6332633", "0.63142157", "0.6288858", "0.62619483", "0.6237631", "0.6231064", "0.61786616", "0.616332", "0.6140498", "0.61295885", "0.61213535", "0.6099013", "0.60955286", "0.6089574", "0.6082406", "0.60819876", "0.6077949...
0.5938188
38
Gets branches of project
Set<Branch> getBranches(Collection<Project> projects, BranchType brType, boolean onlyCommon);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<String> branches();", "public List<Branch> getBranchs()\r\n\t{\t\r\n\t\tif (branchs.size() == 0)\r\n\t\t{\r\n\t\t\t//Lacos abertos carga x terra (redes radiais)\r\n\t\t\tbranchs.addAll(findBranchs());\t\t\r\n\t\t\r\n\t\t}\r\n\t\treturn branchs; \r\n\t}", "public String getTrackingBranch(Project project);"...
[ "0.75102884", "0.7207165", "0.68932974", "0.6887881", "0.67929584", "0.6721241", "0.6700384", "0.6697747", "0.66287833", "0.64242554", "0.6385924", "0.63611716", "0.6321244", "0.6317346", "0.6313405", "0.6294952", "0.62002105", "0.6120489", "0.61156815", "0.61051136", "0.6016...
0.70525914
2
Replaces changed files with HEAD revision
void replaceWithHEADRevision(Collection<ChangedFile> changedFiles);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void updateFiles(Gitlet currCommit) {\n HashMap<String, String> currHeadFiles = currCommit.tree.getHeadCommit()\n .getFileLoc();\n currCommit.tree.setMap(currHeadFiles);\n for (String fileName : currHeadFiles.keySet()) {\n FileManip temp = new FileManip...
[ "0.62058717", "0.6054818", "0.6010858", "0.5614157", "0.5534377", "0.5492312", "0.5428835", "0.54020125", "0.5342583", "0.5265385", "0.5259496", "0.52392197", "0.52081984", "0.5205029", "0.51972425", "0.51902443", "0.51686805", "0.5168662", "0.51651543", "0.5152304", "0.51507...
0.86384004
0
Creates stash for projects
Map<Project, Boolean> createStash(List<Project> projects, String stashMessage, boolean includeUntracked);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map<Project, Boolean> stashDrop(Stash stash);", "List<Stash> getStashList(List<Project> projects);", "public void createProject(Project newProject);", "Project createProject();", "Project createProject();", "Project createProject();", "void applyStashes(Stash stash, ProgressListener progressListener);"...
[ "0.5901862", "0.54751873", "0.54387623", "0.5410736", "0.5410736", "0.5410736", "0.5318947", "0.5076852", "0.5012295", "0.49762273", "0.4960528", "0.49371675", "0.4929404", "0.48686084", "0.4832675", "0.48008367", "0.47912735", "0.4789842", "0.47606206", "0.47409523", "0.4719...
0.77037156
0
Gets list of stashes for projects
List<Stash> getStashList(List<Project> projects);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map<Project, Boolean> createStash(List<Project> projects, String stashMessage, boolean includeUntracked);", "void applyStashes(Stash stash, ProgressListener progressListener);", "public List<Sprint> getAllSprintDetails() {\n\t\tList<Sprint> sprints = (List<Sprint>) sprintRepository.findAll();\n\t\tif(sprints.i...
[ "0.62344706", "0.5484866", "0.5400817", "0.52502286", "0.5152727", "0.5123034", "0.5088792", "0.5077196", "0.5039855", "0.4969272", "0.49262908", "0.4914082", "0.49016345", "0.48865998", "0.48557973", "0.47994545", "0.4789887", "0.47713858", "0.47628286", "0.47369096", "0.469...
0.7663325
0
Applies stash for the project
void applyStashes(Stash stash, ProgressListener progressListener);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map<Project, Boolean> createStash(List<Project> projects, String stashMessage, boolean includeUntracked);", "Map<Project, Boolean> stashDrop(Stash stash);", "protected void tryDeploy() {\n ComponentManager mgr = harness.getContext().getRuntime().getComponentManager();\n // the stash may a...
[ "0.68972135", "0.6576831", "0.57331014", "0.5602466", "0.54190373", "0.5032125", "0.493117", "0.4919555", "0.4909164", "0.4854395", "0.47826585", "0.47809753", "0.47728512", "0.45811138", "0.4574212", "0.45611244", "0.45213014", "0.45213014", "0.4498556", "0.44725916", "0.445...
0.6452579
2
Drops stash from the project
Map<Project, Boolean> stashDrop(Stash stash);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void clean(TreeDeleter treeDeleter, Path outputBase) {\n Path stashDir = getStashBase(outputBase);\n if (!stashDir.isDirectory()) {\n return;\n }\n Path stashTrashDir = stashDir.getChild(\"__trash\");\n try {\n stashDir.renameTo(stashTrashDir);\n } catch (IOException e) {\n ...
[ "0.6144876", "0.5702905", "0.5667618", "0.56537753", "0.5583025", "0.55692846", "0.55446076", "0.55446076", "0.5496865", "0.5413141", "0.5402984", "0.53688467", "0.5355029", "0.5305487", "0.5276265", "0.5249503", "0.5248269", "0.52482057", "0.52482057", "0.52482057", "0.52399...
0.7424389
0
Deletes branch from projects
Map<Project, Boolean> deleteBranch(List<Project> projects, Branch deletedBranch, ProgressListener progressListener);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteBranch(String branch)\r\n \t{\r\n \t\tthis.deleteBranch(branch, false);\r\n \t}", "void removeBranch(TRepo repo, String branchName);", "public void delete(Integer branch_id) {\n branch_dao.delete(branch_id);\n }", "public void deleteProject(Long projectId);", "@Override\n\tpubli...
[ "0.7328947", "0.72864825", "0.69007176", "0.6655381", "0.6328135", "0.62947273", "0.62387097", "0.62092924", "0.61567557", "0.6091449", "0.60697395", "0.6020866", "0.59978914", "0.5992192", "0.5927874", "0.58928293", "0.5875343", "0.58426034", "0.58196044", "0.57538927", "0.5...
0.7823044
0
/ GETTERS E SETTERS
public float getSalario() { return salario; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract Set method_1559();", "public void setdat()\n {\n }", "private void assignment() {\n\n\t\t\t}", "String setValue();", "void setParameters() {\n\t\t\n\t}", "private void setUIFields(){\n setImage();\n setTitle();\n setLocation();\n setRatingBar();\n ...
[ "0.6995264", "0.6628433", "0.6313521", "0.6295032", "0.6219812", "0.6118463", "0.60684335", "0.6044893", "0.60216796", "0.59746933", "0.59573233", "0.5939941", "0.5925399", "0.591699", "0.58987266", "0.5864009", "0.5853081", "0.58453995", "0.581999", "0.58108646", "0.5809565"...
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Gerente)) { return false; } Gerente other = (Gerente) object; if ((this.id == null && other.getId() != null) || (this.id != null && !this.id.equals(other.getId()))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6895531", "0.683832", "0.6704498", "0.6640818", "0.6640818", "0.6591583", "0.65777755", "0.65777755", "0.6574026", "0.6574026", "0.6574026", "0.6574026", "0.6574026", "0.6574026", "0.6561151", "0.6561151", "0.65438837", "0.6523999", "0.6515456", "0.64872324", "0.6476735", ...
0.0
-1
/Locators ID (amazon) LinkText PartialLinkText Xpath Name (facebook) Tagname CSS Selector Classname How to open the browser
public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "C:\\Users\\wnnar\\eclipse-workspace\\SeleniumS\\Drivers\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("https://www.amazon.com"); driver.manage().window().maximize(); WebElement Search = driver.findElement(By.id("twotabsearchtextbox")); Search.sendKeys("Phones"); WebElement SButton = driver.findElement(By.id("nav-search-submit-text")); SButton.click(); /* Absolute Path and Relative Xpath * 1) Open the facebook page * 2)Enter the email and password * 3) Click login * 4) Click forgot password * 5) come back to login page * 6) Clcik to create an account */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "HtmlPage clickLink();", "HtmlPage clickSiteLink();", "@When(\"^Click on Compose hyperlink icon$\")\npublic void click_on_Compose_hyperlink_icon() throws Throwable \n{\n\tWebElement p=driver.findElement(By.partialLinkText(\"Compose\"));\n p.click();\n System.out.println(\"Page title after link click : \"...
[ "0.61579186", "0.61325353", "0.60688657", "0.5952708", "0.58247894", "0.5770764", "0.56177896", "0.56149787", "0.5589956", "0.5582795", "0.55660987", "0.5548237", "0.55354977", "0.5493987", "0.5474031", "0.54556066", "0.5425515", "0.54245675", "0.54141235", "0.53836465", "0.5...
0.52259856
33
A primitives map from ints to floats.
public interface IntFloatMap extends Iterable<IntFloatEntry>, Serializable { /** Gets the value at the specified index and returns an implementation specific default it's missing. */ float get(int idx); /** Gets the value at the specified index and returns the given default if it's missing. */ float getWithDefault(int idx, float defaultVal); /** Returns true iff the map contains the given index. */ // TODO: rename to containsKey. boolean contains(int idx); /** Puts the value with the specified index in the map, replacing the current value if it exists, and returning the previous value. */ float put(int idx, float val); /** Removes the entry with the given index. */ void remove(int idx); /** Removes all entries. */ void clear(); /** Increments the entry with the given index by the specified increment. */ // TODO: maybe rename to increment? void add(int idx, float incr); /** Applies the function to each entry in the map. */ void apply(FnIntFloatToFloat lambda); /** Calls the function on each entry in the map. */ void iterate(FnIntFloatToVoid function); /** * Returns an iterator over the entries in the map. CAUTION: This tends to * be slower than using the equivalent apply(). */ Iterator<IntFloatEntry> iterator(); /** Returns the number of entries in the map. */ int size(); /** * Returns the indices. */ int[] getIndices(); /** * Returns the values. */ float[] getValues(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Iterable<Float> getFloats(String key);", "public Float getFloat(String key, Float defaultValue);", "public float getFloat(String key, float defaultValue);", "public FloatByteMap(float[] f) {\n _clips = new Clips(f);\n }", "public float getFloat(short dictionaryKey) {\n\t\treturn floatsMap.get(di...
[ "0.58501345", "0.56852055", "0.5668455", "0.5652864", "0.5633015", "0.5591788", "0.5581424", "0.5527238", "0.5515421", "0.5459848", "0.5452812", "0.54256576", "0.5359363", "0.5353768", "0.5352006", "0.5345216", "0.5342963", "0.5321871", "0.5315167", "0.5306346", "0.52944237",...
0.6781222
0
Gets the value at the specified index and returns an implementation specific default it's missing.
float get(int idx);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float getWithDefault(int idx, float defaultVal);", "@Override\n protected Object onGetDefaultValue(TypedArray a, int index) {\n return a.getInt(index, 0);\n }", "abstract int get(int index);", "private Object getArg(Object[] args, int index, Object defaultValue) {\n if (index < 0) ret...
[ "0.7572702", "0.6775109", "0.6555975", "0.65393305", "0.64911115", "0.6477117", "0.6456251", "0.6456118", "0.64560497", "0.6438392", "0.64262736", "0.64048886", "0.63999677", "0.63999677", "0.63999677", "0.6398893", "0.63803333", "0.6372719", "0.63669187", "0.63669187", "0.63...
0.0
-1
Gets the value at the specified index and returns the given default if it's missing.
float getWithDefault(int idx, float defaultVal);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Object getArg(Object[] args, int index, Object defaultValue) {\n if (index < 0) return defaultValue;\n return (args != null && args.length >= index+1) ? args[index] : defaultValue;\n }", "V getOrDefault(final K key, final V defaultValue);", "@Override\n protected Object ...
[ "0.6951957", "0.66234195", "0.6437382", "0.63716924", "0.6362194", "0.63337314", "0.62276953", "0.6215265", "0.62098086", "0.6175151", "0.61612666", "0.61044407", "0.6096742", "0.60951865", "0.6094661", "0.6088636", "0.60532135", "0.6034274", "0.6033419", "0.6021587", "0.6021...
0.8015229
0
Returns true iff the map contains the given index. TODO: rename to containsKey.
boolean contains(int idx);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean containsKey(Object index) {\n int i;\n return (i = ((Number) index).intValue()) >= 0 && i + start < size;\n }", "public boolean contains(int key) {\n return map.containsKey(key);\n }", "public boolean contains(int key) {\n\t\tint index = getIndex(key);\n\t\tint pos = ...
[ "0.73866844", "0.72436726", "0.71927816", "0.6939732", "0.6906332", "0.688147", "0.6878956", "0.6871754", "0.68667644", "0.6858722", "0.68357563", "0.6794759", "0.6787112", "0.6770115", "0.67461085", "0.6739906", "0.6735256", "0.6734155", "0.67214864", "0.66876674", "0.665587...
0.726992
1
Puts the value with the specified index in the map, replacing the current value if it exists, and returning the previous value.
float put(int idx, float val);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T put(int index, T t);", "@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic V put(K key, V value) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t * Iterate through new collection: n\n\t */\n\t\t//.getKey().compareTo(null) == 0\n\t\tV oldValue;\n\t\tint j = findIndex(key);\n\t\tif ( map.get(j) == null ...
[ "0.6678626", "0.6641469", "0.63791615", "0.6219652", "0.6115584", "0.6107008", "0.59375286", "0.5899673", "0.58796453", "0.5792451", "0.5778498", "0.57350993", "0.5723605", "0.5718798", "0.57128114", "0.5694164", "0.5691301", "0.56903976", "0.56734544", "0.5617124", "0.561483...
0.54712695
34
Removes the entry with the given index.
void remove(int idx);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove(int index);", "public void remove(int index) {\n\n\t}", "@ZenCodeType.Method\n default void remove(int index) {\n \n doesNot(\"support removal by index\");\n }", "public Object remove(int index) {\r\n Entry e = entry(index);\r\n remove(e);\r\n retur...
[ "0.809753", "0.79900515", "0.7945353", "0.7922346", "0.7890907", "0.78253186", "0.77067703", "0.77067703", "0.77067703", "0.77067703", "0.7669434", "0.75960404", "0.7594226", "0.7570521", "0.7549359", "0.7538459", "0.75262004", "0.74901193", "0.747978", "0.7471781", "0.738499...
0.7237947
29
Increments the entry with the given index by the specified increment. TODO: maybe rename to increment?
void add(int idx, float incr);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void incrementIndex() {\n\t\tindex++;\n\t\tif (nextItem != null) {\n\t\t\tnextItem.incrementIndex();\n\t\t}\n\t}", "private int increment(int index) {\n\t\treturn (++index < this.capacity) ? index : 0;\n\t}", "public void incOffset( Integer increment ) {\n offset += increment;\n }", "public ...
[ "0.7131558", "0.6933169", "0.69154924", "0.68048084", "0.67429954", "0.6725369", "0.65618354", "0.65490043", "0.6480274", "0.6476953", "0.6436446", "0.64261925", "0.64122236", "0.63889784", "0.63223755", "0.63084257", "0.6298481", "0.62760776", "0.6262672", "0.62383527", "0.6...
0.6441584
10
Applies the function to each entry in the map.
void apply(FnIntFloatToFloat lambda);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override // io.reactivex.functions.Function\n public Iterable<? extends Map.Entry<? extends String, ? extends String>> apply(Map<String, ? extends String> map) {\n Map<String, ? extends String> map2 = map;\n Intrinsics.checkNotNullParameter(map2, \"it\");\n return map2.entrySet();\n }",...
[ "0.6342935", "0.6158491", "0.6027055", "0.59647524", "0.5899159", "0.58856696", "0.56981975", "0.5692958", "0.5676126", "0.56427497", "0.5640697", "0.56285316", "0.56058043", "0.5603492", "0.55512637", "0.554225", "0.5533985", "0.55103076", "0.5498754", "0.5487702", "0.547561...
0.0
-1
Calls the function on each entry in the map.
void iterate(FnIntFloatToVoid function);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public native void forEach(Action3<V, K, Map<K, V>> callbackfn);", "public static <K, V> void fastForEach(Reference2ObjectMap<K, V> map, Consumer<? super Reference2ObjectMap.Entry<K, V>> consumer) {\n/* 70 */ ObjectSet<Reference2ObjectMap.Entry<K, V>> entries = map.reference2ObjectEntrySet();\n/* 71 */ ...
[ "0.6249996", "0.590353", "0.58628404", "0.58362764", "0.5726488", "0.571879", "0.56772184", "0.559598", "0.5583812", "0.55727875", "0.5559413", "0.55305344", "0.55024487", "0.54939276", "0.54709035", "0.54653454", "0.5445916", "0.5440751", "0.54377335", "0.54261345", "0.54252...
0.52437633
29
Returns an iterator over the entries in the map. CAUTION: This tends to be slower than using the equivalent apply().
Iterator<IntFloatEntry> iterator();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VisibleForTesting\n public Iterator<Entry<ClientRequest, CacheEntry>> iterator() {\n return map.entrySet().iterator();\n }", "public Iterator iterator() {\n\t\treturn map.keySet().iterator();\n\t}", "public Iterator<X> iterator() {\n return map.keySet().iterator();\n }", "public native Iterab...
[ "0.7727087", "0.7414552", "0.7274912", "0.72202855", "0.71797335", "0.71661496", "0.711398", "0.68959814", "0.6852063", "0.6817523", "0.6726236", "0.66636264", "0.65793747", "0.6566028", "0.6541285", "0.65288377", "0.64466864", "0.6415482", "0.6396727", "0.6371562", "0.635696...
0.6066071
29
Returns the number of entries in the map.
int size();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer sizeOfMap() {\n\t\tMap<String, String> simpleMap = createSimpleMap(\"Key\", \"Value\");\n numberOfEntries = 10;\n\t\treturn simpleMap.size();\n\t}", "public int size() {\n return map.size();\n }", "public int size() {\n return map.size();\n }", "public int size ()\n {\...
[ "0.8425707", "0.8391447", "0.8380929", "0.83674085", "0.83539987", "0.83522856", "0.8339907", "0.8241287", "0.8237898", "0.81736165", "0.8166124", "0.81323403", "0.8122009", "0.8116481", "0.8109883", "0.8093662", "0.80666155", "0.80006766", "0.7983986", "0.7940761", "0.790153...
0.0
-1
This Method will Add the Product to Wishlist
public boolean addProductToWishlist(String productId) throws WishListException { // TODO Auto-generated method stub boolean result=false; if(ProductRepository.productList.get(productId) != null) { if(WishlistDaoImpl.wlist.containsKey(productId)) { throw new WishListException("WishList already contain this PRODUCT"); } else { result=WishlistDaoImplObj.addProductToWishlist(productId); return result; } } else { throw new WishListException("Product ID not Found in Product List to Add in WishList\n"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToWish( String product_id, String product_name,String product_brand, String product_img,\n String product_price,String product_desc, String product_discount, String product_varieties )\n {\n boolean isAdded = mDatabaseFavorite.insert(product_id, product_name,product_brand, p...
[ "0.76813227", "0.7161505", "0.6972327", "0.6947102", "0.691983", "0.688544", "0.6878062", "0.6825888", "0.67712027", "0.6743076", "0.6718964", "0.6704453", "0.66815674", "0.66772777", "0.6667509", "0.6607967", "0.65972066", "0.65950465", "0.65904474", "0.65866894", "0.6559056...
0.7721395
0
This Method will remove the Particular Product from wishlist
public boolean removeProductFromWishlist(String productId) { // TODO Auto-generated method stub boolean result=false; if(WishlistDaoImpl.wlist.get(productId) != null) { result=WishlistDaoImplObj.removeProductFromWishlist(productId); return result; } else { int x=3; int y=0; int z=x/y; return false; //throw new WishListException("Product ID not found in Wishlist to REMOVE"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeProduct(Product product);", "public void removeProductFromWishlist(ProductItem product, User user) {\n this.removeProductFromWishlist(product, this.getWishlistByUser(user));\r\n }", "public void deletesingleWishlist(ProductDetail productDetail) {\n SQLiteDatabase db = helper.getWrit...
[ "0.758194", "0.737113", "0.7047973", "0.70151186", "0.69827646", "0.69122636", "0.6903516", "0.69032866", "0.69021994", "0.68392307", "0.67567134", "0.6724216", "0.6684805", "0.6648781", "0.6555549", "0.65369236", "0.6522542", "0.65165716", "0.6514341", "0.6485707", "0.642911...
0.7588949
0
This Method will Return all the Product of wishlist
public HashMap<String, ProductDTO> displayProductInWishlist() { // TODO Auto-generated method stub return WishlistDaoImpl.wlist ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<ProductDetail> readAllWishlist() {\n db = helper.getReadableDatabase();\n ArrayList<ProductDetail> list = new ArrayList<>();\n Cursor cursor = db.rawQuery(\"select * from \" + DatabaseConstant.TABLE_NAME_WISHLIST, null);\n while (cursor.moveToNext()) {\n Stri...
[ "0.7600301", "0.7218668", "0.7068378", "0.6966116", "0.69275635", "0.69275635", "0.6824801", "0.6803957", "0.68029636", "0.6769073", "0.6758213", "0.6758213", "0.6758213", "0.670208", "0.66994214", "0.664461", "0.66284287", "0.66283643", "0.66280794", "0.65832496", "0.6546762...
0.75958145
1
The update() method is an abstract method that is called whenever the notifyObservers() method is called by the Observable class First we check to see if the NotificationNumber is equal to this thread's RegistrationNumber. If they are, then we execute.
public void update(Observable thing, Object notificationNumber) { if (registrationNumber.compareTo((Integer) notificationNumber) == 0) { Displays display = new Displays(); display.displayDeliveryNotAssigned(CommonData.theListOfDeliveries .getListOfDeliveries()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void notifyUpdate() {\n if (mObserver != null) {\n synchronized (mObserver) {\n mNotified = true;\n mObserver.notify();\n }\n }\n }", "@Override\n public void doUpdate(NotificationMessage notificatio...
[ "0.6690349", "0.63872164", "0.6373696", "0.62889004", "0.62653935", "0.61939675", "0.6179152", "0.61476797", "0.6109253", "0.610664", "0.6093273", "0.6088758", "0.6071861", "0.6053213", "0.60509384", "0.60509384", "0.60509384", "0.60349023", "0.59960294", "0.59960294", "0.597...
0.68008095
0
Created by Subramanyam on 21Jan2017.
@PerActivity @Component(dependencies = ApplicationComponent.class, modules = {CarSelectionModule.class}) public interface CarSelectionComponent { void inject(CarTypesActivity activity); void inject(CarTypesFragment fragment); void inject(MainTypesActivity activity); void inject(MainTypesFragment fragment); void inject(BuiltDatesActivity activity); void inject(BuiltDatesFragment fragment); }
{ "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\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpu...
[ "0.61014944", "0.59701324", "0.5802099", "0.5764976", "0.575987", "0.575987", "0.57594764", "0.57346386", "0.5717253", "0.5701476", "0.56969076", "0.56749713", "0.5669782", "0.56645274", "0.56478226", "0.5639882", "0.5622419", "0.5595247", "0.5587931", "0.5578902", "0.5550493...
0.0
-1
TODO Autogenerated method stub
@Override public void finish() { super.finish(); if(!s.isClosed()){ try { s.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
{ "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
Test Source and Node as well as Parser.
public static void main(String[] args) { if (args.length == 0) Category.main(args); if (args.length == 0) Node.main(args); Test.run(new Parser(), args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void testParser() {\n VmParsingHelper.DEFAULT.parse(VM_SRC);\n }", "@Test\n public void testParse()\n {\n System.out.println(\"parse\");\n System.out.println(\" Test simple case\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final L...
[ "0.6946377", "0.6583597", "0.64720875", "0.64720875", "0.63468397", "0.63097733", "0.6276414", "0.62272114", "0.6218428", "0.6185706", "0.61126935", "0.6098309", "0.6087105", "0.60819894", "0.6070981", "0.60606927", "0.6050587", "0.604332", "0.6003891", "0.5980876", "0.594633...
0.5271161
83
Parse the grammar, returning a node (possibly an error node).
public Node run(Source s) { input = s; if (output == null) output = new Node[1]; if (markers == null) markers = EnumSet.noneOf(Marker.class); markers.clear(); saves = new int[100]; cats = new HashSet<String>(); for (Category cat : Category.values()) cats.add(cat.toString()); start = in = out = look = marked = save = 0; boolean ok = grammar(); if (! ok) { Node err = new Node(Error, s.sub(in, in)); if (marked < in) markers.clear(); Source point = s.sub(in, in); err.note(point.error(message())); return err; } assert(save == 0); assert(out == 1); Node root = output[0]; root = prune(root); root = merge(root); return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Program parse() throws SyntaxException {\n\t\tProgram p = program();\n\t\tmatchEOF();\n\t\treturn p;\n\t}", "Program parse() throws SyntaxException {\n\t\tProgram p = null;\n\t\tp = program();\n\t\tmatchEOF();\n\t\treturn p;\n\t}", "static void parse() {\r\n i = 0;\r\n j = 0;\r\n k ...
[ "0.6446141", "0.638159", "0.63476425", "0.6206161", "0.61893183", "0.6044958", "0.58850324", "0.5828163", "0.5813582", "0.5715515", "0.57041067", "0.5687943", "0.56146765", "0.5614366", "0.5587606", "0.55817217", "0.55754864", "0.55674887", "0.55670464", "0.55447865", "0.5516...
0.0
-1
Generated by from the grammar grammar = skip rules end
private boolean grammar() { return skip() && rules() && MARK(END_OF_TEXT) && EOT(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected LR1_Grammar() {\n\t\tSet follow = new Set(1);\n\t\tfollow.append(END_OF_SOURCE);\n\t\tthis.start.follow = follow;\n\t}", "protected LR1_Grammar(Grammar grammar) {\n\t\tsuper(grammar);\n\t\tSet follow = new Set(1);\n\t\tfollow.append(END_OF_SOURCE);\n\t\tthis.start.follow = follow;\n\t}", "static void...
[ "0.6587007", "0.6463888", "0.6036709", "0.5999644", "0.59311515", "0.56520444", "0.56484663", "0.5592005", "0.5584467", "0.55612475", "0.5531828", "0.5417892", "0.5396405", "0.5375085", "0.5357931", "0.53441894", "0.5323466", "0.5298583", "0.52944356", "0.5257322", "0.5249983...
0.7213316
0
factor = atom atom postops
private boolean factor() { return MARK(ATOM) && atom() && postops(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getFactor() { return this.factor; }", "protected abstract double getReductionFactor();", "public abstract int getNFactor();", "public void setFactor(int f) { this.factor = f; }", "private static void term(long[] points) {\n\t\tlong temp;\n\t\tfor (int i1 = 0; i1 < points.length; i1++) {\n\t\t\t/...
[ "0.585664", "0.571271", "0.5646844", "0.5487711", "0.5344674", "0.53342235", "0.52655905", "0.52154475", "0.5195257", "0.5173476", "0.5145528", "0.5144493", "0.51122653", "0.50975394", "0.50966907", "0.5093709", "0.5087448", "0.5079437", "0.5075721", "0.50714093", "0.5054407"...
0.5882434
0
postops = postop = (postop postops)?
private boolean postops() { return OPT(GO() && postop() && postops()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Expr unaryPost(Position pos, X10Unary_c.Operator op, Expr e) throws SemanticException {\n Type ret = e.type();\n Expr one = getLiteral(pos, ret, 1);\n Assign.Operator asgn = (op == X10Unary_c.POST_INC) ? Assign.ADD_ASSIGN : Assign.SUB_ASSIGN;\n X10Binary_c.Operator bin = (op...
[ "0.6632202", "0.6104516", "0.5554717", "0.55301446", "0.5481056", "0.54573977", "0.53949046", "0.5390222", "0.5370638", "0.5347052", "0.5342662", "0.53333133", "0.5331001", "0.53293985", "0.5323859", "0.531559", "0.52804327", "0.5275698", "0.52438277", "0.5238295", "0.5232425...
0.71429604
0
atom = bracketed / see / act / mark / tag / split / range / set / string / point / category / id
private boolean atom() { switch (NEXT()) { case '(': return bracketed(); case '[': return see(); case '@': return act(); case '#': return mark(); case '%': return tag(); case '<': return split(); case '\'': return ALT(GO() && range() || OK() && set()); case '"': return string(); case '.': return point(); default: return ALT( GO() && category() || OK() && id() ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final ANTLRv3Parser.atom_return atom() throws RecognitionException {\r\n ANTLRv3Parser.atom_return retval = new ANTLRv3Parser.atom_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token op=null;\r\n Token RULE_REF110=null;\r\n ...
[ "0.616844", "0.5770801", "0.56670976", "0.5632344", "0.546262", "0.5293077", "0.52831876", "0.52730656", "0.51973397", "0.5122416", "0.50962996", "0.5056018", "0.50326985", "0.49651882", "0.49540398", "0.49320215", "0.4924912", "0.49068633", "0.48886305", "0.483588", "0.48288...
0.6864577
0
equals = equals "=" gap
private boolean equals() { return MARK(EQUALS) && CHAR('=') && gap(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@TestProperties(name=\"test equal sign parameters for test\")\n\tpublic void testParametersWithEquals() throws Exception {\n\t\tjsystem.launch();\n//\t\tScenarioUtils.createAndCleanScenario(jsystem, ScenariosManager.getInstance().getCurrentScenario().getScenarioName());\n\t\tScenarioUtils.createAndCleanScenario(js...
[ "0.6437554", "0.6254469", "0.61218345", "0.6082722", "0.6070168", "0.605027", "0.60366344", "0.6024667", "0.59514624", "0.5929234", "0.5880059", "0.5869026", "0.5776936", "0.575516", "0.5724845", "0.5719953", "0.57198584", "0.5689962", "0.56858456", "0.5677795", "0.56547135",...
0.7928311
0
slash = operator "/" gap
private boolean slash() { return MARK(OPERATOR) && CHAR('/') && gap(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public final void mSLASH() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = SLASH;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/kr...
[ "0.62404096", "0.6167522", "0.6078867", "0.60118157", "0.58810514", "0.5841717", "0.58272684", "0.5802667", "0.5764027", "0.5749986", "0.57259506", "0.56781906", "0.55840063", "0.55132353", "0.5498267", "0.5446229", "0.5416528", "0.541478", "0.535699", "0.5344155", "0.5332396...
0.7762379
0
cat = Cc" / "Cf" / "Cn" / "Co" / "Cs" / "Ll" / "Lm" / "Lo" / "Lt" / "Lu" / "Mc" / "Me" / "Mn" / "Nd" / "Nl" / "No" / "Pc" / "Pd" / "Pe" / "Pf" / "Pi" / "Po" / "Ps" / "Sc" / "Sk" / "Sm" / "So" / "Zl" / "Zp" / "Zs" Hand optimised.
private boolean cat() { if (in >= input.length() - 2) return false; boolean ok = cats.contains(input.substring(in, in + 2)); if (ok) in = in + 2; return ok; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String composeCharacterString(String string) {\n return null;\r\n }", "private boolean CATS(Category... cs) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int ch = input.nextChar(in, len);\r\n Category cat = Category.get(ch);\r\...
[ "0.5884677", "0.5710812", "0.569042", "0.56831396", "0.5666124", "0.56460357", "0.5553258", "0.5535071", "0.54996794", "0.5470905", "0.54530513", "0.5443503", "0.541107", "0.5406948", "0.53615606", "0.53572696", "0.535052", "0.53468424", "0.53303736", "0.5310828", "0.53004956...
0.5893738
0
comment = "" visibles newline
private boolean comment() { return STRING("--") && visibles() && newline(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getComment() {\n//\t\t\tm1();\n\t\t\treturn \"small\";\n\t\t}", "private static void printNos() {\n\t\tfor(int i=0; i<=10; i++) { //this is a single line comment\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\t/*\n\t\t * this is a multiline comment\n\t\t */\n\t}", "String getComment() {\n final Str...
[ "0.68820137", "0.6677696", "0.6614784", "0.65982234", "0.65873677", "0.6575227", "0.65438354", "0.65438354", "0.64983624", "0.6489254", "0.6478449", "0.64594775", "0.64445686", "0.64339244", "0.64339244", "0.64339244", "0.64339244", "0.64339244", "0.64339244", "0.642652", "0....
0.71637946
0
space = ' '
private boolean space() { return CHAR(' '); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getSpace();", "@Override\n\tpublic void space() {\n\t\t\n\t}", "private void space() {\n if (wereTokens && !spaceSuppressed) {\n out.print(' ');\n }\n }", "public Long getSPACE() {\n return SPACE;\n }", "public static void space(int space) {\r\n\t\tfor(int i=0; ...
[ "0.8172151", "0.7800888", "0.74953485", "0.73244673", "0.72364146", "0.7189691", "0.71824443", "0.70743275", "0.701496", "0.69854826", "0.69268125", "0.6853861", "0.6853861", "0.6853861", "0.6853861", "0.68102", "0.66521364", "0.660588", "0.6599163", "0.6576178", "0.656373", ...
0.808801
1
spaces = space = (space spaces)?
private boolean spaces() { return OPT(GO() && space() && spaces()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getSpace();", "private boolean space() {\r\n return CHAR(' ');\r\n }", "public static String whitespace(int count, String spaces) {\r\n\t\tfor (int i = 0; i < count; i++) {spaces += \" \";}\r\n\t\treturn spaces;\r\n\t}", "private String indent(int spaces) {\n\t\tString result = \"\";\n\t\tfo...
[ "0.7653792", "0.75986946", "0.6943619", "0.692758", "0.68720144", "0.68545777", "0.6788252", "0.6760688", "0.6729825", "0.66138357", "0.6597752", "0.65932864", "0.6561719", "0.65492094", "0.6548815", "0.65261465", "0.6495176", "0.64940566", "0.6489792", "0.64837176", "0.64738...
0.7718585
0
literal = escape / visible
private boolean literal() { return ALT((GO() && escape()) || (OK() && visible())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static String escapeLiteral(LiteralRule rule) {\n String specialChars = \".[]{}()*+-?^$|\";\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < rule.value.length(); ++i) {\n char c = rule.value.charAt(i);\n if (specialChars.indexOf(c) != -1) {\n ...
[ "0.65807045", "0.6505008", "0.6505008", "0.6252944", "0.6252944", "0.6252944", "0.6252944", "0.618792", "0.6164582", "0.61515373", "0.6122768", "0.60566455", "0.60566455", "0.60566455", "0.60566455", "0.60566455", "0.60566455", "0.6038808", "0.6026709", "0.60159165", "0.60159...
0.66339713
0
literals = literal = (literal literals)?
private boolean literals() { return OPT(GO() && literal() && literals()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Literal createLiteral();", "Literal createLiteral();", "public Literal setLiteral(Object literalData);", "public Literal setLiteralString(String literalData);", "Rule Literal() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n ...
[ "0.65758914", "0.65758914", "0.64843816", "0.64816785", "0.6348587", "0.62557644", "0.62557644", "0.612818", "0.6114321", "0.6114321", "0.61090714", "0.6085899", "0.6053265", "0.6017027", "0.5999653", "0.5970071", "0.5924968", "0.589921", "0.5877229", "0.57516444", "0.5720231...
0.65780205
0
visible = (Cc/Cn/Co/Cs/Zl/Zp)! .
private boolean visible() { return NOT(GO() && CATS(Cc,Cn,Co,Cs,Zl,Zp)) && POINT(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean visibles() {\r\n return OPT(GO() && visible() && visibles());\r\n }", "public boolean isVisible() { return _visible; }", "static void visible() {\n int x, y;\n int[][] res = deepClone( pgmInf.img );\n\n System.out.print(\"Enter reference point: \");\n y = ...
[ "0.6705869", "0.6587039", "0.6412228", "0.6348698", "0.63049793", "0.61586887", "0.61586887", "0.61583", "0.6144862", "0.60926485", "0.5978161", "0.5978161", "0.58935916", "0.5885728", "0.5848327", "0.5845298", "0.5845298", "0.5845298", "0.58388036", "0.58383805", "0.5784024"...
0.7692857
0
visibles = visible = (visible visibles)&
private boolean visibles() { return OPT(GO() && visible() && visibles()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isVisible() { return _visible; }", "public void setVisible(boolean a){\n \t\tvisible = a;\n \t}", "public void setVisible(Boolean visible);", "private void toggleVisibleArrays() {\n if (showArray == true) {\n showArray = false;\n } else {\n showArray = ...
[ "0.63658", "0.6300541", "0.62549025", "0.62526894", "0.62230134", "0.6138722", "0.6138722", "0.61302036", "0.61215925", "0.6110875", "0.60879105", "0.60596126", "0.6057399", "0.59848213", "0.59510005", "0.5944592", "0.59391516", "0.59159213", "0.5893262", "0.58829826", "0.585...
0.6662862
0
escape = backslash (digits ';'? / 'rnqdgb')
private boolean escape() { return backslash() && ( (digits() && (CHAR(';') || true)) || SET("rnqdgb")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CharSequence escape(char c);", "private static String escape(String in) {\n // After regexp escaping \\\\\\\\ = 1 slash, \\\\\\\\\\\\\\\\ = 2 slashes.\n\n // Also, the second args of replaceAll are neither strings nor regexps, and\n // are instead a special DSL used by Matcher. Therefore, we need to dou...
[ "0.68712676", "0.6672104", "0.6610719", "0.6417278", "0.64120895", "0.632842", "0.62462884", "0.6227598", "0.62195027", "0.6191808", "0.6186048", "0.61843354", "0.6181701", "0.612631", "0.6111938", "0.60864586", "0.60800385", "0.60604364", "0.605634", "0.60408264", "0.6020905...
0.77919525
0
alpha = letter / Nd / '' / '_'
private boolean alpha() { return letter() || CATS(Nd) || CHAR('-') || CHAR('_'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean isAlpha(char p_char) {\n return ((p_char >= 'a' && p_char <= 'z') || (p_char >= 'A' && p_char <= 'Z' ));\n }", "private boolean isAlpha(String name) {\r\n\t\treturn name.matches(\"^[a-zA-Z0-9_]*$\");\r\n\t}", "public final void mLETTER() throws RecognitionException {\r\n t...
[ "0.7015602", "0.68965185", "0.6846075", "0.6732707", "0.664767", "0.65693676", "0.6559324", "0.65565586", "0.641297", "0.6390587", "0.63780284", "0.6358879", "0.6338628", "0.6297872", "0.6200607", "0.6180706", "0.61751413", "0.61541617", "0.61484015", "0.61482805", "0.6108876...
0.7958903
0
alphas = alpha = (alpha alphas)?
private boolean alphas() { return OPT(GO() && alpha() && alphas()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void alpha(int alpha);", "abstract public boolean alphaConversion();", "public void setAlpha(double aAlpha);", "public void setAlpha(int alpha)\n {\n \tthis.alpha=alpha; \n }", "public abstract void alphaConversion(Variable x, Variable y);", "public void setAlpha(double alpha);", "void ...
[ "0.7137953", "0.6769133", "0.6553188", "0.65468127", "0.6512816", "0.65060467", "0.6469839", "0.643061", "0.643061", "0.6346418", "0.627455", "0.615537", "0.6153923", "0.61459947", "0.6143917", "0.61329365", "0.6119224", "0.61038744", "0.61038744", "0.6061157", "0.6049676", ...
0.75294924
0
letter = Lu / Ll / Lt / Lm / Lo
private boolean letter() { return CATS(Lu, Ll, Lt, Lm, Lo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private char hallarLetra() {\r\n\t\tchar[] letra= {'T','R','W','A','G','M','Y','F','P','D','X',\r\n\t\t\t\t\t'B','N','J','Z','S','Q','V','H','L','C','K','E'};\r\n\t\treturn letra[numeroDNI%23];\r\n\t}", "String getWordIn(String schar, String echar);", "public char getLetter(){\r\n\t\treturn letter;\r\n\t}", ...
[ "0.66410655", "0.6555402", "0.65430963", "0.65294176", "0.6434775", "0.6388483", "0.635713", "0.6357057", "0.6339493", "0.6324703", "0.6316832", "0.6288474", "0.62864906", "0.6258143", "0.6237141", "0.6225078", "0.6185416", "0.6164179", "0.61600894", "0.6159783", "0.6146434",...
0.71599144
0
name = letter alphas / '`' nobquotes quote '`'
private boolean name() { return ( (letter() && alphas()) || (CHAR('`') && nobquotes() && MARK(QUOTE) && CHAR('`')) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String applyQuote(String name);", "private String escapeName(String name) {\n return (name != null && name.indexOf('\"') > 0) ?\n name.replaceAll(\"\\\"\", \"\\\\\\\\\\\"\") : name;\n }", "private String escape(String name) {\n return name.replaceAll(\"[^a-zA-Z0-9.-]\", \"_\");\...
[ "0.6831323", "0.6651633", "0.6639623", "0.65916246", "0.64660084", "0.63504004", "0.6329461", "0.62847805", "0.6252123", "0.62350893", "0.6232564", "0.622071", "0.6198512", "0.6169009", "0.61670744", "0.6122567", "0.6100883", "0.60567635", "0.6053155", "0.6049137", "0.6043668...
0.7227396
0
decimals = decimal = (decimal decimals)?
private boolean decimals() { return OPT(GO() && decimal() && decimals()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int decimals() {\n return 0;\n }", "public void setDecimals(int decimals) {\n this.converter.decimalsProperty().set(decimals);\n }", "public void setNumDecimals(int numDecimals) {\n this.numDecimals = numDecimals;\n }", "public int getDecimalDigits() { return 1; }", ...
[ "0.6662191", "0.6597821", "0.65699357", "0.6480049", "0.6480049", "0.6047243", "0.5910934", "0.5890632", "0.5890632", "0.58100617", "0.58100617", "0.58100617", "0.57908607", "0.57271135", "0.5677114", "0.56562614", "0.55709684", "0.55165184", "0.55015993", "0.5496151", "0.549...
0.6772834
0
hex = decimal / 'ABCDEFabcdef'
private boolean hex() { return ALT(GO() && decimal() || OK() && SET("ABCDEFabcdef")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Hexadecimal(int decimal){\n this.decimal = decimal;\n HexadecConverter hexCon = new HexadecConverter();\n this.hexString = new StringBuilder(hexCon.decToStr(decimal));\n }", "private String formatHex(int decimal) {\n char[] bin = Integer.toBinaryString(decimal).toCharArray()...
[ "0.7305943", "0.72916436", "0.66362786", "0.63377196", "0.63240814", "0.62708646", "0.6265755", "0.6244518", "0.6205297", "0.6121477", "0.6049216", "0.60467964", "0.5960746", "0.589422", "0.5892163", "0.58890927", "0.5864716", "0.58600277", "0.58448535", "0.5843575", "0.58055...
0.52892447
72
hexes = hex = (hex hexes)?
private boolean hexes() { return OPT(GO() && hex() && hexes()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String unHex(String arg) { \r\n\t String str = \"\";\r\n\t for(int i=0;i<arg.length();i+=2)\r\n\t {\r\n\t String s = arg.substring(i, (i + 2));\r\n\t int decimal = Integer.parseInt(s, 16);\r\n\t str = str + (char) decimal;\r\n\t } \r\n\t return str;\r\...
[ "0.6018517", "0.5994877", "0.57664806", "0.57652605", "0.57173", "0.57163703", "0.5682819", "0.56357986", "0.5596762", "0.5520412", "0.551198", "0.5504237", "0.5481408", "0.54730046", "0.5462786", "0.54145086", "0.54101294", "0.53975904", "0.5367353", "0.5362994", "0.53629655...
0.58155555
2
digits = ('1..9' decimals) / '0' hexes
private boolean digits() { return ALT( GO() && RANGE('1','9') && decimals() || OK() && CHAR('0') && hexes() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "short digits();", "private static String digits(long val, int digits) {\n\tlong hi = 1L << (digits * 4);\n\treturn Long.toHexString(hi | (val & (hi - 1))).substring(1);\n }", "private static String digits(long val, int digits) {\n long hi = 1L << (digits * 4);\n return Long.toHexString(hi | (v...
[ "0.7048387", "0.677173", "0.67224884", "0.6144689", "0.6122303", "0.6046712", "0.60243106", "0.5961806", "0.5915216", "0.5915216", "0.5884776", "0.5879443", "0.58063316", "0.57655007", "0.5707676", "0.56780446", "0.5667928", "0.56568545", "0.5624368", "0.55696243", "0.5530605...
0.6465418
3
noquote = "'"! literal
private boolean noquote() { return NOT(GO() && CHAR('\'')) && literal(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Rule SingleQuotedLiteral() {\n return Sequence(\n \"'\",\n ZeroOrMore(NoneOf(\"'\")),\n \"'\");\n }", "private boolean nobquotes() {\r\n return OPT(GO() && NOT(GO() && CHAR('`')) && literal() && nobquotes());\r\n }", "private String literal(Strin...
[ "0.7211131", "0.7113372", "0.7009239", "0.7002929", "0.69512343", "0.69047815", "0.6836965", "0.681775", "0.6569497", "0.6508203", "0.6446784", "0.6393236", "0.6354772", "0.6313203", "0.6290002", "0.6258737", "0.61979216", "0.6161585", "0.6154969", "0.61458784", "0.61106354",...
0.78420717
0
noquotes = noquote = (noquote noquotes)?
private boolean noquotes() { return OPT(GO() && noquote() && noquotes()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean noquote() {\r\n return NOT(GO() && CHAR('\\'')) && literal();\r\n }", "private boolean nobquotes() {\r\n return OPT(GO() && NOT(GO() && CHAR('`')) && literal() && nobquotes());\r\n }", "private boolean nodquotes() {\r\n return OPT(GO() && NOT(GO() && CHAR('\"')) && li...
[ "0.7881624", "0.7789928", "0.72842973", "0.70634174", "0.69589585", "0.6558412", "0.6521797", "0.6451023", "0.6273673", "0.62305444", "0.62070537", "0.6205011", "0.6182555", "0.6172229", "0.61621267", "0.6129115", "0.6084809", "0.60370284", "0.60140157", "0.5985054", "0.59142...
0.8056558
0
nodquotes = ('"'! literal) = (... nodquotes)?
private boolean nodquotes() { return OPT(GO() && NOT(GO() && CHAR('"')) && literal() && nodquotes()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean noquote() {\r\n return NOT(GO() && CHAR('\\'')) && literal();\r\n }", "private boolean nobquotes() {\r\n return OPT(GO() && NOT(GO() && CHAR('`')) && literal() && nobquotes());\r\n }", "Rule SingleQuotedLiteral() {\n return Sequence(\n \"'\",\n ...
[ "0.77221656", "0.76017255", "0.7363377", "0.72639656", "0.695362", "0.6865179", "0.68236876", "0.6561846", "0.6464036", "0.6432831", "0.6403067", "0.6346338", "0.63011616", "0.62834984", "0.6222911", "0.62077224", "0.61835444", "0.61189926", "0.6104667", "0.6103148", "0.60533...
0.79104733
0
nobquotes = ('`'! literal) = (... nobquotes)?
private boolean nobquotes() { return OPT(GO() && NOT(GO() && CHAR('`')) && literal() && nobquotes()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean noquote() {\r\n return NOT(GO() && CHAR('\\'')) && literal();\r\n }", "private boolean nodquotes() {\r\n return OPT(GO() && NOT(GO() && CHAR('\"')) && literal() && nodquotes());\r\n }", "private boolean noquotes() {\r\n return OPT(GO() && noquote() && noquotes());\r\n...
[ "0.80899817", "0.7676593", "0.7214343", "0.717703", "0.69746476", "0.6762508", "0.6678322", "0.6571235", "0.65553117", "0.6422653", "0.63554054", "0.62762094", "0.6224784", "0.6149781", "0.6091093", "0.6043921", "0.60038775", "0.6003211", "0.6001478", "0.598332", "0.5980488",...
0.80888325
1
noangles = ('>'! literal) = (... noangles)?
private boolean noangles() { return OPT(GO() && NOT(GO() && CHAR('>')) && literal() && noangles()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object visitLogicalNegationExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n \n if (a instanceof Long) {\n return \"\" + ((((Long) a).equals(new Long(0))) ? 1 : 0);\n }\n else {\n return \"! \" + parens(a);\n }\n }\n...
[ "0.5436958", "0.53659844", "0.5324048", "0.5207905", "0.51757866", "0.51538575", "0.51447475", "0.51336384", "0.5107162", "0.50939447", "0.4980638", "0.49787083", "0.4958768", "0.49231675", "0.49066994", "0.48955205", "0.4879027", "0.48672214", "0.48661315", "0.48625195", "0....
0.82264477
0
nocurlies = ('}'! literal) = (... nocurlies)?
private boolean nocurlies() { return OPT(GO() && NOT(GO() && CHAR('}')) && literal() && nocurlies()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean noquote() {\r\n return NOT(GO() && CHAR('\\'')) && literal();\r\n }", "public Object visitLogicalNegationExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n \n if (a instanceof Long) {\n return \"\" + ((((Long) a).equals(new Lo...
[ "0.6242142", "0.61560863", "0.61179394", "0.6104613", "0.59687686", "0.5931931", "0.5829362", "0.58261114", "0.5690801", "0.5662718", "0.5632709", "0.55769396", "0.557187", "0.55029476", "0.548066", "0.543862", "0.5437054", "0.54219073", "0.5401659", "0.53803015", "0.5375397"...
0.73975337
0
endline = '\13'? '\10'
private boolean endline() { return (CHAR('\r') || true) && CHAR('\n'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DISPID(1610940416) //= 0x60050000. The runtime will prefer the VTID if present\n @VTID(22)\n boolean atEndOfLine();", "private boolean isNewLine(int nextVal) {\n\t\treturn nextVal == CR || nextVal == LF || nextVal == EOF;\n\t}", "@Override\n\tprotected void endOfLine() {\n\t}", "public int getEndLine() {\...
[ "0.7108726", "0.6965217", "0.68675154", "0.65293765", "0.65106523", "0.648367", "0.64278936", "0.641842", "0.6312803", "0.62941545", "0.6287251", "0.62862396", "0.6267653", "0.6266374", "0.6266172", "0.6165173", "0.6142204", "0.6089998", "0.6062948", "0.6043332", "0.60393226"...
0.7949284
0
Support functions Prepare for a choice or lookahead by recording the input position.
private boolean GO() { if (save >= saves.length) { saves = Arrays.copyOf(saves, saves.length * 2); } saves[save++] = in; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void prepare(Source s) {\r\n source = s;\r\n input = source.rawText();\r\n ok = true;\r\n start = in = out = marked = lookahead = 0;\r\n failures = new TreeSet<>();\r\n output = new StringBuffer();\r\n outCount = 0;\r\n }", "protected abstract StackMani...
[ "0.54467297", "0.53702873", "0.5266862", "0.5266475", "0.5162263", "0.5093459", "0.49901646", "0.49893096", "0.49799117", "0.49429798", "0.49429798", "0.49429798", "0.49429798", "0.49361765", "0.4875361", "0.48585758", "0.48406026", "0.48296195", "0.48135704", "0.47978732", "...
0.0
-1
Check an alternative to see whether to try the next one.
private boolean OK() { return in == saves[save-1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean checkError() {\n Iterator<Integer> seq = sequence.iterator();\n Iterator<Integer> in = input.iterator();\n\n while (seq.hasNext() && in.hasNext()) {\n int a = seq.next();\n int b = in.next();\n if (a != b) {\n attempts++;\n return true;\n }\n }\n return fals...
[ "0.60124695", "0.57963103", "0.5791183", "0.56886035", "0.558876", "0.55725014", "0.5531937", "0.5503956", "0.54718345", "0.54173344", "0.54141384", "0.54112625", "0.53409314", "0.53206104", "0.52640724", "0.5254351", "0.52466947", "0.521114", "0.5206918", "0.52022594", "0.51...
0.0
-1
Pop a saved position, and return the result of a choice.
private boolean ALT(boolean b) { --save; return b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int pop() {\n if (storeStack.isEmpty()) {\n return 0;\n }\n\n Stack<Integer> assistStack = new Stack<>();\n while (!storeStack.isEmpty()) {\n assistStack.push(storeStack.pop());\n }\n int oppo = assistStack.pop()...
[ "0.6682881", "0.6624522", "0.6618015", "0.65904224", "0.6568526", "0.65293354", "0.6528542", "0.6518888", "0.6484496", "0.6483976", "0.64738697", "0.64232767", "0.639721", "0.63962394", "0.63958853", "0.63882345", "0.6372165", "0.637135", "0.636193", "0.63441557", "0.6342614"...
0.0
-1
After parsing x in x?, pop saved position, and adjust the result.
private boolean OPT(boolean b) { --save; return b || in == saves[save]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int popX() {\n\t\tif(x.size() == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tint xint = x.get(0);\n\t\tx.remove(0);\n\t\treturn xint;\n\t}", "private void dec_x()\n {\n synchronized(mLock_IndexX) { set_x(get_x() - 1); }\n }", "public void resetCurrX() {\n currX = getStartX;\n }", ...
[ "0.62953466", "0.5749937", "0.5424686", "0.5401831", "0.5370099", "0.5350128", "0.53278035", "0.5261455", "0.5203054", "0.5170893", "0.5170893", "0.51312894", "0.5114617", "0.50739", "0.5024695", "0.5022538", "0.5011434", "0.501102", "0.5006476", "0.5003387", "0.49911243", ...
0.0
-1
Backtrack to saved position, and return result of lookahead.
private boolean HAS(boolean b) { in = saves[--save]; return b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Token lookahead() {\n return m_current;\n }", "private int forwardPosition() {\n\t\treturn (position + 1) % (maxPosition + 1);\n\t}", "public void testRewind() {\n System.out.println(\"rewind\");\n BufferedCharSequence instance = null;\n BufferedCharSequence expResult =...
[ "0.7174403", "0.5660914", "0.54604423", "0.53823495", "0.5293939", "0.52664137", "0.52642703", "0.5242173", "0.52385694", "0.5158078", "0.5157653", "0.51116145", "0.51075894", "0.50230104", "0.4956535", "0.4955582", "0.49483097", "0.490529", "0.48947483", "0.48714244", "0.485...
0.0
-1
Backtrack to saved position and negate result.
private boolean NOT(boolean b) { in = saves[--save]; return !b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void negate() {\n \n \tthis.m00 = -this.m00;\n \tthis.m01 = -this.m01;\n \tthis.m02 = -this.m02;\n this.m10 = -this.m10;\n this.m11 = -this.m11;\n this.m12 = -this.m12;\n this.m20 = -this.m20;\n this.m21 = -this.m21;\n this.m22 = -this.m22;\n ...
[ "0.6532408", "0.64666116", "0.6126392", "0.61078274", "0.6080284", "0.59553283", "0.5857693", "0.58524495", "0.56818885", "0.56638485", "0.5633121", "0.5608685", "0.55804044", "0.55659723", "0.5546124", "0.5530519", "0.55051666", "0.5496028", "0.5492589", "0.54904324", "0.548...
0.56684947
9
Record an error marker for the current input position.
private boolean MARK(Marker m) { if (look > 0) return true; if (marked > in) throw new Error("marked " + marked + " in " + in); if (marked < in) { markers.clear(); marked = in; } markers.add(m); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void error(Marker marker, CharSequence message) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, String message) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, Message msg) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, Object message) {\n\n\t}", "@Overrid...
[ "0.7093792", "0.7064156", "0.6876253", "0.6843308", "0.6805264", "0.67862594", "0.67712045", "0.67691433", "0.6749925", "0.6728624", "0.66958743", "0.66911495", "0.6675357", "0.6649786", "0.6648644", "0.6629475", "0.66109097", "0.659994", "0.6554925", "0.6526648", "0.6516573"...
0.0
-1
Choice of categories, e.g. Lu / Ll / Lt / Lm / Lo
private boolean CATS(Category... cs) { if (in >= input.length()) return false; int len = input.nextLength(in); int ch = input.nextChar(in, len); Category cat = Category.get(ch); boolean ok = false; for (Category c : cs) if (cat == c) ok = true; if (! ok) return false; in += len; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Category getCategory()\n\t{\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tSystem.out.println(\"Choose category:\");\n\t\tint i = 1;\n\t\tfor(Category category : Category.values())\n\t\t{\n\t\t\tSystem.out.println(i + \": \"+category.getCategoryDescription()...
[ "0.67147005", "0.6693068", "0.65589494", "0.64980984", "0.6325695", "0.619408", "0.6064879", "0.60601693", "0.60601693", "0.6032222", "0.6004948", "0.5978063", "0.59116316", "0.59046894", "0.59036046", "0.58748156", "0.5843288", "0.5811989", "0.57801396", "0.5777553", "0.5772...
0.5360733
66
Check if a character (ascii) appears next in the input.
private boolean CHAR(char ch) { if (in >= input.length()) return false; int len = input.nextLength(in); int code = input.nextChar(in, len); if (code != ch) return false; in += len; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasChar();", "boolean hasHasCharacter();", "public static boolean isAscii(char ch) {\n/* 403 */ return (ch < '€');\n/* */ }", "private boolean containsOnlyASCII(String input) {\r\n\t\tfor (int i = 0; i < input.length(); i++) {\r\n\t\t\tif (input.charAt(i) > 127) {\r\n\t\t\t\treturn false;\r...
[ "0.7934053", "0.76211226", "0.7516301", "0.743277", "0.71485835", "0.713835", "0.7101688", "0.7061137", "0.70085895", "0.69841933", "0.6972116", "0.69178796", "0.6841322", "0.6794729", "0.6736092", "0.67227936", "0.67059326", "0.6701728", "0.66824424", "0.6680958", "0.6640736...
0.7025557
8
Check if a character in a given range appears next in the input.
private boolean RANGE(char first, char last) { if (in >= input.length()) return false; int len = input.nextLength(in); int code = input.nextChar(in, len); if (code < first || code > last) return false; in += len; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean matches(char c);", "boolean hasHasCharacter();", "boolean hasChar();", "private void parseRange(Node node) {\r\n if (switchTest) return;\r\n int low = node.low();\r\n int high = node.high();\r\n ok = false;\r\n if (in < input.length()) {\r\n ...
[ "0.61873376", "0.6064816", "0.596771", "0.59505266", "0.58293563", "0.5770396", "0.5721948", "0.5705434", "0.56651306", "0.5652043", "0.5627884", "0.56074923", "0.5605044", "0.5600233", "0.55807686", "0.5566635", "0.556319", "0.55327594", "0.5525008", "0.5515985", "0.5508812"...
0.71079963
0
Check for the given string next in the input.
private boolean STRING(String s) { int n = input.match(s, in); in += n; return (n > 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean SET(String s) {\r\n if (in >= input.length()) return false;\r\n int ch = input.charAt(in);\r\n boolean found = false;\r\n for (int i = 0; i < s.length() && ! found; i++) {\r\n if (ch == s.charAt(i)) found = true;\r\n }\r\n if (found) in++;\r\n ...
[ "0.6048937", "0.60433334", "0.59653145", "0.59354", "0.57755154", "0.57704014", "0.57681376", "0.57659763", "0.57216185", "0.5717842", "0.57145756", "0.5677877", "0.5662536", "0.5637876", "0.5637253", "0.5626249", "0.5622912", "0.5619605", "0.5607981", "0.55891705", "0.556363...
0.67341024
0
Check if a character (ascii) in a given range appears next in the input.
private boolean SET(String s) { if (in >= input.length()) return false; int ch = input.charAt(in); boolean found = false; for (int i = 0; i < s.length() && ! found; i++) { if (ch == s.charAt(i)) found = true; } if (found) in++; return found; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean RANGE(char first, char last) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int code = input.nextChar(in, len);\r\n if (code < first || code > last) return false;\r\n in += len;\r\n return true;\r\n }", "private b...
[ "0.7003224", "0.65243316", "0.6420862", "0.6412205", "0.6385393", "0.6304264", "0.6180882", "0.60238516", "0.5968082", "0.5968077", "0.5958389", "0.59267163", "0.5900765", "0.58909833", "0.58902556", "0.588006", "0.5879958", "0.58751065", "0.5874837", "0.5873382", "0.5869868"...
0.0
-1
Return the next character in the input.
private char NEXT() { if (in >= input.length()) return '\0'; return (char) input.charAt(in); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "char nextChar();", "public char nextChar() throws Exception {\n currentPos++;\n return currentChar();\n }", "private char peekNextChar()\n {\n return (pos < (input.length() - 1)) ? input.charAt(pos + 1) : 0;\n }", "char getNextChar () {\n m_pos++; \n return getChar...
[ "0.7949732", "0.7933735", "0.78827035", "0.7866954", "0.7780462", "0.7707355", "0.765971", "0.7642913", "0.7607807", "0.7465509", "0.73925644", "0.73862356", "0.7355236", "0.73357356", "0.72389466", "0.72254866", "0.720758", "0.714755", "0.7146327", "0.7139611", "0.7119531", ...
0.8368726
0
Produce an error message from the markers at the current input position.
private String message() { if (markers.size() == 0) return ""; String s = "expecting "; boolean first = true; for (Marker m : markers) { if (! first) s = s + ", "; first = false; s = s + m.toString().toLowerCase().replaceAll("_"," "); } return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void error(Marker marker, CharSequence message) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, String message) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, St...
[ "0.74861634", "0.7271662", "0.71060336", "0.7091347", "0.7085931", "0.70848215", "0.70744246", "0.70447314", "0.70438135", "0.7038158", "0.7028931", "0.69582236", "0.69580907", "0.6948794", "0.69426376", "0.69297105", "0.6898703", "0.6879714", "0.675904", "0.66856164", "0.658...
0.6472552
24
Remove temporary nodes (brackets, postix, inclusions)
private Node prune(Node r) { if (r == null) return null; Op op = r.op(); r.left(prune(r.left())); if (r.left() == null) r.ref(prune(r.ref())); else r.right(prune(r.right())); if (r.right() != null && r.right().op() == Temp) r.right(null); if (op == Temp) return r.left(); return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void removeBrackets(Element currentElement) {\r\n\t\tfor (Element removeBraces : currentElement.select(\":matchesOwn(\\\\((.*?)\\\\))\")) { // Removes characters in brackets\r\n\t\t\tremoveBraces.html(removeBraces.html().replaceAll(\"\\\\([^()]*\\\\)\", \"\"));\r\n\t\t}\r\n\t}", "public void remov...
[ "0.6119017", "0.5784468", "0.57708997", "0.55307126", "0.54586667", "0.5434359", "0.5386957", "0.537198", "0.5260378", "0.5201869", "0.5183372", "0.5148364", "0.51421666", "0.5119504", "0.5087404", "0.5077235", "0.50723183", "0.5035507", "0.5026854", "0.5020751", "0.50002104"...
0.54061407
6
Merge lists caused by inclusions.
private Node merge(Node r) { if (r.op() == Empty) return r; assert(r.op() == List); if (r.left().op() == Rule) { merge(r.right()); return r; } Node n = r.left(); assert(n.op() == List); r.left(n.left()); if (n.right().op() == Empty) return r; n.left(n.right()); n.right(r.right()); r.right(n); merge(r); return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setIncludedBy(String includer, List<String> included) {\n for (String target : included) {\n List<String> list = mIncludedBy.get(target);\n if (list == null) {\n list = new ArrayList<String>(2); // We don't expect many includes\n mIncludedBy.p...
[ "0.59240395", "0.5861367", "0.568414", "0.563436", "0.56310487", "0.56180835", "0.5483344", "0.5454408", "0.54303694", "0.5413189", "0.53752595", "0.53637344", "0.5278764", "0.52754456", "0.5250816", "0.5244519", "0.52427596", "0.52382475", "0.51736474", "0.51736474", "0.5168...
0.0
-1
Makes the MBean call to export the document packed in a SOAP message.
public int configTLS( String url ) { if (tlsIsConfigured) { log.debug("Already configured! Omit call of HttpCfgService!"); return CFG_RSP_ALREADY; } try { int rsp = ((Integer) server.invoke(xdsHttpCfgServiceName, "configTLS", new Object[] { url }, new String[] { String.class.getName() } ) ).intValue(); if ( rsp == CFG_RSP_OK || rsp == CFG_RSP_ALREADY ) { tlsIsConfigured = true; } log.debug("configTLS of HttpCfgService return (1..OK, 2..already configured, 0..ignored, -1..error):"+rsp); return rsp; } catch ( Exception x ) { log.error( "Exception occured in configTLS: "+x.getMessage(), x ); return CFG_RSP_ERROR; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeSoapMessage(SOAPMessage message);", "private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.DoControl param, boolean optimizeContent)\n throws org.apache.axis2.AxisF...
[ "0.6360715", "0.5773765", "0.5771816", "0.5605507", "0.5602524", "0.559795", "0.5563151", "0.5541741", "0.5525463", "0.55014414", "0.5493032", "0.5492475", "0.5483994", "0.5480459", "0.546878", "0.5467196", "0.5452304", "0.5436457", "0.542666", "0.5415674", "0.5374915", "0....
0.0
-1
Returns the value of the 'Element Change' containment reference. If the meaning of the 'Element Change' containment reference isn't clear, there really should be more of a description here...
ElementChange getElementChange();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getxChange() {\n\t\treturn xChange;\n\t}", "@javax.annotation.Nullable\n public String getChange() {\n return change;\n }", "public Element getElement() {\n/* 78 */ return this.e;\n/* */ }", "public native final Node changedNode() /*-{\n\t\treturn this.changedNode;\n\t}-*/...
[ "0.59584844", "0.5777816", "0.5768658", "0.5706116", "0.562609", "0.55803037", "0.547668", "0.5453738", "0.542723", "0.54266024", "0.53941596", "0.5344097", "0.53274417", "0.5325563", "0.5316966", "0.5299395", "0.528561", "0.52705526", "0.52399254", "0.5229107", "0.52131057",...
0.702232
0
Performs the crop status action. Calls method for player to select a crop.
public void perform(GameState state) { selectCrop(state); // returnBack(state); // add back in for command lines }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showCropStatus(int selection, GameState state) {\n System.out.println(\"| You have selected: \" + state.crops.get(selection - 1).getName());\n if (state.crops.get(selection - 1).getPlanted()) {\n \tSystem.out.println(\"| This crop has thirst level: \" + state.crops.get(selection - ...
[ "0.69410247", "0.6578293", "0.63592935", "0.5940236", "0.5882088", "0.5749644", "0.566394", "0.5576808", "0.5316996", "0.52999157", "0.5294699", "0.5293466", "0.5292681", "0.5230776", "0.52260065", "0.51910204", "0.5190445", "0.51836973", "0.51598555", "0.5114523", "0.5090504...
0.6581018
1
Prompts user to select a crop. Prints warning if player has no crops.
public void selectCrop(GameState state) { s = new Scanner(System.in); int selection = 0; String cropOptions = ""; for (int i = 1; i <= state.crops.size(); i ++) { cropOptions = cropOptions.concat("| " + i + ". " + state.crops.get(i-1).getName() + "\n"); } if (cropOptions.length() == 0) { System.out.println("|--------------------|\r\n" + "| You have no crops! |\r\n" + "|--------------------|"); } else { System.out.println("|----------------|\r\n" + "| Select a crop. |\r\n" + "|----------------|"); do { System.out.println(cropOptions); selection = s.nextInt(); } while(selection < 1 || selection > state.crops.size()); showCropStatus(selection, state); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showCropStatus(int selection, GameState state) {\n System.out.println(\"| You have selected: \" + state.crops.get(selection - 1).getName());\n if (state.crops.get(selection - 1).getPlanted()) {\n \tSystem.out.println(\"| This crop has thirst level: \" + state.crops.get(selection - ...
[ "0.5996094", "0.5829645", "0.5731492", "0.54667485", "0.54471695", "0.5402232", "0.5401161", "0.5320461", "0.5229394", "0.51922655", "0.51729316", "0.51621825", "0.51528555", "0.513276", "0.51191115", "0.51173514", "0.5113317", "0.5080433", "0.5066277", "0.5065658", "0.504997...
0.7733978
0
Displays status information about selected crop.
public void showCropStatus(int selection, GameState state) { System.out.println("| You have selected: " + state.crops.get(selection - 1).getName()); if (state.crops.get(selection - 1).getPlanted()) { System.out.println("| This crop has thirst level: " + state.crops.get(selection - 1).getThirstLevel() + "/" + state.crops.get(selection - 1).getMaxThirstLevel()); System.out.println("| It has grown for " + state.crops.get(selection - 1).getCurrentGrowthLevel() + " day(s)."); int days_left = state.crops.get(selection - 1).getDaysUntilHarvest() - state.crops.get(selection - 1).getCurrentGrowthLevel(); System.out.println("| Day(s) left until harvest: " + days_left); } else { System.out.println("| This crop has not been planted yet."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void selectCrop(GameState state) {\n s = new Scanner(System.in);\n int selection = 0;\n String cropOptions = \"\";\n\n for (int i = 1; i <= state.crops.size(); i ++) {\n cropOptions = cropOptions.concat(\"| \" + i + \". \" + state.crops.get(i-1).getName() + \"\\n\");\n...
[ "0.63743675", "0.6044512", "0.5921551", "0.58104706", "0.56641895", "0.5600984", "0.5584975", "0.5459584", "0.5436353", "0.54319614", "0.5413602", "0.53291154", "0.5272458", "0.52637845", "0.523555", "0.5212554", "0.52064914", "0.5188303", "0.51725006", "0.51292676", "0.51249...
0.7964227
0
/ blog controllers for school section starts
@RequestMapping(value = "/school/submit-article", method = RequestMethod.POST) public ModelAndView submitSchoolArticle(@ModelAttribute("article") BlogArticle article, HttpSession session, BindingResult result) { SchoolUser userData = (SchoolUser) session.getAttribute("SchoolStudent"); ModelAndView modelAndView = new ModelAndView(); int isUserPremium = userData.getPremium(); if(isUserPremium==1) { modelAndView.addObject("isPremium", true); } else { modelAndView.addObject("isPremium", false); } article.setUser_saved(userData.getUsername()); //article.setShr_code(generateArticleShareCode()); boolean saved = articleService.saveArtcile(article); if (saved) return new ModelAndView("redirect:/school/user/write-article?success=true"); else return new ModelAndView("redirect:/school/user/write-article?success=false"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"blog\")\n public String blog(@CookieValue(name = \"id\", required = true) String userIdCookie, Model model) {\n\n model.addAttribute(\"posts\", postDao.findAll());\n model.addAttribute(\"title\", \"Between the Notes\");\n return \"post/blog\";\n }", "public vo...
[ "0.59791183", "0.57849777", "0.5784015", "0.5730187", "0.5716911", "0.56392616", "0.5630397", "0.5584371", "0.55168545", "0.5516552", "0.55029655", "0.5494971", "0.5471126", "0.54706717", "0.54539734", "0.54220134", "0.54190266", "0.5373744", "0.53524095", "0.5347851", "0.531...
0.0
-1
Do something with result
@Override protected void onPostExecute(HttpResponse result) { if (result != null) try { Log.i("Conexao", "Dentrodopost"); //result.getEntity().writeTo(new FileOutputStream(f)); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void ComputeResult(Object result);", "Result getResult();", "public void doResult() throws Exception {\n\t\tJSONObject map=new JSONObject(getResult());\n\t\tif(!\"ok\".equalsIgnoreCase(map.getString(\"status\"))){\n\t\t\tdoFailureResult();\n\t\t\treturn;\n\t\t}\n\t\tif(getHandler()!=null){\n\t\t\tMessage hmsg=...
[ "0.72948575", "0.7141055", "0.71336895", "0.7129854", "0.7129854", "0.711289", "0.7019199", "0.697846", "0.6960566", "0.6925557", "0.68638057", "0.6849008", "0.683974", "0.68275565", "0.68216413", "0.68106943", "0.67878586", "0.6753421", "0.6742349", "0.6721605", "0.6706163",...
0.0
-1