nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ButtonTagTests extends AbstractFormTagTests { private ButtonTag tag ; @ Override protected void onSetUp ( ) { } public void testButtonTag ( ) throws Exception { } public void testDisabled ( ) throws Exception { <START_BUG> this . tag . setDisabled ( "true" ) ; <END_BUG> this . tag . doStartTag ( ) ; this . tag . doEndTag ( ) ; String output = getOutput ( ) ; assertTagOpened ( output ) ; assertTagClosed ( output ) ; assertContainsAttribute ( output , "disabled" , "disabled" ) ; } @ Override protected TestBean createTestBean ( ) { } protected final void assertTagClosed ( String output ) { } protected final void assertTagOpened ( String output ) { } @ SuppressWarnings ( "serial" ) protected ButtonTag createTag ( final Writer writer ) { } }

Fix:
this . tag . setDisabled ( true ) ;
Buggy code:
public class SimplePropertyNamespaceHandler implements NamespaceHandler { private static final String REF_SUFFIX = "-ref" ; public void init ( ) { } public BeanDefinition parse ( Element element , ParserContext parserContext ) { } public BeanDefinitionHolder decorate ( Node node , BeanDefinitionHolder definition , ParserContext parserContext ) { if ( node instanceof Attr ) { Attr attr = ( ( Attr ) ( node ) ) ; <START_BUG> String propertyName = attr . getLocalName ( ) ; <END_BUG> String propertyValue = attr . getValue ( ) ; MutablePropertyValues pvs = definition . getBeanDefinition ( ) . getPropertyValues ( ) ; if ( pvs . contains ( propertyName ) ) { parserContext . getReaderContext ( ) . error ( ( ( ( "Property<seq2seq4repair_space>'" + propertyName ) + "'<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>defined<seq2seq4repair_space>using<seq2seq4repair_space>" ) + "both<seq2seq4repair_space><property><seq2seq4repair_space>and<seq2seq4repair_space>inline<seq2seq4repair_space>syntax.<seq2seq4repair_space>Only<seq2seq4repair_space>one<seq2seq4repair_space>approach<seq2seq4repair_space>may<seq2seq4repair_space>be<seq2seq4repair_space>used<seq2seq4repair_space>per<seq2seq4repair_space>property." ) , attr ) ; } if ( propertyName . endsWith ( SimplePropertyNamespaceHandler . REF_SUFFIX ) ) { propertyName = propertyName . substring ( 0 , ( ( propertyName . length ( ) ) - ( SimplePropertyNamespaceHandler . REF_SUFFIX . length ( ) ) ) ) ; pvs . addPropertyValue ( Conventions . attributeNameToPropertyName ( propertyName ) , new RuntimeBeanReference ( propertyValue ) ) ; } else { pvs . addPropertyValue ( Conventions . attributeNameToPropertyName ( propertyName ) , propertyValue ) ; } } return definition ; } }

Fix:
String propertyName = parserContext . getDelegate ( ) . getLocalName ( attr ) ;
Buggy code:
public class DropDownChoice extends AbstractSingleSelectChoice implements IOnChangeListener { private static final long serialVersionUID = 1L ; public DropDownChoice ( final String id ) { } public DropDownChoice ( final String id , final List choices ) { } public DropDownChoice ( final String id , final List data , final IChoiceRenderer renderer ) { } public DropDownChoice ( final String id , IModel model , final List choices ) { } public DropDownChoice ( final String id , IModel model , final List data , final IChoiceRenderer renderer ) { } public DropDownChoice ( String id , IModel choices ) { } public DropDownChoice ( String id , IModel model , IModel choices ) { } public DropDownChoice ( String id , IModel choices , IChoiceRenderer renderer ) { } public DropDownChoice ( String id , IModel model , IModel choices , IChoiceRenderer renderer ) { } public final void onSelectionChanged ( ) { } protected void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "select" ) ; if ( wantOnSelectionChangedNotifications ( ) ) { final CharSequence url = urlFor ( INTERFACE ) ; Form form = ( ( Form ) ( findParent ( Form . class ) ) ) ; if ( form != null ) { tag . put ( "onchange" , form . getJsForInterfaceUrl ( url ) ) ; } else { <START_BUG> tag . put ( "onchange" , ( ( ( ( "window.location.href='" + url ) + "&" ) + ( getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.options[this.selectedIndex].value;" ) ) ; <END_BUG> } } super . onComponentTag ( tag ) ; } protected void onSelectionChanged ( final Object newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } protected boolean getStatelessHint ( ) { } }

Fix:
tag . put ( "onchange" , ( ( ( ( "window.location.href='" + url ) + "&amp;" ) + ( getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.options[this.selectedIndex].value;" ) ) ;
Buggy code:
public class ConceptBurn extends BurnerClass { String [ ] list = new String [ ] { "web<seq2seq4repair_space>development" , "augmented<seq2seq4repair_space>reality" , ".Net" , "artificial<seq2seq4repair_space>intelligence" , "sql" , "game<seq2seq4repair_space>development" , "ruby" , "C" , "uml" , "object<seq2seq4repair_space>oriented<seq2seq4repair_space>design" , "Ajax" , "user<seq2seq4repair_space>experience" , "XML" , "software<seq2seq4repair_space>engineering" , "android<seq2seq4repair_space>development" , "Entrepreneurship" , "project<seq2seq4repair_space>management" , "graphic<seq2seq4repair_space>design" , "computer<seq2seq4repair_space>science" } ; public ConceptBurn ( String root ) { } public Hashtable < String , Boolean > getConcepts ( ) throws IOException { String fileName = "conceptfile.txt" ; boolean f = new File ( termsFilePath ) . mkdirs ( ) ; File file = new File ( ( ( termsFilePath ) + fileName ) ) ; if ( file . exists ( ) ) { List < String > lines = Files . readAllLines ( Paths . get ( ( ( termsFilePath ) + fileName ) ) , Charset . defaultCharset ( ) ) ; for ( int i = 0 ; i < ( lines . size ( ) ) ; i ++ ) { wordlist . put ( lines . get ( i ) , true ) ; } } else { Document document = getPage ( "http:////en.wikipedia.org//wiki//Outline_of_computer_science" ) ; File fout = new File ( ( ( termsFilePath ) + fileName ) ) ; fout . createNewFile ( ) ; FileOutputStream fos = new FileOutputStream ( fout ) ; BufferedWriter bw = new BufferedWriter ( new OutputStreamWriter ( fos ) ) ; Elements exa = document . select ( "#bodyContent<seq2seq4repair_space>#mw-content-text<seq2seq4repair_space>ul>li<seq2seq4repair_space>a" ) ; <START_BUG> for ( int i = 23 ; i < ( exa . size ( ) ) ; i ++ ) { <END_BUG> if ( "Data<seq2seq4repair_space>structure" . contains ( exa . get ( i ) . text ( ) ) ) { break ; } wordlist . put ( exa . get ( i ) . text ( ) . toLowerCase ( ) , true ) ; bw . write ( exa . get ( i ) . text ( ) . toLowerCase ( ) ) ; bw . newLine ( ) ; } for ( int i = 0 ; i < ( list . length ) ; i ++ ) { wordlist . put ( list [ i ] . toLowerCase ( ) , true ) ; bw . write ( list [ i ] . toLowerCase ( ) ) ; bw . newLine ( ) ; } bw . close ( ) ; } return wordlist ; } }

Fix:
for ( int i = 26 ; i < ( exa . size ( ) ) ; i ++ ) {
Buggy code:
public class PlayerView implements CharacterView { private Texture texture ; private Sprite sprite ; private ArrayList < Rectangle > rectangle ; private Player player ; private Vector2 direction ; private WeaponView weaponView ; private boolean collision ; public PlayerView ( Player newPlayer ) { } public Texture getTexture ( ) { } public ArrayList < Rectangle > getRectangles ( ) { } @ Override public void setRectangles ( ArrayList < Rectangle > rectangles ) { } public void setRectangle ( Rectangle rectangle ) { } public Sprite getSprite ( ) { } @ Override public void hit ( ProjectileView projectile ) { <START_BUG> System . out . println ( "Player<seq2seq4repair_space>hit!" ) ; <END_BUG> } public void updatePosition ( ) { } public void draw ( SpriteBatch batch ) { } public void rotate ( ) { } public void setCollision ( ) { } public void dispose ( ) { } }

Fix:
System . out . println ( this ) ;
Buggy code:
public class Packet { public boolean isValid ; public byte [ ] buffer ; public int mask ; public int start = 0 ; public int end = 0 ; public long timeStamp ; public Packet clone ( FairnessManager fm ) { } public Packet ( ) { } public Packet ( Packet packet , int expectedId ) { } public Packet ( int size ) { } public Packet ( int size , byte packetId ) { } public void setByte ( int pos , byte b ) { } public void setShort ( int pos , short s ) { } public void setInt ( int pos , int i ) { } public void setLong ( int pos , long i ) { } public void writeByte ( byte b ) { } public void writeShort ( short s ) { } public void writeInt ( int i ) { } public void writeLong ( long i ) { } public void writeString16 ( String s ) { } public byte getByte ( int pos ) { } public short getShort ( int pos ) { } public int getInt ( int pos ) { } public long getLong ( int pos ) { } public String getString16 ( int pos ) { } public int getString16Length ( int pos ) { <START_BUG> return 2 + ( getShort ( pos ) ) ; <END_BUG> } boolean isValid ( ) { } public boolean equals ( Packet p ) { } @ Override public String toString ( ) { } }

Fix:
return 2 + ( ( getShort ( pos ) ) * 2 ) ;
Buggy code:
public class JaxrsDependencyProcessor implements DeploymentUnitProcessor { public static ModuleIdentifier RESTEASY_ATOM = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-atom-provider" ) ; public static ModuleIdentifier RESTEASY_CDI = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-cdi" ) ; public static ModuleIdentifier RESTEASY_JAXRS = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-jaxrs" ) ; public static ModuleIdentifier RESTEASY_JAXB = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-jaxb-provider" ) ; public static ModuleIdentifier RESTEASY_JACKSON = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-jackson-provider" ) ; public static ModuleIdentifier RESTEASY_JSAPI = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-jsapi" ) ; public static ModuleIdentifier RESTEASY_MULTIPART = ModuleIdentifier . create ( "org.jboss.resteasy.resteasy-multipart-provider" ) ; public static ModuleIdentifier ASYNC_HTTP_SERVLET_30 = ModuleIdentifier . create ( "org.jboss.resteasy.async-http-servlet-30" ) ; public static ModuleIdentifier JAXB_API = ModuleIdentifier . create ( "javax.xml.bind.api" ) ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void addDepdenency ( ModuleSpecification moduleSpecification , ModuleLoader moduleLoader , ModuleIdentifier moduleIdentifier ) { <START_BUG> moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , moduleIdentifier , false , false , false ) ) ; <END_BUG> } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , moduleIdentifier , false , false , true ) ) ;
Buggy code:
public class UrlDAO extends DAO < Url > { public Url create ( Url obj ) { } public Url read ( int id ) { } public Url update ( Url obj ) { } public void delete ( Url obj ) { } public List < Url > selectAll ( ) { List < Url > listeDUrl = new ArrayList < Url > ( ) ; try { <START_BUG> ResultSet result = this . connect . createStatement ( ) . executeQuery ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>\"veilletechnologique\".t_url<seq2seq4repair_space>;" ) ; <END_BUG> while ( result . next ( ) ) { listeDUrl . add ( new Url ( result . getInt ( "id" ) , result . getString ( "intitule" ) , result . getString ( "adresse" ) , new UtilisateurDAO ( ) . read ( result . getString ( "createur" ) ) ) ) ; } } catch ( SQLException ex ) { ex . printStackTrace ( ) ; } return listeDUrl ; } public List < Url > selectCorrespondantA ( String clauseWhere ) throws Exception { } No newline ; at end ; of file ; }

Fix:
ResultSet result = this . connect . createStatement ( ) . executeQuery ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>\"veilletechnologique\".t_url<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>intitule;" ) ;
Buggy code:
public class MainActivity extends ActionBarActivity implements HomeFragment . OnFragmentInteractionListener , MultiChooserFragment . OnFragmentInteractionListener , MultiGameFragment . OnFragmentInteractionListener , SoloChooserFragment . OnFragmentInteractionListener , SoloGameFragment . OnFragmentInteractionListener { private User user ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } void addFragmentToStack ( Fragment fragment , String tag ) { FragmentTransaction ft = getFragmentManager ( ) . beginTransaction ( ) ; ft . replace ( frame , fragment , tag ) ; <START_BUG> ft . setTransition ( TRANSIT_FRAGMENT_OPEN ) ; <END_BUG> ft . addToBackStack ( fragment . getTag ( ) ) ; ft . commit ( ) ; } @ Override public void onModeChosen ( String mode ) { } @ Override public void onPlayerReady ( EGameMode gameMode , int columnCount , int rowCount , EIA nameIa , boolean needChosenBorderTile , boolean needChoosenTile ) { } @ Override public void onPlayersReady ( EGameMode gameMode , int column , int row , boolean needChosenBorderTile , boolean needChosenTile ) { } @ Override public void onBackPressed ( ) { } @ Override public void onFragmentInteraction ( ) { } }

Fix:
ft . setTransition ( TRANSIT_FRAGMENT_FADE ) ;
Buggy code:
public class SlidingPanelHandler { private final Activity activity ; private final AppContext context ; private final AdvancedEditor editor ; SlidingUpPanelLayout slidingLayout ; @ Bind ( id . sliding_layout_history ) SlidingUpPanelLayout slidingLayoutHistory ; @ Bind ( id . msg_history ) RecyclerView msgHistory ; @ Bind ( id . formatting_menu ) ActionMenuView formattingMenu ; @ Bind ( id . formatting_toolbar ) Toolbar formattingToolbar ; @ Bind ( id . chatline ) AppCompatEditText chatline ; @ Bind ( id . send ) AppCompatImageButton send ; public SlidingPanelHandler ( Activity activity , SlidingUpPanelLayout slidingLayout , AppContext context ) { } private void setupFormattingMenu ( Activity activity ) { } public void setFormattingEnabled ( boolean formattingEnabled ) { } private void setChatlineExpanded ( boolean expanded ) { } private int combineColors ( @ ColorInt int colora , @ ColorInt int colorb , @ FloatRange ( from = 0.0 , to = 1.0 ) float offset ) { } private void bindListener ( ) { slidingLayout . setAntiDragView ( card_panel ) ; slidingLayout . setPanelSlideListener ( new SlidingUpPanelLayout . PanelSlideListener ( ) { @ Override public void onPanelSlide ( View panel , float slideOffset ) { } @ Override public void onPanelCollapsed ( View panel ) { setChatlineExpanded ( false ) ; } @ Override public void onPanelExpanded ( View panel ) { setChatlineExpanded ( true ) ; } @ Override public void onPanelAnchored ( View panel ) { } @ Override public void onPanelHidden ( View panel ) { } } ) ; setChatlineExpanded ( ( ( slidingLayout . getPanelState ( ) ) == ( PanelState . EXPANDED ) ) ) ; send . setOnClickListener ( ( v ) -> sendInput ( ) ) ; chatline . setOnKeyListener ( ( v , keyCode , event ) -> { if ( ( ( event . getAction ( ) ) == KeyEvent . ACTION_DOWN ) && ( ( keyCode == KeyEvent . KEYCODE_ENTER ) || ( keyCode == KeyEvent . KEYCODE_NUMPAD_ENTER ) ) ) { sendInput ( ) ; } <START_BUG> return false ; <END_BUG> } ) ; } private void sendInput ( ) { } private void setupHistoryFakeData ( ) { } private void openHistory ( ) { } }

Fix:
return true ;
Buggy code:
public class DemonstrationWindowController { @ FXML private ResourceBundle resources ; @ FXML private URL location ; @ FXML private Button backButton ; @ FXML private Button completeBtn ; @ FXML private Button preferredBtn ; @ FXML private Button stableBtn ; @ FXML private Button groundedBtn ; @ FXML private Button conflictFreeBtn ; @ FXML private Button admissibleBtn ; @ FXML private CheckBox previousCheckBox ; @ FXML private TextArea explanationArea ; @ FXML private AnchorPane graphPane ; @ FXML private AnchorPane root ; private Framework argumentFramework ; private ArrayList < Argument > arguments ; private Interactor interactor ; @ FXML void initialize ( ) { interactor = new Interactor ( explanationArea ) ; ArrayList < Argument > arguments1 = new ArrayList < Argument > ( ) ; ArrayList < Argument > arguments2 = new ArrayList < Argument > ( ) ; ArrayList < Argument > arguments3 = new ArrayList < Argument > ( ) ; ArrayList < Argument > arguments4 = new ArrayList < Argument > ( ) ; ArrayList < Argument > arguments5 = new ArrayList < Argument > ( ) ; arguments1 . add ( new Argument ( 'A' , "A" , "B" ) ) ; arguments1 . add ( new Argument ( 'B' , "B" , "" ) ) ; arguments1 . add ( new Argument ( 'C' , "C" , "BD" ) ) ; arguments1 . add ( new Argument ( 'D' , "D" , "CE" ) ) ; arguments1 . add ( new Argument ( 'E' , "E" , "E" ) ) ; arguments2 . add ( new Argument ( 'A' , "A" , "B" ) ) ; arguments2 . add ( new Argument ( 'B' , "B" , "AC" ) ) ; arguments2 . add ( new Argument ( 'C' , "C" , "DE" ) ) ; arguments2 . add ( new Argument ( 'D' , "D" , "B" ) ) ; arguments2 . add ( new Argument ( 'E' , "E" , "AF" ) ) ; arguments2 . add ( new Argument ( 'F' , "F" , "G" ) ) ; arguments2 . add ( new Argument ( 'G' , "G" , "" ) ) ; arguments3 . add ( new Argument ( 'A' , "A" , "B" ) ) ; arguments3 . add ( new Argument ( 'B' , "B" , "ACE" ) ) ; arguments3 . add ( new Argument ( 'C' , "C" , "D" ) ) ; arguments3 . add ( new Argument ( 'D' , "D" , "B" ) ) ; arguments3 . add ( new Argument ( 'E' , "E" , "BF" ) ) ; arguments3 . add ( new Argument ( 'F' , "F" , "" ) ) ; arguments3 . add ( new Argument ( 'G' , "G" , "FD" ) ) ; arguments4 . add ( new Argument ( 'A' , "A" , "B" ) ) ; arguments4 . add ( new Argument ( 'B' , "B" , "A" ) ) ; arguments4 . add ( new Argument ( 'C' , "C" , "B" ) ) ; arguments5 . add ( new Argument ( 'A' , "A" , "B" ) ) ; arguments5 . add ( new Argument ( 'B' , "B" , "AC" ) ) ; arguments5 . add ( new Argument ( 'C' , "C" , "B" ) ) ; <START_BUG> argumentFramework = new Framework ( arguments4 , interactor ) ; <END_BUG> } @ FXML public void onConflictFreeClick ( ) { } @ FXML public void onCompleteClick ( ) { } @ FXML public void onPreferredClick ( ) { } @ FXML public void onStableClick ( ) { } @ FXML public void onGroundedClick ( ) { } @ FXML public void onAdmissibleClick ( ) { } private void printAttacks ( ) { } }

Fix:
argumentFramework = new Framework ( arguments1 , interactor ) ;
Buggy code:
public class KeyValue { private String key = null ; private ArrayList < String > values = null ; public KeyValue ( String key , String value ) { } public KeyValue ( String key , ArrayList < String > values ) { } public String getKey ( ) { } public String getValue ( ) { if ( ( values ) != null ) { <START_BUG> return values . get ( 9 ) ; <END_BUG> } return null ; } public ArrayList < String > getValues ( ) { } public void setValue ( String value ) { } }

Fix:
return values . get ( 0 ) ;
Buggy code:
public class Main implements ProblemSeverities , SuffixConstants { public static ResourceBundle bundle ; public static final String bundleName = "org.eclipse.jdt.internal.compiler.batch.messages" ; public static final char [ ] DOUBLE_QUOTES = "''" . toCharArray ( ) ; public static final char [ ] SINGLE_QUOTE = "'" . toCharArray ( ) ; public String [ ] classpaths ; public String destinationPath ; public String [ ] encodings ; public PrintWriter err ; public int exportedClassFilesCounter ; public String [ ] filenames ; public boolean generatePackagesStructure ; public int globalErrorsCount ; public int globalProblemsCount ; public int globalWarningsCount ; public long lineCount ; public String log ; public boolean noWarn = false ; public Map options ; public PrintWriter out ; public boolean proceed = true ; public boolean proceedOnError = false ; public boolean produceRefInfo = false ; public int repetitions ; public boolean showProgress = false ; public boolean systemExitWhenFinished = true ; public long startTime ; public boolean timing = false ; public boolean verbose = false ; public Main ( PrintWriter outWriter , PrintWriter errWriter , boolean systemExitWhenFinished ) { } public static String bind ( String id ) { } public static String bind ( String id , String binding ) { } public static String bind ( String id , String binding1 , String binding2 ) { } public static String bind ( String id , String [ ] bindings ) { } public static boolean compile ( String commandLine ) { } public static boolean compile ( String commandLine , PrintWriter outWriter , PrintWriter errWriter ) { } public static void main ( String [ ] argv ) { } public static void relocalize ( ) { } public static String [ ] tokenize ( String commandLine ) { } public boolean compile ( String [ ] argv ) { } public void configure ( String [ ] argv ) throws InvalidInputException { } private void disableWarnings ( ) { } public String extractDestinationPathFromSourceFile ( CompilationResult result ) { } public ICompilerRequestor getBatchRequestor ( ) { } public CompilationUnit [ ] getCompilationUnits ( ) throws InvalidInputException { } private File [ ] getFilesFrom ( File f , final String extension ) { return f . listFiles ( new FilenameFilter ( ) { public boolean accept ( File dir , String name ) { <START_BUG> if ( name . endsWith ( extension ) ) { <END_BUG> return true ; } return false ; } } ) ; } public IErrorHandlingPolicy getHandlingPolicy ( ) { } public FileSystem getLibraryAccess ( ) { } public IProblemFactory getProblemFactory ( ) { } public void outputClassFiles ( CompilationResult unitResult ) { } public void performCompilation ( ) throws InvalidInputException { } public void printStats ( ) { } public void printUsage ( ) { } public void printVersion ( ) { } }

Fix:
if ( name . toLowerCase ( ) . endsWith ( extension ) ) {
Buggy code:
public class MuHandler implements DataHandler { private static final Pattern SEARCH_PATTERN = Pattern . compile ( "^\\.baka\\s+(\\S+.*)" ) ; private static final Pattern LINK_PATTERN = Pattern . compile ( "((http(s)?:////)?(www\\.)?((rlstrackr.com//series//info//)|(mangaupdates.com//series.html\\?id=))(\\d+)(//)?)" ) ; private final String base ; private final DbHandler database ; public MuHandler ( final ConfigParser cfg ) throws ClassNotFoundException { } @ Override public boolean isHandlerOf ( final String query ) { } @ Override public MuData getData ( final String query ) throws NoResultsException { } private MuData search ( final String query ) throws NoResultsException , IOException , SQLException , ParseException { <START_BUG> final int id = database . getId ( query . split ( "\\w" ) ) ; <END_BUG> return fromLink ( ( ( base ) + id ) ) ; } private MuData fromLink ( final String link ) throws IOException , ParseException { } private void addTitle ( final MuData mu , final Document doc ) { } private void parseSidebar ( final MuData mu , final Document doc ) { } private void addTags ( final MuData mu , final Element element ) { } private void addLatest ( final MuData mu , final Document doc ) throws ParseException { } private Date calcDays ( final String date ) throws ParseException { } }

Fix:
final int id = database . getId ( query . split ( "\\s" ) ) ;
Buggy code:
public class ListUtilsTest extends BulkTest { private static final String a = "a" ; private static final String b = "b" ; private static final String c = "c" ; private static final String d = "d" ; private static final String e = "e" ; private static final String x = "x" ; private String [ ] fullArray ; private List < String > fullList ; public ListUtilsTest ( final String name ) { } public static Test suite ( ) { } @ Override public void setUp ( ) { } public void testNothing ( ) { } public void testIntersectNonEmptyWithEmptyList ( ) { } public void testIntersectEmptyWithEmptyList ( ) { } public void testIntersectNonEmptySubset ( ) { } public void testIntersectListWithNoOverlapAndDifferentTypes ( ) { } public void testIntersectListWithSelf ( ) { } public void testIntersectionOrderInsensitivity ( ) { } public void testPredicatedList ( ) { } public void testLazyList ( ) { final List < Integer > list = ListUtils . lazyList ( new ArrayList < Integer > ( ) , new Factory < Integer > ( ) { private int index ; public Integer create ( ) { ( index ) ++ ; <START_BUG> return new Integer ( index ) ; <END_BUG> } } ) ; assertNotNull ( list . get ( 5 ) ) ; assertEquals ( 6 , list . size ( ) ) ; assertNotNull ( list . get ( 5 ) ) ; assertEquals ( 6 , list . size ( ) ) ; } public void testEmptyIfNull ( ) { } public void testDefaultIfNull ( ) { } public void testEquals ( ) { } public void testHashCode ( ) { } public void testRetainAll ( ) { } public void testRemoveAll ( ) { } public void testSubtract ( ) { } public void testSubtractNullElement ( ) { } public void testIndexOf ( ) { } public void testPartition ( ) { } private static Predicate < Number > EQUALS_TWO = new Predicate < Number > ( ) { public boolean evaluate ( final Number input ) { } } ; public void testSelect ( ) { } public void testSelectRejected ( ) { } }

Fix:
return Integer . valueOf ( index ) ;
Buggy code:
public class ModelUpdater { HashSet projectsToUpdate = new HashSet ( ) ; protected void addToParentInfo ( Openable child ) { } protected static void close ( Openable element ) { } protected void elementAdded ( Openable element ) { } protected void elementChanged ( Openable element ) { } protected void elementRemoved ( Openable element ) { if ( element . isOpen ( ) ) { ModelUpdater . close ( element ) ; } removeFromParentInfo ( element ) ; int elementType = element . getElementType ( ) ; switch ( elementType ) { case IJavaElement . JAVA_MODEL : <START_BUG> JavaModelManager . getJavaModelManager ( ) . getIndexManager ( ) . reset ( ) ; <END_BUG> break ; case IJavaElement . JAVA_PROJECT : JavaModelManager manager = JavaModelManager . getJavaModelManager ( ) ; JavaProject javaProject = ( ( JavaProject ) ( element ) ) ; manager . removePerProjectInfo ( javaProject ) ; manager . containerRemove ( javaProject ) ; break ; case IJavaElement . PACKAGE_FRAGMENT_ROOT : this . projectsToUpdate . add ( element . getJavaProject ( ) ) ; break ; case IJavaElement . PACKAGE_FRAGMENT : JavaProject project = ( ( JavaProject ) ( element . getJavaProject ( ) ) ) ; project . resetCaches ( ) ; break ; } } public void processJavaDelta ( IJavaElementDelta delta ) { } protected void removeFromParentInfo ( Openable child ) { } protected void traverseDelta ( IJavaElementDelta delta , IPackageFragmentRoot root , IJavaProject project ) { } }

Fix:
JavaModelManager . getIndexManager ( ) . reset ( ) ;
Buggy code:
@ Description ( "Operator<seq2seq4repair_space>which<seq2seq4repair_space>adds<seq2seq4repair_space>and<seq2seq4repair_space>removes<seq2seq4repair_space>conversions<seq2seq4repair_space>to//from<seq2seq4repair_space>an<seq2seq4repair_space>ACG." ) public class AddRemoveConversion extends EdgeCreationOperator { public Input < RealParameter > rhoInput = new feast . input . In < RealParameter > ( "rho" , "Conversion<seq2seq4repair_space>rate<seq2seq4repair_space>parameter." ) . setRequired ( ) ; public Input < RealParameter > deltaInput = new feast . input . In < RealParameter > ( "delta" , "Tract<seq2seq4repair_space>length<seq2seq4repair_space>parameter." ) . setRequired ( ) ; public AddRemoveConversion ( ) { } @ Override public void initAndValidate ( ) throws Exception { } @ Override public double proposal ( ) { } public double drawNewConversion ( ) throws ProposalFailed { double logP = 0 ; Conversion newConversion = new Conversion ( ) ; logP += attachEdge ( newConversion ) ; int startSite ; int endSite ; double u = ( Randomizer . nextDouble ( ) ) * ( ( deltaInput . get ( ) . getValue ( ) ) + ( acg . getSequenceLength ( ) ) ) ; <START_BUG> if ( ( Randomizer . nextDouble ( ) ) < ( deltaInput . get ( ) . getValue ( ) ) ) <END_BUG> startSite = 0 ; else startSite = ( ( int ) ( u - ( deltaInput . get ( ) . getValue ( ) ) ) ) ; endSite = startSite + ( ( int ) ( Randomizer . nextGeometric ( ( 1.0 // ( deltaInput . get ( ) . getValue ( ) ) ) ) ) ) ; endSite = Math . max ( endSite , ( ( acg . getSequenceLength ( ) ) - 1 ) ) ; newConversion . setStartSite ( startSite ) ; newConversion . setEndSite ( endSite ) ; return logP ; } public double getConversionProb ( Conversion conv ) { } }

Fix:
if ( u < ( deltaInput . get ( ) . getValue ( ) ) )
Buggy code:
public final class JavaUtils { private JavaUtils ( ) { } public static void copy ( Dictionary destination , Dictionary source ) { } public static Hashtable getProperties ( ServiceReference ref ) { } public static Version getBundleVersion ( Bundle bundle ) { Dictionary headers = bundle . getHeaders ( ) ; String version = ( ( String ) ( headers . get ( Constants . BUNDLE_VERSION ) ) ) ; <START_BUG> return version != null ? Version . parseVersion ( version ) : null ; <END_BUG> } }

Fix:
return version != null ? Version . parseVersion ( version ) : Version . emptyVersion ;
Buggy code:
public class GAnalyticsTest { private BeanFactory factory ; @ SuppressWarnings ( "deprecation" ) @ Test public void testAuthorization ( ) throws IOException { factory = new ClassPathXmlApplicationContext ( "beans.xml" ) ; IGAService service = ( ( IGAService ) ( factory . getBean ( "gAnalyticsService" ) ) ) ; service . setUA ( "UA-57349981-1" ) ; <START_BUG> service . numOfVisitsByInterval ( new Date ( 114 , 11 , 25 ) , new Date ( 115 , 1 , 22 ) ) ; <END_BUG> } }

Fix:
service . getVisitsByInterval ( new Date ( 114 , 11 , 25 ) , new Date ( 115 , 1 , 22 ) ) ;
Buggy code:
class ML { public static hsv [ ] [ ] img2RGB2HSV ( String ip ) throws IOException { } public static hsv [ ] [ ] img2RGB2HSV ( File input ) throws IOException { } public static void HSV2File ( hsv [ ] [ ] hsvImage , int width , int height ) throws IOException { } public static BitVector colorFeatureBuilder ( hsv [ ] [ ] hsvImage , int N , int C_h , int C_s , int C_v ) { } public static MyBitMatrix isInRange ( hsv [ ] [ ] hsvCell , int cellSize , float low , float high , int type ) { } public static boolean isAnyTrue ( MyBitMatrix temp ) { } public static fileData [ ] batchColorFeatureBuilder ( String ip , int N , int C_h , int C_s , int C_v ) throws IOException { } public static void main ( String [ ] args ) throws IOException { int N = 5 ; int C_h = 10 ; int C_s = 6 ; int C_v = 6 ; <START_BUG> BitVector colorFeatures = ML . colorFeatureBuilder ( ML . img2RGB2HSV ( "//home//shinchan//FinalProject//PaperImplementation//Eclipse//ML//input//dog.55.jpg" ) , N , C_h , C_s , C_v ) ; <END_BUG> String temp = "Single<seq2seq4repair_space>input<seq2seq4repair_space>Color<seq2seq4repair_space>features<seq2seq4repair_space>from<seq2seq4repair_space>Java.\n" ; int count = 0 ; for ( int i = 0 ; i < ( colorFeatures . size ( ) ) ; i ++ ) { if ( colorFeatures . get ( i ) ) { temp += ( Integer . toString ( count ) ) + "\n" ; } count ++ ; } System . out . print ( temp ) ; String ip = new String ( "//home//shinchan//FinalProject//PaperImplementation//Eclipse//ML//input//trainingImageData//" ) ; fileData [ ] allImageData = ML . batchColorFeatureBuilder ( ip , N , C_h , C_s , C_v ) ; for ( int i = 0 ; i < ( allImageData . length ) ; i ++ ) { System . out . println ( ( ( allImageData [ i ] . colorFeatureVector . toString ( ) ) + "\n" ) ) ; } } No newline ; at end ; of file ; }

Fix:
BitVector colorFeatures = ML . colorFeatureBuilder ( ML . img2RGB2HSV ( "//home//shinchan//FinalProject//PaperImplementation//Eclipse//ML//input//cat.55.jpg" ) , N , C_h , C_s , C_v ) ;
Buggy code:
public class JavaBuilder extends IncrementalProjectBuilder { IProject currentProject ; JavaProject javaProject ; IWorkspaceRoot workspaceRoot ; NameEnvironment nameEnvironment ; SimpleLookupTable binaryLocationsPerProject ; State lastState ; BuildNotifier notifier ; char [ ] [ ] extraResourceFileFilters ; String [ ] extraResourceFolderFilters ; public static final String JAVA_EXTENSION = "java" ; public static final String CLASS_EXTENSION = "class" ; public static final String JAR_EXTENSION = "jar" ; public static final String ZIP_EXTENSION = "zip" ; public static boolean DEBUG = false ; static ArrayList builtProjects = null ; public static IMarker [ ] getProblemsFor ( IResource resource ) { } public static IMarker [ ] getTasksFor ( IResource resource ) { } public static void removeProblemsAndTasksFor ( IResource resource ) { } public static State readState ( IProject project , DataInputStream in ) throws IOException { } public static void writeState ( Object state , DataOutputStream out ) throws IOException { } public JavaBuilder ( ) { } protected IProject [ ] build ( int kind , Map ignored , IProgressMonitor monitor ) throws CoreException { } private void buildAll ( ) { } private void buildDeltas ( SimpleLookupTable deltas ) { } private void cleanup ( ) { } private void clearLastState ( ) { } boolean filterExtraResource ( IResource resource ) { } private SimpleLookupTable findDeltas ( ) { } private State getLastState ( IProject project ) { } private IProject [ ] getRequiredProjects ( boolean includeBinaryPrerequisites ) { } private boolean hasClasspathChanged ( ) { } private boolean hasStructuralDelta ( ) { } private void initializeBuilder ( ) throws CoreException { } private boolean isClasspathBroken ( IClasspathEntry [ ] classpath , IProject p ) throws CoreException { if ( classpath == ( JavaProject . INVALID_CLASSPATH ) ) return true ; <START_BUG> IMarker [ ] markers = p . findMarkers ( IJavaModelMarker . BUILDPATH_PROBLEM_MARKER , false , IResource . DEPTH_ONE ) ; <END_BUG> for ( int i = 0 , l = markers . length ; i < l ; i ++ ) if ( ( ( ( Integer ) ( markers [ i ] . getAttribute ( IMarker . SEVERITY ) ) ) . intValue ( ) ) == ( IMarker . SEVERITY_ERROR ) ) return true ; return false ; } private boolean isWorthBuilding ( ) throws CoreException { } private void recordNewState ( State state ) { } public String toString ( ) { } }

Fix:
IMarker [ ] markers = p . findMarkers ( IJavaModelMarker . BUILDPATH_PROBLEM_MARKER , false , IResource . DEPTH_ZERO ) ;
Buggy code:
@ Component public class DiagnosgruppQuery { @ Autowired private Icd10 icd10 ; private Map < Integer , Icd10 . Kapitel > kapitelMap ; @ PostConstruct public void parseIcd10 ( ) { } public List < OverviewChartRowExtended > getOverviewDiagnosgrupper ( Collection < Sjukfall > currentSjukfall , Collection < Sjukfall > previousSjukfall , int noOfRows ) { } public DiagnosgruppResponse getDiagnosgrupper ( Aisle aisle , Predicate < Fact > filter , LocalDate start , int periods , int periodLength ) { } public DiagnosgruppResponse getUnderdiagnosgrupper ( Aisle aisle , Predicate < Fact > filter , LocalDate start , int periods , int periodLength , String rangeId ) throws RangeNotFoundException { } public SimpleKonResponse < SimpleKonDataRow > getJamforDiagnoser ( Aisle aisle , Predicate < Fact > filter , LocalDate start , int periods , int periodLength , List < String > diagnosis ) { final List < Icd10 . Kategori > kategoris = Lists . transform ( diagnosis , new Function < String , Icd10 . Kategori > ( ) { @ Override public Kategori apply ( String diagnos ) { <START_BUG> return icd10 . findKategoriFromNumericId ( Integer . valueOf ( diagnos ) ) ; <END_BUG> } } ) ; final Iterable < SjukfallGroup > sjukfallGroups = SjukfallUtil . sjukfallGrupper ( start , periods , periodLength , aisle , filter ) ; final List < KonDataRow > periodRows = getKonDataRows ( sjukfallGroups , kategoris , KATEGORI , true ) ; final List < SimpleKonDataRow > rows = new java . util . ArrayList ( kategoris . size ( ) ) ; final List < KonField > data = periodRows . get ( 0 ) . getData ( ) ; for ( int i = 0 ; i < ( data . size ( ) ) ; i ++ ) { final KonField row = data . get ( i ) ; final Icd10 . Kategori kategori = kategoris . get ( i ) ; rows . add ( new SimpleKonDataRow ( ( ( ( kategori . getId ( ) ) + "<seq2seq4repair_space>" ) + ( kategori . getName ( ) ) ) , row ) ) ; } return new SimpleKonResponse ( rows , ( periods * periodLength ) ) ; } private DiagnosgruppResponse getUnderdiagnosgrupper ( Aisle aisle , Predicate < Fact > filter , LocalDate start , int periods , int periodLength , Icd10 . Range kapitel , Icd10RangeType rangeType ) { } private List < KonDataRow > getKonDataRows ( Iterable < SjukfallGroup > sjukfallGroups , List < ? extends Icd10 . Id > kapitel , Icd10RangeType rangeType , boolean countAllDxs ) { } private int getCurrentCount ( int icd10Code , Map < Integer , Integer > genderMap ) { } public DiagnosgruppResponse getDiagnosavsnitts ( Aisle aisle , Predicate < Fact > filter , LocalDate start , int periods , int periodLength , String kapitelId ) { } private static Collection < String > rowsToKeep ( Map < String , Counter < String > > count , int noOfRows ) { } public List < Counter < String > > count ( Collection < Sjukfall > sjukfalls , int noOfRows ) { } public Map < String , Counter < String > > count ( Collection < Sjukfall > sjukfalls ) { } private Map < String , Counter < String > > createCounters ( ) { } }

Fix:
return icd10 . findKategori ( diagnos ) ;
Buggy code:
@ Controller @ RequestMapping ( "//manufacturer" ) @ SessionAttributes ( "manufacturer" ) public class ManufacturerController extends AbstractBaseController < Manufacturer > { @ Autowired private ManufacturerService service ; @ RequestMapping ( value = "//home.html" , method = RequestMethod . GET ) public String showHomePage ( ModelMap model ) { } @ RequestMapping ( value = "//createForm.html" , method = RequestMethod . GET ) public String showCreateForm ( ModelMap model ) { } <START_BUG> @ RequestMapping ( value = "//create" , method = RequestMethod . POST ) <END_BUG> public String create ( @ ModelAttribute ( "manufacturer" ) Manufacturer manufacturer , ModelMap model ) { service . addManufacturer ( manufacturer ) ; List < Manufacturer > list = service . getAllManufacturers ( ) ; System . err . println ( list ) ; model . put ( "manufacturerList" , list ) ; return "manufacturer//listManufacturers" ; } @ RequestMapping ( "//delete//{id}" ) public String delete ( @ PathVariable ( "id" ) String id , ModelMap model ) { } @ RequestMapping ( value = "//searchForm.html" , method = RequestMethod . GET ) public String showSearchForm ( ModelMap model ) { } @ RequestMapping ( value = "//search.html" , method = RequestMethod . POST ) public String search ( @ ModelAttribute ( "manufacturer" ) Manufacturer manuf , @ RequestParam ( "rowsPerPage" ) String rowsPerPage , ModelMap model , BindingResult result , HttpSession session ) { } @ RequestMapping ( "//listAll.html" ) public String listManufacturers ( Model model , HttpSession session ) { } @ RequestMapping ( "//doPaging.html" ) public String navigate ( @ RequestParam ( "name" ) String name , @ RequestParam ( "contactname" ) String contactName , @ RequestParam ( "contactnumber" ) String contactNumber , @ RequestParam ( "page" ) String page , ModelMap model , HttpSession session , @ ModelAttribute Manufacturer modelType ) { } @ RequestMapping ( "//delete.html" ) public String deleteManufacturers ( ModelMap model , HttpSession session , @ RequestParam ( "selectedIds" ) String [ ] ids ) { } @ RequestMapping ( "//deleteConfirmed.html" ) public String deleteManufacturers ( ModelMap model , HttpSession session ) { } No newline ; at end ; of file ; }

Fix:
@ RequestMapping ( value = "//create.html" , method = RequestMethod . POST )
Buggy code:
public final class Streams { private static final String XML_PROPERTIES_DTD = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"?>" + ( ( ( ( ( ( ( "<!--<seq2seq4repair_space>DTD<seq2seq4repair_space>for<seq2seq4repair_space>properties<seq2seq4repair_space>-->" + "<!ELEMENT<seq2seq4repair_space>properties<seq2seq4repair_space>(<seq2seq4repair_space>comment?,<seq2seq4repair_space>entry*<seq2seq4repair_space>)<seq2seq4repair_space>>" ) + "<!ATTLIST<seq2seq4repair_space>properties" ) + "<seq2seq4repair_space>version<seq2seq4repair_space>CDATA<seq2seq4repair_space>#FIXED<seq2seq4repair_space>\"1.0\">" ) + "<!ELEMENT<seq2seq4repair_space>comment<seq2seq4repair_space>(#PCDATA)<seq2seq4repair_space>>" ) + "<!ELEMENT<seq2seq4repair_space>entry<seq2seq4repair_space>(#PCDATA)<seq2seq4repair_space>>" ) + "<!ATTLIST<seq2seq4repair_space>entry<seq2seq4repair_space>" ) + "<seq2seq4repair_space>key<seq2seq4repair_space>CDATA<seq2seq4repair_space>#REQUIRED>" ) ; public static void close ( Closeable closeable ) throws IOException { } public static int copy ( final InputStream in , final OutputStream out ) throws IOException { } public static int copy ( final InputStream in , final OutputStream out , final int bufSize ) throws IOException { } public static void loadFromXml ( Properties properties , InputStream inputStream ) throws IOException { } public static String readString ( final InputStream in ) throws IOException { } public static String readString ( final InputStream in , final CharSequence encoding ) throws IOException { } public static String readString ( final Reader in ) throws IOException { <START_BUG> final StringBuffer buffer = new StringBuffer ( 2048 ) ; <END_BUG> int value ; while ( ( value = in . read ( ) ) != ( - 1 ) ) { buffer . append ( ( ( char ) ( value ) ) ) ; } return buffer . toString ( ) ; } private Streams ( ) { } }

Fix:
final StringBuilder buffer = new StringBuilder ( 2048 ) ;
Buggy code:
public class TestBasics extends LuceneTestCase { private static IndexSearcher searcher ; private static IndexReader reader ; private static Directory directory ; @ BeforeClass public static void beforeClass ( ) throws Exception { } @ AfterClass public static void afterClass ( ) throws Exception { } @ Test public void testTerm ( ) throws Exception { } @ Test public void testTerm2 ( ) throws Exception { } @ Test public void testPhrase ( ) throws Exception { } @ Test public void testPhrase2 ( ) throws Exception { } @ Test public void testBoolean ( ) throws Exception { } @ Test public void testBoolean2 ( ) throws Exception { } @ Test public void testSpanNearExact ( ) throws Exception { } @ Test public void testSpanNearUnordered ( ) throws Exception { } @ Test public void testSpanNearOrdered ( ) throws Exception { } @ Test public void testSpanNot ( ) throws Exception { } @ Test public void testSpanWithMultipleNotSingle ( ) throws Exception { } @ Test public void testSpanWithMultipleNotMany ( ) throws Exception { } @ Test public void testNpeInSpanNearWithSpanNot ( ) throws Exception { } @ Test public void testNpeInSpanNearInSpanFirstInSpanNot ( ) throws Exception { } @ Test public void testSpanFirst ( ) throws Exception { } @ Test public void testSpanPositionRange ( ) throws Exception { } @ Test public void testSpanPayloadCheck ( ) throws Exception { } public void testComplexSpanChecks ( ) throws Exception { } @ Test public void testSpanOr ( ) throws Exception { } @ Test public void testSpanExactNested ( ) throws Exception { } @ Test public void testSpanNearOr ( ) throws Exception { } @ Test public void testSpanComplex1 ( ) throws Exception { } @ Test public void testSpansSkipTo ( ) throws Exception { } private boolean skipToAccoringToJavaDocs ( Spans s , int target ) throws Exception { } private void checkHits ( Query query , int [ ] results ) throws IOException { <START_BUG> CheckHits . checkHits ( query , "field" , TestBasics . searcher , results ) ; <END_BUG> } }

Fix:
CheckHits . checkHits ( random , query , "field" , TestBasics . searcher , results ) ;
Buggy code:
public class HmacAuthenticationProvider extends SimpleAuthenticationProvider { public static final long TEN_MINUTES = ( 10 * 60 ) * 1000 ; private static final StringGuacamoleProperty SECRET_KEY = new StringGuacamoleProperty ( ) { @ Override public String getName ( ) { } } ; private static final StringGuacamoleProperty DEFAULT_PROTOCOL = new StringGuacamoleProperty ( ) { @ Override public String getName ( ) { } } ; private static final IntegerGuacamoleProperty TIMESTAMP_AGE_LIMIT = new IntegerGuacamoleProperty ( ) { @ Override public String getName ( ) { } } ; private static final Logger logger = LoggerFactory . getLogger ( HmacAuthenticationProvider . class ) ; private String defaultProtocol = "rdp" ; private long timestampAgeLimit = HmacAuthenticationProvider . TEN_MINUTES ; public static final String SIGNATURE_PARAM = "signature" ; public static final String ID_PARAM = "id" ; public static final String TIMESTAMP_PARAM = "timestamp" ; public static final String PARAM_PREFIX = "guac." ; private static final List < String > SIGNED_PARAMETERS = new ArrayList < String > ( ) { } ; private SignatureVerifier signatureVerifier ; private final TimeProviderInterface timeProvider ; public HmacAuthenticationProvider ( TimeProviderInterface timeProvider ) { } public HmacAuthenticationProvider ( ) { } @ Override public Map < String , GuacamoleConfiguration > getAuthorizedConfigurations ( Credentials credentials ) throws GuacamoleException { } @ Override public UserContext updateUserContext ( UserContext context , Credentials credentials ) throws GuacamoleException { HttpServletRequest request = credentials . getRequest ( ) ; GuacamoleConfiguration config = getGuacamoleConfiguration ( request ) ; if ( config == null ) { return null ; } String id = config . getParameter ( "id" ) ; <START_BUG> SimpleConnectionDirectory connections = ( ( SimpleConnectionDirectory ) ( context . getRootConnectionGroup ( ) . getConnectionDirectory ( ) ) ) ; <END_BUG> SimpleConnection connection = new SimpleConnection ( id , id , config ) ; connections . putConnection ( connection ) ; return context ; } private GuacamoleConfiguration getGuacamoleConfiguration ( HttpServletRequest request ) throws GuacamoleException { } private boolean checkTimestamp ( String ts ) { } private GuacamoleConfiguration parseConfigParams ( HttpServletRequest request ) { } private void initFromProperties ( ) throws GuacamoleException { } }

Fix:
SimpleConnectionDirectory connections = ( ( SimpleConnectionDirectory ) ( context . getConnectionDirectory ( ) ) ) ;
Buggy code:
public class RubricsFragment extends FaddingTitleBaseFragment implements ListView . OnItemClickListener , SwipyRefreshLayout . OnRefreshListener { public static final String TAG = "RubricsFragment" ; public static final int FRAGMENT_ID = 1 ; private ArticlesAdapter articlesAdapter ; private List < Article > articles = new LinkedList < > ( ) ; private View fragmentLayout ; private int currentPage = 1 ; private String currentRubricId ; @ Nullable @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onStart ( ) { } @ Override public void onStop ( ) { } @ Override public void onRefresh ( SwipyRefreshLayoutDirection swipyRefreshLayoutDirection ) { } @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { } @ Override public View getActionBarCustomView ( LayoutInflater inflater ) { } @ Override public void initActionBarItems ( ) { } @ Override public String getFragmentTag ( ) { } @ Override public int getFragmentId ( ) { } public void onEvent ( RubricContentWrapper rubricContentWrapper ) { <START_BUG> Glide . with ( this ) . load ( rubricContentWrapper . getRubricImage ( ) ) . centerCrop ( ) . into ( faddingHeader ) ; <END_BUG> if ( ( ( currentPage ) == 1 ) && ( ! ( articles . isEmpty ( ) ) ) ) { articles . clear ( ) ; } currentRubricId = rubricContentWrapper . getRubricId ( ) ; articles . addAll ( rubricContentWrapper . getArticles ( ) ) ; swipyRefreshLayout . setRefreshing ( false ) ; articlesAdapter . notifyDataSetChanged ( ) ; } private void getRubricData ( Bundle data ) { } private OnClickListener barClickListener = new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { } } ; }

Fix:
Glide . with ( this ) . load ( ( ( getString ( vox_url ) ) + ( rubricContentWrapper . getRubricImage ( ) ) ) ) . centerCrop ( ) . into ( faddingHeader ) ;