id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
26,501 | inputGalleryRulePictureUrlReplacement.setText(site.galleryRule.pictureUrl.replacement);
}
if (site.galleryRule.pictureHighRes != null) {
inputGalleryRulePictureHighResSelector.setText(joinSelector(site.galleryRule.pictureHighRes));
inputGalleryRulePictureHighResRegex.setText(site.galleryRule.pictureHighRes.regex);
<BUG... | [DELETED] |
26,502 | inputExtraRuleCommentDatetimeReplacement.setText(site.extraRule.commentDatetime.replacement);
}
if (site.extraRule.commentContent != null) {
inputExtraRuleCommentContentSelector.setText(joinSelector(site.extraRule.commentContent));
inputExtraRuleCommentContentRegex.setText(site.extraRule.commentContent.regex);
<BUG>inp... | [DELETED] |
26,503 | lastSite.galleryRule.cover = loadSelector(inputGalleryRuleCoverSelector, inputGalleryRuleCoverRegex, inputGalleryRuleCoverReplacement);
lastSite.galleryRule.category = loadSelector(inputGalleryRuleCategorySelector, inputGalleryRuleCategoryRegex, inputGalleryRuleCategoryReplacement);
lastSite.galleryRule.datetime = load... | lastSite.galleryRule.pictureRule = (lastSite.galleryRule.pictureRule == null) ? new PictureRule() : lastSite.galleryRule.pictureRule;
lastSite.galleryRule.pictureRule.thumbnail = loadSelector(inputGalleryRulePictureThumbnailSelector, inputGalleryRulePictureThumbnailRegex, inputGalleryRulePictureThumbnailReplacement);
l... |
26,504 | lastSite.extraRule.cover = loadSelector(inputExtraRuleCoverSelector, inputExtraRuleCoverRegex, inputExtraRuleCoverReplacement);
lastSite.extraRule.category = loadSelector(inputExtraRuleCategorySelector, inputExtraRuleCategoryRegex, inputExtraRuleCategoryReplacement);
lastSite.extraRule.datetime = loadSelector(inputExtr... | lastSite.extraRule.pictureRule = (lastSite.extraRule.pictureRule == null) ? new PictureRule() : lastSite.extraRule.pictureRule;
lastSite.extraRule.pictureRule.thumbnail = loadSelector(inputExtraRulePictureThumbnailSelector, inputExtraRulePictureThumbnailRegex, inputExtraRulePictureThumbnailReplacement);
lastSite.extraR... |
26,505 | notifyItemChanged(position);
if (mItemClickListener != null)
mItemClickListener.onItemClick(v, position);
}
});
<BUG>if (tag.selected)
label.getChildAt(0).setBackgroundResource(R.color.colorPrimary);
else
label.getChildAt(0).setBackgroundResource(R.color.dimgray);</BUG>
}
| [DELETED] |
26,506 | loadPicture(picture, task, null, true);
} else if (!TextUtils.isEmpty(picture.pic) && !highRes) {
picture.retries = 0;
loadPicture(picture, task, null, false);
} else if (task.collection.site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE)
<BUG>&& task.collection.site.extraRule != null
&& task.collection.site.extraRule.pic... | && task.collection.site.extraRule != null) {
if(task.collection.site.extraRule.pictureRule != null && task.collection.site.extraRule.pictureRule.url != null)
getPictureUrl(picture, task, task.collection.site.extraRule.pictureRule.url, task.collection.site.extraRule.pictureRule.highRes);
else if(task.collection.site.ext... |
26,507 | if (Picture.hasPicPosfix(picture.url)) {
picture.pic = picture.url;
loadPicture(picture, task, null, false);
} else
if (task.collection.site.hasFlag(Site.FLAG_JS_NEEDED_ALL)) {
<BUG>new Handler(Looper.getMainLooper()).post(()->{
</BUG>
WebView webView = new WebView(HViewerApplication.mContext);
WebSettings mWebSettings... | new Handler(Looper.getMainLooper()).post(() -> {
|
26,508 | <BUG>package info.debatty.java.stringsimilarity;
public class Jaccard implements StringSimilarityInterface {</BUG>
public static void main(String[] args) {
Jaccard j2 = new Jaccard(2);
System.out.println(j2.similarity("ABCDE", "ABCDF"));
| import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
public class Jaccard implements StringSimilarityInterface {
|
26,509 | <BUG>package info.debatty.java.stringsimilarity;
public class Cosine implements StringSimilarityInterface {</BUG>
public static void main(String[] args) {
Cosine cos = new Cosine(3);
System.out.println(cos.similarity("ABC", "ABCE"));
| import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
public class Cosine implements StringSimilarityInterface {
|
26,510 | return 1.0;
}
if (s1.equals("") || s2.equals("")) {
return 0.0;
}
<BUG>KShingling ks = new KShingling(this.k);
ks.parse(s1);
ks.parse(s2);
int[] v1 = ks.profileOf(s1);
int[] v2 = ks.profileOf(s2);
return dotProduct(v1, v2) / (norm(v1) * norm(v2));</BUG>
}
| HashMap<String, Integer> profile1 = ks.getProfile(s1);
HashMap<String, Integer> profile2 = ks.getProfile(s2);
return dotProduct(profile1, profile2) / (norm(profile1) * norm(profile2));
|
26,511 | import org.openqa.selenium.StaleElementReferenceException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public abstract class WebDriverTest {
protected WebDriver webDriver = new FirefoxDriver();
<BUG>private NeoServer server;
</BUG>
private static final File targetHtmlDir = ne... | protected NeoServer server;
|
26,512 | import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.*;
import de.danielnaber.languagetool.Language;
<BUG>import de.danielnaber.languagetool.server.HTTPServer;
public class Configuration {</BUG>
private static final String CONFIG_FILE = "languagetool.proper... | import de.danielnaber.languagetool.tools.StringTools;
public class Configuration {
|
26,513 | private static final String DISABLED_RULES_CONFIG_KEY = "disabledRules";
private static final String ENABLED_RULES_CONFIG_KEY = "enabledRules";
private static final String DISABLED_CATEGORIES_CONFIG_KEY = "disabledCategories";
private static final String MOTHER_TONGUE_CONFIG_KEY = "motherTongue";
private static final S... | private static final String DELIMITER = ",";
private File configFile;
|
26,514 | super(asmMethod, genericsSignature, kotlinTypeParameters, kotlinParameterTypes,
kotlinReturnType, needGenerics);
this.isGetter = isGetter;
}
@NotNull
<BUG>public JvmMethodSignature getJvmMethodSignature() {
return this;
}
@NotNull</BUG>
public String getPropertyTypeKotlinSignature() {
| [DELETED] |
26,515 | FunctionGenerationStrategy strategy =
defaultGetter
? new DefaultPropertyAccessorStrategy(getterDescriptor)
: new FunctionGenerationStrategy.FunctionDefault(state, getterDescriptor, getter);
functionCodegen.generateMethod(getter != null ? getter : p,
<BUG>signature.getJvmMethodSignature(),
true,</BUG>
getterDescriptor,... | signature,
true,
|
26,516 | FunctionGenerationStrategy strategy =
defaultSetter
? new DefaultPropertyAccessorStrategy(setterDescriptor)
: new FunctionGenerationStrategy.FunctionDefault(state, setterDescriptor, setter);
functionCodegen.generateMethod(setter != null ? setter : p,
<BUG>signature.getJvmMethodSignature(),
true,</BUG>
setterDescriptor,... | defaultGetter
? new DefaultPropertyAccessorStrategy(getterDescriptor)
: new FunctionGenerationStrategy.FunctionDefault(state, getterDescriptor, getter);
functionCodegen.generateMethod(getter != null ? getter : p,
signature,
true,
getterDescriptor,
|
26,517 | FunctionCodegen.endVisit(mv, "toString", myClass);
}
private Type genPropertyOnStack(InstructionAdapter iv, PropertyDescriptor propertyDescriptor, int index) {
iv.load(index, classAsmType);
Method
<BUG>method = typeMapper.mapGetterSignature(propertyDescriptor, OwnerKind.IMPLEMENTATION).getJvmMethodSignature().getAsmMet... | method = typeMapper.mapGetterSignature(propertyDescriptor, OwnerKind.IMPLEMENTATION).getAsmMethod();
iv.invokevirtual(classAsmType.getInternalName(), method.getName(), method.getDescriptor());
|
26,518 | PropertyDescriptor original = property.getOriginal();
if (fun instanceof PropertyGetterDescriptor) {
JvmPropertyAccessorSignature toGenerate = typeMapper.mapGetterSignature(property, OwnerKind.IMPLEMENTATION);
JvmPropertyAccessorSignature inTrait = typeMapper.mapGetterSignature(original, OwnerKind.IMPLEMENTATION);
retu... | toGenerate.getAsmMethod(), inTrait.getAsmMethod());
}
|
26,519 | final IStrategoTerm digestState = taskEngine.getDigester().state(factory);
IStrategoList tasks = factory.makeList();
for(final Entry<IStrategoTerm, ITask> entry : taskEngine.getTaskEntries()) {
final IStrategoTerm taskID = entry.getKey();
final ITask task = entry.getValue();
<BUG>IStrategoTerm results = serializer.toAn... | IStrategoTerm results = serializer.toAnnotations(makeList(factory, task.results().results()));
|
26,520 | taskEngine.getEvaluationFrontend().create(instruction, dynamicDependencies,
TaskType.get(type.intValue()), takeBool(shortCircuit));
if(!isNull(instructionOverride))
task.overrideInstruction(instructionOverride);
if(!isNull(results))
<BUG>task.setResults(results);
</BUG>
task.setStatus(TaskStatus.get(status.intValue()))... | task.results().setResults(results);
|
26,521 | @Override
public IStrategoList adjustDependencies(IStrategoList dependencies, ITermFactory factory) {
return dependencies;
}
@Override
<BUG>public ITask create(IStrategoTerm instruction, IStrategoList dependencies, TaskType type, boolean shortCircuit) {
if(Tools.isTermAppl(instruction) && (Tools.hasConstructor((IStrate... | final ITaskResults taskResults;
if(Tools.isTermAppl(instruction) && (Tools.hasConstructor((IStrategoAppl) instruction, "Insert", 1))
|
26,522 | evaluateCyclicTasks(context, collect, insert, perform);
final Multimap<IStrategoTerm, IStrategoTerm> values = ArrayListMultimap.create();
for(final IStrategoTerm taskID : taskIDs) {
final ITask task = taskEngine.getTask(taskID);
if(!task.failed())
<BUG>values.putAll(taskID, task.results());
</BUG>
}
for(int i = 0; i < ... | values.putAll(taskID, task.results().results());
|
26,523 | continue;
} else {
done = false;
break;
}
<BUG>} else if(task.failed() || !task.hasResults()) {
</BUG>
done = false;
break;
}
| } else if(task.failed() || !task.results().hasResults()) {
|
26,524 | </BUG>
done = false;
break;
}
final Multiset<IStrategoTerm> oldValues = HashMultiset.create(values.get(taskID));
<BUG>final Multiset<IStrategoTerm> newValues = HashMultiset.create(task.results());
</BUG>
final Multiset<IStrategoTerm> diff1 = Multisets.difference(newValues, oldValues);
final Multiset<IStrategoTerm> diff... | continue;
} else {
} else if(task.failed() || !task.results().hasResults()) {
final Multiset<IStrategoTerm> newValues = HashMultiset.create(task.results().results());
|
26,525 | public abstract IStrategoTerm instructionOverride();
public abstract IStrategoTerm initialInstruction();
public abstract void clearInstructionOverride();
public abstract IStrategoList initialDependencies();
public abstract TaskType type();
<BUG>public abstract boolean shortCircuit();
public abstract Iterable<IStrategoT... | public ITaskResults results();
|
26,526 | Set<IStrategoTerm> seen, boolean singleLevel) {
seen.add(taskID);
final ITask task = taskEngine.getTask(taskID);
if(!task.solved()) {
return Either.right(new SingletonIterable<IStrategoTerm>(taskID));
<BUG>} else if(task.failed() || !task.hasResults()) {
</BUG>
return null; // If a dependency does not have any results,... | } else if(task.failed() || !task.results().hasResults()) {
|
26,527 | </BUG>
return null; // If a dependency does not have any results, the task cannot be executed.
}
final Collection<IStrategoTerm> results = Lists.newLinkedList();
final Collection<IStrategoTerm> dynamicDependencies = Lists.newLinkedList();
<BUG>for(final IStrategoTerm result : task.results()) {
</BUG>
final Iterable<ISt... | Set<IStrategoTerm> seen, boolean singleLevel) {
seen.add(taskID);
final ITask task = taskEngine.getTask(taskID);
if(!task.solved()) {
return Either.right(new SingletonIterable<IStrategoTerm>(taskID));
} else if(task.failed() || !task.results().hasResults()) {
for(final IStrategoTerm result : task.results().results()) {... |
26,528 | private static IStrategoTerm insertResultLists(ITermFactory factory, ITaskEngine taskEngine, IContext context,
Strategy insert, IStrategoTerm term, Iterable<IStrategoTerm> resultIDs) {
final StrategoHashMap mapping = new StrategoHashMap();
for(IStrategoTerm resultID : resultIDs) {
final ITask task = taskEngine.getTask(... | mapping.put(resultID, makeList(factory, task.results().results()));
|
26,529 | return result;
}
private static boolean dependencyFailure(ITaskEngine taskEngine, Iterable<IStrategoTerm> taskIDs) {
for(IStrategoTerm taskID : taskIDs) {
final ITask task = taskEngine.getTask(taskID);
<BUG>if(task.failed() || !task.hasResults()) {
</BUG>
return true; // If a dependency does not have any results, the t... | if(task.failed() || !task.results().hasResults()) {
|
26,530 | @Description("Whether this instance should only participate as slave in cluster. If set to true, it will never be elected as master.")
public static final Setting<Boolean> slave_only = setting( "ha.slave_only", BOOLEAN, Settings.FALSE );
@Description( "Policy for how to handle branched data." )
public static final Sett... | [DELETED] |
26,531 | 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.TangoC... | import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
|
26,532 | 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();
|
26,533 | 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: " +
|
26,534 | 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.... | import org.rajawali3d.math.Quaternion;
import org.rajawali3d.math.vector.Vector3;
|
26,535 | translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE);
translationMoon.setTransformable3D(moon);
getCurrentScene().registerAnimation(translationMoon);
translationMoon.play();
}
<BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) {
Pose cameraPose = ScenePoseCalculator.t... | 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()... |
26,536 | 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.tangos... | import com.google.atap.tangoservice.TangoAreaDescriptionMetaData;
import com.google.atap.tangoservice.TangoConfig;
|
26,537 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
26,538 | }
@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);
|
26,539 | 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 != nu... | MemoEntry.COLUMN_ORDER + " ASC", null);
|
26,540 | 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(
|
26,541 | 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.A... | import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
26,542 | 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, EditMe... | public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
26,543 | 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) {
|
26,544 | 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;
|
26,545 | 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 FileSyste... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AFileSystem extends FileSystem {
|
26,546 | 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(... | 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));
|
26,547 | } 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()
|
26,548 |
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_THR... | 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.g... |
26,549 | 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_... | 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... |
26,550 | 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 backup... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AOutputStream extends OutputStream {
|
26,551 | 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) ... | partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
|
26,552 | System.out.println(" " + lineInfo[j]);
}
}
}
public boolean start() {
<BUG>AudioFormat fmt = new AudioFormat(44100.0f, 16, 2, true, false);
</BUG>
try {
lineIn = AudioSystem.getTargetDataLine(fmt);
lineIn.open(fmt);
| AudioFormat fmt = new AudioFormat(fSample, 16, 2, true, false);
|
26,553 | } else {
System.out.println("Usage: java AudioToBuffer hostname:port");
return;</BUG>
}
<BUG>a2b.listDevices();
System.out.println("Trying to open default AUDIO IN device...\n");
if (!a2b.start()) return;
System.out.println("Now streaming audio. Press q and <enter> to quit.\n");
while (true) {
a2b.tick();</BUG>
try {... | Thread.sleep((long)(blockSize*1000.0/fSample));
} catch (InterruptedException e){
System.out.println(e);
t = System.currentTimeMillis() - t0; // current time since start
if (t >= printTime) {
System.out.print(nBlk + " " + nSample + " 0 " + (t/1000) + " (blk,samp,event,sec)\r");
printTime = t + 5000; // 5s betwee... |
26,554 | }
return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
}
public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern)
<BUG>throws SQL... | public String getUserName() throws SQLException {
database.activateOnCurrentThread();
return database.getUser().getName();
|
26,555 | doc.field("DATA_TYPE", java.sql.Types.OTHER);
doc.field("SPECIFIC_NAME", f.getName());
records.add(doc);</BUG>
}
<BUG>final ODocument doc = new ODocument();
doc.field("PROCEDURE_CAT", (Object) null);
doc.field("PROCEDURE_SCHEM", (Object) null);
doc.field("PROCEDURE_NAME", f.getName());
doc.field("COLUMN_NAME", "return"... | final List<ODocument> records = new ArrayList<ODocument>();
for (String fName : database.getMetadata().getFunctionLibrary().getFunctionNames()) {
final ODocument doc = new ODocument()
.field("PROCEDURE_CAT", (Object) null)
.field("PROCEDURE_SCHEM", (Object) null)
.field("PROCEDURE_NAME", fName)
.field("REMARKS", "")
.f... |
26,556 | final String type;
if (OMetadata.SYSTEM_CLUSTER.contains(cls.getName()))
type = "SYSTEM TABLE";
else
type = "TABLE";
<BUG>if (tableTypes.contains(type) && (tableNamePattern == null
|| tableNamePattern.equals("%") || tableNamePattern.equalsIgnoreCase(className))) {
</BUG>
final ODocument doc = new ODocument()
.field("TA... | if (tableTypes.contains(type) &&
(tableNamePattern == null || tableNamePattern.equals("%") || tableNamePattern.equalsIgnoreCase(className))) {
|
26,557 | }
return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
}
@Override
<BUG>public ResultSet getSchemas() throws SQLException {
final List<ODocument> records = new ArrayList<ODocument>();
records.add(new OD... | [DELETED] |
26,558 | records.add(new ODocument().field("TABLE_SCHEM", database.getName())
.field("TABLE_CATALOG", database.getName()));</BUG>
return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
}
<BUG>public ResultSet getC... | @Override
public ResultSet getSchemas() throws SQLException {
database.activateOnCurrentThread();
final List<ODocument> records = new ArrayList<ODocument>();
records.add(new ODocument()
.field("TABLE_CATALOG", database.getName()));
|
26,559 | }
final List<ODocument> records = new ArrayList<ODocument>();
for (OIndex<?> unique : uniqueIndexes) {
int keyFiledSeq = 1;
for (String keyFieldName : unique.getDefinition().getFields()) {
<BUG>ODocument doc = new ODocument();
doc.field("TABLE_CAT", catalog);
doc.field("TABLE_SCHEM", catalog);
doc.field("TABLE_NAME", t... | return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
|
26,560 | if (!unique || oIndex.getType().equals(INDEX_TYPE.UNIQUE.name()))
indexes.add(oIndex);
}
final List<ODocument> records = new ArrayList<ODocument>();
for (OIndex<?> idx : indexes) {
<BUG>boolean notUniqueIndex = !( idx.getType().equals(INDEX_TYPE.UNIQUE.name()));
final String fieldNames = idx.getDefinition().getFields()... | boolean notUniqueIndex = !(idx.getType().equals(INDEX_TYPE.UNIQUE.name()));
final String fieldNames = idx.getDefinition().getFields().toString();
|
26,561 | doc.field("DATA_TYPE", java.sql.Types.OTHER);
doc.field("SPECIFIC_NAME", f.getName());
records.add(doc);</BUG>
}
<BUG>final ODocument doc = new ODocument();
doc.field("FUNCTION_CAT", (Object) null);
doc.field("FUNCTION_SCHEM", (Object) null);
doc.field("FUNCTION_NAME", f.getName());
doc.field("COLUMN_NAME", "return");
... | final List<ODocument> records = new ArrayList<ODocument>();
for (OClass cls : classes) {
final ODocument doc = new ODocument()
.field("TYPE_CAT", (Object) null)
.field("TYPE_SCHEM", (Object) null)
.field("TYPE_NAME", cls.getName())
.field("CLASS_NAME", cls.getName())
.field("DATA_TYPE", java.sql.Types.STRUCT)
.field("R... |
26,562 | package com.orientechnologies.orient.jdbc;
import com.orientechnologies.orient.core.id.ORecordId;
import org.junit.Test;
import java.math.BigDecimal;
<BUG>import java.sql.Date;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.sql.Types;</BUG>
import java.util.Calenda... | import java.sql.*;
|
26,563 | import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.sql.Types;</BUG>
import java.util.Calendar;
import java.util.TimeZone;
<BUG>import static java.sql.Types.*;
import static org.assertj.core.api.Assertions.*;
</BUG>
public class OrientJdbcResultSetMetaDataTest extends OrientJdbcBaseTest {
| package com.orientechnologies.orient.jdbc;
import com.orientechnologies.orient.core.id.ORecordId;
import org.junit.Test;
import java.math.BigDecimal;
import java.sql.*;
import static java.sql.Types.BIGINT;
import static org.assertj.core.api.Assertions.assertThat;
|
26,564 | import com.orientechnologies.orient.core.db.record.ORecordLazyMultiValue;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.impl.OBlob;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.functions.ODe... | import com.orientechnologies.orient.core.sql.parser.*;
|
26,565 | if (fields.isEmpty()) {
fields.addAll(Arrays.asList(document.fieldNames()));
}
return fields;
}
<BUG>private void activateDatabaseOnCurrentThread() {
statement.database.activateOnCurrentThread();</BUG>
}
public void close() throws SQLException {
cursor = 0;
| if (!statement.database.isActiveOnCurrentThread())
statement.database.activateOnCurrentThread();
|
26,566 | else if (rawResult instanceof Collection)
return ((Collection) rawResult).size();
return 0;
}
protected <RET> RET executeCommand(OCommandRequest query) throws SQLException {
<BUG>try {
return database.command(query).execute();</BUG>
} catch (OQueryParsingException e) {
throw new SQLSyntaxErrorException("Error while par... | database.activateOnCurrentThread();
return database.command(query).execute();
|
26,567 | import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
<BUG>import static org.assertj.core.api.Assertions.assertThat;
public class OrientDataSourceTest extends Orien... | import static org.assertj.core.api.Assertions.fail;
public class OrientDataSourceTest extends OrientJdbcBaseTest {
|
26,568 | assertThat(rs.first()).isTrue();
assertThat(rs.getString("stringKey")).isEqualTo("1");
rs.close();
statement.close();
conn.close();
<BUG>assertThat(conn.isClosed()).isTrue();
}</BUG>
return Boolean.TRUE;
}
};
| } catch (Exception e) {
e.printStackTrace();
fail("WTF:::", e);
|
26,569 | ExecutorService pool = Executors.newCachedThreadPool();
pool.submit(dbClient);
pool.submit(dbClient);
pool.submit(dbClient);
pool.submit(dbClient);
<BUG>TimeUnit.SECONDS.sleep(2);
</BUG>
queryTheDb.set(false);
pool.shutdown();
}
| TimeUnit.SECONDS.sleep(5);
|
26,570 | import java.util.Map;
import java.util.Set;</BUG>
import static org.assertj.core.api.Assertions.assertThat;
<BUG>import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
</BUG>
public class OrientJd... | import org.junit.Test;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.*;
import static org.junit.Assert.*;
|
26,571 | assertEquals("OrientDB", metaData.getDatabaseProductName());
assertEquals(OConstants.ORIENT_VERSION, metaData.getDatabaseProductVersion());
assertEquals(2, metaData.getDatabaseMajorVersion());
assertEquals(2, metaData.getDatabaseMinorVersion());
assertEquals("OrientDB JDBC Driver", metaData.getDriverName());
<BUG>asser... | assertEquals("OrientDB " + OConstants.getVersion() + " JDBC Driver", metaData.getDriverVersion());
|
26,572 | final String keywordsStr = metaData.getSQLKeywords();
assertNotNull(keywordsStr);
assertThat(Arrays.asList(keywordsStr.toUpperCase().split(",\\s*"))).contains("TRAVERSE");
}
@Test
<BUG>public void shouldRetrieveUniqueIndexInfoForTable() throws Exception {
ResultSet indexInfo = metaData.getIndexInfo("OrientJdbcDatabaseM... | ResultSet indexInfo = metaData
indexInfo.next();
|
26,573 | public abstract void modify(Entry<Long, T> entry);
}
public static <T> long storeObjectInContextMap(XQueryContext context, String contextMapName, T o) {
contextMapLocks.getWriteLock(contextMapName).lock();
try{
<BUG>Map<Long, T> map = (HashMap<Long, T>)context.getXQueryContextVar(contextMapName);
if(map == null) {</BUG... | Map<Long, T> map = (Map<Long, T>)context.getXQueryContextVar(contextMapName);
if(map == null) {
|
26,574 | }else if(programsSelected.size() == 1){
lytProgsPanel.setVisibility(View.VISIBLE);
lytProg2MAHAdsExtDlg.setVisibility(View.GONE);
prog1 = programsSelected.get(0);
((TextView)view.findViewById(R.id.tvProg1NameMAHAdsExtDlg)).setText(prog1.getName());
<BUG>if (prog1.getImg() != null && !prog1.getImg().trim().isEmpty()) {
... | Picasso.with(view.getContext())
.load(MAHAdsController.urlRootOnServer + prog1.getImg())
.placeholder(R.drawable.img_place_holder_normal)
.error(R.drawable.img_not_found)
.into((ImageView) view.findViewById(R.id.ivProg1ImgMAHAds));
AngledLinearLayout prog1LytNewText = (AngledLinearLayout)view.findViewById(R.id.lytProg1... |
26,575 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
26,576 | }
@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);
|
26,577 | 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 != nu... | MemoEntry.COLUMN_ORDER + " ASC", null);
|
26,578 | 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(
|
26,579 | 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.A... | import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
26,580 | 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, EditMe... | public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
26,581 | 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) {
|
26,582 | 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;
|
26,583 | assert (getEntry(newEntry.getSitePath()) == null);
assert (getEntry(CmsResource.getParentFolder(newEntry.getSitePath())) != null);
newEntry.setPosition(-1); // ensure it will be inserted at the end
addChange(new CmsSitemapChangeNew(newEntry), false);
}
<BUG>public void delete(CmsClientSitemapEntry entry) {
assert (getE... | public void delete(String sitePath) {
CmsClientSitemapEntry entry = getEntry(sitePath);
assert (entry != null);
addChange(new CmsSitemapChangeDelete(entry), false);
|
26,584 | return result;
}
public CmsClientSitemapEntry getEntry(String root) throws CmsRpcException {
CmsClientSitemapEntry result = null;
try {
<BUG>result = toClientEntry(OpenCms.getSitemapManager().getEntryForUri(getCmsObject(), root), -1);
} catch (Throwable e) {</BUG>
error(e);
}
return result;
| result = toClientEntry(OpenCms.getSitemapManager().getEntryForUri(getCmsObject(), root));
} catch (Throwable e) {
|
26,585 | getCachedRecentList());
} catch (Throwable e) {
error(e);
}
return result;
<BUG>}
public void exit(List<CmsClientSitemapEntry> recentList) throws CmsRpcException {
try {
} catch (Throwable e) {
error(e);
}</BUG>
}
| [DELETED] |
26,586 | return new CmsSitemapTemplate(
cms.getSitePath(resource),
titleProp.getValue(),
descProp.getValue(),
imageProp.getValue());
<BUG>}
private CmsClientSitemapEntry toClientEntry(CmsSitemapEntry entry, int position) throws CmsException {
CmsClientSitemapEntry clientEntry = new CmsClientSitemapEntry();</BUG>
clientEntry.set... | private void setRecentList(List<CmsClientSitemapEntry> recentList) {
getRequest().getSession().setAttribute(SESSION_ATTR_ADE_SITEMAP_RECENT_LIST_CACHE, recentList);
private CmsClientSitemapEntry toClientEntry(CmsSitemapEntry entry) throws CmsException {
CmsClientSitemapEntry clientEntry = new CmsClientSitemapEntry();
|
26,587 | public ToolBarManager getToolBarManager() {
return toolBarManager;
}
public void setRepositoryDefinition(RepositoryDefinition repositoryDefinition) {
this.repositoryDefinition = repositoryDefinition;
<BUG>repositoryLabel.setText(TextFormatter.crop(repositoryDefinition.getName(), MAX_TEXT_LENGTH));
</BUG>
if (repository... | repositoryLabel.setText(TextFormatter.clearLineBreaks(TextFormatter.crop(repositoryDefinition.getName(), MAX_TEXT_LENGTH)));
|
26,588 | repositoryLabel.setImage(ImageFormatter.getStorageRepositoryImage((StorageRepositoryDefinition) repositoryDefinition));
InspectIT.getDefault().getInspectITStorageManager().addStorageChangeListener(this);
}
}
public void setAgent(String agentName, Image agentImg) {
<BUG>agentLabel.setText(TextFormatter.crop(agentName, M... | agentLabel.setText(TextFormatter.clearLineBreaks(TextFormatter.crop(agentName, MAX_TEXT_LENGTH)));
|
26,589 | if (null != agentImg) {
agentLabel.setImage(agentImg);
}
}
public void setGroup(String group, Image groupdImg) {
<BUG>groupLabel.setText(TextFormatter.crop(group, MAX_TEXT_LENGTH));
</BUG>
groupLabel.setToolTipText(group);
if (null != groupdImg) {
groupLabel.setImage(groupdImg);
| groupLabel.setText(TextFormatter.clearLineBreaks(TextFormatter.crop(group, MAX_TEXT_LENGTH)));
|
26,590 | groupLabel.setImage(groupdImg);
}
layoutInternal();
}
public void setView(String view, Image viewImg) {
<BUG>viewLabel.setText(view);
viewLabel.setToolTipText(view);</BUG>
if (null != viewImg) {
viewLabel.setImage(viewImg);
}
| viewLabel.setText(TextFormatter.clearLineBreaks(view));
viewLabel.setToolTipText(view);
|
26,591 | public void repositoryDataUpdated(CmrRepositoryDefinition cmrRepositoryDefinition) {
if (Objects.equals(repositoryDefinition, cmrRepositoryDefinition)) {
SafeExecutor.asyncExec(new Runnable() {
@Override
public void run() {
<BUG>repositoryLabel.setText(repositoryDefinition.getName());
</BUG>
layoutInternal();
}
}, getD... | repositoryLabel.setText(TextFormatter.clearLineBreaks(repositoryDefinition.getName()));
|
26,592 | final StorageRepositoryDefinition storageRepositoryDefinition = (StorageRepositoryDefinition) repositoryDefinition;
if (Objects.equals(storageRepositoryDefinition.getLocalStorageData(), storageData)) {
SafeExecutor.asyncExec(new Runnable() {
@Override
public void run() {
<BUG>repositoryLabel.setText(repositoryDefinitio... | repositoryLabel.setText(TextFormatter.clearLineBreaks(repositoryDefinition.getName()));
|
26,593 | package io.katharsis.errorhandling.exception;
import io.katharsis.errorhandling.ErrorData;
public abstract class KatharsisMappableException extends KatharsisException {
private final ErrorData errorData;
private final int httpStatus;
<BUG>protected KatharsisMappableException(int httpStatus, ErrorData errorData) {
super... | this(httpStatus, errorData, null);
}
protected KatharsisMappableException(int httpStatus, ErrorData errorData, Throwable cause) {
super(errorData.getDetail(), cause);
|
26,594 | e.printStackTrace();
}
filePlayback=null;
}
@Override
<BUG>public void stop() { if ( filePlayback!=null ) filePlayback.stop(); }
void initFiles() throws FileNotFoundException {</BUG>
if ((dataDir.length() != 0) && !dataDir.endsWith("/")) { dataDir = dataDir + "/"; } // guard path if needed
String samples_str = dataDir ... | @Override public boolean isrunning(){ if ( filePlayback!=null ) return filePlayback.isrunning(); return false; }
void initFiles() throws FileNotFoundException {
|
26,595 | public class BufferMonitor extends Thread implements FieldtripBufferMonitor {
public static final String TAG = BufferMonitor.class.toString();
private final Context context;
private final SparseArray<BufferConnectionInfo> clients = new SparseArray<BufferConnectionInfo>();
private final BufferInfo info;
<BUG>private fin... | [DELETED] |
26,596 | public static final String CLIENT_INFO_TIME = "c_time";
public static final String CLIENT_INFO_WAITTIMEOUT = "c_waitTimeout";
public static final String CLIENT_INFO_CONNECTED = "c_connected";
public static final String CLIENT_INFO_CHANGED = "c_changed";
public static final String CLIENT_INFO_DIFF = "c_diff";
<BUG>publi... | public static final int THREAD_INFO_TYPE = 0;
|
26,597 | package nl.dcc.buffer_bci.bufferclientsservice;
import android.os.Parcel;
import android.os.Parcelable;
<BUG>import nl.dcc.buffer_bci.bufferservicecontroller.C;
public class ThreadInfo implements Parcelable {</BUG>
public static final Creator<ThreadInfo> CREATOR = new Creator<ThreadInfo>() {
@Override
public ThreadInfo... | import nl.dcc.buffer_bci.C;
public class ThreadInfo implements Parcelable {
|
26,598 | }
@RootTask
static Task<Exec.Result> exec(String parameter, int number) {
Task<String> task1 = MyTask.create(parameter);
Task<Integer> task2 = Adder.create(number, number + 2);
<BUG>return Task.ofType(Exec.Result.class).named("exec", "/bin/sh")
.in(() -> task1)</BUG>
.in(() -> task2)
.process(Exec.exec((str, i) -> args... | return Task.named("exec", "/bin/sh").ofType(Exec.Result.class)
.in(() -> task1)
|
26,599 | return args;
}
static class MyTask {
static final int PLUS = 10;
static Task<String> create(String parameter) {
<BUG>return Task.ofType(String.class).named("MyTask", parameter)
.in(() -> Adder.create(parameter.length(), PLUS))</BUG>
.in(() -> Fib.create(parameter.length()))
.process((sum, fib) -> something(parameter, s... | return Task.named("MyTask", parameter).ofType(String.class)
.in(() -> Adder.create(parameter.length(), PLUS))
|
26,600 | final String instanceField = "from instance";
final TaskContext context = TaskContext.inmem();
final AwaitingConsumer<String> val = new AwaitingConsumer<>();
@Test
public void shouldJavaUtilSerialize() throws Exception {
<BUG>Task<Long> task1 = Task.ofType(Long.class).named("Foo", "Bar", 39)
.process(() -> 9999L);
Task... | Task<Long> task1 = Task.named("Foo", "Bar", 39).ofType(Long.class)
Task<String> task2 = Task.named("Baz", 40).ofType(String.class)
.in(() -> task1)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.