id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
7,101 | 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);
|
7,102 | 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] |
7,103 | @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] |
7,104 | 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();
|
7,105 | 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();
|
7,106 | }
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();
|
7,107 | else if (t == ANY_CYPHER_OPTION) {
r = AnyCypherOption(b, 0);
}
else if (t == ANY_FUNCTION_INVOCATION) {
r = AnyFunctionInvocation(b, 0);
<BUG>}
else if (t == BULK_IMPORT_QUERY) {</BUG>
r = BulkImportQuery(b, 0);
}
else if (t == CALL) {
| else if (t == ARRAY) {
r = Array(b, 0);
else if (t == BULK_IMPORT_QUERY) {
|
7,108 | if (!r) r = MapLiteral(b, l + 1);
if (!r) r = MapProjection(b, l + 1);
if (!r) r = CountStar(b, l + 1);
if (!r) r = ListComprehension(b, l + 1);
if (!r) r = PatternComprehension(b, l + 1);
<BUG>if (!r) r = Expression1_12(b, l + 1);
if (!r) r = FilterFunctionInvocation(b, l + 1);</BUG>
if (!r) r = ExtractFunctionInvocation(b, l + 1);
if (!r) r = ReduceFunctionInvocation(b, l + 1);
if (!r) r = AllFunctionInvocation(b, l + 1);
| if (!r) r = Array(b, l + 1);
if (!r) r = FilterFunctionInvocation(b, l + 1);
|
7,109 | private static final int DEFAULT_BUFFER_SIZE = 8192;
private static final Pattern NOT_LIB_FILES = Pattern.compile( "^((?!/lib).)*$" );
private static final FsPermission CACHED_FILE_PERMISSION = new FsPermission( (short) 0755 );
public static final String PENTAHO_BIG_DATA_PLUGIN_FOLDER_NAME = "pentaho-big-data-plugin";
private HadoopConfiguration configuration;
<BUG>public DistributedCacheUtilImpl( HadoopConfiguration configuration ) {
if ( configuration == null ) {
</BUG>
throw new NullPointerException();
| public DistributedCacheUtilImpl( HadoopConfiguration configurationParam ) {
if ( configurationParam == null ) {
|
7,110 |
if ( configuration == null ) {
</BUG>
throw new NullPointerException();
}
<BUG>this.configuration = configuration;
</BUG>
}
public Path getLockFileAt( Path dir ) {
return new Path( dir, ".lock" );
| private static final int DEFAULT_BUFFER_SIZE = 8192;
private static final Pattern NOT_LIB_FILES = Pattern.compile( "^((?!/lib).)*$" );
private static final FsPermission CACHED_FILE_PERMISSION = new FsPermission( (short) 0755 );
public static final String PENTAHO_BIG_DATA_PLUGIN_FOLDER_NAME = "pentaho-big-data-plugin";
private HadoopConfiguration configuration;
public DistributedCacheUtilImpl( HadoopConfiguration configurationParam ) {
if ( configurationParam == null ) {
this.configuration = configurationParam;
|
7,111 | import org.apache.hadoop.util.Progressable;
import org.pentaho.hadoop.shim.api.fs.FileSystem;
import org.pentaho.hadoop.shim.common.ShimUtils;
public class FileSystemProxy extends org.apache.hadoop.fs.FileSystem implements FileSystem {
private org.apache.hadoop.fs.FileSystem delegate;
<BUG>public FileSystemProxy( org.apache.hadoop.fs.FileSystem delegate ) {
if ( delegate == null ) {
</BUG>
throw new NullPointerException();
| public FileSystemProxy( org.apache.hadoop.fs.FileSystem delegateParam ) {
if ( delegateParam == null ) {
|
7,112 |
if ( delegate == null ) {
</BUG>
throw new NullPointerException();
}
<BUG>this.delegate = delegate;
</BUG>
}
@Override
public Object getDelegate() {
| import org.apache.hadoop.util.Progressable;
import org.pentaho.hadoop.shim.api.fs.FileSystem;
import org.pentaho.hadoop.shim.common.ShimUtils;
public class FileSystemProxy extends org.apache.hadoop.fs.FileSystem implements FileSystem {
private org.apache.hadoop.fs.FileSystem delegate;
public FileSystemProxy( org.apache.hadoop.fs.FileSystem delegateParam ) {
if ( delegateParam == null ) {
this.delegate = delegateParam;
|
7,113 | private org.apache.hadoop.mapred.TaskCompletionEvent delegate;
public TaskCompletionEventProxy( org.apache.hadoop.mapred.TaskCompletionEvent delegateParam ) {
if ( delegateParam == null ) {
throw new NullPointerException();
}
<BUG>this.delegate = delegate;
</BUG>
}
@Override
public Object getTaskAttemptId() {
| this.delegate = delegateParam;
|
7,114 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
7,115 | }
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_memo);
<BUG>ChinaPhoneHelper.setStatusBar(this,true);
</BUG>
topicId = getIntent().getLongExtra("topicId", -1);
if (topicId == -1) {
finish();
| ChinaPhoneHelper.setStatusBar(this, true);
|
7,116 | MemoEntry.COLUMN_REF_TOPIC__ID + " = ?"
, new String[]{String.valueOf(topicId)});
}
public Cursor selectMemo(long topicId) {
Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null,
<BUG>MemoEntry._ID + " DESC", null);
</BUG>
if (c != null) {
c.moveToFirst();
}
| MemoEntry.COLUMN_ORDER + " ASC", null);
|
7,117 | MemoEntry._ID + " = ?",
new String[]{String.valueOf(memoId)});
}
public long updateMemoContent(long memoId, String memoContent) {
ContentValues values = new ContentValues();
<BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent);
return db.update(</BUG>
MemoEntry.TABLE_NAME,
values,
MemoEntry._ID + " = ?",
| return db.update(
|
7,118 | import android.widget.RelativeLayout;
import android.widget.TextView;
import com.kiminonawa.mydiary.R;
import com.kiminonawa.mydiary.db.DBManager;
import com.kiminonawa.mydiary.shared.EditMode;
<BUG>import com.kiminonawa.mydiary.shared.ThemeManager;
import java.util.List;
public class MemoAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements EditMode {
</BUG>
private List<MemoEntity> memoList;
| import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
7,119 | private DBManager dbManager;
private boolean isEditMode = false;
private EditMemoDialogFragment.MemoCallback callback;
private static final int TYPE_HEADER = 0;
private static final int TYPE_ITEM = 1;
<BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback) {
this.mActivity = activity;</BUG>
this.topicId = topicId;
this.memoList = memoList;
| public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
7,120 | this.memoList = memoList;
this.dbManager = dbManager;
this.callback = callback;
}
@Override
<BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
</BUG>
View view;
if (isEditMode) {
if (viewType == TYPE_HEADER) {
| public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
7,121 | editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment");
}
});
}
}
<BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private View rootView;
private TextView TV_memo_item_content;</BUG>
private ImageView IV_memo_item_delete;
| protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
private ImageView IV_memo_item_dot;
private TextView TV_memo_item_content;
|
7,122 | List<Address> results = null;
Session session = null;
Query query;
try {
session = DaoUtils.getSession();
<BUG>if (session != null) {
if (names != null && names.size() > 0) {
</BUG>
query = session.getNamedQuery("getAddress");
query.setParameterList("emailList", names);
| if (names != null && !names.isEmpty()) {
|
7,123 | results = query.list();
if (results == null) {
results = new ArrayList<>();
}
log.debug("Addresses found: " + results.size());
<BUG>}
} finally {</BUG>
DaoUtils.closeSession(session);
}
return results;
| } catch (Exception e) {
log.error("Exception while getting the list of addresses: ", e);
} finally {
|
7,124 | import org.wso2.carbon.kernel.config.model.DeploymentModeEnum;
import org.wso2.carbon.kernel.utils.CarbonServerInfo;
import javax.inject.Inject;
import java.nio.file.Path;
import java.nio.file.Paths;
<BUG>import java.util.ArrayList;
import java.util.List;</BUG>
import static org.wso2.carbon.container.options.CarbonDistributionOption.copyFile;
@Listeners(PaxExam.class)
@ExamReactorStrategy(PerClass.class)
| [DELETED] |
7,125 | @Inject
private CarbonRuntime carbonRuntime;
@Inject
private CarbonServerInfo carbonServerInfo;
@Configuration
<BUG>public Option[] createConfiguration() {
List<Option> optionList = new ArrayList<>();
optionList.add(copyCarbonYAMLOption());
return optionList.toArray(new Option[optionList.size()]);</BUG>
}
| private BundleContext bundleContext;
return new Option[] { copyCarbonYAMLOption() };
|
7,126 | import org.testng.annotations.Test;
import org.wso2.carbon.container.CarbonContainerFactory;
import org.wso2.carbon.kernel.runtime.Runtime;
import org.wso2.carbon.kernel.utils.CarbonServerInfo;
import javax.inject.Inject;
<BUG>import java.util.ArrayList;
import java.util.List;</BUG>
import static org.ops4j.pax.exam.CoreOptions.maven;
import static org.wso2.carbon.container.options.CarbonDistributionOption.copyDropinsBundle;
@Listeners(PaxExam.class)
| [DELETED] |
7,127 | import org.wso2.carbon.kernel.utils.CarbonServerInfo;
import org.wso2.carbon.kernel.utils.Utils;
import javax.inject.Inject;
import java.nio.file.Path;
import java.nio.file.Paths;
<BUG>import java.util.ArrayList;
import java.util.List;</BUG>
import static org.wso2.carbon.container.options.CarbonDistributionOption.copyFile;
@Listeners(PaxExam.class)
@ExamReactorStrategy(PerClass.class)
| [DELETED] |
7,128 | @Inject
private BundleContext bundleContext;
@Inject
private CarbonServerInfo carbonServerInfo;
@Configuration
<BUG>public Option[] createConfiguration() {
List<Option> optionList = new ArrayList<>();
optionList.add(copyCarbonYAMLOption());
return optionList.toArray(new Option[optionList.size()]);</BUG>
}
| return new Option[] { copyCarbonYAMLOption() };
|
7,129 | import javax.management.MBeanServer;
import javax.management.ObjectName;
import java.lang.management.ManagementFactory;
import java.nio.file.Path;
import java.nio.file.Paths;
<BUG>import java.util.ArrayList;
import java.util.List;</BUG>
import static org.wso2.carbon.container.options.CarbonDistributionOption.copyFile;
@Listeners(org.ops4j.pax.exam.testng.listener.PaxExam.class)
@ExamReactorStrategy(PerClass.class)
| [DELETED] |
7,130 | }
carbonYmlFilePath = Paths.get(basedir, "src", "test", "resources", "jmx", "carbon.yml");
return copyFile(carbonYmlFilePath, Paths.get("conf", "carbon.yml"));
}
@Configuration
<BUG>public Option[] createConfiguration() {
List<Option> optionList = new ArrayList<>();
optionList.add(copyCarbonYAMLOption());
return optionList.toArray(new Option[optionList.size()]);</BUG>
}
| return new Option[] { copyCarbonYAMLOption() };
|
7,131 | 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 {
|
7,132 | 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));
|
7,133 | } 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()
|
7,134 |
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));
|
7,135 | 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));
|
7,136 | 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 {
|
7,137 | 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);
|
7,138 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
7,139 | }
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_memo);
<BUG>ChinaPhoneHelper.setStatusBar(this,true);
</BUG>
topicId = getIntent().getLongExtra("topicId", -1);
if (topicId == -1) {
finish();
| ChinaPhoneHelper.setStatusBar(this, true);
|
7,140 | MemoEntry.COLUMN_REF_TOPIC__ID + " = ?"
, new String[]{String.valueOf(topicId)});
}
public Cursor selectMemo(long topicId) {
Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null,
<BUG>MemoEntry._ID + " DESC", null);
</BUG>
if (c != null) {
c.moveToFirst();
}
| MemoEntry.COLUMN_ORDER + " ASC", null);
|
7,141 | MemoEntry._ID + " = ?",
new String[]{String.valueOf(memoId)});
}
public long updateMemoContent(long memoId, String memoContent) {
ContentValues values = new ContentValues();
<BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent);
return db.update(</BUG>
MemoEntry.TABLE_NAME,
values,
MemoEntry._ID + " = ?",
| return db.update(
|
7,142 | import android.widget.RelativeLayout;
import android.widget.TextView;
import com.kiminonawa.mydiary.R;
import com.kiminonawa.mydiary.db.DBManager;
import com.kiminonawa.mydiary.shared.EditMode;
<BUG>import com.kiminonawa.mydiary.shared.ThemeManager;
import java.util.List;
public class MemoAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements EditMode {
</BUG>
private List<MemoEntity> memoList;
| import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
7,143 | private DBManager dbManager;
private boolean isEditMode = false;
private EditMemoDialogFragment.MemoCallback callback;
private static final int TYPE_HEADER = 0;
private static final int TYPE_ITEM = 1;
<BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback) {
this.mActivity = activity;</BUG>
this.topicId = topicId;
this.memoList = memoList;
| public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
7,144 | this.memoList = memoList;
this.dbManager = dbManager;
this.callback = callback;
}
@Override
<BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
</BUG>
View view;
if (isEditMode) {
if (viewType == TYPE_HEADER) {
| public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
7,145 | editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment");
}
});
}
}
<BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private View rootView;
private TextView TV_memo_item_content;</BUG>
private ImageView IV_memo_item_delete;
| protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
private ImageView IV_memo_item_dot;
private TextView TV_memo_item_content;
|
7,146 | import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
<BUG>import java.util.List;
import java.util.Set;
import javax.enterprise.context.Dependent;</BUG>
import javax.inject.Named;
import org.jboss.errai.codegen.Statement;
| import java.util.Optional;
import java.util.function.Predicate;
import java.util.stream.Stream;
import javax.enterprise.context.Dependent;
|
7,147 | import org.jboss.errai.ioc.rebind.ioc.injector.api.InjectionContext;
import org.jboss.errai.ioc.rebind.ioc.injector.api.WiringElementType;
import org.jboss.errai.ui.shared.TemplateUtil;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.TagName;
<BUG>import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsType;</BUG>
@IOCExtension
public class ElementProviderExtension implements IOCExtensionConfigurator {
@Override
| import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
|
7,148 | InjectableType.ExtensionProvided);
final FactoryBodyGenerator generator = new AbstractBodyGenerator() {
@Override
protected List<Statement> generateCreateInstanceStatements(final ClassStructureBuilder<?> bodyBlockBuilder,
final Injectable injectable, final DependencyGraph graph, final InjectionContext injectionContext) {
<BUG>final List<Statement> stmts = new ArrayList<Statement>();
final String elementVar = "element";</BUG>
stmts.add(declareFinalVariable(elementVar, com.google.gwt.dom.client.Element.class,
invokeStatic(Document.class, "get").invoke("createElement", loadLiteral(tagName))));
for (final Property property : properties) {
| final List<Statement> stmts = new ArrayList<>();
final String elementVar = "element";
|
7,149 | stmts.add(loadVariable(elementVar).invoke("setPropertyString", loadLiteral(property.name()),
loadLiteral(property.value())));
}
final String retValVar = "retVal";
stmts.add(declareFinalVariable(retValVar, type, invokeStatic(TemplateUtil.class, "nativeCast", loadVariable(elementVar))));
<BUG>if (typeHasValueWithOverlayMethods(type)) {
stmts.add(invokeStatic(NativeHasValueAccessors.class, "registerAccessor", loadVariable(retValVar), createAccessorImpl(type, retValVar)));</BUG>
}
stmts.add(loadVariable(retValVar).returnValue());
return stmts;
| if (implementsNativeHasValueAndRequiresGeneratedInvocation(type)) {
stmts.add(invokeStatic(NativeHasValueAccessors.class, "registerAccessor", loadVariable(retValVar), createAccessorImpl(type, retValVar)));
|
7,150 | .append(loadVariable(varName).invoke("setValue", castTo(propertyType, loadVariable("value"))))
.finish()
.finish();
}
private static Set<Property> getProperties(final MetaClass type) {
<BUG>final Set<Property> properties = new HashSet<Property>();
final Property declaredProperty = type.getAnnotation(Property.class);</BUG>
final Properties declaredProperties = type.getAnnotation(Properties.class);
if (declaredProperty != null) {
properties.add(declaredProperty);
| final Set<Property> properties = new HashSet<>();
final Property declaredProperty = type.getAnnotation(Property.class);
|
7,151 | mInitialized = true;
}
for (int i = 0; i < mWorkerInfoList.size(); i ++) {
WorkerNetAddress candidate = mWorkerInfoList.get(mIndex).getNetAddress();
BlockWorkerInfo workerInfo = findBlockWorkerInfo(workerInfoList, candidate);
<BUG>mIndex = (mIndex + 1) % mWorkerInfoList.size();
if (workerInfo == null
|| workerInfo.getCapacityBytes() - workerInfo.getUsedBytes() < blockSizeBytes) {</BUG>
continue;
}
| if (workerInfo == null || workerInfo.getCapacityBytes() < blockSizeBytes) {
|
7,152 | @Override
public WorkerNetAddress getWorkerForNextBlock(List<BlockWorkerInfo> workerInfoList,
long blockSizeBytes) {
for (BlockWorkerInfo workerInfo : workerInfoList) {
if (workerInfo.getNetAddress().getHost().equals(mLocalHostName)
<BUG>&& workerInfo.getCapacityBytes() - workerInfo.getUsedBytes() > blockSizeBytes) {
return workerInfo.getNetAddress();</BUG>
}
}
Collections.shuffle(workerInfoList);
| && workerInfo.getCapacityBytes() > blockSizeBytes) {
return workerInfo.getNetAddress();
|
7,153 | if (workerInfo.getCapacityBytes() - workerInfo.getUsedBytes() > mostAvailableBytes) {
mostAvailableBytes = workerInfo.getCapacityBytes() - workerInfo.getUsedBytes();
result = workerInfo.getNetAddress();
}
}
<BUG>if (mostAvailableBytes < blockSizeBytes) {
return null;
}</BUG>
return result;
}
| [DELETED] |
7,154 | cgl.setLexicalvalue(valueEdit);
cgl.setIdgroup(idDomaine);
cgl.setIdthesaurus(idTheso);
cgl.setLang(langueEdit);
GroupHelper cgh = new GroupHelper();
<BUG>if (!cgh.isDomainExist(connect.getPoolConnexion(),
cgl.getLexicalvalue(),</BUG>
cgl.getIdthesaurus(), cgl.getLang())) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", langueBean.getMsg("sTerme.error4")));
return;
| if (cgh.isDomainExist(connect.getPoolConnexion(),
cgl.getLexicalvalue(),
|
7,155 | Term terme = new Term();
terme.setId_thesaurus(idTheso);
terme.setLang(langueEdit);
terme.setLexical_value(valueEdit);
terme.setId_term(idT);
<BUG>if (new TermHelper().isTermExist(connect.getPoolConnexion(),
</BUG>
terme.getLexical_value(),
terme.getId_thesaurus(), terme.getLang())) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", langueBean.getMsg("sTerme.error4")));
| if (termHelper.isTermExist(connect.getPoolConnexion(),
|
7,156 | Term terme = new Term();
terme.setId_thesaurus(idTheso);
terme.setLang(langueEdit);
terme.setLexical_value(valueEdit);
terme.setId_term(idT);
<BUG>if (new TermHelper().isTermExist(connect.getPoolConnexion(),
</BUG>
terme.getLexical_value(),
terme.getId_thesaurus(), terme.getLang())) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, langueBean.getMsg("error") + " :", langueBean.getMsg("sTerme.error4")));
| if (termHelper.isTermExist(connect.getPoolConnexion(),
|
7,157 | langues = new ArrayList<>();
HashMap<String, String> tempMapL = new HashMap<>();
for (NodeTermTraduction ntt : tempNTT) {
tempMapL.put(ntt.getLang(), ntt.getLexicalValue());
}
<BUG>langues.addAll(tempMapL.entrySet());
}</BUG>
langueEdit = "";
valueEdit = "";
if (!tradExist) {
| if(newTraduction) {
nom = termHelper.getThisTerm(connect.getPoolConnexion(),idC, idTheso, idlangue).getLexical_value();
|
7,158 | if (n.getTitle().trim().isEmpty()) {
dynamicTreeNode = (TreeNode) new MyTreeNode(1, n.getIdConcept(), idTheso, idlangue, "", "", "dossier", n.getIdConcept(), root);
} else {
dynamicTreeNode = (TreeNode) new MyTreeNode(1, n.getIdConcept(), idTheso, idlangue, "", "", "dossier", n.getTitle(), root);
}
<BUG>new DefaultTreeNode("fake", dynamicTreeNode);
}</BUG>
}
public void onNodeExpand(NodeExpandEvent event) {
String theso = ((MyTreeNode) event.getTreeNode()).getIdTheso();
| DefaultTreeNode defaultTreeNode = new DefaultTreeNode("fake", dynamicTreeNode);
defaultTreeNode.setExpanded(true);
|
7,159 | SKOSXmlDocument sxd = new ReadFileSKOS().readStringBuffer(sb);
for (SKOSResource resource : sxd.getResourcesList()) {
NodeAlignment na = new NodeAlignment();
na.setInternal_id_concept(idC);
na.setInternal_id_thesaurus(idTheso);
<BUG>na.setThesaurus_target("OpenTheso");
</BUG>
na.setUri_target(resource.getUri());
for(SKOSLabel label : resource.getLabelsList()) {
switch (label.getProperty()) {
| na.setThesaurus_target("Pactols");
|
7,160 | private Controls controls = null; // Control Class for Event
String mTitle = "";
String mMsg = "";
int mFlag = 0;
private ProgressDialog dialog = null;
<BUG>private AlertDialog customDialog = null;
public jDialogProgress(android.content.Context context,</BUG>
Controls ctrls, long pasobj, String title, String msg) {
PasObj = pasobj;
controls = ctrls;
| private boolean mCancelable; //thanks to Mladen
public jDialogProgress(android.content.Context context,
|
7,161 | Controls ctrls, long pasobj, String title, String msg) {
PasObj = pasobj;
controls = ctrls;
mTitle= title;
mMsg = msg;
<BUG>mFlag = 0;
}</BUG>
public void Free() {
if (dialog != null) dialog.dismiss();
if (customDialog != null) customDialog.dismiss();
| mCancelable= true;
}
|
7,162 | dialog = new ProgressDialog(controls.activity);
if (!mMsg.equals("")) dialog.setMessage(mMsg);
if (!mTitle.equals(""))
dialog.setTitle(mTitle);
else
<BUG>dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setCancelable(true);
dialog.show();</BUG>
}
public void Show(String _title, String _msg) {
| if (mCancelable)
dialog.setCancelable(false);
dialog.show();
|
7,163 | builder.setCancelable(true); //back key
customDialog = builder.create();
if (!mTitle.equals(""))
customDialog.setTitle(mTitle);
else
<BUG>customDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
customDialog.show();</BUG>
}
public void SetMessage(String _msg) {
mMsg = _msg;
| if (mCancelable) //thanks to Mladen
customDialog.setCancelable(true); //back key
customDialog.setCancelable(false);
customDialog.show();
|
7,164 | public void SetTitle(String _title) {
mTitle = _title;
if (dialog != null) dialog.setTitle(_title);
if (customDialog != null) customDialog.setTitle(_title);
}
<BUG>public void SetCancelable(boolean _value) {
if (dialog != null) dialog.setCancelable(_value);
if (customDialog != null) customDialog.setCancelable(_value);
</BUG>
}
| mCancelable = _value; //thanks to Mladen
if (dialog != null) dialog.setCancelable(mCancelable);
if (customDialog != null) customDialog.setCancelable(mCancelable);
|
7,165 | dialog = new ProgressDialog(controls.activity);
if (!mMsg.equals("")) dialog.setMessage(mMsg);
if (!mTitle.equals(""))
dialog.setTitle(mTitle);
else
<BUG>dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setCancelable(true);
</BUG>
dialog.show();
}
| if (mCancelable)
dialog.setCancelable(true); //back key
dialog.setCancelable(false);
|
7,166 | if (posTagPattern != null) {
c.add(CoreAnnotations.PartOfSpeechAnnotation.class, posTagPattern);
}
nodePatterns.add(new SequencePattern.NodePatternExpr(c));
}
<BUG>TokenSequencePattern pattern = TokenSequencePattern.compile(
new SequencePattern.SequencePatternExpr(nodePatterns));
pattern.setPriority(entry.priority);</BUG>
patterns.add(pattern);
patternToEntry.put(pattern, entry);
| pattern.setPriority(entry.priority);
|
7,167 | public static boolean debugMode = false;
@ModConfigProperty(category = "Debug", name = "debugModeGOTG", comment = "Enable/Disable Debug Mode for the Gift Of The Gods")
public static boolean debugModeGOTG = false;
@ModConfigProperty(category = "Debug", name = "debugModeEnchantments", comment = "Enable/Disable Debug Mode for the Enchantments")
public static boolean debugModeEnchantments = false;
<BUG>@ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable The ArmorPlus Sword's Recipes")
public static boolean enableSwordsRecipes = true;
@ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable The ArmorPlus Battle Axes's Recipes")
public static boolean enableBattleAxesRecipes = true;
@ModConfigProperty(category = "Weapons", name = "enableBowsRecipes", comment = "Enable/Disable The ArmorPlus Bows's Recipes")
public static boolean enableBowsRecipes = true;
@ModConfigProperty(category = "Armors.SuperStarArmor.Effects", name = "enableSuperStarHRegen", comment = "Enable/Disable The Super Star Helmet Regeneration")
</BUG>
public static boolean enableSuperStarHRegen = true;
| @ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable ArmorPlus Sword's Recipes")
@ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable ArmorPlus Battle Axes's Recipes")
@ModConfigProperty(category = "Weapons", name = "enableBowsRecipes", comment = "Enable/Disable ArmorPlus Bows's Recipes")
|
7,168 | public void preInit() {
limecrete = MilitaryBaseDecor.INSTANCE.getManager().newBlock(BlockLimecrete.class, ItemBlockGunpowderEra.class);
ropeFence = MilitaryBaseDecor.INSTANCE.getManager().newBlock(BlockRopeFence.class, ItemBlockGunpowderEra.class);
tangledRope = MilitaryBaseDecor.INSTANCE.getManager().newBlock(BlockTangledRope.class, ItemBlockGunpowderEra.class);
picketFence = MilitaryBaseDecor.INSTANCE.getManager().newBlock(BlockPicketFence.class, ItemBlockGunpowderEra.class);
<BUG>rope = MilitaryBaseDecor.INSTANCE.getManager().newItem(ItemRope.class);
MilitaryBaseDecor.CREATIVE_TAB.itemStack = new ItemStack(ropeFence);</BUG>
}
@Override
public void init() {
| rope = MilitaryBaseDecor.INSTANCE.getManager().newItem("rope", new ItemRope()).setUnlocalizedName("rope").setTextureName(MilitaryBaseDecor.PREFIX + "rope");
MilitaryBaseDecor.CREATIVE_TAB.itemStack = new ItemStack(ropeFence);
|
7,169 | public static Block meshedFloorPanel;
public static Block glassFloorPanel;
public static Block reinforcedGlassPanel;
@Override
public void preInit() {
<BUG>meshedFloorPanel = MilitaryBaseDecor.INSTANCE.getManager().newBlock(TileMeshedFloorPanel.class);
glassFloorPanel = MilitaryBaseDecor.INSTANCE.getManager().newBlock(TileGlassFloorPanel.class);
reinforcedGlassPanel = MilitaryBaseDecor.INSTANCE.getManager().newBlock(TileReinforcedGlassFloorPanel.class);
}</BUG>
@Override
| meshedFloorPanel = MilitaryBaseDecor.INSTANCE.getManager().newBlock("meshed_floor_panel", new TileMeshedFloorPanel()).setBlockName("meshed_floor_panel");
glassFloorPanel = MilitaryBaseDecor.INSTANCE.getManager().newBlock("glass_floor_panel", new TileGlassFloorPanel()).setBlockName("glass_floor_panel");
reinforcedGlassPanel = MilitaryBaseDecor.INSTANCE.getManager().newBlock("reinforced_glass_floor_panel", new TileReinforcedGlassFloorPanel()).setBlockName("reinforced_glass_floor_panel");
}
|
7,170 | import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import java.util.List;
public class ItemRope extends Item {
public ItemRope() {
<BUG>this.setUnlocalizedName("rope");
this.setTextureName(MilitaryBaseDecor.PREFIX + "rope");</BUG>
this.setCreativeTab(MilitaryBaseDecor.CREATIVE_TAB);
}
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4) {
| [DELETED] |
7,171 | }
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
super.preInit(event);
CREATIVE_TAB = new ModCreativeTab("MilitaryBaseDecor");
<BUG>CREATIVE_TAB.itemSorter = new ModCreativeTab.NameSorter(); // Temporary Solution to an nullexception error on creativetab rendering. TODO Rearrange the creative tab sorting system.
</BUG>
getManager().setTab(CREATIVE_TAB);
VANILLA_ENABLED = getConfig().getBoolean("Enable Vanilla Module", "Modules", true, "Enables/Disables the Vanilla module.");
GUNPOWDER_ERA_ENABLED = getConfig().getBoolean("Enable Civil War Module", "Modules", true, "Enables/Disables the Civil War module.");
| CREATIVE_TAB.itemSorter = new ModCreativeTab.NameSorter(); // Temporary Solution to an nullpointerexception error on creativetab rendering. TODO Rearrange the creative tab sorting system.
|
7,172 | return interpreter.shouldUseHandler(world, world.getBiomeGenForCoords(xCoord, zCoord));
}
public final void readFromConfig(LivingHandlerRegistry livingHandlerRegistry,
HashMap<String, Collection<SpawnListEntryBuilder>> readSpawnLists, WorldProperties worldProperties) {
ListMultimap<String, SpawnListEntry> structureKeysToSpawnList = ArrayListMultimap.create();
<BUG>ListMultimap<String, SpawnListEntry> structureKeysToDisabledpawnList = ArrayListMultimap.create();
for (String structureKey : structureKeys) {</BUG>
Collection<SpawnListEntryBuilder> spawnList = readSpawnLists.get(structureKey);
if (spawnList == null) {
spawnList = new ArrayList<SpawnListEntryBuilder>();
| JASLog.log().info("Starting to load and configure Structure SpawnListEntry data");
for (String structureKey : structureKeys) {
|
7,173 | return isEnabled;
}
}
public final String FILE_VERSION = "1.0";
private final LogType SPAWNING;
<BUG>private final LogType DEBUG;
private final LogType SPAWNING_NAME;</BUG>
private final LogType SPAWNING_TYPE;
private final LogType SPAWNING_POS;
private final LogType SPAWNING_BIOME;
| private final LogType SETUP_SPAWNLISTENTRY;
private final LogType SPAWNING_NAME;
|
7,174 | SPAWNING = new LogType(true);
DEBUG = new LogType();
SPAWNING_NAME = new LogType(true);
SPAWNING_TYPE = new LogType(true);
SPAWNING_POS = new LogType(true);
<BUG>SPAWNING_BIOME = new LogType(true);
}</BUG>
public static void setLogger(JASLog log) {
if (!isSetup) {
JASLog.isSetup = true;
| SETUP_SPAWNLISTENTRY = new LogType(true);
}
|
7,175 | new Object[] { new BiomeSpawnsSaveObjectSerializer(
worldProperties.getFolderConfiguration().sortCreatureByBiome) });
HashSet<String> saveFilesProcessed = new HashSet<String>();
File entriesDir = BiomeSpawnListRegistry.getFile(configDirectory,
worldProperties.getFolderConfiguration().saveName, "");
<BUG>File[] files = FileUtilities.getFileInDirectory(entriesDir, ".cfg");
for (File entriesFile : files) {</BUG>
BiomeSpawnsSaveObject saveObject = GsonHelper.readOrCreateFromGson(
FileUtilities.createReader(entriesFile, false), BiomeSpawnsSaveObject.class, gson,
worldProperties.getFolderConfiguration().sortCreatureByBiome);
| JASLog.log().info("Starting to load and configure Biome SpawnListEntry data");
for (File entriesFile : files) {
|
7,176 | return interpreter.shouldUseHandler(world, world.getBiomeGenForCoords(xCoord, zCoord));
}
public final void readFromConfig(LivingHandlerRegistry livingHandlerRegistry,
HashMap<String, Collection<SpawnListEntryBuilder>> readSpawnLists, WorldProperties worldProperties) {
ListMultimap<String, SpawnListEntry> structureKeysToSpawnList = ArrayListMultimap.create();
<BUG>ListMultimap<String, SpawnListEntry> structureKeysToDisabledpawnList = ArrayListMultimap.create();
for (String structureKey : structureKeys) {</BUG>
Collection<SpawnListEntryBuilder> spawnList = readSpawnLists.get(structureKey);
if (spawnList == null) {
spawnList = new ArrayList<SpawnListEntryBuilder>();
| JASLog.log().info("Starting to load and configure Structure SpawnListEntry data");
for (String structureKey : structureKeys) {
|
7,177 | new Object[] { new BiomeSpawnsSaveObjectSerializer(
worldProperties.getFolderConfiguration().sortCreatureByBiome) });
HashSet<String> saveFilesProcessed = new HashSet<String>();
File entriesDir = BiomeSpawnListRegistry.getFile(configDirectory,
worldProperties.getFolderConfiguration().saveName, "");
<BUG>File[] files = FileUtilities.getFileInDirectory(entriesDir, ".cfg");
for (File entriesFile : files) {</BUG>
BiomeSpawnsSaveObject saveObject = GsonHelper.readOrCreateFromGson(
FileUtilities.createReader(entriesFile, false), BiomeSpawnsSaveObject.class, gson,
worldProperties.getFolderConfiguration().sortCreatureByBiome);
| JASLog.log().info("Starting to load and configure Biome SpawnListEntry data");
for (File entriesFile : files) {
|
7,178 | 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;
|
7,179 | 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();
|
7,180 | 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: " +
|
7,181 | 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;
|
7,182 | 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]);
|
7,183 | 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;
|
7,184 | package org.voltdb.planner;
import java.util.ArrayList;
import java.util.List;
<BUG>import org.voltdb.plannodes.AbstractPlanNode;
import org.voltdb.plannodes.ProjectionPlanNode;</BUG>
public class TestPlansGroupBy extends PlannerTestCase {
@Override
protected void setUp() throws Exception {
| import org.voltdb.plannodes.AbstractScanPlanNode;
import org.voltdb.plannodes.AggregatePlanNode;
import org.voltdb.plannodes.LimitPlanNode;
import org.voltdb.plannodes.OrderByPlanNode;
import org.voltdb.plannodes.ProjectionPlanNode;
|
7,185 | pns = compileToFragments("SELECT A1, sum(A1), sum(A1)+11 FROM P1 GROUP BY A1");
checkComplexAgg(pns, true);
pns = compileToFragments("SELECT A1, SUM(PKEY) as A2, (SUM(PKEY) / 888) as A3, (SUM(PKEY) + 1) as A4 FROM P1 GROUP BY A1");
checkComplexAgg(pns, true);
pns = compileToFragments("SELECT A1, count(*) as tag FROM P1 group by A1 order by tag, A1 limit 1");
<BUG>checkComplexAgg(pns, false);
}
public void testReplicatedTableComplexAggregate() {
pns = compileToFragments("select PKEY+A1 from T1 Order by PKEY+A1");</BUG>
checkComplexAgg(pns, false);
| [DELETED] |
7,186 | if (subSelectRoot == null)
return null;
AbstractPlanNode root = subSelectRoot;
root.generateOutputSchema(m_catalogDb);
root = handleAggregationOperators(root);
<BUG>root = handleOrderBy(root);
</BUG>
if ((root.getPlanNodeType() != PlanNodeType.AGGREGATE) &&
(root.getPlanNodeType() != PlanNodeType.HASHAGGREGATE) &&
(root.getPlanNodeType() != PlanNodeType.DISTINCT) &&
| root = handleOrderBy(root, true);
|
7,187 | projectionNode.addAndLinkChild(rootNode);
projectionNode.generateOutputSchema(m_catalogDb);
return projectionNode;
}
}
<BUG>AbstractPlanNode handleOrderBy(AbstractPlanNode root) {
</BUG>
assert (m_parsedSelect != null);
if ( ! m_parsedSelect.hasOrderByColumns()) {
return root;
| AbstractPlanNode handleOrderBy(AbstractPlanNode root, boolean expectedComplex) {
|
7,188 | orderByNode.addSort(col.expression,
col.ascending ? SortDirectionType.ASC
: SortDirectionType.DESC);
}
AbstractPlanNode projectionNode = root;
<BUG>if (m_parsedSelect.hasComplexAgg()) {
</BUG>
AbstractPlanNode aggNode = root.getChild(0);
projectionNode.clearChildren();
aggNode.clearParents();
| if (m_parsedSelect.hasComplexAgg() && expectedComplex) {
|
7,189 | Map <AbstractExpression, Integer> aggTableIndexMap = new HashMap <AbstractExpression,Integer>();
Map <Integer, ParsedColInfo> indexToColumnMap = new HashMap <Integer, ParsedColInfo>();
int index = 0;
for (ParsedColInfo col: aggResultColumns) {
aggTableIndexMap.put(col.expression, index);
<BUG>if (col.alias == "") {
</BUG>
col.alias = "$$_" + col.expression.getExpressionType().symbol() + "_$$_" + index;
}
indexToColumnMap.put(index, col);
| if ( col.alias == null) {
|
7,190 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
7,191 | final int lineStride = dst.getScanlineStride();
final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final byte[][] data = dst.getByteDataArrays();
final float[] warpData = new float[2 * dstWidth];
<BUG>int lineOffset = 0;
if (ctable == null) { // source does not have IndexColorModel
if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
7,192 | pixelOffset += pixelStride;
} // COLS LOOP
} // ROWS LOOP
}
} else {// source has IndexColorModel
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| } else if (caseB) {
for (int h = 0; h < dstHeight; h++) {
|
7,193 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
7,194 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
7,195 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
7,196 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
7,197 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
7,198 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final int[][] data = dst.getIntDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
7,199 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
7,200 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final float[][] data = dst.getFloatDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.