__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/32794299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Iterator getRelevantOf(Type type) { Collection coll = new HashSet(); for (Iterator i = instanceCollection.iterator(); i.hasNext();) { Instance instance = (Instance)i.next(); if (instance.getType() == type) { coll.add(instance); } } return coll.iterator(); } COM: <s> get all the instances confirming to the type type </s>
funcom_train/16538124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mainToolBarRemoveText() { openButton.setText(""); newButton.setText(""); saveButton.setText(""); helpButton.setText(""); newArtifactButton.setText(""); editArtifactButton.setText(""); removeFromWorkingFileButton.setText(""); deepSearchButton.setText(""); updateButton.setText(""); } COM: <s> removes all the text from the toolbar buttons </s>
funcom_train/25073813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createCheckboxes(ChooseCycleDataTask aTask) { Vector<PerEpisodeData> tmpData = ProjectTree.getTree() .getProjectInSelectionPath().getModel().getPerEpisodeData(); cycleCheckboxes = new JCheckBox[tmpData.size()]; int id = 0; for (PerEpisodeData aDate : tmpData) { cycleCheckboxes[id] = new JCheckBox(aDate.getName()); cycleCheckboxes[id].addActionListener(aTask); id++; } } COM: <s> creates as many checkboxes as entries in per episode date </s>
funcom_train/18255593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector get(float nwLat, float nwLon, float seLat, float seLon, Vector graphicList) { if (view != null) { return view.get(nwLat, nwLon, seLat, seLon, graphicList); } else { return graphicList; } } COM: <s> returns a list of graphics that are within a specified region </s>
funcom_train/3763996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMessageSend() throws Throwable{ ITestMessageSender jmsSender = (ITestMessageSender)context.getBean(TEST_BEAN); //Send 5 messages jmsSender.sendMessage("Sample message text 0"); jmsSender.sendMessage("Sample message text 1"); jmsSender.sendMessage("Sample message text 2"); jmsSender.sendMessage("Sample message text 3"); jmsSender.sendMessage("Sample message text 4"); //No asserts on this - other than an exception thrown } COM: <s> test sending of messages </s>
funcom_train/1378110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getStream(String directory, String resourceIdentifier) { InputStream inputStream = new NullInputStream(0); try { File file = getRelativeFile(directory, resourceIdentifier, false); if(file != null){ inputStream = new FileInputStream(file); } } catch (Exception e) { LOG.error(e); inputStream = new NullInputStream(0); } return inputStream; } COM: <s> get the input stream associated with the relative path </s>
funcom_train/3414612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean linkFirst(E e) { if (count >= capacity) return false; ++count; Node<E> f = first; Node<E> x = new Node<E>(e, null, f); first = x; if (last == null) last = x; else f.prev = x; notEmpty.signal(); return true; } COM: <s> links e as first element or returns false if full </s>
funcom_train/41385964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getRButtonXAlumno() { if (rButtonXAlumno == null) { rButtonXAlumno = new JRadioButton(); rButtonXAlumno.setBounds(new Rectangle(5, 55, 21, 19)); rButtonXAlumno.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { selectThis(rButtonXAlumno, rButtonSuplier, rButtonDonacion); } }); } return rButtonXAlumno; } COM: <s> this method initializes r button xalumno </s>
funcom_train/23651748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMappedClass(Class mappedClass) { if (this.mappedClass == null) { initialize(mappedClass); } else { if (!this.mappedClass.equals(mappedClass)) { throw new InvalidDataAccessApiUsageException("The mapped class can not be reassigned to map to " + mappedClass + " since it is already providing mapping for " + this.mappedClass); } } } COM: <s> set the class that each row should be mapped to </s>
funcom_train/48395148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Record getValuesAsRecord() { Map values = getValues(); //if the map contains the actual reference to the underlying record then return it, else //build a record from the map values Object ref = values.get("__ref"); if(ref != null && ref instanceof Record) { return (Record) ref; } else { return new Record(JSOHelper.convertMapToJavascriptObject(values)); } } COM: <s> return the current set of values within this form as a record </s>
funcom_train/48711757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readFile(String s) { try { temp=""; BufferedReader d = new BufferedReader(new FileReader(s)); while (d.ready() ) { temp+=d.readLine().toLowerCase()+"\n"; } d.close(); } catch (Exception e) { System.err.println("File input error"); } } COM: <s> reads file from disk into internal variable </s>
funcom_train/8147180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getChildren( Vertex vertex ) throws GraphException { // Check that root has been specified if( this.rootVertex == null ) { throw new EmptyTreeException(); } // The children of a node is all its adjacent vertices // minus its parent. List children = this.getAdjacentVertices( vertex ); children.remove( this.getParent( vertex ) ); return children; } COM: <s> returns the child nodes of the node specified by the argument </s>
funcom_train/47547929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getForeground() { if (handle == 0) SWT.error(SWT.ERROR_WIDGET_DISPOSED); GdkGCValues values = new GdkGCValues(); OS.gdk_gc_get_values(handle, values); GdkColor color = new GdkColor(); color.pixel = values.foreground_pixel; int /*long*/ colormap = OS.gdk_colormap_get_system(); OS.gdk_colormap_query_color(colormap, color.pixel, color); return Color.gtk_new(data.device, color); } COM: <s> returns the receivers foreground color </s>
funcom_train/50453940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadHelp (String s) { System.out.println ("loadhelp: " + s); URL url = ClassLoader.getSystemResource (s); HTMLFrame help_frame = new HTMLFrame (this, "VjControl Help", url); help_frame.setContentsURL (ClassLoader.getSystemResource ("VjFiles/VjControlIndex.html")); child_frames.add (help_frame); help_frame.show(); } COM: <s> creates an html frame displaying the named helpfile </s>
funcom_train/40439096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAssignableToType(JType type, Class<?> assignableTo) { if (type.isClassOrInterface() != null) { return type.isClassOrInterface().isAssignableTo( context.getTypeOracle().findType(assignableTo.getCanonicalName())); } return false; } COM: <s> returns code true code if the specified type is assignable to the </s>
funcom_train/51338502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_stress() { Op gen = new Op(// .20f, // append .01f, // delete .05f, // deleteH .20f, // write .10f, // read .05f // readH ); new StressTest(repo,100/*limit*/, gen); } COM: <s> a small stress test for a single file version </s>
funcom_train/15821110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Group createGroup(Composite parent, String text, int numColumns) { Group group = new Group(parent, SWT.SHADOW_ETCHED_IN); GridLayout layout = new GridLayout(); layout.numColumns = numColumns; group.setLayout(layout); GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false); group.setLayoutData(data); group.setText(text); return group; } COM: <s> create a composite controle with gridlayout with the specified columns a </s>
funcom_train/32219214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MatrixInRowMajor cloneSelf() { MatrixInRowMajor newClone; newClone = new MatrixInRowMajor( numRows, numCols ); for( int r = 0; r < numRows; r += 1 ) { newClone.rows[r] = rows[r].clone(); //TODO: check this works } return newClone; } COM: <s> clones all the rows so get exact copy including data in cells </s>
funcom_train/22187277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillTriangle(int x1, int y1, int x2, int y2, int x3, int y3, int color) { backbuffer.fillTriangle(x1, y1, x2, y2, x3, y3, color); } COM: <s> fill a triangle of the given color </s>
funcom_train/7541241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int computeVisualLength(CharSequence indent) { final int tabSize = fPreferences.getTabSize(); int length = 0; for (int i = 0; i < indent.length(); i++) { char ch = indent.charAt(i); switch (ch) { case '\t': if (tabSize > 0) { int reminder = length % tabSize; length += tabSize - reminder; } break; case ' ': length++; break; } } return length; } COM: <s> computes the length of a code character sequence code counting a tab </s>
funcom_train/10625578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetIterationCount() { byte[] salt = new byte[] {1, 2, 3, 4, 5}; int iterationCount = 10; PBEParameterSpec pbeps = new PBEParameterSpec(salt, iterationCount); assertTrue("The returned iterationCount is not equal to the specified " + "in the constructor.", pbeps.getIterationCount() == iterationCount); } COM: <s> get iteration count method testing </s>
funcom_train/41505423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resolution change() { accountService.changePassword(getContext().getUserInformation().getUserId(), newPassword, getContext().getUserInformation().getEncryptionKey()); getContext().getMessages().add(new ScopedLocalizableMessage( ChangeMasterPasswordActionBean.class, "masterPasswordChanged")); return new RedirectResolution(AccountActionBean.class); } COM: <s> changes the master password </s>
funcom_train/15945972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Vertex createVertex() { Vertex vertex, dummy = new SparseVertex(); Map contents = getContent(dummy, data, keys); elementFactory.setCargo(contents); vertex = elementFactory.createVertex(); elementFactory.removeCargo(); return applyMode(vertex); } COM: <s> the function code create vertex code is overloaded to </s>
funcom_train/26100557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getWeight( GlobalAssignment global ){ int weight = object.getWeight()+position.getWeight(); for(LocalAssignment local : global.anwserList) { if(!local.equals(this)) { //tak dla pewności, by nie uwzględniać //siebie przy liczeniu wagi int temp = position.getDistance(local.getPosition()); temp *= object.getFlow(local.getObject()); weight += temp; } } return weight; } COM: <s> calculates weight of code this code local assignment in context of </s>
funcom_train/9759008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void install() { if (!fIsInstalled) { if (fSourceViewer instanceof ITextViewerExtension) { ITextViewerExtension e= (ITextViewerExtension) fSourceViewer; e.prependVerifyKeyListener(this); } else { StyledText text= fSourceViewer.getTextWidget(); text.addVerifyKeyListener(this); } fKeyBindingService= getEditorSite().getKeyBindingService(); fIsInstalled= true; } } COM: <s> installs this trigger on the editors text widget </s>
funcom_train/35951147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean modifyProduct(Product product, String name, short quantity) { if (product != null && ((name != null && name.length() > 0) || quantity > -1)) { if (name != null && name.length() > 0) { product.setName(name); } if (quantity > -1) { product.setQuantity(quantity); } return true; } return false; } COM: <s> modify code product code s name and quantity </s>
funcom_train/21503359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIntegerLengthPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FixedPointDataType_integerLength_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FixedPointDataType_integerLength_feature", "_UI_FixedPointDataType_type"), DMLPackage.Literals.FIXED_POINT_DATA_TYPE__INTEGER_LENGTH, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the integer length feature </s>
funcom_train/26089472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String delete() { userManager.removeUser(user.getId().toString()); List<Object> args = new ArrayList<Object>(); args.add(user.getNombreCompleto()); saveMessage(getText("user.deleted", args)); return SUCCESS; } COM: <s> delete the user passed in </s>
funcom_train/49409858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String type2setSpec(String type) throws IllegalArgumentException { String set_spec = null; if ("Collection".equals(type)) set_spec = "collections"; else if ("Agent".equals(type)) set_spec = "agents"; else if ("Service".equals(type)) set_spec = "services"; else throw new IllegalArgumentException("invalid svc_type " + type); return set_spec; } COM: <s> convert type to set spec </s>
funcom_train/48600231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPrerequisites(TransactionXML transaction, List<Entity> prerequisites) { addPrerequisites(transaction, prerequisites, businessProcess); addPrerequisites(transaction, prerequisites, lead); for (ProjectTeam team: teams) addPrerequisites(transaction, prerequisites, team.team); } COM: <s> adds prerequisites to the list </s>
funcom_train/45773812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File saveDialog(Component comp) { setMultiSelectionEnabled(false); setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); int state = super.showSaveDialog(comp); File destFile = getSelectedFile(); if ((destFile != null) && (state == JFileChooser.APPROVE_OPTION)) { return destFile; } return null; } COM: <s> opens file save dialog and returns a file selected by the user </s>
funcom_train/29019488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getLineBounds(int lineIndex) { checkLayout(); computeRuns(null); if (!(0 <= lineIndex && lineIndex < runs.length)) SWT.error(SWT.ERROR_INVALID_RANGE); int x = getLineIndent(lineIndex); int y = lineY[lineIndex]; int width = lineWidth[lineIndex]; int height = lineY[lineIndex + 1] - y - lineSpacing; return new Rectangle (x, y, width, height); } COM: <s> returns the bounds of the line for the specified line index </s>
funcom_train/14264742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { try { if (!(o instanceof User)) return false; User u = (User)o; if (u == null) return false; return this.getID().equals(u.getID()); } catch (ClassCastException cce) { return false; } } COM: <s> check for equality of two user objects </s>
funcom_train/4193804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addSipProviderExceptionListener(SipProviderExceptionListener e_listener) { printLog("adding SipProviderExceptionListener",LogLevel.MEDIUM); if (exception_listeners.contains(e_listener)) { printWarning("trying to add an already present SipProviderExceptionListener.",LogLevel.HIGH); return false; } else { exception_listeners.add(e_listener); return true; } } COM: <s> sets the sip provider exception listener </s>
funcom_train/14310074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isRoleValid( String roleName ) { //Is the given role parameter correct? if ( userRoles == null || userRoles.length == 0 ) { return true; } else { //Check, if the role is listed in the valid roles array: int i; for ( i = 0; i < userRoles.length; i++ ) { if ( roleName.equals( userRoles[i] ) ) { return true; } } } return false; } COM: <s> check if the role is valid </s>
funcom_train/20270107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAssignAllowedStack(Node n, boolean entering) { switch (n.getType()) { case Token.CASE: case Token.FOR: case Token.FUNCTION: case Token.HOOK: case Token.IF: case Token.SWITCH: case Token.WHILE: if (entering) { assignAllowed.push(0); } else { assignAllowed.remove(); } break; } } COM: <s> determines whether assignment to a define should be allowed </s>
funcom_train/11735235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disposeTransientItemState(ItemState state) { // discard item state, this will invalidate the wrapping Item // instance of the transient state state.discard(); // remove from map transientStore.remove(state.getId()); // give the instance a chance to prepare to get gc'ed state.onDisposed(); } COM: <s> disposes the specified transient item state instance i </s>
funcom_train/37817257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createRightTopPanel() { JPanel rightOne = new JPanel(); rightOne.setBorder(new TitledBorder(Messages.getString( "pulsemem", "GUIController.pulsememetableText"))); //$NON-NLS-1$ rightOne.setLayout(new BorderLayout()); return rightOne; } COM: <s> creates the right panel of the top panel used by pulsemem </s>
funcom_train/7901452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PandoraController getController(String nameOrAlias) { PandoraController ctrl = null; Class<? extends PandoraController> clazz = controllerClasses.get(nameOrAlias); if (clazz == null) { log.error("No controller class found for name or alias '"+nameOrAlias+"'"); return null; } else { try { ctrl = clazz.getDeclaredConstructor().newInstance(); } catch (Exception e) { log.error("Error creating controller instance"); log.errorException(e); } } return ctrl; } COM: <s> creates a new instance for the controller specified by name or alias </s>
funcom_train/36916138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void example7(int translatorType) { // DatabaseFacade.translatorTestingInit(translatorType); SelectStatement statement; // Setup table aliases colTable.setTableAlias("T1"); // select * from <table1> statement = new SelectStatement(colTable); statement.select().functions().max(colTable.getColumn(DbfFieldRegistryTable.FIELD_NAME), "MAX_FIELD_NAME"); // Print results System.out.println("\n\n" + statement.getSQL()); } COM: <s> example select max alias1 </s>
funcom_train/10384650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Server getServer() { Container c = container; if (c instanceof Context) { c = c.getParent(); } if (c instanceof Host) { c = c.getParent(); } if (c instanceof Engine) { Service s = ((Engine)c).getService(); if (s != null) { return s.getServer(); } } return null; } COM: <s> return the server object that is the ultimate parent for the container </s>
funcom_train/37213374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RDFNode parse(Node node, Resource root, Model model) { RDFNode result = null; if (node.getNodeType() == Node.ELEMENT_NODE) { String eltTag = node.getNodeName(); XMLNodeConverter converter = (XMLNodeConverter) elementConverters .get(eltTag); if (converter != null) { result = converter.parse(node, root, model, this); } } return result; } COM: <s> top level recursive call which parses an xml doc subtree </s>
funcom_train/25307111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean authorize(Request request, Response response, int i) { if (i == (authorizers.size() - 1)) { return authorizers.get(i).authorize(request, response); } else { return authorizers.get(i).authorize(request, response) && authorize(request, response, i + 1); } } COM: <s> private method to process authorizers list recursively </s>
funcom_train/12160517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDeleteAction(IAction action) { if (deleteAction == action) { return; } if (deleteAction != null) { deleteAction.removePropertyChangeListener(deleteActionListener); } deleteAction = action; if (deleteAction != null) { deleteAction.addPropertyChangeListener(deleteActionListener); } deleteActionHandler.updateEnabledState(); } COM: <s> set the default code iaction code handler for the delete action </s>
funcom_train/13596757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getCbInvalid() { if (cbInvalid == null) { cbInvalid = new JCheckBox(Messages .getString("Dictionary.WordData.StatusInvalid")); //$NON-NLS-1$ cbInvalid.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { filterState(); } }); } return cbInvalid; } COM: <s> this method initializes j check box1 for displaying invalid words </s>
funcom_train/18088753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxSize(final int maxSize) { if (maxSize <= 0) { throw new IllegalArgumentException(String.valueOf(maxSize)); } // Truncate if smaller than what exists already. if (maxSize < size()) { contents = contents.substring(0, maxSize); repaint(); } this.maxSize = maxSize; } COM: <s> sets the maximum size number of characters that can be contained in </s>
funcom_train/10794280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addJoinConstraints(FieldMapping field) { ForeignKey fk = field.getJoinForeignKey(); if (fk == null) return; Index idx = findIndex(fk.getColumns()); if (idx != null) field.setJoinIndex(idx); Unique unq = findUnique(fk.getColumns()); if (unq != null) field.setJoinUnique(unq); } COM: <s> add existing unique constraints and indexes to the given fields join </s>
funcom_train/29869910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJSearchTextTextField() { if (jSearchTextTextField == null) { jSearchTextTextField = new JTextField(); jSearchTextTextField.setPreferredSize(new Dimension(4, 20)); jSearchTextTextField.setColumns(20); jSearchTextTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { actionJSearchBasicButton(e); } }); } return jSearchTextTextField; } COM: <s> this method initializes j search text text field </s>
funcom_train/1479602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteFightNPCs() { for (int i = 0; i < 10000; i++) { if (Server.engine.npcs[i] == null) continue; NPC n = Server.engine.npcs[i]; if (n.spawnedFor == player.playerId) { n.absX = 0; n.absY = 0; n.currentHP = 0; Server.engine.npcs[i] = null; } } } COM: <s> kill of npcs in fight cave </s>
funcom_train/43827819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSourceArcPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Node_sourceArc_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Node_sourceArc_feature", "_UI_Node_type"), ModelPackage.Literals.NODE__SOURCE_ARC, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the source arc feature </s>
funcom_train/25033390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SingleVOITransforms getTransformsForFrame(int frame) { final SingleVOITransforms useTransform = (arrayOfTransforms == null || frame >= arrayOfTransforms.length) ? commonTransforms : arrayOfTransforms[frame]; //System.err.println("VOITransform.getNumberOfTransforms(): from frame "+frame+" has useTransform="+useTransform); return useTransform; } COM: <s> get the transforms available for a particular frame </s>
funcom_train/45761330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeDoc(XInterface xDoc) { XCloseable xClose = (XCloseable)UnoRuntime.queryInterface( XCloseable.class, xDoc); try { xClose.close(false); } catch(com.sun.star.util.CloseVetoException exVeto) { log.println("document couldn't be closed successfully."); } } COM: <s> closes the document </s>
funcom_train/40866405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String createUrn(SyndicationFeed feed) { if(feed == null) { throw new IllegalArgumentException("[SyndicationFeed] cannot be null!"); } if(feed.getTitle() == null) { return null; } //String urn = return feed.getTitle().toLowerCase().trim().replaceAll("\\W", "-"); } COM: <s> creates a uniform resource name urn for the given feed </s>
funcom_train/50095343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertHybridizations(IAtomType.Hybridization[] hybridizations, IAtomContainer container) throws Exception { int i = 0; for (Iterator<IAtom> atoms = container.atoms().iterator(); atoms.hasNext(); i++) Assert.assertEquals(hybridizations[i], atoms.next().getHybridization()); } COM: <s> convenience method to check the hybridization states </s>
funcom_train/50575819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CDExtraFile newExtraFile(File d, String fname, TocEntry track) throws Exception { if (fname.endsWith(MOVFile.suffix)) { return new CDExtraMOVFile(d, fname, dev, track); } else if (fname.endsWith(DXRFile.suffix)) { return new CDExtraDXRFile(d, fname, dev, track); } return null; } COM: <s> returns a new file representing a file on the cd extra track </s>
funcom_train/11659290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fatalError(SAXParseException exception) throws SAXException { log.error( "Parse Fatal Error at line " + exception.getLineNumber() + " column " + exception.getColumnNumber() + ": " + exception.getMessage(), exception); if (errorHandler != null) { errorHandler.fatalError(exception); } else { throw exception; } } COM: <s> forward notification of a fatal parsing error to the application </s>
funcom_train/48932745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RelationUpdateSet_I disconnect(DisconnectParameter_I cp) { RelationUpdateSet_I result = null; try { setJenaKB(null); result = new Relation_UpdateSet(new Relation_Update(null, new Relation_("", cp.getUser(), "successfully disconnected from ", "", cp .getKBAddress()))); } catch (Exception e) { e.printStackTrace(); } return result; } COM: <s> release pointer to kb </s>
funcom_train/7284596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSong(Transaction txn, final Song song) { if (txn != null) { txn.addTxn(this, new Txn() { public void commit(Transaction txn) { addSongP(txn, song); } }); txn.attach(song); // } else { addSongP(txn, song); } } COM: <s> adds code song code to this playlist </s>
funcom_train/21057217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getElementsWithType(Element element){ List elementList = null; try { elementList = XPath.selectNodes(element,".//*[@type or @mod_type]"); }catch (Exception e){ LOG.error("Error when getting Elements with type-attribute in '"+element+"' from XSD-File:\n" +e); e.printStackTrace(); } return elementList; } COM: <s> return all child elements with a type or a mod type </s>
funcom_train/27841439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testControlRouting1() throws Exception { DummyHTTPRequest request = new DummyHTTPRequest(new String[][]{ {"view", "1"}, {"action", "Test1Control"}, }); DummyHTTPResponse response = servlet.handlePost(request); assertEquals("TestModel", response.getContent()); assertTrue(AppController.doneTest1Control); assertTrue(!SubController.doneTest2Control); } COM: <s> route a test1 control to viewid 1 </s>
funcom_train/47603018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getInputCodeItemCommand() { if (inputCodeItemCommand == null) {//GEN-END:|51-getter|0|51-preInit // write pre-init user code here inputCodeItemCommand = new Command("\u0412\u044B\u0431\u0440\u0430\u0442\u044C", Command.ITEM, 0);//GEN-LINE:|51-getter|1|51-postInit // write post-init user code here }//GEN-BEGIN:|51-getter|2| return inputCodeItemCommand; } COM: <s> returns an initiliazed instance of input code item command component </s>
funcom_train/42680890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean unhideLotBuilding(DBPFExemplar exemplar, long val) { long[] values = new long[] { val }; DBPFProperty propSet = new DBPFLongProperty( DBPFProperties.LOT_RESOURCE_KEY.getId(), DBPFPropertyTypes.UINT32, values); boolean modified = DBPFUtil2.addProperty(exemplar, propSet); if (modified) { DBPFUtil.toLog("DBPFHideChanger", Level.INFO, "Add LotResourceKey Property!"); } return modified; } COM: <s> unhide the lot of exemplar type building by creating the lot resource key </s>
funcom_train/25633079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int handleArgLogger(String[] args, int pos) { if (loggerClassname != null) { throw new BuildException( "Only one logger class may be specified."); } try { loggerClassname = args[++pos]; } catch (ArrayIndexOutOfBoundsException aioobe) { throw new BuildException( "You must specify a classname when using the -logger argument"); } return pos; } COM: <s> handle the logger argument </s>
funcom_train/38827588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SubrangePoint getClosest(GeomPoint point, double tol) { // Guess a location near enough to the closest point for the root solver // to get us the rest of the way there. GeomPoint parNear = guessClosestFarthest(point, true); SubrangePoint p = getClosestFarthest(point, parNear.getValue(0), parNear.getValue(1), tol, true); return p; } COM: <s> returns the closest point on this surface to the specified point </s>
funcom_train/24111870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ConversionTarget getCurrentTarget() { final ConversionTarget[] values = ConversionTarget.values(); if (targetButtons == null) { return values[defaultSelectionIndex]; // return default target } for (int i = 0; i < targetButtons.length; ++i) { if (targetButtons[i].getSelection()) { return values[i]; } } return values[defaultSelectionIndex]; // return default target } COM: <s> returns the conversion target enumeration for the currently selected </s>
funcom_train/33277173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSuperBlockEnd(int opcode) { switch (opcode) { case ByteCode.ARETURN: case ByteCode.FRETURN: case ByteCode.IRETURN: case ByteCode.LRETURN: case ByteCode.RETURN: case ByteCode.ATHROW: case ByteCode.GOTO: case ByteCode.GOTO_W: case ByteCode.TABLESWITCH: case ByteCode.LOOKUPSWITCH: return true; default: return false; } } COM: <s> determine whether or not an opcode is an actual end to a super </s>
funcom_train/39133584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCharFontType(int unicodeNum) { int i; for (i = 0; i < characters.length; i++) { if (characters[i] == unicodeNum) { break; } } if (i == characters.length) { Logger.log("Char not found: " + unicodeNum); throw new IllegalArgumentException("no data for given " + "character number"); } return charFontTypes[i]; } COM: <s> returns type of the font used to create the bitmap for given character </s>
funcom_train/49211332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void mergeAddMap(Map<TreeSet<Integer>, TreeSet<Integer>> clusterSeedMap, TreeSet<Integer> cluster, TreeSet<Integer> seeds) { if (clusterSeedMap.containsKey(cluster)) clusterSeedMap.get(cluster).addAll(seeds); else clusterSeedMap.put(cluster, seeds); } COM: <s> method for a concrete harden implementation </s>
funcom_train/13899862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadPhyAddress() { System.out.println("readPhyAddress"); Object _phyAddress = "123"; String expResult = "0.0.123"; String result = KNXToolkit.readPhyAddress(_phyAddress); System.out.println("expected:" + expResult.toString() + " got: " + result.toString() ); assertEquals(expResult, result); } COM: <s> test of read phy address method of class knxadmin </s>
funcom_train/17203729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPureCall() { if (operator.isCall()) { MethodOperand methOp = Call.getMethod(this); if (methOp != null && methOp.hasPreciseTarget() && methOp.getTarget().isPure()) { return true; } } return false; } COM: <s> is the instruction a pure call one kind of interprocedural branch </s>
funcom_train/41068600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLength() { System.out.println("getLength"); MIDISystemExclusive instance = new MIDISystemExclusive(); int expResult = 0; int result = instance.getLength(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get length method of class com </s>
funcom_train/49743693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void step() { if (collisionDetected()) setSpeeds(0, 0); else { readProximitySensors(_sensors); for (int i = 0; i < inputValues.size(); i++) inputValues.set(i,_sensors[i]); double [] out = _controler.step(inputValues); // the 4d value is for normalized values within range of the activation function setSpeeds((int)(out[0]*4), (int)(out[1]*4)); } } COM: <s> perform one step of agents behavior </s>
funcom_train/39349487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void collectionPhase(short phaseId, boolean primary) { if (global().traceFullHeap()) { if (phaseId == GenCopy.RELEASE) { super.collectionPhase(phaseId, primary); if (global().gcFullHeap) mature.rebind(GenCopy.toSpace()); return; } } super.collectionPhase(phaseId, primary); } COM: <s> execute a per mutator collection phase </s>
funcom_train/3365010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateRenderer() { if(tree != null) { TreeCellRenderer newCellRenderer; newCellRenderer = tree.getCellRenderer(); if(newCellRenderer == null) { tree.setCellRenderer(createDefaultCellRenderer()); createdRenderer = true; } else { createdRenderer = false; currentCellRenderer = newCellRenderer; if(createdCellEditor) { tree.setCellEditor(null); } } } else { createdRenderer = false; currentCellRenderer = null; } updateCellEditor(); } COM: <s> messaged from the tree were in when the renderer has changed </s>
funcom_train/40924325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onCreateOptionsMenu(Menu menu) { menu.add(0, ZOOM_IN, 0, "+\nZoom In"); menu.add(0, ZOOM_OUT, 0, "-\nZoom Out"); menu.add(0, FOCUS, 0, "Focus"); return true; } COM: <s> creates the menu items </s>
funcom_train/8815940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recursiveFillOrgUnitsList(OrgUnitDTOLight root) { if (root.getCanContainProjects()) { if (root.getId() != id) { orgUnitsStore.add(root); } } for (final OrgUnitDTOLight child : root.getChildrenDTO()) { recursiveFillOrgUnitsList(child); } } COM: <s> fills recursively the combobox from the given root </s>
funcom_train/22028456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText() { StringBuffer buf = new StringBuffer(); if (getStatusCode() <= 0) { buf.append(getStatus()); } else { for (Iterator iter = linesOfText.iterator(); iter.hasNext();) { buf.append((String) iter.next()); buf.append("\n"); } } return buf.toString(); } COM: <s> return the text read from the server </s>
funcom_train/3168093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntegerValue leftShift(IntegerValue another) { //TODO should this just have an int parameter? return new IntegerValue(value.shiftLeft(another.asInt32())); /* udanax-top.st:35047:PrimIntValue methodsFor: 'operations'! {IntegerVar CLIENT login} leftShift: another {PrimIntValue} "Return the the first number shifted to the left by the second amount." ^myValue bitShift: another asIntegerVar! */ } COM: <s> return the the first number shifted to the left by the second amount </s>
funcom_train/17157681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setVisualPrefs() { QActionGroup actionGroup = new QActionGroup(this.ui.toolBar); actionGroup.addAction(this.ui.actionDay); actionGroup.addAction(this.ui.actionWeek); actionGroup.addAction(this.ui.actionAttachments); actionGroup.addAction(this.ui.actionLocations); } COM: <s> setup main window appearence </s>
funcom_train/48213627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(PropertyChangeEvent evt) { propertyChangeCount++; lastPropertyChange = evt.getPropertyName(); lastSource = evt.getSource(); lastOldValue = evt.getOldValue(); lastNewValue = evt.getNewValue(); Integer oldCount = propertyChangeCounts.get(evt.getPropertyName()); if (oldCount == null) { oldCount = 0; } propertyChangeCounts.put(evt.getPropertyName(), oldCount + 1); } COM: <s> copies all the event information into the corresponding instance variables </s>
funcom_train/3703517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String guessDataType(String strDataFormat) { Iterator it = datatypes(); DataType dtype; while (it.hasNext()) { dtype = (DataType) it.next(); if (dtype.isValidDataFormat(strDataFormat)) { return (dtype.getName()); } } return (null); } // of method COM: <s> try to guess what the datatype is given the dataformat </s>
funcom_train/50961554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ListSelectionListener setBookmark() { return new ListSelectionListener() { /** * * @param e */ public void valueChanged(ListSelectionEvent e) { if (!e.getValueIsAdjusting()) { bm[0]=e.getFirstIndex()+1; bm[1]=e.getLastIndex()+1; if (bookmark==-1) bookmark=bm[1]; else if (bookmark==bm[0]) bookmark=bm[1]; else bookmark=bm[0]; } } }; } COM: <s> a listselectionlistener which sets the result sets current row to the </s>
funcom_train/1304452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getContent() { String result = content; if (result == null && file != null && file.exists() && file.length() > 0) { try { content = FileUtil.readAsString(file, null); } catch (IOException e) { exception = e; } } return content; } COM: <s> get this instances content </s>
funcom_train/25871989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IDataSet getDataSet() throws Exception { /* * IDatabaseConnection con = getConnection(); * IDataSet dataset = con.createDataSet(); * XlsDataSet.write(dataset, new FileOutputStream("export.xls")); */ return new XlsDataSet(new FileInputStream(xlsPath)); } COM: <s> returns the test dataset </s>
funcom_train/40872235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFarmProxy(FarmProxy farmProxy) throws ParentProxyNotFoundException { CountrysideProxy countrysideProxy = this.getCountrysideProxy(farmProxy.getJid().getBareJid()); if (countrysideProxy != null) countrysideProxy.addFarmProxy(farmProxy); else throw new ParentProxyNotFoundException("parent countryside proxy null for " + farmProxy.getJid()); } COM: <s> add a farm proxy to a countryside proxy </s>
funcom_train/24649142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAttribute(String key) { // return getConfig().getString(toAttrKey(key)); List list = getConfig().getAttributes(key); if (list.isEmpty()) { return null; } DefaultConfigurationNode node = (DefaultConfigurationNode) list.get(0); return node.getValue().toString(); } COM: <s> gets the attribute with the given key </s>
funcom_train/242743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int executeDBQuery(String queryString) { try { //commented on 09-09-2004 because it commits after every DBopration //and rollback gives problem. // conn.setAutoCommit(false); statement = conn.createStatement(); status = statement.executeUpdate(queryString); //conn.commit(); } catch (SQLException ex) { try { conn.rollback(); } catch (SQLException e) { //logger.error(" DBOperation | Roll Back Completed "+e); } } return status; } COM: <s> this method executes the query and returns the status as int value </s>
funcom_train/2641990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double max() { if (size() == 0) { throw new IllegalStateException("cannot find maximum of an empty list"); } double max = Double.NEGATIVE_INFINITY; for (int i = 0; i < _pos; i++ ) { if ( _data[i] > max ) { max = _data[i]; } } return max; } COM: <s> finds the maximum value in the list </s>
funcom_train/43938740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putProduction(String left, String right) { if (this.gic.containsKey(left)) { this.gic.get(left).add(right); this.addSymbols(right); } else { this.gic.put(left, new ArrayList<String>()); this.gic.get(left).add(right); this.addSymbol(left); this.addSymbols(right); } } COM: <s> stores a new production into the grammar </s>
funcom_train/1531382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerLocateable(Locateable l) { if (contains(l)) return; // add only locateables that are not already // part of the updateSet of this point AlgoElement parentAlgo = l.toGeoElement().getParentAlgorithm(); if (parentAlgo == null || !(((GeoElement) point).getAlgoUpdateSet().contains(parentAlgo))) { // add the locatable add(l); } } COM: <s> tells this point that the given locateable has this point </s>
funcom_train/7688198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifySkipCountForDeletedImage(int index) { int skipCount = 0; for (int i = 0; i < mSkipList.size(); i++) { long v = mSkipList.get(i); int offset = (int) (v & 0xFFFF); int which = (int) (v >> 32); if (skipCount + offset > index) { mSkipList.set(i, v-1); break; } skipCount += offset; } } COM: <s> modify the skip list when an image is deleted by finding </s>
funcom_train/22655285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DefaultMutableTreeNode getPreferenceNames () { DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode (); PreferenceManager prefManager = PreferenceManager.getInstance (); for (Iterator iterator = prefManager.getAllPreferenceNames () .iterator (); iterator.hasNext ();) { PreferenceInfo prefInfo = (PreferenceInfo) iterator.next (); addPreferenceToTree (prefInfo, rootNode); } return rootNode; } COM: <s> helper method that gets the preferences </s>
funcom_train/10799777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareVersion(OpenJPAStateManager state, Object v1, Object v2) { if (v1 == null || v2 == null) return VERSION_DIFFERENT; int compare = ((Comparable) v1).compareTo((Comparable) v2); if (compare < 0) return VERSION_EARLIER; if (compare == 0) return VERSION_SAME; return VERSION_LATER; } COM: <s> casts code v1 code and code v2 code to </s>
funcom_train/16467421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BuildAction parseBuildAction() throws IOException { OrderType orderType = OrderType.valueOf(input.readByte()); MapPositionImpl mapPosition = parseMapPosition(); ObjectType objectType = ObjectType.valueOf(input.readShort()); return new BuildAction(sequence, frame, player, orderType, mapPosition, objectType); } COM: <s> parses a build action </s>
funcom_train/16676621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Cursor getCursor(Display display, DragDropLocation code) { Cursor cursor = cursors[code.ordinal( )]; if (cursor == null) { cursor = new Cursor(display, code.getSource( ).getImageData( ), code.getMask( ).getImageData( ), 16, 16); cursors[code.ordinal( )] = cursor; } return cursor; } COM: <s> return the cursor for a drop scenario as identified by code </s>
funcom_train/2429225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSourceId(SourceId id) { SourceId old = getSourceId(); if (!KongaID.areEqual(id, old)) { if (id == null) { setProperty(SOURCE_SOURCE_ID, ""); } else { setProperty(SOURCE_SOURCE_ID, id.toString()); } firePropertyChange(SOURCE_SOURCE_ID, old, id); } } COM: <s> sets the id of the code source code used by this transformation </s>
funcom_train/3701736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void queryResultException(RemoteQueryException rqe) { QueryID qid = rqe.getQueryID(); ResultItem ri = m_queryRegistry.get(qid); cancelQuery(ri); s_logger.error("RemoteQueryException - id=" + rqe.getQueryID() + ", " + m_type.getPath() + " - " + rqe); } // COM: <s> stubbed out now but this method must be implemented to handle </s>
funcom_train/34628275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanOutput(IProgressMonitor monitor, IProject project) throws CoreException { monitor.subTask(TexlipsePlugin.getResourceString("builderSubTaskCleanOutput")); IResource outputFile = TexlipseProperties.getProjectOutputFile(project); if (outputFile != null && outputFile.exists()) { outputFile.delete(true, monitor); } monitor.worked(1); } COM: <s> delete the output file </s>
funcom_train/1444290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean decodeOpponentTypes(String str) { if (!isIdOfMessageType(MESSAGES.TRAINER_OPPTYPES, str.charAt(0))) return false; intArray = new int[str.length() - 1]; for (int i = 1; i < str.length(); i++) { intArray[i - 1] = this.valuesOfChars[str.charAt(i)]; } return true; } COM: <s> this message decodes the player types of the oppponents </s>
funcom_train/4299310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetAccessCount() throws HsqlException { if (currentAccessCount != Integer.MAX_VALUE) { return; } currentAccessCount >>= 2; firstAccessCount >>= 2; int i = iCacheSize; while (i-- > 0) { rFirst.iLastAccess >>= 2; rFirst = rFirst.rNext; } } COM: <s> scales down all i last access values to avoid negative numbers </s>