id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
12,901 | package org.jpmml.xgboost;
import org.dmg.pmml.MiningFunction;
<BUG>import org.dmg.pmml.Output;
import org.dmg.pmml.mining.MiningModel;</BUG>
import org.dmg.pmml.mining.Segmentation;
import org.jpmml.converter.ModelUtil;
import org.jpmml.converter.Schema;
| import org.dmg.pmml.FieldName;
import org.dmg.pmml.OutputField;
import org.dmg.pmml.mining.MiningModel;
|
12,902 | MiningModel miningModel = new MiningModel(MiningFunction.REGRESSION, ModelUtil.createMiningSchema(segmentSchema))
.setSegmentation(segmentation)
.setOutput(output);</BUG>
return MiningModelUtil.createBinaryLogisticClassification(schema, miningModel, -1d, true);
<BUG>}
private Output encodeOutput(float base_score){
Output output = new Output();
createPredictedField(output, base_score);
return output;</BUG>
}
| .setTargets(createTargets(base_score, segmentSchema))
.setOutput(output);
|
12,903 | assertThat(facets.getFacets()).isEmpty();
assertThat(facets.getFacetKeys("polop")).isEmpty();
assertThat(facets.getFacetValues("polop")).isEmpty();
}
@Test
<BUG>public void should_ignore_unknown_aggregation_type() throws Exception {
esTester.putDocuments(INDEX, TYPE,
newTagsDocument("noTags"),
newTagsDocument("oneTag", "tag1"),
newTagsDocument("twoTags", "tag1", "tag2"),
newTagsDocument("twoTags", "tag1", "tag2", "tag3"),
newTagsDocument("twoTags", "tag1", "tag2", "tag3", "tag4"));</BUG>
SearchRequestBuilder search = esTester.client().prepareSearch(INDEX).setTypes(TYPE)
| esTester.index(INDEX, TYPE, "noTags", newTagsDocument("noTags"));
esTester.index(INDEX, TYPE, "oneTag", newTagsDocument("oneTag", "tag1"));
esTester.index(INDEX, TYPE, "twoTags", newTagsDocument("twoTags", "tag1", "tag2"));
esTester.index(INDEX, TYPE, "threeTags", newTagsDocument("threeTags", "tag1", "tag2", "tag3"));
esTester.index(INDEX, TYPE, "fourTags", newTagsDocument("fourTags", "tag1", "tag2", "tag3", "tag4"));
|
12,904 | Facets facets = new Facets(search.get());
assertThat(facets.getFacets()).isEmpty();
assertThat(facets.getFacetKeys(FIELD_TAGS)).isEmpty();
}
@Test
<BUG>public void should_process_result_with_nested_missing_and_terms_aggregations() throws Exception {
esTester.putDocuments(INDEX, TYPE,
newTagsDocument("noTags"),
newTagsDocument("oneTag", "tag1"),
newTagsDocument("twoTags", "tag1", "tag2"),
newTagsDocument("twoTags", "tag1", "tag2", "tag3"),
newTagsDocument("twoTags", "tag1", "tag2", "tag3", "tag4"));</BUG>
SearchRequestBuilder search = esTester.client().prepareSearch(INDEX).setTypes(TYPE)
| esTester.index(INDEX, TYPE, "noTags", newTagsDocument("noTags"));
esTester.index(INDEX, TYPE, "oneTag", newTagsDocument("oneTag", "tag1"));
esTester.index(INDEX, TYPE, "fourTags", newTagsDocument("fourTags", "tag1", "tag2", "tag3", "tag4"));
|
12,905 | .contains("{=1}")
.contains("{tag1=2}")
.contains("{tag2=1}");
}
@Test
<BUG>public void should_ignore_empty_missing_aggregation() throws Exception {
esTester.putDocuments(INDEX, TYPE,
newTagsDocument("oneTag", "tag1"),
newTagsDocument("twoTags", "tag1", "tag2"),
newTagsDocument("twoTags", "tag1", "tag2", "tag3"),
newTagsDocument("twoTags", "tag1", "tag2", "tag3", "tag4"));</BUG>
SearchRequestBuilder search = esTester.client().prepareSearch(INDEX).setTypes(TYPE)
| esTester.index(INDEX, TYPE, "oneTag", newTagsDocument("oneTag", "tag1"));
esTester.index(INDEX, TYPE, "twoTags", newTagsDocument("twoTags", "tag1", "tag2"));
esTester.index(INDEX, TYPE, "threeTags", newTagsDocument("threeTags", "tag1", "tag2", "tag3"));
esTester.index(INDEX, TYPE, "fourTags", newTagsDocument("fourTags", "tag1", "tag2", "tag3", "tag4"));
|
12,906 | assertThat(facets.getFacetKeys(FIELD_TAGS)).containsOnly("tag1", "tag2", "tag4");
assertThat(facets.getFacetKeys(FIELD_CREATED_AT)).isEmpty();
}
@Test
public void should_process_result_with_date_histogram() throws Exception {
<BUG>esTester.putDocuments(INDEX, TYPE,
newTagsDocument("first"), newTagsDocument("second"), newTagsDocument("third"));
SearchRequestBuilder search = esTester.client().prepareSearch(INDEX).setTypes(TYPE)</BUG>
.addAggregation(
AggregationBuilders.dateHistogram(FIELD_CREATED_AT)
| esTester.index(INDEX, TYPE, "first", newTagsDocument("first"));
esTester.index(INDEX, TYPE, "second", newTagsDocument("second"));
esTester.index(INDEX, TYPE, "third", newTagsDocument("third"));
SearchRequestBuilder search = esTester.client().prepareSearch(INDEX).setTypes(TYPE)
|
12,907 | import org.sonar.server.tester.UserSessionRule;
import org.sonar.server.ws.WsTester;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
<BUG>import static org.mockito.Mockito.when;
import static org.sonar.server.project.ws.BulkDeleteAction.PARAM_IDS;</BUG>
import static org.sonar.server.project.ws.BulkDeleteAction.PARAM_KEYS;
public class BulkDeleteActionTest {
private static final String ACTION = "bulk_delete";
| import static org.sonar.server.issue.index.IssueIndexDefinition.FIELD_AUTHORIZATION_PROJECT_UUID;
import static org.sonar.server.issue.index.IssueIndexDefinition.TYPE_AUTHORIZATION;
import static org.sonar.server.issue.index.IssueIndexDefinition.TYPE_ISSUE;
import static org.sonar.server.project.ws.BulkDeleteAction.PARAM_IDS;
|
12,908 | insertNewProjectInIndexes(3);
insertNewProjectInIndexes(4);
ws.newPostRequest("api/projects", ACTION)
.setParam(PARAM_KEYS, "project-key-1, project-key-3, project-key-4").execute();
String remainingProjectUuid = "project-uuid-2";
<BUG>assertThat(es.getDocumentFieldValues(IssueIndexDefinition.INDEX, IssueIndexDefinition.TYPE_ISSUE, IssueIndexDefinition.FIELD_ISSUE_PROJECT_UUID))
.containsOnly(remainingProjectUuid);
assertThat(es.getDocumentFieldValues(IssueIndexDefinition.INDEX, IssueIndexDefinition.TYPE_AUTHORIZATION, IssueIndexDefinition.FIELD_AUTHORIZATION_PROJECT_UUID))
.containsOnly(remainingProjectUuid);</BUG>
assertThat(es.getDocumentFieldValues(TestIndexDefinition.INDEX, TestIndexDefinition.TYPE, TestIndexDefinition.FIELD_PROJECT_UUID))
| assertThat(es.getDocumentFieldValues(IssueIndexDefinition.INDEX, TYPE_ISSUE, IssueIndexDefinition.FIELD_ISSUE_PROJECT_UUID))
|
12,909 | @Rule
public LogTester logTester = new LogTester();
@Test
public void index_with_index_type_and_id() {
IndexResponse response = esTester.client().prepareIndex(FakeIndexDefinition.INDEX, FakeIndexDefinition.TYPE)
<BUG>.setSource(FakeIndexDefinition.newDoc(42))
</BUG>
.get();
assertThat(response.isCreated()).isTrue();
}
| .setSource(FakeIndexDefinition.newDoc(42).getFields())
|
12,910 | }
@Test
public void trace_logs() {
logTester.setLevel(LoggerLevel.TRACE);
IndexResponse response = esTester.client().prepareIndex(FakeIndexDefinition.INDEX, FakeIndexDefinition.TYPE)
<BUG>.setSource(FakeIndexDefinition.newDoc(42))
</BUG>
.get();
assertThat(response.isCreated()).isTrue();
assertThat(logTester.logs()).hasSize(1);
| .setSource(FakeIndexDefinition.newDoc(42).getFields())
|
12,911 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
12,912 | final int lineStride = dst.getScanlineStride();
final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final byte[][] data = dst.getByteDataArrays();
final float[] warpData = new float[2 * dstWidth];
<BUG>int lineOffset = 0;
if (ctable == null) { // source does not have IndexColorModel
if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
12,913 | pixelOffset += pixelStride;
} // COLS LOOP
} // ROWS LOOP
}
} else {// source has IndexColorModel
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| } else if (caseB) {
for (int h = 0; h < dstHeight; h++) {
|
12,914 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
12,915 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
12,916 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
12,917 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
12,918 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
12,919 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final int[][] data = dst.getIntDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
12,920 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
12,921 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final float[][] data = dst.getFloatDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
12,922 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
12,923 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final double[][] data = dst.getDoubleDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
12,924 | import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
<BUG>import android.support.v4.app.NavUtils;
import android.support.v7.app.AppCompatActivity;</BUG>
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.ContextMenu;
| import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.AppCompatActivity;
|
12,925 | import android.database.ContentObserver;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
<BUG>import android.support.v4.app.NavUtils;
import android.support.v7.app.AppCompatActivity;</BUG>
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.ContextMenu;
| import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.AppCompatActivity;
|
12,926 | import android.os.Handler;
import android.os.Looper;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.preference.PreferenceManager;
<BUG>import android.support.design.widget.FloatingActionButton;
import android.support.v7.widget.Toolbar;</BUG>
import android.util.Log;
import android.view.ContextMenu;
import android.view.KeyEvent;
| import android.support.v4.view.MenuItemCompat;
import android.support.v7.widget.Toolbar;
|
12,927 | mAltitude.setOnCheckedChangeListener(mCheckedChangeListener);
mDistance.setOnCheckedChangeListener(mCheckedChangeListener);
mCompass.setOnCheckedChangeListener(mCheckedChangeListener);
mLocation.setOnCheckedChangeListener(mCheckedChangeListener);
builder.setTitle(R.string.dialog_layer_title).setIcon(android.R.drawable.ic_dialog_map).setPositiveButton
<BUG>(R.string.btn_okay, null).setView(view);
</BUG>
dialog = builder.create();
return dialog;
case DIALOG_NOTRACK:
| (android.R.string.ok, null).setView(view);
|
12,928 | verify(view.tweetImageView).setClickable(false);
verify(view.tweetImageView)
.setContentDescription(getResources().getString(R.string.tw__tweet_media));</BUG>
verify(view.mediaContainer).setVisibility(View.GONE);
}
<BUG>public void testSetAltText() {
final BaseTweetView view = createViewWithMocks(context, null);
view.tweetImageView = mock(TweetImageView.class);
view.setAltText(ALT_TEXT);
verify(view.tweetImageView).setContentDescription(ALT_TEXT);</BUG>
}
| public void testRender_forMultiplePhotoEntities() {
final BaseTweetView tweetView = createViewWithMocks(context, null);
tweetView.setTweet(TestFixtures.TEST_MULTIPLE_PHOTO_TWEET);
assertEquals(View.VISIBLE, tweetView.mediaContainer.getVisibility());
assertEquals(View.VISIBLE, tweetView.tweetMediaView.getVisibility());
assertEquals(View.GONE, tweetView.mediaBadgeView.getVisibility()); }
public void testRender_rendersRetweetedStatus() {
final BaseTweetView tweetView = createViewWithMocks(context, null);
tweetView.setTweet(TestFixtures.TEST_RETWEET);
assertEquals(REQUIRED_RETWEETED_BY_TEXT, tweetView.retweetedByView.getText());
assertEquals(TestFixtures.TEST_NAME, tweetView.fullNameView.getText());
assertEquals(TestFixtures.TEST_FORMATTED_SCREEN_NAME, tweetView.screenNameView.getText());
assertEquals(TestFixtures.TEST_STATUS, tweetView.contentView.getText().toString());
|
12,929 | package com.twitter.sdk.android.tweetui;
import com.twitter.sdk.android.core.internal.VineCardUtils;
import com.twitter.sdk.android.core.models.BindingValues;
<BUG>import com.twitter.sdk.android.core.models.Card;
import com.twitter.sdk.android.core.models.MediaEntity;</BUG>
import com.twitter.sdk.android.core.models.Tweet;
import com.twitter.sdk.android.core.models.TweetBuilder;
import com.twitter.sdk.android.core.models.TweetEntities;
| import com.twitter.sdk.android.core.models.ImageValue;
import com.twitter.sdk.android.core.models.MediaEntity;
|
12,930 | package com.lenis0012.bukkit.marriage2.internal.data;
import java.io.File;
<BUG>import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;</BUG>
import java.util.*;
| import java.sql.*;
|
12,931 | public void initiate() throws Exception {
Class.forName(className);
}
public void runSetup(Statement statement, String prefix) throws SQLException {
statement.executeUpdate(String.format("CREATE TABLE IF NOT EXISTS %splayers ("
<BUG>+ "unique_user_id VARCHAR(128) NOT NULL UNIQUE,"
+ "gender VARCHAR(32),"</BUG>
+ "priest BIT,"
+ "lastlogin BIGINT);", prefix));
switch(this) {
| + "last_name VARCHAR(16),"
+ "gender VARCHAR(32),"
|
12,932 | package com.lenis0012.bukkit.marriage2.listeners;
import com.lenis0012.bukkit.marriage2.MData;
import com.lenis0012.bukkit.marriage2.MPlayer;
import com.lenis0012.bukkit.marriage2.config.Settings;
import com.lenis0012.bukkit.marriage2.internal.MarriageCore;
<BUG>import com.lenis0012.bukkit.marriage2.misc.Cooldown;
import net.minecraft.server.v1_8_R3.EnumParticle;</BUG>
import net.minecraft.server.v1_8_R3.PacketPlayOutWorldParticles;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
| import com.lenis0012.bukkit.marriage2.misc.reflection.Packets;
import com.lenis0012.bukkit.marriage2.misc.reflection.Reflection;
import net.minecraft.server.v1_8_R3.EnumParticle;
|
12,933 | import javax.xml.bind.annotation.XmlRootElement;
import se.bjurr.prnfb.settings.USER_LEVEL;
@XmlRootElement
@XmlAccessorType(FIELD)
public class ButtonDTO {
<BUG>private String title;
private USER_LEVEL userLevel;</BUG>
private UUID uuid;
@Override
| private String name;
private String projectKey;
private String repositorySlug;
private USER_LEVEL userLevel;
|
12,934 | } else if (!this.uuid.equals(other.uuid)) {
return false;
}
return true;
}
<BUG>public String getTitle() {
return this.title;
}</BUG>
public USER_LEVEL getUserLevel() {
| public String getName() {
return this.name;
public String getProjectKey() {
return this.projectKey;
public String getRepositorySlug() {
return this.repositorySlug;
|
12,935 | return this.uuid;
}
@Override
public int hashCode() {
final int prime = 31;
<BUG>int result = 1;
result = prime * result + ((this.title == null) ? 0 : this.title.hashCode());
</BUG>
result = prime * result + ((this.userLevel == null) ? 0 : this.userLevel.hashCode());
result = prime * result + ((this.uuid == null) ? 0 : this.uuid.hashCode());
| public UUID getUUID() {
result = prime * result + ((this.projectKey == null) ? 0 : this.projectKey.hashCode());
result = prime * result + ((this.repositorySlug == null) ? 0 : this.repositorySlug.hashCode());
result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());
|
12,936 | return false;
}
} else if (!this.name.equals(other.name)) {
return false;
}
<BUG>if (this.uuid == null) {
if (other.uuid != null) {
return false;
}
} else if (!this.uuid.equals(other.uuid)) {
return false;
}</BUG>
if (this.value == null) {
| if (getClass() != obj.getClass()) {
HeaderDTO other = (HeaderDTO) obj;
if (this.name == null) {
if (other.name != null) {
|
12,937 | 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 = "groovy.lang.GroovyObject";
private static final String JAVA_DEFAULT_OBJECT = "java.lang.Object";
private Map<URI, Set<SymbolInformation>> fileSymbols = Maps.newHashMap();
private Map<String, Set<SymbolInformation>> typeReferences = Maps.newHashMap();</BUG>
private final Supplier<CompilationUnit> unitSupplier;
| private Indexer indexer = new Indexer();
|
12,938 | 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);
symbols.add(symbol);
});
}
newFileSymbols.put(workspaceUriSupplier.get(sourceUri), symbols);</BUG>
});
| newIndexer.addSymbol(sourceUnit.getSource().getURI(), symbol);
if (classes.containsKey(variable.getType().getName())) {
newIndexer.addReference(classes.get(variable.getType().getName()),
GroovyLocations.createLocation(sourceUri, variable.getType()));
|
12,939 | }
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 = getQueryPattern(query);
| });
sourceUnit.getAST().getStatementBlock()
.visit(new MethodVisitor(newIndexer, sourceUri, sourceUnit.getAST().getScriptClassDummy(),
classes, Maps.newHashMap(), Optional.absent(), workspaceUriSupplier));
|
12,940 | <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;
|
12,941 | 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(String query);</BUG>
}
| Map<Location, Set<Location>> getReferences();
Set<Location> findReferences(ReferenceParams params);
Optional<Location> gotoDefinition(URI uri, Position position);
Set<SymbolInformation> getFilteredSymbols(String query);
|
12,942 | .workspaceSymbolProvider(true)
.referencesProvider(true)
.completionProvider(new CompletionOptionsBuilder()
.resolveProvider(false)
.triggerCharacter(".")
<BUG>.build())
.build();</BUG>
InitializeResult result = new InitializeResultBuilder()
.capabilities(capabilities)
.build();
| .definitionProvider(true)
|
12,943 | 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;
import io.typefox.lsapi.SymbolInformation;
import io.typefox.lsapi.TextDocumentContentChangeEvent;
| import com.google.common.base.Optional;
import io.typefox.lsapi.Location;
import io.typefox.lsapi.Position;
import io.typefox.lsapi.PublishDiagnosticsParams;
|
12,944 | this.model = model;
model.addObserver(this);
build();
model.addPropertyChangeListener(this);
}
<BUG>class CopyStartLeftAction extends AbstractAction implements ListSelectionListener {
public CopyStartLeftAction() {
ImageIcon icon = ImageProvider.get("dialogs/conflict", "copystartleft.png");
</BUG>
putValue(Action.SMALL_ICON, icon);
| abstract class CopyAction extends AbstractAction implements ListSelectionListener {
protected CopyAction(String icon_name, String action_name, String short_description) {
ImageIcon icon = ImageProvider.get("dialogs/conflict", icon_name+".png");
|
12,945 | }
putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements before the first selected element in the list of merged elements."));
setEnabled(false);</BUG>
}
@Override
<BUG>public void actionPerformed(ActionEvent arg0) {
int [] myRows = myEntriesTable.getSelectedRows();</BUG>
int [] mergedRows = mergedEntriesTable.getSelectedRows();
if (mergedRows == null || mergedRows.length == 0)
| public void propertyChange(PropertyChangeEvent evt) {
updateEnabledState();
|
12,946 | }
putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements after the first selected element in the list of merged elements."));
setEnabled(false);</BUG>
}
@Override
<BUG>public void actionPerformed(ActionEvent arg0) {
int [] myRows = myEntriesTable.getSelectedRows();</BUG>
int [] mergedRows = mergedEntriesTable.getSelectedRows();
if (mergedRows == null || mergedRows.length == 0)
| private void updateEnabledState() {
setEnabled(model.getMergedEntries().isEmpty() && !model.isFrozen());
|
12,947 | import com.intellij.ui.content.impl.ContentManagerImpl;
import com.intellij.util.ContentUtilEx;
import com.intellij.util.ContentsUtil;
import com.intellij.util.NotNullFunction;
import com.intellij.util.containers.ContainerUtil;
<BUG>import com.intellij.util.messages.MessageBusConnection;
import com.intellij.vcs.log.ui.VcsLogUiImpl;</BUG>
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
| import com.intellij.vcs.log.ui.VcsLogPanel;
import com.intellij.vcs.log.ui.VcsLogUiImpl;
|
12,948 | public void disposeContent() {
myConnection.disconnect();
myContainer.removeAll();
myLogManager.disposeLog();
}
<BUG>public static void openAnotherLogTab(@NotNull Project project) {
VcsLogProjectManager logManager = VcsLogProjectManager.getInstance(project);</BUG>
ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.VCS);
String shortName = generateShortName(toolWindow);
| public static void openAnotherLogTab(@NotNull VcsLogManager logManager, @NotNull Project project) {
|
12,949 | @NotNull VcsLogUiImpl logUi,
@NotNull String shortName) {
logManager.watchTab(ContentUtilEx.getFullName(TAB_NAME, shortName), logUi);
logUi.requestFocus();
ContentUtilEx
<BUG>.addTabbedContent(toolWindow.getContentManager(), logUi.getMainFrame().getMainComponent(), TAB_NAME, shortName, true, logUi);
</BUG>
toolWindow.activate(null);
}
private void closeLogTabs() {
| .addTabbedContent(toolWindow.getContentManager(), new VcsLogPanel(logManager, logUi), TAB_NAME, shortName, true, logUi);
|
12,950 | package com.intellij.vcs.log.ui.actions;
import com.intellij.icons.AllIcons;
<BUG>import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAwareAction;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.vcs.log.impl.VcsLogContentProvider;
import com.intellij.vcs.log.impl.VcsLogProjectManager;
import com.intellij.vcs.log.ui.VcsLogUiImpl;
</BUG>
public class OpenAnotherLogTabAction extends DumbAwareAction {
| import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.project.Project;
import com.intellij.vcs.log.impl.VcsLogManager;
import com.intellij.vcs.log.ui.VcsLogDataKeys;
|
12,951 | package com.intellij.vcs.log.ui.actions;
import com.intellij.icons.AllIcons;
import com.intellij.ide.actions.RefreshAction;
<BUG>import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.project.Project;
import com.intellij.vcs.log.VcsLogDataKeys;
import com.intellij.vcs.log.data.VcsLogDataManager;
import com.intellij.vcs.log.impl.VcsLogProjectManager;</BUG>
public class RefreshLogAction extends RefreshAction {
| import com.intellij.vcs.log.impl.VcsLogManager;
import com.intellij.vcs.log.ui.VcsLogDataKeys;
|
12,952 | }
@NotNull
protected Collection<VcsRoot> getVcsRoots() {
return Arrays.asList(ProjectLevelVcsManager.getInstance(myProject).getAllVcsRoots());
}
<BUG>public void watchTab(@NotNull String contentTabName, @NotNull VcsLogUiImpl logUi) {
myLogManager.watchTab(contentTabName, logUi);
}</BUG>
@NotNull
public JComponent initMainLog(@NotNull String contentTabName) {
| public VcsLogDataManager getDataManager() {
return myLogManager.getDataManager();
|
12,953 | }</BUG>
@NotNull
public JComponent initMainLog(@NotNull String contentTabName) {
initData();
return myLogManager.initMainLog(contentTabName);
<BUG>}
@NotNull
public VcsLogUiImpl createLog(@NotNull String logId) {
initData();
return myLogManager.createLog(logId);</BUG>
}
| public VcsLogDataManager getDataManager() {
return myLogManager.getDataManager();
protected Collection<VcsRoot> getVcsRoots() {
return Arrays.asList(ProjectLevelVcsManager.getInstance(myProject).getAllVcsRoots());
|
12,954 | import com.intellij.psi.PsiElement;
import com.intellij.psi.impl.source.tree.CompositeElement;
import com.intellij.ui.*;
import com.intellij.util.Alarm;
import com.intellij.util.EditSourceOnDoubleClickHandler;
<BUG>import com.intellij.util.OpenSourceUtil;
import com.intellij.util.ui.Tree;</BUG>
import com.intellij.util.ui.tree.TreeUtil;
import gnu.trove.THashSet;
import org.jetbrains.annotations.NonNls;
| import com.intellij.util.ArrayUtil;
import com.intellij.util.ui.Tree;
|
12,955 | myFileEditor = editor;
myTreeModel = structureViewModel;
myShowRootNode = showRootNode;
myTreeModelWrapper = new TreeModelWrapper(myTreeModel, this);
SmartTreeStructure treeStructure = new SmartTreeStructure(project, myTreeModelWrapper){
<BUG>public void rebuildTree() {
storeState();</BUG>
super.rebuildTree();
restoreState();
}
| if (isDisposed()) return;
|
12,956 | structureViewState.setSelectedElements(getSelectedElements());
return structureViewState;
}
private Object[] getExpandedElements() {
final JTree tree = getTree();
<BUG>if (tree == null) return new Object[0];
final List<TreePath> expandedPaths = TreeUtil.collectExpandedPaths(tree);</BUG>
return convertPathsToValues(expandedPaths.toArray(new TreePath[expandedPaths.size()]));
}
public void restoreState() {
| if (tree == null) return ArrayUtil.EMPTY_OBJECT_ARRAY;
final List<TreePath> expandedPaths = TreeUtil.collectExpandedPaths(tree);
|
12,957 | import de.vanita5.twittnuker.receiver.NotificationReceiver;
import de.vanita5.twittnuker.service.LengthyOperationsService;
import de.vanita5.twittnuker.util.ActivityTracker;
import de.vanita5.twittnuker.util.AsyncTwitterWrapper;
import de.vanita5.twittnuker.util.DataStoreFunctionsKt;
<BUG>import de.vanita5.twittnuker.util.DataStoreUtils;
import de.vanita5.twittnuker.util.ImagePreloader;</BUG>
import de.vanita5.twittnuker.util.InternalTwitterContentUtils;
import de.vanita5.twittnuker.util.JsonSerializer;
import de.vanita5.twittnuker.util.NotificationManagerWrapper;
| import de.vanita5.twittnuker.util.DebugLog;
import de.vanita5.twittnuker.util.ImagePreloader;
|
12,958 | final List<InetAddress> addresses = mDns.lookup(host);
for (InetAddress address : addresses) {
c.addRow(new String[]{host, address.getHostAddress()});
}
} catch (final IOException ignore) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, ignore);
}</BUG>
}
| DebugLog.w(LOGTAG, null, ignore);
|
12,959 | @Override
public void afterExecute(Bus handler, SingleResponse<Relationship> result) {
if (result.hasData()) {
handler.post(new FriendshipUpdatedEvent(accountKey, userKey, result.getData()));
} else if (result.hasException()) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, "Unable to update friendship", result.getException());
}</BUG>
}
| public UserKey[] getAccountKeys() {
return DataStoreUtils.getActivatedAccountKeys(context);
|
12,960 | MicroBlog microBlog = MicroBlogAPIFactory.getInstance(context, accountId);
if (!Utils.isOfficialCredentials(context, accountId)) continue;
try {
microBlog.setActivitiesAboutMeUnread(cursor);
} catch (MicroBlogException e) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, e);
}</BUG>
}
| DebugLog.w(LOGTAG, null, e);
|
12,961 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
twitter.updateProfileBannerImage(fileBody);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.format("Unable to delete %s", file));
}</BUG>
}
| if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
12,962 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
twitter.updateProfileBackgroundImage(fileBody, tile);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.format("Unable to delete %s", file));
}</BUG>
}
| twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
12,963 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
return twitter.updateProfileImage(fileBody);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.format("Unable to delete %s", file));
}</BUG>
}
| twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
12,964 | import de.vanita5.twittnuker.annotation.CustomTabType;
import de.vanita5.twittnuker.library.MicroBlog;
import de.vanita5.twittnuker.library.MicroBlogException;
import de.vanita5.twittnuker.library.twitter.model.RateLimitStatus;
import de.vanita5.twittnuker.library.twitter.model.Status;
<BUG>import de.vanita5.twittnuker.fragment.AbsStatusesFragment;
import org.mariotaku.sqliteqb.library.AllColumns;</BUG>
import org.mariotaku.sqliteqb.library.Columns;
import org.mariotaku.sqliteqb.library.Columns.Column;
import org.mariotaku.sqliteqb.library.Expression;
| import org.mariotaku.pickncrop.library.PNCUtils;
import org.mariotaku.sqliteqb.library.AllColumns;
|
12,965 | context.getApplicationContext().sendBroadcast(intent);
}
}
@Nullable
public static Location getCachedLocation(Context context) {
<BUG>if (BuildConfig.DEBUG) {
Log.v(LOGTAG, "Fetching cached location", new Exception());
}</BUG>
Location location = null;
| DebugLog.v(LOGTAG, "Fetching cached location", new Exception());
|
12,966 | import java.util.List;
import java.util.Map.Entry;
import javax.inject.Singleton;
import okhttp3.Dns;
@Singleton
<BUG>public class TwidereDns implements Constants, Dns {
</BUG>
private static final String RESOLVER_LOGTAG = "TwittnukerDns";
private final SharedPreferences mHostMapping;
private final SharedPreferencesWrapper mPreferences;
| public class TwidereDns implements Dns, Constants {
|
12,967 | for (Location location : twitter.getAvailableTrends()) {
map.put(location);
}
return map.pack();
} catch (final MicroBlogException e) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, e);
}</BUG>
}
| DebugLog.w(LOGTAG, null, e);
|
12,968 | import de.vanita5.twittnuker.receiver.NotificationReceiver;
import de.vanita5.twittnuker.service.LengthyOperationsService;
import de.vanita5.twittnuker.util.ActivityTracker;
import de.vanita5.twittnuker.util.AsyncTwitterWrapper;
import de.vanita5.twittnuker.util.DataStoreFunctionsKt;
<BUG>import de.vanita5.twittnuker.util.DataStoreUtils;
import de.vanita5.twittnuker.util.ImagePreloader;</BUG>
import de.vanita5.twittnuker.util.InternalTwitterContentUtils;
import de.vanita5.twittnuker.util.JsonSerializer;
import de.vanita5.twittnuker.util.NotificationManagerWrapper;
| import de.vanita5.twittnuker.util.DebugLog;
import de.vanita5.twittnuker.util.ImagePreloader;
|
12,969 | final List<InetAddress> addresses = mDns.lookup(host);
for (InetAddress address : addresses) {
c.addRow(new String[]{host, address.getHostAddress()});
}
} catch (final IOException ignore) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, ignore);
}</BUG>
}
| DebugLog.w(LOGTAG, null, ignore);
|
12,970 | @Override
public void afterExecute(Bus handler, SingleResponse<Relationship> result) {
if (result.hasData()) {
handler.post(new FriendshipUpdatedEvent(accountKey, userKey, result.getData()));
} else if (result.hasException()) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, "Unable to update friendship", result.getException());
}</BUG>
}
| public UserKey[] getAccountKeys() {
return DataStoreUtils.getActivatedAccountKeys(context);
|
12,971 | MicroBlog microBlog = MicroBlogAPIFactory.getInstance(context, accountId);
if (!Utils.isOfficialCredentials(context, accountId)) continue;
try {
microBlog.setActivitiesAboutMeUnread(cursor);
} catch (MicroBlogException e) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, e);
}</BUG>
}
| DebugLog.w(LOGTAG, null, e);
|
12,972 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
twitter.updateProfileBannerImage(fileBody);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.format("Unable to delete %s", file));
}</BUG>
}
| if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
12,973 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
twitter.updateProfileBackgroundImage(fileBody, tile);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.format("Unable to delete %s", file));
}</BUG>
}
| twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
12,974 | FileBody fileBody = null;
try {
fileBody = getFileBody(context, imageUri);
return twitter.updateProfileImage(fileBody);
} finally {
<BUG>Utils.closeSilently(fileBody);
if (deleteImage && "file".equals(imageUri.getScheme())) {
final File file = new File(imageUri.getPath());
if (!file.delete()) {
Log.w(LOGTAG, String.format("Unable to delete %s", file));
}</BUG>
}
| twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
12,975 | import de.vanita5.twittnuker.annotation.CustomTabType;
import de.vanita5.twittnuker.library.MicroBlog;
import de.vanita5.twittnuker.library.MicroBlogException;
import de.vanita5.twittnuker.library.twitter.model.RateLimitStatus;
import de.vanita5.twittnuker.library.twitter.model.Status;
<BUG>import de.vanita5.twittnuker.fragment.AbsStatusesFragment;
import org.mariotaku.sqliteqb.library.AllColumns;</BUG>
import org.mariotaku.sqliteqb.library.Columns;
import org.mariotaku.sqliteqb.library.Columns.Column;
import org.mariotaku.sqliteqb.library.Expression;
| import org.mariotaku.pickncrop.library.PNCUtils;
import org.mariotaku.sqliteqb.library.AllColumns;
|
12,976 | context.getApplicationContext().sendBroadcast(intent);
}
}
@Nullable
public static Location getCachedLocation(Context context) {
<BUG>if (BuildConfig.DEBUG) {
Log.v(LOGTAG, "Fetching cached location", new Exception());
}</BUG>
Location location = null;
| DebugLog.v(LOGTAG, "Fetching cached location", new Exception());
|
12,977 | import java.util.List;
import java.util.Map.Entry;
import javax.inject.Singleton;
import okhttp3.Dns;
@Singleton
<BUG>public class TwidereDns implements Constants, Dns {
</BUG>
private static final String RESOLVER_LOGTAG = "TwittnukerDns";
private final SharedPreferences mHostMapping;
private final SharedPreferencesWrapper mPreferences;
| public class TwidereDns implements Dns, Constants {
|
12,978 | for (Location location : twitter.getAvailableTrends()) {
map.put(location);
}
return map.pack();
} catch (final MicroBlogException e) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, e);
}</BUG>
}
| DebugLog.w(LOGTAG, null, e);
|
12,979 | private String perfMonFile = "/var/log/sdfs/perf.json";
private boolean clusterRackAware = false;
private boolean ext = true;
private boolean awsAim = false;
private boolean genericS3 = false;
<BUG>private boolean accessEnabled = false;
private String accessPath = null;</BUG>
private String cloudUrl;
private boolean readAhead = false;
private boolean usebasicsigner = false;
| private boolean atmosEnabled = false;
private boolean backblazeEnabled = false;
private String accessPath = null;
|
12,980 | this.dirPermissions = cmd.getOptionValue("permissions-folder");
}
if (cmd.hasOption("permissions-owner")) {
this.owner = cmd.getOptionValue("permissions-owner");
}
<BUG>if(cmd.hasOption("compress-metadata")) {
</BUG>
this.mdCompresstion = true;
}
if (cmd.hasOption("chunk-store-data-location")) {
| if (cmd.hasOption("compress-metadata")) {
|
12,981 | System.out.println(cmd.getOptionValue("cloud-access-key"));
System.out.println(cmd.getOptionValue("cloud-secret-key"));
System.out.println(cmd.getOptionValue("cloud-bucket-name"));
System.exit(-1);
}
<BUG>} else if (this.gsEnabled) {
if (cmd.hasOption("cloud-secret-key") && cmd.hasOption("cloud-access-key")</BUG>
&& cmd.hasOption("cloud-bucket-name")) {
this.cloudAccessKey = cmd.getOptionValue("cloud-access-key");
this.cloudSecretKey = cmd.getOptionValue("cloud-secret-key");
| } else if (this.gsEnabled || this.atmosEnabled || this.backblazeEnabled) {
if (cmd.hasOption("cloud-secret-key") && cmd.hasOption("cloud-access-key")
|
12,982 | Element aws = (Element) doc.getElementsByTagName("file-store").item(0);
if (aws.hasAttribute("chunkstore-class"))
Main.chunkStoreClass = aws.getAttribute("chunkstore-class");
Main.cloudChunkStore = Boolean.parseBoolean(aws
.getAttribute("enabled"));
<BUG>Main.cloudBucket = aws.getAttribute("bucket-name");
}</BUG>
if (googleSz > 0) {
Main.chunkStoreClass = "org.opendedup.sdfs.filestore.S3ChunkStore";
Element aws = (Element) doc
| }
|
12,983 | if (HashBlobArchive.REMOVE_FROM_CACHE)
lf.delete();
SDFSLogger.getLog().error("unable to read " + lf.getPath(), e);
}
if (m == null && HashBlobArchive.REMOVE_FROM_CACHE) {
<BUG>Map<String, Long> _m = store.getHashMap(hashid);
Set<String> keys = _m.keySet();
m = new SimpleByteArrayLongMap(lf.getPath(), MAX_HM_SZ, VERSION);
</BUG>
for (String key : keys) {
| double z = _m.size() * 1.25;
int sz = new Long(Math.round(z)).intValue();
m = new SimpleByteArrayLongMap(lf.getPath(), sz, VERSION);
|
12,984 | buf.putInt(hash.length);
buf.put(hash);
buf.putInt(chunk.length);
buf.put(chunk);
this.uncompressedLength.addAndGet(al);
<BUG>HashBlobArchive.currentLength.addAndGet(al);
HashBlobArchive.compressedLength.addAndGet(chunk.length);</BUG>
buf.position(0);
ch.write(buf, cp);
} finally {
| [DELETED] |
12,985 | public abstract void close();
public abstract void init(Element config) throws IOException;
public abstract String getName();
public abstract void setName(String name);
public abstract long size();
<BUG>public abstract long compressedSize();
public abstract long maxSize();</BUG>
public abstract void sync() throws IOException;
public abstract long bytesRead();
public abstract long bytesWritten();
| public abstract void clearCounters();
public abstract long maxSize();
|
12,986 | List<OrderEntry> orderEntries = projectFileIndex.getOrderEntriesForFile(vFile);
for (OrderEntry entry : orderEntries) {
progressManager.checkCanceled();
if (entry instanceof JdkOrderEntry) {
return ((ProjectRootManagerEx)myProjectRootManager).getScopeForJdk((JdkOrderEntry)entry);
<BUG>}
if (entry instanceof LibraryOrderEntry) {
Module ownerModule = entry.getOwnerModule();
modulesLibraryUsedIn.add(ownerModule);
</BUG>
}
| [DELETED] |
12,987 | package com.liferay.portal.velocity;
import com.liferay.portal.kernel.language.LanguageUtil;
<BUG>import com.liferay.portal.kernel.language.UnicodeLanguageUtil;
import com.liferay.portal.kernel.servlet.BrowserSniffer_IW;</BUG>
import com.liferay.portal.kernel.servlet.ImageServletTokenUtil;
import com.liferay.portal.kernel.util.ArrayUtil;
import com.liferay.portal.kernel.util.ArrayUtil_IW;
| import com.liferay.portal.kernel.service.ExceptionSafeServiceHandler;
import com.liferay.portal.kernel.servlet.BrowserSniffer_IW;
|
12,988 | import com.liferay.portlet.PortletConfigImpl;
import com.liferay.portlet.PortletURLFactory;
import com.liferay.portlet.expando.service.ExpandoColumnService;
import com.liferay.portlet.expando.service.ExpandoRowService;
import com.liferay.portlet.expando.service.ExpandoTableService;
<BUG>import com.liferay.portlet.expando.service.ExpandoValueService;
import java.util.List;</BUG>
import java.util.Map;
import javax.portlet.PortletRequest;
import javax.portlet.PortletResponse;
| import java.lang.reflect.Proxy;
import java.util.List;
|
12,989 | package com.intellij.internal.psiView;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
<BUG>import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.project.DumbAware;</BUG>
import com.intellij.openapi.project.Project;
public class PsiViewerAction extends AnAction implements DumbAware {
public void actionPerformed(AnActionEvent e) {
| import com.intellij.openapi.actionSystem.Presentation;
import com.intellij.openapi.application.ex.ApplicationManagerEx;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleManager;
import com.intellij.openapi.module.ModuleType;
import com.intellij.openapi.project.DumbAware;
|
12,990 | public boolean isDumbAware() {
return true;
}
@Override
public boolean isApplicable(AnActionEvent event, final Map<String, Object> _params) {
<BUG>return SNodeOperations.isInstanceOf(((SNode) MapSequence.fromMap(_params).get("selectedNode")), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, "jetbrains.mps.baseLanguage.structure.ClassConcept")) && ListSequence.fromList(((List<SNode>) BHReflection.invoke(SNodeOperations.cast(((SNode) MapSequence.fromMap(_params).get("selectedNode")), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, "jetbrains.mps.baseLanguage.structure.ClassConcept")), SMethodTrimmedId.create("getMethodsToOverride", null, "4GM03FJm3zL")))).isNotEmpty();
</BUG>
}
@Override
public void doUpdate(@NotNull AnActionEvent event, final Map<String, Object> _params) {
| return SNodeOperations.isInstanceOf(event.getData(MPSCommonDataKeys.NODE), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, "jetbrains.mps.baseLanguage.structure.ClassConcept")) && ListSequence.fromList(((List<SNode>) BHReflection.invoke(SNodeOperations.cast(event.getData(MPSCommonDataKeys.NODE), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L, "jetbrains.mps.baseLanguage.structure.ClassConcept")), SMethodTrimmedId.create("getMethodsToOverride", null, "4GM03FJm3zL")))).isNotEmpty();
|
12,991 | }
}
return true;
}
@Override
<BUG>public void doExecute(@NotNull final AnActionEvent event, final Map<String, Object> _params) {
final Project project = ((IOperationContext) MapSequence.fromMap(_params).get("operationContext")).getProject();
new OverrideImplementMethodAction(project, ((SNode) MapSequence.fromMap(_params).get("selectedNode")), ((EditorContext) MapSequence.fromMap(_params).get("editorContext")), true).run();</BUG>
}
}
| public void doUpdate(@NotNull AnActionEvent event, final Map<String, Object> _params) {
this.setEnabledState(event.getPresentation(), this.isApplicable(event, _params));
|
12,992 | import jetbrains.mps.smodel.behaviour.BHReflection;
import jetbrains.mps.core.aspects.behaviour.SMethodTrimmedId;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.ide.actions.MPSCommonDataKeys;
import jetbrains.mps.ide.editor.MPSEditorDataKeys;
<BUG>import jetbrains.mps.smodel.IOperationContext;
import jetbrains.mps.project.Project;
import jetbrains.mps.smodel.ModelAccess;
</BUG>
import jetbrains.mps.util.Computable;
| import jetbrains.mps.project.MPSProject;
import jetbrains.mps.smodel.ModelAccessHelper;
|
12,993 | import jetbrains.mps.smodel.behaviour.BHReflection;
import jetbrains.mps.core.aspects.behaviour.SMethodTrimmedId;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.ide.actions.MPSCommonDataKeys;
import jetbrains.mps.ide.editor.MPSEditorDataKeys;
<BUG>import jetbrains.mps.smodel.IOperationContext;
import jetbrains.mps.project.Project;
import jetbrains.mps.smodel.ModelAccess;
</BUG>
import jetbrains.mps.util.Computable;
| import jetbrains.mps.project.MPSProject;
import jetbrains.mps.smodel.ModelAccessHelper;
|
12,994 | import jetbrains.mps.smodel.behaviour.BHReflection;
import jetbrains.mps.core.aspects.behaviour.SMethodTrimmedId;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.ide.actions.MPSCommonDataKeys;
import jetbrains.mps.ide.editor.MPSEditorDataKeys;
<BUG>import jetbrains.mps.smodel.IOperationContext;
import jetbrains.mps.project.Project;
import jetbrains.mps.smodel.ModelAccess;
</BUG>
import jetbrains.mps.util.Computable;
| import jetbrains.mps.project.MPSProject;
import jetbrains.mps.smodel.ModelAccessHelper;
|
12,995 | insertionTable.removeIf(filter);
return modified;
}
@Override
public int size() {
<BUG>return insertionTable.size();
</BUG>
}
@Override
public FastCollection<E>[] trySplit(int n) {
| return inner.size();
|
12,996 | package org.javolution.util.internal.collection;
<BUG>import java.util.Collection;
import org.javolution.util.FastCollection;
import org.javolution.util.ReadOnlyIterator;</BUG>
import org.javolution.util.function.BinaryOperator;
import org.javolution.util.function.Consumer;
| import java.util.Iterator;
|
12,997 | package org.javolution.util;
<BUG>import java.util.Collection;
import org.javolution.lang.Constant;</BUG>
import org.javolution.util.function.Order;
import org.javolution.util.function.Predicate;
@Constant
| import java.util.Iterator;
import org.javolution.lang.Constant;
|
12,998 | package org.javolution.util;
import java.util.Collection;
<BUG>import java.util.Comparator;
import java.util.NoSuchElementException;</BUG>
import org.javolution.lang.Constant;
import org.javolution.util.function.Equality;
import org.javolution.util.function.Predicate;
| import java.util.Iterator;
import java.util.NoSuchElementException;
|
12,999 | package org.javolution.util;
<BUG>import java.util.Collection;
import java.util.Map;</BUG>
import org.javolution.lang.Constant;
import org.javolution.util.function.Equality;
import org.javolution.util.function.Order;
| import java.util.Iterator;
import java.util.Map;
|
13,000 | }
}
});
}
} 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];
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.