id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
9,001
private static final String PATH_DELIMITER = "/"; public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT; enum Element { ADDED_BUNDLE("added-bundle"), ADDED_MISC_CONTENT("added-misc-content"), <BUG>ADDED_MODULE("added-module"), BUNDLES("bundles"),</BUG> CUMULATIVE("cumulative"), DESCRIPTION("description"), MIS...
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
9,002
final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { <BUG>case APPLIES_TO_VERSION: builder.addAppliesTo(value); break;</BUG> case RESULTING_VE...
[DELETED]
9,003
final StringBuilder path = new StringBuilder(); for(final String p : item.getPath()) { path.append(p).append(PATH_DELIMITER); } path.append(item.getName()); <BUG>writer.writeAttribute(Attribute.PATH.name, path.toString()); if(type != ModificationType.REMOVE) {</BUG> writer.writeAttribute(Attribute.HASH.name, bytesToHex...
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
9,004
package org.jboss.as.patching; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.patching.runner.PatchingException; import org.jboss.logging.Messages; import org.jboss.logging.annotations.Message; <BUG>import org.jboss.logging.annotations.MessageBundle; import java.io.IOException;</BUG> impor...
import org.jboss.logging.annotations.Cause; import java.io.IOException;
9,005
recovery.recover(clogs); return recovery.blockForWrites(); <BUG>} catch (IOException e) { if (e instanceof UnknownColumnFamilyException) logger.error("Commit log replay failed due to replaying a mutation for a missing table. This error can be ignored by providing -Dcassandra.commitlog.stop_on_missing_tables=false on th...
[DELETED]
9,006
} public CommitLogDescriptor(long id) { this(current_version, id); } <BUG>@VisibleForTesting public static void writeHeader(ByteBuffer out, CommitLogDescriptor descriptor) {</BUG> out.putInt(0, descriptor.version); out.putLong(4, descriptor.id);
[DELETED]
9,007
private int readSyncMarker(CommitLogDescriptor descriptor, int offset, RandomAccessReader reader) throws IOException { if (offset > reader.length() - CommitLogSegment.SYNC_MARKER_SIZE) { if (offset != reader.length() && offset != Integer.MAX_VALUE) <BUG>{ String message = String.format("Encountered bad header at positi...
logger.warn("Encountered bad header at position {} of Commit log {}; not enough room for a header", offset, reader.getPath());
9,008
filecrc = reader.readInt() & 0xffffffffL; if (crc.getValue() != filecrc) { if (end != 0 || filecrc != 0) { <BUG>String message = String.format("Encountered bad header at position %d of Commit log %s, with invalid CRC. The end of segment marker should be zero.", offset, reader.getPath()); if (!IGNORE_ERRORS) throw new ...
logger.warn("Encountered bad header at position {} of commit log {}, with invalid CRC. The end of segment marker should be zero.", offset, reader.getPath());
9,009
break main; // last CL entry didn't get completely written. that's ok. } checksum.update(buffer, 0, serializedSize); if (claimedCRC32 != checksum.getValue()) { <BUG>if (!IGNORE_ERRORS) throw new IOException("Invalid checksum for mutation at position " + mutationStart + " of " + file);</BUG> continue; } FastByteArrayInp...
[DELETED]
9,010
for (Cell cell : cf) cf.getComparator().validate(cell.name()); } catch (UnknownColumnFamilyException ex) { <BUG>if (!IGNORE_MISSING_TABLES) throw ex;</BUG> if (ex.cfId == null) continue; AtomicInteger i = invalidMutations.get(ex.cfId);
[DELETED]
9,011
import org.apache.cassandra.config.Schema; import org.apache.cassandra.db.ColumnFamilyStore; import org.apache.cassandra.db.Directories; import org.apache.cassandra.db.Keyspace; import org.apache.cassandra.db.SystemKeyspace; <BUG>import org.apache.cassandra.db.UnknownColumnFamilyException; import org.apache.cassandra.d...
[DELETED]
9,012
mPhone = (EditText) findViewById(R.id.udesk_phone); mWeiBoId = (EditText)findViewById(R.id.udesk_weiboName); mWeiXinId = (EditText)findViewById(R.id.udesk_weixinId); mDescribe = (EditText)findViewById(R.id.udesk_describe); findViewById(R.id.udesk_commituserinfo).setOnClickListener(this); <BUG>findViewById(R.id.udesk_co...
UdeskMessageManager.getInstance().event_OnNewMsgNotice.bind(this, "OnNewMsgNotice"); Log.i("xxx","UdeskInitActivity 中bind OnNewMsgNotice"); }
9,013
int unreadMsg = UdeskSDKManager.getInstance().getCurrentConnectUnReadMsgCount(); mUnReadTips.setVisibility(View.VISIBLE); mUnReadTips.setText(unreadMsg + ""); } }); <BUG>} @Override protected void onResume() { super.onResume();</BUG> UdeskMessageManager.getInstance().event_OnNewMsgNotice.bind(this, "OnNewMsgNotice");
[DELETED]
9,014
CookieParameter(String cookieName, boolean isRequest) { super(cookieName, isRequest); this.cookieName = cookieName; } protected String getValue(RequestLoggerRequest request) { <BUG>Cookie cookie = request.getCookie(this.cookieName); return (cookie == null) ? null : escape(cookie.toString()); } protected String getValu...
[DELETED]
9,015
package com.webpieces.http2parser.api.dto; <BUG>import java.util.LinkedList; import org.webpieces.data.api.DataWrapper;</BUG> import com.webpieces.http2parser.api.Padding; import com.webpieces.http2parser.api.PaddingFactory; import com.webpieces.http2parser.api.dto.lib.AbstractHttp2Frame;
import java.util.List; import org.webpieces.data.api.DataWrapper;
9,016
package com.webpieces.http2parser.api.dto; <BUG>import java.util.LinkedList; import org.webpieces.data.api.DataWrapper;</BUG> import com.webpieces.http2parser.api.Padding; import com.webpieces.http2parser.api.PaddingFactory; import com.webpieces.http2parser.api.dto.lib.AbstractHttp2Frame;
import java.util.List; import org.webpieces.data.api.DataWrapper;
9,017
this.endHeaders = endHeaders; } private int promisedStreamId = 0x0; //31bits private DataWrapper headerFragment; private Padding padding = PaddingFactory.createPadding(); <BUG>private LinkedList<Http2Header> headerList; // only created by the parser when deserializing a bunch of header frames @Override</BUG> public Dat...
private List<Http2Header> headerList; // only created by the parser when deserializing a bunch of header frames @Override
9,018
import org.webpieces.data.api.BufferPool; import org.webpieces.data.api.DataWrapper; import org.webpieces.data.api.DataWrapperGenerator; import org.webpieces.data.api.DataWrapperGeneratorFactory; import com.twitter.hpack.Decoder; <BUG>import com.twitter.hpack.Encoder; import com.webpieces.http2parser.api.FrameMarshalle...
import com.webpieces.http2engine.impl.HeaderDecoding; import com.webpieces.http2parser.api.FrameMarshaller;
9,019
AbstractHttp2Frame firstFrame = hasHeaderFragmentList.get(0); DataWrapper allSerializedHeaders = dataGen.emptyWrapper(); for (AbstractHttp2Frame iterFrame : hasHeaderFragmentList) { allSerializedHeaders = dataGen.chainDataWrappers(allSerializedHeaders, ((HasHeaderFragment) iterFrame).getHeaderFragment()); } <BUG>((HasH...
HeaderDecoding decoding = new HeaderDecoding(decoder); List<Http2Header> headers = decoding.decode(allSerializedHeaders); ((HasHeaderList) firstFrame).setHeaderList(headers); ((HasHeaderFragment) firstFrame).setEndHeaders(true); // fake setting end headers
9,020
import org.webpieces.data.api.BufferCreationPool; import org.webpieces.data.api.DataWrapper; import org.webpieces.data.api.DataWrapperGenerator; import org.webpieces.data.api.DataWrapperGeneratorFactory; import com.twitter.hpack.Decoder; <BUG>import com.twitter.hpack.Encoder; import com.webpieces.http2parser.api.Http2M...
import com.webpieces.http2engine.impl.HeaderDecoding; import com.webpieces.http2parser.api.Http2Memento;
9,021
package org.webpieces.httpcommon.impl; import static com.webpieces.http2parser.api.dto.lib.SettingsParameter.SETTINGS_ENABLE_PUSH; import static com.webpieces.http2parser.api.dto.lib.SettingsParameter.SETTINGS_MAX_CONCURRENT_STREAMS; <BUG>import java.net.InetSocketAddress; import java.util.concurrent.CompletableFuture;...
import java.util.LinkedList; import java.util.concurrent.CompletableFuture;
9,022
import static com.webpieces.http2parser.api.dto.lib.SettingsParameter.SETTINGS_MAX_CONCURRENT_STREAMS; import static org.webpieces.httpcommon.api.Http2Engine.HttpSide.SERVER; import static org.webpieces.httpcommon.impl.Stream.StreamStatus.CLOSED; import static org.webpieces.httpcommon.impl.Stream.StreamStatus.IDLE; imp...
import java.util.LinkedList; import java.util.List;
9,023
Stream promisedStream = new Stream(); this.http2EngineImpl.initializeFlowControl(newStreamId); promisedStream.setStreamId(newStreamId); this.http2EngineImpl.activeStreams.put(newStreamId, promisedStream); promisedStream.setResponseListener(stream.getResponseListener()); <BUG>HttpRequest request = this.http2EngineImpl.r...
HttpRequest request = this.http2EngineImpl.requestFromHeaders(new LinkedList<>(frame.getHeaderList()), promisedStream);
9,024
import java.util.List; import org.webpieces.data.api.DataWrapper; import org.webpieces.data.api.DataWrapperGenerator; import org.webpieces.data.api.DataWrapperGeneratorFactory; import org.webpieces.util.logging.Logger; <BUG>import org.webpieces.util.logging.LoggerFactory; import com.webpieces.http2engine.api.dto.Http2D...
import com.twitter.hpack.Decoder; import com.webpieces.http2engine.api.dto.Http2Data;
9,025
private Level5FlowControl flowControlLevel5; private HeaderDecoding decoder; private List<HasHeaderFragment> accumulatingHeaders = new ArrayList<>(); public Level2AggregateDecodeHeaders(Level3StreamInitialization nextLayer, Level5FlowControl flowControlLevel5, HeaderSettings localSettings) { this.nextLayer = nextLayer;...
Decoder decode = new Decoder(16_384, localSettings.getMaxHeaderTableSize()); this.decoder = new HeaderDecoding(decode);
9,026
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestOutputStream; import java.security.MessageDigest; <BUG>import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.List;</BUG> public final class ...
import java.text.DateFormat; import java.util.Date; import java.util.List;
9,027
package org.jboss.as.patching.runner; <BUG>import org.jboss.as.boot.DirectoryStructure; import org.jboss.as.patching.LocalPatchInfo;</BUG> import org.jboss.as.patching.PatchInfo; import org.jboss.as.patching.PatchLogger; import org.jboss.as.patching.PatchMessages;
import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp; import org.jboss.as.patching.CommonAttributes; import org.jboss.as.patching.LocalPatchInfo;
9,028
private static final String PATH_DELIMITER = "/"; public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT; enum Element { ADDED_BUNDLE("added-bundle"), ADDED_MISC_CONTENT("added-misc-content"), <BUG>ADDED_MODULE("added-module"), BUNDLES("bundles"),</BUG> CUMULATIVE("cumulative"), DESCRIPTION("description"), MIS...
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
9,029
final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { <BUG>case APPLIES_TO_VERSION: builder.addAppliesTo(value); break;</BUG> case RESULTING_VE...
[DELETED]
9,030
final StringBuilder path = new StringBuilder(); for(final String p : item.getPath()) { path.append(p).append(PATH_DELIMITER); } path.append(item.getName()); <BUG>writer.writeAttribute(Attribute.PATH.name, path.toString()); if(type != ModificationType.REMOVE) {</BUG> writer.writeAttribute(Attribute.HASH.name, bytesToHex...
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
9,031
package org.jboss.as.patching; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.patching.runner.PatchingException; import org.jboss.logging.Messages; import org.jboss.logging.annotations.Message; <BUG>import org.jboss.logging.annotations.MessageBundle; import java.io.IOException;</BUG> impor...
import org.jboss.logging.annotations.Cause; import java.io.IOException;
9,032
import com.google.gson.JsonObject; import melnorme.utilbox.core.CommonException; public class GsonHelper { public JsonObject getObject(JsonObject jsonObject, String key) throws CommonException { JsonElement element = jsonObject.get(key); <BUG>if(element.isJsonObject()) { </BUG> return element.getAsJsonObject(); } else ...
if(element != null && element.isJsonObject()) {
9,033
throw wrongTypeException(key, "Object"); } } public String getString(JsonObject jsonObject, String key) throws CommonException { JsonElement element = jsonObject.get(key); <BUG>if(element.isJsonPrimitive() && element.getAsJsonPrimitive().isString()) { </BUG> return element.getAsString(); } else { throw wrongTypeExcepti...
if(element != null && element.isJsonPrimitive() && element.getAsJsonPrimitive().isString()) {
9,034
throw wrongTypeException(key, "String"); } } public boolean getBoolean(JsonObject jsonObject, String key) throws CommonException { JsonElement element = jsonObject.get(key); <BUG>if(element.isJsonPrimitive() && element.getAsJsonPrimitive().isBoolean()) { </BUG> return element.getAsBoolean(); } else { throw wrongTypeExc...
if(element != null && element.isJsonPrimitive() && element.getAsJsonPrimitive().isBoolean()) {
9,035
throw wrongTypeException(key, "boolean"); } } public Number getNumber(JsonObject jsonObject, String key) throws CommonException { JsonElement element = jsonObject.get(key); <BUG>if(element.isJsonPrimitive() && element.getAsJsonPrimitive().isNumber()) { </BUG> return element.getAsNumber(); } else { throw wrongTypeExcept...
if(element != null && element.isJsonPrimitive() && element.getAsJsonPrimitive().isNumber()) {
9,036
customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString()); customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName); customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString()); customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName); customTokens.put("%%mlTraceFo...
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName); customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName); }
9,037
import java.util.Map; import java.util.ResourceBundle; import org.jboss.as.controller.Extension; import org.jboss.as.controller.ExtensionContext; import org.jboss.as.controller.ModelVersion; <BUG>import org.jboss.as.controller.PathAddress; import org.jboss.as.controller.SubsystemRegistration; import org.jboss.as.contro...
import org.jboss.as.controller.PathElement; import org.jboss.as.controller.descriptions.ModelDescriptionConstants; import org.jboss.as.controller.descriptions.ResourceDescriptionResolver;
9,038
import org.jboss.as.controller.transform.TransformationContext; import org.jboss.as.controller.transform.TransformersSubRegistration; import org.jboss.dmr.ModelNode; import org.jboss.staxmapper.XMLElementReader; public class InfinispanExtension implements Extension { <BUG>public static final String SUBSYSTEM_NAME = "in...
static final PathElement SUBSYSTEM_PATH = PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, SUBSYSTEM_NAME); public static final String RESOURCE_NAME = InfinispanExtension.class.getPackage().getName() + "." +"LocalDescriptions";
9,039
String result = null; </BUG> try { <BUG>final String url = SERVICE_CONTROLLER_URL + "applications/" + applicationName; result = client.postFile(url, applicationFile); </BUG> } catch (final ErrorStatusException e) { throw new CLIStatusException(e, e.getReasonCode(), e.getArgs());
containerUids.add(uid); } return containerUids; } @Override public Map<String, String> installApplication(final File applicationFile, final String applicationName, int timeout) throws CLIException { Map<String, String> result = null; final String url = SERVICE_CONTROLLER_URL + "applications/" + applicationName + "/time...
9,040
if (serviceFile.isDirectory()) {</BUG> FileUtils.deleteQuietly(packedFile.getParentFile()); } <BUG>adminFacade.waitForServiceInstances(serviceName, currentApplicationName, plannedNumberOfInstances, TIMEOUT_ERROR_MESSAGE, timeoutInMinutes, TimeUnit.MINUTES);</BUG> return getFormattedMessage("service_install_ended", Col...
templateName = ""; } else { templateName = ""; String lifecycleEventContainerPollingID = adminFacade.installElastic(packedFile, currentApplicationName, serviceName, zone, props, templateName, timeoutInMinutes); ((RestAdminFacade)adminFacade).waitForLifecycleEvents(lifecycleEventContainerPollingID, TIMEOUT_ERROR_MESSAGE...
9,041
package org.cloudifysource.shell.commands; <BUG>import java.io.File; import java.text.MessageFormat; import java.util.concurrent.TimeUnit; import java.util.regex.Pattern;</BUG> import org.apache.felix.gogo.commands.Argument;
import java.util.Map;
9,042
customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString()); customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName); customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString()); customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName); customTokens.put("%%mlTraceFo...
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName); customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName); }
9,043
import co.cask.cdap.api.dataset.lib.KeyValueTable; import co.cask.cdap.api.dataset.table.Get; import co.cask.cdap.api.dataset.table.Put; import co.cask.cdap.api.dataset.table.Table; import co.cask.cdap.api.metrics.RuntimeMetrics; <BUG>import co.cask.cdap.api.schedule.ScheduleSpecification; import co.cask.cdap.proto.Run...
import co.cask.cdap.proto.Id; import co.cask.cdap.proto.RunRecord;
9,044
import com.google.common.base.Throwables; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.reflect.TypeToken; <BUG>import com.google.gson.Gson; import org.junit.Assert; import org.junit.Test;</BUG> import org.junit.exp...
import org.junit.After; import org.junit.Before; import org.junit.Test;
9,045
gson.fromJson(client.query("result", ImmutableMap.of("type", "highpass")), String.class)); } @Category(XSlowTests.class) @Test public void testDeployWorkflowApp() throws InterruptedException { <BUG>ApplicationManager applicationManager = deployApplication(AppWithSchedule.class); </BUG> WorkflowManager wfmanager = appli...
ApplicationManager applicationManager = deployApplication(testSpace, AppWithSchedule.class);
9,046
Assert.assertEquals(status, expected); } @Category(XSlowTests.class) @Test(timeout = 240000) public void testMultiInput() throws InterruptedException, IOException, TimeoutException { <BUG>ApplicationManager applicationManager = deployApplication(JoinMultiStreamApp.class); </BUG> applicationManager.startFlow("JoinMultiF...
ApplicationManager applicationManager = deployApplication(testSpace, JoinMultiStreamApp.class);
9,047
StreamWriter s2 = applicationManager.getStreamWriter("s2"); StreamWriter s3 = applicationManager.getStreamWriter("s3"); s1.send("testing 1"); s2.send("testing 2"); s3.send("testing 3"); <BUG>RuntimeMetrics terminalMetrics = RuntimeStats.getFlowletMetrics("JoinMulti", "JoinMultiFlow", "Terminal"); terminalMetrics.waitF...
RuntimeMetrics terminalMetrics = RuntimeStats.getFlowletMetrics(testSpace.getId(), "JoinMulti", terminalMetrics.waitForProcessed(3, 5, TimeUnit.SECONDS);
9,048
testApp(WordCountApp.class, "text"); } @Category(SlowTests.class) @Test public void testGetServiceURL() throws Exception { <BUG>ApplicationManager applicationManager = deployApplication(AppUsingGetServiceURL.class); </BUG> ServiceManager centralServiceManager = applicationManager.startService(AppUsingGetServiceURL.CENT...
ApplicationManager applicationManager = deployApplication(testSpace, AppUsingGetServiceURL.class);
9,049
Bytes.stopKeyForPrefix(Bytes.toBytes("init")), 2, 5); byte[] startRow = Bytes.toBytes("stop"); assertWorkerDatasetWrites(applicationManager, startRow, Bytes.stopKeyForPrefix(startRow), 5, 5); } private void assertWorkerDatasetWrites(ApplicationManager applicationManager, byte[] startRow, byte[] endRow, <BUG>int expecte...
DataSetManager<KeyValueTable> datasetManager = getDataset(testSpace, AppUsingGetServiceURL.WORKER_INSTANCES_DATASET);
9,050
deployApplication(AppWithInvalidHandler.class); } @Category(SlowTests.class) @Test public void testAppWithWorker() throws Exception { <BUG>ApplicationManager applicationManager = deployApplication(AppWithWorker.class); </BUG> LOG.info("Deployed."); WorkerManager manager = applicationManager.startWorker(AppWithWorker.WO...
ApplicationManager applicationManager = deployApplication(testSpace, AppWithWorker.class);
9,051
LOG.info("Deployed."); WorkerManager manager = applicationManager.startWorker(AppWithWorker.WORKER); TimeUnit.MILLISECONDS.sleep(200); manager.stop(); applicationManager.stopAll(); <BUG>DataSetManager<KeyValueTable> dataSetManager = applicationManager.getDataSet(AppWithWorker.DATASET); </BUG> KeyValueTable table = data...
DataSetManager<KeyValueTable> dataSetManager = getDataset(testSpace, AppWithWorker.DATASET);
9,052
Assert.assertEquals(AppWithWorker.STOP, Bytes.toString(table.read(AppWithWorker.STOP))); } @Category(SlowTests.class) @Test public void testAppWithServices() throws Exception { <BUG>ApplicationManager applicationManager = deployApplication(AppWithServices.class); </BUG> LOG.info("Deployed."); ServiceManager serviceMana...
ApplicationManager applicationManager = deployApplication(testSpace, AppWithServices.class);
9,053
decodedResult = new Gson().fromJson(result, String.class); Assert.assertEquals(AppWithServices.DATASET_TEST_VALUE_STOP_2, decodedResult); } @Test public void testTransactionHandlerService() throws Exception { <BUG>ApplicationManager applicationManager = deployApplication(AppWithServices.class); </BUG> LOG.info("Deploye...
Assert.assertEquals(AppWithServices.DATASET_TEST_VALUE_STOP, decodedResult); result = procedureClient.query("ping", ImmutableMap.of(AppWithServices.PROCEDURE_DATASET_KEY, AppWithServices.DATASET_TEST_KEY_STOP_2)); ApplicationManager applicationManager = deployApplication(testSpace, AppWithServices.class);
9,054
Assert.assertEquals(200, response.getResponseCode()); Assert.assertEquals(AppWithServices.DATASET_TEST_VALUE, new Gson().fromJson(response.getResponseBodyAsString(), String.class)); executorService.shutdown(); serviceManager.stop(); <BUG>serviceManager.waitForStatus(false); DataSetManager<KeyValueTable> dsManager = app...
DataSetManager<KeyValueTable> dsManager = getDataset(testSpace, AppWithServices.TRANSACTIONS_DATASET_NAME);
9,055
Assert.assertEquals(5 * 100L, totalCount); mrManager = applicationManager.startMapReduce("countFromStream"); mrManager.waitForFinish(120L, TimeUnit.SECONDS); totalCount = Long.valueOf(procedureClient.query("stream_total", Collections.<String, String>emptyMap())); Assert.assertEquals(3 * 100L, totalCount); <BUG>DataSetM...
DataSetManager<MyKeyValueTableDefinition.KeyValueTable> mydatasetManager = getDataset(testSpace, "mydataset");
9,056
Assert.assertEquals(0L, batchSinkMetrics.getException()); Assert.assertEquals(1L, genMetrics.getException()); } @Test public void testAppRedeployKeepsData() throws Exception { <BUG>ApplicationManager appManager = deployApplication(AppWithTable.class); DataSetManager<Table> myTableManager = appManager.getDataSet("my_ta...
ApplicationManager appManager = deployApplication(testSpace, AppWithTable.class); DataSetManager<Table> myTableManager = getDataset(testSpace, "my_table");
9,057
TimeUnit.SECONDS.sleep(3); Assert.assertEquals(3, flowletMetrics.getProcessed()); flowManager.setFlowletInstances("Generator", 2); flowletMetrics.waitForProcessed(4, 10, TimeUnit.SECONDS); flowManager.stop(); <BUG>DataSetManager<Table> dataSetManager = appManager.getDataSet("conf"); </BUG> Table confTable = dataSetMana...
DataSetManager<Table> dataSetManager = getDataset(testSpace, "conf");
9,058
HttpRequest request = HttpRequest.get(url).build(); HttpResponse response = HttpRequests.execute(request); Assert.assertEquals(200, response.getResponseCode()); long count = Long.parseLong(response.getResponseBodyAsString()); serviceManager.stop(); <BUG>KeyValueTable records = appManager.<KeyValueTable>getDataSet("reco...
DataSetManager<KeyValueTable> recordsManager = getDataset(testSpace, "records"); KeyValueTable records = recordsManager.get(); Assert.assertTrue(count == Bytes.toLong(records.read("PUBLIC")));
9,059
datasetManager.get().writeRecord("key", expectedRecord); datasetManager.flush(); DatasetUncheckedUpgradeApp.Record actualRecord = (DatasetUncheckedUpgradeApp.Record) datasetManager.get().getRecord("key"); Assert.assertEquals(expectedRecord, actualRecord); <BUG>applicationManager = deployApplication(CompatibleDatasetUnc...
deployApplication(testSpace, CompatibleDatasetUncheckedUpgradeApp.class); datasetManager = getDataset(testSpace, DatasetUncheckedUpgradeApp.DATASET_NAME);
9,060
datasetManager = applicationManager.getDataSet(DatasetUncheckedUpgradeApp.DATASET_NAME); </BUG> CompatibleDatasetUncheckedUpgradeApp.Record compatibleRecord = (CompatibleDatasetUncheckedUpgradeApp.Record) datasetManager.get().getRecord("key"); Assert.assertEquals(new CompatibleDatasetUncheckedUpgradeApp.Record("0AXB", ...
datasetManager.get().writeRecord("key", expectedRecord); datasetManager.flush(); DatasetUncheckedUpgradeApp.Record actualRecord = (DatasetUncheckedUpgradeApp.Record) datasetManager.get().getRecord("key"); Assert.assertEquals(expectedRecord, actualRecord); deployApplication(testSpace, CompatibleDatasetUncheckedUpgradeAp...
9,061
try { datasetManager.get().getRecord("key"); Assert.fail("Expected to throw exception here due to an incompatible Dataset upgrade."); } catch (Exception e) { } <BUG>applicationManager = deployApplication(CompatibleDatasetUncheckedUpgradeApp.class); datasetManager = applicationManager.getDataSet(DatasetUncheckedUpgrade...
deployApplication(testSpace, CompatibleDatasetUncheckedUpgradeApp.class); datasetManager = getDataset(testSpace, DatasetUncheckedUpgradeApp.DATASET_NAME);
9,062
Bundle savedInstanceState) { final View rootView = inflater.inflate(R.layout.tab_qibla, container, false); final QiblaCompassView qiblaCompassView = (QiblaCompassView)rootView.findViewById(R.id.qibla_compass); qiblaCompassView.setConstants(((TextView)rootView.findViewById(R.id.bearing_north)), getText(R.string.bearing_...
sOrientationListener = new android.hardware.SensorListener() {
9,063
templateName = service.getCompute().getTemplate(); if (templateName == null) { templateName = ""; } } <BUG><<<<<<< HEAD final String lifecycleEventContainerPollingID = adminFacade.installElastic(packedFile, currentApplicationName, serviceName, zone, props, templateName, getTimeoutInMinutes(), !disableSelfHealing); ====...
[DELETED]
9,064
final String lifecycleEventContainerPollingID = adminFacade.installElastic(packedFile, currentApplicationName, serviceName, zone, props, templateName, getTimeoutInMinutes(), !disableSelfHealing); =======</BUG> final String lifecycleEventContainerPollingID = adminFacade .installElastic(packedFile, currentApplicationName...
templateName = service.getCompute().getTemplate(); if (templateName == null) { templateName = ""; } }
9,065
String commandName, Map<String, String> paramsMap) throws CLIException; List<String> getMachines() throws CLIException; Map<String, String> uninstallApplication(String applicationName, int timeoutInMinutes) throws CLIException; <BUG>public void waitForLifecycleEvents(final String pollingID, final int timeout, String ti...
final int timeout, String timeoutMessage) throws CLIException,
9,066
package org.eclipse.ant.internal.core.ant; <BUG>import java.util.Iterator; import java.util.Vector;</BUG> import org.apache.tools.ant.BuildListener; import org.apache.tools.ant.Main; import org.apache.tools.ant.Project;
[DELETED]
9,067
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
9,068
} @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);
9,069
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);
9,070
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(
9,071
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 {
9,072
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;
9,073
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) {
9,074
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;
9,075
@NotNull String foo2(@Nullable String str) { if (str == null); return ((String)str); } <BUG>@Nullable String fram(@Nullable String str, boolean b) {</BUG> if (str != null) { return b ? str : "not null strimg"; }
String fram(@Nullable String str, boolean b) {
9,076
for (Iterator i = getErrors().iterator(); i.hasNext();) errors += (String) i.next() + "\n"; return new XMLDBException(ErrorCodes.VENDOR_ERROR, "Error validating: \n" + errors, null); } } <BUG>protected Logger LOG = Logger.getLogger(GenericSchemaService.class); private final static String INDEX_RESOURCE_NAME = ".index";...
protected final static String INDEX_COLLECTION_NAME = "/db/system/schema/"; protected final static String INDEX_RESOURCE_NAME = ".index";
9,077
public String getProperty(String arg0) throws XMLDBException { return null; } public void setProperty(String arg0, String arg1) throws XMLDBException { } <BUG>private XMLResource getIndexResource() throws XMLDBException { </BUG> XMLResource index = null; try { index = (XMLResource) getSchemasCollection().getResource(IN...
protected XMLResource testAndCreateIndexResource() throws XMLDBException {
9,078
import java.beans.PropertyDescriptor; import java.lang.reflect.Method; import java.util.Arrays; import java.util.HashSet; import java.util.Set; <BUG>import org.grails.datastore.mapping.model.PersistentProperty; import org.springframework.beans.BeanWrapper;</BUG> import org.springframework.beans.PropertyAccessorFactory;...
import org.grails.datastore.mapping.reflect.ClassPropertyFetcher; import org.springframework.beans.BeanWrapper;
9,079
import org.grails.datastore.mapping.model.IdentityMapping; import org.grails.datastore.mapping.model.PersistentEntity; import org.springframework.util.ReflectionUtils; @SuppressWarnings({"rawtypes", "unchecked"}) public class BeanEntityAccess implements EntityAccess { <BUG>private static final Set EXCLUDED_PROPERTIES =...
private static final Set EXCLUDED_PROPERTIES = ClassPropertyFetcher.EXCLUDED_PROPERTIES; protected Object entity;
9,080
import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; <BUG>import javax.persistence.Entity; import org.grails.datastore.mapping.engine.internal.MappingUtils;</BUG> import org.grails.datastore.mapping.model.ClassMapping; import org.grails.datastore.mapping...
import groovy.lang.MetaBeanProperty; import groovy.lang.MetaProperty; import org.grails.datastore.mapping.engine.internal.MappingUtils;
9,081
public class GormMappingConfigurationStrategy implements MappingConfigurationStrategy { private static final String IDENTITY_PROPERTY = IDENTITY; private static final String VERSION_PROPERTY = VERSION; public static final String MAPPED_BY_NONE = "none"; protected MappingFactory propertyFactory; <BUG>private static fina...
private static final Set EXCLUDED_PROPERTIES = ClassPropertyFetcher.EXCLUDED_PROPERTIES; private boolean canExpandMappingContext = true;
9,082
protected boolean isCollectionType(Class type) { return Collection.class.isAssignableFrom(type) || Map.class.isAssignableFrom(type); } protected boolean isExcludedProperty(String propertyName, ClassMapping classMapping, Collection transients, boolean includeIdentifiers) { IdentityMapping id = classMapping != null ? cla...
String[] identifierName = id != null && !includeIdentifiers ? id.getIdentifierName() : null;
9,083
package org.grails.datastore.mapping.model; import java.beans.PropertyDescriptor; <BUG>import java.io.Serializable; import java.math.BigDecimal;</BUG> import java.math.BigInteger; import java.net.URI; import java.net.URL;
import java.beans.IntrospectionException; import java.lang.reflect.Modifier; import java.math.BigDecimal;
9,084
import java.sql.Clob; import java.sql.Time; import java.sql.Timestamp; import java.util.*; import java.util.concurrent.ConcurrentHashMap; <BUG>import java.util.concurrent.ConcurrentLinkedQueue; import org.grails.datastore.mapping.config.Entity;</BUG> import org.grails.datastore.mapping.config.Property; import org.grail...
import groovy.lang.MetaBeanProperty; import groovy.lang.MetaMethod; import groovy.lang.MetaProperty; import org.codehaus.groovy.reflection.CachedMethod; import org.grails.datastore.mapping.config.Entity;
9,085
import java.util.*; import org.grails.datastore.mapping.config.Entity; import org.grails.datastore.mapping.core.EntityCreationException; import org.grails.datastore.mapping.core.exceptions.ConfigurationException; import org.grails.datastore.mapping.model.config.GormProperties; <BUG>import org.grails.datastore.mapping.m...
import org.grails.datastore.mapping.model.types.Identity; import org.grails.datastore.mapping.model.types.OneToMany;
9,086
this.javaClass = javaClass; this.context = context; this.isAbstract = Modifier.isAbstract(javaClass.getModifiers()); this.isMultiTenant = org.grails.datastore.mapping.reflect.ClassUtils.isMultiTenant(javaClass); decapitalizedName = Introspector.decapitalize(javaClass.getSimpleName()); <BUG>String classSpecified = Class...
String classSpecified = ClassPropertyFetcher.getStaticPropertyValue(javaClass, GormProperties.MAPPING_STRATEGY, String.class);
9,087
}) @ContextConfiguration(locations={ "classpath:/META-INF/opennms/applicationContext-dao.xml", "classpath:/META-INF/opennms/applicationContext-daemon.xml", "classpath:/META-INF/opennms/mockEventIpcManager.xml", <BUG>"classpath:/META-INF/opennms/applicationContext-setupIpLike-enabled.xml" })</BUG> @JUnitTemporaryDataba...
"classpath:/META-INF/opennms/applicationContext-setupIpLike-enabled.xml", "classpath:/META-INF/opennms/applicationContext-ackd.xml"
9,088
return m_eventSubscriptionService; } public void setEventSubscriptionService(EventSubscriptionService eventManager) { m_eventSubscriptionService = eventManager; } <BUG>public void afterPropertiesSet() throws Exception { }</BUG> public void destroy() throws Exception { } public String getName() {
m_ackService.setEventForwarder(m_eventForwarder);
9,089
for (Acknowledgment ack : acks) { processAck(ack); } } public void processAck(Acknowledgment ack) { <BUG>Log events = new Log(); boolean hasAcknowledged = false; List<Acknowledgeable> ackables = m_ackDao.findAcknowledgable(ack); for (Acknowledgeable ackable : ackables) {</BUG> ackable.acknowledge(ack.getAckTime(), ack....
EventBuilder ebuilder; for (Acknowledgeable ackable : ackables) {
9,090
package org.opennms.netmgt.ackd.readers; import java.util.ArrayList; import java.util.Arrays; <BUG>import java.util.Collection; import java.util.HashMap;</BUG> import java.util.List; import java.util.Map; import java.util.Properties;
import java.util.Date; import java.util.HashMap;
9,091
private void findAndProcessAcks() { Collection<Acknowledgment> acks; try { List<Message> msgs = readMessages(); acks = detectAcks(msgs); <BUG>m_ackService.proccessAck(acks); </BUG> } catch (JavaMailerException e) { e.printStackTrace(); }
m_ackService.processAcks(acks);
9,092
Collection<Acknowledgment> acks = null; if (msgs != null) { acks = new ArrayList<Acknowledgment>(); for (Message msg : msgs) { try { <BUG>if (hasNotifId(msg.getSubject())) { acks.add(createAcknowledgment(msg)); } } catch (MessagingException e) { }</BUG> }
Integer notifyId = detectId(msg.getSubject(), m_config.getNotifyidMatchExpression()); if (notifyId.intValue() > 0) {
9,093
import org.jetbrains.plugins.groovy.codeInspection.BaseInspectionVisitor; import org.jetbrains.plugins.groovy.codeInspection.GroovyInspectionBundle; import org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElement; import org.jetbrains.plugins.groovy.lang.psi.GroovyRecursiveElementVisitor; import org.jetbrains.plugins.gro...
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrExpression; import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrThisSuperReferenceExpression; import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrGdkMethod;
9,094
public void visitElement(GroovyPsiElement element) { if (!myMay) return; super.visitElement(element); } @Override <BUG>public void visitReferenceExpression(GrReferenceExpression referenceExpression) { if (referenceExpression.getQualifierExpression() != null) { super.visitReferenceExpression(referenceExpression); } else...
GrExpression qualifier = referenceExpression.getQualifierExpression(); if (qualifier == null || qualifier instanceof GrThisSuperReferenceExpression) {
9,095
file.setData(da); file.setAxes(axes); } catch (Exception e) { e.printStackTrace(); fail("Exception occured while writing the data/axes"); <BUG>} finally{ if(file!= null) file.close();</BUG> } ILazyDataset dataRead = null;
[DELETED]
9,096
file.close();</BUG> } ILazyDataset dataRead = null; List<ILazyDataset> axesRead = null; try { <BUG>file = persist.getPersistentFile(tmp.getAbsolutePath()); </BUG> dataRead = file.getData("data", null); axesRead = file.getAxes("X Axis", "Y Axis", null); } catch (Exception e) {
file.setData(da); file.setAxes(axes); e.printStackTrace(); fail("Exception occured while writing the data/axes"); file = persist.getPersistentFile(tmp[0].getAbsolutePath());
9,097
dataRead = file.getData("data", null); axesRead = file.getAxes("X Axis", "Y Axis", null); } catch (Exception e) { e.printStackTrace(); fail("Exception occured while reading the data/axes"); <BUG>} finally{ if(file!= null) file.close();</BUG> } assertEquals(da.getShape()[0], dataRead.getShape()[0]);
[DELETED]
9,098
file.close();</BUG> } assertEquals(da.getShape()[0], dataRead.getShape()[0]); assertEquals(da.getShape()[1], dataRead.getShape()[1]); assertEquals(axes.get(0).getName(), axesRead.get(0).getName()); <BUG>assertEquals(axes.get(1).getName(), axesRead.get(1).getName()); } catch (IOException e1) { e1.printStackTrace(); fail...
dataRead = file.getData("data", null); axesRead = file.getAxes("X Axis", "Y Axis", null); } catch (Exception e) { e.printStackTrace(); fail("Exception occured while reading the data/axes"); after(tmp[0], file);
9,099
.filter(notNull(COLUMN_PROCESS_ID)) .column(COLUMN_PROCESS_INSTANCE_ID, COUNT, "Processes") .format(COLUMN_PROCESS_INSTANCE_ID, i18n.processes(), NO_DECIMALS) .width(METRIC_WIDTH).height(METRIC_HEIGHT) .margins(0, 0, 0, 0) <BUG>.backgroundColor(BG_COLOR) .filterOn(false, true, true)</BUG> .refreshOn() .buildSettings()...
.backgroundColor(METRIC_BG) .htmlTemplate(METRIC_HTML) .jsTemplate(METRIC_JS) .filterOn(false, true, true)
9,100
.filter(COLUMN_PROCESS_STATUS, equalsTo(1)) .column(COLUMN_PROCESS_INSTANCE_ID, COUNT, "Processes") .format(COLUMN_PROCESS_INSTANCE_ID, i18n.activeProcesses(), NO_DECIMALS) .width(METRIC_WIDTH).height(METRIC_HEIGHT) .margins(0, 0, 0, 0) <BUG>.backgroundColor(BG_COLOR) .filterOn(false, true, true)</BUG> .refreshOn() .b...
.backgroundColor(METRIC_BG) .htmlTemplate(METRIC_HTML) .jsTemplate(METRIC_JS) .filterOn(false, true, true)