type
stringclasses
1 value
dataset
stringclasses
1 value
input
stringlengths
75
160k
instruction
stringlengths
117
171
output
stringlengths
88
168k
Inversion-Mutation
megadiff
"@Before @Transactional public void clearDownDb() { LOGGER.info("STARTING CLEAR DOWN DB"); // this should have all the tables in - extend when necessary // importer tables jdbcTemplate.execute("delete from centre"); jdbcTemplate.execute("delete from patient"); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "clearDownDb"
"@Before @Transactional public void clearDownDb() { LOGGER.info("STARTING CLEAR DOWN DB"); // this should have all the tables in - extend when necessary // importer tables jdbcTemplate.execute("delete from centre"); jdbcTemplate.execute("delete from patient"); ...
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
"@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 void profileRETI(long cycles) { if (servicedInterrupt > -1) { interruptTime[servicedInterrupt] += cycles - lastInterruptTime[servicedInterrupt]; interruptCount[servicedInterrupt]++; } newIRQ = false; if (logger != null && !hideIRQ) { logger.println("----- Interrupt vecto...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "profileRETI"
"public void profileRETI(long cycles) { if (servicedInterrupt > -1) { interruptTime[servicedInterrupt] += cycles - lastInterruptTime[servicedInterrupt]; interruptCount[servicedInterrupt]++; } newIRQ = false; if (logger != null && !hideIRQ) { logger.println("----- Interrupt vecto...
Inversion-Mutation
megadiff
"private void storeIcon(Bitmap icon) { // Do this first in case the download failed. if (mTab != null) { // Remove the touch icon loader from the BrowserActivity. mTab.mTouchIconLoader = null; } if (icon == null || mCursor == null || isCancelled()) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "storeIcon"
"private void storeIcon(Bitmap icon) { // Do this first in case the download failed. if (mTab != null) { // Remove the touch icon loader from the BrowserActivity. mTab.mTouchIconLoader = null; } if (icon == null || mCursor == null || isCancelled()) { ...
Inversion-Mutation
megadiff
"private BranchGroup createSceneGraph(Canvas3D cv) { int n = 5; /* root */ BranchGroup root = new BranchGroup(); bounds = new BoundingSphere(); /* testTransform */ Transform3D tr = new Transform3D(); tr.setTranslation(new Vector3f(0.1f, 0.1f, 0.1f)); TransformGroup testTransform = new Tran...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createSceneGraph"
"private BranchGroup createSceneGraph(Canvas3D cv) { int n = 5; /* root */ BranchGroup root = new BranchGroup(); bounds = new BoundingSphere(); /* testTransform */ Transform3D tr = new Transform3D(); tr.setTranslation(new Vector3f(0.1f, 0.1f, 0.1f)); TransformGroup testTransform = new Tran...
Inversion-Mutation
megadiff
"public void process(Tag tag) { if (firstChildIsHeader) { if (!tag.getName().equalsIgnoreCase("p")) { final CustomTag customTag; // http://jira.opensymphony.com/browse/SIM-202 if (tag.getAttributeCount() == 0) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "process"
"public void process(Tag tag) { if (firstChildIsHeader) { if (!tag.getName().equalsIgnoreCase("p")) { final CustomTag customTag; // http://jira.opensymphony.com/browse/SIM-202 if (tag.getAttributeCount() == 0) { ...
Inversion-Mutation
megadiff
"public void moveUnits(int units){ getFirstTerritory().setNbrOfUnits(getFirstTerritory().getNbrOfUnits()+getSecondTerritory().getNbrOfUnits() - units); getSecondTerritory().setNbrOfUnits(units); model.changed(); this.resetTerritories(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "moveUnits"
"public void moveUnits(int units){ getFirstTerritory().setNbrOfUnits(getFirstTerritory().getNbrOfUnits()+getSecondTerritory().getNbrOfUnits() - units); getSecondTerritory().setNbrOfUnits(units); <MASK>this.resetTerritories();</MASK> model.changed(); }"
Inversion-Mutation
megadiff
"public void applyFormatAction(PyEdit pyEdit, PySelection ps, IRegion[] regionsToFormat, boolean throwSyntaxError) throws BadLocationException, SyntaxErrorException { final IFormatter participant = getFormatter(); final IDocument doc = ps.getDoc(); final SelectionKeeper selectionKeeper = new ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "applyFormatAction"
"public void applyFormatAction(PyEdit pyEdit, PySelection ps, IRegion[] regionsToFormat, boolean throwSyntaxError) throws BadLocationException, SyntaxErrorException { final IFormatter participant = getFormatter(); final IDocument doc = ps.getDoc(); final SelectionKeeper selectionKeeper = new ...
Inversion-Mutation
megadiff
"@Override public void synchronize(final IProject project, SyncConfig syncConfig, IResourceDelta delta, IProgressMonitor monitor, EnumSet<SyncFlag> syncFlags) throws CoreException { RecursiveSubMonitor subMon = RecursiveSubMonitor.convert(monitor, 1000); // On first sync, place .gitignore in directories. ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "synchronize"
"@Override public void synchronize(final IProject project, SyncConfig syncConfig, IResourceDelta delta, IProgressMonitor monitor, EnumSet<SyncFlag> syncFlags) throws CoreException { RecursiveSubMonitor subMon = RecursiveSubMonitor.convert(monitor, 1000); // On first sync, place .gitignore in directories. ...
Inversion-Mutation
megadiff
"@Override public boolean put(ObjectId commitId, ImmutableList<ObjectId> parentIds) { boolean updated = false; try { // See if it already exists Vertex commitNode = getOrAddNode(commitId); if (parentIds.isEmpty()) { if (!commitNode.getEdge...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "put"
"@Override public boolean put(ObjectId commitId, ImmutableList<ObjectId> parentIds) { boolean updated = false; try { // See if it already exists Vertex commitNode = getOrAddNode(commitId); if (parentIds.isEmpty()) { if (!commitNode.getEdge...
Inversion-Mutation
megadiff
"public void processToDoListTransaction(final SearchIndexBuilderWorker worker) { long startTime = System.currentTimeMillis(); HibernateCallback callback = new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { int totalDocs = 0;...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processToDoListTransaction"
"public void processToDoListTransaction(final SearchIndexBuilderWorker worker) { long startTime = System.currentTimeMillis(); HibernateCallback callback = new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { int totalDocs = 0;...
Inversion-Mutation
megadiff
"public Object doInHibernate(Session session) throws HibernateException, SQLException { int totalDocs = 0; try { IndexWriter indexWrite = null; // Load the list List runtimeToDo = findPending(indexBatchSize, session); totalDocs = runtimeToDo.size(); log...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doInHibernate"
"public Object doInHibernate(Session session) throws HibernateException, SQLException { int totalDocs = 0; try { IndexWriter indexWrite = null; // Load the list List runtimeToDo = findPending(indexBatchSize, session); totalDocs = runtimeToDo.size(); log...
Inversion-Mutation
megadiff
"public void start(FtpServerContext context) throws Exception { this.context = context; acceptor = new NioSocketAcceptor(Runtime.getRuntime().availableProcessors()); if(getServerAddress() != null) { address = new InetSocketAddress(getServerAddress(),...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start"
"public void start(FtpServerContext context) throws Exception { this.context = context; acceptor = new NioSocketAcceptor(Runtime.getRuntime().availableProcessors()); if(getServerAddress() != null) { address = new InetSocketAddress(getServerAddress(),...
Inversion-Mutation
megadiff
"public void doCreateTables(TransactionContext c) throws SQLException, IOException { Statement s = null; try { // Check to see if the table already exists. If it does, then don't // log warnings during startup. // Need to run the scripts anyways since they may co...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doCreateTables"
"public void doCreateTables(TransactionContext c) throws SQLException, IOException { Statement s = null; try { // Check to see if the table already exists. If it does, then don't // log warnings during startup. // Need to run the scripts anyways since they may co...
Inversion-Mutation
megadiff
"private final void write_TypeCode (final org.omg.CORBA.TypeCode value, final Hashtable tcMap) { if (value == null) { throw new org.omg.CORBA.BAD_PARAM("TypeCode is null"); } int _kind = value.kind().value(); int _mc; // member count try { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "write_TypeCode"
"private final void write_TypeCode (final org.omg.CORBA.TypeCode value, final Hashtable tcMap) { if (value == null) { throw new org.omg.CORBA.BAD_PARAM("TypeCode is null"); } int _kind = value.kind().value(); int _mc; // member count try { ...
Inversion-Mutation
megadiff
"@Override public void run() { try { Play.detectChanges(); setContextClassLoader(Play.classloader); LocalVariablesNamesTracer.enterMethod(); JPA.startTx(false); execute(); JPA.closeTx(false); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"@Override public void run() { try { Play.detectChanges(); setContextClassLoader(Play.classloader); LocalVariablesNamesTracer.enterMethod(); JPA.startTx(false); execute(); } catch (Throwable e) { ...
Inversion-Mutation
megadiff
"private void functionDecl(final Ann ann) throws QueryException { final InputInfo ii = info(); final QNm name = eQName(FUNCNAME, sc.funcNS); if(sc.xquery3() && keyword(name)) throw error(RESERVED, name.local()); wsCheck(PAR1); if(module != null && !eq(name.uri(), module.uri())) throw error(MODN...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "functionDecl"
"private void functionDecl(final Ann ann) throws QueryException { final InputInfo ii = info(); final QNm name = eQName(FUNCNAME, sc.funcNS); if(sc.xquery3() && keyword(name)) throw error(RESERVED, name.local()); if(module != null && !eq(name.uri(), module.uri())) throw error(MODNS, name); <M...
Inversion-Mutation
megadiff
"@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { LightBox lb = (LightBox) component; encodeScript(context, lb); encodeMarkup(context, lb); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "encodeEnd"
"@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { LightBox lb = (LightBox) component; <MASK>encodeMarkup(context, lb);</MASK> encodeScript(context, lb); }"
Inversion-Mutation
megadiff
"public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature mSig; String formattedResult = ""; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateForm...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processForm"
"public String processForm(IncomingMessageForm form) { Object result = null; MethodSignature mSig; String formattedResult = ""; if(form.getMessageFormStatus() != IncMessageFormStatus.VALID) return "Invalid form"; SimpleDateFormat dFormat = new SimpleDateForm...
Inversion-Mutation
megadiff
"@Override public ItemResult createOrUpdate() throws IOException { if (vCalendar.isTodo() && isMainCalendar(folderPath)) { // task item, move to tasks folder folderPath = TASKS; } ItemResult itemResult = new ItemResult(); E...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createOrUpdate"
"@Override public ItemResult createOrUpdate() throws IOException { if (vCalendar.isTodo() && isMainCalendar(folderPath)) { // task item, move to tasks folder folderPath = TASKS; } ItemResult itemResult = new ItemResult(); E...
Inversion-Mutation
megadiff
"protected void transferOutputSettings(TransletOutputHandler output) { // It is an error if this method is called with anything else than // the translet post-processor (TextOutput) if (!(output instanceof TextOutput)) return; TextOutput handler = (TextOutput)output; // Transfer the output method settin...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "transferOutputSettings"
"protected void transferOutputSettings(TransletOutputHandler output) { // It is an error if this method is called with anything else than // the translet post-processor (TextOutput) if (!(output instanceof TextOutput)) return; TextOutput handler = (TextOutput)output; // Transfer the output method settin...
Inversion-Mutation
megadiff
"public DriverConfiguration(Class<?> klass) { InputStream in = null; props = new Properties(); try { in = klass.getResourceAsStream(FILE_NAME); if (in != null) { props.load(in); } } catch (IOException e) { // silent } finally { Closeables.closeQuietly(in); } // s...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "DriverConfiguration"
"public DriverConfiguration(Class<?> klass) { InputStream in = null; try { in = klass.getResourceAsStream(FILE_NAME); if (in != null) { <MASK>props = new Properties();</MASK> props.load(in); } } catch (IOException e) { // silent } finally { Closeables.closeQuietly(in);...
Inversion-Mutation
megadiff
"private void processWeatherStations(List<WeatherStation<?>> weatherStations) { Collections.sort(weatherStations, new WeatherStationComparator()); for (WeatherStation<?> weatherStation : weatherStations) { try { if(weatherStation.isEnabled()) { processWeatherStation(weatherStation); } ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processWeatherStations"
"private void processWeatherStations(List<WeatherStation<?>> weatherStations) { Collections.sort(weatherStations, new WeatherStationComparator()); for (WeatherStation<?> weatherStation : weatherStations) { try { if(weatherStation.isEnabled()) { processWeatherStation(weatherStation); } ...
Inversion-Mutation
megadiff
"public BufferedImage paintOffscreen(final Layer layer, final ArrayList<Displayable> al_paint, final Displayable active, final int g_width, final int g_height, final int c_alphas, final Loader loader, final HashMap<Color,Layer> hm, final ArrayList<LayerPanel> blending_list, final int mode, final GraphicsSource graphics...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "paintOffscreen"
"public BufferedImage paintOffscreen(final Layer layer, final ArrayList<Displayable> al_paint, final Displayable active, final int g_width, final int g_height, final int c_alphas, final Loader loader, final HashMap<Color,Layer> hm, final ArrayList<LayerPanel> blending_list, final int mode, final GraphicsSource graphics...
Inversion-Mutation
megadiff
"public ImageExporter(Configuration config, Results results, CLIArgumentsGroup expectedGroup) { this.results = results; /* parse background color and other configuration options */ float[] clearColor = {0f, 0f, 0f}; if (config.containsKey(BG_COLOR_CONFIG_KEY)) { try { Color.decode...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ImageExporter"
"public ImageExporter(Configuration config, Results results, CLIArgumentsGroup expectedGroup) { this.results = results; /* parse background color and other configuration options */ float[] clearColor = {0f, 0f, 0f}; if (config.containsKey(BG_COLOR_CONFIG_KEY)) { try { Color.decode...
Inversion-Mutation
megadiff
"public void execute() throws HttpClientException { HttpURLConnection conn = null; UncloseableInputStream payloadStream = null; try { if (parameters != null && !parameters.isEmpty()) { final StringBuilder buf = new StringBuilder(256); if (!HTTP_P...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute"
"public void execute() throws HttpClientException { HttpURLConnection conn = null; UncloseableInputStream payloadStream = null; try { if (parameters != null && !parameters.isEmpty()) { final StringBuilder buf = new StringBuilder(256); if (!HTTP_P...
Inversion-Mutation
megadiff
"@Override public List<MatchNode> search(String query) { List<MatchNode> result = new ArrayList<MatchNode>(); List<PatternRankResult> rankResult = new ArrayList<PatternRankResult>(); if (query.trim().equals("")) return result; if (sfMapList != null && sfMapList.size...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "search"
"@Override public List<MatchNode> search(String query) { List<MatchNode> result = new ArrayList<MatchNode>(); List<PatternRankResult> rankResult = new ArrayList<PatternRankResult>(); if (query.trim().equals("")) return result; if (sfMapList != null && sfMapList.size...
Inversion-Mutation
megadiff
"public PageFetchResult fetchHeader(WebURL webUrl) { PageFetchResult fetchResult = new PageFetchResult(); String toFetchURL = webUrl.getURL(); HttpGet get = null; try { get = new HttpGet(toFetchURL); synchronized (mutex) { long now = (new Date()).getTime(); if (now - lastFetchTime < config...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "fetchHeader"
"public PageFetchResult fetchHeader(WebURL webUrl) { PageFetchResult fetchResult = new PageFetchResult(); String toFetchURL = webUrl.getURL(); HttpGet get = null; try { get = new HttpGet(toFetchURL); synchronized (mutex) { long now = (new Date()).getTime(); if (now - lastFetchTime < config...
Inversion-Mutation
megadiff
"protected void extractContents() { ZipInputStream in = null; try { try { in = new ZipInputStream(new BufferedInputStream( GameModule.getGameModule().getDataArchive() .getInputStream("help/" + getContentsResource()))); //$NON-NLS-1$ } catch (IOExce...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "extractContents"
"protected void extractContents() { ZipInputStream in = null; try { try { in = new ZipInputStream(new BufferedInputStream( GameModule.getGameModule().getDataArchive() .getInputStream("help/" + getContentsResource()))); //$NON-NLS-1$ } catch (IOExce...
Inversion-Mutation
megadiff
"private MavenProject constructMavenProjectFromModel( Model model, File pomFile, File parentFile, ProjectBuilderConfiguration config ) throws ProjectBuildingException, InvalidRepositoryException { MavenProject project = new MavenPr...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "constructMavenProjectFromModel"
"private MavenProject constructMavenProjectFromModel( Model model, File pomFile, File parentFile, ProjectBuilderConfiguration config ) throws ProjectBuildingException, InvalidRepositoryException { MavenProject project = new MavenPr...
Inversion-Mutation
megadiff
"@SuppressWarnings("unchecked") @Override protected Map referenceData(HttpServletRequest request, Object command, Errors errors, int page) throws Exception { ReportWizard wiz = (ReportWizard) command; Map refData = new HashMap(); refData.put("page",page); refData.put("maxpages", getPages().length-...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "referenceData"
"@SuppressWarnings("unchecked") @Override protected Map referenceData(HttpServletRequest request, Object command, Errors errors, int page) throws Exception { ReportWizard wiz = (ReportWizard) command; Map refData = new HashMap(); refData.put("page",page); refData.put("maxpages", getPages().length-...
Inversion-Mutation
megadiff
"public static List<Row> getRangeSlice(RangeSliceCommand command, ConsistencyLevel consistency_level) throws IOException, UnavailableException, TimeoutException { if (logger.isDebugEnabled()) logger.debug(command.toString()); long startTime = System.nanoTime(); List<Row...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getRangeSlice"
"public static List<Row> getRangeSlice(RangeSliceCommand command, ConsistencyLevel consistency_level) throws IOException, UnavailableException, TimeoutException { if (logger.isDebugEnabled()) logger.debug(command.toString()); long startTime = System.nanoTime(); List<Row...
Inversion-Mutation
megadiff
"protected Control createDialogArea(Composite parent) { Composite shell = new Composite(parent, SWT.NONE); GridData data = new GridData (GridData.FILL_BOTH); shell.setLayoutData(data); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2; gridLayout.makeColumnsEqualWidth = true; ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createDialogArea"
"protected Control createDialogArea(Composite parent) { Composite shell = new Composite(parent, SWT.NONE); GridData data = new GridData (GridData.FILL_BOTH); shell.setLayoutData(data); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2; gridLayout.makeColumnsEqualWidth = true; ...
Inversion-Mutation
megadiff
"public void sqlResultSetAvailable(ResultSet rs, SQLExecutionInfo info, IDataSetUpdateableTableModel model) { _cancelPanel.setStatusLabel("Building output..."); rsds = new ResultSetDataSet(); SessionProperties props = getSession().getProperties(); ResultSetMetaDataDataSet rsmdds = null; try ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "sqlResultSetAvailable"
"public void sqlResultSetAvailable(ResultSet rs, SQLExecutionInfo info, IDataSetUpdateableTableModel model) { _cancelPanel.setStatusLabel("Building output..."); rsds = new ResultSetDataSet(); SessionProperties props = getSession().getProperties(); ResultSetMetaDataDataSet rsmdds = null; try ...
Inversion-Mutation
megadiff
"public boolean service(WebloungeRequest request, WebloungeResponse response) { WebUrl url = request.getUrl(); Site site = request.getSite(); String path = url.getPath(); String fileName = null; // Get hold of the content repository ContentRepository contentRepository = site.getContent...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "service"
"public boolean service(WebloungeRequest request, WebloungeResponse response) { WebUrl url = request.getUrl(); Site site = request.getSite(); String path = url.getPath(); String fileName = null; // Get hold of the content repository ContentRepository contentRepository = site.getContent...
Inversion-Mutation
megadiff
"private void doreport(Report r) throws IOException { if(!status.goterror(r.t)) return; URLConnection c = errordest.openConnection(); status.connecting(); c.setDoOutput(true); c.addRequestProperty("Content-Type", "application/x-java-error"); c.connect(); ObjectOutputStream o...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doreport"
"private void doreport(Report r) throws IOException { if(!status.goterror(r.t)) return; URLConnection c = errordest.openConnection(); status.connecting(); c.setDoOutput(true); c.addRequestProperty("Content-Type", "application/x-java-error"); c.connect(); ObjectOutputStream o...
Inversion-Mutation
megadiff
"@Override public void removeChildPage(final String name) { WikiPage childPage = getChildPage(name); if (childPage instanceof FileSystemPage) { versionsController.delete((FileSystemPage) childPage); super.removeChildPage(name); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeChildPage"
"@Override public void removeChildPage(final String name) { <MASK>super.removeChildPage(name);</MASK> WikiPage childPage = getChildPage(name); if (childPage instanceof FileSystemPage) { versionsController.delete((FileSystemPage) childPage); } }"
Inversion-Mutation
megadiff
"public LocalResourceSaveableComparison(ICompareInput input, CompareEditorInput editorInput, ITypedElement fileElement) { this.input = input; this.editorInput = editorInput; this.fileElement = fileElement; initializeContentChangeListeners(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "LocalResourceSaveableComparison"
"public LocalResourceSaveableComparison(ICompareInput input, CompareEditorInput editorInput, ITypedElement fileElement) { this.input = input; this.editorInput = editorInput; <MASK>initializeContentChangeListeners();</MASK> this.fileElement = fileElement; }"
Inversion-Mutation
megadiff
"@SuppressLint("NewApi") @Override public boolean onPrepareOptionsMenu(Menu menu) { menu.clear(); ImageButton overflowMenuButton = (ImageButton) findViewById(R.id.imageButton_overflowmenu); MenuItem searchActionItem = menu.add(0, R.id.collectionactivity_search_menu_button, 0, "Searc...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPrepareOptionsMenu"
"@SuppressLint("NewApi") @Override public boolean onPrepareOptionsMenu(Menu menu) { menu.clear(); ImageButton overflowMenuButton = (ImageButton) findViewById(R.id.imageButton_overflowmenu); MenuItem searchActionItem = menu.add(0, R.id.collectionactivity_search_menu_button, 0, "Searc...
Inversion-Mutation
megadiff
"public boolean takeTime(int q) { resetBorder(Color.red); time -= q; int sleep =q; int delayFactor = delayModel.getNumber().intValue(); try { if(time <= 0) { sleep += time; Thread.sleep((time+q)*...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "takeTime"
"public boolean takeTime(int q) { resetBorder(Color.red); time -= q; int sleep =q; int delayFactor = delayModel.getNumber().intValue(); try { if(time <= 0) { sleep += time; Thread.sleep((time+q)*...
Inversion-Mutation
megadiff
"@Override protected void onStop() { if (mRoomId != null) { GServiceClient.getInstance().leaveRoom(10000); } gHelper.onStop(); super.onStop(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onStop"
"@Override protected void onStop() { <MASK>super.onStop();</MASK> if (mRoomId != null) { GServiceClient.getInstance().leaveRoom(10000); } gHelper.onStop(); }"
Inversion-Mutation
megadiff
"@Override public void playbackFinished(Track track) { // move to next song try { MusicMachineApplication.playlist.removeTrack(track); this.playTrack(MusicMachineApplication.playlist.popTrack()); addWinnersToPlaylist(); } catch (MusicMachinePlayl...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "playbackFinished"
"@Override public void playbackFinished(Track track) { <MASK>addWinnersToPlaylist();</MASK> // move to next song try { MusicMachineApplication.playlist.removeTrack(track); this.playTrack(MusicMachineApplication.playlist.popTrack()); } catch (MusicMac...
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 = null; if(Log.isDebugEnabled(Geonet.CSW)) Log....
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 = null; if(Log.isDebugEnabled(Geonet.CSW)) Log....
Inversion-Mutation
megadiff
"private void purgeBuildOutputDirectory( String path ) { File buildOutputDir = new File( path ); FileFilter filter = DirectoryFileFilter.DIRECTORY; File[] projectsDir = buildOutputDir.listFiles( filter ); for ( File projectDir : projectsDir ) { File[]...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "purgeBuildOutputDirectory"
"private void purgeBuildOutputDirectory( String path ) { File buildOutputDir = new File( path ); FileFilter filter = DirectoryFileFilter.DIRECTORY; File[] projectsDir = buildOutputDir.listFiles( filter ); for ( File projectDir : projectsDir ) { File[]...
Inversion-Mutation
megadiff
"public void destroy() { // the following doesn't fully clean up (maybe because of Java3D?) WindowManager wm = (WindowManager) getManager(WindowManager.class); wm.hideWindows(); setVisible(false); wm.disposeWindows(); StateManager sm = (StateManager) getManager(StateManager.class); s...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "destroy"
"public void destroy() { // the following doesn't fully clean up (maybe because of Java3D?) WindowManager wm = (WindowManager) getManager(WindowManager.class); wm.hideWindows(); <MASK>wm.disposeWindows();</MASK> setVisible(false); StateManager sm = (StateManager) getManager(StateManager.c...
Inversion-Mutation
megadiff
"@Override public void start() throws QTasteException { if (getStatus() != ProcessStatus.READY_TO_START) { throw new QTasteException("Invalide state. Cannot start a non initialized process."); } new Thread(new Runnable() { @Override public void run() { try { mStatus = ProcessS...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start"
"@Override public void start() throws QTasteException { if (getStatus() != ProcessStatus.READY_TO_START) { throw new QTasteException("Invalide state. Cannot start a non initialized process."); } new Thread(new Runnable() { @Override public void run() { try { <MASK>mCurrentProce...
Inversion-Mutation
megadiff
"@Override public void run() { try { mStatus = ProcessStatus.RUNNING; mCurrentProcess = mBuilder.start(); mStdLogs = new InputStreamWriter(mCurrentProcess.getInputStream()); new Thread(mStdLogs).start(); mErrLogs = new InputStreamWriter(mCurrentProcess.getErrorStream()); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"@Override public void run() { try { <MASK>mCurrentProcess = mBuilder.start();</MASK> mStatus = ProcessStatus.RUNNING; mStdLogs = new InputStreamWriter(mCurrentProcess.getInputStream()); new Thread(mStdLogs).start(); mErrLogs = new InputStreamWriter(mCurrentProcess.getErrorS...
Inversion-Mutation
megadiff
"@Override public void writeReady() { if (writes.size() == 0) { return; } try { ByteBuffer buffer = writes.get(0); if (!buffer.hasRemaining()) { writes.remove(0); } else { handler.get().getChannel().wr...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "writeReady"
"@Override public void writeReady() { if (writes.size() == 0) { return; } try { ByteBuffer buffer = writes.get(0); <MASK>handler.get().getChannel().write(buffer);</MASK> if (!buffer.hasRemaining()) { writes.remove(0); ...
Inversion-Mutation
megadiff
"@Override protected byte[] getContent(ExchangeSession.Message message) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); InputStream contentInputStream; try { try { try { contentInputStream = getContentInput...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getContent"
"@Override protected byte[] getContent(ExchangeSession.Message message) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); InputStream contentInputStream; try { try { try { <MASK>contentInputStream = getConten...
Inversion-Mutation
megadiff
"private void initDisplayLists(DisplayListManager i_displayListManager, final Graphics3D g3d) { if (i_displayListManager.isDisplayList(DL_REST, DL_FRONT, DL_TEXTURE)) return; Runnable front = new Runnable() { public void run() { g3d.glBegin(Graphics3DDraw.GL_QUADS); g3d.glNormal3f(0, 0, ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initDisplayLists"
"private void initDisplayLists(DisplayListManager i_displayListManager, final Graphics3D g3d) { if (i_displayListManager.isDisplayList(DL_REST, DL_FRONT, DL_TEXTURE)) return; Runnable front = new Runnable() { public void run() { g3d.glBegin(Graphics3DDraw.GL_QUADS); g3d.glNormal3f(0, 0, ...
Inversion-Mutation
megadiff
"public void run() { g3d.glBegin(Graphics3DDraw.GL_QUADS); // back g3d.glNormal3f(0, 0, 1); g3d.glVertex3f(0, 0, 1); g3d.glVertex3f(1, 0, 1); g3d.glVertex3f(1, 1, 1); g3d.glVertex3f(0, 1, 1); // left g3d.glNormal3f(-1, 0, 0); g3d.glVertex3f(0, 0, 0); g3d.glVertex...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"public void run() { g3d.glBegin(Graphics3DDraw.GL_QUADS); // back g3d.glNormal3f(0, 0, 1); g3d.glVertex3f(0, 0, 1); g3d.glVertex3f(1, 0, 1); g3d.glVertex3f(1, 1, 1); g3d.glVertex3f(0, 1, 1); // left g3d.glNormal3f(-1, 0, 0); <MASK>g3d.glVertex3f(0, 0, 0);</MASK> ...
Inversion-Mutation
megadiff
"private void wakeupSerial(List<RobotPeer> robotsAtRandom) { for (RobotPeer robotPeer : robotsAtRandom) { if (robotPeer.isRunning()) { // This call blocks until the // robot's thread actually wakes up. robotPeer.waitWakeup(); if (robotPeer.isAlive()) { if (isDebugging || robotPeer.isP...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "wakeupSerial"
"private void wakeupSerial(List<RobotPeer> robotsAtRandom) { for (RobotPeer robotPeer : robotsAtRandom) { if (robotPeer.isRunning()) { // This call blocks until the // robot's thread actually wakes up. robotPeer.waitWakeup(); if (robotPeer.isAlive()) { if (isDebugging || robotPeer.isP...
Inversion-Mutation
megadiff
"@Override public List<MatchNode> search(String query) { List<MatchNode> result = new ArrayList<MatchNode>(); List<PatternRankResult> rankResult = new ArrayList<PatternRankResult>(); if (query.trim().equals("")) return result; if (sfMapList != null && sfMapList.size...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "search"
"@Override public List<MatchNode> search(String query) { List<MatchNode> result = new ArrayList<MatchNode>(); List<PatternRankResult> rankResult = new ArrayList<PatternRankResult>(); if (query.trim().equals("")) return result; if (sfMapList != null && sfMapList.size...
Inversion-Mutation
megadiff
"protected void removeMacroSelected () { if (addedMacros.contains(selectedMacro)) { addedMacros.remove(selectedMacro); } else if (macros.contains(selectedMacro)) { removedMacros.add(selectedMacro); } macros.remove(selectedMacro); macroTable.remove(selectedMacro); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeMacroSelected"
"protected void removeMacroSelected () { if (addedMacros.contains(selectedMacro)) { addedMacros.remove(selectedMacro); } else if (macros.contains(selectedMacro)) { <MASK>macros.remove(selectedMacro);</MASK> removedMacros.add(selectedMacro); } macroTable.remove(selectedMacro); }"
Inversion-Mutation
megadiff
"@Override public void loadAsync (AssetManager manager, String fileName, FileHandle file, TextureParameter parameter) { info.filename = fileName; if (parameter == null || parameter.textureData == null) { Pixmap pixmap = null; Format format = null; boolean genMipMaps = false; info.texture = null;...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadAsync"
"@Override public void loadAsync (AssetManager manager, String fileName, FileHandle file, TextureParameter parameter) { info.filename = fileName; if (parameter == null || parameter.textureData == null) { Pixmap pixmap = null; Format format = null; boolean genMipMaps = false; info.texture = null;...
Inversion-Mutation
megadiff
"private byte[] getICSFromItemProperties() throws IOException { byte[] result; // experimental: build VCALENDAR from properties try { //MultiStatusResponse[] responses = DavGatewayHttpClientFacade.executeMethod(httpClient, propFindMethod); Set...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getICSFromItemProperties"
"private byte[] getICSFromItemProperties() throws IOException { byte[] result; // experimental: build VCALENDAR from properties try { //MultiStatusResponse[] responses = DavGatewayHttpClientFacade.executeMethod(httpClient, propFindMethod); Set...
Inversion-Mutation
megadiff
"@Override public void handleReaderList(ITagListHandler tagHandler, ISubscriptionListHandler subHandler, long syncTime) throws ReaderException { try { SubsStruct.InstanceRefresh(c); APIHelper.updateFeedCounts(c, SubsStruct.Instance(c).Subs); if (SubsStruct.Instance(c).Subs.size() == 0) throw new R...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleReaderList"
"@Override public void handleReaderList(ITagListHandler tagHandler, ISubscriptionListHandler subHandler, long syncTime) throws ReaderException { try { SubsStruct.InstanceRefresh(c); APIHelper.updateFeedCounts(c, SubsStruct.Instance(c).Subs); if (SubsStruct.Instance(c).Subs.size() == 0) throw new R...
Inversion-Mutation
megadiff
"@SuppressWarnings("unchecked") @Override public void init(GameContainer gc, StateBasedGame sbg) throws SlickException { background= new Image("img/game_background.png"); cannonImage = new Image("img/cannon2.png"); block = new Image("img/block.png"); pausedScreen = new Image(Util.WINDOW_WIDTH, Util....
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "init"
"@SuppressWarnings("unchecked") @Override public void init(GameContainer gc, StateBasedGame sbg) throws SlickException { background= new Image("img/game_background.png"); cannonImage = new Image("img/cannon2.png"); block = new Image("img/block.png"); pausedScreen = new Image(Util.WINDOW_WIDTH, Util....
Inversion-Mutation
megadiff
"public void build() { buildClassMapRegistry(); for (final ClassMap<?, ?> classMap : classMapRegistry.values()) { buildMapper(classMap); } for (final ClassMap<?, ?> classMap : classMapRegistry.values()) { buildObjectF...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "build"
"public void build() { <MASK>isBuilt = true;</MASK> buildClassMapRegistry(); for (final ClassMap<?, ?> classMap : classMapRegistry.values()) { buildMapper(classMap); } for (final ClassMap<?, ?> classMap : classMapRegistry....
Inversion-Mutation
megadiff
"@Override public void updateFormModel(ProductSceneView productSceneView) { ImageInfoEditorModel1B model = new ImageInfoEditorModel1B(parentForm.getImageInfo()); model.addChangeListener(applyEnablerCL); ImageInfoEditorModel oldModel = imageInfoEditor.getModel(); if (oldModel !=...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateFormModel"
"@Override public void updateFormModel(ProductSceneView productSceneView) { ImageInfoEditorModel1B model = new ImageInfoEditorModel1B(parentForm.getImageInfo()); <MASK>model.setDisplayProperties(productSceneView.getRaster());</MASK> model.addChangeListener(applyEnablerCL); Image...
Inversion-Mutation
megadiff
"private void joinTransaction() throws SystemException { SeamTransaction transaction = userTransactionInstance.get(); if (transaction.isActive()) { synchronizationRegistered = true; transaction.enlist(delegate); try { transaction.registerSyn...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "joinTransaction"
"private void joinTransaction() throws SystemException { <MASK>synchronizationRegistered = true;</MASK> SeamTransaction transaction = userTransactionInstance.get(); if (transaction.isActive()) { transaction.enlist(delegate); try { transaction.r...
Inversion-Mutation
megadiff
"public static void delete(Episode episode) { episode.setStorageState(StorageState.NOT_ON_DEVICE); cancelDownload(episode); if (episode.getFilePath() != null) { File file = new File(episode.getFilePath()); file.delete(); episode.setFilePath(null); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "delete"
"public static void delete(Episode episode) { <MASK>episode.setFilePath(null);</MASK> episode.setStorageState(StorageState.NOT_ON_DEVICE); cancelDownload(episode); if (episode.getFilePath() != null) { File file = new File(episode.getFilePath()); file.del...
Inversion-Mutation
megadiff
"@SuppressWarnings("unchecked") private void executeRewrite() { BufferedReader reader = null; PrintStream output = null; try { try { reader = new BufferedReader(new FileReader(input)); output = new PrintStream(new File(destDir, input.getName())); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "executeRewrite"
"@SuppressWarnings("unchecked") private void executeRewrite() { BufferedReader reader = null; PrintStream output = null; try { try { reader = new BufferedReader(new FileReader(input)); output = new PrintStream(new File(destDir, input.getName())); ...
Inversion-Mutation
megadiff
"public void ensureOutOfSync(final IFile file) { modifyInFileSystem(file); touchInFilesystem(file); assertTrue("File not out of sync: " + file.getLocation().toOSString(), file.getLocation().toFile().lastModified() != file.getLocalTimeStamp()); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ensureOutOfSync"
"public void ensureOutOfSync(final IFile file) { <MASK>touchInFilesystem(file);</MASK> modifyInFileSystem(file); assertTrue("File not out of sync: " + file.getLocation().toOSString(), file.getLocation().toFile().lastModified() != file.getLocalTimeStamp()); }"
Inversion-Mutation
megadiff
"private void loadPlugins(HostPageData hpd, final String token) { ApiGlue.init(); if (hpd.plugins != null && !hpd.plugins.isEmpty()) { for (final String url : hpd.plugins) { ScriptInjector.fromUrl(url) .setWindow(ScriptInjector.TOP_WINDOW) .setCallback(new Callback<V...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadPlugins"
"private void loadPlugins(HostPageData hpd, final String token) { if (hpd.plugins != null && !hpd.plugins.isEmpty()) { <MASK>ApiGlue.init();</MASK> for (final String url : hpd.plugins) { ScriptInjector.fromUrl(url) .setWindow(ScriptInjector.TOP_WINDOW) .setCallback...
Inversion-Mutation
megadiff
"public static String buildGeneralURLForCalendarPage(String provId, String provTitle, String keyword, String courseTitle, String preserve){ StringBuilder sb = new StringBuilder(buildBasicURL(provId, provTitle, keyword, courseTitle)); if (StringUtils.hasText(preserve)){ StringBuilder calendarSb = new Strin...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buildGeneralURLForCalendarPage"
"public static String buildGeneralURLForCalendarPage(String provId, String provTitle, String keyword, String courseTitle, String preserve){ StringBuilder sb = new StringBuilder(buildBasicURL(provId, provTitle, keyword, courseTitle)); if (StringUtils.hasText(preserve)){ StringBuilder calendarSb = new Strin...
Inversion-Mutation
megadiff
"public Propiedades() { FileInputStream file = null; URL root = getClass().getProtectionDomain().getCodeSource() .getLocation(); URL filePath = null; prop = new Properties(); try { filePath = new URL(root, NOMBRE_ARCHIVO); file = new FileInputStream(filePath.getP...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Propiedades"
"public Propiedades() { FileInputStream file = null; URL root = getClass().getProtectionDomain().getCodeSource() .getLocation(); URL filePath = null; prop = new Properties(); try { filePath = new URL(root, NOMBRE_ARCHIVO); prop.load(file); <MASK>file = new FileInputStream(filePa...
Inversion-Mutation
megadiff
"public final void disable() { disableModule(); synchronized (lock) { enabled = false; } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "disable"
"public final void disable() { synchronized (lock) { enabled = false; } <MASK>disableModule();</MASK> }"
Inversion-Mutation
megadiff
"private void addAction(final IAction action, Composite parent, boolean isQuick) { final ImageHyperlink link = toolkit.createImageHyperlink(parent, SWT.NONE); link.setImage(getActionImage(action)); if (isQuick) link.setToolTipText(action.getText()); else link.setText(action.getText()); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addAction"
"private void addAction(final IAction action, Composite parent, boolean isQuick) { final ImageHyperlink link = toolkit.createImageHyperlink(parent, SWT.NONE); link.setImage(getActionImage(action)); if (isQuick) link.setToolTipText(action.getText()); else link.setText(action.getText()); ...
Inversion-Mutation
megadiff
"public void linkActivated(HyperlinkEvent e) { if (action instanceof ISpaceAction) { ISpaceAction spaceAction = (ISpaceAction) action; spaceAction.setSpace(space); if (((ToolConfiguration) spaceAction.getConfiguration()).isFixed()) { spaceAction.run(); close(); } else { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "linkActivated"
"public void linkActivated(HyperlinkEvent e) { if (action instanceof ISpaceAction) { ISpaceAction spaceAction = (ISpaceAction) action; spaceAction.setSpace(space); if (((ToolConfiguration) spaceAction.getConfiguration()).isFixed()) { <MASK>close();</MASK> spaceAction.run(); }...
Inversion-Mutation
megadiff
"public void run() { final int size = imageloader.length; // as many as Preloader threads final ArrayList<Tuple> list = new ArrayList<Tuple>(size); while (go) { try { synchronized (lock2) { lock2.lock(); } // read out a group of imageloader.length patches to load while (true) { ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"public void run() { final int size = imageloader.length; // as many as Preloader threads final ArrayList<Tuple> list = new ArrayList<Tuple>(size); while (go) { try { synchronized (lock2) { lock2.lock(); } // read out a group of imageloader.length patches to load while (true) { ...
Inversion-Mutation
megadiff
"private void initComponents() { setLayout(new GridBagLayout()); JLabel playerLabel = new JLabel(); if (isSubstitution()) { playerLabel.setText(HOVerwaltung.instance().getLanguageString( "subs.Out")); } else if (isPositionSwap()) { playerLabel.setText(HOVerwaltung.instance().getLanguageStrin...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initComponents"
"private void initComponents() { setLayout(new GridBagLayout()); JLabel playerLabel = new JLabel(); if (isSubstitution()) { playerLabel.setText(HOVerwaltung.instance().getLanguageString( "subs.Out")); } else if (isPositionSwap()) { playerLabel.setText(HOVerwaltung.instance().getLanguageStrin...
Inversion-Mutation
megadiff
"private void onTransitionEnd() { VConsole.log("Trs end"); new Timer() { @Override public void run() { VConsole.log("Place holder hide"); hidePlaceHolder(); } }.schedule(160); transitionPending = false; ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onTransitionEnd"
"private void onTransitionEnd() { VConsole.log("Trs end"); new Timer() { @Override public void run() { VConsole.log("Place holder hide"); hidePlaceHolder(); } }.schedule(160); <MASK>fireAnimationDidEnd();</M...
Inversion-Mutation
megadiff
"public DefaultSearchResultButton(String name, String id, String clue) { super(name); this.name = name; this.id = id; this.clue = clue; this.setToolTipText(this.clue); this.addMouseListener(new MouseListener(){ public void mouseClicked(MouseEvent arg0) { System.out.println("Mouse Clicked o...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "DefaultSearchResultButton"
"public DefaultSearchResultButton(String name, String id, String clue) { super(name); this.name = name; this.id = id; <MASK>this.setToolTipText(this.clue);</MASK> this.clue = clue; this.addMouseListener(new MouseListener(){ public void mouseClicked(MouseEvent arg0) { System.out.println("Mo...
Inversion-Mutation
megadiff
"public FitSphere(final Vector3D[] points) { Vector3D mean = Vector3D.ZERO; for(Vector3D point : points) mean = mean.add(point.scalarMultiply(1D/(double)points.length)); ReportingUtils.logMessage("MEAN: " + mean.toString()); final Vector3D endMean = new Vector3D(mean.getX(), mean.getY(), mean.getZ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "FitSphere"
"public FitSphere(final Vector3D[] points) { Vector3D mean = Vector3D.ZERO; for(Vector3D point : points) mean = mean.add(point.scalarMultiply(1D/(double)points.length)); ReportingUtils.logMessage("MEAN: " + mean.toString()); final Vector3D endMean = new Vector3D(mean.getX(), mean.getY(), mean.getZ...
Inversion-Mutation
megadiff
"public static String emitJavascriptCall(String name, String[] arguments, boolean quote) { CharWrap togo = new CharWrap(); togo.append(" ").append(name).append('('); for (int i = 0; i < arguments.length; ++i) { if (quote) togo.append('"'); togo.append(arguments[i]); if (quote) togo....
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "emitJavascriptCall"
"public static String emitJavascriptCall(String name, String[] arguments, boolean quote) { CharWrap togo = new CharWrap(); togo.append(" ").append(name).append('('); for (int i = 0; i < arguments.length; ++i) { <MASK>if (quote) togo.append('"');</MASK> togo.append(arguments[i]); if...
Inversion-Mutation
megadiff
"@Override public void click() { final Boolean newValue = (value == null) ? true : !value; setValue(newValue, true); super.click(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "click"
"@Override public void click() { <MASK>super.click();</MASK> final Boolean newValue = (value == null) ? true : !value; setValue(newValue, true); }"
Inversion-Mutation
megadiff
"public List<SecurityAuditEvent> getEvents(String username, Integer skipEvents, Integer numEvents, Date startTime, Date endTime) { List<SecurityAuditEvent> events = new ArrayList<SecurityAuditEvent>(); Connection con = null; PreparedStatement pstmt = null; ResultSet rs = null; ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getEvents"
"public List<SecurityAuditEvent> getEvents(String username, Integer skipEvents, Integer numEvents, Date startTime, Date endTime) { List<SecurityAuditEvent> events = new ArrayList<SecurityAuditEvent>(); Connection con = null; PreparedStatement pstmt = null; ResultSet rs = null; ...
Inversion-Mutation
megadiff
"private void resumeThread(boolean fireNotification) throws DebugException { if (!isSuspended() || (isPerformingEvaluation() && !isInvokingMethod())) { return; } try { setRunning(true); setSuspendedQuiet(false); if (fireNotification) { fireResumeEvent(DebugEvent.CLIENT_REQUEST); } ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "resumeThread"
"private void resumeThread(boolean fireNotification) throws DebugException { if (!isSuspended() || (isPerformingEvaluation() && !isInvokingMethod())) { return; } try { setRunning(true); setSuspendedQuiet(false); <MASK>preserveStackFrames();</MASK> if (fireNotification) { fireResumeEven...
Inversion-Mutation
megadiff
"protected OrderByTableColumn[] createTableColumns() { OrderByTableColumn[] columns = new OrderByTableColumn[] { new OrderByTableColumn(USER_NAME_PROPERTY, USER_NAME_PROPERTY, USER_NAME_PROPERTY), new OrderByTableColumn(LAST_NAME_PROPERTY, LAST_NAME_PROPERTY, LAST_NAME_PROPERTY...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createTableColumns"
"protected OrderByTableColumn[] createTableColumns() { OrderByTableColumn[] columns = new OrderByTableColumn[] { new OrderByTableColumn(USER_NAME_PROPERTY, USER_NAME_PROPERTY, USER_NAME_PROPERTY), <MASK>new OrderByTableColumn(FIRST_NAME_PROPERTY, FIRST_NAME_PROPERTY, FIRST_NAME_...
Inversion-Mutation
megadiff
"public CHSNodeMap(ContentEntity n, int depth, ResourceDefinition rp) throws SDataException { String lock = ContentHostingService.AUTH_RESOURCE_HIDDEN; sessionManager = Kernel.sessionManager(); String userId = sessionManager.getCurrentSessionUserId(); boolean canSeeHidden = Kernel.securityService().un...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "CHSNodeMap"
"public CHSNodeMap(ContentEntity n, int depth, ResourceDefinition rp) throws SDataException { String lock = ContentHostingService.AUTH_RESOURCE_HIDDEN; String userId = sessionManager.getCurrentSessionUserId(); boolean canSeeHidden = Kernel.securityService().unlock(userId, lock, n.getReference(), n.getGr...
Inversion-Mutation
megadiff
"public JspHelper() { fsn = FSNamesystem.getFSNamesystem(); if (DataNode.getDataNode() != null) { nameNodeAddr = DataNode.getDataNode().getNameNodeAddr(); } else { nameNodeAddr = fsn.getDFSNameNodeAddress(); } UnixUserGroupInformation.saveToConf(conf, UnixU...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "JspHelper"
"public JspHelper() { if (DataNode.getDataNode() != null) { nameNodeAddr = DataNode.getDataNode().getNameNodeAddr(); } else { <MASK>fsn = FSNamesystem.getFSNamesystem();</MASK> nameNodeAddr = fsn.getDFSNameNodeAddress(); } UnixUserGroupInformation.saveToConf(conf,...
Inversion-Mutation
megadiff
"@Override protected void onCreate(Bundle savedInstanceState) { ThemeService.applyTheme(this); super.onCreate(savedInstanceState); DependencyInjectionService.getInstance().inject(this); int contentView = getContentView(); if (contentView == R.layout.task_list_wrapper...
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) { <MASK>super.onCreate(savedInstanceState);</MASK> ThemeService.applyTheme(this); DependencyInjectionService.getInstance().inject(this); int contentView = getContentView(); if (contentView == R.layout.task...
Inversion-Mutation
megadiff
"public void readConfigFromFile(final File file) { try { pipe.readFromFile(file); } catch (final IOException exc) { Log.error(exc); } catch (final PipeException exc) { Log.error(exc); } updatePipeLabel(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "readConfigFromFile"
"public void readConfigFromFile(final File file) { try { pipe.readFromFile(file); <MASK>updatePipeLabel();</MASK> } catch (final IOException exc) { Log.error(exc); } catch (final PipeException exc) { Log.error(exc); } }"
Inversion-Mutation
megadiff
"public void run() { // should be while game is not over try { // get the multicast group InetAddress group = InetAddress.getByName(MCAST_ADDRESS); socket.joinGroup(group); while (moreQuotes) { byte[] buf = new byte[6]; // receive request DatagramPacket packet = ne...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"public void run() { // should be while game is not over try { // get the multicast group InetAddress group = InetAddress.getByName(MCAST_ADDRESS); socket.joinGroup(group); while (moreQuotes) { byte[] buf = new byte[6]; // receive request DatagramPacket packet = ne...
Inversion-Mutation
megadiff
"@Override public void run(Server server, Essentials parent, CommandSender sender, String commandLabel, String[] args) throws Exception { if (args.length < 1 || args.length > 2) { sender.sendMessage("Usage: /" + commandLabel + " [player] [jailname]"); return; } User p; try { p = Us...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"@Override public void run(Server server, Essentials parent, CommandSender sender, String commandLabel, String[] args) throws Exception { if (args.length < 1 || args.length > 2) { sender.sendMessage("Usage: /" + commandLabel + " [player] [jailname]"); return; } User p; try { p = Us...
Inversion-Mutation
megadiff
"public void unload() throws IOException, InterruptedException { synchronized (indexMutex) { if( pageFile.isLoaded() ) { metadata.state = CLOSED_STATE; metadata.firstInProgressTransactionLocation = getFirstInProgressTxLocation(); pageFile.tx...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "unload"
"public void unload() throws IOException, InterruptedException { synchronized (indexMutex) { if( pageFile.isLoaded() ) { metadata.state = CLOSED_STATE; metadata.firstInProgressTransactionLocation = getFirstInProgressTxLocation(); pageFile.tx...
Inversion-Mutation
megadiff
"private Pretty(CompilationInfo info, String text, TokenSequence<JFXTokenId> tokens, JavaFXTreePath path, CodeStyle cs, int startOffset, int endOffset) { this.doc = info.getDocument(); this.root = path.getCompilationUnit(); this.fText = text; this.sp = info.getTrees()...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Pretty"
"private Pretty(CompilationInfo info, String text, TokenSequence<JFXTokenId> tokens, JavaFXTreePath path, CodeStyle cs, int startOffset, int endOffset) { this.doc = info.getDocument(); this.fText = text; this.sp = info.getTrees().getSourcePositions(); this.cs = cs; ...
Inversion-Mutation
megadiff
"@Override public void onEnable() { instance = this; configManager = new ConfigManager(); groupMediator = new GroupMediator(); jaLogger = new JukeAlertLogger(); snitchManager = new SnitchManager(); registerEvents(); registerCommands(); snitchManager.loadSnitches(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onEnable"
"@Override public void onEnable() { instance = this; configManager = new ConfigManager(); jaLogger = new JukeAlertLogger(); snitchManager = new SnitchManager(); <MASK>groupMediator = new GroupMediator();</MASK> registerEvents(); registerCommands(); snitchManager.loadSnitches(); }"
Inversion-Mutation
megadiff
"public void deselectUser(String postId){ bodyHtml = ""; if(mThreadView != null){ this.getActivity().runOnUiThread(new Runnable() { @Override public void run() { aq.find(R.id.thread_userpost_notice).gone(); mThreadView.loadUrl(...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "deselectUser"
"public void deselectUser(String postId){ bodyHtml = ""; <MASK>aq.find(R.id.thread_userpost_notice).gone();</MASK> if(mThreadView != null){ this.getActivity().runOnUiThread(new Runnable() { @Override public void run() { mThr...
Inversion-Mutation
megadiff
"@Override public boolean onCreateOptionsMenu(Menu menu) { this.menu = menu; // favorites button MenuItem fav = menu.add(0, R.id.mnu_favorites, 0, R.string.menu_favorites); fav.setIcon(R.drawable.mo_star_b5); fav.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TE...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreateOptionsMenu"
"@Override public boolean onCreateOptionsMenu(Menu menu) { this.menu = menu; // favorites button MenuItem fav = menu.add(0, R.id.mnu_favorites, 0, R.string.menu_favorites); fav.setIcon(R.drawable.mo_star_b5); fav.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TE...
Inversion-Mutation
megadiff
"public JSONQueryParser(String queryJSON) throws JSONException { JSONObject query = new JSONObject(queryJSON); JSONArray regionArray = new JSONArray(); readSetQuery = new HashMap<String, String>(); readsQuery = new HashMap<String, String>(); featureMapQuery = new...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "JSONQueryParser"
"public JSONQueryParser(String queryJSON) throws JSONException { JSONObject query = new JSONObject(queryJSON); <MASK>Iterator<String> outerKeys = query.keys();</MASK> JSONArray regionArray = new JSONArray(); readSetQuery = new HashMap<String, String>(); readsQuery...
Inversion-Mutation
megadiff
"void dispatchEvent(int type) { switch (type) { case SimulationListener.kStartEvent: m_SimButtons.updateButtons(); m_MapButtons.updateButtons(); m_AgentDisplay.updateButtons(); return; case SimulationListener.kStopEvent: m_VisualWorld.setRepaint(); m_VisualWorld.redraw(); m_Sim...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "dispatchEvent"
"void dispatchEvent(int type) { switch (type) { case SimulationListener.kStartEvent: m_SimButtons.updateButtons(); m_MapButtons.updateButtons(); m_AgentDisplay.updateButtons(); return; case SimulationListener.kStopEvent: m_VisualWorld.setRepaint(); m_VisualWorld.redraw(); m_Sim...
Inversion-Mutation
megadiff
"public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_store_slider); session = Session.getInstance(this); mContext = getApplicationContext(); mContentViews = new ArrayList<View>(); privateMode = false; //pagerControlStringRef = n...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate"
"public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_store_slider); session = Session.getInstance(this); mContext = getApplicationContext(); mContentViews = new ArrayList<View>(); privateMode = false; //pagerControlStringRef = n...
Inversion-Mutation
megadiff
"protected void handleTouchesUp() { for (Touch t : previousTouchState) { if (!currentTouchState.contains(t.sessionID)) { // the touch existed, but no longer exists, so it went up SMTUtilities.invoke(touchUp, applet, t); for (Zone zone : t.getAssignedZones()) { doTouchUp(zone, t); if (t...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleTouchesUp"
"protected void handleTouchesUp() { for (Touch t : previousTouchState) { if (!currentTouchState.contains(t.sessionID)) { // the touch existed, but no longer exists, so it went up SMTUtilities.invoke(touchUp, applet, t); for (Zone zone : t.getAssignedZones()) { if (touchPrevZone.get(t) == zo...
Inversion-Mutation
megadiff
"protected MavenSession newMavenSession(MavenProject project, List<MavenProject> projects) throws Exception { MavenExecutionRequest request = newMavenExecutionRequest(new File(project.getBasedir(), "pom.xml")); MavenExecutionResult result = new DefaultMavenExecutionResult(); DefaultRepository...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "newMavenSession"
"protected MavenSession newMavenSession(MavenProject project, List<MavenProject> projects) throws Exception { MavenExecutionRequest request = newMavenExecutionRequest(new File(project.getBasedir(), "pom.xml")); MavenExecutionResult result = new DefaultMavenExecutionResult(); DefaultRepository...
Inversion-Mutation
megadiff
"@Override public View getView(int position, View convertView, final ViewGroup parent) { LinearLayout taskView; final Task task = getItem(position); final String taskText = task.getText(); boolean taskChecked = task.isChecked(); boolean taskArchived = task.isArchived(); ...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getView"
"@Override public View getView(int position, View convertView, final ViewGroup parent) { LinearLayout taskView; final Task task = getItem(position); final String taskText = task.getText(); boolean taskChecked = task.isChecked(); boolean taskArchived = task.isArchived(); ...
Inversion-Mutation
megadiff
"public CoreTexture2D( @Nonnull final CoreGL gl, @Nonnull final BufferFactory bufferFactory, final int textureId, final int target, final int level, final int internalFormat, final int width, final int height, final int b...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "CoreTexture2D"
"public CoreTexture2D( @Nonnull final CoreGL gl, @Nonnull final BufferFactory bufferFactory, final int textureId, final int target, final int level, final int internalFormat, final int width, final int height, final int b...
Inversion-Mutation
megadiff
"private void load() { synchronized(CodeEntry.class) { if(lpe != null) return; ClassLoader loader = loader(false); lpe = new TreeMap<String, Class<?>>(); try { for(Map.Entry<String, String> e : pe.entrySet()) { String name = e.getKey(); String clnm = e.getValue(); Class<?> c...
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "load"
"private void load() { synchronized(CodeEntry.class) { if(lpe != null) return; <MASK>lpe = new TreeMap<String, Class<?>>();</MASK> ClassLoader loader = loader(false); try { for(Map.Entry<String, String> e : pe.entrySet()) { String name = e.getKey(); String clnm = e.getValue(); ...