id
int64 1
49k
| buggy
stringlengths 34
37.5k
| fixed
stringlengths 2
37k
|
---|---|---|
48,501 | 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_();
|
48,502 | 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 );
|
48,503 | 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 );
|
48,504 | 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() ) );
sink.tableCell_();
| sink.bold();
sink.bold_();
sink.tableCaption_();
sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.subprojects" ) );
sink.tableHeaderCell_();
|
48,505 | 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_();
|
48,506 | 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_();
|
48,507 | {
ReverseDependencyLink p1 = (ReverseDependencyLink) o1;
ReverseDependencyLink p2 = (ReverseDependencyLink) o2;
return p1.getProject().getId().compareTo( p2.getProject().getId() );
}
<BUG>else
{</BUG>
return 0;
}
}
| iconError( sink );
|
48,508 | .tilt(25)
.build();
private GoogleMap mMap;
private CompoundButton mAnimateToggle;
private CompoundButton mCustomDurationToggle;
<BUG>private SeekBar mCustomDurationBar;
@Override</BUG>
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.camera_demo);
| private PolylineOptions currPolylineOptions;
private boolean isCanceled = false;
@Override
|
48,509 | new DemoDetails(R.string.basic_map_demo_label,
R.string.basic_map_demo_description,
BasicMapDemoActivity.class),
new DemoDetails(R.string.camera_demo_label,
R.string.camera_demo_description,
<BUG>CameraDemoActivity.class),
new DemoDetails(R.string.circle_demo_label,</BUG>
R.string.circle_demo_description,
CircleDemoActivity.class),
new DemoDetails(R.string.events_demo_label,
| new DemoDetails(R.string.camera_clamping_demo_label,
R.string.camera_clamping_demo_description,
CameraClampingDemoActivity.class),
new DemoDetails(R.string.circle_demo_label,
|
48,510 | package com.example.mapdemo;
import com.google.android.gms.maps.GoogleMap;
<BUG>import com.google.android.gms.maps.GoogleMap.OnCameraChangeListener;
</BUG>
import com.google.android.gms.maps.GoogleMap.OnMapClickListener;
import com.google.android.gms.maps.GoogleMap.OnMapLongClickListener;
import com.google.android.gms.maps.OnMapReadyCallback;
| import com.google.android.gms.maps.GoogleMap.OnCameraIdleListener;
|
48,511 | SupportMapFragment mapFragment =
(SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
@Override
<BUG>public void onMapReady(GoogleMap map) {
map.setOnMapClickListener(this);
map.setOnMapLongClickListener(this);
map.setOnCameraChangeListener(this);
</BUG>
}
| [DELETED] |
48,512 | column.findElement(By.className("delete")).click();
}
public void moveLiveTableColumnBefore(String columnToMove, String beforeColumn)
{
new Actions(getDriver().getWrappedDriver()).clickAndHold(getLiveTableColumn(columnToMove))
<BUG>.moveToElement(getLiveTableColumn(beforeColumn), 0, 0).perform();
</BUG>
}
private WebElement getLiveTableColumn(String columnLabel)
{
| .moveToElement(getLiveTableColumn(beforeColumn), -3, 0).release().perform();
|
48,513 | labelInput.sendKeys(newLabel + Keys.RETURN);
}
public void moveBefore(String valueToMove, String beforeValue)
{
new Actions(getDriver().getWrappedDriver()).clickAndHold(getItem(valueToMove))
<BUG>.moveToElement(getItem(beforeValue), -3, 0).perform();
</BUG>
}
public WebElement getItem(String valueOrLabel)
{
| .moveToElement(getItem(beforeValue), -3, 0).release().perform();
|
48,514 | import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
public class DependencyConvergenceReport
extends AbstractProjectInfoReport
<BUG>{
private List reactorProjects;
private static final int PERCENTAGE = 100;</BUG>
public String getOutputName()
{
| private static final int PERCENTAGE = 100;
private static final List SUPPORTED_FONT_FAMILY_NAMES = Arrays.asList( GraphicsEnvironment
.getLocalGraphicsEnvironment().getAvailableFontFamilyNames() );
|
48,515 | 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_();
|
48,516 | 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 );
|
48,517 | 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 );
|
48,518 | 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() ) );
sink.tableCell_();
| sink.bold();
sink.bold_();
sink.tableCaption_();
sink.tableHeaderCell( headerCellWidth );
sink.text( getI18nString( locale, "stats.subprojects" ) );
sink.tableHeaderCell_();
|
48,519 | 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_();
|
48,520 | 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_();
|
48,521 | {
ReverseDependencyLink p1 = (ReverseDependencyLink) o1;
ReverseDependencyLink p2 = (ReverseDependencyLink) o2;
return p1.getProject().getId().compareTo( p2.getProject().getId() );
}
<BUG>else
{</BUG>
return 0;
}
}
| iconError( sink );
|
48,522 | import org.apache.commons.lang3.math.NumberUtils;
import org.json.JSONException;
import org.mariotaku.microblog.library.MicroBlog;
import org.mariotaku.microblog.library.MicroBlogException;
import org.mariotaku.microblog.library.twitter.model.RateLimitStatus;
<BUG>import org.mariotaku.microblog.library.twitter.model.Status;
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;
|
48,523 | 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());
|
48,524 | 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);
|
48,525 | 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);
|
48,526 | 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);
|
48,527 | import org.mariotaku.twidere.receiver.NotificationReceiver;
import org.mariotaku.twidere.service.LengthyOperationsService;
import org.mariotaku.twidere.util.ActivityTracker;
import org.mariotaku.twidere.util.AsyncTwitterWrapper;
import org.mariotaku.twidere.util.DataStoreFunctionsKt;
<BUG>import org.mariotaku.twidere.util.DataStoreUtils;
import org.mariotaku.twidere.util.ImagePreloader;</BUG>
import org.mariotaku.twidere.util.InternalTwitterContentUtils;
import org.mariotaku.twidere.util.JsonSerializer;
import org.mariotaku.twidere.util.NotificationManagerWrapper;
| import org.mariotaku.twidere.util.DebugLog;
import org.mariotaku.twidere.util.ImagePreloader;
|
48,528 | 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);
|
48,529 | 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);
|
48,530 | import android.content.Context;
import android.content.SharedPreferences;
import android.location.Location;
import android.os.AsyncTask;
import android.support.annotation.NonNull;
<BUG>import android.util.Log;
import org.mariotaku.twidere.BuildConfig;
import org.mariotaku.twidere.Constants;
import org.mariotaku.twidere.util.JsonSerializer;</BUG>
import org.mariotaku.twidere.util.Utils;
| import org.mariotaku.twidere.util.DebugLog;
import org.mariotaku.twidere.util.JsonSerializer;
|
48,531 | }
public static LatLng getCachedLatLng(@NonNull final Context context) {
final Context appContext = context.getApplicationContext();
final SharedPreferences prefs = DependencyHolder.Companion.get(context).getPreferences();
if (!prefs.getBoolean(KEY_USAGE_STATISTICS, false)) return null;
<BUG>if (BuildConfig.DEBUG) {
Log.d(HotMobiLogger.LOGTAG, "getting cached location");
}</BUG>
final Location location = Utils.getCachedLocation(appContext);
| DebugLog.d(HotMobiLogger.LOGTAG, "getting cached location", null);
|
48,532 | public int destroySavedSearchAsync(final UserKey accountKey, final long searchId) {
final DestroySavedSearchTask task = new DestroySavedSearchTask(accountKey, searchId);
return asyncTaskManager.add(task, true);
}
public int destroyStatusAsync(final UserKey accountKey, final String statusId) {
<BUG>final DestroyStatusTask task = new DestroyStatusTask(context,accountKey, statusId);
</BUG>
return asyncTaskManager.add(task, true);
}
public int destroyUserListAsync(final UserKey accountKey, final String listId) {
| final DestroyStatusTask task = new DestroyStatusTask(context, accountKey, statusId);
|
48,533 | @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);
|
48,534 | 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);
|
48,535 | private final I18n i18n;
private Filter filter;
ApplicationElement(TodoItemRepository repository, I18n i18n) {
this.repository = repository;
this.i18n = i18n;
<BUG>Elements.Builder builder = new Elements.Builder()
.section().css("todoapp")</BUG>
.header().css("header")
.h(1).innerText(i18n.constants().todos()).end()
.input(text)
| TodoBuilder builder = new TodoBuilder()
.section().css("todoapp")
|
48,536 | import static org.junit.Assert.assertNotNull;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class ElementsBuilderTest {
<BUG>private Elements.Builder builder;
</BUG>
@Before
public void setUp() {
Document document = mock(Document.class);
| private TestableBuilder builder;
|
48,537 | when(document.createParagraphElement()).thenAnswer(invocation -> new StandaloneElement("p"));
when(document.createSelectElement()).thenAnswer(invocation -> new StandaloneInputElement("select"));
when(document.createSpanElement()).thenAnswer(invocation -> new StandaloneElement("span"));
when(document.createTextAreaElement()).thenAnswer(invocation -> new StandaloneInputElement("textarea"));
when(document.createUListElement()).thenAnswer(invocation -> new StandaloneElement("ul"));
<BUG>builder = new Elements.Builder(document);
</BUG>
}
@Test
public void headings() {
| builder = new TestableBuilder(document);
|
48,538 | TodoItemRepository repository = new TodoItemRepository(BEAN_FACTORY);
ApplicationElement application = new ApplicationElement(repository, i18n);
Element body = Browser.getDocument().getBody();
body.appendChild(application.asElement());
body.appendChild(new FooterElement(i18n).asElement());
<BUG>Element e = new MyBuilder().ahref( "http://www.google.com" )
.img( "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" ).end()
.end().build();
body.appendChild( e );</BUG>
History.addValueChangeHandler(event -> application.filter(event.getValue()));
| [DELETED] |
48,539 | @Override
public String toString() {
return (container ? "container" : "simple") + " @ " + level + ": " + element.getTagName();
}
}
<BUG>public static class Builder extends CoreBuilder<Builder>
{
public Builder() {
super(Browser.getDocument());
}
protected Builder(Document document) {
super( document );</BUG>
}
| [DELETED] |
48,540 | return start(document.createElement(tag));
}
public B start(Element element) {
elements.push(new ElementInfo(element, true, level));
level++;
<BUG>return (B) this;
}</BUG>
public B end() {
assertCurrent();
if (level == 0) {
| return that();
|
48,541 | Element closingElement = elements.peek().element;
for (ElementInfo child : children) {
closingElement.appendChild(child.element);
}
level--;
<BUG>return (B) this;
}</BUG>
private String dumpElements() {
return elements.toString();
}
| return that();
|
48,542 | }
public B on(EventType type, EventListener listener) {
assertCurrent();
Element element = elements.peek().element;
type.register(element, listener);
<BUG>return (B) this;
}</BUG>
public B rememberAs(String id) {
assertCurrent();
references.put(id, elements.peek().element);
| public B attr(String name, String value) {
elements.peek().element.setAttribute(name, value);
return that();
|
48,543 | return new ModelAndView("jsonView", Collections.singletonMap("response", getMessage("error.move.element", "Error moving element.", locale)));
}
}
@RequestMapping(method = RequestMethod.POST, params = "action=movePortlet")
@Deprecated
<BUG>public ModelAndView movePortlet(HttpServletRequest request, HttpServletResponse response)
throws IOException, PortalException {
return moveElement(request, response);
}</BUG>
@RequestMapping(method = RequestMethod.POST, params = "action=moveElement")
| public ModelAndView movePortlet(HttpServletRequest request, HttpServletResponse response,
@RequestParam(value="sourceID") String sourceId,
@RequestParam String method,
@RequestParam(value = "elementID") String destinationId)
return moveElement(request, response, sourceId, method, destinationId);
|
48,544 | log.warn("Error saving layout", e);
}
return new ModelAndView("jsonView", model);
}
@RequestMapping(method = RequestMethod.POST, params = "action=moveTab")
<BUG>public ModelAndView moveTab(HttpServletRequest request,
HttpServletResponse response) throws IOException {
IUserInstance ui = userInstanceManager.getUserInstance(request);</BUG>
UserPreferencesManager upm = (UserPreferencesManager) ui.getPreferencesManager();
| public ModelAndView moveTab(HttpServletRequest request, HttpServletResponse response,
@RequestParam(value="sourceID") String sourceId,
@RequestParam String method,
@RequestParam(value = "elementID") String destinationId) throws IOException {
IUserInstance ui = userInstanceManager.getUserInstance(request);
|
48,545 | node = ulm.addNode(channel, col.getId(), null);
}
return node;
}
@RequestMapping(method = RequestMethod.POST, params="action=chooseSkin")
<BUG>public ModelAndView chooseSkin(HttpServletRequest request,
HttpServletResponse response) throws IOException {
String skinName = request.getParameter("skinName");</BUG>
this.stylesheetUserPreferencesService.setStylesheetParameter(request, PreferencesScope.THEME, "skin", skinName);
| public ModelAndView chooseSkin(HttpServletRequest request, HttpServletResponse response,
@RequestParam String skinName) throws IOException {
|
48,546 | 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.TangoCoordinateFramePair;
import com.google.atap.tangoservice.TangoEvent;</BUG>
import com.google.atap.tangoservice.TangoOutOfDateException;
import com.google.atap.tangoservice.TangoPoseData;
import com.google.atap.tangoservice.TangoXyzIjData;
| import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
|
48,547 | 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();
|
48,548 | 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: " +
|
48,549 | 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.math.vector.Vector3;</BUG>
import org.rajawali3d.primitives.ScreenQuad;
import org.rajawali3d.primitives.Sphere;
import org.rajawali3d.renderer.RajawaliRenderer;
| import org.rajawali3d.math.Quaternion;
import org.rajawali3d.math.vector.Vector3;
|
48,550 | translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE);
translationMoon.setTransformable3D(moon);
getCurrentScene().registerAnimation(translationMoon);
translationMoon.play();
}
<BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) {
Pose cameraPose = ScenePoseCalculator.toOpenGlCameraPose(devicePose, extrinsics);
getCurrentCamera().setRotation(cameraPose.getOrientation());
getCurrentCamera().setPosition(cameraPose.getPosition());
}</BUG>
public int getTextureId() {
| 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());
getCurrentCamera().setPosition(translation[0], translation[1], translation[2]);
|
48,551 | 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.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
| import com.google.atap.tangoservice.TangoAreaDescriptionMetaData;
import com.google.atap.tangoservice.TangoConfig;
|
48,552 | import org.javers.core.metamodel.type.JaversType;
import org.javers.core.metamodel.type.TypeMapper;
import org.javers.guava.GuavaCollectionsComparator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
<BUG>import java.util.ArrayList;
import java.util.List;
import static org.javers.common.exception.JaversExceptionCode.VALUE_OBJECT_IS_NOT_SUPPORTED_AS_MAP_KEY;</BUG>
public class MultimapComparator extends GuavaCollectionsComparator implements CustomPropertyComparator<Multimap, MapChange>{
private static final Logger logger = LoggerFactory.getLogger(MultimapComparator.class);
| import java.util.Collection;
import java.util.Objects;
import java.util.Set;
import static org.javers.common.exception.JaversExceptionCode.VALUE_OBJECT_IS_NOT_SUPPORTED_AS_MAP_KEY;
|
48,553 | startSide = Side.WEST;
start = pEdge.getStart().getConnectionPoint(Direction.WEST);
end = pEdge.getEnd().getConnectionPoint(Direction.EAST);
}
if( pGraph != null )
<BUG>{
Position position = computePosition(pEdge, startSide, pGraph, true);
start = new Point2D.Double( start.getX(), start.getY()+ position.computeNudge(pEdge.getStart().getBounds().getHeight()));
position = computePosition(pEdge, startSide.flip(), pGraph, false);
end = new Point2D.Double( end.getX(), end.getY()+ position.computeNudge(pEdge.getEnd().getBounds().getHeight()));</BUG>
}
| start = computePointPosition(pEdge.getStart(), startSide, computePosition(pEdge, startSide, pGraph, true));
end = computePointPosition(pEdge.getEnd(), startSide.flip(), computePosition(pEdge, startSide.flip(), pGraph, false));
|
48,554 | startSide = Side.NORTH;
start = pEdge.getStart().getConnectionPoint(Direction.NORTH);
end = pEdge.getEnd().getConnectionPoint(Direction.SOUTH);
}
if( pGraph != null )
<BUG>{
Position position = computePosition(pEdge, startSide, pGraph, true);
start = new Point2D.Double( start.getX() + position.computeNudge(pEdge.getStart().getBounds().getWidth()), start.getY());
position = computePosition(pEdge, startSide.flip(), pGraph, false);
end = new Point2D.Double( end.getX()+ position.computeNudge(pEdge.getEnd().getBounds().getWidth()), end.getY());</BUG>
}
| start = computePointPosition(pEdge.getStart(), startSide, computePosition(pEdge, startSide, pGraph, true));
end = computePointPosition(pEdge.getEnd(), startSide.flip(), computePosition(pEdge, startSide.flip(), pGraph, false));
|
48,555 | 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;
|
48,556 | 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);
|
48,557 | @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);
|
48,558 | 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);
|
48,559 | 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);
|
48,560 | 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);
|
48,561 | 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);
|
48,562 | 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;
|
48,563 | 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());
|
48,564 | 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 {
|
48,565 | 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);
|
48,566 | </BUG>
}
if (querystring.indexOf("/https") >= 0) {
querystring = querystring.replace("/https", "");
<BUG>urlmask = "https://.*";
</BUG>
}
if (querystring.indexOf("/ftp") >= 0) {
querystring = querystring.replace("/ftp", "");
urlmask = "ftp://.*";
| querystring = querystring.replace("/date", "");
ranking.coeff_date = RankingProfile.COEFF_MAX;
if (querystring.indexOf("/http") >= 0) {
querystring = querystring.replace("/http", "");
urlmask = "https?://.*";
urlmask = "https?://.*";
|
48,567 | final long r =
((256 - DigestURI.domLengthNormalized(t.urlhash())) << this.ranking.coeff_domlength)
+ ((this.ranking.coeff_ybr > 12) ? ((256 - (BlockRank.ranking(t.urlhash()) << 4)) << this.ranking.coeff_ybr) : 0)
+ ((this.max.urlcomps() == this.min.urlcomps() ) ? 0 : (256 - (((t.urlcomps() - this.min.urlcomps() ) << 8) / (this.max.urlcomps() - this.min.urlcomps()) )) << this.ranking.coeff_urlcomps)
+ ((this.max.urllength() == this.min.urllength() ) ? 0 : (256 - (((t.urllength() - this.min.urllength() ) << 8) / (this.max.urllength() - this.min.urllength()) )) << this.ranking.coeff_urllength)
<BUG>+ ((maxmaxpos == minminpos) ? 0 : (256 - (((t.minposition() - minminpos) << 8) / (maxmaxpos - minminpos))) << this.ranking.coeff_posintext)
</BUG>
+ ((this.max.posofphrase() == this.min.posofphrase()) ? 0 : (256 - (((t.posofphrase() - this.min.posofphrase() ) << 8) / (this.max.posofphrase() - this.min.posofphrase()) )) << this.ranking.coeff_posofphrase)
+ ((this.max.posinphrase() == this.min.posinphrase()) ? 0 : (256 - (((t.posinphrase() - this.min.posinphrase() ) << 8) / (this.max.posinphrase() - this.min.posinphrase()) )) << this.ranking.coeff_posinphrase)
+ ((this.max.distance() == this.min.distance() ) ? 0 : (256 - (((t.distance() - this.min.distance() ) << 8) / (this.max.distance() - this.min.distance()) )) << this.ranking.coeff_worddistance)
| + ((maxmaxpos == minminpos) ? 0 : (256 - (((t.minposition() - minminpos) << 8) / (maxmaxpos - minminpos))) << this.ranking.coeff_posintext)
|
48,568 | catalogMap.put(modId + ":aquatic", modId + ":aquatic");
catalogMap.put(modId + ":monster", modId + ":monster");
<BUG>}
}
if (!catalogMap.containsKey(entityType.getId())) {
catalogMap.put(entityType.getId(), entityType.getId());</BUG>
}
}
for (ItemType itemType : Sponge.getRegistry().getAllOf(ItemType.class)) {
String modId = itemType.getId().split(":")[0].toLowerCase();
| [DELETED] |
48,569 | optional(GenericArguments.seq(
choices(Text.of("flag"), flagChoices),
GenericArguments.firstParsing(
GenericArguments.seq(
GenericArguments.onlyOne(choices(Text.of("source"), catalogChoices)),
<BUG>GenericArguments.choices(Text.of("target"), catalogChoices),
</BUG>
onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()
.put("-1", Tristate.FALSE)
.put("0", Tristate.UNDEFINED)
| GenericArguments.onlyOne(choices(Text.of("target"), catalogChoices)),
|
48,570 | .put("undefined", Tristate.UNDEFINED)
.put("true", Tristate.TRUE)
.build())),
optional(GenericArguments.onlyOne(GenericArguments.string(Text.of("context"))))),
GenericArguments.seq(
<BUG>GenericArguments.choices(Text.of("target"), catalogChoices),
</BUG>
onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()
.put("-1", Tristate.FALSE)
.put("0", Tristate.UNDEFINED)
| GenericArguments.onlyOne(choices(Text.of("target"), catalogChoices)),
|
48,571 | GenericArguments.seq(
choices(Text.of("flag"), flagChoices),
GenericArguments.firstParsing(
GenericArguments.seq(
GenericArguments.onlyOne(choices(Text.of("source"), catalogChoices)),
<BUG>GenericArguments.choices(Text.of("target"), catalogChoices),
</BUG>
onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()
.put("-1", Tristate.FALSE)
.put("0", Tristate.UNDEFINED)
| GenericArguments.onlyOne(choices(Text.of("target"), catalogChoices)),
|
48,572 | .put("false", Tristate.FALSE)
.put("undefined", Tristate.UNDEFINED)
.put("true", Tristate.TRUE)
.build()))),
GenericArguments.seq(
<BUG>GenericArguments.choices(Text.of("target"), catalogChoices),
</BUG>
onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()
.put("-1", Tristate.FALSE)
.put("0", Tristate.UNDEFINED)
| .build())),
optional(GenericArguments.onlyOne(GenericArguments.string(Text.of("context"))))),
GenericArguments.onlyOne(choices(Text.of("target"), catalogChoices)),
|
48,573 | GenericArguments.seq(
choices(Text.of("flag"), flagChoices),
GenericArguments.firstParsing(
GenericArguments.seq(
GenericArguments.onlyOne(choices(Text.of("source"), catalogChoices)),
<BUG>GenericArguments.choices(Text.of("target"), catalogChoices),
</BUG>
onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()
.put("-1", Tristate.FALSE)
.put("0", Tristate.UNDEFINED)
| GenericArguments.onlyOne(choices(Text.of("target"), catalogChoices)),
|
48,574 | .put("false", Tristate.FALSE)
.put("undefined", Tristate.UNDEFINED)
.put("true", Tristate.TRUE)
.build()))),
GenericArguments.seq(
<BUG>GenericArguments.choices(Text.of("target"), catalogChoices),
</BUG>
onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()
.put("-1", Tristate.FALSE)
.put("0", Tristate.UNDEFINED)
| .build())),
optional(GenericArguments.onlyOne(GenericArguments.string(Text.of("context"))))),
GenericArguments.onlyOne(choices(Text.of("target"), catalogChoices)),
|
48,575 | PLAYER
}
@Override
public CommandResult execute(CommandSource src, CommandContext ctx) {
String flag = ctx.<String>getOne("flag").orElse(null);
<BUG>String source = ctx.<String>getOne("source").orElse(null);
List<String> targetValues = new ArrayList<>(ctx.<String>getAll("target"));
String target = null;
if (!targetValues.isEmpty()) {
if (targetValues.size() > 1) {</BUG>
source = null;
| String target = ctx.<String>getOne("target").orElse(null);
if (source != null && source.equalsIgnoreCase(target)) {
|
48,576 | if (!targetValues.isEmpty()) {
if (targetValues.size() > 1) {</BUG>
source = null;
<BUG>target = targetValues.get(1);
} else {
target = targetValues.get(0);
}</BUG>
}
Tristate value = ctx.<Tristate>getOne("value").orElse(null);
String context = ctx.<String>getOne("context").orElse(null);
| PLAYER
@Override
public CommandResult execute(CommandSource src, CommandContext ctx) {
String flag = ctx.<String>getOne("flag").orElse(null);
String source = ctx.<String>getOne("source").orElse(null);
String target = ctx.<String>getOne("target").orElse(null);
if (source != null && source.equalsIgnoreCase(target)) {
|
48,577 | src.sendMessage(e.getText());
return CommandResult.success();
}
String name = ctx.<String>getOne("player").get();
String flag = ctx.<String>getOne("flag").orElse(null);
<BUG>String source = ctx.<String>getOne("source").orElse(null);
List<String> targetValues = new ArrayList<>(ctx.<String>getAll("target"));
String target = null;
if (!targetValues.isEmpty()) {
if (targetValues.size() > 1) {
target = targetValues.get(1);
} else {
target = targetValues.get(0);
}</BUG>
}
| String target = ctx.<String>getOne("target").orElse(null);
if (source != null && source.equalsIgnoreCase(target)) {
source = null;
|
48,578 | src.sendMessage(e.getText());
return CommandResult.success();
}
String group = ctx.<String>getOne("group").get();
String flag = ctx.<String>getOne("flag").orElse(null);
<BUG>String source = ctx.<String>getOne("source").orElse(null);
List<String> targetValues = new ArrayList<>(ctx.<String>getAll("target"));
String target = null;
if (!targetValues.isEmpty()) {
if (targetValues.size() > 1) {
target = targetValues.get(1);
} else {
target = targetValues.get(0);
}</BUG>
}
| String target = ctx.<String>getOne("target").orElse(null);
if (source != null && source.equalsIgnoreCase(target)) {
source = null;
|
48,579 | fdStepname.left = new FormAttachment(middle, 0);
fdStepname.top = new FormAttachment(0, margin);
fdStepname.right= new FormAttachment(100, 0);
wStepname.setLayoutData(fdStepname);
wlSplitfield=new Label(shell, SWT.RIGHT);
<BUG>wlSplitfield.setText("Field to split ");
props.setLook(wlSplitfield);</BUG>
fdlSplitfield=new FormData();
fdlSplitfield.left = new FormAttachment(0, 0);
fdlSplitfield.right= new FormAttachment(middle, -margin);
| wlSplitfield.setText(Messages.getString("FieldSplitterDialog.SplitField.Label")); //$NON-NLS-1$
props.setLook(wlSplitfield);
|
48,580 | fdlSplitfield.left = new FormAttachment(0, 0);
fdlSplitfield.right= new FormAttachment(middle, -margin);
fdlSplitfield.top = new FormAttachment(wStepname, margin);
wlSplitfield.setLayoutData(fdlSplitfield);
wSplitfield=new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
<BUG>wSplitfield.setText("");
</BUG>
props.setLook(wSplitfield);
wSplitfield.addModifyListener(lsMod);
fdSplitfield=new FormData();
| wSplitfield.setText(""); //$NON-NLS-1$
|
48,581 | fdSplitfield.left = new FormAttachment(middle, 0);
fdSplitfield.top = new FormAttachment(wStepname, margin);
fdSplitfield.right= new FormAttachment(100, 0);
wSplitfield.setLayoutData(fdSplitfield);
wlDelimiter=new Label(shell, SWT.RIGHT);
<BUG>wlDelimiter.setText("Delimiter ");
props.setLook(wlDelimiter);</BUG>
fdlDelimiter=new FormData();
fdlDelimiter.left = new FormAttachment(0, 0);
fdlDelimiter.right= new FormAttachment(middle, -margin);
| wlDelimiter.setText(Messages.getString("FieldSplitterDialog.Delimiter.Label")); //$NON-NLS-1$
props.setLook(wlDelimiter);
|
48,582 | fdlDelimiter.left = new FormAttachment(0, 0);
fdlDelimiter.right= new FormAttachment(middle, -margin);
fdlDelimiter.top = new FormAttachment(wSplitfield, margin);
wlDelimiter.setLayoutData(fdlDelimiter);
wDelimiter=new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
<BUG>wDelimiter.setText("");
</BUG>
props.setLook(wDelimiter);
wDelimiter.addModifyListener(lsMod);
fdDelimiter=new FormData();
| wDelimiter.setText(""); //$NON-NLS-1$
|
48,583 | fdDelimiter.left = new FormAttachment(middle, 0);
fdDelimiter.top = new FormAttachment(wSplitfield, margin);
fdDelimiter.right= new FormAttachment(100, 0);
wDelimiter.setLayoutData(fdDelimiter);
wlFields=new Label(shell, SWT.RIGHT);
<BUG>wlFields.setText("Fields ");
props.setLook(wlFields);</BUG>
fdlFields=new FormData();
fdlFields.left = new FormAttachment(0, 0);
fdlFields.top = new FormAttachment(wDelimiter, margin);
| wlFields.setText(Messages.getString("FieldSplitterDialog.Fields.Label")); //$NON-NLS-1$
props.setLook(wlFields);
|
48,584 | fdlFields=new FormData();
fdlFields.left = new FormAttachment(0, 0);
fdlFields.top = new FormAttachment(wDelimiter, margin);
wlFields.setLayoutData(fdlFields);
wOK=new Button(shell, SWT.PUSH);
<BUG>wOK.setText(" &OK ");
wCancel=new Button(shell, SWT.PUSH);
wCancel.setText(" &Cancel ");
setButtonPositions(new Button[] { wOK, wCancel }, margin, null);</BUG>
final int FieldsCols=11;
| wOK.setText(Messages.getString("FieldSplitterDialog.OK.Button")); //$NON-NLS-1$
wCancel.setText(Messages.getString("FieldSplitterDialog.Cancel.Button")); //$NON-NLS-1$
setButtonPositions(new Button[] { wOK, wCancel }, margin, null);
|
48,585 | for (int i=0;i<input.getField().length;i++)
{
TableItem ti = wFields.getNonEmpty(i);
input.getField()[i] = ti.getText( 1 );
input.getFieldID()[i] = ti.getText( 2 );
<BUG>input.removeID()[i] = "Y".equalsIgnoreCase( ti.getText( 3 ) );
</BUG>
input.getFieldType()[i] = Value.getType( ti.getText( 4 ) );
input.getFieldLength() [i] = Const.toInt( ti.getText( 5 ), -1 );
input.getFieldPrecision()[i] = Const.toInt( ti.getText( 6 ), -1 );
| input.removeID()[i] = "Y".equalsIgnoreCase( ti.getText( 3 ) ); //$NON-NLS-1$
|
48,586 | if (first)
{
data.fieldnr=r.searchValueIndex(meta.getSplitField());
if (data.fieldnr<0)
{
<BUG>logError("Couldn't find field to split ["+meta.getSplitField()+"] in input stream!");
setErrors(1);</BUG>
stopAll();
return false;
}
| logError(Messages.getString("FieldSplitter.Log.CouldNotFindFieldToSplit",meta.getSplitField())); //$NON-NLS-1$ //$NON-NLS-2$
setErrors(1);
|
48,587 | Value v=r.getValue(data.fieldnr);
r.removeValue(data.fieldnr);
boolean insert = data.fieldnr<r.size();
if (!v.isString())
{
<BUG>logError("Can only split string fields. ["+meta.getSplitField()+"] is not a string!");
setErrors(1);</BUG>
stopAll();
return false;
}
| logError(Messages.getString("FieldSplitter.Log.SplitFieldNotValid",meta.getSplitField())); //$NON-NLS-1$ //$NON-NLS-2$
setErrors(1);
|
48,588 | int prev=0;
int i=0;
while(v.getString()!=null && prev<v.getString().length() && i<pol.length)
{
pol[i]=polNext(v.getString(), meta.getDelimiter(), prev);
<BUG>if (log.isDebug()) logDebug("pol="+pol[i]+", prev="+prev);
prev+=pol[i].length()+meta.getDelimiter().length();</BUG>
i++;
}
for (i=0;i<meta.getField().length;i++)
| if (log.isDebug()) logDebug(Messages.getString("FieldSplitter.Log.SplitFieldsInfo",pol[i],String.valueOf(prev))); //$NON-NLS-1$ //$NON-NLS-2$
prev+=pol[i].length()+meta.getDelimiter().length();
|
48,589 | StringBuffer sb = new StringBuffer(split);
int idx = sb.indexOf(meta.getFieldID()[i]);
sb.delete(idx, idx+meta.getFieldID()[i].length());
split=sb.toString();
}
<BUG>if (split==null) split="";
if (log.isDebug()) logDebug("Split="+split);
try</BUG>
{
| if (split==null) split=""; //$NON-NLS-1$
if (log.isDebug()) logDebug(Messages.getString("FieldSplitter.Log.SplitInfo")+split); //$NON-NLS-1$
try
|
48,590 | meta.getFieldPrecision()[i],
meta.getFieldGroup()[i],
meta.getFieldDecimal()[i],
meta.getFieldCurrency()[i],
meta.getFieldDefault()[i],
<BUG>"", // --> The default String value in case a field is empty.
</BUG>
TextFileInputMeta.TYPE_TRIM_BOTH,
data.df, data.dfs,
data.daf, data.dafs
| "", // --> The default String value in case a field is empty. //$NON-NLS-1$
|
48,591 | data.daf, data.dafs
);
}
catch(Exception e)
{
<BUG>logError("Error converting value ["+split+"], when splitting field ["+meta.getSplitField()+"]!");
setErrors(1);</BUG>
stopAll();
return false;
}
| logError(Messages.getString("FieldSplitter.Log.ErrorConvertingSplitValue",split,meta.getSplitField()+"]!")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
setErrors(1);
|
48,592 | meta.getFieldPrecision()[i],
meta.getFieldGroup()[i],
meta.getFieldDecimal()[i],
meta.getFieldCurrency()[i],
meta.getFieldDefault()[i],
<BUG>"", // --> The default String value in case a field is empty.
</BUG>
TextFileInputMeta.TYPE_TRIM_BOTH,
data.df, data.dfs,
data.daf, data.dafs
| "", // --> The default String value in case a field is empty. //$NON-NLS-1$
|
48,593 | data.daf, data.dafs
);
}
catch(Exception e)
{
<BUG>logError("Error converting value ["+pol+"], when splitting field ["+meta.getSplitField()+"]!");
setErrors(1);</BUG>
stopAll();
return false;
}
| logError(Messages.getString("FieldSplitter.Log.ErrorConvertingSplitValue",pol,meta.getSplitField()+"]!")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
setErrors(1);
|
48,594 | }
public void run()
{
try
{
<BUG>logBasic("Starting to run...");
while (processRow(meta, data) && !isStopped());</BUG>
}
catch(Exception e)
{
| if (insert) r.addValue(data.fieldnr+i, value); else r.addValue(value);
|
48,595 | private final Settings settings;
private final ImmutableMap<String, IndexMetaData> indices;
private final ImmutableMap<String, IndexTemplateMetaData> templates;
private final ImmutableMap<String, Custom> customs;
private final transient int totalNumberOfShards;
<BUG>private final String[] allIndices;
private final String[] allOpenIndices;</BUG>
private final ImmutableMap<String, ImmutableMap<String, AliasMetaData>> aliases;
private final ImmutableMap<String, ImmutableMap<String, ImmutableSet<String>>> aliasToIndexToSearchRoutingMap;
private final ImmutableMap<String, ImmutableMap<String, Boolean>> indexToAliasFilteringRequiredMap;
| private final ImmutableSet<String> allIndicesSet;
private final String[] allOpenIndices;
|
48,596 | this.totalNumberOfShards = totalNumberOfShards;
List<String> allIndicesLst = Lists.newArrayList();
for (IndexMetaData indexMetaData : indices.values()) {
allIndicesLst.add(indexMetaData.index());
}
<BUG>allIndices = allIndicesLst.toArray(new String[allIndicesLst.size()]);
List<String> allOpenIndices = Lists.newArrayList();</BUG>
for (IndexMetaData indexMetaData : indices.values()) {
if (indexMetaData.state() == IndexMetaData.State.OPEN) {
allOpenIndices.add(indexMetaData.index());
| allIndicesSet = ImmutableSet.copyOf(allIndices);
List<String> allOpenIndices = Lists.newArrayList();
|
48,597 | public ImmutableMap<String, ImmutableMap<String, AliasMetaData>> getAliases() {
return aliases();
}
public String[] concreteAllIndices() {
return allIndices;
<BUG>}
public String[] getConcreteAllIndices() {</BUG>
return concreteAllIndices();
}
public String[] concreteAllOpenIndices() {
| public ImmutableSet<String> concreteAllIndicesAsSet() {
return allIndicesSet;
public String[] getConcreteAllIndices() {
|
48,598 | result = new THashSet<String>(Arrays.asList(wildcardOnlyOpen ? concreteAllOpenIndices() : concreteAllIndices()));
}
add = false;
aliasOrIndex = aliasOrIndex.substring(1);
}
<BUG>if (!Regex.isSimpleMatchPattern(aliasOrIndex)) {
if (result != null) {</BUG>
if (add) {
result.add(aliasOrIndex);
} else {
| if (!ignoreMissing && !aliasAndIndexToIndexMap.containsKey(aliasOrIndex)) {
throw new IndexMissingException(new Index(aliasOrIndex));
if (result != null) {
|
48,599 | import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.block.ClusterBlockException;
import org.elasticsearch.cluster.block.ClusterBlockLevel;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.metadata.MetaDataDeleteIndexService;
<BUG>import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;</BUG>
import org.elasticsearch.index.percolator.PercolatorService;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService;
| import org.elasticsearch.common.regex.Regex;
import org.elasticsearch.common.settings.Settings;
|
48,600 | getEditorTextField(component).getDocument().replaceString(0, getValue().length(), value == null ? "" : value);
}
}.execute();
}
protected void updateComponent() {
<BUG>if (!getDomElement().isValid()) return;
final EditorTextField textField = getEditorTextField(getComponent());</BUG>
final Project project = getProject();
ApplicationManager.getApplication().invokeLater(new Runnable() {
public void run() {
| final DomElement domElement = getDomElement();
if (domElement == null || !domElement.isValid()) return;
final EditorTextField textField = getEditorTextField(getComponent());
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.