id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
27,201
private static final Logger log = LoggerFactory.getLogger(EveryFieldValueGenerator.class); public EveryFieldValueGenerator(CronField cronField) { super(cronField); log.trace(String.format( "processing \"%s\" at %s", <BUG>cronField.getExpression().asString(), DateTime.now() </BUG> )); } @Override
cronField.getExpression().asString(), ZonedDateTime.now()
27,202
} for (Element serviceGroupElement: UtilXml.childElementList(rootElement, "service-groups")) { ResourceHandler handler = new MainResourceHandler(ServiceConfigUtil.SERVICE_ENGINE_XML_FILENAME, serviceGroupElement); addGroupDefinitions(handler); } <BUG>List componentResourceInfos = ComponentConfig.getAllServiceResourceIn...
for (ComponentConfig.ServiceResourceInfo componentResourceInfo: ComponentConfig.getAllServiceResourceInfos("group")) {
27,203
Map<String, ModelService> servicesMap = ModelServiceReader.getModelServiceMap(handler, this); if (servicesMap != null) { serviceMap.putAll(servicesMap); } } <BUG>List componentResourceInfos = ComponentConfig.getAllServiceResourceInfos("model"); Iterator componentResourceInfoIter = componentResourceInfos.iterator(); whi...
for (ComponentConfig.ServiceResourceInfo componentResourceInfo: ComponentConfig.getAllServiceResourceInfos("model")) {
27,204
} catch (GenericEntityException e) { Debug.logError(e, "Unable to load run-as-user UserLogin; cannot start container", module); return false; } ServiceMcaUtil.readConfig(); <BUG>List configs = cfg.getPropertiesWithValue("store-listener"); Iterator i = configs.iterator(); while (i.hasNext()) { ContainerConfig.Container...
List<ContainerConfig.Container.Property> configs = cfg.getPropertiesWithValue("store-listener"); for (ContainerConfig.Container.Property prop: configs) {
27,205
} for (Element serviceMcasElement: UtilXml.childElementList(rootElement, "service-mcas")) { ResourceHandler handler = new MainResourceHandler(ServiceConfigUtil.SERVICE_ENGINE_XML_FILENAME, serviceMcasElement); addMcaDefinitions(handler); } <BUG>List componentResourceInfos = ComponentConfig.getAllServiceResourceInfos("m...
public static void readConfig() { Element rootElement = null; try { rootElement = ServiceConfigUtil.getXmlRootElement(); } catch (GenericConfigException e) { Debug.logError(e, "Error getting Service Engine XML root element", module); return; for (ComponentConfig.ServiceResourceInfo componentResourceInfo: ComponentConfi...
27,206
} for (Element serviceEcasElement: UtilXml.childElementList(rootElement, "service-ecas")) { ResourceHandler handler = new MainResourceHandler(ServiceConfigUtil.SERVICE_ENGINE_XML_FILENAME, serviceEcasElement); addEcaDefinitions(handler); } <BUG>List componentResourceInfos = ComponentConfig.getAllServiceResourceInfos("e...
public static void readConfig() { Element rootElement = null; try { rootElement = ServiceConfigUtil.getXmlRootElement(); } catch (GenericConfigException e) { Debug.logError(e, "Error getting Service Engine XML root element", module); return; for (ComponentConfig.ServiceResourceInfo componentResourceInfo: ComponentConfi...
27,207
import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; <BUG>import org.lobobrowser.html.HtmlAttributeProperties; import org.lobobrowser.util.Objects;</BUG> import org.lobobrowser.util.Strings; import org.lobobrowser.w3c.html.HTMLMenuElement; import...
import org.lobobrowser.html.style.HtmlValues; import org.lobobrowser.util.Objects;
27,208
package org.lobobrowser.html.domimpl; import org.lobobrowser.html.HtmlAttributeProperties; import org.lobobrowser.html.renderstate.ListRenderState; <BUG>import org.lobobrowser.html.renderstate.RenderState; import org.lobobrowser.w3c.html.HTMLOListElement;</BUG> public class HTMLOListElementImpl extends HTMLAbstractUIEl...
import org.lobobrowser.html.style.HtmlValues; import org.lobobrowser.w3c.html.HTMLOListElement;
27,209
this.setAttribute(HtmlAttributeProperties.COMPACT, compact ? HtmlAttributeProperties.COMPACT : null); } @Override public int getStart() { <BUG>String startText = this.getAttribute(HtmlAttributeProperties.START); if (startText == null) { return 1; } try { return Integer.parseInt(startText); } catch (NumberFormatExceptio...
[DELETED]
27,210
package org.lobobrowser.html.domimpl; import org.lobobrowser.html.HtmlAttributeProperties; <BUG>import org.lobobrowser.html.js.Window; import org.lobobrowser.w3c.html.HTMLFormElement;</BUG> import org.lobobrowser.w3c.html.HTMLObjectElement; import org.lobobrowser.w3c.html.ValidityState; import org.w3c.dom.Document;
import org.lobobrowser.html.style.HtmlValues; import org.lobobrowser.w3c.html.HTMLFormElement;
27,211
public String getStandby() { return this.getAttribute(HtmlAttributeProperties.STANDBY); } @Override public int getTabIndex() { <BUG>try { return Integer.parseInt(this.getAttribute(HtmlAttributeProperties.TABINDEX)); } catch (Exception err) { return 0; }</BUG> }
[DELETED]
27,212
public String getUseMap() { return this.getAttribute(HtmlAttributeProperties.USEMAP); } @Override public int getVspace() { <BUG>try { return Integer.parseInt(this.getAttribute(HtmlAttributeProperties.VSPACE)); } catch (Exception err) { return 0; }</BUG> }
[DELETED]
27,213
} try {</BUG> return HtmlValues.getPixelSize(widthText, null, 1); <BUG>} catch (NumberFormatException nfe) { return 0; }</BUG> } @Override public void setWidth(int width) { this.setAttribute(HtmlAttributeProperties.WIDTH, String.valueOf(width));
public int getWidth() { String widthText = this.getAttribute(HtmlAttributeProperties.WIDTH);
27,214
package org.lobobrowser.html.domimpl; import org.lobobrowser.html.HtmlAttributeProperties; import org.lobobrowser.html.renderstate.RenderState; <BUG>import org.lobobrowser.html.renderstate.TableCellRenderState; import org.lobobrowser.w3c.html.HTMLTableCellElement;</BUG> public class HTMLTableCellElementImpl extends HTM...
import org.lobobrowser.html.style.HtmlValues; import org.lobobrowser.w3c.html.HTMLTableCellElement;
27,215
import org.lobobrowser.html.renderstate.ColorRenderState; import org.lobobrowser.html.renderstate.RenderState; import org.lobobrowser.html.renderstate.StyleSheetRenderState; import org.lobobrowser.html.style.AbstractCSS2Properties; import org.lobobrowser.html.style.CSS2PropertiesContext; <BUG>import org.lobobrowser.htm...
import org.lobobrowser.html.style.HtmlValues; import org.lobobrowser.html.style.LocalCSS2Properties;
27,216
package org.lobobrowser.html.domimpl; import org.lobobrowser.html.HtmlAttributeProperties; import org.lobobrowser.html.renderstate.DisplayRenderState; <BUG>import org.lobobrowser.html.renderstate.RenderState; import org.lobobrowser.w3c.html.HTMLLIElement;</BUG> public class HTMLLIElementImpl extends HTMLAbstractUIEleme...
import org.lobobrowser.html.style.HtmlValues; import org.lobobrowser.w3c.html.HTMLLIElement;
27,217
public void setType(String type) { this.setAttribute(HtmlAttributeProperties.TYPE, type); } @Override public int getValue() { <BUG>String valueText = this.getAttribute(HtmlAttributeProperties.VALUE); if (valueText == null) { return 0; } try { return Integer.parseInt(valueText); } catch (NumberFormatException nfe) { ret...
[DELETED]
27,218
package org.lobobrowser.html.domimpl; <BUG>import org.lobobrowser.html.HtmlAttributeProperties; import org.lobobrowser.w3c.html.HTMLMeterElement;</BUG> import org.w3c.dom.NodeList; public class HTMLMeterElementImpl extends HTMLElementImpl implements HTMLMeterElement { public HTMLMeterElementImpl(String name) {
import org.lobobrowser.html.style.HtmlValues; import org.lobobrowser.w3c.html.HTMLMeterElement;
27,219
public HTMLMeterElementImpl(String name) { super(name); } @Override public double getValue() { <BUG>try { return Integer.parseInt(this.getAttribute(HtmlAttributeProperties.VALUE)); } catch (Exception thrown) { logger.error("getSize(): Unable to parse size attribute in " + this + ".", thrown); return 0; }</BUG> }
[DELETED]
27,220
public void setLow(double low) { this.setAttribute(HtmlAttributeProperties.LOW, String.valueOf(low)); } @Override public double getHigh() { <BUG>try { return Integer.parseInt(this.getAttribute(HtmlAttributeProperties.HEIGHT)); } catch (Exception thrown) { logger.error("getSize(): Unable to parse size attribute in " + ...
[DELETED]
27,221
public void setHigh(double high) { this.setAttribute(HtmlAttributeProperties.HEIGHT, String.valueOf(high)); } @Override public double getOptimum() { <BUG>try { return Integer.parseInt(this.getAttribute(HtmlAttributeProperties.OPTINUM)); } catch (Exception thrown) { logger.error("getSize(): Unable to parse size attribu...
[DELETED]
27,222
package org.lobobrowser.html.domimpl; <BUG>import org.lobobrowser.html.HtmlAttributeProperties; import org.lobobrowser.w3c.html.HTMLProgressElement;</BUG> import org.w3c.dom.NodeList; public class HTMLProgressElementImpl extends HTMLElementImpl implements HTMLProgressElement { public HTMLProgressElementImpl(String name...
import org.lobobrowser.html.style.HtmlValues; import org.lobobrowser.w3c.html.HTMLProgressElement;
27,223
return 0; } try {</BUG> return HtmlValues.getPixelSize(widthText, null, 1); <BUG>} catch (NumberFormatException nfe) { return 0; }</BUG> } @Override public void setWidth(int width) {
super(name); public int getWidth() { String widthText = this.getAttribute(HtmlAttributeProperties.WIDTH);
27,224
Map<String, Object> _revisions = ClientTestUtils.getRevisionHistory(revision3, revision2, revision1); doc1.put(CouchConstants._rev, revision3); doc1.put(CouchConstants._revisions, _revisions); List<Response> responses = client.bulkCreateDocs(doc1); Assert.assertEquals(0, responses.size()); <BUG>Map<String, Object> allR...
Map<String, Object> allRevs = client.getDocRevisions(res1.getId(), revision3, JSONUtils.STRING_MAP_TYPE_DEF);
27,225
Assert.assertEquals("world", doc.get("hello")); Assert.assertTrue(doc.containsKey(CouchConstants._id)); Assert.assertEquals(res.getId(), doc.get(CouchConstants._id)); Assert.assertTrue(doc.containsKey(CouchConstants._rev)); Assert.assertEquals(res.getRev(), doc.get(CouchConstants._rev)); <BUG>} @Test(expected = NoResou...
[DELETED]
27,226
import com.cloudant.sync.internal.mazha.DocumentRevs; import com.cloudant.sync.internal.mazha.Response; <BUG>import com.cloudant.sync.internal.documentstore.InternalDocumentRevision; import com.cloudant.sync.internal.documentstore.DocumentRevsList; import com.cloudant.sync.internal.documentstore.MultipartAttachmentWrit...
[DELETED]
27,227
return executeResult; } finally { IOUtils.closeQuietly(errorStream); } } <BUG>private InputStream executeToInputStreamWithRetry(final Callable<ExecuteResult> task) throws CouchException { int attempts = 10; CouchException lastException= null; </BUG> while (attempts-- > 0) {
private <T> T executeWithRetry(final Callable<ExecuteResult> task, InputStreamProcessor<T> processor) throws CouchException lastException = null;
27,228
public boolean contains(String id) { Misc.checkNotNullOrEmpty(id, "id"); URI doc = this.uriHelper.documentUri(id); try { HttpConnection connection = Http.HEAD(doc); <BUG>this.executeToInputStreamWithRetry(connection); return true;</BUG> } catch (Exception e) { return false; }
this.executeWithRetry(connection, new NoOpInputStreamProcessor()); return true;
27,229
final URI doc = this.uriHelper.attachmentUri(id, queries, attachmentName); HttpConnection connection = Http.GET(doc); if (acceptGzip) { connection.requestProperties.put("Accept-Encoding", "gzip"); } <BUG>return executeToInputStreamWithRetry(connection); </BUG> } public void putAttachmentStream(String id, String rev, St...
return executeWithRetry(connection, processor);
27,230
} else { options.put("attachments", false); options.put("att_encoding_info", true); } options.put("open_revs", JSONUtils.toJson(revisions)); <BUG>return this.getDocument(id, options, JSONUtils.openRevisionList()); }</BUG> public Iterable<DocumentRevsList> bulkReadDocsWithOpenRevisions(List<BulkGetRequest> request, bool...
return this.getDocument(id, options, JSONUtils.OPEN_REVS_LIST_TYPE_DEF);
27,231
Misc.checkNotNull(rev, "Revision ID"); Map<String, Object> queries = new HashMap<String, Object>(); queries.put("revs", "true"); queries.put("rev", rev); URI findRevs = this.uriHelper.documentUri(id, queries); <BUG>InputStream is = null; try { HttpConnection connection = Http.GET(findRevs); is = this.executeToInputStre...
return executeToJsonObjectWithRetry(connection, type);
27,232
package com.cloudant.sync.internal.replication; import com.cloudant.http.HttpConnectionRequestInterceptor; import com.cloudant.http.HttpConnectionResponseInterceptor; <BUG>import com.cloudant.sync.internal.mazha.ChangesResult; import com.cloudant.sync.internal.mazha.CouchClient; import com.cloudant.sync.internal.mazha....
[DELETED]
27,233
attachmentName); if (a != null) { continue; } } <BUG>UnsavedStreamAttachment usa = this.sourceDb .getAttachmentStream(documentRevs.getId(), documentRevs.getRev(), attachmentName, contentType, encoding); preparedAtts.put(attachmentName, this.targetDb.prepareAttachment(usa, length, encodedLength)); }</BUG> }
preparedAtts.put(attachmentName, this.sourceDb.pullAttachmentWithRetry (documentRevs.getId(), documentRevs.getRev(), entry .getKey(), new AttachmentPullProcessor(this .targetDb, entry.getKey(), contentType, encoding, length, encodedLength)));
27,234
import org.dcache.nfs.nfsstat; import org.dcache.nfs.v4.client.CreateSessionStub; import org.dcache.nfs.v4.client.ExchangeIDStub; import org.dcache.nfs.v4.client.SequenceStub; import org.junit.Before; <BUG>import org.junit.Test; public class OperationEXCHANGE_IDTest {</BUG> private NFSv4StateHandler stateHandler; priva...
import static org.dcache.nfs.v4.NfsTestUtils.generateRpcCall; public class OperationEXCHANGE_IDTest {
27,235
nfs_argop4 exchangeid_args = ExchangeIDStub.normal(domain, name, clientId, 0, state_protect_how4.SP4_NONE); OperationEXCHANGE_ID EXCHANGE_ID = new OperationEXCHANGE_ID(exchangeid_args, 0); result = nfs_resop4.resopFor(nfs_opnum4.OP_EXCHANGE_ID); context = new CompoundContextBuilder() .withStateHandler(stateHandler) <BU...
.withCall(generateRpcCall()) .build();
27,236
nfs_argop4 exchangeid_args = ExchangeIDStub.normal(domain, name, clientId, 0, state_protect_how4.SP4_NONE); OperationEXCHANGE_ID EXCHANGE_ID = new OperationEXCHANGE_ID(exchangeid_args, 0); result = nfs_resop4.resopFor(nfs_opnum4.OP_EXCHANGE_ID); context = new CompoundContextBuilder() .withStateHandler(stateHandler) <BU...
.withCall(generateRpcCall()) .build();
27,237
result.opexchange_id.eir_resok4.eir_clientid, result.opexchange_id.eir_resok4.eir_sequenceid); OperationCREATE_SESSION CREATE_SESSION = new OperationCREATE_SESSION(cretaesession_args); result = nfs_resop4.resopFor(nfs_opnum4.OP_CREATE_SESSION); context = new CompoundContextBuilder() .withStateHandler(stateHandler) <BUG...
.withCall(generateRpcCall()) .build();
27,238
nfs_argop4 exchangeid_args = ExchangeIDStub.normal(domain, name, clientId, 0, state_protect_how4.SP4_NONE); OperationEXCHANGE_ID EXCHANGE_ID = new OperationEXCHANGE_ID(exchangeid_args, 0); result = nfs_resop4.resopFor(nfs_opnum4.OP_EXCHANGE_ID); context = new CompoundContextBuilder() .withStateHandler(stateHandler) <BU...
.withCall(generateRpcCall()) .build();
27,239
result.opexchange_id.eir_resok4.eir_clientid, result.opexchange_id.eir_resok4.eir_sequenceid); OperationCREATE_SESSION CREATE_SESSION = new OperationCREATE_SESSION(cretaesession_args); result = nfs_resop4.resopFor(nfs_opnum4.OP_CREATE_SESSION); context = new CompoundContextBuilder() .withStateHandler(stateHandler) <BUG...
.withCall(generateRpcCall()) .build();
27,240
nfs_argop4 exchangeid_args = ExchangeIDStub.normal(domain, name, clientId, 0, state_protect_how4.SP4_NONE); OperationEXCHANGE_ID EXCHANGE_ID = new OperationEXCHANGE_ID(exchangeid_args, 0); result = nfs_resop4.resopFor(nfs_opnum4.OP_EXCHANGE_ID); context = new CompoundContextBuilder() .withStateHandler(stateHandler) <BU...
.withCall(generateRpcCall()) .build();
27,241
result.opexchange_id.eir_resok4.eir_clientid, result.opexchange_id.eir_resok4.eir_sequenceid); OperationCREATE_SESSION CREATE_SESSION = new OperationCREATE_SESSION(cretaesession_args); result = nfs_resop4.resopFor(nfs_opnum4.OP_CREATE_SESSION); context = new CompoundContextBuilder() .withStateHandler(stateHandler) <BUG...
.withCall(generateRpcCall()) .build();
27,242
import org.junit.Test; import org.dcache.nfs.vfs.Inode; import static org.dcache.nfs.v4.NfsTestUtils.createClient; import org.dcache.nfs.v4.xdr.clientid4; import org.dcache.nfs.v4.xdr.seqid4; <BUG>import org.dcache.nfs.v4.xdr.state_owner4; import static org.junit.Assert.assertFalse;</BUG> import static org.junit.Assert...
import static org.dcache.nfs.v4.NfsTestUtils.generateRpcCall; import static org.junit.Assert.assertFalse;
27,243
result = nfs_resop4.resopFor(nfs_opnum4.OP_CLOSE); context = new CompoundContextBuilder() .withStateHandler(stateHandler) .withOpCount(1) .withMinorversion(1) <BUG>.withDeviceManager(mock(NFSv41DeviceManager.class)) .build();</BUG> context.currentInode( Inode.forFile( new byte[] {})); context.setSession(session); Asser...
.withCall(generateRpcCall()) .build();
27,244
OperationCLOSE CLOSE = new OperationCLOSE(close_args); result = nfs_resop4.resopFor(nfs_opnum4.OP_CLOSE); context = new CompoundContextBuilder() .withStateHandler(stateHandler) .withOpCount(1) <BUG>.withMinorversion(0) .build();</BUG> context.currentInode(Inode.forFile(new byte[]{})); AssertNFS.assertNFS(CLOSE, context...
.withMinorversion(1) .withDeviceManager(mock(NFSv41DeviceManager.class)) .withCall(generateRpcCall()) .build(); context.currentInode( Inode.forFile( new byte[] {})); context.setSession(session);
27,245
import org.dcache.nfs.vfs.Inode; import org.dcache.xdr.RpcAuthType; import org.junit.Test; import static org.junit.Assert.*; import org.junit.Before; <BUG>import static org.mockito.Mockito.mock; public class OperationSECINFO_NO_NAMETest {</BUG> private OperationSECINFO_NO_NAME op; private Inode inode; @Before
import static org.dcache.nfs.v4.NfsTestUtils.generateRpcCall; public class OperationSECINFO_NO_NAMETest {
27,246
} @Test public void testSecUnix() throws Exception { ExportFile exportFile = new ExportFile(ClassLoader.getSystemResource("org/dcache/nfs/exports.sys").toURI()); CompoundContext context = new CompoundContextBuilder() <BUG>.withExportFile(exportFile) .build();</BUG> context.currentInode(inode); nfs_resop4 result = nfs_r...
.withCall(generateRpcCall()) .build();
27,247
import org.dcache.nfs.vfs.Stat; import org.dcache.nfs.vfs.VirtualFileSystem; import org.dcache.utils.Bytes; import org.junit.Test; import org.mockito.Mockito; <BUG>import org.junit.Before; public class OperationREADDIRTest {</BUG> private FileHandle dirHandle; private Inode dirInode; private Stat dirStat;
import static org.dcache.nfs.v4.NfsTestUtils.generateRpcCall; public class OperationREADDIRTest {
27,248
dirStat.setSize(512); vfs = Mockito.mock(VirtualFileSystem.class); // the vfs serving it Mockito.when(vfs.getattr(Mockito.eq(dirInode))).thenReturn(dirStat); result = nfs_resop4.resopFor(nfs_opnum4.OP_READDIR); context = new CompoundContextBuilder() <BUG>.withFs(vfs) .build();</BUG> context.currentInode(dirInode); } @T...
.withCall(generateRpcCall()) .build();
27,249
result.opexchange_id.eir_resok4.eir_clientid, result.opexchange_id.eir_resok4.eir_sequenceid); OperationCREATE_SESSION CREATE_SESSION = new OperationCREATE_SESSION(cretaesession_args); result = nfs_resop4.resopFor(nfs_opnum4.OP_CREATE_SESSION); context = new CompoundContextBuilder() .withStateHandler(stateHandler) <BUG...
.withCall(generateRpcCall()) .build();
27,250
new clientid4(0), new sequenceid4(0)); OperationCREATE_SESSION CREATE_SESSION = new OperationCREATE_SESSION(cretaesession_args); result = nfs_resop4.resopFor(nfs_opnum4.OP_CREATE_SESSION); context = new CompoundContextBuilder() .withStateHandler(stateHandler) <BUG>.withOpCount(1) .build();</BUG> AssertNFS.assertNFS(CRE...
.withCall(generateRpcCall()) .build();
27,251
result.opexchange_id.eir_resok4.eir_clientid, badSequence); OperationCREATE_SESSION CREATE_SESSION = new OperationCREATE_SESSION(cretaesession_args); result = nfs_resop4.resopFor(nfs_opnum4.OP_CREATE_SESSION); context = new CompoundContextBuilder() .withStateHandler(stateHandler) <BUG>.withOpCount(1) .build();</BUG> As...
.withCall(generateRpcCall()) .build();
27,252
nfs_argop4 exchangeid_args = ExchangeIDStub.normal(domain, name, clientId, 0, state_protect_how4.SP4_NONE); OperationEXCHANGE_ID EXCHANGE_ID = new OperationEXCHANGE_ID(exchangeid_args, 0); result = nfs_resop4.resopFor(nfs_opnum4.OP_EXCHANGE_ID); context = new CompoundContextBuilder() .withStateHandler(stateHandler) <BU...
.withCall(generateRpcCall()) .build();
27,253
result.opexchange_id.eir_resok4.eir_clientid, result.opexchange_id.eir_resok4.eir_sequenceid); OperationCREATE_SESSION CREATE_SESSION = new OperationCREATE_SESSION(cretaesession_args); result = nfs_resop4.resopFor(nfs_opnum4.OP_CREATE_SESSION); context = new CompoundContextBuilder() .withStateHandler(stateHandler) <BUG...
.withCall(generateRpcCall()) .build();
27,254
nfs_argop4 destroysession_args = DestroySessionStub.standard(result.opcreate_session.csr_resok4.csr_sessionid); OperationDESTROY_SESSION DESTROY_SESSION = new OperationDESTROY_SESSION(destroysession_args); result = nfs_resop4.resopFor(nfs_opnum4.OP_DESTROY_SESSION); context = new CompoundContextBuilder() .withStateHand...
.withCall(generateRpcCall()) .build();
27,255
} @Test(expected = ConnNotBoundToSessionException.class) public void testDestroySessionNoBind() throws Exception { CompoundContextBuilder contextBdr = new CompoundContextBuilder() .withStateHandler(stateHandler) <BUG>.withOpCount(1); nfs_resop4 result;</BUG> nfs_argop4 exchangeid_args = ExchangeIDStub.normal(domain, na...
.withOpCount(1) .withCall(generateRpcCall()); nfs_resop4 result;
27,256
result = execute(contextBdr.build(), CREATE_SESSION); sessionid4 session = result.opcreate_session.csr_resok4.csr_sessionid; nfs_argop4 sequence_args = SequenceStub.generateRequest(false, session, 0, 2, 2); OperationSEQUENCE SEQUENCE = new OperationSEQUENCE(sequence_args); result = execute(contextBdr.build(), SEQUENCE)...
.withCall(generateRpcCall()) .withStateHandler(stateHandler);
27,257
import com.intellij.ide.DataManager; import com.intellij.ide.ui.LafManager; import com.intellij.ide.ui.LafManagerListener; import com.intellij.ide.util.gotoByName.*; import com.intellij.openapi.Disposable; <BUG>import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; i...
import com.intellij.openapi.actionSystem.*;
27,258
import com.intellij.util.ui.UIUtil; import javax.swing.*; import javax.swing.event.DocumentEvent; import java.awt.*; import java.awt.event.FocusAdapter; <BUG>import java.awt.event.FocusEvent; import java.util.ArrayList;</BUG> import java.util.HashSet; import java.util.List; import java.util.Set;
import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.util.ArrayList;
27,259
private String[] myFiles; private String[] myActions; private Component myFocusComponent; private JBPopup myPopup; private Alarm myAlarm = new Alarm(Alarm.ThreadToUse.POOLED_THREAD, ApplicationManager.getApplication()); <BUG>private JBList myList = new JBList(); public SearchEverywhereAction() {</BUG> createSearchField...
private JList myList = new JList(); //don't use JBList here!!! todo[kb] public SearchEverywhereAction() {
27,260
final Project project = PlatformDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext(field.getTextEditor())); assert project != null; myClassModel = new GotoClassModel2(project); myFileModel = new GotoFileModel(project); myActionModel = new GotoActionModel(project, myFocusComponent); <BUG>myClasses = myCla...
myClasses = myClassModel.getNames(false); myFiles = myFileModel.getNames(false);
27,261
import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.nio.file.*; import java.nio.file.attribute.BasicFileAttributes; <BUG>import java.util.*; public abstract class GaugeProject {</BUG> private static final String PRODUCT_ROOT = "GAUGE_ROOT"; private static final String PRODUCT_...
import static com.thoughtworks.gauge.test.common.GaugeProject.getCurrentProject; public abstract class GaugeProject {
27,262
return new UnknownProject(language, projName); } } public void createGaugeService() throws IOException, InterruptedException { int freePortForApi = SocketUtils.findFreePortForApi(); <BUG>Process process = currentProject.executeGaugeDaemon(freePortForApi); </BUG> GaugeConnection gaugeConnection = initializeGaugeConnecti...
Process process = getCurrentProject().executeGaugeDaemon(freePortForApi);
27,263
System.out.println(currentProject.getLastProcessStdout()); } } public static void implement(Table impl, TableRow row,boolean appendCode) throws Exception { if(impl.getColumnNames().contains("implementation")) { <BUG>GaugeProject.currentProject.implementStep(row.getCell("step text"), row.getCell("implementation"),</BUG>...
row.getCell("implementation"),
27,264
package com.thoughtworks.gauge.test.common.builders; import com.thoughtworks.gauge.Table; import com.thoughtworks.gauge.TableRow; import com.thoughtworks.gauge.test.common.GaugeProject; import com.thoughtworks.gauge.test.common.Scenario; <BUG>import com.thoughtworks.gauge.test.common.Specification; public class Scenari...
import java.util.Arrays; import java.util.List; import static com.thoughtworks.gauge.test.common.GaugeProject.currentProject; public class ScenarioBuilder {
27,265
import java.util.List; import static com.thoughtworks.gauge.test.common.GaugeProject.currentProject;</BUG> public class DataStore { @Step("Create a scenario <newScenario> in specification <newSpec> with steps to read and write to datastore <table>") public void addToDataStore(String scenario, String spec, Table datasto...
package com.thoughtworks.gauge.test.implementation; import com.thoughtworks.gauge.Step; import com.thoughtworks.gauge.Table; import com.thoughtworks.gauge.test.common.builders.SpecificationBuilder;
27,266
package com.thoughtworks.gauge.test.common.builders; <BUG>import com.thoughtworks.gauge.Table; import com.thoughtworks.gauge.test.common.GaugeProject; import com.thoughtworks.gauge.test.common.Specification; public class SpecificationBuilder {</BUG> private ScenarioBuilder scenarioBuilder;
import com.thoughtworks.gauge.TableRow; import java.util.Arrays; import java.util.List; import static com.thoughtworks.gauge.test.common.GaugeProject.currentProject; public class SpecificationBuilder {
27,267
totalkeysRead++; } catch ( Exception ex ) { logger_.warn(LogUtil.throwableToString(ex)); <BUG>filestruct.reader_.close(); }</BUG> } lfs.clear(); lastkey = null;
filestruct.close();
27,268
totalkeysWritten++; for (FileStruct filestruct : lfs) { try { <BUG>filestruct = getNextKey(filestruct); if(filestruct == null) {</BUG> continue;
filestruct.getNextKey(); if (filestruct.isExhausted())
27,269
pq.add(filestruct); totalkeysRead++; } catch ( Throwable ex ) { <BUG>filestruct.reader_.close(); }</BUG> } lfs.clear(); lastkey = null;
filestruct.close();
27,270
package com.feed_the_beast.ftbu.handlers; <BUG>import com.feed_the_beast.ftbl.api.IForgePlayer; import com.feed_the_beast.ftbl.lib.util.LMUtils; import com.feed_the_beast.ftbu.FTBLibIntegration;</BUG> import com.feed_the_beast.ftbu.config.FTBUConfigGeneral;
import com.feed_the_beast.ftbu.api.IRank; import com.feed_the_beast.ftbu.api_impl.FTBUtilitiesAPI_Impl;
27,271
return -1; }</BUG> @SubscribeEvent(priority = EventPriority.HIGHEST) public void onServerChatEvent(ServerChatEvent event) { <BUG>if(FTBUConfigRanks.OVERRIDE_CHAT.getBoolean()) { }</BUG> String msg = event.getMessage().trim(); if(msg.startsWith(FTBUConfigGeneral.CHAT_SUBSTITUTE_PREFIX.getString()))
import net.minecraft.util.text.event.ClickEvent; import net.minecraft.util.text.event.HoverEvent; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.event.ServerChatEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEven...
27,272
import com.feed_the_beast.ftbl.api.IFTBLibRegistry; import com.feed_the_beast.ftbl.lib.config.PropertyBool; import com.feed_the_beast.ftbu.FTBUFinals; public class FTBUConfigRanks { <BUG>public static final PropertyBool ENABLED = new PropertyBool(false); public static final PropertyBool OVERRIDE_CHAT = new PropertyBoo...
[DELETED]
27,273
import com.feed_the_beast.ftbu.api_impl.FTBUtilitiesAPI_Impl; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.server.MinecraftServer; import net.minecraft.util.text.ITextComponent; <BUG>import net.minecraft.util.text.TextComponentString; public class CmdG...
import net.minecraft.util.text.event.ClickEvent; public class CmdGet extends CommandLM
27,274
@Override public void execute(MinecraftServer server, ICommandSender ics, String[] args) throws CommandException { checkArgs(args, 1, "<player>"); IForgePlayer p = getForgePlayer(args[0]); <BUG>IRank r = FTBUtilitiesAPI_Impl.INSTANCE.getRank(p.getProfile()); ITextComponent c = new TextComponentString(r.getDisplayName(...
public String getCommandName() return "get";
27,275
import org.codehaus.groovy.control.CompilationUnit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public final class GroovyTreeParser implements TreeParser { private static final Logger logger = LoggerFactory.getLogger(GroovyTreeParser.class); <BUG>private static final String GROOVY_DEFAULT_INTERFACE = "groo...
private Indexer indexer = new Indexer();
27,276
if (scriptClass != null) { sourceUnit.getAST().getStatementBlock().getVariableScope().getDeclaredVariables().values().forEach( variable -> { SymbolInformation symbol = getVariableSymbolInformation(scriptClass.getName(), sourceUri, variable); <BUG>addToValueSet(newTypeReferences, variable.getType().getName(), symbol); s...
newIndexer.addSymbol(sourceUnit.getSource().getURI(), symbol); if (classes.containsKey(variable.getType().getName())) { newIndexer.addReference(classes.get(variable.getType().getName()), GroovyLocations.createLocation(sourceUri, variable.getType()));
27,277
} if (typeReferences.containsKey(foundSymbol.getName())) { foundReferences.addAll(typeReferences.get(foundSymbol.getName()));</BUG> } <BUG>return foundReferences; }</BUG> @Override public Set<SymbolInformation> getFilteredSymbols(String query) { checkNotNull(query, "query must not be null"); Pattern pattern = getQueryP...
}); sourceUnit.getAST().getStatementBlock() .visit(new MethodVisitor(newIndexer, sourceUri, sourceUnit.getAST().getScriptClassDummy(), classes, Maps.newHashMap(), Optional.absent(), workspaceUriSupplier));
27,278
<BUG>package com.palantir.ls.server.api; import io.typefox.lsapi.ReferenceParams;</BUG> import io.typefox.lsapi.SymbolInformation; import java.net.URI; import java.util.Map;
import com.google.common.base.Optional; import io.typefox.lsapi.Location; import io.typefox.lsapi.Position; import io.typefox.lsapi.ReferenceParams;
27,279
import java.util.Map; import java.util.Set; public interface TreeParser { void parseAllSymbols(); Map<URI, Set<SymbolInformation>> getFileSymbols(); <BUG>Map<String, Set<SymbolInformation>> getTypeReferences(); Set<SymbolInformation> findReferences(ReferenceParams params); Set<SymbolInformation> getFilteredSymbols(St...
Map<Location, Set<Location>> getReferences(); Set<Location> findReferences(ReferenceParams params); Optional<Location> gotoDefinition(URI uri, Position position); Set<SymbolInformation> getFilteredSymbols(String query);
27,280
.workspaceSymbolProvider(true) .referencesProvider(true) .completionProvider(new CompletionOptionsBuilder() .resolveProvider(false) .triggerCharacter(".") <BUG>.build()) .build();</BUG> InitializeResult result = new InitializeResultBuilder() .capabilities(capabilities) .build();
.definitionProvider(true)
27,281
package com.palantir.ls.server; import com.palantir.ls.server.api.CompilerWrapper; import com.palantir.ls.server.api.TreeParser; import com.palantir.ls.server.api.WorkspaceCompiler; <BUG>import io.typefox.lsapi.FileEvent; import io.typefox.lsapi.PublishDiagnosticsParams;</BUG> import io.typefox.lsapi.ReferenceParams; i...
import com.google.common.base.Optional; import io.typefox.lsapi.Location; import io.typefox.lsapi.Position; import io.typefox.lsapi.PublishDiagnosticsParams;
27,282
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_result_list, container, false); mBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false)); <BUG>mBinding.recyclerView.setHasFixedSize(true); mHeaderFragment = ResultListHeaderFragment.newInstance(mTa...
mHeaderFragment = (ResultListHeaderFragment) getChildFragmentManager().findFragmentById(R.id.result_list_header); if (mHeaderFragment == null) { return mBinding.getRoot();
27,283
super.onDestroyView(); EventBus.getDefault().unregister(this); } @Override public void onViewStateRestored(@Nullable Bundle savedInstanceState) { <BUG>Log.v(TAG, "onViewStateRestored, bundle = " + savedInstanceState); </BUG> super.onViewStateRestored(savedInstanceState); updateUi(); }
Log.v(TAG, mTab + " onViewStateRestored, bundle = " + savedInstanceState);
27,284
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
27,285
} @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_memo); <BUG>ChinaPhoneHelper.setStatusBar(this,true); </BUG> topicId = getIntent().getLongExtra("topicId", -1); if (topicId == -1) { finish();
ChinaPhoneHelper.setStatusBar(this, true);
27,286
MemoEntry.COLUMN_REF_TOPIC__ID + " = ?" , new String[]{String.valueOf(topicId)}); } public Cursor selectMemo(long topicId) { Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null, <BUG>MemoEntry._ID + " DESC", null); </BUG> if (c != nu...
MemoEntry.COLUMN_ORDER + " ASC", null);
27,287
MemoEntry._ID + " = ?", new String[]{String.valueOf(memoId)}); } public long updateMemoContent(long memoId, String memoContent) { ContentValues values = new ContentValues(); <BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent); return db.update(</BUG> MemoEntry.TABLE_NAME, values, MemoEntry._ID + " = ?",
return db.update(
27,288
import android.widget.RelativeLayout; import android.widget.TextView; import com.kiminonawa.mydiary.R; import com.kiminonawa.mydiary.db.DBManager; import com.kiminonawa.mydiary.shared.EditMode; <BUG>import com.kiminonawa.mydiary.shared.ThemeManager; import java.util.List; public class MemoAdapter extends RecyclerView.A...
import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter; public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
27,289
private DBManager dbManager; private boolean isEditMode = false; private EditMemoDialogFragment.MemoCallback callback; private static final int TYPE_HEADER = 0; private static final int TYPE_ITEM = 1; <BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMe...
public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) { super(recyclerView); this.mActivity = activity;
27,290
this.memoList = memoList; this.dbManager = dbManager; this.callback = callback; } @Override <BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { </BUG> View view; if (isEditMode) { if (viewType == TYPE_HEADER) {
public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
27,291
editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment"); } }); } } <BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { private View rootView; private TextView TV_memo_item_content;</BUG> private ImageView IV_memo_item_delete;
protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener { private ImageView IV_memo_item_dot; private TextView TV_memo_item_content;
27,292
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
27,293
} @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_memo); <BUG>ChinaPhoneHelper.setStatusBar(this,true); </BUG> topicId = getIntent().getLongExtra("topicId", -1); if (topicId == -1) { finish();
ChinaPhoneHelper.setStatusBar(this, true);
27,294
MemoEntry.COLUMN_REF_TOPIC__ID + " = ?" , new String[]{String.valueOf(topicId)}); } public Cursor selectMemo(long topicId) { Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null, <BUG>MemoEntry._ID + " DESC", null); </BUG> if (c != nu...
MemoEntry.COLUMN_ORDER + " ASC", null);
27,295
MemoEntry._ID + " = ?", new String[]{String.valueOf(memoId)}); } public long updateMemoContent(long memoId, String memoContent) { ContentValues values = new ContentValues(); <BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent); return db.update(</BUG> MemoEntry.TABLE_NAME, values, MemoEntry._ID + " = ?",
return db.update(
27,296
import android.widget.RelativeLayout; import android.widget.TextView; import com.kiminonawa.mydiary.R; import com.kiminonawa.mydiary.db.DBManager; import com.kiminonawa.mydiary.shared.EditMode; <BUG>import com.kiminonawa.mydiary.shared.ThemeManager; import java.util.List; public class MemoAdapter extends RecyclerView.A...
import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter; public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
27,297
private DBManager dbManager; private boolean isEditMode = false; private EditMemoDialogFragment.MemoCallback callback; private static final int TYPE_HEADER = 0; private static final int TYPE_ITEM = 1; <BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMe...
public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) { super(recyclerView); this.mActivity = activity;
27,298
this.memoList = memoList; this.dbManager = dbManager; this.callback = callback; } @Override <BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { </BUG> View view; if (isEditMode) { if (viewType == TYPE_HEADER) {
public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
27,299
editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment"); } }); } } <BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { private View rootView; private TextView TV_memo_item_content;</BUG> private ImageView IV_memo_item_delete;
protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener { private ImageView IV_memo_item_dot; private TextView TV_memo_item_content;
27,300
this.queryLogger = Loggers.getLogger(logger, ".query"); this.fetchLogger = Loggers.getLogger(logger, ".fetch"); queryLogger.setLevel(level); fetchLogger.setLevel(level); indexSettingsService.addListener(new ApplySettings()); <BUG>} private long parseTimeSetting(String name, long defaultNanos) { try { return componentSe...
[DELETED]