id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
34,901 | sink.section1();
sink.sectionTitle1();
sink.text( getI18nString( locale, "title" ) );
sink.sectionTitle1_();
Map dependencyMap = getDependencyMap();
<BUG>generateLegend( locale, sink );
generateStats( locale, sink, dependencyMap );
generateConvergence( locale, sink, dependencyMap );
sink.section1_();</BUG>
sink.body_()... | sink.lineBreak();
sink.section1_();
|
34,902 | Iterator it = artifactMap.keySet().iterator();
while ( it.hasNext() )
{
String version = (String) it.next();
sink.tableRow();
<BUG>sink.tableCell();
sink.text( version );</BUG>
sink.tableCell_();
sink.tableCell();
generateVersionDetails( sink, artifactMap, version );
| sink.tableCell( String.valueOf( cellWidth ) + "px" );
sink.text( version );
|
34,903 | sink.tableCell();
sink.text( getI18nString( locale, "legend.shared" ) );
sink.tableCell_();
sink.tableRow_();
sink.tableRow();
<BUG>sink.tableCell();
iconError( sink );</BUG>
sink.tableCell_();
sink.tableCell();
sink.text( getI18nString( locale, "legend.different" ) );
| sink.tableCell( "15px" ); // according /images/icon_error_sml.gif
iconError( sink );
|
34,904 | sink.tableCaption();
sink.text( getI18nString( locale, "stats.caption" ) );
sink.tableCaption_();</BUG>
sink.tableRow();
<BUG>sink.tableHeaderCell();
sink.text( getI18nString( locale, "stats.subprojects" ) + ":" );
sink.tableHeaderCell_();</BUG>
sink.tableCell();
sink.text( String.valueOf( reactorProjects.size() ) );
s... | sink.bold();
sink.bold_();
sink.tableCaption_();
sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.subprojects" ) );
sink.tableHeaderCell_();
|
34,905 | sink.tableCell();
sink.text( String.valueOf( reactorProjects.size() ) );
sink.tableCell_();
sink.tableRow_();
sink.tableRow();
<BUG>sink.tableHeaderCell();
sink.text( getI18nString( locale, "stats.dependencies" ) + ":" );
sink.tableHeaderCell_();</BUG>
sink.tableCell();
sink.text( String.valueOf( depCount ) );
| sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.dependencies" ) );
sink.tableHeaderCell_();
|
34,906 | sink.text( String.valueOf( convergence ) + "%" );
sink.bold_();
sink.tableCell_();
sink.tableRow_();
sink.tableRow();
<BUG>sink.tableHeaderCell();
sink.text( getI18nString( locale, "stats.readyrelease" ) + ":" );
sink.tableHeaderCell_();</BUG>
sink.tableCell();
if ( convergence >= PERCENTAGE && snapshotCount <= 0 )
| sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.readyrelease" ) );
sink.tableHeaderCell_();
|
34,907 | {
ReverseDependencyLink p1 = (ReverseDependencyLink) o1;
ReverseDependencyLink p2 = (ReverseDependencyLink) o2;
return p1.getProject().getId().compareTo( p2.getProject().getId() );
}
<BUG>else
{</BUG>
return 0;
}
}
| iconError( sink );
|
34,908 | private LocalBroadcastManager mLocalBroadcastManager;
private String mActiveDownloadUrlString;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
<BUG>setContentView(R.layout.activity_app_details2);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);</BUG>
toolbar.set... | setContentView(R.layout.app_details2);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
34,909 | .inflate(R.layout.app_details2_screenshots, parent, false);
return new ScreenShotsViewHolder(view);
} else if (viewType == VIEWTYPE_WHATS_NEW) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.app_details2_whatsnew, parent, false);
<BUG>return new WhatsNewViewHolder(view);
} else if (viewType == ... | } else if (viewType == VIEWTYPE_DONATE) {
.inflate(R.layout.app_details2_donate, parent, false);
return new DonateViewHolder(view);
} else if (viewType == VIEWTYPE_LINKS) {
|
34,910 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
34,911 | }
@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);
|
34,912 | 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);
|
34,913 | 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(
|
34,914 | 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 {
|
34,915 | 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;
|
34,916 | 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) {
|
34,917 | 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;
|
34,918 | }
public void l2gateway_collection_get_test() {
String url = base + "/l2-gateways?limit=5&name=gateway1";
ITNeutronE2E.test_fetch(url, "Firewall Collection GET failed");
}
<BUG>public void singleton_l2gateway_create_test() {
</BUG>
String url = base + "/l2-gateways";
String content = " { \"l2_gateway\": { \"name\": \"g... | public String singleton_l2gateway_create_test() {
|
34,919 | String url = base + "/l2gateway-connections/5227c228-6bba-4bbe-bdb8-6942768ff0e1";
ITNeutronE2E.test_delete(url, "L2 Gateway Connection with No PortId - Delete Failed");
}
public static void runTests(String base) {
NeutronL2GatewayConnectionTests l2gateway_connection_tester = new NeutronL2GatewayConnectionTests(base);
... | ITNeutronE2E.test_fetch(url, true, "L2 Gateway Connection with No PortId - Element Get Failed");
public void l2gateway_connection_delete_without_port_test() {
String createJsonString = l2gateway_connection_tester.singleton_l2gateway_connection_create_test();
l2gateway_connection_tester.singleton_l2gateway_connection_ge... |
34,920 | result.setID(l2gatewayConnection.getKey().getUuid().getValue());
}
if (l2gatewayConnection.getL2gatewayId().getValue() != null){
result.setL2gatewayID(String.valueOf(l2gatewayConnection.getL2gatewayId().getValue()));
}
<BUG>if (l2gatewayConnection.getTenantId().getValue() != null){
result.setTenantID(String.valueOf(l2g... | if (l2gatewayConnection.getTenantId() != null){
result.setTenantID(l2gatewayConnection.getTenantId());
|
34,921 | result.setID(l2gateway.getUuid().getValue());
}
if (l2gateway.getL2gatewayName() != null){
result.setL2gatewayName(String.valueOf(l2gateway.getL2gatewayName()));
}
<BUG>if (l2gateway.getTenantId().getValue() != null){
result.setTenantID(String.valueOf(l2gateway.getTenantId().getValue()));
}</BUG>
if (l2gateway.getDevic... | if (l2gateway.getUuid() != null){
if (l2gateway.getTenantId() != null){
result.setTenantID(l2gateway.getTenantId());
|
34,922 | }
}
});
}
} else {
<BUG>if (n <= m) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {</BUG>
a[i][j] = operator.applyAsBoolean(a[i][j]);
}
| public boolean[] row(final int rowIndex) {
N.checkArgument(rowIndex >= 0 && rowIndex < n, "Invalid row Index: %s", rowIndex);
return a[rowIndex];
|
34,923 | }
}
});
}
} else {
<BUG>if (n <= m) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {</BUG>
result[i][j] = zipFunction.apply(a[i][j], b[i][j]);
}
| public boolean get(final int i, final int j) {
return a[i][j];
|
34,924 | }
}
});
}
} else {
<BUG>if (n <= m) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {</BUG>
result[i][j] = zipFunction.apply(a[i][j], b[i][j], c[i][j]);
}
| return new BooleanMatrix(c);
|
34,925 | }
public AsyncExecutor(int maxConcurrentThreadNumber, long keepAliveTime, TimeUnit unit) {
this.maxConcurrentThreadNumber = maxConcurrentThreadNumber;
this.keepAliveTime = keepAliveTime;
this.unit = unit;
<BUG>}
public AsyncExecutor(final ExecutorService executorService) {
this(8, 300, TimeUnit.SECONDS);
this.executorS... | [DELETED] |
34,926 | results.add(execute(cmd));
}
return results;
}
public <T> CompletableFuture<T> execute(final Callable<T> command) {
<BUG>final CompletableFuture<T> future = new CompletableFuture<T>(this, command);
getExecutorService().execute(future);</BUG>
return future;
}
public <T> List<CompletableFuture<T>> execute(final Callable<... | final CompletableFuture<T> future = new CompletableFuture<>(this, command);
getExecutorService().execute(future);
|
34,927 | package org.springframework.samples.petclinic.owners.pets;
import org.springframework.beans.factory.annotation.Autowired;
<BUG>import org.springframework.samples.petclinic.util.ResponseContext;
</BUG>
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import... | import org.springframework.samples.petclinic.util.ExternalContext;
|
34,928 | @RequestMapping(value="/edit", method=RequestMethod.GET)
public Pet getEditForm(Long owner, String pet) {
return repository.getPet(owner, pet);
}
@RequestMapping(method = RequestMethod.PUT)
<BUG>public void put(Pet pet, ResponseContext response) {
</BUG>
repository.savePet(pet);
response.redirect(pet.getName());
}
| public void put(Pet pet, ExternalContext response) {
|
34,929 | @RequestMapping(value="/new", method = RequestMethod.GET)
public Owner getNewForm() {
return new Owner();
}
@RequestMapping(method = RequestMethod.POST)
<BUG>public void post(Owner owner, ResponseContext response) {
repository.saveOwner(owner);
response.redirect(owner.getName());
}</BUG>
}
| [DELETED] |
34,930 | public class StubOwnerRepository implements OwnerRepository {
public Collection<Owner> findOwnersByLastName(String lastName) {
return null;
}
public Owner getOwner(Long id) {
<BUG>return null;
}
public void saveOwner(Owner owner) {
}</BUG>
}
| [DELETED] |
34,931 | package org.springframework.samples.petclinic.owners;
import org.springframework.beans.factory.annotation.Autowired;
<BUG>import org.springframework.samples.petclinic.util.ResponseContext;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;</BUG>
import org.... | import org.springframework.samples.petclinic.util.ExternalContext;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
|
34,932 | final SeafRepo repo = mActivity.getDataManager().getCachedRepoByID(repoId);
if (repo == null) {
ToastUtils.show(mActivity, getString(R.string.repo_not_found));
return;
}
<BUG>handleEncryptedRepo(repo, new TaskDialog.TaskDialogListener() {
</BUG>
@Override
public void onTaskSuccess() {
LoadHistoryChangesTask task = new ... | final boolean continueProcess = mActivity.handleEncryptedRepo(repo, new TaskDialog.TaskDialogListener() {
|
34,933 | package com.easytoolsoft.easyreport.web.controller.common;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping(value = "/error")
<BUG>public class ErrorController extends AbstractController {
@RequestMapping(value = {"/404"})</BUG>... | public class ErrorController {
@RequestMapping(value = {"/404"})
|
34,934 | EditorCell_Collection result = jetbrains.mps.nodeEditor.cells.EditorCell_Collection.createIndent2(editorContext, node);
result.setBig(true);
result.getStyle().putAll(StyleRegistry.getInstance().getStyle("LINE_COMMENT"), 1);
result.addEditorCell(createCommentConstantCell(editorContext, node, true));
result.addEditorCell... | result.setCellId("main_comment_collection");
return result;
|
34,935 | }
private EditorCell_Constant createCommentConstantCell(jetbrains.mps.openapi.editor.EditorContext editorContext, SNode node, boolean left) {
EditorCell_Constant cell = new EditorCell_Constant(editorContext, node, left ? "/*" : "*/", false);
StyleImpl style = new StyleImpl();
style.set(left ? StyleAttributes.PUNCTUATIO... | cell.setCellId(left ? "left_comment_constant" : "right_comment_constant");
return cell;
|
34,936 | import org.jetbrains.annotations.NotNull;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.openapi.editor.EditorContext;
import jetbrains.mps.openapi.editor.selection.Selection;
import jetbrains.mps.openapi.editor.selection.SingularSelection;
<BUG>import jetbrains.mps.opena... | import jetbrains.mps.openapi.editor.cells.EditorCell_Label;
import jetbrains.mps.nodeEditor.cells.CellFinderUtil;
|
34,937 | import jetbrains.mps.editor.runtime.cells.AbstractCellAction;
import org.jetbrains.mps.openapi.model.SNode;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.openapi.editor.EditorContext;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
<BUG>import jetbrains.mps.openapi.editor.cell... | import jetbrains.mps.openapi.editor.cells.EditorCell_Label;
import jetbrains.mps.nodeEditor.cells.CellFinderUtil;
|
34,938 | @XmlAttribute(required = false)
private String message;
public RollbackDefinition() {
}
public RollbackDefinition(String message) {
<BUG>this.message = message;
}</BUG>
@Override
public String getShortName() {
return "rollback";
| public String getMessage() {
return message;
|
34,939 | } else {
buffer.append("()");
ExpressionRenderer.render(buffer, expression);
}
} else if (expNode instanceof FilterDefinition) {
<BUG>if (expression.getPredicate() != null) {
PredicateRenderer.renderPredicate(buffer, expression.getPredicate());
} else if (expression.getLanguage() != null) {</BUG>
buffer.append("()");
E... | buffer.append("(");
PredicateRenderer.render(buffer, expression.getPredicate());
buffer.append(")");
} else if (expression.getLanguage() != null) {
|
34,940 | public String toString() {
return "InterceptSendToEndpoint[" + uri + " -> " + getOutputs() + "]";
}
@Override
public String getShortName() {
<BUG>return "interceptEndpoint";
</BUG>
}
@Override
public String getLabel() {
| return "interceptSendToEndpoint";
|
34,941 | <BUG>package org.apache.camel.web.util;
import org.apache.camel.model.ProcessorDefinition;
public class ChoiceDefinitionRenderer {
public static void render(StringBuilder buffer, ProcessorDefinition processor) {
}</BUG>
}
| import org.apache.camel.model.ChoiceDefinition;
import org.apache.camel.model.OtherwiseDefinition;
import org.apache.camel.model.WhenDefinition;
ChoiceDefinition choice = (ChoiceDefinition)processor;
buffer.append(".").append(choice.getShortName()).append("()");
for (WhenDefinition when : choice.getWhenClauses()) {
Pro... |
34,942 | this(correlationExpression, new RoundRobinLoadBalancer());
}
public StickyLoadBalancer(Expression correlationExpression, QueueLoadBalancer loadBalancer) {
super();
this.correlationExpression = correlationExpression;
<BUG>this.loadBalancer = loadBalancer;
}</BUG>
protected synchronized Processor chooseProcessor(List<Pro... | public Expression getCorrelationExpression() {
return correlationExpression;
|
34,943 | }
}
});
}
} else {
<BUG>if (n <= m) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {</BUG>
a[i][j] = operator.applyAsBoolean(a[i][j]);
}
| public boolean[] row(final int rowIndex) {
N.checkArgument(rowIndex >= 0 && rowIndex < n, "Invalid row Index: %s", rowIndex);
return a[rowIndex];
|
34,944 | }
}
});
}
} else {
<BUG>if (n <= m) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {</BUG>
result[i][j] = zipFunction.apply(a[i][j], b[i][j]);
}
| public boolean get(final int i, final int j) {
return a[i][j];
|
34,945 | }
}
});
}
} else {
<BUG>if (n <= m) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {</BUG>
result[i][j] = zipFunction.apply(a[i][j], b[i][j], c[i][j]);
}
| return new BooleanMatrix(c);
|
34,946 | }
public AsyncExecutor(int maxConcurrentThreadNumber, long keepAliveTime, TimeUnit unit) {
this.maxConcurrentThreadNumber = maxConcurrentThreadNumber;
this.keepAliveTime = keepAliveTime;
this.unit = unit;
<BUG>}
public AsyncExecutor(final ExecutorService executorService) {
this(8, 300, TimeUnit.SECONDS);
this.executorS... | [DELETED] |
34,947 | results.add(execute(cmd));
}
return results;
}
public <T> CompletableFuture<T> execute(final Callable<T> command) {
<BUG>final CompletableFuture<T> future = new CompletableFuture<T>(this, command);
getExecutorService().execute(future);</BUG>
return future;
}
public <T> List<CompletableFuture<T>> execute(final Callable<... | final CompletableFuture<T> future = new CompletableFuture<>(this, command);
getExecutorService().execute(future);
|
34,948 | package org.mule.transport.email.config;
import org.mule.api.MuleException;
import org.mule.transport.email.ImapConnector;
<BUG>import org.mule.transport.email.ImapsConnector;
public class ImapNamespaceHandlerTestCase extends AbstractEmailNamespaceHandlerTestCase</BUG>
{
protected String getConfigResources()
{
| import javax.mail.Flags;
public class ImapNamespaceHandlerTestCase extends AbstractEmailNamespaceHandlerTestCase
|
34,949 | assertEquals("newBackup", c.getBackupFolder());
assertEquals(1234, c.getCheckFrequency());
assertEquals("newMailbox", c.getMailboxFolder());
assertEquals(false, c.isDeleteReadMessages());
assertTrue(c.isConnected());
<BUG>assertTrue(c.isStarted());
}</BUG>
public void testSecureConfig() throws Exception
{
ImapsConnecto... | assertEquals(Flags.Flag.SEEN, c.getDefaultProcessMessageAction());
}
|
34,950 | assertTrue(c.getClientKeyStore().endsWith("/empty.jks"));
assertEquals("password", c.getClientKeyStorePassword());
assertTrue(c.getTrustStore().endsWith("/empty.jks"));
assertEquals("password", c.getTrustStorePassword());
assertTrue(c.isConnected());
<BUG>assertTrue(c.isStarted());
}</BUG>
public void testEndpoint() th... | assertNull(c.getDefaultProcessMessageAction());
}
|
34,951 | package org.mule.transport.email.config;
<BUG>import org.mule.config.spring.handlers.AbstractMuleNamespaceHandler;
import org.mule.endpoint.URIBuilder;</BUG>
import org.mule.transport.email.Pop3Connector;
public class Pop3NamespaceHandler extends AbstractMuleNamespaceHandler
{
| import org.mule.config.spring.parsers.MuleDefinitionParserConfiguration;
import org.mule.endpoint.URIBuilder;
|
34,952 | package org.mule.transport.email.config;
import org.mule.api.MuleException;
import org.mule.transport.email.Pop3Connector;
<BUG>import org.mule.transport.email.Pop3sConnector;
public class Pop3NamespaceHandlerTestCase extends AbstractEmailNamespaceHandlerTestCase</BUG>
{
protected String getConfigResources()
{
| import javax.mail.Flags;
public class Pop3NamespaceHandlerTestCase extends AbstractEmailNamespaceHandlerTestCase
|
34,953 | assertEquals("newBackup", c.getBackupFolder());
assertEquals(1234, c.getCheckFrequency());
assertEquals("newMailbox", c.getMailboxFolder());
assertEquals(false, c.isDeleteReadMessages());
assertTrue(c.isConnected());
<BUG>assertTrue(c.isStarted());
}</BUG>
public void testSecureConfig() throws Exception
{
Pop3sConnecto... | assertEquals(Flags.Flag.SEEN, c.getDefaultProcessMessageAction());
}
|
34,954 | assertTrue(c.getClientKeyStore().endsWith("/empty.jks"));
assertEquals("password", c.getClientKeyStorePassword());
assertTrue(c.getTrustStore().endsWith("/empty.jks"));
assertEquals("password", c.getTrustStorePassword());
assertTrue(c.isConnected());
<BUG>assertTrue(c.isStarted());
}</BUG>
public void testEndpoint() th... | assertEquals(Flags.Flag.ANSWERED, c.getDefaultProcessMessageAction());
}
|
34,955 | package org.mule.transport.email.config;
<BUG>import org.mule.config.spring.handlers.AbstractMuleNamespaceHandler;
import org.mule.endpoint.URIBuilder;</BUG>
import org.mule.transport.email.ImapConnector;
public class ImapNamespaceHandler extends AbstractMuleNamespaceHandler
{
| import org.mule.config.spring.parsers.MuleDefinitionParserConfiguration;
import org.mule.endpoint.URIBuilder;
|
34,956 | if (castConnector().isDeleteReadMessages())
{
messages[i].setFlag(Flags.Flag.DELETED, true);
}
else
<BUG>{
messages[i].setFlag(Flags.Flag.SEEN, true);
}</BUG>
routeMessage(message);
| [DELETED] |
34,957 | package org.mule.transport.email.config;
<BUG>import org.mule.config.spring.handlers.AbstractMuleNamespaceHandler;
import org.mule.config.spring.parsers.specific.tls.ClientKeyStoreDefinitionParser;</BUG>
import org.mule.config.spring.parsers.specific.tls.TrustStoreDefinitionParser;
import org.mule.endpoint.URIBuilder;
... | import org.mule.config.spring.parsers.MuleDefinitionParserConfiguration;
import org.mule.config.spring.parsers.specific.tls.ClientKeyStoreDefinitionParser;
|
34,958 | package org.mule.transport.email;
import org.mule.api.MuleContext;
import org.mule.api.construct.FlowConstruct;
import org.mule.api.endpoint.InboundEndpoint;
<BUG>import org.mule.api.transport.MessageReceiver;
public abstract class AbstractRetrieveMailConnector extends AbstractMailConnector</BUG>
{
public static final ... | import javax.mail.Flags;
public abstract class AbstractRetrieveMailConnector extends AbstractMailConnector
|
34,959 | public static final int DEFAULT_CHECK_FREQUENCY = 60000;
private volatile long checkFrequency = DEFAULT_CHECK_FREQUENCY;
private volatile String backupFolder = null;
private volatile String moveToFolder = null;
private boolean backupEnabled = false;
<BUG>private volatile boolean deleteReadMessages = true;
protected Abs... | private Flags.Flag defaultProcessMessageAction = Flags.Flag.SEEN;
protected AbstractRetrieveMailConnector(int defaultPort, MuleContext context)
|
34,960 | return valueMap.rewrite(key);
}
}
public static class MapValueMap implements ValueMap
{
<BUG>private Map map;
</BUG>
public MapValueMap(Map map)
{
this.map = map;
| protected Map map;
|
34,961 | package org.mule.transport.email.config;
<BUG>import org.mule.config.spring.handlers.AbstractMuleNamespaceHandler;
import org.mule.config.spring.parsers.specific.tls.ClientKeyStoreDefinitionParser;</BUG>
import org.mule.config.spring.parsers.specific.tls.TrustStoreDefinitionParser;
import org.mule.endpoint.URIBuilder;
... | import org.mule.config.spring.parsers.MuleDefinitionParserConfiguration;
import org.mule.config.spring.parsers.specific.tls.ClientKeyStoreDefinitionParser;
|
34,962 | return extra.translateName(delegate.translateName(oldName));
}
public Object translateValue(String name, String value)
{
Object intermediate = delegate.translateValue(name, value);
<BUG>if (intermediate.equals(value))
{</BUG>
return extra.translateValue(name, value);
}
else
| if (intermediate != null && intermediate.equals(value))
|
34,963 | shouldUseBundledJdbcInfo = url.toLowerCase().matches(".*(\\?|\\?.*&)" + PostgresqlPlugIn.QUERY_STRING_USE_BUNDLED_JDBC_INFO.toLowerCase() + "=(true|yes)(\\&|$)");
}
return shouldUseBundledJdbcInfo;
}
@Override
<BUG>public NSDictionary jdbcInfo() {
NSDictionary jdbcInfo;
if(shouldUseBundledJdbcInfo()) {</BUG>
if(NSLog.... | public NSDictionary<String, Object> jdbcInfo() {
NSDictionary<String, Object> jdbcInfo;
if(shouldUseBundledJdbcInfo()) {
|
34,964 | InputStream jdbcInfoStream = NSBundle.bundleForClass(getClass()).inputStreamForResourcePath("JDBCInfo.plist");
if (jdbcInfoStream == null) {
throw new IllegalStateException("Unable to find 'JDBCInfo.plist' in this plugin jar.");
}
try {
<BUG>jdbcInfo = (NSDictionary) NSPropertyListSerialization.propertyListFromData(new... | jdbcInfo = (NSDictionary<String, Object>) NSPropertyListSerialization.propertyListFromData(new NSData(jdbcInfoStream, 2048), "US-ASCII");
|
34,965 | package com.projecttango.examples.java.augmentedreality;
import com.google.atap.tangoservice.Tango;
import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoCameraIntrinsics;
import com.google.atap.tangoservice.TangoConfig;
<BUG>import com.google.atap.tangoservice.TangoC... | import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
|
34,966 | super.onResume();
if (!mIsConnected) {
mTango = new Tango(AugmentedRealityActivity.this, new Runnable() {
@Override
public void run() {
<BUG>try {
connectTango();</BUG>
setupRenderer();
mIsConnected = true;
} catch (TangoOutOfDateException e) {
| TangoSupport.initialize();
connectTango();
|
34,967 | if (lastFramePose.statusCode == TangoPoseData.POSE_VALID) {
mRenderer.updateRenderCameraPose(lastFramePose, mExtrinsics);
mCameraPoseTimestamp = lastFramePose.timestamp;</BUG>
} else {
<BUG>Log.w(TAG, "Can't get device pose at time: " + mRgbTimestampGlThread);
}</BUG>
}
}
}
@Override
| mRenderer.updateRenderCameraPose(lastFramePose);
mCameraPoseTimestamp = lastFramePose.timestamp;
Log.w(TAG, "Can't get device pose at time: " +
|
34,968 | import org.rajawali3d.materials.Material;
import org.rajawali3d.materials.methods.DiffuseMethod;
import org.rajawali3d.materials.textures.ATexture;
import org.rajawali3d.materials.textures.StreamingTexture;
import org.rajawali3d.materials.textures.Texture;
<BUG>import org.rajawali3d.math.Matrix4;
import org.rajawali3d.... | import org.rajawali3d.math.Quaternion;
import org.rajawali3d.math.vector.Vector3;
|
34,969 | translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE);
translationMoon.setTransformable3D(moon);
getCurrentScene().registerAnimation(translationMoon);
translationMoon.play();
}
<BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) {
Pose cameraPose = ScenePoseCalculator.t... | public void updateRenderCameraPose(TangoPoseData cameraPose) {
float[] rotation = cameraPose.getRotationAsFloats();
float[] translation = cameraPose.getTranslationAsFloats();
Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]);
getCurrentCamera().setRotation(quaternion.conjugate()... |
34,970 | package com.projecttango.examples.java.helloareadescription;
import com.google.atap.tangoservice.Tango;
<BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoConfig;</BUG>
import com.google.atap.tangoservice.TangoCoordinateFramePair;
import com.google.atap.tangos... | import com.google.atap.tangoservice.TangoAreaDescriptionMetaData;
import com.google.atap.tangoservice.TangoConfig;
|
34,971 | RetransmitCommand retransmit_command = null; // called to request XMIT of msg
final ConcurrentMap<Long,Message> msgs=new ConcurrentHashMap<Long,Message>();
Interval interval=new StaticInterval(400,800,1200,1600);
final Retransmitter retransmitter;
static final Log ... | long lowest=Global.DEFAULT_FIRST_UNICAST_SEQNO; // lowest seqno, used by ack()
|
34,972 | public static final String UUID_CACHE_MAX_AGE="jgroups.uuid_cache.max_age";
public static final String TIMER_NUM_THREADS="jgroups.timer.num_threads";
public static final String MUX_ENABLED="jgroups.mux.enabled";
public static final String MUX_MIN_THREADS="jgroups.mux.min_threads";
public static final String MUX_MAX_THR... | public static final long DEFAULT_FIRST_UNICAST_SEQNO=1;
public static final String SINGLETON_NAME="singleton_name";
|
34,973 | import org.jgroups.Message;
import org.jgroups.stack.AckSenderWindow;
import org.jgroups.stack.StaticInterval;
import org.jgroups.util.Util;
import org.jgroups.util.TimeScheduler;
<BUG>import org.testng.annotations.Test;
import java.util.Map;</BUG>
import java.util.concurrent.ConcurrentHashMap;
@Test(groups=Global.FUNC... | import org.testng.annotations.BeforeMethod;
import org.testng.annotations.AfterMethod;
import java.util.Map;
|
34,974 | System.out.println("win = " + win);
assert win.size() == 1;
win.ack(44);
assert win.size() == 0;
}
<BUG>finally {
win.reset();
timer.stop();
}
}</BUG>
@Test(groups=Global.FUNCTIONAL)
| assert win.size() == 5;
win.ack(1);
assert win.size() == 4;
win.ack(4);
|
34,975 | package org.sonar.server.ui.ws;
<BUG>import com.google.common.base.Charsets;
import com.google.common.collect.Lists;</BUG>
import org.sonar.api.ServerComponent;
import org.sonar.api.i18n.I18n;
import org.sonar.api.resources.Qualifiers;
| import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
import com.google.common.collect.Lists;
|
34,976 | private final ResourceTypes resourceTypes;
public ComponentConfigurationPages(I18n i18n, ResourceTypes resourceTypes) {
this.i18n = i18n;
this.resourceTypes = resourceTypes;
}
<BUG>List<ConfigPage> getConfigPages(ComponentDto component, UserSession userSession) {
</BUG>
boolean isAdmin = userSession.hasProjectPermissio... | Collection<ConfigPage> getConfigPages(ComponentDto component, UserSession userSession) {
|
34,977 | String.format("/action_plans/index?id=%s", componentKey),
i18n.message(locale, "action_plans.page", null)));
configPages.add(new ConfigPage(
isAdmin && isProject,
String.format("/project/links?id=%s", componentKey),
<BUG>i18n.message(locale, "action_plans.page", null)));
</BUG>
configPages.add(new ConfigPage(
component... | i18n.message(locale, "project_links.page", null)));
|
34,978 | private final String name;
ConfigPage(boolean visible, String url, String name) {
this.visible = visible;
this.url = url;
this.name = name;
<BUG>}
void write(JsonWriter json) {
if (visible) {
json.beginObject()
.prop("url", url)
.prop("name", name)
.endObject();</BUG>
}
| [DELETED] |
34,979 | });
}
public void insert(DbSession session, MeasureDto measureDto) {
mapper(session).insert(measureDto);
}
<BUG>public List<String> selectMetricKeysForSnapshot(DbSession session, Long snapshotId) {
</BUG>
return mapper(session).selectMetricKeysForSnapshot(snapshotId);
}
private MeasureMapper mapper(DbSession session) {... | public List<String> selectMetricKeysForSnapshot(DbSession session, long snapshotId) {
|
34,980 | import org.sonar.core.component.ComponentDto;
import org.sonar.server.component.ComponentTesting;
import org.sonar.server.ui.ws.ComponentConfigurationPages.ConfigPage;
import org.sonar.server.user.MockUserSession;
import org.sonar.server.user.UserSession;
<BUG>import java.util.List;
</BUG>
import java.util.Locale;
impo... | import java.util.Collection;
|
34,981 | public void pages_for_module() throws Exception {
String uuid = "abcd";
ComponentDto project = ComponentTesting.newProjectDto(uuid);
ComponentDto module = ComponentTesting.newModuleDto(project);
UserSession userSession = MockUserSession.set().setLogin("obiwan").addProjectUuidPermissions(UserRole.ADMIN, uuid);
<BUG>List... | Collection<ConfigPage> pages = new ComponentConfigurationPages(i18n, resourceTypes).getConfigPages(module, userSession);
assertThat(pages).extracting("name").containsExactly("manual_measures.page");
|
34,982 | private void writeConfiguration(JsonWriter json, ComponentDto component, UserSession userSession) {
boolean isAdmin = userSession.hasProjectPermissionByUuid(UserRole.ADMIN, component.projectUuid());
Locale locale = userSession.locale();
json.name("configuration").beginArray();
for (ConfigPage page : projectConfiguratio... | json.beginObject()
.prop("url", page.url())
.prop("name", page.name())
.endObject();
}
|
34,983 | package org.glowroot.agent.config;
import com.google.common.collect.ImmutableList;
<BUG>import org.immutables.value.Value;
import org.glowroot.wire.api.model.AgentConfigOuterClass.AgentConfig;</BUG>
@Value.Immutable
public abstract class UiConfig {
@Value.Default
| import org.glowroot.common.config.ConfigDefaults;
import org.glowroot.wire.api.model.AgentConfigOuterClass.AgentConfig;
|
34,984 | class RepoAdminImpl implements RepoAdmin {
private final DataSource dataSource;
private final List<CappedDatabase> rollupCappedDatabases;
private final CappedDatabase traceCappedDatabase;
private final ConfigRepository configRepository;
<BUG>private final AgentDao agentDao;
</BUG>
private final GaugeValueDao gaugeValue... | private final EnvironmentDao agentDao;
|
34,985 | private final TransactionTypeDao transactionTypeDao;
private final FullQueryTextDao fullQueryTextDao;
private final TraceAttributeNameDao traceAttributeNameDao;
RepoAdminImpl(DataSource dataSource, List<CappedDatabase> rollupCappedDatabases,
CappedDatabase traceCappedDatabase, ConfigRepository configRepository,
<BUG>Ag... | EnvironmentDao agentDao, GaugeValueDao gaugeValueDao, GaugeNameDao gaugeNameDao,
|
34,986 | this.fullQueryTextDao = fullQueryTextDao;
this.traceAttributeNameDao = traceAttributeNameDao;
}
@Override
public void deleteAllData() throws Exception {
<BUG>Environment environment = agentDao.readEnvironment("");
dataSource.deleteAll();</BUG>
agentDao.reinitAfterDeletingDatabase();
gaugeValueDao.reinitAfterDeletingDat... | Environment environment = agentDao.read("");
dataSource.deleteAll();
|
34,987 | public class SimpleRepoModule {
private static final long SNAPSHOT_REAPER_PERIOD_MINUTES = 5;
private final DataSource dataSource;
private final ImmutableList<CappedDatabase> rollupCappedDatabases;
private final CappedDatabase traceCappedDatabase;
<BUG>private final AgentDao agentDao;
private final TransactionTypeDao t... | private final EnvironmentDao environmentDao;
private final TransactionTypeDao transactionTypeDao;
|
34,988 | rollupCappedDatabases.add(new CappedDatabase(file, sizeKb, ticker));
}
this.rollupCappedDatabases = ImmutableList.copyOf(rollupCappedDatabases);
traceCappedDatabase = new CappedDatabase(new File(dataDir, "trace-detail.capped.db"),
storageConfig.traceCappedDatabaseSizeMb() * 1024, ticker);
<BUG>agentDao = new AgentDao(d... | environmentDao = new EnvironmentDao(dataSource);
|
34,989 | traceDao = new TraceDao(dataSource, traceCappedDatabase, transactionTypeDao,
fullQueryTextDao, traceAttributeNameDao);
GaugeNameDao gaugeNameDao = new GaugeNameDao(dataSource);
gaugeValueDao = new GaugeValueDao(dataSource, gaugeNameDao, clock);
repoAdmin = new RepoAdminImpl(dataSource, rollupCappedDatabases, traceCappe... | configRepository, environmentDao, gaugeValueDao, gaugeNameDao, transactionTypeDao,
|
34,990 | new TraceCappedDatabaseStats(traceCappedDatabase),
"org.glowroot:type=TraceCappedDatabase");
platformMBeanServerLifecycle.lazyRegisterMBean(new H2DatabaseStats(dataSource),
"org.glowroot:type=H2Database");
}
<BUG>public AgentDao getAgentDao() {
return agentDao;
</BUG>
}
public TransactionTypeRepository getTransactionTy... | public EnvironmentDao getEnvironmentDao() {
return environmentDao;
|
34,991 | package org.glowroot.agent.embedded.init;
import java.io.Closeable;
import java.io.File;
<BUG>import java.lang.instrument.Instrumentation;
import java.util.Map;</BUG>
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
| import java.util.List;
import java.util.Map;
|
34,992 | import java.util.concurrent.ScheduledExecutorService;
import javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Stopwatch;
import com.google.common.base.Supplier;
<BUG>import com.google.common.base.Ticker;
import org.checkerframework.checker.nullness.qual.MonotonicNonNul... | import com.google.common.collect.ImmutableList;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
34,993 | import org.glowroot.agent.init.EnvironmentCreator;
import org.glowroot.agent.init.GlowrootThinAgentInit;
import org.glowroot.agent.init.JRebelWorkaround;
import org.glowroot.agent.util.LazyPlatformMBeanServer;
import org.glowroot.common.live.LiveAggregateRepository.LiveAggregateRepositoryNop;
<BUG>import org.glowroot.c... | import org.glowroot.common.repo.AgentRepository;
import org.glowroot.common.repo.ImmutableAgentRollup;
import org.glowroot.common.util.Clock;
|
34,994 | SimpleRepoModule simpleRepoModule = new SimpleRepoModule(dataSource,
dataDir, clock, ticker, configRepository, backgroundExecutor);
simpleRepoModule.registerMBeans(new PlatformMBeanServerLifecycleImpl(
agentModule.getLazyPlatformMBeanServer()));
CollectorImpl collectorImpl = new CollectorImpl(
<BUG>simpleRepoModule.get... | simpleRepoModule.getEnvironmentDao(),
simpleRepoModule.getTraceDao(),
|
34,995 | .baseDir(baseDir)
.glowrootDir(glowrootDir)
.ticker(ticker)
.clock(clock)
.liveJvmService(agentModule.getLiveJvmService())
<BUG>.configRepository(simpleRepoModule.getConfigRepository())
.agentRepository(simpleRepoModule.getAgentDao())
</BUG>
.transactionTypeRepository(simpleRepoModule.getTransactionTypeRepository())
.t... | .agentRepository(new AgentRepositoryImpl())
.environmentRepository(simpleRepoModule.getEnvironmentDao())
|
34,996 | .baseDir(baseDir)
.glowrootDir(glowrootDir)
.ticker(ticker)
.clock(clock)
.liveJvmService(null)
<BUG>.configRepository(simpleRepoModule.getConfigRepository())
.agentRepository(simpleRepoModule.getAgentDao())
</BUG>
.transactionTypeRepository(simpleRepoModule.getTransactionTypeRepository())
.traceAttributeNameRepository... | .liveJvmService(agentModule.getLiveJvmService())
.agentRepository(new AgentRepositoryImpl())
.environmentRepository(simpleRepoModule.getEnvironmentDao())
|
34,997 | }
@Override
public void lazyRegisterMBean(Object object, String name) {
lazyPlatformMBeanServer.lazyRegisterMBean(object, name);
}
<BUG>}
}
</BUG>
| void initEmbeddedServer() throws Exception {
if (simpleRepoModule == null) {
return;
|
34,998 | List<GaugeConfig> configs = Lists.newArrayList(configService.getGaugeConfigs());
for (GaugeConfig loopConfig : configs) {
if (loopConfig.mbeanObjectName().equals(gaugeConfig.getMbeanObjectName())) {
throw new DuplicateMBeanObjectNameException();
}
<BUG>}
String version = Versions.getVersion(gaugeConfig);
for (GaugeConf... | [DELETED] |
34,999 | configService.updateGaugeConfigs(configs);
}
}
@Override
public void updateGaugeConfig(String agentId, AgentConfig.GaugeConfig gaugeConfig,
<BUG>String priorVersion) throws Exception {
synchronized (writeLock) {</BUG>
List<GaugeConfig> configs = Lists.newArrayList(configService.getGaugeConfigs());
boolean found = false... | GaugeConfig config = GaugeConfig.create(gaugeConfig);
synchronized (writeLock) {
|
35,000 | boolean found = false;
for (ListIterator<GaugeConfig> i = configs.listIterator(); i.hasNext();) {
GaugeConfig loopConfig = i.next();
String loopVersion = Versions.getVersion(loopConfig.toProto());
if (loopVersion.equals(priorVersion)) {
<BUG>i.set(GaugeConfig.create(gaugeConfig));
found = true;
break;</BUG>
} else if (... | i.set(config);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.