id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
14,501
package com.horstmann.violet.framework.property; import java.awt.*; import java.awt.geom.Point2D; import com.horstmann.violet.framework.property.choiceList.IconChoiceList; <BUG>import com.horstmann.violet.product.diagram.common.edge.linestyle.LineStyle; </BUG> import javax.swing.*; public class LineStyleChoiceList extends IconChoiceList<Stroke> {
import com.horstmann.violet.product.diagram.abstracts.edge.linestyle.LineStyle;
14,502
{ public LineStyleChoiceList() { super(LINE_STYLES_ICONS, LINE_STYLES); } <BUG>protected LineStyleChoiceList(IconChoiceList<Stroke> copyElement) </BUG> { super(copyElement); }
protected LineStyleChoiceList(LineStyleChoiceList copyElement)
14,503
import org.broadinstitute.sting.gatk.report.GATKReportTable; import org.broadinstitute.sting.utils.BaseUtils; import org.broadinstitute.sting.utils.R.RScriptExecutor; import org.broadinstitute.sting.utils.Utils; import org.broadinstitute.sting.utils.classloader.PluginManager; <BUG>import org.broadinstitute.sting.utils.collections.IntegerIndexedNestedHashMap; </BUG> import org.broadinstitute.sting.utils.collections.NestedHashMap; import org.broadinstitute.sting.utils.collections.Pair; import org.broadinstitute.sting.utils.exceptions.DynamicClassResolutionException;
import org.broadinstitute.sting.utils.collections.NestedIntegerArray;
14,504
writeCSV(files.getFirst(), original, "ORIGINAL", requestedCovariates, false); outputRecalibrationPlot(files, keepIntermediates); } private static void writeCSV(final PrintStream deltaTableFile, final RecalibrationTables recalibrationTables, final String recalibrationMode, final Covariate[] requestedCovariates, final boolean printHeader) { final NestedHashMap deltaTable = new NestedHashMap(); <BUG>final IntegerIndexedNestedHashMap<RecalDatum> qualTable = recalibrationTables.getTable(RecalibrationTables.TableType.QUALITY_SCORE_TABLE); for (final IntegerIndexedNestedHashMap.Leaf leaf : qualTable.getAllLeaves()) { // go through every element in the covariates table to create the delta table </BUG> final int[] newCovs = new int[4];
final NestedIntegerArray<RecalDatum> qualTable = recalibrationTables.getTable(RecalibrationTables.TableType.QUALITY_SCORE_TABLE); for (final NestedIntegerArray.Leaf leaf : qualTable.getAllLeaves()) { // go through every element in the covariates table to create the delta table
14,505
package org.broadinstitute.sting.gatk.walkers.bqsr; import org.broadinstitute.sting.gatk.report.GATKReport; import org.broadinstitute.sting.gatk.report.GATKReportTable; import org.broadinstitute.sting.utils.QualityUtils; <BUG>import org.broadinstitute.sting.utils.collections.IntegerIndexedNestedHashMap; </BUG> import org.broadinstitute.sting.utils.collections.Pair; import org.broadinstitute.sting.utils.recalibration.RecalibrationTables; import java.io.File;
import org.broadinstitute.sting.utils.collections.NestedIntegerArray;
14,506
readGroups.add(reportTable.get(i, RecalDataManager.READGROUP_COLUMN_NAME).toString()); return readGroups.size(); } public void combine(final RecalibrationReport other) { for (RecalibrationTables.TableType type : RecalibrationTables.TableType.values()) { <BUG>final IntegerIndexedNestedHashMap<RecalDatum> myTable = recalibrationTables.getTable(type); final IntegerIndexedNestedHashMap<RecalDatum> otherTable = other.recalibrationTables.getTable(type); for (final IntegerIndexedNestedHashMap.Leaf row : otherTable.getAllLeaves()) { </BUG> final RecalDatum myDatum = myTable.get(row.keys);
final NestedIntegerArray<RecalDatum> myTable = recalibrationTables.getTable(type); final NestedIntegerArray<RecalDatum> otherTable = other.recalibrationTables.getTable(type); for (final NestedIntegerArray.Leaf row : otherTable.getAllLeaves()) {
14,507
final EventType event = EventType.eventFrom((String)reportTable.get(i, RecalDataManager.EVENT_TYPE_COLUMN_NAME)); tempCOVarray[3] = event.index; recalibrationTables.getTable(RecalibrationTables.TableType.OPTIONAL_COVARIATE_TABLES_START.index + covIndex).put(getRecalDatum(reportTable, i, false), tempCOVarray); } } <BUG>private void parseQualityScoreTable(final GATKReportTable reportTable, final IntegerIndexedNestedHashMap<RecalDatum> qualTable) { </BUG> for ( int i = 0; i < reportTable.getNumRows(); i++ ) { final Object rg = reportTable.get(i, RecalDataManager.READGROUP_COLUMN_NAME); tempQUALarray[0] = requestedCovariates[0].keyFromValue(rg);
private void parseQualityScoreTable(final GATKReportTable reportTable, final NestedIntegerArray<RecalDatum> qualTable) {
14,508
package org.broadinstitute.sting.gatk.walkers.bqsr; import org.broadinstitute.sting.gatk.report.GATKReportTable; import org.broadinstitute.sting.utils.MathUtils; import org.broadinstitute.sting.utils.QualityUtils; <BUG>import org.broadinstitute.sting.utils.collections.IntegerIndexedNestedHashMap; </BUG> import org.broadinstitute.sting.utils.recalibration.QualQuantizer; import org.broadinstitute.sting.utils.recalibration.RecalibrationTables; import java.util.Arrays;
import org.broadinstitute.sting.utils.collections.NestedIntegerArray;
14,509
} public QuantizationInfo(final RecalibrationTables recalibrationTables, final int quantizationLevels) { final Long [] qualHistogram = new Long[QualityUtils.MAX_QUAL_SCORE+1]; // create a histogram with the empirical quality distribution for (int i = 0; i < qualHistogram.length; i++) qualHistogram[i] = 0L; <BUG>final IntegerIndexedNestedHashMap<RecalDatum> qualTable = recalibrationTables.getTable(RecalibrationTables.TableType.QUALITY_SCORE_TABLE); // get the quality score table </BUG> for (final RecalDatum value : qualTable.getAllValues()) { final RecalDatum datum = value; final int empiricalQual = MathUtils.fastRound(datum.getEmpiricalQuality()); // convert the empirical quality to an integer ( it is already capped by MAX_QUAL )
public QuantizationInfo(List<Byte> quantizedQuals, List<Long> empiricalQualCounts) { this(quantizedQuals, empiricalQualCounts, calculateQuantizationLevels(quantizedQuals)); final NestedIntegerArray<RecalDatum> qualTable = recalibrationTables.getTable(RecalibrationTables.TableType.QUALITY_SCORE_TABLE); // get the quality score table
14,510
if(vo == null){ result.addRestMessage(getDoesNotExistMessage()); return result.createResponseEntity(); } try{ <BUG>if(Permissions.hasDataPointReadPermission(user, vo)){ PointValueFacade pointValueFacade = new PointValueFacade(vo.getId(), false); PointValueTime first = pointValueFacade.getPointValueAfter(from.getTime()); PointValueTime last = pointValueFacade.getPointValueBefore(to.getTime()); </BUG> List<PointValueTimeModel> models = new ArrayList<PointValueTimeModel>(2);
PointValueFacade pointValueFacade = new PointValueFacade(vo.getId(), useCache); List<PointValueTime> pvts = pointValueFacade.getLatestPointValues(limit); List<PointValueTimeModel> models = new ArrayList<PointValueTimeModel>(pvts.size());
14,511
@ApiParam(value = "Time Period Type", required = false, allowMultiple = false) @RequestParam(value="timePeriodType", required=false) TimePeriodType timePeriodType, @ApiParam(value = "Time Periods", required = false, allowMultiple = false) @RequestParam(value="timePeriods", required=false) <BUG>Integer timePeriods ){</BUG> RestProcessResult<QueryArrayStream<PointValueTimeModel>> result = new RestProcessResult<QueryArrayStream<PointValueTimeModel>>(HttpStatus.OK); User user = this.checkUser(request, result);
Integer timePeriods, @ApiParam(value = "Time zone", required = false, allowMultiple = false) @RequestParam(value="timezone", required=false) String timezone ){
14,512
@ApiParam(value = "Time Period Type", required = false, allowMultiple = false) @RequestParam(value="timePeriodType", required=false) TimePeriodType timePeriodType, @ApiParam(value = "Time Periods", required = false, allowMultiple = false) @RequestParam(value="timePeriods", required=false) <BUG>Integer timePeriods ){</BUG> RestProcessResult<ObjectStream<Map<String, List<PointValueTime>>>> result = new RestProcessResult<ObjectStream<Map<String, List<PointValueTime>>>>(HttpStatus.OK); User user = this.checkUser(request, result);
Integer timePeriods, @ApiParam(value = "Time zone", required = false, allowMultiple = false) @RequestParam(value="timezone", required=false) String timezone ){
14,513
@ApiParam(value = "Time Period Type", required = false, allowMultiple = false) @RequestParam(value="timePeriodType", required=false) TimePeriodType timePeriodType, @ApiParam(value = "Time Periods", required = false, allowMultiple = false) @RequestParam(value="timePeriods", required=false) <BUG>Integer timePeriods ){</BUG> RestProcessResult<QueryArrayStream<PointValueTimeModel>> result = new RestProcessResult<QueryArrayStream<PointValueTimeModel>>(HttpStatus.OK); User user = this.checkUser(request, result);
Integer timePeriods, @ApiParam(value = "Time zone", required = false, allowMultiple = false) @RequestParam(value="timezone", required=false) String timezone ){
14,514
@ApiParam(value = "Time Period Type", required = false, allowMultiple = false) @RequestParam(value="timePeriodType", required=false) TimePeriodType timePeriodType, @ApiParam(value = "Time Periods", required = false, allowMultiple = false) @RequestParam(value="timePeriods", required=false) <BUG>Integer timePeriods ){</BUG> RestProcessResult<Long> result = new RestProcessResult<Long>(HttpStatus.OK); User user = this.checkUser(request, result);
Integer timePeriods, @ApiParam(value = "Time zone", required = false, allowMultiple = false) @RequestParam(value="timezone", required=false) String timezone ){
14,515
if(vo == null){ result.addRestMessage(getDoesNotExistMessage()); return result.createResponseEntity(); } try{ <BUG>if(Permissions.hasDataPointReadPermission(user, vo)){ StatisticsStream stream = new StatisticsStream(request.getServerName(), request.getServerPort(), vo, useRendered, unitConversion, from.getTime(), to.getTime()); </BUG> return result.createResponseEntity(stream); }else{
long current = System.currentTimeMillis(); if (from == null) from = new DateTime(current); if (to == null) to = new DateTime(current); StatisticsStream stream = new StatisticsStream(request.getServerName(), request.getServerPort(), vo, useRendered, unitConversion, from.getMillis(), to.getMillis());
14,516
public void handlePressed(MouseEvent e, int sel) { boolean shift = e.isShiftDown(); AndroidEditor aeditor = (AndroidEditor) editor; switch (sel) { case RUN: <BUG>if (shift) { aeditor.handleRunEmulator(); } else { aeditor.handleRunDevice();</BUG> }
aeditor.handleRunDevice();
14,517
package processing.mode.android; <BUG>import java.io.File; import java.io.IOException;</BUG> import java.text.SimpleDateFormat; import java.util.Date; import processing.app.Base;
import java.io.FilenameFilter; import java.io.IOException;
14,518
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
14,519
} @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);
14,520
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);
14,521
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(
14,522
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 {
14,523
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;
14,524
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) {
14,525
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;
14,526
TargetCardInLibrary target = new TargetCardInLibrary(0, 3, new FilterCreatureCard("creature cards")); if (controller.searchLibrary(target, game)) { if (target.getTargets().size() > 0) { Cards revealed = new CardsImpl(); for (UUID cardId : (List<UUID>) target.getTargets()) { <BUG>Card card = controller.getLibrary().getCard(cardId, game); </BUG> revealed.add(card); } controller.revealCards(sourceObject.getName(), revealed, game);
Card card = controller.getLibrary().remove(cardId, game);
14,527
} controller.revealCards(sourceObject.getName(), revealed, game); controller.shuffleLibrary(game); TargetCard targetToLib = new TargetCard(Zone.PICK, new FilterCard(textTop)); target.setRequired(true); <BUG>while (revealed.size() > 1) { controller.choose(Outcome.Neutral, revealed, target, game); </BUG> Card card = revealed.get(targetToLib.getFirstTarget(), game); if (card != null) {
while (revealed.size() > 1 && controller.isInGame()) { controller.choose(Outcome.Neutral, revealed, targetToLib, game);
14,528
public static final String OUTER_INTERFACE = "OUTER_INTERFACE"; public static final String OUTER_CLASS = "OUTER_CLASS"; public static final String GENERIC_TYPE_REF = "GENERIC_TYPE_REF"; public static final String DESCENDANT_OF = "DESCENDANT_OF"; public static final String DESCENDANTS = "DESCENDANTS"; <BUG>public static final String VALIDATION_ENABLED = "VALIDATION_ENABLED"; public static final String INIT = "INIT";</BUG> public static final String GENERATED = "GENERATED"; public static final String EMPTY = ""; public static final TypeParamDef F = newTypeParamDef("F");
public static final String EDIATABLE_ENABLED = "EDITABLE_ENABLED"; public static final String INIT = "INIT";
14,529
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.jgaap.generics.Document; <BUG>import com.jgaap.generics.Event; import com.jgaap.generics.EventHistogram;</BUG> import com.jgaap.generics.EventSet; public class Utils { public static boolean saveFile(String filePath, String data){
import com.jgaap.generics.EventDriver; import com.jgaap.generics.EventHistogram;
14,530
list.add(es1); list.add(es2); list = culler.cull(list); for(EventSet es : list) { for(Event e : es) { <BUG>assertTrue(e.getEvent().equals("A")); </BUG> } } }
assertTrue(e.toString().equals("A"));
14,531
this.data = data; this.eventDriver = eventDriver; } public Event(List<Event> events){ this.data = events.toString(); <BUG>this.eventDriver = events.get(0).eventDriver; }</BUG> public int compareTo(Object o) { return data.compareTo(((Event) o).data); }
public Event(List<Event> events, EventDriver eventDriver){
14,532
package com.google.zxing.client.result; import com.google.zxing.BarcodeFormat; import com.google.zxing.Result; import org.junit.Assert; import org.junit.Before; <BUG>import org.junit.Test; import java.util.Locale;</BUG> import java.util.TimeZone; public final class ParsedReaderResultTestCase extends Assert { @Before
import java.text.DateFormat; import java.util.Calendar; import java.util.Locale;
14,533
package er.jquery.support; <BUG>import com.webobjects.appserver.WOActionResults; import com.webobjects.appserver.WOComponent;</BUG> import com.webobjects.appserver.WOContext; import com.webobjects.appserver._private.WOGenericContainer; import er.extensions.appserver.ERXWOContext;
import com.webobjects.appserver.WOApplication; import com.webobjects.appserver.WOComponent;
14,534
return "this.href"; else throw new WODynamicElementCreationException("Action or directActionName is a required binding"); } public String href() { if (hasBinding(Bindings.action)) { <BUG>return ERXWOContext.ajaxActionUrl(context()); } else if (hasBinding(Bindings.directActionName)) {</BUG> NSDictionary queryDictionary = hasBinding(Bindings.queryDictionary) ? queryDictionary() : null; return context().directActionURLForActionNamed(directActionName(), queryDictionary); } else return "#";
return context().componentActionURL(WOApplication.application().componentRequestHandlerKey()); } else if (hasBinding(Bindings.directActionName)) {
14,535
return "this.href"; else throw new WODynamicElementCreationException("Action or directActionName is a required binding"); } public String href() { if (hasBinding(Bindings.action)) { <BUG>return ERXWOContext.ajaxActionUrl(context()); } else if (hasBinding(Bindings.directActionName)) {</BUG> NSDictionary queryDictionary = hasBinding(Bindings.queryDictionary) ? queryDictionary() : null; return context().directActionURLForActionNamed(directActionName(), queryDictionary); } else return "#";
return context().componentActionURL(WOApplication.application().componentRequestHandlerKey()); } else if (hasBinding(Bindings.directActionName)) {
14,536
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 {
14,537
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));
14,538
} 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()
14,539
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));
14,540
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));
14,541
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 {
14,542
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);
14,543
customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString()); customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName); customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString()); customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName); customTokens.put("%%mlTraceForestsPerHost%%", hubConfig.traceForestsPerHost.toString()); <BUG>customTokens.put("%%mlModulesDbName%%", hubConfig.modulesDbName); }</BUG> public void init() { try { LOGGER.error("PLUGINS DIR: " + pluginsDir.toString());
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName); customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName); }
14,544
package org.ldaptive.jaas; import java.io.Serializable; import java.security.Principal; import java.util.Collection; import java.util.HashSet; <BUG>import java.util.Set; import org.ldaptive.LdapAttribute;</BUG> import org.ldaptive.LdapEntry; import org.ldaptive.LdapUtils; import org.ldaptive.SearchResult;
import java.util.stream.Collectors; import org.ldaptive.LdapAttribute;
14,545
package org.ldaptive.handler; <BUG>import java.util.HashSet; import java.util.Set; import org.ldaptive.Connection;</BUG> import org.ldaptive.LdapAttribute; import org.ldaptive.LdapException;
import java.util.stream.Collectors; import org.ldaptive.Connection;
14,546
protected void handleAttribute(final Connection conn, final SearchRequest request, final LdapAttribute attr) throws LdapException { if (attr != null) { attr.setName(handleAttributeName(conn, request, attr.getName())); <BUG>if (attr.isBinary()) { final Set<byte[]> newValues = new HashSet<>(attr.size()); attr.getBinaryValues().stream().map( b -> handleAttributeValue(conn, request, b)).map(value -> newValues.add(value));</BUG> attr.clear();
final Set<byte[]> newValues = attr.getBinaryValues().stream().map( b -> handleAttributeValue(conn, request, b)).collect(Collectors.toSet());
14,547
final Set<byte[]> newValues = new HashSet<>(attr.size()); attr.getBinaryValues().stream().map( b -> handleAttributeValue(conn, request, b)).map(value -> newValues.add(value));</BUG> attr.clear(); attr.addBinaryValues(newValues); <BUG>} else { final Set<String> newValues = new HashSet<>(attr.size()); attr.getStringValues().stream().map( s -> handleAttributeValue(conn, request, s)).map(value -> newValues.add(value));</BUG> attr.clear();
protected void handleAttribute(final Connection conn, final SearchRequest request, final LdapAttribute attr) throws LdapException if (attr != null) { attr.setName(handleAttributeName(conn, request, attr.getName())); if (attr.isBinary()) { final Set<byte[]> newValues = attr.getBinaryValues().stream().map( b -> handleAttributeValue(conn, request, b)).collect(Collectors.toSet()); final Set<String> newValues = attr.getStringValues().stream().map( s -> handleAttributeValue(conn, request, s)).collect(Collectors.toSet());
14,548
private final static String P_MODIFIED = "modified"; private final static String P_NBOBJECT = "nbObject"; private final static String P_NBTAB = "nbTab"; private final static String P_OBJECT_COUNT = "Object-Count"; private final static String P_PAGE_COUNT = "Page-Count"; <BUG>private final static String P_PARAGRAPH_COUNT = "Paragraph-Count"; private final static String P_PHYS = "pHYs";</BUG> private final static String P_PRODUCER = "producer"; private final static String P_PUBLISHER = "publisher"; private final static String P_RESOLUTION_UNIT = "Resolution Unit";
private final static String P_PDF_VERSION = "pdf:PDFVersion"; private final static String P_PDFA_VERSION = "pdfa:PDFVersion"; private final static String P_PDFX_VERSION = "GTS_PDFXVersion"; private final static String P_PHYS = "pHYs";
14,549
N_PAGES, NBOBJECT, NBTAB, OBJECT_COUNT, PAGE_COUNT, <BUG>PARAGRAPH_COUNT, PHYS,</BUG> PRODUCER, PUBLISHER, RESOLUTION_UNIT,
PDF_VERSION, PDFA_VERSION, PDFX_VERSION, PHYS,
14,550
propertyNameMap.put (P_MODIFIED, TikaProperty.MODIFIED); propertyNameMap.put (P_NBOBJECT, TikaProperty.NBOBJECT); propertyNameMap.put (P_NBTAB, TikaProperty.NBTAB); propertyNameMap.put (P_OBJECT_COUNT, TikaProperty.OBJECT_COUNT); propertyNameMap.put (P_PAGE_COUNT, TikaProperty.PAGE_COUNT); <BUG>propertyNameMap.put (P_PARAGRAPH_COUNT, TikaProperty.PARAGRAPH_COUNT); propertyNameMap.put (P_PHYS, TikaProperty.PHYS);</BUG> propertyNameMap.put (P_PRODUCER, TikaProperty.PRODUCER); propertyNameMap.put (P_PUBLISHER, TikaProperty.PUBLISHER); propertyNameMap.put (P_RESOLUTION_UNIT, TikaProperty.RESOLUTION_UNIT);
propertyNameMap.put (P_PDF_VERSION, TikaProperty.PDF_VERSION); propertyNameMap.put (P_PDFA_VERSION, TikaProperty.PDFA_VERSION); propertyNameMap.put (P_PDFX_VERSION, TikaProperty.PDFX_VERSION); propertyNameMap.put (P_PHYS, TikaProperty.PHYS);
14,551
if ( path != null ) checkNT1(path); return ndlopen(memAddressSafe(path), mode); } public static long dlopen(CharSequence path, int mode) { APIBuffer __buffer = apiBuffer(); <BUG>int pathEncoded = __buffer.stringParamASCII(path, true); </BUG> return ndlopen(__buffer.addressSafe(path, pathEncoded), mode); } @JavadocExclude
int pathEncoded = path == null ? 0 : __buffer.stringParamASCII(path, true);
14,552
if ( display_name != null ) checkNT1(display_name); return nXOpenDisplay(memAddressSafe(display_name)); } public static long XOpenDisplay(CharSequence display_name) { APIBuffer __buffer = apiBuffer(); <BUG>int display_nameEncoded = __buffer.stringParamASCII(display_name, true); </BUG> return nXOpenDisplay(__buffer.addressSafe(display_name, display_nameEncoded)); } public static int XDefaultScreen(long display) {
int display_nameEncoded = display_name == null ? 0 : __buffer.stringParamASCII(display_name, true);
14,553
if ( filename != null ) checkNT1(filename); return ndlopen(memAddressSafe(filename), mode); } public static long dlopen(CharSequence filename, int mode) { APIBuffer __buffer = apiBuffer(); <BUG>int filenameEncoded = __buffer.stringParamASCII(filename, true); </BUG> return ndlopen(__buffer.addressSafe(filename, filenameEncoded), mode); } @JavadocExclude
int filenameEncoded = filename == null ? 0 : __buffer.stringParamASCII(filename, true);
14,554
if ( opts != null ) checkNT1(opts); nje_malloc_stats_print(write_cb == null ? NULL : write_cb.address(), memAddressSafe(je_cbopaque), memAddressSafe(opts)); } public static void je_malloc_stats_print(MallocMessageCallback write_cb, ByteBuffer je_cbopaque, CharSequence opts) { APIBuffer __buffer = apiBuffer(); <BUG>int optsEncoded = __buffer.stringParamASCII(opts, true); </BUG> nje_malloc_stats_print(write_cb == null ? NULL : write_cb.address(), memAddressSafe(je_cbopaque), __buffer.addressSafe(opts, optsEncoded)); } @JavadocExclude
int optsEncoded = opts == null ? 0 : __buffer.stringParamASCII(opts, true);
14,555
if ( lpDevice != null ) checkNT2(lpDevice); return nEnumDisplayDevices(memAddressSafe(lpDevice), iDevNum, lpDisplayDevice.address(), dwFlags); } public static int EnumDisplayDevices(CharSequence lpDevice, int iDevNum, DISPLAY_DEVICE lpDisplayDevice, int dwFlags) { APIBuffer __buffer = apiBuffer(); <BUG>int lpDeviceEncoded = __buffer.stringParamUTF16(lpDevice, true); </BUG> return nEnumDisplayDevices(__buffer.addressSafe(lpDevice, lpDeviceEncoded), iDevNum, lpDisplayDevice.address(), dwFlags); } @JavadocExclude
int lpDeviceEncoded = lpDevice == null ? 0 : __buffer.stringParamUTF16(lpDevice, true);
14,556
if ( lpszDeviceName != null ) checkNT2(lpszDeviceName); return nEnumDisplaySettingsEx(memAddressSafe(lpszDeviceName), iModeNum, lpDevMode.address(), dwFlags); } public static int EnumDisplaySettingsEx(CharSequence lpszDeviceName, int iModeNum, DEVMODE lpDevMode, int dwFlags) { APIBuffer __buffer = apiBuffer(); <BUG>int lpszDeviceNameEncoded = __buffer.stringParamUTF16(lpszDeviceName, true); </BUG> return nEnumDisplaySettingsEx(__buffer.addressSafe(lpszDeviceName, lpszDeviceNameEncoded), iModeNum, lpDevMode.address(), dwFlags); } @JavadocExclude
int lpszDeviceNameEncoded = lpszDeviceName == null ? 0 : __buffer.stringParamUTF16(lpszDeviceName, true);
14,557
if ( deviceSpecifier != null ) checkNT1(deviceSpecifier); return nalcOpenDevice(memAddressSafe(deviceSpecifier)); } public static long alcOpenDevice(CharSequence deviceSpecifier) { APIBuffer __buffer = apiBuffer(); <BUG>int deviceSpecifierEncoded = __buffer.stringParamUTF8(deviceSpecifier, true); </BUG> return nalcOpenDevice(__buffer.addressSafe(deviceSpecifier, deviceSpecifierEncoded)); } public static boolean alcCloseDevice(long deviceHandle) {
int deviceSpecifierEncoded = deviceSpecifier == null ? 0 : __buffer.stringParamUTF8(deviceSpecifier, true);
14,558
public static String ovr_GetString(long session, CharSequence propertyName, CharSequence defaultVal) { if ( CHECKS ) checkPointer(session); APIBuffer __buffer = apiBuffer(); int propertyNameEncoded = __buffer.stringParamASCII(propertyName, true); <BUG>int defaultValEncoded = __buffer.stringParamUTF8(defaultVal, true); </BUG> long __result = novr_GetString(session, __buffer.address(propertyNameEncoded), __buffer.addressSafe(defaultVal, defaultValEncoded)); return memDecodeUTF8(__result); }
int defaultValEncoded = defaultVal == null ? 0 : __buffer.stringParamUTF8(defaultVal, true);
14,559
if ( moduleName != null ) checkNT2(moduleName); return nGetModuleHandle(memAddressSafe(moduleName)); } public static long GetModuleHandle(CharSequence moduleName) { APIBuffer __buffer = apiBuffer(); <BUG>int moduleNameEncoded = __buffer.stringParamUTF16(moduleName, true); </BUG> return nGetModuleHandle(__buffer.addressSafe(moduleName, moduleNameEncoded)); } @JavadocExclude
int moduleNameEncoded = moduleName == null ? 0 : __buffer.stringParamUTF16(moduleName, true);
14,560
if ( devicename != null ) checkNT1(devicename); return nalcCaptureOpenDevice(memAddressSafe(devicename), frequency, format, buffersize); } public static long alcCaptureOpenDevice(CharSequence devicename, int frequency, int format, int buffersize) { APIBuffer __buffer = apiBuffer(); <BUG>int devicenameEncoded = __buffer.stringParamUTF8(devicename, true); </BUG> return nalcCaptureOpenDevice(__buffer.addressSafe(devicename, devicenameEncoded), frequency, format, buffersize); } public static boolean alcCaptureCloseDevice(long device) {
int devicenameEncoded = devicename == null ? 0 : __buffer.stringParamUTF8(devicename, true);
14,561
if ( devicename != null ) checkNT1(devicename); return nalcCaptureOpenDevice(memAddressSafe(devicename), frequency, format, buffersize); } public static long alcCaptureOpenDevice(CharSequence devicename, int frequency, int format, int buffersize) { APIBuffer __buffer = apiBuffer(); <BUG>int devicenameEncoded = __buffer.stringParamUTF8(devicename, true); </BUG> return nalcCaptureOpenDevice(__buffer.addressSafe(devicename, devicenameEncoded), frequency, format, buffersize); } public static boolean alcCaptureCloseDevice(long device) {
int devicenameEncoded = devicename == null ? 0 : __buffer.stringParamUTF8(devicename, true);
14,562
if ( deviceName != null ) checkNT1(deviceName); return nalcLoopbackOpenDeviceSOFT(memAddressSafe(deviceName)); } public static long alcLoopbackOpenDeviceSOFT(CharSequence deviceName) { APIBuffer __buffer = apiBuffer(); <BUG>int deviceNameEncoded = __buffer.stringParamUTF8(deviceName, true); </BUG> return nalcLoopbackOpenDeviceSOFT(__buffer.addressSafe(deviceName, deviceNameEncoded)); } public static boolean alcIsRenderFormatSupportedSOFT(long device, int frequency, int channels, int type) {
int deviceNameEncoded = deviceName == null ? 0 : __buffer.stringParamUTF8(deviceName, true);
14,563
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;
14,564
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();
14,565
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: " +
14,566
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;
14,567
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]);
14,568
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;
14,569
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { CmsRequestHttpServlet cmsReq= new CmsRequestHttpServlet(req); CmsResponseHttpServlet cmsRes= new CmsResponseHttpServlet(req,res); try { <BUG>CmsObject cms=initUser(cmsReq,cmsRes); CmsFile file=m_opencms.initResource(cms); m_opencms.setResponse(cms,file);</BUG> m_opencms.showResource(cms,file); updateUser(cms,cmsReq,cmsRes);
System.err.println(cms.getRequestContext().currentUser().getName()); System.err.println(file.toString()); m_opencms.setResponse(cms,file);
14,570
private static final String C_PROPERTY_WRITE = "INSERT INTO PROPERTIES VALUES(?,?)"; private static final String C_PROPERTY_UPDATE="UPDATE PROPERTIES SET PROPERTY_VALUE = ? WHERE PROPERTY_NAME = ? "; private static final String C_PROPERTY_DELETE="DELETE FROM PROPERTIES WHERE PROPERTY_NAME = ?"; private static final String C_PROPERTY_VALUE="PROPERTY_VALUE"; private Connection m_Con = null; <BUG>private PreparedStatement m_statementPropertyRead; private PreparedStatement m_statementPropertyWrite; private PreparedStatement m_statementPropertyUpdate; private PreparedStatement m_statementPropertyDelete;</BUG> public CmsAccessPropertyMySql(String driver,String conUrl)
[DELETED]
14,571
ByteArrayOutputStream bout= new ByteArrayOutputStream(); ObjectOutputStream oout=new ObjectOutputStream(bout); oout.writeObject(object); oout.close(); value=bout.toByteArray(); <BUG>synchronized (m_statementPropertyUpdate) { m_statementPropertyUpdate.setBytes(1,value); m_statementPropertyUpdate.setString(2,name); m_statementPropertyUpdate.executeUpdate(); }</BUG> }
PreparedStatement statementPropertyUpdate=m_Con.prepareStatement(C_PROPERTY_UPDATE);
14,572
package com.opencms.file; import java.util.*; import java.sql.*; <BUG>import com.opencms.core.*; class CmsAccessFileMySql implements I_CmsAccessFile, I_CmsConstants {</BUG> private Connection m_Con = null; private CmsMountPoint m_mountpoint = null; private static final String C_RESOURCE_WRITE = "INSERT INTO RESOURCES VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
import com.opencms.util.*; class CmsAccessFileMySql implements I_CmsAccessFile, I_CmsConstants {
14,573
CmsFile file=null; int projectId; ResultSet res =null; try { if (project.equals(onlineProject)) { <BUG>synchronized(m_statementFileReadOnline) { m_statementFileReadOnline.setString(1,absoluteName(filename)); m_statementFileReadOnline.setInt(2,onlineProject.getId()); res = m_statementFileReadOnline.executeQuery(); if(res.next()) {</BUG> file = new CmsFile(filename,
PreparedStatement statementFileReadOnline=m_Con.prepareStatement(C_FILE_READ_ONLINE); res = statementFileReadOnline.executeQuery(); if(res.next()) {
14,574
if (file.getState()==C_STATE_UNCHANGED) { projectId=onlineProject.getId(); } else { projectId=project.getId(); } <BUG>synchronized (m_statementFileRead) { m_statementFileRead.setString(1,absoluteName(filename)); m_statementFileRead.setInt(2,projectId); res = m_statementFileRead.executeQuery(); if (res.next()) {</BUG> file.setContents(res.getBytes(C_FILE_CONTENT));
PreparedStatement statementFileRead=m_Con.prepareStatement(C_FILE_READ); res = statementFileRead.executeQuery(); if (res.next()) {
14,575
public CmsFile readFileHeader(A_CmsProject project, String filename) throws CmsException { CmsFile file=null; ResultSet res =null; try { <BUG>synchronized ( m_statementResourceRead) { m_statementResourceRead.setString(1,absoluteName(filename)); m_statementResourceRead.setInt(2,project.getId()); res = m_statementResourceRead.executeQuery(); }</BUG> if(res.next()) {
PreparedStatement statementResourceRead=m_Con.prepareStatement(C_RESOURCE_READ); res = statementResourceRead.executeQuery();
14,576
throws CmsException { CmsFile file=null; ResultSet res =null; Vector allHeaders = new Vector(); try { <BUG>synchronized ( m_statementResourceReadAll) { m_statementResourceReadAll.setString(1,absoluteName(filename)); res = m_statementResourceReadAll.executeQuery(); }</BUG> while(res.next()) {
PreparedStatement statementResourceReadAll=m_Con.prepareStatement(C_RESOURCE_READ_ALL); res = statementResourceReadAll.executeQuery();
14,577
res.getInt(C_SIZE) ); allHeaders.addElement(file); } } catch (SQLException e){ <BUG>throw new CmsException(e.getMessage(),CmsException.C_SQL_ERROR, e); </BUG> } return allHeaders; }
throw new CmsException("["+this.getClass().getName()+"]"+e.getMessage(),CmsException.C_SQL_ERROR, e);
14,578
public CmsFolder readFolder(A_CmsProject project, String foldername) throws CmsException { CmsFolder folder=null; ResultSet res =null; try { <BUG>Statement s = m_Con.createStatement(); s.setEscapeProcessing(false); res = s.executeQuery("SELECT * FROM RESOURCES WHERE RESOURCE_NAME = '"+foldername +"' AND PROJECT_ID = "+project.getId()); if(res.next()) {</BUG> folder = new CmsFolder(res.getString(C_RESOURCE_NAME),
PreparedStatement statementResourceRead=m_Con.prepareStatement(C_RESOURCE_READ); statementResourceRead.setString(1,absoluteName(foldername)); statementResourceRead.setInt(2,project.getId()); res = statementResourceRead.executeQuery(); if(res.next()) {
14,579
res.getLong(C_DATE_CREATED), res.getLong(C_DATE_LASTMODIFIED) ); } } catch (SQLException e){ <BUG>throw new CmsException(e.getMessage(),CmsException.C_SQL_ERROR, e); </BUG> } return folders; }
throw new CmsException("["+this.getClass().getName()+"]"+e.getMessage(),CmsException.C_SQL_ERROR, e);
14,580
new byte[0], res.getInt(C_SIZE) ); } } catch (SQLException e){ <BUG>throw new CmsException(e.getMessage(),CmsException.C_SQL_ERROR, e); </BUG> } return files; }
throw new CmsException("["+this.getClass().getName()+"]"+e.getMessage(),CmsException.C_SQL_ERROR, e);
14,581
Vector resources = new Vector(); CmsFile file; CmsFolder folder; ResultSet res; try { <BUG>synchronized (m_statementProjectReadFiles) { m_statementProjectReadFiles.setInt(1,project.getId()); res=m_statementProjectReadFiles.executeQuery(); }</BUG> while ( res.next() ) {
PreparedStatement statementProjectReadFiles=m_Con.prepareStatement(C_PROJECT_READ_FILES); res=statementProjectReadFiles.executeQuery();
14,582
} else if (file.getState() == C_STATE_DELETED) { deleteFile(file); resources.addElement(file.getAbsolutePath()); } } <BUG>synchronized (m_statementProjectReadFolders) { m_statementProjectReadFolders.setInt(1,project.getId()); m_statementProjectReadFolders.setInt(2,C_TYPE_FOLDER); res=m_statementProjectReadFolders.executeQuery(); }</BUG> while ( res.next() ) {
PreparedStatement statementProjectReadFolders=m_Con.prepareStatement(C_PROJECT_READ_FOLDER); res=statementProjectReadFolders.executeQuery();
14,583
deleteFolder(folder); resources.addElement(folder.getAbsolutePath()); } } } catch (SQLException e){ <BUG>throw new CmsException(e.getMessage(),CmsException.C_SQL_ERROR, e); </BUG> } return resources; }
createFolder(onlineProject,folder,folder.getAbsolutePath()); } else if (folder.getState() == C_STATE_DELETED) { throw new CmsException("["+this.getClass().getName()+"]"+e.getMessage(),CmsException.C_SQL_ERROR, e);
14,584
private A_CmsResource readResource(A_CmsProject project, String filename) throws CmsException { CmsResource file=null; ResultSet res =null; try { <BUG>synchronized ( m_statementResourceRead) { m_statementResourceRead.setString(1,absoluteName(filename)); m_statementResourceRead.setInt(2,project.getId()); res = m_statementResourceRead.executeQuery(); }</BUG> if(res.next()) {
PreparedStatement statementResourceRead=m_Con.prepareStatement(C_RESOURCE_READ); res = statementResourceRead.executeQuery();
14,585
public Vector getGroupsOfUser(int userid) throws CmsException { A_CmsGroup group; Vector groups=new Vector(); ResultSet res = null; <BUG>try { PreparedStatement statementGetGroupsOfUser = m_Con.prepareStatement(C_GETGROUPSOFUSER);</BUG> statementGetGroupsOfUser.setInt(1,userid); res = statementGetGroupsOfUser.executeQuery();
PreparedStatement statementGetGroupsOfUser=m_Con.prepareStatement(C_GETGROUPSOFUSER);
14,586
ResultSet res = null; try{ PreparedStatement statementGroupReadId=m_Con.prepareStatement(C_GROUP_READID); statementGroupReadId.setInt(1,id); res = statementGroupReadId.executeQuery(); <BUG>Statement s = m_Con.createStatement(); s.setEscapeProcessing(false); res = s.executeQuery("SELECT * FROM GROUPS WHERE GROUP_ID = "+id);</BUG> if(res.next()) { group=new CmsGroup(res.getInt(C_GROUP_ID),
try { PreparedStatement statementGetGroupsOfUser=m_Con.prepareStatement(C_GETGROUPSOFUSER); statementGetGroupsOfUser.setInt(1,userid); res = statementGetGroupsOfUser.executeQuery(); while ( res.next() ) {
14,587
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;
14,588
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();
14,589
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: " +
14,590
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;
14,591
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]);
14,592
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;
14,593
import com.intellij.psi.impl.cache.impl.idCache.IdCacheUtil; import com.intellij.psi.impl.cache.impl.idCache.TodoOccurrenceConsumer; import com.intellij.psi.search.IndexPattern; import com.intellij.util.indexing.DataIndexer; import com.intellij.util.indexing.FileBasedIndex; <BUG>import com.intellij.util.indexing.IndexDataConsumer; public abstract class LexerBasedTodoIndexer implements DataIndexer<TodoIndexEntry, Integer, FileBasedIndex.FileContent> { public void map(final FileBasedIndex.FileContent inputData, final IndexDataConsumer<TodoIndexEntry, Integer> consumer) { final TodoOccurrenceConsumer todoOccurrenceConsumer = new TodoOccurrenceConsumer();</BUG> final Lexer filterLexer = createLexer(todoOccurrenceConsumer);
import java.util.HashMap; import java.util.Map; public Map<TodoIndexEntry,Integer> map(final FileBasedIndex.FileContent inputData) { final TodoOccurrenceConsumer todoOccurrenceConsumer = new TodoOccurrenceConsumer();
14,594
package com.intellij.psi.impl.cache.index; <BUG>import com.intellij.lexer.Lexer; import com.intellij.util.indexing.FileBasedIndex; import com.intellij.util.indexing.IndexDataConsumer; public abstract class LexerBasedIdIndexer extends FileTypeIdIndexer { public final void map(final FileBasedIndex.FileContent inputData, final IndexDataConsumer<IdIndexEntry, Integer> consumer) { final Lexer lexer = createLexer(consumer); final CharSequence chars = inputData.content;</BUG> lexer.start(chars, 0, chars.length(),0);
import com.intellij.psi.impl.cache.impl.idCache.BaseFilterLexer; import com.intellij.psi.search.IndexPattern; import com.intellij.util.indexing.IdDataConsumer; import java.util.Map; public final Map<IdIndexEntry,Integer> map(final FileBasedIndex.FileContent inputData) { final IdDataConsumer consumer = new IdDataConsumer(); final Lexer lexer = createLexer(new OccurrenceToIdDataConsumerAdapter(consumer)); final CharSequence chars = inputData.content;
14,595
private static class WordsScannerFileTypeIdIndexerAdapter extends FileTypeIdIndexer { private WordsScanner myScanner; public WordsScannerFileTypeIdIndexerAdapter(@NotNull final WordsScanner scanner) { myScanner = scanner; } <BUG>public void map(final FileBasedIndex.FileContent inputData, final IndexDataConsumer<IdIndexEntry, Integer> consumer) { final CharSequence chars = inputData.content; final char[] charsArray = CharArrayUtil.fromSequenceWithoutCopying(chars); myScanner.processWords(chars, new Processor<WordOccurrence>() {</BUG> public boolean process(final WordOccurrence t) {
public Map<IdIndexEntry, Integer> map(final FileBasedIndex.FileContent inputData) { final IdDataConsumer consumer = new IdDataConsumer(); myScanner.processWords(chars, new Processor<WordOccurrence>() {
14,596
if (kind == WordOccurrence.Kind.COMMENTS) return UsageSearchContext.IN_COMMENTS; if (kind == WordOccurrence.Kind.LITERALS) return UsageSearchContext.IN_STRINGS; if (kind == WordOccurrence.Kind.FOREIGN_LANGUAGE) return UsageSearchContext.IN_FOREIGN_LANGUAGES; return 0; } <BUG>}); }</BUG> } private static class TokenSetTodoIndexer implements DataIndexer<TodoIndexEntry, Integer, FileBasedIndex.FileContent>{ @NotNull private final TokenSet myCommentTokens;
return consumer.getResult();
14,597
private final VirtualFile myFile; public TokenSetTodoIndexer(@Nullable final TokenSet commentTokens, @NotNull final VirtualFile file) { myCommentTokens = commentTokens; myFile = file; } <BUG>public void map(final FileBasedIndex.FileContent inputData, final IndexDataConsumer<TodoIndexEntry, Integer> consumer) { final CharSequence chars = inputData.content;</BUG> if (IdCacheUtil.getIndexPatternCount() > 0) { final TodoOccurrenceConsumer occurrenceConsumer = new TodoOccurrenceConsumer(); final EditorHighlighter highlighter = HighlighterFactory.createHighlighter(null, myFile);
public Map<TodoIndexEntry,Integer> map(final FileBasedIndex.FileContent inputData) { final CharSequence chars = inputData.content;
14,598
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 {
14,599
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));
14,600
} 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()