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 onClick(View v) {
switch(v.getId()){
case R.id.searchHallButton:
startActivity = new Intent("android.intent.action.GOOGLEMAPSEARCHLOCATION");
break;
case R.id.microwaveButton:
startActivity = new Intent("android.intent.action.CAMPUSMENUACTIVITY");
startActivity.putExtra("Show l... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onClick" | "public void onClick(View v) {
switch(v.getId()){
case R.id.searchHallButton:
startActivity = new Intent("android.intent.action.GOOGLEMAPSEARCHLOCATION");
break;
case R.id.microwaveButton:
startActivity = new Intent("android.intent.action.CAMPUSMENUACTIVITY");
startActivity.putExtra("Show l... |
Inversion-Mutation | megadiff | "public boolean isAccessible() {
JSch jsch = new JSch();
try {
jsch.addIdentity(Configuration.get("AMAZON_SSH_IDENTITY"));
jsch.setKnownHosts(Configuration.get("SSH_KNOWN_HOSTS"));
} catch (JSchException e) {
e.printStackTrace();
}
Sess... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "isAccessible" | "public boolean isAccessible() {
JSch jsch = new JSch();
try {
jsch.addIdentity(Configuration.get("AMAZON_SSH_IDENTITY"));
jsch.setKnownHosts(Configuration.get("SSH_KNOWN_HOSTS"));
} catch (JSchException e) {
e.printStackTrace();
}
Sess... |
Inversion-Mutation | megadiff | "@Override
protected void onPause() {
mDbFrontendProvider.get().closeDatabase();
super.onPause();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPause" | "@Override
protected void onPause() {
<MASK>super.onPause();</MASK>
mDbFrontendProvider.get().closeDatabase();
}" |
Inversion-Mutation | megadiff | "public int getSectionForPosition(int position) {
int savedCursorPos = mDataCursor.getPosition();
mDataCursor.moveToPosition(position);
String curName = mDataCursor.getString(mColumnIndex);
mDataCursor.moveToPosition(savedCursorPos);
// Linear search, as there are only a fe... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getSectionForPosition" | "public int getSectionForPosition(int position) {
int savedCursorPos = mDataCursor.getPosition();
mDataCursor.moveToPosition(position);
<MASK>mDataCursor.moveToPosition(savedCursorPos);</MASK>
String curName = mDataCursor.getString(mColumnIndex);
// Linear search, as there ... |
Inversion-Mutation | megadiff | "private void initialize(Concept concept, ConceptName conceptName, Locale locale) {
if (concept != null) {
conceptId = concept.getConceptId();
ConceptName conceptShortName = concept.getShortNameInLocale(locale);
name = shortName = description = "";
if (conceptName != null) {
conceptNameId = con... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initialize" | "private void initialize(Concept concept, ConceptName conceptName, Locale locale) {
if (concept != null) {
conceptId = concept.getConceptId();
<MASK>conceptNameId = conceptName.getConceptNameId();</MASK>
ConceptName conceptShortName = concept.getShortNameInLocale(locale);
name = shortName = descripti... |
Inversion-Mutation | megadiff | "protected void removeScoping(KernelControllerContext context) throws Throwable
{
KernelController controller = (KernelController)context.getController();
KernelMetaDataRepository repository = controller.getKernel().getMetaDataRepository();
ScopeKey scopeKey = context.getInstallScope();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeScoping" | "protected void removeScoping(KernelControllerContext context) throws Throwable
{
KernelController controller = (KernelController)context.getController();
KernelMetaDataRepository repository = controller.getKernel().getMetaDataRepository();
ScopeKey scopeKey = context.getInstallScope();
... |
Inversion-Mutation | megadiff | "private void addSelectionHandlerToTabPanel(boolean left)
{
setGenericObjects(left);
final TabPanel tabPanelFinal = tabPanel;
final ArrayList<AbstractDocument> docListFinal = docList;
final ArrayList<TextArea> contentsListFinal = contentsList;
final ArrayList<TextBox> titleListFinal = titleList;
f... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addSelectionHandlerToTabPanel" | "private void addSelectionHandlerToTabPanel(boolean left)
{
setGenericObjects(left);
final TabPanel tabPanelFinal = tabPanel;
final ArrayList<AbstractDocument> docListFinal = docList;
final ArrayList<TextArea> contentsListFinal = contentsList;
final ArrayList<TextBox> titleListFinal = titleList;
f... |
Inversion-Mutation | megadiff | "public void onSelection(SelectionEvent<Integer> event) {
int ind = tabPanelFinal.getTabBar().getSelectedTab();
hPanelFinal.clear();
if (docListFinal.get(ind) instanceof LockedDocument) {
// enable and add the save button
enableButton(saveDocButtonFinal);
hPanelFinal.add(saveDocButt... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onSelection" | "public void onSelection(SelectionEvent<Integer> event) {
int ind = tabPanelFinal.getTabBar().getSelectedTab();
hPanelFinal.clear();
if (docListFinal.get(ind) instanceof LockedDocument) {
// enable and add the save button
enableButton(saveDocButtonFinal);
hPanelFinal.add(saveDocButt... |
Inversion-Mutation | megadiff | "@Override
public boolean dispatchKeyEvent(KeyEvent event) {
// Do this on key down to handle a few of the system keys.
boolean up = event.getAction() == KeyEvent.ACTION_UP;
switch (event.getKeyCode()) {
// Volume keys and camera keys dismiss the alarm
case KeyE... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "dispatchKeyEvent" | "@Override
public boolean dispatchKeyEvent(KeyEvent event) {
// Do this on key down to handle a few of the system keys.
boolean up = event.getAction() == KeyEvent.ACTION_UP;
switch (event.getKeyCode()) {
// Volume keys and camera keys dismiss the alarm
case KeyE... |
Inversion-Mutation | megadiff | "@Override
protected boolean init(CommandSender sender, String[] args) {
if (outputs.length==0) {
error(sender, "Expecting at least 1 output pin.");
return false;
}
if (args.length>0) {
try {
dataPin = (outputs.length==1?0... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "init" | "@Override
protected boolean init(CommandSender sender, String[] args) {
if (outputs.length==0) {
error(sender, "Expecting at least 1 output pin.");
return false;
}
if (args.length>0) {
try {
this.initWireless(sender, arg... |
Inversion-Mutation | megadiff | "@Override
public final void onGetRequest(final HttpServletRequest request, final HttpServletResponse response, final ServletAdapter[] servletAdapters) throws Exception {
String pathInfo = request.getPathInfo();
if (!StringUtility.hasText(pathInfo)) {
// ensure proper resource loading if trailing sl... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onGetRequest" | "@Override
public final void onGetRequest(final HttpServletRequest request, final HttpServletResponse response, final ServletAdapter[] servletAdapters) throws Exception {
String pathInfo = request.getPathInfo();
if (!StringUtility.hasText(pathInfo)) {
// ensure proper resource loading if trailing sl... |
Inversion-Mutation | megadiff | "@Override
public void start() {
LOGGER.info("Starting HTTP server");
InetSocketAddress bindAddress = new InetSocketAddress(configuration.getHttpServerPort());
// Configure the server.
ServerBootstrap bootstrap = new ServerBootstrap();
bootstrap.group(bossGroup, wor... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start" | "@Override
public void start() {
LOGGER.info("Starting HTTP server");
InetSocketAddress bindAddress = new InetSocketAddress(configuration.getHttpServerPort());
// Configure the server.
ServerBootstrap bootstrap = new ServerBootstrap();
bootstrap.group(bossGroup, wor... |
Inversion-Mutation | megadiff | "@Override
protected void initChannel(final SocketChannel channel) {
ChannelPipeline pipeline = channel.pipeline();
pipeline.addLast("decoder", new HttpRequestDecoder()) //
.addLast("aggregator", new HttpObjectAggreg... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initChannel" | "@Override
protected void initChannel(final SocketChannel channel) {
ChannelPipeline pipeline = channel.pipeline();
pipeline.addLast("decoder", new HttpRequestDecoder()) //
.addLast("aggregator", new HttpObjectAggreg... |
Inversion-Mutation | megadiff | "void doShutdown() {
if (active.compareAndSet(true, false)) {
logger.log(Level.INFO, "HazelcastClient[" + this.id + "] is shutting down.");
out.shutdown();
in.shutdown();
connectionManager.shutdown();
listenerManager.shutdown();
Cli... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doShutdown" | "void doShutdown() {
if (active.compareAndSet(true, false)) {
logger.log(Level.INFO, "HazelcastClient[" + this.id + "] is shutting down.");
<MASK>connectionManager.shutdown();</MASK>
out.shutdown();
in.shutdown();
listenerManager.shutdown();
... |
Inversion-Mutation | megadiff | "public void displayNews(ImageCache cacheMap, String news,
JProgressBar progressBar) {
textPane.getDocument().putProperty("imageCache", cacheMap);
textPane.setText(news.toString());
textPane.setCaretPosition(0);
newsScroll.setVisible(true);
progressBar.getPar... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "displayNews" | "public void displayNews(ImageCache cacheMap, String news,
JProgressBar progressBar) {
textPane.getDocument().putProperty("imageCache", cacheMap);
textPane.setText(news.toString());
textPane.setCaretPosition(0);
<MASK>progressBar.getParent().setVisible(false);</MASK>
... |
Inversion-Mutation | megadiff | "private void bindMailboxItem(View view, Context context, Cursor cursor, boolean isLastChild)
{
// Reset the view (in case it was recycled) and prepare for binding
AccountFolderListItem itemView = (AccountFolderListItem) view;
itemView.bindViewInit(this, false);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "bindMailboxItem" | "private void bindMailboxItem(View view, Context context, Cursor cursor, boolean isLastChild)
{
// Reset the view (in case it was recycled) and prepare for binding
AccountFolderListItem itemView = (AccountFolderListItem) view;
itemView.bindViewInit(this, false);
... |
Inversion-Mutation | megadiff | "public static void main(String[] args) {
objectSet.add(new DomainObject("Helga"));
objectSet.add(new DomainObject("Walter"));
objectSet.add(new DomainObject("Hannah"));
objectSet.add(new DomainObject("Paul"));
objectSet.add(new DomainObject("Claudia"));
for (DomainObject domainObject : objectSet) {
... | 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) {
<MASK>Set<DomainObject> objectSet = new HashSet<DomainObject>();</MASK>
objectSet.add(new DomainObject("Helga"));
objectSet.add(new DomainObject("Walter"));
objectSet.add(new DomainObject("Hannah"));
objectSet.add(new DomainObject("Paul"));
objectSet.add(new Domain... |
Inversion-Mutation | megadiff | "@Override
public void testFailure(Failure failure) throws Exception {
if (current == null) {
// The test probably failed before it could start, ie in @BeforeClass
current = new TestResult();
results.add(current); // must add it here since testF... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testFailure" | "@Override
public void testFailure(Failure failure) throws Exception {
if (current == null) {
// The test probably failed before it could start, ie in @BeforeClass
current = new TestResult();
results.add(current); // must add it here since testF... |
Inversion-Mutation | megadiff | "public final SrmLsResponse getSrmLsResponse()
throws SRMException ,java.sql.SQLException {
SrmLsResponse response = new SrmLsResponse();
response.setReturnStatus(getTReturnStatus());
if (!response.getReturnStatus().getStatusCode().isProcessing()) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getSrmLsResponse" | "public final SrmLsResponse getSrmLsResponse()
throws SRMException ,java.sql.SQLException {
SrmLsResponse response = new SrmLsResponse();
response.setReturnStatus(getTReturnStatus());
<MASK>response.setRequestToken(getTRequestToken());</MASK>
... |
Inversion-Mutation | megadiff | "private void recalculateRowStatusBitSetsOnDataUpdate() {
setOldBitSetAndRowMap();
if ( isSearchTermSet() ) {
doSearchAndRecalculate(false);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "recalculateRowStatusBitSetsOnDataUpdate" | "private void recalculateRowStatusBitSetsOnDataUpdate() {
if ( isSearchTermSet() ) {
<MASK>setOldBitSetAndRowMap();</MASK>
doSearchAndRecalculate(false);
}
}" |
Inversion-Mutation | megadiff | "public SWTBotToolbarCheckboxButton toggle() {
log.debug(MessageFormat.format("Clicking on {0}", this)); //$NON-NLS-1$
assertEnabled();
internalToggle();
notify(SWT.MouseEnter);
notify(SWT.MouseMove);
notify(SWT.Activate);
notify(SWT.MouseDown);
notify(SWT.MouseUp);
notify(SWT.Selection);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "toggle" | "public SWTBotToolbarCheckboxButton toggle() {
log.debug(MessageFormat.format("Clicking on {0}", this)); //$NON-NLS-1$
assertEnabled();
notify(SWT.MouseEnter);
notify(SWT.MouseMove);
notify(SWT.Activate);
notify(SWT.MouseDown);
notify(SWT.MouseUp);
notify(SWT.Selection);
notify(SWT.MouseHove... |
Inversion-Mutation | megadiff | "public void loadAllTextures ( Context context, TextureManager pTextureManager ) {
int curr_atlas = 0; // Счётчик атласов
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/"); // Установили default-путь к текстурам
try {
XmlPullParser parser = context.getReso... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadAllTextures" | "public void loadAllTextures ( Context context, TextureManager pTextureManager ) {
int curr_atlas = 0; // Счётчик атласов
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/"); // Установили default-путь к текстурам
try {
XmlPullParser parser = context.getReso... |
Inversion-Mutation | megadiff | "public static void addNatureToProjectWithValidationSupport(IProject project, String builderId, String natureId) throws CoreException {
EclipseResourceUtil.addNatureToProject(project, natureId);
IProjectDescription desc = project.getDescription();
ICommand[] existing = desc.getBuildSpec();
boole... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addNatureToProjectWithValidationSupport" | "public static void addNatureToProjectWithValidationSupport(IProject project, String builderId, String natureId) throws CoreException {
IProjectDescription desc = project.getDescription();
ICommand[] existing = desc.getBuildSpec();
boolean updated = false;
int javaBuilderIndex = -1;
IComm... |
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 Node appendChild(Node newChild) throws DOMException
{
Child child = (Child) newChild;
DocumentImpl doc = m_doc;
child.m_parent = this;
m_childCount++;
if(0 == child.m_uid)
{
child.m_uid = ++m_doc.m_docOrderCount;
}
child.m_level = (short) (m_le... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "appendChild" | "public Node appendChild(Node newChild) throws DOMException
{
Child child = (Child) newChild;
DocumentImpl doc = m_doc;
child.m_parent = this;
m_childCount++;
if(0 == child.m_uid)
{
child.m_uid = ++m_doc.m_docOrderCount;
}
child.m_level = (short) (m_le... |
Inversion-Mutation | megadiff | "private ConfigData getConfigData() {
DataLoader loader = createDataLoader();
ConfigData result;
if (loader != null)
result = loader.getConfigData();
else
result = generateConfigData();
addProductFileConfigBundles(result); // these are the bundles specified in the <configurations> tag in the p... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getConfigData" | "private ConfigData getConfigData() {
DataLoader loader = createDataLoader();
ConfigData result;
if (loader != null)
result = loader.getConfigData();
else
result = generateConfigData();
<MASK>addProductFileBundles(result); // these are the bundles specified in the <plugins/> tag</MASK>
addPr... |
Inversion-Mutation | megadiff | "@Test
public void rootTest4() {
l.setValues(Levels.FATAL);
r.setLevel(l);
r.addAppenderRef("A9");
r.isRootCategory(true);
r.generateProperties(p);
expectedKey = PropertiesParser.PREFIX + "." + PropertiesParser.ROOT_CATEGORY;
testExpected("FATAL, A9");
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "rootTest4" | "@Test
public void rootTest4() {
l.setValues(Levels.FATAL);
r.setLevel(l);
r.addAppenderRef("A9");
<MASK>r.generateProperties(p);</MASK>
r.isRootCategory(true);
expectedKey = PropertiesParser.PREFIX + "." + PropertiesParser.ROOT_CATEGORY;
testExpected("FATAL, A9");
}" |
Inversion-Mutation | megadiff | "@Override
public Graph transform(Graph graph) {
Random rand = new Random();
for (int r = 0; r < this.realities; r++) {
ChordIdentifierSpace idSpace = new ChordIdentifierSpace(this.bits);
ChordIdentifier[] ids = new ChordIdentifier[graph.getNodes().length];
if (this.uniform) {
BigInteger stepS... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "transform" | "@Override
public Graph transform(Graph graph) {
Random rand = new Random();
<MASK>ChordIdentifierSpace idSpace = new ChordIdentifierSpace(this.bits);</MASK>
for (int r = 0; r < this.realities; r++) {
ChordIdentifier[] ids = new ChordIdentifier[graph.getNodes().length];
if (this.uniform) {
BigI... |
Inversion-Mutation | megadiff | "private static void initializeSystemClass() {
props = new Properties();
propProviders = new Hashtable();
initProperties(props);
midpProps = new Properties();
initCldcMidpProperties(midpProps);
// dynamic properties initialization (should be moved to more
// appropriat... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initializeSystemClass" | "private static void initializeSystemClass() {
props = new Properties();
initProperties(props);
midpProps = new Properties();
initCldcMidpProperties(midpProps);
// dynamic properties initialization (should be moved to more
// appropriate place when we have dynamic package load... |
Inversion-Mutation | megadiff | "@Test
public void testGetNextExecutionAfter() {
Calendar c = null;
Date expectedFireDate = null;
// minute
expectedFireDate = rollUp(Calendar.getInstance(), Calendar.MINUTE, minutes);
assertEquals(expectedFireDate, minuteTrigger.getNextExecutionAfter(now));
// hour
c = Calenda... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testGetNextExecutionAfter" | "@Test
public void testGetNextExecutionAfter() {
Calendar c = null;
Date expectedFireDate = null;
// minute
expectedFireDate = rollUp(Calendar.getInstance(), Calendar.MINUTE, minutes);
assertEquals(expectedFireDate, minuteTrigger.getNextExecutionAfter(now));
// hour
c = Calenda... |
Inversion-Mutation | megadiff | "JavaBookModel(Book book) {
super(book);
myImageMap = new ZLImageMap();
myInternalHyperlinks = new CachedCharStorage(32768, Paths.cacheDirectory(), "links");
BookTextModel = new ZLTextWritablePlainModel(null, book.getLanguage(), 1024, 65536, Paths.cacheDirectory(), "cache", myImageMap);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "JavaBookModel" | "JavaBookModel(Book book) {
super(book);
<MASK>BookTextModel = new ZLTextWritablePlainModel(null, book.getLanguage(), 1024, 65536, Paths.cacheDirectory(), "cache", myImageMap);</MASK>
myImageMap = new ZLImageMap();
myInternalHyperlinks = new CachedCharStorage(32768, Paths.cacheDirectory(), "links");
}" |
Inversion-Mutation | megadiff | "public void saveUserAddons(ISdkLog log) {
FileOutputStream fos = null;
try {
String folder = AndroidLocation.getFolder();
File f = new File(folder, SRC_FILENAME);
fos = new FileOutputStream(f);
Properties props = new Properties();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "saveUserAddons" | "public void saveUserAddons(ISdkLog log) {
FileOutputStream fos = null;
try {
String folder = AndroidLocation.getFolder();
File f = new File(folder, SRC_FILENAME);
fos = new FileOutputStream(f);
Properties props = new Properties();
... |
Inversion-Mutation | megadiff | "@Override
protected void onCreate(Bundle savedInstanceState) {
Themes.applyTheme(this);
super.onCreate(savedInstanceState);
registerExternalStorageListener();
View mainView = getLayoutInflater().inflate(R.layout.card_editor, null);
setContentView(mainView);
Themes.setWallpaper(mainView);
m... | 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) {
Themes.applyTheme(this);
super.onCreate(savedInstanceState);
registerExternalStorageListener();
View mainView = getLayoutInflater().inflate(R.layout.card_editor, null);
setContentView(mainView);
Themes.setWallpaper(mainView);
m... |
Inversion-Mutation | megadiff | "protected void tryListenersForEntity (Entity entity, Event event, PropagationState propState) {
if (logger.isLoggable(Level.INFO)) {
logger.info("tryListenersForEntity, entity = " + entity + ", event = " + event);
}
EventListenerCollection listeners = (EventListenerCollection) e... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "tryListenersForEntity" | "protected void tryListenersForEntity (Entity entity, Event event, PropagationState propState) {
if (logger.isLoggable(Level.INFO)) {
logger.info("tryListenersForEntity, entity = " + entity + ", event = " + event);
}
EventListenerCollection listeners = (EventListenerCollection) e... |
Inversion-Mutation | megadiff | "public void step() {
String chiptext = "";
for(int i = 0; i < Field.C_COUNT; i++) {
for(int j = 0; j < chips[i]; j++) {
chiptext += Field.names[i];
}
}
if(chiptext.length() == 0) {
time = -1;
Field.getSingleton().... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "step" | "public void step() {
<MASK>label.setText(Integer.toString(time));</MASK>
String chiptext = "";
for(int i = 0; i < Field.C_COUNT; i++) {
for(int j = 0; j < chips[i]; j++) {
chiptext += Field.names[i];
}
}
if(chiptext.length() == 0) ... |
Inversion-Mutation | megadiff | "@SuppressWarnings("deprecation")
public MenuManager getSubMenuManager(final List<AbstractTaskContainer> selectedElements) {
final TaskListManager tasklistManager = TasksUiPlugin.getTaskListManager();
final MenuManager subMenuManager = new MenuManager(LABEL_REMINDER);
subMenuManager.setVisible(selected... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getSubMenuManager" | "@SuppressWarnings("deprecation")
public MenuManager getSubMenuManager(final List<AbstractTaskContainer> selectedElements) {
final TaskListManager tasklistManager = TasksUiPlugin.getTaskListManager();
final MenuManager subMenuManager = new MenuManager(LABEL_REMINDER);
subMenuManager.setVisible(selected... |
Inversion-Mutation | megadiff | "public void addSpectator(Player player, String type) {
if (type.equals("death")) {
Messaging.tell(player, Message.WELCOME_SPECTATOR_DEATH);
} else {
SafeTeleporter.tp(player, Waypoint.SPECTATOR);
Messaging.tell(player, Message.WELCOME_SPECTATOR);
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addSpectator" | "public void addSpectator(Player player, String type) {
if (type.equals("death")) {
Messaging.tell(player, Message.WELCOME_SPECTATOR_DEATH);
} else {
SafeTeleporter.tp(player, Waypoint.SPECTATOR);
Messaging.tell(player, Message.WELCOME_SPECTATOR);
}
... |
Inversion-Mutation | megadiff | "protected void writeLogFile(Element logElement)
throws CruiseControlException {
BufferedWriter logWriter = null;
try {
XMLLogHelper helper = new XMLLogHelper(logElement);
if (helper.isBuildSuccessful())
_logFileName = new File(_logDir, "log" + _... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "writeLogFile" | "protected void writeLogFile(Element logElement)
throws CruiseControlException {
BufferedWriter logWriter = null;
try {
XMLLogHelper helper = new XMLLogHelper(logElement);
if (helper.isBuildSuccessful())
_logFileName = new File(_logDir, "log" + _... |
Inversion-Mutation | megadiff | "@SuppressWarnings({"ConstantConditions"})
@Override
protected boolean dispatchHoverEvent(MotionEvent event) {
final int action = event.getAction();
// First check whether the view group wants to intercept the hover event.
final boolean interceptHover = onInterceptHoverEvent(event... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "dispatchHoverEvent" | "@SuppressWarnings({"ConstantConditions"})
@Override
protected boolean dispatchHoverEvent(MotionEvent event) {
final int action = event.getAction();
// First check whether the view group wants to intercept the hover event.
final boolean interceptHover = onInterceptHoverEvent(event... |
Inversion-Mutation | megadiff | "protected final void addInstance(Singleton instance)
throws IllegalStateException,
IllegalArgumentException,
InitializationException {
// TODO: Check that state equals INITIALIZING
// Check preconditions
MandatoryArgumentChecker.check("instance", instance);
_... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addInstance" | "protected final void addInstance(Singleton instance)
throws IllegalStateException,
IllegalArgumentException,
InitializationException {
// TODO: Check that state equals INITIALIZING
// Check preconditions
MandatoryArgumentChecker.check("instance", instance);
_... |
Inversion-Mutation | megadiff | "protected void sendRequest(MethodCall methodCall, Future future)
throws java.io.IOException, RenegotiateSessionException {
// Determines the body that is at the root of the subsystem from which the
// call was sent.
// It is always true that the body that issued the request (and not... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "sendRequest" | "protected void sendRequest(MethodCall methodCall, Future future)
throws java.io.IOException, RenegotiateSessionException {
// Determines the body that is at the root of the subsystem from which the
// call was sent.
// It is always true that the body that issued the request (and not... |
Inversion-Mutation | megadiff | "public void handlRequest(HttpServletRequest request,
HttpServletResponse response) {
printRequest(request);
String method = request.getParameter(ServiceConstant.METHOD);
CommonService obj = null;
try {
obj = CommonService.createServiceObjectByMethod(method);
} catch (InstantiationExcepti... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handlRequest" | "public void handlRequest(HttpServletRequest request,
HttpServletResponse response) {
printRequest(request);
String method = request.getParameter(ServiceConstant.METHOD);
CommonService obj = null;
try {
obj = CommonService.createServiceObjectByMethod(method);
} catch (InstantiationExcepti... |
Inversion-Mutation | megadiff | "private DAVStatus sendRequest(String method, String path, Map header, InputStream requestBody) throws SVNException {
Map readHeader = new HashMap();
if (myUserCredentialsProvider != null) {
myUserCredentialsProvider.reset();
}
ISVNCredentials credentials = myLastUsedCre... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "sendRequest" | "private DAVStatus sendRequest(String method, String path, Map header, InputStream requestBody) throws SVNException {
Map readHeader = new HashMap();
if (myUserCredentialsProvider != null) {
myUserCredentialsProvider.reset();
}
ISVNCredentials credentials = myLastUsedCre... |
Inversion-Mutation | megadiff | "private void emphasis(TableDDDetails details) {
deEmphasis();
UIObject.setStyleName(getElement(), CLASSNAME + "-drag", true);
// iterate old and new emphasized row
for (Widget w : scrollBody.renderedRows) {
VScrollTableRow row = (VScrollTableRow) w;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "emphasis" | "private void emphasis(TableDDDetails details) {
deEmphasis();
// iterate old and new emphasized row
for (Widget w : scrollBody.renderedRows) {
VScrollTableRow row = (VScrollTableRow) w;
if (details != null && details.overkey == row.rowKey) {
... |
Inversion-Mutation | megadiff | "protected void noteDocumentIngest(String outputConnectionName,
String docKey, String documentVersion,
String outputVersion, String authorityNameString,
long ingestTime, String documentURI, String documentURIHash)
throws ManifoldCFException
{
HashMap map = new HashMap();
while (true)
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "noteDocumentIngest" | "protected void noteDocumentIngest(String outputConnectionName,
String docKey, String documentVersion,
String outputVersion, String authorityNameString,
long ingestTime, String documentURI, String documentURIHash)
throws ManifoldCFException
{
HashMap map = new HashMap();
while (true)
... |
Inversion-Mutation | megadiff | "public Object start(IApplicationContext appContext) {
try {
appContext.applicationRunning();
initializeProxySupport();
advisor = createInstallContext();
//fetch description of what to install
InstallDescription description = null;
try {
description = computeInstallDescription();
st... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start" | "public Object start(IApplicationContext appContext) {
try {
appContext.applicationRunning();
advisor = createInstallContext();
//fetch description of what to install
InstallDescription description = null;
try {
description = computeInstallDescription();
startRequiredBundles(descriptio... |
Inversion-Mutation | megadiff | "private void setViewStates(int mode) {
// Extra canModify check just in case
if (mode == Utils.MODIFY_UNINITIALIZED || !EditEventHelper.canModifyEvent(mModel)) {
setWhenString();
for (View v : mViewOnlyList) {
v.setVisibility(View.VISIBLE);
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setViewStates" | "private void setViewStates(int mode) {
// Extra canModify check just in case
if (mode == Utils.MODIFY_UNINITIALIZED || !EditEventHelper.canModifyEvent(mModel)) {
setWhenString();
for (View v : mViewOnlyList) {
v.setVisibility(View.VISIBLE);
}
... |
Inversion-Mutation | megadiff | "public static List<Element> handlePropertyName(String[] propertyNames,
ServiceContext context, boolean freq, int maxRecords, String cswServiceSpecificConstraint, LuceneConfig luceneConfig) throws Exception {
List<Element> domainValuesList = new ArrayList<Element>();
if(Log.isDebugEnabled(Geonet.CSW... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handlePropertyName" | "public static List<Element> handlePropertyName(String[] propertyNames,
ServiceContext context, boolean freq, int maxRecords, String cswServiceSpecificConstraint, LuceneConfig luceneConfig) throws Exception {
List<Element> domainValuesList = new ArrayList<Element>();
if(Log.isDebugEnabled(Geonet.CSW... |
Inversion-Mutation | megadiff | "private int readMessages(ClientSession session, ClientConsumer consumer, SimpleString queue) throws MessagingException
{
session.start();
int msgs = 0;
ClientMessage msg = null;
do
{
msg = consumer.receive(1000);
if (msg != null)
{
ms... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "readMessages" | "private int readMessages(ClientSession session, ClientConsumer consumer, SimpleString queue) throws MessagingException
{
session.start();
int msgs = 0;
ClientMessage msg = null;
do
{
msg = consumer.receive(1000);
<MASK>msg.processed();</MASK>
if (m... |
Inversion-Mutation | megadiff | "public synchronized void setCurrentFolder(AbstractFile folder, AbstractFile children[]) {
AbstractFile current; // Current folder.
FileSet markedFiles; // Buffer for all previously marked file.
AbstractFile selectedFile; // Buffer for the previously selected file.
// St... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setCurrentFolder" | "public synchronized void setCurrentFolder(AbstractFile folder, AbstractFile children[]) {
AbstractFile current; // Current folder.
FileSet markedFiles; // Buffer for all previously marked file.
AbstractFile selectedFile; // Buffer for the previously selected file.
// St... |
Inversion-Mutation | megadiff | "public boolean install() {
boolean result = super.install();
if (result) {
result &= super.addSupportedMetrics(
this.getDescription(),
"SKEL",
MetricType.Type.SOURCE_CODE);
}
return result;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "install" | "public boolean install() {
boolean result = super.install();
if (result) {
result &= super.addSupportedMetrics(
<MASK>"SKEL",</MASK>
this.getDescription(),
MetricType.Type.SOURCE_CODE);
}
return result;
... |
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 | "public void dispose()
{
if ( !disposed )
{
if ( contentProvider != null )
{
contentProvider.dispose();
contentProvider = null;
}
if ( labelProvider != null )
{
labelProvider.di... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "dispose" | "public void dispose()
{
if ( !disposed )
{
if ( contentProvider != null )
{
contentProvider.dispose();
contentProvider = null;
}
if ( labelProvider != null )
{
labelProvider.di... |
Inversion-Mutation | megadiff | "public void initProcess(List<String> command, String workingDirectory) throws Throwable {
String[] argv = command.toArray(new String[command.size()]);
String executable = argv[0];
markAsLoginShellIfDefault(argv);
ptyProcess = new PTYProcess(executa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initProcess" | "public void initProcess(List<String> command, String workingDirectory) throws Throwable {
String[] argv = command.toArray(new String[command.size()]);
String executable = argv[0];
markAsLoginShellIfDefault(argv);
<MASK>writerExecutor = ThreadUtiliti... |
Inversion-Mutation | megadiff | "public File saveBuild(Jar jar) throws Exception {
try {
String bsn = jar.getName();
File f = getOutputFile(bsn);
String msg = "";
if (!f.exists() || f.lastModified() < jar.lastModified()) {
reportNewer(f.lastModified(), jar);
f.delete();
if (!f.getParentFile().isDirectory())
f.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "saveBuild" | "public File saveBuild(Jar jar) throws Exception {
try {
String bsn = jar.getName();
File f = getOutputFile(bsn);
String msg = "";
if (!f.exists() || f.lastModified() < jar.lastModified()) {
reportNewer(f.lastModified(), jar);
f.delete();
<MASK>jar.write(f);</MASK>
if (!f.getParen... |
Inversion-Mutation | megadiff | "public Component getTableCellRendererComponent(
final JTable table, Object value, boolean isSelected, boolean hasFocus,
int row, int col) {
value = formatField(value);
TableColumn tableColumn = table.getColumnModel().getColumn(col);
JLabel label = (JLabel)super.getTableCellRendererComponent(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getTableCellRendererComponent" | "public Component getTableCellRendererComponent(
final JTable table, Object value, boolean isSelected, boolean hasFocus,
int row, int col) {
value = formatField(value);
TableColumn tableColumn = table.getColumnModel().getColumn(col);
JLabel label = (JLabel)super.getTableCellRendererComponent(... |
Inversion-Mutation | megadiff | "public DefaultSingleTargetProductDialog(String operatorName, AppContext appContext, String title, String helpID) {
super(appContext, title, ID_APPLY_CLOSE, helpID);
this.operatorName = operatorName;
targetProductNameSuffix = "";
final OperatorSpi operatorSpi = GPF.getDefaultInstan... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "DefaultSingleTargetProductDialog" | "public DefaultSingleTargetProductDialog(String operatorName, AppContext appContext, String title, String helpID) {
super(appContext, title, ID_APPLY_CLOSE, helpID);
this.operatorName = operatorName;
targetProductNameSuffix = "";
final OperatorSpi operatorSpi = GPF.getDefaultInstan... |
Inversion-Mutation | megadiff | "public void reconcile()
{
IEditorInput input = (IEditorInput) editor.getEditorInput();
if (!(input instanceof IFileEditorInput)) return;
IDocumentProvider docProvider = editor.getDocumentProvider();
if (docProvider == null) return;
IDocument doc = d... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "reconcile" | "public void reconcile()
{
IEditorInput input = (IEditorInput) editor.getEditorInput();
if (!(input instanceof IFileEditorInput)) return;
IDocumentProvider docProvider = editor.getDocumentProvider();
if (docProvider == null) return;
IDocument doc = d... |
Inversion-Mutation | megadiff | "@Override
protected void realExecute() {
IData data = project.getData();
for (ShallowAssign al : assigns){
Worker worker = data.getOrCreateWorker(al.worker);
LObject object = data.getOrCreateObject(al.object);
data.addAssign(new AssignedLabel(worker, object, al.label));
}
setResult("... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "realExecute" | "@Override
protected void realExecute() {
IData data = project.getData();
for (ShallowAssign al : assigns){
Worker worker = data.getOrCreateWorker(al.worker);
LObject object = data.getOrCreateObject(al.object);
data.addAssign(new AssignedLabel(worker, object, al.label));
<MASK>setResult("... |
Inversion-Mutation | megadiff | "protected void updateRuntimeCombo(IServerType serverType) {
if (serverType == null || !serverType.hasRuntime() || server == null) {
if (runtimeLabel != null) {
runtimeLabel.setEnabled(false);
runtimeCombo.setItems(new String[0]);
runtimeCombo.setEnabled(false);
runtimeLabel.setVisible(false)... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateRuntimeCombo" | "protected void updateRuntimeCombo(IServerType serverType) {
if (serverType == null || !serverType.hasRuntime() || server == null) {
if (runtimeLabel != null) {
runtimeLabel.setEnabled(false);
runtimeCombo.setItems(new String[0]);
runtimeCombo.setEnabled(false);
runtimeLabel.setVisible(false)... |
Inversion-Mutation | megadiff | "public static void main(String[] args) {
try {
Scanner input = new Scanner(System.in); // Make a scanner
int upTo = 0; //It has to be defined outside of the try block to be visible outside it.
while(true) {
System.out.print("Input a Number: "); // Ask for how much it should check
try... | 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 {
Scanner input = new Scanner(System.in); // Make a scanner
while(true) {
System.out.print("Input a Number: "); // Ask for how much it should check
<MASK>int upTo = 0; //It has to be defined outside of the try block to be visible outside it.</MA... |
Inversion-Mutation | megadiff | "protected void executeOn(String[] files)
throws Exception {
if (MappingTool.ACTION_IMPORT.equals(flags.action))
assertFiles(files);
ClassLoader loader =
(ClassLoader) AccessController.doPrivileged(J2DoPrivHelper
.newTemporaryClassLoaderAction(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "executeOn" | "protected void executeOn(String[] files)
throws Exception {
if (MappingTool.ACTION_IMPORT.equals(flags.action))
assertFiles(files);
ClassLoader loader =
(ClassLoader) AccessController.doPrivileged(J2DoPrivHelper
.newTemporaryClassLoaderAction(... |
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 | "private boolean insertIntoTable(String className, Product product) {
try {
int originalCount = getRecordCount(className);
Class<?> c = product.getClass();
Field[] fields = c.getFields();
fields = sortFields(fields);
String sql = "INSERT INTO " + className + "(";
for (int i = 0; i < fiel... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "insertIntoTable" | "private boolean insertIntoTable(String className, Product product) {
try {
int originalCount = getRecordCount(className);
Class<?> c = product.getClass();
Field[] fields = c.getFields();
fields = sortFields(fields);
String sql = "INSERT INTO " + className + "(";
for (int i = 0; i < fiel... |
Inversion-Mutation | megadiff | "protected boolean onItemClicked(int id) {
Intent intent;
switch (id) {
case Statics.ITEM_TIMER:
clearBackStack();
getMainActivity().showDetails(TimerListFragment.class);
break;
case Statics.ITEM_MOVIES:
clearBackStack();
getMainActivity().showDetails(MovieListFragment.class);
brea... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onItemClicked" | "protected boolean onItemClicked(int id) {
Intent intent;
switch (id) {
case Statics.ITEM_TIMER:
<MASK>clearBackStack();</MASK>
getMainActivity().showDetails(TimerListFragment.class);
break;
case Statics.ITEM_MOVIES:
<MASK>clearBackStack();</MASK>
getMainActivity().showDetails(MovieLis... |
Inversion-Mutation | megadiff | "public static void maskBaseFileByDepth(String depthFile, int depthToMask, int maskDenom, boolean exportDepth) {
System.out.println("Depth file: "+depthFile);
System.out.println("Site depth to mask: "+depthToMask);
System.out.println("Divisor for physical positions to be masked: "+maskDenom);... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "maskBaseFileByDepth" | "public static void maskBaseFileByDepth(String depthFile, int depthToMask, int maskDenom, boolean exportDepth) {
System.out.println("Depth file: "+depthFile);
System.out.println("Site depth to mask: "+depthToMask);
System.out.println("Divisor for physical positions to be masked: "+maskDenom);... |
Inversion-Mutation | megadiff | "@SuppressWarnings("unchecked")
public static List<CleanPlan> createCleanPlanFromJSON(Reader reader)
throws InvalidRuleException, InvalidCleanPlanException {
Preconditions.checkNotNull(reader);
JSONObject jsonObject = (JSONObject) JSONValue.parse(reader);
// a set which prevents generating new tables w... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createCleanPlanFromJSON" | "@SuppressWarnings("unchecked")
public static List<CleanPlan> createCleanPlanFromJSON(Reader reader)
throws InvalidRuleException, InvalidCleanPlanException {
Preconditions.checkNotNull(reader);
JSONObject jsonObject = (JSONObject) JSONValue.parse(reader);
// a set which prevents generating new tables w... |
Inversion-Mutation | megadiff | "@Override
public void configureHandlerExceptionResolvers(
List<HandlerExceptionResolver> exceptionResolvers) {
exceptionResolvers.add(exceptionHandlerExceptionResolver());
exceptionResolvers.add(simpleMappingExceptionResolver());
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "configureHandlerExceptionResolvers" | "@Override
public void configureHandlerExceptionResolvers(
List<HandlerExceptionResolver> exceptionResolvers) {
<MASK>exceptionResolvers.add(simpleMappingExceptionResolver());</MASK>
exceptionResolvers.add(exceptionHandlerExceptionResolver());
}" |
Inversion-Mutation | megadiff | "public void initializePlayers() {
Square redSquare = null;
Square blueSquare = null;
try {
redSquare = getGrid().getSquareAtCoordinate(getGrid().getStartingPositions().get(0));
blueSquare = getGrid().getSquareAtCoordinate(getGrid().getStartingPositions().get(1));
} catch (OutsideTheGridException e)... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initializePlayers" | "public void initializePlayers() {
Square redSquare = null;
Square blueSquare = null;
try {
redSquare = getGrid().getSquareAtCoordinate(getGrid().getStartingPositions().get(0));
blueSquare = getGrid().getSquareAtCoordinate(getGrid().getStartingPositions().get(1));
} catch (OutsideTheGridException e)... |
Inversion-Mutation | megadiff | "@Override
public void onCreate() {
mConnectivityManager = new EmailConnectivityManager(this, TAG);
// Start up our service thread
new Thread(this, "AttachmentDownloadService").start();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
public void onCreate() {
// Start up our service thread
new Thread(this, "AttachmentDownloadService").start();
<MASK>mConnectivityManager = new EmailConnectivityManager(this, TAG);</MASK>
}" |
Inversion-Mutation | megadiff | "public void reserveConfirmed(Long connectionId, NsiRequestDetails requestDetails) {
ConnectionV2 connection = connectionRepo.findOne(connectionId);
connection.setReservationState(ReservationStateEnumType.RESERVE_HELD);
connectionRepo.save(connection);
log.info("Sending a reserveConfirmed on endpo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "reserveConfirmed" | "public void reserveConfirmed(Long connectionId, NsiRequestDetails requestDetails) {
ConnectionV2 connection = connectionRepo.findOne(connectionId);
connection.setReservationState(ReservationStateEnumType.RESERVE_HELD);
connectionRepo.save(connection);
log.info("Sending a reserveConfirmed on endpo... |
Inversion-Mutation | megadiff | "public static void main(String[] args) throws IOException {
String location;
String capitalizedSentence;
ServerSocket welcomeSocket = new ServerSocket(57005);
while(true) {
Socket connectionSocket = welcomeSocket.accept();
BufferedReader inFromClient = new BufferedReader(new InputSt... | 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) throws IOException {
String location;
String capitalizedSentence;
ServerSocket welcomeSocket = new ServerSocket(57005);
while(true) {
Socket connectionSocket = welcomeSocket.accept();
BufferedReader inFromClient = new BufferedReader(new InputSt... |
Inversion-Mutation | megadiff | "private void loadAndBindAllApps() {
final long t = DEBUG_LOADERS ? SystemClock.uptimeMillis() : 0;
// Don't use these two variables in any of the callback runnables.
// Otherwise we hold a reference to them.
final Callbacks oldCallbacks = mCallbacks... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadAndBindAllApps" | "private void loadAndBindAllApps() {
final long t = DEBUG_LOADERS ? SystemClock.uptimeMillis() : 0;
// Don't use these two variables in any of the callback runnables.
// Otherwise we hold a reference to them.
final Callbacks oldCallbacks = mCallbacks... |
Inversion-Mutation | megadiff | "public TextField newTextField(String s, int max_length, int width, int style){
TextField t = new TextField(this.mc.fontRenderer, this.x, this.y, width, style);
t.setMaxStringLength(max_length);
t.setText(s);
this.x += width;
return t;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "newTextField" | "public TextField newTextField(String s, int max_length, int width, int style){
TextField t = new TextField(this.mc.fontRenderer, this.x, this.y, width, style);
<MASK>t.setText(s);</MASK>
t.setMaxStringLength(max_length);
this.x += width;
return t;
}" |
Inversion-Mutation | megadiff | "public static String getTitleFromUrl(AbstractWebLocation location, IProgressMonitor monitor) throws IOException {
monitor = Policy.monitorFor(monitor);
try {
monitor.beginTask("Retrieving " + location.getUrl(), IProgressMonitor.UNKNOWN);
HttpClient client = new HttpClient();
WebUtil.configureHttpCl... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getTitleFromUrl" | "public static String getTitleFromUrl(AbstractWebLocation location, IProgressMonitor monitor) throws IOException {
monitor = Policy.monitorFor(monitor);
try {
monitor.beginTask("Retrieving " + location.getUrl(), IProgressMonitor.UNKNOWN);
HttpClient client = new HttpClient();
WebUtil.configureHttpCl... |
Inversion-Mutation | megadiff | "public boolean onBlockDestroy(Player player, Block block) {
if (block.getType() != Portal.SIGN && block.getType() != Portal.OBSIDIAN && block.getType() != Portal.BUTTON) return false;
Portal gate = Portal.getByBlock(block);
if (gate == null) return false;
if ((block.getType() == Portal.BUTT... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onBlockDestroy" | "public boolean onBlockDestroy(Player player, Block block) {
if (block.getType() != Portal.SIGN && block.getType() != Portal.OBSIDIAN && block.getType() != Portal.BUTTON) return false;
Portal gate = Portal.getByBlock(block);
if (gate == null) return false;
<MASK>if (!player.canUseCommand("/stargat... |
Inversion-Mutation | megadiff | "public boolean performItemClick(View view, int position, long id) {
if (mOnItemClickListener != null) {
if (view != null) {
view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
}
mOnItemClickListener.onItemClick(this, view, position, id);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "performItemClick" | "public boolean performItemClick(View view, int position, long id) {
if (mOnItemClickListener != null) {
<MASK>playSoundEffect(SoundEffectConstants.CLICK);</MASK>
if (view != null) {
view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
}
... |
Inversion-Mutation | megadiff | "public void installSources(IPackageFragmentRoot root) {
NuxeoSDK sdk = NuxeoSDK.getDefault();
if (sdk == null) {
UI.showError("No Nuxeo SDK configured. Cannot continue.");
return;
}
Artifact artifact = Artifact.fromJarName(root.getElementName());
i... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "installSources" | "public void installSources(IPackageFragmentRoot root) {
NuxeoSDK sdk = NuxeoSDK.getDefault();
if (sdk == null) {
UI.showError("No Nuxeo SDK configured. Cannot continue.");
return;
}
Artifact artifact = Artifact.fromJarName(root.getElementName());
i... |
Inversion-Mutation | megadiff | "public ParticleEmitter (ParticleEmitter emitter) {
sprite = emitter.sprite;
name = emitter.name;
setMaxParticleCount(emitter.maxParticleCount);
minParticleCount = emitter.minParticleCount;
delayValue.load(emitter.delayValue);
durationValue.load(emitter.durationValue);
emissionValue.load(emitter.e... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ParticleEmitter" | "public ParticleEmitter (ParticleEmitter emitter) {
<MASK>name = emitter.name;</MASK>
sprite = emitter.sprite;
setMaxParticleCount(emitter.maxParticleCount);
minParticleCount = emitter.minParticleCount;
delayValue.load(emitter.delayValue);
durationValue.load(emitter.durationValue);
emissionValue.l... |
Inversion-Mutation | megadiff | "private void loadWorkspace() {
final long t = DEBUG_LOADERS ? SystemClock.uptimeMillis() : 0;
final Context context = mContext;
final ContentResolver contentResolver = context.getContentResolver();
final PackageManager manager = context.getPackageManager();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadWorkspace" | "private void loadWorkspace() {
final long t = DEBUG_LOADERS ? SystemClock.uptimeMillis() : 0;
final Context context = mContext;
final ContentResolver contentResolver = context.getContentResolver();
final PackageManager manager = context.getPackageManager();
... |
Inversion-Mutation | megadiff | "@Override
public void onPageFinished(WebView view, String url) {
if (imagesLoadingState) {
imagesLoadingState = false;
imageLoadingFinished();
}
if(!isResumed()){
Log.e(TAG,"PageFinished after pausing. Forcing Webview.pauseTimers");
mHandler.postDelayed(new Runnable(){
@Overrid... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPageFinished" | "@Override
public void onPageFinished(WebView view, String url) {
if (imagesLoadingState) {
imagesLoadingState = false;
imageLoadingFinished();
}
if(!isResumed()){
Log.e(TAG,"PageFinished after pausing. Forcing Webview.pauseTimers");
mHandler.postDelayed(new Runnable(){
@Overrid... |
Inversion-Mutation | megadiff | "@Override
public void run() {
mThreadView.pauseTimers();
mThreadView.onPause();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
<MASK>mThreadView.onPause();</MASK>
mThreadView.pauseTimers();
}" |
Inversion-Mutation | megadiff | "protected void installListeners() {
//David: Adding the MouseEventHandler synchronously causes a strange
// initialization sequence if the popup owner is a tree/table editor:
//
// - The editor gets moved to its initial location based on the cell location,
// generating a COMPONENT_MOVED ComponentEvent.
// ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "installListeners" | "protected void installListeners() {
//David: Adding the MouseEventHandler synchronously causes a strange
// initialization sequence if the popup owner is a tree/table editor:
//
// - The editor gets moved to its initial location based on the cell location,
// generating a COMPONENT_MOVED ComponentEvent.
// ... |
Inversion-Mutation | megadiff | "public void actionPerformed(ActionEvent e) {
Component owner = getActualOwner();
hidePopupImmediately(true);
if (owner != null) {
owner.requestFocus();
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "actionPerformed" | "public void actionPerformed(ActionEvent e) {
<MASK>hidePopupImmediately(true);</MASK>
Component owner = getActualOwner();
if (owner != null) {
owner.requestFocus();
}
}" |
Inversion-Mutation | megadiff | "@Override
protected void onPostResume() {
super.onPostResume();
if (!Flags.checkAndClear(Flags.TLA_DISMISSED_FROM_TASK_EDIT)) {
TaskEditFragment tea = getTaskEditFragment();
if (tea != null)
onBackPressed();
}
if (getIntent().hasEx... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPostResume" | "@Override
protected void onPostResume() {
super.onPostResume();
if (!Flags.checkAndClear(Flags.TLA_DISMISSED_FROM_TASK_EDIT)) {
TaskEditFragment tea = getTaskEditFragment();
if (tea != null)
onBackPressed();
}
if (getIntent().hasEx... |
Inversion-Mutation | megadiff | "private void move(int position, UIComponent uiSource, final UIContainer uiTarget, PortalRequestContext pcontext) {
org.exoplatform.portal.webui.container.UIContainer uiParent = uiSource.getParent();
List<UIComponent> children = uiTarget.getChildren();
if (uiParent == uiTarget) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "move" | "private void move(int position, UIComponent uiSource, final UIContainer uiTarget, PortalRequestContext pcontext) {
org.exoplatform.portal.webui.container.UIContainer uiParent = uiSource.getParent();
List<UIComponent> children = uiTarget.getChildren();
if (uiParent == uiTarget) {
... |
Inversion-Mutation | megadiff | "public void asyncClose(final CloseCallback origCb, final Object origCtx) {
CloseCallback cb = new CloseCallback() {
@Override
public void closeComplete(int rc, LedgerHandle lh, Object ctx) {
if (rc == BKException.Code.OK) {
if (refCount.decrement... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "asyncClose" | "public void asyncClose(final CloseCallback origCb, final Object origCtx) {
CloseCallback cb = new CloseCallback() {
@Override
public void closeComplete(int rc, LedgerHandle lh, Object ctx) {
if (rc == BKException.Code.OK) {
if (refCount.decrement... |
Inversion-Mutation | megadiff | "@Override
public void closeComplete(int rc, LedgerHandle lh, Object ctx) {
if (rc == BKException.Code.OK) {
if (refCount.decrementAndGet() == 0) {
// Closed a ledger
bk.getStatsLogger().getSimpleStatLogger(BookkeeperCl... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "closeComplete" | "@Override
public void closeComplete(int rc, LedgerHandle lh, Object ctx) {
if (rc == BKException.Code.OK) {
if (refCount.decrementAndGet() == 0) {
// Closed a ledger
bk.getStatsLogger().getSimpleStatLogger(BookkeeperCl... |
Inversion-Mutation | megadiff | "protected void validateSettings() {
final Validator validator = getValidator(createTaskRepository());
if (validator == null) {
return;
}
try {
getWizard().getContainer().run(true, true, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "validateSettings" | "protected void validateSettings() {
final Validator validator = getValidator(createTaskRepository());
if (validator == null) {
return;
}
try {
getWizard().getContainer().run(true, true, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, ... |
Inversion-Mutation | megadiff | "public void destroy() {
mContent.destroy();
disableRemoteDebugging();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "destroy" | "public void destroy() {
<MASK>disableRemoteDebugging();</MASK>
mContent.destroy();
}" |
Inversion-Mutation | megadiff | "public RunResult run(String className, String[] args, final String classpath, boolean useLTW) {
lastRunResult = null;
StringBuffer cp = new StringBuffer();
if (classpath != null) {
// allow replacing this special variable, rather than copying all files to allow tests of jars that don't end in .jar
cp... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public RunResult run(String className, String[] args, final String classpath, boolean useLTW) {
lastRunResult = null;
StringBuffer cp = new StringBuffer();
if (classpath != null) {
// allow replacing this special variable, rather than copying all files to allow tests of jars that don't end in .jar
cp... |
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 | "public RemoteFilter(String rulesSource, String hostname, int port,
String user, String password, boolean ssl)
throws RemoteFilterException {
this.setDaemon(true);
rules = rulesSource;
this.hostname = hostname;
this.port = port;
this.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "RemoteFilter" | "public RemoteFilter(String rulesSource, String hostname, int port,
String user, String password, boolean ssl)
throws RemoteFilterException {
this.setDaemon(true);
<MASK>store = getRemoteStore();</MASK>
rules = rulesSource;
this.hostname = host... |
Inversion-Mutation | megadiff | "protected ActionForward performAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception {
Transaction tx = HibernateUtil.getSession().beginTransaction();
String forward = FWD_SUCCESS;
String referer = request.get... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "performAction" | "protected ActionForward performAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception {
String forward = FWD_SUCCESS;
String referer = request.getParameter("referer");
List<IResultUpdate> updaters = ResultUpda... |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_profile);
String currentQuiz = getIntent().getStringExtra("quizType");
String textInfo = null;
// Retrieves everything from the text file
if (currentQuiz.equals("p... | 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.activity_profile);
<MASK>String textInfo = null;</MASK>
String currentQuiz = getIntent().getStringExtra("quizType");
// Retrieves everything from the text file
if (currentQ... |
Inversion-Mutation | megadiff | "public void applyChanges(){
axis.setTitle(titleText.getText());
axis.setFont(scaleFont);
axis.setTitleFont(titleFont);
axis.setForegroundColor(XYGraphMediaFactory.getInstance().getColor(
axisColorSelector.getColorValue()));
axis.setPrimarySide(primaryButton.getSelection());
axis.setLogScale(logB... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "applyChanges" | "public void applyChanges(){
axis.setTitle(titleText.getText());
axis.setFont(scaleFont);
axis.setTitleFont(titleFont);
axis.setForegroundColor(XYGraphMediaFactory.getInstance().getColor(
axisColorSelector.getColorValue()));
axis.setPrimarySide(primaryButton.getSelection());
axis.setLogScale(logB... |
Inversion-Mutation | megadiff | "public void timestep() throws InterruptedException, KernelException, LogException {
synchronized (this) {
++time;
// Work out what the agents can see and hear (using the commands from the previous timestep).
// Wait for new commands
// Send commands to simul... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "timestep" | "public void timestep() throws InterruptedException, KernelException, LogException {
synchronized (this) {
++time;
// Work out what the agents can see and hear (using the commands from the previous timestep).
// Wait for new commands
// Send commands to simul... |
Inversion-Mutation | megadiff | "public static String getAt(Matcher matcher, int idx) {
idx = normaliseIndex(idx, matcher.groupCount());
// are we using groups?
if (matcher.groupCount() > 0) {
// yes, so return the specified group
matcher.find();
return matcher.group(idx);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getAt" | "public static String getAt(Matcher matcher, int idx) {
<MASK>matcher.reset();</MASK>
idx = normaliseIndex(idx, matcher.groupCount());
// are we using groups?
if (matcher.groupCount() > 0) {
// yes, so return the specified group
matcher.find();
... |
Inversion-Mutation | megadiff | "private static float parseTime(Element testCase) {
String time = testCase.attributeValue("time");
if(time!=null) {
time = time.replace(",","");
try {
return Float.parseFloat(time);
} catch (NumberFormatException e) {
try {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parseTime" | "private static float parseTime(Element testCase) {
String time = testCase.attributeValue("time");
<MASK>time = time.replace(",","");</MASK>
if(time!=null) {
try {
return Float.parseFloat(time);
} catch (NumberFormatException e) {
t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.