id
int64 1
49k
| buggy
stringlengths 34
37.5k
| fixed
stringlengths 2
37k
|
---|---|---|
47,901 | <T> JournalBulkWriter<T> bulkWriter(Class<T> clazz) throws JournalException;
<T> JournalBulkWriter<T> bulkWriter(Class<T> clazz, String location) throws JournalException;
<T> JournalBulkWriter<T> bulkWriter(Class<T> clazz, String location, int recordHint) throws JournalException;
<T> JournalBulkWriter<T> bulkWriter(JournalKey<T> key) throws JournalException;
<T> JournalWriter<T> bulkWriter(MetadataBuilder<T> metadata) throws JournalException;
<BUG><T> JournalWriter<T> bulkWriter(JournalMetadata<T> metadata) throws JournalException;
JournalWriter bulkWriter(String location) throws JournalException;</BUG>
JournalConfiguration getConfiguration();
<T> JournalWriter<T> writer(Class<T> clazz) throws JournalException;
<T> JournalWriter<T> writer(Class<T> clazz, String location) throws JournalException;
| <T> JournalWriter<T> bulkWriter(JournalMetadata<T> metadata, JournalKey<T> key) throws JournalException;
JournalWriter bulkWriter(String location) throws JournalException;
|
47,902 | package com.questdb.factory;
<BUG>import com.questdb.*;
import com.questdb.ex.JournalException;</BUG>
import com.questdb.factory.configuration.JournalConfiguration;
import com.questdb.factory.configuration.JournalConfigurationBuilder;
| import com.questdb.JournalBulkWriter;
import com.questdb.JournalKey;
import com.questdb.JournalWriter;
import com.questdb.PartitionBy;
import com.questdb.ex.JournalException;
|
47,903 | public JournalFactory(String journalBase) {
super(new JournalConfigurationBuilder().build(journalBase));
}
public JournalFactory(JournalConfiguration configuration) {
super(configuration);
<BUG>}
@Override
public <T> JournalBulkReader<T> bulkReader(JournalKey<T> key) throws JournalException {
return new JournalBulkReader<>(getOrCreateMetadata(key), key);</BUG>
}
| [DELETED] |
47,904 | public <T> JournalBulkWriter<T> bulkWriter(Class<T> clazz, String location, int recordHint) throws JournalException {
return bulkWriter(new JournalKey<>(clazz, location, PartitionBy.DEFAULT, recordHint));
}
@Override
public <T> JournalBulkWriter<T> bulkWriter(JournalKey<T> key) throws JournalException {
<BUG>return new JournalBulkWriter<>(getConfiguration().createMetadata(key), key);
</BUG>
}
@Override
public <T> JournalWriter<T> bulkWriter(MetadataBuilder<T> b) throws JournalException {
| return bulkWriter(getConfiguration().createMetadata(key), key);
|
47,905 | Date endDate = (Date)taskContextMap.get("endDate");
clearBackgroundTaskStatus(backgroundTask);
File file = null;
MissingReferences missingReferences = null;
try {
<BUG>Date lastPublishDate = new Date();
if (endDate != null) {
lastPublishDate = endDate;
}</BUG>
file = LayoutLocalServiceUtil.exportLayoutsAsFile(
| [DELETED] |
47,906 | backgroundTask = markBackgroundTask(backgroundTask, "validated");
LayoutLocalServiceUtil.importLayouts(
userId, targetGroupId, privateLayout, parameterMap, file);
boolean updateLastPublishDate = MapUtil.getBoolean(
parameterMap, PortletDataHandlerKeys.UPDATE_LAST_PUBLISH_DATE);
<BUG>if (updateLastPublishDate) {
StagingUtil.updateLastPublishDate(</BUG>
sourceGroupId, privateLayout, lastPublishDate);
}
}
| Date lastPublishDate = endDate;
if (lastPublishDate == null) {
lastPublishDate = new Date();
StagingUtil.updateLastPublishDate(
|
47,907 | long stagingRequestId = 0;
File file = null;
FileInputStream fileInputStream = null;
MissingReferences missingReferences = null;
try {
<BUG>Date lastPublishDate = new Date();
if (endDate != null) {
lastPublishDate = endDate;
}</BUG>
file = exportLayoutsAsFile(
| [DELETED] |
47,908 | backgroundTask = markBackgroundTask(backgroundTask, "validated");
StagingServiceHttp.publishStagingRequest(
httpPrincipal, stagingRequestId, privateLayout, parameterMap);
boolean updateLastPublishDate = MapUtil.getBoolean(
parameterMap, PortletDataHandlerKeys.UPDATE_LAST_PUBLISH_DATE);
<BUG>if (updateLastPublishDate) {
StagingUtil.updateLastPublishDate(</BUG>
sourceGroupId, privateLayout, lastPublishDate);
}
}
| Date lastPublishDate = endDate;
if (lastPublishDate == null) {
lastPublishDate = new Date();
StagingUtil.updateLastPublishDate(
|
47,909 | taskContextMap.get("layoutIds"));
Map<String, String[]> parameterMap =
(Map<String, String[]>)taskContextMap.get("parameterMap");
Date startDate = (Date)taskContextMap.get("startDate");
Date endDate = (Date)taskContextMap.get("endDate");
<BUG>Date lastPublishDate = new Date();
if (endDate != null) {
lastPublishDate = endDate;
}</BUG>
File larFile = LayoutLocalServiceUtil.exportLayoutsAsFile(
| [DELETED] |
47,910 | endDate);
BackgroundTaskLocalServiceUtil.addBackgroundTaskAttachment(
userId, backgroundTask.getBackgroundTaskId(), fileName, larFile);
boolean updateLastPublishDate = MapUtil.getBoolean(
parameterMap, PortletDataHandlerKeys.UPDATE_LAST_PUBLISH_DATE);
<BUG>if (updateLastPublishDate) {
StagingUtil.updateLastPublishDate(</BUG>
groupId, privateLayout, lastPublishDate);
}
return BackgroundTaskResult.SUCCESS;
| Date lastPublishDate = endDate;
if (lastPublishDate == null) {
lastPublishDate = new Date();
StagingUtil.updateLastPublishDate(
|
47,911 | 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;
|
47,912 | 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();
|
47,913 | 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: " +
|
47,914 | 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;
|
47,915 | 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]);
|
47,916 | 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;
|
47,917 | package org.opennms.web.svclayer.support;
import java.lang.reflect.InvocationTargetException;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
<BUG>import java.util.Map;
import java.util.TreeMap;</BUG>
import java.util.Map.Entry;
import org.apache.commons.beanutils.MethodUtils;
import org.opennms.netmgt.dao.ExtensionManager;
| import java.util.Set;
import java.util.TreeMap;
|
47,918 | private static Map<String,String> m_policies;
public void setActiveForeignSourceRepository(ForeignSourceRepository repo) {
m_activeForeignSourceRepository = repo;
}
public void setPendingForeignSourceRepository(ForeignSourceRepository repo) {
<BUG>m_pendingForeignSourceRepository = repo;
}</BUG>
public ForeignSource getForeignSource(String name) {
return m_pendingForeignSourceRepository.getForeignSource(name);
}
| public Set<ForeignSource> getAllForeignSources() {
return m_activeForeignSourceRepository.getForeignSources();
|
47,919 | package org.opennms.netmgt.provision.persist.foreignsource;
import java.io.Serializable;
<BUG>import java.util.ArrayList;
import java.util.GregorianCalendar;</BUG>
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
| import java.util.Date;
import java.util.GregorianCalendar;
|
47,920 | package org.opennms.web.controller;
import java.util.HashMap;
<BUG>import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.opennms.web.svclayer.ManualProvisioningService;
import org.springframework.validation.BindException;</BUG>
import org.springframework.web.servlet.ModelAndView;
| import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
import org.opennms.netmgt.config.modelimport.ModelImport;
import org.opennms.netmgt.provision.persist.foreignsource.ForeignSource;
import org.opennms.web.svclayer.support.ForeignSourceService;
import org.springframework.validation.BindException;
|
47,921 | import org.opennms.netmgt.provision.persist.ForeignSourceRepository;</BUG>
import org.opennms.netmgt.provision.persist.foreignsource.ForeignSource;
public interface ForeignSourceService {
void setActiveForeignSourceRepository(ForeignSourceRepository repo);
<BUG>void setPendingForeignSourceRepository(ForeignSourceRepository repo);
ForeignSource getForeignSource(String name);</BUG>
ForeignSource saveForeignSource(String name, ForeignSource fs);
ForeignSource deployForeignSource(String name);
ForeignSource deleteForeignSource(String name);
ForeignSource deletePath(String foreignSourceName, String dataPath);
| package org.opennms.web.svclayer.support;
import java.util.Map;
import java.util.Set;
import org.opennms.netmgt.provision.persist.ForeignSourceRepository;
Set<ForeignSource> getAllForeignSources();
ForeignSource getForeignSource(String name);
|
47,922 | 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() );
|
47,923 | 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_();
|
47,924 | 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 );
|
47,925 | 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 );
|
47,926 | 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_();
|
47,927 | 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_();
|
47,928 | 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_();
|
47,929 | {
ReverseDependencyLink p1 = (ReverseDependencyLink) o1;
ReverseDependencyLink p2 = (ReverseDependencyLink) o2;
return p1.getProject().getId().compareTo( p2.getProject().getId() );
}
<BUG>else
{</BUG>
return 0;
}
}
| iconError( sink );
|
47,930 | import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.MotionEvent;
<BUG>import android.view.View;
import com.chad.baserecyclerviewadapterhelper.adapter.ItemClickAdapter;</BUG>
import com.chad.baserecyclerviewadapterhelper.base.BaseActivity;
import com.chad.baserecyclerviewadapterhelper.entity.ClickEntity;
import com.chad.library.adapter.base.BaseQuickAdapter;
| import android.widget.Toast;
import com.chad.baserecyclerviewadapterhelper.adapter.ItemClickAdapter;
|
47,931 | if (mIsPrepressed && mPressedView != null) {
mIsShowPress = true;
}
super.onShowPress(e);
}
<BUG>public ItemTouchHelperGestureListener(RecyclerView recyclerView) {
this.recyclerView = recyclerView;</BUG>
}
@Override
public boolean onSingleTapUp(MotionEvent e) {
| this.recyclerView = recyclerView;
|
47,932 | childView.setPressed(false);
}</BUG>
}
setPressViewHotSpot(e,pressedView);
mPressedView.setPressed(true);
<BUG>for (Iterator it = childClickViewIds.iterator(); it.hasNext(); ) {
View childView = pressedView.findViewById((Integer) it.next());
childView.setPressed(false);
}</BUG>
onItemClick(baseQuickAdapter, pressedView, vh.getLayoutPosition() - baseQuickAdapter.getHeaderLayoutCount());
| for (Integer childClickViewId : childClickViewIds) {
View childView = pressedView.findViewById(childClickViewId);
if (childView!=null){
|
47,933 | public abstract void onItemLongClick(BaseQuickAdapter adapter, View view, int position);
public abstract void onItemChildClick(BaseQuickAdapter adapter, View view, int position);
public abstract void onItemChildLongClick(BaseQuickAdapter adapter, View view, int position);
public boolean inRangeOfView(View view, MotionEvent ev) {
int[] location = new int[2];
<BUG>if (view.getVisibility()!=View.VISIBLE){
</BUG>
return false;
}
view.getLocationOnScreen(location);
| if (view==null||view.getVisibility()!=View.VISIBLE){
|
47,934 | SModule cmd = ((SModule) MapSequence.fromMap(_params).get("cmodule"));
if (cmd instanceof Generator) {
cmd = ((Generator) cmd).getSourceLanguage();
}
List<SModule> rv = ListSequence.fromList(new ArrayList<SModule>());
<BUG>if (cmd != null) {
ListSequence.fromList(rv).insertElement(0, cmd);
} else if (((List<SModule>) MapSequence.fromMap(_params).get("modules")) != null) {
ListSequence.fromList(rv).addSequence(ListSequence.fromList(((List<SModule>) MapSequence.fromMap(_params).get("modules"))));
}</BUG>
return rv;
| if (cmd != null && !(ListSequence.fromList(rv).contains(cmd))) {
ListSequence.fromList(rv).addElement(cmd);
|
47,935 | SModule cmd = ((SModule) MapSequence.fromMap(_params).get("cmodule"));
if (cmd instanceof Generator) {
cmd = ((Generator) cmd).getSourceLanguage();
}
List<SModule> rv = ListSequence.fromList(new ArrayList<SModule>());
<BUG>if (cmd != null) {
ListSequence.fromList(rv).insertElement(0, cmd);
} else if (((List<SModule>) MapSequence.fromMap(_params).get("modules")) != null) {
ListSequence.fromList(rv).addSequence(ListSequence.fromList(((List<SModule>) MapSequence.fromMap(_params).get("modules"))));
}</BUG>
return rv;
| if (cmd != null && !(ListSequence.fromList(rv).contains(cmd))) {
ListSequence.fromList(rv).addElement(cmd);
|
47,936 | SModule cmd = ((SModule) MapSequence.fromMap(_params).get("cmodule"));
if (cmd instanceof Generator) {
cmd = ((Generator) cmd).getSourceLanguage();
}
List<SModule> rv = ListSequence.fromList(new ArrayList<SModule>());
<BUG>if (cmd != null) {
ListSequence.fromList(rv).insertElement(0, cmd);
} else if (((List<SModule>) MapSequence.fromMap(_params).get("modules")) != null) {
ListSequence.fromList(rv).addSequence(ListSequence.fromList(((List<SModule>) MapSequence.fromMap(_params).get("modules"))));
}</BUG>
return rv;
| if (cmd != null && !(ListSequence.fromList(rv).contains(cmd))) {
ListSequence.fromList(rv).addElement(cmd);
|
47,937 | public class FocusManager extends java.awt.DefaultKeyboardFocusManager
{
private static final Object FOCUS_FORWARD = "FORWARD";
private static final Object FOCUS_BACKWARD = "BACKWARD";
private static FocusManager Singleton;
<BUG>protected Component mForcedFocus = null;
protected Component mForcedFocusClickedChild = null;</BUG>
protected Container mForcedFocusCycleRoot = null;
protected Window mForcedFocusWindow = null;
protected static boolean mForcingFocus = false;
| protected Component mFocusOwnerBeforeForced = null;
protected Component mForcedFocusClickedChild = null;
|
47,938 | String term = (String) Util.invoke(System.class, "getenv", "TERM");
if (term == null || term.indexOf("color") < 0) {
TERM_RED = TERM_GREEN = TERM_YELLOW = TERM_CLEAR = "";
}
}
<BUG>UseForcedFocus = GUI.UseAlwaysOnTop;
} else</BUG>
if (DEBUG.INIT) System.out.println(Singleton + ": already installed.");
}
public static Component getFocused() {
| UseForcedFocus = GUI.UseAlwaysOnTop
|| true; // Turn on for now so toolbars can have false focusableWindowState
} else
|
47,939 | if (focusCycleRoot == null || isPopup(focusCycleRoot)) {
if (DEBUG.FOCUS) out("focusCycleRoot is " + name(focusCycleRoot) + ", no focus change for popups");
return;
}
final boolean wasForcingFocus = mForcingFocus;
<BUG>if (mForcingFocus)
clearForcedFocus();</BUG>
final Component forceable;
final Window focusCycleWindow = getFocusCycleWindow(focusCycleRoot);
if (focusCycleWindow.isFocusableWindow())
| [DELETED] |
47,940 | final Window focusCycleWindow = getFocusCycleWindow(focusCycleRoot);
if (focusCycleWindow.isFocusableWindow())
forceable = null;
else
forceable = getMouseClickForceFocusableComponent(clicked);
<BUG>if (forceable == null) {
if (wasForcingFocus && clicked == super.getFocusOwner()) {
simulateFocusGained(clicked);
}</BUG>
} else {
| if (mForcingFocus)
clearForcedFocus(true);
|
47,941 | if (DEBUG.FOCUS) out(TERM_GREEN + "SETTING FORCED FOCUS " + name(forceable) + TERM_CLEAR);
if (mForcingFocus) {
if (mForcedFocus == forceable)
return;
else
<BUG>clearForcedFocus();
}
Component realFocusOwner = super.getFocusOwner();
if (realFocusOwner != null)
simulateFocusLost(realFocusOwner);</BUG>
mForcedFocus = forceable;
| clearForcedFocus(false);
} else {
mFocusOwnerBeforeForced = super.getFocusOwner();
if (mFocusOwnerBeforeForced != null)
simulateFocusLost(mFocusOwnerBeforeForced, forceable);
|
47,942 | mForcedFocusCycleRoot = focusCycleRoot;
mForcedFocusWindow = getFocusCycleWindow(focusCycleRoot);
mForcingFocus = true;
simulateFocusGained(mForcedFocus);
}
<BUG>private synchronized void clearForcedFocus()
</BUG>
{
if (mForcingFocus == false)
return;
| private synchronized void clearForcedFocus(boolean permanent)
|
47,943 | super.setGlobalPermanentFocusOwner(c);
}
public void clearGlobalFocusOwner() {
if (DEBUG.FOCUS) trace("clearGlobalFocusOwner; force", mForcedFocus);
if (DEBUG.FOCUS) out("KeyboardFocusManager.clearGlobalFocusOwner: honoring");
<BUG>clearForcedFocus();
</BUG>
super.clearGlobalFocusOwner();
}
protected Window getGlobalFocusedWindow() throws SecurityException {
| clearForcedFocus(true);
|
47,944 | import com.intellij.refactoring.RefactoringBundle;
import com.intellij.refactoring.ui.*;
import com.intellij.refactoring.util.CommonRefactoringUtil;
import com.intellij.refactoring.util.EnumConstantsUtil;
import com.intellij.refactoring.util.RefactoringMessageUtil;
<BUG>import com.intellij.ui.*;
import com.intellij.util.ArrayUtil;
import com.intellij.util.IncorrectOperationException;</BUG>
import gnu.trove.THashSet;
| import com.intellij.ui.RecentsManager;
import com.intellij.ui.ReferenceEditorComboWithBrowseButton;
import com.intellij.ui.StateRestoringCheckBox;
import com.intellij.util.IncorrectOperationException;
|
47,945 | private JRadioButton myRbpackageLocal;
private JRadioButton myRbPublic;
private TypeSelector myTypeSelector;
private StateRestoringCheckBox myCbDeleteVariable;
private final JavaCodeStyleManager myCodeStyleManager;
<BUG>private TextAccessor myTfTargetClassName;
private PsiClass myDestinationClass;</BUG>
private JPanel myTypePanel;
private JPanel myTargetClassNamePanel;
private JPanel myPanel;
| private ReferenceEditorComboWithBrowseButton myTfTargetClassName;
private PsiClass myDestinationClass;
|
47,946 | assertCorrect("...asked a UN member.");
assertCorrect("In an un-united Germany...");
assertCorrect("Here, a and b are supplementary angles.");
assertCorrect("The Qur'an was translated into Polish.");
assertCorrect("See an:Grammatica");
<BUG>assertCorrect("See http://www.an.com");
assertIncorrect("It was a hour ago.");</BUG>
assertIncorrect("It was an sentence that's long.");
assertIncorrect("It was a uninteresting talk.");
assertIncorrect("An university");
| assertCorrect("Station A equals station B.");
assertIncorrect("It was a hour ago.");
|
47,947 | 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;
|
47,948 | 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();
|
47,949 | 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: " +
|
47,950 | 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;
|
47,951 | 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]);
|
47,952 | 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;
|
47,953 | spec.setStepper(new GillespieStepper());
spec.setSimulationTime(simulationTimeInput.get());
spec.setEvenSampling(nSamplesInput.get());
spec.setnTraj(nTrajInput.get());
master.model.PopulationState initState = new master.model.PopulationState();
<BUG>for (PopulationSize popSize : initialStateInput.get().popSizesInput.get())
for (Population pop : popSize.getPopSizes(modelInput.get()).keySet())
initState.set(pop, popSize.getPopSizes(modelInput.get()).get(pop));
spec.setInitPopulationState(initState);</BUG>
for (PopulationEndCondition endCondition : endConditionsInput.get())
| for (PopulationSize popSize : initialStateInput.get().popSizesInput.get()) {
popSize.computePopulationSizes(modelInput.get());
for (Population pop : popSize.getPopSizes().keySet())
initState.set(pop, popSize.getPopSizes().get(pop));
}
spec.setInitPopulationState(initState);
|
47,954 | spec.setSimulationTime(simulationTimeInput.get());
else
spec.setSimulationTime(Double.POSITIVE_INFINITY);
spec.setnTraj(nTrajInput.get());
master.model.PopulationState initState = new master.model.PopulationState();
<BUG>for (PopulationSize popSize : initialStateInput.get().popSizesInput.get())
for (Population pop : popSize.getPopSizes(modelInput.get()).keySet())
initState.set(pop, popSize.getPopSizes(modelInput.get()).get(pop));
spec.setInitPopulationState(initState);</BUG>
for (PopulationEndCondition endCondition : endConditionsInput.get())
| for (PopulationSize popSize : initialStateInput.get().popSizesInput.get()) {
popSize.computePopulationSizes(modelInput.get());
for (Population pop : popSize.getPopSizes().keySet())
initState.set(pop, popSize.getPopSizes().get(pop));
}
spec.setInitPopulationState(initState);
|
47,955 | } else
spec.setSimulationTime(Double.POSITIVE_INFINITY);
}
spec.setnTraj(nTrajInput.get());
PopulationState initState = new PopulationState();
<BUG>for (PopulationSize popSize : initialStateInput.get().popSizesInput.get())
for (Population pop : popSize.getPopSizes(modelInput.get()).keySet())
initState.set(pop, popSize.getPopSizes(modelInput.get()).get(pop));
spec.setInitPopulationState(initState);</BUG>
spec.setInitNodes(initialStateInput.get().getInitNodes());
| for (PopulationSize popSize : initialStateInput.get().popSizesInput.get()) {
popSize.computePopulationSizes(modelInput.get());
for (Population pop : popSize.getPopSizes().keySet())
initState.set(pop, popSize.getPopSizes().get(pop));
spec.setInitPopulationState(initState);
|
47,956 | if (simulationTimeInput.get() != null)
spec.setSimulationTime(simulationTimeInput.get());
else
spec.setSimulationTime(Double.POSITIVE_INFINITY);
PopulationState initState = new PopulationState();
<BUG>for (PopulationSize popSize : initialStateInput.get().popSizesInput.get())
for (Population pop : popSize.getPopSizes(modelInput.get()).keySet())
initState.set(pop, popSize.getPopSizes(modelInput.get()).get(pop));
spec.setInitPopulationState(initState);</BUG>
for (PopulationEndCondition endCondition : endConditionsInput.get())
| for (PopulationSize popSize : initialStateInput.get().popSizesInput.get()) {
popSize.computePopulationSizes(modelInput.get());
for (Population pop : popSize.getPopSizes().keySet())
initState.set(pop, popSize.getPopSizes().get(pop));
}
spec.setInitPopulationState(initState);
|
47,957 | import master.conditions.LineageEndCondition;
import master.conditions.PopulationEndCondition;
import master.conditions.PostSimCondition;
import master.model.*;
import master.outputs.InheritanceTrajectoryOutput;
<BUG>import master.postprocessors.InheritancePostProcessor;
import java.util.*;</BUG>
public class InheritanceTrajectory extends Trajectory {
public Input<Boolean> samplePopulationSizesInput = new Input<>(
"samplePopulationSizes",
| import master.postprocessors.LineageSampler;
import java.util.*;
|
47,958 | + "time or one or more end conditions.");
} else
spec.setSimulationTime(Double.POSITIVE_INFINITY);
}
master.model.PopulationState initState = new master.model.PopulationState();
<BUG>for (PopulationSize popSize : initialStateInput.get().popSizesInput.get())
for (Population pop : popSize.getPopSizes(modelInput.get()).keySet())
initState.set(pop, popSize.getPopSizes(modelInput.get()).get(pop));
spec.setInitPopulationState(initState);</BUG>
spec.setInitNodes(initialStateInput.get().getInitNodes());
| for (PopulationSize popSize : initialStateInput.get().popSizesInput.get()) {
popSize.computePopulationSizes(modelInput.get());
for (Population pop : popSize.getPopSizes().keySet())
initState.set(pop, popSize.getPopSizes().get(pop));
spec.setInitPopulationState(initState);
|
47,959 | spec.addPopSizeEndCondition(endCondition);
for (LineageEndCondition endCondition : lineageEndConditionsInput.get())
spec.addLineageEndCondition(endCondition);
for (LeafCountEndCondition endCondition : leafCountEndConditionsInput.get())
spec.addLeafCountEndCondition(endCondition);
<BUG>for (InheritancePostProcessor postProc : inheritancePostProcessorsInput.get())
spec.addInheritancePostProcessor(postProc);
for (PostSimCondition condition : postSimConditionsInput.get())</BUG>
spec.addPostSimCondition(condition);
| for (InheritancePostProcessor postProc : inheritancePostProcessorsInput.get()) {
if (postProc instanceof LineageSampler)
((LineageSampler) postProc).computePopulationSizes(modelInput.get());
}
for (PostSimCondition condition : postSimConditionsInput.get())
|
47,960 | import org.spongepowered.api.world.Locatable;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;
import javax.annotation.Nullable;
import java.util.List;
<BUG>import java.util.Optional;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG>
public class CommandDelete extends FCCommandBase {
private static final FlagMapper MAPPER = map -> key -> value -> {
map.put(key, value);
| import java.util.stream.Stream;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
|
47,961 | .append(Text.of(TextColors.GREEN, "Usage: "))
.append(getUsage(source))
.build());
return CommandResult.empty();
} else if (isIn(REGIONS_ALIASES, parse.args[0])) {
<BUG>if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));
IRegion region = FGManager.getInstance().getRegion(parse.args[1]);
</BUG>
boolean isWorldRegion = false;
if (region == null) {
| String regionName = parse.args[1];
IRegion region = FGManager.getInstance().getRegion(regionName).orElse(null);
|
47,962 | </BUG>
isWorldRegion = true;
}
if (region == null)
<BUG>throw new CommandException(Text.of("No region exists with the name \"" + parse.args[1] + "\"!"));
if (region instanceof GlobalWorldRegion) {
</BUG>
throw new CommandException(Text.of("You may not delete the global region!"));
}
| if (world == null)
throw new CommandException(Text.of("No world exists with name \"" + worldName + "\"!"));
if (world == null) throw new CommandException(Text.of("Must specify a world!"));
region = FGManager.getInstance().getWorldRegion(world, regionName).orElse(null);
throw new CommandException(Text.of("No region exists with the name \"" + regionName + "\"!"));
if (region instanceof IGlobal) {
|
47,963 | source.getName() + " deleted " + (isWorldRegion ? "world" : "") + "region"
);
return CommandResult.success();
} else if (isIn(HANDLERS_ALIASES, parse.args[0])) {
if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));
<BUG>IHandler handler = FGManager.getInstance().gethandler(parse.args[1]);
if (handler == null)
throw new ArgumentParseException(Text.of("No handler exists with that name!"), parse.args[1], 1);
if (handler instanceof GlobalHandler)</BUG>
throw new CommandException(Text.of("You may not delete the global handler!"));
| Optional<IHandler> handlerOpt = FGManager.getInstance().gethandler(parse.args[1]);
if (!handlerOpt.isPresent())
IHandler handler = handlerOpt.get();
if (handler instanceof GlobalHandler)
|
47,964 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
else if (parse.current.index == 1) {
| return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
47,965 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
else if (parse.current.index == 1) {
| return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
47,966 | @Dependency(id = "foxcore")
},
description = "A world protection plugin built for SpongeAPI. Requires FoxCore.",
authors = {"gravityfox"},
url = "https://github.com/FoxDenStudio/FoxGuard")
<BUG>public final class FoxGuardMain {
public final Cause pluginCause = Cause.builder().named("plugin", this).build();
private static FoxGuardMain instanceField;</BUG>
@Inject
private Logger logger;
| private static FoxGuardMain instanceField;
|
47,967 | private UserStorageService userStorage;
private EconomyService economyService = null;
private boolean loaded = false;
private FCCommandDispatcher fgDispatcher;
public static FoxGuardMain instance() {
<BUG>return instanceField;
}</BUG>
@Listener
public void construct(GameConstructionEvent event) {
instanceField = this;
| }
public static Cause getCause() {
return instance().pluginCause;
}
|
47,968 | return configDirectory;
}
public boolean isLoaded() {
return loaded;
}
<BUG>public static Cause getCause() {
return instance().pluginCause;
}</BUG>
public EconomyService getEconomyService() {
return economyService;
| [DELETED] |
47,969 | import org.spongepowered.api.world.Locatable;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;
import javax.annotation.Nullable;
import java.util.*;
<BUG>import java.util.stream.Collectors;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG>
public class CommandHere extends FCCommandBase {
private static final String[] PRIORITY_ALIASES = {"priority", "prio", "p"};
private static final FlagMapper MAPPER = map -> key -> value -> {
| import java.util.stream.Stream;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
|
47,970 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
else if (parse.current.index > 0) {
| return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
47,971 | private static FGStorageManager instance;
private final Logger logger = FoxGuardMain.instance().getLogger();</BUG>
private final Set<LoadEntry> loaded = new HashSet<>();
private final Path directory = getDirectory();
private final Map<String, Path> worldDirectories;
<BUG>private FGStorageManager() {
defaultModifiedMap = new CacheMap<>((k, m) -> {</BUG>
if (k instanceof IFGObject) {
m.put((IFGObject) k, true);
return true;
| public final HashMap<IFGObject, Boolean> defaultModifiedMap;
private final UserStorageService userStorageService;
private final Logger logger = FoxGuardMain.instance().getLogger();
userStorageService = FoxGuardMain.instance().getUserStorage();
defaultModifiedMap = new CacheMap<>((k, m) -> {
|
47,972 | String name = fgObject.getName();
Path singleDir = dir.resolve(name.toLowerCase());
</BUG>
boolean shouldSave = fgObject.shouldSave();
if (force || shouldSave) {
<BUG>logger.info((shouldSave ? "S" : "Force s") + "aving handler \"" + name + "\" in directory: " + singleDir);
</BUG>
constructDirectory(singleDir);
try {
fgObject.save(singleDir);
| UUID owner = fgObject.getOwner();
boolean isOwned = !owner.equals(SERVER_UUID);
Optional<User> userOwner = userStorageService.get(owner);
String logName = (userOwner.isPresent() ? userOwner.get().getName() + ":" : "") + (isOwned ? owner + ":" : "") + name;
if (fgObject.autoSave()) {
Path singleDir = serverDir.resolve(name.toLowerCase());
logger.info((shouldSave ? "S" : "Force s") + "aving handler " + logName + " in directory: " + singleDir);
|
47,973 | if (fgObject.autoSave()) {
Path singleDir = dir.resolve(name.toLowerCase());
</BUG>
boolean shouldSave = fgObject.shouldSave();
if (force || shouldSave) {
<BUG>logger.info((shouldSave ? "S" : "Force s") + "aving world region \"" + name + "\" in directory: " + singleDir);
</BUG>
constructDirectory(singleDir);
try {
fgObject.save(singleDir);
| Path singleDir = serverDir.resolve(name.toLowerCase());
logger.info((shouldSave ? "S" : "Force s") + "aving world region " + logName + " in directory: " + singleDir);
|
47,974 | public synchronized void loadRegionLinks() {
logger.info("Loading region links");
try (DB mainDB = DBMaker.fileDB(directory.resolve("regions.foxdb").normalize().toString()).make()) {
Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen();
linksMap.entrySet().forEach(entry -> {
<BUG>IRegion region = FGManager.getInstance().getRegion(entry.getKey());
if (region != null) {
logger.info("Loading links for region \"" + region.getName() + "\"");</BUG>
String handlersString = entry.getValue();
| Optional<IRegion> regionOpt = FGManager.getInstance().getRegion(entry.getKey());
if (regionOpt.isPresent()) {
IRegion region = regionOpt.get();
logger.info("Loading links for region \"" + region.getName() + "\"");
|
47,975 | public synchronized void loadWorldRegionLinks(World world) {
logger.info("Loading world region links for world \"" + world.getName() + "\"");
try (DB mainDB = DBMaker.fileDB(worldDirectories.get(world.getName()).resolve("wregions.foxdb").normalize().toString()).make()) {
Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen();
linksMap.entrySet().forEach(entry -> {
<BUG>IRegion region = FGManager.getInstance().getWorldRegion(world, entry.getKey());
if (region != null) {
logger.info("Loading links for world region \"" + region.getName() + "\"");</BUG>
String handlersString = entry.getValue();
| Optional<IWorldRegion> regionOpt = FGManager.getInstance().getWorldRegion(world, entry.getKey());
if (regionOpt.isPresent()) {
IWorldRegion region = regionOpt.get();
logger.info("Loading links for world region \"" + region.getName() + "\"");
|
47,976 | StringBuilder builder = new StringBuilder();
for (Iterator<IHandler> it = handlers.iterator(); it.hasNext(); ) {
builder.append(it.next().getName());
if (it.hasNext()) builder.append(",");
}
<BUG>return builder.toString();
}</BUG>
private final class LoadEntry {
public final String name;
public final Type type;
| public enum Type {
REGION, WREGION, HANDLER
|
47,977 | .autoCloseQuotes(true)
.leaveFinalAsIs(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "worldregion", "handler", "controller").stream()
</BUG>
.filter(new StartsWithPredicate(parse.current.token))
.collect(GuavaCollectors.toImmutableList());
else if (parse.current.index == 1) {
| return Stream.of("region", "worldregion", "handler", "controller")
|
47,978 | import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocalFileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.util.Progressable;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AFileSystem extends FileSystem {</BUG>
private URI uri;
private Path workingDir;
private AmazonS3Client s3;
| import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AFileSystem extends FileSystem {
|
47,979 | public void initialize(URI name, Configuration conf) throws IOException {
super.initialize(name, conf);
uri = URI.create(name.getScheme() + "://" + name.getAuthority());
workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri,
this.getWorkingDirectory());
<BUG>String accessKey = conf.get(ACCESS_KEY, null);
String secretKey = conf.get(SECRET_KEY, null);
</BUG>
String userInfo = name.getUserInfo();
| String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null));
String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
|
47,980 | } else {
accessKey = userInfo;
}
}
AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain(
<BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey),
new InstanceProfileCredentialsProvider(),
new S3AAnonymousAWSCredentialsProvider()
);</BUG>
bucket = name.getHost();
| new BasicAWSCredentialsProvider(accessKey, secretKey),
new AnonymousAWSCredentialsProvider()
|
47,981 |
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT));
</BUG>
s3 = new AmazonS3Client(credentials, awsConf);
<BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS);
partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
</BUG>
if (partSize < 5 * 1024 * 1024) {
| new InstanceProfileCredentialsProvider(),
new AnonymousAWSCredentialsProvider()
bucket = name.getHost();
ClientConfiguration awsConf = new ClientConfiguration();
awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS)));
awsConf.setProtocol(conf.getBoolean(NEW_SECURE_CONNECTIONS, conf.getBoolean(OLD_SECURE_CONNECTIONS, DEFAULT_SECURE_CONNECTIONS)) ? Protocol.HTTPS : Protocol.HTTP);
awsConf.setMaxErrorRetry(conf.getInt(NEW_MAX_ERROR_RETRIES, conf.getInt(OLD_MAX_ERROR_RETRIES, DEFAULT_MAX_ERROR_RETRIES)));
awsConf.setSocketTimeout(conf.getInt(NEW_SOCKET_TIMEOUT, conf.getInt(OLD_SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT)));
maxKeys = conf.getInt(NEW_MAX_PAGING_KEYS, conf.getInt(OLD_MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS));
partSize = conf.getLong(NEW_MULTIPART_SIZE, conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE));
partSizeThreshold = conf.getInt(NEW_MIN_MULTIPART_THRESHOLD, conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD));
|
47,982 | cannedACL = null;
}
if (!s3.doesBucketExist(bucket)) {
throw new IOException("Bucket " + bucket + " does not exist");
}
<BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART);
long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE);
</BUG>
if (purgeExistingMultipart) {
| boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART));
long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE));
|
47,983 | import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AOutputStream extends OutputStream {</BUG>
private OutputStream backupStream;
private File backupFile;
private boolean closed;
| import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AOutputStream extends OutputStream {
|
47,984 | this.client = client;
this.progress = progress;
this.fs = fs;
this.cannedACL = cannedACL;
this.statistics = statistics;
<BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
</BUG>
if (conf.get(BUFFER_DIR, null) != null) {
| partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
|
47,985 | if(worldIn.getTileEntity(pos) != null){
TileEntity te = worldIn.getTileEntity(pos);
if(te.hasCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null) && te.getCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null).getTemp() >= -273D + mult){
te.getCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null).addHeat(-mult);
}
<BUG>for(EnumFacing dir : EnumFacing.values()){
if(te.hasCapability(Capabilities.ROTARY_HANDLER_CAPABILITY, dir)){
te.getCapability(Capabilities.ROTARY_HANDLER_CAPABILITY, dir).addEnergy(-mult, false, false);
break;</BUG>
}
| if(te.hasCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null)){
te.getCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null).addHeat(mult);
|
47,986 | public static double betterRound(double numIn, int decPlac){
double opOn = Math.round(numIn * Math.pow(10, decPlac)) / Math.pow(10D, decPlac);
return opOn;
}
public static double centerCeil(double numIn, int tiers){
<BUG>return ((numIn > 0) ? Math.ceil(numIn * tiers) : Math.floor(numIn * tiers)) / tiers;
</BUG>
}
public static double findEfficiency(double speedIn, double lowerLimit, double upperLimit){
speedIn = Math.abs(speedIn);
| return ((numIn > 0) ? Math.ceil(numIn * (double) tiers) : Math.floor(numIn * (double) tiers)) / (double) tiers;
|
47,987 | package com.Da_Technomancer.crossroads.API;
import com.Da_Technomancer.crossroads.API.DefaultStorageHelper.DefaultStorage;
import com.Da_Technomancer.crossroads.API.heat.DefaultHeatHandler;
import com.Da_Technomancer.crossroads.API.heat.IHeatHandler;
import com.Da_Technomancer.crossroads.API.magic.DefaultMagicHandler;
<BUG>import com.Da_Technomancer.crossroads.API.magic.IMagicHandler;
import com.Da_Technomancer.crossroads.API.rotary.DefaultRotaryHandler;
import com.Da_Technomancer.crossroads.API.rotary.IRotaryHandler;
</BUG>
import net.minecraftforge.common.capabilities.Capability;
| import com.Da_Technomancer.crossroads.API.rotary.DefaultAxleHandler;
import com.Da_Technomancer.crossroads.API.rotary.DefaultCogHandler;
import com.Da_Technomancer.crossroads.API.rotary.IAxleHandler;
import com.Da_Technomancer.crossroads.API.rotary.ICogHandler;
|
47,988 | import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;
public class Capabilities{
@CapabilityInject(IHeatHandler.class)
<BUG>public static Capability<IHeatHandler> HEAT_HANDLER_CAPABILITY = null;
@CapabilityInject(IRotaryHandler.class)
public static Capability<IRotaryHandler> ROTARY_HANDLER_CAPABILITY = null;
</BUG>
@CapabilityInject(IMagicHandler.class)
| @CapabilityInject(IAxleHandler.class)
public static Capability<IAxleHandler> AXLE_HANDLER_CAPABILITY = null;
@CapabilityInject(ICogHandler.class)
public static Capability<ICogHandler> COG_HANDLER_CAPABILITY = null;
|
47,989 | public IEffect getMixEffect(Color col){
if(col == null){
return effect;
}
int top = Math.max(col.getBlue(), Math.max(col.getRed(), col.getGreen()));
<BUG>if(top < rand.nextInt(128) + 128){
return voidEffect;</BUG>
}
return effect;
}
| if(top != 255){
return voidEffect;
|
47,990 | 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;
|
47,991 | 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();
|
47,992 | 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: " +
|
47,993 | 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;
|
47,994 | 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]);
|
47,995 | 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;
|
47,996 | import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.DigestOutputStream;
import java.security.MessageDigest;
<BUG>import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;</BUG>
public final class PatchUtils {
| import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
47,997 | package org.jboss.as.patching.runner;
<BUG>import org.jboss.as.boot.DirectoryStructure;
import org.jboss.as.patching.LocalPatchInfo;</BUG>
import org.jboss.as.patching.PatchInfo;
import org.jboss.as.patching.PatchLogger;
import org.jboss.as.patching.PatchMessages;
| import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp;
import org.jboss.as.patching.CommonAttributes;
import org.jboss.as.patching.LocalPatchInfo;
|
47,998 | private static final String PATH_DELIMITER = "/";
public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT;
enum Element {
ADDED_BUNDLE("added-bundle"),
ADDED_MISC_CONTENT("added-misc-content"),
<BUG>ADDED_MODULE("added-module"),
BUNDLES("bundles"),</BUG>
CUMULATIVE("cumulative"),
DESCRIPTION("description"),
MISC_FILES("misc-files"),
| APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
47,999 | final int count = reader.getAttributeCount();
for (int i = 0; i < count; i++) {
final String value = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
<BUG>case APPLIES_TO_VERSION:
builder.addAppliesTo(value);
break;</BUG>
case RESULTING_VERSION:
if(type == Patch.PatchType.CUMULATIVE) {
| [DELETED] |
48,000 | final StringBuilder path = new StringBuilder();
for(final String p : item.getPath()) {
path.append(p).append(PATH_DELIMITER);
}
path.append(item.getName());
<BUG>writer.writeAttribute(Attribute.PATH.name, path.toString());
if(type != ModificationType.REMOVE) {</BUG>
writer.writeAttribute(Attribute.HASH.name, bytesToHexString(item.getContentHash()));
}
if(type != ModificationType.ADD) {
| if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|