type stringclasses 1
value | dataset stringclasses 1
value | input stringlengths 75 160k | instruction stringlengths 117 171 | output stringlengths 88 168k |
|---|---|---|---|---|
Inversion-Mutation | megadiff | "public void actionPerformed(final ActionEvent e)
{
final CreateNewRepositoryFolderDialog newFolderDialog =
new CreateNewRepositoryFolderDialog(RepositoryPublishDialog.this);
if (!newFolderDialog.performEdit())
{
return;
}
final FileObject treeNode = g... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "actionPerformed" | "public void actionPerformed(final ActionEvent e)
{
final CreateNewRepositoryFolderDialog newFolderDialog =
new CreateNewRepositoryFolderDialog(RepositoryPublishDialog.this);
if (!newFolderDialog.performEdit())
{
return;
}
final FileObject treeNode = g... |
Inversion-Mutation | megadiff | "public void submitJob(final Job job, boolean stageFiles,
DtoActionStatus status) throws JobSubmissionException {
final String debug_token = "SUBMIT_" + job.getJobname() + ": ";
try {
int noStageins = 0;
if (stageFiles) {
final List<Element> stageIns = JsdlHelpers
.getStageInElements... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "submitJob" | "public void submitJob(final Job job, boolean stageFiles,
DtoActionStatus status) throws JobSubmissionException {
final String debug_token = "SUBMIT_" + job.getJobname() + ": ";
try {
int noStageins = 0;
if (stageFiles) {
final List<Element> stageIns = JsdlHelpers
.getStageInElements... |
Inversion-Mutation | megadiff | "private void storeDicomFiles(InputStream istream, String parentDir) throws IOException {
File dicomDirectory = new File(temporaryStorageDirectory, parentDir);
dicomDirectory.mkdir();
ZipInputStream zis = new ZipInputStream(istream);
ZipEntryInputStream zeis = null;
while (t... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "storeDicomFiles" | "private void storeDicomFiles(InputStream istream, String parentDir) throws IOException {
File dicomDirectory = new File(temporaryStorageDirectory, parentDir);
dicomDirectory.mkdir();
ZipInputStream zis = new ZipInputStream(istream);
ZipEntryInputStream zeis = null;
while (t... |
Inversion-Mutation | megadiff | "public int getFarmedPotential(int goods, Tile tile) {
if (tile == null) {
throw new NullPointerException();
}
int base = tile.potential(goods);
if (getLocation() instanceof ColonyTile && !((ColonyTile) getLocation()).getWorkTile().isLand()
&& !((Co... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getFarmedPotential" | "public int getFarmedPotential(int goods, Tile tile) {
if (tile == null) {
throw new NullPointerException();
}
int base = tile.potential(goods);
<MASK>base = getProductionUsing(getType(), goods, base, tile);</MASK>
if (getLocation() instanceof ColonyTile && ... |
Inversion-Mutation | megadiff | "public synchronized int subscribeToSensorData(int sensorId, SensorDataListener listener) throws ESException
{
AbstractSensorTask task = sensorTaskMap.get(sensorId);
if (task != null)
{
if (!isSubscribedToBattery)
{
// register with battery sensor
isSubscribedToBattery = true;
battery... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "subscribeToSensorData" | "public synchronized int subscribeToSensorData(int sensorId, SensorDataListener listener) throws ESException
{
AbstractSensorTask task = sensorTaskMap.get(sensorId);
if (task != null)
{
if (!isSubscribedToBattery)
{
// register with battery sensor
<MASK>batterySubscriptionId = subscribeToSe... |
Inversion-Mutation | megadiff | "@Override
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
TileEntitySecurityCore te = (TileEntitySecurityCore) par1World.getBlockTileEntity(par2, par3, par4);
switch (te.inputMode) {
case 1:
p... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onBlockActivated" | "@Override
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
TileEntitySecurityCore te = (TileEntitySecurityCore) par1World.getBlockTileEntity(par2, par3, par4);
switch (te.inputMode) {
case 1:
p... |
Inversion-Mutation | megadiff | "public void combineWays(Collection<Way> ways) {
// prepare and clean the list of ways to combine
//
if (ways == null || ways.isEmpty())
return;
ways.remove(null); // just in case - remove all null ways from the collection
ways = new HashSet<Way>(ways); // re... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "combineWays" | "public void combineWays(Collection<Way> ways) {
// prepare and clean the list of ways to combine
//
if (ways == null || ways.isEmpty())
return;
ways.remove(null); // just in case - remove all null ways from the collection
ways = new HashSet<Way>(ways); // re... |
Inversion-Mutation | megadiff | "private void connect() {
LOG.debug("Connecting to bookie: {}", addr);
// Set up the ClientBootStrap so we can create a new Channel connection
// to the bookie.
ClientBootstrap bootstrap = new ClientBootstrap(channelFactory);
bootstrap.setPipelineFactory(this);
bo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "connect" | "private void connect() {
LOG.debug("Connecting to bookie: {}", addr);
// Set up the ClientBootStrap so we can create a new Channel connection
// to the bookie.
ClientBootstrap bootstrap = new ClientBootstrap(channelFactory);
bootstrap.setPipelineFactory(this);
bo... |
Inversion-Mutation | megadiff | "@Override
public void operationComplete(ChannelFuture future) throws Exception {
int rc;
Queue<GenericCallback<Void>> oldPendingOps;
synchronized (PerChannelBookieClient.this) {
if (future.isSuccess() && state == ConnectionState.C... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "operationComplete" | "@Override
public void operationComplete(ChannelFuture future) throws Exception {
int rc;
Queue<GenericCallback<Void>> oldPendingOps;
synchronized (PerChannelBookieClient.this) {
if (future.isSuccess() && state == ConnectionState.C... |
Inversion-Mutation | megadiff | "public void beginMinecraftLoading(Minecraft minecraft)
{
client = minecraft;
if (minecraft.func_71355_q())
{
FMLLog.severe("DEMO MODE DETECTED, FML will not work. Finishing now.");
haltGame("FML will not run in demo mode", new RuntimeException());
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "beginMinecraftLoading" | "public void beginMinecraftLoading(Minecraft minecraft)
{
if (minecraft.func_71355_q())
{
FMLLog.severe("DEMO MODE DETECTED, FML will not work. Finishing now.");
haltGame("FML will not run in demo mode", new RuntimeException());
return;
}
... |
Inversion-Mutation | megadiff | "public PortfolioView()
throws IOException, ParserConfigurationException, SAXException, NamingException {
frame = new JFrame("Invest");
JLabel label = new JLabel("Starting...", JLabel.CENTER);
label.setPreferredSize(new Dimension(480, 300));
frame.add(label);
frame.setDefaultCloseOperation(JFrame.EXI... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "PortfolioView" | "public PortfolioView()
throws IOException, ParserConfigurationException, SAXException, NamingException {
frame = new JFrame("Invest");
JLabel label = new JLabel("Starting...", JLabel.CENTER);
label.setPreferredSize(new Dimension(480, 300));
frame.add(label);
frame.setDefaultCloseOperation(JFrame.EXI... |
Inversion-Mutation | megadiff | "public void save(String fileName, boolean onlyData) {
FileOperations.createDirectory(TEMP_PROJECT_FOLDER);
try {
if (!onlyData) {
saveWorkbenchData(TEMP_PROJECT_FOLDER);
}
savePluginData(TEMP_PROJECT_FOLDER);
saveData(TEMP_PROJECT_FOLDER);
}
catch (Exception savingException) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "save" | "public void save(String fileName, boolean onlyData) {
FileOperations.createDirectory(TEMP_PROJECT_FOLDER);
try {
if (!onlyData) {
<MASK>savePluginData(TEMP_PROJECT_FOLDER);</MASK>
saveWorkbenchData(TEMP_PROJECT_FOLDER);
}
saveData(TEMP_PROJECT_FOLDER);
}
catch (Exception saving... |
Inversion-Mutation | megadiff | "public static Resolution invokeEventHandler(ExecutionContext ctx) throws Exception {
final Configuration config = StripesFilter.getConfiguration();
final Method handler = ctx.getHandler();
final ActionBean bean = ctx.getActionBean();
// Finally execute the handler method!
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "invokeEventHandler" | "public static Resolution invokeEventHandler(ExecutionContext ctx) throws Exception {
final Configuration config = StripesFilter.getConfiguration();
final Method handler = ctx.getHandler();
final ActionBean bean = ctx.getActionBean();
// Finally execute the handler method!
... |
Inversion-Mutation | megadiff | "public Resolution intercept(ExecutionContext ctx) throws Exception {
Object returnValue = handler.invoke(bean);
fillInValidationErrors(ctx);
if (returnValue != null && returnValue instanceof Resolution) {
ctx.setResolutionFromHandler(true);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "intercept" | "public Resolution intercept(ExecutionContext ctx) throws Exception {
Object returnValue = handler.invoke(bean);
if (returnValue != null && returnValue instanceof Resolution) {
ctx.setResolutionFromHandler(true);
return (Resolution) returnVa... |
Inversion-Mutation | megadiff | "private void evaluationFinished(IEvaluationResult result) {
fEngine.evaluationThreadFinished(this);
fListener.evaluationComplete(result);
fExpression= null;
fContext= null;
fThread= null;
fListener= null;
fException= null;
fEvaluating = false;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "evaluationFinished" | "private void evaluationFinished(IEvaluationResult result) {
<MASK>fEvaluating = false;</MASK>
fEngine.evaluationThreadFinished(this);
fListener.evaluationComplete(result);
fExpression= null;
fContext= null;
fThread= null;
fListener= null;
fException= null;
}" |
Inversion-Mutation | megadiff | "public boolean upgradeTower(ITower tower){
if(playerCanAffordUpgrade(tower)){
player.removeMoney(tower.getUpgradeCost());
tower.upgrade();
return true;
} else {
return false;
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "upgradeTower" | "public boolean upgradeTower(ITower tower){
if(playerCanAffordUpgrade(tower)){
<MASK>tower.upgrade();</MASK>
player.removeMoney(tower.getUpgradeCost());
return true;
} else {
return false;
}
}" |
Inversion-Mutation | megadiff | "public void process(RelationContainer relationContainer) {
Relation relation;
EntityType[] entityTypes;
entityTypes = EntityType.values();
relation = relationContainer.getEntity();
relationWriter.writeField(relation.getId());
relationWriter.writeField(relation.getVersion());
relationWr... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "process" | "public void process(RelationContainer relationContainer) {
Relation relation;
EntityType[] entityTypes;
entityTypes = EntityType.values();
relation = relationContainer.getEntity();
relationWriter.writeField(relation.getId());
relationWriter.writeField(relation.getVersion());
relationWr... |
Inversion-Mutation | megadiff | "@Override
public void onResume() {
super.onResume();
// We look for saved user keys
if(mSettings.contains(App.USER_TOKEN) && mSettings.contains(App.USER_SECRET)) {
mToken = mSettings.getString(App.USER_TOKEN, null);
mSecret = mSettings.getString(App.USER_SECR... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onResume" | "@Override
public void onResume() {
super.onResume();
// We look for saved user keys
if(mSettings.contains(App.USER_TOKEN) && mSettings.contains(App.USER_SECRET)) {
mToken = mSettings.getString(App.USER_TOKEN, null);
mSecret = mSettings.getString(App.USER_SECR... |
Inversion-Mutation | megadiff | "private static Class makeClass(Class referent, Vector secondary,
String name, ByteArrayOutputStream bytes)
{
Vector referents = null;
if (secondary != null) {
if (referent != null) {
secondary.insertElementAt(referent,0);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "makeClass" | "private static Class makeClass(Class referent, Vector secondary,
String name, ByteArrayOutputStream bytes)
{
Vector referents = null;
if (secondary != null) {
if (referent != null) {
secondary.insertElementAt(referent,0);
... |
Inversion-Mutation | megadiff | "private void call(String procUri, CallMeta resultMeta, Object... arguments) {
WampMessage.Call call = new WampMessage.Call(newId(), procUri, arguments.length);
for (int i = 0; i < arguments.length; ++i) {
call.mArgs[i] = arguments[i];
}
mCalls.put(call.mCallId, resultMeta);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "call" | "private void call(String procUri, CallMeta resultMeta, Object... arguments) {
WampMessage.Call call = new WampMessage.Call(newId(), procUri, arguments.length);
for (int i = 0; i < arguments.length; ++i) {
call.mArgs[i] = arguments[i];
}
<MASK>mWriter.forward(call);</MASK>
... |
Inversion-Mutation | megadiff | "@Override
public void tearDown() throws Exception {
if (root.hasNode(ID_TEST)) {
root.getNode(ID_TEST).remove();
session.save();
}
super.tearDown();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "tearDown" | "@Override
public void tearDown() throws Exception {
<MASK>super.tearDown();</MASK>
if (root.hasNode(ID_TEST)) {
root.getNode(ID_TEST).remove();
session.save();
}
}" |
Inversion-Mutation | megadiff | "Augmentations handleEndElement(QName element, Augmentations augs) {
if (DEBUG) {
System.out.println("==>handleEndElement:" +element);
}
// if we are skipping, return
if (fSkipValidationDepth >= 0) {
// but if this is the top element that we are skipping,
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleEndElement" | "Augmentations handleEndElement(QName element, Augmentations augs) {
if (DEBUG) {
System.out.println("==>handleEndElement:" +element);
}
// if we are skipping, return
if (fSkipValidationDepth >= 0) {
// but if this is the top element that we are skipping,
... |
Inversion-Mutation | megadiff | "private void viewForm(IWContext iwc) throws RemoteException {
if (child != null) {
Form form = new Form();
form.maintainParameter(prmChildId);
Table table = new Table();
table.setWidth(getWidth());
table.setCellpadding(getCellpadding());
table.setCellspacing(getCellspacing());
form.add... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "viewForm" | "private void viewForm(IWContext iwc) throws RemoteException {
if (child != null) {
Form form = new Form();
form.maintainParameter(prmChildId);
Table table = new Table();
table.setWidth(getWidth());
table.setCellpadding(getCellpadding());
table.setCellspacing(getCellspacing());
form.add... |
Inversion-Mutation | megadiff | "@Override
protected void
processUnsolicited (Parcel p) {
Object ret;
int dataPosition = p.dataPosition(); // save off position within the Parcel
int response = p.readInt();
switch(response) {
case RIL_UNSOL_RIL_CONNECTED: // Fix for NV/RUIM setting on CDMA S... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processUnsolicited" | "@Override
protected void
processUnsolicited (Parcel p) {
Object ret;
int dataPosition = p.dataPosition(); // save off position within the Parcel
int response = p.readInt();
switch(response) {
case RIL_UNSOL_RIL_CONNECTED: // Fix for NV/RUIM setting on CDMA S... |
Inversion-Mutation | megadiff | "protected void renderName(EntityPlayer var1, double var2, double var4, double var6) {
if(Minecraft.isGuiEnabled() && (var1 != this.renderManager.livingPlayer || (Minecraft.theMinecraft.gameSettings.thirdPersonView != 0 && Minecraft.theMinecraft.currentScreen == null))) {
float var8 = 1.6F;
float var9 = 0.01... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "renderName" | "protected void renderName(EntityPlayer var1, double var2, double var4, double var6) {
if(Minecraft.isGuiEnabled() && (var1 != this.renderManager.livingPlayer || (Minecraft.theMinecraft.gameSettings.thirdPersonView != 0 && Minecraft.theMinecraft.currentScreen == null))) {
float var8 = 1.6F;
float var9 = 0.01... |
Inversion-Mutation | megadiff | "public void update(long elapsedTime)
{
Vector2D vector = new Vector2D();
TeamBehaviorInterface teamBehavior = mTeam.getBehavior();
mBehavior.apply(vector, elapsedTime);
if (teamBehavior != null) {
teamBehavior.apply(vector, elapsedTime);
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "update" | "public void update(long elapsedTime)
{
Vector2D vector = new Vector2D();
TeamBehaviorInterface teamBehavior = mTeam.getBehavior();
mBehavior.apply(vector, elapsedTime);
if (teamBehavior != null) {
teamBehavior.apply(vector, elapsedTime);
}
<... |
Inversion-Mutation | megadiff | "public void startElement(String uri, String localName, String qName,
Attributes a) throws SAXException {
// Initialize string buffer to hold content of the new element.
// This will start a fresh buffer for every element encountered.
m_elementContent=new StringBuffer();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startElement" | "public void startElement(String uri, String localName, String qName,
Attributes a) throws SAXException {
// Initialize string buffer to hold content of the new element.
// This will start a fresh buffer for every element encountered.
m_elementContent=new StringBuffer();
... |
Inversion-Mutation | megadiff | "ToolbarPanel() {
setBackground(Color.white);
addMouseListener(this);
try {
drawButton = Toolbar.class.getDeclaredMethod("drawButton", Graphics.class, Integer.TYPE);
drawButton.setAccessible(true);
lineType = Toolbar.class.getDeclaredField("lineType");
lineType.setAccessible(true);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ToolbarPanel" | "ToolbarPanel() {
setBackground(Color.white);
addMouseListener(this);
try {
drawButton = Toolbar.class.getDeclaredMethod("drawButton", Graphics.class, Integer.TYPE);
drawButton.setAccessible(true);
lineType = Toolbar.class.getDeclaredField("lineType");
lineType.setAccessible(true);
... |
Inversion-Mutation | megadiff | "private void setView() {
switch(mMode) {
case MODE_EDITOR:
setContentView(R.layout.activity_list);
EditText editText = (EditText) findViewById(R.id.editText1);
// Button mGoBtn = (Button) findViewById(R.id.button1);
// mGoBtn.setOnClickListener(this);
// Button mGoBtn2 = (Button) findViewById... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setView" | "private void setView() {
switch(mMode) {
case MODE_EDITOR:
setContentView(R.layout.activity_list);
EditText editText = (EditText) findViewById(R.id.editText1);
// Button mGoBtn = (Button) findViewById(R.id.button1);
// mGoBtn.setOnClickListener(this);
// Button mGoBtn2 = (Button) findViewById... |
Inversion-Mutation | megadiff | "public static MediaItem createMediaItemFromUri(Context context, Uri target, int mediaType) {
MediaItem item = null;
long id = ContentUris.parseId(target);
ContentResolver cr = context.getContentResolver();
String whereClause = Images.ImageColumns._ID + "=" + Long.toString(id);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createMediaItemFromUri" | "public static MediaItem createMediaItemFromUri(Context context, Uri target, int mediaType) {
MediaItem item = null;
long id = ContentUris.parseId(target);
ContentResolver cr = context.getContentResolver();
String whereClause = Images.ImageColumns._ID + "=" + Long.toString(id);
... |
Inversion-Mutation | megadiff | "public static boolean parsePage(String htmlCode, SQLiteDatabase db, int cafeteriaid) throws ParseException
{
Integer cid = Integer.valueOf(cafeteriaid);
htmlCode = StringUtils.substringAfter(htmlCode, "<div class=\"\">");
htmlCode = StringUtils.substringBefore(htmlCode, "<table class");
htmlCode = htmlCo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parsePage" | "public static boolean parsePage(String htmlCode, SQLiteDatabase db, int cafeteriaid) throws ParseException
{
Integer cid = Integer.valueOf(cafeteriaid);
htmlCode = StringUtils.substringAfter(htmlCode, "<div class=\"\">");
htmlCode = StringUtils.substringBefore(htmlCode, "<table class");
htmlCode = htmlCo... |
Inversion-Mutation | megadiff | "public static void main(String[] args)
{
try{output = new BufferedWriter(new FileWriter("NB1k@.1results.txt"));}catch(IOException e){e.printStackTrace();}
Classifier c = ClassifierTrainer.getClassifier(ClassifierType.NB, DataType.ONE, null);
Agent agent = new MLAgent(c);
String[] ops = {
"-vis off... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "main" | "public static void main(String[] args)
{
try{output = new BufferedWriter(new FileWriter("NB1k@.1results.txt"));}catch(IOException e){e.printStackTrace();}
Classifier c = ClassifierTrainer.getClassifier(ClassifierType.NB, DataType.ONE, null);
Agent agent = new MLAgent(c);
<MASK>options = new MarioAIOptio... |
Inversion-Mutation | megadiff | "public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.setup_main);
mSetupData = (AbstractSetupData)getLastNonConfigurationInstance();
if (mSetupData == null) {
mSetupData = new CMSetupWizardData(this);
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.setup_main);
mSetupData = (AbstractSetupData)getLastNonConfigurationInstance();
if (mSetupData == null) {
mSetupData = new CMSetupWizardData(this);
}
... |
Inversion-Mutation | megadiff | "public void process() {
if (src == null && dest == null) {
throw new IllegalArgumentException("Source and destination shouldn't be null together");
}
ZipEntryTransformerEntry[] transformersArray = getTransformersArray();
File destinationFile = null;
try {
destinationFile = ge... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "process" | "public void process() {
if (src == null && dest == null) {
throw new IllegalArgumentException("Source and destination shouldn't be null together");
}
ZipEntryTransformerEntry[] transformersArray = getTransformersArray();
File destinationFile = null;
try {
destinationFile = ge... |
Inversion-Mutation | megadiff | "public void onEnable() {
spaceRTK = this;
final YamlConfiguration configuration = YamlConfiguration.loadConfiguration(SpaceModule.CONFIGURATION);
type = configuration.getString("SpaceModule.Type", "Bukkit");
configuration.set("SpaceModule.Type", type = "Bukkit");
salt = con... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEnable" | "public void onEnable() {
spaceRTK = this;
final YamlConfiguration configuration = YamlConfiguration.loadConfiguration(SpaceModule.CONFIGURATION);
type = configuration.getString("SpaceModule.Type", "Bukkit");
configuration.set("SpaceModule.Type", type = "Bukkit");
salt = con... |
Inversion-Mutation | megadiff | "public void play(int x, int y) {
Play play = new Play(this.id, x, y);
try {
this.lock();
this.output.writeUTF("PLAY");
this.output.writeObject(play);
this.output.flush();
this.game.play(play);
} catch (IOException ex) {
Logger.getLogger(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "play" | "public void play(int x, int y) {
Play play = new Play(this.id, x, y);
try {
this.output.writeUTF("PLAY");
this.output.writeObject(play);
this.output.flush();
this.game.play(play);
<MASK>this.lock();</MASK>
} catch (IOException ex) {
Logg... |
Inversion-Mutation | megadiff | "@UsesMocks ({Activity.class, AuthProviderListener.class, SocializeException.class, AuthProviderResponse.class})
public void testAuthenticate() {
final String appId = "foobar";
Activity context = AndroidMock.createNiceMock(Activity.class);
AuthProviderListener listener = AndroidMock.createMock(AuthProvid... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testAuthenticate" | "@UsesMocks ({Activity.class, AuthProviderListener.class, SocializeException.class, AuthProviderResponse.class})
public void testAuthenticate() {
final String appId = "foobar";
Activity context = AndroidMock.createNiceMock(Activity.class);
AuthProviderListener listener = AndroidMock.createMock(AuthProvid... |
Inversion-Mutation | megadiff | "public boolean match(IFileInfo fileInfo) throws CoreException {
if (provider == null) {
IFilterMatcherDescriptor filterDescriptor = project.getWorkspace().getFilterMatcherDescriptor(getId());
if (filterDescriptor != null)
provider = ((FilterDescriptor) filterDescriptor).createFilter();
if (provide... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "match" | "public boolean match(IFileInfo fileInfo) throws CoreException {
if (provider == null) {
IFilterMatcherDescriptor filterDescriptor = project.getWorkspace().getFilterMatcherDescriptor(getId());
if (filterDescriptor != null)
provider = ((FilterDescriptor) filterDescriptor).createFilter();
<MASK>provid... |
Inversion-Mutation | megadiff | "private boolean handleCase () throws IOException {
LinkedList<Integer> crossingTimes = new LinkedList<Integer>();
String l;
i.readLine();
for (l = i.readLine(); l != null && !l.isEmpty(); l = i.readLine()) {
crossingTimes.add(new Integer(l.trim()));
}
Collections.sort(crossingTimes);
List<St... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleCase" | "private boolean handleCase () throws IOException {
LinkedList<Integer> crossingTimes = new LinkedList<Integer>();
String l;
i.readLine();
for (l = i.readLine(); l != null && !l.isEmpty(); l = i.readLine()) {
crossingTimes.add(new Integer(l.trim()));
}
Collections.sort(crossingTimes);
List<St... |
Inversion-Mutation | megadiff | "public void deleteData() throws SQLException, IOException {
update("delete from budget_line_items");
update("delete from budget_file_info");
update("delete from role_rights where roleId not in(1)");
update("delete from role_assignments where userId not in (1)");
update("delete from fulfillment... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "deleteData" | "public void deleteData() throws SQLException, IOException {
update("delete from budget_line_items");
update("delete from budget_file_info");
update("delete from role_rights where roleId not in(1)");
update("delete from role_assignments where userId not in (1)");
update("delete from fulfillment... |
Inversion-Mutation | megadiff | "@Override
public void onScrollStateChanged(AbsListView view, int scrollState)
{
adapter.setCanNotifyOnChange(false);
if (view.getFirstVisiblePosition() == 0 && view.getChildAt(0) != null && view.getChildAt(0).getTop() == 0)
{
if (scrollState == SCROLL_STATE_IDLE)
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onScrollStateChanged" | "@Override
public void onScrollStateChanged(AbsListView view, int scrollState)
{
adapter.setCanNotifyOnChange(false);
if (view.getFirstVisiblePosition() == 0 && view.getChildAt(0) != null && view.getChildAt(0).getTop() == 0)
{
if (scrollState == SCROLL_STATE_IDLE)
... |
Inversion-Mutation | megadiff | "public static void main(String[] args) {
state.setup();
try {
ur=new UDPReceiver();
us=new UDPSender();
} catch (SocketException | UnknownHostException e) {
System.out.println(e.getMessage());
System.out.println("Could not set up UDP socket");
System.exit(-1);
}
Thread tcpListen=new ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "main" | "public static void main(String[] args) {
state.setup();
try {
ur=new UDPReceiver();
us=new UDPSender();
} catch (SocketException | UnknownHostException e) {
System.out.println(e.getMessage());
System.out.println("Could not set up UDP socket");
System.exit(-1);
}
Thread tcpListen=new ... |
Inversion-Mutation | megadiff | "private String asHex(byte buf[])
{
StringBuilder strBuf = new StringBuilder(buf.length * 2);
// make sure it contains a letter!
strBuf.append("h");
for (int i = 0; i < buf.length; i++)
{
if ((buf[i] & 0xff) < 0x10)
{
strBuf.append("0");
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "asHex" | "private String asHex(byte buf[])
{
StringBuilder strBuf = new StringBuilder(buf.length * 2);
// make sure it contains a letter!
strBuf.append("h");
for (int i = 0; i < buf.length; i++)
{
if ((buf[i] & 0xff) < 0x10)
{
strBuf.append("0");
... |
Inversion-Mutation | megadiff | "private void layoutComponents() {
setVisible(false);
removeAll();
int index = 0;
if (trigger == null) {
add(new TextLabel("You must add at least one trigger before you can add conditions."),
"alignx center, aligny top, grow, push, w 90%!");
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "layoutComponents" | "private void layoutComponents() {
setVisible(false);
removeAll();
int index = 0;
if (trigger == null) {
add(new TextLabel("You must add at least one trigger before you can add conditions."),
"alignx center, aligny top, grow, push, w 90%!");
... |
Inversion-Mutation | megadiff | "private void startInternal(final StandardContext standardContext) {
if (isIgnored(standardContext)) return;
final CoreContainerSystem cs = getContainerSystem();
final Assembler a = getAssembler();
if (a == null) {
logger.warning("OpenEJB has not been initialized so ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startInternal" | "private void startInternal(final StandardContext standardContext) {
if (isIgnored(standardContext)) return;
final CoreContainerSystem cs = getContainerSystem();
final Assembler a = getAssembler();
if (a == null) {
logger.warning("OpenEJB has not been initialized so ... |
Inversion-Mutation | megadiff | "public Crypto(){
keyBytes = new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 };
key = new SecretKeySpec(keyBytes, "AES");
try {
cipher = Cipher.getInstance("AES/ECB/... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Crypto" | "public Crypto(){
<MASK>key = new SecretKeySpec(keyBytes, "AES");</MASK>
keyBytes = new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 };
try {
cipher = Cipher.getInsta... |
Inversion-Mutation | megadiff | "public RunAutomaton(Automaton a, int maxInterval, boolean tableize) {
this.maxInterval = maxInterval;
a.determinize();
points = a.getStartPoints();
final State[] states = a.getNumberedStates();
initial = a.initial.number;
size = states.length;
accept = new boolean[size];
transi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "RunAutomaton" | "public RunAutomaton(Automaton a, int maxInterval, boolean tableize) {
this.maxInterval = maxInterval;
a.determinize();
points = a.getStartPoints();
<MASK>initial = a.initial.number;</MASK>
final State[] states = a.getNumberedStates();
size = states.length;
accept = new boolean[size]... |
Inversion-Mutation | megadiff | "public void clean() {
EngineWebResource.stopRestfulServer();
if (_db != null) _db.shutdown();
_db = null;
_server = null;
_txMgr = null;
_executorService = null;
_store = null;
_ds = null;
_scheduler = null;
_scheduler = null;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "clean" | "public void clean() {
EngineWebResource.stopRestfulServer();
if (_db != null) _db.shutdown();
_server = null;
_txMgr = null;
_executorService = null;
_store = null;
<MASK>_db = null;</MASK>
_ds = null;
_scheduler = null;
_schedu... |
Inversion-Mutation | megadiff | "private void createProject() {
// get the target and try to resolve it.
int targetId = mSdkCommandLine.getParamTargetId();
IAndroidTarget[] targets = mSdkManager.getTargets();
if (targetId < 1 || targetId > targets.length) {
errorAndExit("Target id is not valid. Use '%s... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createProject" | "private void createProject() {
// get the target and try to resolve it.
int targetId = mSdkCommandLine.getParamTargetId();
IAndroidTarget[] targets = mSdkManager.getTargets();
if (targetId < 1 || targetId > targets.length) {
errorAndExit("Target id is not valid. Use '%s... |
Inversion-Mutation | megadiff | "protected Configuration(Properties props) {
this.props = props;
parseScenarioMapping(props);
performanceLoggerConfig = createPerformanceLogger();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Configuration" | "protected Configuration(Properties props) {
this.props = props;
<MASK>performanceLoggerConfig = createPerformanceLogger();</MASK>
parseScenarioMapping(props);
}" |
Inversion-Mutation | megadiff | "public boolean call() {
boolean bResult = false;
for (int i = 0; i < callbackInfo.size(); i++) {
try {
((INickInUse)callbackInfo.get(i)).onNickInUse(myParser);
bResult = true;
} catch (Exception e) {
ParserError ei = new ParserError(ParserError.errError, "Exception in onNickInUse");
e... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "call" | "public boolean call() {
boolean bResult = false;
for (int i = 0; i < callbackInfo.size(); i++) {
try {
((INickInUse)callbackInfo.get(i)).onNickInUse(myParser);
} catch (Exception e) {
ParserError ei = new ParserError(ParserError.errError, "Exception in onNickInUse");
ei.setException(e);
... |
Inversion-Mutation | megadiff | "private void listen(final InputStream is) {
final BufferedInputStream bi = new BufferedInputStream(is);
new Thread() {
@Override
public void run() {
try {
while(true) {
ByteArrayOutputStream os = new ByteArrayOutputStream();
receive(bi, os);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "listen" | "private void listen(final InputStream is) {
new Thread() {
@Override
public void run() {
try {
<MASK>final BufferedInputStream bi = new BufferedInputStream(is);</MASK>
while(true) {
ByteArrayOutputStream os = new ByteArrayOutputStream();
rece... |
Inversion-Mutation | megadiff | "public void update() {
updateShape();
updateEdge();
if (!isContentVisible()) {
mainView.setVisible(false);
return;
}
mainView.setVisible(true);
mainView.updateTextColor(this);
mainView.updateFont(this);
createAttributeView();
if (attributeView != null) {
attributeView.update();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "update" | "public void update() {
updateShape();
if (!isContentVisible()) {
mainView.setVisible(false);
return;
}
mainView.setVisible(true);
mainView.updateTextColor(this);
mainView.updateFont(this);
createAttributeView();
if (attributeView != null) {
attributeView.update();
}
NodeViewF... |
Inversion-Mutation | megadiff | "@Override
public boolean check(List<Vec2> trace){
if(trace.size() < 2)
return true;
angle = Filters.getAngle(trace);
Vec2 beg = trace.get(0);
Vec2 end = trace.get(trace.size()-1);
vec_x = Math.abs(end.x - beg.x);
vec_y = Math.abs(end.y - beg.y);
return true;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "check" | "@Override
public boolean check(List<Vec2> trace){
<MASK>angle = Filters.getAngle(trace);</MASK>
if(trace.size() < 2)
return true;
Vec2 beg = trace.get(0);
Vec2 end = trace.get(trace.size()-1);
vec_x = Math.abs(end.x - beg.x);
vec_y = Math.abs(end.y - beg.y);
return true;
}" |
Inversion-Mutation | megadiff | "public void test1ToManyJoinClob(boolean freelob, boolean commitAfterLobVerify) throws SQLException, IOException
{
PreparedStatement ps = prepareStatement(
"select c from testClob join jointab on jointab.id = testClob.id");
ResultSet rs = ps.executeQuery();
while... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "test1ToManyJoinClob" | "public void test1ToManyJoinClob(boolean freelob, boolean commitAfterLobVerify) throws SQLException, IOException
{
PreparedStatement ps = prepareStatement(
"select c from testClob join jointab on jointab.id = testClob.id");
ResultSet rs = ps.executeQuery();
while... |
Inversion-Mutation | megadiff | "@Override
protected void createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
createButton(parent, IDialogConstants.CLIENT_ID + 1, Messages.DateSelectionDialog_Clear, false);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createButtonsForButtonBar" | "@Override
protected void createButtonsForButtonBar(Composite parent) {
<MASK>createButton(parent, IDialogConstants.CLIENT_ID + 1, Messages.DateSelectionDialog_Clear, false);</MASK>
super.createButtonsForButtonBar(parent);
}" |
Inversion-Mutation | megadiff | "public void badRequest(List<?> errors) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
result.use(representation()).from(errors, "errors").serialize();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "badRequest" | "public void badRequest(List<?> errors) {
<MASK>result.use(representation()).from(errors, "errors").serialize();</MASK>
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
}" |
Inversion-Mutation | megadiff | "public void parse() {
if (parsed)
return;
header = new NXHeader(this, slea);
nodes = new NXNode[(int) header.getNodeCount()];
tables = new NXTables(header, slea);
populateNodesTable();
parsed = true;
populateNodeChildren();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parse" | "public void parse() {
if (parsed)
return;
header = new NXHeader(this, slea);
nodes = new NXNode[(int) header.getNodeCount()];
tables = new NXTables(header, slea);
populateNodesTable();
<MASK>populateNodeChildren();</MASK>
parsed = true;
}" |
Inversion-Mutation | megadiff | "@Override
protected void onApply() {
final String productName = targetProductSelector.getModel().getProductName();
if (productName == null || productName.isEmpty()) {
showErrorDialog("Please specify a target product name.");
targetProductSelector.getProductNameTextField... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onApply" | "@Override
protected void onApply() {
final String productName = targetProductSelector.getModel().getProductName();
if (productName == null || productName.isEmpty()) {
showErrorDialog("Please specify a target product name.");
targetProductSelector.getProductNameTextField... |
Inversion-Mutation | megadiff | "public static void dismiss() {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
dialog = null;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "dismiss" | "public static void dismiss() {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
<MASK>dialog = null;</MASK>
}
}" |
Inversion-Mutation | megadiff | "public void disconnect() throws IOException {
outputStream.flush();
socket.close();
inputStream = null;
outputStream = null;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "disconnect" | "public void disconnect() throws IOException {
socket.close();
inputStream = null;
<MASK>outputStream.flush();</MASK>
outputStream = null;
}" |
Inversion-Mutation | megadiff | "@Override
public void showAds(final boolean show) {
if (isProVersion()) return;
runOnUiThread(new Runnable() {
@Override
public void run() {
if (show) {
adView.loadAd(new AdRequest());
adView.setVisibility(View.VISIBLE);
} else {
adView.set... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showAds" | "@Override
public void showAds(final boolean show) {
if (isProVersion()) return;
runOnUiThread(new Runnable() {
@Override
public void run() {
if (show) {
<MASK>adView.setVisibility(View.VISIBLE);</MASK>
adView.loadAd(new AdRequest());
} else {
... |
Inversion-Mutation | megadiff | "@Override
public void run() {
if (show) {
adView.loadAd(new AdRequest());
adView.setVisibility(View.VISIBLE);
} else {
adView.setVisibility(View.GONE);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
if (show) {
<MASK>adView.setVisibility(View.VISIBLE);</MASK>
adView.loadAd(new AdRequest());
} else {
adView.setVisibility(View.GONE);
}
}" |
Inversion-Mutation | megadiff | "private void createNewProjects() {
StructureEdit se = null;
try {
se = StructureEdit.getStructureEditForWrite(project);
List comps = se.getComponentModelRoot().getComponents();
List removedComps = new ArrayList();
for (int i = 1;i<comps.size();i++) {
WorkbenchComponent comp = (Workb... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createNewProjects" | "private void createNewProjects() {
StructureEdit se = null;
try {
se = StructureEdit.getStructureEditForWrite(project);
List comps = se.getComponentModelRoot().getComponents();
List removedComps = new ArrayList();
for (int i = 1;i<comps.size();i++) {
WorkbenchComponent comp = (Workb... |
Inversion-Mutation | megadiff | "protected void setup(Slot s, Rendered r) {
T t = map(r);
super.setup(s, r);
Location loc = s.os.get(PView.loc);
plain.copy(s.os);
s.os.put(PView.loc, loc);
if(t != null) {
Color col = newcol(t);
new States.ColState(col).prep(s.os);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setup" | "protected void setup(Slot s, Rendered r) {
T t = map(r);
Location loc = s.os.get(PView.loc);
plain.copy(s.os);
s.os.put(PView.loc, loc);
if(t != null) {
Color col = newcol(t);
new States.ColState(col).prep(s.os);
}
<MASK>super.setup(s, r);</MASK>
}" |
Inversion-Mutation | megadiff | "public SWTBotTreeItem doubleClick() {
assertEnabled();
asyncExec(new VoidResult() {
public void run() {
tree.setSelection(widget);
}
});
notifyTree(SWT.Selection);
notifyTree(SWT.MouseDown);
notifyTree(SWT.MouseUp);
notifyTree(SWT.MouseDown);
notifyTree(SWT.MouseDoubleClick);
n... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doubleClick" | "public SWTBotTreeItem doubleClick() {
assertEnabled();
<MASK>notifyTree(SWT.MouseDown);</MASK>
asyncExec(new VoidResult() {
public void run() {
tree.setSelection(widget);
}
});
notifyTree(SWT.Selection);
notifyTree(SWT.MouseUp);
<MASK>notifyTree(SWT.MouseDown);</MASK>
notifyTree(S... |
Inversion-Mutation | megadiff | "public static void showDialog()
{
if (Client.getOperatingSystem() == Client.OS.UNIX) {
// JKG 07Apr2006:
// On Linux, if a dialog is built, closed using setVisible(false),
// and then requested again using setVisible(true), it does
// not appear on top. I'... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showDialog" | "public static void showDialog()
{
if (Client.getOperatingSystem() == Client.OS.UNIX) {
// JKG 07Apr2006:
// On Linux, if a dialog is built, closed using setVisible(false),
// and then requested again using setVisible(true), it does
// not appear on top. I'... |
Inversion-Mutation | megadiff | "public static Object getService(String serviceName, Class serviceType) {
Object proxy = null;
if (serviceName != null && serviceName.equals(ANY))
serviceName = null;
int tryNo = 0;
while (tryNo < LUS_REAPEAT) {
logger.info("trying to get service: " + serviceType + ":" + serviceName + "; attempt: "
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getService" | "public static Object getService(String serviceName, Class serviceType) {
Object proxy = null;
if (serviceName != null && serviceName.equals(ANY))
serviceName = null;
int tryNo = 0;
while (tryNo < LUS_REAPEAT) {
logger.info("trying to get service: " + serviceType + ":" + serviceName + "; attempt: "
... |
Inversion-Mutation | megadiff | "private static void setupStatic(NoItem instance) {
NoItem.instance = instance;
NoItem.config = new Config();
NoItem.permsManager = new PermMan();
NoItem.lists = new Lists();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setupStatic" | "private static void setupStatic(NoItem instance) {
NoItem.instance = instance;
<MASK>NoItem.permsManager = new PermMan();</MASK>
NoItem.config = new Config();
NoItem.lists = new Lists();
}" |
Inversion-Mutation | megadiff | "public void openConsole() {
if (fConsole == null) {
fConsole = new JavaStackTraceConsole(); //$NON-NLS-1$
fConsole.initializeDocument();
fConsoleManager.addConsoles(new IConsole[]{fConsole});
}
fConsoleManager.showConsoleView(fConsole);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "openConsole" | "public void openConsole() {
if (fConsole == null) {
fConsole = new JavaStackTraceConsole(); //$NON-NLS-1$
fConsoleManager.addConsoles(new IConsole[]{fConsole});
}
<MASK>fConsole.initializeDocument();</MASK>
fConsoleManager.showConsoleView(fConsole);
}" |
Inversion-Mutation | megadiff | "public void run(String[] args) {
if (args.length < 6 || args.length > 8) {
usage();
}
try {
int argNo = 0;
if (args[argNo].equals("-cg")) {
useCg = true;
++argNo;
}
hdrFilename = args[argNo++];
pbuffer_w = Integer.parseInt(args[argNo+... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run(String[] args) {
if (args.length < 6 || args.length > 8) {
usage();
}
try {
int argNo = 0;
if (args[argNo].equals("-cg")) {
useCg = true;
++argNo;
}
hdrFilename = args[argNo++];
pbuffer_w = Integer.parseInt(args[argNo+... |
Inversion-Mutation | megadiff | "@Override
public boolean onContextItemSelected(MenuItem item) {
AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
switch (item.getItemId()) {
case EDIT_TASK_MENU_ITEM:
Intent i = new Intent(this, TaskEditActivity.class);
i.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onContextItemSelected" | "@Override
public boolean onContextItemSelected(MenuItem item) {
AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
switch (item.getItemId()) {
case EDIT_TASK_MENU_ITEM:
Intent i = new Intent(this, TaskEditActivity.class);
<MA... |
Inversion-Mutation | megadiff | "public Collection<Api> parse() {
List<Api> apis = new ArrayList<Api>();
Map<String, Collection<Method>> apiMethods = new HashMap<String, Collection<Method>>();
for (MethodDoc method : classDoc.methods()) {
ApiMethodParser methodParser = parentMethod == null ?
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parse" | "public Collection<Api> parse() {
List<Api> apis = new ArrayList<Api>();
Map<String, Collection<Method>> apiMethods = new HashMap<String, Collection<Method>>();
for (MethodDoc method : classDoc.methods()) {
ApiMethodParser methodParser = parentMethod == null ?
... |
Inversion-Mutation | megadiff | "@Override
public void createControl(Composite parent) {
super.createControl(parent);
ProjectChooser projChooser = (ProjectChooser) form.getWidgetControl("project");
final PackageChooser pkgChooser = (PackageChooser) form.getWidgetControl("package");
OperationWizard wiz = (Opera... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createControl" | "@Override
public void createControl(Composite parent) {
super.createControl(parent);
ProjectChooser projChooser = (ProjectChooser) form.getWidgetControl("project");
final PackageChooser pkgChooser = (PackageChooser) form.getWidgetControl("package");
OperationWizard wiz = (Opera... |
Inversion-Mutation | megadiff | "private void listen(final InputStream is) {
new Thread() {
@Override
public void run() {
try {
final BufferedInputStream bi = new BufferedInputStream(is);
while(true) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
receive(bi, bao... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "listen" | "private void listen(final InputStream is) {
new Thread() {
@Override
public void run() {
try {
while(true) {
<MASK>final BufferedInputStream bi = new BufferedInputStream(is);</MASK>
ByteArrayOutputStream baos = new ByteArrayOutputStream();
... |
Inversion-Mutation | megadiff | "@Override
public void run() {
try {
final BufferedInputStream bi = new BufferedInputStream(is);
while(true) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
receive(bi, baos);
final String name = baos.toString("UTF-8");
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
try {
while(true) {
<MASK>final BufferedInputStream bi = new BufferedInputStream(is);</MASK>
ByteArrayOutputStream baos = new ByteArrayOutputStream();
receive(bi, baos);
final String name = baos.toString("UTF-... |
Inversion-Mutation | megadiff | "public void main(IWContext iwc) throws Exception {
super.main(iwc);
init(iwc);
iwrb.getLocalizedString(WINDOW_NAME, "Update League Template Window");
addTitle(iwrb.getLocalizedString(WINDOW_NAME, "Update League Template Window"), TITLE_STYLECLASS);
if (group != null) {
if (group.getGroupType().equa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "main" | "public void main(IWContext iwc) throws Exception {
super.main(iwc);
iwrb.getLocalizedString(WINDOW_NAME, "Update League Template Window");
addTitle(iwrb.getLocalizedString(WINDOW_NAME, "Update League Template Window"), TITLE_STYLECLASS);
<MASK>init(iwc);</MASK>
if (group != null) {
if (group.getGro... |
Inversion-Mutation | megadiff | "public void init () {
initRenderer();
initGame();
initUi();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "init" | "public void init () {
initRenderer();
<MASK>initUi();</MASK>
initGame();
}" |
Inversion-Mutation | megadiff | "@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
ServletException {
if (request.getCharacterEncoding() == null) {
request.setCharacterEncoding(defaultCharset);
}
chain.doFilter(request, resp... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doFilter" | "@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
ServletException {
if (request.getCharacterEncoding() == null) {
request.setCharacterEncoding(defaultCharset);
}
if (response.getCharacterEn... |
Inversion-Mutation | megadiff | "public static Test suite() {
TestSuite suite = new TestSuite("Test for org.eclipse.mylyn.tests");
StatusHandler.addStatusHandler(new TestingStatusNotifier());
ResourcesUiBridgePlugin.getDefault().setResourceMonitoringEnabled(false);
// TODO: the order of these tests might still matter, but shouldn't
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "suite" | "public static Test suite() {
TestSuite suite = new TestSuite("Test for org.eclipse.mylyn.tests");
StatusHandler.addStatusHandler(new TestingStatusNotifier());
ResourcesUiBridgePlugin.getDefault().setResourceMonitoringEnabled(false);
// TODO: the order of these tests might still matter, but shouldn't
... |
Inversion-Mutation | megadiff | "public void testGenerateAndReParsingIsTheSame() throws Exception {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
DataOutputStream ds = new DataOutputStream(buffer);
Object expected = createObject();
LOG.info("Created: " + expected);
openWireformat.marshal(expe... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testGenerateAndReParsingIsTheSame" | "public void testGenerateAndReParsingIsTheSame() throws Exception {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
DataOutputStream ds = new DataOutputStream(buffer);
Object expected = createObject();
LOG.info("Created: " + expected);
openWireformat.marshal(expe... |
Inversion-Mutation | megadiff | "private static void initGraphics(int scalew, int scaleh, int atari_width, int atari_height, int atari_visible_width, int atari_left_margin){
canvas = new AtariCanvas();
canvas.atari_width = atari_width;
canvas.atari_height = atari_height;
canvas.atari_visible_width = atari_visible_width;
canvas.atari_le... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initGraphics" | "private static void initGraphics(int scalew, int scaleh, int atari_width, int atari_height, int atari_visible_width, int atari_left_margin){
canvas = new AtariCanvas();
canvas.atari_width = atari_width;
canvas.atari_height = atari_height;
canvas.atari_visible_width = atari_visible_width;
canvas.atari_le... |
Inversion-Mutation | megadiff | "private String convertToBibtexFormat(String s)
{
String retu = "";
outerloop:
for (int k = 0; k < s.length(); k++){
for (int i = 0; i< checkList.length; i++) {
if (s.substring(k,k+1).equals(checkList[i][0])) {
retu += checkList[i][1];
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "convertToBibtexFormat" | "private String convertToBibtexFormat(String s)
{
String retu = "";
outerloop:
for (int k = 0; k < s.length(); k++){
for (int i = 0; i< checkList.length; i++) {
if (s.substring(k,k+1).equals(checkList[i][0])) {
retu += checkList[i][1];
... |
Inversion-Mutation | megadiff | "private void refresh() {
configDirs = configurationsDir.listFiles(FILTER);
if (configDirs == null) {
configDirs = NO_CONFIGS;
}
Arrays.sort(configDirs);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "refresh" | "private void refresh() {
configDirs = configurationsDir.listFiles(FILTER);
<MASK>Arrays.sort(configDirs);</MASK>
if (configDirs == null) {
configDirs = NO_CONFIGS;
}
}" |
Inversion-Mutation | megadiff | "public void removeLatestFutureContract(int applicationID, Date earliestAllowedRemoveDate, User performer) {
UserTransaction t = getSessionContext().getUserTransaction();
try {
t.begin();
ChildCareApplication application = getApplication(applicationID);
ChildCareContract latestContract = getLat... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeLatestFutureContract" | "public void removeLatestFutureContract(int applicationID, Date earliestAllowedRemoveDate, User performer) {
UserTransaction t = getSessionContext().getUserTransaction();
try {
t.begin();
ChildCareApplication application = getApplication(applicationID);
ChildCareContract latestContract = getLat... |
Inversion-Mutation | megadiff | "public void clear() {
setState(ClearDisplayState.getInstance());
setContent(INITIAL_VALUE);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "clear" | "public void clear() {
<MASK>setContent(INITIAL_VALUE);</MASK>
setState(ClearDisplayState.getInstance());
}" |
Inversion-Mutation | megadiff | "public void readTaskList(TaskList tlist, File inFile) {
initExtensions();
MylarTasklistPlugin.getDefault().restoreTaskHandlerState();
hasCaughtException = false;
try {
// parse file
//
if (!inFile.exists())
return;
Document doc = openAsDOM(inFile);
if (doc == null) {
handleEx... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "readTaskList" | "public void readTaskList(TaskList tlist, File inFile) {
<MASK>MylarTasklistPlugin.getDefault().restoreTaskHandlerState();</MASK>
initExtensions();
hasCaughtException = false;
try {
// parse file
//
if (!inFile.exists())
return;
Document doc = openAsDOM(inFile);
if (doc == null) {
... |
Inversion-Mutation | megadiff | "static void analyzeUnlockingFunction(CFGNode node, Function function,
Element parameter) {
String lockName;
String description;
BackTrack backTrackNode;
lockName = CodeAnalyzer.parseStringVariable(parameter);
logger.info("Unlocking funct... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "analyzeUnlockingFunction" | "static void analyzeUnlockingFunction(CFGNode node, Function function,
Element parameter) {
String lockName;
String description;
BackTrack backTrackNode;
lockName = CodeAnalyzer.parseStringVariable(parameter);
logger.info("Unlocking funct... |
Inversion-Mutation | megadiff | "public InsProgressSprite(String spritePath) {
super(spritePath);
this.mirror = new InsAlignment();
this.initProgress();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "InsProgressSprite" | "public InsProgressSprite(String spritePath) {
super(spritePath);
<MASK>this.initProgress();</MASK>
this.mirror = new InsAlignment();
}" |
Inversion-Mutation | megadiff | "public static CharSequence scrape(final String url, final boolean isPost, final String request, String encoding, final boolean cookieHandling)
throws IOException
{
if (encoding == null)
encoding = SCRAPE_DEFAULT_ENCODING;
int tries = 3;
while (true)
{
try
{
final StringBuilder b... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "scrape" | "public static CharSequence scrape(final String url, final boolean isPost, final String request, String encoding, final boolean cookieHandling)
throws IOException
{
if (encoding == null)
encoding = SCRAPE_DEFAULT_ENCODING;
<MASK>final StringBuilder buffer = new StringBuilder(SCRAPE_INITIAL_CAPACITY);<... |
Inversion-Mutation | megadiff | "public void testVersioningArtifactDirectory()
throws Exception
{
List<String> orderedVersions = new ArrayList<String>();
orderedVersions.add( "1.0.0-alpha-5" );
orderedVersions.add( "1.0.0-beta-3" );
orderedVersions.add( "1.0.0-beta-4" );
orderedVersions.add( ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testVersioningArtifactDirectory" | "public void testVersioningArtifactDirectory()
throws Exception
{
List<String> orderedVersions = new ArrayList<String>();
orderedVersions.add( "1.0.0-alpha-5" );
orderedVersions.add( "1.0.0-beta-3" );
orderedVersions.add( "1.0.0-beta-4" );
orderedVersions.add( ... |
Inversion-Mutation | megadiff | "@Override
public void OnPlayerDeathEvent(RunsafePlayerDeathEvent runsafePlayerDeathEvent)
{
String originalMessage = runsafePlayerDeathEvent.getDeathMessage();
runsafePlayerDeathEvent.setDeathMessage("");
if (!this.hideDeathWorlds.contains(runsafePlayerDeathEvent.getEntity().getWorld().getName()))
{
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "OnPlayerDeathEvent" | "@Override
public void OnPlayerDeathEvent(RunsafePlayerDeathEvent runsafePlayerDeathEvent)
{
runsafePlayerDeathEvent.setDeathMessage("");
if (!this.hideDeathWorlds.contains(runsafePlayerDeathEvent.getEntity().getWorld().getName()))
{
<MASK>String originalMessage = runsafePlayerDeathEvent.getDeathMes... |
Inversion-Mutation | megadiff | "@Override
protected void closeWebSocket() throws WebSocketException {
transitionTo(State.CLOSING);
pipeline.sendUpstream(this, null, new CloseFrame());
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "closeWebSocket" | "@Override
protected void closeWebSocket() throws WebSocketException {
<MASK>pipeline.sendUpstream(this, null, new CloseFrame());</MASK>
transitionTo(State.CLOSING);
}" |
Inversion-Mutation | megadiff | "@Override
public void render(Graphics2D g) {
background.draw(g, 0, 0);
this.returnButton.draw(g);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "render" | "@Override
public void render(Graphics2D g) {
<MASK>this.returnButton.draw(g);</MASK>
background.draw(g, 0, 0);
}" |
Inversion-Mutation | megadiff | "public ServiceStatus runTestscript(String scriptAndParams)
throws ExecutionException {
Process p;
try {
p = rt.exec("scripts/" + scriptAndParams);
} catch (IOException e) {
throw new ExecutionException(e);
}
CompleteReader cr = new CompleteReader(p.getInputStream());
try {
int max = 0... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "runTestscript" | "public ServiceStatus runTestscript(String scriptAndParams)
throws ExecutionException {
Process p;
try {
p = rt.exec("scripts/" + scriptAndParams);
} catch (IOException e) {
throw new ExecutionException(e);
}
CompleteReader cr = new CompleteReader(p.getInputStream());
try {
int max = 0... |
Inversion-Mutation | megadiff | "public void executeQueries(boolean prepare,boolean verbose) throws SQLException{
rowsExpected=new int[queries.size()]; //initialize the array with correct size
String query="";
if(prepare){
if (verbose)
System.out.println("=====================> Using java.sql.PreparedStatement <===================... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "executeQueries" | "public void executeQueries(boolean prepare,boolean verbose) throws SQLException{
rowsExpected=new int[queries.size()]; //initialize the array with correct size
String query="";
if(prepare){
if (verbose)
System.out.println("=====================> Using java.sql.PreparedStatement <===================... |
Inversion-Mutation | megadiff | "@Override
public void pointerTick() {
resetPointer();
if(!gate.world().isRemote) {
gate.scheduleTick(2);
gate.setState(0xB0 | gate.state()&0xF);
gate.onOutputChange(0xB);
tickSound();
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "pointerTick" | "@Override
public void pointerTick() {
resetPointer();
if(!gate.world().isRemote) {
gate.setState(0xB0 | gate.state()&0xF);
gate.onOutputChange(0xB);
<MASK>gate.scheduleTick(2);</MASK>
tickSound();
}
... |
Inversion-Mutation | megadiff | "@Test
public void testSchedulingWithDueTime() throws InterruptedException {
final CountDownLatch latch = new CountDownLatch(5);
final AtomicInteger counter = new AtomicInteger();
long start = System.currentTimeMillis();
Schedulers.threadPoolForComputation().schedule(null,... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testSchedulingWithDueTime" | "@Test
public void testSchedulingWithDueTime() throws InterruptedException {
final CountDownLatch latch = new CountDownLatch(5);
final AtomicInteger counter = new AtomicInteger();
long start = System.currentTimeMillis();
Schedulers.threadPoolForComputation().schedule(null,... |
Inversion-Mutation | megadiff | "@Override
public Subscription call(Scheduler scheduler, String state) {
System.out.println("doing work");
counter.incrementAndGet();
latch.countDown();
if (latch.getCount() == 0) {
return Subscriptions.empty();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "call" | "@Override
public Subscription call(Scheduler scheduler, String state) {
System.out.println("doing work");
<MASK>latch.countDown();</MASK>
counter.incrementAndGet();
if (latch.getCount() == 0) {
return Subscriptions.e... |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
requestWindowFeature(Window.FEATURE_NO_TITLE);
DatabaseInstance = SQLiteBooksDatabase.Instance();
if (DatabaseInstance == null) {
DatabaseInstance = new SQLiteBooksDatabase(this, "LIBRARY");
}
if (LibraryInstance == null)... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
requestWindowFeature(Window.FEATURE_NO_TITLE);
DatabaseInstance = SQLiteBooksDatabase.Instance();
if (DatabaseInstance == null) {
DatabaseInstance = new SQLiteBooksDatabase(this, "LIBRARY");
}
if (LibraryInstance == null)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.