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 free(int addr)
{
boolean found = false;
// Reverse lookup on blockList, get SysMemInfo and call free
for (Iterator<SysMemInfo> it = blockList.values().iterator(); it.hasNext();)
{
SysMemInfo info = it.next();
if (info.addr == addr)
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "free" | "public void free(int addr)
{
boolean found = false;
// Reverse lookup on blockList, get SysMemInfo and call free
for (Iterator<SysMemInfo> it = blockList.values().iterator(); it.hasNext();)
{
SysMemInfo info = it.next();
if (info.addr == addr)
... |
Inversion-Mutation | megadiff | "@Inject
PushReplication(final Injector i, final WorkQueue wq, final SitePaths site,
final ReplicationUser.Factory ruf, final SchemaFactory<ReviewDb> db,
final GitRepositoryManager grm, GroupCache gc)
throws ConfigInvalidException, IOException {
injector = i;
workQueue = wq;
datab... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "PushReplication" | "@Inject
PushReplication(final Injector i, final WorkQueue wq, final SitePaths site,
final ReplicationUser.Factory ruf, final SchemaFactory<ReviewDb> db,
final GitRepositoryManager grm, GroupCache gc)
throws ConfigInvalidException, IOException {
injector = i;
workQueue = wq;
datab... |
Inversion-Mutation | megadiff | "private Configuration getConfigInstance(String configPath, String fromPage) throws PhrescoException {
boolean isIISServer = false;
Properties properties = new Properties();
List<PropertyTemplate> propertyTemplates = new ArrayList<PropertyTemplate>();
if (CONFIG_FEATURES.equals(getConfigId()) || CONFIG_... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getConfigInstance" | "private Configuration getConfigInstance(String configPath, String fromPage) throws PhrescoException {
boolean isIISServer = false;
Properties properties = new Properties();
List<PropertyTemplate> propertyTemplates = new ArrayList<PropertyTemplate>();
if (CONFIG_FEATURES.equals(getConfigId()) || CONFIG_... |
Inversion-Mutation | megadiff | "public static List<TaggingPreset> readAll(Reader in) throws SAXException {
XmlObjectParser parser = new XmlObjectParser();
parser.mapOnStart("item", TaggingPreset.class);
parser.mapOnStart("separator", TaggingPresetSeparator.class);
parser.mapBoth("group", TaggingPresetMenu.class);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "readAll" | "public static List<TaggingPreset> readAll(Reader in) throws SAXException {
XmlObjectParser parser = new XmlObjectParser();
parser.mapOnStart("item", TaggingPreset.class);
parser.mapOnStart("separator", TaggingPresetSeparator.class);
parser.mapBoth("group", TaggingPresetMenu.class);
... |
Inversion-Mutation | megadiff | "@Override
public boolean onCommand(CommandSender commandSender, Command command, String commandLabel, String[] args) {
boolean success = false;
String cmd = command.getName().toLowerCase();
if (commandSender instanceof Player) {
UhcPlayer pl = match.getPlayer((Player) commandSender);
if (pl.isAd... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCommand" | "@Override
public boolean onCommand(CommandSender commandSender, Command command, String commandLabel, String[] args) {
boolean success = false;
String cmd = command.getName().toLowerCase();
if (commandSender instanceof Player) {
UhcPlayer pl = match.getPlayer((Player) commandSender);
if (pl.isAd... |
Inversion-Mutation | megadiff | "void addCloneServicePanel(final ServiceInfo newServiceInfo) {
containedService = newServiceInfo;
newServiceInfo.getService().setResourceClass(
newServiceInfo.getResourceAgent().getResourceClass());
newServiceInfo.setCloneInfo(this);
getBrowser().addToHeartbeat... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addCloneServicePanel" | "void addCloneServicePanel(final ServiceInfo newServiceInfo) {
containedService = newServiceInfo;
newServiceInfo.getService().setResourceClass(
newServiceInfo.getResourceAgent().getResourceClass());
newServiceInfo.setCloneInfo(this);
getBrowser().addToHeartbeat... |
Inversion-Mutation | megadiff | "@Override
public void onListItemClick(ListView l, View v, int position, long id) {
DetailFragment fragment = (DetailFragment)getFragmentManager().findFragmentById(R.id.detail_fragment);
if (fragment != null && fragment.isInLayout()) {
v.setActivated(true);
fragment.displayEvent((Event)l.getItemAtPosit... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onListItemClick" | "@Override
public void onListItemClick(ListView l, View v, int position, long id) {
<MASK>v.setActivated(true);</MASK>
DetailFragment fragment = (DetailFragment)getFragmentManager().findFragmentById(R.id.detail_fragment);
if (fragment != null && fragment.isInLayout()) {
fragment.displayEvent((Event)l.ge... |
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 | "public void setSpectator(final Gamer gamer) {
gamer.setAlive(false);
gamer.getPlayer().getInventory().remove(HungergamesApi.getInventoryManager().getKitSelector());
ItemStack compass = new ItemStack(Material.COMPASS);
compass.addEnchantment(EnchantmentManager.UNDROPPABLE, 1);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setSpectator" | "public void setSpectator(final Gamer gamer) {
gamer.setAlive(false);
ItemStack compass = new ItemStack(Material.COMPASS);
compass.addEnchantment(EnchantmentManager.UNDROPPABLE, 1);
EnchantmentManager.updateEnchants(compass);
if (!gamer.getPlayer().getInventory().contains(c... |
Inversion-Mutation | megadiff | "private void initResources() throws FIXFieldConverterNotAvailable
{
MessageBundleManager.registerCoreMessageBundle();
MessageBundleManager.registerMessageBundle("photon", "photon_fix_messages");
FIXDataDictionaryManager.setFIXVersion(FIXDataDictionaryManager.FIX_4_2_BEGIN_STRING);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initResources" | "private void initResources() throws FIXFieldConverterNotAvailable
{
<MASK>FIXDataDictionaryManager.setFIXVersion(FIXDataDictionaryManager.FIX_4_2_BEGIN_STRING);</MASK>
MessageBundleManager.registerCoreMessageBundle();
MessageBundleManager.registerMessageBundle("photon", "photon_fix_messages");
}" |
Inversion-Mutation | megadiff | "public TileSet(TiledMap map, Element element, boolean loadImage) throws SlickException {
this.map = map;
firstGID = Integer.parseInt(element.getAttribute("firstgid"));
String source = element.getAttribute("source");
if ((source != null) && (!source.equals(""))) {
try {
InputStream in = Resour... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "TileSet" | "public TileSet(TiledMap map, Element element, boolean loadImage) throws SlickException {
this.map = map;
<MASK>name = element.getAttribute("name");</MASK>
firstGID = Integer.parseInt(element.getAttribute("firstgid"));
String source = element.getAttribute("source");
if ((source != null) && (!source.e... |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.survey);
preferences = getSharedPreferences(getString(R.string.preferences), Activity.MODE_PRIVATE);
// allow users to collect data even if they are no... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.survey);
preferences = getSharedPreferences(getString(R.string.preferences), Activity.MODE_PRIVATE);
// allow users to collect data even if they are no... |
Inversion-Mutation | megadiff | "public void actionPerformed(ActionEvent e) {
// Calls the tick;
if( this.game != null && !is_over ){
this.game.tick();
is_over = this.game.isOver();
}
// Repaint The game , this will actually call the paint function since it makes a request to repaint
this.repaint();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "actionPerformed" | "public void actionPerformed(ActionEvent e) {
// Calls the tick;
if( this.game != null && !is_over ){
this.game.tick();
}
<MASK>is_over = this.game.isOver();</MASK>
// Repaint The game , this will actually call the paint function since it makes a request to repaint
this.repaint();
}" |
Inversion-Mutation | megadiff | "@Override
protected void setSelectedIndex(int index, boolean incremental) {
if (((JComboBox) _component).getSelectedIndex() != index) {
((JComboBox) _component).setSelectedIndex(index);
}
if (isShowPopupDuringSearching()) {
((JComboBox) _component).hidePopup()... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setSelectedIndex" | "@Override
protected void setSelectedIndex(int index, boolean incremental) {
if (((JComboBox) _component).getSelectedIndex() != index) {
((JComboBox) _component).setSelectedIndex(index);
}
<MASK>((JComboBox) _component).hidePopup();</MASK>
if (isShowPopupDuringSearc... |
Inversion-Mutation | megadiff | "@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.largepic);
mSlideshow = (SlideShow) findViewById(R.id.slideshow);
mSlideShowMode = getIntent().getBooleanExtra("slideshow", false);
if (mSlideSh... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.largepic);
mSlideshow = (SlideShow) findViewById(R.id.slideshow);
mSlideShowMode = getIntent().getBooleanExtra("slideshow", false);
if (mSlideSh... |
Inversion-Mutation | megadiff | "public WorldMapPane(WorldMapPaneDataModel dataModel, LayerCanvas.Overlay overlay) {
this.dataModel = dataModel;
layerCanvas = new LayerCanvas();
this.panSupport = new DefaultPanSupport(layerCanvas);
getLayerCanvas().getModel().getViewport().setModelYAxisDown(false);
if (ov... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "WorldMapPane" | "public WorldMapPane(WorldMapPaneDataModel dataModel, LayerCanvas.Overlay overlay) {
this.dataModel = dataModel;
<MASK>this.panSupport = new DefaultPanSupport(layerCanvas);</MASK>
layerCanvas = new LayerCanvas();
getLayerCanvas().getModel().getViewport().setModelYAxisDown(false);
... |
Inversion-Mutation | megadiff | "@Override
protected Boolean doInBackgroundInternal(Geocache[] caches) {
final StringBuilder fieldNoteBuffer = new StringBuilder();
try {
int i = 0;
for (final Geocache cache : caches) {
if (cache.isLogOffline()) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doInBackgroundInternal" | "@Override
protected Boolean doInBackgroundInternal(Geocache[] caches) {
final StringBuilder fieldNoteBuffer = new StringBuilder();
try {
int i = 0;
for (final Geocache cache : caches) {
if (cache.isLogOffline()) {
... |
Inversion-Mutation | megadiff | "@Override
public void process(final RESTManager restManager, final ErrorLoggerManager elm, final RESTUserV1 user)
{
final long startTime = System.currentTimeMillis();
final RESTReader reader = restManager.getReader();
boolean buildingFromConfig = false;
// Add the details for the csprocessor.cfg if... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "process" | "@Override
public void process(final RESTManager restManager, final ErrorLoggerManager elm, final RESTUserV1 user)
{
final long startTime = System.currentTimeMillis();
final RESTReader reader = restManager.getReader();
boolean buildingFromConfig = false;
// Add the details for the csprocessor.cfg if... |
Inversion-Mutation | megadiff | "public Chunk(World world, int i0, int i1) {
canaryChunk = new CanaryChunk(this); // CanaryMod: wrap chunk
this.r = new ExtendedBlockStorage[16];
this.s = new byte[256];
this.b = new int[256];
this.c = new boolean[256];
this.t = false;
this.i = new HashMap(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Chunk" | "public Chunk(World world, int i0, int i1) {
this.r = new ExtendedBlockStorage[16];
this.s = new byte[256];
this.b = new int[256];
this.c = new boolean[256];
this.t = false;
this.i = new HashMap();
this.k = false;
this.l = false;
this.m =... |
Inversion-Mutation | megadiff | "public void popupDismissed(boolean topPopupOnly) {
initializePopup();
// if the 2nd level popup gets dismissed
if (mPopupStatus == POPUP_SECOND_LEVEL) {
mPopupStatus = POPUP_FIRST_LEVEL;
if (topPopupOnly) mModule.showPopup(mPopup);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "popupDismissed" | "public void popupDismissed(boolean topPopupOnly) {
// if the 2nd level popup gets dismissed
if (mPopupStatus == POPUP_SECOND_LEVEL) {
<MASK>initializePopup();</MASK>
mPopupStatus = POPUP_FIRST_LEVEL;
if (topPopupOnly) mModule.showPopup(mPopup);
}
... |
Inversion-Mutation | megadiff | "@Override
public void map(WritableComparable docID, Text docContents, Context context)
throws IOException, InterruptedException {
Matcher matcher = WORD_PATTERN.matcher(docContents.toString());
Func func = funcFromNum(funcNum);
// YOUR CODE H... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "map" | "@Override
public void map(WritableComparable docID, Text docContents, Context context)
throws IOException, InterruptedException {
Matcher matcher = WORD_PATTERN.matcher(docContents.toString());
Func func = funcFromNum(funcNum);
// YOUR CODE H... |
Inversion-Mutation | megadiff | "public SimulatorGuiManager(Display d) {
canSpawn = true;
gridPanel = new GridPanel(this);
initSim("New Simulation",10, 10);
sm = new ScreenManager(d);
sm.putScreen("Title", new TitleScreen(this));
sm.putScreen("New Simulation", new NewSimulationScreen(this));
sm.putScreen("Edit Fields", new EditF... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "SimulatorGuiManager" | "public SimulatorGuiManager(Display d) {
canSpawn = true;
<MASK>initSim("New Simulation",10, 10);</MASK>
gridPanel = new GridPanel(this);
sm = new ScreenManager(d);
sm.putScreen("Title", new TitleScreen(this));
sm.putScreen("New Simulation", new NewSimulationScreen(this));
sm.putScreen("Edit Field... |
Inversion-Mutation | megadiff | "public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
YEditLog.initializeTraceLogger();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start" | "public void start(BundleContext context) throws Exception {
super.start(context);
<MASK>YEditLog.initializeTraceLogger();</MASK>
plugin = this;
}" |
Inversion-Mutation | megadiff | "private void removeNodes(final ITeamNode[] nodes) {
// Update the model
for (int i = 0; i < nodes.length; i++) {
if (nodes[i].getClass() == UnchangedTeamContainer.class) {
// Unchanged containers get removed automatically when all
// children are removed
continue;
}
if (nodes[i].getCla... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeNodes" | "private void removeNodes(final ITeamNode[] nodes) {
// Update the model
for (int i = 0; i < nodes.length; i++) {
if (nodes[i].getClass() == UnchangedTeamContainer.class) {
// Unchanged containers get removed automatically when all
// children are removed
continue;
}
if (nodes[i].getCla... |
Inversion-Mutation | megadiff | "public ArrayList<Activity> getAllActivities(){
SQLiteDatabase db = this.getReadableDatabase();
ArrayList<Activity> acts = new ArrayList<Activity>();
String selectQuery = "Select * From " + ACT_TABLE;
Cursor cursor = db.rawQuery(selectQuery, null);
if(cursor != null){
cursor.moveToFirst();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getAllActivities" | "public ArrayList<Activity> getAllActivities(){
SQLiteDatabase db = this.getReadableDatabase();
ArrayList<Activity> acts = new ArrayList<Activity>();
<MASK>Activity act = new Activity();</MASK>
String selectQuery = "Select * From " + ACT_TABLE;
Cursor cursor = db.rawQuery(selectQuery, null);
i... |
Inversion-Mutation | megadiff | "void renderInitialization( final Label label ) throws IOException {
JSWriter writer = JSWriter.getWriterFor( label );
writer.newWidget( QX_TYPE );
ControlLCAUtil.writeStyleFlags( label );
Boolean wrap = Boolean.valueOf( ( label.getStyle() & SWT.WRAP ) != 0 );
Object[] args = { label };
w... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "renderInitialization" | "void renderInitialization( final Label label ) throws IOException {
JSWriter writer = JSWriter.getWriterFor( label );
writer.newWidget( QX_TYPE );
<MASK>WidgetLCAUtil.writeCustomAppearance( label );</MASK>
ControlLCAUtil.writeStyleFlags( label );
Boolean wrap = Boolean.valueOf( ( label.getStyl... |
Inversion-Mutation | megadiff | "private static String printRow(final long startTime, final String scriptName, final Long workloadLength, final Long numOfTransactionsExecuted, final Long numOfTransactionsSuccessful, final Long totalTimeOfSuccessfulTranscations, final Long totalTimeOfUnSuccessfulTransactions) {
StringBuilder row = new Strin... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "printRow" | "private static String printRow(final long startTime, final String scriptName, final Long workloadLength, final Long numOfTransactionsExecuted, final Long numOfTransactionsSuccessful, final Long totalTimeOfSuccessfulTranscations, final Long totalTimeOfUnSuccessfulTransactions) {
StringBuilder row = new Strin... |
Inversion-Mutation | megadiff | "public static void ensureNeededBundlesAvailable() throws BundleException {
// check bundles available
assertBundleAvailable("org.lunifera.runtime.web.jetty");
assertBundleAvailable("org.eclipse.equinox.util");
assertBundleAvailable("org.eclipse.equinox.cm");
assertBundleAvailable("org.eclipse.equinox... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ensureNeededBundlesAvailable" | "public static void ensureNeededBundlesAvailable() throws BundleException {
// check bundles available
assertBundleAvailable("org.lunifera.runtime.web.jetty");
<MASK>assertBundleAvailable("org.eclipse.equinox.ds");</MASK>
assertBundleAvailable("org.eclipse.equinox.util");
assertBundleAvailable("org.ecl... |
Inversion-Mutation | megadiff | "public boolean processBitstream(Context c, Item item, Bitstream source, boolean overWrite)
throws Exception
{
// get bitstream filename, calculate destination filename
String newName = getFilteredName(source.getName());
Bitstream existingBitstream = null; // is there an e... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processBitstream" | "public boolean processBitstream(Context c, Item item, Bitstream source, boolean overWrite)
throws Exception
{
// get bitstream filename, calculate destination filename
String newName = getFilteredName(source.getName());
Bitstream existingBitstream = null; // is there an e... |
Inversion-Mutation | megadiff | "public void open(String name, int mode, boolean timeout) throws IOException {
if(name.charAt(0) != '/' || name.charAt(1) != '/') {
throw new IllegalArgumentException("Protocol must start with \"//\" "+name);
}
name = name.substring(2);
/*
* If 'name' == nul... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "open" | "public void open(String name, int mode, boolean timeout) throws IOException {
if(name.charAt(0) != '/' || name.charAt(1) != '/') {
throw new IllegalArgumentException("Protocol must start with \"//\" "+name);
}
name = name.substring(2);
<MASK>host = getAddress(name);</... |
Inversion-Mutation | megadiff | "private byte[] getResizedImageData(int widthLimit, int heightLimit, int byteLimit) {
int outWidth = mWidth;
int outHeight = mHeight;
float scaleFactor = 1.F;
while ((outWidth * scaleFactor > widthLimit) || (outHeight * scaleFactor > heightLimit)) {
scaleFactor *= .75F... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getResizedImageData" | "private byte[] getResizedImageData(int widthLimit, int heightLimit, int byteLimit) {
int outWidth = mWidth;
int outHeight = mHeight;
float scaleFactor = 1.F;
while ((outWidth * scaleFactor > widthLimit) || (outHeight * scaleFactor > heightLimit)) {
scaleFactor *= .75F... |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.my_tag_activity);
if (savedInstanceState != null) {
mTagIdInEdit = savedInstanceState.getLong(BUNDLE_KEY_TAG_ID_IN_EDIT, -1);
}
//... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.my_tag_activity);
if (savedInstanceState != null) {
mTagIdInEdit = savedInstanceState.getLong(BUNDLE_KEY_TAG_ID_IN_EDIT, -1);
}
//... |
Inversion-Mutation | megadiff | "public void close(){
IStreamService streamService = (IStreamService) getScopeService(scope, IStreamService.STREAM_SERVICE, StreamService.class);
if (streamService != null) {
synchronized (streams) {
for(int i=0; i<streams.length; i++){
IClientStream stream = streams[i];
if(stream != null) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "close" | "public void close(){
IStreamService streamService = (IStreamService) getScopeService(scope, IStreamService.STREAM_SERVICE, StreamService.class);
if (streamService != null) {
synchronized (streams) {
for(int i=0; i<streams.length; i++){
IClientStream stream = streams[i];
if(stream != null) {
... |
Inversion-Mutation | megadiff | "public String generate(Object argument)
{
final StringBuffer stringBuffer = new StringBuffer();
/**
* <copyright>
*
* Copyright (c) 2002-2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Pub... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "generate" | "public String generate(Object argument)
{
final StringBuffer stringBuffer = new StringBuffer();
/**
* <copyright>
*
* Copyright (c) 2002-2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Pub... |
Inversion-Mutation | megadiff | "@Test
public void createUuid() {
UUID lastId = null;
for (int i = 0; i < 10; i++) {
UUID id = TimeUuid.getTimeUUID();
System.out.println(id);
if (lastId != null)
assertFalse(lastId.equals(id));
lastId = id;
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createUuid" | "@Test
public void createUuid() {
for (int i = 0; i < 10; i++) {
UUID id = TimeUuid.getTimeUUID();
System.out.println(id);
<MASK>UUID lastId = null;</MASK>
if (lastId != null)
assertFalse(lastId.equals(id));
lastId = id;
... |
Inversion-Mutation | megadiff | "private Uri uri() {
return Uri.parse(String.format(URI_TEMPLATE,
getText(R.string.host),
getText(R.string.oauth_client_id),
getText(R.string.data_scheme),
getText(R.string.data_host),
getText(R.string.data_path)));
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "uri" | "private Uri uri() {
return Uri.parse(String.format(URI_TEMPLATE,
getText(R.string.host),
getText(R.string.oauth_client_id),
<MASK>getText(R.string.data_host),</MASK>
getText(R.string.data_scheme),
getText(R.string.data_path)));
}" |
Inversion-Mutation | megadiff | "@Override
protected LinkedList<ItemDetailsMetadata> defineMetadatas(final IFlowNodeItem task) {
final MetadataTaskBuilder metadatas = new MetadataTaskBuilder();
metadatas.addAppsName();
metadatas.addAppsVersion();
metadatas.addCaseId(task, true);
metadatas.addType();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "defineMetadatas" | "@Override
protected LinkedList<ItemDetailsMetadata> defineMetadatas(final IFlowNodeItem task) {
final MetadataTaskBuilder metadatas = new MetadataTaskBuilder();
<MASK>metadatas.addCaseId(task, true);</MASK>
metadatas.addAppsName();
metadatas.addAppsVersion();
metadata... |
Inversion-Mutation | megadiff | "float[] getLongitudes(DataRenderer renderer, boolean bulk)
throws VisADException {
any_longitude_rotate = false;
longitude_map = null;
longitude_axis = -1;
longitude_cs = null;
longitude_coords = null;
Vector mapVector = renderer.getDisplay().getMapVector();
Enumeration ma... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getLongitudes" | "float[] getLongitudes(DataRenderer renderer, boolean bulk)
throws VisADException {
any_longitude_rotate = false;
longitude_map = null;
longitude_axis = -1;
longitude_cs = null;
longitude_coords = null;
Vector mapVector = renderer.getDisplay().getMapVector();
Enumeration ma... |
Inversion-Mutation | megadiff | "@Override
public void run(Server server, Essentials parent, CommandSender sender, String commandLabel, String[] args) throws Exception
{
if (args.length < 1 || args.length > 2)
{
sender.sendMessage("Usage: /" + commandLabel + " [player] [jailname]");
return;
}
User p;
try
{
p = Us... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run(Server server, Essentials parent, CommandSender sender, String commandLabel, String[] args) throws Exception
{
if (args.length < 1 || args.length > 2)
{
sender.sendMessage("Usage: /" + commandLabel + " [player] [jailname]");
return;
}
User p;
try
{
p = Us... |
Inversion-Mutation | megadiff | "@Override
public void run() {
while (!Thread.interrupted()) {
// waiting blocking for next job to execute
try {
currentJob = jobQueue.take();
currentJobLock.lock();
// execute job
if (log.isDebugEnabled()) {
log.debug("{} => Sending to node with request ID {}: {}"... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
while (!Thread.interrupted()) {
// waiting blocking for next job to execute
try {
<MASK>currentJobLock.lock();</MASK>
currentJob = jobQueue.take();
// execute job
if (log.isDebugEnabled()) {
log.debug("{} => Sending to node with reque... |
Inversion-Mutation | megadiff | "private String filter(String in)
{
String out = (String)recent.get(in);
if (out == null)
{
out = stdTermFilter.filter(in);
// Next, ignore accents.
String tmp;
if (accentMap != null) {
tmp = accentMap.mapWord(out);
if (tmp != null)
out = tm... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "filter" | "private String filter(String in)
{
String out = (String)recent.get(in);
if (out == null)
{
out = stdTermFilter.filter(in);
// Next, ignore accents.
String tmp;
if (accentMap != null) {
tmp = accentMap.mapWord(out);
if (tmp != null)
out = tm... |
Inversion-Mutation | megadiff | "public void run() {
finished = producer.isFinished();
while (running && !finished) {
try {
logger.debug("Calling produce method for producer " + producer);
T obj = producer.produce();
logger.debug("Putting a new message in the queue for the object " + obj);
queue.put(new QueueMes... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
<MASK>finished = producer.isFinished();</MASK>
while (running && !finished) {
try {
logger.debug("Calling produce method for producer " + producer);
T obj = producer.produce();
logger.debug("Putting a new message in the queue for the object " + obj);
queue.put... |
Inversion-Mutation | megadiff | "@Override
public void seek(long mills) {
mTimer.update(mills);
reset();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "seek" | "@Override
public void seek(long mills) {
<MASK>reset();</MASK>
mTimer.update(mills);
}" |
Inversion-Mutation | megadiff | "@ARule(
sa = 14,
desc = "Check if used types/elements/messages have conflicting definitions",
author = "michal.chmielewski@oracle.com",
date = "02/10/2007",
tag = "pass2",
order = 300
)
// https://issues.jboss.org/browse/JBIDE-8088
// implemented missing code
public void CheckReferencedTypes ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "CheckReferencedTypes" | "@ARule(
sa = 14,
desc = "Check if used types/elements/messages have conflicting definitions",
author = "michal.chmielewski@oracle.com",
date = "02/10/2007",
tag = "pass2",
order = 300
)
// https://issues.jboss.org/browse/JBIDE-8088
// implemented missing code
public void CheckReferencedTypes ... |
Inversion-Mutation | megadiff | "public void sychronizeBuildNumber() throws Exception {
nextUpStreamBuildNumber=setNextDownStreamBuildNumber(upstrambuild);
List<AbstractProject> downStreamProjects = getDownStreamProjects();
for (AbstractProject downstreamProject : downStreamProjects) {
downstreamProjectClear(nextUpStreamBuildNumber,downs... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "sychronizeBuildNumber" | "public void sychronizeBuildNumber() throws Exception {
nextUpStreamBuildNumber=setNextDownStreamBuildNumber(upstrambuild);
List<AbstractProject> downStreamProjects = getDownStreamProjects();
for (AbstractProject downstreamProject : downStreamProjects) {
downstreamProjectClear(nextUpStreamBuildNumber,downs... |
Inversion-Mutation | megadiff | "protected void showAttendanceDetails( Cursor[] result ) {
Cursor att = result[ 1 ];
if ( att.moveToFirst() ) {
LinearLayout layout = (LinearLayout) mMainLayout.findViewById(
R.id.attendance_content_layout );
do {
String schedule = att.ge... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showAttendanceDetails" | "protected void showAttendanceDetails( Cursor[] result ) {
Cursor att = result[ 1 ];
if ( att.moveToFirst() ) {
LinearLayout layout = (LinearLayout) mMainLayout.findViewById(
R.id.attendance_content_layout );
do {
String schedule = att.ge... |
Inversion-Mutation | megadiff | "public Pagination() {
paginationDiv.setStyle(Bootstrap.Pagination.LEFT);
paginationDiv.add(list);
initWidget(paginationDiv);
setSize(PaginationSize.NORMAL);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Pagination" | "public Pagination() {
paginationDiv.setStyle(Bootstrap.Pagination.LEFT);
paginationDiv.add(list);
<MASK>setSize(PaginationSize.NORMAL);</MASK>
initWidget(paginationDiv);
}" |
Inversion-Mutation | megadiff | "public EaterControl() {
initSoar();
generatePaths();
genMap();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "EaterControl" | "public EaterControl() {
<MASK>generatePaths();</MASK>
initSoar();
genMap();
}" |
Inversion-Mutation | megadiff | "@Test
public void selectCorrectAnswer_No_Loop__No_onChoose() {
// GIVEN:
initTestMission("No_Loop__No_onChoose");
// WHEN:
clickOnAnswerButton(FIRST_RIGHT_ANSWER);
// THEN:
shouldBeInMode(MODE_REPLY_TO_CORRECT_ANSWER);
shouldHaveTriggeredEvents("onStart",
"onSuccess");
should_NOT_HaveTr... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "selectCorrectAnswer_No_Loop__No_onChoose" | "@Test
public void selectCorrectAnswer_No_Loop__No_onChoose() {
// GIVEN:
initTestMission("No_Loop__No_onChoose");
// WHEN:
clickOnAnswerButton(FIRST_RIGHT_ANSWER);
// THEN:
shouldBeInMode(MODE_REPLY_TO_CORRECT_ANSWER);
shouldHaveTriggeredEvents("onStart",
"onSuccess");
should_NOT_HaveTr... |
Inversion-Mutation | megadiff | "public void testStartsPipelineWithSpecificSynchronizerRequested() throws InterruptedException {
ConfigManager configManager = EasyMock.createNiceMock(ConfigManager.class);
GroningenConfig config = EasyMock.createNiceMock(GroningenConfig.class);
GroningenParams paramBlock = GroningenParams.newBuilder()
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testStartsPipelineWithSpecificSynchronizerRequested" | "public void testStartsPipelineWithSpecificSynchronizerRequested() throws InterruptedException {
ConfigManager configManager = EasyMock.createNiceMock(ConfigManager.class);
GroningenConfig config = EasyMock.createNiceMock(GroningenConfig.class);
GroningenParams paramBlock = GroningenParams.newBuilder()
... |
Inversion-Mutation | megadiff | "public Bitmap getBitmapWithFilterApplied(final Bitmap bitmap) {
if (mGlSurfaceView != null) {
mRenderer.deleteImage();
mRenderer.runOnDraw(new Runnable() {
@Override
public void run() {
synchronized(mFilter) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getBitmapWithFilterApplied" | "public Bitmap getBitmapWithFilterApplied(final Bitmap bitmap) {
if (mGlSurfaceView != null) {
mRenderer.deleteImage();
mRenderer.runOnDraw(new Runnable() {
@Override
public void run() {
synchronized(mFilter) {
... |
Inversion-Mutation | megadiff | "private void updateView() {
Session session = Session.getActiveSession();
if (session.isOpened()) {
showProfile(true);
String userName = PreferenceHelper.getUserName(getActivity());
if (TextUtils.isEmpty(userName)) {
// make request to the /me... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateView" | "private void updateView() {
Session session = Session.getActiveSession();
if (session.isOpened()) {
showProfile(true);
String userName = PreferenceHelper.getUserName(getActivity());
if (TextUtils.isEmpty(userName)) {
// make request to the /me... |
Inversion-Mutation | megadiff | "public void updateFromUIDL(final UIDL uidl,
final ApplicationConnection client) {
this.client = client;
this.id = uidl.getId();
if (isInitializingRequest(uidl)) {
initialize(uidl);
attachScrollHandlersIfNeeded();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateFromUIDL" | "public void updateFromUIDL(final UIDL uidl,
final ApplicationConnection client) {
this.client = client;
this.id = uidl.getId();
if (isInitializingRequest(uidl)) {
initialize(uidl);
attachScrollHandlersIfNeeded();
... |
Inversion-Mutation | megadiff | "@SuppressWarnings("deprecation")
protected void installActionInternal(KernelControllerContext context) throws Throwable
{
KernelController controller = (KernelController) context.getController();
Kernel kernel = controller.getKernel();
KernelConfigurator configurator = kernel.getConfigurat... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "installActionInternal" | "@SuppressWarnings("deprecation")
protected void installActionInternal(KernelControllerContext context) throws Throwable
{
KernelController controller = (KernelController) context.getController();
Kernel kernel = controller.getKernel();
KernelConfigurator configurator = kernel.getConfigurat... |
Inversion-Mutation | megadiff | "public static Object executeScript(final NodeModel node, final Object script, Script compiledScript,
final IErrorHandler pErrorHandler, final PrintStream pOutStream,
final ScriptContext scriptContext, ScriptingPermissions permissions) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "executeScript" | "public static Object executeScript(final NodeModel node, final Object script, Script compiledScript,
final IErrorHandler pErrorHandler, final PrintStream pOutStream,
final ScriptContext scriptContext, ScriptingPermissions permissions) {
... |
Inversion-Mutation | megadiff | "@Override
public void remove() {
map.onRemove(this);
real.remove();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "remove" | "@Override
public void remove() {
<MASK>real.remove();</MASK>
map.onRemove(this);
}" |
Inversion-Mutation | megadiff | "protected boolean computeScrollHelper() {
if (mScroller.computeScrollOffset()) {
// Don't bother scrolling if the page does not need to be moved
if (getScrollX() != mScroller.getCurrX()
|| getScrollY() != mScroller.getCurrY()
|| mOverScrollX != mScro... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "computeScrollHelper" | "protected boolean computeScrollHelper() {
if (mScroller.computeScrollOffset()) {
// Don't bother scrolling if the page does not need to be moved
if (getScrollX() != mScroller.getCurrX()
|| getScrollY() != mScroller.getCurrY()
|| mOverScrollX != mScro... |
Inversion-Mutation | megadiff | "public void drawNumber(int n, float x, float y, float scale){
if (n<0) n=0;
if (n<100) {
int c1=n/10, c2=n%10;
Digit[c1].draw(x,y,scale);
Digit[c2].draw(x+12*scale,y,scale);}
else {
int c1=n/100; int c2=(n-100)/10; int c3=(n-100)%10;
Digit[c1].draw(x,y,scale);
Digit[c2].draw(x+12*scale,... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "drawNumber" | "public void drawNumber(int n, float x, float y, float scale){
if (n<100) {
int c1=n/10, c2=n%10;
Digit[c1].draw(x,y,scale);
Digit[c2].draw(x+12*scale,y,scale);}
else {
<MASK>if (n<0) n=0;</MASK>
int c1=n/100; int c2=(n-100)/10; int c3=(n-100)%10;
Digit[c1].draw(x,y,scale);
Digit[c2].dra... |
Inversion-Mutation | megadiff | "public void feedEPackagesFromRegistry() {
List<String> processedNsURIs = new ArrayList<String>();
for (boolean hasChanged = true; hasChanged;) {
List<String> nsURIs = new ArrayList<String>(EPackage.Registry.INSTANCE.keySet());
hasChanged = false;
for (String nsURI : nsURIs) {
try {
if (!p... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "feedEPackagesFromRegistry" | "public void feedEPackagesFromRegistry() {
List<String> processedNsURIs = new ArrayList<String>();
for (boolean hasChanged = true; hasChanged;) {
List<String> nsURIs = new ArrayList<String>(EPackage.Registry.INSTANCE.keySet());
for (String nsURI : nsURIs) {
<MASK>hasChanged = false;</MASK>
try ... |
Inversion-Mutation | megadiff | "protected void setupEnvironment(PythonInterpreter interp,
Properties props,
PySystemState systemState) throws PyException {
processPythonLib(interp, systemState);
checkSitePackages(props);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setupEnvironment" | "protected void setupEnvironment(PythonInterpreter interp,
Properties props,
PySystemState systemState) throws PyException {
<MASK>checkSitePackages(props);</MASK>
processPythonLib(interp, systemState);
}" |
Inversion-Mutation | megadiff | "public UnilateralSortMerger(MemoryManager memoryManager, IOManager ioManager,
long totalMemory, long maxWriteMem, int numSortBuffers, int maxNumFileHandles,
Comparator<Key>[] keyComparators, int[] keyPositions, Class<? extends Key>[] keyClasses,
MutableObjectIterator<PactRecord> input, AbstractInvokable pa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "UnilateralSortMerger" | "public UnilateralSortMerger(MemoryManager memoryManager, IOManager ioManager,
long totalMemory, long maxWriteMem, int numSortBuffers, int maxNumFileHandles,
Comparator<Key>[] keyComparators, int[] keyPositions, Class<? extends Key>[] keyClasses,
MutableObjectIterator<PactRecord> input, AbstractInvokable pa... |
Inversion-Mutation | megadiff | "private void startAll() {
//image ingesters
while (hasNextImage()) {
//dequeue
final QueueUnit<Image, IngestServiceImage> qu =
this.getNextImage();
//check if such (service,image) already running
synchronized (this) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startAll" | "private void startAll() {
//image ingesters
while (hasNextImage()) {
//dequeue
final QueueUnit<Image, IngestServiceImage> qu =
this.getNextImage();
//check if such (service,image) already running
synchronized (this) {
... |
Inversion-Mutation | megadiff | "@Override public void create () {
//com.badlogic.gdx.graphics.g3d.model.still.StillModel model =
// ModelLoaderRegistry.loadStillModel(Gdx.files.internal("data/models/base.g3dt"));
//com.badlogic.gdx.graphics.g3d.loaders.g3d.chunks.G3dExporter.export(model, Gdx.files.absolute("data/models/base.g3d"));
op... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "create" | "@Override public void create () {
//com.badlogic.gdx.graphics.g3d.model.still.StillModel model =
// ModelLoaderRegistry.loadStillModel(Gdx.files.internal("data/models/base.g3dt"));
//com.badlogic.gdx.graphics.g3d.loaders.g3d.chunks.G3dExporter.export(model, Gdx.files.absolute("data/models/base.g3d"));
<MA... |
Inversion-Mutation | megadiff | "private void handleActivation() {
if (fIsHandlingActivation)
return;
if (fActivePart == AbstractTextEditor.this) {
fIsHandlingActivation= true;
fHasBeenActivated= true;
try {
safelySanityCheckState(getEditorInput());
} finally {
fIsHandlingActivation= false;
}
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleActivation" | "private void handleActivation() {
if (fIsHandlingActivation)
return;
if (fActivePart == AbstractTextEditor.this) {
fIsHandlingActivation= true;
try {
safelySanityCheckState(getEditorInput());
} finally {
fIsHandlingActivation= false;
}
}
<MASK>fHasBeenActivated= ... |
Inversion-Mutation | megadiff | "@Override
public void enableMaster(String networkName,
State lastKnownState, int masterId) {
String myLocation = configuration.get("localIp") + ":" +
configuration.get("pport");
String masterUrl = configuration.get("baseUrl") +
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "enableMaster" | "@Override
public void enableMaster(String networkName,
State lastKnownState, int masterId) {
String myLocation = configuration.get("localIp") + ":" +
configuration.get("pport");
String masterUrl = configuration.get("baseUrl") +
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.