type stringclasses 1
value | dataset stringclasses 1
value | input stringlengths 75 160k | instruction stringlengths 117 171 | output stringlengths 88 168k |
|---|---|---|---|---|
Inversion-Mutation | megadiff | "@Override
public void onEntityDeath(EntityDeathEvent event) {
Entity defender = event.getEntity();
Player attacker = null;
EntityDamageEvent lastDamage = defender.getLastDamageCause();
if (lastDamage instanceof EntityDamageByEntityEvent) {
Entity damager = ((Entity... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEntityDeath" | "@Override
public void onEntityDeath(EntityDeathEvent event) {
Entity defender = event.getEntity();
Player attacker = null;
EntityDamageEvent lastDamage = defender.getLastDamageCause();
if (lastDamage instanceof EntityDamageByEntityEvent) {
Entity damager = ((Entity... |
Inversion-Mutation | megadiff | "public static File identifyDeployment(URL url) {
String actualFilePath = url.getPath();
String nestedPath = "";
if (actualFilePath.startsWith("file:")) {
actualFilePath = actualFilePath.substring(5);
}
int nestedSeperator = actualFilePath.indexOf('!');
if (nestedSeperator != -1) ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "identifyDeployment" | "public static File identifyDeployment(URL url) {
String actualFilePath = url.getPath();
String nestedPath = "";
if (actualFilePath.startsWith("file:")) {
actualFilePath = actualFilePath.substring(5);
}
int nestedSeperator = actualFilePath.indexOf('!');
if (nestedSeperator != -1) ... |
Inversion-Mutation | megadiff | "@Override public void react( SEMAINEMessage m ) throws JMSException
{
if( m instanceof SEMAINEEmmaMessage ) {
SEMAINEEmmaMessage em = (SEMAINEEmmaMessage)m;
/* Reading words */
//System.out.println(em.getText());
Element wordSequence = em.getSequence();
if( wordSequence != null ) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "react" | "@Override public void react( SEMAINEMessage m ) throws JMSException
{
if( m instanceof SEMAINEEmmaMessage ) {
SEMAINEEmmaMessage em = (SEMAINEEmmaMessage)m;
/* Reading words */
//System.out.println(em.getText());
Element wordSequence = em.getSequence();
if( wordSequence != null ) {
... |
Inversion-Mutation | megadiff | "public void end() {
_running.set(false);
_events.add(false);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "end" | "public void end() {
<MASK>_events.add(false);</MASK>
_running.set(false);
}" |
Inversion-Mutation | megadiff | "@SuppressWarnings("unchecked")
protected AbstractBeanDefinition parseInternal(final Element element, final ParserContext parserContext) {
// this is the bean peforming the registration of custom listeners
BeanDefinitionBuilder listenerRegBean = BeanDefinitionBuilder.rootBeanDefinition(CustomList... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parseInternal" | "@SuppressWarnings("unchecked")
protected AbstractBeanDefinition parseInternal(final Element element, final ParserContext parserContext) {
// this is the bean peforming the registration of custom listeners
BeanDefinitionBuilder listenerRegBean = BeanDefinitionBuilder.rootBeanDefinition(CustomList... |
Inversion-Mutation | megadiff | "@Override
public void handleMessage(Message msg) {
BluetoothAudioGateway.IncomingConnectionInfo info =
(BluetoothAudioGateway.IncomingConnectionInfo)msg.obj;
int type = BluetoothHandsfree.TYPE_UNKNOWN;
switch(msg.what) {
case BluetoothAu... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleMessage" | "@Override
public void handleMessage(Message msg) {
BluetoothAudioGateway.IncomingConnectionInfo info =
(BluetoothAudioGateway.IncomingConnectionInfo)msg.obj;
int type = BluetoothHandsfree.TYPE_UNKNOWN;
switch(msg.what) {
case BluetoothAu... |
Inversion-Mutation | megadiff | "@Override
public void doPost(HttpServletRequest request, HttpServletResponse response, Identity subject, Identity object) throws IOException {
// Check whether the user is public
if (subject.getUri().equals(getPublicUser())) {
response.getWriter().println("The public user is not allowed to create new mo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doPost" | "@Override
public void doPost(HttpServletRequest request, HttpServletResponse response, Identity subject, Identity object) throws IOException {
// Check whether the user is public
if (subject.getUri().equals(getPublicUser())) {
response.getWriter().println("The public user is not allowed to create new mo... |
Inversion-Mutation | megadiff | "protected void prepareDesign( )
{
ReportRunnable runnable = executionContext.getRunnable( );
if( !runnable.prepared)
{
ReportDesignHandle reportDesign = executionContext.getDesign( );
ScriptedDesignSearcher searcher = new ScriptedDesignSearcher(
reportDesign );
searcher.apply( reportDesign... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "prepareDesign" | "protected void prepareDesign( )
{
ReportRunnable runnable = executionContext.getRunnable( );
if( !runnable.prepared)
{
ReportDesignHandle reportDesign = executionContext.getDesign( );
ScriptedDesignSearcher searcher = new ScriptedDesignSearcher(
reportDesign );
searcher.apply( reportDesign... |
Inversion-Mutation | megadiff | "private Map<String, Map<String, Cell>> generateCellMap(int count, Filter filter, Pattern testStatusRegex, int testStatusGroup, int logLinesToSearch) {
assert count > 0 : "Must request more than 0 rows";
assert filter != null : "Filter must not be null";
assert testStatusGroup >= 0 : "testStatusGroup should be... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "generateCellMap" | "private Map<String, Map<String, Cell>> generateCellMap(int count, Filter filter, Pattern testStatusRegex, int testStatusGroup, int logLinesToSearch) {
assert count > 0 : "Must request more than 0 rows";
assert filter != null : "Filter must not be null";
assert testStatusGroup >= 0 : "testStatusGroup should be... |
Inversion-Mutation | megadiff | "@Override
public void run() {
Thread thisThread = Thread.currentThread();
while (curThread == thisThread) {
List<WebURL> part = collectionHandler.getNextPart(this);
ExecutorService executor = Executors.newFixedThreadPool(POOL_SIZE);
for (WebURL url : part)... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
Thread thisThread = Thread.currentThread();
<MASK>ExecutorService executor = Executors.newFixedThreadPool(POOL_SIZE);</MASK>
while (curThread == thisThread) {
List<WebURL> part = collectionHandler.getNextPart(this);
for (WebURL ur... |
Inversion-Mutation | megadiff | "public void startGameLoop()
{
Runnable gR = new Runnable()
{
//Proof of concept variables
int shotCount = 0;
boolean thisFrameDrawn = false;
//Testing FPS Only
long startTime = 0;
long endTime = 0;
long timeCount = 0;
int frameCount = 0;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startGameLoop" | "public void startGameLoop()
{
Runnable gR = new Runnable()
{
//Proof of concept variables
int shotCount = 0;
boolean thisFrameDrawn = false;
//Testing FPS Only
long startTime = 0;
long endTime = 0;
long timeCount = 0;
int frameCount = 0;
... |
Inversion-Mutation | megadiff | "public void run()
{
while(gameLoop)
{
startTime = System.currentTimeMillis();
//IMPORTANT VARIABLE FOR RENDERER SYNCHRONIZATION
thisFrameDrawn = false;
//Handle touch events
HandleTouchEvents();
//check victory conditions
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run()
{
while(gameLoop)
{
startTime = System.currentTimeMillis();
//IMPORTANT VARIABLE FOR RENDERER SYNCHRONIZATION
thisFrameDrawn = false;
//Handle touch events
HandleTouchEvents();
//check victory conditions
... |
Inversion-Mutation | megadiff | "@Override
public void visit(DexInstruction_BinaryOpWide instruction) {
assert DexRegisterHelper.isPair(instruction.getRegSourceA1(), instruction.getRegSourceA2());
assert DexRegisterHelper.isPair(instruction.getRegSourceB1(), instruction.getRegSourceB2());
assert DexRegisterHelper.isPair(instruction.getRegT... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "visit" | "@Override
public void visit(DexInstruction_BinaryOpWide instruction) {
assert DexRegisterHelper.isPair(instruction.getRegSourceA1(), instruction.getRegSourceA2());
assert DexRegisterHelper.isPair(instruction.getRegSourceB1(), instruction.getRegSourceB2());
assert DexRegisterHelper.isPair(instruction.getRegT... |
Inversion-Mutation | megadiff | "private void updateBusinessAccountFromAccount(final Account account, final BusinessAccount bac) {
final List<UUID> invoiceIds = new ArrayList<UUID>();
try {
DateTime lastInvoiceDate = null;
BigDecimal totalInvoiceBalance = BigDecimal.ZERO;
String lastPaymentSt... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateBusinessAccountFromAccount" | "private void updateBusinessAccountFromAccount(final Account account, final BusinessAccount bac) {
final List<UUID> invoiceIds = new ArrayList<UUID>();
try {
DateTime lastInvoiceDate = null;
BigDecimal totalInvoiceBalance = BigDecimal.ZERO;
String lastPaymentSt... |
Inversion-Mutation | megadiff | "private void check(){
File[] files = _deployDir.listFiles(_fileFilter);
// Checking for new deployment directories
for (File file : files) {
if (checkIsNew(new File(file, "deploy.xml"))) {
try {
DeploymentUnit du = new DeploymentUnit(file, _pxeServer);
du.deploy(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "check" | "private void check(){
File[] files = _deployDir.listFiles(_fileFilter);
// Checking for new deployment directories
for (File file : files) {
if (checkIsNew(new File(file, "deploy.xml"))) {
try {
DeploymentUnit du = new DeploymentUnit(file, _pxeServer);
<MASK>_insp... |
Inversion-Mutation | megadiff | "public WorkspaceSubscriber() {
// Add subscribers for all projects that have them
RepositoryProviderManager.getInstance().addListener(this);
IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
for (int i = 0; i < allProjects.length; i++) {
IProject project = allProjects[i];... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "WorkspaceSubscriber" | "public WorkspaceSubscriber() {
// Add subscribers for all projects that have them
RepositoryProviderManager.getInstance().addListener(this);
IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
for (int i = 0; i < allProjects.length; i++) {
IProject project = allProjects[i];... |
Inversion-Mutation | megadiff | "public void onUpdate(final Song playing, final Song[] queued) {
runOnUiThread(new Runnable() {
public void run() {
nowPlaying = playing;
updateSongs(playing, queued);
}
});
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onUpdate" | "public void onUpdate(final Song playing, final Song[] queued) {
<MASK>nowPlaying = playing;</MASK>
runOnUiThread(new Runnable() {
public void run() {
updateSongs(playing, queued);
}
});
}" |
Inversion-Mutation | megadiff | "@Override
public void runCommand(CommandSender sender, List<String> args) {
CommandSender target = sender;
String name = "Console";
int pageNum = 0;
List<String> list = new ArrayList<String>();
if (args.size() == 1) {
try {
pageNum = Integ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "runCommand" | "@Override
public void runCommand(CommandSender sender, List<String> args) {
CommandSender target = sender;
String name = "Console";
int pageNum = 0;
List<String> list = new ArrayList<String>();
if (args.size() == 1) {
try {
pageNum = Integ... |
Inversion-Mutation | megadiff | "public boolean hasSideEffects()
{
switch (type) {
case Token.EXPR_VOID:
case Token.COMMA:
if (last != null)
return last.hasSideEffects();
else
return true;
case Token.HOOK:
if (first == null ||
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "hasSideEffects" | "public boolean hasSideEffects()
{
switch (type) {
case Token.EXPR_VOID:
<MASK>case Token.EXPR_RESULT:</MASK>
case Token.COMMA:
if (last != null)
return last.hasSideEffects();
else
return true;
case T... |
Inversion-Mutation | megadiff | "public FragmentActionResult markPaperRecordRequestAsSent(@RequestParam(value = "identifier", required = true) String identifier,
@SpringBean("paperRecordService") PaperRecordService paperRecordService,
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "markPaperRecordRequestAsSent" | "public FragmentActionResult markPaperRecordRequestAsSent(@RequestParam(value = "identifier", required = true) String identifier,
@SpringBean("paperRecordService") PaperRecordService paperRecordService,
... |
Inversion-Mutation | megadiff | "public static MediaItem createMediaItemFromUri(Context context, Uri target, int mediaType) {
MediaItem item = null;
long id = ContentUris.parseId(target);
ContentResolver cr = context.getContentResolver();
String whereClause = Images.ImageColumns._ID + "=" + Long.toString(id);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createMediaItemFromUri" | "public static MediaItem createMediaItemFromUri(Context context, Uri target, int mediaType) {
MediaItem item = null;
long id = ContentUris.parseId(target);
ContentResolver cr = context.getContentResolver();
String whereClause = Images.ImageColumns._ID + "=" + Long.toString(id);
... |
Inversion-Mutation | megadiff | "public PageFormat getPageFormat(int pageIndex)
throws IndexOutOfBoundsException {
try {
if (pageIndex >= getNumberOfPages()) {
return null;
}
PageFormat pageFormat = new PageFormat();
Paper paper = new Paper();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getPageFormat" | "public PageFormat getPageFormat(int pageIndex)
throws IndexOutOfBoundsException {
try {
if (pageIndex >= getNumberOfPages()) {
return null;
}
PageFormat pageFormat = new PageFormat();
Paper paper = new Paper();
... |
Inversion-Mutation | megadiff | "public void performAnalysisInBackground() {
synchronized (backgroundQueue) {
if (!backgroundQueue.contains(this)) {
backgroundQueue.add(this);
if (backgroundJob == null) {
backgroundJob = new BackgroundAnalysisJob();
backgroundJob.setPriority(Job.BUILD);
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "performAnalysisInBackground" | "public void performAnalysisInBackground() {
synchronized (backgroundQueue) {
if (!backgroundQueue.contains(this)) {
backgroundQueue.add(this);
if (backgroundJob == null) {
backgroundJob = new BackgroundAnalysisJob();
backgroundJob.setPriority(Job.BUILD);
<... |
Inversion-Mutation | megadiff | "@Override
protected void doCreateControl(
TabbedPropertySheetWidgetFactory widgetFactory) {
super.doCreateControl(widgetFactory);
browse = widgetFactory.createButton(composite, Messages.Browse, SWT.FLAT);
browse.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(S... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doCreateControl" | "@Override
protected void doCreateControl(
TabbedPropertySheetWidgetFactory widgetFactory) {
super.doCreateControl(widgetFactory);
browse = widgetFactory.createButton(composite, Messages.Browse, SWT.FLAT);
browse.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(S... |
Inversion-Mutation | megadiff | "@Override
public void widgetSelected(SelectionEvent e) {
super.widgetSelected(e);
final AbstractProcess parentProcess = ModelHelper.getParentProcess(widget);
if(parentProcess != null){
SelectFileStoreWizard selectImageFileStorWizard = new SelectFileStoreWizard(editingDomain, parentProcess, ((I... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "widgetSelected" | "@Override
public void widgetSelected(SelectionEvent e) {
super.widgetSelected(e);
final AbstractProcess parentProcess = ModelHelper.getParentProcess(widget);
if(parentProcess != null){
SelectFileStoreWizard selectImageFileStorWizard = new SelectFileStoreWizard(editingDomain, parentProcess, ((I... |
Inversion-Mutation | megadiff | "public void assignInstanceVariable(String name) {
// FIXME: more efficient with a callback
loadSelf();
invokeIRubyObject("getInstanceVariables", cg.sig(InstanceVariables.class));
method.swap();
method.ldc(name);
method.swap();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "assignInstanceVariable" | "public void assignInstanceVariable(String name) {
// FIXME: more efficient with a callback
loadSelf();
method.swap();
method.ldc(name);
method.swap();
<MASK>invokeIRubyObject("getInstanceVariables", cg.sig(InstanceVariables.class));</MA... |
Inversion-Mutation | megadiff | "private void startAsMaster()
{
this.broker = brokerFactory.create();
this.localGraph = new EmbeddedGraphDbImpl( storeDir, config, this,
CommonFactories.defaultLockManagerFactory(),
new MasterIdGeneratorFactory(),
CommonFactories.defaultRelation... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startAsMaster" | "private void startAsMaster()
{
this.broker = brokerFactory.create();
<MASK>this.masterServer = (MasterServer) broker.instantiateMasterServer( this );</MASK>
this.localGraph = new EmbeddedGraphDbImpl( storeDir, config, this,
CommonFactories.defaultLockManagerFactory(),
... |
Inversion-Mutation | megadiff | "public void noOneAnswered()
{
answerStateManager.setAnswerState(AnswerState.NOBODY_ANSWERED);
priceManager.setPrice(priceManager.getPrice() + 1);
gameStateManager.setGameState(GameState.FINISHED);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "noOneAnswered" | "public void noOneAnswered()
{
answerStateManager.setAnswerState(AnswerState.NOBODY_ANSWERED);
<MASK>gameStateManager.setGameState(GameState.FINISHED);</MASK>
priceManager.setPrice(priceManager.getPrice() + 1);
}" |
Inversion-Mutation | megadiff | "public TableRow createRow(LayoutInflater inflater, T device) {
TableRow row = (TableRow) inflater.inflate(layoutId, null);
SeekBar seekBar = (SeekBar) row.findViewById(R.id.seekBar);
seekBar.setOnSeekBarChangeListener(createListener(device));
seekBar.setMax(maximumProgress);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createRow" | "public TableRow createRow(LayoutInflater inflater, T device) {
TableRow row = (TableRow) inflater.inflate(layoutId, null);
SeekBar seekBar = (SeekBar) row.findViewById(R.id.seekBar);
seekBar.setOnSeekBarChangeListener(createListener(device));
<MASK>seekBar.setProgress(initialProgres... |
Inversion-Mutation | megadiff | "public boolean remove(TabBarButtonBase w) {
int indexForWidget = getIndexForWidget(w);
children.remove(w);
if (indexForWidget != -1) {
handlers.get(indexForWidget).removeHandler();
handlers.remove(indexForWidget);
}
return container.remove(w);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "remove" | "public boolean remove(TabBarButtonBase w) {
<MASK>children.remove(w);</MASK>
int indexForWidget = getIndexForWidget(w);
if (indexForWidget != -1) {
handlers.get(indexForWidget).removeHandler();
handlers.remove(indexForWidget);
}
return container.remove(w);
}" |
Inversion-Mutation | megadiff | "public void visitMethodInsn(int opcode, String owner, String name, String desc) {
if (boxing(opcode,owner,name)) {
boxingDesc = desc;
dropBoxing();
}
else {
if (unboxing(opcode, owner, name)) {
if (boxingDesc !=... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "visitMethodInsn" | "public void visitMethodInsn(int opcode, String owner, String name, String desc) {
if (boxing(opcode,owner,name)) {
<MASK>dropBoxing();</MASK>
boxingDesc = desc;
}
else {
if (unboxing(opcode, owner, name)) {
if (... |
Inversion-Mutation | megadiff | "private Bpmn2Resource unmarshall(JsonParser parser, String preProcessingData) throws JsonParseException, IOException {
try {
parser.nextToken(); // open the object
ResourceSet rSet = new ResourceSetImpl();
rSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "unmarshall" | "private Bpmn2Resource unmarshall(JsonParser parser, String preProcessingData) throws JsonParseException, IOException {
try {
parser.nextToken(); // open the object
ResourceSet rSet = new ResourceSetImpl();
rSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(... |
Inversion-Mutation | megadiff | "@Inject
public Coordinator(RemoteSlotFactory remoteSlotFactory, CoordinatorConfig config)
{
Preconditions.checkNotNull(remoteSlotFactory, "remoteSlotFactory is null");
this.remoteSlotFactory = remoteSlotFactory;
agents = new MapMaker()
.expireAfterWrite((long) co... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Coordinator" | "@Inject
public Coordinator(RemoteSlotFactory remoteSlotFactory, CoordinatorConfig config)
{
Preconditions.checkNotNull(remoteSlotFactory, "remoteSlotFactory is null");
this.remoteSlotFactory = remoteSlotFactory;
agents = new MapMaker()
.expireAfterWrite((long) co... |
Inversion-Mutation | megadiff | "@Override
public void onEviction(UUID id, AgentStatus agentStatus)
{
slotsLock.writeLock().lock();
try {
for (SlotStatus slotStatus : agentStatus.getSlots()) {
slot... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEviction" | "@Override
public void onEviction(UUID id, AgentStatus agentStatus)
{
try {
<MASK>slotsLock.writeLock().lock();</MASK>
for (SlotStatus slotStatus : agentStatus.getSlots()) {
... |
Inversion-Mutation | megadiff | "private void runServer(int port, GameWorld game) {
int uid = 0;
// Listen for connections
System.out.println("GAME SERVER LISTENING ON PORT " + port);
try {
game.addDeltaWatcher(new DeltaWatcher(){
@Override
public void delta(final WorldDelta d) {
toAllPlayers(new ClientMessenger() {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "runServer" | "private void runServer(int port, GameWorld game) {
int uid = 0;
// Listen for connections
System.out.println("GAME SERVER LISTENING ON PORT " + port);
try {
game.addDeltaWatcher(new DeltaWatcher(){
@Override
public void delta(final WorldDelta d) {
toAllPlayers(new ClientMessenger() {
... |
Inversion-Mutation | megadiff | "public Gui_StreamRipStar(Boolean openPreferences)
{
super("StreamRipStar");
setIconImage( windowIcon.getImage() );
controlStreams = new Control_Stream(this);
table = new Gui_TablePanel(controlStreams,this);
addWindowListener(this);
setDefaultCloseOperation( JFrame.DO_NOTHING_ON_CLOSE );
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Gui_StreamRipStar" | "public Gui_StreamRipStar(Boolean openPreferences)
{
super("StreamRipStar");
setIconImage( windowIcon.getImage() );
controlStreams = new Control_Stream(this);
table = new Gui_TablePanel(controlStreams,this);
addWindowListener(this);
setDefaultCloseOperation( JFrame.DO_NOTHING_ON_CLOSE );
... |
Inversion-Mutation | megadiff | "@Override
public <E> void setProxyOwners(EntityMetadata entityMetadata, E e)
{
if (e != null && e.getClass().getAnnotation(Entity.class) != null && entityMetadata != null)
{
for (Relation r : entityMetadata.getRelations())
{
Object entityId = Prop... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setProxyOwners" | "@Override
public <E> void setProxyOwners(EntityMetadata entityMetadata, E e)
{
if (e != null && e.getClass().getAnnotation(Entity.class) != null && entityMetadata != null)
{
<MASK>Object entityId = PropertyAccessorHelper.getId(e, entityMetadata);</MASK>
for (Relati... |
Inversion-Mutation | megadiff | "@EventHandler(priority = EventPriority.LOW)
public void onPlayerInteract(PlayerInteractEvent event) {
Player player = event.getPlayer();
db.i("onPlayerInteract");
if (event.getAction().equals(Action.PHYSICAL)) {
db.i("returning: physical");
return;
}
Arena arena = null;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPlayerInteract" | "@EventHandler(priority = EventPriority.LOW)
public void onPlayerInteract(PlayerInteractEvent event) {
Player player = event.getPlayer();
db.i("onPlayerInteract");
if (event.getAction().equals(Action.PHYSICAL)) {
db.i("returning: physical");
return;
}
Arena arena = null;
... |
Inversion-Mutation | megadiff | "public synchronized MainFrame getMainWindow() {
if (me == null) {
statusBar = new SwingStatusBar();
me = new MainFrame(statusBar);
ErrorListDialog.getErrorListDialog();
}
return me;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getMainWindow" | "public synchronized MainFrame getMainWindow() {
if (me == null) {
statusBar = new SwingStatusBar();
<MASK>ErrorListDialog.getErrorListDialog();</MASK>
me = new MainFrame(statusBar);
}
return me;
}" |
Inversion-Mutation | megadiff | "void run(final EditorArea editor, final Action action) {
refreshControls(editor, false);
final byte[] in = editor.getText();
final boolean eq = eq(in, editor.last);
if(eq && action == Action.CHECK) return;
if(action == Action.EXECUTE && gui.gopts.get(GUIOptions.SAVERUN)) {
for(final... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "void run(final EditorArea editor, final Action action) {
refreshControls(editor, false);
final byte[] in = editor.getText();
final boolean eq = eq(in, editor.last);
if(eq && action == Action.CHECK) return;
if(action == Action.EXECUTE && gui.gopts.get(GUIOptions.SAVERUN)) {
for(final... |
Inversion-Mutation | megadiff | "@Override
public void onStart() {
super.onStart();
final ZLAndroidApplication application = ZLAndroidApplication.Instance();
final int fullScreenFlag =
application.ShowStatusBarOption.getValue() ? 0 : WindowManager.LayoutParams.FLAG_FULLSCREEN;
if (fullScreenFlag != myFullScreenFlag) {
finish... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onStart" | "@Override
public void onStart() {
super.onStart();
final ZLAndroidApplication application = ZLAndroidApplication.Instance();
final int fullScreenFlag =
application.ShowStatusBarOption.getValue() ? 0 : WindowManager.LayoutParams.FLAG_FULLSCREEN;
if (fullScreenFlag != myFullScreenFlag) {
<MASK>s... |
Inversion-Mutation | megadiff | "public void visitForExpression(JFXForExpression tree) {
JavafxEnv<JavafxAttrContext> forExprEnv =
env.dup(tree, env.info.dup(env.info.scope.dup()));
forExprEnv.outer = env;
if (forClauses == null)
forClauses = new ArrayList<JFXForExpressionInClause>();
in... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "visitForExpression" | "public void visitForExpression(JFXForExpression tree) {
JavafxEnv<JavafxAttrContext> forExprEnv =
env.dup(tree, env.info.dup(env.info.scope.dup()));
forExprEnv.outer = env;
if (forClauses == null)
forClauses = new ArrayList<JFXForExpressionInClause>();
in... |
Inversion-Mutation | megadiff | "public TimeTravelAction() {
super();
setEnabled(false);
if (getController().getProject() == null) {
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "TimeTravelAction" | "public TimeTravelAction() {
super();
if (getController().getProject() == null) {
<MASK>setEnabled(false);</MASK>
}
}" |
Inversion-Mutation | megadiff | "public CytoscapeWindow (cytoscape parentApp,
CytoscapeConfig config,
Logger logger,
Graph2D graph,
ExpressionData expressionData,
BioDataServer bioDataServer,
GraphObjA... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "CytoscapeWindow" | "public CytoscapeWindow (cytoscape parentApp,
CytoscapeConfig config,
Logger logger,
Graph2D graph,
ExpressionData expressionData,
BioDataServer bioDataServer,
GraphObjA... |
Inversion-Mutation | megadiff | "@Override
public List<BeanMetaData> getBeans()
{
ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
//Create AspectBinding
AbstractBeanMetaData stack = new AbstractBeanMetaData();
stack.setName(name);
BeanMetaDataUtil.setSimpleProperty(stack, "name", name);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getBeans" | "@Override
public List<BeanMetaData> getBeans()
{
ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
//Create AspectBinding
AbstractBeanMetaData stack = new AbstractBeanMetaData();
stack.setName(name);
BeanMetaDataUtil.setSimpleProperty(stack, "name", name);
... |
Inversion-Mutation | megadiff | "public void resume() throws DebugException {
if (!isSuspended()) {
return;
}
try {
setSuspended(false);
getVM().resume();
Iterator threads = getThreadList().iterator();
while (threads.hasNext()) {
((JDIThread)threads.next()).resumedByVM();
}
fireResumeEvent(DebugEvent.CLIENT_... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "resume" | "public void resume() throws DebugException {
if (!isSuspended()) {
return;
}
try {
setSuspended(false);
<MASK>fireResumeEvent(DebugEvent.CLIENT_REQUEST);</MASK>
getVM().resume();
Iterator threads = getThreadList().iterator();
while (threads.hasNext()) {
((JDIThread)threads.next())... |
Inversion-Mutation | megadiff | "private void switchGameMode(String mode) {
changeConfig("mp_gamemode", mode);
if("editor".equalsIgnoreCase(mode)) {
gameplayController.endRound(-1, true);
for(Player p : getPlayerController().getAllPlayers()) {
getPlayerController().setDefaultEquipment(p);
p.getControl().setGravity(0);
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "switchGameMode" | "private void switchGameMode(String mode) {
if("editor".equalsIgnoreCase(mode)) {
gameplayController.endRound(-1, true);
for(Player p : getPlayerController().getAllPlayers()) {
getPlayerController().setDefaultEquipment(p);
p.getControl().setGravity(0);
}
CWRITER.writeLine("switched gamemod... |
Inversion-Mutation | megadiff | "@SuppressWarnings("unchecked")
public List<T> findAll() {
String filter = "objectClass=" + getBeanClass().getSimpleName();
final QueryConfig<T> queryConfig = this.getQueryConfig();
if (queryConfig != null)
if (queryConfig.getFilter() != null && !queryConfig.getFilter().isEmpty())
filter = getFilt... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "findAll" | "@SuppressWarnings("unchecked")
public List<T> findAll() {
String filter = "objectClass=" + getBeanClass().getSimpleName();
final QueryConfig<T> queryConfig = this.getQueryConfig();
if (queryConfig != null)
if (queryConfig.getFilter() != null && !queryConfig.getFilter().isEmpty())
filter = getFilt... |
Inversion-Mutation | megadiff | "public void setAttributes(Selector selector, CSSAttributeSet attributes) {
Style style = getDynamicStyle(selector);
if (style == null) {
addDynamicStyle(new CSSStyle(selector, attributes));
} else {
Map<CSSProperty, String> oldStyleProperties = style.properties();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setAttributes" | "public void setAttributes(Selector selector, CSSAttributeSet attributes) {
Style style = getDynamicStyle(selector);
<MASK>Map<CSSProperty, String> oldStyleProperties = style.properties();</MASK>
if (style == null) {
addDynamicStyle(new CSSStyle(selector, attributes));
}... |
Inversion-Mutation | megadiff | "private void logMessages(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, boolean stopOnCopy, boolean discoverPath, boolean includeMergeInfo, String[] revisionProperties, long limit, ISVNLogEntryHandler logEntryHandler) throws ClientException {
SVNLogClient client = getSVNLogCl... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "logMessages" | "private void logMessages(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, boolean stopOnCopy, boolean discoverPath, boolean includeMergeInfo, String[] revisionProperties, long limit, ISVNLogEntryHandler logEntryHandler) throws ClientException {
SVNLogClient client = getSVNLogCl... |
Inversion-Mutation | megadiff | "private void computeName() throws CoreException {
if (isResolved()) {
fName= getIncludes().getLocation().getURI().getPath();
}
else {
fName= getNameForUnresolved().getString();
}
fName= fName.substring(fName.lastIndexOf('/')+1);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "computeName" | "private void computeName() throws CoreException {
if (isResolved()) {
fName= getIncludes().getLocation().getURI().getPath();
<MASK>fName= fName.substring(fName.lastIndexOf('/')+1);</MASK>
}
else {
fName= getNameForUnresolved().getString();
}
}" |
Inversion-Mutation | megadiff | "String getType(String name) {
String type = null;
if(name.endsWith(".class")) name = name.substring(0, name.length() - 6);
boolean array = name.endsWith("[]");
if(array) name = name.substring(0, name.length()-2);
if(name.indexOf('.') != -1) {
return array ? (name + "[]") : name;
}
if(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getType" | "String getType(String name) {
String type = null;
boolean array = name.endsWith("[]");
if(array) name = name.substring(0, name.length()-2);
<MASK>if(name.endsWith(".class")) name = name.substring(0, name.length() - 6);</MASK>
if(name.indexOf('.') != -1) {
return array ? (name + "[]") : name;
... |
Inversion-Mutation | megadiff | "public void run() {
if (taskMonitor == null) {
throw new IllegalStateException("Task Monitor is not set.");
}
taskMonitor.setStatus("Installing " + pluginInfo.getName() + " v"
+ pluginInfo.getPluginVersion());
taskMonitor.setPercentCompleted(-1);
PluginManager Mgr = PluginManager.getPl... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
if (taskMonitor == null) {
throw new IllegalStateException("Task Monitor is not set.");
}
taskMonitor.setStatus("Installing " + pluginInfo.getName() + " v"
+ pluginInfo.getPluginVersion());
taskMonitor.setPercentCompleted(-1);
PluginManager Mgr = PluginManager.getPl... |
Inversion-Mutation | megadiff | "private void updateDrbdResources() {
final DrbdXML dxml = new DrbdXML(cluster.getHostsArray(),
drbdParameters);
boolean configUpdated = false;
for (final Host host : cluster.getHostsArray()) {
final String configString = dxml.getConfig(h... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateDrbdResources" | "private void updateDrbdResources() {
final DrbdXML dxml = new DrbdXML(cluster.getHostsArray(),
drbdParameters);
boolean configUpdated = false;
for (final Host host : cluster.getHostsArray()) {
final String configString = dxml.getConfig(h... |
Inversion-Mutation | megadiff | "public <T> Future<T> push(final String channel, final T t) {
String data = toJSON(t);
final Future<?> f = broadcaster.addBroadcasterListener(new BroadcasterListener() {
public void onPostCreate(Broadcaster broadcaster) {
}
public void onComplete(Broadcaster b)... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "push" | "public <T> Future<T> push(final String channel, final T t) {
String data = toJSON(t);
final Future<?> f = broadcaster.addBroadcasterListener(new BroadcasterListener() {
public void onPostCreate(Broadcaster broadcaster) {
}
public void onComplete(Broadcaster b)... |
Inversion-Mutation | megadiff | "public void onComplete(Broadcaster b) {
for (PushContextListener p: listeners) {
p.onComplete(channel, t);
}
b.removeBroadcasterListener(this);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onComplete" | "public void onComplete(Broadcaster b) {
for (PushContextListener p: listeners) {
p.onComplete(channel, t);
<MASK>b.removeBroadcasterListener(this);</MASK>
}
}" |
Inversion-Mutation | megadiff | "private void aniDBInfoReply(int queryId) {
//System.out.println("Got Fileinfo reply");
Query query = api.Queries().get(queryId);
int replyId = query.getReply().ReplyId();
int fileId = Integer.parseInt(query.getReply().Tag());
if (!files.contains("Id", fileId)) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "aniDBInfoReply" | "private void aniDBInfoReply(int queryId) {
//System.out.println("Got Fileinfo reply");
Query query = api.Queries().get(queryId);
int replyId = query.getReply().ReplyId();
int fileId = Integer.parseInt(query.getReply().Tag());
if (!files.contains("Id", fileId)) {
... |
Inversion-Mutation | megadiff | "private static void render() {
// Reset any changes made to the model-view matrix.
glLoadIdentity();
// Apply the camera position and orientation to the model-view matrix.
camera.applyTranslations();
// Clear the screen.
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFE... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "render" | "private static void render() {
// Reset any changes made to the model-view matrix.
glLoadIdentity();
// Apply the camera position and orientation to the model-view matrix.
camera.applyTranslations();
// Clear the screen.
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFE... |
Inversion-Mutation | megadiff | "private void writeTo(@Nonnull String path) throws IOException {
RandomAccessFile raf = new RandomAccessFile(path, "rw");
try {
int dataSectionOffset = getDataSectionOffset();
DexWriter headerWriter = outputAt(raf, 0);
DexWriter indexWriter = outputAt(raf, Hea... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "writeTo" | "private void writeTo(@Nonnull String path) throws IOException {
RandomAccessFile raf = new RandomAccessFile(path, "rw");
try {
int dataSectionOffset = getDataSectionOffset();
DexWriter headerWriter = outputAt(raf, 0);
DexWriter indexWriter = outputAt(raf, Hea... |
Inversion-Mutation | megadiff | "public ImageAnimationTest(int num, int size) throws VisADException, RemoteException {
// (Time -> ((x, y) -> val))
RealTupleType pxl = new RealTupleType(RealType.getRealType("x"), RealType.getRealType("y"));
FunctionType pxlVal = new FunctionType(pxl, RealType.getRealType("val"));
FunctionTyp... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ImageAnimationTest" | "public ImageAnimationTest(int num, int size) throws VisADException, RemoteException {
// (Time -> ((x, y) -> val))
RealTupleType pxl = new RealTupleType(RealType.getRealType("x"), RealType.getRealType("y"));
FunctionType pxlVal = new FunctionType(pxl, RealType.getRealType("val"));
FunctionTyp... |
Inversion-Mutation | megadiff | "@Override
public void doPost(HttpServletRequest request, HttpServletResponse response, Identity subject, Identity object) throws IOException {
// Check whether the user is public
if (subject.getUri().equals(getPublicUser())) {
response.getWriter().println("The public user is not allowed to create new mo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doPost" | "@Override
public void doPost(HttpServletRequest request, HttpServletResponse response, Identity subject, Identity object) throws IOException {
// Check whether the user is public
if (subject.getUri().equals(getPublicUser())) {
response.getWriter().println("The public user is not allowed to create new mo... |
Inversion-Mutation | megadiff | "protected final void endLoop() {
System.out.print(String.format(" \rdone: %s/%s in %s - %d/%d files done - %sBps - %d transfer(s) running.",
Size.getReadableSize(doneTransfer()),
prettyWholeSize(),
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "endLoop" | "protected final void endLoop() {
System.out.print(String.format(" \rdone: %s/%s in %s - %d/%d files done - %sBps - %d transfer(s) running.",
Size.getReadableSize(doneTransfer()),
<MASK>FriendlyTime.elaspeTime(tick() / 10 + 1),<... |
Inversion-Mutation | megadiff | "public void connect(BotConnectionSettings e)
throws NickAlreadyInUseException, IOException, IrcException {
if (this.isConnected()) {
return;
}
this.bot.connect(e.getHostName(), e.getPort());
this.bot.sendMessage("nickserv", "ghost " + e.getNickName() +... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "connect" | "public void connect(BotConnectionSettings e)
throws NickAlreadyInUseException, IOException, IrcException {
if (this.isConnected()) {
return;
}
this.bot.connect(e.getHostName(), e.getPort());
<MASK>this.bot.changeNick(e.getNickName());</MASK>
th... |
Inversion-Mutation | megadiff | "@Override
protected void onBindDialogView(View view) {
super.onBindDialogView(view);
mSeekBar = getSeekBar(view);
mSeekBar.setMax(MAXIMUM_BACKLIGHT - MINIMUM_BACKLIGHT);
try {
mOldBrightness = Settings.System.getInt(getContext().getContentResolver(),
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onBindDialogView" | "@Override
protected void onBindDialogView(View view) {
super.onBindDialogView(view);
mSeekBar = getSeekBar(view);
<MASK>mSeekBar.setOnSeekBarChangeListener(this);</MASK>
mSeekBar.setMax(MAXIMUM_BACKLIGHT - MINIMUM_BACKLIGHT);
try {
mOldBrightness = Setti... |
Inversion-Mutation | megadiff | "@Nonnull
public static ImmutableStartLocal of(@Nonnull StartLocal startLocal) {
if (startLocal instanceof ImmutableStartLocal) {
return (ImmutableStartLocal)startLocal;
}
return new ImmutableStartLocal(
startLocal.getCodeAddress(),
startLo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "of" | "@Nonnull
public static ImmutableStartLocal of(@Nonnull StartLocal startLocal) {
if (startLocal instanceof ImmutableStartLocal) {
return (ImmutableStartLocal)startLocal;
}
return new ImmutableStartLocal(
startLocal.getCodeAddress(),
startLo... |
Inversion-Mutation | megadiff | "public ArrayList<SearchResult> find(String query) throws ControllerException {
ArrayList<SearchResult> results = new ArrayList<SearchResult>();
if (query == null) {
return results;
}
String cleanedQuery = query.replace(":", " ");
cleanedQuery = cleanedQuery.rep... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "find" | "public ArrayList<SearchResult> find(String query) throws ControllerException {
ArrayList<SearchResult> results = new ArrayList<SearchResult>();
if (query == null) {
return results;
}
String cleanedQuery = query.replace(":", " ");
cleanedQuery = cleanedQuery.re... |
Inversion-Mutation | megadiff | "public String getChartUrl(List<SelectableTelemetryStream> streams) {
GoogleChart googleChart = new GoogleChart(ChartType.LINE, this.getWidth(), this.getHeight());
Map<String, TelemetryStreamYAxis> streamAxisMap = new HashMap<String, TelemetryStreamYAxis>();
//combine streams Y axes.
for (Sele... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getChartUrl" | "public String getChartUrl(List<SelectableTelemetryStream> streams) {
GoogleChart googleChart = new GoogleChart(ChartType.LINE, this.getWidth(), this.getHeight());
Map<String, TelemetryStreamYAxis> streamAxisMap = new HashMap<String, TelemetryStreamYAxis>();
//combine streams Y axes.
for (Sele... |
Inversion-Mutation | megadiff | "@Override
public void update(GameContainer gc, StateBasedGame sbg, int delta)
throws SlickException {
//update map
currentCell = MapLoader.getCurrentCell();
//check input
Input input = gc.getInput();
if (input.isKeyPressed(Input.KEY_ESCAPE)){
if(gui.anyWindowOpen()){
gui.closeWindow();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "update" | "@Override
public void update(GameContainer gc, StateBasedGame sbg, int delta)
throws SlickException {
//update map
currentCell = MapLoader.getCurrentCell();
//check input
Input input = gc.getInput();
if (input.isKeyPressed(Input.KEY_ESCAPE)){
if(gui.anyWindowOpen()){
gui.closeWindow();
... |
Inversion-Mutation | megadiff | "public ThermoData generateThermoData()
throws FailGenerateThermoDataException {
TDGenerator gen = null;
ChemGraph thermo_graph = null;
try {
thermo_graph = ChemGraph.copy(this);
} catch (Exception e) {
Logger.logStackTrace(e);
Logg... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "generateThermoData" | "public ThermoData generateThermoData()
throws FailGenerateThermoDataException {
TDGenerator gen = null;
ChemGraph thermo_graph = null;
try {
thermo_graph = ChemGraph.copy(this);
} catch (Exception e) {
Logger.logStackTrace(e);
Logg... |
Inversion-Mutation | megadiff | "public XMLObject unmarshall(Element domElement) throws UnmarshallingException {
if (log.isDebugEnabled()) {
log.debug("Starting to unmarshall DOM element " + XMLHelper.getNodeQName(domElement));
}
checkElementIsTarget(domElement);
XMLObject xmlObject = buildXMLObjec... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "unmarshall" | "public XMLObject unmarshall(Element domElement) throws UnmarshallingException {
if (log.isDebugEnabled()) {
log.debug("Starting to unmarshall DOM element " + XMLHelper.getNodeQName(domElement));
}
checkElementIsTarget(domElement);
XMLObject xmlObject = buildXMLObjec... |
Inversion-Mutation | megadiff | "public boolean isBaseLevelForKey(Slice userKey)
{
// Maybe use binary search to find right entry instead of linear search?
UserComparator userComparator = inputVersion.getInternalKeyComparator().getUserComparator();
for (int level = this.level + 2; level < NUM_LEVELS; level++) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "isBaseLevelForKey" | "public boolean isBaseLevelForKey(Slice userKey)
{
// Maybe use binary search to find right entry instead of linear search?
UserComparator userComparator = inputVersion.getInternalKeyComparator().getUserComparator();
for (int level = this.level + 2; level < NUM_LEVELS; level++) {
... |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
/*
* Setup view and adapter.
*/
setContentView(R.layout.realtime);
realtimeList = ... | 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);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
/*
* Setup view and adapter.
*/
setContentView(R.layout.realtime);
realtimeList = ... |
Inversion-Mutation | megadiff | "@Override
protected int modify(IDocument document, AcceleoSourceContent content, int offset, int length)
throws BadLocationException {
String text = document.get();
int b = offset;
int e = offset + length;
while (b < e && Character.isWhitespace(text.charAt(b))) {
b++;
}
while (e > b && Char... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "modify" | "@Override
protected int modify(IDocument document, AcceleoSourceContent content, int offset, int length)
throws BadLocationException {
String text = document.get();
int b = offset;
int e = offset + length;
while (b < e && Character.isWhitespace(text.charAt(b))) {
b++;
}
while (e > b && Char... |
Inversion-Mutation | megadiff | "public static void main(String[] args)
{
settings = new Settings();
try
{
// Configure log system (overwrite if already exists)
FileOutputStream logFile = new FileOutputStream("log.txt");
logStream = new PrintStream(logFile);
LogSystem.out = logStream;
LogSystem.consoleEcho = true;... | 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)
{
settings = new Settings();
try
{
// Configure log system (overwrite if already exists)
FileOutputStream logFile = new FileOutputStream("log.txt");
logStream = new PrintStream(logFile);
LogSystem.out = logStream;
LogSystem.consoleEcho = true;... |
Inversion-Mutation | megadiff | "public void refresh() {
try {
update();
gui_.suspendLiveMode();
for (int i=0; i<propList_.size(); i++){
PropertyItem item = propList_.get(i);
if (showDevice(flags_, item.device)) {
item.setValueFromCoreString(core_.getProperty(item.device, item.name))... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "refresh" | "public void refresh() {
try {
<MASK>gui_.suspendLiveMode();</MASK>
update();
for (int i=0; i<propList_.size(); i++){
PropertyItem item = propList_.get(i);
if (showDevice(flags_, item.device)) {
item.setValueFromCoreString(core_.getProperty(item.device... |
Inversion-Mutation | megadiff | "@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
mDrawerLayout.closeDrawer(mDrawerList);
switch (((DrawerItem) parent.getItemAtPosition(position)).action) {
default:
case ACTION_LIBRARY:
// If we are already on the library, pop the whole stack. ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onItemClick" | "@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
mDrawerLayout.closeDrawer(mDrawerList);
switch (((DrawerItem) parent.getItemAtPosition(position)).action) {
default:
case ACTION_LIBRARY:
<MASK>switchMode(DisplayMode.MODE_LIBRARY);</MASK>
//... |
Inversion-Mutation | megadiff | "private void stopCurrentDecorating() {
if (currentDecorateTimer != null) {
currentDecorateTimer.stop();
currentDecorateTimer = null;
}
removeDecoration();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "stopCurrentDecorating" | "private void stopCurrentDecorating() {
if (currentDecorateTimer != null) {
currentDecorateTimer.stop();
currentDecorateTimer = null;
<MASK>removeDecoration();</MASK>
}
}" |
Inversion-Mutation | megadiff | "public void actionPerformed(final ActionEvent e) {
final String styleName = JOptionPane.showInputDialog(TextUtils.getText("enter_new_style_name"));
if (styleName == null) {
return;
}
final Controller controller = Controller.getCurrentController();
final NodeModel selectedNode = controller.getSelecti... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "actionPerformed" | "public void actionPerformed(final ActionEvent e) {
final String styleName = JOptionPane.showInputDialog(TextUtils.getText("enter_new_style_name"));
if (styleName == null) {
return;
}
final Controller controller = Controller.getCurrentController();
final NodeModel selectedNode = controller.getSelecti... |
Inversion-Mutation | megadiff | "protected void handleEvent(NuxeoWebappLoader loader, LifecycleEvent event) {
try {
ClassLoader cl = loader.getClassLoader();
boolean devMode = cl instanceof NuxeoDevWebappClassLoader;
String type = event.getType();
if (type == Lifecycle.START_EVENT) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleEvent" | "protected void handleEvent(NuxeoWebappLoader loader, LifecycleEvent event) {
try {
ClassLoader cl = loader.getClassLoader();
boolean devMode = cl instanceof NuxeoDevWebappClassLoader;
String type = event.getType();
if (type == Lifecycle.START_EVENT) {
... |
Inversion-Mutation | megadiff | "protected String _downloadData() {
try {
URI uri = _getUri();
if (Log.isEnabled) {
Log.debug("downloading page " + uri);
}
AndroidHttpClient client = AndroidHttpClient.newInstance("Android Munin Client");
HttpGet request = _getR... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "_downloadData" | "protected String _downloadData() {
try {
URI uri = _getUri();
if (Log.isEnabled) {
Log.debug("downloading page " + uri);
}
AndroidHttpClient client = AndroidHttpClient.newInstance("Android Munin Client");
HttpGet request = _getR... |
Inversion-Mutation | megadiff | "@Before
public void setup() {
File files = new File("a", "b", "src/c.h", "src/c.cc", "src/d.cc");
editorList = new EditorList();
stackList = new StackList();
fileSystem = new InMemoryFileSystem();
fuzzyFinder = new Finder(files);
fuzzyListener = mock(Finder.Listener.class);
repo =... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setup" | "@Before
public void setup() {
File files = new File("a", "b", "src/c.h", "src/c.cc", "src/d.cc");
editorList = new EditorList();
stackList = new StackList();
fileSystem = new InMemoryFileSystem();
fuzzyFinder = new Finder(files);
fuzzyListener = mock(Finder.Listener.class);
repo =... |
Inversion-Mutation | megadiff | "public void addLine(BufferLine m) {
addLineNoNotify(m);
if (m.getVisible())
numUnread++;
notifyObservers();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addLine" | "public void addLine(BufferLine m) {
addLineNoNotify(m);
<MASK>notifyObservers();</MASK>
if (m.getVisible())
numUnread++;
}" |
Inversion-Mutation | megadiff | "private void setNewFeed(Feed result) {
if (result != null) {
if ( isLeafEntry(result) ) {
showItemPopup(result);
} else {
adapter.setFeed(result);
getSherlockActivity().supportInvalidateOptionsMenu();
getSherlockActivity().getSupportActionBar().setTitle(result.getTitle());
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setNewFeed" | "private void setNewFeed(Feed result) {
if (result != null) {
if ( isLeafEntry(result) ) {
showItemPopup(result);
} else {
getSherlockActivity().supportInvalidateOptionsMenu();
getSherlockActivity().getSupportActionBar().setTitle(result.getTitle());
<MASK>adapter.setFeed(resul... |
Inversion-Mutation | megadiff | "protected int outputStreamData(OutputStream stream) throws IOException {
int length = 0;
byte[] p = "stream\n".getBytes();
stream.write(p);
length += p.length;
_data.outputStreamData(stream);
length += _data.getSize();
_data.close();
p = "\nendst... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "outputStreamData" | "protected int outputStreamData(OutputStream stream) throws IOException {
int length = 0;
byte[] p = "stream\n".getBytes();
stream.write(p);
length += p.length;
_data.outputStreamData(stream);
<MASK>_data.close();</MASK>
length += _data.getSize();
... |
Inversion-Mutation | megadiff | "protected Map<Object, Object> findEntityRelationships(JavaClass entity, Map<Object, Object> context)
{
List<String> entityNames = new ArrayList<String>();
List<String> entityClasses = new ArrayList<String>();
List<String> ccEntityClasses = new ArrayList<String>();
for ( Field... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "findEntityRelationships" | "protected Map<Object, Object> findEntityRelationships(JavaClass entity, Map<Object, Object> context)
{
List<String> entityNames = new ArrayList<String>();
List<String> entityClasses = new ArrayList<String>();
List<String> ccEntityClasses = new ArrayList<String>();
for ( Field... |
Inversion-Mutation | megadiff | "public SPFInternalResult checkSPF(SPF1Data spfData) throws PermErrorException,
NoneException, TempErrorException, NeutralException {
String result = SPF1Constants.NEUTRAL;
String explanation = null;
// Get the raw dns txt entry which contains a spf entry
String spfDns... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "checkSPF" | "public SPFInternalResult checkSPF(SPF1Data spfData) throws PermErrorException,
NoneException, TempErrorException, NeutralException {
String result = SPF1Constants.NEUTRAL;
String explanation = null;
// Get the raw dns txt entry which contains a spf entry
String spfDns... |
Inversion-Mutation | megadiff | "@Override
public void kill() {
if (Platform.isRunning() && MylarMonitorUiPlugin.getDefault() != null) {
timerThread.kill();
MylarMonitorUiPlugin.getDefault().removeInteractionListener(this);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "kill" | "@Override
public void kill() {
<MASK>timerThread.kill();</MASK>
if (Platform.isRunning() && MylarMonitorUiPlugin.getDefault() != null) {
MylarMonitorUiPlugin.getDefault().removeInteractionListener(this);
}
}" |
Inversion-Mutation | megadiff | "public <T> void processAnnotatedType(@Observes final ProcessAnnotatedType<T> event, BeanManager manager)
{
AnnotatedTypeBuilder<T> modifiedType = null;
for (AnnotatedField<? super T> field : event.getAnnotatedType().getFields())
{
boolean bootstrapped = false;
if (field.is... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processAnnotatedType" | "public <T> void processAnnotatedType(@Observes final ProcessAnnotatedType<T> event, BeanManager manager)
{
AnnotatedTypeBuilder<T> modifiedType = null;
<MASK>boolean bootstrapped = false;</MASK>
for (AnnotatedField<? super T> field : event.getAnnotatedType().getFields())
{
if... |
Inversion-Mutation | megadiff | "@Override
public void startAcquiringSynchronously() throws Exception {
int countBefore = getArrayCounter_RBV();
startAcquiring();
while (getStatus() != Detector.IDLE && getStatus() != Detector.FAULT) {
Sleep.sleep(100);
if( getAcquireState()==0)
throw new Exception("Camera is not acquiring but ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startAcquiringSynchronously" | "@Override
public void startAcquiringSynchronously() throws Exception {
int countBefore = getArrayCounter_RBV();
startAcquiring();
while (getStatus() != Detector.IDLE && getStatus() != Detector.FAULT) {
if( getAcquireState()==0)
throw new Exception("Camera is not acquiring but putListener has not b... |
Inversion-Mutation | megadiff | "public void __sceSasCore(Processor processor) {
CpuState cpu = processor.cpu; // New-Style Processor
// Processor cpu = processor; // Old-Style Processor
int sasCore = cpu.gpr[4];
//int unk1 = cpu.gpr[5]; // looks like a heap address, bss, 0x40 aligned
// 99% sure there a... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "__sceSasCore" | "public void __sceSasCore(Processor processor) {
CpuState cpu = processor.cpu; // New-Style Processor
// Processor cpu = processor; // Old-Style Processor
int sasCore = cpu.gpr[4];
//int unk1 = cpu.gpr[5]; // looks like a heap address, bss, 0x40 aligned
// 99% sure there a... |
Inversion-Mutation | megadiff | "private ColumnFamily getTopLevelColumns(QueryFilter filter, int gcBefore)
{
// we are querying top-level columns, do a merging fetch with indexes.
List<IColumnIterator> iterators = new ArrayList<IColumnIterator>();
final ColumnFamily returnCF = ColumnFamily.create(metadata);
tr... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getTopLevelColumns" | "private ColumnFamily getTopLevelColumns(QueryFilter filter, int gcBefore)
{
// we are querying top-level columns, do a merging fetch with indexes.
List<IColumnIterator> iterators = new ArrayList<IColumnIterator>();
final ColumnFamily returnCF = ColumnFamily.create(metadata);
tr... |
Inversion-Mutation | megadiff | "@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
if (loadedImage != null) {
ImageView imageView = (ImageView) view;
boolean firstDisplay = !displayedImages.contains(imageUri);
if (firstDisplay) {
FadeInBitmapDisplayer.animate(imageView, 500);
d... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onLoadingComplete" | "@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
if (loadedImage != null) {
ImageView imageView = (ImageView) view;
boolean firstDisplay = !displayedImages.contains(imageUri);
if (firstDisplay) {
FadeInBitmapDisplayer.animate(imageView, 500);
}... |
Inversion-Mutation | megadiff | "@Override
final public void configure(OrccProcess process, IProgressMonitor monitor,
boolean debugMode) {
this.state = SimulatorState.IDLE;
this.process = process;
this.monitor = monitor;
this.debugMode = debugMode;
try {
// Parse XDF file, do some transformations and return the
// graph c... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "configure" | "@Override
final public void configure(OrccProcess process, IProgressMonitor monitor,
boolean debugMode) {
this.state = SimulatorState.IDLE;
this.process = process;
this.monitor = monitor;
this.debugMode = debugMode;
try {
// Parse XDF file, do some transformations and return the
// graph c... |
Inversion-Mutation | megadiff | "@Override
public boolean onCommand(CommandSender sender, Command command, String cmdlabel, String[] vars) {
Player p;
if (sender instanceof Player) {
p = (Player) sender;
if (cmdlabel.equalsIgnoreCase("bank") || cmdlabel.equalsIgnoreCase("bc")) {
if (vars.length == 0) {
sendHelp(p);
re... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCommand" | "@Override
public boolean onCommand(CommandSender sender, Command command, String cmdlabel, String[] vars) {
Player p;
if (sender instanceof Player) {
p = (Player) sender;
if (cmdlabel.equalsIgnoreCase("bank") || cmdlabel.equalsIgnoreCase("bc")) {
if (vars.length == 0) {
sendHelp(p);
re... |
Inversion-Mutation | megadiff | "@Override
public void doPost(HttpServletRequest request, HttpServletResponse response, Identity subject, Identity object) throws IOException {
// Check whether the user is public
if (subject.getUri().equals(getPublicUser())) {
response.getWriter().println("The public user is not allowed to create new mo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doPost" | "@Override
public void doPost(HttpServletRequest request, HttpServletResponse response, Identity subject, Identity object) throws IOException {
// Check whether the user is public
if (subject.getUri().equals(getPublicUser())) {
response.getWriter().println("The public user is not allowed to create new mo... |
Inversion-Mutation | megadiff | "public PactProgram(File jarFile, String className, String... args)
throws ProgramInvocationException {
this.jarFile = jarFile;
this.args = args;
this.assemblerClass = getPactAssemblerFromJar(jarFile, className);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "PactProgram" | "public PactProgram(File jarFile, String className, String... args)
throws ProgramInvocationException {
<MASK>this.assemblerClass = getPactAssemblerFromJar(jarFile, className);</MASK>
this.jarFile = jarFile;
this.args = args;
}" |
Inversion-Mutation | megadiff | "protected void addActorSprite (Actor actor)
{
addPreloads(actor);
int id = actor.getId();
int timestamp = _records.get(_records.size() - 1).getTimestamp();
if (actor instanceof Prespawnable &&
((Prespawnable)actor).getClientOid() == _ctx.getClient().getClientOi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addActorSprite" | "protected void addActorSprite (Actor actor)
{
addPreloads(actor);
int id = actor.getId();
int timestamp = _records.get(_records.size() - 1).getTimestamp();
if (actor instanceof Prespawnable &&
((Prespawnable)actor).getClientOid() == _ctx.getClient().getClientOi... |
Inversion-Mutation | megadiff | "public void dispose() {
try {
myEventBroadcaster.removeListener(myUserAddedCallbackListener);
myUserMonitorThread.shutdown();
}
catch (Throwable e) {
LOG.info(e);
}
final P2PServer p2PServer = myP2PServer;
if (p2PServer != null) {
try {
p2PServer.shut... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "dispose" | "public void dispose() {
<MASK>myEventBroadcaster.removeListener(myUserAddedCallbackListener);</MASK>
try {
myUserMonitorThread.shutdown();
}
catch (Throwable e) {
LOG.info(e);
}
final P2PServer p2PServer = myP2PServer;
if (p2PServer != null) {
try {
p2P... |
Inversion-Mutation | megadiff | "@EventHandler
public void tickCalcsAndLegacy(VehicleUpdateEvent event) {
// start vehicleupdate mechs
Vehicle vehicle = event.getVehicle();
Entity passenger = vehicle.getPassenger();
Boolean driven = true;
if (passenger == null || !(vehicle instanceof Minecart)) {
return;
}
if (!(passenger i... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "tickCalcsAndLegacy" | "@EventHandler
public void tickCalcsAndLegacy(VehicleUpdateEvent event) {
// start vehicleupdate mechs
Vehicle vehicle = event.getVehicle();
Entity passenger = vehicle.getPassenger();
Boolean driven = true;
if (passenger == null || !(vehicle instanceof Minecart)) {
<MASK>return;</MASK>
}
if (... |
Inversion-Mutation | megadiff | "@Override
public void handle(HttpExchange exchange) throws IOException {
try (final InputStream is = exchange.getRequestBody();
final InputStreamReader sr = new InputStreamReader(is);
final BufferedReader br = new BufferedReader(sr);) {
// read body content
final String postBody = br.readL... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handle" | "@Override
public void handle(HttpExchange exchange) throws IOException {
try (final InputStream is = exchange.getRequestBody();
final InputStreamReader sr = new InputStreamReader(is);
final BufferedReader br = new BufferedReader(sr);) {
// read body content
final String postBody = br.readL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.