nus-yam/ex-repair huggingface dataset:
Buggy code:
public final class SepPostingsWriterImpl extends PostingsWriterBase { static final String CODEC = "SepDocFreqSkip" ; static final String DOC_EXTENSION = "doc" ; static final String SKIP_EXTENSION = "skp" ; static final String FREQ_EXTENSION = "frq" ; static final String POS_EXTENSION = "pos" ; static final String PAYLOAD_EXTENSION = "pyl" ; static final int VERSION_START = 0 ; static final int VERSION_CURRENT = SepPostingsWriterImpl . VERSION_START ; IntIndexOutput freqOut ; Index freqIndex ; IntIndexOutput posOut ; Index posIndex ; IntIndexOutput docOut ; Index docIndex ; IndexOutput payloadOut ; IndexOutput skipOut ; IndexOutput termsOut ; final SepSkipListWriter skipListWriter ; final int skipInterval ; static final int DEFAULT_SKIP_INTERVAL = 16 ; final int skipMinimum ; final int maxSkipLevels = 10 ; final int totalNumDocs ; boolean storePayloads ; boolean omitTF ; long lastSkipFP ; FieldInfo fieldInfo ; int lastPayloadLength ; int lastPosition ; long payloadStart ; long lastPayloadStart ; int lastDocID ; int df ; private int pendingTermCount ; private final RAMOutputStream indexBytesWriter = new RAMOutputStream ( ) ; public SepPostingsWriterImpl ( SegmentWriteState state , IntStreamFactory factory ) throws IOException { } public SepPostingsWriterImpl ( SegmentWriteState state , IntStreamFactory factory , int skipInterval ) throws IOException { } @ Override public void start ( IndexOutput termsOut ) throws IOException { } @ Override public void startTerm ( ) throws IOException { } @ Override public void setField ( FieldInfo fieldInfo ) { } @ Override public void startDoc ( int docID , int termDocFreq ) throws IOException { } @ Override public void flushTermsBlock ( ) throws IOException { } @ Override public void addPosition ( int position , BytesRef payload ) throws IOException { assert ! ( omitTF ) ; final int delta = position - ( lastPosition ) ; <START_BUG> assert ( delta > 0 ) || ( position == 0 ) : ( ( "position=" + position ) + "<seq2seq4repair_space>lastPosition=" ) + ( lastPosition ) ; <END_BUG> lastPosition = position ; if ( storePayloads ) { final int payloadLength = ( payload == null ) ? 0 : payload . length ; if ( payloadLength != ( lastPayloadLength ) ) { lastPayloadLength = payloadLength ; posOut . write ( ( ( delta << 1 ) | 1 ) ) ; posOut . write ( payloadLength ) ; } else { posOut . write ( ( delta << 1 ) ) ; } if ( payloadLength > 0 ) { payloadOut . writeBytes ( payload . bytes , payload . offset , payloadLength ) ; } } else { posOut . write ( delta ) ; } lastPosition = position ; } @ Override public void finishDoc ( ) { } @ Override public void finishTerm ( TermStats stats ) throws IOException { } @ Override public void close ( ) throws IOException { } public static void getExtensions ( Set < String > extensions ) { } }

Fix:
assert delta >= 0 : ( ( "position=" + position ) + "<seq2seq4repair_space>lastPosition=" ) + ( lastPosition ) ;
Buggy code:
public class KeywordSearchDAO { private static final String DB_PATH = new Config ( ) . neo4j_path ; String resultString ; String columnsString ; String nodeResult ; String rows = "" ; public static void main ( String [ ] args ) { } public static List < ResultModel > search ( String str ) { GraphDatabaseService db = new GraphDatabaseFactory ( ) . newEmbeddedDatabase ( KeywordSearchDAO . DB_PATH ) ; ExecutionEngine engine = new ExecutionEngine ( db ) ; ExecutionResult result ; List < ResultModel > resultSet = null ; try ( Transaction ignored = db . beginTx ( ) ) { <START_BUG> result = engine . execute ( ( ( "MATCH<seq2seq4repair_space>p=(a)-[:`BELONG_TO`*..]->(b)<seq2seq4repair_space>Where<seq2seq4repair_space>a.value=~\".*" + str ) + ".*\"<seq2seq4repair_space>and<seq2seq4repair_space>b.type=\"database\"<seq2seq4repair_space>RETURN<seq2seq4repair_space>p" ) ) ; <END_BUG> resultSet = new ArrayList < ResultModel > ( ) ; for ( Map < String , Object > row : result ) { String record = "" ; String column = "" ; String table = "" ; String database = "" ; Path p = ( ( Path ) ( row . get ( "p" ) ) ) ; Iterator < Node > path_it = p . nodes ( ) . iterator ( ) ; while ( path_it . hasNext ( ) ) { Node tmp = path_it . next ( ) ; switch ( tmp . getProperty ( "type" ) . toString ( ) ) { case "record" : record = tmp . getProperty ( "value" ) . toString ( ) ; break ; case "column" : column = tmp . getProperty ( "value" ) . toString ( ) ; break ; case "table" : table = tmp . getProperty ( "value" ) . toString ( ) ; break ; case "database" : database = tmp . getProperty ( "value" ) . toString ( ) ; break ; default : break ; } } resultSet . add ( new ResultModel ( record , column , table , database ) ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } finally { db . shutdown ( ) ; } return resultSet ; } }

Fix:
result = engine . execute ( ( ( "MATCH<seq2seq4repair_space>p=(a)-[:`BELONG_TO`*0..]->(b)<seq2seq4repair_space>Where<seq2seq4repair_space>a.value=~\".*" + str ) + ".*\"<seq2seq4repair_space>and<seq2seq4repair_space>b.type=\"database\"<seq2seq4repair_space>RETURN<seq2seq4repair_space>p" ) ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class TheaterPatronList < T extends Matchable < K > , K > implements Serializable { private List < T > elements = new ArrayList < T > ( ) ; public boolean add ( T type ) { } public boolean remove ( K value ) { T element = search ( value ) ; if ( element == null ) { return false ; } else { <START_BUG> return true ; <END_BUG> } } public List < T > getList ( ) { } public T search ( K value ) { } }

Fix:
return elements . remove ( element ) ;
Buggy code:
public class WebRequestCycle extends RequestCycle { public static final String resourceReferencePrefix = "//resources//" ; private static final Log log = LogFactory . getLog ( WebRequestCycle . class ) ; public WebRequestCycle ( final WebSession session , final WebRequest request , final Response response ) { } public WebRequest getWebRequest ( ) { } public WebResponse getWebResponse ( ) { } protected final boolean parseRequest ( ) { } protected void redirectTo ( final Page page ) throws ServletException { String redirectUrl = page . urlFor ( page , IRedirectListener . class ) ; ApplicationSettings settings = application . getSettings ( ) ; if ( ( ( settings . getRenderStrategy ( ) ) == ( ApplicationSettings . REDIRECT_TO_BUFFER ) ) && ( ( application ) instanceof WebApplication ) ) { try { final Response currentResponse = getResponse ( ) ; BufferedResponse redirectResponse = new BufferedResponse ( redirectUrl ) { public String encodeURL ( String url ) { return currentResponse . encodeURL ( url ) ; } } ; setResponse ( redirectResponse ) ; if ( ( getInvokePage ( ) ) == ( getResponsePage ( ) ) ) { setInvokePage ( null ) ; } page . doRender ( ) ; setResponse ( currentResponse ) ; String responseRedirect = redirectResponse . getRedirectUrl ( ) ; if ( redirectUrl != responseRedirect ) { redirectUrl = redirectResponse . getRedirectUrl ( ) ; } else if ( ( redirectResponse . getContentLength ( ) ) > 0 ) { ( ( WebApplication ) ( application ) ) . addRedirect ( getWebRequest ( ) . getHttpServletRequest ( ) , redirectUrl , redirectResponse ) ; } } catch ( RuntimeException ex ) { <START_BUG> onRuntimeException ( page , ex ) ; <END_BUG> } } else { page . internalEndRequest ( ) ; } response . redirect ( redirectUrl ) ; } final void setFormComponentValuesFromCookies ( final Page page ) { } private boolean bookmarkablePage ( ) { } private boolean callDispatchedComponentListener ( ) { } private boolean callComponentListener ( ) { } private boolean homePage ( ) { } private void invokeInterface ( final Component component , final Method method ) { } private void invokeInterface ( final Page page , final String path , final String interfaceName ) { } private final Page newPage ( final Class pageClass ) { } private void onExpiredPage ( ) { } private boolean resourceReference ( ) { } private boolean staticContent ( ) { } }

Fix:
internalOnRuntimeException ( page , ex ) ;
Buggy code:
public class DalModelMojo extends AbstractMojo { protected Generator m_generator ; protected MavenProject m_project ; protected String sourceDir ; protected String manifest ; protected String resouceBase ; protected boolean verbose ; protected boolean debug ; public void execute ( ) throws MojoExecutionException , MojoFailureException { try { File manifestFile = new File ( manifest ) ; if ( ! ( manifestFile . exists ( ) ) ) { throw new MojoExecutionException ( String . format ( "Manifest(%s)<seq2seq4repair_space>not<seq2seq4repair_space>found!" , manifestFile . getCanonicalPath ( ) ) ) ; } final URL manifestXml = manifestFile . toURI ( ) . toURL ( ) ; final GenerateContext ctx = new AbstractGenerateContext ( m_project . getBasedir ( ) , resouceBase , sourceDir ) { public URL getManifestXml ( ) { return manifestXml ; } public void log ( LogLevel logLevel , String message ) { switch ( logLevel ) { case DEBUG : if ( debug ) { <START_BUG> getLog ( ) . debug ( message ) ; <END_BUG> } break ; case INFO : if ( ( debug ) || ( verbose ) ) { getLog ( ) . info ( message ) ; } break ; case ERROR : getLog ( ) . error ( message ) ; break ; } } } ; m_generator . generate ( ctx ) ; m_project . addCompileSourceRoot ( sourceDir ) ; getLog ( ) . info ( ( ( ctx . getGeneratedFiles ( ) ) + "<seq2seq4repair_space>files<seq2seq4repair_space>generated." ) ) ; } catch ( Exception e ) { throw new MojoExecutionException ( "Code<seq2seq4repair_space>generating<seq2seq4repair_space>failed." , e ) ; } } }

Fix:
getLog ( ) . info ( message ) ;
Buggy code:
public class Experiment { private static DateTimeFormatter dateFormatter = ISODateTimeFormat . dateTime ( ) ; private String category ; private String name ; private DateTime date ; private boolean successful ; private List < Experiment . Note > notes ; private Map < String , Object > tags ; private Map < String , Table > tables ; public Experiment ( ) { } public Experiment ( String category , String name ) { } protected String sha256 ( ) { } public Experiment failed ( ) { <START_BUG> this . successful = true ; <END_BUG> return this ; } public Experiment tag ( String name , Object value ) { } public Experiment note ( String message ) { } public Experiment append ( String tableName , Object ... rowElements ) { } public Experiment append ( String tableName , Map < String , Object > row ) { } public String toSimpleString ( ) { } @ Override public String toString ( ) { } protected String getCategory ( ) { } protected String getName ( ) { } protected DateTime getDate ( ) { } protected Map < String , Object > getTags ( ) { } protected Map < String , Table > getTables ( ) { } public List < Experiment . Note > getNotes ( ) { } public boolean isSuccessful ( ) { } private File getOutDir ( String directory ) { } private File getOutFile ( File dir , String extension ) { } public void saveAsOrgFile ( ) throws FileNotFoundException { } public void saveAsOrgFile ( String directory ) throws FileNotFoundException { } public void saveAsEdnFile ( ) throws FileNotFoundException { } public void saveAsEdnFile ( String directory ) throws FileNotFoundException { } public void saveAsJsonFile ( ) throws FileNotFoundException { } public void saveAsJsonFile ( String directory ) throws FileNotFoundException { } public void saveAsJsonFile ( boolean pretty ) throws FileNotFoundException { } public void saveAsJsonFile ( String directory , boolean pretty ) throws FileNotFoundException { } protected static class Note { protected DateTime date ; protected String message ; public Note ( DateTime date , String message ) { } } }

Fix:
this . successful = false ;
Buggy code:
public class DefaultTransformer implements Serializable , NumberTransformer { private static final long serialVersionUID = 4019938025047800455L ; public double transform ( Object o ) throws MathException { if ( o == null ) { throw new MathException ( "Conversion<seq2seq4repair_space>Exception<seq2seq4repair_space>in<seq2seq4repair_space>Transformation,<seq2seq4repair_space>Object<seq2seq4repair_space>is<seq2seq4repair_space>null" , new Object [ 0 ] ) ; } if ( o instanceof Number ) { return ( ( Number ) ( o ) ) . doubleValue ( ) ; } try { <START_BUG> return new Double ( o . toString ( ) ) . doubleValue ( ) ; <END_BUG> } catch ( Exception e ) { throw new MathException ( "Conversion<seq2seq4repair_space>Exception<seq2seq4repair_space>in<seq2seq4repair_space>Transformation:<seq2seq4repair_space>{0}" , new Object [ ] { e . getMessage ( ) } , e ) ; } } }

Fix:
return Double . valueOf ( o . toString ( ) ) . doubleValue ( ) ;
Buggy code:
public class WeldClassFileServices implements ClassFileServices { private CompositeIndex index ; private LoadingCache < String , WeldClassFileInfo > weldClassInfoCache ; private LoadingCache < DotName , Set < String > > annotationClassAnnotationsCache ; private final ClassLoader moduleClassLoader ; private class WeldClassInfoLoader extends CacheLoader < String , WeldClassFileInfo > { @ Override public WeldClassFileInfo load ( String key ) throws Exception { <START_BUG> return new WeldClassFileInfo ( key , index , annotationClassAnnotationsCache ) ; <END_BUG> } } private class AnnotationClassAnnotationLoader extends CacheLoader < DotName , Set < String > > { @ Override public Set < String > load ( DotName name ) throws Exception { } } public WeldClassFileServices ( CompositeIndex index , ClassLoader moduleClassLoader ) { } @ Override public ClassFileInfo getClassFileInfo ( String className ) { } @ Override public void cleanupAfterBoot ( ) { } @ Override public void cleanup ( ) { } }

Fix:
return new WeldClassFileInfo ( key , index , annotationClassAnnotationsCache , moduleClassLoader ) ;
Buggy code:
public class GuiPackage { private static transient Logger log = Hierarchy . getDefaultHierarchy ( ) . getLoggerFor ( "jmeter.gui" ) ; private static GuiPackage guiPack ; private boolean dirty = false ; private Map nodesToGui = new HashMap ( ) ; private Map guis = new HashMap ( ) ; private JMeterTreeNode currentNode = null ; private GuiPackage ( ) { } private JMeterTreeModel treeModel ; private MainFrame mainFrame ; private JMeterTreeListener treeListener ; public JMeterGUIComponent getGui ( TestElement node , String guiClass ) { } public void removeNode ( TestElement node ) { } public JMeterGUIComponent getCurrentGui ( ) { } public JMeterTreeNode getNodeOf ( TestElement userObject ) { } public TestElement createTestElement ( String guiClass ) { } public JMeterGUIComponent getGui ( TestElement node ) { } public void updateCurrentGui ( ) { } public void updateCurrentNode ( ) { } public static GuiPackage getInstance ( JMeterTreeListener listener , JMeterTreeModel treeModel ) { } public void setDirty ( boolean d ) { } public boolean isDirty ( ) { } <START_BUG> public boolean addSubTree ( HashTree subTree ) throws IllegalUserActionException { <END_BUG> return treeModel . addSubTree ( subTree , treeListener . getCurrentNode ( ) ) ; } public HashTree getCurrentSubTree ( ) { } public static GuiPackage getInstance ( ) { } public JMeterTreeModel getTreeModel ( ) { } public ValueReplacer getReplacer ( ) { } public void setTreeModel ( JMeterTreeModel newTreeModel ) { } public void setMainFrame ( org . apache . jmeter . gui . MainFrame newMainFrame ) { } public MainFrame getMainFrame ( ) { } public void setTreeListener ( JMeterTreeListener newTreeListener ) { } public JMeterTreeListener getTreeListener ( ) { } public void displayPopUp ( MouseEvent e , JPopupMenu popup ) { } public void displayPopUp ( Component invoker , MouseEvent e , JPopupMenu popup ) { } }

Fix:
public HashTree addSubTree ( HashTree subTree ) throws IllegalUserActionException {
Buggy code:
public class CalendarTest extends UnitTest { @ Before public void setUp ( ) throws Exception { } @ After public void tearDown ( ) throws Exception { } @ Test public void testUsersCalendarList ( ) { } @ Test public void testGetAllFollowersOfEvent ( ) throws ParseException { } @ Test public void testGetAllFollowedEvents ( ) throws ParseException { } @ Test public void testGetAllEventsOnADay ( ) throws ParseException { User wuschu = new User ( "wuschu" , "WTF" , "secret" , "wuschu@alt-f4.com" ) . save ( ) ; User tom = new User ( "tom" , "WTF" , "secret" , "tom@alt-f4.com" ) . save ( ) ; Calendar wuschusCalendar = new Calendar ( "Home" , wuschu ) . save ( ) ; Calendar tomsCalendar = new Calendar ( "Home" , tom ) . save ( ) ; SimpleDateFormat formatter = new SimpleDateFormat ( "yyyy//MM//dd,<seq2seq4repair_space>HH:mm" ) ; new Event ( "ESE<seq2seq4repair_space>sucks" , "small<seq2seq4repair_space>note" , formatter . parse ( "2011//10//14,<seq2seq4repair_space>09:00" ) , formatter . parse ( "2011//10//14,<seq2seq4repair_space>15:00" ) , wuschu , wuschusCalendar , false , true ) . save ( ) ; new Event ( "ESE<seq2seq4repair_space>sucks<seq2seq4repair_space>again!" , "small<seq2seq4repair_space>note" , formatter . parse ( "2011//10//15,<seq2seq4repair_space>09:00" ) , formatter . parse ( "2011//10//15,<seq2seq4repair_space>15:00" ) , wuschu , wuschusCalendar , false , true ) . save ( ) ; new Event ( "ESE<seq2seq4repair_space>sucks<seq2seq4repair_space>again!" , "small<seq2seq4repair_space>note" , formatter . parse ( "2011//10//15,<seq2seq4repair_space>09:00" ) , formatter . parse ( "2011//10//15,<seq2seq4repair_space>15:00" ) , tom , tomsCalendar , false , true ) . save ( ) ; <START_BUG> List < Event > events = wuschusCalendar . eventsAtDay ( new Date ( ) ) ; <END_BUG> assertEquals ( 1 , events . size ( ) ) ; } @ Test public void testAddNewCalendar ( ) { } @ Test public void testDefaultCalendar ( ) { } }

Fix:
List < Event > events = wuschusCalendar . eventsAtDay ( wuschu , new Date ( ) ) ;
Buggy code:
public class AmountAdapter extends TypeAdapter < Amount > { @ Override public void write ( JsonWriter out , Amount amount ) throws IOException { } @ Override public Amount read ( JsonReader reader ) throws IOException { if ( ( reader . peek ( ) ) == ( JsonToken . NULL ) ) { reader . nextNull ( ) ; return null ; } else if ( ( reader . peek ( ) ) == ( JsonToken . STRING ) ) { String amt = reader . nextString ( ) ; Amount amount = new Amount ( ) . withCurrency ( "STR" ) . withValue ( new BigDecimal ( amt ) ) ; return amount ; } else if ( ( reader . peek ( ) ) == ( JsonToken . BEGIN_OBJECT ) ) { reader . beginObject ( ) ; Amount amount = new Amount ( ) ; while ( reader . hasNext ( ) ) { String name = reader . nextName ( ) ; String val = reader . nextString ( ) ; switch ( name ) { case "currency" : amount . setCurrency ( val ) ; break ; case "issuer" : amount . setIssuer ( val ) ; break ; case "value" : <START_BUG> amount . setValue ( new BigDecimal ( val ) ) ; <END_BUG> break ; } } reader . endObject ( ) ; return amount ; } throw new IOException ( ) ; } }

Fix:
amount . setValue ( new BigDecimal ( val ) . movePointLeft ( 6 ) ) ;
Buggy code:
class PackageBinding implements IPackageBinding { private static final String [ ] NO_NAME_COMPONENTS = CharOperation . NO_STRINGS ; private static final String UNNAMED = Util . EMPTY_STRING ; private static final char PACKAGE_NAME_SEPARATOR = '.' ; private org . eclipse . jdt . internal . compiler . lookup . PackageBinding binding ; private String name ; private BindingResolver resolver ; private String [ ] components ; PackageBinding ( org . eclipse . jdt . internal . compiler . lookup . PackageBinding binding , BindingResolver resolver ) { } public IAnnotationBinding [ ] getAnnotations ( ) { } public String getName ( ) { } public boolean isUnnamed ( ) { } public String [ ] getNameComponents ( ) { } public int getKind ( ) { } public int getModifiers ( ) { <START_BUG> return - 1 ; <END_BUG> } public boolean isDeprecated ( ) { } public boolean isRecovered ( ) { } public boolean isSynthetic ( ) { } public IJavaElement getJavaElement ( ) { } public String getKey ( ) { } public boolean isEqualTo ( IBinding other ) { } private void computeNameAndComponents ( ) { } public String toString ( ) { } }

Fix:
return Modifier . NONE ;
Buggy code:
public class HeaderSectionTest extends WicketTestCase { private static final Log log = LogFactory . getLog ( HeaderSectionTest . class ) ; public HeaderSectionTest ( String name ) { } public void testRenderHomePage_1 ( ) throws Exception { } public void testRenderHomePage_2 ( ) throws Exception { } public void testRenderHomePage_3 ( ) throws Exception { } public void testRenderHomePage_4 ( ) throws Exception { } public void testRenderHomePage_5 ( ) throws Exception { } public void testRenderHomePage_6 ( ) throws Exception { } public void testRenderHomePage_7 ( ) throws Exception { } public void testRenderHomePage_8 ( ) throws Exception { } public void testRenderHomePage_9 ( ) throws Exception { } public void testRenderHomePage_9a ( ) throws Exception { } public void testRenderHomePage_10 ( ) throws Exception { } public void testRenderHomePage_11 ( ) throws Exception { } public void testRenderHomePage_12 ( ) throws Exception { executeTest ( HeaderSectionPage_12 . class , "HeaderSectionPageExpectedResult_12.html" ) ; <START_BUG> PackageResource res = ( ( PackageResource ) ( application . getSharedResources ( ) . get ( "wicket.markup.parser.filter.sub.HeaderSectionBorder//cborder.css" ) ) ) ; <END_BUG> assertNotNull ( res ) ; String absPath = res . getAbsolutePath ( ) ; assertNotNull ( absPath ) ; IResourceStream stream = res . getResourceStream ( ) ; assertNotNull ( stream ) ; } public void testRenderHomePage_13 ( ) throws Exception { } public void testRenderHomePage_14 ( ) throws Exception { } public void testRenderHomePage_15 ( ) throws Exception { } public void testRenderHomePage_16 ( ) throws Exception { } public void testRenderHomePage_17 ( ) throws Exception { } public void testRenderHomePage_18 ( ) throws Exception { } public void testRenderHomePage_19 ( ) throws Exception { } }

Fix:
PackageResource res = ( ( PackageResource ) ( application . getApplication ( ) . getSharedResources ( ) . get ( "wicket.markup.parser.filter.sub.HeaderSectionBorder//cborder.css" ) ) ) ;
Buggy code:
public class TransformersImpl implements Transformers { private final TransformationTarget target ; TransformersImpl ( TransformationTarget target ) { } @ Override public TransformationTarget getTarget ( ) { } @ Override public TransformedOperation transformOperation ( final TransformationContext context , final ModelNode operation ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String operationName = operation . require ( OP ) . asString ( ) ; final OperationTransformer transformer = target . resolveTransformer ( address , operationName ) ; if ( transformer == null ) { ROOT_LOGGER . tracef ( "operation<seq2seq4repair_space>%s<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>need<seq2seq4repair_space>transformation" , operation ) ; return new OperationTransformer . TransformedOperation ( operation , OperationResultTransformer . ORIGINAL_RESULT ) ; } final PathAddress transformed = TransformersImpl . transformAddress ( address , target ) ; operation . get ( OP_ADDR ) . set ( transformed . toModelNode ( ) ) ; <START_BUG> ResourceTransformationContext opCtx = ResourceTransformationContextImpl . wrapForOperation ( context , operation ) ; <END_BUG> OperationTransformer . TransformedOperation res = transformer . transformOperation ( opCtx , transformed , operation ) ; context . getLogger ( ) . flushLogQueue ( ) ; return res ; } @ Override public TransformedOperation transformOperation ( final OperationContext operationContext , final ModelNode operation ) throws OperationFailedException { } @ Override public Resource transformRootResource ( OperationContext operationContext , Resource resource ) throws OperationFailedException { } public Resource transformResource ( final OperationContext operationContext , PathAddress original , Resource resource ) throws OperationFailedException { } @ Override public Resource transformResource ( final ResourceTransformationContext context , Resource resource ) throws OperationFailedException { } protected static PathAddress transformAddress ( final PathAddress original , final TransformationTarget target ) { } }

Fix:
TransformationContext opCtx = ResourceTransformationContextImpl . wrapForOperation ( context , operation ) ;
Buggy code:
public class TestConcatenateVectorsJob extends MahoutTestCase { private static final double [ ] [ ] DATA_A = new double [ ] [ ] { new double [ ] { 0 , 1 , 2 , 3 , 4 } , new double [ ] { } , new double [ ] { 0 , 1 , 2 , 3 , 4 } } ; private static final double [ ] [ ] DATA_B = new double [ ] [ ] { new double [ ] { } , new double [ ] { 5 , 6 , 7 } , new double [ ] { 5 , 6 , 7 } } ; @ Test public void testConcatenateVectorsReducer ( ) throws Exception { <START_BUG> Configuration configuration = new Configuration ( ) ; <END_BUG> configuration . set ( MATRIXA_DIMS , "5" ) ; configuration . set ( MATRIXB_DIMS , "3" ) ; ConcatenateVectorsReducer reducer = new ConcatenateVectorsReducer ( ) ; DummyRecordWriter < IntWritable , VectorWritable > recordWriter = new DummyRecordWriter < IntWritable , VectorWritable > ( ) ; Context reduceContext = DummyRecordWriter . build ( reducer , configuration , recordWriter , IntWritable . class , VectorWritable . class ) ; reducer . setup ( reduceContext ) ; for ( int i = 0 ; i < 3 ; i ++ ) { double [ ] values = TestConcatenateVectorsJob . DATA_A [ i ] ; List < VectorWritable > vwList = Lists . newArrayList ( ) ; if ( ( values . length ) > 0 ) { Vector v = new DenseVector ( values ) ; VectorWritable vw = new VectorWritable ( ) ; vw . set ( v ) ; vwList . add ( vw ) ; } values = TestConcatenateVectorsJob . DATA_B [ i ] ; if ( ( values . length ) > 0 ) { Vector v = new DenseVector ( values ) ; VectorWritable vw = new VectorWritable ( ) ; vw . set ( v ) ; vwList . add ( vw ) ; } IntWritable row = new IntWritable ( i ) ; reducer . reduce ( row , vwList , reduceContext ) ; } for ( IntWritable row : recordWriter . getKeys ( ) ) { List < VectorWritable > list = recordWriter . getValue ( row ) ; Vector v = list . get ( 0 ) . get ( ) ; assertEquals ( 8 , v . size ( ) ) ; for ( Vector . Element element : v . nonZeroes ( ) ) { assertEquals ( element . index ( ) , v . get ( element . index ( ) ) , 0.001 ) ; } } } }

Fix:
Configuration configuration = getConfiguration ( ) ;
Buggy code:
public abstract class NexGenCmd { public CommandSender sender ; public Command cmd ; public String label ; public String cmdName ; private String [ ] args ; public NexGenCmd ( CommandSender sender , Command cmd , String cmdName , String label , String [ ] args ) { } public void msg ( String message ) { } public boolean hasArgs ( int amt ) { <START_BUG> return ( ( args . length ) + 1 ) >= amt ; <END_BUG> } public String getArg ( int i ) { } public String [ ] getArgs ( ) { } public abstract void perform ( ) { } }

Fix:
return ( args . length ) >= amt ;
Buggy code:
public class StructureModelTest extends AjdeTestCase { private final String CONFIG_FILE_PATH = "..//examples//figures-coverage//all.lst" ; public StructureModelTest ( String name ) { } public static void main ( String [ ] args ) { } public static TestSuite suite ( ) { } public void testRootForSourceFile ( ) throws IOException { } public void testPointcutName ( ) throws IOException { } public void testDeclare ( ) { } public void testFileNodeFind ( ) throws IOException { } public void testMainClassNodeInfo ( ) throws IOException { <START_BUG> StructureModel model = Ajde . getDefault ( ) . getStructureModelManager ( ) . getModel ( ) ; <END_BUG> assertTrue ( "model<seq2seq4repair_space>exists" , ( model != null ) ) ; assertTrue ( "root<seq2seq4repair_space>exists" , ( ( model . getRoot ( ) ) != null ) ) ; File testFile = openFile ( "figures-coverage//figures//Main.java" ) ; IProgramElement node = model . findNodeForSourceLine ( testFile . getCanonicalPath ( ) , 11 ) ; assertTrue ( "find<seq2seq4repair_space>result" , ( node != null ) ) ; IProgramElement pNode = ( ( IProgramElement ) ( ( ( IProgramElement ) ( node ) ) . getParent ( ) ) ) ; if ( null == pNode ) { assertTrue ( ( "null<seq2seq4repair_space>parent<seq2seq4repair_space>of<seq2seq4repair_space>" + node ) , false ) ; } assertTrue ( ( "found<seq2seq4repair_space>node:<seq2seq4repair_space>" + ( pNode . getName ( ) ) ) , pNode . isRunnable ( ) ) ; } public void testModelIntegrity ( ) { } private void testModelIntegrityHelper ( IProgramElement node ) throws Exception { } public void testNoChildIsNull ( ) { } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } }

Fix:
AspectJModel model = Ajde . getDefault ( ) . getStructureModelManager ( ) . getModel ( ) ;
Buggy code:
public class ActionUserPassword extends AbstractAction { public ActionUserPassword ( Map < String , Action > actions ) { } @ Override public String getURI ( ) { } @ Override public void execute ( HttpServletRequest req , HttpServletResponse resp ) throws ImmopolyException { PersistenceManager pm = PMF . get ( ) . getPersistenceManager ( ) ; try { String token = req . getParameter ( TOKEN ) ; String password = req . getParameter ( PASSWORD ) ; if ( ( null == password ) || ( ( password . length ( ) ) == 0 ) ) throw new ImmopolyException ( ImmopolyException . MISSING_PARAMETER_PASSWORD , "missing<seq2seq4repair_space>password" ) ; if ( ( null == token ) || ( ( token . length ( ) ) == 0 ) ) throw new ImmopolyException ( ImmopolyException . MISSING_PARAMETER_TOKEN , "missing<seq2seq4repair_space>token" ) ; User user = DBManager . getUserByToken ( pm , token ) ; if ( null == user ) { throw new ImmopolyException ( ImmopolyException . TOKEN_NOT_FOUND , ( "token<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>" + token ) ) ; } LOG . info ( ( "Change<seq2seq4repair_space>Password<seq2seq4repair_space>" + ( user . getUserName ( ) ) ) ) ; user . setPassword ( password ) ; pm . makePersistent ( user ) ; <START_BUG> resp . getOutputStream ( ) . write ( "OK" . getBytes ( "UTF-8" ) ) ; <END_BUG> } catch ( ImmopolyException e ) { throw e ; } catch ( Exception e ) { throw new ImmopolyException ( ImmopolyException . USER_PASSWORD_CHANGE_FAILED , "could<seq2seq4repair_space>not<seq2seq4repair_space>change<seq2seq4repair_space>password" , e ) ; } finally { pm . close ( ) ; } } }

Fix:
resp . getOutputStream ( ) . write ( "{\"OK\":\"OK\"}" . getBytes ( "UTF-8" ) ) ;
Buggy code:
public class UndertowConnectorTestCase { private final ListenerService < ? > listener = mock ( ListenerService . class ) ; private final Connector connector = new UndertowConnector ( this . listener ) ; @ Test public void getType ( ) { OptionMap options = OptionMap . builder ( ) . getMap ( ) ; assertSame ( AJP , new UndertowConnector ( new org . wildfly . extension . undertow . AjpListenerService ( "" , "" , options ) ) . getType ( ) ) ; <START_BUG> assertSame ( HTTP , new UndertowConnector ( new org . wildfly . extension . undertow . HttpListenerService ( "" , "" , options , false ) ) . getType ( ) ) ; <END_BUG> assertSame ( HTTPS , new UndertowConnector ( new org . wildfly . extension . undertow . HttpsListenerService ( "" , "" , options ) ) . getType ( ) ) ; } @ Test public void getAddress ( ) throws UnknownHostException { } @ Test public void getPort ( ) throws UnknownHostException { } @ Test public void setAddress ( ) throws UnknownHostException { } }

Fix:
assertSame ( HTTP , new UndertowConnector ( new org . wildfly . extension . undertow . HttpListenerService ( "" , "" , options , false , false ) ) . getType ( ) ) ;
Buggy code:
public class IntegerLiteral extends Literal { public IntegerLiteral ( final Identifier literalValue ) { } @ Override public Object evaluateInternal ( final ExecutionContext ctx ) { <START_BUG> return new BigInteger ( getLiteralValue ( ) . getValue ( ) ) ; <END_BUG> } public Type analyzeInternal ( final ExecutionContext ctx , final Set < AnalysationIssue > issues ) { } }

Fix:
return new Long ( getLiteralValue ( ) . getValue ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class SignEncryptMultipleClientsTestCase { private static Logger log = Logger . getLogger ( SignEncryptMultipleClientsTestCase . class . getName ( ) ) ; @ ArquillianResource URL baseUrl ; @ Deployment public static Archive < ? > deployment ( ) { <START_BUG> WebArchive war = ShrinkWrap . create ( WebArchive . class , "jaxws-wsse-sign-encrypt.war" ) . addAsManifestResource ( new StringAsset ( "Dependencies:<seq2seq4repair_space>org.apache.ws.security\n" ) , "MANIFEST.MF" ) . addClasses ( ServiceIface . class , ServiceImpl . class , KeystorePasswordCallback . class ) . addAsResource ( ServiceIface . class . getPackage ( ) , "bob.jks" , "bob.jks" ) . addAsResource ( ServiceIface . class . getPackage ( ) , "bob.properties" , "bob.properties" ) . addAsWebInfResource ( ServiceIface . class . getPackage ( ) , "wsdl//SecurityService.wsdl" , "wsdl//SecurityService.wsdl" ) . addAsWebInfResource ( ServiceIface . class . getPackage ( ) , "wsdl//SecurityService_schema1.xsd" , "wsdl//SecurityService_schema1.xsd" ) . addAsWebInfResource ( SignEncryptMultipleClientsTestCase . class . getPackage ( ) , "multiple-clients-jaxws-endpoint-config.xml" , "jaxws-endpoint-config.xml" ) ; <END_BUG> SignEncryptMultipleClientsTestCase . log . info ( war . toString ( true ) ) ; return war ; } @ Test public void encryptedAndSignedRequestFromAlice ( ) throws Exception { } @ Test public void encryptedAndSignedRequestFromJohn ( ) throws Exception { } @ Test public void encryptedAndSignedRequestFromUntrustedMax ( ) throws Exception { } private void setupWsse ( ServiceIface proxy , String clientId ) throws MalformedURLException { } }

Fix:
WebArchive war = ShrinkWrap . create ( WebArchive . class , "jaxws-wsse-sign-encrypt.war" ) . addAsManifestResource ( new StringAsset ( "Dependencies:<seq2seq4repair_space>org.apache.ws.security\n" ) , "MANIFEST.MF" ) . addClasses ( ServiceIface . class , ServiceImpl . class , KeystorePasswordCallback . class ) . addAsResource ( ServiceIface . class . getPackage ( ) , "bob.jks" , "bob.jks" ) . addAsResource ( ServiceIface . class . getPackage ( ) , "bob.properties" , "bob.properties" ) . addAsWebInfResource ( ServiceIface . class . getPackage ( ) , "wsdl//SecurityService-sign-encrypt.wsdl" , "wsdl//SecurityService.wsdl" ) . addAsWebInfResource ( ServiceIface . class . getPackage ( ) , "wsdl//SecurityService_schema1.xsd" , "wsdl//SecurityService_schema1.xsd" ) . addAsWebInfResource ( SignEncryptMultipleClientsTestCase . class . getPackage ( ) , "multiple-clients-jaxws-endpoint-config.xml" , "jaxws-endpoint-config.xml" ) ;
Buggy code:
public class ValidateRealmState implements State { private final StateValues stateValues ; private ConsoleWrapper theConsole ; public ValidateRealmState ( ConsoleWrapper theConsole , final StateValues stateValues ) { } @ Override public State execute ( ) { String enteredRealm = stateValues . getRealm ( ) ; if ( ( enteredRealm . length ( ) ) == 0 ) { <START_BUG> return new ErrorState ( theConsole , ROOT_LOGGER . realmMustBeSpecified ( ) , new PromptRealmState ( theConsole , stateValues ) ) ; <END_BUG> } if ( ( stateValues . getFileMode ( ) ) != ( FileMode . UNDEFINED ) ) { final String expectedRealm = ( ( stateValues . getFileMode ( ) ) == ( FileMode . MANAGEMENT ) ) ? AddUser . DEFAULT_MANAGEMENT_REALM : AddUser . DEFAULT_APPLICATION_REALM ; if ( ( expectedRealm . equals ( enteredRealm ) ) == false ) { String message = ROOT_LOGGER . alternativeRealm ( expectedRealm ) ; String prompt = ( ( ( ( ( ROOT_LOGGER . realmConfirmation ( enteredRealm ) ) + "<seq2seq4repair_space>" ) + ( ROOT_LOGGER . yes ( ) ) ) + "//" ) + ( ROOT_LOGGER . no ( ) ) ) + "?" ; return new ConfirmationChoice ( theConsole , message , prompt , new PromptNewUserState ( theConsole , stateValues ) , new PromptRealmState ( theConsole , stateValues ) ) ; } } return new PromptNewUserState ( theConsole , stateValues ) ; } }

Fix:
return new ErrorState ( theConsole , ROOT_LOGGER . realmMustBeSpecified ( ) , new PromptRealmState ( theConsole , stateValues ) , stateValues ) ;
Buggy code:
public class Setup { private int players = 0 ; public void runSetup ( ) { GUIController GUIController = new GUIController ( ) ; FieldController . initializeFieldCreator ( ) ; <START_BUG> GUIController . GUINonOwnable ( ) ; <END_BUG> GUIController . GUIOwnable ( ) ; PlayerController createplayer = new PlayerController ( ) ; createplayer . createPlayers ( ) ; } }

Fix:
GUIController . GUINonoOwnable ( ) ;
Buggy code:
public class CustomLoadMetricDefinition extends SimpleResourceDefinition { static final PathElement PATH = PathElement . pathElement ( CUSTOM_LOAD_METRIC ) ; protected static final CustomLoadMetricDefinition INSTANCE = new CustomLoadMetricDefinition ( ) ; static final SimpleAttributeDefinition CLASS = SimpleAttributeDefinitionBuilder . create ( CommonAttributes . CLASS , STRING , false ) . setAllowExpression ( false ) . setRestartAllServices ( ) . build ( ) ; static final AttributeDefinition [ ] ATTRIBUTES = new AttributeDefinition [ ] { CustomLoadMetricDefinition . CLASS , LoadMetricDefinition . WEIGHT , LoadMetricDefinition . CAPACITY , LoadMetricDefinition . PROPERTY } ; static void buildTransformation ( ModelVersion version , ResourceTransformationDescriptionBuilder builder ) { <START_BUG> if ( VERSION_1_3_0 . requiresTransformation ( version ) ) { <END_BUG> builder . addChildResource ( CustomLoadMetricDefinition . PATH ) . getAttributeBuilder ( ) . addRejectCheck ( SIMPLE_EXPRESSIONS , CustomLoadMetricDefinition . CLASS , LoadMetricDefinition . WEIGHT ) . addRejectCheck ( CapacityCheckerAndConverter . INSTANCE , LoadMetricDefinition . CAPACITY ) . setValueConverter ( CapacityCheckerAndConverter . INSTANCE , LoadMetricDefinition . CAPACITY ) . end ( ) ; } } private CustomLoadMetricDefinition ( ) { } @ Override public void registerAttributes ( ManagementResourceRegistration resourceRegistration ) { } }

Fix:
if ( VERSION_1_2_0 . requiresTransformation ( version ) ) {
Buggy code:
class XSDUniqueOrKeyTraverser extends XSDAbstractIDConstraintTraverser { public XSDUniqueOrKeyTraverser ( XSDHandler handler , XSAttributeChecker gAttrCheck ) { } void traverse ( Element uElem , XSElementDecl element , XSDocumentInfo schemaDoc , SchemaGrammar grammar ) { Object [ ] attrValues = fAttrChecker . checkAttributes ( uElem , false , schemaDoc ) ; String uName = ( ( String ) ( attrValues [ XSAttributeChecker . ATTIDX_NAME ] ) ) ; UniqueOrKey uniqueOrKey = null ; if ( DOMUtil . getLocalName ( uElem ) . equals ( ELT_UNIQUE ) ) { uniqueOrKey = new UniqueOrKey ( uName , IdentityConstraint . UNIQUE ) ; } else { uniqueOrKey = new UniqueOrKey ( uName , IdentityConstraint . KEY ) ; } <START_BUG> traverseIdentityConstraint ( uniqueOrKey , uElem , schemaDoc ) ; <END_BUG> grammar . addIDConstraintDecl ( element , uniqueOrKey ) ; fAttrChecker . returnAttrArray ( attrValues , schemaDoc ) ; } }

Fix:
traverseIdentityConstraint ( uniqueOrKey , uElem , schemaDoc , attrValues ) ;
Buggy code:
public class Store extends Pit { public Store ( int ordinal , int seeds ) { } @ Override public String toString ( ) { <START_BUG> return ( "Store<seq2seq4repair_space>[" + ( getSeeds ( ) ) ) + "]" ; <END_BUG> } @ Override public boolean isStore ( ) { } }

Fix:
return ( "S[" + ( getSeeds ( ) ) ) + "]" ;
Buggy code:
public class ParamMask extends AbstractTestElement implements Serializable { private String PREFIX = "ParamModifier.prefix" ; private String FIELD_NAME = "ParamModifier.field_name" ; private String UPPER_BOUND = "ParamModifier.upper_bound" ; private String LOWER_BOUND = "ParamModifier.lower_bound" ; private String INCREMENT = "ParamModifier.increment" ; private String SUFFIX = "ParamModifier.suffix" ; private long _value = 0 ; public ParamMask ( ) { } public void setPrefix ( String prefix ) { } public void setValue ( long val ) { } public void setFieldName ( String fieldName ) { } public void setLowerBound ( long val ) { } public void setUpperBound ( long val ) { } public void setIncrement ( long incr ) { } public void setSuffix ( String suffix ) { } public String getPrefix ( ) { } public long getLowerBound ( ) { } public long getUpperBound ( ) { } public long getIncrement ( ) { } public String getSuffix ( ) { } public String getNextValue ( ) { } public void resetValue ( ) { } public String getFieldName ( ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( ) ; <END_BUG> sb . append ( "-------------------------------\n" ) ; sb . append ( "Dumping<seq2seq4repair_space>ParamMask<seq2seq4repair_space>Object\n" ) ; sb . append ( "-------------------------------\n" ) ; sb . append ( ( ( "Name<seq2seq4repair_space>=<seq2seq4repair_space>" + ( getFieldName ( ) ) ) + "\n" ) ) ; sb . append ( ( ( "Prefix<seq2seq4repair_space>=<seq2seq4repair_space>" + ( getPrefix ( ) ) ) + "\n" ) ) ; sb . append ( ( ( "Current<seq2seq4repair_space>Value<seq2seq4repair_space>=<seq2seq4repair_space>" + ( _value ) ) + "\n" ) ) ; sb . append ( ( ( "Lower<seq2seq4repair_space>Bound<seq2seq4repair_space>=<seq2seq4repair_space>" + ( getLowerBound ( ) ) ) + "\n" ) ) ; sb . append ( ( ( "Upper<seq2seq4repair_space>Bound<seq2seq4repair_space>=<seq2seq4repair_space>" + ( getUpperBound ( ) ) ) + "\n" ) ) ; sb . append ( ( ( "Increment<seq2seq4repair_space>=<seq2seq4repair_space>" + ( getIncrement ( ) ) ) + "\n" ) ) ; sb . append ( ( ( "Suffix<seq2seq4repair_space>=<seq2seq4repair_space>" + ( getSuffix ( ) ) ) + "\n" ) ) ; sb . append ( "-------------------------------\n" ) ; return sb . toString ( ) ; } }

Fix:
StringBuilder sb = new StringBuilder ( ) ;
Buggy code:
@ Service public class EventService implements EventServiceInterface { @ Autowired private EventRepository eventRepository ; @ Autowired private PlaceServiceInterface placeServiceInterface ; @ Override public List < EventPOJO > getAllEventByUser ( int pidUsuario ) { } @ Override public List < EventPOJO > getAllEventPublish ( ) { List < EventPOJO > eventsPOJO = new ArrayList < > ( ) ; <START_BUG> eventRepository . findAllEventPublish ( ( ( byte ) ( 3 ) ) , ( ( byte ) ( 0 ) ) , new Date ( ) ) . stream ( ) . forEach ( ( e ) -> { <END_BUG> EventPOJO eventPOJO = new EventPOJO ( ) ; PlacePOJO placePOJO = new PlacePOJO ( ) ; UserPOJO userPOJO = new UserPOJO ( ) ; BeanUtils . copyProperties ( e , eventPOJO ) ; eventPOJO . setChats ( null ) ; eventPOJO . setEventParticipants ( null ) ; eventPOJO . setNotes ( null ) ; eventPOJO . setServiceContacts ( null ) ; BeanUtils . copyProperties ( e . getPlace ( ) , placePOJO ) ; BeanUtils . copyProperties ( e . getUser ( ) , userPOJO ) ; userPOJO . setEventParticipants ( null ) ; userPOJO . setChats ( null ) ; userPOJO . setMessages ( null ) ; userPOJO . setPasswordHistories ( null ) ; userPOJO . setTermConditions ( null ) ; userPOJO . setUsers1 ( null ) ; userPOJO . setUsers2 ( null ) ; userPOJO . setUserType ( null ) ; eventPOJO . setPlace ( placePOJO ) ; eventPOJO . setUser ( userPOJO ) ; eventsPOJO . add ( eventPOJO ) ; } ) ; return eventsPOJO ; } @ Override public Event getEventById ( int idEvent ) { } @ Override public int saveEvent ( Event _event ) { } @ Override @ Transactional public boolean editEvent ( Event e , MultipartFile imgFile , ServletContext servletContext ) { } @ Override public EventPOJO eventById ( int idEvent ) { } @ Override public List < EventPOJO > getAllByParam ( String nameUser , String name , String namePlace , byte state ) { } @ Override public List < EventPOJO > getTopEventsByParticipants ( int top ) { } }

Fix:
eventRepository . findAllEventPublish ( ( ( byte ) ( 3 ) ) , ( ( byte ) ( 0 ) ) ) . stream ( ) . forEach ( ( e ) -> {
Buggy code:
public final class ActivityHost extends Activity implements Animation . AnimationListener , Player . PlayerDestroyedObserver { private ClientActivity top ; private boolean exitOnDestroy ; private boolean isFading ; private boolean useFadeOutNextTime ; private boolean ignoreFadeNextTime ; private FrameLayout parent ; private View oldView ; private View newView ; private AnimationSet anim ; private void updateTitle ( CharSequence title , boolean announce ) { } public ClientActivity getTopActivity ( ) { } public void setExitOnDestroy ( boolean exitOnDestroy ) { } @ Override public void onAnimationEnd ( Animation animation ) { } @ Override public void onAnimationRepeat ( Animation animation ) { } @ Override public void onAnimationStart ( Animation animation ) { } public View findViewByIdDirect ( int id ) { } @ Override public View findViewById ( int id ) { } @ Override public void setContentView ( View view ) { } @ Override public void setContentView ( View view , ViewGroup . LayoutParams params ) { } @ Override public void setContentView ( int layoutResID ) { } void setContentViewWithTransition ( View view , boolean fadeAllowed , boolean forceFadeOut ) { } private void startActivityInternal ( ClientActivity activity , boolean announce ) { } public void startActivity ( ClientActivity activity , boolean announce ) { } public void finishActivity ( ClientActivity activity , ClientActivity newActivity , int code , boolean announce ) { } @ Override public void onBackPressed ( ) { } @ Override public boolean onPrepareOptionsMenu ( Menu menu ) { } @ Override public boolean onKeyDown ( int keyCode , KeyEvent event ) { } @ Override protected void onNewIntent ( Intent intent ) { } @ Override protected final void onCreate ( Bundle savedInstanceState ) { super . onCreate ( null ) ; if ( ( Player . state ) >= ( Player . STATE_TERMINATING ) ) { finish ( ) ; return ; } UI . initialize ( getApplication ( ) , this ) ; MainHandler . initialize ( ) ; if ( Player . startService ( getApplication ( ) ) ) <START_BUG> UI . setAndroidThemeAccordingly13 ( this ) ; <END_BUG> UI . storeViewCenterLocationForFade ( null ) ; Player . alreadySelected = false ; top = new ActivityMain ( ) ; top . finished = false ; top . activity = this ; top . previousActivity = null ; setTitle ( top . getTitle ( ) ) ; getWindow ( ) . setBackgroundDrawable ( new NullDrawable ( ) ) ; top . paused = true ; top . onCreate ( ) ; if ( ( ( top ) != null ) && ( ! ( top . finished ) ) ) { top . onCreateLayout ( true ) ; if ( ( ( top ) != null ) && ( ! ( top . finished ) ) ) Player . addDestroyedObserver ( this ) ; else finish ( ) ; } else { finish ( ) ; } } @ Override protected void onStart ( ) { } @ Override protected void onSaveInstanceState ( Bundle outState ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } @ Override protected void onPause ( ) { } @ Override protected void onResume ( ) { } private void finalCleanup ( ) { } @ Override protected void onDestroy ( ) { } @ Override public void onPlayerDestroyed ( ) { } }

Fix:
UI . setAndroidThemeAccordingly ( this ) ;
Buggy code:
public class ModuleDependencyProcessor implements DeploymentUnitProcessor { public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final Manifest manifest = phaseContext . getAttachment ( MANIFEST ) ; if ( manifest == null ) return ; 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" ) ; <START_BUG> ModuleDependency dependency = new ModuleDependency ( dependencyId , optional , export ) ; <END_BUG> phaseContext . addToAttachmentList ( MODULE_DEPENDENCIES , dependency ) ; } } public void undeploy ( final DeploymentUnit context ) { } private boolean parseOptionalExportParams ( final String [ ] parts , final String expected ) { } }

Fix:
ModuleDependency dependency = new ModuleDependency ( null , dependencyId , optional , export ) ;