__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/34135667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image loadImage(final String url) {
try {
final URL u = new URL(url);
if (applet.isActive()) {
return applet.getImage(u);
} else {
// i.e. we're running stand-alone
final ImageProducer prod = (ImageProducer) u.getContent();
return Toolkit.getDefaultToolkit().createImage(prod);
}
} catch (final Exception ex) {
throw new RuntimeException("failed to load image from " + url, ex);
}
}
COM: <s> asynchronously loads an image from an url </s>
|
funcom_train/22919608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(String title, String message, String input) {
setTitle(title);
messageLabel.setText(message);
if(input == null) {
inputField.setVisible(false);
okButton.setVisible(true);
cancelButton.setVisible(true);
} else {
inputField.setText(input);
okButton.setVisible(true);
cancelButton.setVisible(true);
}
}
COM: <s> if input is set to null no input field will be shown </s>
|
funcom_train/4644677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAssociatedPercentagePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Status_associatedPercentage_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Status_associatedPercentage_feature", "_UI_Status_type"),
TassooPackage.Literals.STATUS__ASSOCIATED_PERCENTAGE,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the associated percentage feature </s>
|
funcom_train/49670681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showMoveWarnDialog() {
final MessageBox mb = new MessageBox(folder.getShell(), SWT.ICON_WARNING);
mb.setMessage("Please select only one item to move!");
mb.setText("Hey!");
folder.getShell().setEnabled(false);
mb.open();
folder.getShell().setEnabled(true);
}
COM: <s> shows warning when user is tring to move more than one selected item </s>
|
funcom_train/45396534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyAnnotations (IBytecodeAnnotated annotated) {
for (IBytecodeAnnotation annotation : annotated.getDeclaredAnnotations()) {
BytecodeAnnotationDeclaration bad = this.annotate(annotation.getType());
Map<String, AnnotationValue> values = annotation.getValues();
for (String name : values.keySet()) {
bad.setValue(name, values.get(name).getValue());
}
this.annotations.add(bad);
}
}
COM: <s> copy all of the annotations found on the annotated member </s>
|
funcom_train/24098750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPathSeparatorFromPath(String filePath) {
String windowsSeparator = "\\";
String linuxSeparator = "/";
if (filePath.matches("^[a-zA-Z]:")) {
/*
* This is definitely a Windows path. Matches a Windows drive.
*/
return windowsSeparator;
} else if (filePath.contains(windowsSeparator)) {
return windowsSeparator;
} else {
return linuxSeparator;
}
}
COM: <s> get the path separator to use given a file path </s>
|
funcom_train/23386276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changePage(String notificationName, Object note) {
tabBar.closeTabPopup();
addPage(note, true, true, false);
popupManager.pageChanged(note);
mainAppView.revalidate();
updateContentDimensions();
AppWindowReflect.checkForOnDisplay(note);
}
COM: <s> this method will change the main application window to the destination </s>
|
funcom_train/3121428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt(Object node, int column) {
FileNode fn = (FileNode)node;
try {
switch(column) {
case 0:
return fn.getFile().getName();
case 1:
if (fn.isTotalSizeValid()) {
return new Integer((int)((FileNode)node).totalSize());
}
return null;
case 2:
return fn.isLeaf() ? "File" : "Directory";
case 3:
return fn.lastModified();
}
}
catch (SecurityException se) { }
return null;
}
COM: <s> returns the value of the particular column </s>
|
funcom_train/45827428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String promptFile() throws AbortException {
System.out.println("Please insert file name including suffix (e.g " + "myfile.xml" + "):\n");
BufferedReader tIn = new BufferedReader( new InputStreamReader(System.in));
try {
String tFilename = tIn.readLine();
if (tFilename == null || tFilename.isEmpty())
throw new AbortException();
return tFilename;
}
catch (IOException e) {
throw new AbortException();
}
}
COM: <s> this method ask the user for a valid file </s>
|
funcom_train/17544669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSessionClass(int index, java.lang.String value) {
// Make sure we've got a place to put this attribute.
if (size(SESSION) == 0) {
addValue(SESSION, java.lang.Boolean.TRUE);
}
setValue(SESSION, index, java.lang.Boolean.TRUE);
setAttributeValue(SESSION, index, "Class", value);
}
COM: <s> sets the class for a session at given index </s>
|
funcom_train/457655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeMailFolder(final String folderName) throws MessagingException {
try {
final IMAPFolder folder;
if (!imapStore.isConnected()) {
imapStore.connect(this.loginName, this.password);
}
folder = (IMAPFolder) imapStore.getFolder(folderName);
folder.delete(true);
} catch (final MessagingException e) {
log.error("Failed to remove imapfolder " + folderName + " at "+ url,e);
throw e;
} finally {
if (imapStore.isConnected()) {
imapStore.close();
}
}
}
COM: <s> removes the folder </s>
|
funcom_train/32055943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillApplyMap(CellView source, Map target) {
Object[] keys = new Object[] { GraphConstants.BORDER, GraphConstants.BORDERCOLOR };
GraphConstants.setRemoveAttributes(target, keys);
Color c = GraphConstants.getBorderColor(source.getAttributes());
if (c != null)
GraphConstants.setBorderColor(target, c );
Border b = GraphConstants.getBorder(source.getAttributes());
if (b != null)
GraphConstants.setBorder(target, b );
}
COM: <s> fills the border of the selected map with the selected color </s>
|
funcom_train/26200908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillRect(int x,int y,int w,int h) {
// end any path & stroke. This ensures the fill is on this
// rectangle, and not on any previous graphics
closeBlock();
drawRect(x,y,w,h);
closeBlock("B"); // rectangle, fill stroke
}
COM: <s> fills a rectangle with the current colour </s>
|
funcom_train/2294525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String dialogSubheadline(String headline) {
StringBuffer retValue = new StringBuffer(128);
retValue.append("<div class=\"dialogsubheader\" unselectable=\"on\">");
retValue.append(headline);
retValue.append("</div>\n");
return retValue.toString();
}
COM: <s> builds a subheadline in the dialog content area </s>
|
funcom_train/39475007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MoveChain makeMoves(BoardSetup boardSetup) {
PossibleMoves pm = new PossibleMoves(boardSetup);
Collection<MoveChain> chains = pm.getPossibleMoveChains();
if (chains.isEmpty()) {
return MoveChain.EMPTY;
} else {
int index = random.nextInt(chains.size());
return pm.getMoveChain(index);
}
}
COM: <s> given a board make decide which moves to make </s>
|
funcom_train/18483551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector3 clamp(double min, double max) {
return new Vector3(Math.max(min, Math.min(x, max)), Math.max(min, Math
.min(y, max)), Math.max(min, Math.min(z, max)));
}
COM: <s> returns a vector that is this vector with the components clamped in the </s>
|
funcom_train/35020743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String rest() {
String n = arguments.substring(currPosition).trim();
if (!returnAsIs
&& (n.indexOf('\'') > -1 || n.indexOf('"') > -1
|| n.indexOf('\\') > -1)) {
// Remove quotes and translate escaped quotes and slashes.
n = translateEscapes(n);
}
return n;
}
COM: <s> returns the rest of the string of arguments using the current </s>
|
funcom_train/46695967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetParameter_0args() {
System.out.println("getParameter");
PropertyToLink instance = new PropertyToLink();
Properties expResult = null;
Properties result = instance.getParameter();
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 parameter method of class property to link </s>
|
funcom_train/11658721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScript(String scriptAsString) {
try {
URL url = resolveURL(scriptAsString);
m_inputStream = url.openStream();
}
catch (MalformedURLException e) {
//Encapsulate the string within
m_inputStream = new ByteArrayInputStream(scriptAsString.getBytes());
}
catch (IOException e) {
//Error reading from the URL
m_inputStream = null;
}
compileScriptAndKeep();
}
COM: <s> set the input script </s>
|
funcom_train/4615423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() throws Exception {
System.setProperty("org.mortbay.http.HttpRequest.maxFormContentSize", "0"); // default max is 200k; zero is infinite
server.start();
shutDownHook = new Thread(new ShutDownHook(this));
shutDownHook.setName("SeleniumServerShutDownHook");
Runtime.getRuntime().addShutdownHook(shutDownHook);
}
COM: <s> starts the jetty server </s>
|
funcom_train/38833801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HttpMethod getMethod(final String source) {
switch (this) {
case GET:
return new GetMethod(source);
case PUT:
return new PutMethod(source);
case POST:
return new PostMethod(source);
case DELETE:
return new DeleteMethod(source);
default:
return new HeadMethod(source);
}
}
COM: <s> gets the method </s>
|
funcom_train/15406396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PropertyChangeEvent preSetter(boolean intercept, String propertyName, int oldValue, int newValue) {
boolean changed = oldValue != newValue;
if (intercept && changed){
addDirty(propertyName);
}
if (changed && pcs != null){
return new PropertyChangeEvent(owner, propertyName, Integer.valueOf(oldValue), Integer.valueOf(newValue));
}
return null;
}
COM: <s> check for primitive int </s>
|
funcom_train/926398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String templateUpdateSection(Integer moblogID, String sectionID, String htmlCode) throws Exception {
Vector parameters = prepareDefaultRequestParameters();
parameters.add(moblogID);
parameters.add(sectionID);
parameters.add(htmlCode);
Object response = xmlRpcClient.execute(TA_TEMPLATE_UPDATESECTION, parameters);
return (String) response;
}
COM: <s> updates the section html for a specified moblog </s>
|
funcom_train/18957991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void RemovePriority(String priorityName) throws SQLException, Exception {
Statement stmt = dbConn.createStatement();
// remove the selected type from the Priority table.
String update = "DELETE from Priority WHERE PriorityName" +
" = \"" + priorityName + "\"";
System.out.println(update);
stmt.executeUpdate(update);
stmt.close();
}
COM: <s> removes the selected priority from the project </s>
|
funcom_train/5446708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(byte b[], int off, int len) throws IOException {
int n;
for (n = 0; n < len && n + bufferPos < bufferSize; n++) {
if (n + off >= b.length) break;
b[n + off] = (byte)buffer[bufferPos + n];
}
bufferPos += n;
return(n);
}
COM: <s> reads a specified number of bytes into an array from the httpstream </s>
|
funcom_train/450466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintScreen () {
//Get the panel's graphic context.
Graphics panelGraphic = panel.getGraphics();
if ((panelGraphic == null) || (backgroundImage == null)) return;
//Copy the whole background image over.
panelGraphic.drawImage(backgroundImage, 0, 0, null);
//Update the display.
Toolkit.getDefaultToolkit().sync();
panelGraphic.dispose();
}
COM: <s> copy the background image to the panel all at once </s>
|
funcom_train/4511594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeNodeText(Node node) throws IOException {
String text = node.getText();
if (text != null && text.length() > 0) {
if (escapeText) {
text = escapeElementEntities(text);
}
lastOutputNodeType = Node.TEXT_NODE;
writer.write(text);
}
}
COM: <s> this method is used to write out nodes that contain text </s>
|
funcom_train/39172442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasClass(ONodeID classURI) {
boolean hasOWLClass =
ontologyTripleStore.hasTriple(classURI, ontology.OURI_RDF_TYPE, ontology.OURI_OWL_CLASS);
if (!hasOWLClass) {
boolean hasRDFSClass =
ontologyTripleStore.hasTriple(classURI, ontology.OURI_RDF_TYPE, ontology.OURI_RDFS_CLASS);
return hasRDFSClass;
} else {
return true;
}
}
COM: <s> the method returns if the current repository has a class with uri that </s>
|
funcom_train/39388550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() throws CloneNotSupportedException {
Pose newPose = null;
StepActuatorGroup newActuators = null;
if (pose !=null) {
newPose = (Pose)pose.clone();
}
if (actuators!=null) {
newActuators = (StepActuatorGroup)actuators.clone();
}
return new CalibrationPoint(newActuators,newPose);
}
COM: <s> performs deep cloning of pose and actuator group </s>
|
funcom_train/9494882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isOptimal(final SimplexTableau tableau) {
if (tableau.getNumArtificialVariables() > 0) {
return false;
}
for (int i = tableau.getNumObjectiveFunctions(); i < tableau.getWidth() - 1; i++) {
if (MathUtils.compareTo(tableau.getEntry(0, i), 0, epsilon) < 0) {
return false;
}
}
return true;
}
COM: <s> returns whether the problem is at an optimal state </s>
|
funcom_train/14092872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValidTitle1CaseSensitive() {
FrameFinder finder = new FrameFinder(getName());
JLabel label = new JLabel("Some Text");
JFrame frame = createJFrame(getName());
frame.getContentPane().add(label);
packAndShow(frame);
setWindow(frame);
assertTrue("Finder is not working", finder.testComponent(frame));
}
COM: <s> tests the test component method for valid title </s>
|
funcom_train/19104919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void close()
{
try
{
os.close();
is.close();
client.close();
//System.out.println( "Client closed connection" );
}
catch (IOException e)
{
System.err.println( "Exception - Error closing input steam.\n" + e.getMessage() );
}
}
COM: <s> close to connecting socket </s>
|
funcom_train/12160799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateInitialSelection(Object initialValue) {
try {
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
root.setSessionProperty(qNameInitialSelection, initialValue);
} catch (CoreException e) {
EclipseCommonPlugin.handleError(ControlsPlugin.getDefault(), e);
}
}
COM: <s> update the initial selection with the specified file name </s>
|
funcom_train/7428105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyArea(final org.eclipse.swt.graphics.Image img, final double x, final double y) {
TEMP_POINT.setLocation(x, y);
transform.transform(TEMP_POINT, TEMP_POINT);
gc.copyArea(img, (int) (TEMP_POINT.getX() + 0.5), (int) (TEMP_POINT.getY() + 0.5));
}
COM: <s> copies the image to the specified position </s>
|
funcom_train/22629831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int connect(int index){
session.update_readerList() ;
String rdr_name = session.get_cgd().get_reader(index);
if (rdr_name == null){
screen.error(Errors.WRONG_RDR_NB, Integer.toString(index)) ;
return Errors.WRONG_RDR_NB;
}
return connect(rdr_name) ;
}
COM: <s> connects to the reader with specified index </s>
|
funcom_train/34838257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("glue2WS".equals(portName)) {
setglue2WSEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/43570359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ProgressDialog getProgressDialog() {
if (progressDialog == null) {
progressDialog = new ProgressDialog(getView().getMainFrame(), false);
if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {
progressDialog.setSize(500, 460);
}
}
return progressDialog;
}
COM: <s> this method initializes progress dialog </s>
|
funcom_train/25072532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(int channel, int value, boolean fade) {
Log.d("StellaEcmdClient", "Setting Channel " + channel + " value "
+ value);
String cmd = "channel " + channel + " " + value;
if (fade) {
cmd += " f";
}
this.sendCommand(cmd, 0);
}
COM: <s> send the new value to the controller </s>
|
funcom_train/29926865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MainPanel restorePlugin(ConfigNode thisNode, PluginFactory f) {
MainPanel plugin = f.restorePlugin(thisNode, getViewFrame());
if (plugin != null) {
switch(plugin.getConfigNode().getAttribute("dock", -1)) {
case 0:
addDialog(plugin);
break;
case 1:
addTab(plugin);
setSelectedComponent((Component) plugin);
break;
case -1:
addTab(plugin);
setSelectedComponent((Component) plugin);
break;
}
}
return plugin;
}
COM: <s> used to add existing instances with state stored in confignode </s>
|
funcom_train/18456484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProtocolOption(short option, boolean on_off) {
if (on_off) {
if (!getProtocolOption(option)) {
this.bProtocolOptions = true;
protocolOptions += option;
}
} else {
if (getProtocolOption(option)) {
protocolOptions -= option;
}
}
}
COM: <s> set a protocoloption </s>
|
funcom_train/39170934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static class AliasWrapper {
public final String instURI; // The instance URI of the related Entity
public final String classURI; // The class URI of the related Entity
public final int start;
public final int end;
public AliasWrapper(String instURI, String classURI,
int start, int end) {
this.instURI = instURI; this.classURI = classURI;
this.start = start; this.end = end;
}
}
COM: <s> this class implements a container to return the results of the </s>
|
funcom_train/4513108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scheduleTask(Task task, long delay, long period) {
if (task == null)
return;
if (delay < 0 || period < 0)
throw new IllegalArgumentException();
TimerTask t = new TimerTask(task);
t.period = period;
t.nextExecutionTime = System.currentTimeMillis() + delay;
addTask(t);
}
COM: <s> schedule a code task code with specified delay and period </s>
|
funcom_train/21125591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGroupManager(IGroupManager gm) {
// TODO Try to solve this a better way
// check group manager
if((gm != null) && (gm instanceof ClockSyncGroupManager)) {
// cast
this.m_oGroupManager = (ClockSyncGroupManager) gm;
} else {
// throw excpetion
throw new IllegalArgumentException("Passed groupmanager must be an instance of ClockSyncGroupManager");
}
}
COM: <s> sets the groupmanager for this timestamp </s>
|
funcom_train/16945226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(ECommandID CmdID, Object... param) {
Message outM = new Message(CmdID, param);
try {
this.out.writeObject(outM);
this.out.flush();
if (CmdID == ECommandID.CI_CONNECT) {
in = new ObjectInputStream(new BufferedInputStream(mySocket.getInputStream()));
}
} catch (IOException e) {
System.out.println(this.getName() + ": Couldn't send, I'm already dead ;)!");
}
}
COM: <s> sends a command to the server </s>
|
funcom_train/18195854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToCasesList(ReadableExecutedTestSequence sequence) {
ReadableIterator<ReadableTestElement> iterator = sequence.getIterator();
while (iterator.hasNext()) {
ReadableTestElement a = iterator.next();
if (a instanceof ReadableExecutedTestSequence) {
addToCasesList((ReadableExecutedTestSequence) a);
} else {
casesList.add((ReadableExecutedTestCase) a);
}
}
}
COM: <s> recursive procedure for traversal of the tree in pre order </s>
|
funcom_train/27839296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object object) {
int result = super.compareTo(object);
if (result == 0) {
NonMatchResult that = (NonMatchResult) object;
switch (getPrecedence()) {
case PRECEDENCE_ELEMENT_DOESNT_MATCH:
case PRECEDENCE_ELEMENT_AND_ATTRIBUTES_MATCH_BUT_TEXT_DOESNT:
return that.getDepthInTree() - this.getDepthInTree();
case PRECEDENCE_ELEMENT_MATCH_BUT_ATTRIBUTE_DOESNT:
return that.getAttributes().length - this.getAttributes().length;
default:
throw new IllegalStateException(
"Programming error: this object has invalid precedence "
+ getPrecedence());
}
} else {
return result;
}
}
COM: <s> p compare two match results </s>
|
funcom_train/33811452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int bound(int i,int iPrecision,boolean bAllowZero){
//if dimension is too large, floor it
if ( i> 100 ){
i=100;
}
//ceil it
else if (i<0){
i = 0;
}
//computes value upon a given precision
if (i%10 < 5){
i -= i%iPrecision;
}
else{
i += (iPrecision-(i%iPrecision));
}
//don't allow zero for a dimension, at least the precision
if ( !bAllowZero && i < iPrecision ){
i = iPrecision;
}
return i;
}
COM: <s> computes a dimension in screen percent for a precision of given percents </s>
|
funcom_train/5158886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getFrontendApache()
{
if(umcParams.get(KEY_FRONTEND_APACHE)!=null && !umcParams.get(KEY_FRONTEND_APACHE).getValue().equals(""))
return Boolean.valueOf(umcParams.get(KEY_FRONTEND_APACHE).getValue());
return false;
}
COM: <s> returns the apache flag for the creation of the frontend </s>
|
funcom_train/51184381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean execute() throws BuildException {
Commandline cmd = new Commandline();
cmd.setExecutable("java");
addPizzaCompilerClasses(cmd);
cmd.createArgument().setValue("net.sf.pizzacompiler.compiler.Main");
addDestinationDir(cmd);
addClasspath(cmd);
int firstFileName = cmd.size();
logAndAddFilesToCompile(cmd);
return executeExternalCompile(cmd.getCommandline(), firstFileName) == 0;
}
COM: <s> executes the task </s>
|
funcom_train/48386022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecuteWithSharkSession() {
Object vendorData = enhydraSharkTemplate.execute(connectInfo, new EnhydraSharkSessionCallback() {
public Object doWithEnhydraSharkSession(SharkInterface sharkInterface, SharkConnection sharkConnection, WMSessionHandle sessionHandle) throws Exception {
return sessionHandle.getVendorData();
}
});
assertNotNull(vendorData);
}
COM: <s> test operation with shark session </s>
|
funcom_train/4976975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean determineNext () {
if (!_hasNextDetermined) {
do {
_hasNextDeterminedValue = _delegate.hasNext ();
_hasNextDetermined = true;
if (_hasNextDeterminedValue) {
_nextDeterminedValue = _delegate.next ();
}
} while (_hasNextDeterminedValue && _nextDeterminedValue == null);
}
return _hasNextDeterminedValue;
}
COM: <s> determines whether there is a non </s>
|
funcom_train/22395747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean removeMessageImpl(MessageNode message) {
if(messageSet.containsKey(message)) {
messages.removeElement(MessageNode.getComparator(), message);
message.setParent(null);
messageSet.remove(message);
tokenToMessageMap.remove(message.getMessageToken());
removeTokenIndexMapping(message.getMessageToken());
if(firstMessageNode == message) { firstMessageNode = null; }
return true;
}
else {
return false;
}
}
COM: <s> removes a message from this mailbox </s>
|
funcom_train/1038895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addRide(int user, int availableSeats, String startDate, int startLocation, int endLocation, int streetNumber,int streetNumberEnd, int reoccur, String time, String comment) throws RideException {
return addRide(user, availableSeats, startDate, startLocation, endLocation, streetNumber, streetNumberEnd, reoccur, time, comment, "noLocation");
}
COM: <s> add a ride into the database </s>
|
funcom_train/25495737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelection(Object object) {
if (getView() != null) {
if (object != null) {
HashSet set = new HashSet();
set.add(object);
getView().setSelectedObjects(set);
} else {
getView().setSelectedObjects(Collections.emptySet());
}
}
}
COM: <s> setst selected objects </s>
|
funcom_train/1012662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColor(float r, float g, float b, float a) throws GLException {
GL2 gl = GLContext.getCurrentGL().getGL2();
this.r = r * a;
this.g = g * a;
this.b = b * a;
this.a = a;
gl.glColor4f(this.r, this.g, this.b, this.a);
}
COM: <s> changes the color of the polygons and therefore the drawn </s>
|
funcom_train/7237943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeCompetingPredictionSetsFromWildcard(Lookahead[] look, AlternativeElement el, int k) {
for (int d = 1; d <= k; d++) {
for (int i = 0; i < currentBlock.analysisAlt; i++) {
AlternativeElement e = currentBlock.getAlternativeAt(i).head;
look[d].fset.subtractInPlace(e.look(d).fset);
}
}
}
COM: <s> remove the prediction sets from preceding alternatives </s>
|
funcom_train/3393587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isConvertible(Type t, Type s, Warner warn) {
boolean tPrimitive = t.isPrimitive();
boolean sPrimitive = s.isPrimitive();
if (tPrimitive == sPrimitive)
return isSubtypeUnchecked(t, s, warn);
if (!allowBoxing) return false;
return tPrimitive
? isSubtype(boxedClass(t).type, s)
: isSubtype(unboxedType(t), s);
}
COM: <s> is t a subtype of or convertiable via boxing unboxing </s>
|
funcom_train/810565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addExternalSpectrumIDPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PrecursorType_externalSpectrumID_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PrecursorType_externalSpectrumID_feature", "_UI_PrecursorType_type"),
MzmlPackage.Literals.PRECURSOR_TYPE__EXTERNAL_SPECTRUM_ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the external spectrum id feature </s>
|
funcom_train/51245859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePropFromOpenMenu(String propName) {
Component[] c = openConnectionMenu.getMenuComponents();
for (int i = 0; i < c.length; i++) {
JMenuItem item = (JMenuItem) c[i];
if (item.getText().equals(propName)) {
openConnectionMenu.remove(item);
break;
}
}
}
COM: <s> removes a sql property from the menu </s>
|
funcom_train/6263482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openTemplate( File openFile ) {
JobTemplate openTemplate = templateIO.loadTemplate( openFile );
if ( openTemplate != null ) {
jt = openTemplate;
templateFile = openFile;
} else {
jt = new JobTemplate();
templateFile = null;
}
templateChanged = false;
updateWindowTitle();
updateBulkTypeLabel();
refreshList();
}
COM: <s> open the specified template file </s>
|
funcom_train/22754402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SelectResultSet getAllRows(String table){
try{
String query = db.getSelectAllQuery(table);
stmt = conn.createStatement();
stmt.setFetchSize(50);
ResultSet rs = stmt.executeQuery(query);
rs.setFetchSize(50);
SelectResultSet srs = new SelectResultSet(stmt, rs);
return srs;
}catch(SQLException e){
logger.log(Level.SEVERE, "Could not get all rows from table: " + table, e);
return null;
}
}
COM: <s> gets the all rows </s>
|
funcom_train/40925717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getMensajes() {
if (Mensajes == null) {//GEN-END:|39-getter|0|39-preInit
// write pre-init user code here
Mensajes = new Command("Item", Command.ITEM, 0);//GEN-LINE:|39-getter|1|39-postInit
// write post-init user code here
}//GEN-BEGIN:|39-getter|2|
return Mensajes;
}
COM: <s> returns an initiliazed instance of mensajes component </s>
|
funcom_train/49456542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(Map<String, String> params) throws Exception{
if(params == null)
gen.setParameters(new HashMap<String, String>());
else
gen.setParameters(params);
gen.initExcelObject(db);
Module m = gen.getModule();
if(m != null){
gen.setUserId(HssfHelper.getAccountableUserForModule(db, m.getClass().getName()));
}
}
COM: <s> init the export with parameters </s>
|
funcom_train/24643438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show( Component parent, Settings acesettings ){
this.assume( acesettings );
JComponent msg = this;
acesettings.addListener( (Settings.ACESettingsListener) this );
int result = JOptionPane.showConfirmDialog( parent, msg, STR_TITLE, JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE );
acesettings.removeListener( (Settings.ACESettingsListener) this );
if( result == JOptionPane.OK_OPTION ) this.commit( acesettings );
}
COM: <s> show a modal dialog </s>
|
funcom_train/7646467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void seek(long pos) throws IOException {
if (pos < 0) {
// seek position is negative
throw new IOException(Msg.getString("K0347")); //$NON-NLS-1$
}
openCheck();
synchronized (repositionLock) {
fileSystem.seek(fd.descriptor, pos, IFileSystem.SEEK_SET);
}
}
COM: <s> moves this files file pointer to a new position from where following </s>
|
funcom_train/5395478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetEntireIndiceArray() {
System.out.println("setEntireIndiceArray");
int bc = 0;
int[] ri = null;
FecEncoder instance = null;
instance.setEntireIndiceArray(bc, ri);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set entire indice array method of class org </s>
|
funcom_train/12178474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTransformList() throws Exception {
String input =
"<b>" +
"Text Before" +
"<ol>" +
"<li>" +
"List Item 1" +
"</li>" +
"<li>" +
"List Item 2" +
"</li>" +
"</ol>" +
"Text After" +
"</b>";
doTest(input, getExpectedTransformList());
}
COM: <s> transform a ordered list by pushing a style element down into it </s>
|
funcom_train/10482448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean match(int position, String needle) {
int length = needle.length();
if (response.length - position < length) {
return false;
}
for (int i = 0; i < length; i++) {
if (response[position + i ] != needle.charAt(i)) {
return false;
}
}
return true;
}
COM: <s> test if the bytes in the response buffer match a given </s>
|
funcom_train/32720093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UsmUser removeUser(OctetString engineID, OctetString userName) {
UsmUserEntry entry = userTable.removeUser(engineID, userName);
if (entry != null) {
fireUsmUserChange(new UsmUserEvent(this, entry, UsmUserEvent.USER_REMOVED));
return entry.getUsmUser();
}
return null;
}
COM: <s> removes an usm user from the internal user name table </s>
|
funcom_train/9235782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void layoutComparisonPanel() {
comparisonsPanel.setLayout(new SpringLayout());
if (comparisonsPanel.getComponentCount() == 0) {
comparisonsPanel.add(noConditions);
} else {
layoutGrid(comparisonsPanel,
comparisonsPanel.getComponentCount() / 3, 3, SMALL_BORDER,
SMALL_BORDER, SMALL_BORDER, SMALL_BORDER);
}
}
COM: <s> lays out the comparisons panel </s>
|
funcom_train/48645905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getTypeComboBox() {
if (typeComboBox == null) {
String[] labels = { "8-bit", "16-bit", "32-bit", "RGB" };
typeComboBox = new JComboBox(labels);
typeComboBox.setSelectedIndex(0);
typeComboBox.setPreferredSize(new Dimension(100, 26));
}
return typeComboBox;
}
COM: <s> this method initializes type combo box </s>
|
funcom_train/8013798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearAllPagesFromSessionButCurrent() {
HttpSession sess = getSession();
Enumeration e = sess.getAttributeNames();
Object o = null;
while (e.hasMoreElements()) {
o = sess.getAttribute(e.nextElement().toString());
if (o instanceof JspController && o != this) {
((JspController) o).clearPageFromSession();
e = sess.getAttributeNames();
}
}
}
COM: <s> this method removes the pages from the session except for the controller </s>
|
funcom_train/35843884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRow(int row) {
Collection c = Model.getFacade().getTaggedValuesCollection(target);
if ((row >= 0) && (row < c.size())) {
Object element = getFromCollection(c, row);
Model.getUmlFactory().delete(element);
fireTableChanged(new TableModelEvent(this));
}
}
COM: <s> remove the tagged value at the given row from the model element </s>
|
funcom_train/15521309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllGroups(String[] ids) throws BusinessException {
org.hibernate.Transaction transaction = super.begin(QuestionGroupFactory
.getInstance());
try {
for (int i = 0; i < ids.length; i++) {
QuestionGroup questionGroup = (QuestionGroup) QuestionGroupFactory.getInstance().findByKey(
ids[i]);
QuestionGroupFactory.getInstance().remove(questionGroup);
}
super.commit(transaction);
} catch (DAOException daoe) {
super.rollback(transaction);
throw new BusinessException(daoe);
}
}
COM: <s> removes a bunch of code question group code instances in a single transaction </s>
|
funcom_train/19051933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WWEEntity defineEntity(String name, int type, char data[]) {
WWEEntity ent = (WWEEntity) entityHash.get(name);
if (ent == null) {
ent = new WWEEntity(name, type, data);
entityHash.put(name, ent);
if (((type & GENERAL) != 0) && (data.length == 1)) {
switch (type & ~GENERAL) {
case CDATA:
case SDATA:
entityHash.put(new Integer(data[0]), ent);
break;
}
}
}
return ent;
}
COM: <s> defines an entity </s>
|
funcom_train/5711947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetManufaturer() throws Exception{
RCapi capi = new RCapi();
String manufacturer = capi.getManufacturer();
assertNotNull("check existance of returned string", manufacturer);
assertTrue("check that the manufacturer is not empty", manufacturer.trim().length() != 0);
System.out.println("Manufacturer: " + manufacturer);
}
COM: <s> tests the retrieval of the manufacturer of the driver </s>
|
funcom_train/12776921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Atom extractPackage(TypeReference type) {
String s = type.getName().toString();
int index = s.lastIndexOf('/');
if (index == -1) {
return null;
} else {
s = s.substring(0, index);
return Atom.findOrCreateAsciiAtom(s);
}
}
COM: <s> method extract package </s>
|
funcom_train/7361545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T applyRepeatedly(T src, int n, Random rand) {
T dest = src.zero();
T temp = null;
for (int i = 0; i < n; i++) {
// apply
apply(src, dest, rand);
// swap
temp = src;
src = dest;
dest = temp;
}
return dest;
}
COM: <s> apply the mapping n times and return the result </s>
|
funcom_train/13535485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GraphModelEdit createRemoveEdit(Object[] cells, String name) {
// Remove from GraphStructure
ConnectionSet cs = ConnectionSet.create(this, cells, true);
// Remove from Group Structure
ParentMap pm = ParentMap.create(this, cells, true, false);
// Construct Edit
//GraphModelEdit edit = new GraphModelEdit(cells, cs, pm);
GraphModelEdit edit = createEdit(null, cells, null, cs, pm, name);
if (edit != null) edit.end();
return edit;
}
COM: <s> returns an edit that represents a remove </s>
|
funcom_train/38993117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImprovementType getRandomImprovementType() {
double pct = r.nextDouble();
double totalPct = 0.0;
for (Stats stat : typeStats.values()) {
totalPct += stat.pct;
}
for (Map.Entry<ImprovementType, Stats> entry : typeStats.entrySet()) {
Stats stat = entry.getValue();
double typePct = stat.pct / totalPct;
if (pct <= typePct)
return entry.getKey();
pct -= typePct;
}
return ImprovementType.CompleteChange;
}
COM: <s> returns a random improvement type that is influenced by how successful the types </s>
|
funcom_train/29268435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getMultiplicity(String pToken) {
if (pToken.endsWith("*")) {
return "*";
} else if (pToken.endsWith("?")) {
return "?";
} else if (pToken.endsWith("+")) {
return "+";
} else {
return "";
}
}
COM: <s> returns a tokens multiplicity </s>
|
funcom_train/36062235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveToDatabase( long scanRuleId ) throws IllegalStateException, SQLException, NoDatabaseConnectionException{
// 0 -- Precondition check
// 0.1 -- Make sure the scan rule is valid ( >= 0)
if( scanRuleId < 0 )
throw new IllegalArgumentException("Scan rule must not be less than zero");
// 1 -- Save the results
saveToDatabaseEx( scanRuleId );
}
COM: <s> save the rule to the database using the given scan rule id </s>
|
funcom_train/50397717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoadXMLBeansClassFromScript(){
StringBuilder sb=new StringBuilder();
sb.append("org.unigrids.x2006.x04.services.jms.HoldDocument.Factory.newInstance();");
String script=sb.toString();
ScriptSandbox sandbox = DependencyFactory.getComponent(ScriptSandbox.class.getCanonicalName(), ScriptSandbox.class);
sandbox.eval(getClass().getClassLoader(), script);
}
COM: <s> load an xmlbeans class from within a groovy script running in the </s>
|
funcom_train/46453898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Polynomial subtract(Polynomial p) {
int n = Math.max(p.degree(), degree())+1;
double[] coef = new double[n];
for(int i = 0;i<n;i++) {
coef[i] = coefficient(i)-p.coefficient(i);
}
return new Polynomial(coef);
}
COM: <s> subtracts another polynomial from this polynomial </s>
|
funcom_train/7660666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLockInterruptibly1() {
final ReentrantLock lock = new ReentrantLock();
lock.lock();
Thread t = new Thread(new InterruptedLockRunnable(lock));
try {
t.start();
t.interrupt();
lock.unlock();
t.join();
} catch(Exception e){
unexpectedException();
}
}
COM: <s> lock interruptibly is interruptible </s>
|
funcom_train/50156832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getSavedAssignments() {
Document doc = sef.getDocMap().getDocument();
List savedAssignments = null;
try {
savedAssignments = getSavedAssignments(doc, framework, casaaService, standardsMapper);
} catch (Throwable e) {
prtln("could not get savedAssignments: " + e.getMessage());
if (e instanceof NullPointerException)
e.printStackTrace();
}
return savedAssignments;
}
COM: <s> gets the saved assignments attribute of the suggestion service helper object </s>
|
funcom_train/48524799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestNodeHandles(final Id id, final int num, final Continuation<NodeHandleSet, Exception> cont) {
endpoint.getEnvironment().getSelectorManager().invoke(new Runnable() {
public void run() {
sendMessageWithRetries(id, num, cont);
}
});
}
COM: <s> requests a replica set from a node across the ring </s>
|
funcom_train/3180342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getQualifiedName() {
// Add prefix, if needed
String prefix = namespace.getPrefix();
if ((prefix != null) && (!prefix.equals(""))) {
return new StringBuffer(prefix)
.append(':')
.append(getName())
.toString();
} else {
return getName();
}
}
COM: <s> this will retrieve the qualified name of the code attribute code </s>
|
funcom_train/973424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeBizTransactionRow(final JButton button) {
int toRemove = Integer.parseInt(button.getName().substring(
button.getName().length() - 1, button.getName().length()));
mwBizTransTypeFields.remove(toRemove);
mwBizTransIDFields.remove(toRemove);
mwBizTransButtons.remove(toRemove);
drawBizTransaction();
}
COM: <s> removes a row from the business transactions </s>
|
funcom_train/9700744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean is2Bprocessed(){
RuntimeException re = new RuntimeException();
StackTraceElement[] elements = re.getStackTrace();
for (int i = 0; i < elements.length; i++) {
if (!elements[i].getClassName().equals(getClass().getName())){
// element is not called from this class
if (elements[i].getClassName().equals(prozessingClass)){
return true;
} else {
return false;
}
}
}
// all calls came from this class
return false;
}
COM: <s> check if the element is to be processed </s>
|
funcom_train/11783309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SetsList listSets() throws OAIException {
try {
String query = builder.buildListSetsQuery();
Document document = reader.read(query);
return new SetsList(document);
} catch (ErrorResponseException e) {
throw e;
} catch (Exception e) {
throw new OAIException(e);
}
}
COM: <s> list all sets the oai pmh server has </s>
|
funcom_train/30075657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ModelAndView onSubmit(Object command) throws ServletException {
OS os = (OS) command;
// delegate the insert to the Business layer
getGpir().storeOS(os);
return new ModelAndView(getSuccessView(), "osId", Integer.toString(os.getId()));
}
COM: <s> method inserts a new code os code </s>
|
funcom_train/37084687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void signalToggle(ToggleI changed) {
//System.out.println("Signaling toggle for " + this + " changed = " + changed);
JalToggleAction jta = (JalToggleAction)changed;
jta.fireJalActionEvent(new JalActionEvent(changed,jta,JalActionEvent.SELECT));
}
COM: <s> fires a jal action event </s>
|
funcom_train/1711543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetTotalArea(int current_story, int head) {
if(this.lx1!=null){
lx1[head]=lx1[current_story];
lx2[head]=lx2[current_story];
ly1[head]=ly1[current_story];
ly2[head]=ly2[current_story];
}
}
COM: <s> update changed links </s>
|
funcom_train/19536593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTimer(TimerInitItem timer) {
if (timers.indexOf(timer) >= 0)
throw new IllegalArgumentException("Can not add the same timer twice: " + timer.getName());
int index = timers.size();
timers.add(timer);
if (selectedTimers != null)
selectedTimers.add(Boolean.FALSE);
fireTableRowsInserted(index, index);
}
COM: <s> add a timer to the table model </s>
|
funcom_train/9890315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createContextMenu() {
// create menu manager
MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager mgr) {
fillContextMenu(mgr);
}
});
// create context menu
ColumnViewer viewer = getViewer();
Menu menu = menuMgr.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
// register menu for extension
getSite().registerContextMenu(menuMgr, viewer);
}
COM: <s> creates a context menu and associates it with the viewer </s>
|
funcom_train/1550973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resolveFunctionVariableReferences(ValidExpression outputVE) {
if (!(outputVE instanceof FunctionNVar)) return;
FunctionNVar fun = (FunctionNVar) outputVE;
// replace function variables in tree
for (FunctionVariable fVar : fun.getFunctionVariables()) {
// look for GeoDummyVariable objects with name of function variable and replace them
fun.getExpression().replaceVariables(fVar.getSetVarString(), fVar);
}
}
COM: <s> replaces geo dummy variable objects in output ve by the function in geos </s>
|
funcom_train/11728164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTextNodeTest() throws RepositoryException, NotExecutableException {
Node text1 = testRootNode.addNode(jcrXMLText);
text1.setProperty(jcrXMLCharacters, "foo");
testRootNode.save();
String xpath = "/" + jcrRoot + testRoot + "/text()";
executeXPathQuery(superuser, xpath, new Node[]{text1});
}
COM: <s> tests if text node test is equivalent with jcr xmltext </s>
|
funcom_train/14315713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstruction() throws MalformedURLException, RegistryException {
CacheManager manager = CacheManager.create();
Cache cache = manager.getCache("location");
assert cache!=null;
Querier querier = new Querier(new DummyVORegistry(), new GeneralServiceLocationResolver(), cache);
List<WebService> webservices = querier.doQuery("select foo from bar");
ServiceRenderer renderer = new PlainTextRenderer();
System.out.println(renderer.render(webservices,""));
}
COM: <s> just try constructing things </s>
|
funcom_train/38309242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setup(Table table) throws TableException {
try {
this.expressionTuple = exi.parseExpr(expression);
this.ctx = new ExpressionContext();
} catch (ExpressionException ex) {
throw new TableException("Failed to parse filter rule '" + expression + "': " + ex.getMessage(), ex);
}
}
COM: <s> sets up the rule </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.