__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/15714858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDoPost() throws Exception {
System.out.println("doPost");
HttpServletRequest request = null;
HttpServletResponse response = null;
EchoBeansController instance = new EchoBeansController();
instance.doPost(request, response);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of do post method of class net </s>
|
funcom_train/25032149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChild(QueryTreeRecord child) {
if (debugLevel > 1) System.err.println("QueryTreeRecord.addChild(): child="+child);
if (children == null) {
children=new ArrayList();
}
// Next is from "http://javaalmanac.com/egs/java.util/coll_InsertInList.html?l=rel"
// and is way faster than children.add(child) followed by Collections.sort(children)
int index = Collections.binarySearch(children,child);
if (index < 0) {
children.add(-index-1,child);
}
}
COM: <s> p add a child to this nodes sorted collection of children </s>
|
funcom_train/22427836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public Float log(Float x) {
if (!x.Great(ZERO)) return new Float(ERROR);
//
if (x.Equal(ONE)) return new Float(ZERO);
//
if (x.Great(Float.ONE)) {
x = ONE.Div(x);
return _log(x).Neg();
}
return _log(x);
}
COM: <s> returns the natural logarithm base e of a double value </s>
|
funcom_train/28156390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitJmlWorkingSpaceClause(JmlWorkingSpaceClause self) {
Debug.msg("In JmlWorkingSpaceClause");
String keyword = self.isRedundantly() ? "working_space_redundantly " : "working_space ";
newLineOffset();
if (self.isNotSpecified()) {
print(keyword + "\\not_specified;");
} else {
print(keyword);
self.specExp().accept(this);
if (self.predOrNot() != null) {
print(" if ");
self.predOrNot().accept(this);
}
print(";");
}
}
COM: <s> prints a jml working space clause </s>
|
funcom_train/10153022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkForExampleDynamicHelp(final IProject project) {
boolean foundHelp = false;
final String contextIdText = (String)newExampleprojects.get(project);
if (contextIdText != null) {
newExampleprojects.remove(project);
final IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem();
helpSystem.displayDynamicHelp();
helpSystem.displayHelp(HelpSystem.getContext(contextIdText));
foundHelp = true;
}
return foundHelp;
}
COM: <s> one first time event for each new examnple project automatically displays </s>
|
funcom_train/13275191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dropFiles(List<String> importableModels) {
AddedFurnitureSelector addedFurnitureListener = new AddedFurnitureSelector();
this.preferences.getFurnitureCatalog().addFurnitureListener(addedFurnitureListener);
// Import furniture
for (String model : importableModels) {
importFurniture(model);
}
addedFurnitureListener.selectAddedFurniture();
this.preferences.getFurnitureCatalog().removeFurnitureListener(addedFurnitureListener);
}
COM: <s> adds dropped files to catalog </s>
|
funcom_train/16825044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void listen(String host, int port) throws UnknownHostException, IOException {
socket = new Socket(host, port);
out = new PrintWriter(socket.getOutputStream(), true);
in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
}
COM: <s> creates a socket </s>
|
funcom_train/46678838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getWidth() {
if (getText().length()==0) {return 0;}
java.awt.font.TextLayout textLayout = new java.awt.font.TextLayout(getText(), getFormat().makeFont(), new java.awt.font.FontRenderContext(null, false, true));
return textLayout.getAdvance();
}
COM: <s> returns the width of this object in pixels </s>
|
funcom_train/20883125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String stateToString(long state) {
StringBuffer buf = new StringBuffer();
if ((state & Synthesizer.QUEUE_EMPTY) != 0)
buf.append(" QUEUE_EMPTY ");
if ((state & Synthesizer.QUEUE_NOT_EMPTY) != 0)
buf.append(" QUEUE_NOT_EMPTY ");
return super.stateToString(state) + buf.toString();
}
COM: <s> returns a string of the names of all the states implied </s>
|
funcom_train/13815029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseDragged(MouseEvent e ) {
switch ( dragType ) {
case DRAG_TYPE_SELECT:
handleSelectionDragEvent( e );
break;
case DRAG_TYPE_DND:
handleDnDDragEvent( e );
break;
default:
log.error( "Invalid drag type" );
}
// Make sure tht current drag location is visible
Rectangle r = new Rectangle(e.getX(), e.getY(), 1, 1);
scrollRectToVisible(r);
}
COM: <s> describe code mouse dragged code method here </s>
|
funcom_train/50077305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRetreiveGroupNullGroup() throws SecurityManagementException {
UserManager userManager =
(UserManager) Lookup.getInstance().fetchComponent(
userManagerServiceLocation);
Group group = userManager.retreiveGroup(TEST_NONEXIST_GROUPNAME);
if (group != null) {
fail(
"After call to retreiveGroup for non-existent group named ["
+ TEST_CHILD_GROUPNAME
+ "], a non-null group object was returned.");
}
}
COM: <s> tests that retreiving a non existent group returns null </s>
|
funcom_train/32060683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MoveDirection KeyCodeToMoveDirection(int keycode) {
switch (keycode) {
case KeyEvent.VK_UP:
return MoveDirection.UP;
case KeyEvent.VK_DOWN:
return MoveDirection.DOWN;
case KeyEvent.VK_LEFT:
return MoveDirection.LEFT;
case KeyEvent.VK_RIGHT:
return MoveDirection.RIGHT;
}
return MoveDirection.UP;
}
COM: <s> converts the key codes to move directions </s>
|
funcom_train/22929127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getRealPath(Session session, String path) {
String currentDirectory = (String) session.getAttribute(SessionKeys.CURRENT_DIRECTORY);
if (path == null) {
return currentDirectory;
}
if (getFileSystem().isAbsolute(path)) {
return path;
}
return getFileSystem().path(currentDirectory, path);
}
COM: <s> return the full absolute path for the specified abstract pathname </s>
|
funcom_train/326464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void zoomOut() {
if (canZoomOut() == false) {
return;
}
// there should always be at least two things in the zoom list
// if there aren't, call zoomrightOut();
if (zoomShapes.size() <= 2) {
zoomRightOut();
}
else {
topMostShape = zoomShapes.lastElement();
zoomShapes.remove(zoomShapes.size()-1);
zoomableThing.zoomToShape(zoomShapes.lastElement());
}
}
COM: <s> zoom out to the bounds of the preceding zoom shape </s>
|
funcom_train/44632329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JavaFileObject useSource(JavaFileObject file) {
JavaFileObject prev = (source == null ? null : source.getFile());
if (file != prev) source = getSource(file); // DRC - added the test to speed up useSOurce when there is no change in file
return prev;
}
COM: <s> re assign source returning previous setting </s>
|
funcom_train/28902395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopEndpoints() {
for (Entry<String, Endpoint> entry : endpointMap.entrySet()) {
try {
entry.getValue().stop();
} catch (EndpointShutdownException e) {
logger.error("EndpointShutdownException occured! ({})",
entry.getKey());
logger.error(e.getMessage());
}
logger.debug("Endpoint ({}) stopped!", entry.getKey());
}
}
COM: <s> removes all endpoints of this executor </s>
|
funcom_train/9809892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
if (!(other instanceof AWTVideoSize)) return false;
AWTVideoSize vs1 = this;
AWTVideoSize vs2 = (AWTVideoSize) other;
if (vs1.getDestination().equals(vs2.getDestination()) == false)
return false;
if (vs1.getSource().equals(vs2.getSource()) == false) return false;
return true;
}
COM: <s> compares this code awtvideo size code with the given object </s>
|
funcom_train/23275769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNewId() {
int max = 0;
for (Enumeration e = v.elements() ; e.hasMoreElements() ;) {
Object este = e.nextElement();
if (max < ((File)este).getId())
max = ((File)este).getId();
}
max = max + 1;
return max;
}
COM: <s> gets a new id </s>
|
funcom_train/1176414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemove() {
System.out.println("remove");
Carta aCarta = new Carta(17);
ColecaoCartas instance = new CartasSecretas(3);
instance.addCarta(aCarta);
boolean expResult = true;
boolean result = instance.remove(new Carta(17));
assertEquals(expResult, result);
}
COM: <s> test of remove method of class caraacara </s>
|
funcom_train/48966303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void start() {
// create a model
World world = createSimpleWorld();
// create a controller
// we do this before creating the view - this helps us to mind not to use
// anything from the view in the controller
GameLogic gameLogic = new GameLogic( world );
// create a view
View view = new View( world, gameLogic );
// start the view
view.start();
}
COM: <s> start our application </s>
|
funcom_train/34849681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MatchResult replaceMatchesWithNewPosition(MatchResult matches){
MatchResult repMatches = new MatchResult();
int delta = 0;
for (Match match : matches.getResults()){
int newstart = match.getMatch().getStart() + delta;
String newtxt = operateMatch(match);
delta = delta + newtxt.length() - match.getMatch().getTxt().length();
int newend = match.getMatch().getEnd() + delta;
MatchingSubstring repRes = new MatchingSubstring(
newstart,
newend,
newtxt);
repMatches.add(new Match(repRes));
}
return repMatches;
}
COM: <s> replace matching strings an calculate position in target text </s>
|
funcom_train/12559520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
mainLoop();
/*
* If mainLoop returns then thread timed out with no events
* in the queue. The thread will quietly be restarted in sched()
* when the next TimerTask is queued.
*/
} catch (Throwable t) {
// Someone killed this Thread, behave as if Timer cancelled
synchronized (queue) {
queue.newTasksMayBeScheduled = false;
queue.clear(); // Eliminate obsolete references
}
}
}
COM: <s> start the main processing loop </s>
|
funcom_train/34535551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasAccess(VariablesSecureApp vars) {
try {
if (classInfo==null || classInfo.id.equals("") || classInfo.type.equals(""))
return true;
return hasGeneralAccess(vars, classInfo.type, classInfo.id);
} catch(Exception e) {
log4j.error("Error checking access: " + e.toString());
return false;
}
}
COM: <s> checks if the user has access to the window </s>
|
funcom_train/51378578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCriteria(JDBCDataObject newCriteria) throws DataException {
if (newCriteria == null) {
throw new IllegalArgumentException("Criteria cannot be null");
}
criteria = newCriteria;
if (newCriteria.getLocalConnection() != null) {
myConnection = newCriteria.getLocalConnection();
}
}
COM: <s> set the search criteria for the blob </s>
|
funcom_train/33426972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(String productId, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, BigDecimal selectedAmount) {
return equals(productId, additionalProductFeatureAndAppls, attributes, prodCatalogId, selectedAmount, null, null, false);
}
COM: <s> compares the specified object with this cart item </s>
|
funcom_train/32061618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InfoFragment getInfoFragment(Game g, InfoPropertyType ipt) {
InfoFragment desiredinfofragment = null;
for(InfoFragment ifrag : infofragments) {
if(ifrag.getPropertyType() == ipt) {
desiredinfofragment = ifrag;
break;
}
}
// If no info fragment was found, create a new one and add it to the
// vector.
if(desiredinfofragment == null) {
desiredinfofragment = new InfoFragment(g, ipt);
infofragments.add(desiredinfofragment);
}
return desiredinfofragment;
}
COM: <s> returns the specified info fragment </s>
|
funcom_train/31955466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeWholeXmlTag(String tagType, String value) throws IOException {
xmlWriter.startTag(null,tagType); //start <tagname>
xmlWriter.text(value);
xmlWriter.endTag(null,tagType);//end </tagname>
}//writeWholeXmlTag
COM: <s> handy method for writing out a complete starttag value endtag </s>
|
funcom_train/11320846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean onSearchClick() {
// Save Form search field value between requests.
// NOTE: we only save the from when the search button is clicked.
// This ensures the form state is only saved when the state changes, and
// cuts down on unnecessary session replication in a cluster environment.
form.saveState(getContext());
return true;
}
COM: <s> handle the search button click event </s>
|
funcom_train/37519201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printDefinition(PrintWriter out, String prefix) {
if (type == LITERAL) {
out.print(prefix + name);
out.print(" = ");
out.print("\"" +
(value == null ? name : Utils.escapeString(value,false)) +
"\"");
} else {
out.print(name);
if (value != null) {
out.print("(\"" + Utils.escapeString(value,false) + "\")");
}
}
out.println(" = " + id);
}
COM: <s> prints the token definition to definition file txt </s>
|
funcom_train/22598663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFileChooser getDatFileChooser() {
if(datFileChooser == null) {
datFileChooser = new JFileChooser();
datFileChooser.setDialogTitle("Exporting cuttlefish network");
datFileChooser.setFileFilter(new FileNameExtensionFilter(".dat files", "dat"));
datFileChooser.setCurrentDirectory( new File(System.getProperty("user.dir")));
}
return datFileChooser;
}
COM: <s> this method initializes the file chooser for the edge list and </s>
|
funcom_train/11792485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copy(File source, File destination) throws IOException {
FileInputStream fis = null;
FileOutputStream fos = null;
try {
fis = new FileInputStream(source);
fos = new FileOutputStream(destination);
byte[] buf = new byte[1024];
int i = 0;
while ((i = fis.read(buf)) != -1) {
fos.write(buf, 0, i);
}
} catch (IOException e) {
throw e;
} finally {
if (fis != null) {
fis.close();
}
if (fos != null) {
fos.close();
}
}
}
COM: <s> copies the source file to the destination file </s>
|
funcom_train/7994819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enableDisableButtons() {
TreeObject selected = getSelectedTreeObject();
Item item = selected.item;
if(item instanceof Project || item instanceof Release || item instanceof Iteration || item instanceof Unscheduled || selected.name.equals("Releases")) {
userStoryWizardAction.setEnabled(true);
} else {
userStoryWizardAction.setEnabled(false);
}
if(item instanceof Project){
deleteProjectAction.setEnabled(true);
}else{
deleteProjectAction.setEnabled(false);
}
}
COM: <s> this method enables or disables some functionalities based on the selected item of </s>
|
funcom_train/27790609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SelectionManager (DataAccess da) {
_dataAccess = da;
_categorySelectionSet = new SelectionSet(new CategoryAccessor());
_documentSelectionSet = new SelectionSet(new DocumentAccessor());
_principalSelectionSet = new SelectionSet(new PrincipalAccessor());
_documentTypeSelectionSet = new SelectionSet(new DocumentTypeAccessor());
_fieldSelectionSet = new SelectionSet(new FieldAccessor());
}
COM: <s> constructor for creating selection manager from data access </s>
|
funcom_train/8996889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JTabbedPane getJTabbedPane() {
if (jTabbedPane == null) {
jTabbedPane = new JTabbedPane();
jTabbedPane.addTab("Main", null, getJPanelMain(), null);
jTabbedPane.addTab("Config", null, getJPanelConfig(), null);
jTabbedPane.addTab("Log", null, getJPanelLog(), null);
}
return jTabbedPane;
}
COM: <s> this method initializes j tabbed pane </s>
|
funcom_train/40460527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTF_AGE() {
if (jTF_AGE == null) {
jTF_AGE = new JTextField();
jTF_AGE.setPreferredSize(new Dimension(40, 20));
jTF_AGE.setBackground(new Color(204, 255, 255));
jTF_AGE.setHorizontalAlignment(JTextField.LEADING);
}
return jTF_AGE;
}
COM: <s> this method initializes j tf age </s>
|
funcom_train/25461743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StatementBlock getDeepestBlock(StatementBlock blk, int line, int column) {
StatementBlock[] sbs = blk.getStatementBlocks();
if( sbs.length == 0 )return blk;
for( StatementBlock sb : sbs ){
if( sb.contains(line, column) ){
return getDeepestBlock( sb, line, column );
}
}
return blk;
}
COM: <s> get the deepest statement block which contains the offset </s>
|
funcom_train/20936117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cleanUp() throws JacsonException {
try{
if (protocol.equals(IMAP))
folder.setFlags(messages, new Flags(Flag.SEEN), true);
folder.close(true);
} catch(Exception e){
e.printStackTrace();
throw new JacsonException("Exception during cleanUp", e);
}
}
COM: <s> cleaning up resources </s>
|
funcom_train/32967936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDirectory(File dir) {
File files[] = dir.listFiles();
for (File file : files) {
if (file.isDirectory()) {
addDirectory(file);
} else {
String normalPath = file.getPath().replace('\\', '/');
appFiles.put(normalPath, loadFile(file));
}
}
}
COM: <s> scan a directory for files with application </s>
|
funcom_train/32280316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefaultMutableTreeNode getPreviousSibling() {
// Variables
int index;
// Check for Parent
if (parent == null) {
return null;
} // if
// Get Index of this node
index = parent.getIndex(this);
// Check for Previous Sibling
index--;
if (index < 0) {
return null;
} // if
return (DefaultMutableTreeNode) parent.getChildAt(index);
} // getPreviousSibling()
COM: <s> get previous sibling </s>
|
funcom_train/1676030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invalidate(RunRecoveryException e) {
/*
* Remember the fatal exception so we can redisplay it if the
* environment is called by the application again. Set some state in
* the exception so the exception message will be clear that this was
* an earlier exception.
*/
savedInvalidatingException = e;
envState = DbEnvState.INVALID;
requestShutdownDaemons();
}
COM: <s> invalidate the environment </s>
|
funcom_train/11343006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setServiceProperties(Dictionary serviceProperties) {
Map services = new HashMap();
synchronized (this) {
services.putAll(m_services);
}
Iterator i = services.values().iterator();
while (i.hasNext()) {
((Component) i.next()).setServiceProperties(serviceProperties);
}
}
COM: <s> set some service properties to all already instantiated services </s>
|
funcom_train/43421690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getContentValues() {
Vector contentValues = new Vector();
contentValues.add(Translator.getTranslation("TASK_STATE_0"));
contentValues.add(Translator.getTranslation("TASK_STATE_1"));
contentValues.add(Translator.getTranslation("TASK_STATE_2"));
return contentValues;
}
COM: <s> returns all available content values of state filter </s>
|
funcom_train/18186233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void addSortCriteria(Criteria criteria, SortCriterion... sortCriteria) {
assert criteria != null;
if (sortCriteria == null || sortCriteria.length == 0) {
sortCriteria = getDefaultSortCriteria();
}
for (SortCriterion sortingConstraint : sortCriteria) {
final String property = sortingConstraint.getProperty();
final boolean ascending = sortingConstraint.isAscending();
final Order order = ascending ? Order.asc(property) : Order.desc(property);
criteria.addOrder(order);
}
}
COM: <s> adds code sort criteria code to a </s>
|
funcom_train/20630269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(String fileName) throws SAXException, IOException, Exception {
parseResult(new InputSource(new FileReader(new File(fileName))),
new ForgivingEntityResolver(com.apelon.selext.dtd.DTD.FILTERSPEC,
com.apelon.selext.dtd.DTD.class,
com.apelon.selext.dtd.DTD.FILTERSPEC_FILE));
}
COM: <s> this is the method that should be called to initiate the selection </s>
|
funcom_train/2546704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeGraphicalViewer() {
super.initializeGraphicalViewer();
GraphicalViewer graphicalViewer = getGraphicalViewer();
graphicalViewer.setContents(getDiagram()); // set the contents of this
// editor
// listen for dropped parts
graphicalViewer.addDropTargetListener(createTransferDropTargetListener());
}
COM: <s> set up the editors inital content after creation </s>
|
funcom_train/27862535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LNode createRootNode(Object owner, String text){
rootLNode = new LNode(this, drawBorders, textColor, borderColor, backgroundColor,
selectedTextColor, selectedBorderColor, selectedBackgroundColor);
rootLNode.owner = owner;
rootLNode.text = text;
rootLNode.initLNode();
return rootLNode;
}
COM: <s> create new root node </s>
|
funcom_train/140029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BookmarkList getSubListByPath(String path, String delimiter, boolean create) {
StringTokenizer st = new StringTokenizer(path, delimiter);
BookmarkList current_list = this;
while (current_list != null && st.hasMoreElements()) {
String name = st.nextToken();
current_list = current_list.getSubListByName(name, create);
}
return current_list;
}
COM: <s> finds or creates a sublist with a given path </s>
|
funcom_train/3111227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File file) {
if (file.isDirectory()) {
return allowDirectories;
}
for (int i = 0; i < extensions.size(); i++) {
if (FileUtils.hasExtension(file, (String) extensions.get(i))) {
return true;
}
}
return false;
}
COM: <s> accepts a file based on its extension and the value of </s>
|
funcom_train/5668538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void eventDispatched(AWTEvent event) {
if (event instanceof KeyEvent && event.getSource()
instanceof Component) {
if (SwingUtilities.windowForComponent((Component)
event.getSource()) == this.parentWindow)
// Consume events only for our window
((KeyEvent)event).consume();
}
}
COM: <s> called whenever ther is an event in awt queue </s>
|
funcom_train/25652364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Shape createThumbShape(int width, int height) {
// Use circular shape.
//Ellipse2D shape = new Ellipse2D.Double(0, 0, width, height);
Rectangle2D shape = new Rectangle2D.Double(0, 0, width, height);
return shape;
}
COM: <s> returns a shape representing a thumb </s>
|
funcom_train/1570497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List filterCollection(final Collection _in) {
if (_in == null)
return null;
final EOQualifierEvaluation eval = (EOQualifierEvaluation)this;
final ArrayList<Object> result = new ArrayList<Object>(_in.size());
for (Object item: _in) {
if (eval.evaluateWithObject(item))
result.add(item);
}
result.trimToSize();
return result;
}
COM: <s> filters a collection by applying the qualifier on each item </s>
|
funcom_train/45118816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
if ( ( JsystemMapping.getInstance().getListDialogSetButtonName() ).equals(e.getActionCommand())) {
userMultipleSelection = list.getSelectedValues();
JSystemPropertiesListDialog.value = convertMultiSelectionObjectsToString(userMultipleSelection);
}
JSystemPropertiesListDialog.dialog.setVisible(false);
}
COM: <s> handle clicks on the set and cancel buttons </s>
|
funcom_train/17425074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createComposite() {
GridData gridData1 = new GridData();
gridData1.horizontalAlignment = GridData.FILL;
gridData1.grabExcessHorizontalSpace = true;
gridData1.grabExcessVerticalSpace = true;
gridData1.verticalAlignment = GridData.FILL;
composite = new Composite(this, SWT.NONE);
composite.setLayout(new GridLayout());
composite.setVisible(false);
composite.setEnabled(false);
composite.setBackground(new Color(Display.getCurrent(), 168, 152, 93));
composite.setLayoutData(gridData1);
}
COM: <s> this method initializes composite </s>
|
funcom_train/25291620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReverbOrder(int reverbOrder) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_REVERB_ORDER_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes8"));
((AuralAttributesRetained)this.retained).setReverbOrder(reverbOrder);
}
COM: <s> set reverberation order </s>
|
funcom_train/20922929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBitLength(int defaultSize) {
if (isInt(this)) {
int bitLength = defaultSize;
Object obj = getValueParameters().get(Type.vparSize);
if (obj instanceof Integer) {
bitLength = ((Integer) obj).intValue();
}
return bitLength;
} else {
throw new RuntimeException("Cannot get the bit length of a non-integer type!");
}
}
COM: <s> returns the size of this type </s>
|
funcom_train/38999939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void wideInstruction(VerificationInstruction inst) throws Exception {
//todo should not make new instruction everytime.
VerificationInstruction newInst = inst.getWideUnderlineInstruction();
if (newInst.getOpCode() == JavaInstructionsOpcodes.IINC) {
miscInstr.iincInstruction(newInst, true);
} else {
execute(newInst, currentPC, null); //should handle wideness automatically.
}
}
COM: <s> operand stack behave same as the original instruction </s>
|
funcom_train/20945879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName(String name) {
if (this.name == null)
this.name = name;
else if (name == null)
throw new IllegalArgumentException("name=null");
else if (!name.equals(this.name))
throw new IllegalArgumentException("name="+name);
}
COM: <s> sets the name of this configuration </s>
|
funcom_train/45692653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object importAudioFiles(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
List<String> fileExtentionFilters = EsxEditor.AUDIO_FILE_EXTENSION_FILTERS;
String[] filters = fileExtentionFilters.toArray(new String[fileExtentionFilters.size()]);
String[] files = EsxEditorUtil.openFilePathDialog(window.getShell(), SWT.OPEN | SWT.MULTI, filters);
importAudioFiles(window, files);
return null;
}
COM: <s> this will pop open a load dialog allowing a user to select </s>
|
funcom_train/46965092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemExit() {
if (jMenuItemExit == null) {
jMenuItemExit = new JMenuItem();
jMenuItemExit.setText("Exit");
jMenuItemExit
.addActionListener(new java.awt.event.ActionListener() {
/*
* Action taken when the user presses the "Exit" menu
* item under the "File" menu
*/
public void actionPerformed(java.awt.event.ActionEvent e) {
MainWindow.this.dispose();
}
});
}
return jMenuItemExit;
}
COM: <s> this method initializes j menu item exit </s>
|
funcom_train/12112375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC14(java.util.EventObject arg1) {
try {
// user code begin {1}
// user code end
this.vediCmpParc_SceltaJButtonAction_actionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c14 vedi cmp parc </s>
|
funcom_train/8685830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMapper(String type, String from, String to) {
Mapper m = createMapper();
Mapper.MapperType mapperType = new Mapper.MapperType();
mapperType.setValue(type);
m.setType(mapperType);
m.setFrom(from);
m.setTo(to);
}
COM: <s> set a mapper to change property names </s>
|
funcom_train/29758966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedDate(Date date) {
if (date != null) {
Calendar newCal = Calendar.getInstance();
cal.setTime(selectedDate);
newCal.setTime(date);
if (cal.get(Calendar.MONTH) != newCal.get(Calendar.MONTH)
|| cal.get(Calendar.YEAR) != newCal.get(Calendar.YEAR)) {
reloadModel = true;
}
selectedDate = date;
scheduleModel.setSelectedDate(selectedDate);
scheduleModel.refresh();
}
}
COM: <s> set date selected in bitacore page </s>
|
funcom_train/47679839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public short loadFormValues() throws AppException {
String[] colValues = module.uploadBean.getParameterValues(name);
short len = 0;
if (colValues != null)
len = (short) (colValues.length - 1); // ignore last row
for (short i = 0; i < len; i++) {
module.dataMgr.putFieldValue(HTMLGridColumn.computeFieldName(name, i), colValues[i]);
}
return len;
}
COM: <s> gets from the request the values for the elements on the current grid </s>
|
funcom_train/3161811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(GrammarPackage.eINSTANCE.getBracketOperator_BracketContentProperty(),
GrammarFactory.eINSTANCE.createPropertyInfo()));
}
COM: <s> this adds to the collection of </s>
|
funcom_train/15491502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveAsGif(String path) {
if (!okForGif(imp))
return false;
try {
byte[] pixels = (byte[])imp.getProcessor().getPixels();
GifEncoder encoder = new GifEncoder(fi.width, fi.height, pixels, fi.reds, fi.greens, fi.blues);
OutputStream output = new BufferedOutputStream(new FileOutputStream(path));
encoder.write(output);
output.close();
}
catch (IOException e) {
showErrorMessage(e);
return false;
}
updateImp(fi, fi.GIF_OR_JPG);
return true;
}
COM: <s> save the image in gif format using the specified path </s>
|
funcom_train/17145854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "{" + name + " " + Debug.num(x()) + ", " +
Debug.num(y()) + ", " + Debug.num(z()) + ", h=" + data[3] + "}";
}
COM: <s> produces a nice string with the name and the three spatial </s>
|
funcom_train/11707059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean endsWith(CharArrayString string) {
if (string.len > this.len) {
return false;
}
int thisPos = this.end;
int stringPos = string.end;
while (stringPos > string.start) {
--thisPos;
--stringPos;
if (this.chars[thisPos] != string.chars[stringPos]) {
return false;
}
}
return true;
}
COM: <s> check of we end in a give string suffix </s>
|
funcom_train/2513867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkRegion(RGridTreeNode node){
//if current region overlaps with child node
if(node.getX()<=_X && (node.getX()+node.getbX())>=_X && node.getY()<=_Y && (node.getY()+node.getbY())>=_Y){
return true;
}else{
return false;
}
}
COM: <s> method checks to see if the current region overlaps with another node </s>
|
funcom_train/50090987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IRingSet getRingSetOfAtom(List ringSystems, IAtom atom) {
IRingSet ringSetOfAtom = null;
for (int i = 0; i < ringSystems.size(); i++) {
if (((IRingSet) ringSystems.get(i)).contains(atom)) {
return (IRingSet) ringSystems.get(i);
}
}
return ringSetOfAtom;
}
COM: <s> gets the ring set of atom attribute of the model builder3 d object </s>
|
funcom_train/41648427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startReply() throws Throwable {
expectTag(TAG_REPLY);
int tag = parseTag();
if (tag == TAG_FAULT) {
HashMap fault = readFault();
Object detail = fault.get("detail");
if (detail instanceof Throwable)
throw (Throwable) detail;
else {
String code = (String) fault.get("code");
String message = (String) fault.get("message");
throw new BurlapServiceException(message, code, detail);
}
}
else
_peekTag = tag;
}
COM: <s> starts reading the reply </s>
|
funcom_train/15880755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPieceRequest( int piece_number, int piece_offset, int length ) {
if( destroyed ) return;
DiskManagerReadRequest dmr = disk_manager.createReadRequest( piece_number, piece_offset, length );
try{
lock_mon.enter();
requests.addLast( dmr );
}finally{
lock_mon.exit();
}
doReadAheadLoads();
}
COM: <s> register a new piece data request </s>
|
funcom_train/50086001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IMolecularFormula getFormula(List<IIsotope> isoToCond_new, int[] value_In) {
IMolecularFormula mf = builder.newMolecularFormula();;
for(int i = 0; i < isoToCond_new.size() ; i++){
if(value_In[i] != 0){
for(int j = 0 ; j < value_In[i] ; j ++)
mf.addIsotope(isoToCond_new.get(i));
}
}
mf = putInOrder(mf);
return mf;
}
COM: <s> set the formula molecular as imolecular formula object </s>
|
funcom_train/42068158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSampleDataOriginalPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ChunkData_sampleDataOriginal_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ChunkData_sampleDataOriginal_feature", "_UI_ChunkData_type"),
WavPackage.Literals.CHUNK_DATA__SAMPLE_DATA_ORIGINAL,
false,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the sample data original feature </s>
|
funcom_train/3549934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateNodeDuplicate() {
try {
MemoryVocabSetFactory factory = MemoryVocabSetFactory.getInstance();
VocabSet set = factory.getVocabSet();
set.clear();
VocabNode node = set.createVocabNode("text", "noun", Locale.ENGLISH);
VocabNode node2 = set.createVocabNode("text", "noun", Locale.ENGLISH);
Assert.fail("Failed to catch duplicate node");
}
catch (VocabException ve) {
Assert.assertTrue(true);
}
}
COM: <s> tests creation of an additional node with duplicate data </s>
|
funcom_train/11011142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testVerifyEquivalence() {
String sameFileName = "test-data/spreadsheet/mortgage-calculation.xls" ;
ExcelAntWorkbookUtil util = ExcelAntWorkbookUtilFactory.getInstance(
mortgageCalculatorWorkbookFile ) ;
ExcelAntWorkbookUtil util2 = ExcelAntWorkbookUtilFactory.getInstance(
sameFileName ) ;
assertNotNull( util ) ;
assertNotNull( util2 ) ;
assertEquals( util, util2 ) ;
}
COM: <s> test whether or not the factory will properly return the same reference </s>
|
funcom_train/33527403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent evt) {
progressMonitor = new ProgressMonitor(Monitor.this,
"Updating All Movies",
"", 0, 100);
progressMonitor.setProgress(0);
task = new Task();
task.addPropertyChangeListener(this);
task.execute();
startButton.setEnabled(false);
}
COM: <s> invoked when the user presses the start button </s>
|
funcom_train/44592975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MethodInfo getMethodInfo(String desc, TypeInfo ti) {
Assert.assertFalse("More MethodInfos than required", ti.getMethodInfoDescriptors().size() > 1);
MethodInfo mi = ti.getMethodInfo(desc);
Assert.assertNotNull("MethodInfo "+desc+"not found", mi);
return mi;
}
COM: <s> retrieves a method info or fails </s>
|
funcom_train/36441417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public V get (K key) throws InvalidKeyException {
int i = findEntry(key); // helper method for finding a key
if (i < 0) return null; // there is no value for this key, so reutrn null
return bucket[i].getValue(); // return the found value in this case
}
COM: <s> returns the value associated with a key </s>
|
funcom_train/7639062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onChange(boolean keepSelection) {
ISelection selection = null;
if (keepSelection) {
mOnRefresh = true;
selection = mSelectionTableViewer.getSelection();
}
mSelectionTableViewer.refresh(true);
if (keepSelection) {
mSelectionTableViewer.setSelection(selection);
mOnRefresh = false;
}
if (mOnChangeListener != null) {
mOnChangeListener.run();
}
}
COM: <s> handle changes in the configuration </s>
|
funcom_train/50870740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printGraph() {
PrinterJob printJob = PrinterJob.getPrinterJob();
if (printJob.printDialog()) {
try {
printJob.setPrintable(this.graphView, pageFormat);
printJob.print();
} catch (Exception PrintException) {
PrintException.printStackTrace();
}
}
}
COM: <s> prints the diagram using the current settings </s>
|
funcom_train/3508165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
if (!(object instanceof RtfStyle)) {
return false;
}
RtfStyle rtfStyle = (RtfStyle)object;
return areEqual(rtfFont, rtfStyle.rtfFont) &&
areEqual(rtfForegroundColor, rtfStyle.rtfForegroundColor) &&
areEqual(rtfBackgroundColor, rtfStyle.rtfBackgroundColor) &&
getTypeDefinition().equals(rtfStyle.getTypeDefinition());
}
COM: <s> the name is not considered a difference for a style </s>
|
funcom_train/23182431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateNewPointName() {
logger.info("generateNewPointName() - Entry");
view.getPointNameValue().setText(
"New " + MapPoint.DEFAULT_MAP_POINT_NAME + " "
+ (view.getPointList().getModel().getSize() + 1));
logger.info("generateNewPointName() - Exit");
}
COM: <s> generate new point name on insert </s>
|
funcom_train/11643643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetExternalExecutorAfterStart() throws ConcurrentException {
BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl();
init.start();
try {
init.setExternalExecutor(Executors.newSingleThreadExecutor());
fail("Could set executor after start()!");
} catch (IllegalStateException istex) {
init.get();
}
}
COM: <s> tests that setting an executor after start causes an exception </s>
|
funcom_train/43593977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
try {
synchronized (this) {
if (!running) return;
if(connection.isClosed())
return;
running = false;
connection.createStatement().execute("SHUTDOWN");
connection.close();
}
} catch(SQLException e) {
e.printStackTrace();
}
}
COM: <s> shuts down the database if it hasnt already been shut down </s>
|
funcom_train/10750209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStart_Finished() {
ThreadRunning t = new ThreadRunning();
t.start();
t.stopWork = true;
try {
t.join();
} catch (InterruptedException e) {
fail(INTERRUPTED_MESSAGE);
}
try {
t.start();
fail("IllegalThreadStateException is expected when starting " +
"a finished thread");
} catch (IllegalThreadStateException e) {
return;
}
}
COM: <s> start the already finished thread </s>
|
funcom_train/50503784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() {
String name = nameField.getText();
String className = classField.getText();
if(ref == null) {
ref = manager.addResourceEnvReference(name, className);
}
else {
ref.setType(className);
ref.setName(name);
// to do ref.beanChanged();
}
ref.getDeploymentSettings().synchDoclets();
}
COM: <s> saves the gui inputs into the resource reference bean </s>
|
funcom_train/44164951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
switch(gui.getCurrentViewMode()) {
case GUI.MOVE_UNITS_MODE:
getFreeColClient().getInGameController().moveActiveUnit(direction);
break;
case GUI.VIEW_TERRAIN_MODE:
getFreeColClient().getInGameController().moveTileCursor(direction);
break;
}
}
COM: <s> applies this action </s>
|
funcom_train/14004009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void userCheck(ChatPacket msg) {
if (onlineUsers.containsKey(msg.getSender()))
System.out.println(msg.getSender() + " already in online list");
else {
ChatConnInfo info = new ChatConnInfo(msg.getSender(), oos, new java.util.Date());
System.out.println("adding " + msg.getSender() + " at " + info.getConnectedSince());
onlineUsers.put(msg.getSender(), info);
}
}
COM: <s> check to see if the chat client user is in the online user </s>
|
funcom_train/32316144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLabelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IndividualAttribute_label_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IndividualAttribute_label_feature", "_UI_IndividualAttribute_type"),
OdmPackage.Literals.INDIVIDUAL_ATTRIBUTE__LABEL,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the label feature </s>
|
funcom_train/3902931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHideLMSUIPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NavigationInterfaceType_hideLMSUI_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NavigationInterfaceType_hideLMSUI_feature", "_UI_NavigationInterfaceType_type"),
AdlnavV1p3Package.Literals.NAVIGATION_INTERFACE_TYPE__HIDE_LMSUI,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the hide lmsui feature </s>
|
funcom_train/17344390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Rectangle2D rec) {
add(new Point2D.Double(rec.getX(), rec.getY()));
add(new Point2D.Double(rec.getX() + rec.getWidth(), rec.getY() + rec.getHeight()));
}
COM: <s> forces the bounding box to include the extents of the given rectangle </s>
|
funcom_train/37062203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillLowerXVector( double max ) {
pointsLowerX.removeAllElements();
int y = 0;
for( int i = 0; i <= gWidth; i++ ) {
y = (int) (max * (double) i / (double) gWidth);
pointsLowerX.add( new Point2D.Double( i, y ) );
}
}
COM: <s> scaling the lower x axis save pixel value assignment in vector </s>
|
funcom_train/20824659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CueListener createCueListener() {
cueListener = new CueListener() {
public void currentChanged(final Cue c) {
updateCurrent();
}
public void selectedChanged(final Cue c) {
updateSelected();
}
public void numberChanged(final Cue c) {
updateNumber();
}
public void descriptionChanged(final Cue c) {
updateDescription();
}
};
return cueListener;
}
COM: <s> listen for changes in cue attributes and update the component </s>
|
funcom_train/4753812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IExpr remove(final int key) {
final int hash = hashOf(key);
int index = hash & mask;
if (containsKey(key, index)) {
return doRemove(index);
}
if (states[index] == FREE) {
return missingEntries;
}
int j = index;
for (int perturb = perturb(hash); states[index] != FREE; perturb >>= PERTURB_SHIFT) {
j = probe(perturb, j);
index = j & mask;
if (containsKey(key, index)) {
return doRemove(index);
}
}
return missingEntries;
}
COM: <s> remove the value associated with a key </s>
|
funcom_train/44848776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void nextStep() {
try {
if (workflowItem.hasNextStep()) {
workflowItem = workflowItem.getNextStep();
workflowItem.run(this);
}
else {
workflowListener.workflowExit(workflowItem.getReturnCode(), ""); //$NON-NLS-1$
}
}
catch (WorkflowException exc) {
LOG.error("Error encountered during initial configuration workflow!", exc); //$NON-NLS-1$
workflowListener.workflowExit(ReturnCode.ERROR, workflowItem.getErrorMessage());
}
}
COM: <s> package protected run the workflows next step </s>
|
funcom_train/16498218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEnabled( Class parserClass, boolean enabled) {
for ( int i=0; i<parserButtons.length; i++) {
if (parserButtons[i].getClientProperty( PARSER_CLASS_PROPERTY).equals( parserClass)) {
setEnabled( i, enabled);
break;
}
}
}
COM: <s> enables disables a registered parser in this selector </s>
|
funcom_train/3417022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Class readClass(boolean unshared) throws IOException {
if (bin.readByte() != TC_CLASS) {
throw new InternalError();
}
ObjectStreamClass desc = readClassDesc(false);
Class cl = desc.forClass();
passHandle = handles.assign(unshared ? unsharedMarker : cl);
ClassNotFoundException resolveEx = desc.getResolveException();
if (resolveEx != null) {
handles.markException(passHandle, resolveEx);
}
handles.finish(passHandle);
return cl;
}
COM: <s> reads in and returns class object </s>
|
funcom_train/25492052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point getNeighborPosition(Point pos, NeighborDirection direction) {
Point neighborPoint = new Point(pos.x, pos.y);
switch (direction) {
case TOP:
neighborPoint.y = pos.y - 1;
break;
case RIGHT:
neighborPoint.x = pos.x + 1;
break;
case BOTTOM:
neighborPoint.y = pos.y + 1;
break;
case LEFT:
neighborPoint.x = pos.x - 1;
break;
default:
throw new IllegalArgumentException("Unknown direction: "
+ direction.name());
}
return neighborPoint;
}
COM: <s> gets the position in the direction to the given position </s>
|
funcom_train/18322938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsStaticPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FieldDeclaration_isStatic_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FieldDeclaration_isStatic_feature", "_UI_FieldDeclaration_type"),
MetalangPackage.Literals.FIELD_DECLARATION__IS_STATIC,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is static feature </s>
|
funcom_train/4598562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void copySubscription(Subscription source, Subscription target) {
if ((source==null) || (target==null)) return;
target.setAutoConnect(source.getAutoConnect());
target.setPassword(source.getPassword());
target.setType(source.getType());
target.setUsername(source.getUsername());
}
COM: <s> convenience method to copy subscription properties </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.