nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Node { private static final String LOCALHOST = "localhost" ; private static final String QUIT = "q" ; private static final int JOINING_NODES_COUNT = 2 ; private static final String REGOK = "REGOK" ; private static final String REG = "REG" ; private static final String SERVER_IP = "bootstrapServerIp" ; private static final String SERVER_PORT = "bootstrapServerPort" ; private static final String LOCAL_IP = "localIp" ; private static final String FILENAME = "fileName" ; private static final String UDP = "udp" ; private static final String WEB_SERVICE = "webService" ; private static final String PROPERTIES_FILE = "config.properties" ; private static String bootstrapServerIp ; private static int bootstrapServerPort ; private static boolean udp ; private static boolean webService ; private static String localIp ; private static String fileName ; private List < RoutingTableEntry > routingTable ; public List < RoutingTableEntry > getRoutingTable ( ) { } public List < String > getFileList ( ) { } private List < String > fileList ; private SocketServer server ; private UDPClient udpClient ; private WebServiceClient webServiceClient ; private InetAddress ipAddress ; private int port ; private Properties properties ; private Node ( ) { } public Node ( InetAddress ipAddress , int port ) { } public static void main ( String [ ] args ) throws IOException { } public static Properties loadProperties ( ) { } public String sendMessageToBS ( String msg ) throws IOException { } public boolean registerToBootstrapServer ( String ipAddress , int port , String userName ) throws IOException { } public void deregisterFromBS ( InetAddress bsAddress , int port , String username ) throws IOException { } private String createRegMessage ( String ipAddress , int port , String userName ) { } private boolean handleRegistrationMessage ( String msg ) { } private int [ ] randomNodeIndices ( int noOfNodes , int numberOfIndices ) { } private void joinWithNeighbours ( ) { } public void printRoutingTable ( ) { } public void loadFiles ( ) throws IOException { BufferedReader bufferedReader = new BufferedReader ( new FileReader ( Node . fileName ) ) ; List < String > temp = new ArrayList < > ( ) ; String line ; while ( ( line = bufferedReader . readLine ( ) ) != null ) { temp . add ( line . trim ( ) ) ; } int fileToSelect = ( ( int ) ( Math . floor ( ( ( Math . random ( ) ) * 3 ) ) ) ) + 3 ; <START_BUG> int [ ] randomIndices = randomNodeIndices ( temp . size ( ) , fileToSelect ) ; <END_BUG> for ( int i : randomIndices ) { fileList . add ( temp . get ( i ) ) ; } System . out . println ( ( fileToSelect + "files<seq2seq4repair_space>loaded" ) ) ; } public void printFiles ( ) { } public void search ( String searchMessage ) { } private String createSearchMessage ( int hops , String fileName , String ipAddress , String port ) { } private String createSearchOkMessage ( String ipAddress , String port , int hops , Set < String > filesFound ) { } public void initializeSearch ( String fileName ) { } }

Fix:
int [ ] randomIndices = randomNodeIndices ( ( ( temp . size ( ) ) - 1 ) , fileToSelect ) ;
Buggy code:
public class ExpressionAggregationFacetsExample { private final Directory indexDir = new RAMDirectory ( ) ; private final Directory taxoDir = new RAMDirectory ( ) ; private final FacetsConfig config = new FacetsConfig ( ) ; public ExpressionAggregationFacetsExample ( ) { } private void index ( ) throws IOException { IndexWriter indexWriter = new IndexWriter ( indexDir , new org . apache . lucene . index . IndexWriterConfig ( FacetExamples . EXAMPLES_VER , new org . apache . lucene . analysis . core . WhitespaceAnalyzer ( FacetExamples . EXAMPLES_VER ) ) ) ; DirectoryTaxonomyWriter taxoWriter = new DirectoryTaxonomyWriter ( taxoDir ) ; Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . TextField ( "c" , "foo<seq2seq4repair_space>bar" , Store . NO ) ) ; doc . add ( new NumericDocValuesField ( "popularity" , 5L ) ) ; doc . add ( new FacetField ( "A" , "B" ) ) ; indexWriter . addDocument ( config . build ( taxoWriter , doc ) ) ; doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . TextField ( "c" , "foo<seq2seq4repair_space>foo<seq2seq4repair_space>bar" , Store . NO ) ) ; doc . add ( new NumericDocValuesField ( "popularity" , 3L ) ) ; doc . add ( new FacetField ( "A" , "C" ) ) ; indexWriter . addDocument ( config . build ( taxoWriter , doc ) ) ; <START_BUG> indexWriter . close ( ) ; <END_BUG> taxoWriter . close ( ) ; } private FacetResult search ( ) throws IOException , ParseException { } public FacetResult runSearch ( ) throws IOException , ParseException { } public static void main ( String [ ] args ) throws Exception { } }

Fix:
indexWriter . shutdown ( ) ;
Buggy code:
public class SimpleTableTest extends TestCase { public SimpleTableTest ( ) { } public SimpleTableTest ( String arg0 ) { } public void testSimpleTable ( ) throws Exception { } private boolean validateDocument ( String document ) { HtmlDocumentValidator validator = new HtmlDocumentValidator ( ) ; Tag html = new Tag ( "html" ) ; Tag head = new Tag ( "head" ) ; html . addExpectedChild ( head ) ; Tag title = new Tag ( "title" ) ; head . addExpectedChild ( title ) ; <START_BUG> title . addExpectedChild ( new TextContent ( "Test<seq2seq4repair_space>Page" ) ) ; <END_BUG> Tag body = new Tag ( "body" ) ; html . addExpectedChild ( body ) ; Tag ul = new Tag ( "ul" ) ; ul . addExpectedChild ( new Tag ( "li" ) . addExpectedChild ( new Tag ( "span" ) . addExpectedChild ( new TextContent ( "one" ) ) ) ) ; ul . addExpectedChild ( new Tag ( "li" ) . addExpectedChild ( new Tag ( "span" ) . addExpectedChild ( new TextContent ( "two" ) ) ) ) ; ul . addExpectedChild ( new Tag ( "li" ) . addExpectedChild ( new Tag ( "span" ) . addExpectedChild ( new TextContent ( "three" ) ) ) ) ; body . addExpectedChild ( ul ) ; validator . addRootElement ( html ) ; return validator . isDocumentValid ( document ) ; } }

Fix:
title . addExpectedChild ( new TextContent ( "Simple<seq2seq4repair_space>Table<seq2seq4repair_space>Page" ) ) ;
Buggy code:
public class LocalAgentInstaller { protected static final AtomicReference < String > agentJar = new AtomicReference < String > ( null ) ; public static void main ( String [ ] args ) { } public static synchronized Instrumentation getInstrumentation ( ) { } public static synchronized Instrumentation getInstrumentation ( long timeout ) { } public static String createAgent ( ) { if ( ( LocalAgentInstaller . agentJar . get ( ) ) == null ) { synchronized ( LocalAgentInstaller . agentJar ) { if ( ( LocalAgentInstaller . agentJar . get ( ) ) == null ) { FileOutputStream fos = null ; JarOutputStream jos = null ; try { File tmpFile = File . createTempFile ( LocalAgentInstaller . class . getName ( ) , ".jar" ) ; System . out . println ( ( "Temp<seq2seq4repair_space>File:" + ( tmpFile . getAbsolutePath ( ) ) ) ) ; tmpFile . deleteOnExit ( ) ; ByteArrayInputStream bais = new ByteArrayInputStream ( ( ( "Manifest-Version:<seq2seq4repair_space>1.0\nAgent-Class:<seq2seq4repair_space>" + ( AgentInstrumentation . class . getName ( ) ) ) + "\n" ) . getBytes ( ) ) ; Manifest mf = new Manifest ( bais ) ; fos = new FileOutputStream ( tmpFile , false ) ; jos = new JarOutputStream ( fos , mf ) ; <START_BUG> LocalAgentInstaller . addClassesToJar ( jos , AgentInstrumentation . class , AgentInstrumentationMBean . class ) ; <END_BUG> jos . flush ( ) ; jos . close ( ) ; fos . flush ( ) ; fos . close ( ) ; LocalAgentInstaller . agentJar . set ( tmpFile . getAbsolutePath ( ) ) ; } catch ( Exception e ) { throw new RuntimeException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>write<seq2seq4repair_space>Agent<seq2seq4repair_space>installer<seq2seq4repair_space>Jar" , e ) ; } finally { if ( fos != null ) try { fos . close ( ) ; } catch ( Exception e ) { } } } } } return LocalAgentInstaller . agentJar . get ( ) ; } protected static void addClassesToJar ( JarOutputStream jos , Class < ? > ... clazzes ) throws IOException { } public static byte [ ] getClassBytes ( Class < ? > clazz ) { } }

Fix:
LocalAgentInstaller . addClassesToJar ( jos , AgentInstrumentation . class , AgentInstrumentationMBean . class , JMXHelper . class ) ;
Buggy code:
public class ReturnStatement extends Statement { public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( ReturnStatement . class , "expression" , Expression . class , ASTNode . OPTIONAL , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Expression optionalExpression = null ; ReturnStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { ReturnStatement result = new ReturnStatement ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . copyLeadingComment ( this ) ; result . setExpression ( ( ( Expression ) ( ASTNode . copySubtree ( target , getExpression ( ) ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class FieldDeclaration extends BodyDeclaration { private static final int LEGAL_MODIFIERS = ( ( ( ( ( ( Modifier . PUBLIC ) | ( Modifier . PRIVATE ) ) | ( Modifier . PROTECTED ) ) | ( Modifier . STATIC ) ) | ( Modifier . FINAL ) ) | ( Modifier . VOLATILE ) ) | ( Modifier . TRANSIENT ) ; private int modifiers = Modifier . NONE ; private Type baseType = null ; private ASTNode . NodeList variableDeclarationFragments = new ASTNode . NodeList ( true , VariableDeclarationFragment . class ) ; FieldDeclaration ( AST ast ) { } ASTNode clone ( AST target ) { } boolean equalSubtrees ( Object other ) { } void accept0 ( ASTVisitor visitor ) { } public int getModifiers ( ) { } public void setModifiers ( int modifiers ) { <START_BUG> modifiers &= ~ ( IConstants . AccDeprecated ) ; <END_BUG> if ( ( modifiers & ( ~ ( FieldDeclaration . LEGAL_MODIFIERS ) ) ) != 0 ) { throw new IllegalArgumentException ( ) ; } modifying ( ) ; this . modifiers = modifiers ; } public Type getType ( ) { } public void setType ( Type type ) { } public List fragments ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
modifiers &= CompilerModifiers . AccJustFlag ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class ArchiveTestCase { private static File cliArchiveFile ; @ ArquillianResource URL url ; @ Deployment public static Archive < ? > getDeployment ( ) { JavaArchive ja = ShrinkWrap . create ( JavaArchive . class , "dummy.jar" ) ; <START_BUG> ja . addClass ( DeployTestCase . class ) ; <END_BUG> return ja ; } @ BeforeClass public static void before ( ) throws Exception { } @ Test public void testDeployArchive ( ) throws Exception { } @ Test public void testUnDeployArchive ( ) throws Exception { } @ AfterClass public static void after ( ) throws Exception { } protected final String getBaseURL ( URL url ) throws MalformedURLException { } protected boolean checkUndeployed ( String spec ) { } }

Fix:
ja . addClass ( ArchiveTestCase . class ) ;
Buggy code:
public class HighamHall54IntegratorTest extends TestCase { public HighamHall54IntegratorTest ( String name ) { } public void testWrongDerivative ( ) { } public void testMinStep ( ) throws DerivativeException , IntegratorException { } public void testIncreasingTolerance ( ) throws DerivativeException , IntegratorException { } public void testSwitchingFunctions ( ) throws DerivativeException , IntegratorException { } public void testSwitchingFunctionsError ( ) throws DerivativeException , IntegratorException { final TestProblem1 pb = new TestProblem1 ( ) ; double minStep = 0 ; double maxStep = ( pb . getFinalTime ( ) ) - ( pb . getInitialTime ( ) ) ; double scalAbsoluteTolerance = 1.0E-8 ; double scalRelativeTolerance = 0.01 * scalAbsoluteTolerance ; FirstOrderIntegrator integ = new HighamHall54Integrator ( minStep , maxStep , scalAbsoluteTolerance , scalRelativeTolerance ) ; TestProblemHandler handler = new TestProblemHandler ( pb , integ ) ; integ . setStepHandler ( handler ) ; integ . addSwitchingFunction ( new SwitchingFunction ( ) { public int eventOccurred ( double t , double [ ] y ) { return SwitchingFunction . CONTINUE ; } public double g ( double t , double [ ] y ) throws SwitchException { double middle = ( ( pb . getInitialTime ( ) ) + ( pb . getFinalTime ( ) ) ) // 2 ; double offset = t - middle ; if ( offset > 0 ) { <START_BUG> throw new SwitchException ( "Evaluation<seq2seq4repair_space>failed<seq2seq4repair_space>for<seq2seq4repair_space>argument<seq2seq4repair_space>=<seq2seq4repair_space>{0}" , new Object [ ] { new Double ( t ) } ) ; <END_BUG> } return offset ; } public void resetState ( double t , double [ ] y ) { } private static final long serialVersionUID = 935652725339916361L ; } , Double . POSITIVE_INFINITY , ( 1.0E-8 * maxStep ) , 1000 ) ; try { integ . integrate ( pb , pb . getInitialTime ( ) , pb . getInitialState ( ) , pb . getFinalTime ( ) , new double [ pb . getDimension ( ) ] ) ; fail ( "an<seq2seq4repair_space>exception<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>thrown" ) ; } catch ( IntegratorException ie ) { } catch ( Exception e ) { fail ( "wrong<seq2seq4repair_space>exception<seq2seq4repair_space>type<seq2seq4repair_space>caught" ) ; } } public void testSwitchingFunctionsNoConvergence ( ) throws DerivativeException , IntegratorException { } public void testSanityChecks ( ) { } public void testKepler ( ) throws DerivativeException , IntegratorException { } private static class KeplerHandler implements StepHandler { public KeplerHandler ( TestProblem3 pb ) { } public boolean requiresDenseOutput ( ) { } public void reset ( ) { } public void handleStep ( StepInterpolator interpolator , boolean isLast ) { } private TestProblem3 pb ; private int nbSteps ; private double maxError ; } public static Test suite ( ) { } }

Fix:
throw new SwitchException ( "Evaluation<seq2seq4repair_space>failed<seq2seq4repair_space>for<seq2seq4repair_space>argument<seq2seq4repair_space>=<seq2seq4repair_space>{0}" , new Object [ ] { Double . valueOf ( t ) } ) ;
Buggy code:
public class CookieTest extends TestCase { private static Log log = LogFactory . getLog ( CookieTest . class ) ; private MockWebApplication application ; private SignInPanel panel ; private Form form ; private Cookie cookieUsername ; private Cookie cookiePassword ; private Cookie [ ] cookies ; private WebPage page ; private WebRequestCycle cycle ; public CookieTest ( String name ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; application = new MockWebApplication ( null ) ; application . getRequiredPageSettings ( ) . setHomePage ( MockPage . class ) ; application . setupRequestAndResponse ( ) ; <START_BUG> final ISecuritySettings settings = application . getSettings ( ) ; <END_BUG> settings . setCryptFactory ( new NoCryptFactory ( ) ) ; this . panel = new SignInPanel ( "panel" ) { public boolean signIn ( final String username , final String password ) { return true ; } } ; this . panel . setPersistent ( true ) ; this . form = ( ( Form ) ( panel . get ( "signInForm" ) ) ) ; final ICrypt crypt = application . getSecuritySettings ( ) . getCryptFactory ( ) . newCrypt ( ) ; final String encryptedPassword = crypt . encrypt ( "test" ) ; assertNotNull ( encryptedPassword ) ; this . cookieUsername = new Cookie ( "panel:signInForm:username" , "juergen" ) ; this . cookiePassword = new Cookie ( "panel:signInForm:password" , encryptedPassword ) ; this . cookies = new Cookie [ ] { cookieUsername , cookiePassword } ; application . getServletRequest ( ) . setCookies ( cookies ) ; cycle = new WebRequestCycle ( application . getWicketSession ( ) , application . getWicketRequest ( ) , application . getWicketResponse ( ) ) ; this . page = new MockPage ( null ) ; page . add ( this . panel ) ; WebRequestCycle cycle = new WebRequestCycle ( application . getWicketSession ( ) , application . getWicketRequest ( ) , application . getWicketResponse ( ) ) ; } public void testSetCookieOnForm ( ) throws IOException , ServletException { } public void testPersistCookieWithPersistenceDisabled ( ) throws IOException , ServletException { } public void testPersistCookie ( ) throws IOException , ServletException { } public void testRemoveFromPage ( ) throws IOException , ServletException { } }

Fix:
final ISecuritySettings settings = application . getSecuritySettings ( ) ;
Buggy code:
public class DynamicSkill extends Skill implements PassiveSkill , SkillShot , Listener { private HashMap < Trigger , EffectComponent > components = new HashMap < Trigger , EffectComponent > ( ) ; private HashMap < UUID , Integer > active = new HashMap < UUID , Integer > ( ) ; public DynamicSkill ( String name ) { } public void addComponent ( Trigger trigger , EffectComponent component ) { } public boolean canCast ( ) { } @ Override public void update ( LivingEntity user , int prevLevel , int newLevel ) { } @ Override public void initialize ( LivingEntity user , int level ) { } @ Override public void stopEffects ( LivingEntity user , int level ) { } @ Override public boolean cast ( LivingEntity user , int level ) { } @ EventHandler public void onDeath ( EntityDeathEvent event ) { } @ EventHandler public void onPhysical ( PhysicalDamageEvent event ) { } @ EventHandler public void onSkillDamage ( SkillDamageEvent event ) { } @ EventHandler public void onCrouch ( PlayerToggleSneakEvent event ) { } private boolean trigger ( LivingEntity user , LivingEntity target , int level , Trigger trigger ) { } @ Override public void load ( ConfigurationSection config ) { ConfigurationSection triggers = config . getConfigurationSection ( "components" ) ; if ( triggers != null ) { for ( String key : triggers . getKeys ( false ) ) { try { <START_BUG> Trigger trigger = Trigger . valueOf ( key . toUpperCase ( ) . replace ( '<seq2seq4repair_space>' , '_' ) ) ; <END_BUG> EffectComponent component = trigger . getComponent ( ) ; component . load ( this , triggers . getConfigurationSection ( key ) ) ; components . put ( trigger , component ) ; } catch ( Exception ex ) { Bukkit . getLogger ( ) . warning ( ( ( ( ( "Invalid<seq2seq4repair_space>trigger<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>skill<seq2seq4repair_space>\"" + ( getName ( ) ) ) + "\"<seq2seq4repair_space>-<seq2seq4repair_space>\"" ) + key ) + "\"" ) ) ; } } } super . load ( config ) ; } @ Override public void save ( ConfigurationSection config ) { } }

Fix:
Trigger trigger = Trigger . valueOf ( key . toUpperCase ( ) . replace ( '<seq2seq4repair_space>' , '_' ) . replaceAll ( "-.+" , "" ) ) ;
Buggy code:
public class ModuleDependencyProcessor implements DeploymentUnitProcessor { public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; List < ResourceRoot > allResourceRoots = DeploymentUtils . allResourceRoots ( deploymentUnit ) ; for ( ResourceRoot resourceRoot : allResourceRoots ) { final Manifest manifest = resourceRoot . getAttachment ( MANIFEST ) ; if ( manifest == null ) continue ; final ServiceModuleLoader deploymentModuleLoader = deploymentUnit . getAttachment ( SERVICE_MODULE_LOADER ) ; final String dependencyString = manifest . getMainAttributes ( ) . getValue ( "Dependencies" ) ; if ( dependencyString == null ) return ; final String [ ] dependencyDefs = dependencyString . split ( "," ) ; for ( String dependencyDef : dependencyDefs ) { final String [ ] dependencyParts = dependencyDef . split ( "<seq2seq4repair_space>" ) ; final int dependencyPartsLength = dependencyParts . length ; if ( dependencyPartsLength == 0 ) throw new RuntimeException ( ( "Invalid<seq2seq4repair_space>dependency:<seq2seq4repair_space>" + dependencyString ) ) ; final ModuleIdentifier dependencyId = ModuleIdentifier . fromString ( dependencyParts [ 0 ] ) ; boolean export = parseOptionalExportParams ( dependencyParts , "export" ) ; boolean optional = parseOptionalExportParams ( dependencyParts , "optional" ) ; final ModuleLoader dependencyLoader ; if ( dependencyId . getName ( ) . startsWith ( "deployment." ) ) { dependencyLoader = deploymentModuleLoader ; } else { <START_BUG> dependencyLoader = Module . getSystemModuleLoader ( ) ; <END_BUG> } ModuleDependency dependency = new ModuleDependency ( dependencyLoader , dependencyId , optional , export , false ) ; moduleSpecification . addDependency ( dependency ) ; } } } public void undeploy ( final DeploymentUnit context ) { } private boolean parseOptionalExportParams ( final String [ ] parts , final String expected ) { } }

Fix:
dependencyLoader = Module . getBootModuleLoader ( ) ;
Buggy code:
@ Local public interface CoreDBServiceFacade < E , I extends Serializable > { public Session getCurrentSession ( ) { } public E getById ( I id ) { } public E getByCriteria ( Criterion criterion ) { } public E getByCriterionID ( Criterion criterion ) { } public List < E > getAll ( ) { } public List < E > getAllByCriteria ( Criterion criterion ) { } public List < E > getByCriteriaWithLimit ( Criterion criterion , Integer count ) { } public List < E > getByCriteriaByOrder ( Criterion criterion , String order , String [ ] orderBy , Integer count ) { } public List < E > getByCriteriaWithAliasByOrder ( Criterion criterion , String order , String [ ] orderBy , Integer count , String aliasTable , Criterion aliasCriterion ) { } public List < E > getByCriteriaWithInnerJoinByOrder ( Criterion criterion , String order , String [ ] orderBy , Integer count , String aliasTable , Criterion aliasCriterion ) { } public void update ( E e ) { } public void update ( List < E > entityCollection ) { } public Object merge ( E e ) { } public void merge ( List < E > entityCollection ) { } <START_BUG> public E save ( E e ) ; <END_BUG> public void save ( List < E > entityCollection ) { } public void delete ( E e ) { } public void delete ( List < E > entityCollection ) { } public void deleteByCriteria ( Criterion criterion ) { } public EntityManager getEntityManager ( ) { } public int setEntityManager ( EntityManager em ) { } }

Fix:
public I save ( E e ) ;
Buggy code:
public class ExportFeatureTest extends AbstractExtensionTest { private ExportFeature exportFeature ; @ Test public void shoud_handle_filter_export ( ) { } @ Test public void shoud_handle_controller_export_with_GET_and_no_extra_param ( ) { } @ Test public void shoud_handle_controller_export_with_GET_existing_params_and_no_extra_param ( ) { } @ Test public void shoud_handle_controller_export_with_POST_and_no_extra_param ( ) { exportFeature = new ExportFeature ( ) ; ExportConf exportConf = new ExportConf ( "csv" ) ; exportConf . setHasCustomUrl ( true ) ; exportConf . setUrl ( "//myExportUrl" ) ; exportConf . setMethod ( POST ) ; exportConf . setLabel ( "CSV" ) ; table . getTableConfiguration ( ) . getExportConfiguration ( ) . put ( "csv" , exportConf ) ; extensionProcessor . process ( new HashSet < com . github . dandelion . datatables . core . extension . Extension > ( Arrays . asList ( exportFeature ) ) ) ; assertThat ( AssetRequestContext . get ( table . getTableConfiguration ( ) . getRequest ( ) ) . getBundles ( true ) ) . contains ( JQUERY_DOWNLOAD . getBundleName ( ) ) ; <START_BUG> assertThat ( exportFeature . getBeforeAll ( ) . toString ( ) ) . isEqualTo ( "function<seq2seq4repair_space>ddl_dt_launch_export_fakeId_csv(){$.download(\'//myExportUrl\',<seq2seq4repair_space>decodeURIComponent($.param(oTable_fakeId.ajax.params())).replace(//\\+//g,\'<seq2seq4repair_space>\'),\'POST\'));}" ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
assertThat ( exportFeature . getBeforeAll ( ) . toString ( ) ) . isEqualTo ( "function<seq2seq4repair_space>ddl_dt_launch_export_fakeId_csv(){$.download(\'//myExportUrl\',<seq2seq4repair_space>decodeURIComponent($.param(oTable_fakeId.ajax.params())).replace(//\\+//g,\'<seq2seq4repair_space>\'),\'POST\');}" ) ;
Buggy code:
public class AllPlaylistsFragment extends Fragment { private static final String TAG = AllPlaylistsFragment . class . getCanonicalName ( ) ; private RecyclerView mRecyclerView ; private PlaylistAdapter mAdapter ; private LayoutManager mLayoutManager ; private FloatingActionButton addPlaylistButton ; private Context mContext ; private List < Playlist > playlists ; private Comparator < Playlist > alphabeticalPlaylistComparator = new Comparator < Playlist > ( ) { public int compare ( Playlist p1 , Playlist p2 ) { } } ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View view = inflater . inflate ( fragment_all_playlists , container , false ) ; mRecyclerView = ( ( RecyclerView ) ( view . findViewById ( playlist_view ) ) ) ; ( ( itukraine . com . ua . bestmobile . MainActivity ) ( getActivity ( ) ) ) . getToolbar ( ) . setTitle ( R . string . playlists ) ; addPlaylistButton = ( ( FloatingActionButton ) ( view . findViewById ( add_playlist_button ) ) ) ; <START_BUG> addPlaylistButton . setBackgroundTintList ( getResources ( ) . getColorStateList ( colorAccent ) ) ; <END_BUG> addPlaylistButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { displayPlaylistTitleDialog ( null , true ) ; } } ) ; mRecyclerView . setHasFixedSize ( true ) ; mLayoutManager = new android . support . v7 . widget . LinearLayoutManager ( mContext ) ; mRecyclerView . setLayoutManager ( mLayoutManager ) ; playlists = DatabaseHelper . getInstance ( mContext ) . getPlaylists ( ) ; playlists . add ( new Playlist ( getResources ( ) . getString ( all_songs_playlist_name ) ) ) ; Collections . sort ( playlists , alphabeticalPlaylistComparator ) ; mAdapter = new PlaylistAdapter ( mContext , playlists ) ; mRecyclerView . setAdapter ( mAdapter ) ; mRecyclerView . addItemDecoration ( new itukraine . com . ua . bestmobile . view . RecyclerViewLineDevider ( getResources ( ) ) ) ; mRecyclerView . addOnItemTouchListener ( new RecyclerItemClickListener ( mContext , new AllPlaylistsFragment . OnItemClickListener ( ) ) ) ; return view ; } @ Override public void onAttach ( Context context ) { } private void displayConfirmDeleteDialog ( final int position ) { } private void displayPlaylistTitleDialog ( final Integer position , final boolean isNewPlaylist ) { } private class OnItemClickListener extends RecyclerItemClickListener . SimpleOnItemClickListener { @ Override public void onItemClick ( View childView , int position ) { } @ Override public void onItemLongPress ( View childView , final int position ) { } } }

Fix:
addPlaylistButton . setBackgroundTintList ( getResources ( ) . getColorStateList ( colorPrimary ) ) ;
Buggy code:
public class NativeManagementWriteAttributeHandler extends AbstractWriteAttributeHandler < Void > { public static OperationStepHandler INSTANCE = new NativeManagementWriteAttributeHandler ( ) ; private NativeManagementWriteAttributeHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } @ Override protected boolean applyUpdateToRuntime ( final OperationContext context , final ModelNode operation , final String attributeName , final ModelNode resolvedValue , final ModelNode currentValue , HandbackHolder < Void > handbackHolder ) throws OperationFailedException { } @ Override protected void revertUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode valueToRestore , ModelNode valueToRevert , Void handback ) throws OperationFailedException { } private void installNativeManagementService ( final OperationContext context , final ModelNode subModel , final ServiceVerificationHandler verificationHandler ) throws OperationFailedException { final ModelNode portNode = NATIVE_PORT . resolveModelAttribute ( context , subModel ) ; int port = ( portNode . isDefined ( ) ) ? portNode . asInt ( ) : 0 ; <START_BUG> ManagementRemotingServices . removeConnectorServices ( context , MANAGEMENT_CONNECTOR , port ) ; <END_BUG> NativeManagementAddHandler . installNativeManagementConnector ( context , subModel , MANAGEMENT_ENDPOINT , context . getServiceTarget ( ) , verificationHandler , null ) ; } }

Fix:
ManagementRemotingServices . removeConnectorServices ( context , MANAGEMENT_CONNECTOR ) ;
Buggy code:
public class JaxRs_ServiceMethodProvider extends AbstractInformationProvider { private JaxRs_Compatibility parser ; public JaxRs_ServiceMethodProvider ( Analyzer analyzer ) { } @ Override public String getName ( ) { } @ Override public String getDescription ( ) { } @ Override public List < Information > resolve ( InformationType expectedInformation , ParameterList parameters ) { } @ Override public InformationNeedDescription getProvidedInformation ( ) { ParametersTypes parametersTypes = new ParametersTypes ( ) ; <START_BUG> parametersTypes . add ( new InformationType ( Element . class , "http:////cos.ontoware.org//cos#web-service" , "JaxRs.ServiceName" ) ) ; <END_BUG> InformationType informationType = new InformationType ( Element . class , "http:////cm.tm.kit.edu//ws#method" , getDescription ( ) ) ; return new InformationNeedDescription ( informationType , parametersTypes ) ; } }

Fix:
parametersTypes . add ( new InformationType ( Element . class , "http:////cos.ontoware.org//cos#web-service" , "JaxRs.Service" ) ) ;
Buggy code:
public class PieChartController { @ FXML PieChart chart ; @ FXML public void initialize ( ) { <START_BUG> chart . setTitle ( "Pie<seq2seq4repair_space>Chart" ) ; <END_BUG> chart . setClockwise ( true ) ; chart . setLegendVisible ( true ) ; } public void setMain ( MainIoT main , String string ) { } }

Fix:
chart . setTitle ( "Percentage<seq2seq4repair_space>per<seq2seq4repair_space>connection<seq2seq4repair_space>type" ) ;
Buggy code:
@ ManagedBean @ SessionScoped public class BirtEngine implements Serializable { private static final long serialVersionUID = 1L ; private DesignConfig config ; private IDesignEngine engine ; private IDesignEngineFactory factory ; private ReportDesignHandle design ; private SessionHandle session ; private ElementFactory efactory ; private DesignElementHandle element ; private String xmlSource ; public BirtEngine ( ) { } public void createNewDesign ( String rptdesign ) { } public void save ( ) { } public String getSource ( ) { } public void createDataSource ( ) { try { FacesContext facesContext = FacesContext . getCurrentInstance ( ) ; XmlSource xmlSource = ( ( XmlSource ) ( facesContext . getApplication ( ) . getVariableResolver ( ) . resolveVariable ( facesContext , "xmlSource" ) ) ) ; NewDataSourceBean dataSourceBean = ( ( NewDataSourceBean ) ( facesContext . getApplication ( ) . getVariableResolver ( ) . resolveVariable ( facesContext , "newDataSourceBean" ) ) ) ; <START_BUG> OdaDataSourceHandle dataSourceHandle = efactory . newOdaDataSource ( dataSourceBean . getDriverName ( ) , "org.eclipse.birt.report.data.oda.jdbc" ) ; <END_BUG> dataSourceHandle . setProperty ( "odaDriverClass" , dataSourceBean . getDriverClass ( ) ) ; dataSourceHandle . setProperty ( "odaURL" , dataSourceBean . getUrl ( ) ) ; dataSourceHandle . setProperty ( "odaUser" , dataSourceBean . getUsername ( ) ) ; dataSourceHandle . setProperty ( "odaPassword" , dataSourceBean . getPassword ( ) ) ; design . getDataSources ( ) . add ( dataSourceHandle ) ; saveAs ( "Temp.rptdesign" ) ; open ( "Temp.rptdesign" ) ; xmlSource . setXmlSource ( this . xmlSource ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } public String getXmlSource ( ) { } public void createDataSet ( ) { } public void saveAs ( String rptdesign ) { } @ SuppressWarnings ( "resource" ) public void open ( String rptdesign ) { } public void createMasterPage ( String masterPage ) { } }

Fix:
OdaDataSourceHandle dataSourceHandle = efactory . newOdaDataSource ( dataSourceBean . getDriverName ( ) , dataSourceBean . getDriverClass ( ) ) ;
Buggy code:
public class ScanFace extends JPanel { private static final long serialVersionUID = 1L ; public JPanel mainPanel ; public JTable wiretable ; GenDocument doc ; private JTable datatable ; private final Accelerator accl ; private NewWireDataPanel newwiredatapanel ; JScrollPane wirescrollpane ; DataTableModel wiretablemodel ; JButton sequencebutton ; JButton scanbutton ; JButton abortbutton ; JButton homebutton ; ArrayList < AcceleratorNode > openwires ; public ScanFace ( GenDocument aDocument ) { } public void addComponents ( ) { } public void makeComponents ( ) { } public void setAction ( ) { } private void startScans ( ArrayList < WireScanner > scanwires ) { Iterator < WireScanner > itr = scanwires . iterator ( ) ; while ( itr . hasNext ( ) ) { WireScanner ws = itr . next ( ) ; try { <START_BUG> ws . runCommand ( SCAN ) ; <END_BUG> } catch ( ConnectionException ce ) { System . out . println ( ( "Can<seq2seq4repair_space>not<seq2seq4repair_space>connect<seq2seq4repair_space>to<seq2seq4repair_space>" + ( ws . getId ( ) ) ) ) ; } catch ( PutException ge ) { System . out . println ( ( "Can<seq2seq4repair_space>not<seq2seq4repair_space>put<seq2seq4repair_space>run<seq2seq4repair_space>command<seq2seq4repair_space>arguments<seq2seq4repair_space>for<seq2seq4repair_space>" + ( ws . getId ( ) ) ) ) ; } catch ( InterruptedException e ) { System . out . println ( ( "Can<seq2seq4repair_space>not<seq2seq4repair_space>put<seq2seq4repair_space>run<seq2seq4repair_space>command<seq2seq4repair_space>arguments<seq2seq4repair_space>for<seq2seq4repair_space>" + ( ws . getId ( ) ) ) ) ; } } } private void abortScans ( ArrayList < WireScanner > scanwires ) { } public void makeWireTable ( ) { } }

Fix:
ws . runCommand ( XPRT_SCAN ) ;
Buggy code:
public class TestStatPredicate implements Predicate < GameState > { private static final Map < String , List < Boolean > > VALUES_MAPPINGS = new HashMap < > ( ) ; private List < Boolean > acceptableValues ; private Integer valueToCompare ; private String stat ; private boolean useInitialValue ; public TestStatPredicate ( Element element ) { } @ Override public boolean apply ( GameState gameState ) { } private Integer getStatValue ( AbstractEntityState entityStateToTest , GameState gameState ) throws IllegalAccessException , NoSuchMethodException , InvocationTargetException { } private Integer getNonAttackStrengthStatValue ( AbstractEntityState entityStateToTest ) throws IllegalAccessException , NoSuchMethodException , InvocationTargetException { } protected int getAttackStrength ( GameState gameState ) { <START_BUG> return gameState . getBattleState ( ) . getCurrentAttackStrengths ( ) . getPlayerAttackStrength ( ) ; <END_BUG> } protected int getHitCount ( GameState gameState ) { } protected AbstractEntityState getEntityStateToTest ( GameState gameState ) { } }

Fix:
return gameState . getBattleState ( ) . getCurrentAttackStrengths ( ) . getPlayerAttackStrength ( ) . getTotal ( ) ;
Buggy code:
public class SimpleStringOperatorNode extends UnaryOperatorNode { public void init ( Object operand , Object methodName ) { } public ValueNode bindExpression ( FromList fromList , SubqueryList subqueryList , Vector aggregateVector ) throws StandardException { TypeId operandType ; bindOperand ( fromList , subqueryList , aggregateVector ) ; operandType = operand . getTypeId ( ) ; switch ( operandType . getJDBCTypeId ( ) ) { case Types . CHAR : case Types . VARCHAR : case Types . LONGVARCHAR : case Types . CLOB : break ; <START_BUG> case JDBC20Translation . SQL_TYPES_JAVA_OBJECT : <END_BUG> case Types . OTHER : { throw StandardException . newException ( LANG_UNARY_FUNCTION_BAD_TYPE , methodName , operandType . getSQLTypeName ( ) ) ; } default : DataTypeDescriptor dtd = DataTypeDescriptor . getBuiltInDataTypeDescriptor ( Types . VARCHAR , true , operand . getTypeCompiler ( ) . getCastToCharWidth ( operand . getTypeServices ( ) ) ) ; operand = ( ( ValueNode ) ( getNodeFactory ( ) . getNode ( CAST_NODE , operand , dtd , getContextManager ( ) ) ) ) ; operand . setCollationUsingCompilationSchema ( ) ; ( ( CastNode ) ( operand ) ) . bindCastNodeOnly ( ) ; operandType = operand . getTypeId ( ) ; } setType ( new DataTypeDescriptor ( operandType , operand . getTypeServices ( ) . isNullable ( ) , operand . getTypeCompiler ( ) . getCastToCharWidth ( operand . getTypeServices ( ) ) ) ) ; setCollationInfo ( operand . getTypeServices ( ) ) ; return this ; } void bindParameter ( ) throws StandardException { } public String getReceiverInterfaceName ( ) { } }

Fix:
case Types . JAVA_OBJECT :
Buggy code:
public abstract class AbstractSequenceSubSketches < T extends AbstractSequenceSubSketches < T , S > , S extends Sketch < S > > { protected final S [ ] sequence ; private final int stepSize ; private final int seqLength ; protected AbstractSequenceSubSketches ( S [ ] sequence , int stepSize , int seqLength ) { } public Alignment < AlignElementSketch < S > > localAlignOneSkip ( Aligner < AlignElementSketch < S > > aligner , T b ) { } public OverlapInfo getOverlapInfo ( Aligner < AlignElementSketch < S > > aligner , T b ) { Alignment < AlignElementSketch < S > > aligment = localAlignOneSkip ( aligner , b ) ; int a1 = Math . min ( getSequenceLength ( ) , ( ( aligment . getA1 ( ) ) * ( this . stepSize ) ) ) ; <START_BUG> int a2 = Math . min ( this . getSequenceLength ( ) , ( ( aligment . getA2 ( ) ) * ( this . stepSize ) ) ) ; <END_BUG> int b1 = Math . min ( b . getSequenceLength ( ) , ( ( aligment . getB1 ( ) ) * ( this . stepSize ) ) ) ; int b2 = Math . min ( b . getSequenceLength ( ) , ( ( aligment . getB2 ( ) ) * ( this . stepSize ) ) ) ; return new OverlapInfo ( ( ( aligment . getScore ( ) ) // 100000.0 ) , aligment . getScore ( ) , a1 , a2 , b1 , b2 ) ; } public int getSequenceLength ( ) { } public int getStepSize ( ) { } public int length ( ) { } }

Fix:
int a2 = Math . min ( getSequenceLength ( ) , ( ( aligment . getA2 ( ) ) * ( this . stepSize ) ) ) ;
Buggy code:
public class Lander extends AnimatedActor { private GreenfootSound landSound ; private GreenfootSound engineSound ; public Lander ( ) { } public void act ( ) { ArrayList < CollisionActor > others = ( ( GameWorld ) ( getWorld ( ) ) ) . getCollisionActors ( ) ; for ( CollisionActor other : others ) { if ( this . intersects ( other ) ) { <START_BUG> if ( ( ( ( Math . abs ( ( ( GameWorld ) ( getWorld ( ) ) ) . vx ) ) > 2 ) || ( ( ( ( GameWorld ) ( getWorld ( ) ) ) . vy ) < ( - 4 ) ) ) || ( ( ( ( GameWorld ) ( getWorld ( ) ) ) . vy ) > 0 ) ) { <END_BUG> System . out . println ( "CRASH<seq2seq4repair_space>-<seq2seq4repair_space>TOO<seq2seq4repair_space>FAST" ) ; } else if ( ( getY ( ) ) > ( other . getY ( ) ) ) { System . out . println ( "CRASH<seq2seq4repair_space>-<seq2seq4repair_space>TOO<seq2seq4repair_space>LOW" ) ; } else { ( ( GameWorld ) ( getWorld ( ) ) ) . setYVel ( 0 ) ; ( ( GameWorld ) ( getWorld ( ) ) ) . setXVel ( 0 ) ; ( ( GameWorld ) ( getWorld ( ) ) ) . landed = true ; } } } if ( ( Greenfoot . isKeyDown ( "w" ) ) || ( Greenfoot . isKeyDown ( "up" ) ) ) { ( ( GameWorld ) ( getWorld ( ) ) ) . landed = false ; ( ( GameWorld ) ( getWorld ( ) ) ) . addYVel ( 0.4 ) ; } if ( ( ( Greenfoot . isKeyDown ( "a" ) ) || ( Greenfoot . isKeyDown ( "left" ) ) ) && ( ! ( ( ( GameWorld ) ( getWorld ( ) ) ) . landed ) ) ) { ( ( GameWorld ) ( getWorld ( ) ) ) . addXVel ( 0.2 ) ; } if ( ( ( Greenfoot . isKeyDown ( "d" ) ) || ( Greenfoot . isKeyDown ( "right" ) ) ) && ( ! ( ( ( GameWorld ) ( getWorld ( ) ) ) . landed ) ) ) { ( ( GameWorld ) ( getWorld ( ) ) ) . addXVel ( ( - 0.2 ) ) ; } super . act ( ) ; } }

Fix:
if ( ( ( ( Math . abs ( ( ( GameWorld ) ( getWorld ( ) ) ) . vx ) ) > 2 ) || ( ( ( ( GameWorld ) ( getWorld ( ) ) ) . vy ) < ( - 4 ) ) ) || ( ( ( ( GameWorld ) ( getWorld ( ) ) ) . vy ) > 0.5 ) ) {
Buggy code:
public class SuffixFileFilter extends AbstractFileFilter implements Serializable { private final String [ ] suffixes ; private final IOCase caseSensitivity ; public SuffixFileFilter ( String suffix ) { } public SuffixFileFilter ( String suffix , IOCase caseSensitivity ) { } public SuffixFileFilter ( String [ ] suffixes ) { } public SuffixFileFilter ( String [ ] suffixes , IOCase caseSensitivity ) { } public SuffixFileFilter ( List < String > suffixes ) { } public SuffixFileFilter ( List < String > suffixes , IOCase caseSensitivity ) { } public boolean accept ( File file ) { } public boolean accept ( File file , String name ) { } public String toString ( ) { <START_BUG> StringBuffer buffer = new StringBuffer ( ) ; <END_BUG> buffer . append ( super . toString ( ) ) ; buffer . append ( "(" ) ; if ( ( suffixes ) != null ) { for ( int i = 0 ; i < ( suffixes . length ) ; i ++ ) { if ( i > 0 ) { buffer . append ( "," ) ; } buffer . append ( suffixes [ i ] ) ; } } buffer . append ( ")" ) ; return buffer . toString ( ) ; } }

Fix:
StringBuilder buffer = new StringBuilder ( ) ;
Buggy code:
public abstract class ArchiveFileSet extends FileSet { private static final int BASE_OCTAL = 8 ; public static final int DEFAULT_DIR_MODE = ( UnixStat . DIR_FLAG ) | ( UnixStat . DEFAULT_DIR_PERM ) ; public static final int DEFAULT_FILE_MODE = ( UnixStat . FILE_FLAG ) | ( UnixStat . DEFAULT_FILE_PERM ) ; private Resource src = null ; private String prefix = "" ; private String fullpath = "" ; private boolean hasDir = false ; private int fileMode = ArchiveFileSet . DEFAULT_FILE_MODE ; private int dirMode = ArchiveFileSet . DEFAULT_DIR_MODE ; private boolean fileModeHasBeenSet = false ; private boolean dirModeHasBeenSet = false ; public ArchiveFileSet ( ) { } protected ArchiveFileSet ( FileSet fileset ) { } protected ArchiveFileSet ( ArchiveFileSet fileset ) { } public void setDir ( File dir ) throws BuildException { } public void addConfigured ( ResourceCollection a ) { } public void setSrc ( File srcFile ) { } public void setSrcResource ( Resource src ) { } public File getSrc ( Project p ) { } public File getSrc ( ) { } public void setPrefix ( String prefix ) { } public String getPrefix ( Project p ) { } public void setFullpath ( String fullpath ) { } public String getFullpath ( Project p ) { } protected abstract ArchiveScanner newArchiveScanner ( ) { } public DirectoryScanner getDirectoryScanner ( Project p ) { } public Iterator iterator ( ) { if ( isReference ( ) ) { return ( ( ResourceCollection ) ( getRef ( getProject ( ) ) ) ) . iterator ( ) ; } if ( ( src ) == null ) { return super . iterator ( ) ; } ArchiveScanner as = ( ( ArchiveScanner ) ( getDirectoryScanner ( getProject ( ) ) ) ) ; <START_BUG> return as . getResourceFiles ( ) ; <END_BUG> } public int size ( ) { } public boolean isFilesystemOnly ( ) { } public void setFileMode ( String octalString ) { } public void integerSetFileMode ( int mode ) { } public int getFileMode ( Project p ) { } public boolean hasFileModeBeenSet ( ) { } public void setDirMode ( String octalString ) { } public void integerSetDirMode ( int mode ) { } public int getDirMode ( Project p ) { } public boolean hasDirModeBeenSet ( ) { } protected void configureFileSet ( ArchiveFileSet zfs ) { } public Object clone ( ) { } public String toString ( ) { } public String getPrefix ( ) { } public String getFullpath ( ) { } public int getFileMode ( ) { } public int getDirMode ( ) { } private void checkArchiveAttributesAllowed ( ) { } }

Fix:
return as . getResourceFiles ( getProject ( ) ) ;
Buggy code:
public class CeylonEnter extends Enter { public static CeylonEnter instance ( Context context ) { } private CeylonTransformer gen ; private boolean hasRun = false ; private PhasedUnits phasedUnits ; private Context ceylonContext ; private Log log ; private CeylonModelLoader modelLoader ; private Options options ; private Paths paths ; private CeyloncFileManager fileManager ; private JavaCompiler compiler ; protected CeylonEnter ( Context context ) { } @ Override public void main ( List < JCCompilationUnit > trees ) { } @ Override protected Type classEnter ( JCTree tree , Env < AttrContext > env ) { } private void printModules ( ) { } public void completeCeylonTrees ( List < JCCompilationUnit > trees ) { } private void resolveModuleDependencies ( ) { } public void addModuleToClassPath ( Module module , boolean errorIfMissing ) { } private boolean addModuleFromRepository ( Module module , File repository , Paths . Path classPath ) { } private void typeCheck ( ) { final java . util . List < PhasedUnit > listOfUnits = phasedUnits . getPhasedUnits ( ) ; for ( PhasedUnit pu : listOfUnits ) { pu . validateTree ( ) ; pu . scanDeclarations ( ) ; } for ( PhasedUnit pu : listOfUnits ) { pu . scanTypeDeclarations ( ) ; } for ( PhasedUnit pu : listOfUnits ) { pu . validateRefinement ( ) ; } for ( PhasedUnit pu : listOfUnits ) { pu . analyseTypes ( ) ; } for ( PhasedUnit pu : listOfUnits ) { pu . analyseFlow ( ) ; } BoxingDeclarationVisitor boxingDeclarationVisitor = new BoxingDeclarationVisitor ( gen ) ; BoxingVisitor boxingVisitor = new BoxingVisitor ( gen ) ; for ( PhasedUnit pu : listOfUnits ) { pu . getCompilationUnit ( ) . visit ( boxingDeclarationVisitor ) ; } for ( PhasedUnit pu : listOfUnits ) { pu . getCompilationUnit ( ) . visit ( boxingVisitor ) ; } for ( PhasedUnit pu : listOfUnits ) { pu . getCompilationUnit ( ) . visit ( new CeylonEnter . JavacAssertionVisitor ( ( ( CeylonPhasedUnit ) ( pu ) ) ) { @ Override protected void out ( UnexpectedError err ) { logError ( getPosition ( err . getTreeNode ( ) ) , err . getMessage ( ) ) ; } @ Override protected void out ( AnalysisError err ) { logError ( getPosition ( err . getTreeNode ( ) ) , err . getMessage ( ) ) ; } @ Override protected void out ( AnalysisWarning err ) { <START_BUG> logWarning ( getPosition ( err . getTreeNode ( ) ) , err . getMessage ( ) ) ; <END_BUG> } @ Override protected void out ( Node that , String message ) { logError ( getPosition ( that ) , message ) ; } } ) ; } } private void printGeneratorErrors ( ) { } protected void logError ( int position , String message ) { } protected void logWarning ( int position , String message ) { } private class JavacAssertionVisitor extends AssertionVisitor { private CeylonPhasedUnit cpu ; JavacAssertionVisitor ( CeylonPhasedUnit cpu ) { } protected int getPosition ( Node node ) { } } public boolean hasRun ( ) { } }

Fix:
logError ( getPosition ( err . getTreeNode ( ) ) , err . getMessage ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class ApplicationPathOverrideIntegrationTestCase { @ Deployment ( testable = false ) public static Archive < ? > deploy ( ) { WebArchive war = ShrinkWrap . create ( WebArchive . class , "jaxrsapp.war" ) ; war . addPackage ( HttpRequest . class . getPackage ( ) ) ; war . addClasses ( ApplicationPathOverrideIntegrationTestCase . class , HelloWorldResource . class , HelloWorldPathApplication . class ) ; <START_BUG> war . addAsWebResource ( WebXml . get ( ( ( ( ( ( ( "<servlet-mapping>\n" + "<seq2seq4repair_space><servlet-name>" ) + ( HelloWorldPathApplication . class . getName ( ) ) ) + "<//servlet-name>\n" ) + "<seq2seq4repair_space><url-pattern>//override//*<//url-pattern>\n" ) + "<seq2seq4repair_space><//servlet-mapping>\n" ) + "\n" ) ) , "web.xml" ) ; <END_BUG> return war ; } private static String performCall ( String urlPattern ) throws Exception { } @ Test public void testJaxRsWithNoApplication ( ) throws Exception { } }

Fix:
war . addAsWebInfResource ( WebXml . get ( ( ( ( ( ( ( "<servlet-mapping>\n" + "<seq2seq4repair_space><servlet-name>" ) + ( HelloWorldPathApplication . class . getName ( ) ) ) + "<//servlet-name>\n" ) + "<seq2seq4repair_space><url-pattern>//override//*<//url-pattern>\n" ) + "<seq2seq4repair_space><//servlet-mapping>\n" ) + "\n" ) ) , "web.xml" ) ;